mobile-agent-orchestrator 0.0.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 egdev6
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,271 @@
1
- # mobile-agent-orchestrator
1
+ <a id="readme-top"></a>
2
2
 
3
- Name reserved. The real package ships with v0.2.0 from [egdev6/mobile-agent-orchestrator](https://github.com/egdev6/mobile-agent-orchestrator) via npm trusted publishing. Do not install this placeholder version.
3
+ <div align="center">
4
+ <a href="https://github.com/egdev6/mobile-agent-orchestrator">
5
+ <h1>Mobile Agent Orchestrator</h1>
6
+ </a>
7
+
8
+ <img width="3469" height="1198" alt="moshi" src="https://github.com/user-attachments/assets/aa5ed0b7-bd0c-4612-a3fd-58876c4eccab" />
9
+
10
+ <p>A guided Agent Skill for a private, recoverable mobile AI-agent environment.</p>
11
+
12
+ <p>
13
+ <a href="https://github.com/egdev6/mobile-agent-orchestrator/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/egdev6/mobile-agent-orchestrator/ci.yml?branch=main&amp;label=package%20CI&amp;style=for-the-badge" alt="Package CI"></a>
14
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=for-the-badge" alt="MIT License"></a>
15
+ <a href="https://pi.dev"><img src="https://img.shields.io/badge/Pi-package-7c3aed?style=for-the-badge" alt="Pi package"></a>
16
+ <img src="https://img.shields.io/badge/status-v0.2.0-brightgreen?style=for-the-badge" alt="Stable v0.2.0 status">
17
+ </p>
18
+ </div>
19
+
20
+ ---
21
+
22
+ > **Status: stable v0.2.0.** Published to npm with provenance; GitHub release tags remain the source-review channel — review the source before installation: a Pi skill can guide system and network changes.
23
+ >
24
+ > **Operational-evidence caveat.** Independently recorded cold-boot and live runtime evidence is not published for v0.2.0. Validate lifecycle and recovery on your target; this release does not claim observed macOS, WSL2, reboot, or mobile-client behavior.
25
+ >
26
+ > **BASED ON** https://www.youtube.com/watch?v=Yj51wXMwFwE&t=907s
27
+
28
+ <details>
29
+ <summary>Table of Contents</summary>
30
+ <ol>
31
+ <li><a href="#prerequisites">Prerequisites</a></li>
32
+ <li><a href="#installation">Installation</a></li>
33
+ <li><a href="#usage">Usage</a></li>
34
+ <li><a href="#architecture">Architecture</a></li>
35
+ <li><a href="#features">Features</a></li>
36
+ <li><a href="#runtime-stack">Runtime Stack</a></li>
37
+ <li><a href="#safety-boundaries">Safety Boundaries</a></li>
38
+ <li><a href="#verification-and-recovery">Verification and Recovery</a></li>
39
+ <li><a href="#contributing-and-contact">Contributing and Contact</a></li>
40
+ <li><a href="#license">License</a></li>
41
+ </ol>
42
+ </details>
43
+
44
+ ---
45
+
46
+ ## Built With
47
+
48
+ <a href="https://github.com/Gentleman-Programming/gentle-ai">
49
+ <img width="220" src="https://raw.githubusercontent.com/Gentleman-Programming/gentle-ai/main/docs/assets/brand/built-with-gentle-ai.png" alt="Built with Gentle-AI" />
50
+ </a>
51
+
52
+ ---
53
+
54
+ ## Prerequisites
55
+
56
+ | Requirement | Why it matters |
57
+ | --- | --- |
58
+ | A working Agent Skills-compatible CLI | The skill can instruct an agent to make system changes. Review the source if you need to assess its system-change guidance. [Pi](#pi) remains a supported package host. |
59
+ | **macOS native** | Supported native lifecycle and execution target. |
60
+ | **Windows 11 with WSL2** | Supported split model: Windows owns startup; the selected WSL distribution runs Linux services and agents. |
61
+ | Windows native without WSL2 | **Unsupported.** Stop and install WSL2 before using this workflow. |
62
+
63
+ The guided workflow discovers its runtime state before proposing changes. It installs runtime components only after the relevant approval; they are not bundled as npm dependencies.
64
+
65
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
66
+
67
+ ## Installation
68
+
69
+ ### Agent Skills-compatible CLIs
70
+
71
+ Copy or link `skills/mobile-agent-orchestrator/` as `mobile-agent-orchestrator/` under one of the host's supported skill roots. The generic contract is one directory per skill containing a `SKILL.md`; references remain relative to that file. The host discovers and activates the skill, but host-specific persistence, lifecycle, and slash-command behavior must not be inferred from this repository. The [agent-hosts reference][agent-hosts] records each supported host's documented skill locations and session-resume boundary, with unverified behavior marked as unverified.
72
+
73
+ For OpenCode, use any supported location:
74
+
75
+ - Project: `.opencode/skills/mobile-agent-orchestrator/SKILL.md` or `.agents/skills/mobile-agent-orchestrator/SKILL.md`
76
+ - Global: `~/.config/opencode/skills/mobile-agent-orchestrator/SKILL.md` or `~/.agents/skills/mobile-agent-orchestrator/SKILL.md`
77
+ - Configured path: add the containing directory, for example `skills: ["./skills"]`, then place the skill at `./skills/mobile-agent-orchestrator/SKILL.md`
78
+
79
+ Start OpenCode from the relevant project and use its discovered-skill interface or a matching natural-language request. OpenCode may disable external skill directories through configuration; configured skill paths remain the explicit fallback. This is an Agent Skill, not an MCP server, and requires no MCP implementation.
80
+
81
+ #### Installer
82
+
83
+ For Codex, OpenCode, Gemini CLI, and Claude Code, the package ships a deterministic installer.
84
+ Run it without arguments in a terminal for the interactive flow:
85
+
86
+ ```bash
87
+ npx mobile-agent-orchestrator install
88
+ ```
89
+
90
+ It detects installed coding-agent CLIs (Pi, Claude Code, Codex, OpenCode, Gemini CLI — read-only, no modification), presents each host with its detection evidence and supported destinations, and asks which targets and scope to configure before writing anything. Shared `.agents/skills` destinations are deduplicated in the shown plan. Pi is detection-only: it prints the supported `pi install npm:mobile-agent-orchestrator` command instead of ever being a write target. Cancelling at any prompt performs no writes.
91
+
92
+ For CI and automation, use the explicit non-interactive form:
93
+
94
+ ```bash
95
+ npx mobile-agent-orchestrator install --target codex --target opencode --target gemini --target claude-code --scope user
96
+ ```
97
+
98
+ #### Status
99
+
100
+ The installer ships a strictly read-only status command:
101
+
102
+ ```bash
103
+ npx mobile-agent-orchestrator status
104
+ npx mobile-agent-orchestrator status --target codex --scope project
105
+ ```
106
+
107
+ It inspects the managed installations without writing anything: by default every write target in both scopes (user and project); `--target` (repeatable) narrows the hosts and `--scope` narrows the scope. Each inspected destination prints one `STATUS [scope] destination (targets)` line — when a destination serves both scopes (for example when running from `$HOME`, where the user and project locations coincide) the scopes are merged into one line like `STATUS [user, project] destination (targets)` — plus indented details when something needs attention. The statuses are: `absent` (nothing installed), `managed` (the recorded manifest matches the on-disk checksums and the recorded version equals the package version), `outdated` (checksums match but the recorded version differs from the package version), `modified` (a managed file is missing or its content no longer matches the manifest), and `unknown` (the directory exists but cannot be verified: partial installation, missing, corrupt, or non-regular manifest). Pi is detection-only and has no managed destination, so it is never inspected.
108
+
109
+ Exit codes for automation: `0` when every inspected destination is `absent` or `managed` (nothing needs attention); `1` when at least one destination is `outdated`, `modified`, or `unknown`, or on a usage error. Extra unmanaged files beside a fully matching manifest are listed as details but do not change the `managed` status; the installer still treats them as conflicts if you ever re-run `install`.
110
+
111
+ #### Uninstall
112
+
113
+ The installer ships a removal command that mirrors `install`'s safety model:
114
+
115
+ ```bash
116
+ npx mobile-agent-orchestrator uninstall --target codex
117
+ npx mobile-agent-orchestrator uninstall --target codex --scope project --dry-run
118
+ ```
119
+
120
+ It removes only the files recorded in the installation manifest — and only when their on-disk checksum still matches the recorded one — plus the directories those files leave empty, and the manifest itself. Unmanaged files (your own notes, configs, anything the installer did not write) are never removed and are printed as `keep` lines in the plan. A locally modified managed file blocks its whole destination: nothing is removed there and the plan explains which file triggered the block. Destinations without a trustworthy manifest (missing, corrupt, symlinked, or one recording paths outside the skill directory) are reported as `unknown` and refused. A destination whose skill directory is absent reports `absent` with nothing to do.
121
+
122
+ Targets sharing one `.agents/skills` directory (Codex, OpenCode, Gemini CLI) are installed as one copy and are removed as that single copy: `uninstall --target codex` reports `(codex, opencode, gemini)` on the shared line and removes the copy. By default BOTH scopes are planned (user and project); `--scope` narrows it. `--dry-run` prints the exact removal plan — every file, directory, and manifest removal — and writes nothing.
123
+
124
+ Exit codes for automation: `0` when every planned destination was uninstalled or was already absent; `1` when at least one destination is blocked (modified or unsafe content) or unknown, or on a usage error. The command is deliberately non-interactive: check the `--dry-run` plan first, then run it. The source skill and any Pi-installed copy are never touched — uninstall only ever operates on installer-managed destinations.
125
+
126
+ Codex, OpenCode, and Gemini CLI resolve the same shared `.agents/skills` location (`--scope user` installs to `~/.agents/skills`, `--scope project` to `<cwd>/.agents/skills`), so those repeated targets deduplicate into a single copy. `--target claude-code` resolves the documented Claude Code locations instead (`~/.claude/skills` for user scope, `<cwd>/.claude/skills` for project scope), which are a separate destination from the shared `.agents/skills` location: selecting `claude-code` together with the other targets produces an additional copy in `.claude/skills` with its own manifest beside the skill directory. Use `--dry-run` to print the exact plan first. The installer records a checksum manifest beside the skill directory and aborts without writing anything when the destination contains modified or unmanaged content. On upgrade it removes files that earlier versions managed and the package no longer ships, but only when their checksum still matches the previous manifest; modified, unmanaged, or symlinked content still aborts the install. A manifest that is a symlink or not a regular file is rejected before any write, and the manifest is published atomically so an interrupted run leaves the previous manifest valid.
127
+
128
+ ### Pi
129
+
130
+ #### Install stable v0.2.0 from Git
131
+
132
+ ```bash
133
+ pi install git:github.com/egdev6/mobile-agent-orchestrator@v0.2.0
134
+ ```
135
+
136
+ Stable releases are distributed via GitHub tags: the release tag is created by automation after a validated release pull request merges. See the [release guide][release-guide] for the release conditions and publication semantics.
137
+
138
+ #### Recommended: install stable v0.2.0 from npm
139
+
140
+ ```bash
141
+ pi install npm:mobile-agent-orchestrator
142
+ ```
143
+
144
+ The package is published with provenance from the release workflow: the publish job runs `npm publish --provenance` in the same workflow run that creates the release tag, so the package binds to `egdev6/mobile-agent-orchestrator` and its `tag-release.yml` workflow, with a rerun guard that never overwrites a published version and fails closed on integrity differences. For hosts that consume npm packages directly, `npx mobile-agent-orchestrator install` uses the same artifact.
145
+
146
+ #### Source-review or development option: install from a local checkout
147
+
148
+ 1. Review this repository, especially the [skill][skill] and its on-demand references.
149
+ 2. Install the reviewed local package:
150
+
151
+ ```bash
152
+ pi install /absolute/path/to/mobile-agent-orchestrator
153
+ ```
154
+
155
+ 3. Start Pi from your normal working directory.
156
+
157
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
158
+
159
+ ## Usage
160
+
161
+ Use the skill from an active Agent Skills-compatible session. For Pi, the existing activation command remains:
162
+
163
+ ```text
164
+ /skill:mobile-agent-orchestrator
165
+ ```
166
+
167
+ A matching natural-language request, such as “set up a private mobile agent environment with Tailscale and Mosh,” can also load the skill. Follow the guided path rather than running an installation recipe out of order:
168
+
169
+ 1. **Detect:** allow read-only platform and state checks; unsupported or unclear targets stop safely.
170
+ 2. **Decide:** answer only real decision gates, including Tailscale placement, key setup, Moshi privacy, integrations, and notifications.
171
+ 3. **Approve:** explicitly authorize each privileged, network, service, firewall, pairing, lifecycle, or reboot mutation before it happens.
172
+ 4. **Verify:** collect non-sensitive checkpoints after each approved mutation and use the [recovery guide][verification-recovery] when a check fails.
173
+
174
+ The skill is a human-supervised orchestrator, not an unattended installer. Platform detail lives in the [platform matrix][platform-matrix] and [guided install][guided-install] reference so the core workflow stays concise. Lifecycle and checkpoint semantics are host-specific; the skill does not promise that another CLI provides Pi's persistence behavior.
175
+
176
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
177
+
178
+ ## Architecture
179
+
180
+ ```text
181
+ mobile-agent-orchestrator/
182
+ ├── package.json
183
+ │ └── pi.skills: ./skills ──> Pi package discovery (preserved)
184
+ ├── skills/mobile-agent-orchestrator/
185
+ │ ├── SKILL.md ────────────> activation contract, decision gates, safe orchestration
186
+ │ └── references/ ─────────> loaded on demand: platform, installation, recovery
187
+ ├── scripts/validate-package.mjs
188
+ │ └── Node.js ESM validator ──> metadata, package contents, local Markdown links
189
+ └── .github/workflows/
190
+ ├── ci.yml ──────────────> npm test on pull requests and main
191
+ └── tag-release.yml ─────> validated, merged-PR-only stable Git tags
192
+ ```
193
+
194
+ Pi discovers the package's `skills/` directory through the `pi.skills` manifest. Other compatible CLIs discover the same skill through their own supported roots or configured paths. The `SKILL.md` file uses Agent Skills-compatible Markdown and YAML frontmatter; its references are deliberately loaded only when the workflow needs their detail. The validator and GitHub Actions verify the package and gate future tags, but they do not certify a live remote-agent deployment.
195
+
196
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
197
+
198
+ ## Features
199
+
200
+ | Area | What the skill guides |
201
+ | --- | --- |
202
+ | Platform routing | macOS native or Windows 11 + WSL2 detection, with a safe stop for unsupported Windows-native paths. |
203
+ | Private access | Tailscale overlay placement, constrained OpenSSH exposure, and mobile-client pairing without copying secrets into chat. |
204
+ | Session continuity | Mosh with Moshi and `moshi-hook`, plus Herdr when supported or tmux as the fallback terminal host. |
205
+ | Lifecycle planning | Supported WSL systemd, linger, and Windows-startup considerations; macOS mechanisms only after current official documentation and local evidence. |
206
+ | Human control | Read-only discovery, one real decision at a time, explicit approval before sensitive changes, and local recovery preserved. |
207
+ | Evidence and rollback | Non-sensitive verification checkpoints, disconnect and approved reboot checks, and mutation-scoped rollback guidance. |
208
+
209
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
210
+
211
+ ## Runtime Stack
212
+
213
+ The package implementation and the remote environment it orchestrates are separate layers.
214
+
215
+ | Layer | Components | Responsibility |
216
+ | --- | --- | --- |
217
+ | **Package implementation** | Pi package manifest, Agent Skills-compatible Markdown/YAML frontmatter, Node.js ESM validator, npm, GitHub Actions | Preserves Pi discovery while validating the portable skill package and running CI/release checks. |
218
+ | **Orchestrated runtime** | Tailscale, OpenSSH, Mosh, Moshi/`moshi-hook`, Herdr or tmux | Provides the private mobile connection and persistent-session workflow on the selected target. |
219
+ | **Platform lifecycle** | Windows 11 + WSL2 systemd/linger/startup mechanisms, or macOS lifecycle mechanisms | Starts only the specifically approved services using current platform documentation. |
220
+
221
+ Tailscale, OpenSSH, Mosh, Moshi, `moshi-hook`, Herdr, tmux, and platform lifecycle tooling are **runtime dependencies installed by the guided workflow**. They are not package-bundled npm dependencies, and their exact installation route is chosen from current signed vendor or platform documentation after approval.
222
+
223
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
224
+
225
+ ## Safety Boundaries
226
+
227
+ - Never open public SSH access or add router port forwarding; constrain any listener before enabling it.
228
+ - Keep Tailscale SSH disabled for the Moshi/OpenSSH key-authentication route.
229
+ - For the full-Mosh Windows route, run Tailscale in exactly one location: **WSL**, not Windows and WSL together. On macOS, use macOS as the single location.
230
+ - Do not place private keys, pairing tokens, sign-in URLs, QR data, or credentials in chat, shell history, or repository files. QR data is temporary secret material.
231
+ - Require explicit approval before privileged installation, authentication or firewall changes, cloud pairing, service/task creation, reboot, or destructive rollback.
232
+ - Preserve a local recovery path, validate SSH configuration before reload, test a second key-authenticated session, and record non-sensitive rollback evidence.
233
+
234
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
235
+
236
+ ## Verification and Recovery
237
+
238
+ After each approved mutation, the workflow captures non-sensitive evidence for the private overlay, key-authenticated SSH, Mosh reconnection, session host, checkpoints, integrations, and notifications. A missing component or failed check is a finding—not authorization to make another change.
239
+
240
+ Before an approved reboot, the guide states that live processes will die, confirms recovery and rollback paths, then checks the actual post-reboot state. Herdr and tmux do not preserve live processes across a physical reboot. A host may provide its own persisted checkpoint or resume mechanism; only Pi's supported JSONL behavior is described here, and no equivalent is claimed for other CLIs. Independently recorded cold-boot and live runtime evidence is not published for v0.2.0, so validate lifecycle and recovery on your target.
241
+
242
+ Read the full [verification and recovery guide][verification-recovery] before applying lifecycle or rollback changes.
243
+
244
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
245
+
246
+ ## Contributing and Contact
247
+
248
+ - [Contributing][contributing] — focused changes, test expectations, and release-PR rules.
249
+ - [Release guide][release-guide] — Git-tag distribution and stable-release guardrails.
250
+ - [Security policy][security] — report vulnerabilities privately; never include secrets in an issue.
251
+ - [Issue tracker][issues] — report non-sensitive bugs and feature requests.
252
+
253
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
254
+
255
+ ## License
256
+
257
+ Distributed under the [MIT License][license].
258
+
259
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
260
+
261
+ [pi]: https://pi.dev
262
+ [skill]: skills/mobile-agent-orchestrator/SKILL.md
263
+ [platform-matrix]: skills/mobile-agent-orchestrator/references/platform-matrix.md
264
+ [guided-install]: skills/mobile-agent-orchestrator/references/guided-install.md
265
+ [verification-recovery]: skills/mobile-agent-orchestrator/references/verification-and-recovery.md
266
+ [agent-hosts]: skills/mobile-agent-orchestrator/references/agent-hosts.md
267
+ [contributing]: CONTRIBUTING.md
268
+ [release-guide]: docs/RELEASE.md
269
+ [security]: SECURITY.md
270
+ [license]: LICENSE
271
+ [issues]: https://github.com/egdev6/mobile-agent-orchestrator/issues