@sideboard-ai/core 0.1.341 → 0.1.343

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 (67) hide show
  1. package/dist/{abletime-MK4T5FZY.js → abletime-MSIMJKKQ.js} +4 -4
  2. package/dist/{abletime-AYYRRDT2.js → abletime-ZIYFR4SI.js} +4 -4
  3. package/dist/{abletime-oauth-NB34M4X4.js → abletime-oauth-2RUKRZYZ.js} +3 -3
  4. package/dist/{abletime-oauth-7TOEFRWH.js → abletime-oauth-IQZ3LOB2.js} +3 -3
  5. package/dist/{abletime-rest-IF7IMJGU.js → abletime-rest-7YAO5B74.js} +3 -3
  6. package/dist/{abletime-rest-7M3QXAXY.js → abletime-rest-UBLSGMSA.js} +3 -3
  7. package/dist/{agents-4WL4U5WD.js → agents-7DCNOMFP.js} +7 -7
  8. package/dist/{agents-FH5NVVCJ.js → agents-LNZ465IM.js} +7 -7
  9. package/dist/{app-settings-377375BJ.js → app-settings-FS7TM55D.js} +9 -1
  10. package/dist/{app-settings-YTOPIRDH.js → app-settings-Q2F57NVK.js} +9 -1
  11. package/dist/{chunk-MGV6JFDY.js → chunk-2BLJ726H.js} +4 -3
  12. package/dist/{chunk-3HJ2USRA.js → chunk-3DMRQB4Y.js} +1 -1
  13. package/dist/{chunk-I5C42O2M.js → chunk-3J3XOIHF.js} +3 -3
  14. package/dist/{chunk-2IA556KV.js → chunk-4HELMBYR.js} +2 -2
  15. package/dist/{chunk-5MHENWO5.js → chunk-4PXHJA5K.js} +2 -2
  16. package/dist/{chunk-TZFYBQAD.js → chunk-4TTTEKNV.js} +2 -2
  17. package/dist/{chunk-K355SYYX.js → chunk-5BFEHSHO.js} +4 -3
  18. package/dist/{chunk-CN7GSNEL.js → chunk-5SJGR3VS.js} +1 -1
  19. package/dist/{chunk-WSW27W5R.js → chunk-5TS3KVGI.js} +1 -1
  20. package/dist/{chunk-43BOPWFV.js → chunk-6RO2AOE5.js} +2 -2
  21. package/dist/{chunk-QULOUTDQ.js → chunk-A4ZI7SA3.js} +3 -3
  22. package/dist/{chunk-NF3KRZXV.js → chunk-D7US5R4H.js} +1 -1
  23. package/dist/{chunk-4RIKHUKB.js → chunk-DEQLDEYR.js} +5 -5
  24. package/dist/{chunk-PHLFFV2M.js → chunk-EDEYEYU6.js} +159 -89
  25. package/dist/{chunk-HZRYQ27Z.js → chunk-G3UV3GXJ.js} +2 -2
  26. package/dist/{chunk-IY4YNHYD.js → chunk-GUIJMZQG.js} +1 -1
  27. package/dist/{chunk-O6UAW76V.js → chunk-JHT3CYLT.js} +1 -1
  28. package/dist/{chunk-SLTWZRBN.js → chunk-JX3OWNOT.js} +1 -1
  29. package/dist/{chunk-COFHTNQU.js → chunk-KCZM7WZ3.js} +152 -84
  30. package/dist/{chunk-5VXE4ZI4.js → chunk-LDJT3TLN.js} +7 -7
  31. package/dist/{chunk-FVX7JWFW.js → chunk-LHU6ZBFB.js} +2 -2
  32. package/dist/{chunk-ZS7AY6DS.js → chunk-NDBMDHQ5.js} +5 -5
  33. package/dist/{chunk-DF3S5X3H.js → chunk-NGIGRAZB.js} +5 -5
  34. package/dist/{chunk-47UDPUVZ.js → chunk-O2IRQAFB.js} +3 -3
  35. package/dist/{chunk-QBUX2EDG.js → chunk-RTZO2YJC.js} +2 -2
  36. package/dist/{chunk-CMYGUGGZ.js → chunk-S3DTEGMK.js} +8 -8
  37. package/dist/{chunk-DF34F3QR.js → chunk-S3UGLMGE.js} +21 -0
  38. package/dist/{chunk-4BUTF5LN.js → chunk-SLLTEMIL.js} +2 -2
  39. package/dist/{chunk-RZUZU5KD.js → chunk-TKEYXNXY.js} +21 -0
  40. package/dist/{chunk-HNIEEKKR.js → chunk-WO7VF4FG.js} +5 -5
  41. package/dist/{conductor-RGVRIOTZ.js → conductor-4SWJM5FS.js} +5 -5
  42. package/dist/{conductor-QZKG7YPO.js → conductor-Q433HU77.js} +5 -5
  43. package/dist/{coordinator-prompt-CDVIFBYS.js → coordinator-prompt-5QHWCO7V.js} +4 -4
  44. package/dist/{coordinator-prompt-66UHVADL.js → coordinator-prompt-Z7PPP45X.js} +4 -4
  45. package/dist/{global-workspace-KMQSUF2G.js → global-workspace-DL4K4K7O.js} +4 -4
  46. package/dist/{global-workspace-FNDRAJLF.js → global-workspace-VDCZMFCZ.js} +4 -4
  47. package/dist/index.cjs +193 -73
  48. package/dist/index.d.cts +18 -2
  49. package/dist/index.d.ts +18 -2
  50. package/dist/index.js +53 -26
  51. package/dist/{linear-ZJQM5IGJ.js → linear-JE4WAZ3W.js} +2 -2
  52. package/dist/{linear-6DM4FJWT.js → linear-UXMDJAD4.js} +2 -2
  53. package/dist/{linear-list-POPBU2VC.js → linear-list-I4NAOWPN.js} +1 -1
  54. package/dist/{linear-list-4EPKZTYE.js → linear-list-KDLU7QWX.js} +1 -1
  55. package/dist/mcp/run-stdio.cjs +181 -73
  56. package/dist/mcp/run-stdio.js +39 -22
  57. package/dist/{optional-cli-3G2274LT.js → optional-cli-7QXXPEN6.js} +3 -3
  58. package/dist/{optional-cli-CZF2ZFU5.js → optional-cli-RUUCLNSM.js} +4 -4
  59. package/dist/{orchestrator-BKCQUMLB.js → orchestrator-RLFBFRAG.js} +10 -10
  60. package/dist/{orchestrator-SCFWTIE7.js → orchestrator-Y5JCAJGV.js} +10 -10
  61. package/dist/{thread-store-OARQT6DL.js → thread-store-HETUMDVA.js} +2 -2
  62. package/dist/{thread-store-W2SSO6IQ.js → thread-store-ILM2ZJCB.js} +2 -2
  63. package/dist/{workspaces-6GB56LMJ.js → workspaces-EIIHHH4S.js} +4 -4
  64. package/dist/{workspaces-EWWLVSZ5.js → workspaces-MX4W4SSB.js} +4 -4
  65. package/dist/{worktree-BRKMPZMJ.js → worktree-BD3EJE24.js} +3 -3
  66. package/dist/{worktree-OB5ABI22.js → worktree-QBVLKACU.js} +3 -3
  67. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  formatOptionalServicesDirectiveForTurn,
