@autopilot-harness/cli 0.2.10 → 0.2.12
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/dist/assets/vendor/runtime.mjs +28 -29
- package/dist/bin.js +0 -0
- package/dist/init/types.d.ts +1 -1
- package/dist/init/types.js +1 -1
- package/package.json +15 -15
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Autopilot Harness contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -2066,6 +2066,11 @@ function isRecoverOrStuckFollowupMessage(text) {
|
|
|
2066
2066
|
if (!line) return false;
|
|
2067
2067
|
return isRecoverFollowupMessage(line) || line.startsWith("Stuck:") || line.startsWith("\u5361\u4F4F\uFF1A") || line.startsWith("\u5361\u4F4F:");
|
|
2068
2068
|
}
|
|
2069
|
+
function isTerminalFollowupMessage(text) {
|
|
2070
|
+
const line = firstSubstantiveLine(text);
|
|
2071
|
+
if (!line) return false;
|
|
2072
|
+
return line.startsWith("All checklist") || line.startsWith("\u5168\u90E8\u5B8C\u6210") || line.startsWith("Review complete") || line.startsWith("\u81EA\u5BA1\u5B8C\u6210");
|
|
2073
|
+
}
|
|
2069
2074
|
var USER_ABORT_MARKERS = [
|
|
2070
2075
|
"user aborted",
|
|
2071
2076
|
"interrupted manually",
|
|
@@ -4507,10 +4512,11 @@ function applyOn(store, conversationId, projectRoot, opts) {
|
|
|
4507
4512
|
}
|
|
4508
4513
|
projectRoot = root;
|
|
4509
4514
|
const session = store.getSession(conversationId);
|
|
4515
|
+
const onBlockedMsg = "Autopilot is executing. Send Autopilot OFF, REPLAN, or RESUME before ON.";
|
|
4510
4516
|
if (session?.phase === "executing") {
|
|
4511
4517
|
return {
|
|
4512
4518
|
ok: false,
|
|
4513
|
-
userMessage:
|
|
4519
|
+
userMessage: onBlockedMsg
|
|
4514
4520
|
};
|
|
4515
4521
|
}
|
|
4516
4522
|
if (opts?.slug !== void 0 && !isSafeTrackSlug(opts.slug)) {
|
|
@@ -4520,46 +4526,39 @@ function applyOn(store, conversationId, projectRoot, opts) {
|
|
|
4520
4526
|
userMessage: `Invalid track slug "${sanitizeSessionDisplayText(raw).slice(0, 64)}".`
|
|
4521
4527
|
};
|
|
4522
4528
|
}
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
const
|
|
4529
|
+
return store.exclusiveWrite(() => {
|
|
4530
|
+
const live = store.getSession(conversationId);
|
|
4531
|
+
if (live?.phase === "executing") {
|
|
4532
|
+
return {
|
|
4533
|
+
commit: false,
|
|
4534
|
+
value: { ok: false, userMessage: onBlockedMsg }
|
|
4535
|
+
};
|
|
4536
|
+
}
|
|
4537
|
+
const prevTid = live?.track_id ?? "_pending";
|
|
4538
|
+
const trackId = opts?.slug ?? (live?.track_id && isBoundRunTrackId(live.track_id) ? live.track_id : "_pending");
|
|
4539
|
+
const checklistPath = trackId === prevTid ? live?.checklist_path ?? "" : "";
|
|
4540
|
+
const platform = resolveSessionPlatform(
|
|
4541
|
+
opts?.platform,
|
|
4542
|
+
live?.platform ?? "cursor"
|
|
4543
|
+
);
|
|
4544
|
+
const row = store.upsertSession({
|
|
4532
4545
|
conversation_id: conversationId,
|
|
4533
4546
|
project_root: projectRoot,
|
|
4534
4547
|
code_root: projectRoot,
|
|
4548
|
+
platform,
|
|
4535
4549
|
phase: "planning",
|
|
4536
4550
|
armed: 0,
|
|
4537
4551
|
paused: 0,
|
|
4538
4552
|
paused_reason: null,
|
|
4539
4553
|
track_id: trackId,
|
|
4540
4554
|
checklist_path: checklistPath,
|
|
4555
|
+
// ON returns to planning — drop mid-flow run/replan pick state.
|
|
4541
4556
|
pending_action: null,
|
|
4542
|
-
track_candidates_json: null
|
|
4543
|
-
platform
|
|
4557
|
+
track_candidates_json: null
|
|
4544
4558
|
});
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
const s = store.upsertSession({
|
|
4548
|
-
conversation_id: conversationId,
|
|
4549
|
-
project_root: projectRoot,
|
|
4550
|
-
code_root: projectRoot,
|
|
4551
|
-
platform,
|
|
4552
|
-
phase: "planning",
|
|
4553
|
-
armed: 0,
|
|
4554
|
-
paused: 0,
|
|
4555
|
-
paused_reason: null,
|
|
4556
|
-
track_id: trackId,
|
|
4557
|
-
checklist_path: checklistPath,
|
|
4558
|
-
// ON returns to planning — drop mid-flow run/replan pick state.
|
|
4559
|
-
pending_action: null,
|
|
4560
|
-
track_candidates_json: null
|
|
4559
|
+
store.clearPendingFollowupIf(conversationId, isTerminalFollowupMessage);
|
|
4560
|
+
return { commit: true, value: { ok: true, session: row } };
|
|
4561
4561
|
});
|
|
4562
|
-
return { ok: true, session: s };
|
|
4563
4562
|
}
|
|
4564
4563
|
function finishLocalResume(store, conversationId, session) {
|
|
4565
4564
|
const snap = store.getSession(conversationId);
|
package/dist/bin.js
CHANGED
|
File without changes
|
package/dist/init/types.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ export interface HooksFile {
|
|
|
75
75
|
[event: string]: HookCommand[] | undefined;
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
export declare const PACKAGE_VERSION = "0.2.
|
|
78
|
+
export declare const PACKAGE_VERSION = "0.2.12";
|
|
79
79
|
export declare const HOOK_MARKER = "autopilot-harness";
|
|
80
80
|
export declare const AUTOPILOT_EVENTS: readonly ["beforeSubmitPrompt", "afterFileEdit", "stop"];
|
|
81
81
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/init/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autopilot-harness/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "Autopilot harness CLI — structured planning, checklist execution, and multi-lens self-review for Cursor and Claude Code (bin: autopilot-harness)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -27,21 +27,14 @@
|
|
|
27
27
|
"files": [
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
|
-
"scripts": {
|
|
31
|
-
"bundle-vendor": "node ./scripts/bundle-vendor.mjs",
|
|
32
|
-
"bundle-templates": "node ./scripts/bundle-templates.mjs",
|
|
33
|
-
"sync-dist-assets": "node ./scripts/sync-dist-assets.mjs",
|
|
34
|
-
"build": "pnpm --filter @autopilot-harness/core run build && node ./scripts/bundle-vendor.mjs && node ./scripts/bundle-templates.mjs && tsc -p tsconfig.json && node ./scripts/sync-dist-assets.mjs",
|
|
35
|
-
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
36
|
-
},
|
|
37
30
|
"dependencies": {
|
|
38
|
-
"@autopilot-harness/core": "workspace:*",
|
|
39
|
-
"@autopilot-harness/i18n": "workspace:*",
|
|
40
|
-
"@autopilot-harness/port-claude-code": "workspace:*",
|
|
41
|
-
"@autopilot-harness/port-cursor": "workspace:*",
|
|
42
31
|
"@clack/prompts": "^0.10.0",
|
|
43
32
|
"commander": "^13.1.0",
|
|
44
|
-
"yaml": "^2.7.0"
|
|
33
|
+
"yaml": "^2.7.0",
|
|
34
|
+
"@autopilot-harness/core": "0.2.12",
|
|
35
|
+
"@autopilot-harness/i18n": "0.2.12",
|
|
36
|
+
"@autopilot-harness/port-claude-code": "0.2.12",
|
|
37
|
+
"@autopilot-harness/port-cursor": "0.2.12"
|
|
45
38
|
},
|
|
46
39
|
"devDependencies": {
|
|
47
40
|
"esbuild": "^0.25.12",
|
|
@@ -66,5 +59,12 @@
|
|
|
66
59
|
"code-review",
|
|
67
60
|
"cli",
|
|
68
61
|
"npx"
|
|
69
|
-
]
|
|
70
|
-
|
|
62
|
+
],
|
|
63
|
+
"scripts": {
|
|
64
|
+
"bundle-vendor": "node ./scripts/bundle-vendor.mjs",
|
|
65
|
+
"bundle-templates": "node ./scripts/bundle-templates.mjs",
|
|
66
|
+
"sync-dist-assets": "node ./scripts/sync-dist-assets.mjs",
|
|
67
|
+
"build": "pnpm --filter @autopilot-harness/core run build && node ./scripts/bundle-vendor.mjs && node ./scripts/bundle-templates.mjs && tsc -p tsconfig.json && node ./scripts/sync-dist-assets.mjs",
|
|
68
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
69
|
+
}
|
|
70
|
+
}
|