deepline 0.3.483 → 0.3.485
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/client-core.ts +91 -30
- package/dist/bundling-sources/sdk/src/compat.ts +13 -0
- package/dist/bundling-sources/sdk/src/plays/client-core.ts +4 -1
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +143 -9
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +31 -4
- package/dist/bundling-sources/sdk/src/tool-calls.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +7 -1
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +100 -9
- package/dist/bundling-sources/shared_libs/play-data-plane/sheet-column-storage.ts +32 -3
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +126 -41
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +231 -25
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-runtime-config.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +130 -19
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-registry.ts +105 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +4 -2
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +194 -56
- package/dist/bundling-sources/shared_libs/play-runtime/log-provenance.ts +11 -6
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/job.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/ports.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/postgres-adapter.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +30 -0
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +195 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +20 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +15 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +102 -23
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/progress-sidecar.ts +9 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-control-transport.ts +25 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +133 -82
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +58 -16
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-sandbox-absence.ts +171 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +69 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +100 -40
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +67 -9
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-incident-drills.ts +5 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +6 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-errors.ts +14 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-writer.ts +87 -31
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/index.ts +19 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +14 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +204 -6
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +39 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/ambiguous-modal-create-state.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/compute-billing-job-state.ts +23 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-retirement-state.ts +25 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-retirement.ts +15 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/outbox-repair-operation-state.ts +30 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +12 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +26 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +44 -15
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +60 -11
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +743 -70
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +6 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +34 -34
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/sandbox-cleanup-job-state.ts +23 -0
- package/dist/bundling-sources/shared_libs/play-runtime/suspension.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +21 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +1 -1
- package/dist/bundling-sources/shared_libs/product-notifications/destination-state.ts +93 -0
- package/dist/cli/auth-ABZBH55L.js +43 -0
- package/dist/cli/{auth-2NXF6Q3Q.mjs → auth-OWMUENCU.mjs} +5 -5
- package/dist/cli/{billing-5PW4L5WD.js → billing-2FMNQGOX.js} +80 -80
- package/dist/cli/{billing-W2Y4EOZP.mjs → billing-JX4H3VFF.mjs} +7 -7
- package/dist/cli/{chunk-UGBZ6MCR.js → chunk-2ILND7XX.js} +2 -2
- package/dist/cli/{chunk-25IGCYJP.mjs → chunk-2ZEQ43B7.mjs} +3 -3
- package/dist/cli/{chunk-J7S3DJB4.mjs → chunk-3DBW6C7M.mjs} +13 -4
- package/dist/cli/{chunk-7APXZ3CX.mjs → chunk-3DYU3JQN.mjs} +2 -2
- package/dist/cli/{chunk-VFEW53L5.js → chunk-3OF7NSGR.js} +322 -294
- package/dist/cli/{chunk-UDF2CY4D.mjs → chunk-3Z24NKW7.mjs} +62 -34
- package/dist/cli/{chunk-62XGOB2D.js → chunk-5DCQWQCP.js} +26 -26
- package/dist/cli/{chunk-4X23YY2E.mjs → chunk-62PJ6PK7.mjs} +5 -5
- package/dist/cli/{chunk-YL64JIQ7.mjs → chunk-676NZ7K4.mjs} +1 -1
- package/dist/cli/{chunk-T5GZZJ7O.js → chunk-775AZTO7.js} +323 -247
- package/dist/cli/{chunk-C3LJSOQ6.mjs → chunk-ACTUAZYP.mjs} +5 -5
- package/dist/cli/{chunk-R2OR4RHV.js → chunk-AFADYKFE.js} +8 -8
- package/dist/cli/{chunk-GVAENVIG.js → chunk-AUQQVDAB.js} +110 -21
- package/dist/cli/{chunk-GONUMUBM.js → chunk-BSKPQB2P.js} +7 -7
- package/dist/cli/chunk-C6QWRSMQ.js +42 -0
- package/dist/cli/{chunk-AK7UKQ5R.js → chunk-CSBMKHTV.js} +5 -5
- package/dist/cli/{chunk-PRL7EKJZ.mjs → chunk-CW6TAQBF.mjs} +15 -4
- package/dist/cli/{chunk-75IIHFN6.js → chunk-DMNVM34J.js} +5 -4
- package/dist/cli/{chunk-IEV5UWPN.mjs → chunk-E73JXJA3.mjs} +1 -1
- package/dist/cli/{chunk-DS455RPF.js → chunk-EC2CVPN5.js} +3 -3
- package/dist/cli/{chunk-B7HQL77V.js → chunk-ECIXZNSW.js} +87 -76
- package/dist/cli/{chunk-JJSLEMQQ.mjs → chunk-FJY6K3BG.mjs} +93 -17
- package/dist/cli/{chunk-FK47YUPC.mjs → chunk-G5PI3RNT.mjs} +1 -1
- package/dist/cli/{chunk-GRE3ID5E.mjs → chunk-GHHJWCMD.mjs} +2 -1
- package/dist/cli/{chunk-2JWG2H2N.js → chunk-HKGXGGIV.js} +1 -1
- package/dist/cli/{chunk-2MKX3HV3.js → chunk-IHMYIHF4.js} +5 -5
- package/dist/cli/{chunk-SD7QWZTV.mjs → chunk-INW22YP7.mjs} +1 -1
- package/dist/cli/{chunk-OWUZKXE7.mjs → chunk-J7EENGKJ.mjs} +1 -1
- package/dist/cli/{chunk-AWAFYRFV.mjs → chunk-JD6HKNKD.mjs} +1 -1
- package/dist/cli/{chunk-UY7OXFVU.js → chunk-JQXUWYWX.js} +13 -13
- package/dist/cli/{chunk-GGJQ4HJW.mjs → chunk-KZTNNLIL.mjs} +2 -2
- package/dist/cli/{chunk-NREZRYPU.mjs → chunk-L352NOE3.mjs} +2 -2
- package/dist/cli/{chunk-WI2HNYQX.js → chunk-L7IQ3DFH.js} +53 -53
- package/dist/cli/{chunk-4IOY2SCQ.js → chunk-LOX3BISD.js} +4 -4
- package/dist/cli/{chunk-XRIQN6EP.js → chunk-NKPTM7SK.js} +7 -7
- package/dist/cli/{chunk-5ICAG4RE.js → chunk-NLRTFJGH.js} +14 -14
- package/dist/cli/{chunk-WKB6Y43W.js → chunk-NRNWPWBW.js} +37 -37
- package/dist/cli/{chunk-HNRELVCS.mjs → chunk-ONONSV2Q.mjs} +96 -7
- package/dist/cli/{chunk-MYB6JVSD.js → chunk-OW4OTEFF.js} +16 -16
- package/dist/cli/{chunk-ISP7ZENV.mjs → chunk-RZE5I2XJ.mjs} +4 -4
- package/dist/cli/{chunk-5LHU7NUS.js → chunk-S3WQJ5VG.js} +3 -3
- package/dist/cli/{chunk-EDMCD7MX.mjs → chunk-SR6S4EYG.mjs} +5 -5
- package/dist/cli/{chunk-2T4OSJEH.js → chunk-T4G2T5DS.js} +21 -21
- package/dist/cli/{chunk-EGHYGTJM.mjs → chunk-TMCC7ORQ.mjs} +1 -1
- package/dist/cli/{chunk-SCPFOH5Z.mjs → chunk-TSCUWWTM.mjs} +1 -1
- package/dist/cli/{chunk-7TKLISLM.js → chunk-TVW6USSG.js} +3 -3
- package/dist/cli/{chunk-QSYA6VE4.js → chunk-U6WEGDD3.js} +2 -2
- package/dist/cli/{chunk-FGEC5SWP.mjs → chunk-UPHXGZCE.mjs} +4 -4
- package/dist/cli/{chunk-5JCXS4MP.js → chunk-UQ3LQ6IF.js} +5 -5
- package/dist/cli/{chunk-JYEZ6BWX.mjs → chunk-VZYTLWOM.mjs} +2 -2
- package/dist/cli/{chunk-FAZTLYJO.mjs → chunk-W33OL4F2.mjs} +2 -2
- package/dist/cli/{chunk-ZM2YPJQJ.js → chunk-XK5DMLZE.js} +5 -1
- package/dist/cli/{chunk-LJ5747UC.mjs → chunk-XRDXNAAY.mjs} +5 -1
- package/dist/cli/{chunk-S24CK3CJ.mjs → chunk-YDA3PMKK.mjs} +3 -3
- package/dist/cli/{csv-EKEFLUIW.js → csv-HFEQPGNY.js} +13 -13
- package/dist/cli/{csv-DIFVIR23.mjs → csv-OHF3Y5KB.mjs} +4 -4
- package/dist/cli/{db-DOW4EVEU.mjs → db-M456OUXD.mjs} +7 -7
- package/dist/cli/{db-S7DDRUHX.js → db-VLQKCYQS.js} +28 -28
- package/dist/cli/describe-CP35DZ5Z.js +49 -0
- package/dist/cli/{describe-KSZFOWKV.mjs → describe-M6VXFYVL.mjs} +21 -21
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-CAG7YC5K.mjs → executions-4FGRBPJF.mjs} +7 -7
- package/dist/cli/{executions-3DU5IXB6.js → executions-GKINJZI6.js} +9 -9
- package/dist/cli/{feedback-BQMPTE47.mjs → feedback-D2WMGK3V.mjs} +4 -4
- package/dist/cli/{feedback-I65JMCP2.js → feedback-ZH5K7WV7.js} +8 -8
- package/dist/cli/git-IDALMZDN.js +25 -0
- package/dist/cli/{git-UQUCD7XZ.mjs → git-OCIJ5ME4.mjs} +5 -5
- package/dist/cli/index.js +142 -139
- package/dist/cli/index.mjs +45 -42
- package/dist/cli/{legacy-noops-OLNT2BG5.js → legacy-noops-QNIVP7LO.js} +8 -8
- package/dist/cli/{legacy-noops-JXKLHUI3.mjs → legacy-noops-V6Q2X34P.mjs} +5 -5
- package/dist/cli/{monitors-DLTHHAFQ.mjs → monitors-2USHTG5G.mjs} +8 -8
- package/dist/cli/{monitors-Z5X56AZN.js → monitors-5DNK7W2K.js} +92 -92
- package/dist/cli/{org-XBHJLKUG.js → org-RPGM5AN4.js} +73 -73
- package/dist/cli/{org-6EZZHD3M.mjs → org-TL2YPYSE.mjs} +7 -7
- package/dist/cli/{pages-XVJ34SCN.js → pages-PNUKPFWV.js} +18 -18
- package/dist/cli/{pages-MYXROSVK.mjs → pages-XDEW6EE3.mjs} +7 -7
- package/dist/cli/{play-ACC4T2XQ.js → play-F5LHRKV5.js} +858 -632
- package/dist/cli/{play-5PV4LAHE.mjs → play-WINNQ4HZ.mjs} +372 -146
- package/dist/cli/{providers-JCI3KNE4.js → providers-BD4IS5U5.js} +10 -10
- package/dist/cli/{providers-2DLUGIFF.mjs → providers-PXGL3FRE.mjs} +7 -7
- package/dist/cli/{quickstart-PDSQEDLD.js → quickstart-7LVF6HZF.js} +6 -6
- package/dist/cli/{quickstart-NSL3C76K.mjs → quickstart-XTH3UQWZ.mjs} +4 -4
- package/dist/cli/{run-X5MXCM4P.mjs → run-MBMUENR7.mjs} +26 -26
- package/dist/cli/{run-UCFMHOQC.js → run-NH2BAWPA.js} +41 -41
- package/dist/cli/{search-RPEMXV6N.mjs → search-BMRWBV66.mjs} +8 -8
- package/dist/cli/search-R3MQJQMT.js +32 -0
- package/dist/cli/{search-output-MZH3HLVE.js → search-output-5NNT337U.js} +22 -16
- package/dist/cli/{search-output-6UO47B7G.mjs → search-output-QKKRD4MF.mjs} +14 -8
- package/dist/cli/{secrets-NLEQURD3.mjs → secrets-AWEXBTJV.mjs} +7 -7
- package/dist/cli/{secrets-UFBASYGY.js → secrets-KQSTOREN.js} +16 -16
- package/dist/cli/{sessions-JYH4DBEE.js → sessions-DSPLZYCJ.js} +6 -6
- package/dist/cli/{sessions-3ALFLWVU.mjs → sessions-RO25Q67X.mjs} +5 -5
- package/dist/cli/{settings-MQYKNAMB.js → settings-7JXIKNKI.js} +79 -79
- package/dist/cli/{settings-YPRILREA.mjs → settings-JMGXGK4Z.mjs} +12 -12
- package/dist/cli/{setup-5IGSHH4E.js → setup-5QFAQQRW.js} +47 -47
- package/dist/cli/{setup-DK4GM227.mjs → setup-ZQZ47FHB.mjs} +9 -9
- package/dist/cli/skills-EDZXY7DV.js +33 -0
- package/dist/cli/{skills-KYBZH3IT.mjs → skills-W3H2DL56.mjs} +7 -7
- package/dist/cli/{tools-4B2MHNBN.mjs → tools-2BZCVNBS.mjs} +19 -19
- package/dist/cli/tools-2EY2ETCZ.js +56 -0
- package/dist/cli/{update-S6VEO7NB.mjs → update-GAWYMGAW.mjs} +9 -9
- package/dist/cli/update-UKDQKNBY.js +33 -0
- package/dist/cli/{workflow-KXZZYFEF.mjs → workflow-M6LLHQ2I.mjs} +8 -8
- package/dist/cli/{workflow-FU2XVPUK.js → workflow-ZPTDFPKW.js} +18 -18
- package/dist/{client-DJ3r8VQJ.d.mts → client-BkbDHRIg.d.mts} +1 -1
- package/dist/{client-JPSNljtj.d.ts → client-D3hVHXjK.d.ts} +1 -1
- package/dist/{client-core-3SJlNsKU.d.mts → client-core-BZoSMKcY.d.mts} +30 -15
- package/dist/{client-core-rCoQ5Xz3.d.ts → client-core-DUdVqO_m.d.ts} +30 -15
- package/dist/{compiler-manifest-gkO9ZkVg.d.mts → compiler-manifest-BFTwq1HI.d.mts} +1 -1
- package/dist/{compiler-manifest-gkO9ZkVg.d.ts → compiler-manifest-BFTwq1HI.d.ts} +1 -1
- package/dist/{errors-Cc92LKH-.d.ts → errors-c3pMsylw.d.ts} +1 -1
- package/dist/{errors-CeCCOKSA.d.mts → errors-w31ybrQM.d.mts} +1 -1
- package/dist/{index-DJQKdV76.d.ts → index-CQ-15-QL.d.ts} +1 -1
- package/dist/{index-DsqWJL3Q.d.mts → index-DvNtxucX.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +10 -10
- package/dist/index.mjs +7 -7
- package/dist/install-integrity.json +123 -116
- 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 +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 +12 -2
- package/dist/plays/run-request.mjs +11 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-JHQKM6QY.js +0 -43
- package/dist/cli/chunk-PHDEQ6W3.js +0 -33
- package/dist/cli/describe-RXYQCJRR.js +0 -49
- package/dist/cli/git-ADIABNMQ.js +0 -25
- package/dist/cli/search-YILJZD36.js +0 -32
- package/dist/cli/skills-I4IUZN3U.js +0 -33
- package/dist/cli/tools-NLZR7ABS.js +0 -56
- package/dist/cli/update-RVDEUJTE.js +0 -33
|
@@ -1,6 +1,6 @@
|
|
|
1
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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEC2CVPN5js = require('./chunk-EC2CVPN5.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ var _chunkDS455RPFjs = require('./chunk-DS455RPF.js');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkS3WQJ5VGjs = require('./chunk-S3WQJ5VG.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -20,13 +20,13 @@ var _chunk5LHU7NUSjs = require('./chunk-5LHU7NUS.js');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkDMNVM34Jjs = require('./chunk-DMNVM34J.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkHKGXGGIVjs = require('./chunk-HKGXGGIV.js');
|
|
30
30
|
|
|
31
31
|
// src/compat.ts
|
|
32
32
|
var _crypto = require('crypto');
|
|
@@ -61,7 +61,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
61
61
|
return value === "1" || value === "true" || value === "yes";
|
|
62
62
|
}
|
|
63
63
|
function sdkCompatibilityCachePath(baseUrl, homeDir = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.HOME, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]) || _os.homedir.call(void 0, )) {
|
|
64
|
-
return _path.join.call(void 0,
|
|
64
|
+
return _path.join.call(void 0, _chunkS3WQJ5VGjs.sdkCliStateDirPath.call(void 0, baseUrl, homeDir), "compat-cache.json");
|
|
65
65
|
}
|
|
66
66
|
function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'access', _11 => _11.env, 'access', _12 => _12.HOME, 'optionalAccess', _13 => _13.trim, 'call', _14 => _14()]) || _os.homedir.call(void 0, )) {
|
|
67
67
|
return _path.join.call(void 0, homeDir, ".cache", "deepline", "sdk-compat-cache.json");
|
|
@@ -69,9 +69,9 @@ function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'acc
|
|
|
69
69
|
function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
70
70
|
return JSON.stringify({
|
|
71
71
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
72
|
-
version:
|
|
73
|
-
apiContract:
|
|
74
|
-
apiMajor:
|
|
72
|
+
version: _chunkDMNVM34Jjs.SDK_VERSION,
|
|
73
|
+
apiContract: _chunkDMNVM34Jjs.SDK_API_CONTRACT,
|
|
74
|
+
apiMajor: _chunkDMNVM34Jjs.SDK_API_MAJOR,
|
|
75
75
|
command: _optionalChain([command, 'optionalAccess', _15 => _15.trim, 'call', _16 => _16()]) || null,
|
|
76
76
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
77
77
|
});
|
|
@@ -79,8 +79,8 @@ function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
|
79
79
|
function legacyCompatibilityCacheKey(baseUrl, command) {
|
|
80
80
|
return JSON.stringify({
|
|
81
81
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
82
|
-
version:
|
|
83
|
-
apiContract:
|
|
82
|
+
version: _chunkDMNVM34Jjs.SDK_VERSION,
|
|
83
|
+
apiContract: _chunkDMNVM34Jjs.SDK_API_CONTRACT,
|
|
84
84
|
command: _optionalChain([command, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]) || null
|
|
85
85
|
});
|
|
86
86
|
}
|
|
@@ -105,7 +105,7 @@ function isSavedWithin(savedAt, windowMs, now) {
|
|
|
105
105
|
}
|
|
106
106
|
var UPDATE_ADVISORY_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
107
107
|
function claimUpdateAdvisory(baseUrl, now = Date.now()) {
|
|
108
|
-
const path = _path.join.call(void 0,
|
|
108
|
+
const path = _path.join.call(void 0, _chunkS3WQJ5VGjs.sdkCliStateDirPath.call(void 0, baseUrl), "update-advisory.json");
|
|
109
109
|
try {
|
|
110
110
|
const { shownAt } = JSON.parse(_fs.readFileSync.call(void 0, path, "utf8"));
|
|
111
111
|
if (isSavedWithin(shownAt, UPDATE_ADVISORY_INTERVAL_MS, now)) return false;
|
|
@@ -183,21 +183,24 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
183
183
|
return { response: null, error: null };
|
|
184
184
|
}
|
|
185
185
|
const controller = new AbortController();
|
|
186
|
+
const abortFromCaller = () => controller.abort(_optionalChain([options, 'access', _27 => _27.signal, 'optionalAccess', _28 => _28.reason]));
|
|
187
|
+
if (_optionalChain([options, 'access', _29 => _29.signal, 'optionalAccess', _30 => _30.aborted])) abortFromCaller();
|
|
188
|
+
else _optionalChain([options, 'access', _31 => _31.signal, 'optionalAccess', _32 => _32.addEventListener, 'call', _33 => _33("abort", abortFromCaller, { once: true })]);
|
|
186
189
|
const timeout = setTimeout(
|
|
187
190
|
() => controller.abort(),
|
|
188
191
|
_nullishCoalesce(options.timeoutMs, () => ( CHECK_TIMEOUT_MS))
|
|
189
192
|
);
|
|
190
193
|
try {
|
|
191
194
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
192
|
-
url.searchParams.set("version",
|
|
193
|
-
if (_optionalChain([options, 'access',
|
|
195
|
+
url.searchParams.set("version", _chunkDMNVM34Jjs.SDK_VERSION);
|
|
196
|
+
if (_optionalChain([options, 'access', _34 => _34.command, 'optionalAccess', _35 => _35.trim, 'call', _36 => _36()])) {
|
|
194
197
|
url.searchParams.set("command", options.command.trim());
|
|
195
198
|
}
|
|
196
199
|
if (options.skillsVersion !== void 0) {
|
|
197
200
|
url.searchParams.set("skills_version", _nullishCoalesce(options.skillsVersion, () => ( "")));
|
|
198
201
|
url.searchParams.set(
|
|
199
202
|
"skills_cli_capability",
|
|
200
|
-
String(
|
|
203
|
+
String(_chunkHKGXGGIVjs.SDK_RELEASE.packageCapabilities.skillsGuidance)
|
|
201
204
|
);
|
|
202
205
|
}
|
|
203
206
|
if (options.catalog) {
|
|
@@ -209,19 +212,20 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
209
212
|
const response = await fetch(url, {
|
|
210
213
|
method: "GET",
|
|
211
214
|
headers: {
|
|
212
|
-
...
|
|
213
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
214
|
-
"X-Deepline-SDK-Version":
|
|
215
|
-
"X-Deepline-API-Major": String(
|
|
216
|
-
"X-Deepline-API-Contract":
|
|
215
|
+
..._chunkDMNVM34Jjs.deploymentProtectionHeaders.call(void 0, ),
|
|
216
|
+
"User-Agent": `deepline-ts-sdk/${_chunkDMNVM34Jjs.SDK_VERSION}`,
|
|
217
|
+
"X-Deepline-SDK-Version": _chunkDMNVM34Jjs.SDK_VERSION,
|
|
218
|
+
"X-Deepline-API-Major": String(_chunkDMNVM34Jjs.SDK_API_MAJOR),
|
|
219
|
+
"X-Deepline-API-Contract": _chunkDMNVM34Jjs.SDK_API_CONTRACT,
|
|
217
220
|
"X-Deepline-CLI-Update-Preferences": "1",
|
|
218
221
|
"X-Deepline-CLI-Auto-Update-Capability": SDK_CLI_AUTO_UPDATE_CAPABILITY,
|
|
219
|
-
...options.catalog ? { Authorization: `Bearer ${
|
|
220
|
-
..._optionalChain([options, 'access',
|
|
222
|
+
...options.catalog ? { Authorization: `Bearer ${_chunkS3WQJ5VGjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl)}` } : {},
|
|
223
|
+
..._optionalChain([options, 'access', _37 => _37.catalog, 'optionalAccess', _38 => _38.cliInvocationId]) ? { "X-Deepline-CLI-Invocation-ID": options.catalog.cliInvocationId } : {}
|
|
221
224
|
},
|
|
222
225
|
signal: controller.signal
|
|
223
226
|
});
|
|
224
227
|
const raw = await response.json().catch(() => null);
|
|
228
|
+
_optionalChain([options, 'access', _39 => _39.signal, 'optionalAccess', _40 => _40.throwIfAborted, 'call', _41 => _41()]);
|
|
225
229
|
if (!raw || typeof raw.ok !== "boolean" || typeof raw.status !== "string") {
|
|
226
230
|
throw new Error(
|
|
227
231
|
`SDK compatibility endpoint returned a non-policy response (HTTP ${response.status}).`
|
|
@@ -241,6 +245,12 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
241
245
|
}
|
|
242
246
|
return { response: data, error: null };
|
|
243
247
|
} catch (error) {
|
|
248
|
+
if (_optionalChain([options, 'access', _42 => _42.signal, 'optionalAccess', _43 => _43.aborted])) {
|
|
249
|
+
return {
|
|
250
|
+
response: null,
|
|
251
|
+
error: error instanceof Error ? error : new Error(String(error))
|
|
252
|
+
};
|
|
253
|
+
}
|
|
244
254
|
const cached = readCachedCompatibility(
|
|
245
255
|
baseUrl,
|
|
246
256
|
options.command,
|
|
@@ -262,11 +272,12 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
262
272
|
};
|
|
263
273
|
} finally {
|
|
264
274
|
clearTimeout(timeout);
|
|
275
|
+
_optionalChain([options, 'access', _44 => _44.signal, 'optionalAccess', _45 => _45.removeEventListener, 'call', _46 => _46("abort", abortFromCaller)]);
|
|
265
276
|
}
|
|
266
277
|
}
|
|
267
278
|
function isCiEnvironment() {
|
|
268
279
|
return ["CI", "GITHUB_ACTIONS"].some((name) => {
|
|
269
|
-
const value = _optionalChain([process, 'access',
|
|
280
|
+
const value = _optionalChain([process, 'access', _47 => _47.env, 'access', _48 => _48[name], 'optionalAccess', _49 => _49.trim, 'call', _50 => _50(), 'access', _51 => _51.toLowerCase, 'call', _52 => _52()]);
|
|
270
281
|
return value === "1" || value === "true" || value === "yes";
|
|
271
282
|
});
|
|
272
283
|
}
|
|
@@ -377,7 +388,7 @@ function skillsSourceUrl(baseUrl) {
|
|
|
377
388
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
378
389
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
379
390
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
380
|
-
const agents = _nullishCoalesce(options.agents, () => (
|
|
391
|
+
const agents = _nullishCoalesce(options.agents, () => ( _chunkS3WQJ5VGjs.DEFAULT_SKILL_AGENTS));
|
|
381
392
|
const values = {
|
|
382
393
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
383
394
|
skills_source_url: skillsSourceUrl(baseUrl),
|
|
@@ -482,7 +493,7 @@ function isFailureReportingDisabled() {
|
|
|
482
493
|
return truthyEnv(FAILURE_REPORT_DISABLE_ENV);
|
|
483
494
|
}
|
|
484
495
|
function redactFailureText(value, maxChars = MAX_FAILURE_TEXT_CHARS) {
|
|
485
|
-
const home = _optionalChain([process, 'access',
|
|
496
|
+
const home = _optionalChain([process, 'access', _53 => _53.env, 'access', _54 => _54.HOME, 'optionalAccess', _55 => _55.trim, 'call', _56 => _56()]);
|
|
486
497
|
let text = String(_nullishCoalesce(value, () => ( "")));
|
|
487
498
|
if (!text) return "";
|
|
488
499
|
if (home && home !== "/") {
|
|
@@ -596,39 +607,39 @@ function buildEnvironmentContext() {
|
|
|
596
607
|
node_version: process.version,
|
|
597
608
|
runtime: "Node.js",
|
|
598
609
|
hostname: _os.hostname.call(void 0, ),
|
|
599
|
-
agent_runtime:
|
|
610
|
+
agent_runtime: _chunkDMNVM34Jjs.detectAgentRuntime.call(void 0, )
|
|
600
611
|
};
|
|
601
612
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
602
|
-
const normalized = _optionalChain([process, 'access',
|
|
613
|
+
const normalized = _optionalChain([process, 'access', _57 => _57.env, 'access', _58 => _58[key], 'optionalAccess', _59 => _59.trim, 'call', _60 => _60()]);
|
|
603
614
|
if (normalized) context[key.toLowerCase()] = normalized;
|
|
604
615
|
}
|
|
605
|
-
if (_optionalChain([process, 'access',
|
|
616
|
+
if (_optionalChain([process, 'access', _61 => _61.env, 'access', _62 => _62.CLAUDE_PROJECT_DIR, 'optionalAccess', _63 => _63.trim, 'call', _64 => _64()])) {
|
|
606
617
|
context.claude_project_dir_present = "true";
|
|
607
618
|
}
|
|
608
|
-
if (_optionalChain([process, 'access',
|
|
619
|
+
if (_optionalChain([process, 'access', _65 => _65.env, 'access', _66 => _66.DEEPLINE_PLUGIN_ROOT, 'optionalAccess', _67 => _67.trim, 'call', _68 => _68()])) {
|
|
609
620
|
context.deepline_plugin_root_present = "true";
|
|
610
621
|
}
|
|
611
|
-
if (_optionalChain([process, 'access',
|
|
622
|
+
if (_optionalChain([process, 'access', _69 => _69.env, 'access', _70 => _70.DEEPLINE_PLUGIN_SKILLS_DIR, 'optionalAccess', _71 => _71.trim, 'call', _72 => _72()])) {
|
|
612
623
|
context.deepline_plugin_skills_dir_present = "true";
|
|
613
624
|
}
|
|
614
|
-
if (_optionalChain([process, 'access',
|
|
625
|
+
if (_optionalChain([process, 'access', _73 => _73.env, 'access', _74 => _74.HOME, 'optionalAccess', _75 => _75.trim, 'call', _76 => _76(), 'access', _77 => _77.startsWith, 'call', _78 => _78("/sessions/")])) {
|
|
615
626
|
context.home_scope = "sessions";
|
|
616
627
|
}
|
|
617
628
|
return context;
|
|
618
629
|
}
|
|
619
630
|
function failureReportHeaders(apiKey) {
|
|
620
|
-
const agentSessionId =
|
|
631
|
+
const agentSessionId = _chunkDMNVM34Jjs.agentSessionIdFromEnvironment.call(void 0, );
|
|
621
632
|
return {
|
|
622
|
-
...
|
|
633
|
+
..._chunkDMNVM34Jjs.deploymentProtectionHeaders.call(void 0, ),
|
|
623
634
|
...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {},
|
|
624
635
|
Authorization: `Bearer ${apiKey}`,
|
|
625
636
|
"Content-Type": "application/json",
|
|
626
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
637
|
+
"User-Agent": `deepline-ts-sdk/${_chunkDMNVM34Jjs.SDK_VERSION}`,
|
|
627
638
|
"X-Deepline-Client-Family": "sdk",
|
|
628
639
|
"X-Deepline-CLI-Family": "sdk",
|
|
629
|
-
"X-Deepline-Agent-Runtime":
|
|
630
|
-
"X-Deepline-CLI-Version":
|
|
631
|
-
"X-Deepline-SDK-Version":
|
|
640
|
+
"X-Deepline-Agent-Runtime": _chunkDMNVM34Jjs.detectAgentRuntime.call(void 0, ),
|
|
641
|
+
"X-Deepline-CLI-Version": _chunkDMNVM34Jjs.SDK_VERSION,
|
|
642
|
+
"X-Deepline-SDK-Version": _chunkDMNVM34Jjs.SDK_VERSION
|
|
632
643
|
};
|
|
633
644
|
}
|
|
634
645
|
async function postFailureReport(input) {
|
|
@@ -656,7 +667,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
656
667
|
if (isFailureReportingDisabled()) return false;
|
|
657
668
|
let apiKey = "";
|
|
658
669
|
try {
|
|
659
|
-
apiKey =
|
|
670
|
+
apiKey = _chunkS3WQJ5VGjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
660
671
|
} catch (e9) {
|
|
661
672
|
return false;
|
|
662
673
|
}
|
|
@@ -683,7 +694,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
683
694
|
failure_code: failureCode2,
|
|
684
695
|
failure_stage: failureStage,
|
|
685
696
|
error_body: "Automatic Deepline skills installation failed.",
|
|
686
|
-
cli_version:
|
|
697
|
+
cli_version: _chunkDMNVM34Jjs.SDK_VERSION,
|
|
687
698
|
context: {
|
|
688
699
|
environment: buildEnvironmentContext(),
|
|
689
700
|
skills_sync: {
|
|
@@ -748,7 +759,7 @@ function resolvedFailureKind(input) {
|
|
|
748
759
|
}
|
|
749
760
|
function safeRequestDiagnostics(error) {
|
|
750
761
|
if (!(error instanceof _chunkDIAWYWT5js.DeeplineError)) return null;
|
|
751
|
-
const request = _optionalChain([error, 'access',
|
|
762
|
+
const request = _optionalChain([error, 'access', _79 => _79.details, 'optionalAccess', _80 => _80.request]);
|
|
752
763
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
753
764
|
return null;
|
|
754
765
|
const value = request;
|
|
@@ -803,7 +814,7 @@ function buildFailureReport(input) {
|
|
|
803
814
|
failure_kind: failureKind,
|
|
804
815
|
failure_code: code,
|
|
805
816
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
806
|
-
cli_version:
|
|
817
|
+
cli_version: _chunkDMNVM34Jjs.SDK_VERSION,
|
|
807
818
|
context: {
|
|
808
819
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
809
820
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -823,8 +834,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
823
834
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
824
835
|
const exitCode = resolvedExitCode(input);
|
|
825
836
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
826
|
-
const baseUrl =
|
|
827
|
-
const apiKey =
|
|
837
|
+
const baseUrl = _chunkS3WQJ5VGjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
838
|
+
const apiKey = _chunkS3WQJ5VGjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
828
839
|
if (!apiKey) return false;
|
|
829
840
|
return postFailureReport({
|
|
830
841
|
baseUrl,
|
|
@@ -861,25 +872,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
861
872
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
862
873
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
863
874
|
function shouldSkipSkillsSync() {
|
|
864
|
-
if (
|
|
875
|
+
if (_chunkDMNVM34Jjs.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
865
876
|
return true;
|
|
866
877
|
}
|
|
867
|
-
const value = _optionalChain([process, 'access',
|
|
878
|
+
const value = _optionalChain([process, 'access', _81 => _81.env, 'access', _82 => _82.DEEPLINE_SKIP_SKILLS_SYNC, 'optionalAccess', _83 => _83.trim, 'call', _84 => _84(), 'access', _85 => _85.toLowerCase, 'call', _86 => _86()]);
|
|
868
879
|
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
869
880
|
}
|
|
870
881
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
871
|
-
return _path.join.call(void 0,
|
|
882
|
+
return _path.join.call(void 0, _chunkS3WQJ5VGjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
872
883
|
}
|
|
873
884
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
874
885
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
875
|
-
var agentLeaseSegment =
|
|
886
|
+
var agentLeaseSegment = _chunkS3WQJ5VGjs.skillsAgentPathSegment;
|
|
876
887
|
function sortedLeaseAgents(agents) {
|
|
877
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
888
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkS3WQJ5VGjs.KNOWN_SKILL_AGENTS] : agents;
|
|
878
889
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
879
890
|
}
|
|
880
891
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
881
892
|
return _path.join.call(void 0,
|
|
882
|
-
|
|
893
|
+
_chunkS3WQJ5VGjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
883
894
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
884
895
|
);
|
|
885
896
|
}
|
|
@@ -1038,7 +1049,7 @@ var SkillsStateUnavailableError = class extends Error {
|
|
|
1038
1049
|
constructor(baseUrl, error) {
|
|
1039
1050
|
const detail = error instanceof Error ? error.message : String(error);
|
|
1040
1051
|
super(
|
|
1041
|
-
`Could not save skills state in ${
|
|
1052
|
+
`Could not save skills state in ${_chunkS3WQJ5VGjs.sdkCliStateDirPath.call(void 0, baseUrl)}: ${detail}`
|
|
1042
1053
|
);
|
|
1043
1054
|
this.name = "SkillsStateUnavailableError";
|
|
1044
1055
|
}
|
|
@@ -1113,7 +1124,7 @@ async function acquireSkillsInstallLease(baseUrl, agents, version, options = {
|
|
|
1113
1124
|
if (Date.now() >= deadline) return null;
|
|
1114
1125
|
if (!waited) {
|
|
1115
1126
|
waited = true;
|
|
1116
|
-
_optionalChain([options, 'access',
|
|
1127
|
+
_optionalChain([options, 'access', _87 => _87.onWait, 'optionalCall', _88 => _88()]);
|
|
1117
1128
|
}
|
|
1118
1129
|
await new Promise((resolve) => setTimeout(resolve, pollMs));
|
|
1119
1130
|
}
|
|
@@ -1123,7 +1134,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
1123
1134
|
}
|
|
1124
1135
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
1125
1136
|
return _path.join.call(void 0,
|
|
1126
|
-
|
|
1137
|
+
_chunkS3WQJ5VGjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1127
1138
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
1128
1139
|
);
|
|
1129
1140
|
}
|
|
@@ -1157,8 +1168,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
1157
1168
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
1158
1169
|
}
|
|
1159
1170
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
1160
|
-
if (shouldSkipSkillsSync() ||
|
|
1161
|
-
const agents =
|
|
1171
|
+
if (shouldSkipSkillsSync() || _chunkS3WQJ5VGjs.hasActivePluginSkills.call(void 0, )) return;
|
|
1172
|
+
const agents = _chunkS3WQJ5VGjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1162
1173
|
if (agents.length === 0) return;
|
|
1163
1174
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1164
1175
|
}
|
|
@@ -1169,12 +1180,12 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError) {
|
|
|
1169
1180
|
stdio: "ignore",
|
|
1170
1181
|
env: process.env
|
|
1171
1182
|
});
|
|
1172
|
-
child.on("error", () => _optionalChain([onSpawnError, 'optionalCall',
|
|
1183
|
+
child.on("error", () => _optionalChain([onSpawnError, 'optionalCall', _89 => _89()]));
|
|
1173
1184
|
child.unref();
|
|
1174
1185
|
}
|
|
1175
1186
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
1176
1187
|
return _path.join.call(void 0,
|
|
1177
|
-
|
|
1188
|
+
_chunkS3WQJ5VGjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1178
1189
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
1179
1190
|
);
|
|
1180
1191
|
}
|
|
@@ -1203,8 +1214,8 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
1203
1214
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
1204
1215
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
1205
1216
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
1206
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess',
|
|
1207
|
-
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess',
|
|
1217
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _90 => _90.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunkS3WQJ5VGjs.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
1218
|
+
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess', _91 => _91.bunx]) === "missing" && probes.npx === "missing" ? "neither `bunx` nor `npx` was found on PATH. Make one available." : `installer version check failed for ${Object.entries(_nullishCoalesce(probes, () => ( {}))).filter(([, result]) => result === "failed").map(([command]) => `\`${command}\``).join(" and ")}. Check those commands with --version.`;
|
|
1208
1219
|
notice(
|
|
1209
1220
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
1210
1221
|
${manualCommand}`
|
|
@@ -1280,7 +1291,7 @@ async function fetchV1SkillIndex(baseUrl) {
|
|
|
1280
1291
|
}
|
|
1281
1292
|
}
|
|
1282
1293
|
function v1SkillNames(index) {
|
|
1283
|
-
const skills = Array.isArray(_optionalChain([index, 'optionalAccess',
|
|
1294
|
+
const skills = Array.isArray(_optionalChain([index, 'optionalAccess', _92 => _92.skills])) ? index.skills : [];
|
|
1284
1295
|
return sortedUniqueSkillNames(
|
|
1285
1296
|
skills.filter((skill) => skill && skill.install_surface === "v1").map((skill) => skill.name).filter(
|
|
1286
1297
|
(name) => typeof name === "string" && name.length > 0
|
|
@@ -1291,7 +1302,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
1291
1302
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
1292
1303
|
}
|
|
1293
1304
|
function isDefaultAgentSet(agents) {
|
|
1294
|
-
return agents.length ===
|
|
1305
|
+
return agents.length === _chunkS3WQJ5VGjs.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkS3WQJ5VGjs.DEFAULT_SKILL_AGENTS[index]);
|
|
1295
1306
|
}
|
|
1296
1307
|
function safeSkillFilePath(value) {
|
|
1297
1308
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -1351,7 +1362,7 @@ function publishedArchiveFiles(bytes, expectedFiles, name) {
|
|
|
1351
1362
|
var PublishedSkillsVerificationError = class extends Error {
|
|
1352
1363
|
};
|
|
1353
1364
|
async function verifyDefaultAgentSkillsInstall(baseUrl, remoteVersion, skillNames, index) {
|
|
1354
|
-
if (_optionalChain([index, 'optionalAccess',
|
|
1365
|
+
if (_optionalChain([index, 'optionalAccess', _93 => _93.version]) !== remoteVersion) {
|
|
1355
1366
|
throw new PublishedSkillsVerificationError(
|
|
1356
1367
|
"the published skill index version does not match the server version"
|
|
1357
1368
|
);
|
|
@@ -1367,7 +1378,7 @@ async function verifyDefaultAgentSkillsInstall(baseUrl, remoteVersion, skillName
|
|
|
1367
1378
|
const entry = entries.find(
|
|
1368
1379
|
(skill) => skill && skill.name === name && skill.install_surface === "v1"
|
|
1369
1380
|
);
|
|
1370
|
-
if (!Array.isArray(_optionalChain([entry, 'optionalAccess',
|
|
1381
|
+
if (!Array.isArray(_optionalChain([entry, 'optionalAccess', _94 => _94.files])) || !entry.files.length || !entry.files.every(safeSkillFilePath) || new Set(entry.files).size !== entry.files.length || !entry.files.includes("SKILL.md") || entry.type !== "archive" || entry.url !== `./archives/${name}.tar.gz` || typeof entry.digest !== "string" || !/^sha256:[a-f0-9]{64}$/.test(entry.digest)) {
|
|
1371
1382
|
throw new PublishedSkillsVerificationError(
|
|
1372
1383
|
`invalid published file list for ${name}`
|
|
1373
1384
|
);
|
|
@@ -1421,7 +1432,7 @@ async function verifyDefaultAgentSkillsInstall(baseUrl, remoteVersion, skillName
|
|
|
1421
1432
|
controller.abort();
|
|
1422
1433
|
}
|
|
1423
1434
|
const home = _os.homedir.call(void 0, );
|
|
1424
|
-
const claudeConfigDir = _optionalChain([process, 'access',
|
|
1435
|
+
const claudeConfigDir = _optionalChain([process, 'access', _95 => _95.env, 'access', _96 => _96.CLAUDE_CONFIG_DIR, 'optionalAccess', _97 => _97.trim, 'call', _98 => _98()]) || _path.join.call(void 0, home, ".claude");
|
|
1425
1436
|
for (const [name, { files }] of published) {
|
|
1426
1437
|
for (const root of [
|
|
1427
1438
|
_path.join.call(void 0, home, ".agents", "skills", name),
|
|
@@ -1448,21 +1459,21 @@ async function fetchSkillsUpdate(baseUrl, localVersion) {
|
|
|
1448
1459
|
method: "POST",
|
|
1449
1460
|
headers: { "Content-Type": "application/json" },
|
|
1450
1461
|
body: JSON.stringify({
|
|
1451
|
-
sdk_cli: { version:
|
|
1462
|
+
sdk_cli: { version: _chunkDMNVM34Jjs.SDK_VERSION },
|
|
1452
1463
|
skills: {
|
|
1453
1464
|
version: localVersion,
|
|
1454
|
-
capability:
|
|
1465
|
+
capability: _chunkHKGXGGIVjs.SDK_RELEASE.packageCapabilities.skillsGuidance
|
|
1455
1466
|
}
|
|
1456
1467
|
}),
|
|
1457
1468
|
signal: controller.signal
|
|
1458
1469
|
});
|
|
1459
1470
|
if (!response.ok) return null;
|
|
1460
1471
|
const data = await response.json().catch(() => null);
|
|
1461
|
-
const skills = _optionalChain([data, 'optionalAccess',
|
|
1472
|
+
const skills = _optionalChain([data, 'optionalAccess', _99 => _99.skills]);
|
|
1462
1473
|
if (!skills) return null;
|
|
1463
1474
|
return {
|
|
1464
1475
|
needsUpdate: skills.needs_update === true,
|
|
1465
|
-
remoteVersion: typeof _optionalChain([skills, 'access',
|
|
1476
|
+
remoteVersion: typeof _optionalChain([skills, 'access', _100 => _100.remote, 'optionalAccess', _101 => _101.version]) === "string" ? skills.remote.version.trim() : ""
|
|
1466
1477
|
};
|
|
1467
1478
|
} catch (e24) {
|
|
1468
1479
|
return null;
|
|
@@ -1490,7 +1501,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1490
1501
|
}
|
|
1491
1502
|
function noInstallerProbePath(baseUrl) {
|
|
1492
1503
|
return _path.join.call(void 0,
|
|
1493
|
-
|
|
1504
|
+
_chunkS3WQJ5VGjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1494
1505
|
"skills-sync-no-installer-unknown.json"
|
|
1495
1506
|
);
|
|
1496
1507
|
}
|
|
@@ -1498,7 +1509,7 @@ function cachedUnavailableInstallerProbes(baseUrl, remoteVersion, allowBoundedFa
|
|
|
1498
1509
|
const path = noInstallerProbePath(baseUrl);
|
|
1499
1510
|
try {
|
|
1500
1511
|
const cached = JSON.parse(_fs.readFileSync.call(void 0, path, "utf-8"));
|
|
1501
|
-
if (typeof cached.version === "string" && (!remoteVersion || cached.version === remoteVersion) && typeof cached.checkedAt === "number" && cached.checkedAt <= Date.now() && Date.now() - cached.checkedAt < NEGATIVE_INSTALLER_PROBE_TTL_MS && (_optionalChain([cached, 'access',
|
|
1512
|
+
if (typeof cached.version === "string" && (!remoteVersion || cached.version === remoteVersion) && typeof cached.checkedAt === "number" && cached.checkedAt <= Date.now() && Date.now() - cached.checkedAt < NEGATIVE_INSTALLER_PROBE_TTL_MS && (_optionalChain([cached, 'access', _102 => _102.probes, 'optionalAccess', _103 => _103.bunx]) === "missing" || _optionalChain([cached, 'access', _104 => _104.probes, 'optionalAccess', _105 => _105.bunx]) === "failed") && (_optionalChain([cached, 'access', _106 => _106.probes, 'optionalAccess', _107 => _107.npx]) === "missing" || _optionalChain([cached, 'access', _108 => _108.probes, 'optionalAccess', _109 => _109.npx]) === "failed") && // A terminal timeout is not evidence that the unbounded child probe
|
|
1502
1513
|
// will fail. Older caches without probe provenance are ambiguous too.
|
|
1503
1514
|
(allowBoundedFailures || cached.probeTimeoutMs === null || cached.probes.bunx === "missing" && cached.probes.npx === "missing")) {
|
|
1504
1515
|
return cached.probes;
|
|
@@ -1552,7 +1563,7 @@ function probeCommand(command, timeoutMs) {
|
|
|
1552
1563
|
timeout: timeoutMs
|
|
1553
1564
|
});
|
|
1554
1565
|
if (result.status === 0) return "available";
|
|
1555
|
-
return _optionalChain([result, 'access',
|
|
1566
|
+
return _optionalChain([result, 'access', _110 => _110.error, 'optionalAccess', _111 => _111.code]) === "ENOENT" ? "missing" : "failed";
|
|
1556
1567
|
}
|
|
1557
1568
|
function hasCommand(command) {
|
|
1558
1569
|
return probeCommand(command) === "available";
|
|
@@ -1569,7 +1580,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1569
1580
|
function resolveSkillsInstallSpawn(install, platform2 = process.platform) {
|
|
1570
1581
|
return resolveShellSpawn(install.command, install.args, platform2);
|
|
1571
1582
|
}
|
|
1572
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1583
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunkS3WQJ5VGjs.DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1573
1584
|
const commands = [];
|
|
1574
1585
|
const probes = _nullishCoalesce(knownProbes, () => ( probeInstallers()));
|
|
1575
1586
|
if (probes.bunx === "available") {
|
|
@@ -1711,7 +1722,7 @@ function runLegacySkillsCleanup(agents) {
|
|
|
1711
1722
|
}
|
|
1712
1723
|
}
|
|
1713
1724
|
function writeSdkSkillsStatusLine(line) {
|
|
1714
|
-
const progress =
|
|
1725
|
+
const progress = _chunkEC2CVPN5js.getActiveCliProgress.call(void 0, );
|
|
1715
1726
|
if (progress) {
|
|
1716
1727
|
progress.writeLine(line);
|
|
1717
1728
|
return;
|
|
@@ -1721,11 +1732,11 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1721
1732
|
}
|
|
1722
1733
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1723
1734
|
if (shouldSkipSkillsSync()) return;
|
|
1724
|
-
const usingPluginSkills =
|
|
1735
|
+
const usingPluginSkills = _chunkS3WQJ5VGjs.hasActivePluginSkills.call(void 0, );
|
|
1725
1736
|
if (usingPluginSkills) {
|
|
1726
1737
|
return;
|
|
1727
1738
|
}
|
|
1728
|
-
const agents =
|
|
1739
|
+
const agents = _chunkS3WQJ5VGjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1729
1740
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1730
1741
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1731
1742
|
}
|
|
@@ -1753,12 +1764,12 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1753
1764
|
return;
|
|
1754
1765
|
}
|
|
1755
1766
|
try {
|
|
1756
|
-
const localVersion =
|
|
1767
|
+
const localVersion = _chunkS3WQJ5VGjs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1757
1768
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1758
1769
|
needsUpdate: options.update.needs_update,
|
|
1759
1770
|
remoteVersion: options.update.remote.version
|
|
1760
1771
|
} : null;
|
|
1761
|
-
if (!_optionalChain([update, 'optionalAccess',
|
|
1772
|
+
if (!_optionalChain([update, 'optionalAccess', _112 => _112.needsUpdate]) || !update.remoteVersion) {
|
|
1762
1773
|
return;
|
|
1763
1774
|
}
|
|
1764
1775
|
if (agents.length > 0 && hasFailedSkillsSync(baseUrl, update.remoteVersion, agents)) {
|
|
@@ -1919,7 +1930,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1919
1930
|
}
|
|
1920
1931
|
}
|
|
1921
1932
|
runLegacySkillsCleanup(agents);
|
|
1922
|
-
if (!
|
|
1933
|
+
if (!_chunkS3WQJ5VGjs.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
1923
1934
|
notice(
|
|
1924
1935
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
1925
1936
|
);
|