3
3
  formatOptionalServicesReminderForTurn
4
- } from "./chunk-TZFYBQAD.js";
4
+ } from "./chunk-4TTTEKNV.js";
5
5
  import {
6
6
  extractPresentedPlan,
7
7
  isPresentPlanToolName,
@@ -21,7 +21,7 @@ import {
21
21
  parseSessionQuotaResetAt,
22
22
  planModeTurnInstruction,
23
23
  resolveQuotaFallbackAgent
24
- } from "./chunk-5VXE4ZI4.js";
24
+ } from "./chunk-LDJT3TLN.js";
25
25
  import {
26
26
  applyWorktreePkgCacheEnv,
27
27
  buildBrightsySessionSeed,
@@ -56,7 +56,7 @@ import {
56
56
  worktreeDevProcessKey,
57
57
  worktreeRunProcessKey,
58
58
  worktreeSetupProcessKey
59
- } from "./chunk-DF3S5X3H.js";
59
+ } from "./chunk-NGIGRAZB.js";
60
60
  import {
61
61
  applyAgentEvent,
62
62
  clipAgentEventForPaint,
@@ -101,7 +101,7 @@ import {
101
101
  stageAbsolutePathsAsAttachments,
102
102
  stageBuffersAsAttachments,
103
103
  syncWorkspacesFromThreads
104
- } from "./chunk-MGV6JFDY.js";
104
+ } from "./chunk-2BLJ726H.js";
105
105
  import {
106
106
  addPrStackLayer,
107
107
  allocateTeamSlug,
@@ -154,7 +154,7 @@ import {
154
154
  resolveRepoRoot,
155
155
  switchWorktreeBranch,
156
156
  withRepoGitLock
157
- } from "./chunk-HZRYQ27Z.js";
157
+ } from "./chunk-G3UV3GXJ.js";
158
158
  import {
159
159
  REVIEW_TAB_TITLE,
160
160
  agentNicknameFromWorktreePath,
@@ -186,7 +186,7 @@ import {
186
186
  worktreeNameFromPath,
187
187
  worktreeSlugForTicket,
188
188
  writeThread
189
- } from "./chunk-SLTWZRBN.js";
189
+ } from "./chunk-JX3OWNOT.js";
190
190
  import {
191
191
  askBlockStillWaiting,
192
192
  extractPendingPlanQuestions,
@@ -264,7 +264,7 @@ import {
264
264
  wakeOrchestratorOnGithubEdgesEnabled,
265
265
  withTurnScopedCost,
266
266
  writeViewerContext
267
- } from "./chunk-RZUZU5KD.js";
267
+ } from "./chunk-TKEYXNXY.js";
268
268
  import {
269
269
  examplePrefixedBranch,
270
270
  sanitizeGitBranchPrefix
@@ -527,9 +527,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
527
527
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
528
528
  );
