@sideboard-ai/core 0.1.303 → 0.1.304

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 (84) hide show
  1. package/dist/{abletime-APP3DZ4P.js → abletime-SJUVZVRU.js} +6 -6
  2. package/dist/{abletime-RYDAQ3FE.js → abletime-T5YSJLNZ.js} +6 -6
  3. package/dist/{abletime-oauth-ZURGXSY6.js → abletime-oauth-2TOOZ2FN.js} +5 -5
  4. package/dist/{abletime-oauth-KTERKARA.js → abletime-oauth-73TFJME4.js} +5 -5
  5. package/dist/{abletime-rest-4TVIWLZK.js → abletime-rest-5TDRIFEV.js} +5 -5
  6. package/dist/{abletime-rest-EUB6RW7K.js → abletime-rest-PNUGH2FS.js} +5 -5
  7. package/dist/agents/claude-runner.js +2 -2
  8. package/dist/agents/cursor-runner.js +5 -5
  9. package/dist/{agents-3GN4E2X3.js → agents-IWNQOQOU.js} +12 -12
  10. package/dist/{agents-XLHFVC64.js → agents-PGU5WVSO.js} +10 -10
  11. package/dist/{app-settings-2IH42VA5.js → app-settings-CC65VPBL.js} +3 -3
  12. package/dist/{app-settings-3OQWRKOK.js → app-settings-DZ5AY7N5.js} +3 -3
  13. package/dist/{caffeinate-hold-7JM5H5P3.js → caffeinate-hold-H7TTUDGM.js} +2 -2
  14. package/dist/{caffeinate-hold-DYJGWK6Y.js → caffeinate-hold-ZNUEZGHB.js} +2 -2
  15. package/dist/{chunk-545DY7CQ.js → chunk-33HIBNSF.js} +106 -64
  16. package/dist/{chunk-FA3V56KF.js → chunk-3UDRWMIM.js} +2 -2
  17. package/dist/{chunk-7IAMHN2N.js → chunk-42JGPPVS.js} +1 -1
  18. package/dist/{chunk-BRFDPV7Z.js → chunk-5QX2NYXL.js} +4 -4
  19. package/dist/{chunk-DW6NNYUJ.js → chunk-5SFA27CF.js} +61 -8
  20. package/dist/{chunk-XCXUVX7I.js → chunk-62ESCTJ4.js} +1 -1
  21. package/dist/{chunk-SSETL5EX.js → chunk-6424BACS.js} +2 -2
  22. package/dist/{chunk-RSATPXU4.js → chunk-A2YXQC65.js} +264 -2
  23. package/dist/{chunk-GEFH4QFX.js → chunk-BIPXOHZI.js} +3 -3
  24. package/dist/{chunk-HSF2RQSQ.js → chunk-CFTOKVQN.js} +5 -5
  25. package/dist/{chunk-3D3GGL6X.js → chunk-CW4FIIDE.js} +3 -3
  26. package/dist/{chunk-5DZUWGKV.js → chunk-DC3VZXMA.js} +1 -1
  27. package/dist/{chunk-5MVOZLN7.js → chunk-DLGGLV2M.js} +3 -3
  28. package/dist/{chunk-WZCPZVUC.js → chunk-EGTCXNQM.js} +3 -3
  29. package/dist/{chunk-3TZRSKFJ.js → chunk-EZYZGDWU.js} +422 -175
  30. package/dist/{chunk-7AYOOG77.js → chunk-G2L3CR3A.js} +471 -107
  31. package/dist/{chunk-EHT2DRT4.js → chunk-H4UEFJRI.js} +4 -0
  32. package/dist/{chunk-P2GHFJOB.js → chunk-HG25AYBV.js} +2 -2
  33. package/dist/{chunk-GS6O65Q2.js → chunk-I34DCC4L.js} +104 -62
  34. package/dist/{chunk-UN5Q7POQ.js → chunk-J2LNLI4S.js} +1 -1
  35. package/dist/{chunk-MOP5L5QZ.js → chunk-JARCAPKL.js} +3 -3
  36. package/dist/{chunk-FAXOEKQR.js → chunk-JWW66PO3.js} +5 -5
  37. package/dist/{chunk-3HO2OY5T.js → chunk-KI45T4DI.js} +1 -1
  38. package/dist/{chunk-NOT4SEAM.js → chunk-LAWLUOWQ.js} +1 -1
  39. package/dist/{chunk-UWQ6UCIB.js → chunk-LG6RJBIY.js} +1 -1
  40. package/dist/{chunk-IOY2LF3Y.js → chunk-MMVMQ34G.js} +1 -1
  41. package/dist/{chunk-LZVWKJXY.js → chunk-OLSLE3LO.js} +3 -3
  42. package/dist/{chunk-RAGDMEIB.js → chunk-OVNIP265.js} +59 -8
  43. package/dist/{chunk-BU6HH5VA.js → chunk-PHMFAU35.js} +66 -2
  44. package/dist/{chunk-ISEYRGMP.js → chunk-RU6DTCCV.js} +2 -2
  45. package/dist/{chunk-R3R3ZDFC.js → chunk-SZ3XS2WM.js} +2 -2
  46. package/dist/{chunk-B42H6GJR.js → chunk-U4WACWBC.js} +3 -3
  47. package/dist/{chunk-VGNLMGBK.js → chunk-VEVFHO6K.js} +5 -5
  48. package/dist/{chunk-4RZRHTSZ.js → chunk-WMZIANPV.js} +1 -1
  49. package/dist/{chunk-H5XL4KUS.js → chunk-WOU343SI.js} +4 -0
  50. package/dist/{chunk-QDDTVIWE.js → chunk-WRZRX4Q7.js} +2 -2
  51. package/dist/{chunk-YCDHLK2Z.js → chunk-X3FSWWW2.js} +4 -4
  52. package/dist/{chunk-QDA6NXRA.js → chunk-YDUHLWI5.js} +1 -1
  53. package/dist/{chunk-J54UPHXZ.js → chunk-YJBUYGPN.js} +1 -1
  54. package/dist/{conductor-ATST6OMC.js → conductor-YBXURAUL.js} +10 -8
  55. package/dist/{conductor-2AVFGSQJ.js → conductor-ZFRXTVGP.js} +10 -8
  56. package/dist/{connected-teams-BJ6PMIST.js → connected-teams-BBNYTR3I.js} +2 -2
  57. package/dist/{connected-teams-AB7ZHJVO.js → connected-teams-WLWIVYGD.js} +2 -2
  58. package/dist/{coordinator-prompt-TIAI6A47.js → coordinator-prompt-GZCWQAAV.js} +7 -7
  59. package/dist/{coordinator-prompt-CQPUNMRX.js → coordinator-prompt-YAZRQ4BI.js} +7 -7
  60. package/dist/{cursor-recover-A6V5UVFT.js → cursor-recover-OWPQUHFH.js} +2 -2
  61. package/dist/{cursor-recover-MB3T2K5T.js → cursor-recover-TEBFKAZ4.js} +2 -2
  62. package/dist/{global-workspace-7YABMLQG.js → global-workspace-BZAVBOH3.js} +7 -7
  63. package/dist/{global-workspace-UZJUHGQP.js → global-workspace-H6X32IJZ.js} +7 -7
  64. package/dist/index.cjs +13486 -12609
  65. package/dist/index.d.cts +94 -14
  66. package/dist/index.d.ts +94 -14
  67. package/dist/index.js +11807 -11663
  68. package/dist/{managed-accounts-2AK5RIAF.js → managed-accounts-JJTAKHMG.js} +2 -2
  69. package/dist/{managed-accounts-46A4KRUE.js → managed-accounts-PITLFLKU.js} +2 -2
  70. package/dist/mcp/run-stdio.cjs +1037 -616
  71. package/dist/mcp/run-stdio.js +20 -20
  72. package/dist/{optional-cli-JQVNSMSU.js → optional-cli-QDIT57VD.js} +5 -5
  73. package/dist/{optional-cli-PZXDOVJJ.js → optional-cli-QY6V5S5N.js} +6 -6
  74. package/dist/{orchestrator-CZPRDLHV.js → orchestrator-IKKSYIQ3.js} +16 -16
  75. package/dist/{orchestrator-COX6QO2B.js → orchestrator-JGHYZDDB.js} +14 -14
  76. package/dist/{paths-HYT5WOOX.js → paths-HAAJNTTE.js} +1 -1
  77. package/dist/{paths-5JYXTAPC.js → paths-PHWEVXD5.js} +1 -1
  78. package/dist/{thread-store-PNX4HVLO.js → thread-store-HY22M5A7.js} +3 -3
  79. package/dist/{thread-store-VC4AIKN3.js → thread-store-XMUQDO5O.js} +3 -3
  80. package/dist/{workspaces-GZ7F5EJR.js → workspaces-AGOLRBYZ.js} +7 -7
  81. package/dist/{workspaces-6DJL4IST.js → workspaces-BQUDYTBX.js} +7 -7
  82. package/dist/{worktree-2BYVRYPJ.js → worktree-C5VI46RZ.js} +6 -6
  83. package/dist/{worktree-VXPOY2LE.js → worktree-FMK57ULT.js} +6 -6
  84. package/package.json +4 -1
