@staff0rd/assist 0.856.0 → 0.857.0
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 +397 -397
- package/dist/index.js +21 -13
- 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.857.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -10993,19 +10993,21 @@ async function reviewPlanUpdate(item, phases) {
|
|
|
10993
10993
|
const body = renderPlanUpdate(item, phases);
|
|
10994
10994
|
const sessionId = process.env.ASSIST_SESSION_ID;
|
|
10995
10995
|
if (process.env.ASSIST_SESSION === "1" && sessionId) {
|
|
10996
|
-
await awaitPreviewApproval("Plan update preview", {
|
|
10996
|
+
const decision = await awaitPreviewApproval("Plan update preview", {
|
|
10997
10997
|
sessionId,
|
|
10998
10998
|
requestId: randomUUID7(),
|
|
10999
10999
|
title: `Update the plan for ${formatItemId(item.id)}: ${item.name}`,
|
|
11000
11000
|
body,
|
|
11001
11001
|
prNumber: null,
|
|
11002
11002
|
kind: "backlog-item",
|
|
11003
|
-
itemType: item.type
|
|
11003
|
+
itemType: item.type,
|
|
11004
|
+
canStart: true
|
|
11004
11005
|
});
|
|
11005
|
-
return;
|
|
11006
|
+
return { autostart: decision.autostart === true };
|
|
11006
11007
|
}
|
|
11007
11008
|
console.log(chalk104.bold(item.name));
|
|
11008
11009
|
console.log(renderMarkdownTerminal(body));
|
|
11010
|
+
return { autostart: false };
|
|
11009
11011
|
}
|
|
11010
11012
|
|
|
11011
11013
|
// src/commands/backlog/updatePlan.ts
|
|
@@ -11014,13 +11016,14 @@ async function updatePlan(id, options2) {
|
|
|
11014
11016
|
const found = await findOneItem(id);
|
|
11015
11017
|
if (!found) return;
|
|
11016
11018
|
const { orm, item } = found;
|
|
11017
|
-
await reviewPlanUpdate(item, phases);
|
|
11019
|
+
const approval = await reviewPlanUpdate(item, phases);
|
|
11018
11020
|
await replacePlan(orm, item.id, phases, item.currentPhase);
|
|
11019
11021
|
console.log(
|
|
11020
11022
|
chalk105.green(
|
|
11021
11023
|
`Replaced the plan on item ${formatItemId(item.id)} with ${phases.length} phase${phases.length === 1 ? "" : "s"}.`
|
|
11022
11024
|
)
|
|
11023
11025
|
);
|
|
11026
|
+
if (approval.autostart) await startProposedRun(item.id);
|
|
11024
11027
|
}
|
|
11025
11028
|
|
|
11026
11029
|
// src/commands/backlog/registerUpdateCommands.ts
|
|
@@ -47068,10 +47071,17 @@ function codexRespawnPlan(session) {
|
|
|
47068
47071
|
|
|
47069
47072
|
// src/commands/sessions/daemon/interactiveRespawnPlan.ts
|
|
47070
47073
|
import { randomUUID as randomUUID23 } from "crypto";
|
|
47074
|
+
|
|
47075
|
+
// src/commands/sessions/daemon/hasTranscriptOnDisk.ts
|
|
47076
|
+
function hasTranscriptOnDisk(session) {
|
|
47077
|
+
return !!session.cwd && !!session.claudeSessionId && !!findTranscriptPathSync(session.cwd, session.claudeSessionId);
|
|
47078
|
+
}
|
|
47079
|
+
|
|
47080
|
+
// src/commands/sessions/daemon/interactiveRespawnPlan.ts
|
|
47071
47081
|
function interactiveRespawnPlan(session, resumes) {
|
|
47072
47082
|
const { claudeSessionId, cwd, initialPrompt, design, auto } = session;
|
|
47073
47083
|
if (!resumes) return null;
|
|
47074
|
-
if (claudeSessionId)
|
|
47084
|
+
if (claudeSessionId && hasTranscriptOnDisk(session))
|
|
47075
47085
|
return {
|
|
47076
47086
|
spawn: () => spawnClaude2({
|
|
47077
47087
|
resumeSessionId: claudeSessionId,
|
|
@@ -47493,11 +47503,6 @@ function deriveRestoreStatus(persisted) {
|
|
|
47493
47503
|
return awaitsQuestionAnswer(entries) ? "asking" : "waiting";
|
|
47494
47504
|
}
|
|
47495
47505
|
|
|
47496
|
-
// src/commands/sessions/daemon/hasTranscriptOnDisk.ts
|
|
47497
|
-
function hasTranscriptOnDisk(persisted) {
|
|
47498
|
-
return !!persisted.claudeSessionId && !!findTranscriptPathSync(persisted.cwd, persisted.claudeSessionId);
|
|
47499
|
-
}
|
|
47500
|
-
|
|
47501
47506
|
// src/commands/sessions/daemon/daemonRestartPrompt.ts
|
|
47502
47507
|
function daemonRestartPrompt(backgroundTaskIds) {
|
|
47503
47508
|
const preamble = "The assist sessions daemon restarted and killed this session's processes. This was not a deliberate stop and nothing you were running was told to finish.";
|
|
@@ -47704,8 +47709,9 @@ function unresumableReason(harness) {
|
|
|
47704
47709
|
function resumeViaClaude(id, persisted, base, status2) {
|
|
47705
47710
|
const mode = { design: persisted.design, auto: persisted.auto };
|
|
47706
47711
|
const plan2 = restoreResumePlan(persisted, status2);
|
|
47712
|
+
const resumes = hasTranscriptOnDisk(persisted);
|
|
47707
47713
|
const pty2 = spawnClaude2(
|
|
47708
|
-
|
|
47714
|
+
resumes ? {
|
|
47709
47715
|
resumeSessionId: persisted.claudeSessionId,
|
|
47710
47716
|
prompt: resumePrompt(plan2),
|
|
47711
47717
|
cwd: persisted.cwd,
|
|
@@ -47713,12 +47719,14 @@ function resumeViaClaude(id, persisted, base, status2) {
|
|
|
47713
47719
|
...mode
|
|
47714
47720
|
} : {
|
|
47715
47721
|
claudeSessionId: persisted.claudeSessionId,
|
|
47722
|
+
prompt: persisted.initialPrompt,
|
|
47716
47723
|
cwd: persisted.cwd,
|
|
47717
47724
|
sessionId: id,
|
|
47718
47725
|
...mode
|
|
47719
47726
|
}
|
|
47720
47727
|
);
|
|
47721
|
-
|
|
47728
|
+
const idle = resumes || !persisted.initialPrompt ? plan2.idle : false;
|
|
47729
|
+
return idle ? waitingSession(base, persisted, pty2) : runningSession(base, persisted, pty2);
|
|
47722
47730
|
}
|
|
47723
47731
|
|
|
47724
47732
|
// src/commands/sessions/daemon/restoreInteractiveSession.ts
|