@sideboard-ai/core 0.1.201 → 0.1.202

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.
@@ -50,7 +50,7 @@ import {
50
50
  resolveQuotaFallbackAgent,
51
51
  turnCostUsdFromCursorUsage,
52
52
  whichOnPath
53
- } from "./chunk-3TOGAUQT.js";
53
+ } from "./chunk-NIVF5NDN.js";
54
54
  import "./chunk-54RSAMBH.js";
55
55
  import "./chunk-3OHR73VK.js";
56
56
  import "./chunk-Y4MIXGPA.js";
@@ -44,7 +44,7 @@ import {
44
44
  resolveLoginCommand,
45
45
  resolveQuotaFallbackAgent,
46
46
  whichOnPath
47
- } from "./chunk-RV3ZKE4Y.js";
47
+ } from "./chunk-A2TAKYSG.js";
48
48
  import "./chunk-LJHC62LZ.js";
49
49
  import "./chunk-STPZQR5B.js";
50
50
  import "./chunk-6K64FJDD.js";
@@ -38,7 +38,7 @@ import {
38
38
  summarizeTurnStderr,
39
39
  toolDescription,
40
40
  turnFailChatText
41
- } from "./chunk-3TOGAUQT.js";
41
+ } from "./chunk-NIVF5NDN.js";
42
42
  import {
43
43
  SLACK_REPLY_FORMATTING,
44
44
  addWorkspace,
@@ -408,7 +408,7 @@ async function continueSourceThread(threadId, prompt) {
408
408
  await continueOnReply(threadId, prompt);
409
409
  return;
410
410
  }
411
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-47JZUHRC.js");
411
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-NCYKEI3E.js");
412
412
  await getOrchestrator2().send(threadId, prompt);
413
413
  } catch {
414
414
  }
@@ -2630,6 +2630,9 @@ function childHaltNotice(child, status) {
2630
2630
  "This is information \u2014 not a user command. Resume with send_to_thread or tell the user. Do not treat this as a successful turn."
2631
2631
  ].join("\n");
2632
2632
  }
