deepline 0.3.484 → 0.3.486
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/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/ledger-safe-payload.ts +8 -4
- 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 +139 -67
- 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 +206 -7
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +39 -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 +28 -9
- 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 +656 -64
- 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 +25 -33
- 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/cli/auth-ARKH3OAU.js +43 -0
- package/dist/cli/{auth-EBFOTF7X.mjs → auth-B4DJO4FB.mjs} +5 -5
- package/dist/cli/{billing-G2G3EF3I.js → billing-GDWAMARK.js} +80 -80
- package/dist/cli/{billing-2ZOIMW5V.mjs → billing-IIQ3VNXU.mjs} +7 -7
- package/dist/cli/{chunk-YWC5AN26.mjs → chunk-2DVFQYPG.mjs} +62 -34
- package/dist/cli/{chunk-UWOY74RU.js → chunk-5DUP4ZUE.js} +21 -21
- package/dist/cli/{chunk-EACX7QXO.mjs → chunk-5QYZ4MEW.mjs} +2 -2
- package/dist/cli/{chunk-HEI3BWIV.mjs → chunk-5RLVCOKH.mjs} +1 -1
- package/dist/cli/{chunk-TIRSKEZH.mjs → chunk-5Y7LLRWO.mjs} +1 -1
- package/dist/cli/{chunk-IXWQOVNW.js → chunk-5YILTBF7.js} +87 -76
- package/dist/cli/{chunk-OHKKDPA5.js → chunk-7FTQKEZ6.js} +13 -13
- package/dist/cli/{chunk-TN2GW57M.mjs → chunk-A456YVDE.mjs} +1 -1
- package/dist/cli/{chunk-GVAENVIG.js → chunk-AUQQVDAB.js} +110 -21
- package/dist/cli/{chunk-3XQIVEAT.js → chunk-BJL7RYQN.js} +3 -3
- package/dist/cli/{chunk-2AWYJXBX.js → chunk-BNB2RK4L.js} +5 -5
- package/dist/cli/{chunk-U7IJAGWB.js → chunk-BYEDI5PM.js} +7 -7
- package/dist/cli/{chunk-RLLEH2SP.js → chunk-C4GFBB52.js} +26 -26
- package/dist/cli/{chunk-AK7UKQ5R.js → chunk-CSBMKHTV.js} +5 -5
- package/dist/cli/{chunk-UT4YMA2N.js → chunk-DFHS5XVZ.js} +5 -4
- package/dist/cli/{chunk-XZXIWPT3.mjs → chunk-F3G2HAUQ.mjs} +1 -1
- package/dist/cli/{chunk-C62NI2X6.js → chunk-FCAKAW6S.js} +5 -5
- package/dist/cli/{chunk-AF7MOUZP.mjs → chunk-FGPJXQEJ.mjs} +2 -2
- package/dist/cli/chunk-FSCOYTRV.js +42 -0
- package/dist/cli/{chunk-6GRZEYSG.js → chunk-GCEUOHJW.js} +7 -7
- 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-QIDDTIVZ.js → chunk-KPIVQFXZ.js} +322 -294
- package/dist/cli/{chunk-4IOY2SCQ.js → chunk-LOX3BISD.js} +4 -4
- package/dist/cli/{chunk-WYUCDLVR.mjs → chunk-MJ56FCYU.mjs} +2 -1
- package/dist/cli/{chunk-DBJ62RAO.js → chunk-NSPMJLYA.js} +3 -3
- package/dist/cli/{chunk-HNRELVCS.mjs → chunk-ONONSV2Q.mjs} +96 -7
- package/dist/cli/{chunk-PU52JXKA.mjs → chunk-P6KGYOCM.mjs} +13 -4
- package/dist/cli/{chunk-VEVGM6B5.js → chunk-PCYZDTDC.js} +14 -14
- package/dist/cli/{chunk-NW4QJE54.js → chunk-PHWFY26F.js} +2 -2
- package/dist/cli/{chunk-LTZXLYKE.mjs → chunk-PKOFEHZL.mjs} +93 -17
- package/dist/cli/{chunk-7K5CWKKZ.mjs → chunk-PQHDZHZG.mjs} +2 -2
- package/dist/cli/{chunk-UKM74PAA.js → chunk-PTM3QRAT.js} +37 -37
- package/dist/cli/{chunk-YGN77QA5.mjs → chunk-PV7AYBKQ.mjs} +3 -3
- package/dist/cli/{chunk-4OEOM6GP.mjs → chunk-PYDHVRAF.mjs} +5 -5
- package/dist/cli/{chunk-FRD5WFT4.js → chunk-QD22TY33.js} +323 -247
- package/dist/cli/{chunk-5KNRQWHE.js → chunk-QEQ3KHVY.js} +3 -3
- package/dist/cli/{chunk-KGOC6HGI.js → chunk-S5EYODEG.js} +53 -53
- package/dist/cli/{chunk-FQK7BULS.js → chunk-S7OILDJH.js} +1 -1
- package/dist/cli/{chunk-TRLDJNVE.mjs → chunk-T3Q6BMVH.mjs} +1 -1
- package/dist/cli/{chunk-5K5CAND4.mjs → chunk-TBE2K5W4.mjs} +4 -4
- package/dist/cli/{chunk-YHA3EV3I.mjs → chunk-TE2QT2MX.mjs} +15 -4
- package/dist/cli/{chunk-ZOKM7DVA.js → chunk-TNHY3ATN.js} +8 -8
- package/dist/cli/{chunk-4OVHIWE7.mjs → chunk-U23L57VU.mjs} +2 -2
- package/dist/cli/{chunk-5GOG5ZGC.mjs → chunk-UEJLWUJ3.mjs} +2 -2
- package/dist/cli/{chunk-6NPWXE32.mjs → chunk-VJLL5XIP.mjs} +1 -1
- package/dist/cli/{chunk-WXRM3UC6.mjs → chunk-WCOJH4W4.mjs} +3 -3
- package/dist/cli/{chunk-4SFC2XUF.mjs → chunk-XAZWUW6I.mjs} +5 -5
- 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-V7JCMBLU.mjs → chunk-YIKHNZ6B.mjs} +4 -4
- package/dist/cli/{chunk-M4PG7FGC.js → chunk-YS6JOYYS.js} +2 -2
- package/dist/cli/{chunk-DEXSQGXB.mjs → chunk-ZMRZ3BXG.mjs} +5 -5
- package/dist/cli/{chunk-CYWBAV5H.js → chunk-ZQI26KE4.js} +16 -16
- package/dist/cli/{csv-S3CHUKI6.js → csv-3PSMPZM5.js} +13 -13
- package/dist/cli/{csv-NLWVWD3H.mjs → csv-LFCT3WQ4.mjs} +4 -4
- package/dist/cli/{db-OGRPAEEM.mjs → db-HULKVAMU.mjs} +7 -7
- package/dist/cli/{db-WBSKMMOH.js → db-R7I2PPTV.js} +28 -28
- package/dist/cli/{describe-FAD3Z7LN.mjs → describe-D55V42LH.mjs} +21 -21
- package/dist/cli/describe-H47BLOEP.js +49 -0
- 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-LYCL344R.mjs → executions-ICVVOYVG.mjs} +7 -7
- package/dist/cli/{executions-SOAZHCY4.js → executions-O37FN2SK.js} +9 -9
- package/dist/cli/{feedback-AVF6V7SV.mjs → feedback-3K3QPGCQ.mjs} +4 -4
- package/dist/cli/{feedback-OROUPUNJ.js → feedback-MAZQ7C6S.js} +8 -8
- package/dist/cli/{git-J5N5M57H.mjs → git-2MMD5KJS.mjs} +5 -5
- package/dist/cli/git-RQ2XLFYZ.js +25 -0
- package/dist/cli/index.js +142 -139
- package/dist/cli/index.mjs +45 -42
- package/dist/cli/{legacy-noops-QAQMZMEG.js → legacy-noops-2OX2Y3Y2.js} +8 -8
- package/dist/cli/{legacy-noops-ENRRM7BL.mjs → legacy-noops-VLSWJ6VE.mjs} +5 -5
- package/dist/cli/{monitors-CKQ65WRL.mjs → monitors-2NODQQWG.mjs} +8 -8
- package/dist/cli/{monitors-SFMQ5LFR.js → monitors-UCSV5FOR.js} +92 -92
- package/dist/cli/{org-3UNTDLT2.js → org-4YY73VTW.js} +73 -73
- package/dist/cli/{org-K4UIEU5P.mjs → org-W7AUQCDE.mjs} +7 -7
- package/dist/cli/{pages-NKZTGB4C.js → pages-FBZEUMXK.js} +18 -18
- package/dist/cli/{pages-6GPGBIAH.mjs → pages-ZRP7U5PO.mjs} +7 -7
- package/dist/cli/{play-BDEADESI.js → play-LFCTQJXA.js} +858 -632
- package/dist/cli/{play-62BEE7IX.mjs → play-XF2BSGTP.mjs} +372 -146
- package/dist/cli/{providers-SXGP44GH.js → providers-5456JNHP.js} +10 -10
- package/dist/cli/{providers-X3CUWMFP.mjs → providers-SICAPKGI.mjs} +7 -7
- package/dist/cli/{quickstart-XQ4426M4.js → quickstart-2KLLIPIU.js} +6 -6
- package/dist/cli/{quickstart-7LN22BKX.mjs → quickstart-IBVG6GX6.mjs} +4 -4
- package/dist/cli/{run-PBJ4ZJ4W.js → run-DNLDGJRC.js} +41 -41
- package/dist/cli/{run-XXSN3B5A.mjs → run-XPIZIQ7H.mjs} +26 -26
- package/dist/cli/search-2KQA65LH.js +32 -0
- package/dist/cli/{search-M75VMADD.mjs → search-PW22AEAL.mjs} +8 -8
- package/dist/cli/{search-output-F6HCFYEI.js → search-output-H6F6QMRF.js} +22 -16
- package/dist/cli/{search-output-NUQAKWDM.mjs → search-output-JFD53H2N.mjs} +14 -8
- package/dist/cli/{secrets-J2H6V33R.mjs → secrets-542CTZRZ.mjs} +7 -7
- package/dist/cli/{secrets-LRYY4QPE.js → secrets-LCCRRAN7.js} +16 -16
- package/dist/cli/{sessions-YPF62CZE.js → sessions-5FYDQE3N.js} +6 -6
- package/dist/cli/{sessions-IMT336UV.mjs → sessions-CALLS2XD.mjs} +5 -5
- package/dist/cli/{settings-PDWVQIGH.mjs → settings-GSKPHUEC.mjs} +12 -12
- package/dist/cli/{settings-35YYC5WA.js → settings-ORGKOBP6.js} +79 -79
- package/dist/cli/{setup-UR7GOR7H.js → setup-4BUWJKB6.js} +47 -47
- package/dist/cli/{setup-DG5DISSE.mjs → setup-V57GHVAF.mjs} +9 -9
- package/dist/cli/skills-KYZPPGSN.js +33 -0
- package/dist/cli/{skills-U6NJD5J7.mjs → skills-NGLCFQFT.mjs} +7 -7
- package/dist/cli/tools-AFYXUEMD.js +56 -0
- package/dist/cli/{tools-2HGEOELR.mjs → tools-G2YNCFNX.mjs} +19 -19
- package/dist/cli/{update-FRAYBAHK.mjs → update-IZ3Z5T5C.mjs} +9 -9
- package/dist/cli/update-T6JJ7A3K.js +33 -0
- package/dist/cli/{workflow-JKKLOMBX.js → workflow-7AHST2XV.js} +18 -18
- package/dist/cli/{workflow-DDKVTF36.mjs → workflow-L7ROQIM7.mjs} +8 -8
- 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 +117 -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-L5CSV3UO.js +0 -43
- package/dist/cli/chunk-KA2LNIUP.js +0 -33
- package/dist/cli/describe-UIAYCHWW.js +0 -49
- package/dist/cli/git-ATMWC27D.js +0 -25
- package/dist/cli/search-IGHLRLBD.js +0 -32
- package/dist/cli/skills-4U5WC4MJ.js +0 -33
- package/dist/cli/tools-PYJTQVVS.js +0 -56
- package/dist/cli/update-344OTRFM.js +0 -33
package/dist/cli/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } 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; }
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkFSCOYTRVjs = require('./chunk-FSCOYTRV.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -10,17 +10,17 @@ var _chunkKA2LNIUPjs = require('./chunk-KA2LNIUP.js');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunk5DUP4ZUEjs = require('./chunk-5DUP4ZUE.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
21
|
-
require('./chunk-
|
|
22
|
-
require('./chunk-
|
|
23
|
-
require('./chunk-
|
|
20
|
+
var _chunkPHWFY26Fjs = require('./chunk-PHWFY26F.js');
|
|
21
|
+
require('./chunk-ZQI26KE4.js');
|
|
22
|
+
require('./chunk-YS6JOYYS.js');
|
|
23
|
+
require('./chunk-PTM3QRAT.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -38,10 +38,10 @@ require('./chunk-UKM74PAA.js');
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _chunk5YILTBF7js = require('./chunk-5YILTBF7.js');
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _chunkQEQ3KHVYjs = require('./chunk-QEQ3KHVY.js');
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
@@ -59,7 +59,7 @@ var _chunkOKAZHDYNjs = require('./chunk-OKAZHDYN.js');
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunkBYEDI5PMjs = require('./chunk-BYEDI5PM.js');
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
@@ -67,18 +67,18 @@ var _chunkU7IJAGWBjs = require('./chunk-U7IJAGWB.js');
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
var
|
|
70
|
+
var _chunkBJL7RYQNjs = require('./chunk-BJL7RYQN.js');
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
var
|
|
75
|
+
var _chunkDFHS5XVZjs = require('./chunk-DFHS5XVZ.js');
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
|
|
79
79
|
require('./chunk-XNYIZMNQ.js');
|
|
80
80
|
require('./chunk-DIAWYWT5.js');
|
|
81
|
-
require('./chunk-
|
|
81
|
+
require('./chunk-S7OILDJH.js');
|
|
82
82
|
require('./chunk-OG64RBAC.js');
|
|
83
83
|
require('./chunk-COGTRVWW.js');
|
|
84
84
|
|
|
@@ -158,56 +158,56 @@ var _os = require('os');
|
|
|
158
158
|
var COMMAND_GROUPS = [
|
|
159
159
|
{
|
|
160
160
|
names: ["auth"],
|
|
161
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-
|
|
161
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-ARKH3OAU.js")))).registerAuthCommands
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
names: ["providers"],
|
|
165
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./providers-
|
|
165
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./providers-5456JNHP.js")))).registerProviderCommands
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
names: ["search"],
|
|
169
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./search-
|
|
169
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./search-2KQA65LH.js")))).registerSearchCommand
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
172
|
names: ["describe"],
|
|
173
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
173
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-H47BLOEP.js")))).registerDescribeCommand
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
names: ["run"],
|
|
177
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./run-
|
|
177
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./run-DNLDGJRC.js")))).registerRunCommand
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
180
|
names: ["tools"],
|
|
181
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-
|
|
181
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-AFYXUEMD.js")))).registerToolsCommands
|
|
182
182
|
},
|
|
183
183
|
{
|
|
184
184
|
names: ["executions"],
|
|
185
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./executions-
|
|
185
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./executions-O37FN2SK.js")))).registerExecutionsCommands
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
names: ["plays", "runs"],
|
|
189
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./play-
|
|
189
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./play-LFCTQJXA.js")))).registerPlayCommands
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
192
|
names: ["sessions"],
|
|
193
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./sessions-
|
|
193
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./sessions-5FYDQE3N.js")))).registerSessionsCommands
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
196
|
names: ["workflows"],
|
|
197
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-
|
|
197
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-7AHST2XV.js")))).registerWorkflowCommands
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
names: ["pages"],
|
|
201
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./pages-
|
|
201
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./pages-FBZEUMXK.js")))).registerPagesCommands
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
names: ["secrets"],
|
|
205
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./secrets-
|
|
205
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./secrets-LCCRRAN7.js")))).registerSecretsCommands
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
names: ["settings", "notifications"],
|
|
209
209
|
load: async () => {
|
|
210
|
-
const commands = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-
|
|
210
|
+
const commands = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-ORGKOBP6.js")));
|
|
211
211
|
return (p) => {
|
|
212
212
|
commands.registerSettingsCommands(p);
|
|
213
213
|
commands.registerNotificationCommands(p);
|
|
@@ -216,51 +216,51 @@ var COMMAND_GROUPS = [
|
|
|
216
216
|
},
|
|
217
217
|
{
|
|
218
218
|
names: ["billing"],
|
|
219
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./billing-
|
|
219
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./billing-GDWAMARK.js")))).registerBillingCommands
|
|
220
220
|
},
|
|
221
221
|
{
|
|
222
222
|
names: ["monitors"],
|
|
223
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./monitors-
|
|
223
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./monitors-UCSV5FOR.js")))).registerMonitorsCommands
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
226
|
names: ["org"],
|
|
227
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./org-
|
|
227
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./org-4YY73VTW.js")))).registerOrgCommands
|
|
228
228
|
},
|
|
229
229
|
{
|
|
230
230
|
names: ["git", "projects", "deployments"],
|
|
231
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./git-
|
|
231
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./git-RQ2XLFYZ.js")))).registerGitCommands
|
|
232
232
|
},
|
|
233
233
|
{
|
|
234
234
|
names: ["csv"],
|
|
235
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./csv-
|
|
235
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./csv-3PSMPZM5.js")))).registerCsvCommands
|
|
236
236
|
},
|
|
237
237
|
{
|
|
238
238
|
names: ["db"],
|
|
239
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./db-
|
|
239
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./db-R7I2PPTV.js")))).registerDbCommands
|
|
240
240
|
},
|
|
241
241
|
{
|
|
242
242
|
names: ["feedback"],
|
|
243
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./feedback-
|
|
243
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./feedback-MAZQ7C6S.js")))).registerFeedbackCommands
|
|
244
244
|
},
|
|
245
245
|
{
|
|
246
246
|
names: ["enrich", "session", "backend"],
|
|
247
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./legacy-noops-
|
|
247
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./legacy-noops-2OX2Y3Y2.js")))).registerDeprecatedCommands
|
|
248
248
|
},
|
|
249
249
|
{
|
|
250
250
|
names: ["update"],
|
|
251
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./update-
|
|
251
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./update-T6JJ7A3K.js")))).registerUpdateCommand
|
|
252
252
|
},
|
|
253
253
|
{
|
|
254
254
|
names: ["skills", "skills-auto-sync"],
|
|
255
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./skills-
|
|
255
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./skills-KYZPPGSN.js")))).registerSkillsCommand
|
|
256
256
|
},
|
|
257
257
|
{
|
|
258
258
|
names: ["setup", "doctor"],
|
|
259
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./setup-
|
|
259
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./setup-4BUWJKB6.js")))).registerSetupCommands
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
262
|
names: ["quickstart"],
|
|
263
|
-
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./quickstart-
|
|
263
|
+
load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./quickstart-2KLLIPIU.js")))).registerQuickstartCommands
|
|
264
264
|
}
|
|
265
265
|
];
|
|
266
266
|
async function registerDeeplineCommandGroups(program, requestedCommand) {
|
|
@@ -286,8 +286,8 @@ function registerDeeplineInlineCommands(program) {
|
|
|
286
286
|
function createDeferredPlayRunMaintenance(input) {
|
|
287
287
|
return async () => {
|
|
288
288
|
try {
|
|
289
|
-
const skillsVersion =
|
|
290
|
-
const compatibility = await
|
|
289
|
+
const skillsVersion = _chunkBJL7RYQNjs.readSdkSkillsLocalVersion.call(void 0, input.baseUrl);
|
|
290
|
+
const compatibility = await _chunkPHWFY26Fjs.traceCliSpan.call(void 0,
|
|
291
291
|
"cli.sdk_compatibility_deferred",
|
|
292
292
|
{
|
|
293
293
|
baseUrl: input.baseUrl,
|
|
@@ -295,24 +295,24 @@ function createDeferredPlayRunMaintenance(input) {
|
|
|
295
295
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
296
296
|
},
|
|
297
297
|
async () => {
|
|
298
|
-
const trusted =
|
|
298
|
+
const trusted = _chunk5YILTBF7js.readTrustedCleanCompatibility.call(void 0,
|
|
299
299
|
input.baseUrl,
|
|
300
300
|
"plays run",
|
|
301
301
|
skillsVersion
|
|
302
302
|
);
|
|
303
303
|
if (trusted) return { response: trusted, error: null };
|
|
304
|
-
return
|
|
304
|
+
return _chunk5YILTBF7js.checkSdkCompatibility.call(void 0, input.baseUrl, {
|
|
305
305
|
command: "plays run",
|
|
306
306
|
skillsVersion,
|
|
307
307
|
persistCache: input.policy !== "off",
|
|
308
|
-
catalog:
|
|
308
|
+
catalog: _chunk5DUP4ZUEjs.compatibilityCatalog.call(void 0, input.command)
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
);
|
|
312
312
|
if (compatibility.error || !compatibility.response) return;
|
|
313
313
|
const automaticUpdate = compatibility.response.auto_update;
|
|
314
314
|
if (_optionalChain([automaticUpdate, 'optionalAccess', _4 => _4.should_auto_update]) && !automaticUpdate.required && automaticUpdate.reason !== "rollback_forced") {
|
|
315
|
-
await
|
|
315
|
+
await _chunk5DUP4ZUEjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
316
316
|
compatibility.response,
|
|
317
317
|
input.baseUrl,
|
|
318
318
|
input.policy
|
|
@@ -322,7 +322,7 @@ function createDeferredPlayRunMaintenance(input) {
|
|
|
322
322
|
compatibility.response,
|
|
323
323
|
"skills"
|
|
324
324
|
) ? _nullishCoalesce(compatibility.response.skills, () => ( null)) : void 0;
|
|
325
|
-
await
|
|
325
|
+
await _chunk5YILTBF7js.syncSdkSkillsIfNeeded.call(void 0, input.baseUrl, {
|
|
326
326
|
update: skillsUpdate,
|
|
327
327
|
mode: "detached"
|
|
328
328
|
});
|
|
@@ -350,7 +350,7 @@ var MAX_SESSIONS = 20;
|
|
|
350
350
|
function helpSeenPath(homeDir = _os.homedir.call(void 0, )) {
|
|
351
351
|
return _path.join.call(void 0, homeDir, ".local", "deepline", "sdk-cli", "help-seen.json");
|
|
352
352
|
}
|
|
353
|
-
function resolveHelpDetail(argv, key, homeDir = _os.homedir.call(void 0, ), sessionId =
|
|
353
|
+
function resolveHelpDetail(argv, key, homeDir = _os.homedir.call(void 0, ), sessionId = _chunkDFHS5XVZjs.agentSessionIdFromEnvironment.call(void 0, )) {
|
|
354
354
|
const explicit = _chunkOKAZHDYNjs.helpDetailFromArgv.call(void 0, argv);
|
|
355
355
|
if (explicit === "quiet") return { detail: "quiet", firstRead: false };
|
|
356
356
|
if (!sessionId) return { detail: explicit, firstRead: false };
|
|
@@ -448,7 +448,7 @@ function shouldReport(stdout, stderr) {
|
|
|
448
448
|
}
|
|
449
449
|
function toolName(action) {
|
|
450
450
|
const [toolId] = _optionalChain([action, 'optionalAccess', _5 => _5.path]) === "tools execute" ? action.args : [];
|
|
451
|
-
return typeof toolId === "string" ?
|
|
451
|
+
return typeof toolId === "string" ? _chunk5YILTBF7js.redactFailureText.call(void 0, toolId) : null;
|
|
452
452
|
}
|
|
453
453
|
function chunkText(chunk) {
|
|
454
454
|
if (typeof chunk === "string") return chunk;
|
|
@@ -479,14 +479,14 @@ function watch(stream) {
|
|
|
479
479
|
}
|
|
480
480
|
async function postCommandOutput(body) {
|
|
481
481
|
try {
|
|
482
|
-
const baseUrl =
|
|
483
|
-
const apiKey =
|
|
482
|
+
const baseUrl = _chunkBJL7RYQNjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
483
|
+
const apiKey = _chunkBJL7RYQNjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
484
484
|
if (!apiKey) return;
|
|
485
|
-
const agentSessionId =
|
|
485
|
+
const agentSessionId = _chunkDFHS5XVZjs.agentSessionIdFromEnvironment.call(void 0, );
|
|
486
486
|
await fetch(new URL("/api/v2/telemetry/command-output", baseUrl), {
|
|
487
487
|
method: "POST",
|
|
488
488
|
headers: {
|
|
489
|
-
...
|
|
489
|
+
..._chunk5YILTBF7js.failureReportHeaders.call(void 0, apiKey),
|
|
490
490
|
...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {}
|
|
491
491
|
},
|
|
492
492
|
body: JSON.stringify(body),
|
|
@@ -502,14 +502,14 @@ function startOutputSizeReporting(invocation, streams = {
|
|
|
502
502
|
const stdoutWatch = watch(streams.stdout);
|
|
503
503
|
const stderrWatch = watch(streams.stderr);
|
|
504
504
|
return async (finished) => {
|
|
505
|
-
if (
|
|
505
|
+
if (_chunk5YILTBF7js.isFailureReportingDisabled.call(void 0, )) return;
|
|
506
506
|
const [stdout, stderr] = await Promise.all([
|
|
507
507
|
stdoutWatch.settled(),
|
|
508
508
|
stderrWatch.settled()
|
|
509
509
|
]);
|
|
510
510
|
if (!shouldReport(stdout, stderr)) return;
|
|
511
511
|
await postCommandOutput({
|
|
512
|
-
command:
|
|
512
|
+
command: _chunk5YILTBF7js.sanitizeCommand.call(void 0, invocation.argv),
|
|
513
513
|
tool: toolName(finished.action),
|
|
514
514
|
exit_code: typeof finished.exitCode === "number" ? finished.exitCode : null,
|
|
515
515
|
duration_ms: Math.max(0, Date.now() - invocation.startedAtMs),
|
|
@@ -540,7 +540,7 @@ function silenceCommanderErrorOutput(command) {
|
|
|
540
540
|
function printUsageErrorJson(code, message, commandPath) {
|
|
541
541
|
const unknownName = code === "commander.unknownCommand" ? _optionalChain([/unknown command '([^']+)'/, 'access', _6 => _6.exec, 'call', _7 => _7(message), 'optionalAccess', _8 => _8[1]]) : void 0;
|
|
542
542
|
const helpPath = unknownName && commandPath.endsWith(` ${unknownName}`) ? commandPath.slice(0, -unknownName.length - 1) : commandPath;
|
|
543
|
-
|
|
543
|
+
_chunkBYEDI5PMjs.printJson.call(void 0, {
|
|
544
544
|
ok: false,
|
|
545
545
|
error: {
|
|
546
546
|
code,
|
|
@@ -602,7 +602,7 @@ function topLevelCommandKnown(program, commandName) {
|
|
|
602
602
|
);
|
|
603
603
|
}
|
|
604
604
|
async function runPlayRunnerHealthCheck() {
|
|
605
|
-
|
|
605
|
+
_chunkBJL7RYQNjs.resolveConfig.call(void 0, );
|
|
606
606
|
const dir = await _promises.mkdtemp.call(void 0, _path.join.call(void 0, _os.tmpdir.call(void 0, ), "deepline-health-play-"));
|
|
607
607
|
const file = _path.join.call(void 0, dir, "health-check.play.ts");
|
|
608
608
|
try {
|
|
@@ -632,7 +632,7 @@ async function runPlayRunnerHealthCheck() {
|
|
|
632
632
|
});
|
|
633
633
|
let exitCode = 1;
|
|
634
634
|
try {
|
|
635
|
-
const { handlePlayRun } = await Promise.resolve().then(() => _interopRequireWildcard(require("./play-
|
|
635
|
+
const { handlePlayRun } = await Promise.resolve().then(() => _interopRequireWildcard(require("./play-LFCTQJXA.js")));
|
|
636
636
|
exitCode = await handlePlayRun([
|
|
637
637
|
file,
|
|
638
638
|
"--input",
|
|
@@ -672,7 +672,7 @@ function preflightErrorMessage(error) {
|
|
|
672
672
|
return error instanceof Error ? error.message : String(error);
|
|
673
673
|
}
|
|
674
674
|
async function runPreflightCheck() {
|
|
675
|
-
const baseUrl =
|
|
675
|
+
const baseUrl = _chunkBJL7RYQNjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
676
676
|
const healthController = new AbortController();
|
|
677
677
|
const healthTimeout = setTimeout(
|
|
678
678
|
() => healthController.abort(),
|
|
@@ -689,14 +689,14 @@ async function runPreflightCheck() {
|
|
|
689
689
|
}).catch((error) => ({
|
|
690
690
|
status: "unreachable",
|
|
691
691
|
version: null,
|
|
692
|
-
error: healthController.signal.aborted ? `Request to ${baseUrl} timed out after ${PREFLIGHT_TIMEOUT_MS}ms.` :
|
|
692
|
+
error: healthController.signal.aborted ? `Request to ${baseUrl} timed out after ${PREFLIGHT_TIMEOUT_MS}ms.` : _chunkDFHS5XVZjs.connectionFailureMessage.call(void 0,
|
|
693
693
|
baseUrl,
|
|
694
694
|
error instanceof Error ? error : new Error(String(error))
|
|
695
695
|
)
|
|
696
696
|
})).finally(() => clearTimeout(healthTimeout));
|
|
697
|
-
const apiKey =
|
|
698
|
-
const http = apiKey ? new (0,
|
|
699
|
-
|
|
697
|
+
const apiKey = _chunkBJL7RYQNjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
698
|
+
const http = apiKey ? new (0, _chunkBJL7RYQNjs.HttpClient)(
|
|
699
|
+
_chunkBJL7RYQNjs.resolveConfig.call(void 0, {
|
|
700
700
|
baseUrl,
|
|
701
701
|
apiKey,
|
|
702
702
|
timeout: PREFLIGHT_TIMEOUT_MS,
|
|
@@ -741,7 +741,7 @@ async function runPreflightCheck() {
|
|
|
741
741
|
const connected = authStatus === "connected" || authStatus === "claimed";
|
|
742
742
|
return {
|
|
743
743
|
status: healthResult.status === "ok" && connected ? "ok" : "check",
|
|
744
|
-
cli_version:
|
|
744
|
+
cli_version: _chunkDFHS5XVZjs.SDK_VERSION,
|
|
745
745
|
host: baseUrl,
|
|
746
746
|
health: {
|
|
747
747
|
status: healthResult.status,
|
|
@@ -768,7 +768,7 @@ async function runPreflightCheck() {
|
|
|
768
768
|
{
|
|
769
769
|
title: "preflight",
|
|
770
770
|
lines: [
|
|
771
|
-
`cli: ${
|
|
771
|
+
`cli: ${_chunkDFHS5XVZjs.SDK_VERSION}`,
|
|
772
772
|
`host: ${baseUrl}`,
|
|
773
773
|
`health: ${healthResult.status}`,
|
|
774
774
|
..."error" in healthResult ? [` ${healthResult.error}`] : [],
|
|
@@ -795,12 +795,12 @@ function printPreflightHuman(data) {
|
|
|
795
795
|
}
|
|
796
796
|
async function newerCliCommandHint(baseUrl, command) {
|
|
797
797
|
if (!command.trim()) return null;
|
|
798
|
-
const { response, error } = await
|
|
798
|
+
const { response, error } = await _chunk5YILTBF7js.checkSdkCompatibility.call(void 0, baseUrl, { command });
|
|
799
799
|
if (error || !response) return null;
|
|
800
800
|
const introduced = response.command_introduced_in;
|
|
801
801
|
if (introduced) {
|
|
802
802
|
return [
|
|
803
|
-
`\`deepline ${introduced.command}\` was added in SDK CLI ${introduced.introduced_in}. This CLI is ${
|
|
803
|
+
`\`deepline ${introduced.command}\` was added in SDK CLI ${introduced.introduced_in}. This CLI is ${_chunkDFHS5XVZjs.SDK_VERSION}.`,
|
|
804
804
|
` ${introduced.reason}`,
|
|
805
805
|
` Update with: ${response.update_command}`,
|
|
806
806
|
" Agent skills are served by Deepline and refresh on their own, so a skill can describe a command this CLI does not have yet."
|
|
@@ -809,31 +809,32 @@ async function newerCliCommandHint(baseUrl, command) {
|
|
|
809
809
|
if (!response.update_required) return null;
|
|
810
810
|
return [
|
|
811
811
|
response.message,
|
|
812
|
-
` Installed: ${
|
|
812
|
+
` Installed: ${_chunkDFHS5XVZjs.SDK_VERSION}. Run: ${response.update_command}`,
|
|
813
813
|
" If an agent skill told you to run this, the skill is newer than this CLI."
|
|
814
814
|
].join("\n");
|
|
815
815
|
}
|
|
816
816
|
async function runMain(ensureTransport, onAction) {
|
|
817
817
|
const mainStartedAt = Date.now();
|
|
818
|
-
|
|
818
|
+
_chunkBYEDI5PMjs.installJsonStderrGuard.call(void 0, );
|
|
819
819
|
let rootHelpStatus = "";
|
|
820
|
+
let commandFailed = false;
|
|
820
821
|
const deferredMaintenance = { inlinePlay: null };
|
|
821
|
-
|
|
822
|
+
_chunkPHWFY26Fjs.recordCliTrace.call(void 0, {
|
|
822
823
|
phase: "cli.main_start",
|
|
823
824
|
argv: process.argv.slice(2)
|
|
824
825
|
});
|
|
825
826
|
const printStartupPhase = shouldPrintStartupPhase();
|
|
826
|
-
const progress = printStartupPhase ?
|
|
827
|
+
const progress = printStartupPhase ? _chunkQEQ3KHVYjs.createCliProgress.call(void 0, true) : null;
|
|
827
828
|
if (printStartupPhase) {
|
|
828
829
|
_optionalChain([progress, 'optionalAccess', _14 => _14.phase, 'call', _15 => _15("loading deepline cli")]);
|
|
829
830
|
}
|
|
830
831
|
const program = new (0, _commander.Command)();
|
|
831
832
|
program.name("deepline").description(
|
|
832
833
|
"Deepline CLI \u2014 GTM enrichment tools, plays, and runs from your terminal."
|
|
833
|
-
).version(
|
|
834
|
+
).version(_chunkDFHS5XVZjs.SDK_VERSION, "-v, --version", "Show version").option(
|
|
834
835
|
"--maintenance <policy>",
|
|
835
836
|
"Installation maintenance: configured preferences or off; independent of output format",
|
|
836
|
-
|
|
837
|
+
_chunkPHWFY26Fjs.parseCliMaintenancePolicy,
|
|
837
838
|
"configured"
|
|
838
839
|
).exitOverride().showHelpAfterError().showSuggestionAfterError(true).addHelpText(
|
|
839
840
|
"beforeAll",
|
|
@@ -891,24 +892,24 @@ Exit codes:
|
|
|
891
892
|
path: compatibilityCommandPath(actionCommand),
|
|
892
893
|
args: actionCommand.processedArgs
|
|
893
894
|
});
|
|
894
|
-
const maintenance =
|
|
895
|
+
const maintenance = _chunkPHWFY26Fjs.resolveCliMaintenancePolicy.call(void 0,
|
|
895
896
|
actionCommand.optsWithGlobals()
|
|
896
897
|
);
|
|
897
898
|
if (actionCommand.name() !== "version") {
|
|
898
899
|
await ensureTransport();
|
|
899
900
|
}
|
|
900
|
-
if (actionCommand.name() === "version" || actionCommand.name() === "update" || actionCommand.name() === "setup" || actionCommand.name() === "skills" || actionCommand.name() ===
|
|
901
|
+
if (actionCommand.name() === "version" || actionCommand.name() === "update" || actionCommand.name() === "setup" || actionCommand.name() === "skills" || actionCommand.name() === _chunk5YILTBF7js.SKILLS_AUTO_SYNC_COMMAND || actionCommand.name() === "doctor" || isAutoUpdateSettingsInvocation() || isDeprecatedCommandInvocation()) {
|
|
901
902
|
return;
|
|
902
903
|
}
|
|
903
904
|
const compatibilityCommand = compatibilityCommandPath(actionCommand) || actionCommand.name();
|
|
904
905
|
const isToolExecuteCommand = compatibilityCommand === "tools execute";
|
|
905
906
|
if (isToolExecuteCommand) {
|
|
906
|
-
|
|
907
|
+
_chunk5DUP4ZUEjs.beginToolExecuteCommand.call(void 0, );
|
|
907
908
|
}
|
|
908
909
|
if (isToolExecuteCommand) {
|
|
909
|
-
const baseUrl =
|
|
910
|
-
if (maintenance !== "off")
|
|
911
|
-
|
|
910
|
+
const baseUrl = _chunkBJL7RYQNjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
911
|
+
if (maintenance !== "off") _chunk5YILTBF7js.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
912
|
+
_chunkPHWFY26Fjs.recordCliTrace.call(void 0, {
|
|
912
913
|
phase: "cli.sdk_compatibility_deferred_to_tool_execute",
|
|
913
914
|
baseUrl,
|
|
914
915
|
command: compatibilityCommand
|
|
@@ -916,10 +917,9 @@ Exit codes:
|
|
|
916
917
|
return;
|
|
917
918
|
}
|
|
918
919
|
const playDryRun = compatibilityCommand === "plays run" && actionCommand.optsWithGlobals().dryRun === true;
|
|
919
|
-
if (!playDryRun &&
|
|
920
|
+
if (!playDryRun && _chunkFSCOYTRVjs.usesInlinePlayAdmission.call(void 0, compatibilityCommand, process.argv.slice(2))) {
|
|
920
921
|
if (maintenance !== "off") {
|
|
921
|
-
const baseUrl =
|
|
922
|
-
_chunkIXWQOVNWjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
922
|
+
const baseUrl = _chunkBJL7RYQNjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
923
923
|
deferredMaintenance.inlinePlay = createDeferredPlayRunMaintenance({
|
|
924
924
|
baseUrl,
|
|
925
925
|
command: actionCommand,
|
|
@@ -928,27 +928,27 @@ Exit codes:
|
|
|
928
928
|
}
|
|
929
929
|
return;
|
|
930
930
|
}
|
|
931
|
-
const runStartupStage = (stage, action) => isToolExecuteCommand ?
|
|
931
|
+
const runStartupStage = (stage, action) => isToolExecuteCommand ? _chunk5DUP4ZUEjs.runToolExecuteStage.call(void 0, stage, action) : Promise.resolve(action());
|
|
932
932
|
if (printStartupPhase) {
|
|
933
933
|
_optionalChain([progress, 'optionalAccess', _16 => _16.phase, 'call', _17 => _17("checking sdk compatibility")]);
|
|
934
934
|
}
|
|
935
935
|
const startup = await runStartupStage("SDK compatibility", async () => {
|
|
936
|
-
const baseUrl =
|
|
937
|
-
if (maintenance !== "off")
|
|
936
|
+
const baseUrl = _chunkBJL7RYQNjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
937
|
+
if (maintenance !== "off") _chunk5YILTBF7js.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
938
938
|
const shouldDeferSkillsSync = isToolExecuteCommand || maintenance === "off" || shouldDeferSkillsSyncForCommand();
|
|
939
|
-
const skillsVersion = shouldDeferSkillsSync ? void 0 :
|
|
940
|
-
const trusted = isToolExecuteCommand ? null :
|
|
939
|
+
const skillsVersion = shouldDeferSkillsSync ? void 0 : _chunkBJL7RYQNjs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
940
|
+
const trusted = isToolExecuteCommand ? null : _chunk5YILTBF7js.readTrustedCleanCompatibility.call(void 0,
|
|
941
941
|
baseUrl,
|
|
942
942
|
compatibilityCommand,
|
|
943
943
|
skillsVersion
|
|
944
944
|
);
|
|
945
|
-
const fastDeadline = !isToolExecuteCommand && trusted === null &&
|
|
945
|
+
const fastDeadline = !isToolExecuteCommand && trusted === null && _chunk5YILTBF7js.readFreshCleanCompatibility.call(void 0,
|
|
946
946
|
baseUrl,
|
|
947
947
|
compatibilityCommand,
|
|
948
948
|
skillsVersion
|
|
949
949
|
) !== null;
|
|
950
950
|
if (trusted) {
|
|
951
|
-
|
|
951
|
+
_chunkPHWFY26Fjs.recordCliTrace.call(void 0, {
|
|
952
952
|
phase: "cli.sdk_compatibility",
|
|
953
953
|
ms: 0,
|
|
954
954
|
ok: true,
|
|
@@ -958,7 +958,7 @@ Exit codes:
|
|
|
958
958
|
source: "trusted_cache"
|
|
959
959
|
});
|
|
960
960
|
}
|
|
961
|
-
const compatibility = trusted ? { response: trusted, error: null } : await
|
|
961
|
+
const compatibility = trusted ? { response: trusted, error: null } : await _chunkPHWFY26Fjs.traceCliSpan.call(void 0,
|
|
962
962
|
"cli.sdk_compatibility",
|
|
963
963
|
{
|
|
964
964
|
baseUrl,
|
|
@@ -966,12 +966,12 @@ Exit codes:
|
|
|
966
966
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null)),
|
|
967
967
|
fastDeadline
|
|
968
968
|
},
|
|
969
|
-
() =>
|
|
969
|
+
() => _chunk5YILTBF7js.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
970
970
|
command: compatibilityCommand,
|
|
971
971
|
skillsVersion,
|
|
972
972
|
persistCache: !isToolExecuteCommand && maintenance !== "off",
|
|
973
|
-
catalog:
|
|
974
|
-
...fastDeadline ? { timeoutMs:
|
|
973
|
+
catalog: _chunk5DUP4ZUEjs.compatibilityCatalog.call(void 0, actionCommand),
|
|
974
|
+
...fastDeadline ? { timeoutMs: _chunk5YILTBF7js.SDK_COMPATIBILITY_FAST_DEADLINE_MS } : {}
|
|
975
975
|
})
|
|
976
976
|
);
|
|
977
977
|
if (compatibility.error) {
|
|
@@ -982,7 +982,7 @@ Exit codes:
|
|
|
982
982
|
response: null
|
|
983
983
|
};
|
|
984
984
|
}
|
|
985
|
-
const relaunched = await
|
|
985
|
+
const relaunched = await _chunk5DUP4ZUEjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
986
986
|
compatibility.response,
|
|
987
987
|
baseUrl,
|
|
988
988
|
maintenance
|
|
@@ -996,14 +996,14 @@ Exit codes:
|
|
|
996
996
|
};
|
|
997
997
|
}
|
|
998
998
|
const policy = compatibility.response;
|
|
999
|
-
const jsonOutput =
|
|
1000
|
-
|
|
999
|
+
const jsonOutput = _chunkBYEDI5PMjs.isJsonOutputMode.call(void 0, );
|
|
1000
|
+
_chunk5YILTBF7js.enforceSdkCompatibilityResponse.call(void 0, policy, {
|
|
1001
1001
|
quietAdvisory: jsonOutput || // The queued update already says what is about to happen.
|
|
1002
|
-
|
|
1002
|
+
_chunk5DUP4ZUEjs.hasDeferredAutoUpdate.call(void 0, ) || maintenance === "off" || !_chunk5YILTBF7js.claimUpdateAdvisory.call(void 0, baseUrl)
|
|
1003
1003
|
});
|
|
1004
1004
|
const advisory = compatibility.response;
|
|
1005
|
-
if (jsonOutput && advisory && (advisory.status === "deprecated" || advisory.status === "update_available") && !
|
|
1006
|
-
|
|
1005
|
+
if (jsonOutput && advisory && (advisory.status === "deprecated" || advisory.status === "update_available") && !_chunk5YILTBF7js.isCiEnvironment.call(void 0, ) && !_chunk5DUP4ZUEjs.hasDeferredAutoUpdate.call(void 0, )) {
|
|
1006
|
+
_chunkBYEDI5PMjs.addJsonNotice.call(void 0, { code: advisory.status, message: advisory.message });
|
|
1007
1007
|
}
|
|
1008
1008
|
return {
|
|
1009
1009
|
shouldContinue: true,
|
|
@@ -1020,10 +1020,10 @@ Exit codes:
|
|
|
1020
1020
|
const skillsUpdate = startup.response && Object.prototype.hasOwnProperty.call(startup.response, "skills") ? _nullishCoalesce(startup.response.skills, () => ( null)) : void 0;
|
|
1021
1021
|
await runStartupStage(
|
|
1022
1022
|
"agent skills sync",
|
|
1023
|
-
() =>
|
|
1023
|
+
() => _chunkPHWFY26Fjs.traceCliSpan.call(void 0,
|
|
1024
1024
|
"cli.sdk_skills_sync",
|
|
1025
1025
|
{ baseUrl: startup.baseUrl },
|
|
1026
|
-
() =>
|
|
1026
|
+
() => _chunk5YILTBF7js.syncSdkSkillsIfNeeded.call(void 0, startup.baseUrl, {
|
|
1027
1027
|
update: skillsUpdate,
|
|
1028
1028
|
mode: "detached"
|
|
1029
1029
|
})
|
|
@@ -1035,16 +1035,16 @@ Exit codes:
|
|
|
1035
1035
|
program,
|
|
1036
1036
|
process.argv.slice(2)
|
|
1037
1037
|
);
|
|
1038
|
-
const commandRegistrationStartedAt =
|
|
1038
|
+
const commandRegistrationStartedAt = _chunkPHWFY26Fjs.isCliTraceEnabled.call(void 0, ) ? performance.now() : void 0;
|
|
1039
1039
|
await registerDeeplineCommandGroups(program, requestedCommand);
|
|
1040
1040
|
if (commandRegistrationStartedAt !== void 0) {
|
|
1041
|
-
|
|
1041
|
+
_chunkPHWFY26Fjs.recordCliTrace.call(void 0, {
|
|
1042
1042
|
phase: "cli.command_registration",
|
|
1043
1043
|
ms: performance.now() - commandRegistrationStartedAt
|
|
1044
1044
|
});
|
|
1045
1045
|
}
|
|
1046
1046
|
const { preflight, health, version } = registerDeeplineInlineCommands(program);
|
|
1047
|
-
if (
|
|
1047
|
+
if (_chunkBYEDI5PMjs.isJsonOutputMode.call(void 0, )) silenceCommanderErrorOutput(program);
|
|
1048
1048
|
preflight.addHelpText(
|
|
1049
1049
|
"after",
|
|
1050
1050
|
`
|
|
@@ -1060,8 +1060,8 @@ Examples:
|
|
|
1060
1060
|
`
|
|
1061
1061
|
).action(async (options) => {
|
|
1062
1062
|
const data = await runPreflightCheck();
|
|
1063
|
-
if (
|
|
1064
|
-
|
|
1063
|
+
if (_chunkBYEDI5PMjs.shouldEmitJson.call(void 0, options.json)) {
|
|
1064
|
+
_chunkBYEDI5PMjs.printJson.call(void 0, data);
|
|
1065
1065
|
} else {
|
|
1066
1066
|
printPreflightHuman(data);
|
|
1067
1067
|
}
|
|
@@ -1086,7 +1086,7 @@ Examples:
|
|
|
1086
1086
|
).action(async (options) => {
|
|
1087
1087
|
if (options.playRunner) {
|
|
1088
1088
|
const data = await runPlayRunnerHealthCheck();
|
|
1089
|
-
|
|
1089
|
+
_chunkBYEDI5PMjs.printCommandEnvelope.call(void 0, data, {
|
|
1090
1090
|
json: options.json,
|
|
1091
1091
|
text: `play runner: ${data.playRunner.status} (${data.playRunner.check})
|
|
1092
1092
|
`
|
|
@@ -1094,15 +1094,15 @@ Examples:
|
|
|
1094
1094
|
return;
|
|
1095
1095
|
}
|
|
1096
1096
|
try {
|
|
1097
|
-
const { httpJson, readStatusBanner, statusBannerLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-
|
|
1098
|
-
const baseUrl =
|
|
1097
|
+
const { httpJson, readStatusBanner, statusBannerLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-ARKH3OAU.js")));
|
|
1098
|
+
const baseUrl = _chunkBJL7RYQNjs.resolveBaseUrlOnly.call(void 0, );
|
|
1099
1099
|
const [{ status, data }, banner] = await Promise.all([
|
|
1100
1100
|
httpJson("GET", `${baseUrl}/api/v2/health`, null),
|
|
1101
1101
|
readStatusBanner(baseUrl)
|
|
1102
1102
|
]);
|
|
1103
1103
|
if (status !== 200) throw new Error(`HTTP ${status}`);
|
|
1104
1104
|
const lines = [`${baseUrl}: ${data.status}`, statusBannerLine(banner)];
|
|
1105
|
-
|
|
1105
|
+
_chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
|
|
1106
1106
|
{ ...data, status_banner: banner },
|
|
1107
1107
|
{
|
|
1108
1108
|
json: options.json,
|
|
@@ -1130,16 +1130,16 @@ Examples:
|
|
|
1130
1130
|
`
|
|
1131
1131
|
).action((options) => {
|
|
1132
1132
|
if (options.json) {
|
|
1133
|
-
|
|
1133
|
+
_chunkBYEDI5PMjs.printCompactJson.call(void 0, { version: _chunkDFHS5XVZjs.SDK_VERSION });
|
|
1134
1134
|
return;
|
|
1135
1135
|
}
|
|
1136
|
-
process.stdout.write(`deepline ${
|
|
1136
|
+
process.stdout.write(`deepline ${_chunkDFHS5XVZjs.SDK_VERSION}
|
|
1137
1137
|
`);
|
|
1138
1138
|
});
|
|
1139
1139
|
if (process.argv.slice(2).length === 0) {
|
|
1140
1140
|
program.outputHelp({ error: true });
|
|
1141
1141
|
console.error("\nerror: missing command (see usage above)");
|
|
1142
|
-
|
|
1142
|
+
_chunkPHWFY26Fjs.recordCliTrace.call(void 0, {
|
|
1143
1143
|
phase: "cli.main_total",
|
|
1144
1144
|
ms: Date.now() - mainStartedAt,
|
|
1145
1145
|
ok: false,
|
|
@@ -1151,16 +1151,16 @@ Examples:
|
|
|
1151
1151
|
const requestedTopLevelCommand = _nullishCoalesce(process.argv.slice(2)[0], () => ( ""));
|
|
1152
1152
|
if (!topLevelCommandKnown(program, requestedTopLevelCommand)) {
|
|
1153
1153
|
const unknownCommandMessage = `error: unknown command '${requestedTopLevelCommand}'`;
|
|
1154
|
-
if (!
|
|
1155
|
-
const baseUrl =
|
|
1154
|
+
if (!_chunkBYEDI5PMjs.isJsonOutputMode.call(void 0, )) console.error(unknownCommandMessage);
|
|
1155
|
+
const baseUrl = _chunkBJL7RYQNjs.autoDetectBaseUrl.call(void 0, );
|
|
1156
1156
|
await ensureTransport();
|
|
1157
1157
|
const versionHint = await newerCliCommandHint(
|
|
1158
1158
|
baseUrl,
|
|
1159
1159
|
requestedTopLevelCommand
|
|
1160
1160
|
);
|
|
1161
|
-
if (
|
|
1161
|
+
if (_chunkBYEDI5PMjs.isJsonOutputMode.call(void 0, )) {
|
|
1162
1162
|
if (versionHint) {
|
|
1163
|
-
|
|
1163
|
+
_chunkBYEDI5PMjs.addJsonNotice.call(void 0, { code: "newer_cli_command", message: versionHint });
|
|
1164
1164
|
}
|
|
1165
1165
|
printUsageErrorJson(
|
|
1166
1166
|
"commander.unknownCommand",
|
|
@@ -1182,32 +1182,33 @@ Examples:
|
|
|
1182
1182
|
const helpArgs = process.argv.slice(2);
|
|
1183
1183
|
const helpPositionals = helpArgs.filter((arg) => !arg.startsWith("-"));
|
|
1184
1184
|
if (helpPositionals.length === 0 ? helpArgs.includes("--help") || helpArgs.includes("-h") : helpPositionals.length === 1 && helpPositionals[0] === "help") {
|
|
1185
|
-
const { authStatusLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-
|
|
1186
|
-
rootHelpStatus = `Version: ${
|
|
1185
|
+
const { authStatusLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-ARKH3OAU.js")));
|
|
1186
|
+
rootHelpStatus = `Version: ${_chunkDFHS5XVZjs.SDK_VERSION}
|
|
1187
1187
|
${await authStatusLine()}
|
|
1188
1188
|
`;
|
|
1189
1189
|
}
|
|
1190
1190
|
await program.parseAsync(process.argv);
|
|
1191
|
-
|
|
1191
|
+
_chunkPHWFY26Fjs.recordCliTrace.call(void 0, {
|
|
1192
1192
|
phase: "cli.main_total",
|
|
1193
1193
|
ms: Date.now() - mainStartedAt,
|
|
1194
1194
|
ok: true
|
|
1195
1195
|
});
|
|
1196
|
-
await
|
|
1196
|
+
await _chunk5YILTBF7js.maybeReportSdkCliFailure.call(void 0, {
|
|
1197
1197
|
argv: process.argv.slice(2),
|
|
1198
1198
|
startedAtMs: mainStartedAt,
|
|
1199
1199
|
exitCode: typeof process.exitCode === "number" ? process.exitCode : null
|
|
1200
1200
|
});
|
|
1201
1201
|
} catch (error) {
|
|
1202
|
+
commandFailed = true;
|
|
1202
1203
|
const commanderError = asCommanderError(error);
|
|
1203
|
-
|
|
1204
|
+
_chunkPHWFY26Fjs.recordCliTrace.call(void 0, {
|
|
1204
1205
|
phase: "cli.main_total",
|
|
1205
1206
|
ms: Date.now() - mainStartedAt,
|
|
1206
1207
|
ok: false,
|
|
1207
1208
|
error: error instanceof Error ? error.message : String(error)
|
|
1208
1209
|
});
|
|
1209
1210
|
_optionalChain([progress, 'optionalAccess', _20 => _20.fail, 'call', _21 => _21()]);
|
|
1210
|
-
const wantsJson =
|
|
1211
|
+
const wantsJson = _chunkBYEDI5PMjs.isJsonOutputMode.call(void 0, );
|
|
1211
1212
|
if (commanderError) {
|
|
1212
1213
|
const grammarError = [
|
|
1213
1214
|
"commander.unknownCommand",
|
|
@@ -1218,12 +1219,12 @@ ${await authStatusLine()}
|
|
|
1218
1219
|
if (grammarError) {
|
|
1219
1220
|
await ensureTransport();
|
|
1220
1221
|
const versionHint = await newerCliCommandHint(
|
|
1221
|
-
|
|
1222
|
+
_chunkBJL7RYQNjs.autoDetectBaseUrl.call(void 0, ),
|
|
1222
1223
|
commandPath
|
|
1223
1224
|
);
|
|
1224
1225
|
if (wantsJson) {
|
|
1225
1226
|
if (versionHint) {
|
|
1226
|
-
|
|
1227
|
+
_chunkBYEDI5PMjs.addJsonNotice.call(void 0, { code: "newer_cli_command", message: versionHint });
|
|
1227
1228
|
}
|
|
1228
1229
|
} else {
|
|
1229
1230
|
if (versionHint) console.error(versionHint);
|
|
@@ -1243,53 +1244,55 @@ ${await authStatusLine()}
|
|
|
1243
1244
|
return;
|
|
1244
1245
|
} else if (wantsJson) {
|
|
1245
1246
|
if (error instanceof _chunkALJJRZNJjs.AuthError) {
|
|
1246
|
-
|
|
1247
|
+
_chunkBYEDI5PMjs.addJsonNotice.call(void 0, {
|
|
1247
1248
|
code: "auth_required",
|
|
1248
1249
|
message: `Not authenticated. Run: ${AUTH_RECOVERY_COMMAND}`
|
|
1249
1250
|
});
|
|
1250
1251
|
}
|
|
1251
|
-
const providerConcurrency =
|
|
1252
|
+
const providerConcurrency = _chunkBYEDI5PMjs.formatProviderConcurrencyDiagnostic.call(void 0, error);
|
|
1252
1253
|
if (providerConcurrency) {
|
|
1253
|
-
|
|
1254
|
+
_chunkBYEDI5PMjs.addJsonNotice.call(void 0, {
|
|
1254
1255
|
code: "provider_concurrency",
|
|
1255
1256
|
message: providerConcurrency
|
|
1256
1257
|
});
|
|
1257
1258
|
}
|
|
1258
|
-
const payload =
|
|
1259
|
-
|
|
1259
|
+
const payload = _chunkBYEDI5PMjs.errorToJsonPayload.call(void 0, error);
|
|
1260
|
+
_chunkBYEDI5PMjs.printJson.call(void 0, {
|
|
1260
1261
|
...payload,
|
|
1261
1262
|
// The envelope names the code the process exits with, so a caller
|
|
1262
1263
|
// that only reads stdout still cannot mistake a failure for data.
|
|
1263
|
-
exitCode: _nullishCoalesce(payload.exitCode, () => (
|
|
1264
|
+
exitCode: _nullishCoalesce(payload.exitCode, () => ( _chunk5YILTBF7js.resolveSdkCliFailureExitCode.call(void 0, error))),
|
|
1264
1265
|
...error instanceof _chunkALJJRZNJjs.AuthError ? { next: AUTH_RECOVERY_COMMAND } : {}
|
|
1265
1266
|
});
|
|
1266
1267
|
} else if (error instanceof Error) {
|
|
1267
1268
|
console.error(`Error: ${error.message}`);
|
|
1268
|
-
const toolDiagnostic =
|
|
1269
|
+
const toolDiagnostic = _chunkBYEDI5PMjs.formatToolExecutionErrorDiagnostic.call(void 0, error);
|
|
1269
1270
|
if (toolDiagnostic) console.error(toolDiagnostic);
|
|
1270
1271
|
if (error instanceof _chunkALJJRZNJjs.AuthError) {
|
|
1271
1272
|
console.error(`Not authenticated. Run: ${AUTH_RECOVERY_COMMAND}`);
|
|
1272
1273
|
}
|
|
1273
|
-
const providerConcurrency =
|
|
1274
|
+
const providerConcurrency = _chunkBYEDI5PMjs.formatProviderConcurrencyDiagnostic.call(void 0, error);
|
|
1274
1275
|
if (providerConcurrency) console.error(providerConcurrency);
|
|
1275
1276
|
} else {
|
|
1276
1277
|
console.error(`Error: ${String(error)}`);
|
|
1277
1278
|
}
|
|
1278
1279
|
const explicitExitCode = error && typeof error === "object" && typeof error.exitCode === "number" ? error.exitCode : void 0;
|
|
1279
|
-
const failureExitCode = _nullishCoalesce(explicitExitCode, () => (
|
|
1280
|
+
const failureExitCode = _nullishCoalesce(explicitExitCode, () => ( _chunk5YILTBF7js.resolveSdkCliFailureExitCode.call(void 0, error)));
|
|
1280
1281
|
process.exitCode = failureExitCode;
|
|
1281
|
-
await
|
|
1282
|
+
await _chunk5YILTBF7js.maybeReportSdkCliFailure.call(void 0, {
|
|
1282
1283
|
argv: process.argv.slice(2),
|
|
1283
1284
|
startedAtMs: mainStartedAt,
|
|
1284
1285
|
exitCode: failureExitCode,
|
|
1285
1286
|
error
|
|
1286
1287
|
});
|
|
1287
1288
|
} finally {
|
|
1288
|
-
|
|
1289
|
+
_chunk5DUP4ZUEjs.finishToolExecuteCommand.call(void 0, );
|
|
1289
1290
|
const maintainInlinePlay = deferredMaintenance.inlinePlay;
|
|
1290
1291
|
deferredMaintenance.inlinePlay = null;
|
|
1291
|
-
|
|
1292
|
-
|
|
1292
|
+
if (commandFailed || typeof process.exitCode === "number" && process.exitCode !== 0) {
|
|
1293
|
+
await _optionalChain([maintainInlinePlay, 'optionalCall', _22 => _22()]);
|
|
1294
|
+
}
|
|
1295
|
+
await _chunk5DUP4ZUEjs.runDeferredAutoUpdate.call(void 0, );
|
|
1293
1296
|
}
|
|
1294
1297
|
process.exitCode = _nullishCoalesce(process.exitCode, () => ( 0));
|
|
1295
1298
|
}
|
|
@@ -1297,7 +1300,7 @@ async function main() {
|
|
|
1297
1300
|
let disposeTransport;
|
|
1298
1301
|
const ensureTransport = async () => {
|
|
1299
1302
|
if (disposeTransport) return;
|
|
1300
|
-
const transportStartedAt =
|
|
1303
|
+
const transportStartedAt = _chunkPHWFY26Fjs.isCliTraceEnabled.call(void 0, ) ? performance.now() : void 0;
|
|
1301
1304
|
const hasProxy = [
|
|
1302
1305
|
"HTTP_PROXY",
|
|
1303
1306
|
"http_proxy",
|
|
@@ -1309,7 +1312,7 @@ async function main() {
|
|
|
1309
1312
|
disposeTransport = configureCliTransport();
|
|
1310
1313
|
}
|
|
1311
1314
|
if (transportStartedAt !== void 0) {
|
|
1312
|
-
|
|
1315
|
+
_chunkPHWFY26Fjs.recordCliTrace.call(void 0, {
|
|
1313
1316
|
phase: "cli.transport_setup",
|
|
1314
1317
|
ms: performance.now() - transportStartedAt
|
|
1315
1318
|
});
|
|
@@ -1326,9 +1329,9 @@ async function main() {
|
|
|
1326
1329
|
action = dispatched;
|
|
1327
1330
|
skipOutputReport = dispatched.path === "tools execute" || dispatched.path === "plays run" && process.argv.includes("--json");
|
|
1328
1331
|
});
|
|
1329
|
-
const silentFailure =
|
|
1332
|
+
const silentFailure = _chunkBYEDI5PMjs.takeSilentJsonFailureMessage.call(void 0, process.exitCode);
|
|
1330
1333
|
if (silentFailure) {
|
|
1331
|
-
|
|
1334
|
+
_chunkBYEDI5PMjs.printJson.call(void 0, {
|
|
1332
1335
|
ok: false,
|
|
1333
1336
|
exitCode: Number(process.exitCode),
|
|
1334
1337
|
error: { code: "CLI_ERROR", message: silentFailure }
|