@schoolai/shipyard 3.1.0 → 3.1.1-nightly.20260415.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/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-IG5ZGAVH.js");
109
+ const { startCommand } = await import("./start-D67TQIGL.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-5Z6GSYVH.js");
121
+ const { serve } = await import("./serve-2F6SKPPO.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.");
@@ -24998,6 +24998,10 @@ var PRDataSchema = external_exports.object({
24998
24998
  autoMergeEnabled: external_exports.boolean(),
24999
24999
  headRefSha: external_exports.string().nullable(),
25000
25000
  headCommitInBase: external_exports.boolean().default(false),
25001
+ labels: external_exports.array(external_exports.object({ name: external_exports.string(), color: external_exports.string().default("") })).default([]),
25002
+ assignees: external_exports.array(external_exports.object({ login: external_exports.string(), avatarUrl: external_exports.string().nullable() })).default([]),
25003
+ reviewDecision: external_exports.string().nullable().default(null),
25004
+ mergeable: external_exports.string().nullable().default(null),
25001
25005
  checks: external_exports.array(CICheckSchema),
25002
25006
  reviewers: external_exports.array(PRReviewerSchema),
25003
25007
  comments: external_exports.array(PRCommentSchema)
@@ -25027,6 +25031,26 @@ var PRActionSchema = external_exports.discriminatedUnion("action", [
25027
25031
  action: external_exports.literal("add_reviewers"),
25028
25032
  prNumber: external_exports.number(),
25029
25033
  reviewers: external_exports.array(external_exports.string())
25034
+ }),
25035
+ external_exports.object({
25036
+ action: external_exports.literal("add_labels"),
25037
+ prNumber: external_exports.number(),
25038
+ labels: external_exports.array(external_exports.string())
25039
+ }),
25040
+ external_exports.object({
25041
+ action: external_exports.literal("remove_labels"),
25042
+ prNumber: external_exports.number(),
25043
+ labels: external_exports.array(external_exports.string())
25044
+ }),
25045
+ external_exports.object({
25046
+ action: external_exports.literal("add_assignees"),
25047
+ prNumber: external_exports.number(),
25048
+ assignees: external_exports.array(external_exports.string())
25049
+ }),
25050
+ external_exports.object({
25051
+ action: external_exports.literal("remove_assignees"),
25052
+ prNumber: external_exports.number(),
25053
+ assignees: external_exports.array(external_exports.string())
25030
25054
  })
25031
25055
  ]);
