@litmers/cursorflow-orchestrator 0.1.3 → 0.1.6
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/CHANGELOG.md +17 -7
- package/README.md +33 -2
- package/commands/cursorflow-doctor.md +24 -0
- package/commands/cursorflow-signal.md +19 -0
- package/dist/cli/clean.d.ts +5 -0
- package/dist/cli/clean.js +57 -0
- package/dist/cli/clean.js.map +1 -0
- package/dist/cli/doctor.d.ts +15 -0
- package/dist/cli/doctor.js +139 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/index.d.ts +6 -0
- package/dist/cli/index.js +125 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init.d.ts +7 -0
- package/dist/cli/init.js +302 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/monitor.d.ts +8 -0
- package/dist/cli/monitor.js +210 -0
- package/dist/cli/monitor.js.map +1 -0
- package/dist/cli/resume.d.ts +5 -0
- package/dist/cli/resume.js +128 -0
- package/dist/cli/resume.js.map +1 -0
- package/dist/cli/run.d.ts +5 -0
- package/dist/cli/run.js +128 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/setup-commands.d.ts +23 -0
- package/dist/cli/setup-commands.js +234 -0
- package/dist/cli/setup-commands.js.map +1 -0
- package/dist/cli/signal.d.ts +7 -0
- package/dist/cli/signal.js +99 -0
- package/dist/cli/signal.js.map +1 -0
- package/dist/core/orchestrator.d.ts +47 -0
- package/dist/core/orchestrator.js +192 -0
- package/dist/core/orchestrator.js.map +1 -0
- package/dist/core/reviewer.d.ts +60 -0
- package/dist/core/reviewer.js +239 -0
- package/dist/core/reviewer.js.map +1 -0
- package/dist/core/runner.d.ts +51 -0
- package/dist/core/runner.js +499 -0
- package/dist/core/runner.js.map +1 -0
- package/dist/utils/config.d.ts +31 -0
- package/dist/utils/config.js +198 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/cursor-agent.d.ts +61 -0
- package/dist/utils/cursor-agent.js +263 -0
- package/dist/utils/cursor-agent.js.map +1 -0
- package/dist/utils/doctor.d.ts +63 -0
- package/dist/utils/doctor.js +280 -0
- package/dist/utils/doctor.js.map +1 -0
- package/dist/utils/git.d.ts +131 -0
- package/dist/utils/git.js +272 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/logger.d.ts +68 -0
- package/dist/utils/logger.js +158 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/state.d.ts +65 -0
- package/dist/utils/state.js +216 -0
- package/dist/utils/state.js.map +1 -0
- package/dist/utils/types.d.ts +118 -0
- package/dist/utils/types.js +6 -0
- package/dist/utils/types.js.map +1 -0
- package/examples/README.md +155 -0
- package/examples/demo-project/README.md +262 -0
- package/examples/demo-project/_cursorflow/tasks/demo-test/01-create-utils.json +18 -0
- package/examples/demo-project/_cursorflow/tasks/demo-test/02-add-tests.json +18 -0
- package/examples/demo-project/_cursorflow/tasks/demo-test/README.md +109 -0
- package/package.json +71 -61
- package/scripts/ai-security-check.js +11 -4
- package/scripts/local-security-gate.sh +76 -0
- package/src/cli/{clean.js → clean.ts} +11 -5
- package/src/cli/doctor.ts +127 -0
- package/src/cli/{index.js → index.ts} +27 -16
- package/src/cli/{init.js → init.ts} +26 -18
- package/src/cli/{monitor.js → monitor.ts} +57 -44
- package/src/cli/resume.ts +119 -0
- package/src/cli/run.ts +109 -0
- package/src/cli/{setup-commands.js → setup-commands.ts} +38 -18
- package/src/cli/signal.ts +89 -0
- package/src/core/{orchestrator.js → orchestrator.ts} +44 -26
- package/src/core/{reviewer.js → reviewer.ts} +36 -29
- package/src/core/{runner.js → runner.ts} +125 -76
- package/src/utils/{config.js → config.ts} +17 -25
- package/src/utils/{cursor-agent.js → cursor-agent.ts} +38 -47
- package/src/utils/doctor.ts +312 -0
- package/src/utils/{git.js → git.ts} +70 -56
- package/src/utils/{logger.js → logger.ts} +170 -178
- package/src/utils/{state.js → state.ts} +30 -38
- package/src/utils/types.ts +134 -0
- package/src/cli/resume.js +0 -31
- package/src/cli/run.js +0 -51
package/CHANGELOG.md
CHANGED
|
@@ -5,15 +5,25 @@ 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
|
-
## [
|
|
8
|
+
## [0.1.6] - 2025-12-21
|
|
9
9
|
|
|
10
10
|
### Added
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
|
|
11
|
+
- `cursorflow doctor` command for environment validation and pre-flight checks
|
|
12
|
+
- `cursorflow signal` command for real-time lane intervention (Intercommander)
|
|
13
|
+
- Auto-installation of Cursor IDE commands on `cursorflow run`
|
|
14
|
+
- Full implementation of `cursorflow resume` to pick up from failed tasks
|
|
15
|
+
- `/cursorflow-doctor` and `/cursorflow-signal` IDE commands
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- Improved robustness of Git and worktree management
|
|
19
|
+
- Better error messages for missing origin remotes and Cursor authentication
|
|
20
|
+
- Resolved issues with `runTasks` not being able to restart from specific indices
|
|
21
|
+
|
|
22
|
+
## [0.1.5] - 2025-12-20
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- Repository-specific Cursor rules (`.cursorrules`)
|
|
26
|
+
- Improved ignore patterns for Git and worktrees
|
|
17
27
|
|
|
18
28
|
## [1.0.0] - TBD
|
|
19
29
|
|
package/README.md
CHANGED
|
@@ -150,6 +150,8 @@ Type `/` in Cursor chat and use:
|
|
|
150
150
|
- `/cursorflow-monitor` - monitor runs
|
|
151
151
|
- `/cursorflow-clean` - clean resources
|
|
152
152
|
- `/cursorflow-resume` - resume a lane
|
|
153
|
+
- `/cursorflow-doctor` - verify environment
|
|
154
|
+
- `/cursorflow-signal` - intervene in a lane
|
|
153
155
|
- `/cursorflow-review` - configure or check reviews
|
|
154
156
|
|
|
155
157
|
## CLI Commands
|
|
@@ -195,10 +197,39 @@ cursorflow clean <type> [options]
|
|
|
195
197
|
### Resume
|
|
196
198
|
```bash
|
|
197
199
|
cursorflow resume <lane> [options]
|
|
198
|
-
--
|
|
199
|
-
--restart Restart from
|
|
200
|
+
--run-dir <path> Specify run directory
|
|
201
|
+
--restart Restart from task 1
|
|
200
202
|
```
|
|
201
203
|
|
|
204
|
+
### Doctor
|
|
205
|
+
```bash
|
|
206
|
+
cursorflow doctor [options]
|
|
207
|
+
--tasks-dir <path> Validate specific lane tasks
|
|
208
|
+
--json Output in JSON format
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Signal (Intervention)
|
|
212
|
+
```bash
|
|
213
|
+
cursorflow signal <lane> <message>
|
|
214
|
+
--run-dir <path> Specify run directory
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## 🚀 Deployment & Updates
|
|
218
|
+
|
|
219
|
+
### For Maintainers
|
|
220
|
+
To release a new version to NPM:
|
|
221
|
+
1. Ensure your working directory is clean on the `main` branch.
|
|
222
|
+
2. Run the release script:
|
|
223
|
+
```bash
|
|
224
|
+
./scripts/release.sh [patch|minor|major]
|
|
225
|
+
```
|
|
226
|
+
3. The script will bump the version, update CHANGELOG, and push a tag to trigger GitHub Actions.
|
|
227
|
+
|
|
228
|
+
### For Users
|
|
229
|
+
To update to the latest version and refresh IDE commands:
|
|
230
|
+
1. Update the package: `npm install -g @litmers/cursorflow-orchestrator`
|
|
231
|
+
2. Refresh Cursor commands: `cursorflow-setup --force`
|
|
232
|
+
|
|
202
233
|
## Configuration
|
|
203
234
|
|
|
204
235
|
### Config file (cursorflow.config.js)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# /cursorflow-doctor
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
Verify that the current environment is properly configured for CursorFlow.
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
1. Type `/cursorflow-doctor` in the chat.
|
|
8
|
+
2. The agent will check:
|
|
9
|
+
- Git repository status
|
|
10
|
+
- 'origin' remote availability
|
|
11
|
+
- Git worktree support
|
|
12
|
+
- Cursor Agent installation and authentication
|
|
13
|
+
- Task directory and lane file validity (if a path is provided)
|
|
14
|
+
|
|
15
|
+
## Context
|
|
16
|
+
Use this command whenever:
|
|
17
|
+
- You are setting up a new project with CursorFlow.
|
|
18
|
+
- A `cursorflow run` fails with environment-related errors.
|
|
19
|
+
- You want to verify your Cursor authentication status.
|
|
20
|
+
|
|
21
|
+
## Example
|
|
22
|
+
"Check if my environment is ready for CursorFlow."
|
|
23
|
+
"Run cursorflow doctor on the _cursorflow/tasks/my-feature/ directory."
|
|
24
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# /cursorflow-signal
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
Directly intervene in a running lane to provide guidance, corrections, or emergency stops.
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
1. Type `/cursorflow-signal <lane-name> <your-message>` in the chat.
|
|
8
|
+
2. The message will be injected into the lane's conversation as a high-priority system instruction.
|
|
9
|
+
|
|
10
|
+
## Context
|
|
11
|
+
Use this command when:
|
|
12
|
+
- You see an agent making a repeated mistake in the monitor.
|
|
13
|
+
- You want to provide specific implementation guidance mid-task.
|
|
14
|
+
- You need to tell the agent to stop or change direction without killing the process.
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
"Send a signal to lane-1: 'Stop using library X, use library Y instead.'"
|
|
18
|
+
"Intervene in backend-lane: 'The database schema changed, please pull the latest main branch.'"
|
|
19
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CursorFlow clean command (stub)
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
const logger = __importStar(require("../utils/logger"));
|
|
39
|
+
function parseArgs(args) {
|
|
40
|
+
return {
|
|
41
|
+
type: args[0], // branches | worktrees | logs | all
|
|
42
|
+
pattern: null,
|
|
43
|
+
dryRun: args.includes('--dry-run'),
|
|
44
|
+
force: args.includes('--force'),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
async function clean(args) {
|
|
48
|
+
logger.section('🧹 Cleaning CursorFlow Resources');
|
|
49
|
+
const options = parseArgs(args);
|
|
50
|
+
logger.info('This command will be fully implemented in the next phase');
|
|
51
|
+
logger.info(`Clean type: ${options.type}`);
|
|
52
|
+
logger.info(`Dry run: ${options.dryRun}`);
|
|
53
|
+
logger.warn('\n⚠️ Implementation pending');
|
|
54
|
+
logger.info('This will clean branches, worktrees, and logs');
|
|
55
|
+
}
|
|
56
|
+
module.exports = clean;
|
|
57
|
+
//# sourceMappingURL=clean.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clean.js","sourceRoot":"","sources":["../../src/cli/clean.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wDAA0C;AAS1C,SAAS,SAAS,CAAC,IAAc;IAC/B,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,oCAAoC;QACnD,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;QAClC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;KAChC,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,KAAK,CAAC,IAAc;IACjC,MAAM,CAAC,OAAO,CAAC,kCAAkC,CAAC,CAAC;IAEnD,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAEhC,MAAM,CAAC,IAAI,CAAC,0DAA0D,CAAC,CAAC;IACxE,MAAM,CAAC,IAAI,CAAC,eAAe,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3C,MAAM,CAAC,IAAI,CAAC,YAAY,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAE1C,MAAM,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;IAC5C,MAAM,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC;AAC/D,CAAC;AAED,iBAAS,KAAK,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CursorFlow doctor command
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* cursorflow doctor [options]
|
|
6
|
+
*
|
|
7
|
+
* Options:
|
|
8
|
+
* --json Output machine-readable JSON
|
|
9
|
+
* --tasks-dir <path> Also validate lane files (run preflight)
|
|
10
|
+
* --executor <type> cursor-agent | cloud
|
|
11
|
+
* --no-cursor Skip Cursor Agent install/auth checks
|
|
12
|
+
* --help, -h Show help
|
|
13
|
+
*/
|
|
14
|
+
declare function doctor(args: string[]): Promise<void>;
|
|
15
|
+
export = doctor;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CursorFlow doctor command
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* cursorflow doctor [options]
|
|
7
|
+
*
|
|
8
|
+
* Options:
|
|
9
|
+
* --json Output machine-readable JSON
|
|
10
|
+
* --tasks-dir <path> Also validate lane files (run preflight)
|
|
11
|
+
* --executor <type> cursor-agent | cloud
|
|
12
|
+
* --no-cursor Skip Cursor Agent install/auth checks
|
|
13
|
+
* --help, -h Show help
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
const logger = __importStar(require("../utils/logger"));
|
|
49
|
+
const doctor_1 = require("../utils/doctor");
|
|
50
|
+
function printHelp() {
|
|
51
|
+
console.log(`
|
|
52
|
+
Usage: cursorflow doctor [options]
|
|
53
|
+
|
|
54
|
+
Verify your environment is ready for CursorFlow runs.
|
|
55
|
+
|
|
56
|
+
Options:
|
|
57
|
+
--json Output machine-readable JSON
|
|
58
|
+
--tasks-dir <path> Also validate lane files (run preflight)
|
|
59
|
+
--executor <type> cursor-agent | cloud
|
|
60
|
+
--no-cursor Skip Cursor Agent install/auth checks
|
|
61
|
+
--help, -h Show help
|
|
62
|
+
|
|
63
|
+
Examples:
|
|
64
|
+
cursorflow doctor
|
|
65
|
+
cursorflow doctor --tasks-dir _cursorflow/tasks/demo-test/
|
|
66
|
+
cursorflow doctor --json
|
|
67
|
+
`);
|
|
68
|
+
}
|
|
69
|
+
function parseArgs(args) {
|
|
70
|
+
const tasksDirIdx = args.indexOf('--tasks-dir');
|
|
71
|
+
const executorIdx = args.indexOf('--executor');
|
|
72
|
+
const options = {
|
|
73
|
+
json: args.includes('--json'),
|
|
74
|
+
tasksDir: tasksDirIdx >= 0 ? (args[tasksDirIdx + 1] || null) : null,
|
|
75
|
+
executor: executorIdx >= 0 ? (args[executorIdx + 1] || null) : null,
|
|
76
|
+
includeCursorAgentChecks: !args.includes('--no-cursor'),
|
|
77
|
+
};
|
|
78
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
79
|
+
printHelp();
|
|
80
|
+
process.exit(0);
|
|
81
|
+
}
|
|
82
|
+
return options;
|
|
83
|
+
}
|
|
84
|
+
function printHumanReport(report) {
|
|
85
|
+
logger.section('🩺 CursorFlow Doctor');
|
|
86
|
+
logger.info(`cwd: ${report.context.cwd}`);
|
|
87
|
+
if (report.context.repoRoot)
|
|
88
|
+
logger.info(`repo: ${report.context.repoRoot}`);
|
|
89
|
+
if (report.context.tasksDir)
|
|
90
|
+
logger.info(`tasks: ${report.context.tasksDir}`);
|
|
91
|
+
if (report.issues.length === 0) {
|
|
92
|
+
logger.success('All checks passed');
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
for (const issue of report.issues) {
|
|
96
|
+
const header = `${issue.title} (${issue.id})`;
|
|
97
|
+
if (issue.severity === 'error') {
|
|
98
|
+
logger.error(header, '❌');
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
logger.warn(header, '⚠️');
|
|
102
|
+
}
|
|
103
|
+
console.log(` ${issue.message}`);
|
|
104
|
+
if (issue.details) {
|
|
105
|
+
console.log(` Details: ${issue.details}`);
|
|
106
|
+
}
|
|
107
|
+
if (issue.fixes && issue.fixes.length > 0) {
|
|
108
|
+
console.log(' Fix:');
|
|
109
|
+
for (const fix of issue.fixes) {
|
|
110
|
+
console.log(` - ${fix}`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
console.log('');
|
|
114
|
+
}
|
|
115
|
+
if (report.ok) {
|
|
116
|
+
logger.success('Doctor completed with warnings');
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
logger.error('Doctor found blocking issues');
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
async function doctor(args) {
|
|
123
|
+
const options = parseArgs(args);
|
|
124
|
+
const report = (0, doctor_1.runDoctor)({
|
|
125
|
+
cwd: process.cwd(),
|
|
126
|
+
tasksDir: options.tasksDir || undefined,
|
|
127
|
+
executor: options.executor || undefined,
|
|
128
|
+
includeCursorAgentChecks: options.includeCursorAgentChecks,
|
|
129
|
+
});
|
|
130
|
+
if (options.json) {
|
|
131
|
+
console.log(JSON.stringify(report, null, 2));
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
printHumanReport(report);
|
|
135
|
+
}
|
|
136
|
+
process.exit(report.ok ? 0 : 1);
|
|
137
|
+
}
|
|
138
|
+
module.exports = doctor;
|
|
139
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wDAA0C;AAC1C,4CAA4C;AAS5C,SAAS,SAAS;IAChB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;GAgBX,CAAC,CAAC;AACL,CAAC;AAED,SAAS,SAAS,CAAC,IAAc;IAC/B,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAChD,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAE/C,MAAM,OAAO,GAAqB;QAChC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC7B,QAAQ,EAAE,WAAW,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;QACnE,QAAQ,EAAE,WAAW,IAAI,CAA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GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;SAAM,CAAC;QACN,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC;AAED,iBAAS,MAAM,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CursorFlow CLI - Main entry point
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.main = main;
|
|
40
|
+
const logger = __importStar(require("../utils/logger"));
|
|
41
|
+
// Lazy load commands to speed up help/version output
|
|
42
|
+
const COMMANDS = {
|
|
43
|
+
init: require('./init'),
|
|
44
|
+
run: require('./run'),
|
|
45
|
+
monitor: require('./monitor'),
|
|
46
|
+
clean: require('./clean'),
|
|
47
|
+
resume: require('./resume'),
|
|
48
|
+
doctor: require('./doctor'),
|
|
49
|
+
signal: require('./signal'),
|
|
50
|
+
};
|
|
51
|
+
function printHelp() {
|
|
52
|
+
console.log(`
|
|
53
|
+
CursorFlow - Git worktree-based parallel AI agent orchestration
|
|
54
|
+
|
|
55
|
+
Usage: cursorflow <command> [options]
|
|
56
|
+
|
|
57
|
+
Commands:
|
|
58
|
+
init [options] Initialize CursorFlow in project
|
|
59
|
+
run <tasks-dir> [options] Run orchestration
|
|
60
|
+
monitor [run-dir] [options] Monitor lane execution
|
|
61
|
+
clean <type> [options] Clean branches/worktrees/logs
|
|
62
|
+
resume <lane> [options] Resume interrupted lane
|
|
63
|
+
doctor [options] Check environment and preflight
|
|
64
|
+
signal <lane> <msg> Directly intervene in a running lane
|
|
65
|
+
|
|
66
|
+
Global Options:
|
|
67
|
+
--config <path> Config file path
|
|
68
|
+
--help, -h Show help
|
|
69
|
+
--version, -v Show version
|
|
70
|
+
|
|
71
|
+
Examples:
|
|
72
|
+
cursorflow init --example
|
|
73
|
+
cursorflow run _cursorflow/tasks/MyFeature/
|
|
74
|
+
cursorflow monitor --watch
|
|
75
|
+
cursorflow clean branches --all
|
|
76
|
+
cursorflow doctor
|
|
77
|
+
|
|
78
|
+
Documentation:
|
|
79
|
+
https://github.com/eungjin-cigro/cursorflow#readme
|
|
80
|
+
`);
|
|
81
|
+
}
|
|
82
|
+
function printVersion() {
|
|
83
|
+
const pkg = require('../../package.json');
|
|
84
|
+
console.log(`CursorFlow v${pkg.version}`);
|
|
85
|
+
}
|
|
86
|
+
async function main() {
|
|
87
|
+
const args = process.argv.slice(2);
|
|
88
|
+
if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
|
|
89
|
+
printHelp();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (args.includes('--version') || args.includes('-v')) {
|
|
93
|
+
printVersion();
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const commandName = args[0];
|
|
97
|
+
const commandArgs = args.slice(1);
|
|
98
|
+
const command = COMMANDS[commandName];
|
|
99
|
+
if (!command) {
|
|
100
|
+
logger.error(`Unknown command: ${commandName}`);
|
|
101
|
+
console.log('\nRun "cursorflow --help" for usage information.');
|
|
102
|
+
process.exit(1);
|
|
103
|
+
}
|
|
104
|
+
try {
|
|
105
|
+
await command(commandArgs);
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
logger.error(error.message);
|
|
109
|
+
if (process.env['DEBUG']) {
|
|
110
|
+
console.error(error.stack);
|
|
111
|
+
}
|
|
112
|
+
process.exit(1);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (require.main === module) {
|
|
116
|
+
main().catch(error => {
|
|
117
|
+
logger.error(`Fatal error: ${error.message}`);
|
|
118
|
+
if (process.env['DEBUG']) {
|
|
119
|
+
console.error(error.stack);
|
|
120
|
+
}
|
|
121
|
+
process.exit(1);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
exports.default = main;
|
|
125
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":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