aicodeman 0.2.8 → 0.3.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 +91 -0
- package/dist/ai-idle-checker.d.ts.map +1 -1
- package/dist/ai-idle-checker.js +3 -2
- package/dist/ai-idle-checker.js.map +1 -1
- package/dist/ai-plan-checker.d.ts.map +1 -1
- package/dist/ai-plan-checker.js +3 -2
- package/dist/ai-plan-checker.js.map +1 -1
- package/dist/bash-tool-parser.d.ts +2 -3
- package/dist/bash-tool-parser.d.ts.map +1 -1
- package/dist/bash-tool-parser.js +14 -31
- package/dist/bash-tool-parser.js.map +1 -1
- package/dist/config/ai-defaults.d.ts +16 -0
- package/dist/config/ai-defaults.d.ts.map +1 -0
- package/dist/config/ai-defaults.js +16 -0
- package/dist/config/ai-defaults.js.map +1 -0
- package/dist/config/auth-config.d.ts +19 -0
- package/dist/config/auth-config.d.ts.map +1 -0
- package/dist/config/auth-config.js +28 -0
- package/dist/config/auth-config.js.map +1 -0
- package/dist/config/exec-timeout.d.ts +10 -0
- package/dist/config/exec-timeout.d.ts.map +1 -0
- package/dist/config/exec-timeout.js +10 -0
- package/dist/config/exec-timeout.js.map +1 -0
- package/dist/config/map-limits.d.ts +4 -0
- package/dist/config/map-limits.d.ts.map +1 -1
- package/dist/config/map-limits.js +7 -0
- package/dist/config/map-limits.js.map +1 -1
- package/dist/config/server-timing.d.ts +36 -0
- package/dist/config/server-timing.d.ts.map +1 -0
- package/dist/config/server-timing.js +51 -0
- package/dist/config/server-timing.js.map +1 -0
- package/dist/config/team-config.d.ts +16 -0
- package/dist/config/team-config.d.ts.map +1 -0
- package/dist/config/team-config.js +16 -0
- package/dist/config/team-config.js.map +1 -0
- package/dist/config/terminal-limits.d.ts +18 -0
- package/dist/config/terminal-limits.d.ts.map +1 -0
- package/dist/config/terminal-limits.js +18 -0
- package/dist/config/terminal-limits.js.map +1 -0
- package/dist/config/tunnel-config.d.ts +27 -0
- package/dist/config/tunnel-config.d.ts.map +1 -0
- package/dist/config/tunnel-config.js +36 -0
- package/dist/config/tunnel-config.js.map +1 -0
- package/dist/hooks-config.d.ts.map +1 -1
- package/dist/hooks-config.js +7 -6
- package/dist/hooks-config.js.map +1 -1
- package/dist/image-watcher.d.ts +4 -4
- package/dist/image-watcher.d.ts.map +1 -1
- package/dist/image-watcher.js +17 -30
- package/dist/image-watcher.js.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/plan-orchestrator.d.ts +2 -24
- package/dist/plan-orchestrator.d.ts.map +1 -1
- package/dist/plan-orchestrator.js.map +1 -1
- package/dist/push-store.d.ts +1 -1
- package/dist/push-store.d.ts.map +1 -1
- package/dist/push-store.js +4 -12
- package/dist/push-store.js.map +1 -1
- package/dist/ralph-fix-plan-watcher.d.ts +91 -0
- package/dist/ralph-fix-plan-watcher.d.ts.map +1 -0
- package/dist/ralph-fix-plan-watcher.js +326 -0
- package/dist/ralph-fix-plan-watcher.js.map +1 -0
- package/dist/ralph-plan-tracker.d.ts +201 -0
- package/dist/ralph-plan-tracker.d.ts.map +1 -0
- package/dist/ralph-plan-tracker.js +325 -0
- package/dist/ralph-plan-tracker.js.map +1 -0
- package/dist/ralph-stall-detector.d.ts +84 -0
- package/dist/ralph-stall-detector.d.ts.map +1 -0
- package/dist/ralph-stall-detector.js +139 -0
- package/dist/ralph-stall-detector.js.map +1 -0
- package/dist/ralph-status-parser.d.ts +141 -0
- package/dist/ralph-status-parser.d.ts.map +1 -0
- package/dist/ralph-status-parser.js +478 -0
- package/dist/ralph-status-parser.js.map +1 -0
- package/dist/ralph-tracker.d.ts +194 -685
- package/dist/ralph-tracker.d.ts.map +1 -1
- package/dist/ralph-tracker.js +349 -1713
- package/dist/ralph-tracker.js.map +1 -1
- package/dist/respawn-adaptive-timing.d.ts +61 -0
- package/dist/respawn-adaptive-timing.d.ts.map +1 -0
- package/dist/respawn-adaptive-timing.js +105 -0
- package/dist/respawn-adaptive-timing.js.map +1 -0
- package/dist/respawn-controller.d.ts +14 -101
- package/dist/respawn-controller.d.ts.map +1 -1
- package/dist/respawn-controller.js +155 -594
- package/dist/respawn-controller.js.map +1 -1
- package/dist/respawn-health.d.ts +54 -0
- package/dist/respawn-health.d.ts.map +1 -0
- package/dist/respawn-health.js +183 -0
- package/dist/respawn-health.js.map +1 -0
- package/dist/respawn-metrics.d.ts +81 -0
- package/dist/respawn-metrics.d.ts.map +1 -0
- package/dist/respawn-metrics.js +198 -0
- package/dist/respawn-metrics.js.map +1 -0
- package/dist/respawn-patterns.d.ts +45 -0
- package/dist/respawn-patterns.d.ts.map +1 -0
- package/dist/respawn-patterns.js +125 -0
- package/dist/respawn-patterns.js.map +1 -0
- package/dist/session-auto-ops.d.ts +89 -0
- package/dist/session-auto-ops.d.ts.map +1 -0
- package/dist/session-auto-ops.js +224 -0
- package/dist/session-auto-ops.js.map +1 -0
- package/dist/session-cli-builder.d.ts +62 -0
- package/dist/session-cli-builder.d.ts.map +1 -0
- package/dist/session-cli-builder.js +121 -0
- package/dist/session-cli-builder.js.map +1 -0
- package/dist/session-task-cache.d.ts +52 -0
- package/dist/session-task-cache.d.ts.map +1 -0
- package/dist/session-task-cache.js +90 -0
- package/dist/session-task-cache.js.map +1 -0
- package/dist/session.d.ts +2 -33
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +58 -309
- package/dist/session.js.map +1 -1
- package/dist/state-store.d.ts +9 -2
- package/dist/state-store.d.ts.map +1 -1
- package/dist/state-store.js +112 -39
- package/dist/state-store.js.map +1 -1
- package/dist/subagent-watcher.d.ts +16 -9
- package/dist/subagent-watcher.d.ts.map +1 -1
- package/dist/subagent-watcher.js +126 -147
- package/dist/subagent-watcher.js.map +1 -1
- package/dist/team-watcher.d.ts +3 -0
- package/dist/team-watcher.d.ts.map +1 -1
- package/dist/team-watcher.js +54 -5
- package/dist/team-watcher.js.map +1 -1
- package/dist/tmux-manager.d.ts.map +1 -1
- package/dist/tmux-manager.js +1 -2
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tunnel-manager.d.ts +26 -0
- package/dist/tunnel-manager.d.ts.map +1 -1
- package/dist/tunnel-manager.js +127 -7
- package/dist/tunnel-manager.js.map +1 -1
- package/dist/types/api.d.ts +93 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/api.js +83 -0
- package/dist/types/api.js.map +1 -0
- package/dist/types/app-state.d.ts +100 -0
- package/dist/types/app-state.d.ts.map +1 -0
- package/dist/types/app-state.js +59 -0
- package/dist/types/app-state.js.map +1 -0
- package/dist/types/common.d.ts +70 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +8 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/index.d.ts +18 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/lifecycle.d.ts +17 -0
- package/dist/types/lifecycle.d.ts.map +1 -0
- package/dist/types/lifecycle.js +5 -0
- package/dist/types/lifecycle.js.map +1 -0
- package/dist/types/plan.d.ts +32 -0
- package/dist/types/plan.d.ts.map +1 -0
- package/dist/types/plan.js +5 -0
- package/dist/types/plan.js.map +1 -0
- package/dist/types/push.d.ts +23 -0
- package/dist/types/push.d.ts.map +1 -0
- package/dist/types/push.js +5 -0
- package/dist/types/push.js.map +1 -0
- package/dist/types/ralph.d.ts +241 -0
- package/dist/types/ralph.d.ts.map +1 -0
- package/dist/types/ralph.js +49 -0
- package/dist/types/ralph.js.map +1 -0
- package/dist/types/respawn.d.ts +250 -0
- package/dist/types/respawn.d.ts.map +1 -0
- package/dist/types/respawn.js +5 -0
- package/dist/types/respawn.js.map +1 -0
- package/dist/types/run-summary.d.ts +81 -0
- package/dist/types/run-summary.d.ts.map +1 -0
- package/dist/types/run-summary.js +22 -0
- package/dist/types/run-summary.js.map +1 -0
- package/dist/types/session.d.ts +130 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/session.js +5 -0
- package/dist/types/session.js.map +1 -0
- package/dist/types/task.d.ts +58 -0
- package/dist/types/task.d.ts.map +1 -0
- package/dist/types/task.js +5 -0
- package/dist/types/task.js.map +1 -0
- package/dist/types/teams.d.ts +55 -0
- package/dist/types/teams.d.ts.map +1 -0
- package/dist/types/teams.js +5 -0
- package/dist/types/teams.js.map +1 -0
- package/dist/types/tools.d.ts +46 -0
- package/dist/types/tools.d.ts.map +1 -0
- package/dist/types/tools.js +5 -0
- package/dist/types/tools.js.map +1 -0
- package/dist/types.d.ts +1 -1138
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -214
- package/dist/types.js.map +1 -1
- package/dist/utils/claude-cli-resolver.d.ts.map +1 -1
- package/dist/utils/claude-cli-resolver.js +1 -2
- package/dist/utils/claude-cli-resolver.js.map +1 -1
- package/dist/utils/debouncer.d.ts +111 -0
- package/dist/utils/debouncer.d.ts.map +1 -0
- package/dist/utils/debouncer.js +162 -0
- package/dist/utils/debouncer.js.map +1 -0
- package/dist/utils/index.d.ts +3 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +3 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/opencode-cli-resolver.d.ts.map +1 -1
- package/dist/utils/opencode-cli-resolver.js +1 -2
- package/dist/utils/opencode-cli-resolver.js.map +1 -1
- package/dist/utils/string-similarity.d.ts +0 -57
- package/dist/utils/string-similarity.d.ts.map +1 -1
- package/dist/utils/string-similarity.js +3 -18
- package/dist/utils/string-similarity.js.map +1 -1
- package/dist/web/middleware/auth.d.ts +31 -0
- package/dist/web/middleware/auth.d.ts.map +1 -0
- package/dist/web/middleware/auth.js +154 -0
- package/dist/web/middleware/auth.js.map +1 -0
- package/dist/web/ports/auth-port.d.ts +18 -0
- package/dist/web/ports/auth-port.d.ts.map +1 -0
- package/dist/web/ports/auth-port.js +6 -0
- package/dist/web/ports/auth-port.js.map +1 -0
- package/dist/web/ports/config-port.d.ts +28 -0
- package/dist/web/ports/config-port.d.ts.map +1 -0
- package/dist/web/ports/config-port.js +6 -0
- package/dist/web/ports/config-port.js.map +1 -0
- package/dist/web/ports/event-port.d.ts +13 -0
- package/dist/web/ports/event-port.d.ts.map +1 -0
- package/dist/web/ports/event-port.js +6 -0
- package/dist/web/ports/event-port.js.map +1 -0
- package/dist/web/ports/index.d.ts +14 -0
- package/dist/web/ports/index.d.ts.map +1 -0
- package/dist/web/ports/index.js +9 -0
- package/dist/web/ports/index.js.map +1 -0
- package/dist/web/ports/infra-port.d.ts +36 -0
- package/dist/web/ports/infra-port.d.ts.map +1 -0
- package/dist/web/ports/infra-port.js +6 -0
- package/dist/web/ports/infra-port.js.map +1 -0
- package/dist/web/ports/respawn-port.d.ts +20 -0
- package/dist/web/ports/respawn-port.d.ts.map +1 -0
- package/dist/web/ports/respawn-port.js +6 -0
- package/dist/web/ports/respawn-port.js.map +1 -0
- package/dist/web/ports/session-port.d.ts +15 -0
- package/dist/web/ports/session-port.d.ts.map +1 -0
- package/dist/web/ports/session-port.js +6 -0
- package/dist/web/ports/session-port.js.map +1 -0
- package/dist/web/public/api-client.js +70 -0
- package/dist/web/public/api-client.js.br +0 -0
- package/dist/web/public/api-client.js.gz +0 -0
- package/dist/web/public/app.js +152 -236
- package/dist/web/public/app.js.br +0 -0
- package/dist/web/public/app.js.gz +0 -0
- package/dist/web/public/constants.js +238 -0
- package/dist/web/public/constants.js.br +0 -0
- package/dist/web/public/constants.js.gz +0 -0
- package/dist/web/public/index.html +11 -3
- package/dist/web/public/index.html.br +0 -0
- package/dist/web/public/index.html.gz +0 -0
- package/dist/web/public/keyboard-accessory.js +279 -0
- package/dist/web/public/keyboard-accessory.js.br +0 -0
- package/dist/web/public/keyboard-accessory.js.gz +0 -0
- package/dist/web/public/mobile-handlers.js +467 -0
- package/dist/web/public/mobile-handlers.js.br +0 -0
- package/dist/web/public/mobile-handlers.js.gz +0 -0
- package/dist/web/public/mobile.css.gz +0 -0
- package/dist/web/public/notification-manager.js +445 -0
- package/dist/web/public/notification-manager.js.br +0 -0
- package/dist/web/public/notification-manager.js.gz +0 -0
- package/dist/web/public/ralph-wizard.js +3 -3
- package/dist/web/public/ralph-wizard.js.br +0 -0
- package/dist/web/public/ralph-wizard.js.gz +0 -0
- package/dist/web/public/styles.css.gz +0 -0
- package/dist/web/public/subagent-windows.js +1115 -0
- package/dist/web/public/subagent-windows.js.br +0 -0
- package/dist/web/public/subagent-windows.js.gz +0 -0
- package/dist/web/public/sw.js.gz +0 -0
- package/dist/web/public/upload.html.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-fit.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.css.gz +0 -0
- package/dist/web/public/vendor/xterm.min.js.gz +0 -0
- package/dist/web/public/voice-input.js +858 -0
- package/dist/web/public/voice-input.js.br +0 -0
- package/dist/web/public/voice-input.js.gz +0 -0
- package/dist/web/route-helpers.d.ts +38 -0
- package/dist/web/route-helpers.d.ts.map +1 -0
- package/dist/web/route-helpers.js +143 -0
- package/dist/web/route-helpers.js.map +1 -0
- package/dist/web/routes/case-routes.d.ts +9 -0
- package/dist/web/routes/case-routes.d.ts.map +1 -0
- package/dist/web/routes/case-routes.js +419 -0
- package/dist/web/routes/case-routes.js.map +1 -0
- package/dist/web/routes/file-routes.d.ts +8 -0
- package/dist/web/routes/file-routes.d.ts.map +1 -0
- package/dist/web/routes/file-routes.js +337 -0
- package/dist/web/routes/file-routes.js.map +1 -0
- package/dist/web/routes/hook-event-routes.d.ts +9 -0
- package/dist/web/routes/hook-event-routes.d.ts.map +1 -0
- package/dist/web/routes/hook-event-routes.js +57 -0
- package/dist/web/routes/hook-event-routes.js.map +1 -0
- package/dist/web/routes/index.d.ts +16 -0
- package/dist/web/routes/index.d.ts.map +1 -0
- package/dist/web/routes/index.js +16 -0
- package/dist/web/routes/index.js.map +1 -0
- package/dist/web/routes/mux-routes.d.ts +8 -0
- package/dist/web/routes/mux-routes.d.ts.map +1 -0
- package/dist/web/routes/mux-routes.js +32 -0
- package/dist/web/routes/mux-routes.js.map +1 -0
- package/dist/web/routes/plan-routes.d.ts +9 -0
- package/dist/web/routes/plan-routes.d.ts.map +1 -0
- package/dist/web/routes/plan-routes.js +381 -0
- package/dist/web/routes/plan-routes.js.map +1 -0
- package/dist/web/routes/push-routes.d.ts +8 -0
- package/dist/web/routes/push-routes.d.ts.map +1 -0
- package/dist/web/routes/push-routes.js +49 -0
- package/dist/web/routes/push-routes.js.map +1 -0
- package/dist/web/routes/ralph-routes.d.ts +9 -0
- package/dist/web/routes/ralph-routes.d.ts.map +1 -0
- package/dist/web/routes/ralph-routes.js +475 -0
- package/dist/web/routes/ralph-routes.js.map +1 -0
- package/dist/web/routes/respawn-routes.d.ts +8 -0
- package/dist/web/routes/respawn-routes.d.ts.map +1 -0
- package/dist/web/routes/respawn-routes.js +260 -0
- package/dist/web/routes/respawn-routes.js.map +1 -0
- package/dist/web/routes/scheduled-routes.d.ts +8 -0
- package/dist/web/routes/scheduled-routes.d.ts.map +1 -0
- package/dist/web/routes/scheduled-routes.js +51 -0
- package/dist/web/routes/scheduled-routes.js.map +1 -0
- package/dist/web/routes/session-routes.d.ts +9 -0
- package/dist/web/routes/session-routes.d.ts.map +1 -0
- package/dist/web/routes/session-routes.js +729 -0
- package/dist/web/routes/session-routes.js.map +1 -0
- package/dist/web/routes/system-routes.d.ts +9 -0
- package/dist/web/routes/system-routes.d.ts.map +1 -0
- package/dist/web/routes/system-routes.js +678 -0
- package/dist/web/routes/system-routes.js.map +1 -0
- package/dist/web/routes/team-routes.d.ts +8 -0
- package/dist/web/routes/team-routes.d.ts.map +1 -0
- package/dist/web/routes/team-routes.js +14 -0
- package/dist/web/routes/team-routes.js.map +1 -0
- package/dist/web/schemas.d.ts +43 -3
- package/dist/web/schemas.d.ts.map +1 -1
- package/dist/web/schemas.js +6 -2
- package/dist/web/schemas.js.map +1 -1
- package/dist/web/server.d.ts +10 -9
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +342 -3829
- package/dist/web/server.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Respawn controller type definitions
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for the Respawn Controller
|
|
6
|
+
*
|
|
7
|
+
* The respawn controller keeps interactive sessions productive by
|
|
8
|
+
* automatically cycling through update prompts when Claude goes idle.
|
|
9
|
+
*/
|
|
10
|
+
export interface RespawnConfig {
|
|
11
|
+
/** How long to wait after seeing prompt before considering truly idle (ms) */
|
|
12
|
+
idleTimeoutMs: number;
|
|
13
|
+
/** The prompt to send for updating docs */
|
|
14
|
+
updatePrompt: string;
|
|
15
|
+
/** Delay between sending steps (ms) */
|
|
16
|
+
interStepDelayMs: number;
|
|
17
|
+
/** Whether to enable respawn loop */
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
/** Whether to send /clear after update prompt */
|
|
20
|
+
sendClear: boolean;
|
|
21
|
+
/** Whether to send /init after /clear */
|
|
22
|
+
sendInit: boolean;
|
|
23
|
+
/** Optional prompt to send if /init doesn't trigger work */
|
|
24
|
+
kickstartPrompt?: string;
|
|
25
|
+
/** Time to wait after completion message before confirming idle (ms) */
|
|
26
|
+
completionConfirmMs?: number;
|
|
27
|
+
/** Fallback timeout when no output received at all (ms) */
|
|
28
|
+
noOutputTimeoutMs?: number;
|
|
29
|
+
/** Whether to auto-accept plan mode prompts by pressing Enter (not questions) */
|
|
30
|
+
autoAcceptPrompts?: boolean;
|
|
31
|
+
/** Delay before auto-accepting plan mode prompts when no output and no completion message (ms) */
|
|
32
|
+
autoAcceptDelayMs?: number;
|
|
33
|
+
/** Whether AI idle check is enabled */
|
|
34
|
+
aiIdleCheckEnabled?: boolean;
|
|
35
|
+
/** Model to use for AI idle check */
|
|
36
|
+
aiIdleCheckModel?: string;
|
|
37
|
+
/** Maximum characters of terminal buffer for AI check */
|
|
38
|
+
aiIdleCheckMaxContext?: number;
|
|
39
|
+
/** Timeout for AI check in ms */
|
|
40
|
+
aiIdleCheckTimeoutMs?: number;
|
|
41
|
+
/** Cooldown after WORKING verdict in ms */
|
|
42
|
+
aiIdleCheckCooldownMs?: number;
|
|
43
|
+
/** Whether AI plan mode check is enabled for auto-accept */
|
|
44
|
+
aiPlanCheckEnabled?: boolean;
|
|
45
|
+
/** Model to use for AI plan mode check */
|
|
46
|
+
aiPlanCheckModel?: string;
|
|
47
|
+
/** Maximum characters of terminal buffer for plan check */
|
|
48
|
+
aiPlanCheckMaxContext?: number;
|
|
49
|
+
/** Timeout for AI plan check in ms */
|
|
50
|
+
aiPlanCheckTimeoutMs?: number;
|
|
51
|
+
/** Cooldown after NOT_PLAN_MODE verdict in ms */
|
|
52
|
+
aiPlanCheckCooldownMs?: number;
|
|
53
|
+
/** Whether to use adaptive timing based on historical patterns */
|
|
54
|
+
adaptiveTimingEnabled?: boolean;
|
|
55
|
+
/** Minimum value for adaptive completion confirm (ms) */
|
|
56
|
+
adaptiveMinConfirmMs?: number;
|
|
57
|
+
/** Maximum value for adaptive completion confirm (ms) */
|
|
58
|
+
adaptiveMaxConfirmMs?: number;
|
|
59
|
+
/** Whether to skip /clear when context is below threshold */
|
|
60
|
+
skipClearWhenLowContext?: boolean;
|
|
61
|
+
/** Token percentage threshold below which /clear is skipped (0-100) */
|
|
62
|
+
skipClearThresholdPercent?: number;
|
|
63
|
+
/** Whether to track and persist cycle metrics */
|
|
64
|
+
trackCycleMetrics?: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Outcome of a respawn cycle
|
|
68
|
+
*/
|
|
69
|
+
export type CycleOutcome = 'success' | 'stuck_recovery' | 'blocked' | 'error' | 'cancelled';
|
|
70
|
+
/**
|
|
71
|
+
* Metrics for a single respawn cycle.
|
|
72
|
+
* Persisted for post-mortem analysis of long-running loops.
|
|
73
|
+
*/
|
|
74
|
+
export interface RespawnCycleMetrics {
|
|
75
|
+
/** Unique cycle ID (session-id:cycle-number) */
|
|
76
|
+
cycleId: string;
|
|
77
|
+
/** Session ID this cycle belongs to */
|
|
78
|
+
sessionId: string;
|
|
79
|
+
/** Cycle number within the session */
|
|
80
|
+
cycleNumber: number;
|
|
81
|
+
/** Timestamp when cycle started */
|
|
82
|
+
startedAt: number;
|
|
83
|
+
/** Timestamp when cycle completed */
|
|
84
|
+
completedAt: number;
|
|
85
|
+
/** Total duration of cycle (ms) */
|
|
86
|
+
durationMs: number;
|
|
87
|
+
/** What triggered idle detection */
|
|
88
|
+
idleReason: string;
|
|
89
|
+
/** Time spent detecting idle (from start of watching to idle confirmed) */
|
|
90
|
+
idleDetectionMs: number;
|
|
91
|
+
/** Steps completed in this cycle */
|
|
92
|
+
stepsCompleted: string[];
|
|
93
|
+
/** Whether /clear was skipped (P2-002) */
|
|
94
|
+
clearSkipped: boolean;
|
|
95
|
+
/** Outcome of the cycle */
|
|
96
|
+
outcome: CycleOutcome;
|
|
97
|
+
/** Error message if outcome is 'error' */
|
|
98
|
+
errorMessage?: string;
|
|
99
|
+
/** Token count at start of cycle */
|
|
100
|
+
tokenCountAtStart?: number;
|
|
101
|
+
/** Token count at end of cycle */
|
|
102
|
+
tokenCountAtEnd?: number;
|
|
103
|
+
/** Completion confirm time used (may be adaptive) */
|
|
104
|
+
completionConfirmMsUsed: number;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Aggregate metrics across multiple cycles for health scoring.
|
|
108
|
+
*/
|
|
109
|
+
export interface RespawnAggregateMetrics {
|
|
110
|
+
/** Total cycles tracked */
|
|
111
|
+
totalCycles: number;
|
|
112
|
+
/** Successful cycles */
|
|
113
|
+
successfulCycles: number;
|
|
114
|
+
/** Cycles that required stuck-state recovery */
|
|
115
|
+
stuckRecoveryCycles: number;
|
|
116
|
+
/** Blocked cycles */
|
|
117
|
+
blockedCycles: number;
|
|
118
|
+
/** Error cycles */
|
|
119
|
+
errorCycles: number;
|
|
120
|
+
/** Average cycle duration (ms) */
|
|
121
|
+
avgCycleDurationMs: number;
|
|
122
|
+
/** Average idle detection time (ms) */
|
|
123
|
+
avgIdleDetectionMs: number;
|
|
124
|
+
/** 90th percentile cycle duration (ms) */
|
|
125
|
+
p90CycleDurationMs: number;
|
|
126
|
+
/** Success rate (0-100) */
|
|
127
|
+
successRate: number;
|
|
128
|
+
/** Last updated timestamp */
|
|
129
|
+
lastUpdatedAt: number;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Health status levels for the Ralph Loop system.
|
|
133
|
+
*/
|
|
134
|
+
export type HealthStatus = 'excellent' | 'good' | 'degraded' | 'critical';
|
|
135
|
+
/**
|
|
136
|
+
* Comprehensive health score for a Ralph Loop session.
|
|
137
|
+
* Aggregates multiple health signals into a single score.
|
|
138
|
+
*/
|
|
139
|
+
export interface RalphLoopHealthScore {
|
|
140
|
+
/** Overall health score (0-100) */
|
|
141
|
+
score: number;
|
|
142
|
+
/** Health status based on score thresholds */
|
|
143
|
+
status: HealthStatus;
|
|
144
|
+
/** Individual component scores (0-100 each) */
|
|
145
|
+
components: {
|
|
146
|
+
/** Based on recent cycle success rate */
|
|
147
|
+
cycleSuccess: number;
|
|
148
|
+
/** Based on circuit breaker state */
|
|
149
|
+
circuitBreaker: number;
|
|
150
|
+
/** Based on iteration stall metrics */
|
|
151
|
+
iterationProgress: number;
|
|
152
|
+
/** Based on AI checker error rate */
|
|
153
|
+
aiChecker: number;
|
|
154
|
+
/** Based on stuck-state recovery count */
|
|
155
|
+
stuckRecovery: number;
|
|
156
|
+
};
|
|
157
|
+
/** Human-readable summary of health */
|
|
158
|
+
summary: string;
|
|
159
|
+
/** Recommendations for improvement */
|
|
160
|
+
recommendations: string[];
|
|
161
|
+
/** Timestamp when score was calculated */
|
|
162
|
+
calculatedAt: number;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Historical timing data for adaptive adjustments.
|
|
166
|
+
*/
|
|
167
|
+
export interface TimingHistory {
|
|
168
|
+
/** Rolling window of recent idle detection durations (ms) */
|
|
169
|
+
recentIdleDetectionMs: number[];
|
|
170
|
+
/** Rolling window of recent cycle durations (ms) */
|
|
171
|
+
recentCycleDurationMs: number[];
|
|
172
|
+
/** Calculated adaptive completion confirm value (ms) */
|
|
173
|
+
adaptiveCompletionConfirmMs: number;
|
|
174
|
+
/** Number of samples in rolling windows */
|
|
175
|
+
sampleCount: number;
|
|
176
|
+
/** Maximum samples to keep */
|
|
177
|
+
maxSamples: number;
|
|
178
|
+
/** Last updated timestamp */
|
|
179
|
+
lastUpdatedAt: number;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Named respawn configuration preset for quick setup
|
|
183
|
+
*/
|
|
184
|
+
export interface RespawnPreset {
|
|
185
|
+
/** Unique preset identifier */
|
|
186
|
+
id: string;
|
|
187
|
+
/** User-friendly preset name */
|
|
188
|
+
name: string;
|
|
189
|
+
/** Description of when to use this preset */
|
|
190
|
+
description?: string;
|
|
191
|
+
/** The respawn configuration (without enabled flag) */
|
|
192
|
+
config: Omit<RespawnConfig, 'enabled'>;
|
|
193
|
+
/** Duration in minutes (optional default) */
|
|
194
|
+
durationMinutes?: number;
|
|
195
|
+
/** Whether this is a built-in preset */
|
|
196
|
+
builtIn?: boolean;
|
|
197
|
+
/** Timestamp when created */
|
|
198
|
+
createdAt: number;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Persisted respawn configuration for mux sessions.
|
|
202
|
+
* Subset of RespawnConfig that gets saved to disk.
|
|
203
|
+
*/
|
|
204
|
+
export interface PersistedRespawnConfig {
|
|
205
|
+
/** Whether respawn was enabled */
|
|
206
|
+
enabled: boolean;
|
|
207
|
+
/** How long to wait after seeing prompt before considering truly idle (ms) */
|
|
208
|
+
idleTimeoutMs: number;
|
|
209
|
+
/** The prompt to send for updating docs */
|
|
210
|
+
updatePrompt: string;
|
|
211
|
+
/** Delay between sending steps (ms) */
|
|
212
|
+
interStepDelayMs: number;
|
|
213
|
+
/** Whether to send /clear after update prompt */
|
|
214
|
+
sendClear: boolean;
|
|
215
|
+
/** Whether to send /init after /clear */
|
|
216
|
+
sendInit: boolean;
|
|
217
|
+
/** Optional prompt to send if /init doesn't trigger work */
|
|
218
|
+
kickstartPrompt?: string;
|
|
219
|
+
/** Whether to auto-accept plan mode prompts by pressing Enter (not questions) */
|
|
220
|
+
autoAcceptPrompts?: boolean;
|
|
221
|
+
/** Delay before auto-accepting prompts (ms) */
|
|
222
|
+
autoAcceptDelayMs?: number;
|
|
223
|
+
/** Time to wait after completion message before confirming idle (ms) */
|
|
224
|
+
completionConfirmMs?: number;
|
|
225
|
+
/** Fallback timeout when no output received at all (ms) */
|
|
226
|
+
noOutputTimeoutMs?: number;
|
|
227
|
+
/** Whether AI idle check is enabled */
|
|
228
|
+
aiIdleCheckEnabled?: boolean;
|
|
229
|
+
/** Model to use for AI idle check */
|
|
230
|
+
aiIdleCheckModel?: string;
|
|
231
|
+
/** Maximum characters of terminal buffer for AI check */
|
|
232
|
+
aiIdleCheckMaxContext?: number;
|
|
233
|
+
/** Timeout for AI check in ms */
|
|
234
|
+
aiIdleCheckTimeoutMs?: number;
|
|
235
|
+
/** Cooldown after WORKING verdict in ms */
|
|
236
|
+
aiIdleCheckCooldownMs?: number;
|
|
237
|
+
/** Whether AI plan mode check is enabled for auto-accept */
|
|
238
|
+
aiPlanCheckEnabled?: boolean;
|
|
239
|
+
/** Model to use for AI plan mode check */
|
|
240
|
+
aiPlanCheckModel?: string;
|
|
241
|
+
/** Maximum characters of terminal buffer for plan check */
|
|
242
|
+
aiPlanCheckMaxContext?: number;
|
|
243
|
+
/** Timeout for AI plan check in ms */
|
|
244
|
+
aiPlanCheckTimeoutMs?: number;
|
|
245
|
+
/** Cooldown after NOT_PLAN_MODE verdict in ms */
|
|
246
|
+
aiPlanCheckCooldownMs?: number;
|
|
247
|
+
/** Duration in minutes if timed respawn was set */
|
|
248
|
+
durationMinutes?: number;
|
|
249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AAM,CAAC;IAC3B,uCAAuC;IACvC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yDAAyD;IACzD,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iCAAiC;IACjC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,2CAA2C;IAC3C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,4DAA4D;IAC5D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2DAA2D;IAC3D,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,sCAAsC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iDAAiD;IACjD,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"respawn.js","sourceRoot":"","sources":["../../src/types/respawn.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Run summary type definitions
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Types of events tracked in the run summary.
|
|
6
|
+
* These provide a historical view of what happened during a session.
|
|
7
|
+
*/
|
|
8
|
+
export type RunSummaryEventType = 'session_started' | 'session_stopped' | 'respawn_cycle_started' | 'respawn_cycle_completed' | 'respawn_state_change' | 'error' | 'warning' | 'token_milestone' | 'auto_compact' | 'auto_clear' | 'idle_detected' | 'working_detected' | 'ralph_completion' | 'ai_check_result' | 'hook_event' | 'state_stuck';
|
|
9
|
+
/**
|
|
10
|
+
* Severity levels for run summary events.
|
|
11
|
+
*/
|
|
12
|
+
export type RunSummaryEventSeverity = 'info' | 'warning' | 'error' | 'success';
|
|
13
|
+
/**
|
|
14
|
+
* A single event in the run summary timeline.
|
|
15
|
+
*/
|
|
16
|
+
export interface RunSummaryEvent {
|
|
17
|
+
/** Unique event identifier */
|
|
18
|
+
id: string;
|
|
19
|
+
/** Timestamp when event occurred */
|
|
20
|
+
timestamp: number;
|
|
21
|
+
/** Type of event */
|
|
22
|
+
type: RunSummaryEventType;
|
|
23
|
+
/** Severity level for display */
|
|
24
|
+
severity: RunSummaryEventSeverity;
|
|
25
|
+
/** Short title for the event */
|
|
26
|
+
title: string;
|
|
27
|
+
/** Optional detailed description */
|
|
28
|
+
details?: string;
|
|
29
|
+
/** Optional additional metadata */
|
|
30
|
+
metadata?: Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Statistics aggregated from run summary events.
|
|
34
|
+
*/
|
|
35
|
+
export interface RunSummaryStats {
|
|
36
|
+
/** Number of respawn cycles completed */
|
|
37
|
+
totalRespawnCycles: number;
|
|
38
|
+
/** Total tokens used during this run */
|
|
39
|
+
totalTokensUsed: number;
|
|
40
|
+
/** Peak token count observed */
|
|
41
|
+
peakTokens: number;
|
|
42
|
+
/** Total time Claude was actively working (ms) */
|
|
43
|
+
totalTimeActiveMs: number;
|
|
44
|
+
/** Total time Claude was idle (ms) */
|
|
45
|
+
totalTimeIdleMs: number;
|
|
46
|
+
/** Number of errors encountered */
|
|
47
|
+
errorCount: number;
|
|
48
|
+
/** Number of warnings encountered */
|
|
49
|
+
warningCount: number;
|
|
50
|
+
/** Number of AI idle checks performed */
|
|
51
|
+
aiCheckCount: number;
|
|
52
|
+
/** Timestamp when last became idle */
|
|
53
|
+
lastIdleAt: number | null;
|
|
54
|
+
/** Timestamp when last started working */
|
|
55
|
+
lastWorkingAt: number | null;
|
|
56
|
+
/** Total number of state transitions */
|
|
57
|
+
stateTransitions: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Complete run summary for a session.
|
|
61
|
+
* Provides a historical view of session activity for users returning after absence.
|
|
62
|
+
*/
|
|
63
|
+
export interface RunSummary {
|
|
64
|
+
/** Session ID this summary belongs to */
|
|
65
|
+
sessionId: string;
|
|
66
|
+
/** Session display name */
|
|
67
|
+
sessionName: string;
|
|
68
|
+
/** Timestamp when tracking started */
|
|
69
|
+
startedAt: number;
|
|
70
|
+
/** Timestamp of last update */
|
|
71
|
+
lastUpdatedAt: number;
|
|
72
|
+
/** Timeline of events (most recent last) */
|
|
73
|
+
events: RunSummaryEvent[];
|
|
74
|
+
/** Aggregated statistics */
|
|
75
|
+
stats: RunSummaryStats;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Creates initial run summary stats.
|
|
79
|
+
*/
|
|
80
|
+
export declare function createInitialRunSummaryStats(): RunSummaryStats;
|
|
81
|
+
//# sourceMappingURL=run-summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-summary.d.ts","sourceRoot":"","sources":["../../src/types/run-summary.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAC3B,iBAAiB,GACjB,iBAAiB,GACjB,uBAAuB,GACvB,yBAAyB,GACzB,sBAAsB,GACtB,OAAO,GACP,SAAS,GACT,iBAAiB,GACjB,cAAc,GACd,YAAY,GACZ,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,iBAAiB,GACjB,YAAY,GACZ,aAAa,CAAC;AAElB;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,IAAI,EAAE,mBAAmB,CAAC;IAC1B,iCAAiC;IACjC,QAAQ,EAAE,uBAAuB,CAAC;IAClC,gCAAgC;IAChC,KAA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stats.
|
|
6
|
+
*/
|
|
7
|
+
export function createInitialRunSummaryStats() {
|
|
8
|
+
return {
|
|
9
|
+
totalRespawnCycles: 0,
|
|
10
|
+
totalTokensUsed: 0,
|
|
11
|
+
peakTokens: 0,
|
|
12
|
+
totalTimeActiveMs: 0,
|
|
13
|
+
totalTimeIdleMs: 0,
|
|
14
|
+
errorCount: 0,
|
|
15
|
+
warningCount: 0,
|
|
16
|
+
aiCheckCount: 0,
|
|
17
|
+
lastIdleAt: null,
|
|
18
|
+
lastWorkingAt: null,
|
|
19
|
+
stateTransitions: 0,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=run-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-summary.js","sourceRoot":"","sources":["../../src/types/run-summary.ts"],"names":[],"mappings":"AAAA;;GAEG;AAgGH;;GAEG;AACH,MAAM,UAAU,4BAA4B;IAC1C,OAAO;QACL,kBAAkB,EAAE,CAAC;QACrB,eAAe,EAAE,CAAC;QAClB,UAAU,EAAE,CAAC;QACb,iBAAiB,EAAE,CAAC;QACpB,eAAe,EAAE,CAAC;QAClB,UAAU,EAAE,CAAC;QACb,YAAY,EAAE,CAAC;QACf,YAAY,EAAE,CAAC;QACf,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE,IAAI;QACnB,gBAAgB,EAAE,CAAC;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Session type definitions
|
|
3
|
+
*/
|
|
4
|
+
import type { RespawnConfig } from './respawn.js';
|
|
5
|
+
/** Status of a Claude session */
|
|
6
|
+
export type SessionStatus = 'idle' | 'busy' | 'stopped' | 'error';
|
|
7
|
+
/**
|
|
8
|
+
* Claude CLI startup permission mode.
|
|
9
|
+
* - `'dangerously-skip-permissions'`: Bypass all permission prompts (default)
|
|
10
|
+
* - `'normal'`: Standard mode with permission prompts
|
|
11
|
+
* - `'allowedTools'`: Only allow specific tools (requires allowedTools list)
|
|
12
|
+
*/
|
|
13
|
+
export type ClaudeMode = 'dangerously-skip-permissions' | 'normal' | 'allowedTools';
|
|
14
|
+
/** Session mode: which CLI backend a session runs */
|
|
15
|
+
export type SessionMode = 'claude' | 'shell' | 'opencode';
|
|
16
|
+
/** OpenCode session configuration */
|
|
17
|
+
export interface OpenCodeConfig {
|
|
18
|
+
/** Model identifier (e.g., "anthropic/claude-sonnet-4-5", "openai/gpt-5.2", "ollama/codellama") */
|
|
19
|
+
model?: string;
|
|
20
|
+
/** Whether to auto-allow all tool executions (sets permission.* = allow) */
|
|
21
|
+
autoAllowTools?: boolean;
|
|
22
|
+
/** Session ID to continue from */
|
|
23
|
+
continueSession?: string;
|
|
24
|
+
/** Whether to fork when continuing (branch the conversation) */
|
|
25
|
+
forkSession?: boolean;
|
|
26
|
+
/** Custom inline config JSON (passed via OPENCODE_CONFIG_CONTENT) */
|
|
27
|
+
configContent?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Configuration for creating a new session
|
|
31
|
+
*/
|
|
32
|
+
export interface SessionConfig {
|
|
33
|
+
/** Unique session identifier */
|
|
34
|
+
id: string;
|
|
35
|
+
/** Working directory for the session */
|
|
36
|
+
workingDir: string;
|
|
37
|
+
/** Timestamp when session was created */
|
|
38
|
+
createdAt: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Available session colors for visual differentiation
|
|
42
|
+
*/
|
|
43
|
+
export type SessionColor = 'default' | 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink';
|
|
44
|
+
/**
|
|
45
|
+
* Current state of a session
|
|
46
|
+
*/
|
|
47
|
+
export interface SessionState {
|
|
48
|
+
/** Unique session identifier */
|
|
49
|
+
id: string;
|
|
50
|
+
/** Process ID of the PTY process, null if not running */
|
|
51
|
+
pid: number | null;
|
|
52
|
+
/** Current session status */
|
|
53
|
+
status: SessionStatus;
|
|
54
|
+
/** Working directory path */
|
|
55
|
+
workingDir: string;
|
|
56
|
+
/** ID of currently assigned task, null if none */
|
|
57
|
+
currentTaskId: string | null;
|
|
58
|
+
/** Timestamp when session was created */
|
|
59
|
+
createdAt: number;
|
|
60
|
+
/** Timestamp of last activity */
|
|
61
|
+
lastActivityAt: number;
|
|
62
|
+
/** Session display name */
|
|
63
|
+
name?: string;
|
|
64
|
+
/** Session mode */
|
|
65
|
+
mode?: SessionMode;
|
|
66
|
+
/** Auto-clear enabled */
|
|
67
|
+
autoClearEnabled?: boolean;
|
|
68
|
+
/** Auto-clear token threshold */
|
|
69
|
+
autoClearThreshold?: number;
|
|
70
|
+
/** Auto-compact enabled */
|
|
71
|
+
autoCompactEnabled?: boolean;
|
|
72
|
+
/** Auto-compact token threshold */
|
|
73
|
+
autoCompactThreshold?: number;
|
|
74
|
+
/** Auto-compact prompt */
|
|
75
|
+
autoCompactPrompt?: string;
|
|
76
|
+
/** Image watcher enabled for this session */
|
|
77
|
+
imageWatcherEnabled?: boolean;
|
|
78
|
+
/** Total cost in USD */
|
|
79
|
+
totalCost?: number;
|
|
80
|
+
/** Input tokens used */
|
|
81
|
+
inputTokens?: number;
|
|
82
|
+
/** Output tokens used */
|
|
83
|
+
outputTokens?: number;
|
|
84
|
+
/** Whether respawn controller is currently enabled/running */
|
|
85
|
+
respawnEnabled?: boolean;
|
|
86
|
+
/** Respawn controller config (if enabled) */
|
|
87
|
+
respawnConfig?: RespawnConfig & {
|
|
88
|
+
durationMinutes?: number;
|
|
89
|
+
};
|
|
90
|
+
/** Ralph / Todo tracker enabled */
|
|
91
|
+
ralphEnabled?: boolean;
|
|
92
|
+
/** Ralph auto-enable disabled (user explicitly turned off Ralph) */
|
|
93
|
+
ralphAutoEnableDisabled?: boolean;
|
|
94
|
+
/** Ralph completion phrase (if set) */
|
|
95
|
+
ralphCompletionPhrase?: string;
|
|
96
|
+
/** Parent agent ID if this session is a spawned agent */
|
|
97
|
+
parentAgentId?: string;
|
|
98
|
+
/** Child agent IDs spawned by this session */
|
|
99
|
+
childAgentIds?: string[];
|
|
100
|
+
/** Nice priority enabled */
|
|
101
|
+
niceEnabled?: boolean;
|
|
102
|
+
/** Nice value (-20 to 19) */
|
|
103
|
+
niceValue?: number;
|
|
104
|
+
/** User-assigned color for visual differentiation */
|
|
105
|
+
color?: SessionColor;
|
|
106
|
+
/** Flicker filter enabled (buffers output after screen clears) */
|
|
107
|
+
flickerFilterEnabled?: boolean;
|
|
108
|
+
/** Claude Code CLI version (parsed from terminal, e.g., "2.1.27") */
|
|
109
|
+
cliVersion?: string;
|
|
110
|
+
/** Claude model in use (parsed from terminal, e.g., "Opus 4.5") */
|
|
111
|
+
cliModel?: string;
|
|
112
|
+
/** Account type (parsed from terminal, e.g., "Claude Max", "API") */
|
|
113
|
+
cliAccountType?: string;
|
|
114
|
+
/** Latest CLI version available (parsed from version check) */
|
|
115
|
+
cliLatestVersion?: string;
|
|
116
|
+
/** OpenCode-specific configuration (only for mode === 'opencode') */
|
|
117
|
+
openCodeConfig?: OpenCodeConfig;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Output captured from a session
|
|
121
|
+
*/
|
|
122
|
+
export interface SessionOutput {
|
|
123
|
+
/** Standard output content */
|
|
124
|
+
stdout: string;
|
|
125
|
+
/** Standard error content */
|
|
126
|
+
stderr: string;
|
|
127
|
+
/** Exit code of the process, null if still running */
|
|
128
|
+
exitCode: number | null;
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,iCAAiC;AACjC,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAElE;;;;;GAKG;AACH,MAAM,MAAM,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AAC,EAAE,MAAM,CAAC;IACxB,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qEAAqE;IACrE,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Task queue type definitions
|
|
3
|
+
*/
|
|
4
|
+
/** Status of a task in the queue */
|
|
5
|
+
export type TaskStatus = 'pending' | 'running' | 'completed' | 'failed';
|
|
6
|
+
/**
|
|
7
|
+
* Definition of a task to be executed
|
|
8
|
+
*/
|
|
9
|
+
export interface TaskDefinition {
|
|
10
|
+
/** Unique task identifier */
|
|
11
|
+
id: string;
|
|
12
|
+
/** Prompt to send to Claude */
|
|
13
|
+
prompt: string;
|
|
14
|
+
/** Working directory for task execution */
|
|
15
|
+
workingDir: string;
|
|
16
|
+
/** Priority level (higher = processed first) */
|
|
17
|
+
priority: number;
|
|
18
|
+
/** IDs of tasks that must complete first */
|
|
19
|
+
dependencies: string[];
|
|
20
|
+
/** Custom phrase to detect task completion */
|
|
21
|
+
completionPhrase?: string;
|
|
22
|
+
/** Timeout in milliseconds */
|
|
23
|
+
timeoutMs?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Full state of a task including execution details
|
|
27
|
+
*/
|
|
28
|
+
export interface TaskState {
|
|
29
|
+
/** Unique task identifier */
|
|
30
|
+
id: string;
|
|
31
|
+
/** Prompt sent to Claude */
|
|
32
|
+
prompt: string;
|
|
33
|
+
/** Working directory for task execution */
|
|
34
|
+
workingDir: string;
|
|
35
|
+
/** Priority level (higher = processed first) */
|
|
36
|
+
priority: number;
|
|
37
|
+
/** IDs of tasks that must complete first */
|
|
38
|
+
dependencies: string[];
|
|
39
|
+
/** Custom phrase to detect task completion */
|
|
40
|
+
completionPhrase?: string;
|
|
41
|
+
/** Timeout in milliseconds */
|
|
42
|
+
timeoutMs?: number;
|
|
43
|
+
/** Current task status */
|
|
44
|
+
status: TaskStatus;
|
|
45
|
+
/** ID of session running this task, null if not assigned */
|
|
46
|
+
assignedSessionId: string | null;
|
|
47
|
+
/** Timestamp when task was created */
|
|
48
|
+
createdAt: number;
|
|
49
|
+
/** Timestamp when task started executing */
|
|
50
|
+
startedAt: number | null;
|
|
51
|
+
/** Timestamp when task completed */
|
|
52
|
+
completedAt: number | null;
|
|
53
|
+
/** Captured output from Claude */
|
|
54
|
+
output: string;
|
|
55
|
+
/** Error message if task failed */
|
|
56
|
+
error: string | null;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=task.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../src/types/task.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,oCAAoC;AACpC,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,6BAA6B;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,6BAA6B;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,MAAM,EAAE,UAAU,CAAC;IACnB,4DAA4D;IAC5D,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,oCAAoC;IACpC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task.js","sourceRoot":"","sources":["../../src/types/task.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Agent Teams type definitions
|
|
3
|
+
*/
|
|
4
|
+
/** Team configuration from ~/.claude/teams/{name}/config.json */
|
|
5
|
+
export interface TeamConfig {
|
|
6
|
+
name: string;
|
|
7
|
+
leadSessionId: string;
|
|
8
|
+
members: TeamMember[];
|
|
9
|
+
}
|
|
10
|
+
/** A single team member (lead or teammate) */
|
|
11
|
+
export interface TeamMember {
|
|
12
|
+
agentId: string;
|
|
13
|
+
name: string;
|
|
14
|
+
agentType: 'team-lead' | 'general-purpose' | string;
|
|
15
|
+
color?: string;
|
|
16
|
+
backendType?: string;
|
|
17
|
+
prompt?: string;
|
|
18
|
+
tmuxPaneId?: string;
|
|
19
|
+
}
|
|
20
|
+
/** A task from ~/.claude/tasks/{team-name}/{N}.json */
|
|
21
|
+
export interface TeamTask {
|
|
22
|
+
id: string;
|
|
23
|
+
subject: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
activeForm?: string;
|
|
26
|
+
status: 'pending' | 'in_progress' | 'completed' | string;
|
|
27
|
+
blocks: string[];
|
|
28
|
+
blockedBy: string[];
|
|
29
|
+
owner?: string;
|
|
30
|
+
metadata?: Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
/** An inbox message from ~/.claude/teams/{name}/inboxes/{member}.json */
|
|
33
|
+
export interface InboxMessage {
|
|
34
|
+
from: string;
|
|
35
|
+
text: string;
|
|
36
|
+
timestamp: string;
|
|
37
|
+
read?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Information about a tmux pane within a session.
|
|
41
|
+
* Used for agent team teammate pane management.
|
|
42
|
+
*/
|
|
43
|
+
export interface PaneInfo {
|
|
44
|
+
/** Pane ID (e.g., "%0", "%1") — immutable within a tmux session */
|
|
45
|
+
paneId: string;
|
|
46
|
+
/** Pane index within the window (0, 1, 2...) */
|
|
47
|
+
paneIndex: number;
|
|
48
|
+
/** PID of the process running in the pane */
|
|
49
|
+
panePid: number;
|
|
50
|
+
/** Pane width in columns */
|
|
51
|
+
width: number;
|
|
52
|
+
/** Pane height in rows */
|
|
53
|
+
height: number;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=teams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["../../src/types/teams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,iEAAiE;AACjE,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IAC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