@agentsky/sky 3.36.0 → 3.37.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  USER_AGENT
3
- } from "./chunk-WWWRFIK5.js";
3
+ } from "./chunk-HKZ5CTZB.js";
4
4
  import {
5
5
  apiBase,
6
6
  apiToken,
@@ -153,7 +153,7 @@ async function resolveSessionRef(ref) {
153
153
  return agent.defaultSessionId;
154
154
  }
155
155
  async function* streamEvents(sessionId, signal) {
156
- const { parseSseStream } = await import("./src-HN6NQQYS.js");
156
+ const { parseSseStream } = await import("./src-NDBT3SB7.js");
157
157
  const res = await fetch(
158
158
  `${apiBase()}/sessions/${encodeURIComponent(sessionId)}/stream`,
159
159
  {
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var CLI_VERSION = "3.36.0";
2
+ var CLI_VERSION = "3.37.0";
3
3
  var USER_AGENT = `sky-cli/${CLI_VERSION} (${process.platform}; node/${process.versions.node})`;
4
4
 
5
5
  export {
@@ -20783,14 +20783,14 @@ var CATALOG_MODELS = [
20783
20783
  "tiers": [
20784
20784
  {
20785
20785
  "maxPromptTokens": 262144,
20786
- "input": 0.203088,
20787
- "output": 1.218525,
20788
- "cachedInput": 0.040618
20786
+ "input": 0.010445,
20787
+ "output": 0.552398,
20788
+ "cachedInput": 9284e-6
20789
20789
  }
20790
20790
  ],
20791
20791
  "maxPrice": {
20792
- "prompt": 0.1925,
20793
- "completion": 1.155
20792
+ "prompt": 99e-4,
20793
+ "completion": 0.5236
20794
20794
  },
20795
20795
  "reasoningEfforts": [
20796
20796
  "none",
@@ -21279,14 +21279,14 @@ var CATALOG_MODELS = [
21279
21279
  "tiers": [
21280
21280
  {
21281
21281
  "maxPromptTokens": 1048576,
21282
- "input": 2.20495,
21283
- "output": 11.02475,
21284
- "cachedInput": 0.220495
21282
+ "input": 2.0889,
21283
+ "output": 10.4445,
21284
+ "cachedInput": 0.20889
21285
21285
  }
21286
21286
  ],
21287
21287
  "maxPrice": {
21288
- "prompt": 2.09,
21289
- "completion": 10.45
21288
+ "prompt": 1.98,
21289
+ "completion": 9.9
21290
21290
  },
21291
21291
  "reasoningEfforts": [
21292
21292
  "none",
package/dist/index.js CHANGED
@@ -15,11 +15,11 @@ import {
15
15
  uploadFile,
16
16
  uploadLargeFile,
17
17
  writeResponseFile
18
- } from "./chunk-TLR374RK.js";
18
+ } from "./chunk-GH5VMYMK.js";
19
19
  import {
20
20
  CLI_VERSION,
21
21
  USER_AGENT
22
- } from "./chunk-WWWRFIK5.js";
22
+ } from "./chunk-HKZ5CTZB.js";
23
23
  import {
24
24
  AGENT_TYPES,
25
25
  MODEL_SUBSCRIPTION_PLAN_PHRASE,
@@ -41,7 +41,7 @@ import {
41
41
  skillRefSchema,
42
42
  splitMcpServers,
43
43
  supersededBy
44
- } from "./chunk-5CWYSS5Q.js";
44
+ } from "./chunk-VI2JL2OC.js";
45
45
  import {
46
46
  apiBase,
47
47
  apiToken,
@@ -1497,6 +1497,10 @@ function registerMacControlCommands(mac2) {
1497
1497
  mac2.command("stop <session>").description("stop a chat running on your Mac (this key must be paired with it)").option("--request-id <id>", "stable retry identity; a retry stops once").action(async (session2, options) => {
1498
1498
  print(await api("POST", `/desktop/sessions/${encodeURIComponent(session2)}/stop`, { request_id: options.requestId ?? randomUUID3(), surface: "api" }));
1499
1499
  });
1500
+ mac2.command("start <text>").description("start a new chat on your newest online Mac with your own Claude Code or Codex (this key must be paired with it); the Mac picks the folder from the task").option("--agent <agent>", "claude_code or codex", "claude_code").option("--repository <owner/name>", "the GitHub repository the task is about, to find its folder").option("--request-id <id>", "stable retry identity; a retry starts it once").action(async (text2, options) => {
1501
+ if (options.agent !== "claude_code" && options.agent !== "codex") throw new Error("agent must be claude_code or codex");
1502
+ print(await api("POST", "/desktop/chats", { text: text2, request_id: options.requestId ?? randomUUID3(), agent: options.agent, ...options.repository ? { repository: options.repository } : {}, surface: "api" }));
1503
+ });
1500
1504
  mac2.command("answer <session> <prompt> <decision>").description("allow or deny a command a chat on your Mac waits on; keychain commands are answered on the Mac only").option("--request-id <id>", "stable retry identity; a retry answers once").action(async (session2, prompt, decision, options) => {
1501
1505
  if (decision !== "allow" && decision !== "deny") throw new Error("decision must be allow or deny");
1502
1506
  print(await api("POST", `/desktop/sessions/${encodeURIComponent(session2)}/prompts/${encodeURIComponent(prompt)}/answer`, { request_id: options.requestId ?? randomUUID3(), decision, surface: "api" }));
@@ -7092,7 +7096,13 @@ async function listArtifacts(task2) {
7092
7096
  return (await api("GET", `/artifacts${query}`)).artifacts;
7093
7097
  }
7094
7098
  function publishBody(task2, options) {
7095
- return { task_id: task2, name: options.name, paths: options.path, ...options.entry ? { entry: options.entry } : {} };
7099
+ return {
7100
+ task_id: task2,
7101
+ name: options.name,
7102
+ paths: options.path,
7103
+ ...options.entry ? { entry: options.entry } : {},
7104
+ ...options.baseVersion !== void 0 ? { base_version: options.baseVersion } : {}
7105
+ };
7096
7106
  }
7097
7107
  async function publishArtifact(task2, options) {
7098
7108
  return (await api("POST", "/artifacts", publishBody(task2, options))).artifact;
@@ -10085,11 +10095,16 @@ files.command("upload <paths...>").description("upload local files and folders w
10085
10095
  }
10086
10096
  })
10087
10097
  );
10088
- files.command("usage").description("how many files your workspace holds and the space they take (there is no storage limit)").action(
10098
+ files.command("usage").description("how many files your workspace holds, the space they take (there is no storage limit) and how storage is billed").action(
10089
10099
  run(async () => {
10090
10100
  const usage = await api("GET", "/files/usage");
10091
10101
  const gib = (bytes) => `${(bytes / 1024 ** 3).toFixed(2)} GiB`;
10092
10102
  console.log(`${usage.file_count} files ${gib(usage.size_bytes)} used ${usage.storage_limit_bytes === null ? "no storage limit" : `${gib(usage.storage_limit_bytes)} limit`} up to ${gib(usage.max_file_bytes)} per file`);
10103
+ const storage = usage.storage;
10104
+ if (storage && storage.billing !== "off") {
10105
+ const when = storage.billing === "free" && storage.free_until ? `free until ${storage.free_until.slice(0, 10)}` : "billed daily";
10106
+ console.log(`storage ${gib(storage.billed_bytes)} $${storage.price_usd_per_gib_month.toFixed(2)}/GiB-month about $${storage.monthly_estimate_usd.toFixed(2)}/month ${when}`);
10107
+ }
10093
10108
  })
10094
10109
  );
10095
10110
  files.command("list").description("list your uploads, or one session's files with --session").option("--session <ref>", "list the files of this session (its message copies and outputs)").option("--limit <n>", "page size (default 20)").option("--page <cursor>", "continue from a previous page").action(
@@ -10786,9 +10801,9 @@ artifact.command("list").description("the workspace's artifacts, or one task's w
10786
10801
  for (const a of list) console.log(renderArtifact(a));
10787
10802
  })
10788
10803
  );
10789
- artifact.command("publish <task>").description("publish paths from the task's files as a new version of the named artifact").requiredOption("--name <name>", "the artifact's name; publishing the same name again adds a version").requiredOption("--path <path...>", "task file paths to include").option("--entry <path>", "the file a viewer opens first (default: the first path)").action(
10804
+ artifact.command("publish <task>").description("publish paths from the task's files as a new version of the named artifact").requiredOption("--name <name>", "the artifact's name; publishing the same name again adds a version").requiredOption("--path <path...>", "task file paths to include").option("--entry <path>", "the file a viewer opens first (default: the first path)").option("--base <version>", "the version you read; refused if another version has been made since", Number).action(
10790
10805
  run(async (taskId, opts) => {
10791
- console.log(renderArtifact(await publishArtifact(taskId, opts)));
10806
+ console.log(renderArtifact(await publishArtifact(taskId, { ...opts, baseVersion: opts.base })));
10792
10807
  })
10793
10808
  );
10794
10809
  artifact.command("get <id> <path>").description("read one file of an artifact; prints it, or writes it with -o").option("-o, --out <path>", "where to write the bytes").action(
@@ -12243,7 +12258,7 @@ harness.command("connect").description("run an ACP agent (the command after --)
12243
12258
  }));
12244
12259
  var traceCmd = program.command("trace").description("correlate this machine's agent work with the cloud sessions it starts (metadata only unless you choose content)");
12245
12260
  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) => {
12246
- const { readState, writeState, record, installClaudeHooks, parseContentScopes, chosenPaths, fileEvent } = await import("./trace-DZZ7QYJT.js");
12261
+ const { readState, writeState, record, installClaudeHooks, parseContentScopes, chosenPaths, fileEvent } = await import("./trace-AI2MDTNU.js");
12247
12262
  if (readState()) throw new Error("a trace is already running here \u2014 `sky trace stop` it first");
12248
12263
  const scopes = parseContentScopes(opts.capture);
12249
12264
  const chosen = chosenPaths(opts.file ?? [], opts.dir ?? []);
@@ -12278,7 +12293,7 @@ traceCmd.command("start").description("start a trace: a grant for this machine,
12278
12293
  }));
12279
12294
  traceCmd.command("hook").description("record one Claude Code hook event read from stdin (run by the installed hooks; never fails, prints nothing)").action(async () => {
12280
12295
  try {
12281
- const { readState, record, flush, grantSender, eventsForClaudeHook, contentForClaudeHook, clearState } = await import("./trace-DZZ7QYJT.js");
12296
+ const { readState, record, flush, grantSender, eventsForClaudeHook, contentForClaudeHook, clearState } = await import("./trace-AI2MDTNU.js");
12282
12297
  const chunks = [];
12283
12298
  for await (const chunk of process.stdin) chunks.push(chunk);
12284
12299
  const input = JSON.parse(Buffer.concat(chunks).toString("utf8") || "{}");
@@ -12291,14 +12306,14 @@ traceCmd.command("hook").description("record one Claude Code hook event read fro
12291
12306
  }
12292
12307
  });
12293
12308
  traceCmd.command("flush").description("send what the spool holds, retrying with backoff").action(run(async () => {
12294
- const { readState, flush, grantSender } = await import("./trace-DZZ7QYJT.js");
12309
+ const { readState, flush, grantSender } = await import("./trace-AI2MDTNU.js");
12295
12310
  const state = readState();
12296
12311
  if (!state) throw new Error("no trace is running here");
12297
12312
  const outcome = await flush(grantSender(state), { attempts: 4 });
12298
12313
  console.log(`sent ${outcome.sent}, refused ${outcome.refused}, given up ${outcome.expired}, still pending ${outcome.pending}${outcome.stopped ? ` (stopped: ${outcome.stopped})` : ""}`);
12299
12314
  }));
12300
12315
  traceCmd.command("status").description("the running trace and its spool").action(run(async () => {
12301
- const { readState, spoolStatus } = await import("./trace-DZZ7QYJT.js");
12316
+ const { readState, spoolStatus } = await import("./trace-AI2MDTNU.js");
12302
12317
  const state = readState();
12303
12318
  if (!state) {
12304
12319
  console.log("No trace is running here.");
@@ -12308,7 +12323,7 @@ traceCmd.command("status").description("the running trace and its spool").action
12308
12323
  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`);
12309
12324
  }));
12310
12325
  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) => {
12311
- const { readState } = await import("./trace-DZZ7QYJT.js");
12326
+ const { readState } = await import("./trace-AI2MDTNU.js");
12312
12327
  const ref = id2 ?? readState()?.trace_id;
12313
12328
  if (!ref) throw new Error("name a trace, or start one here");
12314
12329
  const bundle = await api("GET", `/traces/${ref}`);
@@ -12335,7 +12350,7 @@ traceCmd.command("show [id]").description("the trace bundle: spans, the sessions
12335
12350
  for (const gap of bundle.gaps) console.log(` gap: ${gap.span_id} ${gap.reason}`);
12336
12351
  }));
12337
12352
  traceCmd.command("stop").description("end the root span, send what is left, and revoke this machine's grant").action(run(async () => {
12338
- const { readState, record, flush, grantSender, clearState } = await import("./trace-DZZ7QYJT.js");
12353
+ const { readState, record, flush, grantSender, clearState } = await import("./trace-AI2MDTNU.js");
12339
12354
  const state = readState();
12340
12355
  if (!state) throw new Error("no trace is running here");
12341
12356
  if (state.root_span) record(() => [{ span_id: state.root_span, kind: "end", outcome: "completed" }]);
@@ -12348,7 +12363,7 @@ var recordCmd = traceCmd.command("record").description("record every Claude Code
12348
12363
  const { homedir: homedir13 } = await import("os");
12349
12364
  const { join: join23 } = await import("path");
12350
12365
  const vault2 = await import("./trace-vault-IUNYRVGZ.js");
12351
- const { installClaudeHooks, uninstallClaudeHooks } = await import("./trace-DZZ7QYJT.js");
12366
+ const { installClaudeHooks, uninstallClaudeHooks } = await import("./trace-AI2MDTNU.js");
12352
12367
  const command = "sky trace record hook";
12353
12368
  const config = vault2.loadVaultConfig();
12354
12369
  const settings = resolve11(opts.settings ?? config.settings ?? join23(process.env.CLAUDE_CONFIG_DIR ?? join23(homedir13(), ".claude"), "settings.json"));
@@ -12411,7 +12426,7 @@ recordCmd.command("seal <session-dir>").description("seal the cut segments of on
12411
12426
  }
12412
12427
  });
12413
12428
  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) => {
12414
- const lib = await import("./trace-library-VZX576JO.js");
12429
+ const lib = await import("./trace-library-HT2OZ3PS.js");
12415
12430
  if (opts.hook) {
12416
12431
  try {
12417
12432
  let raw = payload ?? "";
@@ -12527,7 +12542,7 @@ traceCmd.command("search <query...>").description("search every session in a wor
12527
12542
  console.log(opts.json ? JSON.stringify(page, null, 2) : renderContextPage(page));
12528
12543
  }));
12529
12544
  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) => {
12530
- const { libraryRequest } = await import("./trace-library-VZX576JO.js");
12545
+ const { libraryRequest } = await import("./trace-library-HT2OZ3PS.js");
12531
12546
  const workspace2 = opts.workspace ?? currentUniverse();
12532
12547
  if (!workspace2) throw new Error("name a workspace with --workspace");
12533
12548
  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-5CWYSS5Q.js";
5
+ } from "./chunk-VI2JL2OC.js";
6
6
  import "./chunk-MLKGABMK.js";
7
7
 
8
8
  // ../../packages/chat/src/stream.ts
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  USER_AGENT
3
- } from "./chunk-WWWRFIK5.js";
3
+ } from "./chunk-HKZ5CTZB.js";
4
4
  import {
5
5
  TRACE_CONTENT_SCOPES,
6
6
  redactTraceText
7
- } from "./chunk-5CWYSS5Q.js";
7
+ } from "./chunk-VI2JL2OC.js";
8
8
  import {
9
9
  configPath
10
10
  } from "./chunk-XHZJG3QT.js";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  ApiError,
3
3
  uploadLargeFile
4
- } from "./chunk-TLR374RK.js";
4
+ } from "./chunk-GH5VMYMK.js";
5
5
  import {
6
6
  USER_AGENT
7
- } from "./chunk-WWWRFIK5.js";
7
+ } from "./chunk-HKZ5CTZB.js";
8
8
  import {
9
9
  SessionSourceCollector,
10
10
  UnsafeImportError,
11
11
  publicRemote,
12
12
  redactLine,
13
13
  redactTraceText
14
- } from "./chunk-5CWYSS5Q.js";
14
+ } from "./chunk-VI2JL2OC.js";
15
15
  import {
16
16
  apiBase,
17
17
  apiToken
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentsky/sky",
3
- "version": "3.36.0",
3
+ "version": "3.37.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",