@sideboard-ai/core 0.1.210 → 0.1.212

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.
Files changed (31) hide show
  1. package/dist/{agents-G3TFVFBQ.js → agents-A2U3K7VK.js} +4 -4
  2. package/dist/{agents-IQZUN47D.js → agents-GQANI7M5.js} +4 -4
  3. package/dist/{chunk-3S2LDD2F.js → chunk-2PE6SZCM.js} +2 -2
  4. package/dist/{chunk-AOQZZA3M.js → chunk-DINKOGEU.js} +106 -56
  5. package/dist/{chunk-X5PUFYDJ.js → chunk-GHKFSBES.js} +2 -0
  6. package/dist/{chunk-NDE5RKZP.js → chunk-IA5IPGZI.js} +3 -3
  7. package/dist/{chunk-YYELAUKP.js → chunk-IRCAWYTN.js} +3 -3
  8. package/dist/{chunk-FGTPRMPS.js → chunk-JJ3ONQ4Q.js} +2 -0
  9. package/dist/{chunk-2R6BZRRB.js → chunk-MS6HGW2H.js} +99 -55
  10. package/dist/{chunk-ZZNZX2QW.js → chunk-NRKDRQM3.js} +1 -1
  11. package/dist/{chunk-WX4S775K.js → chunk-VPQXJYIW.js} +1 -1
  12. package/dist/{chunk-ZC664YBJ.js → chunk-WNVQJZ7P.js} +2 -2
  13. package/dist/{coordinator-prompt-PONGPWIP.js → coordinator-prompt-EHRDZ2ZU.js} +3 -3
  14. package/dist/{coordinator-prompt-GCITY3Q5.js → coordinator-prompt-LMTMWCPN.js} +3 -3
  15. package/dist/{global-workspace-LQZLTGFL.js → global-workspace-NG2TBUI5.js} +3 -3
  16. package/dist/{global-workspace-LIZHU4GM.js → global-workspace-RHABXQWB.js} +3 -3
  17. package/dist/index.cjs +101 -42
  18. package/dist/index.d.cts +41 -10
  19. package/dist/index.d.ts +41 -10
  20. package/dist/index.js +18 -5
  21. package/dist/mcp/run-stdio.cjs +88 -42
  22. package/dist/mcp/run-stdio.js +5 -5
  23. package/dist/{orchestrator-ZBUXJCII.js → orchestrator-333M3JAU.js} +5 -5
  24. package/dist/{orchestrator-G5HELCVT.js → orchestrator-DW4HDWLA.js} +5 -5
  25. package/dist/{thread-store-KMZRQEPY.js → thread-store-4M6WETL6.js} +1 -1
  26. package/dist/{thread-store-FCWU7Y3X.js → thread-store-MSMBQ3V4.js} +1 -1
  27. package/dist/{workspaces-2XW2DMRG.js → workspaces-FRR6Y4BY.js} +3 -3
  28. package/dist/{workspaces-T6PMQZYQ.js → workspaces-VIUUE4RT.js} +3 -3
  29. package/dist/{worktree-2OEMMFRT.js → worktree-3MEG62KB.js} +2 -2
  30. package/dist/{worktree-5ZGWKKZ6.js → worktree-GKUOHXXB.js} +2 -2
  31. package/package.json +1 -1
@@ -50,14 +50,14 @@ import {
50
50
  resolveQuotaFallbackAgent,
51
51
  turnCostUsdFromCursorUsage,
52
52
  whichOnPath
53
- } from "./chunk-NDE5RKZP.js";
54
- import "./chunk-ZC664YBJ.js";
53
+ } from "./chunk-IA5IPGZI.js";
54
+ import "./chunk-WNVQJZ7P.js";
55
55
  import "./chunk-3OHR73VK.js";
56
56
  import "./chunk-Y4MIXGPA.js";
57
57
  import "./chunk-VKQGAWHY.js";
58
- import "./chunk-WX4S775K.js";
58
+ import "./chunk-VPQXJYIW.js";
59
59
  import "./chunk-D6JWYJ4P.js";
60
- import "./chunk-X5PUFYDJ.js";
60
+ import "./chunk-GHKFSBES.js";
61
61
  import "./chunk-X5B3OS5I.js";
62
62
  import "./chunk-SYFVUF2C.js";
