@staff0rd/assist 0.388.6 → 0.389.1
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/commands/sessions/web/bundle.js +82 -82
- package/dist/index.js +28 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.389.1",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -5915,6 +5915,7 @@ async function removeItem(id) {
|
|
|
5915
5915
|
async function handleReviewResult(id, review2) {
|
|
5916
5916
|
if (review2.kind === "fail" || review2.kind === "abort")
|
|
5917
5917
|
return { kind: "stop", success: false };
|
|
5918
|
+
if (review2.kind === "incomplete") return { kind: "stop", success: false };
|
|
5918
5919
|
if (review2.kind === "paused") return { kind: "stop", success: true };
|
|
5919
5920
|
if (review2.kind === "rewind")
|
|
5920
5921
|
return {
|
|
@@ -6516,10 +6517,10 @@ async function isTerminalStatus(itemId2) {
|
|
|
6516
6517
|
async function resolvePhaseResult(phaseIndex, itemId2) {
|
|
6517
6518
|
const signalPath = getSignalPath();
|
|
6518
6519
|
if (!signalPath || !existsSync24(signalPath)) {
|
|
6519
|
-
if (await isTerminalStatus(itemId2)) return
|
|
6520
|
+
if (await isTerminalStatus(itemId2)) return { kind: "abort" };
|
|
6520
6521
|
const action = await handleIncompletePhase();
|
|
6521
|
-
if (action === "abort") return
|
|
6522
|
-
return action === "skip" ?
|
|
6522
|
+
if (action === "abort") return { kind: "abort" };
|
|
6523
|
+
return action === "skip" ? { kind: "skip" } : { kind: "retry" };
|
|
6523
6524
|
}
|
|
6524
6525
|
const signal = readSignal();
|
|
6525
6526
|
cleanupSignal();
|
|
@@ -6528,12 +6529,12 @@ async function resolvePhaseResult(phaseIndex, itemId2) {
|
|
|
6528
6529
|
const targetPhaseNumber = targetPhase + 1;
|
|
6529
6530
|
console.log(chalk41.yellow(`
|
|
6530
6531
|
Rewinding to phase ${targetPhaseNumber}.`));
|
|
6531
|
-
return targetPhase;
|
|
6532
|
+
return { kind: "rewind", targetPhase };
|
|
6532
6533
|
}
|
|
6533
6534
|
const phaseNumber = phaseIndex + 1;
|
|
6534
6535
|
console.log(chalk41.green(`
|
|
6535
6536
|
Phase ${phaseNumber} completed.`));
|
|
6536
|
-
return
|
|
6537
|
+
return { kind: "advance" };
|
|
6537
6538
|
}
|
|
6538
6539
|
|
|
6539
6540
|
// src/commands/backlog/verifyResumeConversation.ts
|
|
@@ -6792,7 +6793,7 @@ async function executePhase(item, phaseIndex, phases, spawnOptions, totalPhases
|
|
|
6792
6793
|
const phaseLabel2 = `phase ${phaseNumber}/${totalPhases}`;
|
|
6793
6794
|
if (resumeSessionId) {
|
|
6794
6795
|
if (!await verifyPhaseResume(item.id, resumeSessionId, phaseLabel2))
|
|
6795
|
-
return
|
|
6796
|
+
return { kind: "abort" };
|
|
6796
6797
|
}
|
|
6797
6798
|
reportPhaseActivity(item, phaseNumber, totalPhases, phase, claudeSessionId);
|
|
6798
6799
|
if (!resumeSessionId) {
|
|
@@ -6806,7 +6807,7 @@ async function executePhase(item, phaseIndex, phases, spawnOptions, totalPhases
|
|
|
6806
6807
|
claudeSessionId,
|
|
6807
6808
|
spawnOptions
|
|
6808
6809
|
);
|
|
6809
|
-
if (exitCode === CLAUDE_SPAWN_FAILED) return
|
|
6810
|
+
if (exitCode === CLAUDE_SPAWN_FAILED) return { kind: "abort" };
|
|
6810
6811
|
void setSessionStatus("running");
|
|
6811
6812
|
return await resolvePhaseResult(phaseIndex, item.id);
|
|
6812
6813
|
}
|
|
@@ -6824,7 +6825,7 @@ async function runPhases(item, startPhase, plan2, spawnOptions) {
|
|
|
6824
6825
|
let currentPlan = plan2;
|
|
6825
6826
|
let phaseOptions = spawnOptions;
|
|
6826
6827
|
while (phaseIndex < currentPlan.length) {
|
|
6827
|
-
|
|
6828
|
+
const outcome = await executePhase(
|
|
6828
6829
|
item,
|
|
6829
6830
|
phaseIndex,
|
|
6830
6831
|
currentPlan,
|
|
@@ -6833,7 +6834,10 @@ async function runPhases(item, startPhase, plan2, spawnOptions) {
|
|
|
6833
6834
|
currentPlan.length + 1
|
|
6834
6835
|
);
|
|
6835
6836
|
phaseOptions = withoutResumeSession(phaseOptions);
|
|
6836
|
-
if (
|
|
6837
|
+
if (outcome.kind === "abort") return { kind: "fail" };
|
|
6838
|
+
if (outcome.kind === "rewind") phaseIndex = outcome.targetPhase;
|
|
6839
|
+
else if (outcome.kind === "advance" || outcome.kind === "skip")
|
|
6840
|
+
phaseIndex += 1;
|
|
6837
6841
|
if (consumePause(item.id)) {
|
|
6838
6842
|
appendDaemonLog(
|
|
6839
6843
|
`backlog run ${item.id}: paused before phase ${phaseIndex + 1} \u2014 consumed pending pause request (Continue turned off)`
|
|
@@ -6862,17 +6866,21 @@ async function runReview(item, fallbackPlan, spawnOptions) {
|
|
|
6862
6866
|
const plan2 = await reloadPlan(item.id) ?? fallbackPlan;
|
|
6863
6867
|
const reviewPhase = buildReviewPhase();
|
|
6864
6868
|
const allPhases = [...plan2, reviewPhase];
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6869
|
+
let reviewOptions = spawnOptions;
|
|
6870
|
+
while (true) {
|
|
6871
|
+
const outcome = await executePhase(
|
|
6872
|
+
item,
|
|
6873
|
+
plan2.length,
|
|
6874
|
+
allPhases,
|
|
6875
|
+
reviewOptions
|
|
6876
|
+
);
|
|
6877
|
+
reviewOptions = withoutResumeSession(reviewOptions);
|
|
6878
|
+
if (outcome.kind === "abort") return { kind: "abort" };
|
|
6879
|
+
if (outcome.kind === "rewind")
|
|
6880
|
+
return { kind: "rewind", targetPhase: outcome.targetPhase, plan: plan2 };
|
|
6881
|
+
if (outcome.kind === "skip") return { kind: "incomplete" };
|
|
6882
|
+
if (outcome.kind === "advance") return { kind: "done" };
|
|
6874
6883
|
}
|
|
6875
|
-
return { kind: "done" };
|
|
6876
6884
|
}
|
|
6877
6885
|
|
|
6878
6886
|
// src/commands/backlog/runOnce.ts
|