aicodeman 1.35.0 → 1.41.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/README.md +33 -7
- package/dist/attachment-registry.d.ts +6 -0
- package/dist/attachment-registry.d.ts.map +1 -1
- package/dist/attachment-registry.js +9 -3
- package/dist/attachment-registry.js.map +1 -1
- package/dist/cli-agent.d.ts +225 -0
- package/dist/cli-agent.d.ts.map +1 -0
- package/dist/cli-agent.js +767 -0
- package/dist/cli-agent.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +8 -32
- package/dist/cli.js.map +1 -1
- package/dist/codeman-credentials.d.ts +27 -0
- package/dist/codeman-credentials.d.ts.map +1 -0
- package/dist/codeman-credentials.js +66 -0
- package/dist/codeman-credentials.js.map +1 -0
- package/dist/config/cli-registry/patterns.d.ts +6 -0
- package/dist/config/cli-registry/patterns.d.ts.map +1 -1
- package/dist/config/cli-registry/patterns.js +13 -0
- package/dist/config/cli-registry/patterns.js.map +1 -1
- package/dist/config/cli-registry/schema.d.ts +15 -0
- package/dist/config/cli-registry/schema.d.ts.map +1 -1
- package/dist/config/cli-registry/schema.js +63 -2
- package/dist/config/cli-registry/schema.js.map +1 -1
- package/dist/config/cli-registry/stock.d.ts.map +1 -1
- package/dist/config/cli-registry/stock.js +180 -7
- package/dist/config/cli-registry/stock.js.map +1 -1
- package/dist/config/cli-registry/types.d.ts +105 -7
- package/dist/config/cli-registry/types.d.ts.map +1 -1
- package/dist/deepseek-route-config.d.ts +110 -0
- package/dist/deepseek-route-config.d.ts.map +1 -0
- package/dist/deepseek-route-config.js +477 -0
- package/dist/deepseek-route-config.js.map +1 -0
- package/dist/git-clone.d.ts.map +1 -1
- package/dist/git-clone.js +4 -0
- package/dist/git-clone.js.map +1 -1
- package/dist/git-workspace-status.d.ts +31 -5
- package/dist/git-workspace-status.d.ts.map +1 -1
- package/dist/git-workspace-status.js +49 -29
- package/dist/git-workspace-status.js.map +1 -1
- package/dist/image-watcher.d.ts.map +1 -1
- package/dist/image-watcher.js +6 -2
- package/dist/image-watcher.js.map +1 -1
- package/dist/mcp-sync-targets.d.ts +34 -0
- package/dist/mcp-sync-targets.d.ts.map +1 -0
- package/dist/mcp-sync-targets.js +55 -0
- package/dist/mcp-sync-targets.js.map +1 -0
- package/dist/mcp-sync.d.ts +2 -1
- package/dist/mcp-sync.d.ts.map +1 -1
- package/dist/mcp-sync.js +62 -1
- package/dist/mcp-sync.js.map +1 -1
- package/dist/model-config-resolvers.d.ts +29 -0
- package/dist/model-config-resolvers.d.ts.map +1 -0
- package/dist/model-config-resolvers.js +34 -0
- package/dist/model-config-resolvers.js.map +1 -0
- package/dist/session-display-model.d.ts +110 -0
- package/dist/session-display-model.d.ts.map +1 -0
- package/dist/session-display-model.js +154 -0
- package/dist/session-display-model.js.map +1 -0
- package/dist/session.d.ts +145 -8
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +290 -39
- package/dist/session.js.map +1 -1
- package/dist/subagent-watcher.d.ts.map +1 -1
- package/dist/subagent-watcher.js +29 -6
- package/dist/subagent-watcher.js.map +1 -1
- package/dist/templates/case-template.md +2 -0
- package/dist/tmux-manager.d.ts +5 -0
- package/dist/tmux-manager.d.ts.map +1 -1
- package/dist/tmux-manager.js +47 -22
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tui/tui-client.d.ts +3 -17
- package/dist/tui/tui-client.d.ts.map +1 -1
- package/dist/tui/tui-client.js +3 -44
- package/dist/tui/tui-client.js.map +1 -1
- package/dist/types/session.d.ts +28 -1
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js.map +1 -1
- package/dist/types/tools.d.ts +1 -1
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/utils/deepseek-cli-resolver.d.ts +8 -0
- package/dist/utils/deepseek-cli-resolver.d.ts.map +1 -1
- package/dist/utils/deepseek-cli-resolver.js +18 -2
- package/dist/utils/deepseek-cli-resolver.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/process-exit-wait.d.ts +40 -0
- package/dist/utils/process-exit-wait.d.ts.map +1 -0
- package/dist/utils/process-exit-wait.js +68 -0
- package/dist/utils/process-exit-wait.js.map +1 -0
- package/dist/web/launch-defaults.d.ts +22 -0
- package/dist/web/launch-defaults.d.ts.map +1 -0
- package/dist/web/launch-defaults.js +46 -0
- package/dist/web/launch-defaults.js.map +1 -0
- package/dist/web/paste-image-gc.d.ts +46 -6
- package/dist/web/paste-image-gc.d.ts.map +1 -1
- package/dist/web/paste-image-gc.js +106 -32
- package/dist/web/paste-image-gc.js.map +1 -1
- package/dist/web/public/admin-ui.js.gz +0 -0
- package/dist/web/public/api-client.c9b1cddc.js.gz +0 -0
- package/dist/web/public/app.6f8552e1.js +43 -0
- package/dist/web/public/app.6f8552e1.js.br +0 -0
- package/dist/web/public/app.6f8552e1.js.gz +0 -0
- package/dist/web/public/approvals-ui.js.gz +0 -0
- package/dist/web/public/{constants.d95fade9.js → constants.bc9c1f63.js} +1276 -127
- package/dist/web/public/constants.bc9c1f63.js.br +0 -0
- package/dist/web/public/constants.bc9c1f63.js.gz +0 -0
- package/dist/web/public/cron-ui.js.gz +0 -0
- package/dist/web/public/entrance-animations.js +491 -43
- package/dist/web/public/entrance-animations.js.br +0 -0
- package/dist/web/public/entrance-animations.js.gz +0 -0
- package/dist/web/public/git-status-ui.js +55 -9
- package/dist/web/public/git-status-ui.js.br +0 -0
- package/dist/web/public/git-status-ui.js.gz +0 -0
- package/dist/web/public/home-sessions.js +13 -9
- package/dist/web/public/home-sessions.js.br +0 -0
- package/dist/web/public/home-sessions.js.gz +0 -0
- package/dist/web/public/host-wake-ui.js.gz +0 -0
- package/dist/web/public/i18n.a9840ea2.js +2 -0
- package/dist/web/public/i18n.a9840ea2.js.br +0 -0
- package/dist/web/public/i18n.a9840ea2.js.gz +0 -0
- package/dist/web/public/{image-input.a216cf9e.js → image-input.e00471c6.js} +21 -9
- package/dist/web/public/image-input.e00471c6.js.br +0 -0
- package/dist/web/public/image-input.e00471c6.js.gz +0 -0
- package/dist/web/public/index.html +250 -59
- package/dist/web/public/index.html.br +0 -0
- package/dist/web/public/index.html.gz +0 -0
- package/dist/web/public/input-cjk.8bc46081.js.gz +0 -0
- package/dist/web/public/keyboard-accessory.c1e7c7b7.js.gz +0 -0
- package/dist/web/public/{mobile-handlers.23a85db1.js → mobile-handlers.0ef9c311.js} +20 -0
- package/dist/web/public/mobile-handlers.0ef9c311.js.br +0 -0
- package/dist/web/public/mobile-handlers.0ef9c311.js.gz +0 -0
- package/dist/web/public/mobile-ime-preview.2dbaf262.js.gz +0 -0
- package/dist/web/public/mobile-overview.js.gz +0 -0
- package/dist/web/public/mobile.111b187d.css +1 -0
- package/dist/web/public/mobile.111b187d.css.br +0 -0
- package/dist/web/public/mobile.111b187d.css.gz +0 -0
- package/dist/web/public/{notification-manager.50bb87d8.js → notification-manager.feb82c04.js} +19 -2
- package/dist/web/public/notification-manager.feb82c04.js.br +0 -0
- package/dist/web/public/notification-manager.feb82c04.js.gz +0 -0
- package/dist/web/public/orchestrator-panel.js.gz +0 -0
- package/dist/web/public/{panels-ui.6a5898d9.js → panels-ui.71846fcb.js} +4 -4
- package/dist/web/public/panels-ui.71846fcb.js.br +0 -0
- package/dist/web/public/panels-ui.71846fcb.js.gz +0 -0
- package/dist/web/public/ralph-panel.b350e2ef.js.gz +0 -0
- package/dist/web/public/ralph-wizard.b6c0dd19.js.gz +0 -0
- package/dist/web/public/readmymind-ui.js.gz +0 -0
- package/dist/web/public/reboot-restore-ui.js.gz +0 -0
- package/dist/web/public/respawn-ui.ff0dae4c.js.gz +0 -0
- package/dist/web/public/sanitize-html.e7147e76.js.gz +0 -0
- package/dist/web/public/session-lineage.js +229 -86
- package/dist/web/public/session-lineage.js.br +0 -0
- package/dist/web/public/session-lineage.js.gz +0 -0
- package/dist/web/public/session-ui.f731602c.js +100 -0
- package/dist/web/public/session-ui.f731602c.js.br +0 -0
- package/dist/web/public/session-ui.f731602c.js.gz +0 -0
- package/dist/web/public/settings-ui.4e33390f.js +97 -0
- package/dist/web/public/settings-ui.4e33390f.js.br +0 -0
- package/dist/web/public/settings-ui.4e33390f.js.gz +0 -0
- package/dist/web/public/spreadsheet-preview-worker.js +290 -0
- package/dist/web/public/spreadsheet-preview-worker.js.br +0 -0
- package/dist/web/public/spreadsheet-preview-worker.js.gz +0 -0
- package/dist/web/public/spreadsheet-preview.af82fa2f.js +555 -0
- package/dist/web/public/spreadsheet-preview.af82fa2f.js.br +0 -0
- package/dist/web/public/spreadsheet-preview.af82fa2f.js.gz +0 -0
- package/dist/web/public/spreadsheet-xlsx-core.js +1006 -0
- package/dist/web/public/spreadsheet-xlsx-core.js.br +0 -0
- package/dist/web/public/spreadsheet-xlsx-core.js.gz +0 -0
- package/dist/web/public/styles.81a72906.css +1 -0
- package/dist/web/public/styles.81a72906.css.br +0 -0
- package/dist/web/public/styles.81a72906.css.gz +0 -0
- package/dist/web/public/{subagent-windows.e6ca799f.js → subagent-windows.07277a58.js} +7 -5
- package/dist/web/public/subagent-windows.07277a58.js.br +0 -0
- package/dist/web/public/subagent-windows.07277a58.js.gz +0 -0
- package/dist/web/public/sw.js +2 -2
- package/dist/web/public/sw.js.br +0 -0
- package/dist/web/public/sw.js.gz +0 -0
- package/dist/web/public/tab-layout-browser.065fcba4.js.gz +0 -0
- package/dist/web/public/{tab-rail-resize.94cd59f0.js → tab-rail-resize.a5867793.js} +1 -1
- package/dist/web/public/tab-rail-resize.a5867793.js.br +0 -0
- package/dist/web/public/{tab-rail-resize.94cd59f0.js.gz → tab-rail-resize.a5867793.js.gz} +0 -0
- package/dist/web/public/terminal-keycode229-recovery.af09f99a.js +1 -0
- package/dist/web/public/terminal-keycode229-recovery.af09f99a.js.br +0 -0
- package/dist/web/public/terminal-keycode229-recovery.af09f99a.js.gz +0 -0
- package/dist/web/public/terminal-split.js +146 -649
- package/dist/web/public/terminal-split.js.br +0 -0
- package/dist/web/public/terminal-split.js.gz +0 -0
- package/dist/web/public/terminal-tile.js +1688 -0
- package/dist/web/public/terminal-tile.js.br +0 -0
- package/dist/web/public/terminal-tile.js.gz +0 -0
- package/dist/web/public/terminal-ui.b7267005.js +2 -0
- package/dist/web/public/terminal-ui.b7267005.js.br +0 -0
- package/dist/web/public/terminal-ui.b7267005.js.gz +0 -0
- package/dist/web/public/tile-grid.js +2895 -0
- package/dist/web/public/tile-grid.js.br +0 -0
- package/dist/web/public/tile-grid.js.gz +0 -0
- package/dist/web/public/ultracode-panel.js.gz +0 -0
- package/dist/web/public/ultracode-windows.js +9 -6
- package/dist/web/public/ultracode-windows.js.br +0 -0
- package/dist/web/public/ultracode-windows.js.gz +0 -0
- package/dist/web/public/vendor/dompurify.min.js.gz +0 -0
- package/dist/web/public/vendor/exceljs.min.js +44 -0
- package/dist/web/public/vendor/exceljs.min.js.br +0 -0
- package/dist/web/public/vendor/exceljs.min.js.gz +0 -0
- package/dist/web/public/vendor/fflate.min.js +1 -0
- package/dist/web/public/vendor/fflate.min.js.br +0 -0
- package/dist/web/public/vendor/fflate.min.js.gz +0 -0
- package/dist/web/public/vendor/marked.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-fit.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-serialize.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-unicode11.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-predictive-echo.ae5e3d5d.js.gz +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.0b69623c.js +4 -0
- package/dist/web/public/vendor/xterm-zerolag-input.0b69623c.js.br +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.0b69623c.js.gz +0 -0
- package/dist/web/public/vendor/xterm.css.gz +0 -0
- package/dist/web/public/vendor/xterm.min.js.gz +0 -0
- package/dist/web/public/{voice-input.c4b51eb6.js → voice-input.2342c37b.js} +64 -10
- package/dist/web/public/voice-input.2342c37b.js.br +0 -0
- package/dist/web/public/voice-input.2342c37b.js.gz +0 -0
- package/dist/web/public/voice-pcm-worklet.js.gz +0 -0
- package/dist/web/public/webview-tabs.js +9 -1
- package/dist/web/public/webview-tabs.js.br +0 -0
- package/dist/web/public/webview-tabs.js.gz +0 -0
- package/dist/web/routes/cli-registry-routes.d.ts +23 -4
- package/dist/web/routes/cli-registry-routes.d.ts.map +1 -1
- package/dist/web/routes/cli-registry-routes.js +95 -8
- package/dist/web/routes/cli-registry-routes.js.map +1 -1
- package/dist/web/routes/file-routes.d.ts +7 -0
- package/dist/web/routes/file-routes.d.ts.map +1 -1
- package/dist/web/routes/file-routes.js +34 -4
- package/dist/web/routes/file-routes.js.map +1 -1
- package/dist/web/routes/git-status-routes.d.ts.map +1 -1
- package/dist/web/routes/git-status-routes.js +33 -6
- package/dist/web/routes/git-status-routes.js.map +1 -1
- package/dist/web/routes/mcp-sync-routes.d.ts +7 -2
- package/dist/web/routes/mcp-sync-routes.d.ts.map +1 -1
- package/dist/web/routes/mcp-sync-routes.js +10 -3
- package/dist/web/routes/mcp-sync-routes.js.map +1 -1
- package/dist/web/routes/reboot-restore-routes.js +1 -1
- package/dist/web/routes/reboot-restore-routes.js.map +1 -1
- package/dist/web/routes/session-routes.d.ts +18 -0
- package/dist/web/routes/session-routes.d.ts.map +1 -1
- package/dist/web/routes/session-routes.js +154 -69
- package/dist/web/routes/session-routes.js.map +1 -1
- package/dist/web/routes/status-telemetry-routes.d.ts +3 -0
- package/dist/web/routes/status-telemetry-routes.d.ts.map +1 -1
- package/dist/web/routes/status-telemetry-routes.js +12 -0
- package/dist/web/routes/status-telemetry-routes.js.map +1 -1
- package/dist/web/routes/system-routes.d.ts.map +1 -1
- package/dist/web/routes/system-routes.js +13 -0
- package/dist/web/routes/system-routes.js.map +1 -1
- package/dist/web/schemas.d.ts +30 -0
- package/dist/web/schemas.d.ts.map +1 -1
- package/dist/web/schemas.js +43 -0
- package/dist/web/schemas.js.map +1 -1
- package/dist/web/server.d.ts +6 -1
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +47 -21
- package/dist/web/server.js.map +1 -1
- package/dist/web/session-listener-wiring.d.ts +1 -0
- package/dist/web/session-listener-wiring.d.ts.map +1 -1
- package/dist/web/session-listener-wiring.js +11 -0
- package/dist/web/session-listener-wiring.js.map +1 -1
- package/package.json +6 -4
- package/scripts/postinstall.js +16 -0
- package/skills/codeman/SKILL.md +6 -0
- package/README.zh-CN.md +0 -1139
- package/dist/web/public/app.b9516c7b.js +0 -43
- package/dist/web/public/app.b9516c7b.js.br +0 -0
- package/dist/web/public/app.b9516c7b.js.gz +0 -0
- package/dist/web/public/constants.d95fade9.js.br +0 -0
- package/dist/web/public/constants.d95fade9.js.gz +0 -0
- package/dist/web/public/i18n.52f5b7cc.js +0 -1
- package/dist/web/public/i18n.52f5b7cc.js.br +0 -0
- package/dist/web/public/i18n.52f5b7cc.js.gz +0 -0
- package/dist/web/public/image-input.a216cf9e.js.br +0 -0
- package/dist/web/public/image-input.a216cf9e.js.gz +0 -0
- package/dist/web/public/mobile-handlers.23a85db1.js.br +0 -0
- package/dist/web/public/mobile-handlers.23a85db1.js.gz +0 -0
- package/dist/web/public/mobile.1aa4952d.css +0 -1
- package/dist/web/public/mobile.1aa4952d.css.br +0 -0
- package/dist/web/public/mobile.1aa4952d.css.gz +0 -0
- package/dist/web/public/notification-manager.50bb87d8.js.br +0 -0
- package/dist/web/public/notification-manager.50bb87d8.js.gz +0 -0
- package/dist/web/public/panels-ui.6a5898d9.js.br +0 -0
- package/dist/web/public/panels-ui.6a5898d9.js.gz +0 -0
- package/dist/web/public/session-ui.6bddf916.js +0 -89
- package/dist/web/public/session-ui.6bddf916.js.br +0 -0
- package/dist/web/public/session-ui.6bddf916.js.gz +0 -0
- package/dist/web/public/settings-ui.6e798b7b.js +0 -97
- package/dist/web/public/settings-ui.6e798b7b.js.br +0 -0
- package/dist/web/public/settings-ui.6e798b7b.js.gz +0 -0
- package/dist/web/public/styles.2d175c60.css +0 -1
- package/dist/web/public/styles.2d175c60.css.br +0 -0
- package/dist/web/public/styles.2d175c60.css.gz +0 -0
- package/dist/web/public/subagent-windows.e6ca799f.js.br +0 -0
- package/dist/web/public/subagent-windows.e6ca799f.js.gz +0 -0
- package/dist/web/public/tab-rail-resize.94cd59f0.js.br +0 -0
- package/dist/web/public/terminal-keycode229-recovery.fb91b25b.js +0 -1
- package/dist/web/public/terminal-keycode229-recovery.fb91b25b.js.br +0 -0
- package/dist/web/public/terminal-keycode229-recovery.fb91b25b.js.gz +0 -0
- package/dist/web/public/terminal-ui.a4535311.js +0 -2
- package/dist/web/public/terminal-ui.a4535311.js.br +0 -0
- package/dist/web/public/terminal-ui.a4535311.js.gz +0 -0
- package/dist/web/public/upload.html +0 -155
- package/dist/web/public/upload.html.br +0 -0
- package/dist/web/public/upload.html.gz +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.bbb5f84c.js +0 -4
- package/dist/web/public/vendor/xterm-zerolag-input.bbb5f84c.js.br +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.bbb5f84c.js.gz +0 -0
- package/dist/web/public/voice-input.c4b51eb6.js.br +0 -0
- package/dist/web/public/voice-input.c4b51eb6.js.gz +0 -0
package/README.md
CHANGED
|
@@ -19,16 +19,12 @@
|
|
|
19
19
|
<a href="https://github.com/Ark0N/Codeman/commits/master"><img src="https://img.shields.io/github/commit-activity/t/Ark0N/Codeman?style=flat-square&color=1e3a5f" alt="Total commits"></a>
|
|
20
20
|
</p>
|
|
21
21
|
|
|
22
|
-
<p align="center">
|
|
23
|
-
⭐ <strong>Like Codeman? <a href="https://github.com/Ark0N/Codeman">Give it a star on GitHub!</a></strong> It takes one click and helps more people find the project. ⭐
|
|
24
|
-
</p>
|
|
25
|
-
|
|
26
22
|
<p align="center">
|
|
27
23
|
<strong>English</strong> • <a href="README.zh-CN.md">简体中文</a>
|
|
28
24
|
</p>
|
|
29
25
|
|
|
30
26
|
<p align="center">
|
|
31
|
-
<img src="docs/images/
|
|
27
|
+
<img src="docs/images/tiles-crt-stats-20261010.gif" alt="Codeman tile grid: six live agents (DeepSeek Harness, Claude Code, Pi, Codex, OpenCode and a shell) powering on and off with the CRT animation, with the live header strip showing CPU, memory and Claude plan usage" width="800">
|
|
32
28
|
</p>
|
|
33
29
|
|
|
34
30
|
**Codeman** is a self-hosted mission control for AI coding agents. It spawns Claude Code, OpenCode, Codex, Antigravity, Gemini, Pi, Grok, DeepSeek Harness, or OMP inside persistent tmux sessions, streams the real terminal to any browser, and keeps agents productive after you walk away: it re-prompts on idle, resumes when a usage limit resets, runs scheduled jobs, and shows every background agent working in real time.
|
|
@@ -54,7 +50,7 @@ The installer asks before every system change, and re-running the same line upda
|
|
|
54
50
|
- **Self-hosted and private** - loopback-only by default, MIT licensed, no telemetry, runs entirely on your machine
|
|
55
51
|
|
|
56
52
|
<p align="center">
|
|
57
|
-
<img src="docs/images/codeman-tour-
|
|
53
|
+
<img src="docs/images/codeman-tour-20261010.png" alt="Codeman dashboard tour: session tabs per case, one-click Run for new agents, live plan usage in the header" width="900">
|
|
58
54
|
</p>
|
|
59
55
|
|
|
60
56
|
---
|
|
@@ -385,6 +381,14 @@ Beyond single-session respawn, the **Orchestrator** turns a high-level goal into
|
|
|
385
381
|
|
|
386
382
|
Run **20 parallel sessions** with full visibility — real-time xterm.js terminals at 60fps, per-session token and cost tracking, tab-based navigation, and one-click management.
|
|
387
383
|
|
|
384
|
+
### Tile Grid
|
|
385
|
+
|
|
386
|
+
<p align="center">
|
|
387
|
+
<img src="docs/images/tile-grid-20261009.gif" alt="Tile grid: the Tiles button opens six live sessions side by side (DeepSeek Harness, Claude Code, Codex, a shell, OpenCode and Pi), and a second click returns to a single session" width="800">
|
|
388
|
+
</p>
|
|
389
|
+
|
|
390
|
+
Watch and drive up to **six sessions side by side** in one window. Click **Tiles** in the header (or press `Ctrl+Shift+G`) and your sessions open as a grid of live terminals: every tile takes your keystrokes and shows its agent's logo, model and state in its header. Right-click **Tiles** to choose 2, 4 or 6 tiles, and drag a tile by its header to move it. Click **Tiles** again to return to a single session; the grid is remembered for next time. Desktop only (a window about 1180px wide or more). Full guide: [Tile Grid](docs/wiki/Tile-Grid.md).
|
|
391
|
+
|
|
388
392
|
### Persistent Sessions
|
|
389
393
|
|
|
390
394
|
Every session runs inside **tmux** — sessions survive server restarts, network drops, and machine sleep. Auto-recovery on startup with dual redundancy. Ghost session discovery finds orphaned tmux sessions. Managed sessions are environment-tagged so the agent won't kill its own session.
|
|
@@ -418,7 +422,7 @@ The title is templated into the served HTML on first byte, so it's correct from
|
|
|
418
422
|
### Tab Alerts
|
|
419
423
|
|
|
420
424
|
<p align="center">
|
|
421
|
-
<img src="docs/images/tab-
|
|
425
|
+
<a href="docs/images/codeman-tab-states-20261010.png"><img src="docs/images/codeman-tab-states-20261010.gif" alt="Tab states, annotated: a working tab with a spinning green ring, a red tab blocked on the agent's question shown below it, and a yellow tab whose turn is done, both alert tabs breathing" width="900"></a>
|
|
422
426
|
</p>
|
|
423
427
|
|
|
424
428
|
Every tab tells you its state at a glance. A running session keeps its green status dot. When a session stops and waits for input, its tab turns **yellow**: steady ring, tinted background, yellow dot, with a slow breathing glow on top. When a permission prompt or question is **blocking** the agent, the tab turns **red** with a faster pulse. The base tint never blinks off, so even a split-second glance (or a screenshot) reads the true state; the ring stays visible while the tab is selected, and a page reload re-arms pending alerts from the server, so a blocked session can never hide behind a fresh-looking tab.
|
|
@@ -731,6 +735,10 @@ For AI agents and automation that control Codeman without a browser: an agent th
|
|
|
731
735
|
|
|
732
736
|
Everything in this section also ships as a **Claude Code skill** in [`skills/codeman`](skills/codeman/SKILL.md). Install it once and you never paste API docs into a prompt again. You ask for what you want in plain English, and the agent already sitting inside a Codeman session loads the recipes and drives the API itself.
|
|
733
737
|
|
|
738
|
+
<p align="center">
|
|
739
|
+
<a href="docs/images/codeman-skill-20261010.png"><img src="docs/images/codeman-skill-20261010.gif" alt="A real codeman skill run: one plain-English request to a lead session, three Claude Code workers opening as new tabs, and lineage lines from the lead to every worker" width="900"></a>
|
|
740
|
+
</p>
|
|
741
|
+
|
|
734
742
|
#### Step 1: install it
|
|
735
743
|
|
|
736
744
|
| How | Command | Scope |
|
|
@@ -936,6 +944,24 @@ codeman tui --list # numbered session list (plain tex
|
|
|
936
944
|
codeman tui 3 # attach to session 3 of that list
|
|
937
945
|
```
|
|
938
946
|
|
|
947
|
+
### `codeman agent` — session-to-session verbs in every CLI mode
|
|
948
|
+
|
|
949
|
+
The skill above is claude-shaped (Codeman seeds its preamble for claude sessions only). An `opencode`, `codex`, `pi` or `gemini` agent has the same environment (`CODEMAN_MUX=1`, `CODEMAN_SESSION_ID`, `CODEMAN_API_URL` are exported into every pane) but nothing that teaches it the verbs — so `codeman agent` packages them as commands. It is a thin client over the endpoints listed under [API](#api): no new route, no new transport, auth and ownership unchanged. One line in a case's `AGENTS.md` is enough: *"other sessions: `codeman agent --help`"*.
|
|
950
|
+
|
|
951
|
+
```bash
|
|
952
|
+
codeman agent ls # sessions; * marks this one
|
|
953
|
+
SID=$(codeman agent spawn scratch-1 --mode claude) # quick-start + wait for the composer where the mode has a ready mark
|
|
954
|
+
codeman agent send "$SID" 'review src/, then say DONE' --until stop,exit --timeout 300000 # --wait = default signal set
|
|
955
|
+
codeman agent read "$SID" # last answer (as the server reads it for that mode)
|
|
956
|
+
codeman agent read "$SID" --tail 3000 # terminal tail, ANSI stripped (every mode)
|
|
957
|
+
codeman agent send "$SID" 'run the tests, then print WORKDONE followed by _4711' # hook-less modes (opencode, pi, …): ask for the marker in halves …
|
|
958
|
+
codeman agent wait "$SID" --match WORKDONE_4711 # … and wait on the joined form, which the prompt's echo never contains
|
|
959
|
+
codeman agent interrupt "$SID" # a bare ESC, conversation intact
|
|
960
|
+
codeman agent rm "$SID" # any session except this one
|
|
961
|
+
```
|
|
962
|
+
|
|
963
|
+
Rules the commands enforce rather than document: they refuse outside a Codeman session and never guess a URL; `send` transmits printable text plus Enter only (a control byte such as `Ctrl+C` is `app_exit` in opencode — ESC exists solely as `interrupt`, which never appends Enter); `rm` refuses an empty id, an unprovable self id and a prefix match in either direction. Ids may be the 8-character prefixes `ls` prints (resolved through the list; an ambiguous prefix refuses, anything shorter than 8 characters refuses on every verb). A prompt that starts with `-` goes after `--` (`send "$SID" -- "- fix the bug"`). The echo of the prompt you sent is output too: a `--match` marker that appears verbatim in the prompt matches at once, before the worker has done anything, so the prompt asks for it in halves. A remote session whose host is asleep answers a fire-and-forget `send` with `buffered` (Codeman wakes the host and types the prompt once the pane is back) or `dropped` (over the wake buffer's cap, nothing will be typed: exit `1`). Exit codes: `0` delivered/matched/signal, `1` error, `2` timeout, `3` the worker exited or the wait ended without an answer (`delivered:false`, `ended:true`), `4` refused. `spawn` prints the id alone on stdout (prose goes to stderr), so `SID=$(…)` captures exactly the id. `--json` prints the envelope's `data` for every verb. `--until stop` on a mode without hook signals is the server's 400, passed through — the marker path (`--match`) is the answer there, exactly as for the skill.
|
|
964
|
+
|
|
939
965
|
### Hooks (events flowing _back_ to Codeman)
|
|
940
966
|
|
|
941
967
|
Codeman registers Claude Code hooks that `POST /api/hook-event` (`permission_prompt`, `idle_prompt`, `stop`, `task_completed`, …) so the dashboard reacts in real time. This endpoint is auth-exempt on loopback but, under a managed tunnel, requires the `X-Codeman-Hook-Secret` header (read it from `$CODEMAN_HOOK_SECRET_FILE`). You normally don't call this by hand — Codeman wires it up — but it's how the autonomy layers "see" what the agent is doing.
|
|
@@ -33,6 +33,12 @@ export declare const AUDIO_ATTACHMENT_EXTENSIONS: ReadonlySet<string>;
|
|
|
33
33
|
* `/root` and `/etc` trees, realpath before the check), not the file's suffix.
|
|
34
34
|
*/
|
|
35
35
|
export declare const TEXT_ATTACHMENT_EXTENSIONS: ReadonlySet<string>;
|
|
36
|
+
/**
|
|
37
|
+
* Document types an attachment card previews. Also the list `codeman attach`'s
|
|
38
|
+
* error text names, so the help cannot drift from what is accepted. `xlsx` is
|
|
39
|
+
* previewed client-side (spreadsheet-preview-worker.js) and served raw like the rest.
|
|
40
|
+
*/
|
|
41
|
+
export declare const DOCUMENT_ATTACHMENT_EXTENSIONS: readonly string[];
|
|
36
42
|
export type AttachmentSource = 'detected' | 'external';
|
|
37
43
|
export interface AttachmentRecord {
|
|
38
44
|
attachmentId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-registry.d.ts","sourceRoot":"","sources":["../src/attachment-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,EAA2C,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9F,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,MAAM,CAAiD,CAAC;AAC9G,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,MAAM,CAS1D,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,0BAA0B,EAAE,WAAW,CAAC,MAAM,CAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"attachment-registry.d.ts","sourceRoot":"","sources":["../src/attachment-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,EAA2C,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9F,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,MAAM,CAAiD,CAAC;AAC9G,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,MAAM,CAS1D,CAAC;AA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,eAAO,MAAM,kBAAkB,oBAA2B,CAAC;AAE3D,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEzE;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,sBAAsB,CAa3E;AAED,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB;IACD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAOA;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAEvF;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,GAAG,4BAA4B,CAe9F;AAED,sDAAsD;AACtD,MAAM,WAAW,iCAAiC;IAChD;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;;;OAQG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC,CAAC;CAClE;AAoFD,wBAAsB,0BAA0B,CAC9C,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,iCAAsC,GAC9C,OAAO,CAAC,4BAA4B,CAAC,CA8EvC"}
|
|
@@ -47,15 +47,19 @@ export const AUDIO_ATTACHMENT_EXTENSIONS = new Set([
|
|
|
47
47
|
* `/root` and `/etc` trees, realpath before the check), not the file's suffix.
|
|
48
48
|
*/
|
|
49
49
|
export const TEXT_ATTACHMENT_EXTENSIONS = EDITABLE_EXTENSIONS;
|
|
50
|
+
/**
|
|
51
|
+
* Document types an attachment card previews. Also the list `codeman attach`'s
|
|
52
|
+
* error text names, so the help cannot drift from what is accepted. `xlsx` is
|
|
53
|
+
* previewed client-side (spreadsheet-preview-worker.js) and served raw like the rest.
|
|
54
|
+
*/
|
|
55
|
+
export const DOCUMENT_ATTACHMENT_EXTENSIONS = Object.freeze(['pdf', 'docx', 'pptx', 'xlsx']);
|
|
50
56
|
const SUPPORTED_ATTACHMENT_EXTENSIONS = new Set([
|
|
51
57
|
'png',
|
|
52
58
|
'jpg',
|
|
53
59
|
'jpeg',
|
|
54
60
|
'gif',
|
|
55
61
|
'webp',
|
|
56
|
-
|
|
57
|
-
'docx',
|
|
58
|
-
'pptx',
|
|
62
|
+
...DOCUMENT_ATTACHMENT_EXTENSIONS,
|
|
59
63
|
'md',
|
|
60
64
|
'txt',
|
|
61
65
|
...VIDEO_ATTACHMENT_EXTENSIONS,
|
|
@@ -122,6 +126,8 @@ export function getAttachmentType(extension) {
|
|
|
122
126
|
return 'pdf';
|
|
123
127
|
if (normalized === 'pptx')
|
|
124
128
|
return 'presentation';
|
|
129
|
+
if (normalized === 'xlsx')
|
|
130
|
+
return 'spreadsheet';
|
|
125
131
|
if (normalized === 'md')
|
|
126
132
|
return 'markdown';
|
|
127
133
|
// Everything else in the text family reads as text, including code and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-registry.js","sourceRoot":"","sources":["../src/attachment-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAC/G,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE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CAAC,SAAS,CAAC;QAC5C,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,CAAC;QAC1B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;QACrB,MAAM,EAAE,UAAU;KACnB,CAAC;IACF,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACpC,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import { type CodemanCredentials } from './codeman-credentials.js';
|
|
3
|
+
export interface AgentContext {
|
|
4
|
+
/** Base URL of the Codeman server, from `CODEMAN_API_URL`. */
|
|
5
|
+
apiUrl: string;
|
|
6
|
+
/** This session's id, from `CODEMAN_SESSION_ID`. */
|
|
7
|
+
selfId: string;
|
|
8
|
+
/** Basic-auth credentials, when the server has a password. */
|
|
9
|
+
auth?: CodemanCredentials;
|
|
10
|
+
}
|
|
11
|
+
/** Thrown when the process is not inside a Codeman-managed session. */
|
|
12
|
+
export declare class AgentGuardError extends Error {
|
|
13
|
+
}
|
|
14
|
+
/** Exit codes shared by every verb; a shell agent can branch on them. */
|
|
15
|
+
export declare const EXIT: {
|
|
16
|
+
readonly ok: 0;
|
|
17
|
+
readonly error: 1;
|
|
18
|
+
readonly timeout: 2;
|
|
19
|
+
readonly dead: 3;
|
|
20
|
+
readonly refused: 4;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the context from the environment, or throw `AgentGuardError`.
|
|
24
|
+
*
|
|
25
|
+
* Credentials in the order every client of the API uses (`credentialsFrom`, shared
|
|
26
|
+
* with `codeman attach` and the TUI): each field from the environment (a session
|
|
27
|
+
* inherits the server's), then the data dir's `.env`. No password means the server
|
|
28
|
+
* is open (single-user) — or it is not, and the 401 says so.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveAgentContext(env?: NodeJS.ProcessEnv, envFile?: () => Record<string, string>): AgentContext;
|
|
31
|
+
/**
|
|
32
|
+
* Is `id` this session? Prefix in BOTH directions, because ids appear in full and
|
|
33
|
+
* in 8-char form (mux names, UI surfaces, Docker's truncated `$SELF`). A self id
|
|
34
|
+
* shorter than 8 characters cannot prove anything and is treated as "maybe me".
|
|
35
|
+
*/
|
|
36
|
+
export declare function isSelfSession(selfId: string, id: string): boolean;
|
|
37
|
+
/** Why `rm` refuses, or `undefined` when the delete may go ahead. */
|
|
38
|
+
export declare function deleteRefusal(selfId: string, id: string): string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The prompt `send` was given, which must be ONE argument. Joining several with spaces
|
|
41
|
+
* would turn an unquoted `$(cat notes.txt)`, which the shell splits on every newline,
|
|
42
|
+
* back into a single line, so the multi-line refusal below would never see it.
|
|
43
|
+
*/
|
|
44
|
+
export declare function sendPromptFromArgs(words: readonly string[]): {
|
|
45
|
+
text: string;
|
|
46
|
+
} | {
|
|
47
|
+
error: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Why `send` refuses this text, or `undefined` when it is printable. The composer
|
|
51
|
+
* takes one line; the server strips `\r`/`\n` but everything else below 0x20 (and
|
|
52
|
+
* DEL) reaches the pane as a keypress. None of that is a prompt.
|
|
53
|
+
*/
|
|
54
|
+
export declare function inputRefusal(text: string): string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Body for `POST /sessions/:id/input` on the send path: text plus `\r` unless the
|
|
57
|
+
* caller asked to type without submitting. Never anything else.
|
|
58
|
+
*/
|
|
59
|
+
export declare function buildSendBody(text: string, options: {
|
|
60
|
+
enter: boolean;
|
|
61
|
+
clientId: string;
|
|
62
|
+
seq: number;
|
|
63
|
+
wait?: string | true;
|
|
64
|
+
waitTimeout?: number;
|
|
65
|
+
}): Record<string, unknown>;
|
|
66
|
+
/** Body for the interrupt path: a bare ESC, and nothing appended — ever. */
|
|
67
|
+
export declare function buildInterruptBody(clientId: string, seq: number): Record<string, unknown>;
|
|
68
|
+
/** `clientId` for this caller: fixed per sending session, so `seq` stays monotonic. */
|
|
69
|
+
export declare function defaultClientId(selfId: string, suffix?: string): string;
|
|
70
|
+
/**
|
|
71
|
+
* Strip a terminal buffer for humans: the shared ANSI strip (CSI, OSC such as window
|
|
72
|
+
* titles, keypad modes) plus the charset designators (`ESC ( B`) it leaves in.
|
|
73
|
+
*/
|
|
74
|
+
export declare function stripAnsi(text: string): string;
|
|
75
|
+
/** Parse a positive-integer option (`--timeout` ms, `--tail` bytes); the server rejects anything else. */
|
|
76
|
+
export declare function parsePositiveInt(raw: string | undefined, fallback: number, flag?: string): number;
|
|
77
|
+
/**
|
|
78
|
+
* Exit code for a wait result: matched or a signal → ok, `exit` or `ended` → dead,
|
|
79
|
+
* timeout → timeout. `ended` is checked BEFORE the happy paths: a worker that dies
|
|
80
|
+
* during `--until stop` comes back as `ended:true, signal:null` (the registry only
|
|
81
|
+
* satisfies waiters that listed `exit`, then cancels the rest), and a `--match` on
|
|
82
|
+
* a dead worker as `ended:true, matched:false` — both are "dead", never "done".
|
|
83
|
+
*/
|
|
84
|
+
export declare function waitExitCode(wait: WaitResult | undefined): number;
|
|
85
|
+
export interface ApiEnvelope<T = unknown> {
|
|
86
|
+
success: boolean;
|
|
87
|
+
data?: T;
|
|
88
|
+
error?: string;
|
|
89
|
+
errorCode?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface ApiResponse<T = unknown> {
|
|
92
|
+
status: number;
|
|
93
|
+
/** Parsed envelope, or `undefined` when the body was not JSON (auth guards answer in plain text). */
|
|
94
|
+
json?: ApiEnvelope<T>;
|
|
95
|
+
text: string;
|
|
96
|
+
}
|
|
97
|
+
export interface WaitResult {
|
|
98
|
+
/** The signal that fired, or null when the wait ended without one. */
|
|
99
|
+
signal?: string | null;
|
|
100
|
+
timedOut?: boolean;
|
|
101
|
+
/** The session went away (deleted / torn down / the write failed) before the wait resolved. */
|
|
102
|
+
ended?: boolean;
|
|
103
|
+
timeoutMs?: number;
|
|
104
|
+
until?: string[];
|
|
105
|
+
matched?: boolean;
|
|
106
|
+
match?: string;
|
|
107
|
+
snippet?: string;
|
|
108
|
+
immediate?: boolean;
|
|
109
|
+
}
|
|
110
|
+
export interface RequestOptions {
|
|
111
|
+
method: 'GET' | 'POST' | 'DELETE';
|
|
112
|
+
path: string;
|
|
113
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
114
|
+
body?: Record<string, unknown>;
|
|
115
|
+
headers?: Record<string, string>;
|
|
116
|
+
/** Socket timeout; long-polls pass their own timeout plus headroom. */
|
|
117
|
+
timeoutMs?: number;
|
|
118
|
+
}
|
|
119
|
+
export type ApiRequest = (ctx: AgentContext, options: RequestOptions) => Promise<ApiResponse>;
|
|
120
|
+
/** Every request carries these; they are ignored on endpoints that do not read them. */
|
|
121
|
+
export declare function baseHeaders(ctx: AgentContext): Record<string, string>;
|
|
122
|
+
/** The real transport. `rejectUnauthorized:false` because the HTTPS install uses a self-signed cert. */
|
|
123
|
+
export declare const httpRequest: ApiRequest;
|
|
124
|
+
/** One line describing a failed response, for humans. Plain-text guards (401/403/429) have no envelope. */
|
|
125
|
+
export declare function describeFailure(res: ApiResponse): string;
|
|
126
|
+
export interface AgentIo {
|
|
127
|
+
out: (line: string) => void;
|
|
128
|
+
err: (line: string) => void;
|
|
129
|
+
}
|
|
130
|
+
export interface AgentDeps {
|
|
131
|
+
ctx: AgentContext;
|
|
132
|
+
request: ApiRequest;
|
|
133
|
+
io: AgentIo;
|
|
134
|
+
json: boolean;
|
|
135
|
+
/** Clock for `seq`; injectable so tests are deterministic. */
|
|
136
|
+
now?: () => number;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Shortest prefix that may name a session: the 8-char form `ls` prints, and the floor
|
|
140
|
+
* the server's own resolver uses (`PARENT_SESSION_ID_MIN_PREFIX`, route-helpers.ts).
|
|
141
|
+
*/
|
|
142
|
+
export declare const MIN_ID_PREFIX_LENGTH = 8;
|
|
143
|
+
/**
|
|
144
|
+
* Turn the id a human typed into the one the routes accept. `ls` prints 8-char
|
|
145
|
+
* prefixes and the routes answer 404 to those (measured live), so anything shorter
|
|
146
|
+
* than a full id resolves through the session list; an ambiguous prefix refuses
|
|
147
|
+
* rather than picking one. Below 8 characters it refuses before the list: "unique"
|
|
148
|
+
* means nothing for `9` — it names whatever session happens to be alone with that
|
|
149
|
+
* first character, and `rm`/`send` would act on it.
|
|
150
|
+
*/
|
|
151
|
+
export declare function resolveSessionId(deps: AgentDeps, id: string): Promise<{
|
|
152
|
+
id: string;
|
|
153
|
+
} | {
|
|
154
|
+
error: string;
|
|
155
|
+
code: number;
|
|
156
|
+
}>;
|
|
157
|
+
/** `agent ls` — every session the caller can see, self marked. */
|
|
158
|
+
export declare function agentLs(deps: AgentDeps): Promise<number>;
|
|
159
|
+
export interface SpawnOptions {
|
|
160
|
+
caseName: string;
|
|
161
|
+
mode: string;
|
|
162
|
+
name?: string;
|
|
163
|
+
/** Wait for the composer before returning, where the registry gives the mode a ready mark. */
|
|
164
|
+
ready: boolean;
|
|
165
|
+
timeoutMs: number;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Agent-scratch label for a case directory a spawn CREATES (the server applies it only
|
|
169
|
+
* when quick-start makes the directory). The Add Case UI offers a recursive delete for
|
|
170
|
+
* such directories, so this header must never ride any other request: mislabelling a
|
|
171
|
+
* real repo there is the one failure in this area that costs actual work.
|
|
172
|
+
*/
|
|
173
|
+
export declare const AGENT_ORIGIN_HEADER: {
|
|
174
|
+
readonly 'X-Codeman-Agent-Origin': "codeman-agent-cli";
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* What the mode's TUI draws once its composer can take a prompt, from the CLI registry
|
|
178
|
+
* (`capabilities.composerReadyMark`); undefined means the mode has no readiness wait.
|
|
179
|
+
*/
|
|
180
|
+
export declare function composerReadyMark(mode: string): string | undefined;
|
|
181
|
+
/** `agent spawn` — quick-start with lineage, then the readiness ladder where the mode has one. */
|
|
182
|
+
export declare function agentSpawn(deps: AgentDeps, options: SpawnOptions): Promise<number>;
|
|
183
|
+
export interface SendOptions {
|
|
184
|
+
id: string;
|
|
185
|
+
text: string;
|
|
186
|
+
enter: boolean;
|
|
187
|
+
/** `undefined` = fire-and-forget; `true` = default signal set; string = comma list. */
|
|
188
|
+
wait?: string | true;
|
|
189
|
+
timeoutMs?: number;
|
|
190
|
+
clientId?: string;
|
|
191
|
+
seq?: number;
|
|
192
|
+
}
|
|
193
|
+
/** `agent send` — printable text plus `\r`, exactly-once, optionally blocking on end of turn. */
|
|
194
|
+
export declare function agentSend(deps: AgentDeps, options: SendOptions): Promise<number>;
|
|
195
|
+
export interface WaitOptions {
|
|
196
|
+
id: string;
|
|
197
|
+
until?: string;
|
|
198
|
+
match?: string;
|
|
199
|
+
from?: 'buffer' | 'now';
|
|
200
|
+
fresh?: boolean;
|
|
201
|
+
nocase?: boolean;
|
|
202
|
+
timeoutMs: number;
|
|
203
|
+
}
|
|
204
|
+
/** `agent wait` — a signal (`--until`) or a literal output marker (`--match`). */
|
|
205
|
+
export declare function agentWait(deps: AgentDeps, options: WaitOptions): Promise<number>;
|
|
206
|
+
export interface ReadOptions {
|
|
207
|
+
id: string;
|
|
208
|
+
/** Bytes of raw terminal to fetch; ANSI is stripped for humans. */
|
|
209
|
+
tail?: number;
|
|
210
|
+
/** Whole conversation (`context=full`) instead of the last assistant message. */
|
|
211
|
+
full?: boolean;
|
|
212
|
+
}
|
|
213
|
+
/** `agent read` — the last answer (the route picks the transcript reader or the pane segmenter) or a terminal tail. */
|
|
214
|
+
export declare function agentRead(deps: AgentDeps, options: ReadOptions): Promise<number>;
|
|
215
|
+
/** `agent interrupt` — a bare ESC keypress, no Enter, conversation intact. */
|
|
216
|
+
export declare function agentInterrupt(deps: AgentDeps, options: {
|
|
217
|
+
id: string;
|
|
218
|
+
}): Promise<number>;
|
|
219
|
+
/** `agent rm` — delete a session that is provably not this one. */
|
|
220
|
+
export declare function agentRm(deps: AgentDeps, options: {
|
|
221
|
+
id: string;
|
|
222
|
+
}): Promise<number>;
|
|
223
|
+
/** Register `codeman agent …` on the program. */
|
|
224
|
+
export declare function registerAgentCommands(program: Command): Command;
|
|
225
|
+
//# sourceMappingURL=cli-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-agent.d.ts","sourceRoot":"","sources":["../src/cli-agent.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAUlC,MAAM,WAAW,YAAY;IAC3B,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,MAAM,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B;AAED,uEAAuE;AACvE,qBAAa,eAAgB,SAAQ,KAAK;CAAG;AAE7C,yEAAyE;AACzE,eAAO,MAAM,IAAI;;;;;;CAMP,CAAC;AAEX;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,OAAO,GAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAsB,GACzD,YAAY,CAcd;AAMD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAGjE;AAED,qEAAqE;AACrE,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAK5E;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAKjG;AAED;;;;GAIG;AACH,wBAAgB,YAAY,C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