@agentsky/sky 2.9.1 → 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
|
|
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)
|
|
20968
|
-
|
|
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-
|
|
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.
|
|
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-
|
|
188
|
+
const { parseSseStream } = await import("./src-QYXD7WXR.js");
|
|
189
189
|
const res = await fetch(
|
|
190
190
|
`${apiBase()}/sessions/${encodeURIComponent(sessionId)}/stream`,
|
|
191
191
|
{
|
|
@@ -559,7 +559,19 @@ function readClaudeCode() {
|
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
561
|
const { prompt, truncated } = assemblePrompt(parts);
|
|
562
|
-
const
|
|
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
|
+
}
|
|
563
575
|
return {
|
|
564
576
|
harness: "claude_code",
|
|
565
577
|
configRoot,
|
|
@@ -568,7 +580,8 @@ function readClaudeCode() {
|
|
|
568
580
|
truncated,
|
|
569
581
|
model: claudeModel(configRoot),
|
|
570
582
|
keptServers: kept,
|
|
571
|
-
droppedServers: dropped
|
|
583
|
+
droppedServers: dropped,
|
|
584
|
+
secretCandidates
|
|
572
585
|
};
|
|
573
586
|
}
|
|
574
587
|
function detectHarness(explicit) {
|
|
@@ -602,6 +615,79 @@ function writeLink(configRoot, link) {
|
|
|
602
615
|
writeFileSync3(linkPath(configRoot), `${JSON.stringify(link, null, 2)}
|
|
603
616
|
`);
|
|
604
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
|
+
}
|
|
605
691
|
function confirm(question) {
|
|
606
692
|
return new Promise((done) => {
|
|
607
693
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
@@ -633,7 +719,7 @@ async function createClone(local, opts) {
|
|
|
633
719
|
if (local.truncated) console.log(" note: instructions exceeded 100k chars and were truncated");
|
|
634
720
|
if (local.droppedServers.length) {
|
|
635
721
|
console.log(
|
|
636
|
-
`Left out
|
|
722
|
+
`Left out of clone (secret-bearing): ${local.droppedServers.map((d) => `${d.name} MCP`).join(", ")}`
|
|
637
723
|
);
|
|
638
724
|
}
|
|
639
725
|
if (opts.dryRun) {
|
|
@@ -689,6 +775,7 @@ async function createClone(local, opts) {
|
|
|
689
775
|
console.log(
|
|
690
776
|
`Linked this machine (${linkPath(local.configRoot)}). Push prompt changes anytime by running \`sky clone\` again.`
|
|
691
777
|
);
|
|
778
|
+
await confirmAndVaultSecrets(local.secretCandidates, opts.yes ?? false);
|
|
692
779
|
if (opts.open) openBrowser(url);
|
|
693
780
|
}
|
|
694
781
|
async function syncClone(local, link, opts) {
|
|
@@ -747,11 +834,12 @@ async function syncClone(local, link, opts) {
|
|
|
747
834
|
}
|
|
748
835
|
if (local.droppedServers.length) {
|
|
749
836
|
console.log(
|
|
750
|
-
` left out
|
|
837
|
+
` left out of clone (secret-bearing): ${local.droppedServers.map((d) => `${d.name} MCP`).join(", ")}`
|
|
751
838
|
);
|
|
752
839
|
}
|
|
753
840
|
writeLink(local.configRoot, { ...link, lastSyncedAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
754
841
|
console.log(`Synced ${link.agentId}.`);
|
|
842
|
+
await confirmAndVaultSecrets(local.secretCandidates, opts.yes ?? false);
|
|
755
843
|
if (opts.open) openBrowser(`${apiBase()}/agents/${link.agentId}`);
|
|
756
844
|
}
|
|
757
845
|
async function clone(opts) {
|
package/dist/products.d.ts
CHANGED
|
@@ -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