@sideboard-ai/core 0.1.317 → 0.1.318

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 (30) hide show
  1. package/dist/{abletime-NZ2ABWAL.js → abletime-KWOBUL46.js} +4 -4
  2. package/dist/{abletime-oauth-CBFFBINA.js → abletime-oauth-IUIAGLFJ.js} +3 -3
  3. package/dist/{abletime-rest-NSOP72AI.js → abletime-rest-RWN4EPY3.js} +3 -3
  4. package/dist/{agents-BJVSYC6Y.js → agents-2AR7I6B6.js} +5 -5
  5. package/dist/{app-settings-RQAFJZCD.js → app-settings-V6YPYY57.js} +1 -1
  6. package/dist/{chunk-U53JICJ2.js → chunk-23ZUL2EX.js} +19 -19
  7. package/dist/{chunk-VVV7EI6T.js → chunk-2HOZMSKQ.js} +2 -2
  8. package/dist/{chunk-ELBK34TY.js → chunk-7ADEYEMH.js} +5 -5
  9. package/dist/{chunk-NXNNYY3Q.js → chunk-AESO2KJS.js} +2 -2
  10. package/dist/{chunk-S3U4HR5F.js → chunk-AZ4GEEGL.js} +2 -2
  11. package/dist/{chunk-U7PNCYNX.js → chunk-E52SQENB.js} +1 -0
  12. package/dist/{chunk-OLYNM52B.js → chunk-FDXHNROD.js} +2 -2
  13. package/dist/{chunk-XWUDFLBX.js → chunk-IAPO7ZFG.js} +4 -4
  14. package/dist/{chunk-4XZJYBO2.js → chunk-ST2UQBJT.js} +4 -4
  15. package/dist/{chunk-YN6XONV5.js → chunk-TUJFCJJU.js} +1 -1
  16. package/dist/{chunk-GXSV3X3L.js → chunk-W5QZWAUB.js} +3 -3
  17. package/dist/{chunk-CCUGIVYN.js → chunk-XOZNEAWF.js} +3 -3
  18. package/dist/{chunk-PX324N7P.js → chunk-YALFZKSC.js} +2 -2
  19. package/dist/{conductor-TP2NA44I.js → conductor-MG2RAQNT.js} +4 -4
  20. package/dist/{coordinator-prompt-FQC2SZPP.js → coordinator-prompt-X74F3JIC.js} +3 -3
  21. package/dist/{global-workspace-72K6D354.js → global-workspace-FTNJEML3.js} +3 -3
  22. package/dist/index.cjs +29 -6
  23. package/dist/index.d.cts +2 -0
  24. package/dist/index.d.ts +2 -0
  25. package/dist/index.js +46 -24
  26. package/dist/{optional-cli-LMSRZNH4.js → optional-cli-6GGESWGE.js} +4 -4
  27. package/dist/{orchestrator-E72HYGTB.js → orchestrator-2SXK4U65.js} +8 -8
  28. package/dist/{workspaces-GAUHXBUL.js → workspaces-MGKEAYNM.js} +3 -3
  29. package/dist/{worktree-6FUQ7FEF.js → worktree-THAXW5U7.js} +2 -2
  30. package/package.json +1 -1
@@ -16,12 +16,12 @@ import {
16
16
  toAbleTimeIssueInfo,
17
17
  updateAbleTimeTask,
18
18
  verifyAbleTimeConnection
19
- } from "./chunk-GXSV3X3L.js";
20
- import "./chunk-VVV7EI6T.js";
21
- import "./chunk-ELBK34TY.js";
19
+ } from "./chunk-W5QZWAUB.js";
20
+ import "./chunk-2HOZMSKQ.js";
21
+ import "./chunk-7ADEYEMH.js";
22
22
  import "./chunk-JAT3JFOS.js";
23
23
  import "./chunk-6K64FJDD.js";
24
- import "./chunk-U7PNCYNX.js";
24
+ import "./chunk-E52SQENB.js";
25
25
  import "./chunk-77WWLBCI.js";
26
26
  import "./chunk-4TR3HZFT.js";
27
27
  import "./chunk-WDRMZKVB.js";
@@ -20,10 +20,10 @@ import {
20
20
  parseAbleTimeOAuthCallbackUrl,
21
21
  resolveAbleTimeOAuthHost,
22
22
  startAbleTimeOAuth
23
- } from "./chunk-CCUGIVYN.js";
24
- import "./chunk-ELBK34TY.js";
23
+ } from "./chunk-XOZNEAWF.js";
24
+ import "./chunk-7ADEYEMH.js";
25
25
  import "./chunk-JAT3JFOS.js";
26
- import "./chunk-U7PNCYNX.js";
26
+ import "./chunk-E52SQENB.js";
27
27
  import "./chunk-77WWLBCI.js";
28
28
  import "./chunk-4TR3HZFT.js";
29
29
  import "./chunk-WDRMZKVB.js";
@@ -5,10 +5,10 @@ import {
5
5
  callAbleTimeRestTool,
6
6
  looksLikeAbleTimeUlid,
7
7
  textFromAbleTimeDoc
8
- } from "./chunk-VVV7EI6T.js";
9
- import "./chunk-ELBK34TY.js";
8
+ } from "./chunk-2HOZMSKQ.js";
9
+ import "./chunk-7ADEYEMH.js";
10
10
  import "./chunk-JAT3JFOS.js";
11
- import "./chunk-U7PNCYNX.js";
11
+ import "./chunk-E52SQENB.js";
12
12
  import "./chunk-77WWLBCI.js";
13
13
  import "./chunk-4TR3HZFT.js";
14
14
  import "./chunk-WDRMZKVB.js";
@@ -37,7 +37,7 @@ import {
37
37
  planModeTurnInstruction,
38
38
  resolveCursorModelId,
39
39
  resolveQuotaFallbackAgent
40
- } from "./chunk-XWUDFLBX.js";
40
+ } from "./chunk-IAPO7ZFG.js";
41
41
  import "./chunk-HH3VVTEC.js";
42
42
  import "./chunk-7Q327QF2.js";
43
43
  import {
@@ -51,9 +51,9 @@ import {
51
51
  prepareTerminalCommand,
52
52
  resolveLoginCommand,
53
53
  whichOnPath
54
- } from "./chunk-NXNNYY3Q.js";
55
- import "./chunk-PX324N7P.js";
56
- import "./chunk-YN6XONV5.js";
54
+ } from "./chunk-AESO2KJS.js";
55
+ import "./chunk-YALFZKSC.js";
56
+ import "./chunk-TUJFCJJU.js";
57
57
  import "./chunk-YEIHCSZS.js";
58
58
  import "./chunk-2P4XKWV2.js";
59
59
  import "./chunk-RSA47QYR.js";
@@ -88,7 +88,7 @@ import {
88
88
  assertOrchestratorCapableAgent,
89
89
  coerceOrchestratorAgent,
90
90
  isOrchestratorCapableAgent
91
- } from "./chunk-U7PNCYNX.js";
91
+ } from "./chunk-E52SQENB.js";
92
92
  import "./chunk-77WWLBCI.js";