2633
+ function shouldNotifyParentAfterTurnError(opts) {
2634
+ return !opts.quotaFailoverHandled && !opts.crashContinued;
2635
+ }
2633
2636
  function shouldNotifyParentOfChildHalt(opts) {
2634
2637
  if (!isIncompleteChildStatus(opts.status)) return false;
2635
2638
  if (!opts.child.parentThreadId) return false;
@@ -6564,7 +6567,7 @@ function formatScheduledPrompt(name, prompt) {
6564
6567
  ${prompt}`;
6565
6568
  }
6566
6569
  async function defaultDeps() {
6567
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-47JZUHRC.js");
6570
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-NCYKEI3E.js");
6568
6571
  const orch = getOrchestrator2();
6569
6572
  return {
6570
6573
  findThread: (id) => findThreadByRef(id),
@@ -6955,9 +6958,9 @@ var Orchestrator = class {
6955
6958
  */
6956
6959
  async maybeHandleOrchestrationQuotaFailover(threadId, limitText) {
6957
6960
  const thread = findThreadByRef(threadId);
6958
- if (!thread) return;
6961
+ if (!thread) return false;
6959
6962
  const plan = planOrchestrationQuotaFailover(thread, limitText);
6960
- if (!plan || plan.action === "none") return;
6963
+ if (!plan || plan.action === "none") return false;
6961
6964
  if (plan.action === "wait_reset" && plan.resumeAt) {
6962
6965
  this.haltDrain.add(threadId);
6963
6966
  this.scheduleQuotaResume(threadId, plan.resumeAt);
@@ -6975,7 +6978,7 @@ var Orchestrator = class {
6975
6978
  resumeAt: plan.resumeAt.toISOString()
6976
6979
  });
6977
6980
  this.emit({ type: "status_changed", threadId, status: "idle" });
6978
- return;
6981
+ return true;
6979
6982
  }
6980
6983
  if (plan.action === "switch_agent" && plan.fallbackAgent) {
6981
6984
  this.haltDrain.add(threadId);
@@ -7006,11 +7009,13 @@ var Orchestrator = class {
7006
7009
  threadId: next.id,
7007
7010
  status: next.status
7008
7011
  });
7009
- await this.send(
7012
+ void this.send(
7010
7013
  next.id,
7011
7014
  QUOTA_CONTINUE_PROMPT(thread.agent, plan.fallbackAgent)
7012
7015
  );
7016
+ return true;
7013
7017
  }
7018
+ return false;
7014
7019
  }
7015
7020
  /**
7016
7021
  * Cursor-style recovery: after a runner crash, feed the error back as the
@@ -7734,13 +7739,19 @@ var Orchestrator = class {
7734
7739
  this.maybeEnqueueJobContinue(threadId, chatText, parts);
7735
7740
  } else {
7736
7741
  const blob = [chatText, detail].filter(Boolean).join("\n");
7737
- void this.maybeHandleOrchestrationQuotaFailover(threadId, blob);
7742
+ const failedOver = await this.maybeHandleOrchestrationQuotaFailover(
7743
+ threadId,
7744
+ blob
7745
+ );
7738
7746
  this.maybeEnqueueCrashContinue(threadId, {
7739
7747
  detail: detail || failDetail,
7740
7748
  assistantText: chatText,
7741
7749
  partsCount: parts.length
7742
7750
  });
7743
- if (!this.crashContinued.has(threadId)) {
7751
+ if (shouldNotifyParentAfterTurnError({
7752
+ quotaFailoverHandled: failedOver,
7753
+ crashContinued: this.crashContinued.has(threadId)
7754
+ })) {
7744
7755
  const failed = readThread(threadId);
7745
7756
  if (failed) {
7746
7757
  notifyParentOfChildHalt(failed, "error", (id, prompt2) => this.send(id, prompt2));
@@ -7764,13 +7775,19 @@ var Orchestrator = class {
7764
7775
  this.emit({ type: "status_changed", threadId, status: "error" });
7765
7776
  }
7766
7777
  this.emit({ type: "turn_finished", threadId, exitCode: 1 });
7767
- void this.maybeHandleOrchestrationQuotaFailover(threadId, message);
7778
+ const failedOver = await this.maybeHandleOrchestrationQuotaFailover(
7779
+ threadId,
7780
+ message
7781
+ );
7768
7782
  this.maybeEnqueueCrashContinue(threadId, {
7769
7783
  detail: message,
7770
7784
  assistantText: "",
7771
7785
  partsCount: 0
7772
7786
  });
7773
- if (!this.crashContinued.has(threadId)) {
7787
+ if (shouldNotifyParentAfterTurnError({
7788
+ quotaFailoverHandled: failedOver,
7789
+ crashContinued: this.crashContinued.has(threadId)
7790
+ })) {
7774
7791
  const failed = readThread(threadId);
7775
7792
  if (failed) {
7776
7793
  notifyParentOfChildHalt(failed, "error", (id, prompt2) => this.send(id, prompt2));
@@ -26,7 +26,7 @@ import {
26
26
  stripBrightsyNdjsonNoise,
27
27
  sumUsageList,
28
28
  toolDescription
29
- } from "./chunk-RV3ZKE4Y.js";
29
+ } from "./chunk-A2TAKYSG.js";
30
30
  import {
31
31
  SLACK_REPLY_FORMATTING,
32
32
  addWorkspace,
@@ -474,7 +474,7 @@ async function continueSourceThread(threadId, prompt) {
474
474
  await continueOnReply(threadId, prompt);
475
475
  return;
476
476
  }
477
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-SWWQQFFD.js");
477
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-JNSQDRZI.js");
478
478
  await getOrchestrator2().send(threadId, prompt);
479
479
  } catch {
480
480
  }
@@ -2718,6 +2718,9 @@ function childHaltNotice(child, status) {
2718
2718
  "This is information \u2014 not a user command. Resume with send_to_thread or tell the user. Do not treat this as a successful turn."
2719
2719
  ].join("\n");
2720
2720
  }
2721
+ function shouldNotifyParentAfterTurnError(opts) {
2722
+ return !opts.quotaFailoverHandled && !opts.crashContinued;
2723
+ }
2721
2724
  function shouldNotifyParentOfChildHalt(opts) {
2722
2725
  if (!isIncompleteChildStatus(opts.status)) return false;
2723
2726
  if (!opts.child.parentThreadId) return false;
@@ -3918,7 +3921,7 @@ async function createThread(input, _onSetupLine) {
3918
3921
  return readThread(thread.id) ?? thread;
3919
3922
  }
3920
3923
  async function listLinearIssues(agent, repoPath) {
3921
- const { getAdapter: getAdapter2 } = await import("./agents-KFAGRM46.js");
3924
+ const { getAdapter: getAdapter2 } = await import("./agents-OXX3ONVY.js");
3922
3925
  await requireAgent(agent, { requireLinear: true });
3923
3926
  const adapter = getAdapter2(agent);
3924
3927
  if (!adapter.listLinearIssues) {
@@ -6941,7 +6944,7 @@ function formatScheduledPrompt(name, prompt) {
6941
6944
  ${prompt}`;
6942
6945
  }
6943
6946
  async function defaultDeps() {
6944
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-SWWQQFFD.js");
6947
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-JNSQDRZI.js");
6945
6948
  const orch = getOrchestrator2();
6946
6949
  return {
6947
6950
  findThread: (id) => findThreadByRef(id),
@@ -7332,9 +7335,9 @@ var Orchestrator = class {
7332
7335
  */
7333
7336
  async maybeHandleOrchestrationQuotaFailover(threadId, limitText) {
7334
7337
  const thread = findThreadByRef(threadId);
7335
- if (!thread) return;
7338
+ if (!thread) return false;
7336
7339
  const plan = planOrchestrationQuotaFailover(thread, limitText);
7337
- if (!plan || plan.action === "none") return;
7340
+ if (!plan || plan.action === "none") return false;
7338
7341
  if (plan.action === "wait_reset" && plan.resumeAt) {
7339
7342
  this.haltDrain.add(threadId);
7340
7343
  this.scheduleQuotaResume(threadId, plan.resumeAt);
@@ -7352,7 +7355,7 @@ var Orchestrator = class {
7352
7355
  resumeAt: plan.resumeAt.toISOString()
7353
7356
  });
7354
7357
  this.emit({ type: "status_changed", threadId, status: "idle" });
7355
- return;
7358
+ return true;
7356
7359
  }
7357
7360
  if (plan.action === "switch_agent" && plan.fallbackAgent) {
7358
7361
  this.haltDrain.add(threadId);
@@ -7383,11 +7386,13 @@ var Orchestrator = class {
7383
7386
  threadId: next.id,
7384
7387
  status: next.status
7385
7388
  });
7386
- await this.send(
7389
+ void this.send(
7387
7390
  next.id,
7388
7391
  QUOTA_CONTINUE_PROMPT(thread.agent, plan.fallbackAgent)
7389
7392
  );
7393
+ return true;
7390
7394
  }
7395
+ return false;
7391
7396
  }
7392
7397
  /**
7393
7398
  * Cursor-style recovery: after a runner crash, feed the error back as the
@@ -8111,13 +8116,19 @@ var Orchestrator = class {
8111
8116
  this.maybeEnqueueJobContinue(threadId, chatText, parts);
8112
8117
  } else {
8113
8118
  const blob = [chatText, detail].filter(Boolean).join("\n");
8114
- void this.maybeHandleOrchestrationQuotaFailover(threadId, blob);
8119
+ const failedOver = await this.maybeHandleOrchestrationQuotaFailover(
8120
+ threadId,
8121
+ blob
8122
+ );
8115
8123
  this.maybeEnqueueCrashContinue(threadId, {
8116
8124
  detail: detail || failDetail,
8117
8125
  assistantText: chatText,
8118
8126
  partsCount: parts.length
8119
8127
  });
8120
- if (!this.crashContinued.has(threadId)) {
8128
+ if (shouldNotifyParentAfterTurnError({
8129
+ quotaFailoverHandled: failedOver,
8130
+ crashContinued: this.crashContinued.has(threadId)
8131
+ })) {
8121
8132
  const failed = readThread(threadId);
8122
8133
  if (failed) {
8123
8134
  notifyParentOfChildHalt(failed, "error", (id, prompt2) => this.send(id, prompt2));
@@ -8141,13 +8152,19 @@ var Orchestrator = class {
8141
8152
  this.emit({ type: "status_changed", threadId, status: "error" });
8142
8153
  }
8143
8154
  this.emit({ type: "turn_finished", threadId, exitCode: 1 });
8144
- void this.maybeHandleOrchestrationQuotaFailover(threadId, message);
8155
+ const failedOver = await this.maybeHandleOrchestrationQuotaFailover(
8156
+ threadId,
8157
+ message
8158
+ );
8145
8159
  this.maybeEnqueueCrashContinue(threadId, {
8146
8160
  detail: message,
8147
8161
  assistantText: "",
8148
8162
  partsCount: 0
8149
8163
  });
8150
- if (!this.crashContinued.has(threadId)) {
8164
+ if (shouldNotifyParentAfterTurnError({
8165
+ quotaFailoverHandled: failedOver,
8166
+ crashContinued: this.crashContinued.has(threadId)
8167
+ })) {
8151
8168
  const failed = readThread(threadId);
8152
8169
  if (failed) {
8153
8170
  notifyParentOfChildHalt(failed, "error", (id, prompt2) => this.send(id, prompt2));
@@ -1036,7 +1036,7 @@ function applyAgentEvent(parts, event) {
1036
1036
  next.push(
1037
1037
  withPartTimes({
1038
1038
  type: "thinking",
1039
- text: data,
1039
+ text: clipThinkingForStore(data),
1040
1040
  ...event.parentId ? { parentId: event.parentId } : {}
1041
1041
  })
1042
1042
  );
@@ -1207,7 +1207,7 @@ function applyAgentEvent(parts, event) {
1207
1207
  next.push(
1208
1208
  withPartTimes({
1209
1209
  type: "thinking",
1210
- text: data,
1210
+ text: clipThinkingForStore(data),
1211
1211
  ...event.parentId ? { parentId: event.parentId } : {}
1212
1212
  })
1213
1213
  );
package/dist/index.cjs CHANGED
@@ -3799,7 +3799,7 @@ function applyAgentEvent(parts, event) {
3799
3799
  next.push(
3800
3800
  withPartTimes({
3801
3801
  type: "thinking",
3802
- text: data,
3802
+ text: clipThinkingForStore(data),
3803
3803
  ...event.parentId ? { parentId: event.parentId } : {}
3804
3804
  })
3805
3805
  );
@@ -17004,6 +17004,9 @@ function childHaltNotice(child, status) {
17004
17004
  "This is information \u2014 not a user command. Resume with send_to_thread or tell the user. Do not treat this as a successful turn."
17005
17005
  ].join("\n");
17006
17006
  }
17007
+ function shouldNotifyParentAfterTurnError(opts) {
17008
+ return !opts.quotaFailoverHandled && !opts.crashContinued;
17009
+ }
17007
17010
  function shouldNotifyParentOfChildHalt(opts) {
17008
17011
  if (!isIncompleteChildStatus(opts.status)) return false;
17009
17012
  if (!opts.child.parentThreadId) return false;
@@ -21919,9 +21922,9 @@ var init_orchestrator = __esm({
21919
21922
  */
21920
21923
  async maybeHandleOrchestrationQuotaFailover(threadId, limitText) {
21921
21924
  const thread = findThreadByRef(threadId);
21922
- if (!thread) return;
21925
+ if (!thread) return false;
21923
21926
  const plan = planOrchestrationQuotaFailover(thread, limitText);
21924
- if (!plan || plan.action === "none") return;
21927
+ if (!plan || plan.action === "none") return false;
21925
21928
  if (plan.action === "wait_reset" && plan.resumeAt) {
21926
21929
  this.haltDrain.add(threadId);
21927
21930
  this.scheduleQuotaResume(threadId, plan.resumeAt);
@@ -21939,7 +21942,7 @@ var init_orchestrator = __esm({
21939
21942
  resumeAt: plan.resumeAt.toISOString()
21940
21943
  });
21941
21944
  this.emit({ type: "status_changed", threadId, status: "idle" });
21942
- return;
21945
+ return true;
21943
21946
  }
21944
21947
  if (plan.action === "switch_agent" && plan.fallbackAgent) {
21945
21948
  this.haltDrain.add(threadId);
@@ -21970,11 +21973,13 @@ var init_orchestrator = __esm({
21970
21973
  threadId: next.id,
21971
21974
  status: next.status
21972
21975
  });
21973
- await this.send(
21976
+ void this.send(
21974
21977
  next.id,
21975
21978
  QUOTA_CONTINUE_PROMPT(thread.agent, plan.fallbackAgent)
21976
21979
  );
21980
+ return true;
21977
21981
  }
21982
+ return false;
21978
21983
  }
21979
21984
  /**
21980
21985
  * Cursor-style recovery: after a runner crash, feed the error back as the
@@ -22698,13 +22703,19 @@ var init_orchestrator = __esm({
22698
22703
  this.maybeEnqueueJobContinue(threadId, chatText, parts);
22699
22704
  } else {
22700
22705
  const blob = [chatText, detail].filter(Boolean).join("\n");
22701
- void this.maybeHandleOrchestrationQuotaFailover(threadId, blob);
22706
+ const failedOver = await this.maybeHandleOrchestrationQuotaFailover(
22707
+ threadId,
22708
+ blob
22709
+ );
22702
22710
  this.maybeEnqueueCrashContinue(threadId, {
22703
22711
  detail: detail || failDetail,
22704
22712
  assistantText: chatText,
22705
22713
  partsCount: parts.length
22706
22714
  });
22707
- if (!this.crashContinued.has(threadId)) {
22715
+ if (shouldNotifyParentAfterTurnError({
22716
+ quotaFailoverHandled: failedOver,
22717
+ crashContinued: this.crashContinued.has(threadId)
22718
+ })) {
22708
22719
  const failed = readThread(threadId);
22709
22720
  if (failed) {
22710
22721
  notifyParentOfChildHalt(failed, "error", (id, prompt2) => this.send(id, prompt2));
@@ -22728,13 +22739,19 @@ var init_orchestrator = __esm({
22728
22739
  this.emit({ type: "status_changed", threadId, status: "error" });
22729
22740
  }
22730
22741
  this.emit({ type: "turn_finished", threadId, exitCode: 1 });
22731
- void this.maybeHandleOrchestrationQuotaFailover(threadId, message);
22742
+ const failedOver = await this.maybeHandleOrchestrationQuotaFailover(
22743
+ threadId,
22744
+ message
22745
+ );
22732
22746
  this.maybeEnqueueCrashContinue(threadId, {
22733
22747
  detail: message,
22734
22748
  assistantText: "",
22735
22749
  partsCount: 0
22736
22750
  });
22737
- if (!this.crashContinued.has(threadId)) {
22751
+ if (shouldNotifyParentAfterTurnError({
22752
+ quotaFailoverHandled: failedOver,
22753
+ crashContinued: this.crashContinued.has(threadId)
22754
+ })) {
22738
22755
  const failed = readThread(threadId);
22739
22756
  if (failed) {
22740
22757
  notifyParentOfChildHalt(failed, "error", (id, prompt2) => this.send(id, prompt2));
package/dist/index.js CHANGED
@@ -270,7 +270,7 @@ import {
270
270
  worktreeCleanupSettings,
271
271
  wrapReviewSkillMarkdown,
272
272
  writeWorktreeFile
273
- } from "./chunk-AHPIU2VP.js";
273
+ } from "./chunk-7NKY2OX7.js";
274
274
  import {
275
275
  LEGACY_PLAN_FILE_REL,
276
276
  PLAN_FILE_NAME,
@@ -390,7 +390,7 @@ import {
390
390
  withEventParentId,
391
391
  withEventsParentId,
392
392
  writeInjectedMcpConfig
393
- } from "./chunk-RV3ZKE4Y.js";
393
+ } from "./chunk-A2TAKYSG.js";
394
394
  import {
395
395
  CLOUD_COORDINATOR_BUSY_REPLY,
396
396
  CLOUD_COORDINATOR_STOPPED_REPLY,
@@ -9503,7 +9503,7 @@ function applyAgentEvent(parts, event) {
9503
9503
  next.push(
9504
9504
  withPartTimes({
9505
9505
  type: "thinking",
9506
- text: data,
9506
+ text: clipThinkingForStore(data),
9507
9507
  ...event.parentId ? { parentId: event.parentId } : {}
9508
9508
  })
9509
9509
  );
@@ -14428,6 +14428,9 @@ function childHaltNotice(child, status) {
14428
14428
  "This is information \u2014 not a user command. Resume with send_to_thread or tell the user. Do not treat this as a successful turn."
14429
14429
  ].join("\n");
14430
14430
  }
14431
+ function shouldNotifyParentAfterTurnError(opts) {
14432
+ return !opts.quotaFailoverHandled && !opts.crashContinued;
14433
+ }
14431
14434
  function shouldNotifyParentOfChildHalt(opts) {
14432
14435
  if (!isIncompleteChildStatus(opts.status)) return false;
14433
14436
  if (!opts.child.parentThreadId) return false;
@@ -20156,9 +20159,9 @@ var init_orchestrator = __esm({
20156
20159
  */
20157
20160
  async maybeHandleOrchestrationQuotaFailover(threadId, limitText) {
20158
20161
  const thread = findThreadByRef(threadId);
20159
- if (!thread) return;
20162
+ if (!thread) return false;
20160
20163
  const plan = planOrchestrationQuotaFailover(thread, limitText);
20161
- if (!plan || plan.action === "none") return;
20164
+ if (!plan || plan.action === "none") return false;
20162
20165
  if (plan.action === "wait_reset" && plan.resumeAt) {
20163
20166
  this.haltDrain.add(threadId);
20164
20167
  this.scheduleQuotaResume(threadId, plan.resumeAt);
@@ -20176,7 +20179,7 @@ var init_orchestrator = __esm({
20176
20179
  resumeAt: plan.resumeAt.toISOString()
20177
20180
  });
20178
20181
  this.emit({ type: "status_changed", threadId, status: "idle" });
20179
- return;
20182
+ return true;
20180
20183
  }
20181
20184
  if (plan.action === "switch_agent" && plan.fallbackAgent) {
20182
20185
  this.haltDrain.add(threadId);
@@ -20207,11 +20210,13 @@ var init_orchestrator = __esm({
20207
20210
  threadId: next.id,
20208
20211
  status: next.status
20209
20212
  });
20210
- await this.send(
20213
+ void this.send(
20211
20214
  next.id,
20212
20215
  QUOTA_CONTINUE_PROMPT(thread.agent, plan.fallbackAgent)
20213
20216
  );
20217
+ return true;
20214
20218
  }
20219
+ return false;
20215
20220
  }
20216
20221
  /**
20217
20222
  * Cursor-style recovery: after a runner crash, feed the error back as the
@@ -20935,13 +20940,19 @@ var init_orchestrator = __esm({
20935
20940
  this.maybeEnqueueJobContinue(threadId, chatText, parts);
20936
20941
  } else {
20937
20942
  const blob = [chatText, detail].filter(Boolean).join("\n");
20938
- void this.maybeHandleOrchestrationQuotaFailover(threadId, blob);
20943
+ const failedOver = await this.maybeHandleOrchestrationQuotaFailover(
20944
+ threadId,
20945
+ blob
20946
+ );
20939
20947
  this.maybeEnqueueCrashContinue(threadId, {
20940
20948
  detail: detail || failDetail,
20941
20949
  assistantText: chatText,
20942
20950
  partsCount: parts.length
20943
20951
  });
20944
- if (!this.crashContinued.has(threadId)) {
20952
+ if (shouldNotifyParentAfterTurnError({
20953
+ quotaFailoverHandled: failedOver,
20954
+ crashContinued: this.crashContinued.has(threadId)
20955
+ })) {
20945
20956
  const failed = readThread(threadId);
20946
20957
  if (failed) {
20947
20958
  notifyParentOfChildHalt(failed, "error", (id, prompt2) => this.send(id, prompt2));
@@ -20965,13 +20976,19 @@ var init_orchestrator = __esm({
20965
20976
  this.emit({ type: "status_changed", threadId, status: "error" });
20966
20977
  }
20967
20978
  this.emit({ type: "turn_finished", threadId, exitCode: 1 });
20968
- void this.maybeHandleOrchestrationQuotaFailover(threadId, message);
20979
+ const failedOver = await this.maybeHandleOrchestrationQuotaFailover(
20980
+ threadId,
20981
+ message
20982
+ );
20969
20983
  this.maybeEnqueueCrashContinue(threadId, {
20970
20984
  detail: message,
20971
20985
  assistantText: "",
20972
20986
  partsCount: 0
20973
20987
  });
20974
- if (!this.crashContinued.has(threadId)) {
20988
+ if (shouldNotifyParentAfterTurnError({
20989
+ quotaFailoverHandled: failedOver,
20990
+ crashContinued: this.crashContinued.has(threadId)
20991
+ })) {
20975
20992
  const failed = readThread(threadId);
20976
20993
  if (failed) {
20977
20994
  notifyParentOfChildHalt(failed, "error", (id, prompt2) => this.send(id, prompt2));
@@ -38,7 +38,7 @@ import {
38
38
  syncBoardPins,
39
39
  updateSchedule,
40
40
  waitForDetachedJob
41
- } from "../chunk-EXZMNINM.js";
41
+ } from "../chunk-27GGXX27.js";
42
42
  import "../chunk-YWI3IBP2.js";
43
43
  import {
44
44
  applySystemCaEnv,
@@ -48,7 +48,7 @@ import {
48
48
  materializeSystemCaBundle,
49
49
  sideboardMcpProfile,
50
50
  trustSystemCertificates
51
- } from "../chunk-3TOGAUQT.js";
51
+ } from "../chunk-NIVF5NDN.js";
52
52
  import {
53
53
  GLOBAL_WORKSPACE_ID,
54
54
  isCloudCoordinatorThread,
@@ -7,9 +7,9 @@ import {
7
7
  resolveSendFollowUp,
8
8
  startOrchestration,
9
9
  waitForPidExit
10
- } from "./chunk-AHPIU2VP.js";
10
+ } from "./chunk-7NKY2OX7.js";
11
11
  import "./chunk-DJU54RYW.js";
12
- import "./chunk-RV3ZKE4Y.js";
12
+ import "./chunk-A2TAKYSG.js";
13
13
  import "./chunk-LJHC62LZ.js";
14
14
  import "./chunk-STPZQR5B.js";
15
15
  import "./chunk-6K64FJDD.js";
@@ -9,9 +9,9 @@ import {
9
9
  resolveSendFollowUp,
10
10
  startOrchestration,
11
11
  waitForPidExit
12
- } from "./chunk-EXZMNINM.js";
12
+ } from "./chunk-27GGXX27.js";
13
13
  import "./chunk-YWI3IBP2.js";
14
- import "./chunk-3TOGAUQT.js";
14
+ import "./chunk-NIVF5NDN.js";
15
15
  import "./chunk-54RSAMBH.js";
16
16
  import "./chunk-3OHR73VK.js";
17
17
  import "./chunk-Y4MIXGPA.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sideboard-ai/core",
3
- "version": "0.1.201",
3
+ "version": "0.1.202",
4
4
  "description": "Sideboard core — orchestration, agents, git worktrees, MCP server",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",