@agentsky/sky 2.9.0 → 2.9.2

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.
@@ -20959,13 +20959,19 @@ function splitMcpServers(servers) {
20959
20959
  const kept = {};
20960
20960
  const dropped = [];
20961
20961
  for (const [name, def] of Object.entries(servers)) {
20962
- const hasEnvValues = Object.values(def.env ?? {}).some((v) => String(v).trim() !== "");
20962
+ const envEntries = Object.entries(def.env ?? {}).filter(([, v]) => String(v).trim() !== "");
20963
+ const hasEnvValues = envEntries.length > 0;
20963
20964
  const hasAuthHeaders = Object.keys(def.headers ?? {}).some(
20964
20965
  (h) => h.toLowerCase() !== "content-type"
20965
20966
  );
20966
20967
  const hasTokenShape = containsCredentialShapedString(JSON.stringify(def));
20967
- if (hasEnvValues || hasAuthHeaders || hasTokenShape) dropped.push(name);
20968
- else kept[name] = def;
20968
+ if (hasEnvValues || hasAuthHeaders || hasTokenShape) {
20969
+ dropped.push({
20970
+ name,
20971
+ envKeys: envEntries.map(([k]) => k),
20972
+ ...typeof def.url === "string" && def.url ? { url: def.url } : {}
20973
+ });
20974
+ } else kept[name] = def;
20969
20975
  }
20970
20976
  return { kept, dropped };
20971
20977
  }
@@ -21904,7 +21910,6 @@ var GATEWAY_CAPABILITY_IDS = [
21904
21910
  "googlemap.geocode",
21905
21911
  "googlemap.places",
21906
21912
  "agentmail.list-inboxes",
21907
- "social-boost.catalog",
21908
21913
  "tinyfish.search",
21909
21914
  "tinyfish.profile-list",
21910
21915
  "meta.transcribe",
@@ -21915,9 +21920,19 @@ var GATEWAY_CAPABILITY_IDS = [
21915
21920
  "fish-audio.tts",
21916
21921
  "google.image",
21917
21922
  "openai.image-2.5",
21918
- "wan.image"
21923
+ "wan.image",
21924
+ "logo.lookup",
21925
+ "openmeteo.weather",
21926
+ "frankfurter.fx",
21927
+ "dictionary.define",
21928
+ "openlibrary.search",
21929
+ "googledns.resolve",
21930
+ "qrserver.create"
21931
+ ];
21932
+ var RETIRED_CAPABILITY_IDS = [
21933
+ "social-boost.catalog"
21919
21934
  ];
21920
- var CAPABILITY_IDS = [...LEGACY_CAPABILITY_IDS, ...GATEWAY_CAPABILITY_IDS];
21935
+ var CAPABILITY_IDS = [...LEGACY_CAPABILITY_IDS, ...GATEWAY_CAPABILITY_IDS, ...RETIRED_CAPABILITY_IDS];
21921
21936
  var PLATFORM_CAPABILITY_IDS = ["platform.orchestration"];
21922
21937
  var allowedLlms = {
21923
21938
  jev: ["typesafe/jev-1.13"],
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  skillRefSchema,
17
17
  splitMcpServers,
18
18
  supersededBy
19
- } from "./chunk-NRTKH367.js";
19
+ } from "./chunk-MLIZJSMO.js";
20
20
 
21
21
  // src/index.ts
22
22
  import { existsSync as existsSync7, readFileSync as readFileSync10, writeFileSync as writeFileSync6 } from "fs";
@@ -64,7 +64,7 @@ function currentUniverse() {
64
64
  }
65
65
 
66
66
  // src/version.ts
67
- var CLI_VERSION = "2.9.0";
67
+ var CLI_VERSION = "2.9.2";
68
68
  var USER_AGENT = `sky-cli/${CLI_VERSION} (${process.platform}; node/${process.versions.node})`;
69
69
 
70
70
  // src/api.ts
@@ -185,7 +185,7 @@ async function resolveSessionRef(ref) {
185
185
  return agent2.defaultSessionId;
186
186
  }
