@autopilot-harness/cli 0.2.11 → 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/dist/assets/vendor/runtime.mjs +28 -29
- package/dist/init/types.d.ts +1 -1
- package/dist/init/types.js +1 -1
- package/package.json +5 -5
|
@@ -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/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": {
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"@clack/prompts": "^0.10.0",
|
|
32
32
|
"commander": "^13.1.0",
|
|
33
33
|
"yaml": "^2.7.0",
|
|
34
|
-
"@autopilot-harness/core": "0.2.
|
|
35
|
-
"@autopilot-harness/i18n": "0.2.
|
|
36
|
-
"@autopilot-harness/port-claude-code": "0.2.
|
|
37
|
-
"@autopilot-harness/port-cursor": "0.2.
|
|
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"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"esbuild": "^0.25.12",
|