aicodeman 0.2.8
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/LICENSE +21 -0
- package/README.md +403 -0
- package/dist/ai-checker-base.d.ts +175 -0
- package/dist/ai-checker-base.d.ts.map +1 -0
- package/dist/ai-checker-base.js +424 -0
- package/dist/ai-checker-base.js.map +1 -0
- package/dist/ai-idle-checker.d.ts +53 -0
- package/dist/ai-idle-checker.d.ts.map +1 -0
- package/dist/ai-idle-checker.js +141 -0
- package/dist/ai-idle-checker.js.map +1 -0
- package/dist/ai-plan-checker.d.ts +52 -0
- package/dist/ai-plan-checker.d.ts.map +1 -0
- package/dist/ai-plan-checker.js +103 -0
- package/dist/ai-plan-checker.js.map +1 -0
- package/dist/bash-tool-parser.d.ts +191 -0
- package/dist/bash-tool-parser.d.ts.map +1 -0
- package/dist/bash-tool-parser.js +598 -0
- package/dist/bash-tool-parser.js.map +1 -0
- package/dist/cli.d.ts +12 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +460 -0
- package/dist/cli.js.map +1 -0
- package/dist/config/buffer-limits.d.ts +59 -0
- package/dist/config/buffer-limits.d.ts.map +1 -0
- package/dist/config/buffer-limits.js +74 -0
- package/dist/config/buffer-limits.js.map +1 -0
- package/dist/config/map-limits.d.ts +40 -0
- package/dist/config/map-limits.d.ts.map +1 -0
- package/dist/config/map-limits.js +52 -0
- package/dist/config/map-limits.js.map +1 -0
- package/dist/file-stream-manager.d.ts +148 -0
- package/dist/file-stream-manager.d.ts.map +1 -0
- package/dist/file-stream-manager.js +351 -0
- package/dist/file-stream-manager.js.map +1 -0
- package/dist/hooks-config.d.ts +31 -0
- package/dist/hooks-config.d.ts.map +1 -0
- package/dist/hooks-config.js +115 -0
- package/dist/hooks-config.js.map +1 -0
- package/dist/image-watcher.d.ts +86 -0
- package/dist/image-watcher.d.ts.map +1 -0
- package/dist/image-watcher.js +275 -0
- package/dist/image-watcher.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -0
- package/dist/mux-factory.d.ts +13 -0
- package/dist/mux-factory.d.ts.map +1 -0
- package/dist/mux-factory.js +19 -0
- package/dist/mux-factory.js.map +1 -0
- package/dist/mux-interface.d.ts +145 -0
- package/dist/mux-interface.d.ts.map +1 -0
- package/dist/mux-interface.js +9 -0
- package/dist/mux-interface.js.map +1 -0
- package/dist/plan-orchestrator.d.ts +123 -0
- package/dist/plan-orchestrator.d.ts.map +1 -0
- package/dist/plan-orchestrator.js +500 -0
- package/dist/plan-orchestrator.js.map +1 -0
- package/dist/prompts/index.d.ts +9 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +9 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/planner.d.ts +14 -0
- package/dist/prompts/planner.d.ts.map +1 -0
- package/dist/prompts/planner.js +83 -0
- package/dist/prompts/planner.js.map +1 -0
- package/dist/prompts/research-agent.d.ts +10 -0
- package/dist/prompts/research-agent.d.ts.map +1 -0
- package/dist/prompts/research-agent.js +143 -0
- package/dist/prompts/research-agent.js.map +1 -0
- package/dist/push-store.d.ts +41 -0
- package/dist/push-store.d.ts.map +1 -0
- package/dist/push-store.js +168 -0
- package/dist/push-store.js.map +1 -0
- package/dist/ralph-config.d.ts +67 -0
- package/dist/ralph-config.d.ts.map +1 -0
- package/dist/ralph-config.js +134 -0
- package/dist/ralph-config.js.map +1 -0
- package/dist/ralph-loop.d.ts +124 -0
- package/dist/ralph-loop.d.ts.map +1 -0
- package/dist/ralph-loop.js +418 -0
- package/dist/ralph-loop.js.map +1 -0
- package/dist/ralph-tracker.d.ts +1081 -0
- package/dist/ralph-tracker.d.ts.map +1 -0
- package/dist/ralph-tracker.js +3343 -0
- package/dist/ralph-tracker.js.map +1 -0
- package/dist/respawn-controller.d.ts +1182 -0
- package/dist/respawn-controller.d.ts.map +1 -0
- package/dist/respawn-controller.js +2754 -0
- package/dist/respawn-controller.js.map +1 -0
- package/dist/run-summary.d.ts +123 -0
- package/dist/run-summary.d.ts.map +1 -0
- package/dist/run-summary.js +325 -0
- package/dist/run-summary.js.map +1 -0
- package/dist/session-lifecycle-log.d.ts +36 -0
- package/dist/session-lifecycle-log.d.ts.map +1 -0
- package/dist/session-lifecycle-log.js +101 -0
- package/dist/session-lifecycle-log.js.map +1 -0
- package/dist/session-manager.d.ts +97 -0
- package/dist/session-manager.d.ts.map +1 -0
- package/dist/session-manager.js +224 -0
- package/dist/session-manager.js.map +1 -0
- package/dist/session.d.ts +686 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +2025 -0
- package/dist/session.js.map +1 -0
- package/dist/state-store.d.ts +189 -0
- package/dist/state-store.d.ts.map +1 -0
- package/dist/state-store.js +730 -0
- package/dist/state-store.js.map +1 -0
- package/dist/subagent-watcher.d.ts +345 -0
- package/dist/subagent-watcher.d.ts.map +1 -0
- package/dist/subagent-watcher.js +1469 -0
- package/dist/subagent-watcher.js.map +1 -0
- package/dist/task-queue.d.ts +108 -0
- package/dist/task-queue.d.ts.map +1 -0
- package/dist/task-queue.js +235 -0
- package/dist/task-queue.js.map +1 -0
- package/dist/task-tracker.d.ts +306 -0
- package/dist/task-tracker.d.ts.map +1 -0
- package/dist/task-tracker.js +488 -0
- package/dist/task-tracker.js.map +1 -0
- package/dist/task.d.ts +73 -0
- package/dist/task.d.ts.map +1 -0
- package/dist/task.js +177 -0
- package/dist/task.js.map +1 -0
- package/dist/team-watcher.d.ts +53 -0
- package/dist/team-watcher.d.ts.map +1 -0
- package/dist/team-watcher.js +313 -0
- package/dist/team-watcher.js.map +1 -0
- package/dist/templates/case-template.md +461 -0
- package/dist/templates/claude-md.d.ts +26 -0
- package/dist/templates/claude-md.d.ts.map +1 -0
- package/dist/templates/claude-md.js +74 -0
- package/dist/templates/claude-md.js.map +1 -0
- package/dist/tmux-manager.d.ts +181 -0
- package/dist/tmux-manager.d.ts.map +1 -0
- package/dist/tmux-manager.js +1405 -0
- package/dist/tmux-manager.js.map +1 -0
- package/dist/transcript-watcher.d.ts +110 -0
- package/dist/transcript-watcher.d.ts.map +1 -0
- package/dist/transcript-watcher.js +338 -0
- package/dist/transcript-watcher.js.map +1 -0
- package/dist/tunnel-manager.d.ts +54 -0
- package/dist/tunnel-manager.d.ts.map +1 -0
- package/dist/tunnel-manager.js +251 -0
- package/dist/tunnel-manager.js.map +1 -0
- package/dist/types.d.ts +1139 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +215 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/buffer-accumulator.d.ts +111 -0
- package/dist/utils/buffer-accumulator.d.ts.map +1 -0
- package/dist/utils/buffer-accumulator.js +172 -0
- package/dist/utils/buffer-accumulator.js.map +1 -0
- package/dist/utils/claude-cli-resolver.d.ts +26 -0
- package/dist/utils/claude-cli-resolver.d.ts.map +1 -0
- package/dist/utils/claude-cli-resolver.js +78 -0
- package/dist/utils/claude-cli-resolver.js.map +1 -0
- package/dist/utils/cleanup-manager.d.ts +165 -0
- package/dist/utils/cleanup-manager.d.ts.map +1 -0
- package/dist/utils/cleanup-manager.js +274 -0
- package/dist/utils/cleanup-manager.js.map +1 -0
- package/dist/utils/index.d.ts +19 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +19 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/lru-map.d.ts +140 -0
- package/dist/utils/lru-map.d.ts.map +1 -0
- package/dist/utils/lru-map.js +234 -0
- package/dist/utils/lru-map.js.map +1 -0
- package/dist/utils/nice-wrapper.d.ts +13 -0
- package/dist/utils/nice-wrapper.d.ts.map +1 -0
- package/dist/utils/nice-wrapper.js +17 -0
- package/dist/utils/nice-wrapper.js.map +1 -0
- package/dist/utils/opencode-cli-resolver.d.ts +21 -0
- package/dist/utils/opencode-cli-resolver.d.ts.map +1 -0
- package/dist/utils/opencode-cli-resolver.js +67 -0
- package/dist/utils/opencode-cli-resolver.js.map +1 -0
- package/dist/utils/regex-patterns.d.ts +64 -0
- package/dist/utils/regex-patterns.d.ts.map +1 -0
- package/dist/utils/regex-patterns.js +74 -0
- package/dist/utils/regex-patterns.js.map +1 -0
- package/dist/utils/stale-expiration-map.d.ts +159 -0
- package/dist/utils/stale-expiration-map.d.ts.map +1 -0
- package/dist/utils/stale-expiration-map.js +277 -0
- package/dist/utils/stale-expiration-map.js.map +1 -0
- package/dist/utils/string-similarity.d.ts +108 -0
- package/dist/utils/string-similarity.d.ts.map +1 -0
- package/dist/utils/string-similarity.js +189 -0
- package/dist/utils/string-similarity.js.map +1 -0
- package/dist/utils/token-validation.d.ts +39 -0
- package/dist/utils/token-validation.d.ts.map +1 -0
- package/dist/utils/token-validation.js +59 -0
- package/dist/utils/token-validation.js.map +1 -0
- package/dist/utils/type-safety.d.ts +33 -0
- package/dist/utils/type-safety.d.ts.map +1 -0
- package/dist/utils/type-safety.js +35 -0
- package/dist/utils/type-safety.js.map +1 -0
- package/dist/web/public/app.js +491 -0
- package/dist/web/public/app.js.br +0 -0
- package/dist/web/public/app.js.gz +0 -0
- package/dist/web/public/index.html +1675 -0
- package/dist/web/public/index.html.br +0 -0
- package/dist/web/public/index.html.gz +0 -0
- package/dist/web/public/manifest.json +8 -0
- package/dist/web/public/mobile.css +1 -0
- package/dist/web/public/mobile.css.br +0 -0
- package/dist/web/public/mobile.css.gz +0 -0
- package/dist/web/public/ralph-wizard.js +1037 -0
- 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 +1 -0
- package/dist/web/public/styles.css.br +0 -0
- package/dist/web/public/styles.css.gz +0 -0
- package/dist/web/public/sw.js +67 -0
- package/dist/web/public/sw.js.br +0 -0
- package/dist/web/public/sw.js.gz +0 -0
- package/dist/web/public/upload.html +155 -0
- package/dist/web/public/upload.html.br +0 -0
- package/dist/web/public/upload.html.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-fit.min.js +1 -0
- package/dist/web/public/vendor/xterm-addon-fit.min.js.br +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 +1 -0
- package/dist/web/public/vendor/xterm-addon-unicode11.min.js.br +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 +2 -0
- package/dist/web/public/vendor/xterm-addon-webgl.min.js.br +0 -0
- package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm.css +209 -0
- package/dist/web/public/vendor/xterm.css.br +0 -0
- package/dist/web/public/vendor/xterm.css.gz +0 -0
- package/dist/web/public/vendor/xterm.min.js +9 -0
- package/dist/web/public/vendor/xterm.min.js.br +0 -0
- package/dist/web/public/vendor/xterm.min.js.gz +0 -0
- package/dist/web/schemas.d.ts +479 -0
- package/dist/web/schemas.d.ts.map +1 -0
- package/dist/web/schemas.js +448 -0
- package/dist/web/schemas.js.map +1 -0
- package/dist/web/server.d.ts +207 -0
- package/dist/web/server.d.ts.map +1 -0
- package/dist/web/server.js +5784 -0
- package/dist/web/server.js.map +1 -0
- package/package.json +110 -0
- package/scripts/postinstall.js +390 -0
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Bash Tool Parser - Detects active Bash tool commands with file paths
|
|
3
|
+
*
|
|
4
|
+
* This module parses terminal output from Claude Code sessions to detect:
|
|
5
|
+
* - Bash tool invocations (● Bash(command) pattern)
|
|
6
|
+
* - File paths within commands (for tail, cat, head, grep, watch, less)
|
|
7
|
+
* - Tool completion (✓ or ✗ status)
|
|
8
|
+
*
|
|
9
|
+
* When a file-viewing command is detected, emits events with clickable paths
|
|
10
|
+
* that can be used to open live log viewer windows.
|
|
11
|
+
*
|
|
12
|
+
* @module bash-tool-parser
|
|
13
|
+
*/
|
|
14
|
+
import { EventEmitter } from 'node:events';
|
|
15
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
16
|
+
// ========== Configuration Constants ==========
|
|
17
|
+
/**
|
|
18
|
+
* Maximum number of active tools to track per session.
|
|
19
|
+
* Older tools are removed when this limit is reached.
|
|
20
|
+
*/
|
|
21
|
+
const MAX_ACTIVE_TOOLS = 20;
|
|
22
|
+
/**
|
|
23
|
+
* Debounce interval for event emissions (milliseconds).
|
|
24
|
+
* Prevents UI jitter from rapid consecutive updates.
|
|
25
|
+
*/
|
|
26
|
+
const EVENT_DEBOUNCE_MS = 50;
|
|
27
|
+
/**
|
|
28
|
+
* Maximum line buffer size to prevent unbounded growth from long lines.
|
|
29
|
+
*/
|
|
30
|
+
const MAX_LINE_BUFFER_SIZE = 64 * 1024;
|
|
31
|
+
// ========== Pre-compiled Regex Patterns ==========
|
|
32
|
+
/**
|
|
33
|
+
* Matches Bash tool invocation line from Claude Code output.
|
|
34
|
+
* Pattern: ● Bash(command) or ● Bash(command) timeout: 5m 0s
|
|
35
|
+
* The tool name can appear with or without the bullet point.
|
|
36
|
+
*
|
|
37
|
+
* Capture groups:
|
|
38
|
+
* - 1: The command being executed
|
|
39
|
+
* - 2: Optional timeout string
|
|
40
|
+
*/
|
|
41
|
+
const BASH_TOOL_START_PATTERN = /(?:^|\s)●?\s*Bash\((.+?)\)(?:\s+timeout:\s*([^\n]+))?/;
|
|
42
|
+
/**
|
|
43
|
+
* Matches tool completion indicators.
|
|
44
|
+
* ✓ indicates success, ✗ indicates failure.
|
|
45
|
+
*/
|
|
46
|
+
const TOOL_COMPLETION_PATTERN = /(?:✓|✗)\s+Bash/;
|
|
47
|
+
/**
|
|
48
|
+
* Commands that view/stream file content (worth tracking for live viewing).
|
|
49
|
+
* These are the commands where clicking to open a log viewer makes sense.
|
|
50
|
+
*/
|
|
51
|
+
const FILE_VIEWER_COMMANDS = /^(?:tail|cat|head|less|grep|watch|multitail)\s+/;
|
|
52
|
+
/**
|
|
53
|
+
* Alternative: Commands with -f flag (follow mode) are especially interesting
|
|
54
|
+
*/
|
|
55
|
+
const FOLLOW_MODE_PATTERN = /\s-[A-Za-z]*f[A-Za-z]*\s|\s--follow\s/;
|
|
56
|
+
/**
|
|
57
|
+
* Extracts file paths from a command string.
|
|
58
|
+
* Matches paths starting with / or ~ followed by path characters.
|
|
59
|
+
* Excludes common non-path patterns like flags.
|
|
60
|
+
*
|
|
61
|
+
* Note: This is a simpler approach - we run it on each command string
|
|
62
|
+
* rather than trying to match globally.
|
|
63
|
+
*/
|
|
64
|
+
const FILE_PATH_PATTERN = /(?:^|\s|['"]|=)([/~][^\s'"<>|;&\n]+)/g;
|
|
65
|
+
/**
|
|
66
|
+
* Pattern to detect paths that are likely not real files (flags, etc.)
|
|
67
|
+
*/
|
|
68
|
+
const INVALID_PATH_PATTERN = /^[/~]-|\/dev\/null$/;
|
|
69
|
+
/**
|
|
70
|
+
* Pattern to detect command suggestions in plain text output.
|
|
71
|
+
* Matches lines like "tail -f /path/to/file" without the ● Bash() wrapper.
|
|
72
|
+
* This catches commands Claude mentions but doesn't execute.
|
|
73
|
+
*/
|
|
74
|
+
const TEXT_COMMAND_PATTERN = /^\s*(tail|cat|head|less|grep|watch|multitail)\s+(?:-[^\s]+\s+)*([/~][^\s'"<>|;&\n]+)/;
|
|
75
|
+
/**
|
|
76
|
+
* Pattern to detect log file paths mentioned in text (even without commands).
|
|
77
|
+
* Matches paths ending in .log, .txt, .out, or in common log directories.
|
|
78
|
+
*/
|
|
79
|
+
const LOG_FILE_MENTION_PATTERN = /([/~][^\s'"<>|;&\n]*(?:\.log|\.txt|\.out|\/log\/[^\s'"<>|;&\n]+))/g;
|
|
80
|
+
// ========== BashToolParser Class ==========
|
|
81
|
+
/**
|
|
82
|
+
* Parses Claude Code terminal output to detect Bash tool commands with file paths.
|
|
83
|
+
* Emits events when file-viewing commands are detected, allowing the UI to
|
|
84
|
+
* display clickable paths for opening live log viewers.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* const parser = new BashToolParser({ sessionId: 'abc123' });
|
|
89
|
+
* parser.on('toolStart', (tool) => {
|
|
90
|
+
* console.log(`New tool: ${tool.command}`);
|
|
91
|
+
* console.log(`File paths: ${tool.filePaths.join(', ')}`);
|
|
92
|
+
* });
|
|
93
|
+
* parser.processTerminalData(terminalOutput);
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export class BashToolParser extends EventEmitter {
|
|
97
|
+
_sessionId;
|
|
98
|
+
_enabled;
|
|
99
|
+
_activeTools = new Map();
|
|
100
|
+
_lineBuffer = '';
|
|
101
|
+
_lastToolId = null;
|
|
102
|
+
_workingDir;
|
|
103
|
+
_homeDir;
|
|
104
|
+
// Track auto-remove timers for cleanup
|
|
105
|
+
_autoRemoveTimers = new Set();
|
|
106
|
+
// Flag to prevent operations after destroy
|
|
107
|
+
_destroyed = false;
|
|
108
|
+
// Debouncing
|
|
109
|
+
_pendingUpdate = false;
|
|
110
|
+
_updateTimer = null;
|
|
111
|
+
constructor(config) {
|
|
112
|
+
super();
|
|
113
|
+
this._sessionId = config.sessionId;
|
|
114
|
+
this._enabled = config.enabled ?? true;
|
|
115
|
+
this._workingDir = config.workingDir || process.cwd();
|
|
116
|
+
this._homeDir = process.env.HOME || '/home/user';
|
|
117
|
+
}
|
|
118
|
+
// ========== Public Accessors ==========
|
|
119
|
+
/** Whether the parser is currently enabled */
|
|
120
|
+
get enabled() {
|
|
121
|
+
return this._enabled;
|
|
122
|
+
}
|
|
123
|
+
/** Session ID this parser belongs to */
|
|
124
|
+
get sessionId() {
|
|
125
|
+
return this._sessionId;
|
|
126
|
+
}
|
|
127
|
+
/** Currently active tools */
|
|
128
|
+
get activeTools() {
|
|
129
|
+
return Array.from(this._activeTools.values());
|
|
130
|
+
}
|
|
131
|
+
/** Current working directory used for path resolution */
|
|
132
|
+
get workingDir() {
|
|
133
|
+
return this._workingDir;
|
|
134
|
+
}
|
|
135
|
+
// ========== Path Normalization ==========
|
|
136
|
+
/**
|
|
137
|
+
* Normalize a file path to its canonical form.
|
|
138
|
+
* - Expands ~ to home directory
|
|
139
|
+
* - Resolves relative paths against working directory
|
|
140
|
+
* - Normalizes . and .. components
|
|
141
|
+
* - Removes trailing slashes
|
|
142
|
+
*/
|
|
143
|
+
normalizePath(path) {
|
|
144
|
+
if (!path)
|
|
145
|
+
return '';
|
|
146
|
+
let normalized = path.trim();
|
|
147
|
+
// Expand ~ to home directory
|
|
148
|
+
if (normalized.startsWith('~/')) {
|
|
149
|
+
normalized = this._homeDir + normalized.slice(1);
|
|
150
|
+
}
|
|
151
|
+
else if (normalized === '~') {
|
|
152
|
+
normalized = this._homeDir;
|
|
153
|
+
}
|
|
154
|
+
// If not absolute, resolve against working directory
|
|
155
|
+
if (!normalized.startsWith('/')) {
|
|
156
|
+
normalized = this._workingDir + '/' + normalized;
|
|
157
|
+
}
|
|
158
|
+
// Normalize path components (resolve . and ..)
|
|
159
|
+
const parts = normalized.split('/');
|
|
160
|
+
const stack = [];
|
|
161
|
+
for (const part of parts) {
|
|
162
|
+
if (part === '' || part === '.') {
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
else if (part === '..') {
|
|
166
|
+
if (stack.length > 1) {
|
|
167
|
+
stack.pop();
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
stack.push(part);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return '/' + stack.join('/');
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Extract just the filename from a path.
|
|
178
|
+
*/
|
|
179
|
+
getFilename(path) {
|
|
180
|
+
const parts = path.split('/');
|
|
181
|
+
return parts[parts.length - 1] || '';
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Check if a path is a "shallow root path" - an absolute path with only one
|
|
185
|
+
* component after root (e.g., /test.txt, /file.log).
|
|
186
|
+
* These are often typos where the user meant a relative path.
|
|
187
|
+
*/
|
|
188
|
+
isShallowRootPath(path) {
|
|
189
|
+
if (!path.startsWith('/'))
|
|
190
|
+
return false;
|
|
191
|
+
const parts = path.split('/').filter((p) => p !== '');
|
|
192
|
+
return parts.length === 1;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Check if a path is inside (or is) the working directory.
|
|
196
|
+
*/
|
|
197
|
+
isPathInWorkingDir(path) {
|
|
198
|
+
const normalized = this.normalizePath(path);
|
|
199
|
+
return normalized.startsWith(this._workingDir + '/') || normalized === this._workingDir;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Smart path equivalence check.
|
|
203
|
+
* Two paths are considered equivalent if:
|
|
204
|
+
* 1. They normalize to the same path (standard case)
|
|
205
|
+
* 2. One is a "shallow root path" (e.g., /test.txt) and the other is the
|
|
206
|
+
* same filename inside the working directory - the shallow root path
|
|
207
|
+
* is likely a typo and they probably meant the same file.
|
|
208
|
+
*/
|
|
209
|
+
pathsAreEquivalent(path1, path2) {
|
|
210
|
+
const norm1 = this.normalizePath(path1);
|
|
211
|
+
const norm2 = this.normalizePath(path2);
|
|
212
|
+
// Standard check: exact normalized match
|
|
213
|
+
if (norm1 === norm2)
|
|
214
|
+
return true;
|
|
215
|
+
// Smart check: shallow root path vs working dir path with same filename
|
|
216
|
+
const file1 = this.getFilename(norm1);
|
|
217
|
+
const file2 = this.getFilename(norm2);
|
|
218
|
+
if (file1 !== file2)
|
|
219
|
+
return false; // Different filenames, can't be equivalent
|
|
220
|
+
const shallow1 = this.isShallowRootPath(path1);
|
|
221
|
+
const shallow2 = this.isShallowRootPath(path2);
|
|
222
|
+
const inWorkDir1 = this.isPathInWorkingDir(norm1);
|
|
223
|
+
const inWorkDir2 = this.isPathInWorkingDir(norm2);
|
|
224
|
+
// If one is shallow root (e.g., /test.txt) and other is in working dir
|
|
225
|
+
// with same filename, treat as equivalent (user likely made a typo)
|
|
226
|
+
if (shallow1 && inWorkDir2)
|
|
227
|
+
return true;
|
|
228
|
+
if (shallow2 && inWorkDir1)
|
|
229
|
+
return true;
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Given multiple paths, deduplicate and return the "best" paths.
|
|
234
|
+
* Uses smart equivalence checking:
|
|
235
|
+
* - Standard normalization for relative vs absolute paths
|
|
236
|
+
* - Detects likely typos (e.g., /file.txt when workingDir/file.txt exists)
|
|
237
|
+
* - Prefers paths inside the working directory
|
|
238
|
+
* - Prefers longer, more explicit paths
|
|
239
|
+
*/
|
|
240
|
+
deduplicatePaths(paths) {
|
|
241
|
+
if (paths.length <= 1)
|
|
242
|
+
return paths;
|
|
243
|
+
const result = [];
|
|
244
|
+
const seenNormalized = new Set();
|
|
245
|
+
// Sort paths: prefer paths in working dir first, then by length (longer first)
|
|
246
|
+
const sortedPaths = [...paths].sort((a, b) => {
|
|
247
|
+
const aInWorkDir = this.isPathInWorkingDir(a);
|
|
248
|
+
const bInWorkDir = this.isPathInWorkingDir(b);
|
|
249
|
+
if (aInWorkDir && !bInWorkDir)
|
|
250
|
+
return -1;
|
|
251
|
+
if (bInWorkDir && !aInWorkDir)
|
|
252
|
+
return 1;
|
|
253
|
+
return b.length - a.length; // Longer paths first
|
|
254
|
+
});
|
|
255
|
+
for (const path of sortedPaths) {
|
|
256
|
+
const normalized = this.normalizePath(path);
|
|
257
|
+
// Check if we've already seen an equivalent path
|
|
258
|
+
let isDuplicate = false;
|
|
259
|
+
for (const existing of result) {
|
|
260
|
+
if (this.pathsAreEquivalent(path, existing)) {
|
|
261
|
+
isDuplicate = true;
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
if (!isDuplicate && !seenNormalized.has(normalized)) {
|
|
266
|
+
result.push(path);
|
|
267
|
+
seenNormalized.add(normalized);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return result;
|
|
271
|
+
}
|
|
272
|
+
// ========== Public Methods ==========
|
|
273
|
+
/**
|
|
274
|
+
* Update the working directory (e.g., when session changes directory).
|
|
275
|
+
*/
|
|
276
|
+
setWorkingDir(workingDir) {
|
|
277
|
+
this._workingDir = workingDir;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Check if a file path is already being tracked by an active tool.
|
|
281
|
+
* Uses path normalization to detect equivalent paths.
|
|
282
|
+
* For example, "/test.txt" and "/home/user/test.txt" when workingDir
|
|
283
|
+
* is "/home/user" would NOT be considered equivalent (different files),
|
|
284
|
+
* but "test.txt" and "/home/user/test.txt" WOULD be (same file).
|
|
285
|
+
*/
|
|
286
|
+
isFilePathTracked(filePath) {
|
|
287
|
+
const normalizedNew = this.normalizePath(filePath);
|
|
288
|
+
return Array.from(this._activeTools.values()).some((t) => {
|
|
289
|
+
if (t.status !== 'running')
|
|
290
|
+
return false;
|
|
291
|
+
return t.filePaths.some((existingPath) => {
|
|
292
|
+
const normalizedExisting = this.normalizePath(existingPath);
|
|
293
|
+
return normalizedExisting === normalizedNew;
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Get all tracked paths (normalized) for debugging.
|
|
299
|
+
*/
|
|
300
|
+
getTrackedPaths() {
|
|
301
|
+
const paths = [];
|
|
302
|
+
for (const tool of this._activeTools.values()) {
|
|
303
|
+
if (tool.status === 'running') {
|
|
304
|
+
for (const path of tool.filePaths) {
|
|
305
|
+
paths.push({ raw: path, normalized: this.normalizePath(path) });
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return paths;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Enables the parser.
|
|
313
|
+
*/
|
|
314
|
+
enable() {
|
|
315
|
+
this._enabled = true;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Disables the parser.
|
|
319
|
+
*/
|
|
320
|
+
disable() {
|
|
321
|
+
this._enabled = false;
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Resets the parser state, clearing all tracked tools.
|
|
325
|
+
*/
|
|
326
|
+
reset() {
|
|
327
|
+
this._activeTools.clear();
|
|
328
|
+
this._lineBuffer = '';
|
|
329
|
+
this._lastToolId = null;
|
|
330
|
+
this.emitUpdate();
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Process terminal data to detect Bash tool patterns.
|
|
334
|
+
* Call this with each chunk of PTY output.
|
|
335
|
+
*
|
|
336
|
+
* @param data - Raw terminal data (may include ANSI codes)
|
|
337
|
+
*/
|
|
338
|
+
processTerminalData(data) {
|
|
339
|
+
if (!this._enabled || this._destroyed)
|
|
340
|
+
return;
|
|
341
|
+
// Append to line buffer (raw data — lines will be stripped individually in processLine)
|
|
342
|
+
this._lineBuffer += data;
|
|
343
|
+
// Prevent unbounded growth
|
|
344
|
+
if (this._lineBuffer.length > MAX_LINE_BUFFER_SIZE) {
|
|
345
|
+
const trimPoint = this._lineBuffer.lastIndexOf('\n', MAX_LINE_BUFFER_SIZE / 2);
|
|
346
|
+
this._lineBuffer =
|
|
347
|
+
trimPoint > 0 ? this._lineBuffer.slice(trimPoint + 1) : this._lineBuffer.slice(-MAX_LINE_BUFFER_SIZE / 2);
|
|
348
|
+
}
|
|
349
|
+
// Process complete lines
|
|
350
|
+
const lines = this._lineBuffer.split('\n');
|
|
351
|
+
// Keep the last incomplete line in buffer
|
|
352
|
+
this._lineBuffer = lines.pop() || '';
|
|
353
|
+
for (const line of lines) {
|
|
354
|
+
this.processLine(line);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Process pre-stripped terminal data (ANSI codes already removed).
|
|
359
|
+
* Use this when the caller has already stripped ANSI to avoid redundant regex work.
|
|
360
|
+
*/
|
|
361
|
+
processCleanData(data) {
|
|
362
|
+
if (!this._enabled || this._destroyed)
|
|
363
|
+
return;
|
|
364
|
+
this._lineBuffer += data;
|
|
365
|
+
if (this._lineBuffer.length > MAX_LINE_BUFFER_SIZE) {
|
|
366
|
+
const trimPoint = this._lineBuffer.lastIndexOf('\n', MAX_LINE_BUFFER_SIZE / 2);
|
|
367
|
+
this._lineBuffer =
|
|
368
|
+
trimPoint > 0 ? this._lineBuffer.slice(trimPoint + 1) : this._lineBuffer.slice(-MAX_LINE_BUFFER_SIZE / 2);
|
|
369
|
+
}
|
|
370
|
+
const lines = this._lineBuffer.split('\n');
|
|
371
|
+
this._lineBuffer = lines.pop() || '';
|
|
372
|
+
for (const line of lines) {
|
|
373
|
+
this.processCleanLine(line);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
// ========== Private Methods ==========
|
|
377
|
+
/**
|
|
378
|
+
* Process a single line of terminal output (raw — will strip ANSI).
|
|
379
|
+
*/
|
|
380
|
+
processLine(line) {
|
|
381
|
+
const cleanLine = this.stripAnsi(line);
|
|
382
|
+
this.processCleanLine(cleanLine);
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Process a single pre-stripped line of terminal output.
|
|
386
|
+
*/
|
|
387
|
+
processCleanLine(cleanLine) {
|
|
388
|
+
// Check for tool start
|
|
389
|
+
const startMatch = cleanLine.match(BASH_TOOL_START_PATTERN);
|
|
390
|
+
if (startMatch) {
|
|
391
|
+
const command = startMatch[1];
|
|
392
|
+
const timeout = startMatch[2]?.trim();
|
|
393
|
+
// Check if this is a file-viewing command
|
|
394
|
+
if (this.isFileViewerCommand(command)) {
|
|
395
|
+
const filePaths = this.extractFilePaths(command);
|
|
396
|
+
// Skip if any file path is already tracked (cross-pattern dedup)
|
|
397
|
+
if (filePaths.some((fp) => this.isFilePathTracked(fp))) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
if (filePaths.length > 0) {
|
|
401
|
+
const tool = {
|
|
402
|
+
id: uuidv4(),
|
|
403
|
+
command,
|
|
404
|
+
filePaths,
|
|
405
|
+
timeout,
|
|
406
|
+
startedAt: Date.now(),
|
|
407
|
+
status: 'running',
|
|
408
|
+
sessionId: this._sessionId,
|
|
409
|
+
};
|
|
410
|
+
// Enforce max tools limit
|
|
411
|
+
if (this._activeTools.size >= MAX_ACTIVE_TOOLS) {
|
|
412
|
+
// Remove oldest tool
|
|
413
|
+
const oldest = Array.from(this._activeTools.entries()).sort((a, b) => a[1].startedAt - b[1].startedAt)[0];
|
|
414
|
+
if (oldest) {
|
|
415
|
+
this._activeTools.delete(oldest[0]);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
this._activeTools.set(tool.id, tool);
|
|
419
|
+
this._lastToolId = tool.id;
|
|
420
|
+
this.emit('toolStart', tool);
|
|
421
|
+
this.scheduleUpdate();
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
// Check for tool completion
|
|
427
|
+
if (TOOL_COMPLETION_PATTERN.test(cleanLine) && this._lastToolId) {
|
|
428
|
+
const tool = this._activeTools.get(this._lastToolId);
|
|
429
|
+
if (tool && tool.status === 'running') {
|
|
430
|
+
tool.status = 'completed';
|
|
431
|
+
this.emit('toolEnd', tool);
|
|
432
|
+
this.scheduleUpdate();
|
|
433
|
+
// Remove completed tool after a short delay to allow UI to show completion
|
|
434
|
+
const timer = setTimeout(() => {
|
|
435
|
+
this._autoRemoveTimers.delete(timer);
|
|
436
|
+
if (this._destroyed)
|
|
437
|
+
return;
|
|
438
|
+
this._activeTools.delete(tool.id);
|
|
439
|
+
this.scheduleUpdate();
|
|
440
|
+
}, 2000);
|
|
441
|
+
this._autoRemoveTimers.add(timer);
|
|
442
|
+
}
|
|
443
|
+
this._lastToolId = null;
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
// Fallback: Check for command suggestions in plain text (e.g., "tail -f /tmp/file.log")
|
|
447
|
+
const textCmdMatch = cleanLine.match(TEXT_COMMAND_PATTERN);
|
|
448
|
+
if (textCmdMatch) {
|
|
449
|
+
const filePath = textCmdMatch[2];
|
|
450
|
+
// Create a suggestion tool (marked as 'suggestion' status)
|
|
451
|
+
const tool = {
|
|
452
|
+
id: uuidv4(),
|
|
453
|
+
command: cleanLine.trim(),
|
|
454
|
+
filePaths: [filePath],
|
|
455
|
+
timeout: undefined,
|
|
456
|
+
startedAt: Date.now(),
|
|
457
|
+
status: 'running', // Shows as clickable
|
|
458
|
+
sessionId: this._sessionId,
|
|
459
|
+
};
|
|
460
|
+
// Don't add if file path already tracked (cross-pattern dedup)
|
|
461
|
+
if (this.isFilePathTracked(filePath)) {
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
this._activeTools.set(tool.id, tool);
|
|
465
|
+
this.emit('toolStart', tool);
|
|
466
|
+
this.scheduleUpdate();
|
|
467
|
+
// Auto-remove suggestions after 30 seconds
|
|
468
|
+
const timer = setTimeout(() => {
|
|
469
|
+
this._autoRemoveTimers.delete(timer);
|
|
470
|
+
if (this._destroyed)
|
|
471
|
+
return;
|
|
472
|
+
this._activeTools.delete(tool.id);
|
|
473
|
+
this.scheduleUpdate();
|
|
474
|
+
}, 30000);
|
|
475
|
+
this._autoRemoveTimers.add(timer);
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
// Last fallback: Check for log file paths mentioned anywhere in the line
|
|
479
|
+
LOG_FILE_MENTION_PATTERN.lastIndex = 0;
|
|
480
|
+
let logMatch;
|
|
481
|
+
while ((logMatch = LOG_FILE_MENTION_PATTERN.exec(cleanLine)) !== null) {
|
|
482
|
+
const filePath = logMatch[1].replace(/[,;:]+$/, ''); // Clean trailing punctuation
|
|
483
|
+
// Skip if it looks invalid
|
|
484
|
+
if (INVALID_PATH_PATTERN.test(filePath))
|
|
485
|
+
continue;
|
|
486
|
+
// Skip if file path already tracked (cross-pattern dedup)
|
|
487
|
+
if (this.isFilePathTracked(filePath))
|
|
488
|
+
continue;
|
|
489
|
+
const tool = {
|
|
490
|
+
id: uuidv4(),
|
|
491
|
+
command: `View: ${filePath}`,
|
|
492
|
+
filePaths: [filePath],
|
|
493
|
+
timeout: undefined,
|
|
494
|
+
startedAt: Date.now(),
|
|
495
|
+
status: 'running',
|
|
496
|
+
sessionId: this._sessionId,
|
|
497
|
+
};
|
|
498
|
+
this._activeTools.set(tool.id, tool);
|
|
499
|
+
this.emit('toolStart', tool);
|
|
500
|
+
this.scheduleUpdate();
|
|
501
|
+
// Auto-remove after 60 seconds
|
|
502
|
+
const timer = setTimeout(() => {
|
|
503
|
+
this._autoRemoveTimers.delete(timer);
|
|
504
|
+
if (this._destroyed)
|
|
505
|
+
return;
|
|
506
|
+
this._activeTools.delete(tool.id);
|
|
507
|
+
this.scheduleUpdate();
|
|
508
|
+
}, 60000);
|
|
509
|
+
this._autoRemoveTimers.add(timer);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Check if a command is a file-viewing command worth tracking.
|
|
514
|
+
*/
|
|
515
|
+
isFileViewerCommand(command) {
|
|
516
|
+
// Commands that typically view files
|
|
517
|
+
if (FILE_VIEWER_COMMANDS.test(command)) {
|
|
518
|
+
return true;
|
|
519
|
+
}
|
|
520
|
+
// Any command with -f (follow) flag is interesting
|
|
521
|
+
if (FOLLOW_MODE_PATTERN.test(` ${command} `)) {
|
|
522
|
+
return true;
|
|
523
|
+
}
|
|
524
|
+
return false;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Extract file paths from a command string.
|
|
528
|
+
* Returns deduplicated paths, preferring more complete/absolute versions.
|
|
529
|
+
*/
|
|
530
|
+
extractFilePaths(command) {
|
|
531
|
+
const rawPaths = [];
|
|
532
|
+
let match;
|
|
533
|
+
// Reset regex state
|
|
534
|
+
FILE_PATH_PATTERN.lastIndex = 0;
|
|
535
|
+
while ((match = FILE_PATH_PATTERN.exec(command)) !== null) {
|
|
536
|
+
const path = match[1];
|
|
537
|
+
// Skip invalid paths
|
|
538
|
+
if (INVALID_PATH_PATTERN.test(path)) {
|
|
539
|
+
continue;
|
|
540
|
+
}
|
|
541
|
+
// Skip if it looks like a flag (starts with -)
|
|
542
|
+
if (path.includes('/-')) {
|
|
543
|
+
continue;
|
|
544
|
+
}
|
|
545
|
+
// Clean up path (remove trailing punctuation)
|
|
546
|
+
const cleanPath = path.replace(/[,;:]+$/, '');
|
|
547
|
+
if (cleanPath) {
|
|
548
|
+
rawPaths.push(cleanPath);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
// Deduplicate paths that resolve to the same file
|
|
552
|
+
return this.deduplicatePaths(rawPaths);
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Strip ANSI escape codes from a string.
|
|
556
|
+
*/
|
|
557
|
+
stripAnsi(str) {
|
|
558
|
+
// Comprehensive ANSI pattern
|
|
559
|
+
// eslint-disable-next-line no-control-regex
|
|
560
|
+
return str.replace(/\x1b(?:\[[0-9;?]*[A-Za-z]|\][^\x07\x1b]*(?:\x07|\x1b\\)|[=>])/g, '');
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Schedule a debounced update emission.
|
|
564
|
+
*/
|
|
565
|
+
scheduleUpdate() {
|
|
566
|
+
if (this._pendingUpdate)
|
|
567
|
+
return;
|
|
568
|
+
this._pendingUpdate = true;
|
|
569
|
+
this._updateTimer = setTimeout(() => {
|
|
570
|
+
this._pendingUpdate = false;
|
|
571
|
+
this.emitUpdate();
|
|
572
|
+
}, EVENT_DEBOUNCE_MS);
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Emit the current active tools list.
|
|
576
|
+
*/
|
|
577
|
+
emitUpdate() {
|
|
578
|
+
this.emit('toolsUpdate', this.activeTools);
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Clean up resources.
|
|
582
|
+
*/
|
|
583
|
+
destroy() {
|
|
584
|
+
this._destroyed = true;
|
|
585
|
+
if (this._updateTimer) {
|
|
586
|
+
clearTimeout(this._updateTimer);
|
|
587
|
+
this._updateTimer = null;
|
|
588
|
+
}
|
|
589
|
+
// Clear all auto-remove timers to prevent orphaned callbacks
|
|
590
|
+
for (const timer of this._autoRemoveTimers) {
|
|
591
|
+
clearTimeout(timer);
|
|
592
|
+
}
|
|
593
|
+
this._autoRemoveTimers.clear();
|
|
594
|
+
this._activeTools.clear();
|
|
595
|
+
this.removeAllListeners();
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
//# sourceMappingURL=bash-tool-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bash-tool-parser.js","sourceRoot":"","sources":["../src/bash-tool-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAGpC,gDAAgD;AAEhD;;;GAGG;AACH,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAE5B;;;GAGG;AACH,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B;;GAEG;AACH,MAAM,oBAAoB,GAAG,EAAE,GAAG,IAAI,CAAC;AAEvC,oDAAoD;AAEpD;;;;;;;;GAQG;AACH,MAAM,uBAAuB,GAAG,uDAAuD,CAAC;AAExF;;;GAGG;AACH,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AAEjD;;;GAGG;AACH,MAAM,oBAAoB,GAAG,iDAAiD,CAAC;AAE/E;;GAEG;AACH,MAAM,mBAAmB,GAAG,uCAAuC,CAAC;AAEpE;;;;;;;GAOG;AACH,MAAM,iBAAiB,GAAG,uCAAuC,CAAC;AAElE;;GAEG;AACH,MAAM,oBAAoB,GAAG,qBAAqB,CAAC;AAEnD;;;;GAIG;AACH,MAAM,oBAAoB,GAAG,sFAAsF,CAAC;AAEpH;;;GAGG;AACH,MAAM,wBAAwB,GAAG,oEAAoE,CAAC;AA4BtG,6CAA6C;AAE7C;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,cAAe,SAAQ,YAAkC;IAC5D,UAAU,CAAS;IACnB,QAAQ,CAAU;IAClB,YAAY,GAAgC,IAAI,GAAG,EAAE,CAAC;IACtD,WAAW,GAAW,EAAE,CAAC;IACz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C,cAAc;YAAE,OAAO;QAEhC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,GAAG,EAAE;YAClC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;YAC5B,IAAI,CAAC,UAAU,EAAE,CAAC;QACpB,CAAC,EAAE,iBAAiB,CAAC,CAAC;IACxB,CAAC;IAED;;OAEG;IACK,UAAU;QAChB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAChC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QAC3B,CAAC;QACD,6DAA6D;QAC7D,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3C,YAAY,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;QACD,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;QAC/B,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QAC1B,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5B,CAAC;CACF"}
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Codeman CLI command definitions
|
|
3
|
+
*
|
|
4
|
+
* Defines all CLI commands and subcommands for managing Claude sessions,
|
|
5
|
+
* tasks, Ralph loops, and the web server.
|
|
6
|
+
*
|
|
7
|
+
* @module cli
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
declare const program: Command;
|
|
11
|
+
export { program };
|
|
12
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,QAAA,MAAM,OAAO,SAAgB,CAAC;AAwf9B,OAAO,EAAE,OAAO,EAAE,CAAC"}
|