@sideboard-ai/core 0.1.168 → 0.1.170

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 (35) hide show
  1. package/dist/{abletime-BMS53RIZ.js → abletime-ESVTHTFH.js} +2 -2
  2. package/dist/{abletime-AGF54TNA.js → abletime-IC2V7CNB.js} +2 -2
  3. package/dist/{agents-TSO4MB3X.js → agents-GOBVOXFG.js} +9 -9
  4. package/dist/{agents-KWJXZAHB.js → agents-ZCIMZHXZ.js} +9 -9
  5. package/dist/{app-settings-BRLZQA7N.js → app-settings-LF3TS7XS.js} +5 -1
  6. package/dist/{app-settings-JJQDWPEK.js → app-settings-VMOTQORT.js} +5 -1
  7. package/dist/{chunk-74TWOSQP.js → chunk-3C4B52TS.js} +78 -42
  8. package/dist/{chunk-CVZ4KXVP.js → chunk-7IUO67CW.js} +122 -2
  9. package/dist/{chunk-HSGSQA42.js → chunk-DHPZW2EA.js} +8 -34
  10. package/dist/{chunk-KJFFQAMA.js → chunk-DKLGWRWC.js} +1 -1
  11. package/dist/{chunk-NYMFNUT5.js → chunk-GQHVICNT.js} +194 -147
  12. package/dist/{chunk-ILXKJ4ZD.js → chunk-NB7TEKCF.js} +1 -1
  13. package/dist/{chunk-RS756MKF.js → chunk-P2VCMIZU.js} +8 -34
  14. package/dist/{chunk-UIR4VDYA.js → chunk-SAZIRJR4.js} +30 -10
  15. package/dist/{chunk-UVLPL2FJ.js → chunk-TEI72FYD.js} +198 -216
  16. package/dist/{chunk-3A54S244.js → chunk-UDEWGTP6.js} +29 -10
  17. package/dist/{chunk-TW5A2HFY.js → chunk-Y7DJA3UW.js} +78 -42
  18. package/dist/{chunk-LTXS26K5.js → chunk-YMF5WCIA.js} +122 -2
  19. package/dist/{coordinator-prompt-75N74HAO.js → coordinator-prompt-JTDCEU74.js} +3 -3
  20. package/dist/{coordinator-prompt-Y372QRFE.js → coordinator-prompt-RRUU2OYO.js} +3 -3
  21. package/dist/{global-workspace-JNNFVSP7.js → global-workspace-4SI3CRRT.js} +3 -3
  22. package/dist/{global-workspace-TPE4LKVM.js → global-workspace-ZF6EJAM3.js} +3 -3
  23. package/dist/index.cjs +421 -278
  24. package/dist/index.d.cts +135 -37
  25. package/dist/index.d.ts +135 -37
  26. package/dist/index.js +33 -19
  27. package/dist/mcp/run-stdio.cjs +401 -207
  28. package/dist/mcp/run-stdio.js +8 -8
  29. package/dist/{orchestrator-XG3QCMOS.js → orchestrator-LE6L6MJC.js} +5 -5
  30. package/dist/{orchestrator-IIME6KXQ.js → orchestrator-UZSFTDKA.js} +5 -5
  31. package/dist/{workspaces-2IGQNFPL.js → workspaces-A7C3WA54.js} +3 -3
  32. package/dist/{workspaces-BWZSDSGG.js → workspaces-NOC2MWQV.js} +3 -3
  33. package/dist/{worktree-7X7XNSYL.js → worktree-GXO2VDQF.js} +12 -4
  34. package/dist/{worktree-5BFEK6PF.js → worktree-PODE23PD.js} +12 -4
  35. package/package.json +1 -1
@@ -11,13 +11,13 @@ import {
11
11
  } from "./chunk-S42XV45P.js";
