@agimon-ai/po-ios 0.0.1-alpha.94 → 0.0.1-alpha.96
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/README.md +35 -70
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -1,115 +1,80 @@
|
|
|
1
1
|
# @agimon-ai/po-ios
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Lease iOS simulators from a machine-wide pool, install and launch apps, inspect accessibility, interact, capture screenshots and read logs. Paired physical phones support a narrower, explicitly approved workflow.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Requires Node.js 24 or newer, macOS, Xcode and an installed iOS simulator runtime.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Enable and use
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
- macOS with Xcode and at least one iOS simulator runtime
|
|
9
|
+
Define an `ios` layer with `packages: ['@agimon-ai/po-ios']` in your modes file, include it in a major mode, then run `po sync`. The package is opt-in and absent from starter configs.
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
The package is opt-in and intentionally absent from init templates. Define an `ios` layer with `packages: ['@agimon-ai/po-ios']` in your modes file, then select that layer in a major mode. The package declares server, web and native discovery metadata.
|
|
15
|
-
|
|
16
|
-
## Use
|
|
17
|
-
|
|
18
|
-
In a code-mode `exec` script:
|
|
11
|
+
Read the [iOS guide](src/prompts/codemode-how-to-ios/SKILL.md), discover `ios`, then use code mode:
|
|
19
12
|
|
|
20
13
|
```ts
|
|
21
14
|
await ios.acquire({ label: 'login flow' });
|
|
22
|
-
|
|
23
|
-
await ios.
|
|
24
|
-
await ios.
|
|
25
|
-
await ios.
|
|
15
|
+
try {
|
|
16
|
+
const { bundleId } = await ios.install({ path: '/abs/Build/Products/Debug-iphonesimulator/App.app' });
|
|
17
|
+
await ios.launch({ bundleId });
|
|
18
|
+
await ios.screenshot();
|
|
19
|
+
} finally {
|
|
20
|
+
await ios.release();
|
|
21
|
+
}
|
|
26
22
|
```
|
|
27
23
|
|
|
28
|
-
|
|
24
|
+
Input acknowledgement is not UI completion. Use `waitFor` after actions and release the lease when finished.
|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
Activity shows devices, lease ownership and the latest registered build. **View screen** opens the session's leased simulator without replacing the composer. Capture is authenticated and visible-only; release or ownership loss clears the image. Physical-device screen capture is unsupported.
|
|
31
27
|
|
|
32
|
-
-
|
|
33
|
-
- Global Settings > iOS edits the development Team ID, per-phone availability and simulator pool settings. Conflicts retain drafts. Saving does not restart an active service or interrupt a lease; pending settings require an explicit iOS service restart. A saved Team ID does not establish signing or IPA installation eligibility.
|
|
34
|
-
- Registered build handoff reuses artifact storage and guarded streaming. Download and copy-link actions require available remote sharing and mint ephemeral bearer access; remote access is never enabled implicitly. Open in Po uses the internal artifact tab. A downloaded ZIP or IPA is not an installation success.
|
|
28
|
+
Registered-build download and copy-link actions need available remote sharing and mint ephemeral bearer access. They never enable remote access implicitly. Downloading a ZIP or IPA does not establish installation success.
|
|
35
29
|
|
|
36
|
-
|
|
30
|
+
## Simulator pool
|
|
37
31
|
|
|
38
|
-
|
|
32
|
+
Each server elects one host-wide owner. Servers sharing a Po home coordinate leases through `po/db`; Po's simulators live under `<po home>/ios/devices`, not in the person's default set.
|
|
39
33
|
|
|
40
|
-
|
|
34
|
+
Configure the pool in the host's `<po home>/config.yaml`:
|
|
41
35
|
|
|
42
36
|
```yaml
|
|
43
37
|
ios:
|
|
44
38
|
pool:
|
|
45
|
-
maxBooted: 2
|
|
46
|
-
maxDevices: 4
|
|
47
|
-
minBooted: 0
|
|
39
|
+
maxBooted: 2
|
|
40
|
+
maxDevices: 4
|
|
41
|
+
minBooted: 0
|
|
48
42
|
idleShutdownMinutes: 10
|
|
49
43
|
waitTimeoutSeconds: 120
|
|
50
44
|
```
|
|
51
45
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
Accessibility and touch (`observe`, `tap`, `type`, `swipe`, `pressButton`, `waitFor`, `settle`) go through a resident Swift helper in `native/sim-helper`. The server builds it on first use with the person's Xcode (`xcrun swift build`) into `<po home>/ios/native/<hash>/`; set `ios.helperPath` to use a prebuilt one instead. On Xcode 27.1 (27A9275) and iOS 26.5, direct native-protocol trials verified observation, taps, timed swipes, US-layout ASCII typing (including shifted punctuation and return), home and lock. Arbitrary Unicode text, touches on a landscape app interface and Siri/volume buttons explicitly return `IOS_HELPER_UNAVAILABLE`, with no clipboard or AX-value fallback. Unsupported text is rejected before any keys are emitted. Missing or changed private API shapes also fail explicitly. See `native/sim-helper/PRIVATE_APIS.md` for evidence and limits.
|
|
55
|
-
|
|
56
|
-
This is a partial implementation, not completion of the full iOS plan. Built-layer trials verified the supported simulator workflow, stale refs, fail-closed Unicode rejection, release/warm reuse, crash reclaim and unchanged helper-binary cache reuse. Three immediate release/reinstall/launch cycles passed after fixing zero-frame window readiness. Separate native trials verified A-only tap/text and B-only taps across two portrait simulators. Observation follows an app's landscape interface, but no tested touch mapping reached it, so landscape taps and swipes are refused. The child borrowed-lease check remains unverified; the inline child reported no `exec` tool. Input acknowledgment is not UI completion: use `waitFor` after actions. A lock transition took about three seconds to appear in AX observations.
|
|
57
|
-
|
|
58
|
-
Physical devices: `ios.devices()` lists what CoreDevice sees (`xcrun devicectl list devices`), and `ios.acquireDevice({ udid })` leases a paired, reachable phone after the person approves it. An idle disconnected tunnel is checked with a bounded device-info request rather than rejected solely by its listed state. A phone lease shares the `ios_lease` table (`kind = 'device'`) so two sessions never hold one phone, but it has no `ios_device` row: the pool never boots, erases or counts it against `maxBooted`. Signed app install, uninstall, launch and console logs work without a runner. Phone `logs` is partial: `launch` keeps `devicectl device process launch --console` attached and buffers the app's stdout, stderr and NSLog lines (last 5000, 12 hours at most), because `log collect --device-udid` requires root. The unified system log, `process` and `subsystem` are not available on a phone.
|
|
59
|
-
|
|
60
|
-
For phone accessibility and input, set `ios.device.developmentTeam` in the admitted host config (`~/.po/config.yaml`) and connect the phone by USB. First use builds and installs Po's own signed XCUITest runner with automatic provisioning. It binds only a USB IPv4 link-local address (`169.254.*`), requires a random per-run token and reuses the helper protocol. No WDA, Appium or iproxy is used. Observation selects a foreground app launched under this lease, otherwise SpringBoard. Release stops the runner and uninstalls its test host before freeing the lease, leaving the person's other apps installed. Cleanup failure holds the lease and can be retried. Phone screenshots, terminate and openUrl remain unavailable through `ios`; home, lock and Siri fail explicitly. Volume and rotation are unverified. An explicit bottom-edge swipe can leave an app.
|
|
46
|
+
The smallest `maxBooted` among running servers wins. Configuration is read at activation. Settings saves do not interrupt leases or restart services; pending changes require an explicit iOS service restart.
|
|
61
47
|
|
|
62
|
-
|
|
48
|
+
Release uninstalls apps installed by the session and keeps the simulator warm. A dead server's devices are erased before reuse.
|
|
63
49
|
|
|
64
|
-
|
|
50
|
+
Accessibility and input use the resident Swift helper in `native/sim-helper`. First use builds it with `xcrun swift build` into `<po home>/ios/native/<hash>/`; `ios.helperPath` can select a prebuilt helper. Unsupported private API shapes fail explicitly. See [private API evidence and limits](native/sim-helper/PRIVATE_APIS.md).
|
|
65
51
|
|
|
66
|
-
|
|
52
|
+
Supported simulator trials covered portrait taps, timed swipes, US-layout ASCII typing, home and lock. Arbitrary Unicode, landscape-app touches, Siri and volume buttons return `IOS_HELPER_UNAVAILABLE`, with no clipboard or accessibility-value fallback. Unsupported text is rejected before emitting keys. An accessibility observation of a landscape interface is not proof that touch mapping works.
|
|
67
53
|
|
|
68
|
-
|
|
54
|
+
## Physical phones
|
|
69
55
|
|
|
70
|
-
|
|
56
|
+
`ios.devices()` lists CoreDevice-visible devices. `ios.acquireDevice({ udid })` requires a paired, reachable phone and the person's approval. Phone leases share the lease table but are never booted, erased, or counted against simulator limits.
|
|
71
57
|
|
|
72
|
-
|
|
73
|
-
import { IOS_POOL_CONTRACT, type IosPool } from '@agimon-ai/po-ios';
|
|
74
|
-
```
|
|
58
|
+
Signed app install, uninstall, launch and console capture work without a UI runner. Console logs retain at most 5,000 lines for 12 hours from a process launched with `--console`; unified system logs and process/subsystem filtering are unavailable.
|
|
75
59
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
```text
|
|
79
|
-
@agimon-ai/po-ios/extensions/server
|
|
80
|
-
```
|
|
60
|
+
For accessibility and input, set `ios.device.developmentTeam` in host configuration and connect by USB. Keep the phone unlocked and awake during startup. First use builds and installs Po's signed XCUITest runner with automatic provisioning. A saved Team ID alone does not prove signing or IPA eligibility.
|
|
81
61
|
|
|
82
|
-
The
|
|
62
|
+
The runner binds only a USB IPv4 link-local address (`169.254.*`) and requires a random per-run token. It observes the foreground app launched under the lease, otherwise SpringBoard. Release stops the runner and removes its test host before freeing the lease, leaving other apps installed. Cleanup failure retains the lease for retry.
|
|
83
63
|
|
|
84
|
-
|
|
64
|
+
Phone screenshots, terminate, openUrl, home, lock and Siri are unavailable through `ios`. Volume and rotation are unverified. A swipe may leave an app; visible-row changes alone do not establish content scrolling.
|
|
85
65
|
|
|
86
|
-
|
|
87
|
-
- `services/{serviceName}/`: package logic, with `index.ts` and `type.ts`.
|
|
88
|
-
- `models/`: host-neutral state and transitions.
|
|
89
|
-
- `constants/`, `schemas/`, and `types/`: shared metadata, validation, and contracts.
|
|
90
|
-
- Private `_lib/` and `_components/` folders beside routes hold surface-private implementation and are not scanned.
|
|
66
|
+
## Evidence boundaries
|
|
91
67
|
|
|
92
|
-
|
|
68
|
+
Earlier packed-source web acceptance on source `9595ac8` covered a real simulator PNG, release clearing, Settings persistence and save conflicts. Twelve r2 story visuals were explicitly approved separately. Native-app UI execution remains unverified; approved images are not runtime acceptance.
|
|
93
69
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
The lifecycle is construct, register, `onStart`, run, `onStop`, unregister, `onDispose`. All hooks are optional and receive one typed context. The helper awaits startup before readiness. Shutdown aborts the context signal, stops work, removes registrations in reverse order, and performs final cleanup. Failed startup awaits rollback. Optional provider replacement rebinds contributions without restarting the plugin. Minor-mode actions are independent of mounting.
|
|
97
|
-
|
|
98
|
-
Factories construct state; `onStart` begins external work. `onStop` runs when the start stage was reached, including a failed `onStart`. Use `onDispose` only for remaining instance resources. Do not add empty hooks or manual registration cleanup.
|
|
70
|
+
Recorded simulator and iPhone trials cover selected installation, input, logs and cleanup paths, not the full iOS plan. Borrowed child leases remain unverified. Consult the helper evidence before relying on a platform operation; this README review did not rerun physical-device or simulator trials.
|
|
99
71
|
|
|
100
72
|
## Development
|
|
101
73
|
|
|
102
74
|
```bash
|
|
103
|
-
pnpm build
|
|
104
|
-
pnpm typecheck
|
|
105
|
-
pnpm test
|
|
106
|
-
pnpm lint
|
|
107
|
-
pnpm exec vibe-lint check .
|
|
108
|
-
npm pack --dry-run
|
|
75
|
+
pnpm exec nx run-many -t lint typecheck build test -p @agimon-ai/po-ios
|
|
109
76
|
```
|
|
110
77
|
|
|
111
|
-
Maintained by [Agimon](https://agimon.ai/about).
|
|
112
|
-
|
|
113
78
|
## License
|
|
114
79
|
|
|
115
80
|
Business Source License 1.1: free for personal use, organisations under USD 1M revenue, non-profits and education. See [LICENSE](LICENSE) and https://agimon.ai/licensing.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/po-ios",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.96",
|
|
4
4
|
"description": "Leased iOS simulators and accessibility-first app control for Po sessions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"coding-agent",
|
|
@@ -68,23 +68,23 @@
|
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@agimon-ai/po-artifact": "0.0.0-alpha.
|
|
72
|
-
"@agimon-ai/po-config": "0.0.0-alpha.
|
|
73
|
-
"@agimon-ai/po-core": "0.0.0-alpha.
|
|
74
|
-
"@agimon-ai/po-db": "0.0.0-alpha.
|
|
75
|
-
"@agimon-ai/po-web-components": "0.0.0-alpha.
|
|
71
|
+
"@agimon-ai/po-artifact": "0.0.0-alpha.160",
|
|
72
|
+
"@agimon-ai/po-config": "0.0.0-alpha.161",
|
|
73
|
+
"@agimon-ai/po-core": "0.0.0-alpha.161",
|
|
74
|
+
"@agimon-ai/po-db": "0.0.0-alpha.161",
|
|
75
|
+
"@agimon-ai/po-web-components": "0.0.0-alpha.161",
|
|
76
76
|
"@deepseek-ai/cordis": "4.0.5",
|
|
77
77
|
"@tanstack/react-store": "0.11.2",
|
|
78
78
|
"react": "19.3.1",
|
|
79
79
|
"typebox": "1.4.2"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@agimon-ai/po-build": "0.0.0-alpha.
|
|
83
|
-
"@agimon-ai/po-native-components": "0.0.0-alpha.
|
|
84
|
-
"@agimon-ai/po-profile": "0.0.0-alpha.
|
|
85
|
-
"@agimon-ai/po-vault": "0.0.0-alpha.
|
|
86
|
-
"@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.
|
|
87
|
-
"@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.
|
|
82
|
+
"@agimon-ai/po-build": "0.0.0-alpha.161",
|
|
83
|
+
"@agimon-ai/po-native-components": "0.0.0-alpha.161",
|
|
84
|
+
"@agimon-ai/po-profile": "0.0.0-alpha.161",
|
|
85
|
+
"@agimon-ai/po-vault": "0.0.0-alpha.161",
|
|
86
|
+
"@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.161",
|
|
87
|
+
"@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.161",
|
|
88
88
|
"@earendil-works/pi-coding-agent": "1.5.1",
|
|
89
89
|
"@types/node": "26.6.5",
|
|
90
90
|
"@types/react": "19.3.0",
|