@agentsky/sky 3.26.0 → 3.31.0

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.
@@ -38,7 +38,7 @@ function currentUniverse() {
38
38
  }
39
39
 
40
40
  // src/version.ts
41
- var CLI_VERSION = "3.26.0";
41
+ var CLI_VERSION = "3.31.0";
42
42
  var USER_AGENT = `sky-cli/${CLI_VERSION} (${process.platform}; node/${process.versions.node})`;
43
43
 
44
44
  export {
@@ -4,7 +4,7 @@ import {
4
4
  apiToken,
5
5
  configPath,
6
6
  currentUniverse
7
- } from "./chunk-WYEQVTCU.js";
7
+ } from "./chunk-IPQQGK5R.js";
8
8
 
9
9
  // src/api.ts
10
10
  import { createWriteStream, writeFileSync } from "fs";
@@ -151,7 +151,7 @@ async function resolveSessionRef(ref) {
151
151
  return agent.defaultSessionId;
152
152
  }
153
153
  async function* streamEvents(sessionId, signal) {
154
- const { parseSseStream } = await import("./src-TNWKET3E.js");
154
+ const { parseSseStream } = await import("./src-7Q5ZX43Q.js");
155
155
  const res = await fetch(
156
156
  `${apiBase()}/sessions/${encodeURIComponent(sessionId)}/stream`,
157
157
  {
@@ -19101,14 +19101,14 @@ var CATALOG_MODELS = [
19101
19101
  "tiers": [
19102
19102
  {
19103
19103
  "maxPromptTokens": 1048576,
19104
- "input": 0.062297,
19105
- "output": 0.186888,
19106
- "cachedInput": 1983e-6
19104
+ "input": 0.057701,
19105
+ "output": 0.173101,
19106
+ "cachedInput": 1837e-6
19107
19107
  }
19108
19108
  ],
19109
19109
  "maxPrice": {
19110
- "prompt": 0.059048,
19111
- "completion": 0.177144
19110
+ "prompt": 0.054692,
19111
+ "completion": 0.164076
19112
19112
  },
19113
19113
  "reasoningEfforts": [
19114
19114
  "none",
@@ -20783,14 +20783,14 @@ var CATALOG_MODELS = [
20783
20783
  "tiers": [
20784
20784
  {
20785
20785
  "maxPromptTokens": 262144,
20786
- "input": 0.02205,
20787
- "output": 1.187192,
20788
- "cachedInput": 0.019729
20786
+ "input": 0.203088,
20787
+ "output": 1.218525,
20788
+ "cachedInput": 0.040618
20789
20789
  }
20790
20790
  ],
20791
20791
  "maxPrice": {
20792
- "prompt": 0.0209,
20793
- "completion": 1.1253
20792
+ "prompt": 0.1925,
20793
+ "completion": 1.155
20794
20794
  },
20795
20795
  "reasoningEfforts": [
20796
20796
  "none",
@@ -22841,7 +22841,7 @@ var ACP_AGENTS = {
22841
22841
  "registryId": "sigit",
22842
22842
  "label": "siGit Code",
22843
22843
  "description": "Local-first coding agent. Runs entirely on your machine with optional on-device LLM inference via Onde.",
22844
- "version": "1.7.5",
22844
+ "version": "1.7.9",
22845
22845
  "website": "https://github.com/getsigit/sigit"
22846
22846
  },
22847
22847
  "stakpak": {
@@ -22997,7 +22997,7 @@ var HARNESS_MODEL_ADDITIONS = {
22997
22997
  cline: [{ models: KIMI_K3_1, releases: ["3.0.73", "3.0.74"] }, { models: ["grok-4.7"], releases: ["3.0.70", "3.0.73", "3.0.74"] }],
22998
22998
  grok_build: [{ models: KIMI_K3_1, releases: ["1.0.70", "1.0.77"] }, { models: ["grok-4.7"], releases: ["1.0.50", "1.0.62", "1.0.67", "1.0.70", "1.0.77"] }],
22999
22999
  mistral_vibe: [{ models: ["grok-4.7"], releases: ["2.26.1"] }],
23000
- sigit: [{ models: KIMI_K3_1, releases: ["1.7.4", "1.7.5"] }, { models: ["grok-4.7"], releases: ["1.6.5", "1.7.2", "1.7.3", "1.7.4", "1.7.5"] }],
23000
+ sigit: [{ models: KIMI_K3_1, releases: ["1.7.4", "1.7.5", "1.7.9"] }, { models: ["grok-4.7"], releases: ["1.6.5", "1.7.2", "1.7.3", "1.7.4", "1.7.5", "1.7.9"] }],
23001
23001
  cursor: [{ models: ["kimi-k2.7-code"], releases: ["2026.10.01"] }],
23002
23002
  minimax_code: [{ models: KIMI_K3_1, releases: ["0.6.12", "0.7.0", "0.7.1", "0.7.2", "0.7.4", "0.7.6"] }, { models: ["grok-4.7"], releases: ["0.6.5", "0.6.12", "0.7.0", "0.7.1", "0.7.2", "0.7.4", "0.7.6"] }, { models: ["claude-sonnet-5-5", "claude-haiku-5-5"], releases: ["0.6.5", "0.6.12", "0.7.0", "0.7.1", "0.7.2", "0.7.4", "0.7.6"] }, {
23003
23003
  models: ["gpt-6.1-sol", "gpt-6-sol", "gpt-6-luna", "gpt-5.6-sol", "claude-opus-5", "claude-opus-5-5"],
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  uploadFile,
16
16
  uploadLargeFile,
17
17
  writeResponseFile
18
- } from "./chunk-CTAQQKSF.js";
18
+ } from "./chunk-X7F2NGND.js";
19
19
  import {
20
20
  CLI_VERSION,
21
21
  USER_AGENT,
@@ -26,7 +26,7 @@ import {
26
26
  currentUniverse,
27
27
  loadConfig,
28
28
  saveConfig
29
- } from "./chunk-WYEQVTCU.js";
29
+ } from "./chunk-IPQQGK5R.js";
30
30
  import {
31
31
  AGENT_TYPES,
32
32
  MODEL_SUBSCRIPTION_PLAN_PHRASE,
@@ -48,7 +48,7 @@ import {
48
48
  skillRefSchema,
49
49
  splitMcpServers,
50
50
  supersededBy
51
- } from "./chunk-KWS6REFR.js";
51
+ } from "./chunk-Y332NKV6.js";
52
52
  import "./chunk-MLKGABMK.js";
53
53
 
54
54
  // src/artifact-lifecycle.ts
@@ -3484,6 +3484,13 @@ Everything below is a tool of the \`agentsky\` MCP server. If those tools are
3484
3484
  missing in this session, use the \`sky\` commands under "Without the MCP tools"
3485
3485
  at the end; they do the same things, one agent at a time.
3486
3486
 
3487
+ ## Getting access
3488
+
3489
+ If those tools are missing and \`sky auth whoami\` fails, this computer is not
3490
+ signed in yet. Run \`npx -y @agentsky/sky@latest auth login --no-browser\`, give
3491
+ the person the URL it prints, and wait: they approve once in their browser and
3492
+ the command finishes by itself. Never ask them to paste a key or a password.
3493
+
3487
3494
  ## Workspace
3488
3495
 
3489
3496
  Use the workspace the person named. If they named none, check the git root for
@@ -3516,8 +3523,9 @@ Details: \`${REFERENCES_DIR}/workspaces.md\` in this skill's folder.
3516
3523
  \`insufficient_credits\`, \`workspace_wallet_empty\` and \`payment_setup_required\` mean
3517
3524
  the account cannot pay; \`budget_reached\` means that session's cap is spent.
3518
3525
  Stop that piece of work and tell the person what was refused and what unblocks
3519
- it (credit or a card under Settings \u203A Billing, a larger \`budget_cents\`), then
3520
- offer the engines that are installed here as the free alternative. Never hire a
3526
+ it. When the refusal has \`tell_the_person\`, say that sentence as written: it holds
3527
+ the link where they add credit. Retry the same request once they say it is done.
3528
+ For a spent budget, name a larger \`budget_cents\`. Then offer the engines that are installed here as the free alternative. Never hire a
3521
3529
  cheaper or different agent to get around a refusal.
3522
3530
  - \`get_usage\` shows the balance; check it before starting several cloud sessions
3523
3531
  at once so the person is told once, up front, instead of after the first fails.
@@ -3591,6 +3599,8 @@ it, and name its path in the brief.
3591
3599
  4. If the person should be able to open or share the result, \`publish_artifact\`
3592
3600
  the files; \`share_artifact\` only when they asked for a link. To change a
3593
3601
  published file, \`save_artifact_file\` against the \`base_version\` you read.
3602
+ \`export_artifact\` hands a result over in any format its \`export_formats\`
3603
+ lists, and \`import_artifact\` brings in a file or a public page as a result.
3594
3604
  5. \`stop_session\` every agent you no longer need.
3595
3605
  6. Tell the person what was done, which agent did which part, and what it cost
3596
3606
  (\`get_task\` reports the task's cost).
@@ -7087,6 +7097,21 @@ async function saveArtifactFile(id2, path2, input) {
7087
7097
  const sent = await apiBytes("PUT", `/artifacts/${encodeURIComponent(id2)}/files/${encodePath(path2)}?${query}`, { bytes: input.bytes ?? new Uint8Array(), mediaType: "application/octet-stream" });
7088
7098
  return (await sent.json()).artifact;
7089
7099
  }
7100
+ async function importArtifact(input) {
7101
+ const fields = { ...input.name ? { name: input.name } : {}, ...input.taskId ? { task_id: input.taskId } : {}, ...input.requestId ? { request_id: input.requestId } : {} };
7102
+ if ("url" in input) return (await api("POST", "/artifacts/imports", { url: input.url, ...fields })).artifact;
7103
+ const form = new FormData();
7104
+ form.set("file", new File([new Uint8Array(input.file.bytes)], input.file.name));
7105
+ for (const [field, value] of Object.entries(fields)) form.set(field, value);
7106
+ return (await apiForm("POST", "/artifacts/imports", form)).artifact;
7107
+ }
7108
+ async function exportArtifact(id2, options = {}) {
7109
+ const query = new URLSearchParams({ ...options.format ? { format: options.format } : {}, ...options.version ? { version: String(options.version) } : {} }).toString();
7110
+ return (await apiBytes("GET", `/artifacts/${encodeURIComponent(id2)}/export${query ? `?${query}` : ""}`)).bytes;
7111
+ }
7112
+ async function convertArtifactToPage(id2, input) {
7113
+ return api("POST", `/artifacts/${encodeURIComponent(id2)}/conversions`, { to: "page", base_version: input.baseVersion, ...input.requestId ? { request_id: input.requestId } : {} });
7114
+ }
7090
7115
  async function shareArtifact(id2, enabled) {
7091
7116
  return (await api("POST", `/artifacts/${encodeURIComponent(id2)}/share`, { enabled })).share_url;
7092
7117
  }
@@ -10756,6 +10781,26 @@ artifact.command("save <id> <path>").description("save one file as the artifact'
10756
10781
  })));
10757
10782
  })
10758
10783
  );
10784
+ artifact.command("import [file]").description("bring in a file or, with --url, a public web page as a new artifact; its original is version 1's file").option("--url <url>", "a public https page to snapshot").option("--name <name>", "the artifact's name (default: the file's name or the page's title)").option("--task <task>", "the task whose folder holds it (default: your own imports folder)").option("--request-id <id>", "send the same value when retrying").action(
10785
+ run(async (file, opts) => {
10786
+ if (Boolean(file) === Boolean(opts.url)) throw new Error("name a file or --url");
10787
+ console.log(renderArtifact(await importArtifact({ ...file ? { file: { name: basename9(file), bytes: readFileSync24(file) } } : { url: opts.url }, name: opts.name, taskId: opts.task, requestId: opts.requestId })));
10788
+ })
10789
+ );
10790
+ artifact.command("export <id>").description("download an artifact in one of its formats (pdf, png, docx, html, markdown, csv, xlsx...); no --format is every file as a zip").option("--format <format>", "a format `sky artifact inspect` lists under export_formats").option("--artifact-version <version>", "an earlier version").requiredOption("-o, --out <path>", "where to write the bytes").action(
10791
+ run(async (id2, opts) => {
10792
+ const bytes = await exportArtifact(id2, { format: opts.format, version: opts.artifactVersion === void 0 ? void 0 : Number(opts.artifactVersion) });
10793
+ writeFileSync14(opts.out, bytes);
10794
+ console.log(`Wrote ${bytes.length} bytes to ${opts.out}`);
10795
+ })
10796
+ );
10797
+ artifact.command("convert <id>").description("make a Markdown, Word or PDF artifact into a page, as its next version; restoring the earlier version undoes it").requiredOption("--base <version>", "the version you read").option("--request-id <id>", "send the same value when retrying").action(
10798
+ run(async (id2, opts) => {
10799
+ const { artifact: converted, loss } = await convertArtifactToPage(id2, { baseVersion: Number(opts.base), requestId: opts.requestId });
10800
+ console.log(renderArtifact(converted));
10801
+ if (loss) console.log(loss);
10802
+ })
10803
+ );
10759
10804
  artifact.command("share <id>").description("turn on a public link anyone can open; --off turns it off (the old link stops working)").option("--off", "stop sharing").action(
10760
10805
  run(async (id2, opts) => {
10761
10806
  const url = await shareArtifact(id2, !opts.off);
@@ -12153,7 +12198,7 @@ harness.command("connect").description("run an ACP agent (the command after --)
12153
12198
  }));
12154
12199
  var traceCmd = program.command("trace").description("correlate this machine's agent work with the cloud sessions it starts (metadata only unless you choose content)");
12155
12200
  traceCmd.command("start").description("start a trace: a grant for this machine, a root span, and the spool the hooks write to").option("--name <name>", "a name for the task").option("--source <source>", "how this machine reports itself", "claude-code").option("--hooks [settings]", "also install the Claude Code hooks (default: ./.claude/settings.local.json)").option("--capture <scopes>", "also send content, redacted on this machine first: any of prompts,tool_output,files").option("--file <path>", "a file the files scope may send (repeatable)", collect).option("--dir <path>", "a folder whose files the files scope may send when a file tool touches them (repeatable)", collect).action(run(async (opts) => {
12156
- const { readState, writeState, record, installClaudeHooks, parseContentScopes, chosenPaths, fileEvent } = await import("./trace-OD6GZXKU.js");
12201
+ const { readState, writeState, record, installClaudeHooks, parseContentScopes, chosenPaths, fileEvent } = await import("./trace-ZEGIAQYW.js");
12157
12202
  if (readState()) throw new Error("a trace is already running here \u2014 `sky trace stop` it first");
12158
12203
  const scopes = parseContentScopes(opts.capture);
12159
12204
  const chosen = chosenPaths(opts.file ?? [], opts.dir ?? []);
@@ -12188,7 +12233,7 @@ traceCmd.command("start").description("start a trace: a grant for this machine,
12188
12233
  }));
12189
12234
  traceCmd.command("hook").description("record one Claude Code hook event read from stdin (run by the installed hooks; never fails, prints nothing)").action(async () => {
12190
12235
  try {
12191
- const { readState, record, flush, grantSender, eventsForClaudeHook, contentForClaudeHook, clearState } = await import("./trace-OD6GZXKU.js");
12236
+ const { readState, record, flush, grantSender, eventsForClaudeHook, contentForClaudeHook, clearState } = await import("./trace-ZEGIAQYW.js");
12192
12237
  const chunks = [];
12193
12238
  for await (const chunk of process.stdin) chunks.push(chunk);
12194
12239
  const input = JSON.parse(Buffer.concat(chunks).toString("utf8") || "{}");
@@ -12201,14 +12246,14 @@ traceCmd.command("hook").description("record one Claude Code hook event read fro
12201
12246
  }
12202
12247
  });
12203
12248
  traceCmd.command("flush").description("send what the spool holds, retrying with backoff").action(run(async () => {
12204
- const { readState, flush, grantSender } = await import("./trace-OD6GZXKU.js");
12249
+ const { readState, flush, grantSender } = await import("./trace-ZEGIAQYW.js");
12205
12250
  const state = readState();
12206
12251
  if (!state) throw new Error("no trace is running here");
12207
12252
  const outcome = await flush(grantSender(state), { attempts: 4 });
12208
12253
  console.log(`sent ${outcome.sent}, refused ${outcome.refused}, given up ${outcome.expired}, still pending ${outcome.pending}${outcome.stopped ? ` (stopped: ${outcome.stopped})` : ""}`);
12209
12254
  }));
12210
12255
  traceCmd.command("status").description("the running trace and its spool").action(run(async () => {
12211
- const { readState, spoolStatus } = await import("./trace-OD6GZXKU.js");
12256
+ const { readState, spoolStatus } = await import("./trace-ZEGIAQYW.js");
12212
12257
  const state = readState();
12213
12258
  if (!state) {
12214
12259
  console.log("No trace is running here.");
@@ -12218,7 +12263,7 @@ traceCmd.command("status").description("the running trace and its spool").action
12218
12263
  console.log(`${state.trace_id} as ${state.source}: ${spool.pending} pending, ${spool.dropped_full} dropped (spool full), ${spool.dropped_expired} given up, ${spool.refused} refused`);
12219
12264
  }));
12220
12265
  traceCmd.command("show [id]").description("the trace bundle: spans, the sessions they reach, cost counted once per session").option("--json", "print the bundle as JSON").action(run(async (id2, opts) => {
12221
- const { readState } = await import("./trace-OD6GZXKU.js");
12266
+ const { readState } = await import("./trace-ZEGIAQYW.js");
12222
12267
  const ref = id2 ?? readState()?.trace_id;
12223
12268
  if (!ref) throw new Error("name a trace, or start one here");
12224
12269
  const bundle = await api("GET", `/traces/${ref}`);
@@ -12245,7 +12290,7 @@ traceCmd.command("show [id]").description("the trace bundle: spans, the sessions
12245
12290
  for (const gap of bundle.gaps) console.log(` gap: ${gap.span_id} ${gap.reason}`);
12246
12291
  }));
12247
12292
  traceCmd.command("stop").description("end the root span, send what is left, and revoke this machine's grant").action(run(async () => {
12248
- const { readState, record, flush, grantSender, clearState } = await import("./trace-OD6GZXKU.js");
12293
+ const { readState, record, flush, grantSender, clearState } = await import("./trace-ZEGIAQYW.js");
12249
12294
  const state = readState();
12250
12295
  if (!state) throw new Error("no trace is running here");
12251
12296
  if (state.root_span) record(() => [{ span_id: state.root_span, kind: "end", outcome: "completed" }]);
@@ -12255,7 +12300,7 @@ traceCmd.command("stop").description("end the root span, send what is left, and
12255
12300
  console.log(`Stopped ${state.trace_id}${outcome.pending ? ` (${outcome.pending} events could not be sent)` : ""}`);
12256
12301
  }));
12257
12302
  traceCmd.command("sync [payload]").description("upload this machine's agent sessions (Claude Code, Codex, Cursor, Gemini CLI and every other agent `--agents` lists) to the matching workspace's trace library, redacted here first").option("--enable", "turn sync on for this machine").option("--disable", "turn sync off; nothing more is uploaded").option("--route <match=workspace>", "send sessions whose folder path contains <match> to <workspace> (repeatable; replaces the saved rules)", collect).option("--default <workspace>", "where a session no rule matches goes").option("--keep-local", "keep sessions no rule matches on this machine (the default)").option("--session <ref>", "only this session: its id or transcript path (repeatable)", collect).option("--import <export>", "add a downloaded cloud export (claude.ai, ChatGPT, Gemini, Grok, DeepSeek \u2026: its .zip, folder or file) so sync uploads it (repeatable)", collect).option("--agents", "list the agents sync reads and which are on this machine").option("--full", "re-read every session, not only files that changed").option("--limit <n>", "at most this many changed sessions this run", (v) => Number.parseInt(v, 10)).option("--dry-run", "show what would be uploaded without uploading").option("--hook", "run from a Claude Code SessionEnd hook or Codex notify: upload that session in the background and return at once").option("--install-schedule", "also sweep every 15 minutes (macOS launchd)").option("--status", "what sync has done on this machine").option("--quiet", "print only failures").action(async (payload, opts) => {
12258
- const lib = await import("./trace-library-7WWGR5HX.js");
12303
+ const lib = await import("./trace-library-2PRHDUAK.js");
12259
12304
  if (opts.hook) {
12260
12305
  try {
12261
12306
  let raw = payload ?? "";
@@ -12371,7 +12416,7 @@ traceCmd.command("search <query...>").description("search every session in a wor
12371
12416
  console.log(opts.json ? JSON.stringify(page, null, 2) : renderContextPage(page));
12372
12417
  }));
12373
12418
  traceCmd.command("library").description("list the sessions in a workspace's trace library, most recently updated first").option("--workspace <slug>", "the workspace (default: the current one)").option("--limit <n>", "how many", (v) => Number.parseInt(v, 10), 20).option("--json", "print the page as JSON").action(run(async (opts) => {
12374
- const { libraryRequest } = await import("./trace-library-7WWGR5HX.js");
12419
+ const { libraryRequest } = await import("./trace-library-2PRHDUAK.js");
12375
12420
  const workspace2 = opts.workspace ?? currentUniverse();
12376
12421
  if (!workspace2) throw new Error("name a workspace with --workspace");
12377
12422
  const page = await libraryRequest("GET", `/trace-library?limit=${opts.limit}`, workspace2);
@@ -2,7 +2,7 @@ import {
2
2
  admittedInputScopeSchema,
3
3
  external_exports,
4
4
  messagePartSchema
5
- } from "./chunk-KWS6REFR.js";
5
+ } from "./chunk-Y332NKV6.js";
6
6
  import "./chunk-MLKGABMK.js";
7
7
 
8
8
  // ../../packages/chat/src/stream.ts
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  USER_AGENT,
3
3
  configPath
4
- } from "./chunk-WYEQVTCU.js";
4
+ } from "./chunk-IPQQGK5R.js";
5
5
  import {
6
6
  TRACE_CONTENT_SCOPES,
7
7
  redactTraceText
8
- } from "./chunk-KWS6REFR.js";
8
+ } from "./chunk-Y332NKV6.js";
9
9
  import "./chunk-MLKGABMK.js";
10
10
 
11
11
  // src/trace.ts
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  ApiError,
3
3
  uploadLargeFile
4
- } from "./chunk-CTAQQKSF.js";
4
+ } from "./chunk-X7F2NGND.js";
5
5
  import {
6
6
  USER_AGENT,
7
7
  apiBase,
8
8
  apiToken
9
- } from "./chunk-WYEQVTCU.js";
9
+ } from "./chunk-IPQQGK5R.js";
10
10
  import {
11
11
  SessionSourceCollector,
12
12
  UnsafeImportError,
13
13
  publicRemote,
14
14
  redactLine,
15
15
  redactTraceText
16
- } from "./chunk-KWS6REFR.js";
16
+ } from "./chunk-Y332NKV6.js";
17
17
  import "./chunk-MLKGABMK.js";
18
18
 
19
19
  // src/trace-library.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentsky/sky",
3
- "version": "3.26.0",
3
+ "version": "3.31.0",
4
4
  "description": "sky \u2014 the AgentSky developer CLI: launch and talk to long-lived agents from your terminal.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,6 +19,7 @@
19
19
  "dev": "tsx src/index.ts",
20
20
  "build": "tsup src/index.ts --format esm --target node20 --clean",
21
21
  "test": "vitest run",
22
+ "sync:served-skill": "tsx scripts/sync-served-skill.ts",
22
23
  "typecheck": "tsc --noEmit"
23
24
  },
24
25
  "dependencies": {