12
12
  import {
13
13
  isOrchestratorThread
14
- } from "./chunk-RS756MKF.js";
14
+ } from "./chunk-P2VCMIZU.js";
15
15
  import {
16
16
  codexUnattendedGitConfigArgs,
17
17
  mergeAgentGitAuthEnv,
18
18
  resolveAgentGitAuthEnv,
19
19
  resolveCodexGitWritableRoots
20
- } from "./chunk-TW5A2HFY.js";
20
+ } from "./chunk-Y7DJA3UW.js";
21
21
  import {
22
22
  enrichPathWithNpmGlobalBin,
23
23
  isConductorBundledCli,
@@ -35,7 +35,7 @@ import {
35
35
  resolveClaudeExecutable,
36
36
  unwrapStrippedElectronLaunch,
37
37
  wrapElectronAsNodeLaunch
38
- } from "./chunk-LTXS26K5.js";
38
+ } from "./chunk-YMF5WCIA.js";
39
39
  import {
40
40
  appDataDir
41
41
  } from "./chunk-JTJHOYCU.js";
@@ -450,22 +450,38 @@ function formatTurnExitError(exitCode, stderrSummary) {
450
450
  // src/agents/turn-input.ts
451
451
  function normalizeTurnInput(input) {
452
452
  if (typeof input === "string") return { prompt: input };
453
- return { prompt: input.prompt, cachedPrefix: input.cachedPrefix?.trim() || void 0 };
453
+ return {
454
+ prompt: input.prompt,
455
+ cachedPrefix: input.cachedPrefix?.trim() || void 0,
456
+ systemPrompt: input.systemPrompt?.trim() || void 0
457
+ };
454
458
  }
455
459
  function dropCachedPrefixOnResume(input, sessionId) {
456
460
  const turn = normalizeTurnInput(input);
457
- if (sessionId) return { prompt: turn.prompt };
461
+ if (sessionId) {
462
+ return turn.systemPrompt ? { prompt: turn.prompt, systemPrompt: turn.systemPrompt } : { prompt: turn.prompt };
463
+ }
458
464
  return turn;
459
465
  }
460
466
  function flattenTurnInput(input) {
461
- const { cachedPrefix, prompt } = normalizeTurnInput(input);
462
- if (!cachedPrefix) return prompt;
463
- return `${cachedPrefix}
467
+ const { cachedPrefix, prompt, systemPrompt } = normalizeTurnInput(input);
468
+ if (cachedPrefix) return `${cachedPrefix}
464
469
 
465
470
  ---
466
471
 
467
472
  Current request:
468
473
  ${prompt}`;
474
+ if (systemPrompt) return `${systemPrompt}
475
+
476
+ ${prompt}`;
477
+ return prompt;
478
+ }
479
+ function splitTurnInputForSystemPrompt(input) {
480
+ const turn = normalizeTurnInput(input);
481
+ return {
482
+ promptText: flattenTurnInput({ cachedPrefix: turn.cachedPrefix, prompt: turn.prompt }),
483
+ systemPrompt: turn.systemPrompt
484
+ };
469
485
  }
470
486
 
471
487
  // src/agents/brightsy.ts
@@ -2192,7 +2208,7 @@ var claudeAdapter = {
2192
2208
  const claude = resolveClaudeExecutable();
2193
2209
  const sessionId = await this.resolveSessionId(thread.worktreePath, thread.sessionId);
2194
2210
  const effective = dropCachedPrefixOnResume(input, sessionId);
2195
- const promptText = flattenTurnInput(effective);
2211
+ const { promptText, systemPrompt } = splitTurnInputForSystemPrompt(effective);
2196
2212
  const useStdin = promptText.length > CLAUDE_PROMPT_ARG_MAX;
2197
2213
  if (process.env.SIDEBOARD_DEBUG_CLAUDE_TURN === "1") {
2198
2214
  console.error(
@@ -2200,7 +2216,7 @@ var claudeAdapter = {
2200
2216
  );
2201
2217
  }
2202
2218
  const mode = permissionMode(thread);
2203
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-JNNFVSP7.js");
2219
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-4SI3CRRT.js");
2204
2220
  const isOrchestrator = isOrchestratorThread2(thread);
2205
2221
  const injectedServers = await buildInjectedMcpServers({
2206
2222
  includeSideboard: true,
@@ -2244,6 +2260,9 @@ var claudeAdapter = {
2244
2260
  "--permission-mode",
2245
2261
  mode.claude
2246
2262
  ];
2263
+ if (systemPrompt) {
2264
+ args.push("--append-system-prompt", systemPrompt);
2265
+ }
2247
2266
  const mcpConfigPath = writeMcpServersConfig(injectedServers);
2248
2267
  if (mcpConfigPath) {
2249
2268
  args.push("--mcp-config", mcpConfigPath);
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  getGithubGitAuthMode,
24
24
  getGithubPat
25
- } from "./chunk-LTXS26K5.js";
25
+ } from "./chunk-YMF5WCIA.js";
26
26
  import {
27
27
  worktreesRoot
28
28
  } from "./chunk-JTJHOYCU.js";
@@ -738,8 +738,10 @@ function lookupSoccerTeam(titleOrSlug) {
738
738
  }
739
739
  function teamNameFromSlug(slug) {
740
740
  const normalized = slug.toLowerCase().replace(/^thread\//, "");
741
- const suffixMatch = normalized.match(/^(.+)-(\d+)$/);
742
- const base = suffixMatch?.[1] ?? normalized;
741
+ const withoutTicket = normalized.replace(/^[a-z]{2,8}-\d{1,6}-/, "").replace(/^\d{1,8}-/, "");
742
+ const lookup = withoutTicket || normalized;
743
+ const suffixMatch = lookup.match(/^(.+)-(\d+)$/);
744
+ const base = suffixMatch?.[1] ?? lookup;
743
745
  const suffix = suffixMatch?.[2];
744
746
  const team = FAMOUS_SOCCER_TEAM_SEEDS.find((t) => t.slug === base);
745
747
  if (team) return suffix ? `${team.name} ${suffix}` : team.name;
@@ -815,6 +817,25 @@ function worktreeNameFromPath(worktreePath) {
815
817
  const parts = normalized.split("/");
816
818
  return parts[parts.length - 1] || worktreePath;
817
819
  }
820
+ function ticketSlugForBranch(sourceRef) {
821
+ const raw = sourceRef.trim();
822
+ if (!raw) return null;
823
+ const linear = raw.match(/\b([A-Za-z]{2,8}-\d{1,6})\b/);
824
+ if (linear) return linear[1].toLowerCase();
825
+ const hashed = raw.match(/^#(\d{1,8})$/);
826
+ if (hashed) return hashed[1];
827
+ const digits = raw.match(/^(\d{1,8})$/);
828
+ if (digits) return digits[1];
829
+ const slug = raw.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 48);
830
+ return slug || null;
831
+ }
832
+ function worktreeSlugForTicket(ticketRef, teamSlug) {
833
+ const ticket = ticketSlugForBranch(ticketRef);
834
+ const team = teamSlug.trim().replace(/^thread\//, "");
835
+ if (!ticket) return team;
836
+ if (!team) return ticket;
837
+ return `${ticket}-${team}`;
838
+ }
818
839
  function isPlaceholderBranch(branchName, worktreePath) {
819
840
  const branch = branchName.trim();
820
841
  if (!branch || branch === "HEAD") return true;
@@ -2356,48 +2377,35 @@ async function getPrMeta(cwd, selector) {
2356
2377
  return null;
2357
2378
  }
2358
2379
  }
2359
- async function getPrDetails(cwd, selector) {
2360
- const slug = await resolveGithubRepoSlug(cwd);
2361
- const viewArgs = [
2362
- "pr",
2363
- "view",
2364
- selector,
2365
- "--json",
2366
- [
2367
- "number",
2368
- "title",
2369
- "body",
2370
- "url",
2371
- "state",
2372
- "isDraft",
2373
- "reviewDecision",
2374
- "author",
2375
- "baseRefName",
2376
- "headRefName",
2377
- "additions",
2378
- "deletions",
2379
- "changedFiles",
2380
- "comments",
2381
- "reviews"
2382
- ].join(",")
2383
- ];
2384
- if (slug) viewArgs.push("--repo", slug);
2385
- const { stdout, exitCode, stderr } = await gh(viewArgs, cwd, { reject: false });
2386
- if (exitCode !== 0 || !stdout.trim()) {
2387
- if (stderr.trim()) {
2388
- if (/no pull requests found/i.test(stderr)) return null;
2389
- }
2390
- return null;
2391
- }
2392
- let view;
2393
- try {
2394
- view = JSON.parse(stdout);
2395
- } catch {
2396
- throw new Error(stderr.trim() || "gh pr view returned invalid JSON");
2397
- }
2380
+ var PR_DETAILS_JSON_FIELDS = [
2381
+ "number",
2382
+ "title",
2383
+ "body",
2384
+ "url",
2385
+ "state",
2386
+ "isDraft",
2387
+ "reviewDecision",
2388
+ "author",
2389
+ "baseRefName",
2390
+ "headRefName",
2391
+ "additions",
2392
+ "deletions",
2393
+ "changedFiles",
2394
+ "comments",
2395
+ "reviews",
2396
+ "assignees",
2397
+ "labels",
2398
+ "reviewRequests"
2399
+ ].join(",");
2400
+ function parsePrDetailsView(view) {
2398
2401
  const author = view.author ?? {};
2399
2402
  const comments = Array.isArray(view.comments) ? view.comments : [];
2400
2403
  const reviews = Array.isArray(view.reviews) ? view.reviews : [];
2404
+ const requested = {
2405
+ ids: reviewerIdentities(view.reviewRequests),
2406
+ users: humanReviewerLogins(view.reviewRequests),
2407
+ teams: teamReviewerSlugs(view.reviewRequests)
2408
+ };
2401
2409
  return {
2402
2410
  number: Number(view.number),
2403
2411
  title: String(view.title ?? ""),
@@ -2433,10 +2441,34 @@ async function getPrDetails(cwd, selector) {
2433
2441
  submittedAt: normalizeGhTime(row.submittedAt)
2434
2442
  };
2435
2443
  }),
2444
+ assignees: reviewerIdentities(view.assignees),
2445
+ labels: labelNames(view.labels),
2446
+ reviewRequests: requested.ids,
2447
+ reviewers: requested.users,
2448
+ teams: requested.teams,
2436
2449
  // CI lives in Checks tab via getPrChecks — nesting burned GraphQL points.
2437
2450
  checks: []
2438
2451
  };
2439
2452
  }
2453
+ async function getPrDetails(cwd, selector) {
2454
+ const slug = await resolveGithubRepoSlug(cwd);
2455
+ const viewArgs = ["pr", "view", selector, "--json", PR_DETAILS_JSON_FIELDS];
2456
+ if (slug) viewArgs.push("--repo", slug);
2457
+ const { stdout, exitCode, stderr } = await gh(viewArgs, cwd, { reject: false });
2458
+ if (exitCode !== 0 || !stdout.trim()) {
2459
+ if (stderr.trim()) {
2460
+ if (/no pull requests found/i.test(stderr)) return null;
2461
+ }
2462
+ return null;
2463
+ }
2464
+ let view;
2465
+ try {
2466
+ view = JSON.parse(stdout);
2467
+ } catch {
2468
+ throw new Error(stderr.trim() || "gh pr view returned invalid JSON");
2469
+ }
2470
+ return parsePrDetailsView(view);
2471
+ }
2440
2472
  async function fetchPrHead(repoPath, number, localBranch) {
2441
2473
  const slug = await resolveGithubRepoSlug(repoPath);
2442
2474
  const refspec = `+pull/${number}/head:${localBranch}`;
@@ -3156,6 +3188,8 @@ export {
3156
3188
  allocateTeamName,
3157
3189
  normalizeWorktreePath,
3158
3190
  worktreeNameFromPath,
3191
+ ticketSlugForBranch,
3192
+ worktreeSlugForTicket,
3159
3193
  isPlaceholderBranch,
3160
3194
  branchDisplayLabel,
3161
3195
  threadDisplayLabel,
@@ -3197,6 +3231,8 @@ export {
3197
3231
  detectLocalMergeConflicts,
3198
3232
  getPrChecks,
3199
3233
  getPrMeta,
3234
+ PR_DETAILS_JSON_FIELDS,
3235
+ parsePrDetailsView,
3200
3236
  getPrDetails,
3201
3237
  fetchPrHead,
3202
3238
  resolveWorktreeStartPoint,
@@ -17,6 +17,30 @@ import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
17
17
  import { homedir, hostname } from "os";
18
18
  import { join as join2 } from "path";
19
19
 
20
+ // src/agents/orchestrator-capable.ts
21
+ var ORCHESTRATOR_AGENT_KINDS = [
22
+ "claude",
23
+ "codex",
24
+ "opencode",
25
+ "cursor"
26
+ ];
27
+ function isOrchestratorCapableAgent(agent) {
28
+ return Boolean(
29
+ agent && ORCHESTRATOR_AGENT_KINDS.includes(agent)
30
+ );
31
+ }
32
+ function assertOrchestratorCapableAgent(agent, context = "orchestration") {
33
+ if (!isOrchestratorCapableAgent(agent)) {
34
+ throw new Error(
35
+ `${agent} cannot run ${context} \u2014 it does not support Sideboard MCP. Use Claude, Cursor, Codex, or OpenCode.`
36
+ );
37
+ }
38
+ return agent;
39
+ }
40
+ function coerceOrchestratorAgent(agent, fallback = "claude") {
41
+ return isOrchestratorCapableAgent(agent) ? agent : fallback;
42
+ }
43
+
20
44
  // src/hook/nested-electron-env.ts
21
45
  var NESTED_ELECTRON_ENV_PREFIXES = ["ELECTRON_", "CHROME_"];
22
46
  function isNestedElectronEnvKey(key) {
@@ -631,6 +655,25 @@ function normalizeIntegrations(raw) {
631
655
  }
632
656
  return out;
633
657
  }
658
+ function normalizeOrchestratorDefaults(raw) {
659
+ if (!raw || typeof raw !== "object") return void 0;
660
+ const source = raw;
661
+ const out = {};
662
+ if (typeof source.agent === "string" && isOrchestratorCapableAgent(source.agent)) {
663
+ out.agent = source.agent;
664
+ }
665
+ if (typeof source.model === "string") {
666
+ const model = source.model.trim();
667
+ if (model) out.model = model;
668
+ }
669
+ if (normalizeThinkingEffort(source.effort)) {
670
+ out.effort = normalizeThinkingEffort(source.effort);
671
+ }
672
+ if (typeof source.fast === "boolean") {
673
+ out.fast = source.fast;
674
+ }
675
+ return Object.keys(out).length > 0 ? out : void 0;
676
+ }
634
677
  function normalizeDefaults(raw) {
635
678
  if (!raw || typeof raw !== "object") return {};
636
679
  const source = raw;
@@ -650,6 +693,8 @@ function normalizeDefaults(raw) {
650
693
  }
651
694
  const notes = foldLegacyRolesIntoNotes(source.roles, source.role, source.notes);
652
695
  if (notes) out.notes = notes;
696
+ const orchestrator = normalizeOrchestratorDefaults(source.orchestrator);
697
+ if (orchestrator) out.orchestrator = orchestrator;
653
698
  return out;
654
699
  }
655
700
  function profileRepoKey(path) {
@@ -1204,6 +1249,39 @@ function updateIntegrationsSettings(patch) {
1204
1249
  }
1205
1250
  return saveAppSettings({ ...current, integrations });
1206
1251
  }
1252
+ function applyOrchestratorDefaultsPatch(current, patch) {
1253
+ const next = { ...current };
1254
+ if ("agent" in patch) {
1255
+ if (patch.agent == null) {
1256
+ delete next.agent;
1257
+ } else if (isOrchestratorCapableAgent(patch.agent)) {
1258
+ next.agent = patch.agent;
1259
+ }
1260
+ }
1261
+ if ("model" in patch) {
1262
+ if (patch.model == null || patch.model.trim() === "") {
1263
+ delete next.model;
1264
+ } else {
1265
+ next.model = patch.model.trim();
1266
+ }
1267
+ }
1268
+ if ("effort" in patch) {
1269
+ if (patch.effort == null) {
1270
+ delete next.effort;
1271
+ } else {
1272
+ const effort = normalizeThinkingEffort(patch.effort);
1273
+ if (effort) next.effort = effort;
1274
+ }
1275
+ }
1276
+ if ("fast" in patch) {
1277
+ if (patch.fast == null) {
1278
+ delete next.fast;
1279
+ } else {
1280
+ next.fast = Boolean(patch.fast);
1281
+ }
1282
+ }
1283
+ return Object.keys(next).length > 0 ? next : void 0;
1284
+ }
1207
1285
  function updateDefaultsSettings(patch) {
1208
1286
  const current = loadAppSettings();
1209
1287
  const defaults = { ...current.defaults };
@@ -1241,6 +1319,18 @@ function updateDefaultsSettings(patch) {
1241
1319
  if (!notes) delete defaults.notes;
1242
1320
  else defaults.notes = notes;
1243
1321
  }
1322
+ if ("orchestrator" in patch) {
1323
+ if (patch.orchestrator == null) {
1324
+ delete defaults.orchestrator;
1325
+ } else {
1326
+ const orchestrator = applyOrchestratorDefaultsPatch(
1327
+ defaults.orchestrator,
1328
+ patch.orchestrator
1329
+ );
1330
+ if (orchestrator) defaults.orchestrator = orchestrator;
1331
+ else delete defaults.orchestrator;
1332
+ }
1333
+ }
1244
1334
  delete defaults.roles;
1245
1335
  delete defaults.role;
1246
1336
  return saveAppSettings({ ...current, defaults });
@@ -1348,8 +1438,22 @@ function resolveThreadDefaults(settings = loadAppSettings()) {
1348
1438
  fast: getDefaultFast(settings)
1349
1439
  };
1350
1440
  }
1351
- function resolveNewThreadOptions(overrides = {}, settings = loadAppSettings()) {
1352
- const defaults = resolveThreadDefaults(settings);
1441
+ function resolveOrchestratorDefaults(settings = loadAppSettings()) {
1442
+ const account = resolveThreadDefaults(settings);
1443
+ const orch = settings.defaults.orchestrator;
1444
+ const agent = coerceOrchestratorAgent(orch?.agent ?? account.agent);
1445
+ let model = orch ? orch.model?.trim() || null : account.model;
1446
+ if (model && agent !== "cursor" && /^(default|auto)$/i.test(model.trim())) {
1447
+ model = null;
1448
+ }
1449
+ return {
1450
+ agent,
1451
+ model,
1452
+ effort: orch?.effort ?? account.effort,
1453
+ fast: orch?.fast ?? account.fast
1454
+ };
1455
+ }
1456
+ function mergeThreadOptionOverrides(defaults, overrides) {
1353
1457
  const effort = overrides.effort === void 0 || overrides.effort === null ? defaults.effort : normalizeThinkingEffort(overrides.effort) ?? defaults.effort;
1354
1458
  const agent = overrides.agent ?? defaults.agent;
1355
1459
  let model = overrides.model === void 0 ? defaults.model : overrides.model?.trim() || null;
@@ -1363,6 +1467,12 @@ function resolveNewThreadOptions(overrides = {}, settings = loadAppSettings()) {
1363
1467
  fast: overrides.fast === void 0 || overrides.fast === null ? defaults.fast : Boolean(overrides.fast)
1364
1468
  };
1365
1469
  }
1470
+ function resolveNewThreadOptions(overrides = {}, settings = loadAppSettings()) {
1471
+ return mergeThreadOptionOverrides(resolveThreadDefaults(settings), overrides);
1472
+ }
1473
+ function resolveNewOrchestratorOptions(overrides = {}, settings = loadAppSettings()) {
1474
+ return mergeThreadOptionOverrides(resolveOrchestratorDefaults(settings), overrides);
1475
+ }
1366
1476
  function isLinearConnected(settings = loadAppSettings()) {
1367
1477
  return hasLinearCredentials(settings.integrations);
1368
1478
  }
@@ -1484,6 +1594,10 @@ function brightsyInjectWorktreeMcpEnabled(settings = loadAppSettings()) {
1484
1594
  }
1485
1595
  function brightsyCloudConnectAgent(settings = loadAppSettings()) {
1486
1596
  const fallback = settings.brightsy.cloudConnectAgent && CLOUD_CONNECT_AGENTS.has(settings.brightsy.cloudConnectAgent) ? settings.brightsy.cloudConnectAgent : "claude";
1597
+ const orchAgent = settings.defaults.orchestrator?.agent;
1598
+ if (orchAgent && CLOUD_CONNECT_AGENTS.has(orchAgent)) {
1599
+ return orchAgent;
1600
+ }
1487
1601
  const preferred = getDefaultAgent(settings);
1488
1602
  if (CLOUD_CONNECT_AGENTS.has(preferred)) {
1489
1603
  return preferred;
@@ -1703,6 +1817,10 @@ export {
1703
1817
  readSecureJson,
1704
1818
  writeSecureJson,
1705
1819
  isSecureFileEncrypted,
1820
+ ORCHESTRATOR_AGENT_KINDS,
1821
+ isOrchestratorCapableAgent,
1822
+ assertOrchestratorCapableAgent,
1823
+ coerceOrchestratorAgent,
1706
1824
  PROFILE_NOTES_MAX,
1707
1825
  foldLegacyRolesIntoNotes,
1708
1826
  resolveAccountProfile,
@@ -1741,7 +1859,9 @@ export {
1741
1859
  readViewerContext,
1742
1860
  writeViewerContext,
1743
1861
  resolveThreadDefaults,
1862
+ resolveOrchestratorDefaults,
1744
1863
  resolveNewThreadOptions,
1864
+ resolveNewOrchestratorOptions,
1745
1865
  isLinearConnected,
1746
1866
  saveLinearOAuth,
1747
1867
  disconnectLinearConnection,
@@ -7,10 +7,10 @@ import {
7
7
  enrichWorkspacesWithGithub,
8
8
  ensureGlobalCoordinatorCwd,
9
9
  formatWorkspaceInventory
10
- } from "./chunk-HSGSQA42.js";
11
- import "./chunk-74TWOSQP.js";
10
+ } from "./chunk-DHPZW2EA.js";
11
+ import "./chunk-3C4B52TS.js";
12
12
  import "./chunk-6K64FJDD.js";
13
- import "./chunk-CVZ4KXVP.js";
13
+ import "./chunk-7IUO67CW.js";
14
14
  import "./chunk-4TR3HZFT.js";
15
15
  import "./chunk-JT7R45JB.js";
16
16
  import "./chunk-7UURXPKD.js";
@@ -9,13 +9,13 @@ import {
9
9
  enrichWorkspacesWithGithub,
10
10
  ensureGlobalCoordinatorCwd,
11
11
  formatWorkspaceInventory
12
- } from "./chunk-RS756MKF.js";
13
- import "./chunk-TW5A2HFY.js";
12
+ } from "./chunk-P2VCMIZU.js";
13
+ import "./chunk-Y7DJA3UW.js";
14
14
  import "./chunk-D6JWYJ4P.js";
15
15
  import "./chunk-LZQULFIT.js";
16
16
  import "./chunk-SYFVUF2C.js";
17
17
  import "./chunk-FNQNJOHY.js";
18
- import "./chunk-LTXS26K5.js";
18
+ import "./chunk-YMF5WCIA.js";
19
19
  import "./chunk-NSTQ6QKD.js";
20
20
  import "./chunk-KGZBYWZ3.js";
21
21
  import "./chunk-JTJHOYCU.js";
@@ -17,13 +17,13 @@ import {
17
17
  orchestratorSessionPoisonedByBuiltins,
18
18
  slackCoordinatorSourceRef,
19
19
  takenTeamSlugsForOrchestration
20
- } from "./chunk-RS756MKF.js";
21
- import "./chunk-TW5A2HFY.js";
20
+ } from "./chunk-P2VCMIZU.js";
21
+ import "./chunk-Y7DJA3UW.js";
22
22
  import "./chunk-D6JWYJ4P.js";
23
23
  import "./chunk-LZQULFIT.js";
24
24
  import "./chunk-SYFVUF2C.js";
25
25
  import "./chunk-FNQNJOHY.js";
26
- import "./chunk-LTXS26K5.js";
26
+ import "./chunk-YMF5WCIA.js";
27
27
  import "./chunk-NSTQ6QKD.js";
28
28
  import "./chunk-KGZBYWZ3.js";
29
29
  import {
@@ -15,10 +15,10 @@ import {
15
15
  orchestratorSessionPoisonedByBuiltins,
16
16
  slackCoordinatorSourceRef,
17
17
  takenTeamSlugsForOrchestration
18
- } from "./chunk-HSGSQA42.js";
19
- import "./chunk-74TWOSQP.js";
18
+ } from "./chunk-DHPZW2EA.js";
19
+ import "./chunk-3C4B52TS.js";
20
20
  import "./chunk-6K64FJDD.js";
21
- import "./chunk-CVZ4KXVP.js";
21
+ import "./chunk-7IUO67CW.js";
22
22
  import "./chunk-4TR3HZFT.js";
23
23
  import "./chunk-JT7R45JB.js";
24
24
  import "./chunk-7UURXPKD.js";