Repository navigation
feat: integrate optional native iSH Pi ExecutionEnv on iOS - #7
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6
Moose now has an opt-in, real iOS iSH-backed Pi Durable
ExecutionEnv. Pi read/write/edit and bash share each conversation's persistent guest root, and the actual React Native/Hermes application executes the pinned iSH core locally. The existing Expo environment remains the default; enable the experiment withnpm run prepare:ishandEXPO_PUBLIC_MOOSE_ISH=1 npm run ios.The original feasibility probe and its failing host-mount audit are retained as historical reproducers. The embedded path adds a surviving supervisor, inherited execution domains and explicit syscall/mount restrictions; it does not use a host shell, Node in Hermes or a remote backend.
Changes
Add
docs/ios-ish-setup-guide.md, modeled on the Android Termux phone guide: prerequisites, initial manual steps, controlled/model checks, daily operation, errors, automatic setup behavior, diagnostics and a physical-device acceptance record. Link it from README and execution notes. Preserve main’s v0.7.0 recovery, Skill folders and live tool-activity changes.Merge latest
main(a8e0511, v0.7.0), retaining Android Termux automatic setup, diagnostics, native capabilities and its reduced executor profile. iSH retains its own durable bash tool and approved native capabilities.Expand README with complete iOS prerequisites, dependency preparation, native build, persistent development flags, device-signing caveat, model configuration, controlled smoke, backend switching and troubleshooting. iOS needs no companion app/service or pairing.
Fix fresh-root
/devinitialization found by the clean-seed verifier; a regression failed before the fix and passes on host/UIKit.Add the embedded native core, private per-workspace fakefs roots, explicit argv/cwd/env/stdin, binary streaming, exit status, bounded output and cancellation/reaping of descendants.
Add a local React Native module with process-wide job/journal/admission ownership across bridge reloads. Invalidating one generation cancels its own commands. Persistent stable command IDs prevent automatic replay; process restart marks unfinished commands interrupted.
Implement the real Pi file/shell contract, applicable environment conformance, and an explicitly unsafe bash tool that durably records its command ID before guest effects.
Enforce native task/file/backing-memory/transfer limits and bounded bridge admission. Document the finite 10,000-ID journal, file-transfer bounds and the absence of aggregate disk or total app-RSS quotas.
Keep the integration optional and iOS-only; preserve default Expo behavior, existing transcripts, credentials and unrelated workspaces. Checkpoint branches get separate roots rather than file snapshots.
Add reproducible source builds, controlled model-transport app smoke, native lifecycle regressions and licensing/source notices. Generated binaries/rootfs are not committed or published.
Validation (2026-10-23)
npm run verifypassed: 237 tests, three Termux installer tests, typecheck, portable Pi/SQLite smoke, runtime generation, Android and iOS Hermes resource exports. The 29 real-core adapter tests are intentionally separate.prepare:ish, rebuilt native client, installed source-manifest/rootfs checks, arm64 UIKit core/production-bridge lifecycle/resource/cancellation tests, all 33 host adapter tests, and the actual React Native/Hermes controlled Pi write/edit/bash/read smoke. See the simulator validation record indocs/ios-ish-setup-guide.md; physical-device/background/real-model flows remain unvalidated.Remaining limits / draft status
Keep this PR draft for experimental native review and distribution decisions. Physical-device operation, signed device app/IPA, device suspension/foreground recovery and real-account/paid-model calls were not performed. iOS may suspend commands. The interpreter shares the app process and is not a separate VM; Linux syscall support is partial, the guest uses POSIX
/bin/sh, and network access is disabled.Before distributing any binary linking iSH, select a compatible whole-program license and supply the applicable complete corresponding app/kernel/package source and licenses. This PR neither publishes a binary nor establishes App Store approval. See
docs/ios-ish-execution.mdfor reproducible commands, exact bounds and evidence.