@sideboard-ai/core 0.1.313 → 0.1.315
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.
- package/dist/{abletime-SJUVZVRU.js → abletime-QK3KMRQD.js} +4 -4
- package/dist/{abletime-T5YSJLNZ.js → abletime-QQZWYJXC.js} +4 -4
- package/dist/{abletime-oauth-73TFJME4.js → abletime-oauth-CAHTMB4V.js} +3 -3
- package/dist/{abletime-oauth-2TOOZ2FN.js → abletime-oauth-I2RRPVKT.js} +3 -3
- package/dist/{abletime-rest-PNUGH2FS.js → abletime-rest-5V4KGMSY.js} +3 -3
- package/dist/{abletime-rest-5TDRIFEV.js → abletime-rest-W5TLQK7C.js} +3 -3
- package/dist/{agents-OHIE3Z7L.js → agents-5XJ7EHGU.js} +6 -6
- package/dist/{agents-PSNWJMEC.js → agents-Y3M3EKLY.js} +6 -6
- package/dist/{app-settings-CC65VPBL.js → app-settings-CZVFMOI5.js} +3 -1
- package/dist/{app-settings-DZ5AY7N5.js → app-settings-RQAFJZCD.js} +3 -1
- package/dist/{chunk-EGTCXNQM.js → chunk-53OCOGND.js} +2 -2
- package/dist/{chunk-DLGGLV2M.js → chunk-5CTG5W7S.js} +2 -2
- package/dist/{chunk-JARCAPKL.js → chunk-72OWKHFJ.js} +3 -3
- package/dist/{chunk-CW4FIIDE.js → chunk-7J2KOIYD.js} +3 -3
- package/dist/{chunk-U3J2YY4T.js → chunk-BMORGDYI.js} +48 -28
- package/dist/{chunk-BIPXOHZI.js → chunk-BPBDGJ43.js} +2 -2
- package/dist/{chunk-HG25AYBV.js → chunk-CHUPIJP7.js} +14 -0
- package/dist/{chunk-E2NJ6RH7.js → chunk-CYPFOIUK.js} +47 -27
- package/dist/{chunk-JWW66PO3.js → chunk-DV6ID6CK.js} +5 -5
- package/dist/{chunk-2JOBQUUS.js → chunk-FVTR54LY.js} +120 -56
- package/dist/{chunk-PHMFAU35.js → chunk-GCHSJCCX.js} +96 -64
- package/dist/{chunk-5QX2NYXL.js → chunk-GFM63DTU.js} +12 -9
- package/dist/{chunk-QC2TQMPJ.js → chunk-IODJCVMN.js} +5 -5
- package/dist/{chunk-CFTOKVQN.js → chunk-JRZTJ4F7.js} +5 -5
- package/dist/{chunk-62ESCTJ4.js → chunk-MBYGWNLQ.js} +3 -3
- package/dist/{chunk-OLSLE3LO.js → chunk-MKGSMPWB.js} +3 -3
- package/dist/{chunk-TDXORDN6.js → chunk-NKVNHBDB.js} +119 -55
- package/dist/{chunk-U4WACWBC.js → chunk-NXNNYY3Q.js} +2 -2
- package/dist/{chunk-SZ3XS2WM.js → chunk-NZVD5EVX.js} +2 -2
- package/dist/{chunk-WRZRX4Q7.js → chunk-OLYNM52B.js} +4 -4
- package/dist/{chunk-X3FSWWW2.js → chunk-PN32Z4JL.js} +12 -9
- package/dist/{chunk-RU6DTCCV.js → chunk-S3U4HR5F.js} +2 -2
- package/dist/{chunk-3UDRWMIM.js → chunk-U35AHE2P.js} +14 -0
- package/dist/{chunk-A2YXQC65.js → chunk-U7PNCYNX.js} +96 -64
- package/dist/{chunk-6424BACS.js → chunk-Y4WARKPW.js} +2 -2
- package/dist/{chunk-ZW7RSQHY.js → chunk-YR7NZYUT.js} +5 -5
- package/dist/{conductor-YOBSYPLT.js → conductor-DKWTQADV.js} +5 -5
- package/dist/{conductor-CTWR6NH4.js → conductor-IMKNYQWZ.js} +5 -5
- package/dist/{coordinator-prompt-GZCWQAAV.js → coordinator-prompt-HUZC4DZ2.js} +4 -4
- package/dist/{coordinator-prompt-YAZRQ4BI.js → coordinator-prompt-SPOYUZG5.js} +4 -4
- package/dist/{global-workspace-BZAVBOH3.js → global-workspace-3NNDDTFD.js} +4 -4
- package/dist/{global-workspace-H6X32IJZ.js → global-workspace-SK4JQBPN.js} +4 -4
- package/dist/index.cjs +285 -123
- package/dist/index.d.cts +84 -59
- package/dist/index.d.ts +84 -59
- package/dist/index.js +25 -21
- package/dist/mcp/run-stdio.cjs +280 -121
- package/dist/mcp/run-stdio.js +15 -14
- package/dist/{optional-cli-QDIT57VD.js → optional-cli-EMSZBYDE.js} +3 -3
- package/dist/{optional-cli-QY6V5S5N.js → optional-cli-LMSRZNH4.js} +4 -4
- package/dist/{orchestrator-BF7TKSA2.js → orchestrator-4XFRK57E.js} +9 -9
- package/dist/{orchestrator-RRHB7RNN.js → orchestrator-ZRMZ4TCL.js} +9 -9
- package/dist/{thread-store-HY22M5A7.js → thread-store-5OF6M6VZ.js} +1 -1
- package/dist/{thread-store-XMUQDO5O.js → thread-store-GOVVXQV2.js} +1 -1
- package/dist/{workspaces-BQUDYTBX.js → workspaces-52L6NZ3P.js} +4 -4
- package/dist/{workspaces-AGOLRBYZ.js → workspaces-EYNZDL45.js} +4 -4
- package/dist/{worktree-C5VI46RZ.js → worktree-BP5ICYQ2.js} +3 -3
- package/dist/{worktree-FMK57ULT.js → worktree-UCOSAI7J.js} +3 -3
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
formatOptionalServicesDirectiveForTurn,
|
|
8
8
|
formatOptionalServicesReminderForTurn
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MBYGWNLQ.js";
|
|
10
10
|
import {
|
|
11
11
|
extractPresentedPlan,
|
|
12
12
|
isPresentPlanToolName,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
parseSessionQuotaResetAt,
|
|
28
28
|
planModeTurnInstruction,
|
|
29
29
|
resolveQuotaFallbackAgent
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-FVTR54LY.js";
|
|
31
31
|
import {
|
|
32
32
|
REVIEW_TAB_TITLE,
|
|
33
33
|
applyWorktreePkgCacheEnv,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
worktreeDevProcessKey,
|
|
70
70
|
worktreeRunProcessKey,
|
|
71
71
|
worktreeSetupProcessKey
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-YR7NZYUT.js";
|
|
73
73
|
import {
|
|
74
74
|
applyAgentEvent,
|
|
75
75
|
clipAgentEventForPaint,
|
|
@@ -121,7 +121,7 @@ import {
|
|
|
121
121
|
stageAbsolutePathsAsAttachments,
|
|
122
122
|
stageBuffersAsAttachments,
|
|
123
123
|
syncWorkspacesFromThreads
|
|
124
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-PN32Z4JL.js";
|
|
125
125
|
import {
|
|
126
126
|
addPrStackLayer,
|
|
127
127
|
allocateTeamSlug,
|
|
@@ -163,7 +163,7 @@ import {
|
|
|
163
163
|
resolveRepoRoot,
|
|
164
164
|
switchWorktreeBranch,
|
|
165
165
|
withRepoGitLock
|
|
166
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-5CTG5W7S.js";
|
|
167
167
|
import {
|
|
168
168
|
clearStaleIndexLocks,
|
|
169
169
|
enrichPathWithNpmGlobalBin,
|
|
@@ -182,6 +182,7 @@ import {
|
|
|
182
182
|
followUpBehavior,
|
|
183
183
|
formatViewerContextDirective,
|
|
184
184
|
formatViewerContextReminder,
|
|
185
|
+
getDefaultAutonomy,
|
|
185
186
|
getIssueSource,
|
|
186
187
|
historyMaxCount,
|
|
187
188
|
historyMaxDays,
|
|
@@ -204,7 +205,7 @@ import {
|
|
|
204
205
|
usageOnLimit,
|
|
205
206
|
withTurnScopedCost,
|
|
206
207
|
writeViewerContext
|
|
207
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-GCHSJCCX.js";
|
|
208
209
|
import {
|
|
209
210
|
writePrivateFile
|
|
210
211
|
} from "./chunk-NSTQ6QKD.js";
|
|
@@ -241,7 +242,7 @@ import {
|
|
|
241
242
|
worktreeNameFromPath,
|
|
242
243
|
worktreeSlugForTicket,
|
|
243
244
|
writeThread
|
|
244
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-U35AHE2P.js";
|
|
245
246
|
import {
|
|
246
247
|
annotateDevAccessRuns,
|
|
247
248
|
appDataDir,
|
|
@@ -506,9 +507,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
|
|
|
506
507
|
`Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
|
|
507
508
|
);
|
|
508
509
|
}
|
|
509
|
-
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-
|
|
510
|
+
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-SK4JQBPN.js");
|
|
510
511
|
if (isGlobalThread2(thread)) {
|
|
511
|
-
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-
|
|
512
|
+
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-HUZC4DZ2.js");
|
|
512
513
|
ensureGlobalCoordinatorCwd2(
|
|
513
514
|
isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
|
|
514
515
|
);
|
|
@@ -2010,6 +2011,22 @@ async function requireAgent(agent, opts) {
|
|
|
2010
2011
|
return status;
|
|
2011
2012
|
}
|
|
2012
2013
|
|
|
2014
|
+
// src/board/issue-blocked-view.ts
|
|
2015
|
+
function issueBlockedByIds(group) {
|
|
2016
|
+
const out = [];
|
|
2017
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2018
|
+
for (const thread of group) {
|
|
2019
|
+
for (const raw of thread.issueBlockedBy ?? []) {
|
|
2020
|
+
const id = String(raw ?? "").trim();
|
|
2021
|
+
const key = id.toLowerCase();
|
|
2022
|
+
if (!id || seen.has(key)) continue;
|
|
2023
|
+
seen.add(key);
|
|
2024
|
+
out.push(id);
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
return out;
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2013
2030
|
// src/board/pr-state.ts
|
|
2014
2031
|
function isOpenPrState(prUrl, prState) {
|
|
2015
2032
|
if (!prUrl?.trim()) return false;
|
|
@@ -2417,6 +2434,7 @@ function toThreadCard(group) {
|
|
|
2417
2434
|
const thread = group[0];
|
|
2418
2435
|
const withPr = group.find((t) => t.prUrl?.trim()) ?? thread;
|
|
2419
2436
|
const tags = workspaceTagsFromGroup(group);
|
|
2437
|
+
const issueBlockedBy = issueBlockedByIds(group);
|
|
2420
2438
|
return {
|
|
2421
2439
|
kind: "thread",
|
|
2422
2440
|
id: thread.id,
|
|
@@ -2430,6 +2448,7 @@ function toThreadCard(group) {
|
|
|
2430
2448
|
link: `sideboard://chat/${thread.id}`,
|
|
2431
2449
|
...group.length > 1 ? { chatCount: group.length } : {},
|
|
2432
2450
|
...threadCardBlockFields(group) ?? {},
|
|
2451
|
+
...issueBlockedBy.length > 0 ? { issueBlockedBy } : {},
|
|
2433
2452
|
...tags.length > 0 ? { tags } : {}
|
|
2434
2453
|
};
|
|
2435
2454
|
}
|
|
@@ -2506,7 +2525,7 @@ function assembleHomeBoard(input) {
|
|
|
2506
2525
|
}
|
|
2507
2526
|
return { columns, hidden, totals };
|
|
2508
2527
|
}
|
|
2509
|
-
var HOME_BOARD_AGENT_HINT = "Home is a Kanban of workspaces (one card per checkout; sibling chats on a card are separate agents). Do not create a second workspace for a ticket, PR, or named branch that already has a live checkout \u2014 create_workspace / start_board_card return that checkout (alreadyStarted) and its chats. Add another agent with fork_chat. Creating from the default branch still opens a new isolated workspace. Columns are the path to merge: New (no PR) \u2192 Draft (draft PR) \u2192 Review (open PR) \u2192 Approved (approved, not merged) \u2192 Merged. ownership=mine is PRs you authored (or WIP with no PR); ownership=reviewing is someone else's PR (or a review-requested checkout). Viewer login comes from gh, not a setting. Archive removes the card to Settings \u2192 History (list_archive to browse, restore_workspace to bring it back). Queued/running are activity on the card, not columns. blockedReason means an agent on that card is waiting on a person (the question, plan approval, or a reported block) \u2014 read it and do not send_to_chat a check-in. Orchestration chats stay in the sidebar. Do not invent status.";
|
|
2528
|
+
var HOME_BOARD_AGENT_HINT = "Home is a Kanban of workspaces (one card per checkout; sibling chats on a card are separate agents). Do not create a second workspace for a ticket, PR, or named branch that already has a live checkout \u2014 create_workspace / start_board_card return that checkout (alreadyStarted) and its chats. Add another agent with fork_chat. Creating from the default branch still opens a new isolated workspace. Columns are the path to merge: New (no PR) \u2192 Draft (draft PR) \u2192 Review (open PR) \u2192 Approved (approved, not merged) \u2192 Merged. ownership=mine is PRs you authored (or WIP with no PR); ownership=reviewing is someone else's PR (or a review-requested checkout). Viewer login comes from gh, not a setting. Archive removes the card to Settings \u2192 History (list_archive to browse, restore_workspace to bring it back). Queued/running are activity on the card, not columns. blockedReason means an agent on that card is waiting on a person (the question, plan approval, or a reported block) \u2014 read it and do not send_to_chat a check-in. issueBlockedBy, when present, lists issues blocking that workspace's source ticket (the tracker dependency, not a person). Orchestration chats stay in the sidebar. Do not invent status.";
|
|
2510
2529
|
|
|
2511
2530
|
// src/threads/workspace-tags.ts
|
|
2512
2531
|
function workspaceTagTargetRef(opts) {
|
|
@@ -2608,11 +2627,12 @@ async function createThread(input, _onSetupLine) {
|
|
|
2608
2627
|
agent: input.agent,
|
|
2609
2628
|
model: input.model,
|
|
2610
2629
|
effort: input.effort,
|
|
2611
|
-
fast: input.fast
|
|
2630
|
+
fast: input.fast,
|
|
2631
|
+
autonomy: input.autonomy
|
|
2612
2632
|
});
|
|
2613
2633
|
await requireAgent(resolved.agent);
|
|
2614
2634
|
if (input.cowboy) {
|
|
2615
|
-
const { cowboyModeEnabled } = await import("./app-settings-
|
|
2635
|
+
const { cowboyModeEnabled } = await import("./app-settings-CZVFMOI5.js");
|
|
2616
2636
|
if (!cowboyModeEnabled()) {
|
|
2617
2637
|
throw new Error(
|
|
2618
2638
|
"Cowboy mode is off. Enable it in Settings \u2192 Advanced."
|
|
@@ -2647,7 +2667,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
2647
2667
|
worktreePath: repoPath,
|
|
2648
2668
|
repoPath,
|
|
2649
2669
|
agent: resolved.agent,
|
|
2650
|
-
autonomy:
|
|
2670
|
+
autonomy: resolved.autonomy,
|
|
2651
2671
|
model: resolved.model,
|
|
2652
2672
|
effort: resolved.effort,
|
|
2653
2673
|
fast: resolved.fast,
|
|
@@ -2671,7 +2691,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
2671
2691
|
let sourceIsFork = false;
|
|
2672
2692
|
if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
|
|
2673
2693
|
if (isAbleTimeConnected() && getIssueSource() === "abletime") {
|
|
2674
|
-
const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-
|
|
2694
|
+
const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-QK3KMRQD.js");
|
|
2675
2695
|
const task = await ensureAbleTimeTask({
|
|
2676
2696
|
title: title?.trim() || "Untitled work",
|
|
2677
2697
|
description: input.prompt?.trim() || void 0
|
|
@@ -2761,7 +2781,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
2761
2781
|
worktreePath,
|
|
2762
2782
|
repoPath,
|
|
2763
2783
|
agent: resolved.agent,
|
|
2764
|
-
autonomy:
|
|
2784
|
+
autonomy: resolved.autonomy,
|
|
2765
2785
|
model: resolved.model,
|
|
2766
2786
|
effort: resolved.effort,
|
|
2767
2787
|
fast: resolved.fast,
|
|
@@ -3544,7 +3564,7 @@ async function adoptThread(input) {
|
|
|
3544
3564
|
messages: input.messages ?? []
|
|
3545
3565
|
});
|
|
3546
3566
|
writeThread(thread);
|
|
3547
|
-
const { addWorkspace: addWorkspace2 } = await import("./workspaces-
|
|
3567
|
+
const { addWorkspace: addWorkspace2 } = await import("./workspaces-EYNZDL45.js");
|
|
3548
3568
|
await addWorkspace2(repoPath);
|
|
3549
3569
|
const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-5N2KTYIT.js");
|
|
3550
3570
|
await ensureWorktreeSideboardIgnored(input.worktreePath);
|
|
@@ -3836,7 +3856,7 @@ async function openStackLayer(input, _onSetupLine) {
|
|
|
3836
3856
|
worktreePath,
|
|
3837
3857
|
repoPath,
|
|
3838
3858
|
agent: input.agent,
|
|
3839
|
-
autonomy: input.autonomy ??
|
|
3859
|
+
autonomy: input.autonomy ?? getDefaultAutonomy(),
|
|
3840
3860
|
model: input.model ?? null,
|
|
3841
3861
|
effort: input.effort ?? "high",
|
|
3842
3862
|
fast: Boolean(input.fast),
|
|
@@ -5628,7 +5648,7 @@ function formatIssueToolsDirective(opts) {
|
|
|
5628
5648
|
if (!opts.linear && !opts.abletime && !github) return null;
|
|
5629
5649
|
const lines = [
|
|
5630
5650
|
"Issue tracking (Settings \u2192 Issues / Git \u2014 already signed in):",
|
|
5631
|
-
"- Use Sideboard `linear_*` / `github_*` / `abletime_*`
|
|
5651
|
+
"- Use Sideboard `linear_*` / `github_*` / `abletime_*` when that Account connection is set and the call works. If it is not set, or the Sideboard call fails because the connection is down, use the Claude connector for that service. Do not mention a Claude connector that failed to start (for example `mcp_github_github` or `plugin:github:github`) when the Sideboard connection is working. A vendor issue MCP that only needsAuth is noise \u2014 do not sign in to it while Sideboard covers that service."
|
|
5632
5652
|
];
|
|
5633
5653
|
if (opts.linear) {
|
|
5634
5654
|
lines.push(
|
|
@@ -5668,7 +5688,7 @@ function formatIssueToolsReminder(opts) {
|
|
|
5668
5688
|
].filter(Boolean);
|
|
5669
5689
|
const ticket = opts.ticketId?.trim();
|
|
5670
5690
|
const ticketBit = ticket ? ` This ticket: ${ticket}${opts.ticketProvider ? ` (${opts.ticketProvider})` : ""} \u2014 get; comment/update review findings only after they ask. Spin-offs use parent=.` : " get/comment/update/create (parent= for spin-offs).";
|
|
5671
|
-
return `Issues: Sideboard ${names.join(" / ")}
|
|
5691
|
+
return `Issues: Sideboard ${names.join(" / ")} when that Account connection works. If it is not set or the call fails, use the Claude connector. Do not mention a Claude connector startup failure when Sideboard covers it.${ticketBit} Review stays in chat \u2014 do not ask_user after it; they type next steps. Authors see comments immediately.`;
|
|
5672
5692
|
}
|
|
5673
5693
|
function formatPrGateDirective() {
|
|
5674
5694
|
return [
|
|
@@ -6438,7 +6458,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
6438
6458
|
${prompt}`;
|
|
6439
6459
|
}
|
|
6440
6460
|
async function defaultDeps() {
|
|
6441
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
6461
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-ZRMZ4TCL.js");
|
|
6442
6462
|
const orch = getOrchestrator2();
|
|
6443
6463
|
return {
|
|
6444
6464
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -6756,7 +6776,7 @@ var Orchestrator = class {
|
|
|
6756
6776
|
orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
|
|
6757
6777
|
});
|
|
6758
6778
|
}
|
|
6759
|
-
const { autoCleanupOrphansEnabled } = await import("./app-settings-
|
|
6779
|
+
const { autoCleanupOrphansEnabled } = await import("./app-settings-CZVFMOI5.js");
|
|
6760
6780
|
if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
|
|
6761
6781
|
await cleanupOrphanWorktrees({ repoPaths });
|
|
6762
6782
|
}
|
|
@@ -7150,7 +7170,7 @@ var Orchestrator = class {
|
|
|
7150
7170
|
}
|
|
7151
7171
|
await setup;
|
|
7152
7172
|
if (skipSetup) return;
|
|
7153
|
-
const { autoRunAfterSetupEnabled } = await import("./app-settings-
|
|
7173
|
+
const { autoRunAfterSetupEnabled } = await import("./app-settings-CZVFMOI5.js");
|
|
7154
7174
|
if (autoRunAfterSetupEnabled()) {
|
|
7155
7175
|
try {
|
|
7156
7176
|
await this.startDev(threadId);
|
|
@@ -7544,7 +7564,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
|
|
|
7544
7564
|
}
|
|
7545
7565
|
const isBrightsy = fresh.agent === "brightsy";
|
|
7546
7566
|
const isOrchestration = isOrchestratorThread(fresh);
|
|
7547
|
-
const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-
|
|
7567
|
+
const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-CZVFMOI5.js");
|
|
7548
7568
|
const gitAuthMode = getGithubGitAuthMode();
|
|
7549
7569
|
const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
|
|
7550
7570
|
githubSlug: await withTimeout(
|
|
@@ -8860,7 +8880,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
|
|
|
8860
8880
|
if (Object.keys(patch).length === 0) continue;
|
|
8861
8881
|
updateThread(t.id, patch);
|
|
8862
8882
|
}
|
|
8863
|
-
const { autoArchiveOnMergeEnabled } = await import("./app-settings-
|
|
8883
|
+
const { autoArchiveOnMergeEnabled } = await import("./app-settings-CZVFMOI5.js");
|
|
8864
8884
|
const latest = this.requireThread(thread.id);
|
|
8865
8885
|
if (!shouldAutoArchiveOnPrMerge({
|
|
8866
8886
|
previousPrState: prevState || null,
|
|
@@ -9184,7 +9204,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
|
|
|
9184
9204
|
await runArchiveScript(thread.repoPath, thread.worktreePath);
|
|
9185
9205
|
} catch {
|
|
9186
9206
|
}
|
|
9187
|
-
const { deleteBranchOnPurgeEnabled } = await import("./app-settings-
|
|
9207
|
+
const { deleteBranchOnPurgeEnabled } = await import("./app-settings-CZVFMOI5.js");
|
|
9188
9208
|
const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
|
|
9189
9209
|
await removeWorktree(thread.repoPath, thread.worktreePath, {
|
|
9190
9210
|
deleteBranch: deleteBranch ? thread.branchName : void 0
|
|
@@ -9320,7 +9340,7 @@ async function startOrchestration(opts) {
|
|
|
9320
9340
|
sourceRef: "default",
|
|
9321
9341
|
...createOpts
|
|
9322
9342
|
}).catch(async () => {
|
|
9323
|
-
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-
|
|
9343
|
+
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-UCOSAI7J.js");
|
|
9324
9344
|
const repo = await resolveRepoRoot2(repoPath);
|
|
9325
9345
|
const def = await resolveDefaultBranch2(repo);
|
|
9326
9346
|
return orch.createThread({
|
|
@@ -9330,7 +9350,7 @@ async function startOrchestration(opts) {
|
|
|
9330
9350
|
repoPath: repo
|
|
9331
9351
|
});
|
|
9332
9352
|
});
|
|
9333
|
-
const { updateThread: upd } = await import("./thread-store-
|
|
9353
|
+
const { updateThread: upd } = await import("./thread-store-GOVVXQV2.js");
|
|
9334
9354
|
const updated = upd(thread.id, {
|
|
9335
9355
|
sourceType: "orchestration",
|
|
9336
9356
|
sourceRef: goal
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getAbleTimeHost,
|
|
6
6
|
isAbleTimeConnected
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-U7PNCYNX.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-
|
|
156
|
+
const rawToken = opts?.token ?? await import("./abletime-oauth-CAHTMB4V.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-
|
|
227
|
+
const rawToken = opts?.token ?? await import("./abletime-oauth-CAHTMB4V.js").then((m) => m.ensureAbleTimeAccessToken());
|
|
228
228
|
if (rawToken && ableTimeUsesRest(rawToken)) {
|
|
229
|
-
const { callAbleTimeRestTool } = await import("./abletime-rest-
|
|
229
|
+
const { callAbleTimeRestTool } = await import("./abletime-rest-5V4KGMSY.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-
|
|
245
|
+
const { callAbleTimeRestTool } = await import("./abletime-rest-5V4KGMSY.js");
|
|
246
246
|
return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
|
|
247
247
|
}
|
|
248
248
|
throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
|
|
@@ -24,14 +24,15 @@ import {
|
|
|
24
24
|
} from "./chunk-I5TESHDN.js";
|
|
25
25
|
import {
|
|
26
26
|
isOrchestratorThread
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-PN32Z4JL.js";
|
|
28
28
|
import {
|
|
29
29
|
codexUnattendedGitConfigArgs,
|
|
30
30
|
mergeAgentGitAuthEnv,
|
|
31
31
|
resolveAgentGitAuthEnv,
|
|
32
32
|
resolveCodexGitWritableRoots
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-5CTG5W7S.js";
|
|
34
34
|
import {
|
|
35
|
+
githubAgentAuthReady,
|
|
35
36
|
npmGlobalNodeModules,
|
|
36
37
|
run
|
|
37
38
|
} from "./chunk-2UG25RMK.js";
|
|
@@ -44,7 +45,7 @@ import {
|
|
|
44
45
|
loadAppSettings,
|
|
45
46
|
resolveAgentExecutable,
|
|
46
47
|
resolveClaudeExecutable
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-GCHSJCCX.js";
|
|
48
49
|
import {
|
|
49
50
|
isElectronLikeCommand,
|
|
50
51
|
unwrapStrippedElectronLaunch,
|
|
@@ -56,7 +57,7 @@ import {
|
|
|
56
57
|
CLAUDE_POSTHOG_CONNECTOR_ALLOWED_TOOLS,
|
|
57
58
|
CLAUDE_PRINT_BG_WAIT_CEILING_MS,
|
|
58
59
|
mcpAllowToolsFromNames
|
|
59
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-U35AHE2P.js";
|
|
60
61
|
import {
|
|
61
62
|
appDataDir
|
|
62
63
|
} from "./chunk-WOU343SI.js";
|
|
@@ -448,6 +449,119 @@ var brightsyAdapter = {
|
|
|
448
449
|
// src/agents/claude.ts
|
|
449
450
|
import { existsSync as existsSync11 } from "fs";
|
|
450
451
|
|
|
452
|
+
// src/agents/claude-mcp-status.ts
|
|
453
|
+
var SIDEBOARD_CONNECTOR_SERVICES = [
|
|
454
|
+
"github",
|
|
455
|
+
"linear",
|
|
456
|
+
"posthog",
|
|
457
|
+
"vercel",
|
|
458
|
+
"supabase",
|
|
459
|
+
"sentry"
|
|
460
|
+
];
|
|
461
|
+
function mcpStatusThinkingFromClaudeInit(obj) {
|
|
462
|
+
const raw = obj.mcp_servers ?? obj.mcpServers;
|
|
463
|
+
const servers = [];
|
|
464
|
+
if (Array.isArray(raw)) {
|
|
465
|
+
for (const item of raw) {
|
|
466
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) continue;
|
|
467
|
+
const rec = item;
|
|
468
|
+
const name = typeof rec.name === "string" && rec.name.trim() || typeof rec.server === "string" && rec.server.trim() || "";
|
|
469
|
+
const status = typeof rec.status === "string" && rec.status.trim() || typeof rec.state === "string" && rec.state.trim() || "";
|
|
470
|
+
if (name) servers.push({ name, status: status || "unknown" });
|
|
471
|
+
}
|
|
472
|
+
} else if (raw && typeof raw === "object") {
|
|
473
|
+
for (const [name, value] of Object.entries(raw)) {
|
|
474
|
+
if (!name.trim()) continue;
|
|
475
|
+
if (typeof value === "string" && value.trim()) {
|
|
476
|
+
servers.push({ name, status: value.trim() });
|
|
477
|
+
continue;
|
|
478
|
+
}
|
|
479
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
480
|
+
const rec = value;
|
|
481
|
+
const status = typeof rec.status === "string" && rec.status.trim() || typeof rec.state === "string" && rec.state.trim() || "unknown";
|
|
482
|
+
servers.push({ name, status });
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
const coverage = claudeConnectorCoverage();
|
|
487
|
+
const sideboardOk = sideboardMcpOk(servers);
|
|
488
|
+
const notable = servers.filter(
|
|
489
|
+
(server) => isNotableMcpInitStatus(server, sideboardOk, coverage)
|
|
490
|
+
);
|
|
491
|
+
if (notable.length === 0) return null;
|
|
492
|
+
return `MCP: ${notable.map((s) => `${s.name} ${s.status}`).join(", ")}`;
|
|
493
|
+
}
|
|
494
|
+
function isCleanMcpConnect(status) {
|
|
495
|
+
return /^(connected|ok|ready|success)$/i.test(status.trim());
|
|
496
|
+
}
|
|
497
|
+
function isMcpAuthStatus(status) {
|
|
498
|
+
return /needs[_-]?auth|needs authentication|unauthorized|not authenticated|authrequired/i.test(
|
|
499
|
+
status
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
function isSideboardMcpName(name) {
|
|
503
|
+
return /^sideboard$/i.test(name.trim()) || /^mcp__sideboard$/i.test(name.trim());
|
|
504
|
+
}
|
|
505
|
+
function isVendorClaudeAiMcpName(name) {
|
|
506
|
+
return /^claude\.ai\b/i.test(name.trim()) || /^mcp__claude_ai_/i.test(name.trim());
|
|
507
|
+
}
|
|
508
|
+
function sideboardMcpOk(servers) {
|
|
509
|
+
const row = servers.find((server) => isSideboardMcpName(server.name));
|
|
510
|
+
return Boolean(row && isCleanMcpConnect(row.status));
|
|
511
|
+
}
|
|
512
|
+
function sideboardServiceForClaudeConnector(name) {
|
|
513
|
+
const raw = name.trim();
|
|
514
|
+
if (!raw || isSideboardMcpName(raw)) return null;
|
|
515
|
+
const pluginLike = /^(?:plugin[:_]|mcp__plugin_|claude\.ai\s|(?:mcp__)?claude_ai_)/i.test(raw);
|
|
516
|
+
const doubled = raw.match(/^mcp_([a-z0-9]+)_([a-z0-9]+)$/i);
|
|
517
|
+
if (!pluginLike && !(doubled && doubled[1].toLowerCase() === doubled[2].toLowerCase())) {
|
|
518
|
+
return null;
|
|
519
|
+
}
|
|
520
|
+
let body = raw;
|
|
521
|
+
if (/^claude\.ai\s+/i.test(body)) body = body.replace(/^claude\.ai\s+/i, "");
|
|
522
|
+
else if (/^(?:mcp__)?claude_ai_/i.test(body)) body = body.replace(/^(?:mcp__)?claude_ai_/i, "");
|
|
523
|
+
else if (/^mcp__plugin_/i.test(body)) body = body.slice("mcp__plugin_".length);
|
|
524
|
+
else if (/^plugin_/i.test(body)) body = body.slice("plugin_".length);
|
|
525
|
+
else if (/^plugin:/i.test(body)) body = body.slice("plugin:".length);
|
|
526
|
+
else if (/^mcp_/i.test(body)) body = body.slice("mcp_".length);
|
|
527
|
+
const head = body.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean)[0];
|
|
528
|
+
if (!head || !SIDEBOARD_CONNECTOR_SERVICES.includes(head)) return null;
|
|
529
|
+
return head;
|
|
530
|
+
}
|
|
531
|
+
function claudeConnectorCoverage() {
|
|
532
|
+
let github = false;
|
|
533
|
+
try {
|
|
534
|
+
github = githubAgentAuthReady();
|
|
535
|
+
} catch {
|
|
536
|
+
github = false;
|
|
537
|
+
}
|
|
538
|
+
let linear = false;
|
|
539
|
+
let posthog = false;
|
|
540
|
+
let vercel = false;
|
|
541
|
+
let supabase = false;
|
|
542
|
+
let sentry = false;
|
|
543
|
+
try {
|
|
544
|
+
linear = isLinearConnected();
|
|
545
|
+
posthog = isPosthogConnected();
|
|
546
|
+
const integrations = loadAppSettings().integrations ?? {};
|
|
547
|
+
if (integrations.githubPat?.trim()) github = true;
|
|
548
|
+
vercel = Boolean(integrations.vercelToken?.trim());
|
|
549
|
+
supabase = Boolean(integrations.supabaseAccessToken?.trim());
|
|
550
|
+
sentry = Boolean(integrations.sentryAuthToken?.trim());
|
|
551
|
+
} catch {
|
|
552
|
+
}
|
|
553
|
+
return { github, linear, posthog, vercel, supabase, sentry };
|
|
554
|
+
}
|
|
555
|
+
function isNotableMcpInitStatus(server, sideboardOk, coverage) {
|
|
556
|
+
if (isCleanMcpConnect(server.status)) return false;
|
|
557
|
+
if (isSideboardMcpName(server.name)) return true;
|
|
558
|
+
if (isMcpAuthStatus(server.status)) return false;
|
|
559
|
+
const service = sideboardServiceForClaudeConnector(server.name);
|
|
560
|
+
if (service) return !(sideboardOk && coverage[service]);
|
|
561
|
+
if (isVendorClaudeAiMcpName(server.name)) return false;
|
|
562
|
+
return true;
|
|
563
|
+
}
|
|
564
|
+
|
|
451
565
|
// src/mcp-ui/host.ts
|
|
452
566
|
import { createHash } from "crypto";
|
|
453
567
|
import { homedir as homedir5 } from "os";
|
|
@@ -2633,56 +2747,6 @@ function claudeString(obj, key) {
|
|
|
2633
2747
|
const v = obj[key];
|
|
2634
2748
|
return typeof v === "string" && v.trim() ? v.trim() : void 0;
|
|
2635
2749
|
}
|
|
2636
|
-
function mcpStatusThinkingFromClaudeInit(obj) {
|
|
2637
|
-
const raw = obj.mcp_servers ?? obj.mcpServers;
|
|
2638
|
-
const servers = [];
|
|
2639
|
-
if (Array.isArray(raw)) {
|
|
2640
|
-
for (const item of raw) {
|
|
2641
|
-
if (!item || typeof item !== "object" || Array.isArray(item)) continue;
|
|
2642
|
-
const rec = item;
|
|
2643
|
-
const name = typeof rec.name === "string" && rec.name.trim() || typeof rec.server === "string" && rec.server.trim() || "";
|
|
2644
|
-
const status = typeof rec.status === "string" && rec.status.trim() || typeof rec.state === "string" && rec.state.trim() || "";
|
|
2645
|
-
if (name) servers.push({ name, status: status || "unknown" });
|
|
2646
|
-
}
|
|
2647
|
-
} else if (raw && typeof raw === "object") {
|
|
2648
|
-
for (const [name, value] of Object.entries(raw)) {
|
|
2649
|
-
if (!name.trim()) continue;
|
|
2650
|
-
if (typeof value === "string" && value.trim()) {
|
|
2651
|
-
servers.push({ name, status: value.trim() });
|
|
2652
|
-
continue;
|
|
2653
|
-
}
|
|
2654
|
-
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
2655
|
-
const rec = value;
|
|
2656
|
-
const status = typeof rec.status === "string" && rec.status.trim() || typeof rec.state === "string" && rec.state.trim() || "unknown";
|
|
2657
|
-
servers.push({ name, status });
|
|
2658
|
-
}
|
|
2659
|
-
}
|
|
2660
|
-
}
|
|
2661
|
-
const notable = servers.filter(isNotableMcpInitStatus);
|
|
2662
|
-
if (notable.length === 0) return null;
|
|
2663
|
-
return `MCP: ${notable.map((s) => `${s.name} ${s.status}`).join(", ")}`;
|
|
2664
|
-
}
|
|
2665
|
-
function isCleanMcpConnect(status) {
|
|
2666
|
-
return /^(connected|ok|ready|success)$/i.test(status.trim());
|
|
2667
|
-
}
|
|
2668
|
-
function isMcpAuthStatus(status) {
|
|
2669
|
-
return /needs[_-]?auth|needs authentication|unauthorized|not authenticated|authrequired/i.test(
|
|
2670
|
-
status
|
|
2671
|
-
);
|
|
2672
|
-
}
|
|
2673
|
-
function isSideboardMcpName(name) {
|
|
2674
|
-
return /^sideboard$/i.test(name.trim()) || /^mcp__sideboard$/i.test(name.trim());
|
|
2675
|
-
}
|
|
2676
|
-
function isVendorClaudeAiMcpName(name) {
|
|
2677
|
-
return /^claude\.ai\b/i.test(name.trim()) || /^mcp__claude_ai_/i.test(name.trim());
|
|
2678
|
-
}
|
|
2679
|
-
function isNotableMcpInitStatus(server) {
|
|
2680
|
-
if (isCleanMcpConnect(server.status)) return false;
|
|
2681
|
-
if (isSideboardMcpName(server.name)) return true;
|
|
2682
|
-
if (isVendorClaudeAiMcpName(server.name)) return false;
|
|
2683
|
-
if (isMcpAuthStatus(server.status)) return false;
|
|
2684
|
-
return true;
|
|
2685
|
-
}
|
|
2686
2750
|
function eventsFromClaudeSystem(obj) {
|
|
2687
2751
|
const subtype = claudeString(obj, "subtype") ?? "";
|
|
2688
2752
|
const parentId = claudeParentToolUseId(obj);
|
|
@@ -2852,7 +2916,7 @@ var claudeAdapter = {
|
|
|
2852
2916
|
);
|
|
2853
2917
|
}
|
|
2854
2918
|
const mode = permissionMode(thread);
|
|
2855
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
2919
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-SK4JQBPN.js");
|
|
2856
2920
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
2857
2921
|
const rpc = worktreeAgentRpc(isOrchestrator);
|
|
2858
2922
|
const injectedServers = await buildInjectedMcpServers({
|
|
@@ -5154,6 +5218,7 @@ export {
|
|
|
5154
5218
|
adjustBrightsyTurnExit,
|
|
5155
5219
|
listBrightsyChatTargets,
|
|
5156
5220
|
brightsyAdapter,
|
|
5221
|
+
mcpStatusThinkingFromClaudeInit,
|
|
5157
5222
|
SIDEBOARD_THREAD_ID_ENV,
|
|
5158
5223
|
shouldRegisterMcpWaitForTurn,
|
|
5159
5224
|
worktreeMcpToolNames,
|
|
@@ -5164,7 +5229,6 @@ export {
|
|
|
5164
5229
|
PLAN_MODE_OFF_INSTRUCTION,
|
|
5165
5230
|
planModeTurnInstruction,
|
|
5166
5231
|
permissionMode,
|
|
5167
|
-
mcpStatusThinkingFromClaudeInit,
|
|
5168
5232
|
claudeAdapter,
|
|
5169
5233
|
listCodexModels,
|
|
5170
5234
|
codexAdapter,
|