@rcrsr/claude-code-runner 0.4.0 → 0.6.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 +104 -31
- package/dist/cli/args.d.ts +0 -3
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +51 -20
- package/dist/cli/args.js.map +1 -1
- package/dist/core/runner.d.ts +5 -2
- package/dist/core/runner.d.ts.map +1 -1
- package/dist/core/runner.js +27 -24
- package/dist/core/runner.js.map +1 -1
- package/dist/index.js +85 -42
- package/dist/index.js.map +1 -1
- package/dist/output/colors.d.ts +16 -12
- package/dist/output/colors.d.ts.map +1 -1
- package/dist/output/colors.js +27 -65
- package/dist/output/colors.js.map +1 -1
- package/dist/output/deaddrop-queue.d.ts +45 -0
- package/dist/output/deaddrop-queue.d.ts.map +1 -0
- package/dist/output/deaddrop-queue.js +82 -0
- package/dist/output/deaddrop-queue.js.map +1 -0
- package/dist/output/formatter.d.ts +23 -0
- package/dist/output/formatter.d.ts.map +1 -1
- package/dist/output/formatter.js +83 -42
- package/dist/output/formatter.js.map +1 -1
- package/dist/output/index.d.ts +1 -0
- package/dist/output/index.d.ts.map +1 -1
- package/dist/output/index.js +1 -0
- package/dist/output/index.js.map +1 -1
- package/dist/output/logger.js +2 -2
- package/dist/output/logger.js.map +1 -1
- package/dist/output/stats.d.ts +73 -0
- package/dist/output/stats.d.ts.map +1 -0
- package/dist/output/stats.js +154 -0
- package/dist/output/stats.js.map +1 -0
- package/dist/process/pty.d.ts.map +1 -1
- package/dist/process/pty.js +3 -2
- package/dist/process/pty.js.map +1 -1
- package/dist/script/index.d.ts +8 -0
- package/dist/script/index.d.ts.map +1 -0
- package/dist/script/index.js +10 -0
- package/dist/script/index.js.map +1 -0
- package/dist/script/loader.d.ts +13 -0
- package/dist/script/loader.d.ts.map +1 -0
- package/dist/script/loader.js +66 -0
- package/dist/script/loader.js.map +1 -0
- package/dist/script/parser.d.ts +63 -0
- package/dist/script/parser.d.ts.map +1 -0
- package/dist/script/parser.js +349 -0
- package/dist/script/parser.js.map +1 -0
- package/dist/script/types.d.ts +49 -0
- package/dist/script/types.d.ts.map +1 -0
- package/dist/script/types.js +5 -0
- package/dist/script/types.js.map +1 -0
- package/dist/script/variables.d.ts +27 -0
- package/dist/script/variables.d.ts.map +1 -0
- package/dist/script/variables.js +74 -0
- package/dist/script/variables.js.map +1 -0
- package/dist/templates/command.d.ts +18 -20
- package/dist/templates/command.d.ts.map +1 -1
- package/dist/templates/command.js +40 -61
- package/dist/templates/command.js.map +1 -1
- package/dist/types/claude.d.ts +12 -0
- package/dist/types/claude.d.ts.map +1 -1
- package/dist/types/claude.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/runner.d.ts +12 -0
- package/dist/types/runner.d.ts.map +1 -1
- package/dist/types/runner.js +4 -3
- package/dist/types/runner.js.map +1 -1
- package/dist/types/tools.d.ts +64 -0
- package/dist/types/tools.d.ts.map +1 -0
- package/dist/types/tools.js +12 -0
- package/dist/types/tools.js.map +1 -0
- package/dist/utils/arguments.d.ts +19 -0
- package/dist/utils/arguments.d.ts.map +1 -0
- package/dist/utils/arguments.js +31 -0
- package/dist/utils/arguments.js.map +1 -0
- package/dist/utils/constants.d.ts +51 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +56 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/formatting.d.ts +10 -0
- package/dist/utils/formatting.d.ts.map +1 -0
- package/dist/utils/formatting.js +19 -0
- package/dist/utils/formatting.js.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +7 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,12 +4,12 @@ Deterministic, scripted, unattended Claude Code execution.
|
|
|
4
4
|
|
|
5
5
|
## Why Use This?
|
|
6
6
|
|
|
7
|
-
- **
|
|
8
|
-
- **
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
7
|
+
- **Walk away** — Workflows run unattended in CI/CD pipelines
|
|
8
|
+
- **Chain results** — Capture output from one step, inject it into the next
|
|
9
|
+
- **Claude decides** — Signals control when to retry, escalate, or finish
|
|
10
|
+
- **No hitting context limits** — Fresh context per step keeps long workflows running
|
|
11
|
+
- **Watch live** — See tool calls stream as they execute
|
|
12
|
+
- **Replay later** — Full session logs for debugging
|
|
13
13
|
|
|
14
14
|
## Prerequisites
|
|
15
15
|
|
|
@@ -30,12 +30,6 @@ npm install -g @rcrsr/claude-code-runner
|
|
|
30
30
|
claude-code-runner prompt "Refactor the auth module to use async/await"
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
The `prompt` keyword is optional — bare strings work the same way:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
claude-code-runner "Fix the failing tests in src/utils"
|
|
37
|
-
```
|
|
38
|
-
|
|
39
33
|
### command — Run a slash command file
|
|
40
34
|
|
|
41
35
|
Store prompts as markdown files in `.claude/commands/` and invoke them by name:
|
|
@@ -69,7 +63,7 @@ Output findings as a numbered list.
|
|
|
69
63
|
---
|
|
70
64
|
description: Review code for issues
|
|
71
65
|
argument-hint: <file> [severity]
|
|
72
|
-
model:
|
|
66
|
+
model: sonnet
|
|
73
67
|
---
|
|
74
68
|
|
|
75
69
|
Review $1 with severity level $2...
|
|
@@ -79,24 +73,64 @@ Review $1 with severity level $2...
|
|
|
79
73
|
- `model` — Default model for this command (CLI `--model` takes precedence)
|
|
80
74
|
- `description` — Command description
|
|
81
75
|
|
|
82
|
-
### script — Run
|
|
76
|
+
### script — Run multi-phase workflows
|
|
83
77
|
|
|
84
|
-
|
|
78
|
+
Scripts chain commands where each phase builds on the previous. Output from one step can be captured and reused in subsequent steps via variable substitution.
|
|
85
79
|
|
|
86
80
|
```bash
|
|
87
|
-
claude-code-runner script
|
|
81
|
+
claude-code-runner script refactor-workflow.txt src/api/
|
|
88
82
|
```
|
|
89
83
|
|
|
90
|
-
**
|
|
84
|
+
**Script syntax:**
|
|
85
|
+
|
|
86
|
+
| Syntax | Description |
|
|
87
|
+
| ----------------------------------- | ----------------------------------------- |
|
|
88
|
+
| `prompt("text")` | Run a prompt (supports `\n` for newlines) |
|
|
89
|
+
| `prompt(<<EOF...EOF)` | Multi-line prompt using heredoc |
|
|
90
|
+
| `command("name")` | Run a command template |
|
|
91
|
+
| `command("name", ["arg1", "arg2"])` | Run command with arguments |
|
|
92
|
+
| `-> $varname` | Capture output into a variable |
|
|
93
|
+
| `$_` | Previous step's output (auto-captured) |
|
|
94
|
+
| `$varname` | Named captured variable |
|
|
95
|
+
| `$1`, `$2`, `$ARGUMENTS` | Script arguments |
|
|
96
|
+
| `# comment` | Comments (ignored) |
|
|
97
|
+
|
|
98
|
+
**Example: Variable capture and chaining** (`refactor-workflow.txt`):
|
|
91
99
|
|
|
92
100
|
```text
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
101
|
+
---
|
|
102
|
+
argument-hint: <directory>
|
|
103
|
+
---
|
|
104
|
+
# Phase 1: Analyze - capture issues list
|
|
105
|
+
prompt("Review $1 for error handling issues. List each issue with file:line.") -> $issues
|
|
106
|
+
|
|
107
|
+
# Phase 2: Fix - use captured issues (no temp file needed)
|
|
108
|
+
prompt(<<EOF
|
|
109
|
+
Fix these issues:
|
|
110
|
+
$issues
|
|
111
|
+
|
|
112
|
+
For each fix, make minimal changes.
|
|
113
|
+
EOF
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
# Phase 3: Verify - $_ contains previous output
|
|
117
|
+
prompt("Run tests. Confirm fixes are correct. Previous output: $_")
|
|
97
118
|
```
|
|
98
119
|
|
|
99
|
-
|
|
120
|
+
**Example: Command with capture** (`test-and-fix.txt`):
|
|
121
|
+
|
|
122
|
+
```text
|
|
123
|
+
# Run tests, capture failures
|
|
124
|
+
command("run-tests", [$1]) -> $failures
|
|
125
|
+
|
|
126
|
+
# Fix any failures
|
|
127
|
+
prompt("Fix these test failures:\n$failures")
|
|
128
|
+
|
|
129
|
+
# Verify
|
|
130
|
+
command("run-tests", [$1])
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Scripts stop on `BLOCKED` or `ERROR` signals, catching issues before continuing to the next phase.
|
|
100
134
|
|
|
101
135
|
### Options
|
|
102
136
|
|
|
@@ -113,7 +147,7 @@ Scripts stop on `BLOCKED` or `ERROR` signals, letting you catch issues before co
|
|
|
113
147
|
**Example with model selection:**
|
|
114
148
|
|
|
115
149
|
```bash
|
|
116
|
-
claude-code-runner -m sonnet "Explain this codebase"
|
|
150
|
+
claude-code-runner -m sonnet prompt "Explain this codebase"
|
|
117
151
|
```
|
|
118
152
|
|
|
119
153
|
## Runner Signals
|
|
@@ -128,23 +162,62 @@ Signals give Claude a way to control execution flow. Instruct Claude to output t
|
|
|
128
162
|
|
|
129
163
|
No signal means success—the runner exits when Claude finishes without outputting a signal.
|
|
130
164
|
|
|
131
|
-
|
|
165
|
+
### Document-Driven Workflows
|
|
166
|
+
|
|
167
|
+
The real power of runner signals is **checklist-based execution**. Create a document with implementation steps, and Claude works through them one at a time across multiple invocations.
|
|
168
|
+
|
|
169
|
+
**Implementation plan** (`PLAN.md`):
|
|
170
|
+
|
|
171
|
+
```markdown
|
|
172
|
+
# Feature: User Authentication
|
|
173
|
+
|
|
174
|
+
- [ ] Create `src/auth/types.ts` with User and Session interfaces
|
|
175
|
+
- [ ] Implement `src/auth/session.ts` with createSession and validateSession
|
|
176
|
+
- [ ] Add JWT signing in `src/auth/jwt.ts`
|
|
177
|
+
- [ ] Write tests in `src/auth/__tests__/session.test.ts`
|
|
178
|
+
- [ ] Update `src/index.ts` to export auth module
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Command template** (`.claude/commands/work-plan.md`):
|
|
182
|
+
|
|
183
|
+
```markdown
|
|
184
|
+
Read $1 and find the first unchecked item (- [ ]).
|
|
185
|
+
|
|
186
|
+
1. Implement that single item
|
|
187
|
+
2. Mark it complete by changing `- [ ]` to `- [x]`
|
|
188
|
+
3. Check if any unchecked items remain:
|
|
189
|
+
- If YES: output :::RUNNER::REPEAT_STEP:::
|
|
190
|
+
- If NO: output "All tasks complete"
|
|
191
|
+
|
|
192
|
+
If blocked, output :::RUNNER::BLOCKED::: with what you need.
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Run it:**
|
|
132
196
|
|
|
133
197
|
```bash
|
|
134
|
-
claude-code-runner
|
|
198
|
+
claude-code-runner command work-plan PLAN.md
|
|
135
199
|
```
|
|
136
200
|
|
|
137
|
-
|
|
201
|
+
Each invocation: Claude finds the next unchecked step → implements it → marks it done → signals `REPEAT_STEP`. The loop continues until all boxes are checked. The document itself becomes persistent state across runs.
|
|
202
|
+
|
|
203
|
+
### Self-Correcting Loops
|
|
204
|
+
|
|
205
|
+
For retry-based patterns where Claude validates its own work:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
claude-code-runner prompt "Fix all lint errors. Run the linter after each fix. Output :::RUNNER::REPEAT_STEP::: if errors remain, nothing if clean."
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Or as a template (`.claude/commands/fix-tests.md`):
|
|
138
212
|
|
|
139
213
|
```markdown
|
|
140
214
|
Run the test suite for $1.
|
|
141
215
|
|
|
142
|
-
- If tests
|
|
143
|
-
- If tests fail and
|
|
216
|
+
- If tests pass: done
|
|
217
|
+
- If tests fail and fixable: fix them, output :::RUNNER::REPEAT_STEP:::
|
|
218
|
+
- If tests fail and stuck: output :::RUNNER::BLOCKED::: with explanation
|
|
144
219
|
```
|
|
145
220
|
|
|
146
|
-
This pattern enables self-correcting loops: Claude attempts a fix, signals `REPEAT_STEP` to retry, and exits when done or stuck.
|
|
147
|
-
|
|
148
221
|
**Defaults:**
|
|
149
222
|
|
|
150
223
|
- Max 10 iterations per command (prevents runaway loops)
|
|
@@ -156,7 +229,7 @@ For CI/CD integration:
|
|
|
156
229
|
|
|
157
230
|
| Code | Meaning |
|
|
158
231
|
| ---- | -------------------------------------------- |
|
|
159
|
-
| 0 | Success (
|
|
232
|
+
| 0 | Success (no signal or clean exit) |
|
|
160
233
|
| 1 | Error (`ERROR`, `BLOCKED`, or non-zero exit) |
|
|
161
234
|
|
|
162
235
|
## Logs
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -9,9 +9,6 @@ import type { ParsedArgs } from '../types/index.js';
|
|
|
9
9
|
export declare function parseCommandLine(line: string): {
|
|
10
10
|
prompt: string;
|
|
11
11
|
};
|
|
12
|
-
/**
|
|
13
|
-
* Parse CLI arguments
|
|
14
|
-
*/
|
|
15
12
|
export declare function parseArgs(args: string[]): ParsedArgs;
|
|
16
13
|
/**
|
|
17
14
|
* Print usage information
|
package/dist/cli/args.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,OAAO,KAAK,EACV,UAAU,EAIX,MAAM,mBAAmB,CAAC;AAkD3B;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAmBjE;
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,OAAO,KAAK,EACV,UAAU,EAIX,MAAM,mBAAmB,CAAC;AAkD3B;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAmBjE;AAWD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAwGpD;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CA2BjC"}
|
package/dist/cli/args.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI argument parsing
|
|
3
3
|
*/
|
|
4
|
-
import * as fs from 'fs';
|
|
5
4
|
import { createRequire } from 'module';
|
|
5
|
+
import { loadScript } from '../script/index.js';
|
|
6
6
|
import { loadCommandTemplate } from '../templates/command.js';
|
|
7
7
|
const require = createRequire(import.meta.url);
|
|
8
8
|
const pkg = require('../../package.json');
|
|
@@ -78,13 +78,32 @@ export function parseCommandLine(line) {
|
|
|
78
78
|
/**
|
|
79
79
|
* Parse CLI arguments
|
|
80
80
|
*/
|
|
81
|
+
const VALID_SUBCOMMANDS = ['prompt', 'command', 'script'];
|
|
82
|
+
function isValidSubcommand(value) {
|
|
83
|
+
return VALID_SUBCOMMANDS.includes(value);
|
|
84
|
+
}
|
|
81
85
|
export function parseArgs(args) {
|
|
82
86
|
const { positionalArgs, verbosity, enableLog, model, deaddrop } = extractOptions(args);
|
|
83
|
-
const
|
|
87
|
+
const firstArg = positionalArgs[0];
|
|
88
|
+
// Validate subcommand
|
|
89
|
+
if (!firstArg) {
|
|
90
|
+
console.error('Error: subcommand required');
|
|
91
|
+
console.error('Usage: claude-code-runner <prompt|command|script> [args...]');
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
if (!isValidSubcommand(firstArg)) {
|
|
95
|
+
console.error(`Error: unknown subcommand '${firstArg}'`);
|
|
96
|
+
console.error('Valid subcommands: prompt, command, script');
|
|
97
|
+
console.error('Usage: claude-code-runner <prompt|command|script> [args...]');
|
|
98
|
+
process.exit(1);
|
|
99
|
+
}
|
|
100
|
+
const subcommand = firstArg;
|
|
84
101
|
let prompt = '';
|
|
85
102
|
let displayCommand = '';
|
|
86
103
|
let scriptMode = false;
|
|
87
104
|
let scriptLines = [];
|
|
105
|
+
let scriptFile = null;
|
|
106
|
+
let scriptArgs = [];
|
|
88
107
|
let frontmatterModel = null;
|
|
89
108
|
switch (subcommand) {
|
|
90
109
|
case 'command': {
|
|
@@ -101,30 +120,40 @@ export function parseArgs(args) {
|
|
|
101
120
|
break;
|
|
102
121
|
}
|
|
103
122
|
case 'script': {
|
|
104
|
-
const
|
|
105
|
-
if (!
|
|
123
|
+
const file = positionalArgs[1];
|
|
124
|
+
if (!file) {
|
|
106
125
|
console.error('Error: script file required');
|
|
107
|
-
console.error('Usage: claude-code-runner script <file>');
|
|
108
|
-
process.exit(1);
|
|
109
|
-
}
|
|
110
|
-
if (!fs.existsSync(scriptFile)) {
|
|
111
|
-
console.error(`Error: script file not found: ${scriptFile}`);
|
|
126
|
+
console.error('Usage: claude-code-runner script <file> [args...]');
|
|
112
127
|
process.exit(1);
|
|
113
128
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
129
|
+
scriptFile = file;
|
|
130
|
+
scriptArgs = positionalArgs.slice(2);
|
|
131
|
+
const parsed = loadScript(file, scriptArgs);
|
|
132
|
+
// Convert parsed lines to display strings for backward compat
|
|
133
|
+
scriptLines = parsed.lines.map((line) => {
|
|
134
|
+
if (line.type === 'prompt') {
|
|
135
|
+
const text = line.text.length > 50 ? line.text.slice(0, 50) + '...' : line.text;
|
|
136
|
+
return `prompt("${text}")${line.capture ? ` -> $${line.capture}` : ''}`;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
return `command("${line.name}")${line.capture ? ` -> $${line.capture}` : ''}`;
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
frontmatterModel = parsed.frontmatter.model ?? null;
|
|
119
143
|
scriptMode = true;
|
|
120
|
-
displayCommand =
|
|
144
|
+
displayCommand = positionalArgs.slice(1).join(' ');
|
|
121
145
|
break;
|
|
122
146
|
}
|
|
123
|
-
case 'prompt':
|
|
124
|
-
prompt =
|
|
125
|
-
|
|
147
|
+
case 'prompt': {
|
|
148
|
+
prompt = positionalArgs.slice(1).join(' ');
|
|
149
|
+
if (!prompt) {
|
|
150
|
+
console.error('Error: prompt text required');
|
|
151
|
+
console.error('Usage: claude-code-runner prompt <text>');
|
|
152
|
+
process.exit(1);
|
|
153
|
+
}
|
|
126
154
|
displayCommand = `"${prompt}"`;
|
|
127
155
|
break;
|
|
156
|
+
}
|
|
128
157
|
}
|
|
129
158
|
const config = {
|
|
130
159
|
verbosity,
|
|
@@ -139,6 +168,8 @@ export function parseArgs(args) {
|
|
|
139
168
|
scriptLines,
|
|
140
169
|
scriptMode,
|
|
141
170
|
config,
|
|
171
|
+
scriptFile,
|
|
172
|
+
scriptArgs,
|
|
142
173
|
};
|
|
143
174
|
}
|
|
144
175
|
/**
|
|
@@ -151,12 +182,12 @@ Claude Code Runner - executes claude CLI with proper TTY handling
|
|
|
151
182
|
Usage:
|
|
152
183
|
claude-code-runner [options] prompt <prompt>
|
|
153
184
|
claude-code-runner [options] command <name> [args...]
|
|
154
|
-
claude-code-runner [options] script <file>
|
|
185
|
+
claude-code-runner [options] script <file> [args...]
|
|
155
186
|
|
|
156
187
|
Subcommands:
|
|
157
188
|
prompt <text> Run with the given prompt (supports RUNNER signals)
|
|
158
189
|
command <name> [args] Load .claude/commands/<name>.md (supports RUNNER signals)
|
|
159
|
-
script <file>
|
|
190
|
+
script <file> [args] Run commands from file, stop on ERROR/BLOCKED
|
|
160
191
|
|
|
161
192
|
Iteration Signals (control runner execution):
|
|
162
193
|
:::RUNNER::REPEAT_STEP::: Run the same step again
|
package/dist/cli/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,O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cAAc,GAAG,IAAI,MAAM,GAAG,CAAC;YAC/B,MAAM;QACR,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAA0B;QACpC,SAAS;QACT,SAAS;QACT,KAAK,EAAE,KAAK,IAAI,gBAAgB;QAChC,QAAQ;KACT,CAAC;IAEF,OAAO;QACL,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU;QAC9C,MAAM;QACN,cAAc;QACd,WAAW;QACX,UAAU;QACV,MAAM;QACN,UAAU;QACV,UAAU;KACX,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAyBb,CAAC,CAAC;AACH,CAAC"}
|
package/dist/core/runner.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { FormatterState } from '../output/formatter.js';
|
|
5
5
|
import type { Logger } from '../output/logger.js';
|
|
6
|
-
import type { RunnerConfig,
|
|
6
|
+
import type { RunnerConfig, SignalRunResult } from '../types/runner.js';
|
|
7
7
|
export interface RunnerContext {
|
|
8
8
|
config: RunnerConfig;
|
|
9
9
|
logger: Logger;
|
|
@@ -11,9 +11,12 @@ export interface RunnerContext {
|
|
|
11
11
|
cwd: string;
|
|
12
12
|
runId: string | null;
|
|
13
13
|
}
|
|
14
|
+
export interface StepContext {
|
|
15
|
+
stepNum: number;
|
|
16
|
+
}
|
|
14
17
|
/**
|
|
15
18
|
* Run a command with RUNNER signal support
|
|
16
19
|
* Handles iteration loop and signal detection
|
|
17
20
|
*/
|
|
18
|
-
export declare function runWithSignals(promptText: string, displayCommand: string, startTime: number, context: RunnerContext): Promise<
|
|
21
|
+
export declare function runWithSignals(promptText: string, displayCommand: string, startTime: number, context: RunnerContext, step?: StepContext): Promise<SignalRunResult>;
|
|
19
22
|
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/core/runner.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/core/runner.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,KAAK,EACV,YAAY,EAEZ,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,cAAc,CAAC;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,aAAa,EACtB,IAAI,GAAE,WAA4B,GACjC,OAAO,CAAC,eAAe,CAAC,CAuF1B"}
|
package/dist/core/runner.js
CHANGED
|
@@ -8,10 +8,11 @@ import { spawnClaude } from '../process/pty.js';
|
|
|
8
8
|
* Run a command with RUNNER signal support
|
|
9
9
|
* Handles iteration loop and signal detection
|
|
10
10
|
*/
|
|
11
|
-
export async function runWithSignals(promptText, displayCommand, startTime, context) {
|
|
12
|
-
const { config, logger, formatterState, cwd
|
|
11
|
+
export async function runWithSignals(promptText, displayCommand, startTime, context, step = { stepNum: 1 }) {
|
|
12
|
+
const { config, logger, formatterState, cwd } = context;
|
|
13
13
|
const { verbosity, maxIterations, parallelThresholdMs, iterationPauseMs, model, } = config;
|
|
14
14
|
let iteration = 0;
|
|
15
|
+
let lastClaudeText = '';
|
|
15
16
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- intentional infinite loop with internal exits
|
|
16
17
|
while (true) {
|
|
17
18
|
iteration++;
|
|
@@ -20,7 +21,7 @@ export async function runWithSignals(promptText, displayCommand, startTime, cont
|
|
|
20
21
|
const totalDuration = Date.now() - startTime;
|
|
21
22
|
printRunner(`${colors.red}Run stopped${colors.reset} max iterations (${maxIterations}) in ${formatDuration(totalDuration)}`);
|
|
22
23
|
logger.log(`\nMAX ITERATIONS reached after ${maxIterations}`);
|
|
23
|
-
return 'error';
|
|
24
|
+
return { status: 'error', claudeText: lastClaudeText };
|
|
24
25
|
}
|
|
25
26
|
// Log iteration for subsequent iterations
|
|
26
27
|
if (iteration > 1) {
|
|
@@ -28,7 +29,9 @@ export async function runWithSignals(promptText, displayCommand, startTime, cont
|
|
|
28
29
|
}
|
|
29
30
|
// Print running message
|
|
30
31
|
if (verbosity !== 'quiet') {
|
|
31
|
-
|
|
32
|
+
const iterLabel = iteration > 1 ? ` (iter ${iteration})` : '';
|
|
33
|
+
const separator = displayCommand.startsWith('with ') ? ' ' : ': ';
|
|
34
|
+
printRunner(`Running step ${step.stepNum}${iterLabel}${separator}${displayCommand}`);
|
|
32
35
|
}
|
|
33
36
|
// Update formatter with current step
|
|
34
37
|
formatterState.currentStep = iteration;
|
|
@@ -42,32 +45,32 @@ export async function runWithSignals(promptText, displayCommand, startTime, cont
|
|
|
42
45
|
parallelThresholdMs,
|
|
43
46
|
model,
|
|
44
47
|
});
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
logger.log(`\nBLOCKED after ${iteration} iterations, ${totalSeconds}s total`);
|
|
53
|
-
return 'blocked';
|
|
48
|
+
lastClaudeText = claudeText;
|
|
49
|
+
const signal = detectRunnerSignal(claudeText);
|
|
50
|
+
const stepDuration = Date.now() - startTime;
|
|
51
|
+
if (signal === 'blocked') {
|
|
52
|
+
printRunner(`${colors.red}Blocked${colors.reset} step ${step.stepNum} in ${formatDuration(stepDuration)}`);
|
|
53
|
+
logger.log(`\nBLOCKED at step ${step.stepNum}`);
|
|
54
|
+
return { status: 'blocked', claudeText };
|
|
54
55
|
}
|
|
55
|
-
else if (
|
|
56
|
-
printRunner(`${colors.red}Failed
|
|
57
|
-
logger.log(`\nERROR
|
|
58
|
-
return 'error';
|
|
56
|
+
else if (signal === 'error') {
|
|
57
|
+
printRunner(`${colors.red}Failed${colors.reset} step ${step.stepNum} in ${formatDuration(stepDuration)}`);
|
|
58
|
+
logger.log(`\nERROR at step ${step.stepNum}`);
|
|
59
|
+
return { status: 'error', claudeText };
|
|
59
60
|
}
|
|
60
|
-
else if (
|
|
61
|
-
printRunner(`
|
|
62
|
-
logger.log(`Iteration ${iteration} complete,
|
|
61
|
+
else if (signal === 'repeat_step') {
|
|
62
|
+
printRunner(`Repeating step ${step.stepNum}`);
|
|
63
|
+
logger.log(`Iteration ${iteration} complete, repeating...`);
|
|
63
64
|
await sleep(iterationPauseMs);
|
|
64
65
|
}
|
|
65
66
|
else {
|
|
66
|
-
// No
|
|
67
|
+
// No signal - step completed
|
|
67
68
|
const exitStatus = exitCode === 0 ? 'ok' : 'error';
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
if (exitCode !== 0) {
|
|
70
|
+
printRunner(`${colors.red}Failed${colors.reset} step ${step.stepNum} in ${formatDuration(stepDuration)}`);
|
|
71
|
+
}
|
|
72
|
+
logger.log(`\nStep ${step.stepNum} complete, exit=${exitCode}`);
|
|
73
|
+
return { status: exitStatus, claudeText };
|
|
71
74
|
}
|
|
72
75
|
}
|
|
73
76
|
}
|
package/dist/core/runner.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/core/runner.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAG1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/core/runner.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAG1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAmBhD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,UAAkB,EAClB,cAAsB,EACtB,SAAiB,EACjB,OAAsB,EACtB,OAAoB,EAAE,OAAO,EAAE,CAAC,EAAE;IAElC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IACxD,MAAM,EACJ,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,GACN,GAAG,MAAM,CAAC;IAEX,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,IAAI,cAAc,GAAG,EAAE,CAAC;IAExB,wHAAwH;IACxH,OAAO,IAAI,EAAE,CAAC;QACZ,SAAS,EAAE,CAAC;QAEZ,uBAAuB;QACvB,IAAI,SAAS,GAAG,aAAa,EAAE,CAAC;YAC9B,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;YAC7C,WAAW,CACT,GAAG,MAAM,CAAC,GAAG,cAAc,MAAM,CAAC,KAAK,oBAAoB,aAAa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