63
63
  import {
@@ -44,9 +44,9 @@ import {
44
44
  resolveLoginCommand,
45
45
  resolveQuotaFallbackAgent,
46
46
  whichOnPath
47
- } from "./chunk-YYELAUKP.js";
48
- import "./chunk-3S2LDD2F.js";
49
- import "./chunk-ZZNZX2QW.js";
47
+ } from "./chunk-IRCAWYTN.js";
48
+ import "./chunk-2PE6SZCM.js";
49
+ import "./chunk-NRKDRQM3.js";
50
50
  import "./chunk-6K64FJDD.js";
51
51
  import "./chunk-QQKDGPUI.js";
52
52
  import "./chunk-SALM35KD.js";
@@ -67,7 +67,7 @@ import {
67
67
  import "./chunk-4TR3HZFT.js";
68
68
  import "./chunk-WDRMZKVB.js";
69
69
  import "./chunk-JT7R45JB.js";
70
- import "./chunk-FGTPRMPS.js";
70
+ import "./chunk-JJ3ONQ4Q.js";
71
71
  import "./chunk-7J72QJOM.js";
72
72
  import "./chunk-77WWLBCI.js";
73
73
  import "./chunk-WFUDY6PC.js";
@@ -5,7 +5,7 @@ import {
5
5
  resolveRepoRoot,
6
6
  takenSlugsFromThread,
7
7
  teamSlugFromName
8
- } from "./chunk-ZZNZX2QW.js";
8
+ } from "./chunk-NRKDRQM3.js";
9
9
  import {
10
10
  ATTACHMENTS_DIR,
11
11
  attachmentsGitignoreBody
@@ -28,7 +28,7 @@ import {
28
28
  listThreads,
29
29
  updateThread,
30
30
  writeThread
31
- } from "./chunk-FGTPRMPS.js";
31
+ } from "./chunk-JJ3ONQ4Q.js";
32
32
  import {
33
33
  appDataDir,
34
34
  globalAgentCwd,
@@ -24,7 +24,7 @@ import {
24
24
  resolveQuotaFallbackAgent,
25
25
  stripBrightsyNdjsonNoise,
26
26
  toolDescription
27
- } from "./chunk-YYELAUKP.js";
27
+ } from "./chunk-IRCAWYTN.js";
28
28
  import {
29
29
  SLACK_REPLY_FORMATTING,
30
30
  addWorkspace,
@@ -47,7 +47,7 @@ import {
47
47
  stageAbsolutePathsAsAttachments,
48
48
  stageBuffersAsAttachments,
49
49
  syncWorkspacesFromThreads
50
- } from "./chunk-3S2LDD2F.js";
50
+ } from "./chunk-2PE6SZCM.js";
51
51
  import {
52
52
  addPrStackLayer,
53
53
  allocateTeamName,
@@ -97,7 +97,7 @@ import {
97
97
  worktreeDisplayLabelForGroup,
98
98
  worktreeNameFromPath,
99
99
  worktreeSlugForTicket
100
- } from "./chunk-ZZNZX2QW.js";
100
+ } from "./chunk-NRKDRQM3.js";
101
101
  import {
102
102
  ATTACHMENTS_DIR,
103
103
  DETACHED_JOBS_DIR,
@@ -189,7 +189,7 @@ import {
189
189
  updateThread,
190
190
  withThreadLock,
191
191
  writeThread
192
- } from "./chunk-FGTPRMPS.js";
192
+ } from "./chunk-JJ3ONQ4Q.js";
193
193
  import {
194
194
  appDataDir,
195
195
  findConventionSetup,
@@ -483,7 +483,7 @@ async function continueSourceThread(threadId, prompt) {
483
483
  await continueOnReply(threadId, prompt);
484
484
  return;
485
485
  }
486
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-ZBUXJCII.js");
486
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-333M3JAU.js");
487
487
  await getOrchestrator2().send(threadId, prompt);
488
488
  } catch {
489
489
  }
@@ -817,9 +817,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
817
817
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
818
818
  );
819
819
  }
