@staff0rd/assist 0.489.2 → 0.490.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 +485 -485
- package/dist/index.js +37 -3
- 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.490.1",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -7951,6 +7951,12 @@ async function runOnce(item, startPhase, plan2, spawnOptions) {
|
|
|
7951
7951
|
// src/commands/backlog/discardStalePause.ts
|
|
7952
7952
|
function discardStalePause(itemId2) {
|
|
7953
7953
|
if (!isPausePending(itemId2)) return;
|
|
7954
|
+
if (process.env.ASSIST_KEEP_PAUSE) {
|
|
7955
|
+
appendDaemonLog(
|
|
7956
|
+
`backlog run ${itemId2}: kept the pending pause file at run start; this run was relaunched by a daemon restore, so the user's Continue-off still applies`
|
|
7957
|
+
);
|
|
7958
|
+
return;
|
|
7959
|
+
}
|
|
7954
7960
|
clearPause(itemId2);
|
|
7955
7961
|
appendDaemonLog(
|
|
7956
7962
|
`backlog run ${itemId2}: discarded stale pause file at run start; this run starts auto-advancing (Continue on) regardless of a prior run's pause`
|
|
@@ -19215,6 +19221,9 @@ var persistedSessionSchema = z7.object({
|
|
|
19215
19221
|
assistArgs: z7.array(z7.string()).optional(),
|
|
19216
19222
|
activity: activitySchema.optional(),
|
|
19217
19223
|
starred: z7.boolean().optional(),
|
|
19224
|
+
autoRun: z7.boolean().optional(),
|
|
19225
|
+
autoAdvance: z7.boolean().optional(),
|
|
19226
|
+
reviewStarted: z7.boolean().optional(),
|
|
19218
19227
|
undurable: z7.object({ reason: z7.string(), removesTree: z7.boolean().optional() }).optional()
|
|
19219
19228
|
});
|
|
19220
19229
|
|
|
@@ -19239,6 +19248,9 @@ function toPersistedSession(session) {
|
|
|
19239
19248
|
assistArgs: session.assistArgs,
|
|
19240
19249
|
activity: session.activity,
|
|
19241
19250
|
starred: session.starred,
|
|
19251
|
+
autoRun: session.autoRun,
|
|
19252
|
+
autoAdvance: session.autoAdvance,
|
|
19253
|
+
reviewStarted: session.reviewStarted,
|
|
19242
19254
|
undurable: session.undurable
|
|
19243
19255
|
};
|
|
19244
19256
|
}
|
|
@@ -30602,6 +30614,17 @@ function restartManagedSession(sessions, id, clients, onStatusChange) {
|
|
|
30602
30614
|
return { ok: true };
|
|
30603
30615
|
}
|
|
30604
30616
|
|
|
30617
|
+
// src/commands/sessions/daemon/restoredAutoAdvance.ts
|
|
30618
|
+
function restoredAutoAdvance(id, persisted) {
|
|
30619
|
+
const itemId2 = persisted.activity?.itemId;
|
|
30620
|
+
if (itemId2 == null || !isPausePending(itemId2)) return persisted.autoAdvance;
|
|
30621
|
+
if (persisted.autoAdvance !== false)
|
|
30622
|
+
daemonLog(
|
|
30623
|
+
`session ${id} autoadvance forced off on restore: pause pending for backlog item ${itemId2}`
|
|
30624
|
+
);
|
|
30625
|
+
return false;
|
|
30626
|
+
}
|
|
30627
|
+
|
|
30605
30628
|
// src/commands/sessions/daemon/restoreBase.ts
|
|
30606
30629
|
function restoreBase(id, persisted) {
|
|
30607
30630
|
return {
|
|
@@ -30616,7 +30639,10 @@ function restoreBase(id, persisted) {
|
|
|
30616
30639
|
cwd: persisted.cwd,
|
|
30617
30640
|
assistArgs: persisted.assistArgs,
|
|
30618
30641
|
initialPrompt: persisted.initialPrompt,
|
|
30619
|
-
starred: persisted.starred
|
|
30642
|
+
starred: persisted.starred,
|
|
30643
|
+
autoRun: persisted.autoRun,
|
|
30644
|
+
autoAdvance: restoredAutoAdvance(id, persisted),
|
|
30645
|
+
reviewStarted: persisted.reviewStarted
|
|
30620
30646
|
};
|
|
30621
30647
|
}
|
|
30622
30648
|
|
|
@@ -30770,6 +30796,14 @@ function notRestoredStub(base, persisted) {
|
|
|
30770
30796
|
};
|
|
30771
30797
|
}
|
|
30772
30798
|
|
|
30799
|
+
// src/commands/sessions/daemon/resumedRunEnv.ts
|
|
30800
|
+
function resumedRunEnv(itemId2, idle) {
|
|
30801
|
+
const env = {};
|
|
30802
|
+
if (idle) env.ASSIST_RESUME_IDLE = "1";
|
|
30803
|
+
if (itemId2 != null && isPausePending(itemId2)) env.ASSIST_KEEP_PAUSE = "1";
|
|
30804
|
+
return Object.keys(env).length > 0 ? env : void 0;
|
|
30805
|
+
}
|
|
30806
|
+
|
|
30773
30807
|
// src/commands/sessions/daemon/updatedSession.ts
|
|
30774
30808
|
function updatedSession(id, persisted) {
|
|
30775
30809
|
return {
|
|
@@ -30811,7 +30845,7 @@ function restoreSession(id, persisted) {
|
|
|
30811
30845
|
resumesWrittenConversation ? assistResumeArgs(persisted) : assistResumeArgs({ assistArgs: persisted.assistArgs }),
|
|
30812
30846
|
persisted.cwd,
|
|
30813
30847
|
id,
|
|
30814
|
-
reattachesIdleConversation
|
|
30848
|
+
resumedRunEnv(persisted.activity?.itemId, reattachesIdleConversation)
|
|
30815
30849
|
);
|
|
30816
30850
|
return reattachesIdleConversation ? waitingSession(base, persisted, pty2) : runningSession(base, persisted, pty2);
|
|
30817
30851
|
}
|