skydive-cli 0.6.0-beta.37 → 0.6.0-beta.40
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/CHANGELOG.md +2 -0
- package/dist/js/bin.mjs +136 -37
- package/dist/js/{boot-CACQ3-zf.mjs → boot-DxKctQgF.mjs} +3947 -3703
- package/dist/js/client-DV0Su5yh.mjs +5 -0
- package/dist/js/{client-l6orYfqq.mjs → client-Dr81zuTm.mjs} +6 -2
- package/dist/js/{client-Ba9HLi2X.mjs → client-lWdOjmgQ.mjs} +1 -1
- package/dist/js/{daemon-CYjfddX6.mjs → daemon-B-_pZEic.mjs} +2 -2
- package/dist/js/{daemon-jYTvsCyl.mjs → daemon-CJ0vkUCL.mjs} +1 -1
- package/dist/js/daemon-client-BlMSyVVq.mjs +8 -0
- package/dist/js/{daemon-client-BGQuSoCe.mjs → daemon-client-CEPHWBu5.mjs} +1 -1
- package/dist/js/{install-CmReTVxP.mjs → install-DJDYwL8B.mjs} +2 -2
- package/dist/js/{print-gLfS48ET.mjs → print-CAOpxiVO.mjs} +2 -2
- package/dist/js/{print-CrsJ2_GH.mjs → print-DMyEfL8X.mjs} +12 -11
- package/dist/js/{print-share-CNxK943f.mjs → print-share-Bu-bIPqy.mjs} +1 -1
- package/dist/js/{raw-pty-dndn1Kxc.mjs → raw-pty-C323I8xG.mjs} +1 -1
- package/dist/js/raw-pty-WUHQQwTF.mjs +5 -0
- package/dist/js/{rest-ovzxN-23.mjs → rest-D57sPafI.mjs} +15 -4
- package/dist/js/{rest-AtKGRlCi.mjs → rest-RbyLx50Z.mjs} +1 -1
- package/package.json +5 -5
- package/dist/js/client-D6rhqBY_.mjs +0 -5
- package/dist/js/daemon-client-CD6mijde.mjs +0 -8
- package/dist/js/raw-pty-DRZuf1oW.mjs +0 -5
|
@@ -113,6 +113,8 @@ const FRAME = {
|
|
|
113
113
|
RESIZE: 17
|
|
114
114
|
};
|
|
115
115
|
const MAX_INPUT_BYTES = 1 * 1024 * 1024;
|
|
116
|
+
/** Upper bound for an exec's `timeoutMs`; larger asks are clamped to this. */
|
|
117
|
+
const MAX_EXEC_TIMEOUT_MS = 1440 * 60 * 1e3;
|
|
116
118
|
/** Query params for the upgrade URL, from a spec. Inverse of {@link parseStreamSpec}. */
|
|
117
119
|
function streamSpecToQuery(spec) {
|
|
118
120
|
if (spec.mode === "pty") return {
|
|
@@ -124,7 +126,8 @@ function streamSpecToQuery(spec) {
|
|
|
124
126
|
if (spec.mode === "exec") return {
|
|
125
127
|
agentId: spec.agentId,
|
|
126
128
|
mode: "exec",
|
|
127
|
-
command: spec.command
|
|
129
|
+
command: spec.command,
|
|
130
|
+
...spec.timeoutMs !== void 0 ? { timeoutMs: String(spec.timeoutMs) } : {}
|
|
128
131
|
};
|
|
129
132
|
return {
|
|
130
133
|
agentId: spec.agentId,
|
|
@@ -273,7 +276,8 @@ var SandboxStream = class SandboxStream {
|
|
|
273
276
|
} : {
|
|
274
277
|
mode: "exec",
|
|
275
278
|
agentId: opts.agentId,
|
|
276
|
-
command: opts.command
|
|
279
|
+
command: opts.command,
|
|
280
|
+
...opts.timeoutMs !== void 0 ? { timeoutMs: opts.timeoutMs } : {}
|
|
277
281
|
};
|
|
278
282
|
const url = new URL(`${wsBase(opts.appUrl)}${SANDBOX_STREAM_PATH}`);
|
|
279
283
|
for (const [key, value] of Object.entries(streamSpecToQuery(spec))) url.searchParams.set(key, value);
|
|
@@ -160,7 +160,7 @@ function errorMessage(err) {
|
|
|
160
160
|
* the commit time of the built tree is one monotonic clock they share.
|
|
161
161
|
*/
|
|
162
162
|
function portalDaemonBuild() {
|
|
163
|
-
return "
|
|
163
|
+
return "1790575698";
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
166
|
* Whether a client carrying `mine` should replace a running daemon carrying
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./client-
|
|
2
|
+
import "./client-lWdOjmgQ.mjs";
|
|
3
3
|
import "./tls-cert-Rua2oV7n.mjs";
|
|
4
4
|
import "./api-BFQ4PQDA.mjs";
|
|
5
|
-
import { a as runPortalDaemon, c as stopDaemonForHandoff, i as queryDaemonStatus, n as ensureDaemonRunning, o as startPortalDaemon, r as isDaemonListening, s as stopDaemon, t as PortalDaemon } from "./daemon-
|
|
5
|
+
import { a as runPortalDaemon, c as stopDaemonForHandoff, i as queryDaemonStatus, n as ensureDaemonRunning, o as startPortalDaemon, r as isDaemonListening, s as stopDaemon, t as PortalDaemon } from "./daemon-CJ0vkUCL.mjs";
|
|
6
6
|
|
|
7
7
|
export { runPortalDaemon };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as isRecord, n as isNewerBuild, r as portalDaemonBuild, t as PortalClient } from "./client-
|
|
2
|
+
import { i as isRecord, n as isNewerBuild, r as portalDaemonBuild, t as PortalClient } from "./client-lWdOjmgQ.mjs";
|
|
3
3
|
import { t as defaultTlsCertSource } from "./tls-cert-Rua2oV7n.mjs";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { d as daemonPaths, f as encodeLine, l as LOCAL_PROTOCOL_VERSION, m as parseDaemonMessage, n as ensureDaemonRunning, p as makeLineParser } from "./daemon-
|
|
2
|
+
import { d as daemonPaths, f as encodeLine, l as LOCAL_PROTOCOL_VERSION, m as parseDaemonMessage, n as ensureDaemonRunning, p as makeLineParser } from "./daemon-CJ0vkUCL.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { connect } from "node:net";
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { c as version$1 } from "./rest-
|
|
3
|
-
import {
|
|
2
|
+
import { c as version$1 } from "./rest-D57sPafI.mjs";
|
|
3
|
+
import { D as getConfigPath } from "./print-DMyEfL8X.mjs";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { err, ok } from "neverthrow";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./rest-
|
|
3
|
-
import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-
|
|
2
|
+
import "./rest-D57sPafI.mjs";
|
|
3
|
+
import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-DMyEfL8X.mjs";
|
|
4
4
|
import "./billing-blocked-D3l5kJlX.mjs";
|
|
5
5
|
|
|
6
6
|
export { messageGet, readStdin, resolveAgent, runPrint };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as errorMessage, i as sendErrorMessage, o as isRecord, t as createRestClient } from "./rest-
|
|
2
|
+
import { a as errorMessage, i as sendErrorMessage, o as isRecord, t as createRestClient } from "./rest-D57sPafI.mjs";
|
|
3
3
|
import { t as HttpError } from "./http-error-BF2NZZE3.mjs";
|
|
4
4
|
import { i as billingBlockedOutcomeFromSendResponse, n as BillingBlockedError } from "./billing-blocked-D3l5kJlX.mjs";
|
|
5
5
|
import path from "node:path";
|
|
@@ -512,18 +512,18 @@ function readQuestionEntries(raw) {
|
|
|
512
512
|
}];
|
|
513
513
|
});
|
|
514
514
|
}
|
|
515
|
-
/**
|
|
516
|
-
* The `platform ask` form. The web renders it as an interactive picker; here
|
|
517
|
-
* it maps onto an answer_question button so ctrl+r (and letter shortcuts)
|
|
518
|
-
* open an in-TUI picker. The composed answer is sent as a normal user
|
|
519
|
-
* message — same non-blocking model as the web card. Without this the spec
|
|
520
|
-
* is not a Card, parses to null, and the question is silently dropped.
|
|
521
|
-
*/
|
|
522
515
|
/** Compose the user-message body the web card also sends. */
|
|
523
516
|
function composeQuestionAnswer(questions, answers) {
|
|
524
517
|
if (questions.length === 1) return (answers[0] ?? []).join(", ");
|
|
525
518
|
return questions.map((q, i) => `${q.question} → ${(answers[i] ?? []).join(", ")}`).join("\n");
|
|
526
519
|
}
|
|
520
|
+
/** Build the typed durable payload that settles this exact question card. */
|
|
521
|
+
function composeQuestionAnswerEntries(questions, answers) {
|
|
522
|
+
return questions.map((question, index) => ({
|
|
523
|
+
question: question.question,
|
|
524
|
+
answer: (answers[index] ?? []).join(", ")
|
|
525
|
+
}));
|
|
526
|
+
}
|
|
527
527
|
function parseQuestionCard(rootEl) {
|
|
528
528
|
const props = isRecord(rootEl.props) ? rootEl.props : {};
|
|
529
529
|
const cardId = optionalString(props.cardId);
|
|
@@ -708,8 +708,8 @@ function isBlockingCardAction(action) {
|
|
|
708
708
|
* should target, prioritizing blocking cards over `platform ask` forms. When
|
|
709
709
|
* both a blocking card and a stale `answer_question` are waiting, ctrl+r must
|
|
710
710
|
* approve the thing the agent is stalled on, not re-answer an earlier ask that
|
|
711
|
-
*
|
|
712
|
-
*
|
|
711
|
+
* can remain actionable when ignored or answered as plain composer text.
|
|
712
|
+
* Falls through to the
|
|
713
713
|
* ask forms only when they are the only actionable cards left. Preserves input
|
|
714
714
|
* order within a tier, so a single card and genuine multi-card cases behave
|
|
715
715
|
* exactly as before.
|
|
@@ -900,6 +900,7 @@ async function runPrint({ appUrl, sessionToken, workspaceId, prompt, agentSelect
|
|
|
900
900
|
conversationId,
|
|
901
901
|
content: prompt,
|
|
902
902
|
attachmentIds: [],
|
|
903
|
+
questionAnswer: null,
|
|
903
904
|
clientSurface: "cli"
|
|
904
905
|
});
|
|
905
906
|
} catch (err) {
|
|
@@ -1077,4 +1078,4 @@ async function readStdin() {
|
|
|
1077
1078
|
}
|
|
1078
1079
|
|
|
1079
1080
|
//#endregion
|
|
1080
|
-
export {
|
|
1081
|
+
export { getPreference as A, resolveChatAuth as B, DEFAULT_API_URL as C, getConfigPath as D, deleteConfig as E, getStoredApiKeyId as F, saveConfig as G, resolveManagementAuth as H, getStoredApiKeyWorkspaceName as I, setLastSeenVersion as J, saveSession as K, getUpdateCheckDisabled as L, getReviewStateDir as M, getSavedTheme as N, getDefaultAgent as O, getShareMachineDefault as P, recordDefaultAgent as R, API_KEY_PREFIX as S, PREFERENCES as T, resolveSession as U, resolveConfig as V, resolveWebUrl as W, computeSettledLabel as _, runPrint as a, API_KEYS_URL as b, actionableCardVerb as c, parseOauthConnectParams as d, prioritizeActionableCards as f, composeQuestionAnswerEntries as g, composeQuestionAnswer as h, resolveAgent as i, getPromptHistoryPath as j, getLastSeenVersion as k, cardActionErrorMessage as l, resolveConnectUrl as m, messageGet as n, toPrintError as o, reconcileMaskedInput as p, saveTheme as q, readStdin as r, MASK_CHAR as s, collectRunText as t, parseExternalOauthConnectParams as u, parseConnectCard as v, DEFAULT_APP_URL as w, API_KEY_FAMILY_PREFIX as x, specKeyFor as y, resolveAppUrl as z };
|
|
@@ -14,7 +14,7 @@ import { n as printError } from "./output-C9mb3sUB.mjs";
|
|
|
14
14
|
* the reply (and to --json).
|
|
15
15
|
*/
|
|
16
16
|
async function connectMachineShare({ appUrl, sessionToken, timeoutHint }) {
|
|
17
|
-
const { PortalClient } = await import("./client-
|
|
17
|
+
const { PortalClient } = await import("./client-DV0Su5yh.mjs");
|
|
18
18
|
const { defaultTlsCertSource } = await import("./tls-cert-BpCaD5AT.mjs");
|
|
19
19
|
let signalConnected;
|
|
20
20
|
const connected = new Promise((resolve) => {
|
|
@@ -6,7 +6,7 @@ import { createParser } from "eventsource-parser";
|
|
|
6
6
|
|
|
7
7
|
//#region package.json
|
|
8
8
|
var name = "skydive-cli";
|
|
9
|
-
var version = "0.6.0-beta.
|
|
9
|
+
var version = "0.6.0-beta.40";
|
|
10
10
|
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/chat/util.ts
|
|
@@ -270,8 +270,11 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
|
|
|
270
270
|
return conversation;
|
|
271
271
|
},
|
|
272
272
|
listModels: async () => {
|
|
273
|
-
const { models } = await get("/api/v1/models", listModelsResponseSchema);
|
|
274
|
-
return
|
|
273
|
+
const { models, trainingOptedOut } = await get("/api/v1/models", listModelsResponseSchema);
|
|
274
|
+
return {
|
|
275
|
+
models,
|
|
276
|
+
trainingOptedOut: trainingOptedOut ?? false
|
|
277
|
+
};
|
|
275
278
|
},
|
|
276
279
|
listModelEfforts: async () => {
|
|
277
280
|
const { modelConfigOverrides } = await get("/api/v1/models/preferred", modelEffortPreferencesResponseSchema);
|
|
@@ -436,6 +439,9 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
|
|
|
436
439
|
setConversationArchived: async ({ conversationId, archived }) => {
|
|
437
440
|
await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/archive`, { archived }, z.object({ archived: z.boolean() }));
|
|
438
441
|
},
|
|
442
|
+
setConversationPinned: async ({ conversationId, pinned }) => {
|
|
443
|
+
await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/pin`, { pinned }, z.object({ pinned: z.boolean() }));
|
|
444
|
+
},
|
|
439
445
|
markConversationRead: async ({ conversationId }) => {
|
|
440
446
|
await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/read`, {}, z.object({ read: z.boolean() }));
|
|
441
447
|
},
|
|
@@ -555,10 +561,14 @@ const platformModelSchema = z.object({
|
|
|
555
561
|
providerDisplay: z.string().optional(),
|
|
556
562
|
reasoning: z.boolean().optional(),
|
|
557
563
|
compliant: z.boolean().optional(),
|
|
564
|
+
noTraining: z.boolean().optional(),
|
|
558
565
|
thinkingLevels: z.array(z.string()).optional(),
|
|
559
566
|
thinkingLevelLabels: z.record(z.string(), z.string()).optional()
|
|
560
567
|
}).passthrough();
|
|
561
|
-
const listModelsResponseSchema = z.object({
|
|
568
|
+
const listModelsResponseSchema = z.object({
|
|
569
|
+
models: z.array(platformModelSchema),
|
|
570
|
+
trainingOptedOut: z.boolean().optional()
|
|
571
|
+
});
|
|
562
572
|
const modelEffortPreferencesResponseSchema = z.object({ modelConfigOverrides: z.record(z.string(), z.object({ thinkingLevel: z.string().optional() })).optional() });
|
|
563
573
|
const billingSummaryResponseSchema = z.object({ result: z.object({ data: z.object({
|
|
564
574
|
planKey: z.string().nullable(),
|
|
@@ -607,6 +617,7 @@ const conversationSummarySchema = z.object({
|
|
|
607
617
|
channel: z.string().nullable(),
|
|
608
618
|
channelLabel: z.string().nullable(),
|
|
609
619
|
viewerArchivedAt: z.string().nullable().optional(),
|
|
620
|
+
viewerPinnedAt: z.string().nullable().optional(),
|
|
610
621
|
viewerParticipates: z.boolean().optional(),
|
|
611
622
|
unread: z.boolean().optional(),
|
|
612
623
|
agent: conversationAgentSchema,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as sendErrorMessage, n as errorDetail, r as filenameFromContentDisposition, t as createRestClient } from "./rest-
|
|
2
|
+
import { i as sendErrorMessage, n as errorDetail, r as filenameFromContentDisposition, t as createRestClient } from "./rest-D57sPafI.mjs";
|
|
3
3
|
import { t as HttpError } from "./http-error-BF2NZZE3.mjs";
|
|
4
4
|
import "./billing-blocked-D3l5kJlX.mjs";
|
|
5
5
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skydive-cli",
|
|
3
|
-
"version": "0.6.0-beta.
|
|
3
|
+
"version": "0.6.0-beta.40",
|
|
4
4
|
"description": "Skydive CLI — cloud agents from the command line",
|
|
5
5
|
"homepage": "https://skydive.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
},
|
|
72
72
|
"//optionalDependencies": "The per-platform binary packages (skydive-cli-<os>-<arch>) are INTENTIONALLY not committed here. They are published by release-skydive-cli-binaries.yml and injected — pinned to the exact version being published — into the published launcher's optionalDependencies at release time (scripts/prepare-platform-packages.mjs --pin-version, run in release-skydive-cli.yml). Committing them would make `yarn install` try to resolve versions that only exist post-publish, breaking local dev and CI. npm installs of a published skydive-cli still get them (os/cpu-gated); the launcher (src/launcher.ts) resolves and execs the matching one. Local dev never needs them: it runs the JS bundle or `build:binary` directly.",
|
|
73
73
|
"optionalDependencies": {
|
|
74
|
-
"skydive-cli-darwin-arm64": "0.6.0-beta.
|
|
75
|
-
"skydive-cli-darwin-x64": "0.6.0-beta.
|
|
76
|
-
"skydive-cli-linux-x64": "0.6.0-beta.
|
|
77
|
-
"skydive-cli-linux-arm64": "0.6.0-beta.
|
|
74
|
+
"skydive-cli-darwin-arm64": "0.6.0-beta.40",
|
|
75
|
+
"skydive-cli-darwin-x64": "0.6.0-beta.40",
|
|
76
|
+
"skydive-cli-linux-x64": "0.6.0-beta.40",
|
|
77
|
+
"skydive-cli-linux-arm64": "0.6.0-beta.40"
|
|
78
78
|
}
|
|
79
79
|
}
|