529
529
  }
530
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-FNDRAJLF.js");
530
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-VDCZMFCZ.js");
531
531
  if (isGlobalThread2(thread)) {
532
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-CDVIFBYS.js");
532
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-5QHWCO7V.js");
533
533
  ensureGlobalCoordinatorCwd2(
534
534
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
535
535
  );
@@ -3299,7 +3299,7 @@ async function createThread(input, _onSetupLine) {
3299
3299
  });
3300
3300
  await requireAgent(resolved.agent);
3301
3301
  if (input.cowboy) {
3302
- const { cowboyModeEnabled } = await import("./app-settings-377375BJ.js");
3302
+ const { cowboyModeEnabled } = await import("./app-settings-FS7TM55D.js");
3303
3303
  if (!cowboyModeEnabled()) {
3304
3304
  throw new Error(
3305
3305
  "Cowboy mode is off. Enable it in Settings \u2192 Advanced."
@@ -3358,7 +3358,7 @@ async function createThread(input, _onSetupLine) {
3358
3358
  let sourceIsFork = false;
3359
3359
  if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
3360
3360
  if (isAbleTimeConnected() && getIssueSource() === "abletime") {
3361
- const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-AYYRRDT2.js");
3361
+ const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-ZIYFR4SI.js");
3362
3362
  const task = await ensureAbleTimeTask({
3363
3363
  title: title?.trim() || "Untitled work",
3364
3364
  description: input.prompt?.trim() || void 0
@@ -3469,7 +3469,7 @@ async function createThread(input, _onSetupLine) {
3469
3469
  return readThread(thread.id) ?? thread;
3470
3470
  }
3471
3471
  async function listLinearIssues(agent, repoPath) {
3472
- const { getAdapter: getAdapter2 } = await import("./agents-4WL4U5WD.js");
3472
+ const { getAdapter: getAdapter2 } = await import("./agents-7DCNOMFP.js");
3473
3473
  await requireAgent(agent, { requireLinear: true });
3474
3474
  const adapter = getAdapter2(agent);
3475
3475
  if (!adapter.listLinearIssues) {
@@ -4252,7 +4252,7 @@ async function adoptThread(input) {
4252
4252
  messages: input.messages ?? []
4253
4253
  });
4254
4254
  writeThread(thread);
4255
- const { addWorkspace: addWorkspace2 } = await import("./workspaces-EWWLVSZ5.js");
4255
+ const { addWorkspace: addWorkspace2 } = await import("./workspaces-MX4W4SSB.js");
4256
4256
  await addWorkspace2(repoPath);
4257
4257
  const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-YQBN43QD.js");
4258
4258
  await ensureWorktreeSideboardIgnored(input.worktreePath);
@@ -6253,49 +6253,6 @@ function expandComposerPrompt(worktreePath, prompt, opts) {
6253
6253
  };
6254
6254
  }
6255
6255
 
6256
- // src/composer/agent-has-replied.ts
6257
- function joinSteerPrompt(base, addition) {
6258
- const next = addition.trim();
6259
- if (!next) return base;
6260
- const head = base.replace(/\s+$/, "");
6261
- if (!head) return next;
6262
- return `${head}
6263
- ${next}`;
6264
- }
6265
- function messagesWithRewrittenUserPrompt(messages, from, to) {
6266
- if (from === to) return null;
6267
- const next = messages.slice();
6268
- for (let i = next.length - 1; i >= 0; i--) {
6269
- const message = next[i];
6270
- if (!message || message.origin === "continue" || message.role === "summary") continue;
6271
- if (message.role !== "user") continue;
6272
- if (message.text !== from) return null;
6273
- next[i] = { ...message, text: to };
6274
- return next;
6275
- }
6276
- return null;
6277
- }
6278
- function trailingUnansweredUserText(messages) {
6279
- for (let i = messages.length - 1; i >= 0; i--) {
6280
- const message = messages[i];
6281
- if (!message || message.origin === "continue" || message.role === "summary") continue;
6282
- if (message.role === "agent") {
6283
- const text3 = (message.text ?? "").trim();
6284
- if (text3 || (message.parts?.length ?? 0) > 0) return null;
6285
- continue;
6286
- }
6287
- if (message.role === "user") return message.text;
6288
- }
6289
- return null;
6290
- }
6291
- function livePartsShowAgentReply(parts) {
6292
- for (const part of parts) {
6293
- if (part.type === "tool") return true;
6294
- if ((part.type === "text" || part.type === "thinking") && part.text.trim()) return true;
6295
- }
6296
- return false;
6297
- }
6298
-
6299
6256
  // src/composer/consume-attachments.ts
6300
6257
  function consumeComposerAttachments(thread) {
6301
6258
  return {
@@ -6306,6 +6263,22 @@ function consumeComposerAttachments(thread) {
6306
6263
  function takePendingTurnAttachments(thread) {
6307
6264
  return [...thread.pendingTurnAttachments ?? []];
6308
6265
  }
6266
+ function mergeTurnAttachments(base, extra) {
6267
+ const next = [];
6268
+ const seen = /* @__PURE__ */ new Set();
6269
+ for (const att of [...base ?? [], ...extra ?? []]) {
6270
+ if (seen.has(att.id)) continue;
6271
+ seen.add(att.id);
6272
+ next.push(att);
6273
+ }
6274
+ return next;
6275
+ }
6276
+ function sameTurnAttachments(a, b) {
6277
+ const left = a ?? [];
6278
+ const right = b ?? [];
6279
+ if (left.length !== right.length) return false;
6280
+ return left.every((att, i) => att.id === right[i]?.id);
6281
+ }
6309
6282
  function alignQueueAttachments(queueLength, existing) {
6310
6283
  const next = (existing ?? []).slice(0, queueLength).map((slot) => [...slot ?? []]);
6311
6284
  while (next.length < queueLength) next.push([]);
@@ -6348,15 +6321,95 @@ function shiftQueuedItem(queue, queueAttachments) {
6348
6321
  };
6349
6322
  }
6350
6323
 
6324
+ // src/composer/agent-has-replied.ts
6325
+ function joinSteerPrompt(base, addition) {
6326
+ const next = addition.trim();
6327
+ if (!next) return base;
6328
+ const head = base.replace(/\s+$/, "");
6329
+ if (!head) return next;
6330
+ return `${head}
6331
+ ${next}`;
6332
+ }
6333
+ function messagesWithRewrittenUserPrompt(messages, from, to, attachments) {
6334
+ const extra = attachments ?? [];
6335
+ if (from === to && extra.length === 0) return null;
6336
+ const next = messages.slice();
6337
+ for (let i = next.length - 1; i >= 0; i--) {
6338
+ const message = next[i];
6339
+ if (!message || message.origin === "continue" || message.role === "summary") continue;
6340
+ if (message.role !== "user") continue;
6341
+ if (message.text !== from) return null;
6342
+ const merged = mergeTurnAttachments(message.attachments, extra);
6343
+ if (from === to && merged.length === (message.attachments?.length ?? 0)) return null;
6344
+ next[i] = {
6345
+ ...message,
6346
+ text: to,
6347
+ ...merged.length > 0 ? { attachments: merged } : {}
6348
+ };
6349
+ return next;
6350
+ }
6351
+ return null;
6352
+ }
6353
+ function trailingUnansweredUserText(messages) {
6354
+ for (let i = messages.length - 1; i >= 0; i--) {
6355
+ const message = messages[i];
6356
+ if (!message || message.origin === "continue" || message.role === "summary") continue;
6357
+ if (message.role === "agent") {
6358
+ const text3 = (message.text ?? "").trim();
6359
+ if (text3 || (message.parts?.length ?? 0) > 0) return null;
6360
+ continue;
6361
+ }
6362
+ if (message.role === "user") return message.text;
6363
+ }
6364
+ return null;
6365
+ }
6366
+ function livePartsShowAgentReply(parts) {
6367
+ for (const part of parts) {
6368
+ if (part.type === "tool") return true;
6369
+ if ((part.type === "text" || part.type === "thinking") && part.text.trim()) return true;
6370
+ }
6371
+ return false;
6372
+ }
6373
+
6351
6374
  // src/orchestrator/enqueue-thread-send.ts
6352
6375
  function resolveSendFollowUp(thread, requested) {
6353
6376
  if (requested === "steer" || requested === "queue") return requested;
6354
6377
  return isOrchestratorThread(thread) ? followUpBehavior() : "queue";
6355
6378
  }
6356
- function rewriteTrailingUserPrompt(threadId, from, to) {
6379
+ function beginOpenSteerDraft(text3) {
6380
+ return { text: text3, spawned: false, attachments: [] };
6381
+ }
6382
+ function seedOpenSteerAttachments(draft, sent) {
6383
+ if (!draft) return [...sent ?? []];
6384
+ draft.attachments = mergeTurnAttachments(sent, draft.attachments);
6385
+ return draft.attachments ?? [];
6386
+ }
6387
+ function openSteerTurnAttachments(draft, fallback, autoContinue) {
6388
+ if (autoContinue) return [];
6389
+ return [...draft?.attachments ?? fallback];
6390
+ }
6391
+ function promptAfterJoinedSteer(input) {
6392
+ if (input.draft) input.draft.spawned = true;
6393
+ return promptForJoinedSteer({
6394
+ threadId: input.threadId,
6395
+ promptText: input.promptText,
6396
+ latestPrompt: input.draft?.text ?? input.promptText,
6397
+ agentPrompt: input.agentPrompt,
6398
+ expandedPrompt: input.expandedPrompt,
6399
+ worktreePath: input.worktreePath,
6400
+ attachments: input.expandedAttachments,
6401
+ latestAttachments: openSteerTurnAttachments(
6402
+ input.draft,
6403
+ input.expandedAttachments,
6404
+ input.autoContinue
6405
+ ),
6406
+ gitForge: input.gitForge
6407
+ });
6408
+ }
6409
+ function rewriteTrailingUserPrompt(threadId, from, to, attachments) {
6357
6410
  const thread = readThread(threadId);
6358
6411
  if (!thread) return;
6359
- const messages = messagesWithRewrittenUserPrompt(thread.messages, from, to);
6412
+ const messages = messagesWithRewrittenUserPrompt(thread.messages, from, to, attachments);
6360
6413
  if (!messages) return;
6361
6414
  updateThread(threadId, { messages });
6362
6415
  }
@@ -6371,12 +6424,18 @@ function reuseJoinedUserBubble(reused, threadId, messages, promptText) {
6371
6424
  return false;
6372
6425
  }
6373
6426
  function promptForJoinedSteer(input) {
6374
- if (input.latestPrompt === input.promptText) return input.agentPrompt;
6375
- rewriteTrailingUserPrompt(input.threadId, input.promptText, input.latestPrompt);
6427
+ const latestAttachments = input.latestAttachments ?? input.attachments;
6428
+ const textSame = input.latestPrompt === input.promptText;
6429
+ if (textSame && sameTurnAttachments(input.attachments, latestAttachments)) {
6430
+ return input.agentPrompt;
6431
+ }
6432
+ if (!textSame) {
6433
+ rewriteTrailingUserPrompt(input.threadId, input.promptText, input.latestPrompt);
6434
+ }
6376
6435
  const { agentPrompt: expandedLatest } = expandComposerPrompt(
6377
6436
  input.worktreePath,
6378
6437
  expandCanonicalGitRequest(input.latestPrompt, { forge: input.gitForge }),
6379
- { attachments: input.attachments }
6438
+ { attachments: latestAttachments }
6380
6439
  );
6381
6440
  return input.expandedPrompt && input.agentPrompt.endsWith(input.expandedPrompt) ? input.agentPrompt.slice(0, -input.expandedPrompt.length) + expandedLatest : `${input.agentPrompt}
6382
6441
 
@@ -6412,7 +6471,13 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6412
6471
  const combined = joinSteerPrompt(unanswered, prompt);
6413
6472
  if (draft && !draft.spawned) {
6414
6473
  draft.text = combined;
6415
- rewriteTrailingUserPrompt(current.id, unanswered, combined);
6474
+ if (consumed.consumed.length > 0) {
6475
+ draft.attachments = mergeTurnAttachments(draft.attachments, consumed.consumed);
6476
+ }
6477
+ rewriteTrailingUserPrompt(current.id, unanswered, combined, consumed.consumed);
6478
+ if (explicit === void 0 && consumed.consumed.length > 0) {
6479
+ updateThread(current.id, { attachments: consumed.attachments });
6480
+ }
6416
6481
  } else {
6417
6482
  const queue = current.queue.slice();
6418
6483
  queue[0] = combined;
@@ -6434,8 +6499,13 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
6434
6499
  }
6435
6500
  const promptToQueue = unanswered != null ? joinSteerPrompt(unanswered, prompt) : prompt;
6436
6501
  if (unanswered != null) {
6437
- if (draft) draft.text = promptToQueue;
6438
- rewriteTrailingUserPrompt(current.id, unanswered, promptToQueue);
6502
+ if (draft) {
6503
+ draft.text = promptToQueue;
6504
+ if (consumed.consumed.length > 0) {
6505
+ draft.attachments = mergeTurnAttachments(draft.attachments, consumed.consumed);
6506
+ }
6507
+ }
6508
+ rewriteTrailingUserPrompt(current.id, unanswered, promptToQueue, consumed.consumed);
6439
6509
  host.reusedUserPrompt.add(current.id);
6440
6510
  }
6441
6511
  const queued = appendQueuedItem(
@@ -7807,11 +7877,11 @@ function realDeps() {
7807
7877
  parentIdForThread,
7808
7878
  designatedId: designatedOrchestratorId,
7809
7879
  send: async (threadId, prompt) => {
7810
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-SCFWTIE7.js");
7880
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-Y5JCAJGV.js");
7811
7881
  await getOrchestrator2().send(threadId, prompt, { followUp: "queue" });
7812
7882
  },
7813
7883
  startOrchestration: async (prompt) => {
7814
- const { startOrchestration: startOrchestration2 } = await import("./orchestrator-SCFWTIE7.js");
7884
+ const { startOrchestration: startOrchestration2 } = await import("./orchestrator-Y5JCAJGV.js");
7815
7885
  const defaults = resolveOrchestratorDefaults();
7816
7886
  await startOrchestration2({
7817
7887
  goal: prompt,
@@ -7838,7 +7908,7 @@ function formatScheduledPrompt(name, prompt) {
7838
7908
  ${prompt}`;
7839
7909
  }
7840
7910
  async function defaultDeps() {
7841
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-SCFWTIE7.js");
7911
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-Y5JCAJGV.js");
7842
7912
  const orch = getOrchestrator2();
7843
7913
  return {
7844
7914
  findThread: (id) => findThreadByRef(id),
@@ -8194,7 +8264,7 @@ var Orchestrator = class {
8194
8264
  orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
8195
8265
  });
8196
8266
  }
8197
- const { autoCleanupOrphansEnabled } = await import("./app-settings-377375BJ.js");
8267
+ const { autoCleanupOrphansEnabled } = await import("./app-settings-FS7TM55D.js");
8198
8268
  if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
8199
8269
  await cleanupOrphanWorktrees({ repoPaths });
8200
8270
  }
@@ -8584,7 +8654,7 @@ var Orchestrator = class {
8584
8654
  }
8585
8655
  await setup;
8586
8656
  if (skipSetup) return;
8587
- const { autoRunAfterSetupEnabled } = await import("./app-settings-377375BJ.js");
8657
+ const { autoRunAfterSetupEnabled } = await import("./app-settings-FS7TM55D.js");
8588
8658
  if (autoRunAfterSetupEnabled()) {
8589
8659
  try {
8590
8660
  await this.startDev(threadId);
@@ -8817,10 +8887,7 @@ var Orchestrator = class {
8817
8887
  this.emit({ type: "status_changed", threadId, status: "running" });
8818
8888
  this.emit({ type: "turn_started", threadId, prompt });
8819
8889
  try {
8820
- this.openSteerPrompt.set(threadId, {
8821
- text: typeof prompt === "string" ? prompt : "",
8822
- spawned: false
8823
- });
8890
+ this.openSteerPrompt.set(threadId, beginOpenSteerDraft(typeof prompt === "string" ? prompt : ""));
8824
8891
  try {
8825
8892
  const baseline = await captureTurnBaseline(thread.worktreePath);
8826
8893
  if (baseline) this.turnBaselines.set(threadId, baseline);
@@ -8850,13 +8917,14 @@ var Orchestrator = class {
8850
8917
  const autoContinue = isJobContinuePrompt(promptText) || promptText.startsWith("The previous agent process ended before it finished.");
8851
8918
  const parked = takePendingTurnAttachments(thread);
8852
8919
  const sentAttachments = !autoContinue && parked.length > 0 ? parked : void 0;
8920
+ const turnAttachments = seedOpenSteerAttachments(this.openSteerPrompt.get(threadId), sentAttachments);
8853
8921
  if (!autoContinue) clearAgentBlock(threadId);
8854
8922
  const shown = this.requireThread(threadId).messages;
8855
8923
  if (!reuseJoinedUserBubble(this.reusedUserPrompt, threadId, shown, promptText)) {
8856
8924
  appendMessage(threadId, {
8857
8925
  role: "user",
8858
8926
  text: promptText,
8859
- ...sentAttachments ? { attachments: sentAttachments } : {},
8927
+ ...turnAttachments.length > 0 ? { attachments: turnAttachments } : {},
8860
8928
  ...autoContinue ? { origin: "continue" } : {},
8861
8929
  ts: (/* @__PURE__ */ new Date()).toISOString()
8862
8930
  });
@@ -8886,11 +8954,12 @@ var Orchestrator = class {
8886
8954
  thread = this.requireThread(threadId);
8887
8955
  const turnOrigin = thread.worktreePath?.trim() ? await resolveOriginRemote(thread.worktreePath).catch(() => null) : null;
8888
8956
  const gitPrompt = expandCanonicalGitRequest(promptText, { forge: turnOrigin?.forge });
8957
+ const expandedAttachments = openSteerTurnAttachments(this.openSteerPrompt.get(threadId), turnAttachments, autoContinue);
8889
8958
  const { agentPrompt: expandedPrompt } = expandComposerPrompt(
8890
8959
  thread.worktreePath,
8891
8960
  gitPrompt,
8892
8961
  {
8893
- attachments: autoContinue ? [] : sentAttachments ?? []
8962
+ attachments: expandedAttachments
8894
8963
  }
8895
8964
  );
8896
8965
  const slackInbound = /^(Slack DM|Slack @mention)(?:\n|$)/.test(
@@ -8969,7 +9038,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
8969
9038
  }
8970
9039
  const isBrightsy = fresh.agent === "brightsy";
8971
9040
  const isOrchestration = isOrchestratorThread(fresh);
8972
- const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-377375BJ.js");
9041
+ const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-FS7TM55D.js");
8973
9042
  const gitAuthMode = getGithubGitAuthMode();
8974
9043
  const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
8975
9044
  githubSlug: turnOrigin?.forge === "github" ? turnOrigin.slug : await withTimeout(resolveGithubRepoSlug(fresh.worktreePath), 8e3, "resolveGithubRepoSlug").catch(() => null),
@@ -9058,16 +9127,15 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
9058
9127
  ].filter(Boolean).join("\n\n---\n\n");
9059
9128
  const stderrTail = [];
9060
9129
  traceTurn("runTurn.beforeSpawn", { threadId, agent: fresh.agent });
9061
- const steerDraft = this.openSteerPrompt.get(threadId);
9062
- if (steerDraft) steerDraft.spawned = true;
9063
- const promptForAgent = promptForJoinedSteer({
9130
+ const promptForAgent = promptAfterJoinedSteer({
9131
+ draft: this.openSteerPrompt.get(threadId),
9132
+ autoContinue,
9133
+ expandedAttachments,
9064
9134
  threadId,
9065
9135
  promptText,
9066
- latestPrompt: steerDraft?.text ?? promptText,
9067
9136
  agentPrompt,
9068
9137
  expandedPrompt,
9069
9138
  worktreePath: fresh.worktreePath,
9070
- attachments: autoContinue ? [] : sentAttachments ?? [],
9071
9139
  gitForge: turnOrigin?.forge
9072
9140
  });
9073
9141
  const handle = await spawnAgentTurn(
@@ -10312,7 +10380,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
10312
10380
  if (Object.keys(patch).length === 0) continue;
10313
10381
  updateThread(t.id, patch);
10314
10382
  }
10315
- const { autoArchiveOnMergeEnabled } = await import("./app-settings-377375BJ.js");
10383
+ const { autoArchiveOnMergeEnabled } = await import("./app-settings-FS7TM55D.js");
10316
10384
  const latest = this.requireThread(thread.id);
10317
10385
  if (!shouldAutoArchiveOnPrMerge({
10318
10386
  previousPrState: prevState || null,
@@ -10636,7 +10704,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
10636
10704
  await runArchiveScript(thread.repoPath, thread.worktreePath);
10637
10705
  } catch {
10638
10706
  }
10639
- const { deleteBranchOnPurgeEnabled } = await import("./app-settings-377375BJ.js");
10707
+ const { deleteBranchOnPurgeEnabled } = await import("./app-settings-FS7TM55D.js");
10640
10708
  const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
10641
10709
  await removeWorktree(thread.repoPath, thread.worktreePath, {
10642
10710
  deleteBranch: deleteBranch ? thread.branchName : void 0
@@ -10774,7 +10842,7 @@ async function startOrchestration(opts) {
10774
10842
  sourceRef: "default",
10775
10843
  ...createOpts
10776
10844
  }).catch(async () => {
10777
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-OB5ABI22.js");
10845
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-QBVLKACU.js");
10778
10846
  const repo = await resolveRepoRoot2(repoPath);
10779
10847
  const def = await resolveDefaultBranch2(repo);
10780
10848
  return orch.createThread({
@@ -10784,7 +10852,7 @@ async function startOrchestration(opts) {
10784
10852
  repoPath: repo
10785
10853
  });
10786
10854
  });
10787
- const { updateThread: upd } = await import("./thread-store-W2SSO6IQ.js");
10855
+ const { updateThread: upd } = await import("./thread-store-ILM2ZJCB.js");
10788
10856
  const updated = upd(thread.id, {
10789
10857
  sourceType: "orchestration",
10790
10858
  sourceRef: goal
@@ -10935,18 +11003,20 @@ export {
10935
11003
  discoverSkills,
10936
11004
  readSkillBody,
10937
11005
  expandComposerPrompt,
10938
- joinSteerPrompt,
10939
- messagesWithRewrittenUserPrompt,
10940
- trailingUnansweredUserText,
10941
- livePartsShowAgentReply,
10942
11006
  consumeComposerAttachments,
10943
11007
  takePendingTurnAttachments,
11008
+ mergeTurnAttachments,
11009
+ sameTurnAttachments,
10944
11010
  alignQueueAttachments,
10945
11011
  appendQueuedItem,
10946
11012
  prependQueuedItem,
10947
11013
  removeQueuedItem,
10948
11014
  moveQueuedItemToFront,
10949
11015
  shiftQueuedItem,
11016
+ joinSteerPrompt,
11017
+ messagesWithRewrittenUserPrompt,
11018
+ trailingUnansweredUserText,
11019
+ livePartsShowAgentReply,
10950
11020
  resolveSendFollowUp,
10951
11021
  formatCursorGitDirective,
10952
11022
  formatEntireGitDirective,
@@ -4,7 +4,7 @@ import {
4
4
  normalizeTakenSlug,
5
5
  normalizeWorktreePath,
6
6
  takenSlugsFromThread
7
- } from "./chunk-SLTWZRBN.js";
7
+ } from "./chunk-JX3OWNOT.js";
8
8
  import {
9
9
  ensureWorktreeSideboardIgnored
10
10
  } from "./chunk-BMRJNRQK.js";
@@ -25,7 +25,7 @@ import {
25
25
  import {
26
26
  getGithubGitAuthMode,
27
27
  getGithubPat
28
- } from "./chunk-RZUZU5KD.js";
28
+ } from "./chunk-TKEYXNXY.js";
29
29
  import {
30
30
  worktreesRoot
31
31
  } from "./chunk-H4UEFJRI.js";
@@ -16,7 +16,7 @@ import {
16
16
  disconnectLinearConnection,
17
17
  loadAppSettings,
18
18
  saveLinearOAuth
19
- } from "./chunk-RZUZU5KD.js";
19
+ } from "./chunk-TKEYXNXY.js";
20
20
 
21
21
  // src/integrations/linear-oauth.ts
22
22
  import { createHash, randomBytes } from "crypto";
@@ -9,7 +9,7 @@ import {
9
9
  isOrchestratorCapableAgent,
10
10
  normalizeThinkingEffort,
11
11
  updateAdvancedSettings
12
- } from "./chunk-DF34F3QR.js";
12
+ } from "./chunk-S3UGLMGE.js";
13
13
  import {
14
14
  writePrivateFile
15
15
  } from "./chunk-NSTQ6QKD.js";
@@ -10,7 +10,7 @@ import {
10
10
  isOrchestratorCapableAgent,
11
11
  normalizeThinkingEffort,
12
12
  updateAdvancedSettings
13
- } from "./chunk-RZUZU5KD.js";
13
+ } from "./chunk-TKEYXNXY.js";
14
14
  import {
15
15
  writePrivateFile
16
16
  } from "./chunk-JT7R45JB.js";