skydive-cli 0.4.0-beta.1068 → 0.4.0-beta.1105
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/js/bin.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as ensureActiveOrganization, D as setActiveWorkspace, E as listWorkspaces, O as name, T as getSessionIdentity, a as installCrashHandler, k as version, t as maybeStartProfiling, u as brandHelpArt, w as getActiveWorkspaceId, x as themes } from "./profiler-
|
|
2
|
+
import { C as ensureActiveOrganization, D as setActiveWorkspace, E as listWorkspaces, O as name, T as getSessionIdentity, a as installCrashHandler, k as version, t as maybeStartProfiling, u as brandHelpArt, w as getActiveWorkspaceId, x as themes } from "./profiler-Cr-wSEa_.mjs";
|
|
3
3
|
import { A as getStoredApiKeyWorkspaceName, C as getLastSeenVersion, F as resolveManagementAuth, I as resolveSession, M as resolveAppUrl, N as resolveChatAuth, O as getShareMachineDefault, P as resolveConfig, R as saveConfig, S as getConfigPath, T as getPromptHistoryPath, V as setLastSeenVersion, _ as API_KEY_PREFIX, b as PREFERENCES, g as API_KEY_FAMILY_PREFIX, h as API_KEYS_URL, i as resolveAgent, j as getUpdateCheckDisabled, k as getStoredApiKeyId, v as DEFAULT_API_URL, w as getPreference, x as deleteConfig, z as saveSession } from "./print-CiaU2ygh.mjs";
|
|
4
4
|
import { n as printError, r as printTable, t as output } from "./output-DYzzdXYV.mjs";
|
|
5
5
|
import { n as createRestClient, t as HttpError } from "./rest-CG7VpQ56.mjs";
|
|
@@ -1505,7 +1505,7 @@ const importCommand = {
|
|
|
1505
1505
|
process.exit(1);
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
|
-
const { runChat } = await import("./boot-
|
|
1508
|
+
const { runChat } = await import("./boot-flMhEOoE.mjs");
|
|
1509
1509
|
await runChat({
|
|
1510
1510
|
appUrl,
|
|
1511
1511
|
sessionToken: session.value.sessionToken,
|
|
@@ -1917,7 +1917,7 @@ const chatCommand = {
|
|
|
1917
1917
|
sessionToken: auth.value.token,
|
|
1918
1918
|
agentSelector: argv.agent ?? null
|
|
1919
1919
|
});
|
|
1920
|
-
const { runChat } = await import("./boot-
|
|
1920
|
+
const { runChat } = await import("./boot-flMhEOoE.mjs");
|
|
1921
1921
|
await runChat({
|
|
1922
1922
|
appUrl: auth.value.appUrl,
|
|
1923
1923
|
sessionToken: auth.value.token,
|
|
@@ -2276,7 +2276,7 @@ const switchCommand = {
|
|
|
2276
2276
|
printError("The workspace picker needs the Bun runtime and it could not be set up automatically. Pass a workspace slug instead, or install Bun and retry.");
|
|
2277
2277
|
process.exit(1);
|
|
2278
2278
|
}
|
|
2279
|
-
const { runWorkspacePicker } = await import("./boot-
|
|
2279
|
+
const { runWorkspacePicker } = await import("./boot-flMhEOoE.mjs");
|
|
2280
2280
|
await runWorkspacePicker(session);
|
|
2281
2281
|
return;
|
|
2282
2282
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { D as setActiveWorkspace, E as listWorkspaces, S as themesForMode, _ as themeForMode, a as installCrashHandler, b as themeVersion, c as MARK_CELLS, d as DEFAULT_THEME_ID, f as applyTheme, g as theme, h as noColorRequested, i as writeArtifact, l as WORDMARK, m as monoTheme, n as profilingEnabled, o as buildCrashReport, p as findTheme, r as record, s as writeCrashReport, v as themeMode, w as getActiveWorkspaceId, y as themeModeFromColorFgBg } from "./profiler-
|
|
2
|
+
import { D as setActiveWorkspace, E as listWorkspaces, S as themesForMode, _ as themeForMode, a as installCrashHandler, b as themeVersion, c as MARK_CELLS, d as DEFAULT_THEME_ID, f as applyTheme, g as theme, h as noColorRequested, i as writeArtifact, l as WORDMARK, m as monoTheme, n as profilingEnabled, o as buildCrashReport, p as findTheme, r as record, s as writeCrashReport, v as themeMode, w as getActiveWorkspaceId, y as themeModeFromColorFgBg } from "./profiler-Cr-wSEa_.mjs";
|
|
3
3
|
import { B as saveTheme, D as getSavedTheme, E as getReviewStateDir, L as resolveWebUrl, S as getConfigPath, c as cardActionErrorMessage, d as reconcileMaskedInput, f as resolveConnectUrl, i as resolveAgent, l as parseExternalOauthConnectParams, m as specKeyFor, p as parseConnectCard, s as MASK_CHAR, u as parseOauthConnectParams, v as DEFAULT_API_URL, y as DEFAULT_APP_URL } from "./print-CiaU2ygh.mjs";
|
|
4
4
|
import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, r as errorDetail, t as HttpError } from "./rest-CG7VpQ56.mjs";
|
|
5
5
|
import { i as billingBlockedOutcomeFromSendResponse } from "./billing-blocked-CwfG1BTR.mjs";
|
|
@@ -681,9 +681,9 @@ function createCmuxWorkspaceTitleAdapter({ socket, workspaceId }) {
|
|
|
681
681
|
//#endregion
|
|
682
682
|
//#region src/chat/agent-host/adapters/cmux/sidebar-pr.ts
|
|
683
683
|
/** Neutral gray — deliberately not green/purple; we don't render PR state. */
|
|
684
|
-
const PILL_COLOR = "#8b949e";
|
|
685
|
-
const PILL_ICON = "git-pull-request";
|
|
686
|
-
const PILL_PRIORITY = 90;
|
|
684
|
+
const PILL_COLOR$1 = "#8b949e";
|
|
685
|
+
const PILL_ICON$1 = "git-pull-request";
|
|
686
|
+
const PILL_PRIORITY$1 = 90;
|
|
687
687
|
/**
|
|
688
688
|
* The cmux sidebar status key for a PR, derived from its repo-qualified
|
|
689
689
|
* identity (`owner/repo#number`) so PRs from different repos never collide on a
|
|
@@ -712,7 +712,7 @@ function createCmuxSidebarPrAdapter({ socket, workspaceId }) {
|
|
|
712
712
|
const runSet = async (pr) => {
|
|
713
713
|
if (applied.has(pr.key)) return;
|
|
714
714
|
applied.add(pr.key);
|
|
715
|
-
const line = `set_status ${pillKey(pr.key)} ${quote(`PR #${pr.number}`)} --icon=${PILL_ICON} --color=${PILL_COLOR} --priority=${PILL_PRIORITY} --url=${pr.url} --tab=${workspaceId}`;
|
|
715
|
+
const line = `set_status ${pillKey(pr.key)} ${quote(`PR #${pr.number}`)} --icon=${PILL_ICON$1} --color=${PILL_COLOR$1} --priority=${PILL_PRIORITY$1} --url=${pr.url} --tab=${workspaceId}`;
|
|
716
716
|
if (!await socket.command(line)) applied.delete(pr.key);
|
|
717
717
|
};
|
|
718
718
|
const runClear = async (prKey) => {
|
|
@@ -733,6 +733,54 @@ function createCmuxSidebarPrAdapter({ socket, workspaceId }) {
|
|
|
733
733
|
};
|
|
734
734
|
}
|
|
735
735
|
|
|
736
|
+
//#endregion
|
|
737
|
+
//#region src/chat/agent-host/adapters/cmux/run-status.ts
|
|
738
|
+
/**
|
|
739
|
+
* Our sidebar status key. One stable key means every run reuses the same pill
|
|
740
|
+
* rather than leaking a new one per run, and teardown clears exactly what we
|
|
741
|
+
* set. cmux keys are space-split tokens, so it must be a single bare token.
|
|
742
|
+
*/
|
|
743
|
+
const PILL_KEY = "skydive-run";
|
|
744
|
+
/** The label shown on the pill while the agent is working. */
|
|
745
|
+
const PILL_LABEL = "Running";
|
|
746
|
+
/**
|
|
747
|
+
* `sync` is a cmux-rendered named glyph (spinning-arrows), the closest
|
|
748
|
+
* "in progress" affordance to the disabled loading spinner.
|
|
749
|
+
*/
|
|
750
|
+
const PILL_ICON = "sync";
|
|
751
|
+
/** A distinct blue so "Running" reads apart from the gray PR pills. */
|
|
752
|
+
const PILL_COLOR = "#3b82f6";
|
|
753
|
+
/**
|
|
754
|
+
* Above the PR pills (priority 90) so the live "Running" signal sorts to the
|
|
755
|
+
* top of the workspace's status line while a run is in flight.
|
|
756
|
+
*/
|
|
757
|
+
const PILL_PRIORITY = 100;
|
|
758
|
+
/** cmux renders a spinner while its `working` (working) state is on. */
|
|
759
|
+
function isWorking(state) {
|
|
760
|
+
return state === "working";
|
|
761
|
+
}
|
|
762
|
+
function createCmuxRunStatusAdapter({ socket, workspaceId }) {
|
|
763
|
+
let applied;
|
|
764
|
+
let chain = Promise.resolve();
|
|
765
|
+
const enqueue = (step) => {
|
|
766
|
+
chain = chain.then(step).catch((_error) => {});
|
|
767
|
+
};
|
|
768
|
+
const runSet = async (on) => {
|
|
769
|
+
if (applied === on) return;
|
|
770
|
+
const line = on ? `set_status ${PILL_KEY} "${PILL_LABEL}" --icon=${PILL_ICON} --color=${PILL_COLOR} --priority=${PILL_PRIORITY} --tab=${workspaceId}` : `clear_status ${PILL_KEY} --tab=${workspaceId}`;
|
|
771
|
+
if (await socket.command(line)) applied = on;
|
|
772
|
+
};
|
|
773
|
+
return {
|
|
774
|
+
transition({ state }) {
|
|
775
|
+
const on = isWorking(state);
|
|
776
|
+
enqueue(() => runSet(on));
|
|
777
|
+
},
|
|
778
|
+
dispose() {
|
|
779
|
+
enqueue(() => runSet(false));
|
|
780
|
+
}
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
|
|
736
784
|
//#endregion
|
|
737
785
|
//#region src/chat/agent-host/adapters/cmux/socket.ts
|
|
738
786
|
const cmuxRpcResponseSchema = z.object({
|
|
@@ -785,6 +833,9 @@ function createCmuxSocket({ socketPath, timeoutMs = RPC_TIMEOUT_MS }) {
|
|
|
785
833
|
`${++seq}`;
|
|
786
834
|
return roundTrip(`${line}\n`, (reply) => reply.startsWith("OK") || reply === "OK", false);
|
|
787
835
|
},
|
|
836
|
+
commandRaw(line) {
|
|
837
|
+
return roundTrip(`${line}\n`, (reply) => reply, null);
|
|
838
|
+
},
|
|
788
839
|
request(method, params) {
|
|
789
840
|
return new Promise((resolve) => {
|
|
790
841
|
let settled = false;
|
|
@@ -1011,6 +1062,9 @@ function createAgentHost({ renderer, notifications }) {
|
|
|
1011
1062
|
}), createCmuxSidebarPrAdapter({
|
|
1012
1063
|
socket,
|
|
1013
1064
|
workspaceId: cmux.workspaceId
|
|
1065
|
+
}), createCmuxRunStatusAdapter({
|
|
1066
|
+
socket,
|
|
1067
|
+
workspaceId: cmux.workspaceId
|
|
1014
1068
|
}));
|
|
1015
1069
|
}
|
|
1016
1070
|
const herdr = createHerdrReporter();
|