@sideboard-ai/core 0.1.202 → 0.1.203
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-KGPD3UUJ.js → abletime-JFGZBDHH.js} +4 -2
- package/dist/{abletime-345SE3B4.js → abletime-SISJEPJ3.js} +4 -2
- package/dist/abletime-oauth-7TD5Z2QV.js +265 -0
- package/dist/abletime-oauth-OSQYFB3E.js +40 -0
- package/dist/abletime-rest-QPJTDLKX.js +25 -0
- package/dist/abletime-rest-ZJGWYALM.js +24 -0
- package/dist/{agents-OXX3ONVY.js → agents-3755WYQM.js} +4 -4
- package/dist/{agents-573ZDIX6.js → agents-ZMWL43SP.js} +4 -4
- package/dist/{app-settings-V6IHESEQ.js → app-settings-LGHMNHSP.js} +1 -1
- package/dist/{app-settings-AXCURTZJ.js → app-settings-YEPF46IJ.js} +1 -1
- package/dist/{chunk-7NKY2OX7.js → chunk-2DVCCLII.js} +78 -62
- package/dist/chunk-3PYH2RLA.js +388 -0
- package/dist/{chunk-A2TAKYSG.js → chunk-5IXJTUST.js} +4 -4
- package/dist/chunk-6VEIKW5C.js +390 -0
- package/dist/chunk-BFEBFGCS.js +250 -0
- package/dist/{chunk-STPZQR5B.js → chunk-CMGRV36E.js} +1 -1
- package/dist/{chunk-PGQGP4FD.js → chunk-FZ6IBUKY.js} +36 -218
- package/dist/{chunk-7AHAABKN.js → chunk-FZYYEMET.js} +36 -228
- package/dist/{chunk-54RSAMBH.js → chunk-LCU6GBZP.js} +2 -2
- package/dist/chunk-MHPINQKY.js +260 -0
- package/dist/chunk-PJHFNFXA.js +243 -0
- package/dist/{chunk-CXFW5LIH.js → chunk-QFBBUFD4.js} +38 -3
- package/dist/{chunk-RPX6VDW7.js → chunk-QSEF2YVQ.js} +1 -1
- package/dist/{chunk-LJHC62LZ.js → chunk-TNDUTGDV.js} +2 -2
- package/dist/{chunk-27GGXX27.js → chunk-TZNJKZ2A.js} +82 -66
- package/dist/{chunk-NIVF5NDN.js → chunk-X2TFUFIS.js} +4 -4
- package/dist/{chunk-ISV5IFH3.js → chunk-X743YN5Y.js} +38 -3
- package/dist/{coordinator-prompt-TY5FHAXC.js → coordinator-prompt-2B2JA2IE.js} +3 -3
- package/dist/{coordinator-prompt-BH4EHFOO.js → coordinator-prompt-U4PEZDAW.js} +3 -3
- package/dist/{global-workspace-NLLAPQJI.js → global-workspace-JPJ3FKKY.js} +3 -3
- package/dist/{global-workspace-5AZEEQRU.js → global-workspace-PU7ZS3LS.js} +3 -3
- package/dist/index.cjs +912 -142
- package/dist/index.d.cts +61 -9
- package/dist/index.d.ts +61 -9
- package/dist/index.js +63 -18
- package/dist/mcp/run-stdio.cjs +843 -114
- package/dist/mcp/run-stdio.js +22 -20
- package/dist/{orchestrator-JNSQDRZI.js → orchestrator-3A6KUTNI.js} +5 -5
- package/dist/{orchestrator-NCYKEI3E.js → orchestrator-Q33M24ZJ.js} +6 -6
- package/dist/{workspaces-RP76JH3J.js → workspaces-IMG7ZRUQ.js} +3 -3
- package/dist/{workspaces-PEWYWVHZ.js → workspaces-U6P6DB44.js} +3 -3
- package/dist/{worktree-ZQEUKSNE.js → worktree-FL3UIUKQ.js} +2 -2
- package/dist/{worktree-72TZWUSH.js → worktree-JSCDJPBU.js} +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
extractPresentedPlan,
|
|
5
|
+
readPlanFile,
|
|
6
|
+
writePlanFile
|
|
7
|
+
} from "./chunk-JFOPOMK7.js";
|
|
3
8
|
import {
|
|
4
9
|
releaseCaffeinateHoldForThread
|
|
5
10
|
} from "./chunk-YWI3IBP2.js";
|
|
@@ -38,7 +43,7 @@ import {
|
|
|
38
43
|
summarizeTurnStderr,
|
|
39
44
|
toolDescription,
|
|
40
45
|
turnFailChatText
|
|
41
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-X2TFUFIS.js";
|
|
42
47
|
import {
|
|
43
48
|
SLACK_REPLY_FORMATTING,
|
|
44
49
|
addWorkspace,
|
|
@@ -61,12 +66,7 @@ import {
|
|
|
61
66
|
stageAbsolutePathsAsAttachments,
|
|
62
67
|
stageBuffersAsAttachments,
|
|
63
68
|
syncWorkspacesFromThreads
|
|
64
|
-
} from "./chunk-
|
|
65
|
-
import {
|
|
66
|
-
extractPresentedPlan,
|
|
67
|
-
readPlanFile,
|
|
68
|
-
writePlanFile
|
|
69
|
-
} from "./chunk-JFOPOMK7.js";
|
|
69
|
+
} from "./chunk-LCU6GBZP.js";
|
|
70
70
|
import {
|
|
71
71
|
addPrStackLayer,
|
|
72
72
|
allocateTeamName,
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
worktreeDisplayLabelForGroup,
|
|
117
117
|
worktreeNameFromPath,
|
|
118
118
|
worktreeSlugForTicket
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-QSEF2YVQ.js";
|
|
120
120
|
import {
|
|
121
121
|
ATTACHMENTS_DIR,
|
|
122
122
|
DETACHED_JOBS_DIR,
|
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
updateAdvancedSettings,
|
|
171
171
|
usageOnLimit,
|
|
172
172
|
writeSecureJson
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-X743YN5Y.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-Q33M24ZJ.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-JPJ3FKKY.js");
|
|
805
805
|
if (isGlobalThread2(thread)) {
|
|
806
|
-
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-
|
|
806
|
+
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-U4PEZDAW.js");
|
|
807
807
|
ensureGlobalCoordinatorCwd2(
|
|
808
808
|
isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
|
|
809
809
|
);
|
|
@@ -3602,7 +3602,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
3602
3602
|
});
|
|
3603
3603
|
await requireAgent(resolved.agent);
|
|
3604
3604
|
if (input.cowboy) {
|
|
3605
|
-
const { cowboyModeEnabled } = await import("./app-settings-
|
|
3605
|
+
const { cowboyModeEnabled } = await import("./app-settings-LGHMNHSP.js");
|
|
3606
3606
|
if (!cowboyModeEnabled()) {
|
|
3607
3607
|
throw new Error(
|
|
3608
3608
|
"Cowboy mode is off. Enable it in Settings \u2192 Advanced."
|
|
@@ -3660,7 +3660,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
3660
3660
|
let sourceIsFork = false;
|
|
3661
3661
|
if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
|
|
3662
3662
|
if (isAbleTimeConnected() && getIssueSource() === "abletime") {
|
|
3663
|
-
const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-
|
|
3663
|
+
const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-JFGZBDHH.js");
|
|
3664
3664
|
const task = await ensureAbleTimeTask({
|
|
3665
3665
|
title: title?.trim() || "Untitled work",
|
|
3666
3666
|
description: input.prompt?.trim() || void 0
|
|
@@ -4072,6 +4072,13 @@ var QUOTA_CONTINUE_PROMPT = (fromAgent, fallback) => [
|
|
|
4072
4072
|
"Proceed with the goal. Leave model Auto unless needed."
|
|
4073
4073
|
].join(" ");
|
|
4074
4074
|
var QUOTA_RESUME_PROMPT = "Session/usage limit window should have reset. Continue this chat from where you left off.";
|
|
4075
|
+
async function isolateQuotaFailover(run2) {
|
|
4076
|
+
try {
|
|
4077
|
+
return await run2();
|
|
4078
|
+
} catch {
|
|
4079
|
+
return true;
|
|
4080
|
+
}
|
|
4081
|
+
}
|
|
4075
4082
|
function createQuotaFailoverChat(from, fallbackAgent, limitText) {
|
|
4076
4083
|
const handoff = buildQuotaHandoffAttachment(from, limitText, fallbackAgent);
|
|
4077
4084
|
const tab = createChatTab({
|
|
@@ -4189,7 +4196,7 @@ async function adoptThread(input) {
|
|
|
4189
4196
|
messages: input.messages ?? []
|
|
4190
4197
|
});
|
|
4191
4198
|
writeThread(thread);
|
|
4192
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
4199
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-U6P6DB44.js");
|
|
4193
4200
|
await ensureWorkspace2(repoPath);
|
|
4194
4201
|
const { ensureWorktreeSideboardIgnored: ensureWorktreeSideboardIgnored2 } = await import("./worktree-exclude-N5X5I422.js");
|
|
4195
4202
|
await ensureWorktreeSideboardIgnored2(input.worktreePath);
|
|
@@ -6567,7 +6574,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
6567
6574
|
${prompt}`;
|
|
6568
6575
|
}
|
|
6569
6576
|
async function defaultDeps() {
|
|
6570
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
6577
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-Q33M24ZJ.js");
|
|
6571
6578
|
const orch = getOrchestrator2();
|
|
6572
6579
|
return {
|
|
6573
6580
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -6842,7 +6849,7 @@ var Orchestrator = class {
|
|
|
6842
6849
|
orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
|
|
6843
6850
|
});
|
|
6844
6851
|
}
|
|
6845
|
-
const { autoCleanupOrphansEnabled } = await import("./app-settings-
|
|
6852
|
+
const { autoCleanupOrphansEnabled } = await import("./app-settings-LGHMNHSP.js");
|
|
6846
6853
|
if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
|
|
6847
6854
|
await cleanupOrphanWorktrees({ repoPaths });
|
|
6848
6855
|
}
|
|
@@ -6964,51 +6971,62 @@ var Orchestrator = class {
|
|
|
6964
6971
|
if (plan.action === "wait_reset" && plan.resumeAt) {
|
|
6965
6972
|
this.haltDrain.add(threadId);
|
|
6966
6973
|
this.scheduleQuotaResume(threadId, plan.resumeAt);
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6974
|
+
try {
|
|
6975
|
+
setStatus(threadId, "idle", null);
|
|
6976
|
+
appendMessage(threadId, {
|
|
6977
|
+
role: "agent",
|
|
6978
|
+
text: `Sideboard will auto-retry this chat around ${plan.resumeAt.toLocaleString()} when the session limit resets.`,
|
|
6979
|
+
ts: (/* @__PURE__ */ new Date()).toISOString()
|
|
6980
|
+
});
|
|
6981
|
+
this.emit({
|
|
6982
|
+
type: "quota_failover",
|
|
6983
|
+
threadId,
|
|
6984
|
+
action: "wait_reset",
|
|
6985
|
+
message: plan.reason,
|
|
6986
|
+
resumeAt: plan.resumeAt.toISOString()
|
|
6987
|
+
});
|
|
6988
|
+
this.emit({ type: "status_changed", threadId, status: "idle" });
|
|
6989
|
+
} catch {
|
|
6990
|
+
}
|
|
6981
6991
|
return true;
|
|
6982
6992
|
}
|
|
6983
6993
|
if (plan.action === "switch_agent" && plan.fallbackAgent) {
|
|
6984
6994
|
this.haltDrain.add(threadId);
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6995
|
+
let next;
|
|
6996
|
+
try {
|
|
6997
|
+
next = createQuotaFailoverChat(
|
|
6998
|
+
thread,
|
|
6999
|
+
plan.fallbackAgent,
|
|
7000
|
+
plan.limitText
|
|
7001
|
+
);
|
|
7002
|
+
} catch {
|
|
7003
|
+
return false;
|
|
7004
|
+
}
|
|
6990
7005
|
this.clearQuotaResumeTimer(threadId);
|
|
6991
7006
|
try {
|
|
6992
7007
|
updateThread(threadId, { quotaResumeAt: null });
|
|
6993
7008
|
} catch {
|
|
6994
7009
|
}
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7010
|
+
try {
|
|
7011
|
+
appendMessage(threadId, {
|
|
7012
|
+
role: "agent",
|
|
7013
|
+
text: `Session limit on ${thread.agent}. Sideboard continued on ${plan.fallbackAgent} (Auto) in [${next.title}](sideboard://thread/${next.id}).`,
|
|
7014
|
+
ts: (/* @__PURE__ */ new Date()).toISOString()
|
|
7015
|
+
});
|
|
7016
|
+
this.emit({
|
|
7017
|
+
type: "quota_failover",
|
|
7018
|
+
threadId,
|
|
7019
|
+
action: "switch_agent",
|
|
7020
|
+
toThreadId: next.id,
|
|
7021
|
+
message: plan.reason
|
|
7022
|
+
});
|
|
7023
|
+
this.emit({
|
|
7024
|
+
type: "status_changed",
|
|
7025
|
+
threadId: next.id,
|
|
7026
|
+
status: next.status
|
|
7027
|
+
});
|
|
7028
|
+
} catch {
|
|
7029
|
+
}
|
|
7012
7030
|
void this.send(
|
|
7013
7031
|
next.id,
|
|
7014
7032
|
QUOTA_CONTINUE_PROMPT(thread.agent, plan.fallbackAgent)
|
|
@@ -7123,7 +7141,7 @@ var Orchestrator = class {
|
|
|
7123
7141
|
}
|
|
7124
7142
|
await setup;
|
|
7125
7143
|
if (skipSetup) return;
|
|
7126
|
-
const { autoRunAfterSetupEnabled } = await import("./app-settings-
|
|
7144
|
+
const { autoRunAfterSetupEnabled } = await import("./app-settings-LGHMNHSP.js");
|
|
7127
7145
|
if (autoRunAfterSetupEnabled()) {
|
|
7128
7146
|
try {
|
|
7129
7147
|
await this.startDev(threadId);
|
|
@@ -7447,7 +7465,7 @@ var Orchestrator = class {
|
|
|
7447
7465
|
}
|
|
7448
7466
|
const isBrightsy = fresh.agent === "brightsy";
|
|
7449
7467
|
const isOrchestration = isOrchestratorThread(fresh);
|
|
7450
|
-
const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-
|
|
7468
|
+
const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-LGHMNHSP.js");
|
|
7451
7469
|
const gitAuthMode = getGithubGitAuthMode();
|
|
7452
7470
|
const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
|
|
7453
7471
|
githubSlug: await resolveGithubRepoSlug(fresh.worktreePath).catch(
|
|
@@ -7739,9 +7757,8 @@ var Orchestrator = class {
|
|
|
7739
7757
|
this.maybeEnqueueJobContinue(threadId, chatText, parts);
|
|
7740
7758
|
} else {
|
|
7741
7759
|
const blob = [chatText, detail].filter(Boolean).join("\n");
|
|
7742
|
-
const failedOver = await
|
|
7743
|
-
threadId,
|
|
7744
|
-
blob
|
|
7760
|
+
const failedOver = await isolateQuotaFailover(
|
|
7761
|
+
() => this.maybeHandleOrchestrationQuotaFailover(threadId, blob)
|
|
7745
7762
|
);
|
|
7746
7763
|
this.maybeEnqueueCrashContinue(threadId, {
|
|
7747
7764
|
detail: detail || failDetail,
|
|
@@ -7775,9 +7792,8 @@ var Orchestrator = class {
|
|
|
7775
7792
|
this.emit({ type: "status_changed", threadId, status: "error" });
|
|
7776
7793
|
}
|
|
7777
7794
|
this.emit({ type: "turn_finished", threadId, exitCode: 1 });
|
|
7778
|
-
const failedOver = await
|
|
7779
|
-
threadId,
|
|
7780
|
-
message
|
|
7795
|
+
const failedOver = await isolateQuotaFailover(
|
|
7796
|
+
() => this.maybeHandleOrchestrationQuotaFailover(threadId, message)
|
|
7781
7797
|
);
|
|
7782
7798
|
this.maybeEnqueueCrashContinue(threadId, {
|
|
7783
7799
|
detail: message,
|
|
@@ -8444,7 +8460,7 @@ var Orchestrator = class {
|
|
|
8444
8460
|
updateThread(thread.id, { title: meta.title });
|
|
8445
8461
|
}
|
|
8446
8462
|
}
|
|
8447
|
-
const { autoArchiveOnMergeEnabled } = await import("./app-settings-
|
|
8463
|
+
const { autoArchiveOnMergeEnabled } = await import("./app-settings-LGHMNHSP.js");
|
|
8448
8464
|
const latest = this.requireThread(thread.id);
|
|
8449
8465
|
if (!shouldAutoArchiveOnPrMerge({
|
|
8450
8466
|
previousPrState: prevState || null,
|
|
@@ -8736,7 +8752,7 @@ var Orchestrator = class {
|
|
|
8736
8752
|
this.emit({ type: "status_changed", threadId: archived.id, status: "archived" });
|
|
8737
8753
|
if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
|
|
8738
8754
|
try {
|
|
8739
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
8755
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-U6P6DB44.js");
|
|
8740
8756
|
await ensureWorkspace2(thread.repoPath);
|
|
8741
8757
|
} catch {
|
|
8742
8758
|
}
|
|
@@ -8763,7 +8779,7 @@ var Orchestrator = class {
|
|
|
8763
8779
|
await runArchiveScript(thread.repoPath, thread.worktreePath);
|
|
8764
8780
|
} catch {
|
|
8765
8781
|
}
|
|
8766
|
-
const { deleteBranchOnPurgeEnabled } = await import("./app-settings-
|
|
8782
|
+
const { deleteBranchOnPurgeEnabled } = await import("./app-settings-LGHMNHSP.js");
|
|
8767
8783
|
const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
|
|
8768
8784
|
await removeWorktree(thread.repoPath, thread.worktreePath, {
|
|
8769
8785
|
deleteBranch: deleteBranch ? thread.branchName : void 0
|
|
@@ -8790,7 +8806,7 @@ var Orchestrator = class {
|
|
|
8790
8806
|
`Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
|
|
8791
8807
|
);
|
|
8792
8808
|
}
|
|
8793
|
-
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-
|
|
8809
|
+
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-FL3UIUKQ.js");
|
|
8794
8810
|
const slug = thread.worktreePath.split("/").pop();
|
|
8795
8811
|
const dest = thread.worktreePath;
|
|
8796
8812
|
await withRepoGitLock(thread.repoPath, async () => {
|
|
@@ -8900,7 +8916,7 @@ async function startOrchestration(opts) {
|
|
|
8900
8916
|
sourceRef: "default",
|
|
8901
8917
|
...createOpts
|
|
8902
8918
|
}).catch(async () => {
|
|
8903
|
-
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-
|
|
8919
|
+
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-FL3UIUKQ.js");
|
|
8904
8920
|
const repo = await resolveRepoRoot2(repoPath);
|
|
8905
8921
|
const def = await resolveDefaultBranch2(repo);
|
|
8906
8922
|
return orch.createThread({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
isOrchestratorThread
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LCU6GBZP.js";
|
|
6
6
|
import {
|
|
7
7
|
applyConnectedTeamToCli,
|
|
8
8
|
brightsyMcpServerName,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
mergeAgentGitAuthEnv,
|
|
21
21
|
resolveAgentGitAuthEnv,
|
|
22
22
|
resolveCodexGitWritableRoots
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-QSEF2YVQ.js";
|
|
24
24
|
import {
|
|
25
25
|
enrichPathWithNpmGlobalBin,
|
|
26
26
|
isConductorBundledCli,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
resolveClaudeExecutable,
|
|
39
39
|
unwrapStrippedElectronLaunch,
|
|
40
40
|
wrapElectronAsNodeLaunch
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-X743YN5Y.js";
|
|
42
42
|
import {
|
|
43
43
|
appDataDir
|
|
44
44
|
} from "./chunk-EQNRWDLN.js";
|
|
@@ -2423,7 +2423,7 @@ var claudeAdapter = {
|
|
|
2423
2423
|
);
|
|
2424
2424
|
}
|
|
2425
2425
|
const mode = permissionMode(thread);
|
|
2426
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
2426
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-JPJ3FKKY.js");
|
|
2427
2427
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
2428
2428
|
const injectedServers = await buildInjectedMcpServers({
|
|
2429
2429
|
includeSideboard: true,
|
|
@@ -356,6 +356,9 @@ function normalizeVault(raw) {
|
|
|
356
356
|
if (typeof raw.abletimeAccessToken === "string" && raw.abletimeAccessToken.trim()) {
|
|
357
357
|
out.abletimeAccessToken = raw.abletimeAccessToken.trim();
|
|
358
358
|
}
|
|
359
|
+
if (typeof raw.abletimeRefreshToken === "string" && raw.abletimeRefreshToken.trim()) {
|
|
360
|
+
out.abletimeRefreshToken = raw.abletimeRefreshToken.trim();
|
|
361
|
+
}
|
|
359
362
|
if (typeof raw.vercelToken === "string" && raw.vercelToken.trim()) {
|
|
360
363
|
out.vercelToken = raw.vercelToken.trim();
|
|
361
364
|
}
|
|
@@ -437,6 +440,7 @@ function emptyPublicIntegrations() {
|
|
|
437
440
|
hasSlackAppToken: false,
|
|
438
441
|
hasGithubPat: false,
|
|
439
442
|
hasAbleTimeToken: false,
|
|
443
|
+
hasAbleTimeOAuth: false,
|
|
440
444
|
hasVercelToken: false,
|
|
441
445
|
hasSupabaseToken: false,
|
|
442
446
|
hasPosthogToken: false,
|
|
@@ -461,6 +465,7 @@ function toPublicAppSettings(settings) {
|
|
|
461
465
|
const slackAppToken = integrations.slackAppToken;
|
|
462
466
|
const githubPat = integrations.githubPat;
|
|
463
467
|
const abletimeAccessToken = integrations.abletimeAccessToken;
|
|
468
|
+
const abletimeRefreshToken = integrations.abletimeRefreshToken;
|
|
464
469
|
const vercelToken = integrations.vercelToken;
|
|
465
470
|
const supabaseAccessToken = integrations.supabaseAccessToken;
|
|
466
471
|
const posthogPersonalApiKey = integrations.posthogPersonalApiKey;
|
|
@@ -473,6 +478,7 @@ function toPublicAppSettings(settings) {
|
|
|
473
478
|
delete integrations.slackAppToken;
|
|
474
479
|
delete integrations.githubPat;
|
|
475
480
|
delete integrations.abletimeAccessToken;
|
|
481
|
+
delete integrations.abletimeRefreshToken;
|
|
476
482
|
delete integrations.vercelToken;
|
|
477
483
|
delete integrations.supabaseAccessToken;
|
|
478
484
|
delete integrations.posthogPersonalApiKey;
|
|
@@ -487,7 +493,8 @@ function toPublicAppSettings(settings) {
|
|
|
487
493
|
hasSlackClientSecret: Boolean(slackClientSecret?.trim()),
|
|
488
494
|
hasSlackAppToken: Boolean(slackAppToken?.trim()),
|
|
489
495
|
hasGithubPat: Boolean(githubPat?.trim()),
|
|
490
|
-
hasAbleTimeToken: Boolean(abletimeAccessToken?.trim()),
|
|
496
|
+
hasAbleTimeToken: Boolean(abletimeAccessToken?.trim() || abletimeRefreshToken?.trim()),
|
|
497
|
+
hasAbleTimeOAuth: Boolean(abletimeRefreshToken?.trim()),
|
|
491
498
|
hasVercelToken: Boolean(vercelToken?.trim()),
|
|
492
499
|
hasSupabaseToken: Boolean(supabaseAccessToken?.trim()),
|
|
493
500
|
hasPosthogToken: Boolean(posthogPersonalApiKey?.trim()),
|
|
@@ -633,6 +640,16 @@ function normalizeIntegrations(raw) {
|
|
|
633
640
|
const token = source.abletimeAccessToken.trim();
|
|
634
641
|
if (token) out.abletimeAccessToken = token;
|
|
635
642
|
}
|
|
643
|
+
if (typeof source.abletimeRefreshToken === "string") {
|
|
644
|
+
const token = source.abletimeRefreshToken.trim();
|
|
645
|
+
if (token) out.abletimeRefreshToken = token;
|
|
646
|
+
}
|
|
647
|
+
if (typeof source.abletimeTokenExpiresAt === "number" && Number.isFinite(source.abletimeTokenExpiresAt)) {
|
|
648
|
+
out.abletimeTokenExpiresAt = source.abletimeTokenExpiresAt;
|
|
649
|
+
} else if (typeof source.abletimeTokenExpiresAt === "string") {
|
|
650
|
+
const n = Number(source.abletimeTokenExpiresAt);
|
|
651
|
+
if (Number.isFinite(n)) out.abletimeTokenExpiresAt = n;
|
|
652
|
+
}
|
|
636
653
|
if (typeof source.abletimeHost === "string") {
|
|
637
654
|
const host = source.abletimeHost.trim();
|
|
638
655
|
if (host) out.abletimeHost = host;
|
|
@@ -921,7 +938,7 @@ function readSettingsFile() {
|
|
|
921
938
|
}
|
|
922
939
|
function diskHoldsSecrets(disk) {
|
|
923
940
|
return Boolean(
|
|
924
|
-
disk.integrations.linearApiKey || disk.integrations.linearAccessToken || disk.integrations.linearRefreshToken || disk.integrations.linearClientSecret || disk.integrations.slackClientSecret || disk.integrations.slackAppToken || disk.integrations.githubPat || disk.integrations.abletimeAccessToken || disk.integrations.vercelToken || disk.integrations.supabaseAccessToken || disk.integrations.posthogPersonalApiKey || disk.integrations.sentryAuthToken || Object.keys(disk.environment).length > 0
|
|
941
|
+
disk.integrations.linearApiKey || disk.integrations.linearAccessToken || disk.integrations.linearRefreshToken || disk.integrations.linearClientSecret || disk.integrations.slackClientSecret || disk.integrations.slackAppToken || disk.integrations.githubPat || disk.integrations.abletimeAccessToken || disk.integrations.abletimeRefreshToken || disk.integrations.vercelToken || disk.integrations.supabaseAccessToken || disk.integrations.posthogPersonalApiKey || disk.integrations.sentryAuthToken || Object.keys(disk.environment).length > 0
|
|
925
942
|
);
|
|
926
943
|
}
|
|
927
944
|
function mergeVault(disk) {
|
|
@@ -952,6 +969,9 @@ function mergeVault(disk) {
|
|
|
952
969
|
if (vault.abletimeAccessToken && !integrations.abletimeAccessToken) {
|
|
953
970
|
integrations.abletimeAccessToken = vault.abletimeAccessToken;
|
|
954
971
|
}
|
|
972
|
+
if (vault.abletimeRefreshToken && !integrations.abletimeRefreshToken) {
|
|
973
|
+
integrations.abletimeRefreshToken = vault.abletimeRefreshToken;
|
|
974
|
+
}
|
|
955
975
|
if (vault.vercelToken && !integrations.vercelToken) {
|
|
956
976
|
integrations.vercelToken = vault.vercelToken;
|
|
957
977
|
}
|
|
@@ -976,6 +996,7 @@ function persistSplit(settings) {
|
|
|
976
996
|
const slackAppToken = integrations.slackAppToken;
|
|
977
997
|
const githubPat = integrations.githubPat;
|
|
978
998
|
const abletimeAccessToken = integrations.abletimeAccessToken;
|
|
999
|
+
const abletimeRefreshToken = integrations.abletimeRefreshToken;
|
|
979
1000
|
const vercelToken = integrations.vercelToken;
|
|
980
1001
|
const supabaseAccessToken = integrations.supabaseAccessToken;
|
|
981
1002
|
const posthogPersonalApiKey = integrations.posthogPersonalApiKey;
|
|
@@ -988,6 +1009,7 @@ function persistSplit(settings) {
|
|
|
988
1009
|
delete integrations.slackAppToken;
|
|
989
1010
|
delete integrations.githubPat;
|
|
990
1011
|
delete integrations.abletimeAccessToken;
|
|
1012
|
+
delete integrations.abletimeRefreshToken;
|
|
991
1013
|
delete integrations.vercelToken;
|
|
992
1014
|
delete integrations.supabaseAccessToken;
|
|
993
1015
|
delete integrations.posthogPersonalApiKey;
|
|
@@ -1006,6 +1028,7 @@ function persistSplit(settings) {
|
|
|
1006
1028
|
slackAppToken,
|
|
1007
1029
|
githubPat,
|
|
1008
1030
|
abletimeAccessToken,
|
|
1031
|
+
abletimeRefreshToken,
|
|
1009
1032
|
vercelToken,
|
|
1010
1033
|
supabaseAccessToken,
|
|
1011
1034
|
posthogPersonalApiKey,
|
|
@@ -1192,6 +1215,8 @@ function updateIntegrationsSettings(patch) {
|
|
|
1192
1215
|
if ("abletimeAccessToken" in patch) {
|
|
1193
1216
|
if (patch.abletimeAccessToken == null || patch.abletimeAccessToken.trim() === "") {
|
|
1194
1217
|
delete integrations.abletimeAccessToken;
|
|
1218
|
+
delete integrations.abletimeRefreshToken;
|
|
1219
|
+
delete integrations.abletimeTokenExpiresAt;
|
|
1195
1220
|
delete integrations.abletimeViewerName;
|
|
1196
1221
|
} else {
|
|
1197
1222
|
integrations.abletimeAccessToken = patch.abletimeAccessToken.trim();
|
|
@@ -1544,7 +1569,9 @@ function disconnectLinearConnection() {
|
|
|
1544
1569
|
return saveAppSettings({ ...current, integrations });
|
|
1545
1570
|
}
|
|
1546
1571
|
function isAbleTimeConnected(settings = loadAppSettings()) {
|
|
1547
|
-
return Boolean(
|
|
1572
|
+
return Boolean(
|
|
1573
|
+
settings.integrations.abletimeAccessToken?.trim() || settings.integrations.abletimeRefreshToken?.trim()
|
|
1574
|
+
);
|
|
1548
1575
|
}
|
|
1549
1576
|
function getAbleTimeAccessToken(settings = loadAppSettings()) {
|
|
1550
1577
|
const token = settings.integrations.abletimeAccessToken?.trim();
|
|
@@ -1557,6 +1584,12 @@ function saveAbleTimeConnection(input) {
|
|
|
1557
1584
|
const current = loadAppSettings();
|
|
1558
1585
|
const integrations = { ...current.integrations };
|
|
1559
1586
|
integrations.abletimeAccessToken = input.accessToken.trim();
|
|
1587
|
+
if (input.refreshToken?.trim()) {
|
|
1588
|
+
integrations.abletimeRefreshToken = input.refreshToken.trim();
|
|
1589
|
+
}
|
|
1590
|
+
if (typeof input.expiresIn === "number" && Number.isFinite(input.expiresIn)) {
|
|
1591
|
+
integrations.abletimeTokenExpiresAt = Date.now() + Math.max(0, input.expiresIn) * 1e3;
|
|
1592
|
+
}
|
|
1560
1593
|
if (input.host?.trim()) {
|
|
1561
1594
|
integrations.abletimeHost = input.host.trim();
|
|
1562
1595
|
}
|
|
@@ -1569,6 +1602,8 @@ function disconnectAbleTimeConnection() {
|
|
|
1569
1602
|
const current = loadAppSettings();
|
|
1570
1603
|
const integrations = { ...current.integrations };
|
|
1571
1604
|
delete integrations.abletimeAccessToken;
|
|
1605
|
+
delete integrations.abletimeRefreshToken;
|
|
1606
|
+
delete integrations.abletimeTokenExpiresAt;
|
|
1572
1607
|
delete integrations.abletimeViewerName;
|
|
1573
1608
|
return saveAppSettings({ ...current, integrations });
|
|
1574
1609
|
}
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
enrichWorkspacesWithGithub,
|
|
8
8
|
ensureGlobalCoordinatorCwd,
|
|
9
9
|
formatWorkspaceInventory
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-TNDUTGDV.js";
|
|
11
|
+
import "./chunk-CMGRV36E.js";
|
|
12
12
|
import "./chunk-6K64FJDD.js";
|
|
13
13
|
import "./chunk-QQKDGPUI.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-QFBBUFD4.js";
|
|
15
15
|
import "./chunk-4TR3HZFT.js";
|
|
16
16
|
import "./chunk-WDRMZKVB.js";
|
|
17
17
|
import "./chunk-JT7R45JB.js";
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
enrichWorkspacesWithGithub,
|
|
10
10
|
ensureGlobalCoordinatorCwd,
|
|
11
11
|
formatWorkspaceInventory
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-LCU6GBZP.js";
|
|
13
|
+
import "./chunk-QSEF2YVQ.js";
|
|
14
14
|
import "./chunk-D6JWYJ4P.js";
|
|
15
15
|
import "./chunk-INNLWYXW.js";
|
|
16
16
|
import "./chunk-SYFVUF2C.js";
|
|
17
17
|
import "./chunk-FNQNJOHY.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-X743YN5Y.js";
|
|
19
19
|
import "./chunk-NSTQ6QKD.js";
|
|
20
20
|
import "./chunk-KGZBYWZ3.js";
|
|
21
21
|
import "./chunk-EQNRWDLN.js";
|
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
orchestratorSessionPoisonedByBuiltins,
|
|
18
18
|
slackCoordinatorSourceRef,
|
|
19
19
|
takenTeamSlugsForOrchestration
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-LCU6GBZP.js";
|
|
21
|
+
import "./chunk-QSEF2YVQ.js";
|
|
22
22
|
import "./chunk-D6JWYJ4P.js";
|
|
23
23
|
import "./chunk-INNLWYXW.js";
|
|
24
24
|
import "./chunk-SYFVUF2C.js";
|
|
25
25
|
import "./chunk-FNQNJOHY.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-X743YN5Y.js";
|
|
27
27
|
import "./chunk-NSTQ6QKD.js";
|
|
28
28
|
import "./chunk-KGZBYWZ3.js";
|
|
29
29
|
import {
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
orchestratorSessionPoisonedByBuiltins,
|
|
16
16
|
slackCoordinatorSourceRef,
|
|
17
17
|
takenTeamSlugsForOrchestration
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-TNDUTGDV.js";
|
|
19
|
+
import "./chunk-CMGRV36E.js";
|
|
20
20
|
import "./chunk-6K64FJDD.js";
|
|
21
21
|
import "./chunk-QQKDGPUI.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-QFBBUFD4.js";
|
|
23
23
|
import "./chunk-4TR3HZFT.js";
|
|
24
24
|
import "./chunk-WDRMZKVB.js";
|
|
25
25
|
import "./chunk-JT7R45JB.js";
|