@agentsky/sky 3.44.0 → 3.47.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.
- package/agent-plugins/plugins/meetings/skills/agentsky-meetings/SKILL.md +1 -1
- package/dist/{chunk-CXRMG3HQ.js → chunk-2OIW436E.js} +1 -1
- package/dist/{chunk-BCSZO4BR.js → chunk-6LQLH5CI.js} +47 -17
- package/dist/{mcp-serve-EJ7YKBMM.js → chunk-AKCKFNLJ.js} +18 -5
- package/dist/{chunk-HGLVOMHL.js → chunk-I63VASQP.js} +43 -13
- package/dist/{chunk-KTSUD2BU.js → chunk-IJOMMFEK.js} +5 -5
- package/dist/{chunk-EBCVJDIL.js → chunk-IZT53CAI.js} +15 -4
- package/dist/{chunk-BIZJ4VZL.js → chunk-KX6JJECK.js} +188 -58
- package/dist/{chunk-W2WEEVIM.js → chunk-LM3WPNRW.js} +1 -1
- package/dist/{chunk-F6V2GGMP.js → chunk-OXCZMLEZ.js} +10 -5
- package/dist/{chunk-ZVNQJPMS.js → chunk-QTMW37EN.js} +2 -2
- package/dist/{chunk-3FQZZNQP.js → chunk-U25SCHLE.js} +75 -23
- package/dist/{chunk-UJ7IXSJX.js → chunk-YYI5NQ35.js} +1 -1
- package/dist/{compute-KNUZU4AO.js → compute-VNGFIQCD.js} +2 -2
- package/dist/compute-report-AAEKLNPM.js +39 -0
- package/dist/index.js +1009 -772
- package/dist/{local-skills-HHTAWGYV.js → local-skills-RRJCNVLS.js} +3 -3
- package/dist/{local-skills-run-OYPW36ZG.js → local-skills-run-Y47FCKEL.js} +8 -8
- package/dist/mcp-serve-OLHMHG4M.js +16 -0
- package/dist/{trace-754MK5OE.js → trace-PXIY5WUU.js} +3 -3
- package/dist/{trace-exclusions-MYECULMA.js → trace-exclusions-HG5MF7NI.js} +2 -2
- package/dist/{trace-library-WE3C5OBP.js → trace-library-IUFJWBN3.js} +14 -8
- package/package.json +1 -1
- package/dist/compute-report-AT642XES.js +0 -34
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CLI_VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2OIW436E.js";
|
|
4
4
|
|
|
5
5
|
// src/skill.ts
|
|
6
6
|
import { mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -91,6 +91,11 @@ account default workspace. Never ask. Pass the chosen slug as \`workspace\` on
|
|
|
91
91
|
every MCP tool that accepts it, or as \`--workspace <slug>\` on sky commands.
|
|
92
92
|
Details: \`${REFERENCES_DIR}/workspaces.md\` in this skill's folder.
|
|
93
93
|
|
|
94
|
+
## Work handed to you
|
|
95
|
+
|
|
96
|
+
At the start of work, call \`list_asks\` for anything handed to you, and answer
|
|
97
|
+
each one you can with \`answer_ask\`.
|
|
98
|
+
|
|
94
99
|
## When to hire
|
|
95
100
|
|
|
96
101
|
- When the person names an agent (\`@handle\`) or an engine, or asks another agent
|
|
@@ -178,9 +183,9 @@ it, and name its path in the brief.
|
|
|
178
183
|
take a minute.
|
|
179
184
|
- Run independent agents at the same time: start them all, then read each.
|
|
180
185
|
- To steer or answer an agent, \`send_message\` once its turn is finished.
|
|
181
|
-
- If \`
|
|
186
|
+
- If \`list_asks\` shows a request waiting on the person (a question, an approval,
|
|
182
187
|
or an app to connect with its link), show it to them and pass their answer with
|
|
183
|
-
\`
|
|
188
|
+
\`answer_ask\`. Never approve spending or access on their behalf.
|
|
184
189
|
- An agent that finishes its first turn with no reply did not start properly:
|
|
185
190
|
\`stop_session\` it and hire again, or do that part yourself.
|
|
186
191
|
|
|
@@ -456,8 +461,8 @@ the agent's questions, approvals, and apps to connect.
|
|
|
456
461
|
\`POST /v1/sessions/{id}/questions/{request id}/answer\` with \`{"text": ...}\` or
|
|
457
462
|
\`{"option_id": ...}\` answers one. Pass a customer's answer on only after
|
|
458
463
|
your application has checked who they are. By hand: \`sky session status <id>\` and
|
|
459
|
-
\`sky session answer <id> <request> --text "..."\` (MCP: \`
|
|
460
|
-
\`
|
|
464
|
+
\`sky session answer <id> <request> --text "..."\` (MCP: \`list_asks\`,
|
|
465
|
+
\`answer_ask\`).
|
|
461
466
|
|
|
462
467
|
## 7. What the application keeps
|
|
463
468
|
|
|
@@ -1,6 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ApiError,
|
|
3
|
+
api
|
|
4
|
+
} from "./chunk-LM3WPNRW.js";
|
|
1
5
|
import {
|
|
2
6
|
installClaudeHooks
|
|
3
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IJOMMFEK.js";
|
|
8
|
+
import {
|
|
9
|
+
loadLocalSkillState,
|
|
10
|
+
revisionAt
|
|
11
|
+
} from "./chunk-QTMW37EN.js";
|
|
12
|
+
import {
|
|
13
|
+
USER_AGENT
|
|
14
|
+
} from "./chunk-2OIW436E.js";
|
|
15
|
+
import {
|
|
16
|
+
apiBase,
|
|
17
|
+
apiToken,
|
|
18
|
+
configPath
|
|
19
|
+
} from "./chunk-XHZJG3QT.js";
|
|
4
20
|
import {
|
|
5
21
|
IncompleteSourceCaptureError,
|
|
6
22
|
SOURCE_CAPTURE_VERSION,
|
|
@@ -16,28 +32,12 @@ import {
|
|
|
16
32
|
savePendingSource,
|
|
17
33
|
stillExcluded,
|
|
18
34
|
writePrivateJson
|
|
19
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-YYI5NQ35.js";
|
|
20
36
|
import {
|
|
21
37
|
SessionSourceCollector,
|
|
22
38
|
publicRemote,
|
|
23
39
|
redactTraceText
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import {
|
|
26
|
-
ApiError,
|
|
27
|
-
api
|
|
28
|
-
} from "./chunk-W2WEEVIM.js";
|
|
29
|
-
import {
|
|
30
|
-
loadLocalSkillState,
|
|
31
|
-
revisionAt
|
|
32
|
-
} from "./chunk-ZVNQJPMS.js";
|
|
33
|
-
import {
|
|
34
|
-
USER_AGENT
|
|
35
|
-
} from "./chunk-CXRMG3HQ.js";
|
|
36
|
-
import {
|
|
37
|
-
apiBase,
|
|
38
|
-
apiToken,
|
|
39
|
-
configPath
|
|
40
|
-
} from "./chunk-XHZJG3QT.js";
|
|
40
|
+
} from "./chunk-KX6JJECK.js";
|
|
41
41
|
|
|
42
42
|
// src/trace-library.ts
|
|
43
43
|
import { createHash as createHash3 } from "crypto";
|
|
@@ -969,6 +969,7 @@ var backoffMs = (attempt) => Math.min(3e4, 1e3 * 2 ** attempt);
|
|
|
969
969
|
function skyDir() {
|
|
970
970
|
return process.env.SKY_CONFIG_DIR ?? join4(homedir4(), ".config", "sky");
|
|
971
971
|
}
|
|
972
|
+
var SYNC_STATE_NAMES = ["trace-sync-state.json", "session-results.json", "trace-sync-codex-ids.json", "trace-pending", "trace-sync.lock"];
|
|
972
973
|
function syncConfigPath() {
|
|
973
974
|
return join4(skyDir(), "trace-sync.json");
|
|
974
975
|
}
|
|
@@ -1540,6 +1541,13 @@ function uploadBody(session, sha256, device) {
|
|
|
1540
1541
|
outside_conversation: session.conversation.flatMap((inside, index) => inside ? [] : [index])
|
|
1541
1542
|
};
|
|
1542
1543
|
}
|
|
1544
|
+
function spanOf(body) {
|
|
1545
|
+
const moment = (value) => typeof value === "string" && Number.isFinite(Date.parse(value)) ? value : null;
|
|
1546
|
+
return { started_at: moment(body.started_at), ended_at: moment(body.ended_at) };
|
|
1547
|
+
}
|
|
1548
|
+
function capturePaused(error) {
|
|
1549
|
+
return error instanceof ApiError && error.status === 423 && error.code === "timeline_paused";
|
|
1550
|
+
}
|
|
1543
1551
|
function lockPath() {
|
|
1544
1552
|
return join4(skyDir(), "trace-sync.lock");
|
|
1545
1553
|
}
|
|
@@ -1620,7 +1628,7 @@ async function runSync(config, options) {
|
|
|
1620
1628
|
const state = readJson2(statePath2(), { sessions: {} });
|
|
1621
1629
|
const full = options.full || !state.lastFullAt || Date.now() - Date.parse(state.lastFullAt) > FULL_SWEEP_MS;
|
|
1622
1630
|
const device = config.device ?? hostname();
|
|
1623
|
-
const report = { scanned: 0, changed: 0, uploaded: 0, unchanged: 0, local: 0, owned: 0, empty: 0, sessions: 0, excluded: 0, failed: 0, results: 0, legacySources: 0, byWorkspace: {}, errors: [] };
|
|
1631
|
+
const report = { scanned: 0, changed: 0, uploaded: 0, unchanged: 0, local: 0, owned: 0, empty: 0, sessions: 0, excluded: 0, paused: 0, failed: 0, results: 0, legacySources: 0, byWorkspace: {}, errors: [] };
|
|
1624
1632
|
const results = readJson2(resultsStatePath(), { read: [], saved: [] });
|
|
1625
1633
|
const saveResults = async (local, workspace, sessionId, cwd) => {
|
|
1626
1634
|
if (!sessionHarness(local.harness)) return;
|
|
@@ -1664,6 +1672,34 @@ async function runSync(config, options) {
|
|
|
1664
1672
|
const collectorFailed = (error) => fail("other agents: unreadable", error);
|
|
1665
1673
|
let discovered;
|
|
1666
1674
|
const discover = async () => discovered ??= await discoverSessions(collectorFailed);
|
|
1675
|
+
const dropPaused = (item, local, workspace) => {
|
|
1676
|
+
report.paused++;
|
|
1677
|
+
record(local, { workspace, status: "paused" });
|
|
1678
|
+
writePrivateJson(statePath2(), state);
|
|
1679
|
+
removePendingSource(item);
|
|
1680
|
+
restored.set(key(local), local.signature);
|
|
1681
|
+
};
|
|
1682
|
+
const sendAcrossPause = async (item, local, workspace, sha256) => {
|
|
1683
|
+
const { work_objects: _objects, outside_conversation: outside, title: _title, ...previewBody } = item.manifest.body;
|
|
1684
|
+
const saved = await libraryRequest("PUT", `/trace-library/${local.harness}/${encodeURIComponent(local.sessionId)}`, workspace, { ...previewBody, sha256 });
|
|
1685
|
+
if (saved.status !== "withheld" && config.sessions !== false && sessionHarness(local.harness)) {
|
|
1686
|
+
const body = previewBody;
|
|
1687
|
+
const left = new Set(outside ?? []);
|
|
1688
|
+
const session = await saveTraceSession(libraryRequest, {
|
|
1689
|
+
harness: local.harness,
|
|
1690
|
+
sessionId: local.sessionId,
|
|
1691
|
+
workspace,
|
|
1692
|
+
body: { ...body, messages: body.messages.filter((_, index) => !left.has(index)) },
|
|
1693
|
+
skills: loadLocalSkillState()
|
|
1694
|
+
});
|
|
1695
|
+
if (session.status === "saved") report.sessions++;
|
|
1696
|
+
}
|
|
1697
|
+
if (!results.read.includes(key(local))) {
|
|
1698
|
+
results.read.push(key(local));
|
|
1699
|
+
writePrivateJson(resultsStatePath(), results);
|
|
1700
|
+
}
|
|
1701
|
+
dropPaused(item, local, workspace);
|
|
1702
|
+
};
|
|
1667
1703
|
const send = async (item) => {
|
|
1668
1704
|
const { workspace } = item.manifest;
|
|
1669
1705
|
let capturing = false;
|
|
@@ -1699,12 +1735,16 @@ async function runSync(config, options) {
|
|
|
1699
1735
|
}
|
|
1700
1736
|
if (item.manifest.stage !== "ready") completePendingCapture(item, source);
|
|
1701
1737
|
const statuses = await libraryRequest("POST", "/trace-library/check", workspace, {
|
|
1702
|
-
sessions: [{ harness: local.harness, session_id: local.sessionId, sha256: source.sha256 }]
|
|
1738
|
+
sessions: [{ harness: local.harness, session_id: local.sessionId, sha256: source.sha256, span: spanOf(item.manifest.body) }]
|
|
1703
1739
|
});
|
|
1704
1740
|
if (statuses.sessions[0]?.status === "owned") {
|
|
1705
1741
|
report.owned++;
|
|
1706
1742
|
throw new Error("Another member owns this source; pending archive retained.");
|
|
1707
1743
|
}
|
|
1744
|
+
if (statuses.sessions[0]?.status === "paused") {
|
|
1745
|
+
await sendAcrossPause(item, local, workspace, source.sha256);
|
|
1746
|
+
return;
|
|
1747
|
+
}
|
|
1708
1748
|
if (item.manifest.fileId) await verifyPendingFile(item, source);
|
|
1709
1749
|
else {
|
|
1710
1750
|
const file = await uploadLargeFile(source.path, "application/x-ndjson", void 0, () => {
|
|
@@ -1763,6 +1803,10 @@ async function runSync(config, options) {
|
|
|
1763
1803
|
report.uploaded++;
|
|
1764
1804
|
report.byWorkspace[workspace] = (report.byWorkspace[workspace] ?? 0) + 1;
|
|
1765
1805
|
} catch (error) {
|
|
1806
|
+
if (!capturing && capturePaused(error)) {
|
|
1807
|
+
dropPaused(item, local, workspace);
|
|
1808
|
+
return;
|
|
1809
|
+
}
|
|
1766
1810
|
if (capturing) unreadable.add(key(local));
|
|
1767
1811
|
else blocked = true;
|
|
1768
1812
|
fail(`${key(local)} \u2192 ${workspace}`, error);
|
|
@@ -1829,7 +1873,11 @@ async function runSync(config, options) {
|
|
|
1829
1873
|
const directory = mkdtempSync(join4(skyDir(), "trace-dry-run-"));
|
|
1830
1874
|
try {
|
|
1831
1875
|
const source2 = await captureTraceSource(local, directory, { workspace: prepared.workspace, apiBase: endpoint });
|
|
1832
|
-
const checked = await libraryRequest("POST", "/trace-library/check", prepared.workspace, { sessions: [{ harness: local.harness, session_id: local.sessionId, sha256: source2.sha256 }] });
|
|
1876
|
+
const checked = await libraryRequest("POST", "/trace-library/check", prepared.workspace, { sessions: [{ harness: local.harness, session_id: local.sessionId, sha256: source2.sha256, span: spanOf(prepared.body) }] });
|
|
1877
|
+
if (checked.sessions[0]?.status === "paused") {
|
|
1878
|
+
report.paused++;
|
|
1879
|
+
return;
|
|
1880
|
+
}
|
|
1833
1881
|
if (checked.sessions[0]?.status === "owned") {
|
|
1834
1882
|
report.owned++;
|
|
1835
1883
|
return;
|
|
@@ -1851,7 +1899,8 @@ async function runSync(config, options) {
|
|
|
1851
1899
|
completePendingCapture(item, source);
|
|
1852
1900
|
ready.push(item);
|
|
1853
1901
|
} catch (error) {
|
|
1854
|
-
|
|
1902
|
+
if (capturePaused(error)) report.paused++;
|
|
1903
|
+
else fail(`${key(local)}: source capture failed`, error);
|
|
1855
1904
|
}
|
|
1856
1905
|
});
|
|
1857
1906
|
await pool(ready, UPLOAD_CONCURRENCY, send);
|
|
@@ -1939,6 +1988,7 @@ export {
|
|
|
1939
1988
|
SINGLE_REQUEST_MAX_BYTES,
|
|
1940
1989
|
transfer,
|
|
1941
1990
|
uploadLargeFile,
|
|
1991
|
+
SYNC_STATE_NAMES,
|
|
1942
1992
|
syncConfigPath,
|
|
1943
1993
|
lastUploads,
|
|
1944
1994
|
loadSyncConfig,
|
|
@@ -1957,6 +2007,8 @@ export {
|
|
|
1957
2007
|
repoRemote,
|
|
1958
2008
|
routeSession,
|
|
1959
2009
|
libraryRequest,
|
|
2010
|
+
spanOf,
|
|
2011
|
+
capturePaused,
|
|
1960
2012
|
syncTraces,
|
|
1961
2013
|
hookSessionRef,
|
|
1962
2014
|
LAUNCHD_LABEL,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MCP_ENTRY,
|
|
3
|
+
computerClients,
|
|
4
|
+
computerReport,
|
|
5
|
+
describeRepair,
|
|
6
|
+
engineReports,
|
|
7
|
+
forgetComputer,
|
|
8
|
+
machineKey,
|
|
9
|
+
repairComputer,
|
|
10
|
+
reportComputer,
|
|
11
|
+
savedMachineKey,
|
|
12
|
+
upkeepComputer
|
|
13
|
+
} from "./chunk-I63VASQP.js";
|
|
14
|
+
import "./chunk-IZT53CAI.js";
|
|
15
|
+
import "./chunk-AKCKFNLJ.js";
|
|
16
|
+
import "./chunk-6LQLH5CI.js";
|
|
17
|
+
import "./chunk-U25SCHLE.js";
|
|
18
|
+
import "./chunk-LM3WPNRW.js";
|
|
19
|
+
import "./chunk-IJOMMFEK.js";
|
|
20
|
+
import "./chunk-QTMW37EN.js";
|
|
21
|
+
import "./chunk-OXCZMLEZ.js";
|
|
22
|
+
import "./chunk-2OIW436E.js";
|
|
23
|
+
import "./chunk-XHZJG3QT.js";
|
|
24
|
+
import "./chunk-YYI5NQ35.js";
|
|
25
|
+
import "./chunk-KX6JJECK.js";
|
|
26
|
+
import "./chunk-MLKGABMK.js";
|
|
27
|
+
export {
|
|
28
|
+
MCP_ENTRY,
|
|
29
|
+
computerClients,
|
|
30
|
+
computerReport,
|
|
31
|
+
describeRepair,
|
|
32
|
+
engineReports,
|
|
33
|
+
forgetComputer,
|
|
34
|
+
machineKey,
|
|
35
|
+
repairComputer,
|
|
36
|
+
reportComputer,
|
|
37
|
+
savedMachineKey,
|
|
38
|
+
upkeepComputer
|
|
39
|
+
};
|