820
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-LQZLTGFL.js");
820
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-NG2TBUI5.js");
821
821
  if (isGlobalThread2(thread)) {
822
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-GCITY3Q5.js");
822
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-LMTMWCPN.js");
823
823
  ensureGlobalCoordinatorCwd2(
824
824
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
825
825
  );
@@ -2606,6 +2606,7 @@ function stripArchivedTranscript(thread) {
2606
2606
  ...thread,
2607
2607
  attachments: [],
2608
2608
  pendingTurnAttachments: [],
2609
+ queueAttachments: [],
2609
2610
  messages: [historyRetentionStubMessage(thread)]
2610
2611
  },
2611
2612
  { touch: false }
@@ -4038,7 +4039,7 @@ async function createThread(input, _onSetupLine) {
4038
4039
  return readThread(thread.id) ?? thread;
4039
4040
  }
4040
4041
  async function listLinearIssues(agent, repoPath) {
4041
- const { getAdapter: getAdapter2 } = await import("./agents-IQZUN47D.js");
4042
+ const { getAdapter: getAdapter2 } = await import("./agents-GQANI7M5.js");
4042
4043
  await requireAgent(agent, { requireLinear: true });
4043
4044
  const adapter = getAdapter2(agent);
4044
4045
  if (!adapter.listLinearIssues) {
@@ -4484,7 +4485,7 @@ async function adoptThread(input) {
4484
4485
  messages: input.messages ?? []
4485
4486
  });
4486
4487
  writeThread(thread);
4487
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-2XW2DMRG.js");
4488
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-FRR6Y4BY.js");
4488
4489
  await ensureWorkspace2(repoPath);
4489
4490
  const { ensureWorktreeSideboardIgnored: ensureWorktreeSideboardIgnored2 } = await import("./worktree-exclude-X54WSOXM.js");
4490
4491
  await ensureWorktreeSideboardIgnored2(input.worktreePath);
@@ -6244,24 +6245,54 @@ function expandComposerPrompt(worktreePath, prompt, opts) {
6244
6245
 
6245
6246
  // src/composer/consume-attachments.ts
6246
6247
  function consumeComposerAttachments(thread) {
6247
- if (thread.attachments.length === 0) {
6248
- return {
6249
- attachments: [],
6250
- pendingTurnAttachments: thread.pendingTurnAttachments ?? []
6251
- };
6252
- }
6253
6248
  return {
6254
6249
  attachments: [],
6255
- pendingTurnAttachments: [
6256
- ...thread.pendingTurnAttachments ?? [],
6257
- ...thread.attachments
6258
- ]
6250
+ consumed: [...thread.attachments]
6259
6251
  };
6260
6252
  }
6261
6253
  function takePendingTurnAttachments(thread) {
6262
- const pending = thread.pendingTurnAttachments ?? [];
6263
- if (pending.length === 0 && thread.attachments.length === 0) return [];
6264
- return [...pending, ...thread.attachments];
6254
+ return [...thread.pendingTurnAttachments ?? []];
6255
+ }
6256
+ function alignQueueAttachments(queueLength, existing) {
6257
+ const next = (existing ?? []).slice(0, queueLength).map((slot) => [...slot ?? []]);
6258
+ while (next.length < queueLength) next.push([]);
6259
+ return next;
6260
+ }
6261
+ function appendQueuedItem(queue, queueAttachments, prompt, attachments = []) {
6262
+ return {
6263
+ queue: [...queue, prompt],
6264
+ queueAttachments: [...alignQueueAttachments(queue.length, queueAttachments), [...attachments]]
6265
+ };
6266
+ }
6267
+ function prependQueuedItem(queue, queueAttachments, prompt, attachments = []) {
6268
+ return {
6269
+ queue: [prompt, ...queue],
6270
+ queueAttachments: [[...attachments], ...alignQueueAttachments(queue.length, queueAttachments)]
6271
+ };
6272
+ }
6273
+ function removeQueuedItem(queue, queueAttachments, index) {
6274
+ const aligned = alignQueueAttachments(queue.length, queueAttachments);
6275
+ return {
6276
+ queue: queue.filter((_, i) => i !== index),
6277
+ queueAttachments: aligned.filter((_, i) => i !== index)
6278
+ };
6279
+ }
6280
+ function moveQueuedItemToFront(queue, queueAttachments, index) {
6281
+ const aligned = alignQueueAttachments(queue.length, queueAttachments);
6282
+ return {
6283
+ queue: [queue[index], ...queue.filter((_, i) => i !== index)],
6284
+ queueAttachments: [aligned[index] ?? [], ...aligned.filter((_, i) => i !== index)]
6285
+ };
6286
+ }
6287
+ function shiftQueuedItem(queue, queueAttachments) {
6288
+ if (queue.length === 0) return null;
6289
+ const aligned = alignQueueAttachments(queue.length, queueAttachments);
6290
+ return {
6291
+ prompt: queue[0],
6292
+ attachments: aligned[0] ?? [],
6293
+ queue: queue.slice(1),
6294
+ queueAttachments: aligned.slice(1)
6295
+ };
6265
6296
  }
6266
6297
 
6267
6298
  // src/agents/instructions.ts
@@ -7090,7 +7121,7 @@ function formatScheduledPrompt(name, prompt) {
7090
7121
  ${prompt}`;
7091
7122
  }
7092
7123
  async function defaultDeps() {
7093
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-ZBUXJCII.js");
7124
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-333M3JAU.js");
7094
7125
  const orch = getOrchestrator2();
7095
7126
  return {
7096
7127
  findThread: (id) => findThreadByRef(id),
@@ -7570,9 +7601,9 @@ var Orchestrator = class {
7570
7601
  if (!thread || thread.status === "archived") return;
7571
7602
  this.crashContinued.add(threadId);
7572
7603
  const prompt = formatAgentErrorContinuePrompt(opts.detail);
7573
- const queue = [prompt, ...thread.queue];
7574
- updateThread(threadId, { queue });
7575
- this.emit({ type: "queue_changed", threadId, queue });
7604
+ const next = prependQueuedItem(thread.queue, thread.queueAttachments, prompt);
7605
+ updateThread(threadId, next);
7606
+ this.emit({ type: "queue_changed", threadId, queue: next.queue });
7576
7607
  this.haltDrain.delete(threadId);
7577
7608
  }
7578
7609
  /**
@@ -7601,9 +7632,9 @@ var Orchestrator = class {
7601
7632
  }
7602
7633
  if (decision.action === "nudge") this.jobContinueNudged.add(threadId);
7603
7634
  else this.jobContinueCount.set(threadId, (this.jobContinueCount.get(threadId) ?? 0) + 1);
7604
- const queue = [decision.prompt, ...thread.queue];
7605
- updateThread(threadId, { queue });
7606
- this.emit({ type: "queue_changed", threadId, queue });
7635
+ const next = prependQueuedItem(thread.queue, thread.queueAttachments, decision.prompt);
7636
+ updateThread(threadId, next);
7637
+ this.emit({ type: "queue_changed", threadId, queue: next.queue });
7607
7638
  this.haltDrain.delete(threadId);
7608
7639
  }
7609
7640
  getThreads(includeArchived = false) {
@@ -7711,18 +7742,22 @@ var Orchestrator = class {
7711
7742
  throw new Error(`Thread is archived: ${thread.id}`);
7712
7743
  }
7713
7744
  const followUp = resolveSendFollowUp(current, opts?.followUp);
7714
- const queue = [...current.queue, prompt];
7745
+ const consumed = consumeComposerAttachments(current);
7746
+ const queued = appendQueuedItem(
7747
+ current.queue,
7748
+ current.queueAttachments,
7749
+ prompt,
7750
+ consumed.consumed
7751
+ );
7715
7752
  this.crashContinued.delete(thread.id);
7716
7753
  this.jobContinueCount.delete(thread.id);
7717
7754
  this.jobContinueNudged.delete(thread.id);
7718
7755
  this.haltDrain.delete(thread.id);
7719
7756
  const inFlight = this.activeTurns.has(thread.id) || this.startingTurns.has(thread.id) || current.status === "running";
7720
7757
  shouldSteer = followUp === "steer" && (inFlight || current.queue.length > 0);
7721
- const patch = { queue };
7722
- if (current.attachments.length > 0) {
7723
- const consumed = consumeComposerAttachments(current);
7758
+ const patch = queued;
7759
+ if (consumed.consumed.length > 0) {
7724
7760
  patch.attachments = consumed.attachments;
7725
- patch.pendingTurnAttachments = consumed.pendingTurnAttachments;
7726
7761
  }
7727
7762
  if (!inFlight) patch.status = "queued";
7728
7763
  const pid = current.agentPid;
@@ -7730,7 +7765,7 @@ var Orchestrator = class {
7730
7765
  patch.agentPid = null;
7731
7766
  }
7732
7767
  updateThread(thread.id, patch);
7733
- this.emit({ type: "queue_changed", threadId: thread.id, queue });
7768
+ this.emit({ type: "queue_changed", threadId: thread.id, queue: queued.queue });
7734
7769
  if (!inFlight) {
7735
7770
  this.emit({ type: "status_changed", threadId: thread.id, status: "queued" });
7736
7771
  }
@@ -7772,14 +7807,19 @@ var Orchestrator = class {
7772
7807
  return withThreadLock(thread.id, async () => {
7773
7808
  const current = this.requireThread(thread.id);
7774
7809
  if (index < 0 || index >= current.queue.length) return current;
7775
- const queue = current.queue.filter((_, i) => i !== index);
7776
- const stillQueued = queue.length > 0;
7810
+ const removed = removeQueuedItem(current.queue, current.queueAttachments, index);
7811
+ const stillQueued = removed.queue.length > 0;
7777
7812
  const inFlight = this.activeTurns.has(thread.id) || this.startingTurns.has(thread.id);
7778
7813
  updateThread(thread.id, {
7779
- queue,
7814
+ ...removed,
7815
+ // Follow-up files live on queueAttachments. pendingTurnAttachments is
7816
+ // the in-flight / just-dequeued snapshot — do not wipe it when a
7817
+ // later follow-up is removed. Only drop a leftover bag when nothing
7818
+ // is running and the queue is empty (legacy sends that never drained).
7819
+ ...stillQueued || inFlight ? {} : { pendingTurnAttachments: [] },
7780
7820
  status: !stillQueued && !inFlight && current.status === "queued" ? "idle" : current.status
7781
7821
  });
7782
- this.emit({ type: "queue_changed", threadId: thread.id, queue });
7822
+ this.emit({ type: "queue_changed", threadId: thread.id, queue: removed.queue });
7783
7823
  const next = this.requireThread(thread.id);
7784
7824
  this.emit({ type: "status_changed", threadId: thread.id, status: next.status });
7785
7825
  return next;
@@ -7795,12 +7835,10 @@ var Orchestrator = class {
7795
7835
  const promoted = await withThreadLock(thread.id, async () => {
7796
7836
  const current2 = this.requireThread(thread.id);
7797
7837
  if (index < 0 || index >= current2.queue.length) return false;
7798
- const item = current2.queue[index];
7799
- const rest = current2.queue.filter((_, i) => i !== index);
7800
- const queue = [item, ...rest];
7838
+ const next = moveQueuedItemToFront(current2.queue, current2.queueAttachments, index);
7801
7839
  this.haltDrain.delete(thread.id);
7802
- updateThread(thread.id, { queue });
7803
- this.emit({ type: "queue_changed", threadId: thread.id, queue });
7840
+ updateThread(thread.id, next);
7841
+ this.emit({ type: "queue_changed", threadId: thread.id, queue: next.queue });
7804
7842
  return true;
7805
7843
  });
7806
7844
  if (!promoted) return this.requireThread(thread.id);
@@ -7855,11 +7893,17 @@ var Orchestrator = class {
7855
7893
  }
7856
7894
  continue;
7857
7895
  }
7858
- const prompt = thread.queue[0];
7859
- const remaining = thread.queue.slice(1);
7860
- updateThread(threadId, { queue: remaining });
7861
- this.emit({ type: "queue_changed", threadId, queue: remaining });
7862
- await this.runTurn(threadId, prompt);
7896
+ const shifted = shiftQueuedItem(thread.queue, thread.queueAttachments);
7897
+ if (!shifted) break;
7898
+ updateThread(threadId, {
7899
+ queue: shifted.queue,
7900
+ queueAttachments: shifted.queueAttachments,
7901
+ // Always write the snapshot, including [] for text-only, so
7902
+ // takePending cannot fall back to leftover pending or composer files.
7903
+ pendingTurnAttachments: shifted.attachments
7904
+ });
7905
+ this.emit({ type: "queue_changed", threadId, queue: shifted.queue });
7906
+ await this.runTurn(threadId, shifted.prompt);
7863
7907
  }
7864
7908
  } finally {
7865
7909
  this.draining.delete(threadId);
@@ -7919,7 +7963,7 @@ var Orchestrator = class {
7919
7963
  thread.worktreePath,
7920
7964
  gitPrompt,
7921
7965
  {
7922
- attachments: autoContinue ? [] : sentAttachments ?? thread.attachments
7966
+ attachments: autoContinue ? [] : sentAttachments ?? []
7923
7967
  }
7924
7968
  );
7925
7969
  const slackInbound = /^(Slack DM|Slack @mention)(?:\n|$)/.test(
@@ -7973,7 +8017,7 @@ var Orchestrator = class {
7973
8017
  expandedPrompt
7974
8018
  ].filter(Boolean).join("\n\n");
7975
8019
  if (!autoContinue && sentAttachments) {
7976
- updateThread(threadId, { attachments: [], pendingTurnAttachments: [] });
8020
+ updateThread(threadId, { pendingTurnAttachments: [] });
7977
8021
  }
7978
8022
  const adapter = getAdapter(thread.agent);
7979
8023
  const resolved = await adapter.resolveSessionId(thread.worktreePath, thread.sessionId);
@@ -8389,7 +8433,7 @@ var Orchestrator = class {
8389
8433
  }
8390
8434
  if (clearQueue && thread.queue.length > 0) {
8391
8435
  this.haltDrain.delete(thread.id);
8392
- updateThread(thread.id, { queue: [] });
8436
+ updateThread(thread.id, { queue: [], queueAttachments: [] });
8393
8437
  this.emit({ type: "queue_changed", threadId: thread.id, queue: [] });
8394
8438
  } else if (!clearQueue && !continueQueue) {
8395
8439
  this.haltDrain.add(thread.id);
@@ -9299,7 +9343,7 @@ var Orchestrator = class {
9299
9343
  this.enforceHistoryRetention();
9300
9344
  if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
9301
9345
  try {
9302
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-2XW2DMRG.js");
9346
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-FRR6Y4BY.js");
9303
9347
  await ensureWorkspace2(thread.repoPath);
9304
9348
  } catch {
9305
9349
  }
@@ -9353,7 +9397,7 @@ var Orchestrator = class {
9353
9397
  `Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
9354
9398
  );
9355
9399
  }
9356
- const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-5ZGWKKZ6.js");
9400
+ const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-GKUOHXXB.js");
9357
9401
  const slug = thread.worktreePath.split("/").pop();
9358
9402
  const dest = thread.worktreePath;
9359
9403
  await withRepoGitLock(thread.repoPath, async () => {
@@ -9463,7 +9507,7 @@ async function startOrchestration(opts) {
9463
9507
  sourceRef: "default",
9464
9508
  ...createOpts
9465
9509
  }).catch(async () => {
9466
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-5ZGWKKZ6.js");
9510
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-GKUOHXXB.js");
9467
9511
  const repo = await resolveRepoRoot2(repoPath);
9468
9512
  const def = await resolveDefaultBranch2(repo);
9469
9513
  return orch.createThread({
@@ -9473,7 +9517,7 @@ async function startOrchestration(opts) {
9473
9517
  repoPath: repo
9474
9518
  });
9475
9519
  });
9476
- const { updateThread: upd } = await import("./thread-store-KMZRQEPY.js");
9520
+ const { updateThread: upd } = await import("./thread-store-4M6WETL6.js");
9477
9521
  const updated = upd(thread.id, {
9478
9522
  sourceType: "orchestration",
9479
9523
  sourceRef: goal
@@ -9690,6 +9734,12 @@ export {
9690
9734
  expandComposerPrompt,
9691
9735
  consumeComposerAttachments,
9692
9736
  takePendingTurnAttachments,
9737
+ alignQueueAttachments,
9738
+ appendQueuedItem,
9739
+ prependQueuedItem,
9740
+ removeQueuedItem,
9741
+ moveQueuedItemToFront,
9742
+ shiftQueuedItem,
9693
9743
  packagedDetachedJobPath,
9694
9744
  resolveDetachedJobScript,
9695
9745
  formatDetachedJobInvoke,
@@ -48,6 +48,7 @@ function normalizeThread(raw) {
48
48
  agentPid: raw.agentPid ?? null,
49
49
  attachments: Array.isArray(raw.attachments) ? raw.attachments : [],
50
50
  pendingTurnAttachments: Array.isArray(raw.pendingTurnAttachments) ? raw.pendingTurnAttachments : [],
51
+ queueAttachments: Array.isArray(raw.queueAttachments) ? raw.queueAttachments : [],
51
52
  prTitle: raw.prTitle ?? null,
52
53
  prState: raw.prState ?? null,
53
54
  prIsDraft: Boolean(raw.prIsDraft),
@@ -92,6 +93,7 @@ function createEmptyThread(partial) {
92
93
  messages: partial.messages ?? [],
93
94
  attachments: partial.attachments ?? [],
94
95
  pendingTurnAttachments: partial.pendingTurnAttachments ?? [],
96
+ queueAttachments: partial.queueAttachments ?? [],
95
97
  createdAt: ts,
96
98
  updatedAt: ts,
97
99
  archivedAt: typeof partial.archivedAt === "string" && partial.archivedAt.trim() ? partial.archivedAt.trim() : void 0,
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {
4
4
  isOrchestratorThread
5
- } from "./chunk-ZC664YBJ.js";
5
+ } from "./chunk-WNVQJZ7P.js";
6
6
  import {
7
7
  applyConnectedTeamToCli,
8
8
  brightsyMcpServerName,
@@ -20,7 +20,7 @@ import {
20
20
  mergeAgentGitAuthEnv,
21
21
  resolveAgentGitAuthEnv,
22
22
  resolveCodexGitWritableRoots
23
- } from "./chunk-WX4S775K.js";
23
+ } from "./chunk-VPQXJYIW.js";
24
24
  import {
25
25
  enrichPathWithNpmGlobalBin,
26
26
  isConductorBundledCli,
@@ -2414,7 +2414,7 @@ var claudeAdapter = {
2414
2414
  );
2415
2415
  }
2416
2416
  const mode = permissionMode(thread);
2417
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-LIZHU4GM.js");
2417
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-RHABXQWB.js");
2418
2418
  const isOrchestrator = isOrchestratorThread2(thread);
2419
2419
  const injectedServers = await buildInjectedMcpServers({
2420
2420
  includeSideboard: true,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  isOrchestratorThread
3
- } from "./chunk-3S2LDD2F.js";
3
+ } from "./chunk-2PE6SZCM.js";
4
4
  import {
5
5
  codexUnattendedGitConfigArgs,
6
6
  mergeAgentGitAuthEnv,
7
7
  resolveAgentGitAuthEnv,
8
8
  resolveCodexGitWritableRoots
9
- } from "./chunk-ZZNZX2QW.js";
9
+ } from "./chunk-NRKDRQM3.js";
10
10
  import {
11
11
  applyConnectedTeamToCli,
12
12
  brightsyMcpServerName,
@@ -1903,7 +1903,7 @@ var claudeAdapter = {
1903
1903
  );
1904
1904
  }
1905
1905
  const mode = permissionMode(thread);
1906
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-LQZLTGFL.js");
1906
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-NG2TBUI5.js");
1907
1907
  const isOrchestrator = isOrchestratorThread2(thread);
1908
1908
  const injectedServers = await buildInjectedMcpServers({
1909
1909
  includeSideboard: true,
@@ -46,6 +46,7 @@ function normalizeThread(raw) {
46
46
  agentPid: raw.agentPid ?? null,
47
47
  attachments: Array.isArray(raw.attachments) ? raw.attachments : [],
48
48
  pendingTurnAttachments: Array.isArray(raw.pendingTurnAttachments) ? raw.pendingTurnAttachments : [],
49
+ queueAttachments: Array.isArray(raw.queueAttachments) ? raw.queueAttachments : [],
49
50
  prTitle: raw.prTitle ?? null,
50
51
  prState: raw.prState ?? null,
51
52
  prIsDraft: Boolean(raw.prIsDraft),
@@ -90,6 +91,7 @@ function createEmptyThread(partial) {
90
91
  messages: partial.messages ?? [],
91
92
  attachments: partial.attachments ?? [],
92
93
  pendingTurnAttachments: partial.pendingTurnAttachments ?? [],
94
+ queueAttachments: partial.queueAttachments ?? [],
93
95
  createdAt: ts,
94
96
  updatedAt: ts,
95
97
  archivedAt: typeof partial.archivedAt === "string" && partial.archivedAt.trim() ? partial.archivedAt.trim() : void 0,