@schoolai/shipyard 3.1.1-nightly.20260415.0 → 3.1.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/index.js +2 -2
- package/dist/{serve-2F6SKPPO.js → serve-HDRZ2CU6.js} +95 -81
- package/dist/{serve-2F6SKPPO.js.map → serve-HDRZ2CU6.js.map} +1 -1
- package/dist/{start-D67TQIGL.js → start-63XQAT6J.js} +2 -2
- package/package.json +1 -1
- /package/dist/{start-D67TQIGL.js.map → start-63XQAT6J.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -106,7 +106,7 @@ async function handleSubcommand() {
|
|
|
106
106
|
return true;
|
|
107
107
|
}
|
|
108
108
|
if (subcommand === "start") {
|
|
109
|
-
const { startCommand } = await import("./start-
|
|
109
|
+
const { startCommand } = await import("./start-63XQAT6J.js");
|
|
110
110
|
await startCommand();
|
|
111
111
|
return true;
|
|
112
112
|
}
|
|
@@ -118,7 +118,7 @@ async function main() {
|
|
|
118
118
|
const args = parseCliArgs();
|
|
119
119
|
if (args.serve) {
|
|
120
120
|
await loadAuthFromConfig(env);
|
|
121
|
-
const { serve } = await import("./serve-
|
|
121
|
+
const { serve } = await import("./serve-HDRZ2CU6.js");
|
|
122
122
|
return serve({ isDev: env.SHIPYARD_DEV });
|
|
123
123
|
}
|
|
124
124
|
logger.error("Use `shipyard start` to run the daemon. Use --help for usage.");
|
|
@@ -32301,7 +32301,8 @@ async function sweepStaleTasks(taskStateStore, taskManager, log) {
|
|
|
32301
32301
|
const noBroadcast = { broadcast: false };
|
|
32302
32302
|
for (const action of actions) {
|
|
32303
32303
|
if (action.kind === "mark_input_required") {
|
|
32304
|
-
await taskStateStore.
|
|
32304
|
+
await taskStateStore.updateTaskStatus(action.taskId, "input_required", noBroadcast);
|
|
32305
|
+
await taskStateStore.acknowledge(action.taskId, noBroadcast);
|
|
32305
32306
|
log({
|
|
32306
32307
|
event: "stale_task_swept",
|
|
32307
32308
|
taskId: action.taskId,
|
|
@@ -80372,9 +80373,9 @@ var StructuredTaskTracker = class {
|
|
|
80372
80373
|
/**
|
|
80373
80374
|
* Apply an overlay on top of CC tasks. Stores the overlay and re-flushes.
|
|
80374
80375
|
*/
|
|
80375
|
-
applyOverlay(overlay
|
|
80376
|
+
applyOverlay(overlay) {
|
|
80376
80377
|
this.#currentOverlay = overlay;
|
|
80377
|
-
this.#flushStructuredTasks(
|
|
80378
|
+
this.#flushStructuredTasks();
|
|
80378
80379
|
}
|
|
80379
80380
|
processStructuredTaskEvents(content) {
|
|
80380
80381
|
const events = extractStructuredTaskEvents(content);
|
|
@@ -80499,11 +80500,11 @@ var StructuredTaskTracker = class {
|
|
|
80499
80500
|
applyDepEdgeAdditions(merged, overlay.depEdges);
|
|
80500
80501
|
return merged;
|
|
80501
80502
|
}
|
|
80502
|
-
#flushStructuredTasks(
|
|
80503
|
+
#flushStructuredTasks() {
|
|
80503
80504
|
const overlay = this.#currentOverlay ?? DEFAULT_TASK_OVERLAY;
|
|
80504
80505
|
const merged = this.#applyOverlayToMap(this.#structuredTasks, overlay);
|
|
80505
80506
|
const todoProgress = this.#computeTodoProgress(merged);
|
|
80506
|
-
this.#deps.updateStructuredTasks(Object.fromEntries(merged), todoProgress
|
|
80507
|
+
this.#deps.updateStructuredTasks(Object.fromEntries(merged), todoProgress);
|
|
80507
80508
|
if (!this.#suppressWriteThrough) {
|
|
80508
80509
|
this.#ccTaskFileWriter?.writeMergedTasks(merged);
|
|
80509
80510
|
}
|
|
@@ -82523,8 +82524,8 @@ Use this context to maintain continuity. You have already done this work \u2014
|
|
|
82523
82524
|
}
|
|
82524
82525
|
}
|
|
82525
82526
|
}
|
|
82526
|
-
applyOverlay(overlay
|
|
82527
|
-
this.#structuredTaskTracker.applyOverlay(overlay
|
|
82527
|
+
applyOverlay(overlay) {
|
|
82528
|
+
this.#structuredTaskTracker.applyOverlay(overlay);
|
|
82528
82529
|
}
|
|
82529
82530
|
/** ---------------------------------------------------------------- */
|
|
82530
82531
|
/** Resource resolution */
|
|
@@ -83201,8 +83202,7 @@ var TaskManager = class {
|
|
|
83201
83202
|
this.#tasks.set(taskId, { taskId, channelId, cwd, mode, orchestrator });
|
|
83202
83203
|
this.#flushPendingStreamSubs(taskId, orchestrator);
|
|
83203
83204
|
this.#deps.taskStateStore.getTask(taskId).then((record) => {
|
|
83204
|
-
if (record?.taskOverlay)
|
|
83205
|
-
orchestrator.applyOverlay(record.taskOverlay, { preserveUpdatedAt: true });
|
|
83205
|
+
if (record?.taskOverlay) orchestrator.applyOverlay(record.taskOverlay);
|
|
83206
83206
|
}).catch((err) => {
|
|
83207
83207
|
this.#deps.log({
|
|
83208
83208
|
event: "overlay_restore_failed",
|
|
@@ -83567,13 +83567,8 @@ var TaskManager = class {
|
|
|
83567
83567
|
});
|
|
83568
83568
|
});
|
|
83569
83569
|
},
|
|
83570
|
-
updateStructuredTasks: (tasks, todoProgress
|
|
83571
|
-
this.#deps.taskStateStore.updateStructuredTasks(
|
|
83572
|
-
taskId,
|
|
83573
|
-
tasks,
|
|
83574
|
-
todoProgress,
|
|
83575
|
-
options ? { preserveUpdatedAt: options.preserveUpdatedAt } : void 0
|
|
83576
|
-
).catch((err) => {
|
|
83570
|
+
updateStructuredTasks: (tasks, todoProgress) => {
|
|
83571
|
+
this.#deps.taskStateStore.updateStructuredTasks(taskId, tasks, todoProgress).catch((err) => {
|
|
83577
83572
|
this.#deps.log({
|
|
83578
83573
|
event: "task_state_store_structured_tasks_failed",
|
|
83579
83574
|
taskId,
|
|
@@ -83720,29 +83715,52 @@ function buildTaskStateStore(dataDir) {
|
|
|
83720
83715
|
});
|
|
83721
83716
|
},
|
|
83722
83717
|
async updateTaskStatus(taskId, status, options) {
|
|
83723
|
-
|
|
83718
|
+
const task = await store.get(taskId);
|
|
83719
|
+
if (!task) return;
|
|
83720
|
+
pushBroadcast(options);
|
|
83721
|
+
await store.set(taskId, applyStatusTransition(task, status, Date.now()));
|
|
83724
83722
|
},
|
|
83725
83723
|
async updateTitle(taskId, title, options) {
|
|
83726
|
-
|
|
83724
|
+
const task = await store.get(taskId);
|
|
83725
|
+
if (!task) return;
|
|
83726
|
+
pushBroadcast(options);
|
|
83727
|
+
await store.set(taskId, {
|
|
83728
|
+
...task,
|
|
83729
|
+
title,
|
|
83730
|
+
updatedAt: Date.now()
|
|
83731
|
+
});
|
|
83727
83732
|
},
|
|
83728
83733
|
async updateCwd(taskId, cwd, options) {
|
|
83729
|
-
|
|
83734
|
+
const task = await store.get(taskId);
|
|
83735
|
+
if (!task) return;
|
|
83736
|
+
pushBroadcast(options);
|
|
83737
|
+
await store.set(taskId, {
|
|
83738
|
+
...task,
|
|
83739
|
+
cwd,
|
|
83740
|
+
updatedAt: Date.now()
|
|
83741
|
+
});
|
|
83730
83742
|
},
|
|
83731
83743
|
async updateMode(taskId, mode, options) {
|
|
83732
|
-
|
|
83744
|
+
const task = await store.get(taskId);
|
|
83745
|
+
if (!task) return;
|
|
83746
|
+
pushBroadcast(options);
|
|
83747
|
+
await store.set(taskId, {
|
|
83748
|
+
...task,
|
|
83749
|
+
mode,
|
|
83750
|
+
updatedAt: Date.now()
|
|
83751
|
+
});
|
|
83733
83752
|
},
|
|
83734
83753
|
async updateTodoProgress(taskId, progress, options) {
|
|
83735
|
-
await
|
|
83736
|
-
|
|
83737
|
-
|
|
83738
|
-
|
|
83739
|
-
|
|
83740
|
-
|
|
83741
|
-
|
|
83742
|
-
|
|
83743
|
-
|
|
83744
|
-
|
|
83745
|
-
);
|
|
83754
|
+
const task = await store.get(taskId);
|
|
83755
|
+
if (!task) return;
|
|
83756
|
+
pushBroadcast(options);
|
|
83757
|
+
await store.set(taskId, {
|
|
83758
|
+
...task,
|
|
83759
|
+
todoCompleted: progress.todoCompleted,
|
|
83760
|
+
todoTotal: progress.todoTotal,
|
|
83761
|
+
currentActivity: progress.currentActivity,
|
|
83762
|
+
updatedAt: Date.now()
|
|
83763
|
+
});
|
|
83746
83764
|
},
|
|
83747
83765
|
async acknowledge(taskId, options) {
|
|
83748
83766
|
await safeUpdate(taskId, (task) => ({ ...task, acknowledgedAt: Date.now() }), options);
|
|
@@ -83751,42 +83769,39 @@ function buildTaskStateStore(dataDir) {
|
|
|
83751
83769
|
await safeUpdate(taskId, (task) => ({ ...task, pinned: !task.pinned }), options);
|
|
83752
83770
|
},
|
|
83753
83771
|
async updateStructuredTasks(taskId, tasks, todoProgress, options) {
|
|
83754
|
-
await
|
|
83755
|
-
|
|
83756
|
-
|
|
83757
|
-
|
|
83758
|
-
|
|
83759
|
-
|
|
83760
|
-
|
|
83761
|
-
|
|
83762
|
-
|
|
83763
|
-
|
|
83764
|
-
|
|
83765
|
-
|
|
83766
|
-
|
|
83767
|
-
);
|
|
83772
|
+
const task = await store.get(taskId);
|
|
83773
|
+
if (!task) return;
|
|
83774
|
+
pushBroadcast(options);
|
|
83775
|
+
await store.set(taskId, {
|
|
83776
|
+
...task,
|
|
83777
|
+
structuredTasks: tasks,
|
|
83778
|
+
...todoProgress && {
|
|
83779
|
+
todoCompleted: todoProgress.todoCompleted,
|
|
83780
|
+
todoTotal: todoProgress.todoTotal,
|
|
83781
|
+
currentActivity: todoProgress.currentActivity
|
|
83782
|
+
},
|
|
83783
|
+
updatedAt: Date.now()
|
|
83784
|
+
});
|
|
83768
83785
|
},
|
|
83769
83786
|
async updateTaskOverlay(taskId, overlay, options) {
|
|
83770
|
-
await
|
|
83771
|
-
|
|
83772
|
-
|
|
83773
|
-
|
|
83774
|
-
|
|
83775
|
-
|
|
83776
|
-
|
|
83777
|
-
|
|
83778
|
-
);
|
|
83787
|
+
const task = await store.get(taskId);
|
|
83788
|
+
if (!task) return;
|
|
83789
|
+
pushBroadcast(options);
|
|
83790
|
+
await store.set(taskId, {
|
|
83791
|
+
...task,
|
|
83792
|
+
taskOverlay: overlay,
|
|
83793
|
+
updatedAt: Date.now()
|
|
83794
|
+
});
|
|
83779
83795
|
},
|
|
83780
83796
|
async updateComposerSettings(taskId, settings, options) {
|
|
83781
|
-
await
|
|
83782
|
-
|
|
83783
|
-
|
|
83784
|
-
|
|
83785
|
-
|
|
83786
|
-
|
|
83787
|
-
|
|
83788
|
-
|
|
83789
|
-
);
|
|
83797
|
+
const task = await store.get(taskId);
|
|
83798
|
+
if (!task) return;
|
|
83799
|
+
pushBroadcast(options);
|
|
83800
|
+
await store.set(taskId, {
|
|
83801
|
+
...task,
|
|
83802
|
+
composerSettings: { ...task.composerSettings, ...settings },
|
|
83803
|
+
updatedAt: Date.now()
|
|
83804
|
+
});
|
|
83790
83805
|
},
|
|
83791
83806
|
async updateCostStats(taskId, stats, options) {
|
|
83792
83807
|
await safeUpdate(
|
|
@@ -83812,27 +83827,12 @@ function buildTaskStateStore(dataDir) {
|
|
|
83812
83827
|
options
|
|
83813
83828
|
);
|
|
83814
83829
|
},
|
|
83815
|
-
async sweepToInputRequired(taskId, options) {
|
|
83816
|
-
await safeUpdate(
|
|
83817
|
-
taskId,
|
|
83818
|
-
(task) => ({
|
|
83819
|
-
...task,
|
|
83820
|
-
status: "input_required",
|
|
83821
|
-
taskStartedAt: null
|
|
83822
|
-
}),
|
|
83823
|
-
options
|
|
83824
|
-
);
|
|
83825
|
-
},
|
|
83826
83830
|
async getTask(taskId) {
|
|
83827
83831
|
return store.get(taskId);
|
|
83828
83832
|
},
|
|
83829
83833
|
async listTasks() {
|
|
83830
83834
|
return store.list();
|
|
83831
83835
|
},
|
|
83832
|
-
async listTasksWithVersion() {
|
|
83833
|
-
const tasks = await store.list();
|
|
83834
|
-
return { tasks, version: _version };
|
|
83835
|
-
},
|
|
83836
83836
|
subscribe(listener) {
|
|
83837
83837
|
taskListeners.add(listener);
|
|
83838
83838
|
return () => {
|
|
@@ -87328,11 +87328,12 @@ function wireControlChannel(rawChannel, daemon, logAdapter, deps) {
|
|
|
87328
87328
|
});
|
|
87329
87329
|
},
|
|
87330
87330
|
onRequestTaskIndex: () => {
|
|
87331
|
-
daemon.taskStateStore.
|
|
87331
|
+
const snapshotVersion = daemon.taskStateStore.version;
|
|
87332
|
+
daemon.taskStateStore.listTasks().then((tasks) => {
|
|
87332
87333
|
controlHandler.sendControl({
|
|
87333
87334
|
type: "task_index_snapshot",
|
|
87334
87335
|
tasks,
|
|
87335
|
-
version
|
|
87336
|
+
version: snapshotVersion
|
|
87336
87337
|
});
|
|
87337
87338
|
}).catch((err) => {
|
|
87338
87339
|
logAdapter({
|
|
@@ -87546,6 +87547,19 @@ function wireControlChannel(rawChannel, daemon, logAdapter, deps) {
|
|
|
87546
87547
|
}
|
|
87547
87548
|
};
|
|
87548
87549
|
pushMcpStatus(5);
|
|
87550
|
+
const initialSnapshotVersion = daemon.taskStateStore.version;
|
|
87551
|
+
daemon.taskStateStore.listTasks().then((tasks) => {
|
|
87552
|
+
controlHandler.sendControl({
|
|
87553
|
+
type: "task_index_snapshot",
|
|
87554
|
+
tasks,
|
|
87555
|
+
version: initialSnapshotVersion
|
|
87556
|
+
});
|
|
87557
|
+
}).catch((err) => {
|
|
87558
|
+
logAdapter({
|
|
87559
|
+
event: "task_index_initial_push_failed",
|
|
87560
|
+
error: err instanceof Error ? err.message : String(err)
|
|
87561
|
+
});
|
|
87562
|
+
});
|
|
87549
87563
|
daemon.userSettingsStore.getSettings().then((settings) => {
|
|
87550
87564
|
controlHandler.sendControl({ type: "user_settings_snapshot", settings });
|
|
87551
87565
|
}).catch((err) => {
|
|
@@ -91682,4 +91696,4 @@ export {
|
|
|
91682
91696
|
classifyLogLevel,
|
|
91683
91697
|
serve
|
|
91684
91698
|
};
|
|
91685
|
-
//# sourceMappingURL=serve-
|
|
91699
|
+
//# sourceMappingURL=serve-HDRZ2CU6.js.map
|