187
187
  async function* streamEvents(sessionId, signal) {
188
- const { parseSseStream } = await import("./src-OEZ7BT2L.js");
188
+ const { parseSseStream } = await import("./src-QYXD7WXR.js");
189
189
  const res = await fetch(
190
190
  `${apiBase()}/sessions/${encodeURIComponent(sessionId)}/stream`,
191
191
  {
@@ -457,6 +457,13 @@ async function publishListing(agentId, options) {
457
457
  async function removeListing(handle) {
458
458
  await api("DELETE", `/catalog/listings/${encodeURIComponent(bare(handle))}`);
459
459
  }
460
+ async function setEngineStatus(engine, status, reason) {
461
+ await api("PATCH", `/catalog/engines/${encodeURIComponent(engine)}`, { status, reason });
462
+ const state = await api("GET", "/catalog/engines", void 0, { auth: false });
463
+ if (state.delisted.includes(engine) !== (status === "delisted")) {
464
+ throw new Error("The catalog does not show the requested state; check whether another operator changed it.");
465
+ }
466
+ }
460
467
  var uses = (agent2) => `${agent2.stats.uses} ${agent2.stats.uses === 1 ? "use" : "uses"}`;
461
468
  var mine = (agent2) => agent2.visibility === "workspace" ? " (yours)" : "";
462
469
  function renderCatalogAgent(agent2) {
@@ -552,7 +559,19 @@ function readClaudeCode() {
552
559
  }
553
560
  }
554
561
  const { prompt, truncated } = assemblePrompt(parts);
555
- const { kept, dropped } = splitMcpServers(claudeMcpServers());
562
+ const allServers = claudeMcpServers();
563
+ const { kept, dropped } = splitMcpServers(allServers);
564
+ const secretCandidates = [];
565
+ for (const d of dropped) {
566
+ const def = allServers[d.name];
567
+ if (!def?.env) continue;
568
+ for (const key of d.envKeys) {
569
+ const value = def.env[key];
570
+ if (value !== void 0 && value.trim()) {
571
+ secretCandidates.push({ serverName: d.name, envKey: key, value, url: d.url });
572
+ }
573
+ }
574
+ }
556
575
  return {
557
576
  harness: "claude_code",
558
577
  configRoot,
@@ -561,7 +580,8 @@ function readClaudeCode() {
561
580
  truncated,
562
581
  model: claudeModel(configRoot),
563
582
  keptServers: kept,
564
- droppedServers: dropped
583
+ droppedServers: dropped,
584
+ secretCandidates
565
585
  };
566
586
  }
567
587
  function detectHarness(explicit) {
@@ -595,6 +615,79 @@ function writeLink(configRoot, link) {
595
615
  writeFileSync3(linkPath(configRoot), `${JSON.stringify(link, null, 2)}
596
616
  `);
597
617
  }
618
+ var DEFAULT_VAULT_NAME = "default";
619
+ async function fetchDefaultVaultId() {
620
+ const { vaults } = await api(
621
+ "GET",
622
+ "/vaults"
623
+ );
624
+ return vaults.find((v) => v.display_name === DEFAULT_VAULT_NAME)?.id ?? null;
625
+ }
626
+ async function ensureDefaultVaultId() {
627
+ const existing = await fetchDefaultVaultId();
628
+ if (existing) return existing;
629
+ try {
630
+ const { vault } = await api("POST", "/vaults", {
631
+ display_name: DEFAULT_VAULT_NAME
632
+ });
633
+ return vault.id;
634
+ } catch (error) {
635
+ if (error instanceof ApiError && error.status === 409) {
636
+ const raced = await fetchDefaultVaultId();
637
+ if (raced) return raced;
638
+ }
639
+ throw error;
640
+ }
641
+ }
642
+ async function confirmAndVaultSecrets(candidates, yes) {
643
+ if (!candidates.length) return;
644
+ if (yes) {
645
+ console.log(
646
+ ` ${candidates.length} secret${candidates.length === 1 ? "" : "s"} from dropped MCP servers not saved (--yes skips vault confirmation).`
647
+ );
648
+ return;
649
+ }
650
+ console.log("\nSecret-bearing MCP servers were left out of the clone payload.");
651
+ console.log("You can save their keys to your workspace vault now (values are sent encrypted, never displayed).\n");
652
+ let vaultId;
653
+ let saved = 0;
654
+ let skipped = 0;
655
+ for (const c of candidates) {
656
+ const chosen = await confirm(` Add ${c.envKey} (from ${c.serverName}) to your default vault?`);
657
+ if (!chosen) {
658
+ console.log(` \u2014 skipped ${c.envKey}`);
659
+ skipped += 1;
660
+ continue;
661
+ }
662
+ try {
663
+ vaultId ??= await ensureDefaultVaultId();
664
+ await api("POST", `/vaults/${encodeURIComponent(vaultId)}/secrets`, {
665
+ display_name: `${c.envKey} (${c.serverName})`,
666
+ auth: {
667
+ type: "environment_variable",
668
+ secret_name: c.envKey,
669
+ value: c.value,
670
+ allowed_hosts: c.url ? [c.url] : []
671
+ }
672
+ });
673
+ console.log(` \u2713 saved ${c.envKey}`);
674
+ saved += 1;
675
+ } catch (error) {
676
+ if (error instanceof ApiError && error.status === 409) {
677
+ console.log(` \u2014 ${c.envKey} already in vault`);
678
+ } else {
679
+ const msg = error instanceof Error ? error.message : String(error);
680
+ console.log(` \u2717 ${c.envKey} failed: ${msg}`);
681
+ }
682
+ }
683
+ }
684
+ if (saved || skipped) {
685
+ console.log(
686
+ `
687
+ Vault: ${saved} saved, ${skipped} skipped. Attach the "default" vault to a session to use these keys.`
688
+ );
689
+ }
690
+ }
598
691
  function confirm(question) {
599
692
  return new Promise((done) => {
600
693
  const rl = createInterface({ input: process.stdin, output: process.stdout });
@@ -626,7 +719,7 @@ async function createClone(local, opts) {
626
719
  if (local.truncated) console.log(" note: instructions exceeded 100k chars and were truncated");
627
720
  if (local.droppedServers.length) {
628
721
  console.log(
629
- `Left out (need a key): ${local.droppedServers.map((n) => `${n} MCP`).join(", ")}. Run \`sky setup secrets\` to choose which keys to save to your vault.`
722
+ `Left out of clone (secret-bearing): ${local.droppedServers.map((d) => `${d.name} MCP`).join(", ")}`
630
723
  );
631
724
  }
632
725
  if (opts.dryRun) {
@@ -682,6 +775,7 @@ async function createClone(local, opts) {
682
775
  console.log(
683
776
  `Linked this machine (${linkPath(local.configRoot)}). Push prompt changes anytime by running \`sky clone\` again.`
684
777
  );
778
+ await confirmAndVaultSecrets(local.secretCandidates, opts.yes ?? false);
685
779
  if (opts.open) openBrowser(url);
686
780
  }
687
781
  async function syncClone(local, link, opts) {
@@ -740,11 +834,12 @@ async function syncClone(local, link, opts) {
740
834
  }
741
835
  if (local.droppedServers.length) {
742
836
  console.log(
743
- ` left out (need a key): ${local.droppedServers.map((n) => `${n} MCP`).join(", ")}. Run \`sky setup secrets\` to choose which keys to save to your vault.`
837
+ ` left out of clone (secret-bearing): ${local.droppedServers.map((d) => `${d.name} MCP`).join(", ")}`
744
838
  );
745
839
  }
746
840
  writeLink(local.configRoot, { ...link, lastSyncedAt: (/* @__PURE__ */ new Date()).toISOString() });
747
841
  console.log(`Synced ${link.agentId}.`);
842
+ await confirmAndVaultSecrets(local.secretCandidates, opts.yes ?? false);
748
843
  if (opts.open) openBrowser(`${apiBase()}/agents/${link.agentId}`);
749
844
  }
750
845
  async function clone(opts) {
@@ -3339,6 +3434,12 @@ catalog.command("unpublish <handle>").description("take down one of your workspa
3339
3434
  console.log(`Removed @${handle.replace(/^@/, "")} from the catalog`);
3340
3435
  })
3341
3436
  );
3437
+ for (const [verb, status] of [["delist", "delisted"], ["relist", "listed"]]) {
3438
+ catalog.command(`${verb} <engine>`).description(`${verb} a platform harness immediately (platform operators only)`).requiredOption("--reason <text>", "the reason recorded with the operator change").action(run(async (engine, options) => {
3439
+ await setEngineStatus(engine, status, options.reason);
3440
+ console.log(`${engine}: ${status} (verified)`);
3441
+ }));
3442
+ }
3342
3443
  program.command("config").description("show the CLI config location and current values").action(() => {
3343
3444
  const config = loadConfig();
3344
3445
  console.log(`config: ${configPath()}`);
@@ -89,7 +89,6 @@ declare const agentAddonsSchema: z.ZodObject<{
89
89
  "googlemap.geocode": "googlemap.geocode";
90
90
  "googlemap.places": "googlemap.places";
91
91
  "agentmail.list-inboxes": "agentmail.list-inboxes";
92
- "social-boost.catalog": "social-boost.catalog";
93
92
  "tinyfish.search": "tinyfish.search";
94
93
  "tinyfish.profile-list": "tinyfish.profile-list";
95
94
  "meta.transcribe": "meta.transcribe";
@@ -101,6 +100,14 @@ declare const agentAddonsSchema: z.ZodObject<{
101
100
  "google.image": "google.image";
102
101
  "openai.image-2.5": "openai.image-2.5";
103
102
  "wan.image": "wan.image";
103
+ "logo.lookup": "logo.lookup";
104
+ "openmeteo.weather": "openmeteo.weather";
105
+ "frankfurter.fx": "frankfurter.fx";
106
+ "dictionary.define": "dictionary.define";
107
+ "openlibrary.search": "openlibrary.search";
108
+ "googledns.resolve": "googledns.resolve";
109
+ "qrserver.create": "qrserver.create";
110
+ "social-boost.catalog": "social-boost.catalog";
104
111
  }>, unknown>>>>;
105
112
  model: z.ZodOptional<z.ZodString>;
106
113
  reasoning_effort: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
@@ -221,7 +228,6 @@ declare const createProductAgentSchema: z.ZodObject<{
221
228
  "googlemap.geocode": "googlemap.geocode";
222
229
  "googlemap.places": "googlemap.places";
223
230
  "agentmail.list-inboxes": "agentmail.list-inboxes";
224
- "social-boost.catalog": "social-boost.catalog";
225
231
  "tinyfish.search": "tinyfish.search";
226
232
  "tinyfish.profile-list": "tinyfish.profile-list";
227
233
  "meta.transcribe": "meta.transcribe";
@@ -233,6 +239,14 @@ declare const createProductAgentSchema: z.ZodObject<{
233
239
  "google.image": "google.image";
234
240
  "openai.image-2.5": "openai.image-2.5";
235
241
  "wan.image": "wan.image";
242
+ "logo.lookup": "logo.lookup";
243
+ "openmeteo.weather": "openmeteo.weather";
244
+ "frankfurter.fx": "frankfurter.fx";
245
+ "dictionary.define": "dictionary.define";
246
+ "openlibrary.search": "openlibrary.search";
247
+ "googledns.resolve": "googledns.resolve";
248
+ "qrserver.create": "qrserver.create";
249
+ "social-boost.catalog": "social-boost.catalog";
236
250
  }>, unknown>>>>;
237
251
  model: z.ZodOptional<z.ZodString>;
238
252
  reasoning_effort: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
@@ -353,7 +367,6 @@ declare const prepareProductSessionSchema: z.ZodObject<{
353
367
  "googlemap.geocode": "googlemap.geocode";
354
368
  "googlemap.places": "googlemap.places";
355
369
  "agentmail.list-inboxes": "agentmail.list-inboxes";
356
- "social-boost.catalog": "social-boost.catalog";
357
370
  "tinyfish.search": "tinyfish.search";
358
371
  "tinyfish.profile-list": "tinyfish.profile-list";
359
372
  "meta.transcribe": "meta.transcribe";
@@ -365,6 +378,14 @@ declare const prepareProductSessionSchema: z.ZodObject<{
365
378
  "google.image": "google.image";
366
379
  "openai.image-2.5": "openai.image-2.5";
367
380
  "wan.image": "wan.image";
381
+ "logo.lookup": "logo.lookup";
382
+ "openmeteo.weather": "openmeteo.weather";
383
+ "frankfurter.fx": "frankfurter.fx";
384
+ "dictionary.define": "dictionary.define";
385
+ "openlibrary.search": "openlibrary.search";
386
+ "googledns.resolve": "googledns.resolve";
387
+ "qrserver.create": "qrserver.create";
388
+ "social-boost.catalog": "social-boost.catalog";
368
389
  }>, unknown>>>>;
369
390
  model: z.ZodOptional<z.ZodString>;
370
391
  reasoning_effort: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
package/dist/products.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  skillsArraySchema,
9
9
  systemMessageEventSchema,
10
10
  userMessageEventSchema
11
- } from "./chunk-NRTKH367.js";
11
+ } from "./chunk-MLIZJSMO.js";
12
12
 
13
13
  // ../../packages/spec/src/compatibility.ts
14
14
  var capabilityInputsSchema = capabilitiesSchema;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  external_exports,
3
3
  messagePartSchema
4
- } from "./chunk-NRTKH367.js";
4
+ } from "./chunk-MLIZJSMO.js";
5
5
 
6
6
  // ../../packages/chat/src/stream.ts
7
7
  async function* parseSseStream(body) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentsky/sky",
3
- "version": "2.9.0",
3
+ "version": "2.9.2",
4
4
  "description": "sky — the AgentSky developer CLI: launch and talk to long-lived agents from your terminal.",
5
5
  "license": "MIT",
6
6
  "type": "module",