@sideboard-ai/core 0.1.111 → 0.1.116
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/agents/cursor-runner.cjs +51 -21
- package/dist/agents/cursor-runner.js +3 -3
- package/dist/{agents-NN22A4G5.js → agents-7NIX44RB.js} +7 -7
- package/dist/{agents-GH3FWDW2.js → agents-DU7DHY7A.js} +10 -10
- package/dist/{chunk-JTQQPJAU.js → chunk-4HOFVKPC.js} +52 -38
- package/dist/{chunk-4EWPKYOU.js → chunk-4OJMZ6P2.js} +2 -2
- package/dist/{chunk-NC3U42ZP.js → chunk-5KSLD4MU.js} +317 -33
- package/dist/{chunk-KQBI5HNT.js → chunk-7WC5UWEB.js} +2 -2
- package/dist/{chunk-WIHKHR5R.js → chunk-AXQ4ZWHK.js} +5 -0
- package/dist/{chunk-LGXBYZZA.js → chunk-DVM4ID64.js} +69 -13
- package/dist/{chunk-DMJKOFTO.js → chunk-DWP25N32.js} +44 -35
- package/dist/{chunk-2GO3YKBA.js → chunk-EKIDHL2T.js} +4 -4
- package/dist/{chunk-C4KHDW3U.js → chunk-FZCIQYNQ.js} +1 -1
- package/dist/{chunk-363Z34PY.js → chunk-GBY7OOMB.js} +273 -218
- package/dist/{chunk-7KWYXGIU.js → chunk-K3TIQXOH.js} +2 -2
- package/dist/{chunk-3KETJKYA.js → chunk-KPIYENTF.js} +69 -13
- package/dist/{chunk-KVFNTWFG.js → chunk-OFF5AFCR.js} +300 -43
- package/dist/{chunk-VOD3HFLP.js → chunk-XOYQ7LNQ.js} +2 -2
- package/dist/{chunk-7YKXHBIW.js → chunk-YMRT2DU6.js} +3 -3
- package/dist/{chunk-YXDR43ZC.js → chunk-ZMROW673.js} +5 -5
- package/dist/{chunk-YFAXVUY2.js → chunk-ZRCX43LS.js} +2 -2
- package/dist/{chunk-AROMOP3C.js → chunk-ZYEFCSZJ.js} +2 -2
- package/dist/{connected-teams-M5XNXRI5.js → connected-teams-O6D4PM7A.js} +2 -2
- package/dist/{connected-teams-J4I5AKMR.js → connected-teams-ZCOU6KCD.js} +2 -2
- package/dist/{coordinator-prompt-AR66L3N4.js → coordinator-prompt-4KCALEKD.js} +3 -3
- package/dist/{coordinator-prompt-BHMLWL64.js → coordinator-prompt-FML4I5AR.js} +3 -3
- package/dist/{global-workspace-XSUFEIAQ.js → global-workspace-CSWABOG5.js} +4 -4
- package/dist/{global-workspace-SKFODUQQ.js → global-workspace-H4YNASM6.js} +4 -4
- package/dist/index.cjs +855 -440
- package/dist/index.d.cts +59 -1
- package/dist/index.d.ts +59 -1
- package/dist/index.js +37 -17
- package/dist/mcp/run-stdio.cjs +966 -635
- package/dist/mcp/run-stdio.js +20 -16
- package/dist/{orchestrator-4T2SXDZ7.js → orchestrator-NXPANCZA.js} +8 -8
- package/dist/{orchestrator-EP57AB5W.js → orchestrator-ZY4RUJKT.js} +10 -10
- package/dist/{run-XKTAJRWF.js → run-USF6FRKV.js} +3 -1
- package/dist/{run-CFKZPY7F.js → run-XQKGHQZ2.js} +3 -1
- package/dist/{workspaces-XAQVKTLO.js → workspaces-HJ3EVATC.js} +5 -5
- package/dist/{workspaces-HV3J4TTW.js → workspaces-QG6PGFQR.js} +5 -5
- package/dist/{worktree-XFJED3VU.js → worktree-IW3BX26B.js} +2 -2
- package/dist/{worktree-N2EV24EE.js → worktree-OTFQO2W7.js} +2 -2
- package/package.json +1 -1
|
@@ -7,7 +7,9 @@ import {
|
|
|
7
7
|
finalizeParts,
|
|
8
8
|
getAdapter,
|
|
9
9
|
isBrightsyNdjsonLine,
|
|
10
|
+
isPollWrapperToolName,
|
|
10
11
|
isSessionQuotaLimit,
|
|
12
|
+
liveActivitySummary,
|
|
11
13
|
normalizeParseResult,
|
|
12
14
|
parseBrightsyCliLine,
|
|
13
15
|
parseSessionQuotaResetAt,
|
|
@@ -15,13 +17,13 @@ import {
|
|
|
15
17
|
resolveQuotaFallbackAgent,
|
|
16
18
|
stripBrightsyNdjsonNoise,
|
|
17
19
|
toolDescription
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5KSLD4MU.js";
|
|
19
21
|
import {
|
|
20
22
|
addWorkspace,
|
|
21
23
|
ensureWorkspace,
|
|
22
24
|
removeWorkspace,
|
|
23
25
|
syncWorkspacesFromThreads
|
|
24
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-K3TIQXOH.js";
|
|
25
27
|
import {
|
|
26
28
|
assertOrchestratorCapableAgent,
|
|
27
29
|
coerceOrchestratorAgent,
|
|
@@ -34,14 +36,14 @@ import {
|
|
|
34
36
|
isOrchestratorThread,
|
|
35
37
|
isSlackCoordinatorThread,
|
|
36
38
|
orchestratorSessionPoisonedByBuiltins
|
|
37
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-4OJMZ6P2.js";
|
|
38
40
|
import {
|
|
39
41
|
SLACK_REPLY_FORMATTING,
|
|
40
42
|
coordinatorSystemPrompt,
|
|
41
43
|
coordinatorTurnReminder,
|
|
42
44
|
enrichWorkspacesWithGithub,
|
|
43
45
|
ensureGlobalCoordinatorCwd
|
|
44
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-7WC5UWEB.js";
|
|
45
47
|
import {
|
|
46
48
|
extractPresentedPlan,
|
|
47
49
|
readPlanFile,
|
|
@@ -49,17 +51,19 @@ import {
|
|
|
49
51
|
} from "./chunk-QTUESPAW.js";
|
|
50
52
|
import {
|
|
51
53
|
createAgentStreamCoalescer
|
|
52
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-AXQ4ZWHK.js";
|
|
53
55
|
import {
|
|
56
|
+
applyAgentRunnerHeapEnv,
|
|
54
57
|
fallbackTurnFailDetail,
|
|
55
58
|
formatTurnExitError,
|
|
56
59
|
looksLikeAgentFailureMessage,
|
|
57
60
|
looksLikeInvalidAgentSession,
|
|
61
|
+
looksLikeV8Oom,
|
|
58
62
|
pushTurnStderr,
|
|
59
63
|
shouldRetryFailedAgentTurn,
|
|
60
64
|
summarizeTurnStderr,
|
|
61
65
|
turnFailChatText
|
|
62
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-GBY7OOMB.js";
|
|
63
67
|
import {
|
|
64
68
|
releaseCaffeinateHoldForThread
|
|
65
69
|
} from "./chunk-DCOZABNT.js";
|
|
@@ -105,7 +109,7 @@ import {
|
|
|
105
109
|
threadDisplayLabel,
|
|
106
110
|
withRepoGitLock,
|
|
107
111
|
worktreeNameFromPath
|
|
108
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-FZCIQYNQ.js";
|
|
109
113
|
import {
|
|
110
114
|
ATTACHMENTS_DIR,
|
|
111
115
|
LEGACY_ATTACHMENTS_DIR,
|
|
@@ -155,11 +159,13 @@ import {
|
|
|
155
159
|
worktreesRoot
|
|
156
160
|
} from "./chunk-QZQEXME2.js";
|
|
157
161
|
import {
|
|
162
|
+
clearStaleIndexLocks,
|
|
158
163
|
enrichPathWithNpmGlobalBin,
|
|
159
164
|
ensureAgentPath,
|
|
160
165
|
git,
|
|
166
|
+
resolveGitDirsForLockRecovery,
|
|
161
167
|
run
|
|
162
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-DVM4ID64.js";
|
|
163
169
|
|
|
164
170
|
// src/orchestrator/orchestrator.ts
|
|
165
171
|
import { EventEmitter } from "events";
|
|
@@ -749,9 +755,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
|
|
|
749
755
|
`Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
|
|
750
756
|
);
|
|
751
757
|
}
|
|
752
|
-
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-
|
|
758
|
+
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-CSWABOG5.js");
|
|
753
759
|
if (isGlobalThread2(thread)) {
|
|
754
|
-
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-
|
|
760
|
+
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-4KCALEKD.js");
|
|
755
761
|
ensureGlobalCoordinatorCwd2(
|
|
756
762
|
isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
|
|
757
763
|
);
|
|
@@ -768,6 +774,7 @@ async function spawnAgentTurn(thread, input, onEvent) {
|
|
|
768
774
|
}
|
|
769
775
|
const env = childEnvWithAppSettings(cmd.env);
|
|
770
776
|
applyPromptCacheTtlEnv(thread.agent, env);
|
|
777
|
+
applyAgentRunnerHeapEnv(env);
|
|
771
778
|
try {
|
|
772
779
|
if (isOrchestratorThread(thread)) {
|
|
773
780
|
mergeAgentGitAuthEnv(env, await resolveAgentGitAuthEnv(env));
|
|
@@ -2448,7 +2455,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
2448
2455
|
return readThread(thread.id) ?? thread;
|
|
2449
2456
|
}
|
|
2450
2457
|
async function listLinearIssues(agent, repoPath) {
|
|
2451
|
-
const { getAdapter: getAdapter2 } = await import("./agents-
|
|
2458
|
+
const { getAdapter: getAdapter2 } = await import("./agents-7NIX44RB.js");
|
|
2452
2459
|
await requireAgent(agent, { requireLinear: true });
|
|
2453
2460
|
const adapter = getAdapter2(agent);
|
|
2454
2461
|
if (!adapter.listLinearIssues) {
|
|
@@ -2496,21 +2503,13 @@ function summarizeTurnLive(parts) {
|
|
|
2496
2503
|
(p) => p.type === "tool"
|
|
2497
2504
|
);
|
|
2498
2505
|
const lastTool = tools[tools.length - 1];
|
|
2499
|
-
const
|
|
2500
|
-
const
|
|
2506
|
+
const interesting = [...tools].reverse().find((t) => !isPollWrapperToolName(t.name)) ?? lastTool;
|
|
2507
|
+
const lastToolLabel = interesting ? interesting.description || toolDescription(interesting.name, interesting.input) || interesting.name : void 0;
|
|
2501
2508
|
const thinking = lastText(parts, "thinking");
|
|
2502
2509
|
const text = lastText(parts, "text");
|
|
2503
2510
|
const excerptRaw = thinking || text;
|
|
2504
2511
|
const excerpt = excerptRaw.length > 280 ? `${excerptRaw.slice(-280)}` : excerptRaw || void 0;
|
|
2505
|
-
|
|
2506
|
-
if (lastToolLabel) {
|
|
2507
|
-
const verb = running ? lastToolLabel : `Finished ${lastToolLabel}`;
|
|
2508
|
-
summary = tools.length > 1 ? `${verb} (${tools.length} tools)` : verb;
|
|
2509
|
-
} else if (thinking) {
|
|
2510
|
-
summary = "Thinking\u2026";
|
|
2511
|
-
} else if (text) {
|
|
2512
|
-
summary = "Writing reply\u2026";
|
|
2513
|
-
}
|
|
2512
|
+
const summary = liveActivitySummary(parts);
|
|
2514
2513
|
return {
|
|
2515
2514
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2516
2515
|
summary,
|
|
@@ -2822,7 +2821,7 @@ async function adoptThread(input) {
|
|
|
2822
2821
|
throw new Error(`Worktree not found: ${input.worktreePath}`);
|
|
2823
2822
|
}
|
|
2824
2823
|
const repoPath = await resolveRepoRoot(input.worktreePath);
|
|
2825
|
-
const { stdout: branch } = await import("./run-
|
|
2824
|
+
const { stdout: branch } = await import("./run-XQKGHQZ2.js").then(
|
|
2826
2825
|
({ git: git2 }) => git2(["rev-parse", "--abbrev-ref", "HEAD"], input.worktreePath)
|
|
2827
2826
|
);
|
|
2828
2827
|
const thread = createEmptyThread({
|
|
@@ -2837,7 +2836,7 @@ async function adoptThread(input) {
|
|
|
2837
2836
|
messages: input.messages ?? []
|
|
2838
2837
|
});
|
|
2839
2838
|
writeThread(thread);
|
|
2840
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
2839
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-QG6PGFQR.js");
|
|
2841
2840
|
await ensureWorkspace2(repoPath);
|
|
2842
2841
|
return thread;
|
|
2843
2842
|
}
|
|
@@ -4147,7 +4146,7 @@ async function confirmLand(thread, opts) {
|
|
|
4147
4146
|
if (preview.dirty) {
|
|
4148
4147
|
committed = await commitAll(thread.worktreePath, meta.commitMessage);
|
|
4149
4148
|
}
|
|
4150
|
-
const { git: git2 } = await import("./run-
|
|
4149
|
+
const { git: git2 } = await import("./run-XQKGHQZ2.js");
|
|
4151
4150
|
const { stdout: headOut } = await git2(
|
|
4152
4151
|
["rev-parse", "--abbrev-ref", "HEAD"],
|
|
4153
4152
|
thread.worktreePath,
|
|
@@ -4744,14 +4743,15 @@ function formatArtifactDirective() {
|
|
|
4744
4743
|
return [
|
|
4745
4744
|
"Sideboard side column (desktop UI):",
|
|
4746
4745
|
"claude.ai\u2019s \u201CArtifact\u201D tool does NOT exist in Claude Code. That is expected.",
|
|
4746
|
+
"Do not unprompted-duplicate a payload. Chat markdown (including tables) already renders in the transcript \u2014 do not also call present_schema with those same rows just to display them. If the user asks for an editable / interactive table, call present_schema even if markdown already showed the data. Do not also call present_artifact for a document you already fenced in chat.",
|
|
4747
4747
|
"Documents (HTML/SVG/markdown):",
|
|
4748
4748
|
"1) Emit a fenced code block tagged `html` (preferred), `svg`, or `markdown` with the FULL document \u2014 Sideboard opens a side column. Example:",
|
|
4749
4749
|
"```html",
|
|
4750
4750
|
"<!DOCTYPE html><html><head><title>Demo</title></head><body><h1>Hi</h1></body></html>",
|
|
4751
4751
|
"```",
|
|
4752
|
-
"2) Or call Sideboard MCP `present_artifact` with title, type (html|svg|markdown), and content.",
|
|
4752
|
+
"2) Or call Sideboard MCP `present_artifact` with title, type (html|svg|markdown), and content \u2014 not both a fence and this tool for the same body.",
|
|
4753
4753
|
"CMS / JSON Schema forms & tables (Brightsy or any schema+schemaUi source):",
|
|
4754
|
-
"3) Call Sideboard MCP `present_schema`
|
|
4754
|
+
"3) Call Sideboard MCP `present_schema` when the user needs to filter, edit, publish, or persist rows \u2014 including after you already showed a markdown table, if they then ask for an editable table. If they only need to read the data, a markdown table is enough. When you do call it, pass title, mode (table|form), and either:",
|
|
4755
4755
|
" - datasource=brightsy + resource_id (record type UUID) after fetching types via Brightsy MCP, or",
|
|
4756
4756
|
" - datasource=inline + resource: { id, title, schema, schemaUi } and optional records/record.",
|
|
4757
4757
|
"Files / media browser (CMS file manager column):",
|
|
@@ -4760,11 +4760,11 @@ function formatArtifactDirective() {
|
|
|
4760
4760
|
"Multiple-choice questions:",
|
|
4761
4761
|
"5) Call Sideboard MCP `ask_user` only when work is blocked on choosing among a few concrete options (approach forks, which API, auth vs cookies). First write a short chat message that explains the decision and what each option means (tradeoffs, when to pick it). Include a description on every option. After calling, stop and wait for their next message with answers. If you are asking a real multiple-choice, use ask_user rather than chat bullets so Sideboard shows the composer picker.",
|
|
4762
4762
|
"Do not call ask_user for greetings, check-ins, \u201Chello\u201D, open-ended how-can-I-help, or to invent a menu of possible next tasks \u2014 reply in chat. If one option is the obvious default, proceed without asking.",
|
|
4763
|
-
"Never say artifacts, CMS UI, or the Files column are unavailable.
|
|
4763
|
+
"Never say artifacts, CMS UI, or the Files column are unavailable. present_schema is for interactive list/edit/publish (use it when they ask to edit, even if chat already had a markdown table); present_files for storage UI; html fences for standalone pages; ask_user only for those blocked predefined-option questions."
|
|
4764
4764
|
].join("\n");
|
|
4765
4765
|
}
|
|
4766
4766
|
function formatUiReminder() {
|
|
4767
|
-
return "Sideboard UI: html fence or present_artifact
|
|
4767
|
+
return "Sideboard UI: markdown table is enough to read data; present_schema if they ask to edit/filter (even after markdown); present_files for the file manager. html fence or present_artifact, not both for the same document. ask_user only for a real multiple-choice (not hellos or \u201Cwhat next?\u201D) \u2014 reply in chat. Do not say artifacts/CMS UI are unavailable.";
|
|
4768
4768
|
}
|
|
4769
4769
|
var FILES_BY_AGENT = {
|
|
4770
4770
|
claude: [
|
|
@@ -5109,7 +5109,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
5109
5109
|
${prompt}`;
|
|
5110
5110
|
}
|
|
5111
5111
|
async function defaultDeps() {
|
|
5112
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
5112
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-ZY4RUJKT.js");
|
|
5113
5113
|
const orch = getOrchestrator2();
|
|
5114
5114
|
return {
|
|
5115
5115
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -5901,7 +5901,15 @@ var Orchestrator = class {
|
|
|
5901
5901
|
hasSession: Boolean(this.requireThread(threadId).sessionId)
|
|
5902
5902
|
})) {
|
|
5903
5903
|
updateThread(threadId, { sessionId: null });
|
|
5904
|
-
|
|
5904
|
+
try {
|
|
5905
|
+
const gitDirs = await resolveGitDirsForLockRecovery(thread.worktreePath);
|
|
5906
|
+
const clearedLocks = clearStaleIndexLocks(gitDirs, 2e3);
|
|
5907
|
+
if (clearedLocks.length > 0) {
|
|
5908
|
+
pushTurnStderr(stderrTail, "Cleared a stale git lock left by the crashed agent process");
|
|
5909
|
+
}
|
|
5910
|
+
} catch {
|
|
5911
|
+
}
|
|
5912
|
+
const retryNote = looksLikeInvalidAgentSession(detail) ? "Agent session missing \u2014 starting a fresh session" : looksLikeV8Oom(detail) ? "Agent ran out of memory \u2014 starting a fresh session" : "Agent runner crashed \u2014 restarting Node once";
|
|
5905
5913
|
pushTurnStderr(stderrTail, retryNote);
|
|
5906
5914
|
this.emit({
|
|
5907
5915
|
type: "turn_output",
|
|
@@ -6373,13 +6381,14 @@ var Orchestrator = class {
|
|
|
6373
6381
|
const text = (lastAgent?.text ?? "").trim() || (thread.status === "error" ? lastError ?? "" : "");
|
|
6374
6382
|
const stillRunning = thread.status === "running" || thread.status === "queued";
|
|
6375
6383
|
const live = stillRunning ? readTurnLive(thread.id) : null;
|
|
6384
|
+
const queuedHint = thread.status === "queued" && !live?.summary ? "Queued \u2014 waiting for a concurrency slot" : null;
|
|
6376
6385
|
return {
|
|
6377
6386
|
text,
|
|
6378
6387
|
status: thread.status,
|
|
6379
6388
|
sessionId: thread.sessionId,
|
|
6380
6389
|
lastError,
|
|
6381
6390
|
stillRunning,
|
|
6382
|
-
progress: live?.summary ??
|
|
6391
|
+
progress: live?.summary ?? queuedHint,
|
|
6383
6392
|
lastActivityAt: live?.updatedAt ?? null
|
|
6384
6393
|
};
|
|
6385
6394
|
}
|
|
@@ -6848,7 +6857,7 @@ var Orchestrator = class {
|
|
|
6848
6857
|
this.emit({ type: "status_changed", threadId: archived.id, status: "archived" });
|
|
6849
6858
|
if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
|
|
6850
6859
|
try {
|
|
6851
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
6860
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-QG6PGFQR.js");
|
|
6852
6861
|
await ensureWorkspace2(thread.repoPath);
|
|
6853
6862
|
} catch {
|
|
6854
6863
|
}
|
|
@@ -6902,7 +6911,7 @@ var Orchestrator = class {
|
|
|
6902
6911
|
`Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
|
|
6903
6912
|
);
|
|
6904
6913
|
}
|
|
6905
|
-
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-
|
|
6914
|
+
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-IW3BX26B.js");
|
|
6906
6915
|
const slug = thread.worktreePath.split("/").pop();
|
|
6907
6916
|
const dest = thread.worktreePath;
|
|
6908
6917
|
await withRepoGitLock(thread.repoPath, async () => {
|
|
@@ -7010,7 +7019,7 @@ async function startOrchestration(opts) {
|
|
|
7010
7019
|
sourceRef: "default",
|
|
7011
7020
|
...createOpts
|
|
7012
7021
|
}).catch(async () => {
|
|
7013
|
-
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-
|
|
7022
|
+
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-IW3BX26B.js");
|
|
7014
7023
|
const repo = await resolveRepoRoot2(repoPath);
|
|
7015
7024
|
const def = await resolveDefaultBranch2(repo);
|
|
7016
7025
|
return orch.createThread({
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-QZQEXME2.js";
|
|
4
4
|
import {
|
|
5
5
|
run
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DVM4ID64.js";
|
|
7
7
|
|
|
8
8
|
// src/brightsy/connected-teams.ts
|
|
9
9
|
import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
@@ -36,7 +36,7 @@ function saveBrightsyConfig(cfg) {
|
|
|
36
36
|
|
|
37
37
|
// src/brightsy/accounts.ts
|
|
38
38
|
async function loadConnectedTeams() {
|
|
39
|
-
const { listConnectedBrightsyTeams: listConnectedBrightsyTeams2 } = await import("./connected-teams-
|
|
39
|
+
const { listConnectedBrightsyTeams: listConnectedBrightsyTeams2 } = await import("./connected-teams-ZCOU6KCD.js");
|
|
40
40
|
return listConnectedBrightsyTeams2();
|
|
41
41
|
}
|
|
42
42
|
async function runBrightsyTeamsJson(args) {
|
|
@@ -68,7 +68,7 @@ async function getBrightsySession() {
|
|
|
68
68
|
const data = await runBrightsyTeamsJson([]);
|
|
69
69
|
const accounts = Array.isArray(data.teams) ? data.teams : [];
|
|
70
70
|
const active = data.active ?? accounts.find((a) => a.active) ?? null;
|
|
71
|
-
const { ensureCliTeamTracked: ensureCliTeamTracked2 } = await import("./connected-teams-
|
|
71
|
+
const { ensureCliTeamTracked: ensureCliTeamTracked2 } = await import("./connected-teams-ZCOU6KCD.js");
|
|
72
72
|
const connectedTeams = ensureCliTeamTracked2(
|
|
73
73
|
active ? { id: active.id, slug: active.slug, name: active.name } : void 0
|
|
74
74
|
);
|
|
@@ -108,7 +108,7 @@ async function performBrightsyAccountSwitch(accountIdOrSlug) {
|
|
|
108
108
|
return { cfg, target: data.active };
|
|
109
109
|
}
|
|
110
110
|
async function switchBrightsyAccount(accountIdOrSlug) {
|
|
111
|
-
const { connectBrightsyTeam: connectBrightsyTeam2 } = await import("./connected-teams-
|
|
111
|
+
const { connectBrightsyTeam: connectBrightsyTeam2 } = await import("./connected-teams-ZCOU6KCD.js");
|
|
112
112
|
await connectBrightsyTeam2(accountIdOrSlug);
|
|
113
113
|
return getBrightsySession();
|
|
114
114
|
}
|