@litmers/cursorflow-orchestrator 0.1.12 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +83 -2
  3. package/commands/cursorflow-clean.md +20 -6
  4. package/commands/cursorflow-prepare.md +1 -1
  5. package/commands/cursorflow-resume.md +127 -6
  6. package/commands/cursorflow-run.md +2 -2
  7. package/commands/cursorflow-signal.md +11 -4
  8. package/dist/cli/clean.js +164 -12
  9. package/dist/cli/clean.js.map +1 -1
  10. package/dist/cli/index.d.ts +1 -0
  11. package/dist/cli/index.js +6 -1
  12. package/dist/cli/index.js.map +1 -1
  13. package/dist/cli/logs.d.ts +8 -0
  14. package/dist/cli/logs.js +746 -0
  15. package/dist/cli/logs.js.map +1 -0
  16. package/dist/cli/monitor.js +113 -30
  17. package/dist/cli/monitor.js.map +1 -1
  18. package/dist/cli/prepare.js +1 -1
  19. package/dist/cli/resume.js +367 -18
  20. package/dist/cli/resume.js.map +1 -1
  21. package/dist/cli/run.js +2 -0
  22. package/dist/cli/run.js.map +1 -1
  23. package/dist/cli/signal.js +34 -20
  24. package/dist/cli/signal.js.map +1 -1
  25. package/dist/core/orchestrator.d.ts +11 -1
  26. package/dist/core/orchestrator.js +257 -35
  27. package/dist/core/orchestrator.js.map +1 -1
  28. package/dist/core/reviewer.js +20 -0
  29. package/dist/core/reviewer.js.map +1 -1
  30. package/dist/core/runner.js +113 -13
  31. package/dist/core/runner.js.map +1 -1
  32. package/dist/utils/config.js +34 -0
  33. package/dist/utils/config.js.map +1 -1
  34. package/dist/utils/doctor.js +9 -2
  35. package/dist/utils/doctor.js.map +1 -1
  36. package/dist/utils/enhanced-logger.d.ts +209 -0
  37. package/dist/utils/enhanced-logger.js +963 -0
  38. package/dist/utils/enhanced-logger.js.map +1 -0
  39. package/dist/utils/events.d.ts +59 -0
  40. package/dist/utils/events.js +37 -0
  41. package/dist/utils/events.js.map +1 -0
  42. package/dist/utils/git.d.ts +5 -0
  43. package/dist/utils/git.js +25 -0
  44. package/dist/utils/git.js.map +1 -1
  45. package/dist/utils/types.d.ts +122 -1
  46. package/dist/utils/webhook.d.ts +5 -0
  47. package/dist/utils/webhook.js +109 -0
  48. package/dist/utils/webhook.js.map +1 -0
  49. package/examples/README.md +1 -1
  50. package/package.json +1 -1
  51. package/scripts/simple-logging-test.sh +97 -0
  52. package/scripts/test-real-logging.sh +289 -0
  53. package/scripts/test-streaming-multi-task.sh +247 -0
  54. package/src/cli/clean.ts +170 -13
  55. package/src/cli/index.ts +4 -1
  56. package/src/cli/logs.ts +848 -0
  57. package/src/cli/monitor.ts +123 -30
  58. package/src/cli/prepare.ts +1 -1
  59. package/src/cli/resume.ts +463 -22
  60. package/src/cli/run.ts +2 -0
  61. package/src/cli/signal.ts +43 -27
  62. package/src/core/orchestrator.ts +303 -37
  63. package/src/core/reviewer.ts +22 -0
  64. package/src/core/runner.ts +128 -12
  65. package/src/utils/config.ts +36 -0
  66. package/src/utils/doctor.ts +12 -2
  67. package/src/utils/enhanced-logger.ts +1097 -0
  68. package/src/utils/events.ts +117 -0
  69. package/src/utils/git.ts +25 -0
  70. package/src/utils/types.ts +150 -1
  71. package/src/utils/webhook.ts +85 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,46 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.14] - 2025-12-21
