@sideboard-ai/core 0.1.199 → 0.1.200
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-3CSCNAXU.js → abletime-345SE3B4.js} +2 -2
- package/dist/{abletime-H74RNIKV.js → abletime-KGPD3UUJ.js} +2 -2
- package/dist/{agents-BOYOK56K.js → agents-N7WXOGN6.js} +6 -4
- package/dist/{agents-AVH44CBS.js → agents-ZRIFDXCB.js} +6 -4
- package/dist/{app-settings-MMPLJHWF.js → app-settings-AXCURTZJ.js} +9 -1
- package/dist/{app-settings-FMTDH5RD.js → app-settings-V6IHESEQ.js} +9 -1
- package/dist/{chunk-DU2ICKLA.js → chunk-5XSDGJMP.js} +23 -9
- package/dist/{chunk-CTABTALL.js → chunk-62IMZIIZ.js} +58 -41
- package/dist/{chunk-CA7PWMQ7.js → chunk-7AHAABKN.js} +1 -1
- package/dist/{chunk-2IQ6W47G.js → chunk-CXFW5LIH.js} +40 -3
- package/dist/{chunk-S4EEYOSU.js → chunk-EWDE54OI.js} +2 -2
- package/dist/{chunk-HQKGK4KO.js → chunk-ISV5IFH3.js} +40 -3
- package/dist/{chunk-QFABSE3Q.js → chunk-NXM45OS3.js} +1 -1
- package/dist/{chunk-PPVN3APP.js → chunk-O2DRYD2B.js} +59 -42
- package/dist/{chunk-DU4ID3DA.js → chunk-OSPE25A7.js} +1 -1
- package/dist/{chunk-BLOKJY4U.js → chunk-PDMNYCPL.js} +2 -2
- package/dist/{chunk-PTAMHXBT.js → chunk-PGQGP4FD.js} +1 -1
- package/dist/{chunk-KI4YI72Y.js → chunk-PKUPOVKP.js} +23 -9
- package/dist/{coordinator-prompt-LB3GA3U4.js → coordinator-prompt-2RWBH6W7.js} +3 -3
- package/dist/{coordinator-prompt-ROWPLVQ3.js → coordinator-prompt-AL62H73U.js} +3 -3
- package/dist/{global-workspace-C5XKWCRH.js → global-workspace-VAO3BQP5.js} +3 -3
- package/dist/{global-workspace-V2A4YKZ6.js → global-workspace-Y5KKGXN7.js} +3 -3
- package/dist/index.cjs +113 -29
- package/dist/index.d.cts +42 -14
- package/dist/index.d.ts +42 -14
- package/dist/index.js +18 -8
- package/dist/mcp/run-stdio.cjs +87 -24
- package/dist/mcp/run-stdio.js +8 -8
- package/dist/{orchestrator-AJGDZEAS.js → orchestrator-D2EJ4Z7Z.js} +5 -5
- package/dist/{orchestrator-NCGYNVYN.js → orchestrator-DPHIMK44.js} +5 -5
- package/dist/{workspaces-GWEKIS3B.js → workspaces-DZZQM745.js} +3 -3
- package/dist/{workspaces-WIRJQ6HA.js → workspaces-HEKFQP4B.js} +3 -3
- package/dist/{worktree-UI5WJC3A.js → worktree-ENRMJUI3.js} +2 -2
- package/dist/{worktree-QA4J75FI.js → worktree-IEUSQ63V.js} +2 -2
- package/package.json +1 -1
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
toAbleTimeIssueInfo,
|
|
16
16
|
updateAbleTimeTask,
|
|
17
17
|
verifyAbleTimeConnection
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7AHAABKN.js";
|
|
19
19
|
import "./chunk-N7WZ6NIN.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-CXFW5LIH.js";
|
|
21
21
|
import "./chunk-4TR3HZFT.js";
|
|
22
22
|
import "./chunk-WDRMZKVB.js";
|
|
23
23
|
import "./chunk-JT7R45JB.js";
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
toAbleTimeIssueInfo,
|
|
18
18
|
updateAbleTimeTask,
|
|
19
19
|
verifyAbleTimeConnection
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-PGQGP4FD.js";
|
|
21
21
|
import "./chunk-VKQGAWHY.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-ISV5IFH3.js";
|
|
23
23
|
import "./chunk-NSTQ6QKD.js";
|
|
24
24
|
import "./chunk-KGZBYWZ3.js";
|
|
25
25
|
import "./chunk-EQNRWDLN.js";
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
formatClaudeUsageCompact,
|
|
17
17
|
formatClaudeUsageFetchedAt,
|
|
18
18
|
formatClaudeUsageOverLimitConfirm,
|
|
19
|
+
formatClaudeUsageOverLimitWait,
|
|
19
20
|
formatClaudeUsageReset,
|
|
20
21
|
formatClaudeUsageResetClock,
|
|
21
22
|
formatClaudeUsageTooltip,
|
|
@@ -49,12 +50,12 @@ import {
|
|
|
49
50
|
resolveQuotaFallbackAgent,
|
|
50
51
|
turnCostUsdFromCursorUsage,
|
|
51
52
|
whichOnPath
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import "./chunk-
|
|
53
|
+
} from "./chunk-5XSDGJMP.js";
|
|
54
|
+
import "./chunk-EWDE54OI.js";
|
|
54
55
|
import "./chunk-3OHR73VK.js";
|
|
55
56
|
import "./chunk-Y4MIXGPA.js";
|
|
56
57
|
import "./chunk-VKQGAWHY.js";
|
|
57
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-NXM45OS3.js";
|
|
58
59
|
import "./chunk-D6JWYJ4P.js";
|
|
59
60
|
import "./chunk-CJFBSQIB.js";
|
|
60
61
|
import "./chunk-SYFVUF2C.js";
|
|
@@ -72,7 +73,7 @@ import {
|
|
|
72
73
|
assertOrchestratorCapableAgent,
|
|
73
74
|
coerceOrchestratorAgent,
|
|
74
75
|
isOrchestratorCapableAgent
|
|
75
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-ISV5IFH3.js";
|
|
76
77
|
import "./chunk-NSTQ6QKD.js";
|
|
77
78
|
import "./chunk-KGZBYWZ3.js";
|
|
78
79
|
import "./chunk-EQNRWDLN.js";
|
|
@@ -99,6 +100,7 @@ export {
|
|
|
99
100
|
formatClaudeUsageCompact,
|
|
100
101
|
formatClaudeUsageFetchedAt,
|
|
101
102
|
formatClaudeUsageOverLimitConfirm,
|
|
103
|
+
formatClaudeUsageOverLimitWait,
|
|
102
104
|
formatClaudeUsageReset,
|
|
103
105
|
formatClaudeUsageResetClock,
|
|
104
106
|
formatClaudeUsageTooltip,
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
formatClaudeUsageCompact,
|
|
14
14
|
formatClaudeUsageFetchedAt,
|
|
15
15
|
formatClaudeUsageOverLimitConfirm,
|
|
16
|
+
formatClaudeUsageOverLimitWait,
|
|
16
17
|
formatClaudeUsageReset,
|
|
17
18
|
formatClaudeUsageResetClock,
|
|
18
19
|
formatClaudeUsageTooltip,
|
|
@@ -43,9 +44,9 @@ import {
|
|
|
43
44
|
resolveLoginCommand,
|
|
44
45
|
resolveQuotaFallbackAgent,
|
|
45
46
|
whichOnPath
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
47
|
+
} from "./chunk-PKUPOVKP.js";
|
|
48
|
+
import "./chunk-PDMNYCPL.js";
|
|
49
|
+
import "./chunk-OSPE25A7.js";
|
|
49
50
|
import "./chunk-6K64FJDD.js";
|
|
50
51
|
import "./chunk-QQKDGPUI.js";
|
|
51
52
|
import "./chunk-SALM35KD.js";
|
|
@@ -62,7 +63,7 @@ import {
|
|
|
62
63
|
assertOrchestratorCapableAgent,
|
|
63
64
|
coerceOrchestratorAgent,
|
|
64
65
|
isOrchestratorCapableAgent
|
|
65
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-CXFW5LIH.js";
|
|
66
67
|
import "./chunk-4TR3HZFT.js";
|
|
67
68
|
import "./chunk-WDRMZKVB.js";
|
|
68
69
|
import "./chunk-JT7R45JB.js";
|
|
@@ -100,6 +101,7 @@ export {
|
|
|
100
101
|
formatClaudeUsageCompact,
|
|
101
102
|
formatClaudeUsageFetchedAt,
|
|
102
103
|
formatClaudeUsageOverLimitConfirm,
|
|
104
|
+
formatClaudeUsageOverLimitWait,
|
|
103
105
|
formatClaudeUsageReset,
|
|
104
106
|
formatClaudeUsageResetClock,
|
|
105
107
|
formatClaudeUsageTooltip,
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
HARNESS_ENV_KEYS,
|
|
5
5
|
ISSUE_SOURCE_LABELS,
|
|
6
6
|
PROFILE_NOTES_MAX,
|
|
7
|
+
USAGE_ON_LIMIT_VALUES,
|
|
7
8
|
appSettingsPath,
|
|
8
9
|
applyAppEnvironment,
|
|
9
10
|
autoArchiveOnMergeEnabled,
|
|
@@ -50,6 +51,7 @@ import {
|
|
|
50
51
|
isAbleTimeConnected,
|
|
51
52
|
isIssueSourceConnected,
|
|
52
53
|
isLinearConnected,
|
|
54
|
+
isUsageOnLimit,
|
|
53
55
|
issueSourceLabel,
|
|
54
56
|
loadAppSettings,
|
|
55
57
|
maxConcurrentAgents,
|
|
@@ -65,6 +67,7 @@ import {
|
|
|
65
67
|
resolveNewThreadOptions,
|
|
66
68
|
resolveOrchestratorDefaults,
|
|
67
69
|
resolveThreadDefaults,
|
|
70
|
+
resolveUsageOnLimit,
|
|
68
71
|
resolveViewerProfile,
|
|
69
72
|
resolveViewerProfileForRepo,
|
|
70
73
|
saveAbleTimeConnection,
|
|
@@ -84,8 +87,9 @@ import {
|
|
|
84
87
|
updateIntegrationsSettings,
|
|
85
88
|
updateOpencodeSettings,
|
|
86
89
|
updateProjectProfileSettings,
|
|
90
|
+
usageOnLimit,
|
|
87
91
|
writeViewerContext
|
|
88
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-CXFW5LIH.js";
|
|
89
93
|
import "./chunk-4TR3HZFT.js";
|
|
90
94
|
import "./chunk-WDRMZKVB.js";
|
|
91
95
|
import "./chunk-JT7R45JB.js";
|
|
@@ -97,6 +101,7 @@ export {
|
|
|
97
101
|
HARNESS_ENV_KEYS,
|
|
98
102
|
ISSUE_SOURCE_LABELS,
|
|
99
103
|
PROFILE_NOTES_MAX,
|
|
104
|
+
USAGE_ON_LIMIT_VALUES,
|
|
100
105
|
appSettingsPath,
|
|
101
106
|
applyAppEnvironment,
|
|
102
107
|
autoArchiveOnMergeEnabled,
|
|
@@ -143,6 +148,7 @@ export {
|
|
|
143
148
|
isAbleTimeConnected,
|
|
144
149
|
isIssueSourceConnected,
|
|
145
150
|
isLinearConnected,
|
|
151
|
+
isUsageOnLimit,
|
|
146
152
|
issueSourceLabel,
|
|
147
153
|
loadAppSettings,
|
|
148
154
|
maxConcurrentAgents,
|
|
@@ -158,6 +164,7 @@ export {
|
|
|
158
164
|
resolveNewThreadOptions,
|
|
159
165
|
resolveOrchestratorDefaults,
|
|
160
166
|
resolveThreadDefaults,
|
|
167
|
+
resolveUsageOnLimit,
|
|
161
168
|
resolveViewerProfile,
|
|
162
169
|
resolveViewerProfileForRepo,
|
|
163
170
|
saveAbleTimeConnection,
|
|
@@ -177,5 +184,6 @@ export {
|
|
|
177
184
|
updateIntegrationsSettings,
|
|
178
185
|
updateOpencodeSettings,
|
|
179
186
|
updateProjectProfileSettings,
|
|
187
|
+
usageOnLimit,
|
|
180
188
|
writeViewerContext
|
|
181
189
|
};
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
HARNESS_ENV_KEYS,
|
|
7
7
|
ISSUE_SOURCE_LABELS,
|
|
8
8
|
PROFILE_NOTES_MAX,
|
|
9
|
+
USAGE_ON_LIMIT_VALUES,
|
|
9
10
|
appSettingsPath,
|
|
10
11
|
applyAppEnvironment,
|
|
11
12
|
autoArchiveOnMergeEnabled,
|
|
@@ -52,6 +53,7 @@ import {
|
|
|
52
53
|
isAbleTimeConnected,
|
|
53
54
|
isIssueSourceConnected,
|
|
54
55
|
isLinearConnected,
|
|
56
|
+
isUsageOnLimit,
|
|
55
57
|
issueSourceLabel,
|
|
56
58
|
loadAppSettings,
|
|
57
59
|
maxConcurrentAgents,
|
|
@@ -67,6 +69,7 @@ import {
|
|
|
67
69
|
resolveNewThreadOptions,
|
|
68
70
|
resolveOrchestratorDefaults,
|
|
69
71
|
resolveThreadDefaults,
|
|
72
|
+
resolveUsageOnLimit,
|
|
70
73
|
resolveViewerProfile,
|
|
71
74
|
resolveViewerProfileForRepo,
|
|
72
75
|
saveAbleTimeConnection,
|
|
@@ -86,8 +89,9 @@ import {
|
|
|
86
89
|
updateIntegrationsSettings,
|
|
87
90
|
updateOpencodeSettings,
|
|
88
91
|
updateProjectProfileSettings,
|
|
92
|
+
usageOnLimit,
|
|
89
93
|
writeViewerContext
|
|
90
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-ISV5IFH3.js";
|
|
91
95
|
import "./chunk-NSTQ6QKD.js";
|
|
92
96
|
import "./chunk-KGZBYWZ3.js";
|
|
93
97
|
import "./chunk-EQNRWDLN.js";
|
|
@@ -98,6 +102,7 @@ export {
|
|
|
98
102
|
HARNESS_ENV_KEYS,
|
|
99
103
|
ISSUE_SOURCE_LABELS,
|
|
100
104
|
PROFILE_NOTES_MAX,
|
|
105
|
+
USAGE_ON_LIMIT_VALUES,
|
|
101
106
|
appSettingsPath,
|
|
102
107
|
applyAppEnvironment,
|
|
103
108
|
autoArchiveOnMergeEnabled,
|
|
@@ -144,6 +149,7 @@ export {
|
|
|
144
149
|
isAbleTimeConnected,
|
|
145
150
|
isIssueSourceConnected,
|
|
146
151
|
isLinearConnected,
|
|
152
|
+
isUsageOnLimit,
|
|
147
153
|
issueSourceLabel,
|
|
148
154
|
loadAppSettings,
|
|
149
155
|
maxConcurrentAgents,
|
|
@@ -159,6 +165,7 @@ export {
|
|
|
159
165
|
resolveNewThreadOptions,
|
|
160
166
|
resolveOrchestratorDefaults,
|
|
161
167
|
resolveThreadDefaults,
|
|
168
|
+
resolveUsageOnLimit,
|
|
162
169
|
resolveViewerProfile,
|
|
163
170
|
resolveViewerProfileForRepo,
|
|
164
171
|
saveAbleTimeConnection,
|
|
@@ -178,5 +185,6 @@ export {
|
|
|
178
185
|
updateIntegrationsSettings,
|
|
179
186
|
updateOpencodeSettings,
|
|
180
187
|
updateProjectProfileSettings,
|
|
188
|
+
usageOnLimit,
|
|
181
189
|
writeViewerContext
|
|
182
190
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
isOrchestratorThread
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EWDE54OI.js";
|
|
6
6
|
import {
|
|
7
7
|
applyConnectedTeamToCli,
|
|
8
8
|
brightsyMcpServerName,
|
|
@@ -12,12 +12,15 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
loadBrightsyConfig
|
|
14
14
|
} from "./chunk-Y4MIXGPA.js";
|
|
15
|
+
import {
|
|
16
|
+
httpFetch
|
|
17
|
+
} from "./chunk-VKQGAWHY.js";
|
|
15
18
|
import {
|
|
16
19
|
codexUnattendedGitConfigArgs,
|
|
17
20
|
mergeAgentGitAuthEnv,
|
|
18
21
|
resolveAgentGitAuthEnv,
|
|
19
22
|
resolveCodexGitWritableRoots
|
|
20
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-NXM45OS3.js";
|
|
21
24
|
import {
|
|
22
25
|
enrichPathWithNpmGlobalBin,
|
|
23
26
|
isConductorBundledCli,
|
|
@@ -35,7 +38,7 @@ import {
|
|
|
35
38
|
resolveClaudeExecutable,
|
|
36
39
|
unwrapStrippedElectronLaunch,
|
|
37
40
|
wrapElectronAsNodeLaunch
|
|
38
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-ISV5IFH3.js";
|
|
39
42
|
import {
|
|
40
43
|
appDataDir
|
|
41
44
|
} from "./chunk-EQNRWDLN.js";
|
|
@@ -2420,7 +2423,7 @@ var claudeAdapter = {
|
|
|
2420
2423
|
);
|
|
2421
2424
|
}
|
|
2422
2425
|
const mode = permissionMode(thread);
|
|
2423
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
2426
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-VAO3BQP5.js");
|
|
2424
2427
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
2425
2428
|
const injectedServers = await buildInjectedMcpServers({
|
|
2426
2429
|
includeSideboard: true,
|
|
@@ -4317,16 +4320,26 @@ function claudeUsageOverLimitWindows(usage) {
|
|
|
4317
4320
|
if (!usage) return [];
|
|
4318
4321
|
return usage.windows.filter(claudeUsageWindowOverLimit);
|
|
4319
4322
|
}
|
|
4320
|
-
function
|
|
4321
|
-
if (windows.length === 0) return "";
|
|
4323
|
+
function formatOverLimitWindowList(windows, now) {
|
|
4322
4324
|
const parts = windows.map((w) => {
|
|
4323
4325
|
const reset = formatClaudeUsageReset(w.resetsAt, now);
|
|
4324
4326
|
return reset ? `${w.label} (${reset})` : w.label;
|
|
4325
4327
|
});
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
+
return {
|
|
4329
|
+
list: parts.join(", "),
|
|
4330
|
+
verb: windows.length === 1 ? "is" : "are"
|
|
4331
|
+
};
|
|
4332
|
+
}
|
|
4333
|
+
function formatClaudeUsageOverLimitConfirm(windows, now = /* @__PURE__ */ new Date()) {
|
|
4334
|
+
if (windows.length === 0) return "";
|
|
4335
|
+
const { list, verb } = formatOverLimitWindowList(windows, now);
|
|
4328
4336
|
return `Claude Code ${list} ${verb} at or over the plan limit. Send this message anyway?`;
|
|
4329
4337
|
}
|
|
4338
|
+
function formatClaudeUsageOverLimitWait(windows, now = /* @__PURE__ */ new Date()) {
|
|
4339
|
+
if (windows.length === 0) return "";
|
|
4340
|
+
const { list, verb } = formatOverLimitWindowList(windows, now);
|
|
4341
|
+
return `Claude Code ${list} ${verb} at or over the plan limit. Sending is paused until the window resets.`;
|
|
4342
|
+
}
|
|
4330
4343
|
|
|
4331
4344
|
// src/agents/claude-usage-client.ts
|
|
4332
4345
|
import { existsSync as existsSync13, readFileSync as readFileSync5 } from "fs";
|
|
@@ -4423,7 +4436,7 @@ async function getClaudePlanUsage(opts = {}) {
|
|
|
4423
4436
|
cache = { at: now, value: null };
|
|
4424
4437
|
return null;
|
|
4425
4438
|
}
|
|
4426
|
-
const fetchFn = opts.fetch ??
|
|
4439
|
+
const fetchFn = opts.fetch ?? httpFetch;
|
|
4427
4440
|
const userAgent = opts.userAgent ?? await resolveClaudeUserAgent();
|
|
4428
4441
|
const ac = new AbortController();
|
|
4429
4442
|
const timer = setTimeout(() => ac.abort(), 8e3);
|
|
@@ -4776,6 +4789,7 @@ export {
|
|
|
4776
4789
|
formatClaudeUsageCompact,
|
|
4777
4790
|
claudeUsageOverLimitWindows,
|
|
4778
4791
|
formatClaudeUsageOverLimitConfirm,
|
|
4792
|
+
formatClaudeUsageOverLimitWait,
|
|
4779
4793
|
getClaudePlanUsage,
|
|
4780
4794
|
getAgentSetupInfo,
|
|
4781
4795
|
listAgentSetupInfo,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
summarizeTurnStderr,
|
|
39
39
|
toolDescription,
|
|
40
40
|
turnFailChatText
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-5XSDGJMP.js";
|
|
42
42
|
import {
|
|
43
43
|
SLACK_REPLY_FORMATTING,
|
|
44
44
|
addWorkspace,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
stageAbsolutePathsAsAttachments,
|
|
62
62
|
stageBuffersAsAttachments,
|
|
63
63
|
syncWorkspacesFromThreads
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-EWDE54OI.js";
|
|
65
65
|
import {
|
|
66
66
|
extractPresentedPlan,
|
|
67
67
|
readPlanFile,
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
worktreeDisplayLabelForGroup,
|
|
117
117
|
worktreeNameFromPath,
|
|
118
118
|
worktreeSlugForTicket
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-NXM45OS3.js";
|
|
120
120
|
import {
|
|
121
121
|
ATTACHMENTS_DIR,
|
|
122
122
|
DETACHED_JOBS_DIR,
|
|
@@ -160,7 +160,6 @@ import {
|
|
|
160
160
|
isSecureFileEncrypted,
|
|
161
161
|
loadAppSettings,
|
|
162
162
|
orchestrationQuotaFallbackAgent,
|
|
163
|
-
orchestrationQuotaOnLimit,
|
|
164
163
|
readSecureJson,
|
|
165
164
|
resolveEffectiveIssueSource,
|
|
166
165
|
resolveNewThreadOptions,
|
|
@@ -169,8 +168,9 @@ import {
|
|
|
169
168
|
resolveViewerProfileForRepo,
|
|
170
169
|
stripNestedElectronEnv,
|
|
171
170
|
updateAdvancedSettings,
|
|
171
|
+
usageOnLimit,
|
|
172
172
|
writeSecureJson
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-ISV5IFH3.js";
|
|
174
174
|
import {
|
|
175
175
|
writePrivateFile
|
|
176
176
|
} from "./chunk-NSTQ6QKD.js";
|
|
@@ -408,7 +408,7 @@ async function continueSourceThread(threadId, prompt) {
|
|
|
408
408
|
await continueOnReply(threadId, prompt);
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
411
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-D2EJ4Z7Z.js");
|
|
412
412
|
await getOrchestrator2().send(threadId, prompt);
|
|
413
413
|
} catch {
|
|
414
414
|
}
|
|
@@ -801,9 +801,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
|
|
|
801
801
|
`Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
|
|
802
802
|
);
|
|
803
803
|
}
|
|
804
|
-
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-
|
|
804
|
+
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-VAO3BQP5.js");
|
|
805
805
|
if (isGlobalThread2(thread)) {
|
|
806
|
-
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-
|
|
806
|
+
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-AL62H73U.js");
|
|
807
807
|
ensureGlobalCoordinatorCwd2(
|
|
808
808
|
isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
|
|
809
809
|
);
|
|
@@ -3599,7 +3599,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
3599
3599
|
});
|
|
3600
3600
|
await requireAgent(resolved.agent);
|
|
3601
3601
|
if (input.cowboy) {
|
|
3602
|
-
const { cowboyModeEnabled } = await import("./app-settings-
|
|
3602
|
+
const { cowboyModeEnabled } = await import("./app-settings-V6IHESEQ.js");
|
|
3603
3603
|
if (!cowboyModeEnabled()) {
|
|
3604
3604
|
throw new Error(
|
|
3605
3605
|
"Cowboy mode is off. Enable it in Settings \u2192 Advanced."
|
|
@@ -3657,7 +3657,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
3657
3657
|
let sourceIsFork = false;
|
|
3658
3658
|
if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
|
|
3659
3659
|
if (isAbleTimeConnected() && getIssueSource() === "abletime") {
|
|
3660
|
-
const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-
|
|
3660
|
+
const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-KGPD3UUJ.js");
|
|
3661
3661
|
const task = await ensureAbleTimeTask({
|
|
3662
3662
|
title: title?.trim() || "Untitled work",
|
|
3663
3663
|
description: input.prompt?.trim() || void 0
|
|
@@ -3969,12 +3969,18 @@ async function forkThreadWorktree(input, onSetupLine) {
|
|
|
3969
3969
|
// src/orchestrator/quota-failover.ts
|
|
3970
3970
|
import { randomUUID as randomUUID3 } from "crypto";
|
|
3971
3971
|
function planOrchestrationQuotaFailover(thread, limitText, opts) {
|
|
3972
|
-
if (!isOrchestratorThread(thread)) return null;
|
|
3973
3972
|
if (!isSessionQuotaLimit(limitText)) return null;
|
|
3974
|
-
const onLimit = opts?.onLimit ??
|
|
3973
|
+
const onLimit = opts?.onLimit ?? usageOnLimit();
|
|
3975
3974
|
const resumeAt = parseSessionQuotaResetAt(limitText, opts?.now);
|
|
3975
|
+
if (onLimit === "keep_going" || onLimit === "confirm") {
|
|
3976
|
+
return {
|
|
3977
|
+
action: "none",
|
|
3978
|
+
reason: onLimit === "confirm" ? "Settings: confirm with user; no automatic continue." : "Settings: keep going; no automatic continue.",
|
|
3979
|
+
limitText
|
|
3980
|
+
};
|
|
3981
|
+
}
|
|
3976
3982
|
if (thread.quotaContinuedFromId) {
|
|
3977
|
-
if (resumeAt) {
|
|
3983
|
+
if (onLimit === "switch_agent" && resumeAt) {
|
|
3978
3984
|
return {
|
|
3979
3985
|
action: "wait_reset",
|
|
3980
3986
|
reason: "Already continued once; waiting for quota reset instead.",
|
|
@@ -3984,7 +3990,7 @@ function planOrchestrationQuotaFailover(thread, limitText, opts) {
|
|
|
3984
3990
|
}
|
|
3985
3991
|
return {
|
|
3986
3992
|
action: "none",
|
|
3987
|
-
reason: "Already continued once; no
|
|
3993
|
+
reason: "Already continued once; no further automatic continue.",
|
|
3988
3994
|
limitText
|
|
3989
3995
|
};
|
|
3990
3996
|
}
|
|
@@ -4021,8 +4027,19 @@ function buildQuotaHandoffAttachment(from, limitText, fallbackAgent) {
|
|
|
4021
4027
|
const text = m.text.trim().replace(/\s+/g, " ").slice(0, 280);
|
|
4022
4028
|
return text ? `- ${role}: ${text}` : null;
|
|
4023
4029
|
}).filter(Boolean);
|
|
4030
|
+
const orch = isOrchestratorThread(from);
|
|
4031
|
+
const instructions = orch ? [
|
|
4032
|
+
"- Continue fleet orchestration from this handoff.",
|
|
4033
|
+
"- Prefer Sideboard MCP (list_board, list_threads, get_thread, send_to_thread, \u2026) for live status.",
|
|
4034
|
+
"- Leave model Auto unless there is a specific reason to pin one.",
|
|
4035
|
+
`- Do not wait on the limited ${from.agent} account; keep going on ${fallbackAgent}.`
|
|
4036
|
+
] : [
|
|
4037
|
+
"- Continue this worktree chat from the handoff.",
|
|
4038
|
+
"- Leave model Auto unless there is a specific reason to pin one.",
|
|
4039
|
+
`- Do not wait on the limited ${from.agent} account; keep going on ${fallbackAgent}.`
|
|
4040
|
+
];
|
|
4024
4041
|
const body = [
|
|
4025
|
-
`# Orchestration handoff`,
|
|
4042
|
+
`# ${orch ? "Orchestration" : "Chat"} handoff`,
|
|
4026
4043
|
"",
|
|
4027
4044
|
`Previous chat: ${from.title} (\`${from.id}\`) on **${from.agent}** hit a session/usage limit.`,
|
|
4028
4045
|
`Limit: ${limitText.trim()}`,
|
|
@@ -4038,23 +4055,20 @@ function buildQuotaHandoffAttachment(from, limitText, fallbackAgent) {
|
|
|
4038
4055
|
recent.length ? recent.join("\n") : "(none)",
|
|
4039
4056
|
"",
|
|
4040
4057
|
`## Instructions`,
|
|
4041
|
-
|
|
4042
|
-
`- Prefer Sideboard MCP (list_board, list_threads, get_thread, send_to_thread, \u2026) for live status.`,
|
|
4043
|
-
`- Leave model Auto unless there is a specific reason to pin one.`,
|
|
4044
|
-
`- Do not wait on the limited ${from.agent} account; keep going on ${fallbackAgent}.`
|
|
4058
|
+
...instructions
|
|
4045
4059
|
].join("\n");
|
|
4046
4060
|
return {
|
|
4047
4061
|
id: randomUUID3(),
|
|
4048
|
-
name: "Orchestration quota handoff.md",
|
|
4062
|
+
name: orch ? "Orchestration quota handoff.md" : "Quota handoff.md",
|
|
4049
4063
|
kind: "transcript",
|
|
4050
4064
|
content: body
|
|
4051
4065
|
};
|
|
4052
4066
|
}
|
|
4053
4067
|
var QUOTA_CONTINUE_PROMPT = (fromAgent, fallback) => [
|
|
4054
|
-
`${fromAgent} hit a session/usage limit. Continue this
|
|
4055
|
-
"
|
|
4068
|
+
`${fromAgent} hit a session/usage limit. Continue this chat on ${fallback} using the attached handoff.`,
|
|
4069
|
+
"Proceed with the goal. Leave model Auto unless needed."
|
|
4056
4070
|
].join(" ");
|
|
4057
|
-
var QUOTA_RESUME_PROMPT = "Session/usage limit window should have reset. Continue
|
|
4071
|
+
var QUOTA_RESUME_PROMPT = "Session/usage limit window should have reset. Continue this chat from where you left off.";
|
|
4058
4072
|
function createQuotaFailoverChat(from, fallbackAgent, limitText) {
|
|
4059
4073
|
const handoff = buildQuotaHandoffAttachment(from, limitText, fallbackAgent);
|
|
4060
4074
|
const tab = createChatTab({
|
|
@@ -4063,12 +4077,15 @@ function createQuotaFailoverChat(from, fallbackAgent, limitText) {
|
|
|
4063
4077
|
model: null,
|
|
4064
4078
|
attachments: [handoff]
|
|
4065
4079
|
});
|
|
4066
|
-
|
|
4067
|
-
parentThreadId: from.id,
|
|
4080
|
+
const patch = {
|
|
4068
4081
|
quotaContinuedFromId: from.id,
|
|
4069
|
-
sourceRef: from.sourceRef
|
|
4070
|
-
|
|
4071
|
-
|
|
4082
|
+
sourceRef: from.sourceRef
|
|
4083
|
+
};
|
|
4084
|
+
if (isOrchestratorThread(from)) {
|
|
4085
|
+
patch.parentThreadId = from.id;
|
|
4086
|
+
patch.sourceType = "orchestration";
|
|
4087
|
+
}
|
|
4088
|
+
return updateThread(tab.id, patch);
|
|
4072
4089
|
}
|
|
4073
4090
|
|
|
4074
4091
|
// src/threads/adopt.ts
|
|
@@ -4169,7 +4186,7 @@ async function adoptThread(input) {
|
|
|
4169
4186
|
messages: input.messages ?? []
|
|
4170
4187
|
});
|
|
4171
4188
|
writeThread(thread);
|
|
4172
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
4189
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-HEKFQP4B.js");
|
|
4173
4190
|
await ensureWorkspace2(repoPath);
|
|
4174
4191
|
const { ensureWorktreeSideboardIgnored: ensureWorktreeSideboardIgnored2 } = await import("./worktree-exclude-N5X5I422.js");
|
|
4175
4192
|
await ensureWorktreeSideboardIgnored2(input.worktreePath);
|
|
@@ -6547,7 +6564,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
6547
6564
|
${prompt}`;
|
|
6548
6565
|
}
|
|
6549
6566
|
async function defaultDeps() {
|
|
6550
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
6567
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-D2EJ4Z7Z.js");
|
|
6551
6568
|
const orch = getOrchestrator2();
|
|
6552
6569
|
return {
|
|
6553
6570
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -6822,7 +6839,7 @@ var Orchestrator = class {
|
|
|
6822
6839
|
orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
|
|
6823
6840
|
});
|
|
6824
6841
|
}
|
|
6825
|
-
const { autoCleanupOrphansEnabled } = await import("./app-settings-
|
|
6842
|
+
const { autoCleanupOrphansEnabled } = await import("./app-settings-V6IHESEQ.js");
|
|
6826
6843
|
if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
|
|
6827
6844
|
await cleanupOrphanWorktrees({ repoPaths });
|
|
6828
6845
|
}
|
|
@@ -6933,8 +6950,8 @@ var Orchestrator = class {
|
|
|
6933
6950
|
await this.send(threadId, QUOTA_RESUME_PROMPT);
|
|
6934
6951
|
}
|
|
6935
6952
|
/**
|
|
6936
|
-
* Host-side continue when
|
|
6937
|
-
*
|
|
6953
|
+
* Host-side continue when any chat hits a provider session/usage limit
|
|
6954
|
+
* (not context size): switch agent (Auto) or wait until reset.
|
|
6938
6955
|
*/
|
|
6939
6956
|
async maybeHandleOrchestrationQuotaFailover(threadId, limitText) {
|
|
6940
6957
|
const thread = findThreadByRef(threadId);
|
|
@@ -6947,7 +6964,7 @@ var Orchestrator = class {
|
|
|
6947
6964
|
setStatus(threadId, "idle", null);
|
|
6948
6965
|
appendMessage(threadId, {
|
|
6949
6966
|
role: "agent",
|
|
6950
|
-
text: `Sideboard will auto-retry this
|
|
6967
|
+
text: `Sideboard will auto-retry this chat around ${plan.resumeAt.toLocaleString()} when the session limit resets.`,
|
|
6951
6968
|
ts: (/* @__PURE__ */ new Date()).toISOString()
|
|
6952
6969
|
});
|
|
6953
6970
|
this.emit({
|
|
@@ -7101,7 +7118,7 @@ var Orchestrator = class {
|
|
|
7101
7118
|
}
|
|
7102
7119
|
await setup;
|
|
7103
7120
|
if (skipSetup) return;
|
|
7104
|
-
const { autoRunAfterSetupEnabled } = await import("./app-settings-
|
|
7121
|
+
const { autoRunAfterSetupEnabled } = await import("./app-settings-V6IHESEQ.js");
|
|
7105
7122
|
if (autoRunAfterSetupEnabled()) {
|
|
7106
7123
|
try {
|
|
7107
7124
|
await this.startDev(threadId);
|
|
@@ -7425,7 +7442,7 @@ var Orchestrator = class {
|
|
|
7425
7442
|
}
|
|
7426
7443
|
const isBrightsy = fresh.agent === "brightsy";
|
|
7427
7444
|
const isOrchestration = isOrchestratorThread(fresh);
|
|
7428
|
-
const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-
|
|
7445
|
+
const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-V6IHESEQ.js");
|
|
7429
7446
|
const gitAuthMode = getGithubGitAuthMode();
|
|
7430
7447
|
const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
|
|
7431
7448
|
githubSlug: await resolveGithubRepoSlug(fresh.worktreePath).catch(
|
|
@@ -8410,7 +8427,7 @@ var Orchestrator = class {
|
|
|
8410
8427
|
updateThread(thread.id, { title: meta.title });
|
|
8411
8428
|
}
|
|
8412
8429
|
}
|
|
8413
|
-
const { autoArchiveOnMergeEnabled } = await import("./app-settings-
|
|
8430
|
+
const { autoArchiveOnMergeEnabled } = await import("./app-settings-V6IHESEQ.js");
|
|
8414
8431
|
const latest = this.requireThread(thread.id);
|
|
8415
8432
|
if (!shouldAutoArchiveOnPrMerge({
|
|
8416
8433
|
previousPrState: prevState || null,
|
|
@@ -8702,7 +8719,7 @@ var Orchestrator = class {
|
|
|
8702
8719
|
this.emit({ type: "status_changed", threadId: archived.id, status: "archived" });
|
|
8703
8720
|
if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
|
|
8704
8721
|
try {
|
|
8705
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
8722
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-HEKFQP4B.js");
|
|
8706
8723
|
await ensureWorkspace2(thread.repoPath);
|
|
8707
8724
|
} catch {
|
|
8708
8725
|
}
|
|
@@ -8729,7 +8746,7 @@ var Orchestrator = class {
|
|
|
8729
8746
|
await runArchiveScript(thread.repoPath, thread.worktreePath);
|
|
8730
8747
|
} catch {
|
|
8731
8748
|
}
|
|
8732
|
-
const { deleteBranchOnPurgeEnabled } = await import("./app-settings-
|
|
8749
|
+
const { deleteBranchOnPurgeEnabled } = await import("./app-settings-V6IHESEQ.js");
|
|
8733
8750
|
const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
|
|
8734
8751
|
await removeWorktree(thread.repoPath, thread.worktreePath, {
|
|
8735
8752
|
deleteBranch: deleteBranch ? thread.branchName : void 0
|
|
@@ -8756,7 +8773,7 @@ var Orchestrator = class {
|
|
|
8756
8773
|
`Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
|
|
8757
8774
|
);
|
|
8758
8775
|
}
|
|
8759
|
-
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-
|
|
8776
|
+
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-ENRMJUI3.js");
|
|
8760
8777
|
const slug = thread.worktreePath.split("/").pop();
|
|
8761
8778
|
const dest = thread.worktreePath;
|
|
8762
8779
|
await withRepoGitLock(thread.repoPath, async () => {
|
|
@@ -8866,7 +8883,7 @@ async function startOrchestration(opts) {
|
|
|
8866
8883
|
sourceRef: "default",
|
|
8867
8884
|
...createOpts
|
|
8868
8885
|
}).catch(async () => {
|
|
8869
|
-
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-
|
|
8886
|
+
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-ENRMJUI3.js");
|
|
8870
8887
|
const repo = await resolveRepoRoot2(repoPath);
|
|
8871
8888
|
const def = await resolveDefaultBranch2(repo);
|
|
8872
8889
|
return orch.createThread({
|