93
93
  import "./chunk-4TR3HZFT.js";
94
94
  import "./chunk-WDRMZKVB.js";
@@ -107,7 +107,7 @@ import {
107
107
  updateProjectProfileSettings,
108
108
  usageOnLimit,
109
109
  writeViewerContext
110
- } from "./chunk-U7PNCYNX.js";
110
+ } from "./chunk-E52SQENB.js";
111
111
  import "./chunk-77WWLBCI.js";
112
112
  import "./chunk-4TR3HZFT.js";
113
113
  import "./chunk-WDRMZKVB.js";
@@ -14,7 +14,7 @@ import {
14
14
  parseSessionQuotaResetAt,
15
15
  planModeTurnInstruction,
16
16
  resolveQuotaFallbackAgent
17
- } from "./chunk-XWUDFLBX.js";
17
+ } from "./chunk-IAPO7ZFG.js";
18
18
  import {
19
19
  applyWorktreePkgCacheEnv,
20
20
  askBlockStillWaiting,
@@ -52,7 +52,7 @@ import {
52
52
  worktreeDevProcessKey,
53
53
  worktreeRunProcessKey,
54
54
  worktreeSetupProcessKey
55
- } from "./chunk-4XZJYBO2.js";
55
+ } from "./chunk-ST2UQBJT.js";
56
56
  import {
57
57
  applyAgentEvent,
58
58
  clipAgentEventForPaint,
@@ -74,7 +74,7 @@ import {
74
74
  import {
75
75
  formatOptionalServicesDirectiveForTurn,
76
76
  formatOptionalServicesReminderForTurn
77
- } from "./chunk-OLYNM52B.js";
77
+ } from "./chunk-FDXHNROD.js";
78
78
  import {
79
79
  SLACK_REPLY_FORMATTING,
80
80
  addWorkspace,
@@ -99,7 +99,7 @@ import {
99
99
  stageAbsolutePathsAsAttachments,
100
100
  stageBuffersAsAttachments,
101
101
  syncWorkspacesFromThreads
102
- } from "./chunk-PX324N7P.js";
102
+ } from "./chunk-YALFZKSC.js";
103
103
  import {
104
104
  addPrStackLayer,
105
105
  allocateTeamSlug,
@@ -143,7 +143,7 @@ import {
143
143
  resolveRepoRoot,
144
144
  switchWorktreeBranch,
145
145
  withRepoGitLock
146
- } from "./chunk-YN6XONV5.js";
146
+ } from "./chunk-TUJFCJJU.js";
147
147
  import {
148
148
  REVIEW_TAB_TITLE,
149
149
  agentNicknameFromWorktreePath,
@@ -239,7 +239,7 @@ import {
239
239
  usageOnLimit,
240
240
  withTurnScopedCost,
241
241
  writeViewerContext
242
- } from "./chunk-U7PNCYNX.js";
242
+ } from "./chunk-E52SQENB.js";
243
243
  import {
244
244
  examplePrefixedBranch,
245
245
  sanitizeGitBranchPrefix
@@ -461,9 +461,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
461
461
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
462
462
  );
463
463
  }
464
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-72K6D354.js");
464
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-FTNJEML3.js");
465
465
  if (isGlobalThread2(thread)) {
466
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-FQC2SZPP.js");
466
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-X74F3JIC.js");
467
467
  ensureGlobalCoordinatorCwd2(
468
468
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
469
469
  );
@@ -2930,7 +2930,7 @@ async function createThread(input, _onSetupLine) {
2930
2930
  });
2931
2931
  await requireAgent(resolved.agent);
