@agentsky/sky 2.20.0 → 2.20.1
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-BHW2NAXP.js → chunk-ICTCB4VT.js} +1 -1
- package/dist/{chunk-ICSGMEG5.js → chunk-S6A5V7XR.js} +2 -2
- package/dist/index.js +31 -12
- package/dist/products.js +1 -1
- package/dist/{src-3HXHE2S6.js → src-KP6YIFNP.js} +1 -1
- package/dist/{trace-DI2SQI7M.js → trace-SJHQ66JA.js} +2 -2
- package/dist/{trace-library-4WWKCSVU.js → trace-library-IWF7BVNB.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-DC3R6BV2.js → chunk-NAD26CDY.js} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
apiBase,
|
|
4
4
|
apiToken,
|
|
5
5
|
currentUniverse
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ICTCB4VT.js";
|
|
7
7
|
|
|
8
8
|
// src/api.ts
|
|
9
9
|
import { createWriteStream, writeFileSync } from "fs";
|
|
@@ -144,7 +144,7 @@ async function resolveSessionRef(ref) {
|
|
|
144
144
|
return agent.defaultSessionId;
|
|
145
145
|
}
|
|
146
146
|
async function* streamEvents(sessionId, signal) {
|
|
147
|
-
const { parseSseStream } = await import("./src-
|
|
147
|
+
const { parseSseStream } = await import("./src-KP6YIFNP.js");
|
|
148
148
|
const res = await fetch(
|
|
149
149
|
`${apiBase()}/sessions/${encodeURIComponent(sessionId)}/stream`,
|
|
150
150
|
{
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveSessionRef,
|
|
10
10
|
streamEvents,
|
|
11
11
|
uploadFile
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-S6A5V7XR.js";
|
|
13
13
|
import {
|
|
14
14
|
CLI_VERSION,
|
|
15
15
|
USER_AGENT,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
currentUniverse,
|
|
21
21
|
loadConfig,
|
|
22
22
|
saveConfig
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ICTCB4VT.js";
|
|
24
24
|
import {
|
|
25
25
|
AGENT_TYPES,
|
|
26
26
|
MODEL_SUBSCRIPTION_PLAN_PHRASE,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
skillRefSchema,
|
|
43
43
|
splitMcpServers,
|
|
44
44
|
supersededBy
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-NAD26CDY.js";
|
|
46
46
|
import "./chunk-MLKGABMK.js";
|
|
47
47
|
|
|
48
48
|
// src/index.ts
|
|
@@ -2831,6 +2831,25 @@ Details: \`${REFERENCES_DIR}/workspaces.md\` in this skill's folder.
|
|
|
2831
2831
|
- Do the work yourself when it is small, when it depends on what you already have
|
|
2832
2832
|
in front of you, or when explaining it would take as long as doing it.
|
|
2833
2833
|
|
|
2834
|
+
## Local first, cloud when it is not here, never a stand-in
|
|
2835
|
+
|
|
2836
|
+
- When the person names an engine that is installed and signed in on this
|
|
2837
|
+
computer, run it here: it costs them nothing on AgentSky.
|
|
2838
|
+
- When it is not installed here, start that same engine in the cloud: its handle
|
|
2839
|
+
(\`@codex\`, \`@claude_code\`, \u2026) with \`start_session\` and a \`budget_cents\`, and say so
|
|
2840
|
+
in one line ("Codex is not installed on this Mac, so it ran in the cloud").
|
|
2841
|
+
Do not pick another engine instead.
|
|
2842
|
+
- Every refused tool call carries a stable error \`code\` (in the error text and in
|
|
2843
|
+
\`structuredContent.error\`) and, when there is one, a \`next_step\`. Read the code:
|
|
2844
|
+
\`insufficient_credits\`, \`workspace_wallet_empty\` and \`payment_setup_required\` mean
|
|
2845
|
+
the account cannot pay; \`budget_reached\` means that session's cap is spent.
|
|
2846
|
+
Stop that piece of work and tell the person what was refused and what unblocks
|
|
2847
|
+
it (credit or a card under Settings \u203A Billing, a larger \`budget_cents\`), then
|
|
2848
|
+
offer the engines that are installed here as the free alternative. Never hire a
|
|
2849
|
+
cheaper or different agent to get around a refusal.
|
|
2850
|
+
- \`get_usage\` shows the balance; check it before starting several cloud sessions
|
|
2851
|
+
at once so the person is told once, up front, instead of after the first fails.
|
|
2852
|
+
|
|
2834
2853
|
## How to pick
|
|
2835
2854
|
|
|
2836
2855
|
Read \`${CATALOG_FILE}\` in this skill's folder. It lists every agent you can hire,
|
|
@@ -6988,7 +7007,7 @@ harness.command("connect").description("run an ACP agent (the command after --)
|
|
|
6988
7007
|
}));
|
|
6989
7008
|
var traceCmd = program.command("trace").description("correlate this machine's agent work with the cloud sessions it starts (metadata only unless you choose content)");
|
|
6990
7009
|
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) => {
|
|
6991
|
-
const { readState, writeState, record, installClaudeHooks, parseContentScopes, chosenPaths, fileEvent } = await import("./trace-
|
|
7010
|
+
const { readState, writeState, record, installClaudeHooks, parseContentScopes, chosenPaths, fileEvent } = await import("./trace-SJHQ66JA.js");
|
|
6992
7011
|
if (readState()) throw new Error("a trace is already running here \u2014 `sky trace stop` it first");
|
|
6993
7012
|
const scopes = parseContentScopes(opts.capture);
|
|
6994
7013
|
const chosen = chosenPaths(opts.file ?? [], opts.dir ?? []);
|
|
@@ -7023,7 +7042,7 @@ traceCmd.command("start").description("start a trace: a grant for this machine,
|
|
|
7023
7042
|
}));
|
|
7024
7043
|
traceCmd.command("hook").description("record one Claude Code hook event read from stdin (run by the installed hooks; never fails, prints nothing)").action(async () => {
|
|
7025
7044
|
try {
|
|
7026
|
-
const { readState, record, flush, grantSender, eventsForClaudeHook, contentForClaudeHook, clearState } = await import("./trace-
|
|
7045
|
+
const { readState, record, flush, grantSender, eventsForClaudeHook, contentForClaudeHook, clearState } = await import("./trace-SJHQ66JA.js");
|
|
7027
7046
|
const chunks = [];
|
|
7028
7047
|
for await (const chunk of process.stdin) chunks.push(chunk);
|
|
7029
7048
|
const input = JSON.parse(Buffer.concat(chunks).toString("utf8") || "{}");
|
|
@@ -7036,14 +7055,14 @@ traceCmd.command("hook").description("record one Claude Code hook event read fro
|
|
|
7036
7055
|
}
|
|
7037
7056
|
});
|
|
7038
7057
|
traceCmd.command("flush").description("send what the spool holds, retrying with backoff").action(run(async () => {
|
|
7039
|
-
const { readState, flush, grantSender } = await import("./trace-
|
|
7058
|
+
const { readState, flush, grantSender } = await import("./trace-SJHQ66JA.js");
|
|
7040
7059
|
const state = readState();
|
|
7041
7060
|
if (!state) throw new Error("no trace is running here");
|
|
7042
7061
|
const outcome = await flush(grantSender(state), { attempts: 4 });
|
|
7043
7062
|
console.log(`sent ${outcome.sent}, refused ${outcome.refused}, given up ${outcome.expired}, still pending ${outcome.pending}${outcome.stopped ? ` (stopped: ${outcome.stopped})` : ""}`);
|
|
7044
7063
|
}));
|
|
7045
7064
|
traceCmd.command("status").description("the running trace and its spool").action(run(async () => {
|
|
7046
|
-
const { readState, spoolStatus } = await import("./trace-
|
|
7065
|
+
const { readState, spoolStatus } = await import("./trace-SJHQ66JA.js");
|
|
7047
7066
|
const state = readState();
|
|
7048
7067
|
if (!state) {
|
|
7049
7068
|
console.log("No trace is running here.");
|
|
@@ -7053,7 +7072,7 @@ traceCmd.command("status").description("the running trace and its spool").action
|
|
|
7053
7072
|
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`);
|
|
7054
7073
|
}));
|
|
7055
7074
|
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 (id, opts) => {
|
|
7056
|
-
const { readState } = await import("./trace-
|
|
7075
|
+
const { readState } = await import("./trace-SJHQ66JA.js");
|
|
7057
7076
|
const ref = id ?? readState()?.trace_id;
|
|
7058
7077
|
if (!ref) throw new Error("name a trace, or start one here");
|
|
7059
7078
|
const bundle = await api("GET", `/traces/${ref}`);
|
|
@@ -7080,7 +7099,7 @@ traceCmd.command("show [id]").description("the trace bundle: spans, the sessions
|
|
|
7080
7099
|
for (const gap of bundle.gaps) console.log(` gap: ${gap.span_id} ${gap.reason}`);
|
|
7081
7100
|
}));
|
|
7082
7101
|
traceCmd.command("stop").description("end the root span, send what is left, and revoke this machine's grant").action(run(async () => {
|
|
7083
|
-
const { readState, record, flush, grantSender, clearState } = await import("./trace-
|
|
7102
|
+
const { readState, record, flush, grantSender, clearState } = await import("./trace-SJHQ66JA.js");
|
|
7084
7103
|
const state = readState();
|
|
7085
7104
|
if (!state) throw new Error("no trace is running here");
|
|
7086
7105
|
if (state.root_span) record(() => [{ span_id: state.root_span, kind: "end", outcome: "completed" }]);
|
|
@@ -7090,7 +7109,7 @@ traceCmd.command("stop").description("end the root span, send what is left, and
|
|
|
7090
7109
|
console.log(`Stopped ${state.trace_id}${outcome.pending ? ` (${outcome.pending} events could not be sent)` : ""}`);
|
|
7091
7110
|
}));
|
|
7092
7111
|
traceCmd.command("sync [payload]").description("upload this machine's Claude Code and Codex sessions 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("--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) => {
|
|
7093
|
-
const lib = await import("./trace-library-
|
|
7112
|
+
const lib = await import("./trace-library-IWF7BVNB.js");
|
|
7094
7113
|
if (opts.hook) {
|
|
7095
7114
|
try {
|
|
7096
7115
|
let raw = payload ?? "";
|
|
@@ -7188,7 +7207,7 @@ traceCmd.command("sync [payload]").description("upload this machine's Claude Cod
|
|
|
7188
7207
|
})();
|
|
7189
7208
|
});
|
|
7190
7209
|
traceCmd.command("search <query...>").description("search every session in a workspace's trace library (literal substring)").option("--workspace <slug>", "the workspace to search (default: the current one)").option("--limit <n>", "hits per page", (v) => Number.parseInt(v, 10), 20).option("--cursor <cursor>", "the next page of an earlier search").option("--json", "print the page as JSON").action(run(async (words, opts) => {
|
|
7191
|
-
const { libraryRequest } = await import("./trace-library-
|
|
7210
|
+
const { libraryRequest } = await import("./trace-library-IWF7BVNB.js");
|
|
7192
7211
|
const workspace2 = opts.workspace ?? currentUniverse();
|
|
7193
7212
|
if (!workspace2) throw new Error("name a workspace with --workspace");
|
|
7194
7213
|
const params = new URLSearchParams({ q: words.join(" "), scope: "traces", limit: String(opts.limit), ...opts.cursor ? { cursor: opts.cursor } : {} });
|
|
@@ -7205,7 +7224,7 @@ traceCmd.command("search <query...>").description("search every session in a wor
|
|
|
7205
7224
|
if (page.nextCursor) console.log(`More: sky trace search ${JSON.stringify(words.join(" "))} --workspace ${workspace2} --cursor ${page.nextCursor}`);
|
|
7206
7225
|
}));
|
|
7207
7226
|
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) => {
|
|
7208
|
-
const { libraryRequest } = await import("./trace-library-
|
|
7227
|
+
const { libraryRequest } = await import("./trace-library-IWF7BVNB.js");
|
|
7209
7228
|
const workspace2 = opts.workspace ?? currentUniverse();
|
|
7210
7229
|
if (!workspace2) throw new Error("name a workspace with --workspace");
|
|
7211
7230
|
const page = await libraryRequest("GET", `/trace-library?limit=${opts.limit}`, workspace2);
|
package/dist/products.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
USER_AGENT,
|
|
3
3
|
configPath
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ICTCB4VT.js";
|
|
5
5
|
import {
|
|
6
6
|
TRACE_CONTENT_SCOPES,
|
|
7
7
|
redactTraceText
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NAD26CDY.js";
|
|
9
9
|
import "./chunk-MLKGABMK.js";
|
|
10
10
|
|
|
11
11
|
// src/trace.ts
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ApiError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S6A5V7XR.js";
|
|
4
4
|
import {
|
|
5
5
|
USER_AGENT,
|
|
6
6
|
apiBase,
|
|
7
7
|
apiToken
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ICTCB4VT.js";
|
|
9
9
|
import {
|
|
10
10
|
SessionSourceCollector,
|
|
11
11
|
publicRemote,
|
|
12
12
|
redactTraceText
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NAD26CDY.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// src/trace-library.ts
|
package/package.json
CHANGED
|
File without changes
|