@@ -14,14 +14,14 @@ import {
14
14
  withAddedAccount,
15
15
  withRemovedAccount,
16
16
  withSelectedAccount
17
- } from "./chunk-3HO2OY5T.js";
17
+ } from "./chunk-KI45T4DI.js";
18
18
  import {
19
19
  chmodOwnerOnly,
20
20
  writePrivateFile
21
21
  } from "./chunk-JT7R45JB.js";
22
22
  import {
23
23
  appDataDir
24
- } from "./chunk-EHT2DRT4.js";
24
+ } from "./chunk-H4UEFJRI.js";
25
25
 
26
26
  // src/store/app-settings.ts
27
27
  import { randomUUID } from "crypto";
@@ -158,6 +158,226 @@ function formatViewerContextReminder() {
158
158
  return "Viewer context: get_viewer_context to read; update_viewer_context only after ask_user confirms (Save this context / Do not save).";
159
159
  }
160
160
 
161
+ // src/remote/protocol.ts
162
+ var REMOTE_RELAY_PATH = "/remote";
163
+ var REMOTE_PING_INTERVAL_MS = 2e4;
164
+ var REMOTE_PONG_TIMEOUT_MS = 15e3;
165
+ var BAKED_REMOTE_RELAY_URL = `wss://relay.sideboard.cloud${REMOTE_RELAY_PATH}`;
166
+ function normalizeRemoteRelayUrl(raw) {
167
+ let text = raw.trim();
168
+ if (!text) return null;
169
+ if (!/^[a-z][a-z0-9+.-]*:\/\//i.test(text)) text = `wss://${text}`;
170
+ let url;
171
+ try {
172
+ url = new URL(text);
173
+ } catch {
174
+ return null;
175
+ }
176
+ if (url.protocol === "https:") url.protocol = "wss:";
177
+ else if (url.protocol === "http:") url.protocol = "ws:";
178
+ if (url.protocol !== "ws:" && url.protocol !== "wss:") return null;
179
+ if (url.username || url.password) return null;
180
+ const path = url.pathname.replace(/\/+$/, "") || "/";
181
+ if (path !== "/" && path !== REMOTE_RELAY_PATH) return null;
182
+ url.pathname = REMOTE_RELAY_PATH;
183
+ url.search = "";
184
+ url.hash = "";
185
+ return url.toString();
186
+ }
187
+ function remoteRelayUrl(configured) {
188
+ const fromSettings = configured?.trim() ? normalizeRemoteRelayUrl(configured) : null;
189
+ if (fromSettings) return fromSettings;
190
+ const fromEnv = process.env.SIDEBOARD_REMOTE_RELAY_URL?.trim();
191
+ if (fromEnv) return normalizeRemoteRelayUrl(fromEnv) || BAKED_REMOTE_RELAY_URL;
192
+ return BAKED_REMOTE_RELAY_URL;
193
+ }
194
+ function str(value) {
195
+ return typeof value === "string" ? value.trim() : "";
196
+ }
197
+ function questions(value) {
198
+ if (!Array.isArray(value)) return null;
199
+ const out = [];
200
+ for (const item of value) {
201
+ if (!item || typeof item !== "object") return null;
202
+ const row = item;
203
+ const question = str(row.question);
204
+ if (!question || !Array.isArray(row.options)) return null;
205
+ const options = [];
206
+ for (const opt of row.options) {
207
+ if (!opt || typeof opt !== "object") return null;
208
+ const label = str(opt.label);
209
+ if (!label) return null;
210
+ const description = str(opt.description);
211
+ options.push(description ? { label, description } : { label });
212
+ }
213
+ if (options.length === 0) return null;
214
+ out.push({ question, options });
215
+ }
216
+ return out;
217
+ }
218
+ function parseRemoteClientMessage(raw) {
219
+ let parsed;
220
+ try {
221
+ parsed = JSON.parse(raw);
222
+ } catch {
223
+ return null;
224
+ }
225
+ if (!parsed || typeof parsed !== "object" || !("type" in parsed)) return null;
226
+ const msg = parsed;
227
+ if (msg.type === "ping") return { type: "ping" };
228
+ if (msg.type === "host_pair") return { type: "host_pair" };
229
+ if (msg.type === "e2ee_fail") return { type: "e2ee_fail" };
230
+ if (msg.type === "stop") return { type: "stop" };
231
+ if (msg.type === "host_register") {
232
+ const deviceId = str(parsed.deviceId);
233
+ const hostSecret = str(parsed.hostSecret);
234
+ const deviceLabel = str(parsed.deviceLabel);
235
+ if (!deviceId || !hostSecret || !deviceLabel) return null;
236
+ const accountToken = str(parsed.accountToken);
237
+ return {
238
+ type: "host_register",
239
+ deviceId,
240
+ hostSecret,
241
+ deviceLabel,
242
+ ...accountToken ? { accountToken } : {}
243
+ };
244
+ }
245
+ if (msg.type === "pair") {
246
+ const code = str(parsed.code).toUpperCase();
247
+ if (!code) return null;
248
+ return { type: "pair", code };
249
+ }
250
+ if (msg.type === "resume") {
251
+ const sessionToken = str(parsed.sessionToken);
252
+ if (!sessionToken) return null;
253
+ return { type: "resume", sessionToken };
254
+ }
255
+ if (msg.type === "list_hosts") {
256
+ const raw2 = parsed.sessionTokens;
257
+ if (!Array.isArray(raw2)) return null;
258
+ const sessionTokens = raw2.filter((item) => typeof item === "string" && item.trim().length > 0).map((item) => item.trim()).slice(0, 32);
259
+ return { type: "list_hosts", sessionTokens };
260
+ }
261
+ if (msg.type === "prompt") {
262
+ const text = str(parsed.text);
263
+ if (!text) return null;
264
+ return { type: "prompt", text };
265
+ }
266
+ const encrypted = parseEncrypted(parsed);
267
+ if (encrypted) return encrypted;
268
+ if (msg.type === "assistant") {
269
+ return { type: "assistant", text: str(parsed.text) };
270
+ }
271
+ if (msg.type === "ask_user") {
272
+ const parsedQuestions = questions(parsed.questions);
273
+ if (!parsedQuestions?.length) return null;
274
+ return {
275
+ type: "ask_user",
276
+ text: str(parsed.text),
277
+ questions: parsedQuestions
278
+ };
279
+ }
280
+ return null;
281
+ }
282
+ function parseRemoteServerMessage(raw) {
283
+ let parsed;
284
+ try {
285
+ parsed = JSON.parse(raw);
286
+ } catch {
287
+ return null;
288
+ }
289
+ if (!parsed || typeof parsed !== "object" || !("type" in parsed)) return null;
290
+ const type = parsed.type;
291
+ if (type === "pong") return { type: "pong" };
292
+ if (type === "phone_joined") return { type: "phone_joined" };
293
+ if (type === "phone_left") return { type: "phone_left" };
294
+ if (type === "host_offline") return { type: "host_offline" };
295
+ if (type === "hosts") {
296
+ const raw2 = parsed.hosts;
297
+ if (!Array.isArray(raw2)) return null;
298
+ const hosts = [];
299
+ for (const item of raw2) {
300
+ if (!item || typeof item !== "object") return null;
301
+ const row = item;
302
+ const sessionToken = str(row.sessionToken);
303
+ if (!sessionToken || typeof row.deviceId !== "string" || typeof row.deviceLabel !== "string") return null;
304
+ if (typeof row.online !== "boolean") return null;
305
+ hosts.push({
306
+ sessionToken,
307
+ deviceId: row.deviceId.trim(),
308
+ deviceLabel: row.deviceLabel.trim(),
309
+ online: row.online
310
+ });
311
+ }
312
+ return { type: "hosts", hosts };
313
+ }
314
+ if (type === "stop") return { type: "stop" };
315
+ if (type === "registered") {
316
+ const deviceId = str(parsed.deviceId);
317
+ const deviceLabel = str(parsed.deviceLabel);
318
+ if (!deviceId || !deviceLabel) return null;
319
+ return { type: "registered", deviceId, deviceLabel };
320
+ }
321
+ if (type === "pairing_code") {
322
+ const code = str(parsed.code);
323
+ const expiresAt = parsed.expiresAt;
324
+ if (!code || typeof expiresAt !== "number") return null;
325
+ return { type: "pairing_code", code, expiresAt };
326
+ }
327
+ if (type === "inbound") {
328
+ const text = str(parsed.text);
329
+ if (!text) return null;
330
+ return { type: "inbound", text };
331
+ }
332
+ if (type === "paired") {
333
+ const deviceId = str(parsed.deviceId);
334
+ const deviceLabel = str(parsed.deviceLabel);
335
+ const sessionToken = str(parsed.sessionToken);
336
+ if (!deviceId || !deviceLabel || !sessionToken) return null;
337
+ return { type: "paired", deviceId, deviceLabel, sessionToken };
338
+ }
339
+ if (type === "assistant") {
340
+ return { type: "assistant", text: str(parsed.text) };
341
+ }
342
+ if (type === "ask_user") {
343
+ const parsedQuestions = questions(parsed.questions);
344
+ if (!parsedQuestions?.length) return null;
345
+ return {
346
+ type: "ask_user",
347
+ text: str(parsed.text),
348
+ questions: parsedQuestions
349
+ };
350
+ }
351
+ if (type === "error") {
352
+ const message = str(parsed.message) || "remote error";
353
+ return { type: "error", message };
354
+ }
355
+ return parseEncrypted(parsed);
356
+ }
357
+ function parseEncrypted(parsed) {
358
+ if (!parsed || typeof parsed !== "object") return null;
359
+ const type = parsed.type;
360
+ if (type === "e2ee") {
361
+ const frame = str(parsed.frame);
362
+ if (!frame) return null;
363
+ return { type: "e2ee", frame };
364
+ }
365
+ if (type === "e2ee_hello") {
366
+ const clientPublicKey = str(parsed.clientPublicKey);
367
+ const clientNonce = str(parsed.clientNonce);
368
+ if (parsed.v !== 1 || !clientPublicKey || !clientNonce) return null;
369
+ return { type: "e2ee_hello", v: 1, clientPublicKey, clientNonce };
370
+ }
371
+ if (type === "e2ee_ready") {
372
+ const desktopPublicKey = str(parsed.desktopPublicKey);
373
+ const clientNonce = str(parsed.clientNonce);
374
+ const desktopNonce = str(parsed.desktopNonce);
375
+ if (parsed.v !== 1 || !desktopPublicKey || !clientNonce || !desktopNonce) return null;
376
+ return { type: "e2ee_ready", v: 1, desktopPublicKey, clientNonce, desktopNonce };
377
+ }
378
+ return null;
379
+ }
380
+
161
381
  // src/store/secret-vault.ts
162
382
  import { join } from "path";
163
383
 
@@ -333,6 +553,12 @@ function normalizeVault(raw) {
333
553
  if (typeof raw.remoteHostSecret === "string" && raw.remoteHostSecret.trim()) {
334
554
  out.remoteHostSecret = raw.remoteHostSecret.trim();
335
555
  }
556
+ if (typeof raw.remoteHostPrivateKey === "string" && raw.remoteHostPrivateKey.trim()) {
557
+ out.remoteHostPrivateKey = raw.remoteHostPrivateKey.trim();
558
+ }
559
+ if (typeof raw.remotePhoneToken === "string" && raw.remotePhoneToken.trim()) {
560
+ out.remotePhoneToken = raw.remotePhoneToken.trim();
561
+ }
336
562
  if (typeof raw.remoteAccountToken === "string" && raw.remoteAccountToken.trim()) {
337
563
  out.remoteAccountToken = raw.remoteAccountToken.trim();
338
564
  }
@@ -921,6 +1147,10 @@ function normalizeIntegrations(raw) {
921
1147
  const email = source.remoteAccountEmail.trim().toLowerCase();
922
1148
  if (email) out.remoteAccountEmail = email;
923
1149
  }
1150
+ if (typeof source.remoteRelayUrl === "string") {
1151
+ const url = normalizeRemoteRelayUrl(source.remoteRelayUrl);
1152
+ if (url) out.remoteRelayUrl = url;
1153
+ }
924
1154
  if (typeof source.githubGitAuthMode === "string" && GIT_AUTH_MODES.has(source.githubGitAuthMode)) {
925
1155
  out.githubGitAuthMode = source.githubGitAuthMode;
926
1156
  }
@@ -1296,6 +1526,9 @@ function persistSplit(settings) {
1296
1526
  vault[key] = integrations[key];
1297
1527
  delete integrations[key];
1298
1528
  }
1529
+ const previous = loadSecretVault();
1530
+ if (previous.remoteHostPrivateKey) vault.remoteHostPrivateKey = previous.remoteHostPrivateKey;
1531
+ if (previous.remotePhoneToken) vault.remotePhoneToken = previous.remotePhoneToken;
1299
1532
  writePrivateFile(
1300
1533
  appSettingsPath(),
1301
1534
  `${JSON.stringify({ ...settings, environment: {}, integrations }, null, 2)}
@@ -1526,6 +1759,25 @@ function updateIntegrationsSettings(patch) {
1526
1759
  integrations.remoteAccountEmail = patch.remoteAccountEmail.trim().toLowerCase();
1527
1760
  }
1528
1761
  }
1762
+ if ("remoteRelayUrl" in patch) {
1763
+ const previous = remoteRelayUrl(integrations.remoteRelayUrl);
1764
+ if (patch.remoteRelayUrl == null || patch.remoteRelayUrl.trim() === "") {
1765
+ delete integrations.remoteRelayUrl;
1766
+ } else {
1767
+ const url = normalizeRemoteRelayUrl(patch.remoteRelayUrl);
1768
+ if (!url) {
1769
+ throw new Error(
1770
+ "Relay URL must be a WebSocket address, for example wss://relay.example.com/remote."
1771
+ );
1772
+ }
1773
+ integrations.remoteRelayUrl = url;
1774
+ }
1775
+ const next = remoteRelayUrl(integrations.remoteRelayUrl);
1776
+ if (new URL(previous).origin !== new URL(next).origin) {
1777
+ delete integrations.remoteAccountToken;
1778
+ delete integrations.remoteAccountEmail;
1779
+ }
1780
+ }
1529
1781
  if ("githubGitAuthMode" in patch) {
1530
1782
  if (patch.githubGitAuthMode == null) {
1531
1783
  delete integrations.githubGitAuthMode;
@@ -2290,6 +2542,14 @@ export {
2290
2542
  formatWorkspaceProfileSuffix,
2291
2543
  formatViewerContextDirective,
2292
2544
  formatViewerContextReminder,
2545
+ REMOTE_RELAY_PATH,
2546
+ REMOTE_PING_INTERVAL_MS,
2547
+ REMOTE_PONG_TIMEOUT_MS,
2548
+ BAKED_REMOTE_RELAY_URL,
2549
+ normalizeRemoteRelayUrl,
2550
+ remoteRelayUrl,
2551
+ parseRemoteClientMessage,
2552
+ parseRemoteServerMessage,
2293
2553
  setVaultMasterKey,
2294
2554
  persistVaultKeyInKeychain,
2295
2555
  readKeychainVaultKey,
@@ -2298,6 +2558,8 @@ export {
2298
2558
  writeSecureJson,
2299
2559
  isSecureFileEncrypted,
2300
2560
  secureFileUnlocksWith,
2561
+ loadSecretVault,
2562
+ saveSecretVault,
2301
2563
  fromInclusiveInputUsage,
2302
2564
  requestOccupancy,
2303
2565
  mergeUsage,
@@ -4,7 +4,7 @@ import {
4
4
  normalizeTakenSlug,
5
5
  normalizeWorktreePath,
6
6
  takenSlugsFromThread
7
- } from "./chunk-P2GHFJOB.js";
7
+ } from "./chunk-HG25AYBV.js";
8
8
  import {
9
9
  ensureWorktreeSideboardIgnored
10
10
  } from "./chunk-2P4XKWV2.js";
@@ -24,10 +24,10 @@ import {
24
24
  import {
25
25
  getGithubGitAuthMode,
26
26
  getGithubPat
27
- } from "./chunk-RSATPXU4.js";
27
+ } from "./chunk-A2YXQC65.js";
28
28
  import {
29
29
  worktreesRoot
30
- } from "./chunk-EHT2DRT4.js";
30
+ } from "./chunk-H4UEFJRI.js";
31
31
 
32
32
  // src/git/worktree.ts
33
33
  import { randomBytes } from "crypto";
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  getAbleTimeHost,
8
8
  isAbleTimeConnected
9
- } from "./chunk-BU6HH5VA.js";
9
+ } from "./chunk-PHMFAU35.js";
10
10
 
11
11
  // src/integrations/abletime-mcp.ts
12
12
  var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
@@ -155,7 +155,7 @@ function textsFromUnknown(value) {
155
155
  return "";
156
156
  }
157
157
  async function abletimeMcpRequest(method, params, opts) {
158
- const rawToken = opts?.token ?? await import("./abletime-oauth-ZURGXSY6.js").then((m) => m.ensureAbleTimeAccessToken());
158
+ const rawToken = opts?.token ?? await import("./abletime-oauth-2TOOZ2FN.js").then((m) => m.ensureAbleTimeAccessToken());
159
159
  if (!rawToken?.trim()) {
160
160
  throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
161
161
  }
@@ -226,9 +226,9 @@ async function callAbleTimeTool(name, args = {}, opts) {
226
226
  if (!opts?.token && !isAbleTimeConnected()) {
227
227
  throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
228
228
  }
229
- const rawToken = opts?.token ?? await import("./abletime-oauth-ZURGXSY6.js").then((m) => m.ensureAbleTimeAccessToken());
229
+ const rawToken = opts?.token ?? await import("./abletime-oauth-2TOOZ2FN.js").then((m) => m.ensureAbleTimeAccessToken());
230
230
  if (rawToken && ableTimeUsesRest(rawToken)) {
231
- const { callAbleTimeRestTool } = await import("./abletime-rest-4TVIWLZK.js");
231
+ const { callAbleTimeRestTool } = await import("./abletime-rest-5TDRIFEV.js");
232
232
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
233
233
  }
234
234
  const requestOpts = { ...opts, pm: opts?.pm ?? abletimeToolUsesPm(name) };
@@ -244,7 +244,7 @@ async function callAbleTimeTool(name, args = {}, opts) {
244
244
  return await call();
245
245
  }
246
246
  if (rawToken && ableTimeUsesRest(rawToken) && isAbleTimeRejectedCredential(message)) {
247
- const { callAbleTimeRestTool } = await import("./abletime-rest-4TVIWLZK.js");
247
+ const { callAbleTimeRestTool } = await import("./abletime-rest-5TDRIFEV.js");
248
248
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
249
249
  }
250
250
  throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_ABLETIME_HOST,
3
3
  normalizeAbleTimeHost
4
- } from "./chunk-FAXOEKQR.js";
4
+ } from "./chunk-JWW66PO3.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-RSATPXU4.js";
13
+ } from "./chunk-A2YXQC65.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-RYDAQ3FE.js");
283
+ const { getAbleTimeOrientation } = await import("./abletime-T5YSJLNZ.js");
284
284
  const orientation = await getAbleTimeOrientation({ token, host });
285
285
  return saveAbleTimeConnection({
286
286
  accessToken: token,
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-NSTQ6QKD.js";
6
6
  import {
7
7
  appDataDir
8
- } from "./chunk-H5XL4KUS.js";
8
+ } from "./chunk-WOU343SI.js";
9
9
 
10
10
  // src/store/caffeinate-hold.ts
11
11
  import { spawn } from "child_process";
@@ -19,17 +19,17 @@ import {
19
19
  import {
20
20
  getGithubGitAuthMode,
21
21
  getGithubPat
22
- } from "./chunk-BU6HH5VA.js";
22
+ } from "./chunk-PHMFAU35.js";
23
23
  import {
24
24
  allocateTeamName,
25
25
  listThreads,
26
26
  normalizeTakenSlug,
27
27
  normalizeWorktreePath,
28
28
  takenSlugsFromThread
29
- } from "./chunk-FA3V56KF.js";
29
+ } from "./chunk-3UDRWMIM.js";
30
30
  import {
31
31
  worktreesRoot
32
- } from "./chunk-H5XL4KUS.js";
32
+ } from "./chunk-WOU343SI.js";
33
33
 
34
34
  // src/git/worktree.ts
35
35
  import { randomBytes } from "crypto";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-2UG25RMK.js";
10
10
  import {
11
11
  resolveAgentExecutable
12
- } from "./chunk-BU6HH5VA.js";
12
+ } from "./chunk-PHMFAU35.js";
13
13
 
14
14
  // src/agents/install.ts
15
15
  import { existsSync } from "fs";
@@ -267,8 +267,8 @@ async function loginAgent(agent) {
267
267
  };
268
268
  }
269
269
  async function loginManagedAccount(accountId) {
270
- const { loadAppSettings } = await import("./app-settings-2IH42VA5.js");
271
- const { loginEnvPrefix } = await import("./managed-accounts-46A4KRUE.js");
270
+ const { loadAppSettings } = await import("./app-settings-CC65VPBL.js");
271
+ const { loginEnvPrefix } = await import("./managed-accounts-PITLFLKU.js");
272
272
  const account = loadAppSettings().accounts.accounts.find((a) => a.id === accountId);
273
273
  if (!account) {
274
274
  return { ok: false, message: `Account not found: ${accountId}` };