9
+
10
+ ### Added
11
+ - **Enhanced Logging System**: Comprehensive terminal output capture and management
12
+ - ANSI escape sequence stripping for clean, readable logs
13
+ - Automatic timestamps on each log line (ISO, relative, or short format)
14
+ - Log rotation with configurable max size and file retention
15
+ - Separate raw logs (with ANSI codes) and clean logs
16
+ - Structured JSON logs (`terminal.jsonl`) for programmatic access
17
+ - **Streaming JSON output** from cursor-agent (`--output-format stream-json`)
18
+ - Streaming message parser for real-time log processing
19
+ - Session headers with context (lane name, task, model, timestamps)
20
+ - **Log Viewer CLI**: New `cursorflow logs` command
21
+ - View logs for specific lanes with `--lane <name>`
22
+ - **View all lanes merged**: `--all` or `-a` for unified timeline view
23
+ - Follow logs in real-time with `--follow` or `-f` (works with `--all`)
24
+ - Export to multiple formats: text, json, markdown, html
25
+ - Filter by regex pattern with `--filter`
26
+ - Filter by log level with `--level`
27
+ - Tail last N lines with `--tail`
28
+ - Color-coded lanes in merged view for easy identification
29
+ - **Logging Configuration**: New `enhancedLogging` section in `cursorflow.config.js`
30
+ - `enabled`: Toggle enhanced logging (default: true)
31
+ - `stripAnsi`: Remove ANSI codes from clean logs (default: true)
32
+ - `addTimestamps`: Prepend timestamps to lines (default: true)
33
+ - `maxFileSize`: Rotation threshold in bytes (default: 50MB)
34
+ - `maxFiles`: Number of rotated files to keep (default: 5)
35
+ - `keepRawLogs`: Store raw logs separately (default: true)
36
+ - `writeJsonLog`: Generate structured JSON logs (default: true)
37
+ - `timestampFormat`: 'iso' | 'relative' | 'short' (default: 'iso')
38
+ - **Event System**: New `events.ts` module for structured event handling
39
+ - **Webhook Support**: New `webhook.ts` for external integrations
40
+
41
+ ## [0.1.13] - 2025-12-21
42
+
43
+ ### Fixed
44
+ - **Orchestration**: Fixed a bug where blocked lanes (exit code 2) were treated as completed, causing dependent lanes to start prematurely.
45
+ - **Security**: Fixed command injection vulnerability in `checkDiskSpace` by using `spawnSync` instead of `execSync`.
46
+ - **Workflow**: Updated security scanner to latest Semgrep Action.
47
+
8
48
  ## [0.1.12] - 2025-12-21
9
49
 
10
50
  ### Added