25032
25056
  var WORKFLOW_RUN_STATUSES = [
@@ -28184,7 +28208,7 @@ async function detectModels() {
28184
28208
  }
28185
28209
 
28186
28210
  // src/shared/capabilities/git-pr.ts
28187
- var GH_PR_JSON_FIELDS = "number,title,state,author,url,baseRefName,headRefName,headRefOid,body,isDraft,additions,deletions,changedFiles,createdAt,updatedAt,mergedAt,mergeCommit,mergeStateStatus,autoMergeRequest,statusCheckRollup,reviews,reviewRequests,comments";
28211
+ var GH_PR_JSON_FIELDS = "number,title,state,author,url,baseRefName,headRefName,headRefOid,body,isDraft,additions,deletions,changedFiles,createdAt,updatedAt,mergedAt,mergeCommit,mergeStateStatus,autoMergeRequest,statusCheckRollup,reviews,reviewRequests,comments,labels,assignees,reviewDecision,mergeable";
28188
28212
  var GH_STATE_MAP = {
28189
28213
  OPEN: "open",
28190
28214
  CLOSED: "closed",
@@ -28367,7 +28391,34 @@ function mapGhPRToPRData(raw) {
28367
28391
  const comments = extractArrayOrNodes(raw.comments).map(
28368
28392
  (c) => mapGhComment(toRecord2(c))
28369
28393
  );
28370
- return { ...extractScalarFields(raw), state, isDraft: isDraft2, checks, reviewers, comments };
28394
+ const labels = extractArrayOrNodes(raw.labels).map((l) => {
28395
+ const rec = toRecord2(l);
28396
+ return {
28397
+ name: typeof rec.name === "string" ? rec.name : "",
28398
+ color: typeof rec.color === "string" && rec.color !== "" ? `#${rec.color}` : ""
28399
+ };
28400
+ });
28401
+ const assignees = extractArrayOrNodes(raw.assignees).map((a) => {
28402
+ const rec = toRecord2(a);
28403
+ return {
28404
+ login: extractLogin(rec),
28405
+ avatarUrl: extractStringField(rec, "avatarUrl")
28406
+ };
28407
+ });
28408
+ const reviewDecision = typeof raw.reviewDecision === "string" ? raw.reviewDecision : null;
28409
+ const mergeable = typeof raw.mergeable === "string" ? raw.mergeable : null;
28410
+ return {
28411
+ ...extractScalarFields(raw),
28412
+ state,
28413
+ isDraft: isDraft2,
28414
+ checks,
28415
+ reviewers,
28416
+ comments,
28417
+ labels,
28418
+ assignees,
28419
+ reviewDecision,
28420
+ mergeable
28421
+ };
28371
28422
  }
28372
28423
  async function getPRForCurrentBranch(cwd) {
28373
28424
  try {
@@ -28497,6 +28548,38 @@ async function addReviewers(cwd, prNumber, reviewers) {
28497
28548
  15e3
28498
28549
  );
28499
28550
  }
28551
+ async function addLabels(cwd, prNumber, labels) {
28552
+ await runWithTimeout(
28553
+ "gh",
28554
+ ["pr", "edit", String(prNumber), "--add-label", labels.join(",")],
28555
+ cwd,
28556
+ 15e3
28557
+ );
28558
+ }
28559
+ async function removeLabels(cwd, prNumber, labels) {
28560
+ await runWithTimeout(
28561
+ "gh",
28562
+ ["pr", "edit", String(prNumber), "--remove-label", labels.join(",")],
28563
+ cwd,
28564
+ 15e3
28565
+ );
28566
+ }
28567
+ async function addAssignees(cwd, prNumber, assignees) {
28568
+ await runWithTimeout(
28569
+ "gh",
28570
+ ["pr", "edit", String(prNumber), "--add-assignee", assignees.join(",")],
28571
+ cwd,
28572
+ 15e3
28573
+ );
28574
+ }
28575
+ async function removeAssignees(cwd, prNumber, assignees) {
28576
+ await runWithTimeout(
28577
+ "gh",
28578
+ ["pr", "edit", String(prNumber), "--remove-assignee", assignees.join(",")],
28579
+ cwd,
28580
+ 15e3
28581
+ );
28582
+ }
28500
28583
  async function markPRReady(cwd, prNumber) {
28501
28584
  await runWithTimeout("gh", ["pr", "ready", String(prNumber)], cwd, 15e3);
28502
28585
  }
@@ -29505,7 +29588,7 @@ function nanoid(size2 = 21) {
29505
29588
  }
29506
29589
 
29507
29590
  // src/services/bootstrap/signaling.ts
29508
- var DAEMON_NPM_VERSION = true ? "3.1.0" : "unknown";
29591
+ var DAEMON_NPM_VERSION = true ? "3.1.1" : "unknown";
29509
29592
  function createDaemonSignaling(config2) {
29510
29593
  const agentId = config2.agentId ?? nanoid();
29511
29594
  function send(msg) {
@@ -29752,11 +29835,17 @@ function handleBrowserPreviewChannel(port, send, sendBinary, log, options) {
29752
29835
  mergeCookies(cookieJar, setCookieRaw);
29753
29836
  }
29754
29837
  const responseHeaders = collectResponseHeaders2(res.headers);
29755
- const isHtml = (res.headers["content-type"] ?? "").includes("text/html");
29838
+ const contentType = res.headers["content-type"] ?? "";
29839
+ const isHtml = contentType.includes("text/html");
29840
+ const isRewritableScript = contentType.includes("javascript") || contentType.includes("text/jsx") || contentType.includes("text/tsx") || contentType.includes("text/typescript");
29756
29841
  if (isHtml) {
29757
29842
  bufferAndInjectHtml(requestId, res, responseHeaders);
29758
29843
  return;
29759
29844
  }
29845
+ if (isRewritableScript) {
29846
+ bufferAndRewriteJs(requestId, res, responseHeaders);
29847
+ return;
29848
+ }
29760
29849
  const contentLength = res.headers["content-length"];
29761
29850
  const bodyLength = contentLength !== void 0 ? Number(contentLength) : -1;
29762
29851
  respond({
@@ -29802,6 +29891,29 @@ function handleBrowserPreviewChannel(port, send, sendBinary, log, options) {
29802
29891
  activeRequests.delete(requestId);
29803
29892
  });
29804
29893
  }
29894
+ function bufferAndRewriteJs(requestId, res, headers) {
29895
+ const chunks = [];
29896
+ res.on("data", (chunk) => chunks.push(chunk));
29897
+ res.on("end", () => {
29898
+ const rawJs = Buffer.concat(chunks).toString("utf-8");
29899
+ const rewritten = rewriteJsImportPaths(rawJs);
29900
+ const body = new TextEncoder().encode(rewritten);
29901
+ headers["content-length"] = String(body.byteLength);
29902
+ respond({
29903
+ type: "response-head",
29904
+ id: requestId,
29905
+ status: res.statusCode ?? 500,
29906
+ headers,
29907
+ bodyLength: body.byteLength
29908
+ });
29909
+ sendChunkedBody(requestId, body);
29910
+ activeRequests.delete(requestId);
29911
+ });
29912
+ res.on("error", (err) => {
29913
+ respondError(requestId, err.message);
29914
+ activeRequests.delete(requestId);
29915
+ });
29916
+ }
29805
29917
  function buildRequestHeaders(msgHeaders) {
29806
29918
  const headers = { host: `localhost:${port}` };
29807
29919
  for (const [k2, v2] of Object.entries(msgHeaders)) {
@@ -29907,6 +30019,9 @@ function injectBaseHref(html, origin) {
29907
30019
  function rewriteRootRelativePaths(html) {
29908
30020
  return html.replace(/((?:src|href|action)\s*=\s*["'])\/(?!\/)/gi, "$1./");
29909
30021
  }
30022
+ function rewriteJsImportPaths(js) {
30023
+ return js.replace(/((?:from|import)\s*\(\s*["'])\/(?!\/)/g, "$1./").replace(/(from\s+["'])\/(?!\/)/g, "$1./");
30024
+ }
29910
30025
  function handleBrowserPreviewUrlChannel(send, sendBinary, log, options) {
29911
30026
  const requestTimeoutMs = options?.timeoutMs ?? DEFAULT_REQUEST_TIMEOUT_MS;
29912
30027
  const activeControllers = /* @__PURE__ */ new Map();
@@ -29989,10 +30104,19 @@ function handleBrowserPreviewUrlChannel(send, sendBinary, log, options) {
29989
30104
  });
29990
30105
  const responseHeaders = collectSafeResponseHeaders(res);
29991
30106
  const rawBody = new Uint8Array(await res.arrayBuffer());
29992
- const isHtml = (res.headers.get("content-type") ?? "").includes("text/html");
29993
- const body = isHtml ? new TextEncoder().encode(
29994
- injectBaseHref(new TextDecoder().decode(rawBody), targetUrl.origin)
29995
- ) : rawBody;
30107
+ const contentType = res.headers.get("content-type") ?? "";
30108
+ const isHtml = contentType.includes("text/html");
30109
+ const isJs = contentType.includes("javascript") || contentType.includes("text/jsx") || contentType.includes("text/tsx") || contentType.includes("text/typescript");
30110
+ let body;
30111
+ if (isHtml) {
30112
+ body = new TextEncoder().encode(
30113
+ injectBaseHref(new TextDecoder().decode(rawBody), targetUrl.origin)
30114
+ );
30115
+ } else if (isJs) {
30116
+ body = new TextEncoder().encode(rewriteJsImportPaths(new TextDecoder().decode(rawBody)));
30117
+ } else {
30118
+ body = rawBody;
30119
+ }
29996
30120
  sendResponseWithBody(msg.id, res.status, responseHeaders, body);
29997
30121
  }
29998
30122
  async function handleUrlRequest(msg) {
@@ -32177,8 +32301,7 @@ async function sweepStaleTasks(taskStateStore, taskManager, log) {
32177
32301
  const noBroadcast = { broadcast: false };
32178
32302
  for (const action of actions) {
32179
32303
  if (action.kind === "mark_input_required") {
32180
- await taskStateStore.updateTaskStatus(action.taskId, "input_required", noBroadcast);
32181
- await taskStateStore.acknowledge(action.taskId, noBroadcast);
32304
+ await taskStateStore.sweepToInputRequired(action.taskId, noBroadcast);
32182
32305
  log({
32183
32306
  event: "stale_task_swept",
32184
32307
  taskId: action.taskId,
@@ -80249,9 +80372,9 @@ var StructuredTaskTracker = class {
80249
80372
  /**
80250
80373
  * Apply an overlay on top of CC tasks. Stores the overlay and re-flushes.
80251
80374
  */
80252
- applyOverlay(overlay) {
80375
+ applyOverlay(overlay, options) {
80253
80376
  this.#currentOverlay = overlay;
80254
- this.#flushStructuredTasks();
80377
+ this.#flushStructuredTasks(options);
80255
80378
  }
80256
80379
  processStructuredTaskEvents(content) {
80257
80380
  const events = extractStructuredTaskEvents(content);
@@ -80376,11 +80499,11 @@ var StructuredTaskTracker = class {
80376
80499
  applyDepEdgeAdditions(merged, overlay.depEdges);
80377
80500
  return merged;
80378
80501
  }
80379
- #flushStructuredTasks() {
80502
+ #flushStructuredTasks(options) {
80380
80503
  const overlay = this.#currentOverlay ?? DEFAULT_TASK_OVERLAY;
80381
80504
  const merged = this.#applyOverlayToMap(this.#structuredTasks, overlay);
80382
80505
  const todoProgress = this.#computeTodoProgress(merged);
80383
- this.#deps.updateStructuredTasks(Object.fromEntries(merged), todoProgress);
80506
+ this.#deps.updateStructuredTasks(Object.fromEntries(merged), todoProgress, options);
80384
80507
  if (!this.#suppressWriteThrough) {
80385
80508
  this.#ccTaskFileWriter?.writeMergedTasks(merged);
80386
80509
  }
@@ -82400,8 +82523,8 @@ Use this context to maintain continuity. You have already done this work \u2014
82400
82523
  }
82401
82524
  }
82402
82525
  }
82403
- applyOverlay(overlay) {
82404
- this.#structuredTaskTracker.applyOverlay(overlay);
82526
+ applyOverlay(overlay, options) {
82527
+ this.#structuredTaskTracker.applyOverlay(overlay, options);
82405
82528
  }
82406
82529
  /** ---------------------------------------------------------------- */
82407
82530
  /** Resource resolution */
@@ -83078,7 +83201,8 @@ var TaskManager = class {
83078
83201
  this.#tasks.set(taskId, { taskId, channelId, cwd, mode, orchestrator });
83079
83202
  this.#flushPendingStreamSubs(taskId, orchestrator);
83080
83203
  this.#deps.taskStateStore.getTask(taskId).then((record) => {
83081
- if (record?.taskOverlay) orchestrator.applyOverlay(record.taskOverlay);
83204
+ if (record?.taskOverlay)
83205
+ orchestrator.applyOverlay(record.taskOverlay, { preserveUpdatedAt: true });
83082
83206
  }).catch((err) => {
83083
83207
  this.#deps.log({
83084
83208
  event: "overlay_restore_failed",
@@ -83443,8 +83567,13 @@ var TaskManager = class {
83443
83567
  });
83444
83568
  });
83445
83569
  },
83446
- updateStructuredTasks: (tasks, todoProgress) => {
83447
- this.#deps.taskStateStore.updateStructuredTasks(taskId, tasks, todoProgress).catch((err) => {
83570
+ updateStructuredTasks: (tasks, todoProgress, options) => {
83571
+ this.#deps.taskStateStore.updateStructuredTasks(
83572
+ taskId,
83573
+ tasks,
83574
+ todoProgress,
83575
+ options ? { preserveUpdatedAt: options.preserveUpdatedAt } : void 0
83576
+ ).catch((err) => {
83448
83577
  this.#deps.log({
83449
83578
  event: "task_state_store_structured_tasks_failed",
83450
83579
  taskId,
@@ -83591,52 +83720,29 @@ function buildTaskStateStore(dataDir) {
83591
83720
  });
83592
83721
  },
83593
83722
  async updateTaskStatus(taskId, status, options) {
83594
- const task = await store.get(taskId);
83595
- if (!task) return;
83596
- pushBroadcast(options);
83597
- await store.set(taskId, applyStatusTransition(task, status, Date.now()));
83723
+ await safeUpdate(taskId, (task) => applyStatusTransition(task, status, Date.now()), options);
83598
83724
  },
83599
83725
  async updateTitle(taskId, title, options) {
83600
- const task = await store.get(taskId);
83601
- if (!task) return;
83602
- pushBroadcast(options);
83603
- await store.set(taskId, {
83604
- ...task,
83605
- title,
83606
- updatedAt: Date.now()
83607
- });
83726
+ await safeUpdate(taskId, (task) => ({ ...task, title, updatedAt: Date.now() }), options);
83608
83727
  },
83609
83728
  async updateCwd(taskId, cwd, options) {
83610
- const task = await store.get(taskId);
83611
- if (!task) return;
83612
- pushBroadcast(options);
83613
- await store.set(taskId, {
83614
- ...task,
83615
- cwd,
83616
- updatedAt: Date.now()
83617
- });
83729
+ await safeUpdate(taskId, (task) => ({ ...task, cwd, updatedAt: Date.now() }), options);
83618
83730
  },
83619
83731
  async updateMode(taskId, mode, options) {
83620
- const task = await store.get(taskId);
83621
- if (!task) return;
83622
- pushBroadcast(options);
83623
- await store.set(taskId, {
83624
- ...task,
83625
- mode,
83626
- updatedAt: Date.now()
83627
- });
83732
+ await safeUpdate(taskId, (task) => ({ ...task, mode, updatedAt: Date.now() }), options);
83628
83733
  },
83629
83734
  async updateTodoProgress(taskId, progress, options) {
83630
- const task = await store.get(taskId);
83631
- if (!task) return;
83632
- pushBroadcast(options);
83633
- await store.set(taskId, {
83634
- ...task,
83635
- todoCompleted: progress.todoCompleted,
83636
- todoTotal: progress.todoTotal,
83637
- currentActivity: progress.currentActivity,
83638
- updatedAt: Date.now()
83639
- });
83735
+ await safeUpdate(
83736
+ taskId,
83737
+ (task) => ({
83738
+ ...task,
83739
+ todoCompleted: progress.todoCompleted,
83740
+ todoTotal: progress.todoTotal,
83741
+ currentActivity: progress.currentActivity,
83742
+ updatedAt: Date.now()
83743
+ }),
83744
+ options
83745
+ );
83640
83746
  },
83641
83747
  async acknowledge(taskId, options) {
83642
83748
  await safeUpdate(taskId, (task) => ({ ...task, acknowledgedAt: Date.now() }), options);
@@ -83645,39 +83751,42 @@ function buildTaskStateStore(dataDir) {
83645
83751
  await safeUpdate(taskId, (task) => ({ ...task, pinned: !task.pinned }), options);
83646
83752
  },
83647
83753
  async updateStructuredTasks(taskId, tasks, todoProgress, options) {
83648
- const task = await store.get(taskId);
83649
- if (!task) return;
83650
- pushBroadcast(options);
83651
- await store.set(taskId, {
83652
- ...task,
83653
- structuredTasks: tasks,
83654
- ...todoProgress && {
83655
- todoCompleted: todoProgress.todoCompleted,
83656
- todoTotal: todoProgress.todoTotal,
83657
- currentActivity: todoProgress.currentActivity
83658
- },
83659
- updatedAt: Date.now()
83660
- });
83754
+ await safeUpdate(
83755
+ taskId,
83756
+ (task) => ({
83757
+ ...task,
83758
+ structuredTasks: tasks,
83759
+ ...todoProgress && {
83760
+ todoCompleted: todoProgress.todoCompleted,
83761
+ todoTotal: todoProgress.todoTotal,
83762
+ currentActivity: todoProgress.currentActivity
83763
+ },
83764
+ updatedAt: options?.preserveUpdatedAt ? task.updatedAt : Date.now()
83765
+ }),
83766
+ options
83767
+ );
83661
83768
  },
83662
83769
  async updateTaskOverlay(taskId, overlay, options) {
83663
- const task = await store.get(taskId);
83664
- if (!task) return;
83665
- pushBroadcast(options);
83666
- await store.set(taskId, {
83667
- ...task,
83668
- taskOverlay: overlay,
83669
- updatedAt: Date.now()
83670
- });
83770
+ await safeUpdate(
83771
+ taskId,
83772
+ (task) => ({
83773
+ ...task,
83774
+ taskOverlay: overlay,
83775
+ updatedAt: options?.preserveUpdatedAt ? task.updatedAt : Date.now()
83776
+ }),
83777
+ options
83778
+ );
83671
83779
  },
83672
83780
  async updateComposerSettings(taskId, settings, options) {
83673
- const task = await store.get(taskId);
83674
- if (!task) return;
83675
- pushBroadcast(options);
83676
- await store.set(taskId, {
83677
- ...task,
83678
- composerSettings: { ...task.composerSettings, ...settings },
83679
- updatedAt: Date.now()
83680
- });
83781
+ await safeUpdate(
83782
+ taskId,
83783
+ (task) => ({
83784
+ ...task,
83785
+ composerSettings: { ...task.composerSettings, ...settings },
83786
+ updatedAt: Date.now()
83787
+ }),
83788
+ options
83789
+ );
83681
83790
  },
83682
83791
  async updateCostStats(taskId, stats, options) {
83683
83792
  await safeUpdate(
@@ -83703,12 +83812,27 @@ function buildTaskStateStore(dataDir) {
83703
83812
  options
83704
83813
  );
83705
83814
  },
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
+ },
83706
83826
  async getTask(taskId) {
83707
83827
  return store.get(taskId);
83708
83828
  },
83709
83829
  async listTasks() {
83710
83830
  return store.list();
83711
83831
  },
83832
+ async listTasksWithVersion() {
83833
+ const tasks = await store.list();
83834
+ return { tasks, version: _version };
83835
+ },
83712
83836
  subscribe(listener) {
83713
83837
  taskListeners.add(listener);
83714
83838
  return () => {
@@ -86843,6 +86967,18 @@ function wireControlChannel(rawChannel, daemon, logAdapter, deps) {
86843
86967
  case "add_reviewers":
86844
86968
  await addReviewers(cwd, action.prNumber, action.reviewers);
86845
86969
  break;
86970
+ case "add_labels":
86971
+ await addLabels(cwd, action.prNumber, action.labels);
86972
+ break;
86973
+ case "remove_labels":
86974
+ await removeLabels(cwd, action.prNumber, action.labels);
86975
+ break;
86976
+ case "add_assignees":
86977
+ await addAssignees(cwd, action.prNumber, action.assignees);
86978
+ break;
86979
+ case "remove_assignees":
86980
+ await removeAssignees(cwd, action.prNumber, action.assignees);
86981
+ break;
86846
86982
  case "reply_to_comment":
86847
86983
  case "resolve_thread":
86848
86984
  throw new Error(`${action.action} not yet implemented`);
@@ -87192,12 +87328,11 @@ function wireControlChannel(rawChannel, daemon, logAdapter, deps) {
87192
87328
  });
87193
87329
  },
87194
87330
  onRequestTaskIndex: () => {
87195
- const snapshotVersion = daemon.taskStateStore.version;
87196
- daemon.taskStateStore.listTasks().then((tasks) => {
87331
+ daemon.taskStateStore.listTasksWithVersion().then(({ tasks, version }) => {
87197
87332
  controlHandler.sendControl({
87198
87333
  type: "task_index_snapshot",
87199
87334
  tasks,
87200
- version: snapshotVersion
87335
+ version
87201
87336
  });
87202
87337
  }).catch((err) => {
87203
87338
  logAdapter({
@@ -87411,19 +87546,6 @@ function wireControlChannel(rawChannel, daemon, logAdapter, deps) {
87411
87546
  }
87412
87547
  };
87413
87548
  pushMcpStatus(5);
87414
- const initialSnapshotVersion = daemon.taskStateStore.version;
87415
- daemon.taskStateStore.listTasks().then((tasks) => {
87416
- controlHandler.sendControl({
87417
- type: "task_index_snapshot",
87418
- tasks,
87419
- version: initialSnapshotVersion
87420
- });
87421
- }).catch((err) => {
87422
- logAdapter({
87423
- event: "task_index_initial_push_failed",
87424
- error: err instanceof Error ? err.message : String(err)
87425
- });
87426
- });
87427
87549
  daemon.userSettingsStore.getSettings().then((settings) => {
87428
87550
  controlHandler.sendControl({ type: "user_settings_snapshot", settings });
87429
87551
  }).catch((err) => {
@@ -91560,4 +91682,4 @@ export {
91560
91682
  classifyLogLevel,
91561
91683
  serve
91562
91684
  };
91563
- //# sourceMappingURL=serve-5Z6GSYVH.js.map
91685
+ //# sourceMappingURL=serve-2F6SKPPO.js.map