@agentsky/sky 3.27.0 → 3.32.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.27.0";
41
+ var CLI_VERSION = "3.32.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-WFNREYLD.js";
7
+ } from "./chunk-NAZDAGN3.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-GINRW2EE.js";
18
+ } from "./chunk-TEHISHVI.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-WFNREYLD.js";
29
+ } from "./chunk-NAZDAGN3.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
@@ -3598,7 +3598,10 @@ it, and name its path in the brief.
3598
3598
  3. Put the pieces together.
3599
3599
  4. If the person should be able to open or share the result, \`publish_artifact\`
3600
3600
  the files; \`share_artifact\` only when they asked for a link. To change a
3601
- published file, \`save_artifact_file\` against the \`base_version\` you read.
3601
+ published file, \`save_artifact_file\` against the \`base_version\` you read;
3602
+ \`update_artifact\` renames one and \`copy_artifact\` copies one version of it.
3603
+ \`export_artifact\` hands a result over in any format its \`export_formats\`
3604
+ lists, and \`import_artifact\` brings in a file or a public page as a result.
3602
3605
  5. \`stop_session\` every agent you no longer need.
3603
3606
  6. Tell the person what was done, which agent did which part, and what it cost
3604
3607
  (\`get_task\` reports the task's cost).
@@ -7095,9 +7098,35 @@ async function saveArtifactFile(id2, path2, input) {
7095
7098
  const sent = await apiBytes("PUT", `/artifacts/${encodeURIComponent(id2)}/files/${encodePath(path2)}?${query}`, { bytes: input.bytes ?? new Uint8Array(), mediaType: "application/octet-stream" });
7096
7099
  return (await sent.json()).artifact;
7097
7100
  }
7101
+ async function importArtifact(input) {
7102
+ const fields = { ...input.name ? { name: input.name } : {}, ...input.taskId ? { task_id: input.taskId } : {}, ...input.requestId ? { request_id: input.requestId } : {} };
7103
+ if ("url" in input) return (await api("POST", "/artifacts/imports", { url: input.url, ...fields })).artifact;
7104
+ const form = new FormData();
7105
+ form.set("file", new File([new Uint8Array(input.file.bytes)], input.file.name));
7106
+ for (const [field, value] of Object.entries(fields)) form.set(field, value);
7107
+ return (await apiForm("POST", "/artifacts/imports", form)).artifact;
7108
+ }
7109
+ async function exportArtifact(id2, options = {}) {
7110
+ const query = new URLSearchParams({ ...options.format ? { format: options.format } : {}, ...options.version ? { version: String(options.version) } : {} }).toString();
7111
+ return (await apiBytes("GET", `/artifacts/${encodeURIComponent(id2)}/export${query ? `?${query}` : ""}`)).bytes;
7112
+ }
7113
+ async function convertArtifactToPage(id2, input) {
7114
+ return api("POST", `/artifacts/${encodeURIComponent(id2)}/conversions`, { to: "page", base_version: input.baseVersion, ...input.requestId ? { request_id: input.requestId } : {} });
7115
+ }
7098
7116
  async function shareArtifact(id2, enabled) {
7099
7117
  return (await api("POST", `/artifacts/${encodeURIComponent(id2)}/share`, { enabled })).share_url;
7100
7118
  }
7119
+ async function renameArtifact(id2, name) {
7120
+ return (await api("PATCH", `/artifacts/${encodeURIComponent(id2)}`, { name })).artifact;
7121
+ }
7122
+ async function copyArtifact(id2, input) {
7123
+ return (await api("POST", `/artifacts/${encodeURIComponent(id2)}/copy`, {
7124
+ ...input.name ? { name: input.name } : {},
7125
+ ...input.version ? { version: input.version } : {},
7126
+ ...input.taskId ? { task_id: input.taskId } : {},
7127
+ request_id: input.requestId ?? crypto.randomUUID()
7128
+ })).artifact;
7129
+ }
7101
7130
  async function deleteArtifact(id2) {
7102
7131
  await api("DELETE", `/artifacts/${encodeURIComponent(id2)}`);
7103
7132
  }
@@ -10764,6 +10793,32 @@ artifact.command("save <id> <path>").description("save one file as the artifact'
10764
10793
  })));
10765
10794
  })
10766
10795
  );
10796
+ artifact.command("update <id>").description("rename an artifact; its links, versions and files stay").requiredOption("--name <name>", "the new name").action(run(async (id2, opts) => {
10797
+ console.log(renderArtifact(await renameArtifact(id2, opts.name)));
10798
+ }));
10799
+ artifact.command("copy <id>").description("copy one version into a new artifact with its own files and no public link").option("--name <name>", "the copy's name").option("--artifact-version <version>", "the version to copy; the current one by default").option("--task <task>", "the task the copy lands in, in any workspace you can act in; the source's own by default").option("--request-id <id>", "send the same value when retrying").action(run(async (id2, opts) => {
10800
+ console.log(renderArtifact(await copyArtifact(id2, { name: opts.name, version: opts.artifactVersion ? Number(opts.artifactVersion) : void 0, taskId: opts.task, requestId: opts.requestId })));
10801
+ }));
10802
+ 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(
10803
+ run(async (file, opts) => {
10804
+ if (Boolean(file) === Boolean(opts.url)) throw new Error("name a file or --url");
10805
+ 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 })));
10806
+ })
10807
+ );
10808
+ 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(
10809
+ run(async (id2, opts) => {
10810
+ const bytes = await exportArtifact(id2, { format: opts.format, version: opts.artifactVersion === void 0 ? void 0 : Number(opts.artifactVersion) });
10811
+ writeFileSync14(opts.out, bytes);
10812
+ console.log(`Wrote ${bytes.length} bytes to ${opts.out}`);
10813
+ })
10814
+ );
10815
+ 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(
10816
+ run(async (id2, opts) => {
10817
+ const { artifact: converted, loss } = await convertArtifactToPage(id2, { baseVersion: Number(opts.base), requestId: opts.requestId });
10818
+ console.log(renderArtifact(converted));
10819
+ if (loss) console.log(loss);
10820
+ })
10821
+ );
10767
10822
  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(
10768
10823
  run(async (id2, opts) => {
10769
10824
  const url = await shareArtifact(id2, !opts.off);
@@ -12161,7 +12216,7 @@ harness.command("connect").description("run an ACP agent (the command after --)
12161
12216
  }));
12162
12217
  var traceCmd = program.command("trace").description("correlate this machine's agent work with the cloud sessions it starts (metadata only unless you choose content)");
12163
12218
  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) => {
12164
- const { readState, writeState, record, installClaudeHooks, parseContentScopes, chosenPaths, fileEvent } = await import("./trace-GKK2W25M.js");
12219
+ const { readState, writeState, record, installClaudeHooks, parseContentScopes, chosenPaths, fileEvent } = await import("./trace-RWZOZ27K.js");
12165
12220
  if (readState()) throw new Error("a trace is already running here \u2014 `sky trace stop` it first");
12166
12221
  const scopes = parseContentScopes(opts.capture);
12167
12222
  const chosen = chosenPaths(opts.file ?? [], opts.dir ?? []);
@@ -12196,7 +12251,7 @@ traceCmd.command("start").description("start a trace: a grant for this machine,
12196
12251
  }));
12197
12252
  traceCmd.command("hook").description("record one Claude Code hook event read from stdin (run by the installed hooks; never fails, prints nothing)").action(async () => {
12198
12253
  try {
12199
- const { readState, record, flush, grantSender, eventsForClaudeHook, contentForClaudeHook, clearState } = await import("./trace-GKK2W25M.js");
12254
+ const { readState, record, flush, grantSender, eventsForClaudeHook, contentForClaudeHook, clearState } = await import("./trace-RWZOZ27K.js");
12200
12255
  const chunks = [];
12201
12256
  for await (const chunk of process.stdin) chunks.push(chunk);
12202
12257
  const input = JSON.parse(Buffer.concat(chunks).toString("utf8") || "{}");
@@ -12209,14 +12264,14 @@ traceCmd.command("hook").description("record one Claude Code hook event read fro
12209
12264
  }
12210
12265
  });
12211
12266
  traceCmd.command("flush").description("send what the spool holds, retrying with backoff").action(run(async () => {
12212
- const { readState, flush, grantSender } = await import("./trace-GKK2W25M.js");
12267
+ const { readState, flush, grantSender } = await import("./trace-RWZOZ27K.js");
12213
12268
  const state = readState();
12214
12269
  if (!state) throw new Error("no trace is running here");
12215
12270
  const outcome = await flush(grantSender(state), { attempts: 4 });
12216
12271
  console.log(`sent ${outcome.sent}, refused ${outcome.refused}, given up ${outcome.expired}, still pending ${outcome.pending}${outcome.stopped ? ` (stopped: ${outcome.stopped})` : ""}`);
12217
12272
  }));
12218
12273
  traceCmd.command("status").description("the running trace and its spool").action(run(async () => {
12219
- const { readState, spoolStatus } = await import("./trace-GKK2W25M.js");
12274
+ const { readState, spoolStatus } = await import("./trace-RWZOZ27K.js");
12220
12275
  const state = readState();
12221
12276
  if (!state) {
12222
12277
  console.log("No trace is running here.");
@@ -12226,7 +12281,7 @@ traceCmd.command("status").description("the running trace and its spool").action
12226
12281
  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`);
