deepline 0.3.408 → 0.3.410
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/bundling-sources/sdk/src/agent-runtime.ts +18 -1
- package/dist/bundling-sources/sdk/src/client.ts +212 -334
- package/dist/bundling-sources/sdk/src/compat.ts +45 -2
- package/dist/bundling-sources/sdk/src/db/query.ts +9 -10
- package/dist/bundling-sources/sdk/src/http.ts +38 -20
- package/dist/bundling-sources/sdk/src/index.ts +4 -5
- package/dist/bundling-sources/sdk/src/play.ts +10 -10
- package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +6 -4
- package/dist/bundling-sources/sdk/src/plays/check-local-play-graph.ts +114 -0
- package/dist/bundling-sources/sdk/src/plays/client.ts +431 -0
- package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +2 -2
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +106 -16
- package/dist/bundling-sources/sdk/src/release.ts +13 -7
- package/dist/bundling-sources/sdk/src/runs/read-errors.ts +8 -0
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +124 -13
- package/dist/bundling-sources/sdk/src/tool-calls.ts +108 -19
- package/dist/bundling-sources/sdk/src/types.ts +18 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/execute-retry-contract.ts +37 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/package.json +3 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +277 -76
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/dataset-row-input.ts +124 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +6 -62
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +67 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +64 -6
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +1 -5
- package/dist/bundling-sources/shared_libs/play-runtime/ledger-safe-payload.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/play-artifact-runtime-contract.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/egress-probe.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +26 -16
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +36 -11
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +35 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +21 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +11 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +85 -20
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +71 -13
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-execution-queries.ts +100 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +9 -5
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +337 -146
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +26 -12
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +425 -102
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +181 -124
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +152 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +5 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +31 -0
- package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +10 -0
- package/dist/bundling-sources/shared_libs/plays/ambiguous-write-error.ts +25 -0
- package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +4 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +63 -68
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +129 -63
- package/dist/bundling-sources/shared_libs/plays/contracts.ts +14 -0
- package/dist/bundling-sources/shared_libs/plays/enrich-play-compiler.ts +58 -16
- package/dist/bundling-sources/shared_libs/plays/fetch-http-error.ts +50 -0
- package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +351 -0
- package/dist/bundling-sources/shared_libs/plays/tool-list-getter-mode.ts +9 -0
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +1 -1
- package/dist/cli/{auth-UVD3CUBB.mjs → auth-LLXLIILR.mjs} +6 -6
- package/dist/cli/auth-UG4WOYGL.js +40 -0
- package/dist/cli/{billing-BZVTXXLM.mjs → billing-5FVXZYAC.mjs} +8 -8
- package/dist/cli/{billing-BZVYAF6T.js → billing-NFPK7GYP.js} +84 -84
- package/dist/cli/{chunk-ZAAKSJAS.js → chunk-27GJKC5Q.js} +17 -10
- package/dist/cli/{chunk-UHNDVD3P.js → chunk-2H4EY7KH.js} +100 -41
- package/dist/cli/{chunk-WTT6CLED.mjs → chunk-2YR7BIIC.mjs} +5 -2
- package/dist/cli/{chunk-3ZB6IIA7.js → chunk-36AHOWVS.js} +26 -26
- package/dist/cli/{chunk-OSDXE27V.mjs → chunk-4PG4ARL2.mjs} +17 -10
- package/dist/cli/{chunk-LOYISF7S.mjs → chunk-4XQLVUC7.mjs} +738 -512
- package/dist/cli/{chunk-J5PTX66Y.js → chunk-5MLCBXXU.js} +8 -1
- package/dist/cli/chunk-5TUGWDEB.js +313 -0
- package/dist/cli/{chunk-D6FFBSM5.js → chunk-5UUQAGJS.js} +5 -2
- package/dist/cli/{chunk-4CFULMRB.mjs → chunk-5V5Y37BC.mjs} +2 -2
- package/dist/cli/{chunk-PMVFAYL7.mjs → chunk-63ILLN5H.mjs} +2 -2
- package/dist/cli/{chunk-AUMD2VXP.js → chunk-63S7X326.js} +1032 -806
- package/dist/cli/{chunk-4QFT5LGV.mjs → chunk-6PGATQ6L.mjs} +6 -3
- package/dist/cli/{chunk-6BJK4EJ3.mjs → chunk-AARWVK4C.mjs} +2132 -65
- package/dist/cli/{chunk-FERRDNMO.js → chunk-AD47BXN2.js} +5 -5
- package/dist/cli/{chunk-4RNDKFNQ.js → chunk-D37FEBES.js} +2 -2
- package/dist/cli/{chunk-S6R3OX7B.js → chunk-E4CABWXL.js} +25 -2
- package/dist/cli/{chunk-NXGCO4JB.mjs → chunk-E4IXDAZI.mjs} +5 -0
- package/dist/cli/chunk-EQ4Z7RJW.mjs +35 -0
- package/dist/cli/chunk-FR2ILQ4G.mjs +8 -0
- package/dist/cli/{chunk-QUAQX3FQ.js → chunk-FVLNYDI4.js} +128 -376
- package/dist/cli/{chunk-BRJUESQV.js → chunk-FZJAM576.js} +50 -50
- package/dist/cli/{chunk-BZAMOCPA.mjs → chunk-IMZ56EOH.mjs} +3 -3
- package/dist/cli/{chunk-IOHRWLQE.mjs → chunk-IPG42SD2.mjs} +452 -138
- package/dist/cli/chunk-J33TSWO5.js +8 -0
- package/dist/cli/{chunk-XXLXOUUU.mjs → chunk-JNXJZ577.mjs} +1 -1
- package/dist/cli/{chunk-JI2B4RZP.mjs → chunk-KCC3FKIW.mjs} +71 -12
- package/dist/cli/{chunk-6IKARAYD.mjs → chunk-L2VKAASU.mjs} +23 -0
- package/dist/cli/{chunk-PYZZMAJQ.mjs → chunk-LFSHGNT2.mjs} +8 -1
- package/dist/cli/{chunk-2XXXFPTD.js → chunk-LTFL4JRN.js} +426 -721
- package/dist/cli/{chunk-YHPYUZZX.mjs → chunk-MAMVGOSC.mjs} +1 -1
- package/dist/cli/{chunk-URACNNLO.mjs → chunk-MN2OWLFA.mjs} +2 -2
- package/dist/cli/{chunk-Q3PUHXOY.js → chunk-NF4V5DTY.js} +12 -12
- package/dist/cli/{chunk-Q2E4E4FJ.js → chunk-NPBJI7RE.js} +8 -8
- package/dist/cli/chunk-NTVLGHFM.js +501 -0
- package/dist/cli/{chunk-HQXL5526.mjs → chunk-NUX2QHNC.mjs} +1 -1
- package/dist/cli/{chunk-E3PJF6YP.js → chunk-OBB4QXHA.js} +19 -4
- package/dist/cli/{chunk-SEFMGO3Z.js → chunk-OQQOXSYA.js} +2184 -117
- package/dist/cli/chunk-OZ6E3IRZ.js +6084 -0
- package/dist/cli/{chunk-7P5AA3SN.js → chunk-PPDBRJRW.js} +6 -1
- package/dist/cli/{chunk-IWBXJDZA.mjs → chunk-PZSLPBDA.mjs} +2 -2
- package/dist/cli/{chunk-ILHRA7AD.js → chunk-QADCFSGH.js} +7 -7
- package/dist/cli/{chunk-ECVLPS67.js → chunk-QJI5FIOW.js} +170 -49
- package/dist/cli/{chunk-I3DHIXVJ.mjs → chunk-QL22Y56M.mjs} +149 -28
- package/dist/cli/{chunk-SD7MXAJA.mjs → chunk-RFB25DSQ.mjs} +36 -284
- package/dist/cli/chunk-T44IIOT6.mjs +501 -0
- package/dist/cli/chunk-VK2LZ5IP.js +35 -0
- package/dist/cli/chunk-VKKVSFRD.js +62 -0
- package/dist/cli/{chunk-RWCY6YI2.js → chunk-VYKV5XHL.js} +644 -330
- package/dist/cli/{chunk-GSK6NHVM.js → chunk-WU4U6VSB.js} +5 -5
- package/dist/cli/chunk-XHLKJOTN.mjs +313 -0
- package/dist/cli/{chunk-MJELBQBU.mjs → chunk-XIHWSXSV.mjs} +330 -625
- package/dist/cli/chunk-XNZJKRJA.mjs +6084 -0
- package/dist/cli/chunk-ZCALLYF6.mjs +62 -0
- package/dist/cli/{chunk-ZBABPK6Y.js → chunk-ZFZ427HN.js} +11 -8
- package/dist/cli/{chunk-SJVVBWRL.mjs → chunk-ZKYEW55U.mjs} +16 -1
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-XLGLHJ6P.js → csv-7U3FJYKZ.js} +14 -14
- package/dist/cli/{csv-WPSXG6ZZ.mjs → csv-ZWLDMM4A.mjs} +5 -5
- package/dist/cli/{db-5PTNJG4X.js → db-DNCGV5PC.js} +42 -47
- package/dist/cli/{db-ABS57ABJ.mjs → db-IMYXVMGI.mjs} +15 -20
- package/dist/cli/{describe-PVWQJ2PB.mjs → describe-Q23DWJUK.mjs} +20 -15
- package/dist/cli/{describe-EZS6PQXA.js → describe-S34JUX5W.js} +27 -22
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/describe-core.js +6 -6
- package/dist/cli/describe-core.mjs +5 -5
- package/dist/cli/{executions-OKJGATQZ.mjs → executions-A73EUGSI.mjs} +8 -8
- package/dist/cli/{executions-FNTAFQ7Y.js → executions-XOMPX2YJ.js} +10 -10
- package/dist/cli/{feedback-W27HDMRR.mjs → feedback-N4GJ2POI.mjs} +11 -7
- package/dist/cli/{feedback-6YBOMSUA.js → feedback-QTCHNJJH.js} +13 -9
- package/dist/cli/{git-YOOUEL6M.mjs → git-4Q3JIQYZ.mjs} +6 -6
- package/dist/cli/git-I6CPBEVG.js +24 -0
- package/dist/cli/index.js +240 -352
- package/dist/cli/index.mjs +163 -275
- package/dist/cli/{legacy-noops-V6OKW7VR.mjs → legacy-noops-3SOVGFF7.mjs} +6 -6
- package/dist/cli/{legacy-noops-2VZ7XT6C.js → legacy-noops-4OSHZM34.js} +9 -9
- package/dist/cli/{monitors-FBWGVIUS.js → monitors-LVE2KZNG.js} +94 -94
- package/dist/cli/{monitors-P2YYWTWT.mjs → monitors-QP2XID2B.mjs} +8 -8
- package/dist/cli/{org-DVMG6H3C.mjs → org-IVRETVQA.mjs} +8 -8
- package/dist/cli/{org-3XUSVX5T.js → org-XFLK5IAP.js} +68 -68
- package/dist/cli/{play-GNC5CQAS.mjs → play-DE7VH6NU.mjs} +533 -98
- package/dist/cli/{play-YG5L4BWQ.js → play-XXTPPP23.js} +1067 -632
- package/dist/cli/{providers-7PSWG2OV.js → providers-DLD3I4JF.js} +11 -11
- package/dist/cli/{providers-JR33SLWL.mjs → providers-GX2NIZQQ.mjs} +8 -8
- package/dist/cli/{quickstart-VUOBQYIQ.mjs → quickstart-72B4L4PK.mjs} +5 -5
- package/dist/cli/{quickstart-FDVZ5BL3.js → quickstart-XNS3HSWC.js} +7 -7
- package/dist/cli/search-6NCH4HB5.js +30 -0
- package/dist/cli/{search-JZYLO33K.mjs → search-SUTRANJI.mjs} +9 -9
- package/dist/cli/{secrets-VS266FVA.js → secrets-6OBLOVEV.js} +17 -17
- package/dist/cli/{secrets-3MCYBT4I.mjs → secrets-FPFXXNUH.mjs} +8 -8
- package/dist/cli/sessions-235532DR.js +16 -0
- package/dist/cli/{sessions-ELLLT23E.mjs → sessions-R25I4QKN.mjs} +6 -6
- package/dist/cli/{settings-PZCKAFII.mjs → settings-AOP6F5PZ.mjs} +12 -12
- package/dist/cli/{settings-7364NMMA.js → settings-VL5FOFPN.js} +79 -79
- package/dist/cli/{setup-PMWYLCT6.js → setup-BSC67YT3.js} +45 -44
- package/dist/cli/{setup-A7GQ4KIA.mjs → setup-ZMPHBHVJ.mjs} +11 -10
- package/dist/cli/skills-3IWLYYRL.js +29 -0
- package/dist/cli/{skills-WS6BIFPQ.mjs → skills-KF65TVFO.mjs} +7 -7
- package/dist/cli/tools-LR66SPYU.js +44 -0
- package/dist/cli/{tools-BR4DOZA2.mjs → tools-SX4XIPM7.mjs} +19 -14
- package/dist/cli/{update-D2B7UNFT.mjs → update-QRMFRAQQ.mjs} +11 -9
- package/dist/cli/update-SP7UEO53.js +31 -0
- package/dist/cli/{workflow-PQXC2R47.mjs → workflow-FOEEEB7G.mjs} +44 -20
- package/dist/cli/{workflow-6ODTCYXU.js → workflow-KOCK2FLW.js} +54 -30
- package/dist/{client-Z9Pye1Wm.d.mts → client-74k4IPh6.d.mts} +137 -54
- package/dist/{client-BcvhDfJJ.d.ts → client-C1IK1f8c.d.ts} +137 -54
- package/dist/{compiler-manifest-Ycx-hoAr.d.mts → compiler-manifest-lzWpbV3w.d.mts} +83 -66
- package/dist/{compiler-manifest-Ycx-hoAr.d.ts → compiler-manifest-lzWpbV3w.d.ts} +83 -66
- package/dist/{index-CZXgiN3E.d.mts → index-C8Cy-YTm.d.ts} +5 -1
- package/dist/{index-NPG5pqxQ.d.ts → index-CtNK-0nI.d.mts} +5 -1
- package/dist/index.d.mts +47 -9
- package/dist/index.d.ts +47 -9
- package/dist/index.js +17 -14
- package/dist/index.mjs +13 -10
- package/dist/install-integrity.json +120 -104
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +5 -4
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +11 -3
- package/dist/plays/run-request.mjs +10 -2
- package/dist/release.d.mts +15 -6
- package/dist/release.d.ts +15 -6
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +2 -2
- package/dist/cli/auth-3GB2K636.js +0 -40
- package/dist/cli/chunk-67RWR34T.mjs +0 -155
- package/dist/cli/chunk-CLJGSOVM.mjs +0 -1716
- package/dist/cli/chunk-HQY2SG3K.js +0 -83
- package/dist/cli/chunk-OSFWFV72.js +0 -155
- package/dist/cli/chunk-Q3LFI3VH.js +0 -392
- package/dist/cli/chunk-WPAB4DCU.mjs +0 -83
- package/dist/cli/chunk-YMOFWHGO.mjs +0 -392
- package/dist/cli/chunk-Z4VNJOF7.js +0 -1716
- package/dist/cli/git-YKUXXJOR.js +0 -24
- package/dist/cli/search-PPPYC5OZ.js +0 -30
- package/dist/cli/sessions-TEHEWW7O.js +0 -16
- package/dist/cli/skills-SYS7VRRK.js +0 -29
- package/dist/cli/tools-KK4BKVQR.js +0 -39
- package/dist/cli/update-2IV5JTX2.js +0 -29
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5V5Y37BC.mjs";
|
|
6
6
|
import {
|
|
7
7
|
resolveBaseUrlOnly
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RFB25DSQ.mjs";
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkFVLNYDI4js = require('./chunk-FVLNYDI4.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
|
|
11
11
|
|
|
12
12
|
// src/cli/json-fields.ts
|
|
13
13
|
var RUN_FIELDS = new Set(
|
|
@@ -42,7 +42,7 @@ function parseJsonFields(args, surface) {
|
|
|
42
42
|
if (parts.some(
|
|
43
43
|
(part) => !/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(part) || ["__proto__", "prototype", "constructor"].includes(part)
|
|
44
44
|
) || !allowed.has(parts[0])) {
|
|
45
|
-
throw new (0,
|
|
45
|
+
throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
|
|
46
46
|
`Unknown --json field '${path}'. Available roots: ${[...allowed].join(", ")}.`,
|
|
47
47
|
void 0,
|
|
48
48
|
"INVALID_ARGUMENT"
|
|
@@ -50,7 +50,7 @@ function parseJsonFields(args, surface) {
|
|
|
50
50
|
}
|
|
51
51
|
if (parts[0] === "run" && parts[1] && !RUN_FIELDS.has(parts[1])) {
|
|
52
52
|
const hint = parts[1] === "url" ? " Use run.dashboardUrl." : parts[1] === "stats" ? " Dataset summaries are in datasets; run timing is in run.durationMs." : "";
|
|
53
|
-
throw new (0,
|
|
53
|
+
throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
|
|
54
54
|
`Unknown --json run field '${parts[1]}'. Available: ${[...RUN_FIELDS].join(", ")}.${hint}`,
|
|
55
55
|
void 0,
|
|
56
56
|
"INVALID_ARGUMENT"
|
|
@@ -60,7 +60,7 @@ function parseJsonFields(args, surface) {
|
|
|
60
60
|
const target = args[0] && !args[0].startsWith("-") ? args[0] : "<target>";
|
|
61
61
|
const command = surface === "get" ? "runs get" : `plays ${surface}`;
|
|
62
62
|
const quotedTarget = `'${target.replace(/'/g, "'\\''")}'`;
|
|
63
|
-
throw new (0,
|
|
63
|
+
throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
|
|
64
64
|
`--json diagnostics requires --full. For inspection, use: deepline ${surface === "run" ? "runs get <run-id>" : `${command} ${quotedTarget}`} --full`,
|
|
65
65
|
void 0,
|
|
66
66
|
"INVALID_ARGUMENT"
|
|
@@ -70,7 +70,7 @@ function parseJsonFields(args, surface) {
|
|
|
70
70
|
fields = [..._nullishCoalesce(fields, () => ( [])), ...paths];
|
|
71
71
|
}
|
|
72
72
|
if (fields && normalized.includes("--input") && surface === "get") {
|
|
73
|
-
throw new (0,
|
|
73
|
+
throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
|
|
74
74
|
"--json fields selects the run response, not --input. Use bare --json with --input.",
|
|
75
75
|
void 0,
|
|
76
76
|
"INVALID_ARGUMENT"
|
|
@@ -288,8 +288,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
288
288
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
289
289
|
var defaultBrowserCommandRunner = childProcess;
|
|
290
290
|
function getAuthedHttpClient() {
|
|
291
|
-
const config =
|
|
292
|
-
return { config, http: new (0,
|
|
291
|
+
const config = _chunkFVLNYDI4js.resolveConfig.call(void 0, );
|
|
292
|
+
return { config, http: new (0, _chunkFVLNYDI4js.HttpClient)(config) };
|
|
293
293
|
}
|
|
294
294
|
function stableOsUserId() {
|
|
295
295
|
try {
|
|
@@ -629,7 +629,7 @@ function collectLocalEnvInfo() {
|
|
|
629
629
|
os: `${process.platform} ${process.arch}`,
|
|
630
630
|
node_version: process.version,
|
|
631
631
|
home_dir: homeDir,
|
|
632
|
-
agent_runtime:
|
|
632
|
+
agent_runtime: _chunkFVLNYDI4js.detectAgentRuntime.call(void 0, )
|
|
633
633
|
};
|
|
634
634
|
const env = process.env;
|
|
635
635
|
const optional = {
|
|
@@ -876,9 +876,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
876
876
|
}
|
|
877
877
|
function withAgentCommandContext(value) {
|
|
878
878
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
879
|
-
return
|
|
879
|
+
return _chunkFVLNYDI4js.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
880
880
|
...valueRecord,
|
|
881
|
-
command_context:
|
|
881
|
+
command_context: _chunkFVLNYDI4js.resolveCliCommandContext.call(void 0, )
|
|
882
882
|
} : value;
|
|
883
883
|
}
|
|
884
884
|
function printJson(value, fields) {
|
|
@@ -894,7 +894,7 @@ function printCompactJson(value) {
|
|
|
894
894
|
);
|
|
895
895
|
}
|
|
896
896
|
function cliToolExecutionFailure(error) {
|
|
897
|
-
const failure =
|
|
897
|
+
const failure = _chunkPPDBRJRWjs.serializeToolExecutionFailure.call(void 0, error);
|
|
898
898
|
if (!failure) return null;
|
|
899
899
|
const { publicDetails: _publicDetails, ...facts } = failure;
|
|
900
900
|
return facts;
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
|
|
7
7
|
|
|
8
8
|
// src/errors.ts
|
|
9
|
-
var CustomerDbQueryOutcomeUnknownError = (_class = class extends
|
|
9
|
+
var CustomerDbQueryOutcomeUnknownError = (_class = class extends _chunkPPDBRJRWjs.DeeplineError {
|
|
10
10
|
__init() {this.outcome = "unknown"}
|
|
11
11
|
|
|
12
12
|
|
|
@@ -28,14 +28,14 @@ var CustomerDbQueryOutcomeUnknownError = (_class = class extends _chunk7P5AA3SNj
|
|
|
28
28
|
Object.defineProperty(this, "cause", { value: cause, configurable: true });
|
|
29
29
|
}
|
|
30
30
|
}, _class);
|
|
31
|
-
var AuthError = class extends
|
|
31
|
+
var AuthError = class extends _chunkPPDBRJRWjs.DeeplineError {
|
|
32
32
|
/** Constructed by the SDK when Deepline rejects the caller's credentials. */
|
|
33
33
|
constructor(message = "Authentication failed. Check your DEEPLINE_API_KEY.") {
|
|
34
34
|
super(message, 401, "AUTH_ERROR");
|
|
35
35
|
this.name = "AuthError";
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
var RateLimitError = class extends
|
|
38
|
+
var RateLimitError = class extends _chunkPPDBRJRWjs.DeeplineError {
|
|
39
39
|
/** Milliseconds to wait before retrying, from the `Retry-After` response header. Defaults to 5000. */
|
|
40
40
|
|
|
41
41
|
/** Constructed by the SDK after exhausting HTTP-level rate-limit retries. */
|
|
@@ -89,13 +89,13 @@ var ToolRateLimitError = class extends RateLimitError {
|
|
|
89
89
|
this.networkScope = options.networkScope;
|
|
90
90
|
this.publicDetails = _nullishCoalesce(options.publicDetails, () => ( null));
|
|
91
91
|
this.details = options.details;
|
|
92
|
-
|
|
93
|
-
if (
|
|
94
|
-
|
|
92
|
+
_chunkPPDBRJRWjs.brandAsToolExecutionError.call(void 0, this);
|
|
93
|
+
if (_chunkPPDBRJRWjs.isProviderTransientFailure.call(void 0, this)) {
|
|
94
|
+
_chunkPPDBRJRWjs.brandAsProviderTransientError.call(void 0, this);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
-
var ConfigError = class extends
|
|
98
|
+
var ConfigError = class extends _chunkPPDBRJRWjs.DeeplineError {
|
|
99
99
|
/** Construct a local SDK configuration failure. */
|
|
100
100
|
constructor(message) {
|
|
101
101
|
super(message, void 0, "CONFIG_ERROR");
|
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
var _chunkLTFL4JRNjs = require('./chunk-LTFL4JRN.js');
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _chunkNF4V5DTYjs = require('./chunk-NF4V5DTY.js');
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var _chunkFVLNYDI4js = require('./chunk-FVLNYDI4.js');
|
|
26
|
+
|
|
27
|
+
// src/cli/commands/skills.ts
|
|
28
|
+
var _child_process = require('child_process');
|
|
29
|
+
var _fs = require('fs');
|
|
30
|
+
var _os = require('os');
|
|
31
|
+
var _path = require('path');
|
|
32
|
+
var SKILLS_INSTALL_LEASE_WAIT_MS = 9e4;
|
|
33
|
+
var SKILLS_PROCESS_TIMEOUT_MS = 45e3;
|
|
34
|
+
var RUNTIME_TO_SKILLS_AGENT = {
|
|
35
|
+
antigravity: "antigravity",
|
|
36
|
+
claude_code: "claude-code",
|
|
37
|
+
claude_cowork: "claude-code",
|
|
38
|
+
cline: "cline",
|
|
39
|
+
codex: "codex",
|
|
40
|
+
cursor: "cursor",
|
|
41
|
+
gemini: "gemini-cli",
|
|
42
|
+
windsurf: "windsurf"
|
|
43
|
+
};
|
|
44
|
+
var AGENT_MARKERS = [
|
|
45
|
+
{ agent: "codex", paths: [".codex"] },
|
|
46
|
+
{ agent: "claude-code", paths: [".claude"] },
|
|
47
|
+
{ agent: "cursor", paths: [".cursor"] },
|
|
48
|
+
{ agent: "gemini-cli", paths: [".gemini", ".gemini-cli"] },
|
|
49
|
+
{ agent: "antigravity", paths: [".antigravity"] }
|
|
50
|
+
];
|
|
51
|
+
var WORKSPACE_SKILL_ROOTS_BY_AGENT = {
|
|
52
|
+
antigravity: [".agents"],
|
|
53
|
+
"claude-code": [".claude"],
|
|
54
|
+
cline: [".agents"],
|
|
55
|
+
codex: [".agents"],
|
|
56
|
+
cursor: [".agents"],
|
|
57
|
+
"gemini-cli": [".agents"],
|
|
58
|
+
windsurf: [".windsurf"],
|
|
59
|
+
"*": [".agents", ".claude", ".windsurf"]
|
|
60
|
+
};
|
|
61
|
+
function workspaceSkillRootsForAgents(agents) {
|
|
62
|
+
return [
|
|
63
|
+
...new Set(
|
|
64
|
+
agents.flatMap((agent) => _nullishCoalesce(WORKSPACE_SKILL_ROOTS_BY_AGENT[agent], () => ( [])))
|
|
65
|
+
)
|
|
66
|
+
].sort((a, b) => a.localeCompare(b));
|
|
67
|
+
}
|
|
68
|
+
function normalizeScope(value) {
|
|
69
|
+
if (value === "global") return "global";
|
|
70
|
+
if (value === "local") return "local";
|
|
71
|
+
if (!value) return inferActiveSkillsScope();
|
|
72
|
+
throw new Error("--scope must be one of: global, local");
|
|
73
|
+
}
|
|
74
|
+
function inferActiveSkillsScope(entrypoint = _nullishCoalesce(process.argv[1], () => ( ""))) {
|
|
75
|
+
return /[\\/]\.deepline[\\/]runtime[\\/]/.test(entrypoint) ? "local" : "global";
|
|
76
|
+
}
|
|
77
|
+
function resolveLocalRoot() {
|
|
78
|
+
const target = _chunkFVLNYDI4js.resolveProjectPinTarget.call(void 0, );
|
|
79
|
+
if (!target.ok) {
|
|
80
|
+
throw new Error(
|
|
81
|
+
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
82
|
+
", "
|
|
83
|
+
)}. Set CLAUDE_PROJECT_DIR or cd into the intended project folder.`
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
return target.dir;
|
|
87
|
+
}
|
|
88
|
+
function detectSkillsAgents(input) {
|
|
89
|
+
const runtime = _nullishCoalesce(input.runtime, () => ( _chunkFVLNYDI4js.detectAgentRuntime.call(void 0, )));
|
|
90
|
+
const knownAgent = RUNTIME_TO_SKILLS_AGENT[runtime];
|
|
91
|
+
if (knownAgent) return [knownAgent];
|
|
92
|
+
const roots = [
|
|
93
|
+
...input.scope === "local" && input.root ? [input.root] : [],
|
|
94
|
+
_nullishCoalesce(input.homeDir, () => ( _os.homedir.call(void 0, )))
|
|
95
|
+
];
|
|
96
|
+
const detected = AGENT_MARKERS.filter(
|
|
97
|
+
(marker) => roots.some(
|
|
98
|
+
(root) => marker.paths.some((path) => _fs.existsSync.call(void 0, _path.join.call(void 0, root, path)))
|
|
99
|
+
)
|
|
100
|
+
).map((marker) => marker.agent);
|
|
101
|
+
return detected.length > 0 ? detected : ["*"];
|
|
102
|
+
}
|
|
103
|
+
function skillsStatePathForScope(baseUrl, scope, root) {
|
|
104
|
+
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0, _chunkFVLNYDI4js.sdkCliStateDirPath.call(void 0, baseUrl), "skills-install.json");
|
|
105
|
+
}
|
|
106
|
+
function buildSkillsPlan(input) {
|
|
107
|
+
const scopeArgs = input.scope === "global" ? ["--global"] : [];
|
|
108
|
+
const legacyNames = [..._chunkLTFL4JRNjs.LEGACY_SKILL_NAMES_TO_REMOVE].sort(
|
|
109
|
+
(a, b) => a.localeCompare(b)
|
|
110
|
+
);
|
|
111
|
+
return {
|
|
112
|
+
scope: input.scope,
|
|
113
|
+
root: input.root,
|
|
114
|
+
agents: input.agents,
|
|
115
|
+
skillNames: input.skillNames,
|
|
116
|
+
version: input.version,
|
|
117
|
+
remove: {
|
|
118
|
+
command: "npm",
|
|
119
|
+
args: [
|
|
120
|
+
"exec",
|
|
121
|
+
"--yes",
|
|
122
|
+
`--package=${_chunkLTFL4JRNjs.SKILLS_NPX_PACKAGE}`,
|
|
123
|
+
"--",
|
|
124
|
+
"skills",
|
|
125
|
+
"remove",
|
|
126
|
+
...scopeArgs,
|
|
127
|
+
"--agent",
|
|
128
|
+
...input.agents,
|
|
129
|
+
"-y",
|
|
130
|
+
...legacyNames
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
install: {
|
|
134
|
+
command: "npm",
|
|
135
|
+
args: [
|
|
136
|
+
"exec",
|
|
137
|
+
"--yes",
|
|
138
|
+
`--package=${_chunkLTFL4JRNjs.SKILLS_NPX_PACKAGE}`,
|
|
139
|
+
"--",
|
|
140
|
+
"skills",
|
|
141
|
+
"add",
|
|
142
|
+
_chunkLTFL4JRNjs.skillsSourceUrl.call(void 0, input.baseUrl),
|
|
143
|
+
"--agent",
|
|
144
|
+
...input.agents,
|
|
145
|
+
...scopeArgs,
|
|
146
|
+
"--yes",
|
|
147
|
+
...input.skillNames.flatMap((name) => ["--skill", name]),
|
|
148
|
+
"--full-depth"
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
statePath: skillsStatePathForScope(input.baseUrl, input.scope, input.root)
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function sortedStrings(value) {
|
|
155
|
+
if (!Array.isArray(value) || value.some((entry) => typeof entry !== "string")) {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
return [...value].sort((a, b) => a.localeCompare(b));
|
|
159
|
+
}
|
|
160
|
+
function isSkillsPlanCurrent(plan, state) {
|
|
161
|
+
if (!state || state.scope !== plan.scope || state.skillsVersion !== plan.version) {
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
const installedAgents = sortedStrings(state.agents);
|
|
165
|
+
const installedSkillNames = sortedStrings(state.skillNames);
|
|
166
|
+
if (!installedAgents || !installedSkillNames) return false;
|
|
167
|
+
return installedAgents.join("\0") === [...plan.agents].sort((a, b) => a.localeCompare(b)).join("\0") && installedSkillNames.join("\0") === [...plan.skillNames].sort((a, b) => a.localeCompare(b)).join("\0");
|
|
168
|
+
}
|
|
169
|
+
function readSkillsInstallState(path) {
|
|
170
|
+
try {
|
|
171
|
+
const parsed = JSON.parse(_fs.readFileSync.call(void 0, path, "utf8"));
|
|
172
|
+
return parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null;
|
|
173
|
+
} catch (e) {
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
function runProcess(command, args, cwd) {
|
|
178
|
+
return new Promise((resolve, reject) => {
|
|
179
|
+
const plan = _chunkLTFL4JRNjs.resolveShellSpawn.call(void 0,
|
|
180
|
+
command,
|
|
181
|
+
args,
|
|
182
|
+
process.platform,
|
|
183
|
+
process.env,
|
|
184
|
+
cwd
|
|
185
|
+
);
|
|
186
|
+
const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
|
|
187
|
+
cwd,
|
|
188
|
+
env: process.env,
|
|
189
|
+
stdio: ["ignore", "ignore", "pipe"],
|
|
190
|
+
shell: plan.shell
|
|
191
|
+
});
|
|
192
|
+
let stderr = "";
|
|
193
|
+
child.stderr.on("data", (chunk) => {
|
|
194
|
+
stderr += chunk.toString("utf8");
|
|
195
|
+
process.stderr.write(chunk);
|
|
196
|
+
});
|
|
197
|
+
const timeout = setTimeout(() => {
|
|
198
|
+
child.kill("SIGTERM");
|
|
199
|
+
reject(
|
|
200
|
+
new Error(
|
|
201
|
+
`${_chunkLTFL4JRNjs.SKILLS_NPX_PACKAGE} timed out after ${SKILLS_PROCESS_TIMEOUT_MS}ms.`
|
|
202
|
+
)
|
|
203
|
+
);
|
|
204
|
+
}, SKILLS_PROCESS_TIMEOUT_MS);
|
|
205
|
+
child.once("error", (error) => {
|
|
206
|
+
clearTimeout(timeout);
|
|
207
|
+
reject(error);
|
|
208
|
+
});
|
|
209
|
+
child.once("close", (code) => {
|
|
210
|
+
clearTimeout(timeout);
|
|
211
|
+
if (code && stderr.trim()) {
|
|
212
|
+
process.stderr.write(`${_chunkLTFL4JRNjs.SKILLS_NPX_PACKAGE} exited ${code}.
|
|
213
|
+
`);
|
|
214
|
+
}
|
|
215
|
+
resolve(_nullishCoalesce(code, () => ( 1)));
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
async function runSkillsCommand(options, dependencies = {}) {
|
|
220
|
+
let scope;
|
|
221
|
+
let root;
|
|
222
|
+
try {
|
|
223
|
+
scope = normalizeScope(options.scope);
|
|
224
|
+
root = scope === "local" ? resolveLocalRoot() : null;
|
|
225
|
+
} catch (error) {
|
|
226
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
227
|
+
{
|
|
228
|
+
ok: false,
|
|
229
|
+
status: "failed",
|
|
230
|
+
code: "INVALID_SKILLS_SCOPE",
|
|
231
|
+
exitCode: 2,
|
|
232
|
+
message: error instanceof Error ? error.message : String(error)
|
|
233
|
+
},
|
|
234
|
+
{ json: options.json }
|
|
235
|
+
);
|
|
236
|
+
return 2;
|
|
237
|
+
}
|
|
238
|
+
const baseUrl = _chunkFVLNYDI4js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
239
|
+
const catalog = {
|
|
240
|
+
skillNames: [..._chunkLTFL4JRNjs.DEFAULT_SDK_SKILL_NAMES],
|
|
241
|
+
version: _chunkFVLNYDI4js.SDK_VERSION
|
|
242
|
+
};
|
|
243
|
+
const agents = options.agent ? [options.agent] : detectSkillsAgents({ scope, root });
|
|
244
|
+
const plan = buildSkillsPlan({ baseUrl, scope, root, agents, ...catalog });
|
|
245
|
+
if (options.dryRun) {
|
|
246
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
247
|
+
{ ok: true, status: "planned", dryRun: true, ...plan },
|
|
248
|
+
{ json: options.json }
|
|
249
|
+
);
|
|
250
|
+
return 0;
|
|
251
|
+
}
|
|
252
|
+
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !_chunkLTFL4JRNjs.hasFailedAutomaticSkillsSync.call(void 0, baseUrl, agents)) {
|
|
253
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
254
|
+
{
|
|
255
|
+
ok: true,
|
|
256
|
+
status: "current",
|
|
257
|
+
complete: true,
|
|
258
|
+
changed: false,
|
|
259
|
+
skipped: true,
|
|
260
|
+
skipReason: "skills_version_current",
|
|
261
|
+
scope,
|
|
262
|
+
agents,
|
|
263
|
+
skillsVersion: plan.version,
|
|
264
|
+
skillCount: plan.skillNames.length,
|
|
265
|
+
statePath: plan.statePath,
|
|
266
|
+
render: {
|
|
267
|
+
sections: [
|
|
268
|
+
{
|
|
269
|
+
title: "skills",
|
|
270
|
+
lines: [
|
|
271
|
+
`Scope: ${scope}`,
|
|
272
|
+
`Agents: ${agents.join(", ")}`,
|
|
273
|
+
`Current: ${plan.skillNames.length}`
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
{ json: options.json }
|
|
280
|
+
);
|
|
281
|
+
return 0;
|
|
282
|
+
}
|
|
283
|
+
if (scope === "local" && root) {
|
|
284
|
+
const managedNames = [
|
|
285
|
+
.../* @__PURE__ */ new Set([...plan.skillNames, ..._chunkLTFL4JRNjs.LEGACY_SKILL_NAMES_TO_REMOVE])
|
|
286
|
+
];
|
|
287
|
+
const agentRoots = workspaceSkillRootsForAgents(plan.agents);
|
|
288
|
+
_chunkFVLNYDI4js.ensureProjectPrivatePathsIgnored.call(void 0, root, [
|
|
289
|
+
".deepline/",
|
|
290
|
+
...agentRoots.flatMap(
|
|
291
|
+
(agentRoot) => managedNames.map((name) => `${agentRoot}/skills/${name}/`)
|
|
292
|
+
)
|
|
293
|
+
]);
|
|
294
|
+
}
|
|
295
|
+
let lease;
|
|
296
|
+
try {
|
|
297
|
+
lease = scope === "global" ? await _chunkLTFL4JRNjs.acquireSkillsInstallLease.call(void 0, baseUrl, agents, plan.version, {
|
|
298
|
+
waitMs: _nullishCoalesce(dependencies.installLeaseWaitMs, () => ( SKILLS_INSTALL_LEASE_WAIT_MS)),
|
|
299
|
+
onWait: () => process.stderr.write(
|
|
300
|
+
"Waiting for a background Deepline skills refresh to finish...\n"
|
|
301
|
+
)
|
|
302
|
+
}) : { release: () => {
|
|
303
|
+
} };
|
|
304
|
+
} catch (error) {
|
|
305
|
+
if (!(error instanceof _chunkLTFL4JRNjs.SkillsStateUnavailableError)) throw error;
|
|
306
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
307
|
+
{
|
|
308
|
+
ok: false,
|
|
309
|
+
status: "failed",
|
|
310
|
+
code: "SKILLS_STATE_UNAVAILABLE",
|
|
311
|
+
exitCode: 5,
|
|
312
|
+
scope,
|
|
313
|
+
agents,
|
|
314
|
+
message: error.message,
|
|
315
|
+
next: `Resolve this filesystem error, then run: deepline skills --scope ${scope}`
|
|
316
|
+
},
|
|
317
|
+
{ json: options.json }
|
|
318
|
+
);
|
|
319
|
+
return 5;
|
|
320
|
+
}
|
|
321
|
+
if (!lease) {
|
|
322
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
323
|
+
{
|
|
324
|
+
ok: false,
|
|
325
|
+
status: "failed",
|
|
326
|
+
code: "SKILLS_SYNC_IN_PROGRESS",
|
|
327
|
+
exitCode: 7,
|
|
328
|
+
scope,
|
|
329
|
+
agents,
|
|
330
|
+
message: "A background Deepline skills refresh is still running for these agents.",
|
|
331
|
+
next: `Retry in a moment: deepline skills --scope ${scope}. If no refresh is running, remove ${_chunkLTFL4JRNjs.skillsInstallLeasePath.call(void 0, baseUrl, agents)}`
|
|
332
|
+
},
|
|
333
|
+
{ json: options.json }
|
|
334
|
+
);
|
|
335
|
+
return 7;
|
|
336
|
+
}
|
|
337
|
+
try {
|
|
338
|
+
return await runSkillsInstallWithLease({
|
|
339
|
+
options,
|
|
340
|
+
dependencies,
|
|
341
|
+
baseUrl,
|
|
342
|
+
scope,
|
|
343
|
+
root,
|
|
344
|
+
agents,
|
|
345
|
+
plan
|
|
346
|
+
});
|
|
347
|
+
} finally {
|
|
348
|
+
lease.release();
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
async function runSkillsInstallWithLease(input) {
|
|
352
|
+
const { options, dependencies, baseUrl, scope, root, agents, plan } = input;
|
|
353
|
+
process.stderr.write(
|
|
354
|
+
`Replacing Deepline skills for ${agents.join(", ")} (${scope})...
|
|
355
|
+
`
|
|
356
|
+
);
|
|
357
|
+
const execute = _nullishCoalesce(dependencies.runProcess, () => ( runProcess));
|
|
358
|
+
try {
|
|
359
|
+
const installCode = await execute(
|
|
360
|
+
plan.install.command,
|
|
361
|
+
plan.install.args,
|
|
362
|
+
_nullishCoalesce(root, () => ( void 0))
|
|
363
|
+
);
|
|
364
|
+
if (installCode !== 0) {
|
|
365
|
+
throw new Error("Could not install the current Deepline skills.");
|
|
366
|
+
}
|
|
367
|
+
} catch (error) {
|
|
368
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
369
|
+
{
|
|
370
|
+
ok: false,
|
|
371
|
+
status: "failed",
|
|
372
|
+
code: "SKILLS_INSTALL_FAILED",
|
|
373
|
+
exitCode: 5,
|
|
374
|
+
scope,
|
|
375
|
+
agents,
|
|
376
|
+
message: error instanceof Error ? error.message : String(error),
|
|
377
|
+
next: `deepline skills --scope ${scope}`
|
|
378
|
+
},
|
|
379
|
+
{ json: options.json }
|
|
380
|
+
);
|
|
381
|
+
return 5;
|
|
382
|
+
}
|
|
383
|
+
try {
|
|
384
|
+
const removeCode = await execute(
|
|
385
|
+
plan.remove.command,
|
|
386
|
+
plan.remove.args,
|
|
387
|
+
_nullishCoalesce(root, () => ( void 0))
|
|
388
|
+
);
|
|
389
|
+
if (removeCode !== 0) {
|
|
390
|
+
process.stderr.write(
|
|
391
|
+
"Current Deepline skills installed, but legacy skill cleanup failed. The installed skills remain usable.\n"
|
|
392
|
+
);
|
|
393
|
+
}
|
|
394
|
+
} catch (error) {
|
|
395
|
+
process.stderr.write(
|
|
396
|
+
`Current Deepline skills installed, but legacy skill cleanup failed: ${error instanceof Error ? error.message : String(error)}. The installed skills remain usable.
|
|
397
|
+
`
|
|
398
|
+
);
|
|
399
|
+
}
|
|
400
|
+
_fs.mkdirSync.call(void 0, _path.dirname.call(void 0, plan.statePath), { recursive: true });
|
|
401
|
+
_fs.writeFileSync.call(void 0,
|
|
402
|
+
plan.statePath,
|
|
403
|
+
`${JSON.stringify(
|
|
404
|
+
{
|
|
405
|
+
schemaVersion: 1,
|
|
406
|
+
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
407
|
+
cliVersion: _chunkFVLNYDI4js.SDK_VERSION,
|
|
408
|
+
scope,
|
|
409
|
+
agents,
|
|
410
|
+
skillsVersion: plan.version,
|
|
411
|
+
skillNames: plan.skillNames
|
|
412
|
+
},
|
|
413
|
+
null,
|
|
414
|
+
2
|
|
415
|
+
)}
|
|
416
|
+
`,
|
|
417
|
+
"utf8"
|
|
418
|
+
);
|
|
419
|
+
if (scope === "global") {
|
|
420
|
+
_chunkLTFL4JRNjs.clearFailedAutomaticSkillsSync.call(void 0, baseUrl, agents);
|
|
421
|
+
}
|
|
422
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
423
|
+
{
|
|
424
|
+
ok: true,
|
|
425
|
+
status: "complete",
|
|
426
|
+
scope,
|
|
427
|
+
agents,
|
|
428
|
+
skillsVersion: plan.version,
|
|
429
|
+
skillCount: plan.skillNames.length,
|
|
430
|
+
statePath: plan.statePath,
|
|
431
|
+
render: {
|
|
432
|
+
sections: [
|
|
433
|
+
{
|
|
434
|
+
title: "skills",
|
|
435
|
+
lines: [
|
|
436
|
+
`Scope: ${scope}`,
|
|
437
|
+
`Agents: ${agents.join(", ")}`,
|
|
438
|
+
`Installed: ${plan.skillNames.length}`
|
|
439
|
+
]
|
|
440
|
+
}
|
|
441
|
+
]
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
{ json: options.json }
|
|
445
|
+
);
|
|
446
|
+
return 0;
|
|
447
|
+
}
|
|
448
|
+
function registerSkillsCommand(program) {
|
|
449
|
+
program.command("skills").description("Replace Deepline agent skills with the current release.").option("--scope <scope>", "Install scope: global or local").option("--agent <agent>", "Override the detected agent target").option("--dry-run", "Print the install plan without changing files").option("--json", "Emit one JSON result envelope").addHelpText(
|
|
450
|
+
"after",
|
|
451
|
+
`
|
|
452
|
+
Notes:
|
|
453
|
+
This command reinstalls current Deepline-managed skills using ${_chunkLTFL4JRNjs.SKILLS_NPX_PACKAGE},
|
|
454
|
+
then removes legacy Deepline skill names. Local scope writes into the resolved
|
|
455
|
+
persistent project.
|
|
456
|
+
|
|
457
|
+
Examples:
|
|
458
|
+
deepline skills
|
|
459
|
+
deepline skills --scope local
|
|
460
|
+
deepline skills --agent codex --dry-run
|
|
461
|
+
`
|
|
462
|
+
).action(async (options) => {
|
|
463
|
+
process.exitCode = await runSkillsCommand(options);
|
|
464
|
+
});
|
|
465
|
+
program.command(_chunkLTFL4JRNjs.SKILLS_AUTO_SYNC_COMMAND, { hidden: true }).description("Refresh Deepline agent skills in the background.").option(
|
|
466
|
+
"--claim <token>",
|
|
467
|
+
"Owner token of the leases this child was started for."
|
|
468
|
+
).action(async (options) => {
|
|
469
|
+
const claim = _optionalChain([options, 'access', _ => _.claim, 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]);
|
|
470
|
+
if (!claim) {
|
|
471
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
472
|
+
{
|
|
473
|
+
ok: false,
|
|
474
|
+
status: "failed",
|
|
475
|
+
code: "SKILLS_AUTO_SYNC_CLAIM_REQUIRED",
|
|
476
|
+
exitCode: 2,
|
|
477
|
+
message: "skills-auto-sync is started by ordinary deepline commands and requires the lease token they pass; run `deepline skills` to install skills yourself."
|
|
478
|
+
},
|
|
479
|
+
{ json: true }
|
|
480
|
+
);
|
|
481
|
+
process.exitCode = 2;
|
|
482
|
+
return;
|
|
483
|
+
}
|
|
484
|
+
await _chunkLTFL4JRNjs.syncSdkSkillsIfNeeded.call(void 0, _chunkFVLNYDI4js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, ""), {
|
|
485
|
+
mode: "inline",
|
|
486
|
+
notices: "defer",
|
|
487
|
+
claim
|
|
488
|
+
});
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
exports.workspaceSkillRootsForAgents = workspaceSkillRootsForAgents; exports.inferActiveSkillsScope = inferActiveSkillsScope; exports.detectSkillsAgents = detectSkillsAgents; exports.skillsStatePathForScope = skillsStatePathForScope; exports.buildSkillsPlan = buildSkillsPlan; exports.isSkillsPlanCurrent = isSkillsPlanCurrent; exports.runSkillsCommand = runSkillsCommand; exports.registerSkillsCommand = registerSkillsCommand;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E4IXDAZI.mjs";
|
|
4
4
|
|
|
5
5
|
// node_modules/csv-parse/dist/esm/sync.js
|
|
6
6
|
var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
|