@agimon-ai/doompi-runner 0.0.1-alpha.21 → 0.0.1-alpha.22

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.
Files changed (2) hide show
  1. package/README.md +87 -26
  2. package/package.json +9 -9
package/README.md CHANGED
@@ -1,26 +1,23 @@
1
1
  # @agimon-ai/doompi-runner
2
2
 
3
- **A shell command should not hold the session hostage.**
3
+ Supervised shell execution, background process control, durable logs, and Runner Space for Pi.
4
4
 
5
- Doompi Runner replaces Pi's built-in bash tool with a supervised one. Short commands behave
6
- normally. Long commands move into the background, keep writing to a saved log, and remain
7
- controllable through the process tool and TUI instead of blocking the agent until a timeout.
5
+ Runner replaces Pi's built-in `bash` tool only in sessions that load it. Short commands return inline; long commands can be promoted to a background runner instead of blocking the agent.
8
6
 
9
- Detached runs reconcile after compaction and other context rewrites. The transcript can
10
- change; the process does not lose its identity.
7
+ > **Alpha:** tool and process contracts may change between releases.
11
8
 
12
- This is part of [Doompi](https://www.npmjs.com/package/@agimon-ai/doompi). Most users load
13
- it through a major-mode layer.
9
+ ## Requirements
14
10
 
15
- ## Install
11
+ - Node.js 22.19.0 or newer
12
+ - Pi 0.84.2 and Pi TUI 0.84.2
13
+ - `/bin/bash`
14
+ - macOS or Linux on arm64 or x64 for bundled RMUX support
16
15
 
17
- ```bash
18
- npm install @agimon-ai/doompi-runner
19
- ```
16
+ Linux native loading also depends on a compatible system loader/libc. Runner uses a `node-pty` fallback when RMUX is unavailable.
20
17
 
21
- ## How it loads
18
+ ## Install
22
19
 
23
- Put the bare package name in a layer, then add that layer to a major mode:
20
+ DoomPi users add Runner to a layer:
24
21
 
25
22
  ```yaml
26
23
  layers:
@@ -28,28 +25,92 @@ layers:
28
25
  packages: ['@agimon-ai/doompi-runner']
29
26
 
30
27
  majorMode:
31
- dev:
32
- description: Development mode with supervised long-running commands.
28
+ development:
29
+ description: Development with supervised commands.
33
30
  layers: [runner]
34
31
  ```
35
32
 
36
- The package's Pi manifest selects the Pi adapter. It replaces bash only in modes that name
37
- the layer.
33
+ For direct Pi installation:
34
+
35
+ ```bash
36
+ pi install npm:@agimon-ai/doompi-runner
37
+ ```
38
+
39
+ ## Use the `bash` tool
40
+
41
+ ```json
42
+ {
43
+ "command": "pnpm test",
44
+ "timeout": 60
45
+ }
46
+ ```
47
+
48
+ Commands crossing the promotion threshold move to a supervised runner. The default threshold is 60 seconds. Set `background: true` to detach immediately, or `interactive: true` only when a command needs terminal input.
49
+
50
+ Runner requires `PI_SESSION_ID` for session ownership. Processes, controls, and logs remain addressable after transcript compaction because their identity is outside model context.
51
+
52
+ ## Inspect and control runs
53
+
54
+ Use `/runners` or `SPC r r` in the TUI. The `doom-runner` CLI supports:
55
+
56
+ ```bash
57
+ doom-runner list
58
+ doom-runner status <runner-id>
59
+ doom-runner logs <runner-id>
60
+ doom-runner input <runner-id> "y"
61
+ doom-runner stop <runner-id>
62
+ doom-runner stop-all
63
+ ```
64
+
65
+ Stop runs that are no longer required.
66
+
67
+ ## Storage and limits
68
+
69
+ Session-scoped logs and registry data live under:
70
+
71
+ ```text
72
+ ~/.pi/agent/doom-runner/<session>/
73
+ ```
74
+
75
+ Logs rotate at 5 MiB by default and are eligible for cleanup after seven days. Limits and the promotion threshold can be configured through Runner's exported configuration helpers and environment-backed runtime settings.
38
76
 
39
- ## Leader
77
+ Commands inherit the DoomPi process environment and the operating-system user's privileges. Logs may contain prompts, source, command output, credentials, or other secrets; restrict access and retention accordingly.
40
78
 
41
- `SPC r r` opens Runner Space, where background processes can be inspected and controlled.
79
+ ## Native artifacts
42
80
 
43
- ## Runtime
81
+ Runner selects one optional dependency automatically:
44
82
 
45
- The package ships the `doom-runner` CLI and chooses a prebuilt `rmux` binary from its
46
- platform-specific optional dependencies. npm installs the matching binary package; users
47
- do not pick one by hand.
83
+ | Host | Package |
84
+ | ----------- | --------------------------------- |
85
+ | macOS arm64 | `doompi-runner-rmux-darwin-arm64` |
86
+ | macOS x64 | `doompi-runner-rmux-darwin-x64` |
87
+ | Linux arm64 | `doompi-runner-rmux-linux-arm64` |
88
+ | Linux x64 | `doompi-runner-rmux-linux-x64` |
89
+
90
+ Do not install these metadata-only native packages directly.
48
91
 
49
92
  ## Public API
50
93
 
51
- The root export and declared subpaths expose the runner protocol, process supervision,
52
- state, tools, and TUI. Use supported exports rather than reaching into `dist/`.
94
+ ```ts
95
+ import {
96
+ createRunnerContainer,
97
+ DEFAULT_BG_THRESHOLD_MS,
98
+ DEFAULT_LOG_MAX_BYTES,
99
+ DEFAULT_LOG_TTL_MS,
100
+ RmuxBackend,
101
+ } from '@agimon-ai/doompi-runner';
102
+ ```
103
+
104
+ Declared subpaths expose process supervision, configuration, tools, response envelopes, and TUI integration for host authors.
105
+
106
+ ## Development
107
+
108
+ ```bash
109
+ pnpm build
110
+ pnpm typecheck
111
+ pnpm test
112
+ pnpm lint
113
+ ```
53
114
 
54
115
  ## License
55
116
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/doompi-runner",
3
- "version": "0.0.1-alpha.21",
3
+ "version": "0.0.1-alpha.22",
4
4
  "description": "Pi bash tool replacement with background process supervision",
5
5
  "keywords": [
6
6
  "ai",
@@ -292,10 +292,10 @@
292
292
  "node-pty": "1.1.0",
293
293
  "reflect-metadata": "0.2.2",
294
294
  "typebox": "1.1.38",
295
- "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.21",
296
- "@agimon-ai/doompi-ui": "0.0.1-alpha.21",
297
- "@agimon-ai/doompi-telemetry": "0.0.1-alpha.21",
298
- "@agimon-ai/foundation-process-registry": "0.29.11"
295
+ "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.22",
296
+ "@agimon-ai/doompi-telemetry": "0.0.1-alpha.22",
297
+ "@agimon-ai/doompi-ui": "0.0.1-alpha.22",
298
+ "@agimon-ai/foundation-process-registry": "0.29.12"
299
299
  },
300
300
  "devDependencies": {
301
301
  "@earendil-works/pi-coding-agent": "0.84.2",
@@ -319,10 +319,10 @@
319
319
  }
320
320
  },
321
321
  "optionalDependencies": {
322
- "@agimon-ai/doompi-runner-rmux-darwin-x64": "0.0.1-alpha.21",
323
- "@agimon-ai/doompi-runner-rmux-linux-arm64": "0.0.1-alpha.21",
324
- "@agimon-ai/doompi-runner-rmux-darwin-arm64": "0.0.1-alpha.21",
325
- "@agimon-ai/doompi-runner-rmux-linux-x64": "0.0.1-alpha.21"
322
+ "@agimon-ai/doompi-runner-rmux-darwin-x64": "0.0.1-alpha.22",
323
+ "@agimon-ai/doompi-runner-rmux-linux-x64": "0.0.1-alpha.22",
324
+ "@agimon-ai/doompi-runner-rmux-darwin-arm64": "0.0.1-alpha.22",
325
+ "@agimon-ai/doompi-runner-rmux-linux-arm64": "0.0.1-alpha.22"
326
326
  },
327
327
  "engines": {
328
328
  "node": ">=22.19.0"