12227
12282
  }));
12228
12283
  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) => {
12229
- const { readState } = await import("./trace-GKK2W25M.js");
12284
+ const { readState } = await import("./trace-RWZOZ27K.js");
12230
12285
  const ref = id2 ?? readState()?.trace_id;
12231
12286
  if (!ref) throw new Error("name a trace, or start one here");
12232
12287
  const bundle = await api("GET", `/traces/${ref}`);
@@ -12253,7 +12308,7 @@ traceCmd.command("show [id]").description("the trace bundle: spans, the sessions
12253
12308
  for (const gap of bundle.gaps) console.log(` gap: ${gap.span_id} ${gap.reason}`);
12254
12309
  }));
12255
12310
  traceCmd.command("stop").description("end the root span, send what is left, and revoke this machine's grant").action(run(async () => {
12256
- const { readState, record, flush, grantSender, clearState } = await import("./trace-GKK2W25M.js");
12311
+ const { readState, record, flush, grantSender, clearState } = await import("./trace-RWZOZ27K.js");
12257
12312
  const state = readState();
12258
12313
  if (!state) throw new Error("no trace is running here");
12259
12314
  if (state.root_span) record(() => [{ span_id: state.root_span, kind: "end", outcome: "completed" }]);
@@ -12263,7 +12318,7 @@ traceCmd.command("stop").description("end the root span, send what is left, and
12263
12318
  console.log(`Stopped ${state.trace_id}${outcome.pending ? ` (${outcome.pending} events could not be sent)` : ""}`);
12264
12319
  }));
12265
12320
  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) => {
12266
- const lib = await import("./trace-library-G6QBAUYA.js");
12321
+ const lib = await import("./trace-library-O3XHVVJ5.js");
12267
12322
  if (opts.hook) {
12268
12323
  try {
12269
12324
  let raw = payload ?? "";
@@ -12379,7 +12434,7 @@ traceCmd.command("search <query...>").description("search every session in a wor
12379
12434
  console.log(opts.json ? JSON.stringify(page, null, 2) : renderContextPage(page));
12380
12435
  }));
12381
12436
  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) => {
12382
- const { libraryRequest } = await import("./trace-library-G6QBAUYA.js");
12437
+ const { libraryRequest } = await import("./trace-library-O3XHVVJ5.js");
12383
12438
  const workspace2 = opts.workspace ?? currentUniverse();
12384
12439
  if (!workspace2) throw new Error("name a workspace with --workspace");
12385
12440
  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-WFNREYLD.js";
4
+ } from "./chunk-NAZDAGN3.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-GINRW2EE.js";
4
+ } from "./chunk-TEHISHVI.js";
5
5
  import {
6
6
  USER_AGENT,
7
7
  apiBase,
8
8
  apiToken
9
- } from "./chunk-WFNREYLD.js";
9
+ } from "./chunk-NAZDAGN3.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.27.0",
3
+ "version": "3.32.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",