@agentsky/sky 3.48.0 → 3.48.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.
- package/dist/chunk-2H4W5ZKZ.js +34 -0
- package/dist/{chunk-2YJE5NVV.js → chunk-6D36IT7T.js} +4 -2
- package/dist/{chunk-V4NPUQM2.js → chunk-A45NGV2Q.js} +20 -353
- package/dist/{chunk-NLV2DMMS.js → chunk-CV2ZRIF7.js} +7 -5
- package/dist/{chunk-ENG7YVFA.js → chunk-FVIPGI3E.js} +3 -3
- package/dist/{chunk-NENCXIQO.js → chunk-NAIYHS6Q.js} +3 -3
- package/dist/{chunk-3TYVCKLX.js → chunk-NJPIE762.js} +12 -8
- package/dist/{chunk-I6R6JSZT.js → chunk-PGX3AGCZ.js} +1 -1
- package/dist/chunk-RKMMLSGJ.js +317 -0
- package/dist/{chunk-AQ7E6RYH.js → chunk-UJS4JIE2.js} +27 -23
- package/dist/{chunk-4RUMYOAH.js → chunk-ZF2P6PKM.js} +62 -8
- package/dist/{chunk-JSW6RJM4.js → chunk-ZRV3UUW5.js} +1 -1
- package/dist/{compute-FTVP2A5T.js → compute-AERPKXJ3.js} +2 -2
- package/dist/{compute-report-743W5GPX.js → compute-report-CTT4WBSQ.js} +12 -10
- package/dist/index.js +75 -61
- package/dist/local-agents-O7PYSQGR.js +11 -0
- package/dist/{local-skills-LBCY7JDM.js → local-skills-E56TR7O6.js} +9 -3
- package/dist/{local-skills-run-OZTUHDBD.js → local-skills-run-TST44QSA.js} +16 -10
- package/dist/mcp-register-HDOVT4QT.js +40 -0
- package/dist/mcp-serve-2LBAEAJX.js +18 -0
- package/dist/{trace-TDYK47MM.js → trace-S2XZC75N.js} +2 -2
- package/dist/{trace-library-QDGMBGNH.js → trace-library-HN5TU5EJ.js} +6 -6
- package/package.json +1 -1
- package/dist/mcp-serve-5SHK5ASF.js +0 -16
package/dist/index.js
CHANGED
|
@@ -17,14 +17,27 @@ import {
|
|
|
17
17
|
skyCommand,
|
|
18
18
|
takeBack,
|
|
19
19
|
waitForAnswer
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-UJS4JIE2.js";
|
|
21
|
+
import {
|
|
22
|
+
SINGLE_REQUEST_MAX_BYTES,
|
|
23
|
+
codexThreadName,
|
|
24
|
+
importPathAllowed,
|
|
25
|
+
importReadAllowed,
|
|
26
|
+
loadedSkills,
|
|
27
|
+
repositoryRoot,
|
|
28
|
+
sharedInstructionPaths,
|
|
29
|
+
skillFiles,
|
|
30
|
+
transfer,
|
|
31
|
+
uploadLargeFile,
|
|
32
|
+
workspaceState
|
|
33
|
+
} from "./chunk-NJPIE762.js";
|
|
21
34
|
import {
|
|
22
35
|
SetupJournal,
|
|
23
36
|
TOKEN_ENV,
|
|
24
37
|
shellEnvFiles,
|
|
25
38
|
shellStartupFiles,
|
|
26
39
|
writeShellEnv
|
|
27
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-6D36IT7T.js";
|
|
28
41
|
import {
|
|
29
42
|
SHELL_AGENT,
|
|
30
43
|
agentKeysPath,
|
|
@@ -33,56 +46,31 @@ import {
|
|
|
33
46
|
runsUnattended,
|
|
34
47
|
shortToolCount,
|
|
35
48
|
wantsInteractiveClientKey
|
|
36
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-CV2ZRIF7.js";
|
|
37
50
|
import {
|
|
38
|
-
NO_TOOLS,
|
|
39
51
|
addPolicy,
|
|
40
52
|
deleteWorkspace,
|
|
41
53
|
deletionPreview,
|
|
42
|
-
detectClaudeApp,
|
|
43
|
-
detectHermes,
|
|
44
|
-
detectLocalAgents,
|
|
45
|
-
detectMcpClients,
|
|
46
|
-
hasMcpServer,
|
|
47
54
|
invite,
|
|
48
55
|
joinWorkspace,
|
|
49
56
|
leaveWorkspace,
|
|
50
57
|
listMembers,
|
|
51
58
|
listPolicies,
|
|
52
|
-
mcpConfigPath,
|
|
53
|
-
mcpUrlFor,
|
|
54
59
|
readWorkspaceSettings,
|
|
55
|
-
refreshMcpRegistrations,
|
|
56
|
-
registerMcpServer,
|
|
57
60
|
removeMember,
|
|
58
61
|
removePolicy,
|
|
59
62
|
renderDeletionPreview,
|
|
60
63
|
renderMembers,
|
|
61
64
|
renderPolicy,
|
|
62
65
|
renderSettingsBlock,
|
|
63
|
-
selectLocalAgents,
|
|
64
66
|
setPolicyEnabled,
|
|
65
67
|
setRole,
|
|
66
|
-
systemCommandRunner,
|
|
67
68
|
typedConfirmation,
|
|
68
69
|
withdrawInvite,
|
|
69
70
|
withoutSettingsBlock,
|
|
70
71
|
workspaceSlug,
|
|
71
72
|
writeSettingsBlocks
|
|
72
|
-
} from "./chunk-
|
|
73
|
-
import {
|
|
74
|
-
SINGLE_REQUEST_MAX_BYTES,
|
|
75
|
-
codexThreadName,
|
|
76
|
-
importPathAllowed,
|
|
77
|
-
importReadAllowed,
|
|
78
|
-
loadedSkills,
|
|
79
|
-
repositoryRoot,
|
|
80
|
-
sharedInstructionPaths,
|
|
81
|
-
skillFiles,
|
|
82
|
-
transfer,
|
|
83
|
-
uploadLargeFile,
|
|
84
|
-
workspaceState
|
|
85
|
-
} from "./chunk-3TYVCKLX.js";
|
|
73
|
+
} from "./chunk-A45NGV2Q.js";
|
|
86
74
|
import {
|
|
87
75
|
ApiError,
|
|
88
76
|
api,
|
|
@@ -96,22 +84,34 @@ import {
|
|
|
96
84
|
streamEvents,
|
|
97
85
|
uploadFile,
|
|
98
86
|
writeResponseFile
|
|
99
|
-
} from "./chunk-
|
|
100
|
-
import
|
|
87
|
+
} from "./chunk-NAIYHS6Q.js";
|
|
88
|
+
import {
|
|
89
|
+
NO_TOOLS,
|
|
90
|
+
detectClaudeApp,
|
|
91
|
+
detectHermes,
|
|
92
|
+
detectMcpClients,
|
|
93
|
+
hasMcpServer,
|
|
94
|
+
mcpConfigPath,
|
|
95
|
+
mcpUrlFor,
|
|
96
|
+
refreshMcpRegistrations,
|
|
97
|
+
registerMcpServer,
|
|
98
|
+
systemCommandRunner
|
|
99
|
+
} from "./chunk-RKMMLSGJ.js";
|
|
100
|
+
import {
|
|
101
|
+
detectLocalAgents,
|
|
102
|
+
selectLocalAgents
|
|
103
|
+
} from "./chunk-2H4W5ZKZ.js";
|
|
104
|
+
import "./chunk-FVIPGI3E.js";
|
|
101
105
|
import {
|
|
102
106
|
skillTargets,
|
|
103
107
|
syncLocalSkills
|
|
104
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-ZF2P6PKM.js";
|
|
105
109
|
import {
|
|
106
110
|
SKILL_NAME,
|
|
107
111
|
installSkill,
|
|
108
112
|
isInstalledSkill,
|
|
109
113
|
skillPaths
|
|
110
|
-
} from "./chunk-
|
|
111
|
-
import {
|
|
112
|
-
CLI_VERSION,
|
|
113
|
-
USER_AGENT
|
|
114
|
-
} from "./chunk-JSW6RJM4.js";
|
|
114
|
+
} from "./chunk-PGX3AGCZ.js";
|
|
115
115
|
import {
|
|
116
116
|
apiBase,
|
|
117
117
|
apiToken,
|
|
@@ -121,6 +121,10 @@ import {
|
|
|
121
121
|
loadConfig,
|
|
122
122
|
saveConfig
|
|
123
123
|
} from "./chunk-XHZJG3QT.js";
|
|
124
|
+
import {
|
|
125
|
+
CLI_VERSION,
|
|
126
|
+
USER_AGENT
|
|
127
|
+
} from "./chunk-ZRV3UUW5.js";
|
|
124
128
|
import "./chunk-OJ5ERABF.js";
|
|
125
129
|
import {
|
|
126
130
|
AGENT_TYPES,
|
|
@@ -3908,7 +3912,7 @@ async function setUp(opts, journal, afterwards = []) {
|
|
|
3908
3912
|
const workspace2 = engines.length && (has("skill") || has("capture")) ? await workspaceSlug().catch(() => null) : null;
|
|
3909
3913
|
let install = false;
|
|
3910
3914
|
if (engines.length && (has("skill") || has("capture") || has("plugins"))) {
|
|
3911
|
-
const captureNoticeLines = has("capture") && workspace2 ? captureNotice(workspace2, await (await import("./trace-library-
|
|
3915
|
+
const captureNoticeLines = has("capture") && workspace2 ? captureNotice(workspace2, await (await import("./trace-library-HN5TU5EJ.js")).sourceFolders()) : [];
|
|
3912
3916
|
if (interactive) for (const line2 of captureNoticeLines) console.log(line2);
|
|
3913
3917
|
install = await agreed(installQuestion(engines.map((engine) => engine.name), { capture: captureNoticeLines.length > 0 }));
|
|
3914
3918
|
if (!interactive && captureNoticeLines.length) captureNotices = captureNoticeLines;
|
|
@@ -3960,9 +3964,9 @@ async function setUp(opts, journal, afterwards = []) {
|
|
|
3960
3964
|
for (const client of mcpOnly) await registerMcp(client);
|
|
3961
3965
|
if (token) {
|
|
3962
3966
|
try {
|
|
3963
|
-
const { localSkillWorkspace } = await import("./local-skills-run-
|
|
3967
|
+
const { localSkillWorkspace } = await import("./local-skills-run-TST44QSA.js");
|
|
3964
3968
|
const workspace3 = await localSkillWorkspace();
|
|
3965
|
-
const { libraryRequest } = await import("./trace-library-
|
|
3969
|
+
const { libraryRequest } = await import("./trace-library-HN5TU5EJ.js");
|
|
3966
3970
|
const local = await syncLocalSkills({
|
|
3967
3971
|
workspace: workspace3,
|
|
3968
3972
|
targets: skillTargets(agents, hermes?.root ?? null),
|
|
@@ -11672,11 +11676,20 @@ skills.command("mine").description("your own skills, which follow you to every w
|
|
|
11672
11676
|
for (const skill of mine2) console.log(`${skill.id} ${skill.name ?? ""}${skill.base_skill_id ? " (your change to a shared skill)" : ""}`);
|
|
11673
11677
|
})
|
|
11674
11678
|
);
|
|
11675
|
-
skills.command("local").description("the skills sky installed in this computer's engines (Claude Code, Codex, Cursor, Grok, Hermes), with each one's revision, layer and pin").option("--json", "print as JSON").action(
|
|
11679
|
+
skills.command("local").description("the skills sky installed in this computer's engines (Claude Code, Codex, Cursor, Grok, Hermes), with each one's revision, layer and pin").option("--json", "print as JSON").option("--off", "stop installing skills on this computer and remove the folders sky wrote; folders you wrote stay").option("--on", "install the workspace's skills on this computer again from the next sync").action(
|
|
11676
11680
|
run2(async (opts) => {
|
|
11677
|
-
const { loadLocalSkillState } = await import("./local-skills-
|
|
11681
|
+
const { loadLocalSkillState, skillTargets: skillTargets2, turnOffLocalSkills, turnOnLocalSkills } = await import("./local-skills-E56TR7O6.js");
|
|
11682
|
+
if (opts.off && opts.on) throw new Error("pass --off or --on, not both");
|
|
11683
|
+
if (opts.off) {
|
|
11684
|
+
const { detectLocalAgents: detectLocalAgents2 } = await import("./local-agents-O7PYSQGR.js");
|
|
11685
|
+
const { detectHermes: detectHermes2 } = await import("./mcp-register-HDOVT4QT.js");
|
|
11686
|
+
const removed = turnOffLocalSkills(skillTargets2(detectLocalAgents2(), detectHermes2()?.root ?? null, void 0, { all: true }));
|
|
11687
|
+
return void console.log(`Skills are no longer installed on this computer${removed.length ? `; removed ${removed.length} that sky wrote` : ""}. \`sky skills local --on\` turns it back on.`);
|
|
11688
|
+
}
|
|
11689
|
+
if (opts.on) return void console.log(turnOnLocalSkills() ? "Skills are installed on this computer again from the next sync; `sky skills sync` does it now." : "Skills are already installed on this computer.");
|
|
11678
11690
|
const state = loadLocalSkillState();
|
|
11679
11691
|
if (opts.json) return void console.log(JSON.stringify(state, null, 2));
|
|
11692
|
+
if (state.off) return void console.log("Skills are not installed on this computer (turned off); `sky skills local --on` turns it back on.");
|
|
11680
11693
|
const names = Object.keys(state.skills).sort();
|
|
11681
11694
|
if (!names.length) return void console.log("no skills installed by sky on this computer; run `sky skills sync`");
|
|
11682
11695
|
console.log(`From ${state.workspace ?? "?"}, last checked ${state.checkedAt ?? "never"}:`);
|
|
@@ -11690,9 +11703,10 @@ skills.command("local").description("the skills sky installed in this computer's
|
|
|
11690
11703
|
);
|
|
11691
11704
|
skills.command("sync").description("install the workspace's skills and your own skills and changes in this computer's engines now; capture does this every 15 minutes").option("--workspace <slug>", "the workspace whose skills to install (default: where capture sends sessions, else your default)").option("--dry-run", "show what would change without writing").option("--json", "print the result as JSON").action(
|
|
11692
11705
|
run2(async (opts) => {
|
|
11693
|
-
const { describeLocalSkills, refreshLocalSkills } = await import("./local-skills-run-
|
|
11706
|
+
const { describeLocalSkills, refreshLocalSkills } = await import("./local-skills-run-TST44QSA.js");
|
|
11694
11707
|
const result = await refreshLocalSkills({ workspace: opts.workspace, dryRun: opts.dryRun });
|
|
11695
11708
|
if (opts.json) return void console.log(JSON.stringify(result, null, 2));
|
|
11709
|
+
if (result.off) return void console.log("Skills are not installed on this computer (turned off); `sky skills local --on` turns it back on.");
|
|
11696
11710
|
if (!result.checked) return void console.log("no engine that reads skills is installed on this computer");
|
|
11697
11711
|
const lines2 = describeLocalSkills(result);
|
|
11698
11712
|
console.log(lines2.length ? `Skills from ${result.workspace}:
|
|
@@ -11701,14 +11715,14 @@ ${lines2.join("\n")}` : `Skills from ${result.workspace} are current.`);
|
|
|
11701
11715
|
);
|
|
11702
11716
|
skills.command("pin <name>").description("keep a skill installed on this computer at the revision it has now; syncs leave it until you unpin it").action(
|
|
11703
11717
|
run2(async (name) => {
|
|
11704
|
-
const { pinLocalSkill } = await import("./local-skills-
|
|
11718
|
+
const { pinLocalSkill } = await import("./local-skills-E56TR7O6.js");
|
|
11705
11719
|
const pinned = pinLocalSkill(name);
|
|
11706
11720
|
console.log(`${name} stays at ${pinned.revision_id} on this computer`);
|
|
11707
11721
|
})
|
|
11708
11722
|
);
|
|
11709
11723
|
skills.command("unpin <name>").description("let a pinned skill follow its updates again from the next sync").action(
|
|
11710
11724
|
run2(async (name) => {
|
|
11711
|
-
const { unpinLocalSkill } = await import("./local-skills-
|
|
11725
|
+
const { unpinLocalSkill } = await import("./local-skills-E56TR7O6.js");
|
|
11712
11726
|
console.log(unpinLocalSkill(name) ? `${name} follows its updates again` : `${name} was not pinned`);
|
|
11713
11727
|
})
|
|
11714
11728
|
);
|
|
@@ -13494,22 +13508,22 @@ program.command("capabilities").description("deprecated: sky plugins list --view
|
|
|
13494
13508
|
);
|
|
13495
13509
|
var mcpCommand = program.command("mcp").description("the AgentSky MCP server on this computer");
|
|
13496
13510
|
mcpCommand.command("serve").description("serve the AgentSky MCP server's short tool list over stdio, for a program that starts its servers itself (the Claude app's chat, as `sky setup` registers it); each request is sent with the token sky holds at that moment").action(run2(async () => {
|
|
13497
|
-
const { serveMcp } = await import("./mcp-serve-
|
|
13511
|
+
const { serveMcp } = await import("./mcp-serve-2LBAEAJX.js");
|
|
13498
13512
|
await serveMcp();
|
|
13499
13513
|
}));
|
|
13500
13514
|
var compute = program.command("compute").description("the computers you set up with sky: the engines on each and whether each has the workspace's plugins, skills, capture and settings (the Compute group in Settings)");
|
|
13501
13515
|
compute.command("list", { isDefault: true }).description("every computer you set up with sky, newest report first, with what is not current on each engine").option("--json", "print the list as JSON").action(run2(async (opts) => {
|
|
13502
|
-
const { listComputeMachines, renderMachines } = await import("./compute-
|
|
13516
|
+
const { listComputeMachines, renderMachines } = await import("./compute-AERPKXJ3.js");
|
|
13503
13517
|
const machines = await listComputeMachines();
|
|
13504
13518
|
console.log(opts.json ? JSON.stringify({ machines }, null, 2) : renderMachines(machines));
|
|
13505
13519
|
}));
|
|
13506
13520
|
compute.command("repair <machine>").description("ask one of your computers to put its AgentSky setup right on its next scheduled run").option("--json", "print the answer as JSON").action(run2(async (machine, opts) => {
|
|
13507
|
-
const { requestRepair } = await import("./compute-
|
|
13521
|
+
const { requestRepair } = await import("./compute-AERPKXJ3.js");
|
|
13508
13522
|
const answer = await requestRepair(machine);
|
|
13509
13523
|
console.log(opts.json ? JSON.stringify({ machine: answer }, null, 2) : `${answer.name} repairs on its next run (at most 15 minutes while it is on).`);
|
|
13510
13524
|
}));
|
|
13511
13525
|
compute.command("remove <machine>").description("forget one of your computers; nothing on it changes (run `sky setup --remove` there to take AgentSky out)").action(run2(async (machine) => {
|
|
13512
|
-
const { removeMachine } = await import("./compute-
|
|
13526
|
+
const { removeMachine } = await import("./compute-AERPKXJ3.js");
|
|
13513
13527
|
await removeMachine(machine);
|
|
13514
13528
|
console.log(`Forgot ${machine}. It reports again on its next run unless \`sky setup --remove\` ran there.`);
|
|
13515
13529
|
}));
|
|
@@ -14178,7 +14192,7 @@ harness.command("connect").description("run an ACP agent (the command after --)
|
|
|
14178
14192
|
}));
|
|
14179
14193
|
var traceCmd = program.command("trace").description("correlate this machine's agent work with the cloud sessions it starts (metadata only unless you choose content)");
|
|
14180
14194
|
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(run2(async (opts) => {
|
|
14181
|
-
const { readState, writeState, record: record3, installClaudeHooks, parseContentScopes, chosenPaths, fileEvent } = await import("./trace-
|
|
14195
|
+
const { readState, writeState, record: record3, installClaudeHooks, parseContentScopes, chosenPaths, fileEvent } = await import("./trace-S2XZC75N.js");
|
|
14182
14196
|
if (readState()) throw new Error("a trace is already running here \u2014 `sky trace stop` it first");
|
|
14183
14197
|
const scopes = parseContentScopes(opts.capture);
|
|
14184
14198
|
const chosen = chosenPaths(opts.file ?? [], opts.dir ?? []);
|
|
@@ -14213,7 +14227,7 @@ traceCmd.command("start").description("start a trace: a grant for this machine,
|
|
|
14213
14227
|
}));
|
|
14214
14228
|
traceCmd.command("hook").description("record one Claude Code hook event read from stdin (run by the installed hooks; never fails, prints nothing)").action(async () => {
|
|
14215
14229
|
try {
|
|
14216
|
-
const { readState, record: record3, flush, grantSender, eventsForClaudeHook, contentForClaudeHook, clearState } = await import("./trace-
|
|
14230
|
+
const { readState, record: record3, flush, grantSender, eventsForClaudeHook, contentForClaudeHook, clearState } = await import("./trace-S2XZC75N.js");
|
|
14217
14231
|
const chunks = [];
|
|
14218
14232
|
for await (const chunk of process.stdin) chunks.push(chunk);
|
|
14219
14233
|
const input = JSON.parse(Buffer.concat(chunks).toString("utf8") || "{}");
|
|
@@ -14226,14 +14240,14 @@ traceCmd.command("hook").description("record one Claude Code hook event read fro
|
|
|
14226
14240
|
}
|
|
14227
14241
|
});
|
|
14228
14242
|
traceCmd.command("flush").description("send what the spool holds, retrying with backoff").action(run2(async () => {
|
|
14229
|
-
const { readState, flush, grantSender } = await import("./trace-
|
|
14243
|
+
const { readState, flush, grantSender } = await import("./trace-S2XZC75N.js");
|
|
14230
14244
|
const state = readState();
|
|
14231
14245
|
if (!state) throw new Error("no trace is running here");
|
|
14232
14246
|
const outcome = await flush(grantSender(state), { attempts: 4 });
|
|
14233
14247
|
console.log(`sent ${outcome.sent}, refused ${outcome.refused}, given up ${outcome.expired}, still pending ${outcome.pending}${outcome.stopped ? ` (stopped: ${outcome.stopped})` : ""}`);
|
|
14234
14248
|
}));
|
|
14235
14249
|
traceCmd.command("status").description("the running trace and its spool").action(run2(async () => {
|
|
14236
|
-
const { readState, spoolStatus } = await import("./trace-
|
|
14250
|
+
const { readState, spoolStatus } = await import("./trace-S2XZC75N.js");
|
|
14237
14251
|
const state = readState();
|
|
14238
14252
|
if (!state) {
|
|
14239
14253
|
console.log("No trace is running here.");
|
|
@@ -14243,7 +14257,7 @@ traceCmd.command("status").description("the running trace and its spool").action
|
|
|
14243
14257
|
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`);
|
|
14244
14258
|
}));
|
|
14245
14259
|
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(run2(async (id2, opts) => {
|
|
14246
|
-
const { readState } = await import("./trace-
|
|
14260
|
+
const { readState } = await import("./trace-S2XZC75N.js");
|
|
14247
14261
|
const ref = id2 ?? readState()?.trace_id;
|
|
14248
14262
|
if (!ref) throw new Error("name a trace, or start one here");
|
|
14249
14263
|
const bundle = await api("GET", `/traces/${ref}`);
|
|
@@ -14270,7 +14284,7 @@ traceCmd.command("show [id]").description("the trace bundle: spans, the sessions
|
|
|
14270
14284
|
for (const gap of bundle.gaps) console.log(` gap: ${gap.span_id} ${gap.reason}`);
|
|
14271
14285
|
}));
|
|
14272
14286
|
traceCmd.command("stop").description("end the root span, send what is left, and revoke this machine's grant").action(run2(async () => {
|
|
14273
|
-
const { readState, record: record3, flush, grantSender, clearState } = await import("./trace-
|
|
14287
|
+
const { readState, record: record3, flush, grantSender, clearState } = await import("./trace-S2XZC75N.js");
|
|
14274
14288
|
const state = readState();
|
|
14275
14289
|
if (!state) throw new Error("no trace is running here");
|
|
14276
14290
|
if (state.root_span) record3(() => [{ span_id: state.root_span, kind: "end", outcome: "completed" }]);
|
|
@@ -14283,7 +14297,7 @@ var recordCmd = traceCmd.command("record").description("record every Claude Code
|
|
|
14283
14297
|
const { homedir: homedir12 } = await import("os");
|
|
14284
14298
|
const { join: join21 } = await import("path");
|
|
14285
14299
|
const vault2 = await import("./trace-vault-IUNYRVGZ.js");
|
|
14286
|
-
const { installClaudeHooks, uninstallClaudeHooks } = await import("./trace-
|
|
14300
|
+
const { installClaudeHooks, uninstallClaudeHooks } = await import("./trace-S2XZC75N.js");
|
|
14287
14301
|
const command = "sky trace record hook";
|
|
14288
14302
|
const config = vault2.loadVaultConfig();
|
|
14289
14303
|
const settings = resolve13(opts.settings ?? config.settings ?? join21(process.env.CLAUDE_CONFIG_DIR ?? join21(homedir12(), ".claude"), "settings.json"));
|
|
@@ -14348,7 +14362,7 @@ recordCmd.command("seal <session-dir>").description("seal the cut segments of on
|
|
|
14348
14362
|
}
|
|
14349
14363
|
});
|
|
14350
14364
|
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("--exclude <folder>", "never upload a session that ran in <folder> or below it, to the library or as a session (repeatable; shared with the AgentSky Mac app when it is installed)", collect).option("--unexclude <folder>", "stop excluding <folder> (repeatable)", collect).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("--install-hooks", "also sync at the end of every Claude Code and Codex turn (their hook and notify settings)").option("--status", "what sync has done on this machine").option("--quiet", "print only failures").action(async (payload, opts) => {
|
|
14351
|
-
const lib = await import("./trace-library-
|
|
14365
|
+
const lib = await import("./trace-library-HN5TU5EJ.js");
|
|
14352
14366
|
if (opts.hook) {
|
|
14353
14367
|
try {
|
|
14354
14368
|
let raw = payload ?? "";
|
|
@@ -14461,7 +14475,7 @@ traceCmd.command("sync [payload]").description("upload this machine's agent sess
|
|
|
14461
14475
|
return;
|
|
14462
14476
|
}
|
|
14463
14477
|
if (!opts.dryRun) {
|
|
14464
|
-
const { describeLocalSkills, refreshLocalSkills } = await import("./local-skills-run-
|
|
14478
|
+
const { describeLocalSkills, refreshLocalSkills } = await import("./local-skills-run-TST44QSA.js");
|
|
14465
14479
|
try {
|
|
14466
14480
|
const skills2 = await refreshLocalSkills({ hook: Boolean(opts.session?.length) });
|
|
14467
14481
|
if (skills2 && !opts.quiet) for (const line2 of describeLocalSkills(skills2)) console.log(line2);
|
|
@@ -14476,7 +14490,7 @@ traceCmd.command("sync [payload]").description("upload this machine's agent sess
|
|
|
14476
14490
|
for (const error of report.errors.slice(0, 20)) console.error(` ${error}`);
|
|
14477
14491
|
}
|
|
14478
14492
|
if (!opts.session && !opts.dryRun) {
|
|
14479
|
-
const { upkeepComputer } = await import("./compute-report-
|
|
14493
|
+
const { upkeepComputer } = await import("./compute-report-CTT4WBSQ.js");
|
|
14480
14494
|
const said = await upkeepComputer().catch((error) => `AgentSky could not check this computer's setup: ${error instanceof Error ? error.message : String(error)}`);
|
|
14481
14495
|
if (said) console.log(said);
|
|
14482
14496
|
}
|
|
@@ -14485,7 +14499,7 @@ traceCmd.command("sync [payload]").description("upload this machine's agent sess
|
|
|
14485
14499
|
});
|
|
14486
14500
|
traceCmd.command("mac <machine>").description("which workspace's trace library one of your Macs fills; the AgentSky Mac app uploads that Mac's agent sessions there, redacted on the Mac first, exactly as `sky trace sync` would (machine ids: `sky api GET /desktop/machines`)").option("--on", "send this Mac's sessions to --workspace (or the current workspace), moving them from any other").option("--off", "stop this Mac's uploads to --workspace (or the current workspace)").option("--workspace <slug>", "the workspace to turn on or off (default: the current one)").option("--json", "print the answer as JSON").action(run2(async (machine, opts) => {
|
|
14487
14501
|
if (opts.on && opts.off) throw new Error("choose --on or --off");
|
|
14488
|
-
const { libraryRequest } = await import("./trace-library-
|
|
14502
|
+
const { libraryRequest } = await import("./trace-library-HN5TU5EJ.js");
|
|
14489
14503
|
const workspace2 = opts.workspace ?? currentUniverse();
|
|
14490
14504
|
if (!workspace2) throw new Error("name a workspace with --workspace");
|
|
14491
14505
|
const answer = opts.on || opts.off ? await libraryRequest("PUT", `/trace-library/devices/${encodeURIComponent(machine)}`, workspace2, { enabled: Boolean(opts.on) }) : await libraryRequest("GET", `/trace-library/devices/${encodeURIComponent(machine)}`, workspace2);
|
|
@@ -14502,7 +14516,7 @@ traceCmd.command("search <query...>").description("search every session in a wor
|
|
|
14502
14516
|
console.log(opts.json ? JSON.stringify(page, null, 2) : renderContextPage(page));
|
|
14503
14517
|
}));
|
|
14504
14518
|
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(run2(async (opts) => {
|
|
14505
|
-
const { libraryRequest } = await import("./trace-library-
|
|
14519
|
+
const { libraryRequest } = await import("./trace-library-HN5TU5EJ.js");
|
|
14506
14520
|
const workspace2 = opts.workspace ?? currentUniverse();
|
|
14507
14521
|
if (!workspace2) throw new Error("name a workspace with --workspace");
|
|
14508
14522
|
const page = await libraryRequest("GET", `/trace-library?limit=${opts.limit}`, workspace2);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
checkedWithin,
|
|
3
|
+
hermesExternalSkillDirs,
|
|
3
4
|
installedMarker,
|
|
4
5
|
loadLocalSkillState,
|
|
5
6
|
localSkillStatePath,
|
|
@@ -8,14 +9,17 @@ import {
|
|
|
8
9
|
saveLocalSkillState,
|
|
9
10
|
skillTargets,
|
|
10
11
|
syncLocalSkills,
|
|
12
|
+
turnOffLocalSkills,
|
|
13
|
+
turnOnLocalSkills,
|
|
11
14
|
unpinLocalSkill
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-JSW6RJM4.js";
|
|
15
|
+
} from "./chunk-ZF2P6PKM.js";
|
|
16
|
+
import "./chunk-PGX3AGCZ.js";
|
|
15
17
|
import "./chunk-XHZJG3QT.js";
|
|
18
|
+
import "./chunk-ZRV3UUW5.js";
|
|
16
19
|
import "./chunk-MLKGABMK.js";
|
|
17
20
|
export {
|
|
18
21
|
checkedWithin,
|
|
22
|
+
hermesExternalSkillDirs,
|
|
19
23
|
installedMarker,
|
|
20
24
|
loadLocalSkillState,
|
|
21
25
|
localSkillStatePath,
|
|
@@ -24,5 +28,7 @@ export {
|
|
|
24
28
|
saveLocalSkillState,
|
|
25
29
|
skillTargets,
|
|
26
30
|
syncLocalSkills,
|
|
31
|
+
turnOffLocalSkills,
|
|
32
|
+
turnOnLocalSkills,
|
|
27
33
|
unpinLocalSkill
|
|
28
34
|
};
|
|
@@ -1,36 +1,42 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SetupJournal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6D36IT7T.js";
|
|
4
4
|
import {
|
|
5
|
-
detectHermes,
|
|
6
|
-
detectLocalAgents,
|
|
7
5
|
workspaceSlug
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-A45NGV2Q.js";
|
|
7
|
+
import "./chunk-NAIYHS6Q.js";
|
|
8
|
+
import {
|
|
9
|
+
detectHermes
|
|
10
|
+
} from "./chunk-RKMMLSGJ.js";
|
|
11
|
+
import {
|
|
12
|
+
detectLocalAgents
|
|
13
|
+
} from "./chunk-2H4W5ZKZ.js";
|
|
10
14
|
import {
|
|
11
15
|
checkedWithin,
|
|
16
|
+
loadLocalSkillState,
|
|
12
17
|
skillTargets,
|
|
13
18
|
syncLocalSkills
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-JSW6RJM4.js";
|
|
19
|
+
} from "./chunk-ZF2P6PKM.js";
|
|
20
|
+
import "./chunk-PGX3AGCZ.js";
|
|
17
21
|
import "./chunk-XHZJG3QT.js";
|
|
22
|
+
import "./chunk-ZRV3UUW5.js";
|
|
18
23
|
import "./chunk-MLKGABMK.js";
|
|
19
24
|
|
|
20
25
|
// src/local-skills-run.ts
|
|
21
26
|
var HOOK_RECHECK_MS = 5 * 60 * 1e3;
|
|
22
27
|
async function localSkillWorkspace(explicit) {
|
|
23
28
|
if (explicit) return explicit;
|
|
24
|
-
const { loadSyncConfig } = await import("./trace-library-
|
|
29
|
+
const { loadSyncConfig } = await import("./trace-library-HN5TU5EJ.js");
|
|
25
30
|
return loadSyncConfig().fallback ?? await workspaceSlug();
|
|
26
31
|
}
|
|
27
32
|
async function refreshLocalSkills(opts = {}) {
|
|
28
33
|
if (opts.hook && checkedWithin(HOOK_RECHECK_MS)) return null;
|
|
34
|
+
if (loadLocalSkillState().off) return { workspace: opts.workspace ?? "", checked: false, skills: [], off: true };
|
|
29
35
|
const hermes = detectHermes();
|
|
30
36
|
const targets = skillTargets(detectLocalAgents(), hermes?.root ?? null);
|
|
31
37
|
const workspace = await localSkillWorkspace(opts.workspace);
|
|
32
38
|
if (!targets.length) return { workspace, checked: false, skills: [] };
|
|
33
|
-
const { libraryRequest } = await import("./trace-library-
|
|
39
|
+
const { libraryRequest } = await import("./trace-library-HN5TU5EJ.js");
|
|
34
40
|
const journal = opts.dryRun ? void 0 : new SetupJournal();
|
|
35
41
|
try {
|
|
36
42
|
return await syncLocalSkills({ workspace, targets, journal, dryRun: opts.dryRun, request: (method, path, slug) => libraryRequest(method, path, slug) });
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MCP_SERVER_NAME,
|
|
3
|
+
NO_TOOLS,
|
|
4
|
+
claudeAppRoot,
|
|
5
|
+
detectClaudeApp,
|
|
6
|
+
detectHermes,
|
|
7
|
+
detectMcpClients,
|
|
8
|
+
hasMcpServer,
|
|
9
|
+
mcpCommands,
|
|
10
|
+
mcpConfigPath,
|
|
11
|
+
mcpUrlFor,
|
|
12
|
+
refreshMcpRegistrations,
|
|
13
|
+
registerMcpServer,
|
|
14
|
+
registeredMcpUrl,
|
|
15
|
+
registeredToolList,
|
|
16
|
+
systemCommandRunner,
|
|
17
|
+
withoutTomlServer
|
|
18
|
+
} from "./chunk-RKMMLSGJ.js";
|
|
19
|
+
import "./chunk-2H4W5ZKZ.js";
|
|
20
|
+
import "./chunk-PGX3AGCZ.js";
|
|
21
|
+
import "./chunk-ZRV3UUW5.js";
|
|
22
|
+
import "./chunk-MLKGABMK.js";
|
|
23
|
+
export {
|
|
24
|
+
MCP_SERVER_NAME,
|
|
25
|
+
NO_TOOLS,
|
|
26
|
+
claudeAppRoot,
|
|
27
|
+
detectClaudeApp,
|
|
28
|
+
detectHermes,
|
|
29
|
+
detectMcpClients,
|
|
30
|
+
hasMcpServer,
|
|
31
|
+
mcpCommands,
|
|
32
|
+
mcpConfigPath,
|
|
33
|
+
mcpUrlFor,
|
|
34
|
+
refreshMcpRegistrations,
|
|
35
|
+
registerMcpServer,
|
|
36
|
+
registeredMcpUrl,
|
|
37
|
+
registeredToolList,
|
|
38
|
+
systemCommandRunner,
|
|
39
|
+
withoutTomlServer
|
|
40
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
forwardLine,
|
|
3
|
+
serveMcp,
|
|
4
|
+
shortToolCount
|
|
5
|
+
} from "./chunk-CV2ZRIF7.js";
|
|
6
|
+
import "./chunk-A45NGV2Q.js";
|
|
7
|
+
import "./chunk-NAIYHS6Q.js";
|
|
8
|
+
import "./chunk-RKMMLSGJ.js";
|
|
9
|
+
import "./chunk-2H4W5ZKZ.js";
|
|
10
|
+
import "./chunk-PGX3AGCZ.js";
|
|
11
|
+
import "./chunk-XHZJG3QT.js";
|
|
12
|
+
import "./chunk-ZRV3UUW5.js";
|
|
13
|
+
import "./chunk-MLKGABMK.js";
|
|
14
|
+
export {
|
|
15
|
+
forwardLine,
|
|
16
|
+
serveMcp,
|
|
17
|
+
shortToolCount
|
|
18
|
+
};
|
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
traceDir,
|
|
23
23
|
uninstallClaudeHooks,
|
|
24
24
|
writeState
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-JSW6RJM4.js";
|
|
25
|
+
} from "./chunk-FVIPGI3E.js";
|
|
27
26
|
import "./chunk-XHZJG3QT.js";
|
|
27
|
+
import "./chunk-ZRV3UUW5.js";
|
|
28
28
|
import "./chunk-W24YSGH4.js";
|
|
29
29
|
import "./chunk-MLKGABMK.js";
|
|
30
30
|
export {
|
|
@@ -29,13 +29,13 @@ import {
|
|
|
29
29
|
syncConfigPath,
|
|
30
30
|
syncDir,
|
|
31
31
|
syncTraces
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-JSW6RJM4.js";
|
|
32
|
+
} from "./chunk-NJPIE762.js";
|
|
33
|
+
import "./chunk-NAIYHS6Q.js";
|
|
34
|
+
import "./chunk-FVIPGI3E.js";
|
|
35
|
+
import "./chunk-ZF2P6PKM.js";
|
|
36
|
+
import "./chunk-PGX3AGCZ.js";
|
|
38
37
|
import "./chunk-XHZJG3QT.js";
|
|
38
|
+
import "./chunk-ZRV3UUW5.js";
|
|
39
39
|
import "./chunk-OJ5ERABF.js";
|
|
40
40
|
import "./chunk-W24YSGH4.js";
|
|
41
41
|
import "./chunk-MLKGABMK.js";
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
forwardLine,
|
|
3
|
-
serveMcp,
|
|
4
|
-
shortToolCount
|
|
5
|
-
} from "./chunk-NLV2DMMS.js";
|
|
6
|
-
import "./chunk-V4NPUQM2.js";
|
|
7
|
-
import "./chunk-NENCXIQO.js";
|
|
8
|
-
import "./chunk-I6R6JSZT.js";
|
|
9
|
-
import "./chunk-JSW6RJM4.js";
|
|
10
|
-
import "./chunk-XHZJG3QT.js";
|
|
11
|
-
import "./chunk-MLKGABMK.js";
|
|
12
|
-
export {
|
|
13
|
-
forwardLine,
|
|
14
|
-
serveMcp,
|
|
15
|
-
shortToolCount
|
|
16
|
-
};
|