package/README.md CHANGED
@@ -101,7 +101,7 @@ Within the `cursorflow monitor` dashboard:
101
101
  {
102
102
  "baseBranch": "main",
103
103
  "branchPrefix": "feature/lane-1-",
104
- "timeout": 300000,
104
+ "timeout": 600000,
105
105
  "enableIntervention": false,
106
106
  "dependsOn": ["01-lane-1"],
107
107
  "enableReview": true,
@@ -121,7 +121,7 @@ Within the `cursorflow monitor` dashboard:
121
121
 
122
122
  | Option | Type | Default | Description |
123
123
  |--------|------|---------|-------------|
124
- | `timeout` | number | 300000 | Task timeout in milliseconds (5 min) |
124
+ | `timeout` | number | 600000 | Task timeout in milliseconds (10 min) |
125
125
  | `enableIntervention` | boolean | false | Enable stdin piping for intervention |
126
126
  | `model` | string | "sonnet-4.5" | AI model to use |
127
127
  | `dependsOn` | string[] | [] | Lane dependencies |
@@ -168,6 +168,87 @@ cursorflow doctor --tasks-dir _cursorflow/tasks/my-feature
168
168
  | `cursorflow clean` | Clean branches/worktrees |
169
169
  | `cursorflow signal` | Send message to running agent |
170
170
  | `cursorflow models` | List available AI models |
171
+ | `cursorflow logs` | View, export, and follow logs |
172
+
173
+ ## 📝 Enhanced Logging
174
+
175
+ CursorFlow provides comprehensive logging with automatic cleanup and export options:
176
+
177
+ ### Features
178
+ - **ANSI Stripping**: Clean logs without terminal escape codes
179
+ - **Timestamps**: Automatic timestamps on each line (ISO, relative, or short format)
180
+ - **Log Rotation**: Automatic rotation when files exceed size limits
181
+ - **Multiple Formats**:
182
+ - `terminal.log` - Clean, readable logs
183
+ - `terminal-raw.log` - Raw logs with ANSI codes
184
+ - `terminal.jsonl` - Structured JSON for programmatic access
185
+
186
+ ### Usage
187
+
188
+ ```bash
189
+ # View logs summary for latest run
190
+ cursorflow logs
191
+
192
+ # View specific lane logs
193
+ cursorflow logs --lane api-setup
194
+
195
+ # View ALL lanes merged (unified timeline)
196
+ cursorflow logs --all
197
+
198
+ # Follow all lanes in real-time
199
+ cursorflow logs --all --follow
200
+
201
+ # Follow logs in real-time
202
+ cursorflow logs --lane api-setup --follow
203
+
204
+ # Export to different formats
205
+ cursorflow logs --lane api-setup --format json --output logs.json
206
+ cursorflow logs --all --format html --output all-logs.html
207
+
208
+ # Filter logs
209
+ cursorflow logs --all --filter "error|failed"
210
+ cursorflow logs --all --level stderr
211
+ cursorflow logs --lane api-setup --level error --tail 50
212
+ ```
213
+
214
+ ### Merged Logs View (`--all`)
215
+
216
+ When running multiple lanes, use `--all` to see a unified timeline:
217
+
218
+ ```
219
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
220
+ 🔀 Merged Logs - run-123 (45 entries from 3 lanes)
221
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
222
+
223
+ Lanes: ■ api-setup ■ frontend ■ database
224
+
225
+ [10:15:30] [api-setup ] [STDOUT] Starting API setup...
226
+ [10:15:31] [frontend ] [STDOUT] Setting up React...
227
+ [10:15:32] [database ] [STDOUT] Creating schema...
228
+ [10:15:33] [api-setup ] [STDOUT] Endpoints created
229
+ [10:15:34] [frontend ] [STDERR] Warning: Deprecated API
230
+ ...
231
+ ```
232
+
233
+ ### Configuration
234
+
235
+ Add to `cursorflow.config.js`:
236
+
237
+ ```javascript
238
+ module.exports = {
239
+ // ... other config ...
240
+ enhancedLogging: {
241
+ enabled: true, // Enable enhanced logging
242
+ stripAnsi: true, // Strip ANSI codes for clean logs
243
+ addTimestamps: true, // Add timestamps to each line
244
+ maxFileSize: 52428800, // 50MB max before rotation
245
+ maxFiles: 5, // Keep 5 rotated files
246
+ keepRawLogs: true, // Keep raw logs separately
247
+ writeJsonLog: true, // Generate JSON logs
248
+ timestampFormat: 'iso', // 'iso' | 'relative' | 'short'
249
+ },
250
+ };
251
+ ```
171
252
 
172
253
  ## 📖 Documentation
173
254
 
@@ -1,7 +1,7 @@
1
1
  # CursorFlow Clean
2
2
 
3
3
  ## Overview
4
- Clean up temporary resources created by CursorFlow, including Git worktrees, feature branches, and log files.
4
+ Clean up temporary resources created by CursorFlow, including Git worktrees, feature branches, log files, and task definitions.
5
5
 
6
6
  ## Usage
7
7
 
@@ -16,7 +16,8 @@ cursorflow clean <type> [options]
16
16
  | `branches` | Remove local feature branches created by CursorFlow |
17
17
  | `worktrees` | Remove temporary Git worktrees |
18
18
  | `logs` | Clear all run and terminal logs |
19
- | `all` | Clean everything (branches, worktrees, and logs) |
19
+ | `tasks` | Remove task definition directories (keeps `example/`) |
20
+ | `all` | Clean everything (branches, worktrees, logs, and tasks) |
20
21
 
21
22
  ## Options
22
23
 
@@ -24,23 +25,29 @@ cursorflow clean <type> [options]
24
25
  |------|------|
25
26
  | `--dry-run` | Show what would be removed without actually deleting anything |
26
27
  | `--force` | Force removal (ignore uncommitted changes in worktrees) |
28
+ | `--include-latest` | Also remove the most recent item (by default, latest is kept) |
27
29
  | `--help`, `-h` | Show help |
28
30
 
29
31
  ## Examples
30
32
 
31
- ### Review before deleting
33
+ ### Review before deleting (latest is kept by default)
32
34
  ```bash
33
35
  cursorflow clean all --dry-run
34
36
  ```
35
37
 
36
- ### Clean only worktrees
38
+ ### Clean only worktrees (keeps the latest worktree)
37
39
  ```bash
38
40
  cursorflow clean worktrees
39
41
  ```
40
42
 
41
- ### Force clean everything
43
+ ### Force clean everything including the latest
42
44
  ```bash
43
- cursorflow clean all --force
45
+ cursorflow clean all --force --include-latest
46
+ ```
47
+
48
+ ### Remove all worktrees including the latest
49
+ ```bash
50
+ cursorflow clean worktrees --include-latest
44
51
  ```
45
52
 
46
53
  ## Notes
@@ -49,3 +56,10 @@ cursorflow clean all --force
49
56
  2. **Worktrees**: The command identifies CursorFlow worktrees by their location (usually in `_cursorflow/worktrees/`) or their prefix.
50
57
  3. **Branches**: Only branches starting with the configured `branchPrefix` (default: `cursorflow/`) are targeted.
51
58
  4. **Irreversible**: Once logs are deleted, they cannot be recovered.
59
+ 5. **Default Behavior**: By default, the most recent item is preserved. The "most recent" is determined by:
60
+ - **Worktrees**: Directory modification time
61
+ - **Branches**: Latest commit timestamp
62
+ - **Logs**: File/directory modification time
63
+ - **Tasks**: Directory modification time
64
+
65
+ Use `--include-latest` to remove everything including the most recent item.
@@ -380,7 +380,7 @@ _cursorflow/tasks/2412211530_FeatureName/
380
380
  {
381
381
  "baseBranch": "main",
382
382
  "branchPrefix": "featurename/lane-1-",
383
- "timeout": 300000,
383
+ "timeout": 600000,
384
384
  "enableIntervention": false,
385
385
  "dependencyPolicy": {
386
386
  "allowDependencyChange": false,
@@ -1,12 +1,14 @@
1
1
  # CursorFlow Resume
2
2
 
3
3
  ## Overview
4
- Resume a lane that was interrupted or failed. CursorFlow allows you to continue from where the agent left off or restart the lane from the first task.
4
+ Resume lanes that were interrupted or failed. CursorFlow allows you to continue from where the agent left off, restart from the first task, or resume all incomplete lanes at once.
5
5
 
6
6
  ## Usage
7
7
 
8
8
  ```bash
9
- cursorflow resume <lane-name> [options]
9
+ cursorflow resume [lane-name] [options]
10
+ cursorflow resume --status # Check status of all lanes
11
+ cursorflow resume --all # Resume all incomplete lanes
10
12
  ```
11
13
 
12
14
  ## Options
@@ -14,17 +16,82 @@ cursorflow resume <lane-name> [options]
14
16
  | Option | Description |
15
17
  |------|------|
16
18
  | `<lane-name>` | The name of the lane to resume (e.g., `lane-1`) |
19
+ | `--status` | Show status of all lanes in the run (no resume) |
20
+ | `--all` | Resume ALL incomplete/failed lanes automatically |
17
21
  | `--run-dir <path>` | Use a specific run directory (default: latest) |
18
- | `--restart` | Restart the lane from the very first task |
22
+ | `--max-concurrent <n>` | Max lanes to run in parallel when using `--all` (default: 3) |
23
+ | `--restart` | Restart from the first task (index 0) |
19
24
  | `--clean` | Clean up the existing worktree before resuming |
20
25
  | `--skip-doctor` | Skip pre-resume checks (not recommended) |
21
26
 
27
+ ## Checking Lane Status
28
+
29
+ Before resuming, you can check the status of all lanes:
30
+
31
+ ```bash
32
+ cursorflow resume --status
33
+ ```
34
+
35
+ This displays a table showing:
36
+ - Lane name
37
+ - Current status (completed, failed, running, paused, etc.)
38
+ - Progress (current task / total tasks)
39
+ - Whether the lane needs to be resumed
40
+
41
+ Example output:
42
+ ```
43
+ 📊 Lane Status (run-1703145600000)
44
+
45
+ Lane Status Progress Needs Resume
46
+ ------------------------------------------------------------
47
+ 01-lane-auth completed 3/3
48
+ 02-lane-api failed 1/3 ✓
49
+ └─ Error: cursor-agent timed out...
50
+ 03-lane-ui running 2/3 ✓
51
+
52
+ Total: 3 | Completed: 1 | Needs Resume: 2
53
+
54
+ Tip: Run cursorflow resume --all to resume all incomplete lanes
55
+ ```
56
+
57
+ ## Resuming All Incomplete Lanes
58
+
59
+ The most common use case after interruption:
60
+
61
+ ```bash
62
+ # Check what needs to be resumed
63
+ cursorflow resume --status
64
+
65
+ # Resume all incomplete lanes
66
+ cursorflow resume --all
67
+
68
+ # Resume with custom concurrency
69
+ cursorflow resume --all --max-concurrent 2
70
+
71
+ # Restart all incomplete lanes from the beginning
72
+ cursorflow resume --all --restart
73
+ ```
74
+
22
75
  ## How it works
76
+
77
+ ### Single Lane Resume
23
78
  1. **Pre-flight Checks**: Runs doctor validation to check for branch conflicts and Git issues.
24
79
  2. **State Loading**: Reads the `state.json` for the specified lane to find the last successful task.
25
80
  3. **Environment Restore**: Verifies the Git worktree and branch for the lane.
26
81
  4. **Execution**: Spawns a new runner that starts either from the current task index or from index 0 if `--restart` is used.
27
82
 
83
+ ### Resume All (`--all`)
84
+ 1. **Status Check**: Scans all lanes in the run directory.
85
+ 2. **Filter**: Identifies lanes that need resuming (failed, paused, interrupted).
86
+ 3. **Dependency Analysis**:
87
+ - Checks each lane's `dependsOn` field
88
+ - Skips lanes with unresolvable dependencies (deps not completed and not in resume list)
89
+ - Orders execution so lanes wait for their dependencies to complete first
90
+ 4. **Pre-flight Checks**: Runs doctor validation once for the entire run.
91
+ 5. **Parallel Execution**: Spawns runners for multiple lanes with concurrency control.
92
+ 6. **Dependency-Aware Scheduling**: Only starts a lane when all its dependencies have completed.
93
+ 7. **Progress Tracking**: Reports success/failure/skipped for each lane.
94
+
28
95
  ## Pre-resume Validation
29
96
 
30
97
  Before resuming, CursorFlow automatically runs validation checks:
@@ -35,11 +102,22 @@ Before resuming, CursorFlow automatically runs validation checks:
35
102
  To skip these checks (not recommended):
36
103
  ```bash
37
104
  cursorflow resume lane-1 --skip-doctor
105
+ cursorflow resume --all --skip-doctor
38
106
  ```
39
107
 
40
108
  ## Examples
41
109
 
42
- ### Resume a failed lane
110
+ ### Check status of all lanes
111
+ ```bash
112
+ cursorflow resume --status
113
+ ```
114
+
115
+ ### Resume all incomplete lanes
116
+ ```bash
117
+ cursorflow resume --all
118
+ ```
119
+
120
+ ### Resume a single failed lane
43
121
  ```bash
44
122
  cursorflow resume 01-lane-1
45
123
  ```
@@ -51,13 +129,49 @@ cursorflow resume 02-lane-2 --restart
51
129
 
52
130
  ### Resume from an older run
53
131
  ```bash
54
- cursorflow resume 01-lane-1 --run-dir _cursorflow/logs/runs/run-123456789/
132
+ cursorflow resume --status --run-dir _cursorflow/logs/runs/run-123456789/
133
+ cursorflow resume --all --run-dir _cursorflow/logs/runs/run-123456789/
55
134
  ```
56
135
 
136
+ ### Resume with limited parallelism
137
+ ```bash
138
+ cursorflow resume --all --max-concurrent 1 # One at a time
139
+ ```
140
+
141
+ ## Dependency Handling
142
+
143
+ When using `--all`, CursorFlow respects the `dependsOn` field in each lane's configuration:
144
+
145
+ - **Automatic ordering**: Lanes will wait for their dependencies to complete before starting
146
+ - **Skipped lanes**: If a lane depends on another that isn't completed and isn't in the resume queue, it will be skipped
147
+ - **Parallel with deps**: Independent lanes run in parallel; dependent lanes wait
148
+
149
+ Example status output with dependencies:
150
+ ```
151
+ 📊 Lane Status (run-1703145600000)
152
+
153
+ Lane Status Progress DependsOn Resumable
154
+ ---------------------------------------------------------------------------
155
+ 01-lane-core completed 3/3 -
156
+ 02-lane-api failed 1/3 01-lane-core ✓
157
+ 03-lane-ui failed 0/3 02-lane-api ⏳ waiting
158
+ └─ waiting for: 02-lane-api
159
+
160
+ Total: 3 | Completed: 1 | Needs Resume: 2
161
+
162
+ Tip: Run cursorflow resume --all to resume all incomplete lanes
163
+ Lanes with dependencies will wait until their dependencies complete.
164
+ ```
165
+
166
+ In this example:
167
+ - `01-lane-core` is already completed
168
+ - `02-lane-api` can start immediately (its dependency `01-lane-core` is completed)
169
+ - `03-lane-ui` will wait until `02-lane-api` completes
170
+
57
171
  ## Troubleshooting
58
172
 
59
173
  ### State not found
60
- If the command fails because the state is missing, ensure you are providing the correct lane name. Use `cursorflow monitor` to see the names of the lanes in the latest run.
174
+ If the command fails because the state is missing, ensure you are providing the correct lane name. Use `cursorflow resume --status` to see the names of the lanes in the latest run.
61
175
 
62
176
  ### Worktree issues
63
177
  If the worktree directory was manually deleted, use the `--clean` or `--restart` flag to allow CursorFlow to recreate the environment.
@@ -82,3 +196,10 @@ If the task JSON file's `branchPrefix` was changed after the initial run:
82
196
  1. Either restore the original prefix in the JSON
83
197
  2. Or use `--restart` to start fresh with the new prefix
84
198
  3. Or manually clean up old branches with `cursorflow clean branches`
199
+
200
+ ### Some lanes still failing after `--all`
201
+ If some lanes continue to fail after using `--all`:
202
+ 1. Check the specific error with `cursorflow resume --status`
203
+ 2. Try resuming the problematic lane individually with more visibility
204
+ 3. Use `cursorflow monitor` to watch the lane in real-time
205
+ 4. Check the lane's terminal log in `_cursorflow/logs/runs/<run>/lanes/<lane>/`
@@ -136,7 +136,7 @@ Each JSON file in the tasks directory follows this schema:
136
136
  {
137
137
  "baseBranch": "main",
138
138
  "branchPrefix": "feature/lane-1-",
139
- "timeout": 300000,
139
+ "timeout": 600000,
140
140
  "enableIntervention": false,
141
141
  "dependsOn": ["01-lane-1"],
142
142
  "dependencyPolicy": {
@@ -165,7 +165,7 @@ Each JSON file in the tasks directory follows this schema:
165
165
  | `branchPrefix` | string | Yes | Prefix for feature branch naming |
166
166
  | `tasks` | Task[] | Yes | Array of task objects to execute |
167
167
  | `dependsOn` | string[] | No | Lane names to wait for and merge |
168
- | `timeout` | number | No | Task timeout in ms (default: 300000) |
168
+ | `timeout` | number | No | Task timeout in ms (default: 600000) |
169
169
  | `enableIntervention` | boolean | No | Allow stdin injection during execution |
170
170
  | `dependencyPolicy.allowDependencyChange` | boolean | No | Allow package.json modifications |
171
171
  | `dependencyPolicy.lockfileReadOnly` | boolean | No | Keep lockfile read-only |
@@ -7,6 +7,7 @@ Directly intervene in a running lane by sending a message to the agent. This is
7
7
 
8
8
  ```bash
9
9
  cursorflow signal <lane-name> "<message>" [options]
10
+ cursorflow signal <lane-name> --timeout <ms>
10
11
  ```
11
12
 
12
13
  ## Options
@@ -15,24 +16,30 @@ cursorflow signal <lane-name> "<message>" [options]
15
16
  |------|------|
16
17
  | `<lane-name>` | The name of the lane to signal |
17
18
  | `"<message>"` | The text message to send to the agent |
19
+ | `--timeout <ms>` | Update the execution timeout (in milliseconds) |
18
20
  | `--run-dir <path>` | Use a specific run directory (default: latest) |
19
21
 
20
22
  ## How it works
21
- 1. **Logging**: The message is recorded in the lane's conversation history as a system/commander message.
22
- 2. **Injection**: If the lane's task configuration has `enableIntervention: true`, the message is injected into the agent's input stream.
23
+ 1. **Logging**: Intervention messages are recorded in the lane's conversation history.
24
+ 2. **Injection**: If `enableIntervention: true`, messages are injected into the agent's input stream.
25
+ 3. **Dynamic Timeout**: If `--timeout` is used, the active runner receives a signal to reset its internal timer to the new value.
23
26
 
24
- ## Example
27
+ ## Examples
25
28
 
26
29
  ```bash
27
30
  # Provide a hint to a running agent
28
31
  cursorflow signal 01-lane-1 "Make sure to export the new function from index.ts"
32
+
33
+ # Increase timeout to 10 minutes mid-execution
34
+ cursorflow signal 01-lane-1 --timeout 600000
29
35
  ```
30
36
 
31
37
  ## Dashboard Alternative
32
38
  You can also use the interactive monitor to send signals:
33
39
  1. Run `cursorflow monitor latest`.
34
40
  2. Select a lane and enter details (`→`).
35
- 3. Press `I` to type and send an intervention message.
41
+ 3. Press `I` to send an intervention message.
42
+ 4. Press `O` to update the execution timeout.
36
43
 
37
44
  ## Note on Intervention
38
45
  For the agent to receive the signal immediately, the task must be configured with: