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

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 +91 -26
  2. package/package.json +15 -13
package/README.md CHANGED
@@ -1,26 +1,25 @@
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
+ Part of the [DoomPi distribution](https://www.npmjs.com/package/@agimon-ai/doompi).
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
+ 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.
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
+ > **Alpha:** tool and process contracts may change between releases.
14
10
 
15
- ## Install
11
+ ## Requirements
16
12
 
17
- ```bash
18
- npm install @agimon-ai/doompi-runner
19
- ```
13
+ - Node.js 22.19.0 or newer
14
+ - Pi 0.84.2 and Pi TUI 0.84.2
15
+ - `/bin/bash`
16
+ - macOS or Linux on arm64 or x64 for bundled RMUX support
17
+
18
+ Linux native loading also depends on a compatible system loader/libc. Runner uses a `node-pty` fallback when RMUX is unavailable.
20
19
 
21
- ## How it loads
20
+ ## Install
22
21
 
23
- Put the bare package name in a layer, then add that layer to a major mode:
22
+ DoomPi users add Runner to a layer:
24
23
 
25
24
  ```yaml
26
25
  layers:
@@ -28,28 +27,94 @@ layers:
28
27
  packages: ['@agimon-ai/doompi-runner']
29
28
 
30
29
  majorMode:
31
- dev:
32
- description: Development mode with supervised long-running commands.
30
+ development:
31
+ description: Development with supervised commands.
33
32
  layers: [runner]
34
33
  ```
35
34
 
36
- The package's Pi manifest selects the Pi adapter. It replaces bash only in modes that name
37
- the layer.
35
+ For direct Pi installation:
36
+
37
+ ```bash
38
+ pi install npm:@agimon-ai/doompi-runner
39
+ ```
40
+
41
+ ## Use the `bash` tool
42
+
43
+ ```json
44
+ {
45
+ "command": "pnpm test",
46
+ "timeout": 60
47
+ }
48
+ ```
49
+
50
+ 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.
51
+
52
+ Runner requires `PI_SESSION_ID` for session ownership. Processes, controls, and logs remain addressable after transcript compaction because their identity is outside model context.
53
+
54
+ ## Inspect and control runs
55
+
56
+ Use `/runners` or `SPC r r` in the TUI. The `doom-runner` CLI supports:
57
+
58
+ ```bash
59
+ doom-runner list
60
+ doom-runner status <runner-id>
61
+ doom-runner logs <runner-id>
62
+ doom-runner input <runner-id> "y"
63
+ doom-runner stop <runner-id>
64
+ doom-runner stop-all
65
+ ```
66
+
67
+ Stop runs that are no longer required.
68
+
69
+ ## Storage and limits
70
+
71
+ Session-scoped logs and registry data live under:
72
+
73
+ ```text
74
+ ~/.pi/agent/doom-runner/<session>/
75
+ ```
76
+
77
+ 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
78
 
39
- ## Leader
79
+ 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
80
 
41
- `SPC r r` opens Runner Space, where background processes can be inspected and controlled.
81
+ ## Native artifacts
42
82
 
43
- ## Runtime
83
+ Runner selects one optional dependency automatically:
44
84
 
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.
85
+ | Host | Package |
86
+ | ----------- | --------------------------------- |
87
+ | macOS arm64 | `doompi-runner-rmux-darwin-arm64` |
88
+ | macOS x64 | `doompi-runner-rmux-darwin-x64` |
89
+ | Linux arm64 | `doompi-runner-rmux-linux-arm64` |
90
+ | Linux x64 | `doompi-runner-rmux-linux-x64` |
91
+
92
+ Do not install these metadata-only native packages directly.
48
93
 
49
94
  ## Public API
50
95
 
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/`.
96
+ ```ts
97
+ import {
98
+ createRunnerContainer,
99
+ DEFAULT_BG_THRESHOLD_MS,
100
+ DEFAULT_LOG_MAX_BYTES,
101
+ DEFAULT_LOG_TTL_MS,
102
+ RmuxBackend,
103
+ } from '@agimon-ai/doompi-runner';
104
+ ```
105
+
106
+ Declared subpaths expose process supervision, configuration, tools, response envelopes, and TUI integration for host authors.
107
+
108
+ ## Development
109
+
110
+ ```bash
111
+ pnpm build
112
+ pnpm typecheck
113
+ pnpm test
114
+ pnpm lint
115
+ ```
116
+
117
+ Maintained by [Agimon](https://agimon.ai/about).
53
118
 
54
119
  ## License
55
120
 
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@agimon-ai/doompi-runner",
3
- "version": "0.0.1-alpha.21",
4
- "description": "Pi bash tool replacement with background process supervision",
3
+ "version": "0.0.1-alpha.23",
4
+ "description": "Supervised shell execution, background process control, and run logs for Pi coding agents.",
5
5
  "keywords": [
6
- "ai",
6
+ "background-process",
7
7
  "coding-agent",
8
- "developer-tools",
8
+ "doom-runner",
9
9
  "doompi",
10
- "pi-package"
10
+ "pi-coding-agent",
11
+ "process-supervision",
12
+ "shell"
11
13
  ],
12
14
  "homepage": "https://agimon.ai",
13
15
  "license": "MIT",
@@ -292,10 +294,10 @@
292
294
  "node-pty": "1.1.0",
293
295
  "reflect-metadata": "0.2.2",
294
296
  "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"
297
+ "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.23",
298
+ "@agimon-ai/foundation-process-registry": "0.29.13",
299
+ "@agimon-ai/doompi-ui": "0.0.1-alpha.23",
300
+ "@agimon-ai/doompi-telemetry": "0.0.1-alpha.23"
299
301
  },
300
302
  "devDependencies": {
301
303
  "@earendil-works/pi-coding-agent": "0.84.2",
@@ -319,10 +321,10 @@
319
321
  }
320
322
  },
321
323
  "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"
324
+ "@agimon-ai/doompi-runner-rmux-linux-arm64": "0.0.1-alpha.23",
325
+ "@agimon-ai/doompi-runner-rmux-linux-x64": "0.0.1-alpha.23",
326
+ "@agimon-ai/doompi-runner-rmux-darwin-x64": "0.0.1-alpha.23",
327
+ "@agimon-ai/doompi-runner-rmux-darwin-arm64": "0.0.1-alpha.23"
326
328
  },
327
329
  "engines": {
328
330
  "node": ">=22.19.0"