2932
2932
  if (input.cowboy) {
2933
- const { cowboyModeEnabled } = await import("./app-settings-RQAFJZCD.js");
2933
+ const { cowboyModeEnabled } = await import("./app-settings-V6YPYY57.js");
2934
2934
  if (!cowboyModeEnabled()) {
2935
2935
  throw new Error(
2936
2936
  "Cowboy mode is off. Enable it in Settings \u2192 Advanced."
@@ -2989,7 +2989,7 @@ async function createThread(input, _onSetupLine) {
2989
2989
  let sourceIsFork = false;
2990
2990
  if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
2991
2991
  if (isAbleTimeConnected() && getIssueSource() === "abletime") {
2992
- const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-NZ2ABWAL.js");
2992
+ const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-KWOBUL46.js");
2993
2993
  const task = await ensureAbleTimeTask({
2994
2994
  title: title?.trim() || "Untitled work",
2995
2995
  description: input.prompt?.trim() || void 0
@@ -3100,7 +3100,7 @@ async function createThread(input, _onSetupLine) {
3100
3100
  return readThread(thread.id) ?? thread;
3101
3101
  }
3102
3102
  async function listLinearIssues(agent, repoPath) {
3103
- const { getAdapter: getAdapter2 } = await import("./agents-BJVSYC6Y.js");
3103
+ const { getAdapter: getAdapter2 } = await import("./agents-2AR7I6B6.js");
3104
3104
  await requireAgent(agent, { requireLinear: true });
3105
3105
  const adapter = getAdapter2(agent);
3106
3106
  if (!adapter.listLinearIssues) {
@@ -3877,7 +3877,7 @@ async function adoptThread(input) {
3877
3877
  messages: input.messages ?? []
3878
3878
  });
3879
3879
  writeThread(thread);
3880
- const { addWorkspace: addWorkspace2 } = await import("./workspaces-GAUHXBUL.js");
3880
+ const { addWorkspace: addWorkspace2 } = await import("./workspaces-MGKEAYNM.js");
3881
3881
  await addWorkspace2(repoPath);
3882
3882
  const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-RXZPTCNH.js");
3883
3883
  await ensureWorktreeSideboardIgnored(input.worktreePath);
@@ -6815,7 +6815,7 @@ function formatScheduledPrompt(name, prompt) {
6815
6815
  ${prompt}`;
6816
6816
  }
6817
6817
  async function defaultDeps() {
6818
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-E72HYGTB.js");
6818
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-2SXK4U65.js");
6819
6819
  const orch = getOrchestrator2();
6820
6820
  return {
6821
6821
  findThread: (id) => findThreadByRef(id),
@@ -7133,7 +7133,7 @@ var Orchestrator = class {
7133
7133
  orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
7134
7134
  });
7135
7135
  }
7136
- const { autoCleanupOrphansEnabled } = await import("./app-settings-RQAFJZCD.js");
7136
+ const { autoCleanupOrphansEnabled } = await import("./app-settings-V6YPYY57.js");
7137
7137
  if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
7138
7138
  await cleanupOrphanWorktrees({ repoPaths });
7139
7139
  }
@@ -7527,7 +7527,7 @@ var Orchestrator = class {
7527
7527
  }
7528
7528
  await setup;
7529
7529
  if (skipSetup) return;
7530
- const { autoRunAfterSetupEnabled } = await import("./app-settings-RQAFJZCD.js");
7530
+ const { autoRunAfterSetupEnabled } = await import("./app-settings-V6YPYY57.js");
7531
7531
  if (autoRunAfterSetupEnabled()) {
7532
7532
  try {
7533
7533
  await this.startDev(threadId);
@@ -7921,7 +7921,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
7921
7921
  }
7922
7922
  const isBrightsy = fresh.agent === "brightsy";
7923
7923
  const isOrchestration = isOrchestratorThread(fresh);
7924
- const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-RQAFJZCD.js");
7924
+ const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-V6YPYY57.js");
7925
7925
  const gitAuthMode = getGithubGitAuthMode();
7926
7926
  const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
7927
7927
  githubSlug: await withTimeout(
@@ -9237,7 +9237,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
9237
9237
  if (Object.keys(patch).length === 0) continue;
9238
9238
  updateThread(t.id, patch);
9239
9239
  }
9240
- const { autoArchiveOnMergeEnabled } = await import("./app-settings-RQAFJZCD.js");
9240
+ const { autoArchiveOnMergeEnabled } = await import("./app-settings-V6YPYY57.js");
9241
9241
  const latest = this.requireThread(thread.id);
9242
9242
  if (!shouldAutoArchiveOnPrMerge({
9243
9243
  previousPrState: prevState || null,
@@ -9561,7 +9561,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
9561
9561
  await runArchiveScript(thread.repoPath, thread.worktreePath);
9562
9562
  } catch {
9563
9563
  }
9564
- const { deleteBranchOnPurgeEnabled } = await import("./app-settings-RQAFJZCD.js");
9564
+ const { deleteBranchOnPurgeEnabled } = await import("./app-settings-V6YPYY57.js");
9565
9565
  const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
9566
9566
  await removeWorktree(thread.repoPath, thread.worktreePath, {
9567
9567
  deleteBranch: deleteBranch ? thread.branchName : void 0
@@ -9697,7 +9697,7 @@ async function startOrchestration(opts) {
9697
9697
  sourceRef: "default",
9698
9698
  ...createOpts
9699
9699
  }).catch(async () => {
9700
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-6FUQ7FEF.js");
9700
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-THAXW5U7.js");
9701
9701
  const repo = await resolveRepoRoot2(repoPath);
9702
9702
  const def = await resolveDefaultBranch2(repo);
9703
9703
  return orch.createThread({
@@ -4,14 +4,14 @@ import {
4
4
  normalizeAbleTimeCredential,
5
5
  normalizeAbleTimeHost,
6
6
  rewriteAbleTimeError
7
- } from "./chunk-ELBK34TY.js";
7
+ } from "./chunk-7ADEYEMH.js";
8
8
  import {
9
9
  httpFetch
10
10
  } from "./chunk-JAT3JFOS.js";
11
11
  import {
12
12
  getAbleTimeAccessToken,
13
13
  getAbleTimeHost
14
- } from "./chunk-U7PNCYNX.js";
14
+ } from "./chunk-E52SQENB.js";
15
15
 
16
16
  // src/integrations/abletime-rest.ts
17
17
  var ABLETIME_REST_PREFIX = "/api/public/v2";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getAbleTimeHost,
6
6
  isAbleTimeConnected
7
- } from "./chunk-U7PNCYNX.js";
7
+ } from "./chunk-E52SQENB.js";
8
8
 
9
9
  // src/integrations/abletime-mcp.ts
10
10
  var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
@@ -153,7 +153,7 @@ function textsFromUnknown(value) {
153
153
  return "";
154
154
  }
155
155
  async function abletimeMcpRequest(method, params, opts) {
156
- const rawToken = opts?.token ?? await import("./abletime-oauth-CBFFBINA.js").then((m) => m.ensureAbleTimeAccessToken());
156
+ const rawToken = opts?.token ?? await import("./abletime-oauth-IUIAGLFJ.js").then((m) => m.ensureAbleTimeAccessToken());
157
157
  if (!rawToken?.trim()) {
158
158
  throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
159
159
  }
@@ -224,9 +224,9 @@ async function callAbleTimeTool(name, args = {}, opts) {
224
224
  if (!opts?.token && !isAbleTimeConnected()) {
225
225
  throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
226
226
  }
227
- const rawToken = opts?.token ?? await import("./abletime-oauth-CBFFBINA.js").then((m) => m.ensureAbleTimeAccessToken());
227
+ const rawToken = opts?.token ?? await import("./abletime-oauth-IUIAGLFJ.js").then((m) => m.ensureAbleTimeAccessToken());
228
228
  if (rawToken && ableTimeUsesRest(rawToken)) {
229
- const { callAbleTimeRestTool } = await import("./abletime-rest-NSOP72AI.js");
229
+ const { callAbleTimeRestTool } = await import("./abletime-rest-RWN4EPY3.js");
230
230
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
231
231
  }
232
232
  const requestOpts = { ...opts, pm: opts?.pm ?? abletimeToolUsesPm(name) };
@@ -242,7 +242,7 @@ async function callAbleTimeTool(name, args = {}, opts) {
242
242
  return await call();
243
243
  }
244
244
  if (rawToken && ableTimeUsesRest(rawToken) && isAbleTimeRejectedCredential(message)) {
245
- const { callAbleTimeRestTool } = await import("./abletime-rest-NSOP72AI.js");
245
+ const { callAbleTimeRestTool } = await import("./abletime-rest-RWN4EPY3.js");
246
246
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
247
247
  }
248
248
  throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-QVN2WOKJ.js";
8
8
  import {
9
9
  resolveAgentExecutable
10
- } from "./chunk-U7PNCYNX.js";
10
+ } from "./chunk-E52SQENB.js";
11
11
 
12
12
  // src/agents/install.ts
13
13
  import { existsSync } from "fs";
@@ -265,7 +265,7 @@ async function loginAgent(agent) {
265
265
  };
266
266
  }
267
267
  async function loginManagedAccount(accountId) {
268
- const { loadAppSettings } = await import("./app-settings-RQAFJZCD.js");
268
+ const { loadAppSettings } = await import("./app-settings-V6YPYY57.js");
269
269
  const { loginEnvPrefix } = await import("./managed-accounts-JJTAKHMG.js");
270
270
  const account = loadAppSettings().accounts.accounts.find((a) => a.id === accountId);
271
271
  if (!account) {
@@ -2,11 +2,11 @@ import {
2
2
  OPTIONAL_SERVICES,
3
3
  isOptionalServiceId,
4
4
  optionalServiceSpec
5
- } from "./chunk-OLYNM52B.js";
5
+ } from "./chunk-FDXHNROD.js";
6
6
  import {
7
7
  installNpmGlobalPackage,
8
8
  whichOnPath
9
- } from "./chunk-NXNNYY3Q.js";
9
+ } from "./chunk-AESO2KJS.js";
10
10
  import {
11
11
  enrichPathWithNpmGlobalBin
12
12
  } from "./chunk-QVN2WOKJ.js";
@@ -293,6 +293,7 @@ function parseRemoteClientMessage(raw) {
293
293
  const msg = parsed;
294
294
  if (msg.type === "ping") return { type: "ping" };
295
295
  if (msg.type === "host_pair") return { type: "host_pair" };
296
+ if (msg.type === "pairing_done") return { type: "pairing_done" };
296
297
  if (msg.type === "e2ee_fail") return { type: "e2ee_fail" };
297
298
  if (msg.type === "stop") return { type: "stop" };
298
299
  if (msg.type === "host_register") {
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  loadAppSettings,
6
6
  saveAppSettings
7
- } from "./chunk-U7PNCYNX.js";
7
+ } from "./chunk-E52SQENB.js";
8
8
 
9
9
  // src/integrations/optional-services.ts
10
10
  var OPTIONAL_SERVICE_IDS = ["vercel", "supabase", "posthog", "sentry"];
@@ -273,7 +273,7 @@ async function connectedCliPresence(integrations) {
273
273
  const ids = connectedOptionalServices(integrations).filter((spec) => spec.cli).map((spec) => spec.id);
274
274
  if (ids.length === 0) return void 0;
275
275
  try {
276
- const { optionalCliPresence } = await import("./optional-cli-LMSRZNH4.js");
276
+ const { optionalCliPresence } = await import("./optional-cli-6GGESWGE.js");
277
277
  return await optionalCliPresence(ids);
278
278
  } catch {
279
279
  return void 0;
@@ -12,13 +12,13 @@ import {
12
12
  } from "./chunk-7Q327QF2.js";
13
13
  import {
14
14
  isOrchestratorThread
15
- } from "./chunk-PX324N7P.js";
15
+ } from "./chunk-YALFZKSC.js";
16
16
  import {
17
17
  codexUnattendedGitConfigArgs,
18
18
  mergeAgentGitAuthEnv,
19
19
  resolveAgentGitAuthEnv,
20
20
  resolveCodexGitWritableRoots
21
- } from "./chunk-YN6XONV5.js";
21
+ } from "./chunk-TUJFCJJU.js";
22
22
  import {
23
23
  loadBrightsyConfig
24
24
  } from "./chunk-RSA47QYR.js";
@@ -76,7 +76,7 @@ import {
76
76
  loadAppSettings,
77
77
  resolveAgentExecutable,
78
78
  resolveClaudeExecutable
79
- } from "./chunk-U7PNCYNX.js";
79
+ } from "./chunk-E52SQENB.js";
80
80
  import {
81
81
  isElectronLikeCommand,
82
82
  unwrapStrippedElectronLaunch
@@ -2609,7 +2609,7 @@ var claudeAdapter = {
2609
2609
  );
2610
2610
  }
2611
2611
  const mode = permissionMode(thread);
2612
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-72K6D354.js");
2612
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-FTNJEML3.js");
2613
2613
  const isOrchestrator = isOrchestratorThread2(thread);
2614
2614
  const rpc = worktreeAgentRpc(isOrchestrator);
2615
2615
  const injectedServers = await buildInjectedMcpServers({
@@ -8,11 +8,11 @@ import {
8
8
  isGlobalThread,
9
9
  isOrchestratorThread,
10
10
  isSlackCoordinatorThread
11
- } from "./chunk-PX324N7P.js";
11
+ } from "./chunk-YALFZKSC.js";
12
12
  import {
13
13
  mergeAgentGitAuthEnv,
14
14
  resolveAgentGitAuthEnv
15
- } from "./chunk-YN6XONV5.js";
15
+ } from "./chunk-TUJFCJJU.js";
16
16
  import {
17
17
  REVIEW_TAB_TITLE,
18
18
  allocateTeamName,
@@ -44,7 +44,7 @@ import {
44
44
  import {
45
45
  assertOrchestratorCapableAgent,
46
46
  contextTokens
47
- } from "./chunk-U7PNCYNX.js";
47
+ } from "./chunk-E52SQENB.js";
48
48
  import {
49
49
  stripNestedElectronEnv
50
50
  } from "./chunk-4TR3HZFT.js";
@@ -1808,7 +1808,7 @@ var PORT_RANGE_SIZE = 10;
1808
1808
  var RECLAIM_RETRY_DELAY_MS = 40;
1809
1809
  var RECLAIM_TRIES = 8;
1810
1810
  async function killReclaimable(ports, worktreePath, signal) {
1811
- const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-TP2NA44I.js");
1811
+ const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-MG2RAQNT.js");
1812
1812
  if (worktreePath) killStaleWorktreeListeners2(ports, worktreePath, signal);
1813
1813
  else killListenersOnPorts2(ports);
1814
1814
  }
@@ -24,7 +24,7 @@ import {
24
24
  import {
25
25
  getGithubGitAuthMode,
26
26
  getGithubPat
27
- } from "./chunk-U7PNCYNX.js";
27
+ } from "./chunk-E52SQENB.js";
28
28
  import {
29
29
  worktreesRoot
30
30
  } from "./chunk-H4UEFJRI.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  abletimeRestUrl,
3
3
  textFromAbleTimeDoc
4
- } from "./chunk-VVV7EI6T.js";
4
+ } from "./chunk-2HOZMSKQ.js";
5
5
  import {
6
6
  assertAbleTimeCredential,
7
7
  callAbleTimeTool,
8
8
  normalizeAbleTimeHost,
9
9
  rewriteAbleTimeError
10
- } from "./chunk-ELBK34TY.js";
10
+ } from "./chunk-7ADEYEMH.js";
11
11
  import {
12
12
  httpFetch
13
13
  } from "./chunk-JAT3JFOS.js";
@@ -20,7 +20,7 @@ import {
20
20
  getAbleTimeHost,
21
21
  isAbleTimeConnected,
22
22
  saveAbleTimeConnection
23
- } from "./chunk-U7PNCYNX.js";
23
+ } from "./chunk-E52SQENB.js";
24
24
 
25
25
  // src/integrations/issue-attachments.ts
26
26
  import { existsSync, mkdirSync, writeFileSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_ABLETIME_HOST,
3
3
  normalizeAbleTimeHost
4
- } from "./chunk-ELBK34TY.js";
4
+ } from "./chunk-7ADEYEMH.js";
5
5
  import {
6
6
  httpFetch
7
7
  } from "./chunk-JAT3JFOS.js";
@@ -10,7 +10,7 @@ import {
10
10
  getAbleTimeHost,
11
11
  loadAppSettings,
12
12
  saveAbleTimeConnection
13
- } from "./chunk-U7PNCYNX.js";
13
+ } from "./chunk-E52SQENB.js";
14
14
 
15
15
  // src/integrations/abletime-oauth.ts
16
16
  import { createHash, randomBytes } from "crypto";
@@ -280,7 +280,7 @@ async function startAbleTimeOAuth(opts) {
280
280
  persistAbleTimeTokens(data, { host });
281
281
  const token = data.access_token.trim();
282
282
  try {
283
- const { getAbleTimeOrientation } = await import("./abletime-NZ2ABWAL.js");
283
+ const { getAbleTimeOrientation } = await import("./abletime-KWOBUL46.js");
284
284
  const orientation = await getAbleTimeOrientation({ token, host });
285
285
  return saveAbleTimeConnection({
286
286
  accessToken: token,
@@ -3,7 +3,7 @@ import {
3
3
  ensureGhPreferOrigin,
4
4
  resolveGithubRepoSlug,
5
5
  resolveRepoRoot
6
- } from "./chunk-YN6XONV5.js";
6
+ } from "./chunk-TUJFCJJU.js";
7
7
  import {
8
8
  allocateTeamName,
9
9
  createEmptyThread,
@@ -29,7 +29,7 @@ import {
29
29
  resolveThreadDefaults,
30
30
  resolveViewerProfile,
31
31
  resolveViewerProfileForRepo
32
- } from "./chunk-U7PNCYNX.js";
32
+ } from "./chunk-E52SQENB.js";
33
33
  import {
34
34
  appDataDir,
35
35
  globalAgentCwd,
@@ -32,10 +32,10 @@ import {
32
32
  tryReservePort,
33
33
  tryReservePorts,
34
34
  worktreeRunPortsPath
35
- } from "./chunk-4XZJYBO2.js";
35
+ } from "./chunk-ST2UQBJT.js";
36
36
  import "./chunk-7Q327QF2.js";
37
- import "./chunk-PX324N7P.js";
38
- import "./chunk-YN6XONV5.js";
37
+ import "./chunk-YALFZKSC.js";
38
+ import "./chunk-TUJFCJJU.js";
39
39
  import "./chunk-YEIHCSZS.js";
40
40
  import "./chunk-2P4XKWV2.js";
41
41
  import "./chunk-F2PVRF3B.js";
@@ -43,7 +43,7 @@ import "./chunk-5XNT6BCG.js";
43
43
  import "./chunk-6K64FJDD.js";
44
44
  import "./chunk-LG6RJBIY.js";
45
45
  import "./chunk-QVN2WOKJ.js";
46
- import "./chunk-U7PNCYNX.js";
46
+ import "./chunk-E52SQENB.js";
47
47
  import "./chunk-77WWLBCI.js";
48
48
  import {
49
49
  stripNestedElectronEnv
@@ -7,15 +7,15 @@ import {
7
7
  enrichWorkspacesWithGithub,
8
8
  ensureGlobalCoordinatorCwd,
9
9
  formatWorkspaceInventory
10
- } from "./chunk-PX324N7P.js";
11
- import "./chunk-YN6XONV5.js";
10
+ } from "./chunk-YALFZKSC.js";
11
+ import "./chunk-TUJFCJJU.js";
12
12
  import "./chunk-YEIHCSZS.js";
13
13
  import "./chunk-2P4XKWV2.js";
14
14
  import "./chunk-F2PVRF3B.js";
15
15
  import "./chunk-6K64FJDD.js";
16
16
  import "./chunk-LG6RJBIY.js";
17
17
  import "./chunk-QVN2WOKJ.js";
18
- import "./chunk-U7PNCYNX.js";
18
+ import "./chunk-E52SQENB.js";
19
19
  import "./chunk-77WWLBCI.js";
20
20
  import "./chunk-4TR3HZFT.js";
21
21
  import "./chunk-WDRMZKVB.js";
@@ -18,15 +18,15 @@ import {
18
18
  remoteCoordinatorSourceRef,
19
19
  slackCoordinatorSourceRef,
20
20
  takenTeamSlugsForOrchestration
21
- } from "./chunk-PX324N7P.js";
22
- import "./chunk-YN6XONV5.js";
21
+ } from "./chunk-YALFZKSC.js";
22
+ import "./chunk-TUJFCJJU.js";
23
23
  import "./chunk-YEIHCSZS.js";
24
24
  import "./chunk-2P4XKWV2.js";
25
25
  import "./chunk-F2PVRF3B.js";
26
26
  import "./chunk-6K64FJDD.js";
27
27
  import "./chunk-LG6RJBIY.js";
28
28
  import "./chunk-QVN2WOKJ.js";
29
- import "./chunk-U7PNCYNX.js";
29
+ import "./chunk-E52SQENB.js";
30
30
  import "./chunk-77WWLBCI.js";
31
31
  import "./chunk-4TR3HZFT.js";
32
32
  import "./chunk-WDRMZKVB.js";
package/dist/index.cjs CHANGED
@@ -1272,6 +1272,7 @@ function parseRemoteClientMessage(raw) {
1272
1272
  const msg = parsed;
1273
1273
  if (msg.type === "ping") return { type: "ping" };
1274
1274
  if (msg.type === "host_pair") return { type: "host_pair" };
1275
+ if (msg.type === "pairing_done") return { type: "pairing_done" };
1275
1276
  if (msg.type === "e2ee_fail") return { type: "e2ee_fail" };
1276
1277
  if (msg.type === "stop") return { type: "stop" };
1277
1278
  if (msg.type === "host_register") {
@@ -33962,8 +33963,11 @@ var DirectionalSeal = class {
33962
33963
  recvCounter = 0;
33963
33964
  transcript = "";
33964
33965
  sendDirection;
33966
+ matchesClientNonce(clientNonce) {
33967
+ return clientNonce === this.hello.clientNonce;
33968
+ }
33965
33969
  acceptReady(ready, desktopNonceBytes) {
33966
- if (ready.v !== 1 || ready.clientNonce !== this.hello.clientNonce) return false;
33970
+ if (ready.v !== 1 || !this.matchesClientNonce(ready.clientNonce)) return false;
33967
33971
  const desktopNonce = desktopNonceBytes ?? b64urlToBytes(ready.desktopNonce);
33968
33972
  if (desktopNonce.length !== NONCE_BYTES) return false;
33969
33973
  let shared;
@@ -39270,6 +39274,7 @@ function runRemoteHost(opts) {
39270
39274
  clientNonce: msg.clientNonce
39271
39275
  });
39272
39276
  if (ready) send3({ type: "e2ee_ready", ...ready });
39277
+ else send3({ type: "e2ee_fail" });
39273
39278
  return;
39274
39279
  }
39275
39280
  if (msg.type === "e2ee") {
@@ -39282,8 +39287,13 @@ function runRemoteHost(opts) {
39282
39287
  }
39283
39288
  if (opened.okFrame) {
39284
39289
  send3({ type: "e2ee", frame: opened.okFrame });
39285
- startBoardSync();
39290
+ try {
39291
+ startBoardSync();
39292
+ } catch (err) {
39293
+ log(`remote error: ${err instanceof Error ? err.message : err}`);
39294
+ }
39286
39295
  opts.onPairingCode?.(null);
39296
+ send3({ type: "pairing_done" });
39287
39297
  opts.onStatus?.({ connected: true, phoneConnected: true });
39288
39298
  log("phone joined");
39289
39299
  return;
@@ -40369,6 +40379,10 @@ var RemoteHub = class {
40369
40379
  this.issueCode(socket);
40370
40380
  return;
40371
40381
  }
40382
+ if (msg.type === "pairing_done") {
40383
+ this.finishPairing(socket);
40384
+ return;
40385
+ }
40372
40386
  if (msg.type === "pair") {
40373
40387
  this.pairPhone(socket, msg.code);
40374
40388
  return;
@@ -40448,7 +40462,8 @@ var RemoteHub = class {
40448
40462
  hostSecret,
40449
40463
  socket,
40450
40464
  sessionToken,
40451
- phone: existing?.socket === socket ? existing.phone : null
40465
+ phone: existing?.socket === socket ? existing.phone : null,
40466
+ pairingCode: existing && existing.socket === socket ? existing.pairingCode : null
40452
40467
  };
40453
40468
  this.hosts.set(deviceId, host);
40454
40469
  this.remembered.set(deviceId, { hostSecret, sessionToken, deviceLabel });
@@ -40484,8 +40499,15 @@ var RemoteHub = class {
40484
40499
  send(socket, { type: "error", message: "Mac is offline" });
40485
40500
  return;
40486
40501
  }
40487
- this.codes.delete(code);
40488
- this.attachPhone(socket, host);
40502
+ this.attachPhone(socket, host, void 0, code);
40503
+ }
40504
+ /** The Mac accepted the phone. That QR must not replace the saved session. */
40505
+ finishPairing(socket) {
40506
+ const bound = this.bySocket.get(socket);
40507
+ const host = bound?.role === "host" ? this.hosts.get(bound.deviceId) : null;
40508
+ if (!host || host.socket !== socket) return;
40509
+ if (host.pairingCode) this.codes.delete(host.pairingCode);
40510
+ host.pairingCode = null;
40489
40511
  }
40490
40512
  /** In-memory session, with the live Mac's label when that socket is up. */
40491
40513
  memorySession(sessionToken) {
@@ -40558,7 +40580,7 @@ var RemoteHub = class {
40558
40580
  send(prev.socket, { type: "phone_left" });
40559
40581
  }
40560
40582
  }
40561
- attachPhone(socket, host, sessionToken) {
40583
+ attachPhone(socket, host, sessionToken, pairingCode) {
40562
40584
  const bound = this.bySocket.get(socket);
40563
40585
  if (bound?.role === "phone" && bound.deviceId !== host.deviceId) {
40564
40586
  this.releasePhoneSocket(socket);
@@ -40579,6 +40601,7 @@ var RemoteHub = class {
40579
40601
  }
40580
40602
  host.sessionToken = token;
40581
40603
  host.phone = socket;
40604
+ if (pairingCode) host.pairingCode = pairingCode;
40582
40605
  this.phonesByToken.set(token, { deviceId: host.deviceId, deviceLabel: host.deviceLabel });
40583
40606
  this.remembered.set(host.deviceId, {
40584
40607
  hostSecret: host.hostSecret,
package/dist/index.d.cts CHANGED
@@ -8328,6 +8328,8 @@ declare class RemoteHub {
8328
8328
  private registerHost;
8329
8329
  private issueCode;
8330
8330
  private pairPhone;
8331
+ /** The Mac accepted the phone. That QR must not replace the saved session. */
8332
+ private finishPairing;
8331
8333
  /** In-memory session, with the live Mac's label when that socket is up. */
8332
8334
  private memorySession;
8333
8335
  private knownSession;
package/dist/index.d.ts CHANGED
@@ -8328,6 +8328,8 @@ declare class RemoteHub {
8328
8328
  private registerHost;
8329
8329
  private issueCode;
8330
8330
  private pairPhone;
8331
+ /** The Mac accepted the phone. That QR must not replace the saved session. */
8332
+ private finishPairing;
8331
8333
  /** In-memory session, with the live Mac's label when that socket is up. */
8332
8334
  private memorySession;
8333
8335
  private knownSession;
package/dist/index.js CHANGED
@@ -203,7 +203,7 @@ import {
203
203
  worktreeCleanupSettings,
204
204
  writeAgentBlock,
205
205
  writeWorktreeFile
206
- } from "./chunk-U53JICJ2.js";
206
+ } from "./chunk-23ZUL2EX.js";
207
207
  import {
208
208
  LEGACY_PLAN_FILE_REL,
209
209
  PLAN_FILE_NAME,
@@ -293,7 +293,7 @@ import {
293
293
  userMcpNamesToDisable,
294
294
  worktreeMcpToolNames,
295
295
  writeInjectedMcpConfig
296
- } from "./chunk-XWUDFLBX.js";
296
+ } from "./chunk-IAPO7ZFG.js";
297
297
  import {
298
298
  brightsyMcpServerName,
299
299
  connectBrightsyTeam,
@@ -424,7 +424,7 @@ import {
424
424
  workspaceAgentChatSummaries,
425
425
  worktreeRunPortsPath,
426
426
  wrapReviewSkillMarkdown
427
- } from "./chunk-4XZJYBO2.js";
427
+ } from "./chunk-ST2UQBJT.js";
428
428
  import {
429
429
  STDERR_EVENT_MAX_CHARS,
430
430
  STDOUT_EVENT_MAX_CHARS,
@@ -490,7 +490,7 @@ import {
490
490
  parseAbleTimeOAuthCallbackUrl,
491
491
  resolveAbleTimeOAuthHost,
492
492
  startAbleTimeOAuth
493
- } from "./chunk-CCUGIVYN.js";
493
+ } from "./chunk-XOZNEAWF.js";
494
494
  import {
495
495
  ableTimeDependencyTarget,
496
496
  commentAbleTimeTask,
@@ -515,10 +515,10 @@ import {
515
515
  toAbleTimeIssueInfo,
516
516
  updateAbleTimeTask,
517
517
  verifyAbleTimeConnection
518
- } from "./chunk-GXSV3X3L.js";
518
+ } from "./chunk-W5QZWAUB.js";
519
519
  import {
520
520
  looksLikeAbleTimeUlid
521
- } from "./chunk-VVV7EI6T.js";
521
+ } from "./chunk-2HOZMSKQ.js";
522
522
  import {
523
523
  ABLETIME_MCP_PATH,
524
524
  ABLETIME_MCP_PM_PATH,
@@ -539,13 +539,13 @@ import {
539
539
  normalizeAbleTimeCredential,
540
540
  normalizeAbleTimeHost,
541
541
  rewriteAbleTimeError
542
- } from "./chunk-ELBK34TY.js";
542
+ } from "./chunk-7ADEYEMH.js";
543
543
  import {
544
544
  clearOptionalCliPresenceCache,
545
545
  detectOptionalServiceClis,
546
546
  installOptionalServiceCli,
547
547
  optionalCliPresence
548
- } from "./chunk-S3U4HR5F.js";
548
+ } from "./chunk-AZ4GEEGL.js";
549
549
  import {
550
550
  OPTIONAL_SERVICES,
551
551
  OPTIONAL_SERVICE_IDS,
@@ -561,7 +561,7 @@ import {
561
561
  optionalServiceConnected,
562
562
  optionalServiceSpec,
563
563
  verifyOptionalService
564
- } from "./chunk-OLYNM52B.js";
564
+ } from "./chunk-FDXHNROD.js";
565
565
  import {
566
566
  getAgentSetupInfo,
567
567
  installAgent,
@@ -573,7 +573,7 @@ import {
573
573
  prepareTerminalCommand,
574
574
  resolveLoginCommand,
575
575
  whichOnPath
576
- } from "./chunk-NXNNYY3Q.js";
576
+ } from "./chunk-AESO2KJS.js";
577
577
  import {
578
578
  CLOUD_COORDINATOR_BUSY_REPLY,
579
579
  CLOUD_COORDINATOR_CANCELED_REPLY,
@@ -626,7 +626,7 @@ import {
626
626
  stageBuffersAsAttachments,
627
627
  syncWorkspacesFromThreads,
628
628
  takenTeamSlugsForOrchestration
629
- } from "./chunk-PX324N7P.js";
629
+ } from "./chunk-YALFZKSC.js";
630
630
  import {
631
631
  GITHUB_PR_BODY_MAX_CHARS,
632
632
  GITHUB_PR_BODY_SAFE_CHARS,
@@ -714,7 +714,7 @@ import {
714
714
  suggestSlug,
715
715
  switchWorktreeBranch,
716
716
  warmGithubAgentAuth
717
- } from "./chunk-YN6XONV5.js";
717
+ } from "./chunk-TUJFCJJU.js";
718
718
  import {
719
719
  FAMOUS_SOCCER_TEAMS,
720
720
  allocateTeamName,
@@ -1013,7 +1013,7 @@ import {
1013
1013
  withTurnScopedCost,
1014
1014
  writeSecureJson,
1015
1015
  writeViewerContext
1016
- } from "./chunk-U7PNCYNX.js";
1016
+ } from "./chunk-E52SQENB.js";
1017
1017
  import {
1018
1018
  THINKING_EFFORTS,
1019
1019
  isThinkingEffort,
@@ -1205,8 +1205,11 @@ var DirectionalSeal = class {
1205
1205
  recvCounter = 0;
1206
1206
  transcript = "";
1207
1207
  sendDirection;
1208
+ matchesClientNonce(clientNonce) {
1209
+ return clientNonce === this.hello.clientNonce;
1210
+ }
1208
1211
  acceptReady(ready, desktopNonceBytes) {
1209
- if (ready.v !== 1 || ready.clientNonce !== this.hello.clientNonce) return false;
1212
+ if (ready.v !== 1 || !this.matchesClientNonce(ready.clientNonce)) return false;
1210
1213
  const desktopNonce = desktopNonceBytes ?? b64urlToBytes(ready.desktopNonce);
1211
1214
  if (desktopNonce.length !== NONCE_BYTES) return false;
1212
1215
  let shared;
@@ -6392,6 +6395,7 @@ function runRemoteHost(opts) {
6392
6395
  clientNonce: msg.clientNonce
6393
6396
  });
6394
6397
  if (ready) send3({ type: "e2ee_ready", ...ready });
6398
+ else send3({ type: "e2ee_fail" });
6395
6399
  return;
6396
6400
  }
6397
6401
  if (msg.type === "e2ee") {
@@ -6404,8 +6408,13 @@ function runRemoteHost(opts) {
6404
6408
  }
6405
6409
  if (opened.okFrame) {
6406
6410
  send3({ type: "e2ee", frame: opened.okFrame });
6407
- startBoardSync();
6411
+ try {
6412
+ startBoardSync();
6413
+ } catch (err) {
6414
+ log(`remote error: ${err instanceof Error ? err.message : err}`);
6415
+ }
6408
6416
  opts.onPairingCode?.(null);
6417
+ send3({ type: "pairing_done" });
6409
6418
  opts.onStatus?.({ connected: true, phoneConnected: true });
6410
6419
  log("phone joined");
6411
6420
  return;
@@ -7487,6 +7496,10 @@ var RemoteHub = class {
7487
7496
  this.issueCode(socket);
7488
7497
  return;
7489
7498
  }
7499
+ if (msg.type === "pairing_done") {
7500
+ this.finishPairing(socket);
7501
+ return;
7502
+ }
7490
7503
  if (msg.type === "pair") {
7491
7504
  this.pairPhone(socket, msg.code);
7492
7505
  return;
@@ -7566,7 +7579,8 @@ var RemoteHub = class {
7566
7579
  hostSecret,
7567
7580
  socket,
7568
7581
  sessionToken,
7569
- phone: existing?.socket === socket ? existing.phone : null
7582
+ phone: existing?.socket === socket ? existing.phone : null,
7583
+ pairingCode: existing && existing.socket === socket ? existing.pairingCode : null
7570
7584
  };
7571
7585
  this.hosts.set(deviceId, host);
7572
7586
  this.remembered.set(deviceId, { hostSecret, sessionToken, deviceLabel });
@@ -7602,8 +7616,15 @@ var RemoteHub = class {
7602
7616
  send(socket, { type: "error", message: "Mac is offline" });
7603
7617
  return;
7604
7618
  }
7605
- this.codes.delete(code);
7606
- this.attachPhone(socket, host);
7619
+ this.attachPhone(socket, host, void 0, code);
7620
+ }
7621
+ /** The Mac accepted the phone. That QR must not replace the saved session. */
7622
+ finishPairing(socket) {
7623
+ const bound = this.bySocket.get(socket);
7624
+ const host = bound?.role === "host" ? this.hosts.get(bound.deviceId) : null;
7625
+ if (!host || host.socket !== socket) return;
7626
+ if (host.pairingCode) this.codes.delete(host.pairingCode);
7627
+ host.pairingCode = null;
7607
7628
  }
7608
7629
  /** In-memory session, with the live Mac's label when that socket is up. */
7609
7630
  memorySession(sessionToken) {
@@ -7676,7 +7697,7 @@ var RemoteHub = class {
7676
7697
  send(prev.socket, { type: "phone_left" });
7677
7698
  }
7678
7699
  }
7679
- attachPhone(socket, host, sessionToken) {
7700
+ attachPhone(socket, host, sessionToken, pairingCode) {
7680
7701
  const bound = this.bySocket.get(socket);
7681
7702
  if (bound?.role === "phone" && bound.deviceId !== host.deviceId) {
7682
7703
  this.releasePhoneSocket(socket);
@@ -7697,6 +7718,7 @@ var RemoteHub = class {
7697
7718
  }
7698
7719
  host.sessionToken = token;
7699
7720
  host.phone = socket;
7721
+ if (pairingCode) host.pairingCode = pairingCode;
7700
7722
  this.phonesByToken.set(token, { deviceId: host.deviceId, deviceLabel: host.deviceLabel });
7701
7723
  this.remembered.set(host.deviceId, {
7702
7724
  hostSecret: host.hostSecret,
@@ -8731,7 +8753,7 @@ async function startHeadlessHost(opts) {
8731
8753
  };
8732
8754
  const refreshRunning = async () => {
8733
8755
  try {
8734
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-E72HYGTB.js");
8756
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-2SXK4U65.js");
8735
8757
  agentsRunning = getOrchestrator2().getRuntime().running;
8736
8758
  } catch {
8737
8759
  agentsRunning = 0;
@@ -10664,7 +10686,7 @@ async function handleJobStop(params, _ctx) {
10664
10686
  return stopDetachedJob(jobCwd(rec), id, reason ? { reason } : void 0);
10665
10687
  }
10666
10688
  async function defaultTurnWait(ref, timeoutMs) {
10667
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-E72HYGTB.js");
10689
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-2SXK4U65.js");
10668
10690
  const orch = getOrchestrator2();
10669
10691
  const thread = await orch.waitForTurn(ref, timeoutMs, {
10670
10692
  resolveIfStillRunning: true
@@ -11017,7 +11039,7 @@ async function startMcpServer() {
11017
11039
  );
11018
11040
  }
11019
11041
  try {
11020
- const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-RQAFJZCD.js");
11042
+ const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-V6YPYY57.js");
11021
11043
  orch.setMaxConcurrent(maxConcurrentAgents2());
11022
11044
  } catch {
11023
11045
  }
@@ -11565,7 +11587,7 @@ async function startMcpServer() {
11565
11587
  if (!worktreeProfile) {
11566
11588
  registerConnectedIssueVendorTools(server);
11567
11589
  const { getCaffeinateHold: getCaffeinateHold2, setCaffeinateHold: setCaffeinateHold2 } = await import("./caffeinate-hold-ZNUEZGHB.js");
11568
- const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-RQAFJZCD.js");
11590
+ const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-V6YPYY57.js");
11569
11591
  const accountDefaults = resolveThreadDefaults2();
11570
11592
  const accountDefaultsHint = `Account defaults: agent=${accountDefaults.agent}, model=${accountDefaults.model?.trim() || "Auto"}, effort=${accountDefaults.effort}`;
11571
11593
  server.tool(
@@ -14317,7 +14339,7 @@ async function continueSourceThread(threadId, prompt) {
14317
14339
  await continueOnReply(threadId, prompt);
14318
14340
  return;
14319
14341
  }
14320
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-E72HYGTB.js");
14342
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-2SXK4U65.js");
14321
14343
  await getOrchestrator2().send(threadId, prompt);
14322
14344
  } catch {
14323
14345
  }
@@ -3,12 +3,12 @@ import {
3
3
  detectOptionalServiceClis,
4
4
  installOptionalServiceCli,
5
5
  optionalCliPresence
6
- } from "./chunk-S3U4HR5F.js";
7
- import "./chunk-OLYNM52B.js";
8
- import "./chunk-NXNNYY3Q.js";
6
+ } from "./chunk-AZ4GEEGL.js";
7
+ import "./chunk-FDXHNROD.js";
8
+ import "./chunk-AESO2KJS.js";
9
9
  import "./chunk-JAT3JFOS.js";
10
10
  import "./chunk-QVN2WOKJ.js";
11
- import "./chunk-U7PNCYNX.js";
11
+ import "./chunk-E52SQENB.js";
12
12
  import "./chunk-77WWLBCI.js";
13
13
  import "./chunk-4TR3HZFT.js";
14
14
  import "./chunk-WDRMZKVB.js";
@@ -9,17 +9,17 @@ import {
9
9
  resolveSendFollowUp,
10
10
  startOrchestration,
11
11
  waitForPidExit
12
- } from "./chunk-U53JICJ2.js";
12
+ } from "./chunk-23ZUL2EX.js";
13
13
  import "./chunk-PGPSIEMW.js";
14
- import "./chunk-XWUDFLBX.js";
14
+ import "./chunk-IAPO7ZFG.js";
15
15
  import "./chunk-HH3VVTEC.js";
16
- import "./chunk-4XZJYBO2.js";
16
+ import "./chunk-ST2UQBJT.js";
17
17
  import "./chunk-7Q327QF2.js";
18
18
  import "./chunk-7H655NEW.js";
19
- import "./chunk-OLYNM52B.js";
20
- import "./chunk-NXNNYY3Q.js";
21
- import "./chunk-PX324N7P.js";
22
- import "./chunk-YN6XONV5.js";
19
+ import "./chunk-FDXHNROD.js";
20
+ import "./chunk-AESO2KJS.js";
21
+ import "./chunk-YALFZKSC.js";
22
+ import "./chunk-TUJFCJJU.js";
23
23
  import "./chunk-YEIHCSZS.js";
24
24
  import "./chunk-2P4XKWV2.js";
25
25
  import "./chunk-RSA47QYR.js";
@@ -32,7 +32,7 @@ import "./chunk-6K64FJDD.js";
32
32
  import "./chunk-LG6RJBIY.js";
33
33
  import "./chunk-QVN2WOKJ.js";
34
34
  import "./chunk-YDUHLWI5.js";
35
- import "./chunk-U7PNCYNX.js";
35
+ import "./chunk-E52SQENB.js";
36
36
  import "./chunk-77WWLBCI.js";
37
37
  import "./chunk-4TR3HZFT.js";
38
38
  import "./chunk-WDRMZKVB.js";
@@ -9,15 +9,15 @@ import {
9
9
  removeWorkspace,
10
10
  sameWorkspacePath,
11
11
  syncWorkspacesFromThreads
12
- } from "./chunk-PX324N7P.js";
13
- import "./chunk-YN6XONV5.js";
12
+ } from "./chunk-YALFZKSC.js";
13
+ import "./chunk-TUJFCJJU.js";
14
14
  import "./chunk-YEIHCSZS.js";
15
15
  import "./chunk-2P4XKWV2.js";
16
16
  import "./chunk-F2PVRF3B.js";
17
17
  import "./chunk-6K64FJDD.js";
18
18
  import "./chunk-LG6RJBIY.js";
19
19
  import "./chunk-QVN2WOKJ.js";
20
- import "./chunk-U7PNCYNX.js";
20
+ import "./chunk-E52SQENB.js";
21
21
  import "./chunk-77WWLBCI.js";
22
22
  import "./chunk-4TR3HZFT.js";
23
23
  import "./chunk-WDRMZKVB.js";
@@ -48,7 +48,7 @@ import {
48
48
  slugify,
49
49
  suggestSlug,
50
50
  switchWorktreeBranch
51
- } from "./chunk-YN6XONV5.js";
51
+ } from "./chunk-TUJFCJJU.js";
52
52
  import {
53
53
  FAMOUS_SOCCER_TEAMS,
54
54
  allocateTeamName,
@@ -70,7 +70,7 @@ import "./chunk-F2PVRF3B.js";
70
70
  import "./chunk-6K64FJDD.js";
71
71
  import "./chunk-LG6RJBIY.js";
72
72
  import "./chunk-QVN2WOKJ.js";
73
- import "./chunk-U7PNCYNX.js";
73
+ import "./chunk-E52SQENB.js";
74
74
  import "./chunk-77WWLBCI.js";
75
75
  import "./chunk-4TR3HZFT.js";
76
76
  import "./chunk-WDRMZKVB.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sideboard-ai/core",
3
- "version": "0.1.317",
3
+ "version": "0.1.318",
4
4
  "description": "Sideboard core — orchestration, agents, git worktrees, MCP server",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",