deepline 0.3.484 → 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/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/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 +649 -38
- 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-ABZBH55L.js +43 -0
- package/dist/cli/{auth-EBFOTF7X.mjs → auth-OWMUENCU.mjs} +5 -5
- package/dist/cli/{billing-G2G3EF3I.js → billing-2FMNQGOX.js} +80 -80
- package/dist/cli/{billing-2ZOIMW5V.mjs → billing-JX4H3VFF.mjs} +7 -7
- package/dist/cli/{chunk-M4PG7FGC.js → chunk-2ILND7XX.js} +2 -2
- package/dist/cli/{chunk-WXRM3UC6.mjs → chunk-2ZEQ43B7.mjs} +3 -3
- package/dist/cli/{chunk-PU52JXKA.mjs → chunk-3DBW6C7M.mjs} +13 -4
- package/dist/cli/{chunk-4OVHIWE7.mjs → chunk-3DYU3JQN.mjs} +2 -2
- package/dist/cli/{chunk-QIDDTIVZ.js → chunk-3OF7NSGR.js} +322 -294
- package/dist/cli/{chunk-YWC5AN26.mjs → chunk-3Z24NKW7.mjs} +62 -34
- package/dist/cli/{chunk-RLLEH2SP.js → chunk-5DCQWQCP.js} +26 -26
- package/dist/cli/{chunk-DEXSQGXB.mjs → chunk-62PJ6PK7.mjs} +5 -5
- package/dist/cli/{chunk-6NPWXE32.mjs → chunk-676NZ7K4.mjs} +1 -1
- package/dist/cli/{chunk-FRD5WFT4.js → chunk-775AZTO7.js} +323 -247
- package/dist/cli/{chunk-4OEOM6GP.mjs → chunk-ACTUAZYP.mjs} +5 -5
- package/dist/cli/{chunk-ZOKM7DVA.js → chunk-AFADYKFE.js} +8 -8
- package/dist/cli/{chunk-GVAENVIG.js → chunk-AUQQVDAB.js} +110 -21
- package/dist/cli/{chunk-U7IJAGWB.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-YHA3EV3I.mjs → chunk-CW6TAQBF.mjs} +15 -4
- package/dist/cli/{chunk-UT4YMA2N.js → chunk-DMNVM34J.js} +5 -4
- package/dist/cli/{chunk-XZXIWPT3.mjs → chunk-E73JXJA3.mjs} +1 -1
- package/dist/cli/{chunk-5KNRQWHE.js → chunk-EC2CVPN5.js} +3 -3
- package/dist/cli/{chunk-IXWQOVNW.js → chunk-ECIXZNSW.js} +87 -76
- package/dist/cli/{chunk-LTZXLYKE.mjs → chunk-FJY6K3BG.mjs} +93 -17
- package/dist/cli/{chunk-TRLDJNVE.mjs → chunk-G5PI3RNT.mjs} +1 -1
- package/dist/cli/{chunk-WYUCDLVR.mjs → chunk-GHHJWCMD.mjs} +2 -1
- package/dist/cli/{chunk-FQK7BULS.js → chunk-HKGXGGIV.js} +1 -1
- package/dist/cli/{chunk-2AWYJXBX.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-TIRSKEZH.mjs → chunk-JD6HKNKD.mjs} +1 -1
- package/dist/cli/{chunk-OHKKDPA5.js → chunk-JQXUWYWX.js} +13 -13
- package/dist/cli/{chunk-EACX7QXO.mjs → chunk-KZTNNLIL.mjs} +2 -2
- package/dist/cli/{chunk-7K5CWKKZ.mjs → chunk-L352NOE3.mjs} +2 -2
- package/dist/cli/{chunk-KGOC6HGI.js → chunk-L7IQ3DFH.js} +53 -53
- package/dist/cli/{chunk-4IOY2SCQ.js → chunk-LOX3BISD.js} +4 -4
- package/dist/cli/{chunk-6GRZEYSG.js → chunk-NKPTM7SK.js} +7 -7
- package/dist/cli/{chunk-VEVGM6B5.js → chunk-NLRTFJGH.js} +14 -14
- package/dist/cli/{chunk-UKM74PAA.js → chunk-NRNWPWBW.js} +37 -37
- package/dist/cli/{chunk-HNRELVCS.mjs → chunk-ONONSV2Q.mjs} +96 -7
- package/dist/cli/{chunk-CYWBAV5H.js → chunk-OW4OTEFF.js} +16 -16
- package/dist/cli/{chunk-5K5CAND4.mjs → chunk-RZE5I2XJ.mjs} +4 -4
- package/dist/cli/{chunk-3XQIVEAT.js → chunk-S3WQJ5VG.js} +3 -3
- package/dist/cli/{chunk-4SFC2XUF.mjs → chunk-SR6S4EYG.mjs} +5 -5
- package/dist/cli/{chunk-UWOY74RU.js → chunk-T4G2T5DS.js} +21 -21
- package/dist/cli/{chunk-TN2GW57M.mjs → chunk-TMCC7ORQ.mjs} +1 -1
- package/dist/cli/{chunk-HEI3BWIV.mjs → chunk-TSCUWWTM.mjs} +1 -1
- package/dist/cli/{chunk-DBJ62RAO.js → chunk-TVW6USSG.js} +3 -3
- package/dist/cli/{chunk-NW4QJE54.js → chunk-U6WEGDD3.js} +2 -2
- package/dist/cli/{chunk-V7JCMBLU.mjs → chunk-UPHXGZCE.mjs} +4 -4
- package/dist/cli/{chunk-C62NI2X6.js → chunk-UQ3LQ6IF.js} +5 -5
- package/dist/cli/{chunk-5GOG5ZGC.mjs → chunk-VZYTLWOM.mjs} +2 -2
- package/dist/cli/{chunk-AF7MOUZP.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-YGN77QA5.mjs → chunk-YDA3PMKK.mjs} +3 -3
- package/dist/cli/{csv-S3CHUKI6.js → csv-HFEQPGNY.js} +13 -13
- package/dist/cli/{csv-NLWVWD3H.mjs → csv-OHF3Y5KB.mjs} +4 -4
- package/dist/cli/{db-OGRPAEEM.mjs → db-M456OUXD.mjs} +7 -7
- package/dist/cli/{db-WBSKMMOH.js → db-VLQKCYQS.js} +28 -28
- package/dist/cli/describe-CP35DZ5Z.js +49 -0
- package/dist/cli/{describe-FAD3Z7LN.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-LYCL344R.mjs → executions-4FGRBPJF.mjs} +7 -7
- package/dist/cli/{executions-SOAZHCY4.js → executions-GKINJZI6.js} +9 -9
- package/dist/cli/{feedback-AVF6V7SV.mjs → feedback-D2WMGK3V.mjs} +4 -4
- package/dist/cli/{feedback-OROUPUNJ.js → feedback-ZH5K7WV7.js} +8 -8
- package/dist/cli/git-IDALMZDN.js +25 -0
- package/dist/cli/{git-J5N5M57H.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-QAQMZMEG.js → legacy-noops-QNIVP7LO.js} +8 -8
- package/dist/cli/{legacy-noops-ENRRM7BL.mjs → legacy-noops-V6Q2X34P.mjs} +5 -5
- package/dist/cli/{monitors-CKQ65WRL.mjs → monitors-2USHTG5G.mjs} +8 -8
- package/dist/cli/{monitors-SFMQ5LFR.js → monitors-5DNK7W2K.js} +92 -92
- package/dist/cli/{org-3UNTDLT2.js → org-RPGM5AN4.js} +73 -73
- package/dist/cli/{org-K4UIEU5P.mjs → org-TL2YPYSE.mjs} +7 -7
- package/dist/cli/{pages-NKZTGB4C.js → pages-PNUKPFWV.js} +18 -18
- package/dist/cli/{pages-6GPGBIAH.mjs → pages-XDEW6EE3.mjs} +7 -7
- package/dist/cli/{play-BDEADESI.js → play-F5LHRKV5.js} +858 -632
- package/dist/cli/{play-62BEE7IX.mjs → play-WINNQ4HZ.mjs} +372 -146
- package/dist/cli/{providers-SXGP44GH.js → providers-BD4IS5U5.js} +10 -10
- package/dist/cli/{providers-X3CUWMFP.mjs → providers-PXGL3FRE.mjs} +7 -7
- package/dist/cli/{quickstart-XQ4426M4.js → quickstart-7LVF6HZF.js} +6 -6
- package/dist/cli/{quickstart-7LN22BKX.mjs → quickstart-XTH3UQWZ.mjs} +4 -4
- package/dist/cli/{run-XXSN3B5A.mjs → run-MBMUENR7.mjs} +26 -26
- package/dist/cli/{run-PBJ4ZJ4W.js → run-NH2BAWPA.js} +41 -41
- package/dist/cli/{search-M75VMADD.mjs → search-BMRWBV66.mjs} +8 -8
- package/dist/cli/search-R3MQJQMT.js +32 -0
- package/dist/cli/{search-output-F6HCFYEI.js → search-output-5NNT337U.js} +22 -16
- package/dist/cli/{search-output-NUQAKWDM.mjs → search-output-QKKRD4MF.mjs} +14 -8
- package/dist/cli/{secrets-J2H6V33R.mjs → secrets-AWEXBTJV.mjs} +7 -7
- package/dist/cli/{secrets-LRYY4QPE.js → secrets-KQSTOREN.js} +16 -16
- package/dist/cli/{sessions-YPF62CZE.js → sessions-DSPLZYCJ.js} +6 -6
- package/dist/cli/{sessions-IMT336UV.mjs → sessions-RO25Q67X.mjs} +5 -5
- package/dist/cli/{settings-35YYC5WA.js → settings-7JXIKNKI.js} +79 -79
- package/dist/cli/{settings-PDWVQIGH.mjs → settings-JMGXGK4Z.mjs} +12 -12
- package/dist/cli/{setup-UR7GOR7H.js → setup-5QFAQQRW.js} +47 -47
- package/dist/cli/{setup-DG5DISSE.mjs → setup-ZQZ47FHB.mjs} +9 -9
- package/dist/cli/skills-EDZXY7DV.js +33 -0
- package/dist/cli/{skills-U6NJD5J7.mjs → skills-W3H2DL56.mjs} +7 -7
- package/dist/cli/{tools-2HGEOELR.mjs → tools-2BZCVNBS.mjs} +19 -19
- package/dist/cli/tools-2EY2ETCZ.js +56 -0
- package/dist/cli/{update-FRAYBAHK.mjs → update-GAWYMGAW.mjs} +9 -9
- package/dist/cli/update-UKDQKNBY.js +33 -0
- package/dist/cli/{workflow-DDKVTF36.mjs → workflow-M6LLHQ2I.mjs} +8 -8
- package/dist/cli/{workflow-JKKLOMBX.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 +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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkNLRTFJGHjs = require('./chunk-NLRTFJGH.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -17,15 +17,15 @@ var _chunkVEVGM6B5js = require('./chunk-VEVGM6B5.js');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkTVW6USSGjs = require('./chunk-TVW6USSG.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkNKPTM7SKjs = require('./chunk-NKPTM7SK.js');
|
|
24
24
|
require('./chunk-D3BCSAN7.js');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunk5DCQWQCPjs = require('./chunk-5DCQWQCP.js');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
var _chunkIAYSWZDJjs = require('./chunk-IAYSWZDJ.js');
|
|
@@ -57,10 +57,10 @@ var _chunkA6QCMBGLjs = require('./chunk-A6QCMBGL.js');
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
var
|
|
60
|
+
var _chunkUQ3LQ6IFjs = require('./chunk-UQ3LQ6IF.js');
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
var
|
|
63
|
+
var _chunkIHMYIHF4js = require('./chunk-IHMYIHF4.js');
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
@@ -73,7 +73,7 @@ var _chunk2AWYJXBXjs = require('./chunk-2AWYJXBX.js');
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
var
|
|
76
|
+
var _chunk775AZTO7js = require('./chunk-775AZTO7.js');
|
|
77
77
|
require('./chunk-E4CABWXL.js');
|
|
78
78
|
|
|
79
79
|
|
|
@@ -84,7 +84,9 @@ require('./chunk-E4CABWXL.js');
|
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
var _chunkAUQQVDABjs = require('./chunk-AUQQVDAB.js');
|
|
88
90
|
|
|
89
91
|
|
|
90
92
|
|
|
@@ -93,18 +95,18 @@ require('./chunk-XDVT3GOM.js');
|
|
|
93
95
|
|
|
94
96
|
|
|
95
97
|
|
|
96
|
-
var
|
|
98
|
+
var _chunkC6QWRSMQjs = require('./chunk-C6QWRSMQ.js');
|
|
97
99
|
|
|
98
100
|
|
|
99
101
|
|
|
100
102
|
|
|
101
103
|
|
|
102
|
-
var
|
|
103
|
-
require('./chunk-
|
|
104
|
+
var _chunkU6WEGDD3js = require('./chunk-U6WEGDD3.js');
|
|
105
|
+
require('./chunk-ECIXZNSW.js');
|
|
104
106
|
|
|
105
107
|
|
|
106
108
|
|
|
107
|
-
var
|
|
109
|
+
var _chunkEC2CVPN5js = require('./chunk-EC2CVPN5.js');
|
|
108
110
|
|
|
109
111
|
|
|
110
112
|
|
|
@@ -118,17 +120,17 @@ var _chunk5KNRQWHEjs = require('./chunk-5KNRQWHE.js');
|
|
|
118
120
|
|
|
119
121
|
|
|
120
122
|
|
|
121
|
-
var
|
|
122
|
-
require('./chunk-
|
|
123
|
+
var _chunkBSKPQB2Pjs = require('./chunk-BSKPQB2P.js');
|
|
124
|
+
require('./chunk-S3WQJ5VG.js');
|
|
123
125
|
|
|
124
126
|
|
|
125
|
-
var
|
|
127
|
+
var _chunkDMNVM34Jjs = require('./chunk-DMNVM34J.js');
|
|
126
128
|
require('./chunk-ALJJRZNJ.js');
|
|
127
129
|
require('./chunk-XNYIZMNQ.js');
|
|
128
130
|
|
|
129
131
|
|
|
130
132
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
131
|
-
require('./chunk-
|
|
133
|
+
require('./chunk-HKGXGGIV.js');
|
|
132
134
|
require('./chunk-OG64RBAC.js');
|
|
133
135
|
|
|
134
136
|
|
|
@@ -2110,7 +2112,7 @@ function resolveField(key, command) {
|
|
|
2110
2112
|
function printSettings(result, json, name) {
|
|
2111
2113
|
result = { ...result, settings: parsePlaySettings(result.settings) };
|
|
2112
2114
|
const selected = fields.filter(([key]) => !name || key === name);
|
|
2113
|
-
|
|
2115
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
2114
2116
|
{
|
|
2115
2117
|
...result,
|
|
2116
2118
|
settings: Object.fromEntries(
|
|
@@ -2154,7 +2156,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2154
2156
|
valueSyntax: field.cli.valueSyntax,
|
|
2155
2157
|
examples: field.cli.examples
|
|
2156
2158
|
}));
|
|
2157
|
-
|
|
2159
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
2158
2160
|
{
|
|
2159
2161
|
fields: descriptions,
|
|
2160
2162
|
render: {
|
|
@@ -2179,7 +2181,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2179
2181
|
async (options, command) => {
|
|
2180
2182
|
if (options.name !== void 0) resolveField(options.name, command);
|
|
2181
2183
|
printSettings(
|
|
2182
|
-
await new (0,
|
|
2184
|
+
await new (0, _chunkIHMYIHF4js.DeeplineClient)().getPlaySettings(options.play),
|
|
2183
2185
|
options.json,
|
|
2184
2186
|
options.name
|
|
2185
2187
|
);
|
|
@@ -2210,7 +2212,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2210
2212
|
);
|
|
2211
2213
|
}
|
|
2212
2214
|
if (options.dryRun) {
|
|
2213
|
-
|
|
2215
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
2214
2216
|
{
|
|
2215
2217
|
dryRun: true,
|
|
2216
2218
|
play,
|
|
@@ -2231,7 +2233,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2231
2233
|
return;
|
|
2232
2234
|
}
|
|
2233
2235
|
printSettings(
|
|
2234
|
-
await new (0,
|
|
2236
|
+
await new (0, _chunkIHMYIHF4js.DeeplineClient)().updatePlaySettings(play, patch),
|
|
2235
2237
|
options.json
|
|
2236
2238
|
);
|
|
2237
2239
|
};
|
|
@@ -2257,13 +2259,13 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2257
2259
|
"--root must be person or team; --limit must be 1\u2013100.",
|
|
2258
2260
|
{ exitCode: 2 }
|
|
2259
2261
|
);
|
|
2260
|
-
const page = await new (0,
|
|
2262
|
+
const page = await new (0, _chunkIHMYIHF4js.DeeplineClient)().listPlaySettingsPaths({
|
|
2261
2263
|
root: options.root,
|
|
2262
2264
|
limit,
|
|
2263
2265
|
cursor: options.cursor
|
|
2264
2266
|
});
|
|
2265
2267
|
const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""}` : null;
|
|
2266
|
-
|
|
2268
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
2267
2269
|
{
|
|
2268
2270
|
...page,
|
|
2269
2271
|
nextCommand,
|
|
@@ -2314,7 +2316,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2314
2316
|
root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _12 => _12.root]), () => ( "person")),
|
|
2315
2317
|
folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.folders]), () => ( []))
|
|
2316
2318
|
};
|
|
2317
|
-
const client = new (0,
|
|
2319
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
2318
2320
|
const paths = [];
|
|
2319
2321
|
let cursor;
|
|
2320
2322
|
do {
|
|
@@ -2376,7 +2378,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2376
2378
|
moved.push(move.playName);
|
|
2377
2379
|
}
|
|
2378
2380
|
}
|
|
2379
|
-
|
|
2381
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
2380
2382
|
{
|
|
2381
2383
|
dryRun: Boolean(options.dryRun),
|
|
2382
2384
|
from: options.from,
|
|
@@ -2504,7 +2506,7 @@ function triggerLines(view) {
|
|
|
2504
2506
|
return lines;
|
|
2505
2507
|
}
|
|
2506
2508
|
function printView(view, json) {
|
|
2507
|
-
|
|
2509
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
2508
2510
|
{
|
|
2509
2511
|
...view,
|
|
2510
2512
|
render: {
|
|
@@ -2517,7 +2519,7 @@ function printView(view, json) {
|
|
|
2517
2519
|
);
|
|
2518
2520
|
}
|
|
2519
2521
|
function printResult(result, json) {
|
|
2520
|
-
|
|
2522
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
2521
2523
|
{
|
|
2522
2524
|
...result,
|
|
2523
2525
|
render: {
|
|
@@ -2547,7 +2549,7 @@ async function mutate(command, options, build) {
|
|
|
2547
2549
|
usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
|
|
2548
2550
|
}
|
|
2549
2551
|
if (options.dryRun) {
|
|
2550
|
-
|
|
2552
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
2551
2553
|
{
|
|
2552
2554
|
dryRun: true,
|
|
2553
2555
|
play: options.play,
|
|
@@ -2566,7 +2568,7 @@ async function mutate(command, options, build) {
|
|
|
2566
2568
|
return;
|
|
2567
2569
|
}
|
|
2568
2570
|
printResult(
|
|
2569
|
-
await new (0,
|
|
2571
|
+
await new (0, _chunkIHMYIHF4js.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
|
|
2570
2572
|
options.json
|
|
2571
2573
|
);
|
|
2572
2574
|
}
|
|
@@ -2599,7 +2601,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2599
2601
|
}).addHelpText("after", help2);
|
|
2600
2602
|
trigger.command("get").description("Show the cron and webhook triggers of a Play.").requiredOption("--play <play>", "Play to read").option("--json", "Emit JSON").addHelpText("after", help2).action(async (options) => {
|
|
2601
2603
|
printView(
|
|
2602
|
-
await new (0,
|
|
2604
|
+
await new (0, _chunkIHMYIHF4js.DeeplineClient)().getPlayTriggerConfig(options.play),
|
|
2603
2605
|
options.json
|
|
2604
2606
|
);
|
|
2605
2607
|
});
|
|
@@ -2643,7 +2645,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2643
2645
|
if (options.auth === void 0) {
|
|
2644
2646
|
if (secrets.length || options.header || options.signaturePrefix)
|
|
2645
2647
|
usage(setWebhook, "--secret/--header need --auth.");
|
|
2646
|
-
const current = await new (0,
|
|
2648
|
+
const current = await new (0, _chunkIHMYIHF4js.DeeplineClient)().getPlayTriggerConfig(
|
|
2647
2649
|
options.play
|
|
2648
2650
|
);
|
|
2649
2651
|
return {
|
|
@@ -2720,7 +2722,7 @@ var KIND_DESCRIPTIONS = {
|
|
|
2720
2722
|
"receipt.skipped": "Saved work result: skipped.",
|
|
2721
2723
|
"runtime.event": "Other event."
|
|
2722
2724
|
};
|
|
2723
|
-
var RUN_LOGS_KIND_HELP =
|
|
2725
|
+
var RUN_LOGS_KIND_HELP = _chunk775AZTO7js.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
|
|
2724
2726
|
kind,
|
|
2725
2727
|
description: KIND_DESCRIPTIONS[kind]
|
|
2726
2728
|
}));
|
|
@@ -2857,9 +2859,9 @@ function configureRunQueryCommandErrors(command, resource) {
|
|
|
2857
2859
|
const args = program.args;
|
|
2858
2860
|
if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
|
|
2859
2861
|
error.exitCode = 2;
|
|
2860
|
-
if (
|
|
2861
|
-
|
|
2862
|
-
Object.assign(new (0,
|
|
2862
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
|
|
2863
|
+
_chunkBSKPQB2Pjs.printJsonError.call(void 0,
|
|
2864
|
+
Object.assign(new (0, _chunk775AZTO7js.RunEventQueryInputError)(error.message), {
|
|
2863
2865
|
exitCode: 2,
|
|
2864
2866
|
retryable: false
|
|
2865
2867
|
})
|
|
@@ -2903,14 +2905,14 @@ function parseQuery(args, resource) {
|
|
|
2903
2905
|
if (VALUE_FLAGS.has(flag)) {
|
|
2904
2906
|
const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
|
|
2905
2907
|
if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
|
|
2906
|
-
throw new (0,
|
|
2908
|
+
throw new (0, _chunk775AZTO7js.RunEventQueryInputError)(
|
|
2907
2909
|
`${flag} requires a value. Use ${flag} <value>.`
|
|
2908
2910
|
);
|
|
2909
2911
|
}
|
|
2910
2912
|
if (flag === "--sum") sums.push(value);
|
|
2911
2913
|
else {
|
|
2912
2914
|
if (values[flag] !== void 0) {
|
|
2913
|
-
throw new (0,
|
|
2915
|
+
throw new (0, _chunk775AZTO7js.RunEventQueryInputError)(
|
|
2914
2916
|
`${flag} may only be supplied once.`
|
|
2915
2917
|
);
|
|
2916
2918
|
}
|
|
@@ -2924,12 +2926,12 @@ function parseQuery(args, resource) {
|
|
|
2924
2926
|
}
|
|
2925
2927
|
if (arg.startsWith("-")) {
|
|
2926
2928
|
const correction = flag === "--log-level" ? "Use --level for structured severity filtering." : flag === "--out" || flag === "--failed" || flag === "--all" ? "Use this flag with a plain runs logs <run-id> text read." : "Use --step, --level, --query, --where, --count, --group-by or --fields; see runs logs --help.";
|
|
2927
|
-
throw new (0,
|
|
2929
|
+
throw new (0, _chunk775AZTO7js.RunEventQueryInputError)(
|
|
2928
2930
|
`Unsupported query flag ${flag}. ${correction}`
|
|
2929
2931
|
);
|
|
2930
2932
|
}
|
|
2931
2933
|
if (runId !== void 0) {
|
|
2932
|
-
throw new (0,
|
|
2934
|
+
throw new (0, _chunk775AZTO7js.RunEventQueryInputError)(
|
|
2933
2935
|
`Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
|
|
2934
2936
|
);
|
|
2935
2937
|
}
|
|
@@ -2937,7 +2939,7 @@ function parseQuery(args, resource) {
|
|
|
2937
2939
|
}
|
|
2938
2940
|
if (switches.has("--fields")) {
|
|
2939
2941
|
if (runId !== void 0) {
|
|
2940
|
-
throw new (0,
|
|
2942
|
+
throw new (0, _chunk775AZTO7js.RunEventQueryInputError)(
|
|
2941
2943
|
"--fields does not use a run ID. Omit the positional run ID."
|
|
2942
2944
|
);
|
|
2943
2945
|
}
|
|
@@ -2950,18 +2952,18 @@ function parseQuery(args, resource) {
|
|
|
2950
2952
|
)
|
|
2951
2953
|
];
|
|
2952
2954
|
if (incompatible.length) {
|
|
2953
|
-
throw new (0,
|
|
2955
|
+
throw new (0, _chunk775AZTO7js.RunEventQueryInputError)(
|
|
2954
2956
|
`--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
|
|
2955
2957
|
);
|
|
2956
2958
|
}
|
|
2957
2959
|
}
|
|
2958
2960
|
if (switches.has("--count") && values["--group-by"] !== void 0) {
|
|
2959
|
-
throw new (0,
|
|
2961
|
+
throw new (0, _chunk775AZTO7js.RunEventQueryInputError)(
|
|
2960
2962
|
"--count cannot be combined with --group-by. Use --group-by for counts per group."
|
|
2961
2963
|
);
|
|
2962
2964
|
}
|
|
2963
2965
|
if (sums.length && switches.has("--count")) {
|
|
2964
|
-
throw new (0,
|
|
2966
|
+
throw new (0, _chunk775AZTO7js.RunEventQueryInputError)(
|
|
2965
2967
|
"--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
|
|
2966
2968
|
);
|
|
2967
2969
|
}
|
|
@@ -2969,7 +2971,7 @@ function parseQuery(args, resource) {
|
|
|
2969
2971
|
if (operation === "count") {
|
|
2970
2972
|
for (const flag of ["--limit", "--cursor", "--payloads"]) {
|
|
2971
2973
|
if (values[flag] !== void 0 || switches.has(flag)) {
|
|
2972
|
-
throw new (0,
|
|
2974
|
+
throw new (0, _chunk775AZTO7js.RunEventQueryInputError)(
|
|
2973
2975
|
`--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
|
|
2974
2976
|
);
|
|
2975
2977
|
}
|
|
@@ -3004,16 +3006,16 @@ function parseQuery(args, resource) {
|
|
|
3004
3006
|
];
|
|
3005
3007
|
}
|
|
3006
3008
|
}
|
|
3007
|
-
const request =
|
|
3009
|
+
const request = _chunk775AZTO7js.normalizeRunEventOperationRequest.call(void 0, body);
|
|
3008
3010
|
const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
|
|
3009
3011
|
const backend = values["--runtime-backend"];
|
|
3010
3012
|
if (backend && backend !== "daytona" && backend !== "modal") {
|
|
3011
|
-
throw new (0,
|
|
3013
|
+
throw new (0, _chunk775AZTO7js.RunEventQueryInputError)(
|
|
3012
3014
|
"--runtime-backend must be daytona or modal."
|
|
3013
3015
|
);
|
|
3014
3016
|
}
|
|
3015
3017
|
if (backend && !namespace) {
|
|
3016
|
-
throw new (0,
|
|
3018
|
+
throw new (0, _chunk775AZTO7js.RunEventQueryInputError)(
|
|
3017
3019
|
"--runtime-backend requires --runtime-namespace."
|
|
3018
3020
|
);
|
|
3019
3021
|
}
|
|
@@ -3060,12 +3062,12 @@ async function handleRunEventQuery(args, resource = "logs") {
|
|
|
3060
3062
|
const failure = error instanceof Error ? error : new Error(String(error));
|
|
3061
3063
|
const record3 = failure;
|
|
3062
3064
|
const status = record3.statusCode;
|
|
3063
|
-
const exitCode = error instanceof
|
|
3065
|
+
const exitCode = error instanceof _chunk775AZTO7js.RunEventQueryInputError || status === 400 || status === 422 || record3.code === "INVALID_RUNTIME_SELECTION" ? 2 : status === 401 || status === 403 || record3.code === "CONFIG_ERROR" || record3.code === "RUNTIME_ENVIRONMENT_TOKEN_REQUIRED" ? 3 : status === 404 ? 4 : 5;
|
|
3064
3066
|
const diagnostic = Object.assign(failure, {
|
|
3065
3067
|
exitCode,
|
|
3066
3068
|
retryable: exitCode === 5
|
|
3067
3069
|
});
|
|
3068
|
-
if (
|
|
3070
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) _chunkBSKPQB2Pjs.printJsonError.call(void 0, diagnostic);
|
|
3069
3071
|
else console.error(`Error: ${diagnostic.message}`);
|
|
3070
3072
|
return exitCode;
|
|
3071
3073
|
}
|
|
@@ -3080,7 +3082,7 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3080
3082
|
...criteria
|
|
3081
3083
|
} = request;
|
|
3082
3084
|
const options = { ...criteria, ...runtime ? { runtime } : {} };
|
|
3083
|
-
const client = new (0,
|
|
3085
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
3084
3086
|
let result;
|
|
3085
3087
|
if (request.operation === "fields") {
|
|
3086
3088
|
result = await client.runs[resource].fields(runtime ? { runtime } : {});
|
|
@@ -3146,13 +3148,13 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3146
3148
|
lines.push(`Next page: ${nextPage}`);
|
|
3147
3149
|
}
|
|
3148
3150
|
}
|
|
3149
|
-
|
|
3151
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
3150
3152
|
{
|
|
3151
3153
|
...result,
|
|
3152
3154
|
...nextPage ? { next: { page: nextPage } } : {},
|
|
3153
3155
|
render: { sections: [{ title: `run ${resource}`, lines }] }
|
|
3154
3156
|
},
|
|
3155
|
-
{ json:
|
|
3157
|
+
{ json: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
|
|
3156
3158
|
` }
|
|
3157
3159
|
);
|
|
3158
3160
|
return 0;
|
|
@@ -3223,7 +3225,7 @@ function rowCountsFrom(input) {
|
|
|
3223
3225
|
return { completed: c, failed: f, total: known };
|
|
3224
3226
|
}
|
|
3225
3227
|
function decodeRunStatus(status) {
|
|
3226
|
-
return
|
|
3228
|
+
return _chunkAUQQVDABjs.decodePlayRunPublicStatus.call(void 0, status);
|
|
3227
3229
|
}
|
|
3228
3230
|
function deriveRunExecutionState(input) {
|
|
3229
3231
|
const status = decodeRunStatus(input.status);
|
|
@@ -4071,7 +4073,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4071
4073
|
...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
|
|
4072
4074
|
);
|
|
4073
4075
|
}
|
|
4074
|
-
const response = await new (0,
|
|
4076
|
+
const response = await new (0, _chunkIHMYIHF4js.DeeplineClient)().runs.getReceipts(runId, {
|
|
4075
4077
|
keys
|
|
4076
4078
|
});
|
|
4077
4079
|
const failed = response.receipts.filter(
|
|
@@ -4083,7 +4085,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4083
4085
|
JSON.stringify(response, null, 2) + "\n",
|
|
4084
4086
|
{ flag: "wx", mode: 384 }
|
|
4085
4087
|
);
|
|
4086
|
-
|
|
4088
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
4087
4089
|
{
|
|
4088
4090
|
runId,
|
|
4089
4091
|
out: options.out,
|
|
@@ -4093,7 +4095,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4093
4095
|
{ json: true }
|
|
4094
4096
|
);
|
|
4095
4097
|
} else {
|
|
4096
|
-
|
|
4098
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
|
|
4097
4099
|
}
|
|
4098
4100
|
if (failed)
|
|
4099
4101
|
process.exitCode = response.receipts.some(
|
|
@@ -4132,7 +4134,7 @@ includes nextCommand when another page is available.
|
|
|
4132
4134
|
{ exitCode: 2 }
|
|
4133
4135
|
);
|
|
4134
4136
|
}
|
|
4135
|
-
const page = await new (0,
|
|
4137
|
+
const page = await new (0, _chunkIHMYIHF4js.DeeplineClient)().runs.children(parentRunId, {
|
|
4136
4138
|
launchKey: options.launchKey,
|
|
4137
4139
|
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
4138
4140
|
limit
|
|
@@ -4147,7 +4149,7 @@ includes nextCommand when another page is available.
|
|
|
4147
4149
|
"--limit",
|
|
4148
4150
|
String(limit)
|
|
4149
4151
|
].join(" ") : null;
|
|
4150
|
-
|
|
4152
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
4151
4153
|
{
|
|
4152
4154
|
parentRunId,
|
|
4153
4155
|
launchKey: options.launchKey,
|
|
@@ -4183,7 +4185,7 @@ async function handleRunsHistory(options) {
|
|
|
4183
4185
|
throw new Error("--limit must be a positive integer.");
|
|
4184
4186
|
}
|
|
4185
4187
|
}
|
|
4186
|
-
const page = await new (0,
|
|
4188
|
+
const page = await new (0, _chunkIHMYIHF4js.DeeplineClient)().runs.history({
|
|
4187
4189
|
cursor: options.cursor,
|
|
4188
4190
|
orgId: options.org,
|
|
4189
4191
|
search: options.search,
|
|
@@ -4199,7 +4201,7 @@ async function handleRunsHistory(options) {
|
|
|
4199
4201
|
);
|
|
4200
4202
|
}
|
|
4201
4203
|
if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
|
|
4202
|
-
|
|
4204
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
4203
4205
|
{ ...page, render: { sections: [{ title: "Run history", lines }] } },
|
|
4204
4206
|
options.json ? { json: true } : {}
|
|
4205
4207
|
);
|
|
@@ -4251,12 +4253,12 @@ async function runRunsRerunCommand(runId, options) {
|
|
|
4251
4253
|
return 1;
|
|
4252
4254
|
}
|
|
4253
4255
|
}
|
|
4254
|
-
const result = await new (0,
|
|
4256
|
+
const result = await new (0, _chunkIHMYIHF4js.DeeplineClient)().runs.rerun(runId, {
|
|
4255
4257
|
...idempotencyKey === void 0 ? {} : { idempotencyKey },
|
|
4256
4258
|
...inputOverrides === void 0 ? {} : { inputOverrides }
|
|
4257
4259
|
});
|
|
4258
|
-
if (
|
|
4259
|
-
|
|
4260
|
+
if (_chunkBSKPQB2Pjs.shouldEmitJson.call(void 0, options.json)) {
|
|
4261
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0, result, { json: true });
|
|
4260
4262
|
} else if (result.rateLimited) {
|
|
4261
4263
|
console.log(`
|
|
4262
4264
|
${result.rateLimited.message}`);
|
|
@@ -5080,13 +5082,13 @@ var RunDataset = class _RunDataset {
|
|
|
5080
5082
|
const absolutePath = _path.resolve.call(void 0, outPath);
|
|
5081
5083
|
_fs.writeFileSync.call(void 0,
|
|
5082
5084
|
absolutePath,
|
|
5083
|
-
`${JSON.stringify(
|
|
5085
|
+
`${JSON.stringify(_chunkTVW6USSGjs.orderRunExportJson.call(void 0, this.rows), null, 2)}
|
|
5084
5086
|
`,
|
|
5085
5087
|
"utf-8"
|
|
5086
5088
|
);
|
|
5087
5089
|
return absolutePath;
|
|
5088
5090
|
}
|
|
5089
|
-
return
|
|
5091
|
+
return _chunkTVW6USSGjs.writeRunDatasetCsv.call(void 0, {
|
|
5090
5092
|
rows: this.rows,
|
|
5091
5093
|
columns: this.#info.columns,
|
|
5092
5094
|
outPath
|
|
@@ -6783,7 +6785,7 @@ function renderOutcome(outcome) {
|
|
|
6783
6785
|
function printResult2(input) {
|
|
6784
6786
|
const failed = input.status === "failed" || input.status === "cancelled";
|
|
6785
6787
|
if (failed) process.exitCode = 1;
|
|
6786
|
-
|
|
6788
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
6787
6789
|
{
|
|
6788
6790
|
deployment: { ...input.deployment, status: input.status },
|
|
6789
6791
|
plays: input.outcomes,
|
|
@@ -6808,7 +6810,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6808
6810
|
const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
|
|
6809
6811
|
throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
|
|
6810
6812
|
});
|
|
6811
|
-
const { http, config } =
|
|
6813
|
+
const { http, config } = _chunkBSKPQB2Pjs.getAuthedHttpClient.call(void 0, );
|
|
6812
6814
|
const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
|
|
6813
6815
|
const startDeployment = () => http.post("/api/v2/deployments", {
|
|
6814
6816
|
deliveryId,
|
|
@@ -6835,7 +6837,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6835
6837
|
},
|
|
6836
6838
|
{
|
|
6837
6839
|
bundle: bundleDeployPlayFile,
|
|
6838
|
-
fetchImpl:
|
|
6840
|
+
fetchImpl: _chunkDMNVM34Jjs.fetchWithDeploymentProtection,
|
|
6839
6841
|
// The plays are already here: "opening" the source is naming it.
|
|
6840
6842
|
openSource: async () => ({
|
|
6841
6843
|
open: async () => ({ repoRoot: root })
|
|
@@ -6961,7 +6963,7 @@ async function checkLocalPlayGraph(input) {
|
|
|
6961
6963
|
// src/cli/renderers/local-play-execution.ts
|
|
6962
6964
|
function renderLocalPlayExecutionPlan(plan, options = {}) {
|
|
6963
6965
|
if (options.dryRun) {
|
|
6964
|
-
|
|
6966
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
|
|
6965
6967
|
return;
|
|
6966
6968
|
}
|
|
6967
6969
|
process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
|
|
@@ -7133,7 +7135,7 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7133
7135
|
const startedAt = Date.now();
|
|
7134
7136
|
try {
|
|
7135
7137
|
const result = run();
|
|
7136
|
-
|
|
7138
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
7137
7139
|
phase,
|
|
7138
7140
|
ms: Date.now() - startedAt,
|
|
7139
7141
|
ok: true,
|
|
@@ -7141,7 +7143,7 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7141
7143
|
});
|
|
7142
7144
|
return result;
|
|
7143
7145
|
} catch (error) {
|
|
7144
|
-
|
|
7146
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
7145
7147
|
phase,
|
|
7146
7148
|
ms: Date.now() - startedAt,
|
|
7147
7149
|
ok: false,
|
|
@@ -7154,6 +7156,24 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7154
7156
|
function sleep(ms) {
|
|
7155
7157
|
return new Promise((resolve4) => setTimeout(resolve4, ms));
|
|
7156
7158
|
}
|
|
7159
|
+
function sleepOrAbort(ms, signal) {
|
|
7160
|
+
return new Promise((resolve4) => {
|
|
7161
|
+
if (signal.aborted) {
|
|
7162
|
+
resolve4();
|
|
7163
|
+
return;
|
|
7164
|
+
}
|
|
7165
|
+
const onAbort = () => {
|
|
7166
|
+
clearTimeout(timeout);
|
|
7167
|
+
signal.removeEventListener("abort", onAbort);
|
|
7168
|
+
resolve4();
|
|
7169
|
+
};
|
|
7170
|
+
const timeout = setTimeout(() => {
|
|
7171
|
+
signal.removeEventListener("abort", onAbort);
|
|
7172
|
+
resolve4();
|
|
7173
|
+
}, ms);
|
|
7174
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
7175
|
+
});
|
|
7176
|
+
}
|
|
7157
7177
|
function parseReferencedPlayTarget(target) {
|
|
7158
7178
|
const trimmed = target.trim();
|
|
7159
7179
|
const slashIndex = trimmed.indexOf("/");
|
|
@@ -7601,7 +7621,7 @@ function collectLocalFileInputRefs(value, inputPath, key, out) {
|
|
|
7601
7621
|
if (!trimmed || isUrlValue(trimmed)) {
|
|
7602
7622
|
return;
|
|
7603
7623
|
}
|
|
7604
|
-
const keyIsCsvData = key ===
|
|
7624
|
+
const keyIsCsvData = key === _chunkAUQQVDABjs.CSV_DATA_INPUT_KEY;
|
|
7605
7625
|
const endsWithCsv = /\.csv$/i.test(trimmed);
|
|
7606
7626
|
const looksLikeFile = /\.[a-z0-9]{1,8}$/i.test(trimmed);
|
|
7607
7627
|
if (keyIsCsvData) {
|
|
@@ -7632,14 +7652,14 @@ function collectLocalFileInputRefs(value, inputPath, key, out) {
|
|
|
7632
7652
|
}
|
|
7633
7653
|
}
|
|
7634
7654
|
function preflightLocalFileInputs(runtimeInput) {
|
|
7635
|
-
if (
|
|
7636
|
-
const csvValue = runtimeInput[
|
|
7655
|
+
if (_chunkAUQQVDABjs.CSV_DATA_INPUT_KEY in runtimeInput) {
|
|
7656
|
+
const csvValue = runtimeInput[_chunkAUQQVDABjs.CSV_DATA_INPUT_KEY];
|
|
7637
7657
|
if (typeof csvValue === "string" && csvValue.trim().length === 0) {
|
|
7638
7658
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
7639
|
-
`Input ${
|
|
7659
|
+
`Input ${_chunkAUQQVDABjs.CSV_DATA_INPUT_KEY} is an empty string. Provide a path to a CSV file (or a CSV URL). No run was created.`,
|
|
7640
7660
|
void 0,
|
|
7641
7661
|
"PLAY_INPUT_FILE_PREFLIGHT",
|
|
7642
|
-
{ inputPath:
|
|
7662
|
+
{ inputPath: _chunkAUQQVDABjs.CSV_DATA_INPUT_KEY, reason: "csv_empty_string" }
|
|
7643
7663
|
);
|
|
7644
7664
|
}
|
|
7645
7665
|
}
|
|
@@ -7706,7 +7726,7 @@ var NODE_STAGED_FILE_CODEC = {
|
|
|
7706
7726
|
)
|
|
7707
7727
|
};
|
|
7708
7728
|
async function stageFileInputArgs(input) {
|
|
7709
|
-
return
|
|
7729
|
+
return _chunkAUQQVDABjs.stageFileInputs.call(void 0, {
|
|
7710
7730
|
stage: (files) => input.client.stagePlayFiles(files),
|
|
7711
7731
|
runtimeInput: input.runtimeInput,
|
|
7712
7732
|
bindings: input.bindings,
|
|
@@ -7730,7 +7750,7 @@ function stageFile(logicalPath, absolutePath) {
|
|
|
7730
7750
|
logicalPath,
|
|
7731
7751
|
contentBase64: buffer.toString("base64"),
|
|
7732
7752
|
contentHash: _crypto.createHash.call(void 0, "sha256").update(buffer).digest("hex"),
|
|
7733
|
-
contentType:
|
|
7753
|
+
contentType: _chunkAUQQVDABjs.stagedFileContentType.call(void 0, absolutePath),
|
|
7734
7754
|
bytes: buffer.byteLength
|
|
7735
7755
|
};
|
|
7736
7756
|
}
|
|
@@ -7929,7 +7949,7 @@ function playStatusErrorText(status) {
|
|
|
7929
7949
|
function isRetryablePendingStartFailure(status) {
|
|
7930
7950
|
if (status.status !== "failed") return false;
|
|
7931
7951
|
if (status.runId && status.runId !== "pending") return false;
|
|
7932
|
-
return
|
|
7952
|
+
return _chunk775AZTO7js.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
|
|
7933
7953
|
}
|
|
7934
7954
|
function isAmbiguousPlayStartOutcomeError(error) {
|
|
7935
7955
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && typeof error.statusCode === "number") {
|
|
@@ -7957,16 +7977,17 @@ var RetryablePlayStartAttemptError = class extends Error {
|
|
|
7957
7977
|
};
|
|
7958
7978
|
var PlayStartOutcomeUnknownError = (_class = class extends _chunkDIAWYWT5js.DeeplineError {
|
|
7959
7979
|
__init() {this.retryable = false}
|
|
7960
|
-
constructor(playName, cause) {
|
|
7980
|
+
constructor(playName, cause, workflowId) {
|
|
7961
7981
|
const causeMessage = cause instanceof Error ? cause.message : String(cause);
|
|
7962
|
-
const recoveryCommand = `deepline runs list --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)} --json`;
|
|
7982
|
+
const recoveryCommand = workflowId ? `deepline runs get ${_chunkAID3OYVJjs.shellQuote.call(void 0, workflowId)} --json` : `deepline runs list --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)} --json`;
|
|
7963
7983
|
super(
|
|
7964
|
-
`Play ${playName} may have started, but the CLI did not receive confirmation. Do not run it again until you inspect the original workspace with: ${recoveryCommand}`,
|
|
7984
|
+
`Play ${playName}${workflowId ? ` (${workflowId})` : ""} may have started, but the CLI did not receive confirmation. Do not run it again until you inspect the original workspace with: ${recoveryCommand}`,
|
|
7965
7985
|
cause instanceof _chunkDIAWYWT5js.DeeplineError ? cause.statusCode : void 0,
|
|
7966
7986
|
"PLAY_START_OUTCOME_UNKNOWN",
|
|
7967
7987
|
{
|
|
7968
7988
|
outcome: "unknown",
|
|
7969
7989
|
playName,
|
|
7990
|
+
...workflowId ? { runId: workflowId, workflowId } : {},
|
|
7970
7991
|
recoveryCommand,
|
|
7971
7992
|
recoveryScope: "same_authenticated_host_and_workspace",
|
|
7972
7993
|
causeMessage
|
|
@@ -7978,13 +7999,13 @@ var PlayStartOutcomeUnknownError = (_class = class extends _chunkDIAWYWT5js.Deep
|
|
|
7978
7999
|
}, _class);
|
|
7979
8000
|
function watchSurfaceReaches(state, provenance, level) {
|
|
7980
8001
|
const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
|
|
7981
|
-
if (!
|
|
8002
|
+
if (!_chunk775AZTO7js.logLevelReaches.call(void 0, level, minimumLevel)) {
|
|
7982
8003
|
return false;
|
|
7983
8004
|
}
|
|
7984
|
-
if (
|
|
8005
|
+
if (_chunk775AZTO7js.logProvenanceReaches.call(void 0, provenance, "watch")) {
|
|
7985
8006
|
return true;
|
|
7986
8007
|
}
|
|
7987
|
-
return state.verbose === true &&
|
|
8008
|
+
return state.verbose === true && _chunk775AZTO7js.logProvenanceReaches.call(void 0, provenance, "debug");
|
|
7988
8009
|
}
|
|
7989
8010
|
function getEventPayload(event) {
|
|
7990
8011
|
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
@@ -8486,7 +8507,7 @@ function resolveRunPlayName(status, runId) {
|
|
|
8486
8507
|
}
|
|
8487
8508
|
function openPlayDashboard(dashboardUrl, open2) {
|
|
8488
8509
|
if (open2 && dashboardUrl) {
|
|
8489
|
-
|
|
8510
|
+
_chunkBSKPQB2Pjs.openInBrowser.call(void 0, dashboardUrl);
|
|
8490
8511
|
}
|
|
8491
8512
|
}
|
|
8492
8513
|
function printPlayLogLines(input) {
|
|
@@ -8516,6 +8537,7 @@ function assertPlayWaitNotTimedOut(input) {
|
|
|
8516
8537
|
}
|
|
8517
8538
|
}
|
|
8518
8539
|
var RUN_WATCH_RETRY_INTERVAL_MS = 2e3;
|
|
8540
|
+
var RUN_WATCH_ADMISSION_VISIBILITY_RETRY_INTERVAL_MS = 500;
|
|
8519
8541
|
function isAdmittedRunVisibilityDelay(error) {
|
|
8520
8542
|
return error instanceof _chunkDIAWYWT5js.DeeplineError && error.statusCode === 404 && error.message.trim() === "Workflow run not found.";
|
|
8521
8543
|
}
|
|
@@ -8566,7 +8588,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8566
8588
|
...input.fullJson === void 0 ? {} : { full: input.fullJson }
|
|
8567
8589
|
});
|
|
8568
8590
|
} catch (error) {
|
|
8569
|
-
if (
|
|
8591
|
+
if (_chunk775AZTO7js.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
8570
8592
|
return null;
|
|
8571
8593
|
}
|
|
8572
8594
|
throw error;
|
|
@@ -8638,6 +8660,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8638
8660
|
};
|
|
8639
8661
|
try {
|
|
8640
8662
|
for (; ; ) {
|
|
8663
|
+
let admittedRunNotVisible = false;
|
|
8641
8664
|
try {
|
|
8642
8665
|
let terminalFromWatch = null;
|
|
8643
8666
|
for await (const event of input.client.watchRunEvents(
|
|
@@ -8646,9 +8669,9 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8646
8669
|
signal: controller.signal,
|
|
8647
8670
|
deferLogs: !input.emitLogs,
|
|
8648
8671
|
omitTerminalLogs: !input.emitLogs,
|
|
8649
|
-
...
|
|
8672
|
+
..._chunkU6WEGDD3js.isCliTraceEnabled.call(void 0, ) ? {
|
|
8650
8673
|
onPoll: (observation) => {
|
|
8651
|
-
|
|
8674
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
8652
8675
|
phase: "play_watch_poll",
|
|
8653
8676
|
workflowId: input.workflowId,
|
|
8654
8677
|
ms: observation.durationMs,
|
|
@@ -8662,7 +8685,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8662
8685
|
full: input.fullJson,
|
|
8663
8686
|
billing: false,
|
|
8664
8687
|
onStatus: async (status) => {
|
|
8665
|
-
|
|
8688
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
8666
8689
|
phase: "play_watch_terminal_status",
|
|
8667
8690
|
workflowId: input.workflowId,
|
|
8668
8691
|
full: input.fullJson === true
|
|
@@ -8674,26 +8697,30 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8674
8697
|
}
|
|
8675
8698
|
}
|
|
8676
8699
|
)) {
|
|
8677
|
-
const
|
|
8678
|
-
if (
|
|
8700
|
+
const terminal2 = await handleLiveEvent(event);
|
|
8701
|
+
if (terminal2) terminalFromWatch = terminal2;
|
|
8679
8702
|
}
|
|
8680
8703
|
if (terminalFromWatch) return terminalFromWatch;
|
|
8681
8704
|
} catch (error) {
|
|
8682
8705
|
if (timedOut || controller.signal.aborted) break;
|
|
8683
8706
|
if (!isAdmittedRunVisibilityDelay(error)) throw error;
|
|
8707
|
+
admittedRunNotVisible = true;
|
|
8684
8708
|
if (!visibilityNoticeSent && !input.jsonOutput) {
|
|
8685
8709
|
input.progress.writeLine(
|
|
8686
|
-
`[play watch] run is accepted and waiting for its snapshot; checking again in ${
|
|
8710
|
+
`[play watch] run is accepted and waiting for its snapshot; checking again in ${RUN_WATCH_ADMISSION_VISIBILITY_RETRY_INTERVAL_MS / 1e3}s`
|
|
8687
8711
|
);
|
|
8688
8712
|
visibilityNoticeSent = true;
|
|
8689
8713
|
}
|
|
8690
8714
|
}
|
|
8691
|
-
|
|
8692
|
-
|
|
8715
|
+
if (!admittedRunNotVisible) {
|
|
8716
|
+
const terminal2 = await fetchTerminalStatus();
|
|
8717
|
+
if (terminal2) return terminal2;
|
|
8718
|
+
}
|
|
8693
8719
|
assertPlayWaitNotTimedOut({ ...input, lastPhase });
|
|
8694
8720
|
const nextWait = remainingWaitMs();
|
|
8721
|
+
const retryIntervalMs = admittedRunNotVisible ? RUN_WATCH_ADMISSION_VISIBILITY_RETRY_INTERVAL_MS : RUN_WATCH_RETRY_INTERVAL_MS;
|
|
8695
8722
|
await sleep(
|
|
8696
|
-
nextWait === null ?
|
|
8723
|
+
nextWait === null ? retryIntervalMs : Math.min(retryIntervalMs, Math.max(1, nextWait))
|
|
8697
8724
|
);
|
|
8698
8725
|
}
|
|
8699
8726
|
const terminal = await fetchTerminalStatus();
|
|
@@ -8711,6 +8738,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8711
8738
|
}
|
|
8712
8739
|
async function startAndWaitForPlayCompletion(input) {
|
|
8713
8740
|
const startedAt = Date.now();
|
|
8741
|
+
const remainingWaitMs = () => input.waitTimeoutMs === null ? null : input.waitTimeoutMs - (Date.now() - startedAt);
|
|
8714
8742
|
const controller = new AbortController();
|
|
8715
8743
|
let timedOut = false;
|
|
8716
8744
|
const timeout = input.waitTimeoutMs === null ? null : setTimeout(
|
|
@@ -8721,32 +8749,152 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8721
8749
|
Math.max(1, input.waitTimeoutMs)
|
|
8722
8750
|
);
|
|
8723
8751
|
let started;
|
|
8752
|
+
let knownWorkflowId = null;
|
|
8724
8753
|
let inlineCompatibility = input.cliAdmission === true;
|
|
8725
8754
|
const request = input.request;
|
|
8755
|
+
const callerIntentV2 = input.cliAdmission === true && input.disableCallerIntentV2 !== true && !input.onSubmission && request.maxTotalCredits === void 0;
|
|
8726
8756
|
try {
|
|
8727
|
-
|
|
8728
|
-
|
|
8757
|
+
if (input.cliAdmission) {
|
|
8758
|
+
const prepared = await input.client.preparePlayRunAdmission(request, {
|
|
8759
|
+
cliAdmission: true,
|
|
8760
|
+
callerIntentV2,
|
|
8729
8761
|
signal: controller.signal,
|
|
8730
|
-
onSubmission: input.onSubmission
|
|
8731
|
-
...input.cliAdmission ? { cliAdmission: true } : {}
|
|
8762
|
+
onSubmission: input.onSubmission
|
|
8732
8763
|
});
|
|
8733
|
-
|
|
8734
|
-
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
)
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8764
|
+
knownWorkflowId = _nullishCoalesce(prepared.workflowId, () => ( null));
|
|
8765
|
+
let useCliAdmission = true;
|
|
8766
|
+
let attempt = 0;
|
|
8767
|
+
let startAttempt = 0;
|
|
8768
|
+
const retryDelays = prepared.supportsCallerIntent ? PLAY_START_TRANSIENT_RETRY_DELAYS_MS : [];
|
|
8769
|
+
for (; ; ) {
|
|
8770
|
+
const currentAttempt = ++startAttempt;
|
|
8771
|
+
const postStartedAt = Date.now();
|
|
8772
|
+
try {
|
|
8773
|
+
started = await prepared.start({
|
|
8774
|
+
signal: controller.signal,
|
|
8775
|
+
cliAdmission: useCliAdmission
|
|
8776
|
+
});
|
|
8777
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
8778
|
+
phase: "cli.play_start_admission_attempt",
|
|
8779
|
+
ms: Date.now() - postStartedAt,
|
|
8780
|
+
ok: true,
|
|
8781
|
+
playName: input.playName,
|
|
8782
|
+
workflowId: started.workflowId,
|
|
8783
|
+
attempt: currentAttempt,
|
|
8784
|
+
transport: "json",
|
|
8785
|
+
cliAdmission: useCliAdmission
|
|
8786
|
+
});
|
|
8787
|
+
break;
|
|
8788
|
+
} catch (error) {
|
|
8789
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
8790
|
+
phase: "cli.play_start_admission_attempt",
|
|
8791
|
+
ms: Date.now() - postStartedAt,
|
|
8792
|
+
ok: false,
|
|
8793
|
+
playName: input.playName,
|
|
8794
|
+
attempt: currentAttempt,
|
|
8795
|
+
transport: "json",
|
|
8796
|
+
cliAdmission: useCliAdmission,
|
|
8797
|
+
reason: error instanceof Error ? error.message : String(error)
|
|
8798
|
+
});
|
|
8799
|
+
if (timedOut || controller.signal.aborted) {
|
|
8800
|
+
assertPlayWaitNotTimedOut({
|
|
8801
|
+
workflowId: _nullishCoalesce(prepared.workflowId, () => ( "")),
|
|
8802
|
+
startedAt,
|
|
8803
|
+
waitTimeoutMs: input.waitTimeoutMs
|
|
8804
|
+
});
|
|
8805
|
+
throw new PlayStartOutcomeUnknownError(
|
|
8806
|
+
input.playName,
|
|
8807
|
+
error,
|
|
8808
|
+
prepared.workflowId
|
|
8809
|
+
);
|
|
8810
|
+
}
|
|
8811
|
+
if (callerIntentV2 && error instanceof _chunkAUQQVDABjs.CliPlayAdmissionCallerIntentV2UnsupportedError) {
|
|
8812
|
+
if (currentAttempt > 1) {
|
|
8813
|
+
throw new PlayStartOutcomeUnknownError(
|
|
8814
|
+
input.playName,
|
|
8815
|
+
error,
|
|
8816
|
+
prepared.workflowId
|
|
8817
|
+
);
|
|
8818
|
+
}
|
|
8819
|
+
const remaining = remainingWaitMs();
|
|
8820
|
+
assertPlayWaitNotTimedOut({
|
|
8821
|
+
workflowId: "",
|
|
8822
|
+
startedAt,
|
|
8823
|
+
waitTimeoutMs: input.waitTimeoutMs
|
|
8824
|
+
});
|
|
8825
|
+
if (timeout) clearTimeout(timeout);
|
|
8826
|
+
return await startAndWaitForPlayCompletion({
|
|
8827
|
+
...input,
|
|
8828
|
+
disableCallerIntentV2: true,
|
|
8829
|
+
waitTimeoutMs: remaining === null ? null : Math.max(1, remaining)
|
|
8830
|
+
});
|
|
8831
|
+
}
|
|
8832
|
+
if (useCliAdmission && error instanceof _chunkAUQQVDABjs.CliPlayAdmissionUnsupportedError) {
|
|
8833
|
+
if (currentAttempt > 1) {
|
|
8834
|
+
throw new PlayStartOutcomeUnknownError(
|
|
8835
|
+
input.playName,
|
|
8836
|
+
error,
|
|
8837
|
+
prepared.workflowId
|
|
8838
|
+
);
|
|
8839
|
+
}
|
|
8840
|
+
await _chunkC6QWRSMQjs.checkPlayRunCompatibility.call(void 0,
|
|
8841
|
+
input.client.baseUrl,
|
|
8842
|
+
input.maintenancePolicy
|
|
8843
|
+
);
|
|
8844
|
+
controller.signal.throwIfAborted();
|
|
8845
|
+
useCliAdmission = false;
|
|
8846
|
+
inlineCompatibility = false;
|
|
8847
|
+
continue;
|
|
8848
|
+
}
|
|
8849
|
+
const retryDelayMs = retryDelays[attempt];
|
|
8850
|
+
if (retryDelayMs === void 0 || !isAmbiguousPlayStartOutcomeError(error)) {
|
|
8851
|
+
throw error;
|
|
8852
|
+
}
|
|
8853
|
+
if (!input.jsonOutput) {
|
|
8854
|
+
input.progress.writeLine(
|
|
8855
|
+
`[play start] response was ambiguous; retrying the same caller intent (${error instanceof Error ? error.message : String(error)})`
|
|
8856
|
+
);
|
|
8857
|
+
}
|
|
8858
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
8859
|
+
phase: "cli.play_start_json_retry",
|
|
8860
|
+
ms: 0,
|
|
8861
|
+
ok: true,
|
|
8862
|
+
playName: input.playName,
|
|
8863
|
+
attempt: attempt + 1,
|
|
8864
|
+
reason: error instanceof Error ? error.message : String(error),
|
|
8865
|
+
recovery: "same_caller_intent"
|
|
8866
|
+
});
|
|
8867
|
+
await sleepOrAbort(retryDelayMs, controller.signal);
|
|
8868
|
+
if (timedOut || controller.signal.aborted) {
|
|
8869
|
+
assertPlayWaitNotTimedOut({
|
|
8870
|
+
workflowId: _nullishCoalesce(prepared.workflowId, () => ( "")),
|
|
8871
|
+
startedAt,
|
|
8872
|
+
waitTimeoutMs: input.waitTimeoutMs
|
|
8873
|
+
});
|
|
8874
|
+
}
|
|
8875
|
+
attempt += 1;
|
|
8876
|
+
}
|
|
8877
|
+
}
|
|
8878
|
+
} else {
|
|
8879
|
+
const prepared = await _asyncNullishCoalesce(input.preparedAdmission, async () => ( await input.client.preparePlayRunAdmission(request, {
|
|
8880
|
+
...input.onSubmission ? { onSubmission: input.onSubmission } : {},
|
|
8881
|
+
signal: controller.signal
|
|
8882
|
+
})));
|
|
8883
|
+
knownWorkflowId = _nullishCoalesce(prepared.workflowId, () => ( null));
|
|
8884
|
+
assertPlayWaitNotTimedOut({
|
|
8885
|
+
workflowId: _nullishCoalesce(prepared.workflowId, () => ( "")),
|
|
8886
|
+
startedAt,
|
|
8887
|
+
waitTimeoutMs: input.waitTimeoutMs
|
|
8888
|
+
});
|
|
8889
|
+
started = await prepared.start({
|
|
8742
8890
|
signal: controller.signal,
|
|
8743
|
-
|
|
8891
|
+
cliAdmission: false
|
|
8744
8892
|
});
|
|
8745
8893
|
}
|
|
8746
8894
|
} catch (error) {
|
|
8747
8895
|
if (timedOut) {
|
|
8748
8896
|
assertPlayWaitNotTimedOut({
|
|
8749
|
-
workflowId: "",
|
|
8897
|
+
workflowId: _nullishCoalesce(knownWorkflowId, () => ( "")),
|
|
8750
8898
|
startedAt,
|
|
8751
8899
|
waitTimeoutMs: input.waitTimeoutMs
|
|
8752
8900
|
});
|
|
@@ -8780,12 +8928,13 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8780
8928
|
}
|
|
8781
8929
|
openPlayDashboard(dashboardUrl, _nullishCoalesce(input.open, () => ( false)));
|
|
8782
8930
|
input.progress.phase("running");
|
|
8783
|
-
|
|
8931
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
8784
8932
|
phase: "cli.play_start_admitted",
|
|
8785
8933
|
ms: Date.now() - startedAt,
|
|
8786
8934
|
ok: true,
|
|
8787
8935
|
playName: input.playName,
|
|
8788
8936
|
workflowId,
|
|
8937
|
+
transport: "json",
|
|
8789
8938
|
inlineCompatibility
|
|
8790
8939
|
});
|
|
8791
8940
|
const initialTerminal = readRecord(started.finalStatus);
|
|
@@ -8797,7 +8946,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8797
8946
|
startedAt,
|
|
8798
8947
|
waitTimeoutMs: input.waitTimeoutMs
|
|
8799
8948
|
});
|
|
8800
|
-
const initialStatus =
|
|
8949
|
+
const initialStatus = _chunk775AZTO7js.normalizePlayStatus.call(void 0, initialTerminal);
|
|
8801
8950
|
const status2 = await resolvePlayRunOutputStatus({
|
|
8802
8951
|
client: input.client,
|
|
8803
8952
|
status: initialStatus,
|
|
@@ -8805,7 +8954,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8805
8954
|
jsonOutput: input.jsonOutput,
|
|
8806
8955
|
fromDurableStatus: true
|
|
8807
8956
|
});
|
|
8808
|
-
|
|
8957
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
8809
8958
|
phase: "play_watch_terminal_status",
|
|
8810
8959
|
workflowId,
|
|
8811
8960
|
full: true,
|
|
@@ -8837,116 +8986,168 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8837
8986
|
}
|
|
8838
8987
|
async function startAndWaitForPlayCompletionByStream(input) {
|
|
8839
8988
|
const admissionStartedAt = Date.now();
|
|
8840
|
-
const
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8989
|
+
const admissionDeadlineAt = input.waitTimeoutMs === null ? void 0 : admissionStartedAt + input.waitTimeoutMs;
|
|
8990
|
+
const admissionDeadline = new AbortController();
|
|
8991
|
+
let admissionTimedOut = false;
|
|
8992
|
+
const admissionTimeout = input.waitTimeoutMs === null ? null : setTimeout(
|
|
8993
|
+
() => {
|
|
8994
|
+
admissionTimedOut = true;
|
|
8995
|
+
admissionDeadline.abort();
|
|
8996
|
+
_optionalChain([input, 'access', _308 => _308.cancelAdmissionCapability, 'optionalCall', _309 => _309()]);
|
|
8844
8997
|
},
|
|
8845
|
-
|
|
8846
|
-
cliAdmission: input.cliAdmission,
|
|
8847
|
-
onSubmission: input.onSubmission,
|
|
8848
|
-
...input.admissionCapability ? { admissionCapability: input.admissionCapability } : {}
|
|
8849
|
-
}
|
|
8998
|
+
Math.max(1, input.waitTimeoutMs)
|
|
8850
8999
|
);
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
8859
|
-
|
|
9000
|
+
let prepared;
|
|
9001
|
+
try {
|
|
9002
|
+
const callerIntentV2 = input.cliAdmission === true && input.disableCallerIntentV2 !== true && !input.admissionCapability && !input.onSubmission && input.request.maxTotalCredits === void 0;
|
|
9003
|
+
prepared = await input.client.preparePlayRunAdmission(
|
|
9004
|
+
{
|
|
9005
|
+
...input.request,
|
|
9006
|
+
...input.jsonOutput && input.fullJson === true ? { terminalStatus: "full" } : {}
|
|
9007
|
+
},
|
|
9008
|
+
{
|
|
9009
|
+
cliAdmission: input.cliAdmission,
|
|
9010
|
+
callerIntentV2,
|
|
9011
|
+
onSubmission: input.onSubmission,
|
|
9012
|
+
signal: admissionDeadline.signal,
|
|
9013
|
+
...admissionDeadlineAt === void 0 ? {} : { deadlineAt: admissionDeadlineAt },
|
|
9014
|
+
...input.admissionCapability ? { admissionCapability: input.admissionCapability } : {}
|
|
9015
|
+
}
|
|
9016
|
+
);
|
|
8860
9017
|
assertPlayWaitNotTimedOut({
|
|
8861
9018
|
workflowId: _nullishCoalesce(prepared.workflowId, () => ( "")),
|
|
8862
9019
|
startedAt: admissionStartedAt,
|
|
8863
9020
|
waitTimeoutMs: input.waitTimeoutMs
|
|
8864
9021
|
});
|
|
8865
|
-
|
|
8866
|
-
|
|
8867
|
-
|
|
8868
|
-
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
-
|
|
8874
|
-
|
|
8875
|
-
|
|
8876
|
-
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
9022
|
+
const remainingWaitTimeout = () => input.waitTimeoutMs === null ? null : Math.max(1, input.waitTimeoutMs - (Date.now() - admissionStartedAt));
|
|
9023
|
+
const pinnedInput = {
|
|
9024
|
+
...input,
|
|
9025
|
+
request: prepared.body,
|
|
9026
|
+
startStream: prepared.startStream,
|
|
9027
|
+
supportsCallerIntent: prepared.supportsCallerIntent
|
|
9028
|
+
};
|
|
9029
|
+
const retryDelays = prepared.supportsCallerIntent ? PLAY_START_TRANSIENT_RETRY_DELAYS_MS : [];
|
|
9030
|
+
for (let attempt = 0; attempt <= retryDelays.length; attempt += 1) {
|
|
9031
|
+
assertPlayWaitNotTimedOut({
|
|
9032
|
+
workflowId: _nullishCoalesce(prepared.workflowId, () => ( "")),
|
|
9033
|
+
startedAt: admissionStartedAt,
|
|
9034
|
+
waitTimeoutMs: input.waitTimeoutMs
|
|
9035
|
+
});
|
|
9036
|
+
let status;
|
|
9037
|
+
try {
|
|
9038
|
+
const notice = { value: null };
|
|
9039
|
+
status = withRateLimitedNotice(
|
|
9040
|
+
await startAndWaitForPlayCompletionByStreamOnce({
|
|
9041
|
+
...pinnedInput,
|
|
9042
|
+
waitTimeoutMs: remainingWaitTimeout(),
|
|
9043
|
+
rateLimitedNotice: notice
|
|
9044
|
+
}),
|
|
9045
|
+
notice.value
|
|
8881
9046
|
);
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8890
|
-
|
|
8891
|
-
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
9047
|
+
} catch (error) {
|
|
9048
|
+
if (callerIntentV2 && error instanceof _chunkAUQQVDABjs.CliPlayAdmissionCallerIntentV2UnsupportedError) {
|
|
9049
|
+
const remaining = input.waitTimeoutMs === null ? null : input.waitTimeoutMs - (Date.now() - admissionStartedAt);
|
|
9050
|
+
assertPlayWaitNotTimedOut({
|
|
9051
|
+
workflowId: "",
|
|
9052
|
+
startedAt: admissionStartedAt,
|
|
9053
|
+
waitTimeoutMs: input.waitTimeoutMs
|
|
9054
|
+
});
|
|
9055
|
+
return startAndWaitForPlayCompletionByStream({
|
|
9056
|
+
...input,
|
|
9057
|
+
disableCallerIntentV2: true,
|
|
9058
|
+
waitTimeoutMs: remaining === null ? null : Math.max(1, remaining)
|
|
9059
|
+
});
|
|
9060
|
+
}
|
|
9061
|
+
if (error instanceof _chunkAUQQVDABjs.CliPlayAdmissionUnsupportedError && input.cliAdmission) {
|
|
9062
|
+
await _chunkC6QWRSMQjs.checkPlayRunCompatibility.call(void 0,
|
|
9063
|
+
input.client.baseUrl,
|
|
9064
|
+
input.maintenancePolicy,
|
|
9065
|
+
admissionDeadline.signal
|
|
9066
|
+
);
|
|
9067
|
+
admissionDeadline.signal.throwIfAborted();
|
|
9068
|
+
assertPlayWaitNotTimedOut({
|
|
9069
|
+
workflowId: _nullishCoalesce(prepared.workflowId, () => ( "")),
|
|
9070
|
+
startedAt: admissionStartedAt,
|
|
9071
|
+
waitTimeoutMs: input.waitTimeoutMs
|
|
9072
|
+
});
|
|
9073
|
+
return startAndWaitForPlayCompletion({
|
|
9074
|
+
...input,
|
|
9075
|
+
// The stream preparation already persisted this caller intent. Keep
|
|
9076
|
+
// its identity and do not write the submission journal a second time
|
|
9077
|
+
// while switching to the canonical JSON endpoint.
|
|
9078
|
+
request: pinnedInput.request,
|
|
9079
|
+
onSubmission: void 0,
|
|
9080
|
+
preparedAdmission: prepared,
|
|
9081
|
+
cliAdmission: false,
|
|
9082
|
+
streamTerminalWindowMs: void 0,
|
|
9083
|
+
waitTimeoutMs: remainingWaitTimeout()
|
|
9084
|
+
});
|
|
9085
|
+
}
|
|
9086
|
+
if (!(error instanceof RetryablePlayStartAttemptError)) throw error;
|
|
9087
|
+
const retryDelayMs2 = retryDelays[attempt];
|
|
9088
|
+
if (retryDelayMs2 === void 0) {
|
|
9089
|
+
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
9090
|
+
`Play ${input.playName} did not start after retrying transient start failures.`,
|
|
9091
|
+
void 0,
|
|
9092
|
+
"PLAY_START_RETRY_EXHAUSTED",
|
|
9093
|
+
{
|
|
9094
|
+
causeMessage: error.originalError instanceof Error ? error.originalError.message : String(error.originalError)
|
|
9095
|
+
}
|
|
9096
|
+
);
|
|
9097
|
+
}
|
|
9098
|
+
if (!input.jsonOutput) {
|
|
9099
|
+
input.progress.writeLine(
|
|
9100
|
+
`[play watch] start response was ambiguous; retrying the same caller intent (${error.message})`
|
|
9101
|
+
);
|
|
9102
|
+
}
|
|
9103
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
9104
|
+
phase: "cli.play_start_stream_retry",
|
|
9105
|
+
ms: 0,
|
|
9106
|
+
ok: true,
|
|
9107
|
+
playName: input.playName,
|
|
9108
|
+
attempt: attempt + 1,
|
|
9109
|
+
reason: error.message,
|
|
9110
|
+
recovery: "same_caller_intent"
|
|
8895
9111
|
});
|
|
9112
|
+
await sleepOrAbort(retryDelayMs2, admissionDeadline.signal);
|
|
9113
|
+
continue;
|
|
8896
9114
|
}
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
8901
|
-
`Play ${input.playName} did not start after retrying transient start failures.`,
|
|
8902
|
-
void 0,
|
|
8903
|
-
"PLAY_START_RETRY_EXHAUSTED",
|
|
8904
|
-
{
|
|
8905
|
-
causeMessage: error.originalError instanceof Error ? error.originalError.message : String(error.originalError)
|
|
8906
|
-
}
|
|
8907
|
-
);
|
|
9115
|
+
const retryDelayMs = retryDelays[attempt];
|
|
9116
|
+
if (retryDelayMs === void 0 || !isRetryablePendingStartFailure(status)) {
|
|
9117
|
+
return status;
|
|
8908
9118
|
}
|
|
8909
9119
|
if (!input.jsonOutput) {
|
|
8910
9120
|
input.progress.writeLine(
|
|
8911
|
-
`[play watch] start
|
|
9121
|
+
`[play watch] start failed before run id with a transient error; retrying (${playStatusErrorText(status)})`
|
|
8912
9122
|
);
|
|
8913
9123
|
}
|
|
8914
|
-
|
|
9124
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
8915
9125
|
phase: "cli.play_start_stream_retry",
|
|
8916
9126
|
ms: 0,
|
|
8917
9127
|
ok: true,
|
|
8918
9128
|
playName: input.playName,
|
|
8919
9129
|
attempt: attempt + 1,
|
|
8920
|
-
reason:
|
|
8921
|
-
recovery: "same_caller_intent"
|
|
9130
|
+
reason: playStatusErrorText(status)
|
|
8922
9131
|
});
|
|
8923
|
-
await
|
|
8924
|
-
continue;
|
|
8925
|
-
}
|
|
8926
|
-
const retryDelayMs = retryDelays[attempt];
|
|
8927
|
-
if (retryDelayMs === void 0 || !isRetryablePendingStartFailure(status)) {
|
|
8928
|
-
return status;
|
|
9132
|
+
await sleepOrAbort(retryDelayMs, admissionDeadline.signal);
|
|
8929
9133
|
}
|
|
8930
|
-
|
|
8931
|
-
input.
|
|
8932
|
-
|
|
8933
|
-
|
|
9134
|
+
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
9135
|
+
`Play ${input.playName} did not start after retrying transient start failures.`,
|
|
9136
|
+
void 0,
|
|
9137
|
+
"PLAY_START_RETRY_EXHAUSTED"
|
|
9138
|
+
);
|
|
9139
|
+
} catch (error) {
|
|
9140
|
+
if (admissionTimedOut || admissionDeadlineAt !== void 0 && Date.now() >= admissionDeadlineAt) {
|
|
9141
|
+
assertPlayWaitNotTimedOut({
|
|
9142
|
+
workflowId: _nullishCoalesce(_optionalChain([prepared, 'optionalAccess', _310 => _310.workflowId]), () => ( "")),
|
|
9143
|
+
startedAt: admissionStartedAt,
|
|
9144
|
+
waitTimeoutMs: input.waitTimeoutMs
|
|
9145
|
+
});
|
|
8934
9146
|
}
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
ok: true,
|
|
8939
|
-
playName: input.playName,
|
|
8940
|
-
attempt: attempt + 1,
|
|
8941
|
-
reason: playStatusErrorText(status)
|
|
8942
|
-
});
|
|
8943
|
-
await sleep(retryDelayMs);
|
|
9147
|
+
throw error;
|
|
9148
|
+
} finally {
|
|
9149
|
+
if (admissionTimeout) clearTimeout(admissionTimeout);
|
|
8944
9150
|
}
|
|
8945
|
-
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
8946
|
-
`Play ${input.playName} did not start after retrying transient start failures.`,
|
|
8947
|
-
void 0,
|
|
8948
|
-
"PLAY_START_RETRY_EXHAUSTED"
|
|
8949
|
-
);
|
|
8950
9151
|
}
|
|
8951
9152
|
async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
8952
9153
|
const startedAt = Date.now();
|
|
@@ -8966,7 +9167,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
8966
9167
|
let timedOut = false;
|
|
8967
9168
|
let emittedDashboardUrl = false;
|
|
8968
9169
|
let lastKnownWorkflowId = "";
|
|
8969
|
-
let launchedRevisionId = _optionalChain([input, 'access',
|
|
9170
|
+
let launchedRevisionId = _optionalChain([input, 'access', _311 => _311.request, 'access', _312 => _312.revisionId, 'optionalAccess', _313 => _313.trim, 'call', _314 => _314()]) || null;
|
|
8970
9171
|
let eventCount = 0;
|
|
8971
9172
|
let firstRunIdMs = null;
|
|
8972
9173
|
let launchConfirmed = false;
|
|
@@ -8976,8 +9177,8 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
8976
9177
|
const confirmAdmission = async (runId) => {
|
|
8977
9178
|
if (launchConfirmed || !runId || runId === "pending") return;
|
|
8978
9179
|
launchConfirmed = true;
|
|
8979
|
-
await _optionalChain([input, 'access',
|
|
8980
|
-
|
|
9180
|
+
await _optionalChain([input, 'access', _315 => _315.onRunAdmitted, 'optionalCall', _316 => _316(runId)]);
|
|
9181
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
8981
9182
|
phase: "cli.play_start_admitted",
|
|
8982
9183
|
ms: Date.now() - startedAt,
|
|
8983
9184
|
ok: true,
|
|
@@ -9011,7 +9212,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9011
9212
|
full: input.fullJson
|
|
9012
9213
|
});
|
|
9013
9214
|
} catch (error) {
|
|
9014
|
-
if (
|
|
9215
|
+
if (_chunk775AZTO7js.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
9015
9216
|
return null;
|
|
9016
9217
|
}
|
|
9017
9218
|
throw error;
|
|
@@ -9030,9 +9231,9 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9030
9231
|
signal: controller.signal
|
|
9031
9232
|
})) {
|
|
9032
9233
|
eventCount += 1;
|
|
9033
|
-
const expectedFullRunId = _optionalChain([input, 'access',
|
|
9234
|
+
const expectedFullRunId = _optionalChain([input, 'access', _317 => _317.request, 'access', _318 => _318.workflowId, 'optionalAccess', _319 => _319.trim, 'call', _320 => _320()]) || lastKnownWorkflowId;
|
|
9034
9235
|
const eventRunId = getRunIdFromLiveEvent(event);
|
|
9035
|
-
const pinnedRunId = input.fullJson === true && input.request.terminalStatus === "full" ? _optionalChain([input, 'access',
|
|
9236
|
+
const pinnedRunId = input.fullJson === true && input.request.terminalStatus === "full" ? _optionalChain([input, 'access', _321 => _321.request, 'access', _322 => _322.workflowId, 'optionalAccess', _323 => _323.trim, 'call', _324 => _324()]) : void 0;
|
|
9036
9237
|
if (pinnedRunId && eventRunId && eventRunId !== "pending" && eventRunId !== pinnedRunId)
|
|
9037
9238
|
continue;
|
|
9038
9239
|
const eventRevisionId = getStringField(
|
|
@@ -9042,7 +9243,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9042
9243
|
if (eventRevisionId) {
|
|
9043
9244
|
launchedRevisionId = eventRevisionId;
|
|
9044
9245
|
}
|
|
9045
|
-
const eventRateLimited = _optionalChain([getEventPayload, 'call',
|
|
9246
|
+
const eventRateLimited = _optionalChain([getEventPayload, 'call', _325 => _325(event), 'optionalAccess', _326 => _326.rateLimited]);
|
|
9046
9247
|
if (eventRateLimited && typeof eventRateLimited === "object") {
|
|
9047
9248
|
notice.value = eventRateLimited;
|
|
9048
9249
|
}
|
|
@@ -9051,7 +9252,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9051
9252
|
lastKnownWorkflowId = eventRunId;
|
|
9052
9253
|
firstRunIdMs ??= Date.now() - startedAt;
|
|
9053
9254
|
if (runStartedNow) {
|
|
9054
|
-
await _optionalChain([input, 'access',
|
|
9255
|
+
await _optionalChain([input, 'access', _327 => _327.onRunStarted, 'optionalCall', _328 => _328(eventRunId)]);
|
|
9055
9256
|
}
|
|
9056
9257
|
}
|
|
9057
9258
|
if (!launchConfirmed && eventConfirmsPlayRunLaunch(event) && eventRunId === lastKnownWorkflowId) {
|
|
@@ -9141,15 +9342,34 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9141
9342
|
};
|
|
9142
9343
|
}
|
|
9143
9344
|
const fullPackage = getPlayRunPackage(finalStatus);
|
|
9144
|
-
const fullRun = readRecord(_optionalChain([fullPackage, 'optionalAccess',
|
|
9145
|
-
const fullSteps = _optionalChain([fullPackage, 'optionalAccess',
|
|
9345
|
+
const fullRun = readRecord(_optionalChain([fullPackage, 'optionalAccess', _329 => _329.run]));
|
|
9346
|
+
const fullSteps = _optionalChain([fullPackage, 'optionalAccess', _330 => _330.steps]);
|
|
9146
9347
|
const scalarStep = Array.isArray(fullSteps) ? readRecord(fullSteps[0]) : null;
|
|
9147
|
-
const scalarExecution = readRecord(_optionalChain([scalarStep, 'optionalAccess',
|
|
9148
|
-
const completeScalarSteps = Array.isArray(fullSteps) && (_optionalChain([fullPackage, 'optionalAccess',
|
|
9149
|
-
const reuseFullTerminal = input.jsonOutput && input.fullJson === true && input.request.terminalStatus === "full" && expectedFullRunId !== "" && finalStatus.runId === expectedFullRunId && _optionalChain([fullRun, 'optionalAccess',
|
|
9348
|
+
const scalarExecution = readRecord(_optionalChain([scalarStep, 'optionalAccess', _331 => _331.execution]));
|
|
9349
|
+
const completeScalarSteps = Array.isArray(fullSteps) && (_optionalChain([fullPackage, 'optionalAccess', _332 => _332.stepsExpected]) === false && fullSteps.length === 0 || _optionalChain([fullPackage, 'optionalAccess', _333 => _333.stepsExpected]) !== false && fullSteps.length === 1 && typeof _optionalChain([scalarStep, 'optionalAccess', _334 => _334.id]) === "string" && scalarStep.id.trim().length > 0 && scalarStep.kind === "step" && scalarStep.status === "completed" && _optionalChain([scalarExecution, 'optionalAccess', _335 => _335.kind]) === "completed" && scalarExecution.rows === null);
|
|
9350
|
+
const reuseFullTerminal = input.jsonOutput && input.fullJson === true && input.request.terminalStatus === "full" && expectedFullRunId !== "" && finalStatus.runId === expectedFullRunId && _optionalChain([fullRun, 'optionalAccess', _336 => _336.id]) === expectedFullRunId && finalStatus.status === "completed" && fullRun.status === "completed" && finalStatus.finalStatusView === "full" && _optionalChain([fullPackage, 'optionalAccess', _337 => _337.resultState]) === "available" && Object.hasOwn(fullPackage, "result") && completeScalarSteps && Array.isArray(fullPackage.datasets) && fullPackage.datasets.length === 0;
|
|
9150
9351
|
let fromDurableStatus = reuseFullTerminal;
|
|
9151
9352
|
let canonicalTerminal;
|
|
9152
|
-
|
|
9353
|
+
const streamedTerminalPackage = getPlayRunPackage(finalStatus);
|
|
9354
|
+
const streamedTerminalPlayRunPackage = _chunkAUQQVDABjs.isPlayRunPackage.call(void 0,
|
|
9355
|
+
streamedTerminalPackage
|
|
9356
|
+
) ? streamedTerminalPackage : null;
|
|
9357
|
+
const terminalEnvelopeIsComplete = finalStatus.status === "completed" && (event.type === "play.run.snapshot" || event.type === "play.run.final_status") && getEventPayload(event).replayed !== true && finalStatus.runId === lastKnownWorkflowId && !playRunPackageTextLedgerIncomplete(streamedTerminalPackage);
|
|
9358
|
+
if (!reuseFullTerminal && input.cliAdmission === true && terminalEnvelopeIsComplete) {
|
|
9359
|
+
const {
|
|
9360
|
+
package: untrustedTerminalPackage,
|
|
9361
|
+
...finalStatusWithoutPackage
|
|
9362
|
+
} = finalStatus;
|
|
9363
|
+
void untrustedTerminalPackage;
|
|
9364
|
+
canonicalTerminal = {
|
|
9365
|
+
...finalStatusWithoutPackage,
|
|
9366
|
+
// The explicit undefined also overrides any broader package
|
|
9367
|
+
// type contributed by the streamed event's compatibility shape.
|
|
9368
|
+
package: _nullishCoalesce(streamedTerminalPlayRunPackage, () => ( void 0)),
|
|
9369
|
+
dashboardUrl,
|
|
9370
|
+
...launchedRevisionId ? { revisionId: launchedRevisionId } : {}
|
|
9371
|
+
};
|
|
9372
|
+
} else if (!reuseFullTerminal && (input.cliAdmission === true || input.request.profile === "absurd")) {
|
|
9153
9373
|
canonicalTerminal = await fetchKnownTerminalStatus();
|
|
9154
9374
|
fromDurableStatus = canonicalTerminal !== null;
|
|
9155
9375
|
} else {
|
|
@@ -9160,7 +9380,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9160
9380
|
};
|
|
9161
9381
|
}
|
|
9162
9382
|
if (!canonicalTerminal) {
|
|
9163
|
-
|
|
9383
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
9164
9384
|
phase: "cli.play_start_stream_stale_terminal_ignored",
|
|
9165
9385
|
ms: Date.now() - startedAt,
|
|
9166
9386
|
ok: true,
|
|
@@ -9181,14 +9401,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9181
9401
|
fromDurableStatus
|
|
9182
9402
|
}) : canonicalTerminal;
|
|
9183
9403
|
if (input.fullJson === true) {
|
|
9184
|
-
|
|
9404
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
9185
9405
|
phase: "play_watch_terminal_status",
|
|
9186
9406
|
workflowId: outputTerminal.runId || lastKnownWorkflowId || void 0,
|
|
9187
9407
|
full: true,
|
|
9188
9408
|
source: outputTerminal === canonicalTerminal ? fromDurableStatus ? "start_stream_durable" : "start_stream" : "durable_repair"
|
|
9189
9409
|
});
|
|
9190
9410
|
}
|
|
9191
|
-
|
|
9411
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
9192
9412
|
phase: "cli.play_start_stream_terminal",
|
|
9193
9413
|
ms: Date.now() - startedAt,
|
|
9194
9414
|
ok: true,
|
|
@@ -9208,7 +9428,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9208
9428
|
clearTimeout(timeout);
|
|
9209
9429
|
}
|
|
9210
9430
|
controller.abort();
|
|
9211
|
-
|
|
9431
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
9212
9432
|
phase: "cli.play_start_stream_handoff_to_tail",
|
|
9213
9433
|
ms: Date.now() - startedAt,
|
|
9214
9434
|
ok: true,
|
|
@@ -9239,7 +9459,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9239
9459
|
if (timedOut) {
|
|
9240
9460
|
const terminal = await fetchKnownTerminalStatus();
|
|
9241
9461
|
if (terminal) {
|
|
9242
|
-
|
|
9462
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
9243
9463
|
phase: "cli.play_start_stream_timeout_status_reconcile",
|
|
9244
9464
|
ms: Date.now() - startedAt,
|
|
9245
9465
|
ok: true,
|
|
@@ -9259,7 +9479,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9259
9479
|
lastPhase
|
|
9260
9480
|
});
|
|
9261
9481
|
}
|
|
9262
|
-
if (lastKnownWorkflowId && (terminalWindowExpired ||
|
|
9482
|
+
if (lastKnownWorkflowId && (terminalWindowExpired || _chunk775AZTO7js.isTransientPlayRunReadError.call(void 0, error))) {
|
|
9263
9483
|
if (timeout) {
|
|
9264
9484
|
clearTimeout(timeout);
|
|
9265
9485
|
}
|
|
@@ -9270,7 +9490,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9270
9490
|
`
|
|
9271
9491
|
);
|
|
9272
9492
|
}
|
|
9273
|
-
|
|
9493
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
9274
9494
|
phase: "cli.play_start_stream_reconnect",
|
|
9275
9495
|
ms: Date.now() - startedAt,
|
|
9276
9496
|
ok: true,
|
|
@@ -9297,7 +9517,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9297
9517
|
});
|
|
9298
9518
|
}
|
|
9299
9519
|
if (!lastKnownWorkflowId && isAmbiguousPlayStartOutcomeError(error)) {
|
|
9300
|
-
|
|
9520
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
9301
9521
|
phase: "cli.play_start_stream_transient_failure",
|
|
9302
9522
|
ms: Date.now() - startedAt,
|
|
9303
9523
|
ok: false,
|
|
@@ -9325,7 +9545,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9325
9545
|
`[play watch] start stream ended after run ${lastKnownWorkflowId}; reconnecting to canonical run stream`
|
|
9326
9546
|
);
|
|
9327
9547
|
}
|
|
9328
|
-
|
|
9548
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
9329
9549
|
phase: "cli.play_start_stream_reconnect",
|
|
9330
9550
|
ms: Date.now() - startedAt,
|
|
9331
9551
|
ok: true,
|
|
@@ -9405,29 +9625,29 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
|
|
|
9405
9625
|
"logs"
|
|
9406
9626
|
]);
|
|
9407
9627
|
function formatPlayLogLine(rawLine, state) {
|
|
9408
|
-
const classified =
|
|
9628
|
+
const classified = _chunk775AZTO7js.classifyLogLine.call(void 0, rawLine);
|
|
9409
9629
|
const line = classified.line;
|
|
9410
9630
|
const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
|
|
9411
|
-
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess',
|
|
9631
|
+
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _338 => _338[1]]) ? new Date(timestampMatch[1]) : null;
|
|
9412
9632
|
const timestamp = parsedTimestamp && !Number.isNaN(parsedTimestamp.getTime()) ? parsedTimestamp.toLocaleTimeString("en-US", {
|
|
9413
9633
|
hour12: false,
|
|
9414
9634
|
hour: "2-digit",
|
|
9415
9635
|
minute: "2-digit",
|
|
9416
9636
|
second: "2-digit"
|
|
9417
9637
|
}) : null;
|
|
9418
|
-
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess',
|
|
9638
|
+
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _339 => _339[2]]), () => ( line));
|
|
9419
9639
|
const prefix = timestamp ? `${timestamp} ` : "";
|
|
9420
9640
|
if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
|
|
9421
9641
|
const providerWait = formatProviderCapacityWaitLogLine(line);
|
|
9422
9642
|
if (providerWait && !state.verbose) {
|
|
9423
|
-
return
|
|
9643
|
+
return _chunk775AZTO7js.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
|
|
9424
9644
|
}
|
|
9425
9645
|
const mapProgress = formatMapProgressDiagnosticLogLine(line);
|
|
9426
9646
|
if (mapProgress && !state.verbose) {
|
|
9427
|
-
return
|
|
9647
|
+
return _chunk775AZTO7js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
|
|
9428
9648
|
}
|
|
9429
9649
|
if (/\[worker\] picked up run\b/.test(message)) {
|
|
9430
|
-
if (!
|
|
9650
|
+
if (!_chunk775AZTO7js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9431
9651
|
return null;
|
|
9432
9652
|
}
|
|
9433
9653
|
if (state.emittedRunnerStarted) {
|
|
@@ -9440,7 +9660,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
9440
9660
|
/^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
|
|
9441
9661
|
);
|
|
9442
9662
|
if (mapStart) {
|
|
9443
|
-
if (!
|
|
9663
|
+
if (!_chunk775AZTO7js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9444
9664
|
return null;
|
|
9445
9665
|
}
|
|
9446
9666
|
const [, rows, fields2, namespace, cached, pending] = mapStart;
|
|
@@ -9450,7 +9670,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
9450
9670
|
/^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
|
|
9451
9671
|
);
|
|
9452
9672
|
if (mapDone) {
|
|
9453
|
-
if (!
|
|
9673
|
+
if (!_chunk775AZTO7js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9454
9674
|
return null;
|
|
9455
9675
|
}
|
|
9456
9676
|
const [, results, executed, cached] = mapDone;
|
|
@@ -9632,20 +9852,20 @@ function collectDatasetHandleLines(value, path = "result") {
|
|
|
9632
9852
|
function buildRunWarnings(status, rowsInfo) {
|
|
9633
9853
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
9634
9854
|
const result = readRecord(status.result);
|
|
9635
|
-
const metadata = readRecord(_optionalChain([result, 'optionalAccess',
|
|
9636
|
-
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess',
|
|
9855
|
+
const metadata = readRecord(_optionalChain([result, 'optionalAccess', _340 => _340._metadata]));
|
|
9856
|
+
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess', _341 => _341.outputWarnings])) ? metadata.outputWarnings.map((warning) => readRecord(warning)).filter((warning) => {
|
|
9637
9857
|
if (!warning) return false;
|
|
9638
9858
|
return !(rowsInfo && !rowsInfo.complete && warning.reason === "array_preview_limit" && warning.originalItems === rowsInfo.totalRows && warning.retainedItems === rowsInfo.rows.length);
|
|
9639
|
-
}).map((warning) => _optionalChain([warning, 'optionalAccess',
|
|
9859
|
+
}).map((warning) => _optionalChain([warning, 'optionalAccess', _342 => _342.message])).filter(
|
|
9640
9860
|
(message) => typeof message === "string" && message.trim().length > 0
|
|
9641
9861
|
).slice(0, 16) : [];
|
|
9642
|
-
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess',
|
|
9862
|
+
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _343 => _343.hasRowFailures]) ? [
|
|
9643
9863
|
`${status.status === "completed" ? "Run completed" : "Run ended"} with ${formatInteger(rowOutcomes.failedRows)} failed row(s); inspect the persisted failed rows before treating the output as complete.`
|
|
9644
9864
|
] : [];
|
|
9645
|
-
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9865
|
+
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _344 => _344.supersededRows]), () => ( 0))) > 0 ? [
|
|
9646
9866
|
`Latest-write-wins: ${formatSupersededRowsNotice(_nullishCoalesce(rowOutcomes.supersededRows, () => ( 0)))}; the newer write still owns that Runtime Sheet row.`
|
|
9647
9867
|
] : [];
|
|
9648
|
-
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess',
|
|
9868
|
+
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _345 => _345.totalRows]) === 0) {
|
|
9649
9869
|
return [
|
|
9650
9870
|
...rowOutcomeWarnings,
|
|
9651
9871
|
...supersededRowNotices,
|
|
@@ -9664,7 +9884,7 @@ function buildRunWarnings(status, rowsInfo) {
|
|
|
9664
9884
|
return [...rowOutcomeWarnings, ...supersededRowNotices, ...outputWarnings];
|
|
9665
9885
|
}
|
|
9666
9886
|
function buildRunNextCommands(status) {
|
|
9667
|
-
const runId = _optionalChain([status, 'access',
|
|
9887
|
+
const runId = _optionalChain([status, 'access', _346 => _346.runId, 'optionalAccess', _347 => _347.trim, 'call', _348 => _348()]);
|
|
9668
9888
|
if (!runId) {
|
|
9669
9889
|
const playName = extractRunPlayName(status);
|
|
9670
9890
|
return playName ? {
|
|
@@ -9815,14 +10035,14 @@ function extractToolIdFromErrorText(text) {
|
|
|
9815
10035
|
return null;
|
|
9816
10036
|
}
|
|
9817
10037
|
const lowerToolMatch = /\btool\s+([A-Za-z0-9_.:-]+)\s+\d{3}\b/.exec(text);
|
|
9818
|
-
if (_optionalChain([lowerToolMatch, 'optionalAccess',
|
|
10038
|
+
if (_optionalChain([lowerToolMatch, 'optionalAccess', _349 => _349[1]])) {
|
|
9819
10039
|
return lowerToolMatch[1];
|
|
9820
10040
|
}
|
|
9821
10041
|
const upperToolMatch = /\bTool\s+([A-Za-z0-9_.:-]+)\s+failed\b/.exec(text);
|
|
9822
|
-
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess',
|
|
10042
|
+
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _350 => _350[1]]), () => ( null));
|
|
9823
10043
|
}
|
|
9824
10044
|
function isInsufficientCreditsBilling(billing) {
|
|
9825
|
-
return _optionalChain([billing, 'optionalAccess',
|
|
10045
|
+
return _optionalChain([billing, 'optionalAccess', _351 => _351.kind]) === "insufficient_credits";
|
|
9826
10046
|
}
|
|
9827
10047
|
function extractBillingForStatus(status, error) {
|
|
9828
10048
|
const errorBilling = getObjectField(status, "errorBilling");
|
|
@@ -9864,8 +10084,8 @@ function formatInsufficientCreditsMessage(input) {
|
|
|
9864
10084
|
function buildInsufficientCreditsSummaryLines(input) {
|
|
9865
10085
|
const progress = input.status.progress;
|
|
9866
10086
|
const rowsInfo = extractCanonicalRowsInfo(input.status);
|
|
9867
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
9868
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
10087
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _352 => _352.rows, 'access', _353 => _353.length]))), () => ( null));
|
|
10088
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _354 => _354.totalRows]))), () => ( null));
|
|
9869
10089
|
const lines = [
|
|
9870
10090
|
" status: stopped_insufficient_credits",
|
|
9871
10091
|
completed === null ? " completed rows: unknown" : ` completed rows: ${formatInteger(completed)}${total !== null ? ` of ${formatInteger(total)}` : ""}`,
|
|
@@ -9884,7 +10104,7 @@ function buildInsufficientCreditsSummaryLines(input) {
|
|
|
9884
10104
|
lines.push(" ask user: ask whether they want to add Deepline credits");
|
|
9885
10105
|
lines.push(` top up after approval: ${recovery.topUp}`);
|
|
9886
10106
|
lines.push(` checkout fallback: ${recovery.checkout}`);
|
|
9887
|
-
const runId = _optionalChain([input, 'access',
|
|
10107
|
+
const runId = _optionalChain([input, 'access', _355 => _355.status, 'access', _356 => _356.runId, 'optionalAccess', _357 => _357.trim, 'call', _358 => _358()]);
|
|
9888
10108
|
if (runId) {
|
|
9889
10109
|
lines.push(` inspect: deepline runs get ${runId}`);
|
|
9890
10110
|
lines.push(
|
|
@@ -9966,10 +10186,10 @@ function normalizeRunStatusForEnvelope(status) {
|
|
|
9966
10186
|
function normalizeProgressForEnvelope(status, rowsInfo) {
|
|
9967
10187
|
const progress = status.progress;
|
|
9968
10188
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
9969
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9970
|
-
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9971
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9972
|
-
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
10189
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _359 => _359.totalRows]), () => ( getNumericField(progress, "totalRows"))), () => ( getNumericField(progress, "total"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _360 => _360.totalRows]))), () => ( null));
|
|
10190
|
+
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _361 => _361.failedRows]), () => ( getNumericField(progress, "failed"))), () => ( getNumericField(progress, "failedRows"))), () => ( null));
|
|
10191
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _362 => _362.completedRows]), () => ( getNumericField(progress, "completed"))), () => ( getNumericField(progress, "completedRows"))), () => ( (status.status === "completed" ? total : null)));
|
|
10192
|
+
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _363 => _363.supersededRows]), () => ( getNumericField(progress, "supersededRows")));
|
|
9973
10193
|
const supersededOffset = _nullishCoalesce(supersededRows, () => ( 0));
|
|
9974
10194
|
const progressPending = getNumericField(progress, "pending");
|
|
9975
10195
|
const pending = _nullishCoalesce((progressPending !== null ? Math.max(0, progressPending - supersededOffset) : null), () => ( (typeof total === "number" && typeof completed === "number" && typeof failed === "number" ? Math.max(0, total - completed - failed - supersededOffset) : null)));
|
|
@@ -10039,7 +10259,7 @@ function normalizeErrorsForEnvelope(status, error) {
|
|
|
10039
10259
|
];
|
|
10040
10260
|
}
|
|
10041
10261
|
function normalizeLogsForEnvelope(status) {
|
|
10042
|
-
const logs = Array.isArray(_optionalChain([status, 'access',
|
|
10262
|
+
const logs = Array.isArray(_optionalChain([status, 'access', _364 => _364.progress, 'optionalAccess', _365 => _365.logs])) ? status.progress.logs : [];
|
|
10043
10263
|
const totalCount = logs.length;
|
|
10044
10264
|
const entries = logs.slice(Math.max(0, logs.length - RUN_LOG_PREVIEW_LIMIT));
|
|
10045
10265
|
const firstSequence = entries.length === 0 ? null : logs.length - entries.length + 1;
|
|
@@ -10096,7 +10316,7 @@ function compactPlayStatus(status) {
|
|
|
10096
10316
|
const packaged = getPlayRunPackage(status);
|
|
10097
10317
|
if (packaged) {
|
|
10098
10318
|
const packagedRun = readRecord(packaged.run);
|
|
10099
|
-
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess',
|
|
10319
|
+
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess', _366 => _366.error]) === "string" ? packagedRun.error : null;
|
|
10100
10320
|
const error2 = _nullishCoalesce(selectRunErrorForDisplay(status), () => ( (typeof status.error === "string" ? String(status.error) : packagedError)));
|
|
10101
10321
|
const compactError = error2 ? compactRunErrorForEnvelope(error2, status.runId) : null;
|
|
10102
10322
|
const rowOutcomes2 = readRowOutcomeSummary(status);
|
|
@@ -10247,7 +10467,7 @@ function formatTopValuesPart(value) {
|
|
|
10247
10467
|
}
|
|
10248
10468
|
function formatPackageDatasetSummaryLines(summary, indent = " ") {
|
|
10249
10469
|
const record3 = readRecord(summary);
|
|
10250
|
-
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
10470
|
+
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _367 => _367.columnStats]));
|
|
10251
10471
|
if (!record3 || !columnStats) {
|
|
10252
10472
|
return [];
|
|
10253
10473
|
}
|
|
@@ -10335,7 +10555,7 @@ function packageDatasetRecords(packaged) {
|
|
|
10335
10555
|
if (catalog.length > 0) return catalog;
|
|
10336
10556
|
return readRecordArray(packaged.steps).flatMap((step) => {
|
|
10337
10557
|
const output = readRecord(step.output);
|
|
10338
|
-
return _optionalChain([output, 'optionalAccess',
|
|
10558
|
+
return _optionalChain([output, 'optionalAccess', _368 => _368.kind]) === "dataset" ? [output] : [];
|
|
10339
10559
|
});
|
|
10340
10560
|
}
|
|
10341
10561
|
function packageReturnedDatasetIdentity(packaged) {
|
|
@@ -10344,7 +10564,7 @@ function packageReturnedDatasetIdentity(packaged) {
|
|
|
10344
10564
|
const outputs = _nullishCoalesce(readRecord(packaged.outputs), () => ( {}));
|
|
10345
10565
|
for (const outputValue of Object.values(outputs)) {
|
|
10346
10566
|
const output = readRecord(outputValue);
|
|
10347
|
-
if (_optionalChain([output, 'optionalAccess',
|
|
10567
|
+
if (_optionalChain([output, 'optionalAccess', _369 => _369.kind]) !== "dataset") continue;
|
|
10348
10568
|
if (typeof output.datasetId === "string" && output.datasetId.trim()) {
|
|
10349
10569
|
datasetIds.add(output.datasetId.trim());
|
|
10350
10570
|
}
|
|
@@ -10380,7 +10600,7 @@ function formatRunStepProgress(progress, includeRowOutcomes = false) {
|
|
|
10380
10600
|
}
|
|
10381
10601
|
function formatPackageDatasetActionLines(packaged, options) {
|
|
10382
10602
|
const returned = packageReturnedDatasetIdentity(packaged);
|
|
10383
|
-
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
10603
|
+
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _370 => _370.includeSummary]), () => ( true));
|
|
10384
10604
|
const lines = [];
|
|
10385
10605
|
const steps = readRecordArray(packaged.steps);
|
|
10386
10606
|
const stepsByDatasetId = /* @__PURE__ */ new Map();
|
|
@@ -10389,10 +10609,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10389
10609
|
for (const step of steps) {
|
|
10390
10610
|
if (step.kind !== "dataset") continue;
|
|
10391
10611
|
const output = readRecord(step.output);
|
|
10392
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
10612
|
+
if (typeof _optionalChain([output, 'optionalAccess', _371 => _371.datasetId]) === "string") {
|
|
10393
10613
|
stepsByDatasetId.set(output.datasetId, step);
|
|
10394
10614
|
}
|
|
10395
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
10615
|
+
if (typeof _optionalChain([output, 'optionalAccess', _372 => _372.path]) === "string") {
|
|
10396
10616
|
stepsByPath.set(output.path, step);
|
|
10397
10617
|
}
|
|
10398
10618
|
if (typeof step.id === "string") {
|
|
@@ -10406,8 +10626,8 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10406
10626
|
const category = isReturned ? "returned" : dataset.recovered === true ? "recovered" : "persisted";
|
|
10407
10627
|
const rowCount = typeof dataset.rowCount === "number" && Number.isFinite(dataset.rowCount) ? Math.max(0, Math.trunc(dataset.rowCount)) : null;
|
|
10408
10628
|
const lifecycle = readRecord(dataset.lifecycle);
|
|
10409
|
-
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess',
|
|
10410
|
-
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess',
|
|
10629
|
+
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess', _373 => _373.complete]) === false;
|
|
10630
|
+
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess', _374 => _374.persistedRowsAtLeast]) === "number" && Number.isFinite(lifecycle.persistedRowsAtLeast) ? Math.max(0, Math.trunc(lifecycle.persistedRowsAtLeast)) : 0;
|
|
10411
10631
|
const actions2 = _nullishCoalesce(readRecord(dataset.actions), () => ( {}));
|
|
10412
10632
|
if (countUnconfirmed) {
|
|
10413
10633
|
lines.push(
|
|
@@ -10425,7 +10645,7 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10425
10645
|
}
|
|
10426
10646
|
}
|
|
10427
10647
|
const step = _nullishCoalesce(_nullishCoalesce((datasetId ? stepsByDatasetId.get(datasetId) : void 0), () => ( stepsByPath.get(path))), () => ( (typeof dataset.tableNamespace === "string" ? stepsByNamespace.get(dataset.tableNamespace) : void 0)));
|
|
10428
|
-
const progress = readRecord(_optionalChain([step, 'optionalAccess',
|
|
10648
|
+
const progress = readRecord(_optionalChain([step, 'optionalAccess', _375 => _375.progress]));
|
|
10429
10649
|
if (progress) {
|
|
10430
10650
|
lines.push(` progress: ${formatRunStepProgress(progress)}`);
|
|
10431
10651
|
}
|
|
@@ -10439,10 +10659,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10439
10659
|
}
|
|
10440
10660
|
const exportAction = readRecord(actions2.exportCsv);
|
|
10441
10661
|
const exportCommand = actionToCommand(exportAction);
|
|
10442
|
-
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess',
|
|
10662
|
+
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _376 => _376.scope]));
|
|
10443
10663
|
const queryAction = readRecord(actions2.query);
|
|
10444
|
-
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess',
|
|
10445
|
-
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess',
|
|
10664
|
+
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess', _377 => _377.scope]));
|
|
10665
|
+
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess', _378 => _378.kind]) === "run" ? actionToCommand(queryAction) : null;
|
|
10446
10666
|
const currentQueryCommand = actionToCommand(actions2.queryCurrentTable);
|
|
10447
10667
|
const legacyQueryCommand = actionToCommand(actions2.query);
|
|
10448
10668
|
if (runQueryCommand) {
|
|
@@ -10454,11 +10674,11 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10454
10674
|
}
|
|
10455
10675
|
if (exportCommand) {
|
|
10456
10676
|
lines.push(
|
|
10457
|
-
_optionalChain([exportScope, 'optionalAccess',
|
|
10677
|
+
_optionalChain([exportScope, 'optionalAccess', _379 => _379.kind]) === "database" ? ` export current table (may include other runs): ${exportCommand}` : ` export this run: ${exportCommand}`
|
|
10458
10678
|
);
|
|
10459
10679
|
}
|
|
10460
10680
|
const unavailable = readRecord(dataset.exportUnavailable);
|
|
10461
|
-
if (typeof _optionalChain([unavailable, 'optionalAccess',
|
|
10681
|
+
if (typeof _optionalChain([unavailable, 'optionalAccess', _380 => _380.reason]) === "string" && typeof unavailable.message === "string") {
|
|
10462
10682
|
lines.push(
|
|
10463
10683
|
` export unavailable (${unavailable.reason}): ${unavailable.message}`
|
|
10464
10684
|
);
|
|
@@ -10475,7 +10695,7 @@ function packageSavedRowCount(packaged) {
|
|
|
10475
10695
|
}
|
|
10476
10696
|
function runtimeLimitWindowLabel(runtimeLimitFailure) {
|
|
10477
10697
|
const message = _nullishCoalesce(getStringField(runtimeLimitFailure, "message"), () => ( ""));
|
|
10478
|
-
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access',
|
|
10698
|
+
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _381 => _381.exec, 'call', _382 => _382(message), 'optionalAccess', _383 => _383[1]]);
|
|
10479
10699
|
if (configuredSeconds) {
|
|
10480
10700
|
const seconds = Number(configuredSeconds);
|
|
10481
10701
|
if (Number.isSafeInteger(seconds) && seconds > 0) {
|
|
@@ -10522,7 +10742,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10522
10742
|
if (!outputs) return [];
|
|
10523
10743
|
const returned = Object.entries(outputs).filter(([, output]) => {
|
|
10524
10744
|
const record3 = readRecord(output);
|
|
10525
|
-
return _optionalChain([record3, 'optionalAccess',
|
|
10745
|
+
return _optionalChain([record3, 'optionalAccess', _384 => _384.kind]) === "dataset" || _optionalChain([record3, 'optionalAccess', _385 => _385.kind]) === "value" && Object.prototype.hasOwnProperty.call(record3, "value");
|
|
10526
10746
|
});
|
|
10527
10747
|
if (returned.length === 0) return [];
|
|
10528
10748
|
const datasets = packageDatasetRecords(packaged);
|
|
@@ -10542,10 +10762,10 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10542
10762
|
(candidate) => typeof output.datasetId === "string" && candidate.datasetId === output.datasetId || candidate.path === path
|
|
10543
10763
|
);
|
|
10544
10764
|
const stepOutput = datasetSteps.map((step) => readRecord(step.output)).find(
|
|
10545
|
-
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess',
|
|
10765
|
+
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _386 => _386.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _387 => _387.path]) === path
|
|
10546
10766
|
);
|
|
10547
|
-
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess',
|
|
10548
|
-
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
10767
|
+
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _388 => _388.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _389 => _389.preview]))));
|
|
10768
|
+
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _390 => _390.rows])) ? preview.rows.slice(0, 2) : [];
|
|
10549
10769
|
if (rows.length > 0) {
|
|
10550
10770
|
lines.push(` sample rows (${rows.length}):`);
|
|
10551
10771
|
lines.push(
|
|
@@ -10571,7 +10791,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10571
10791
|
return lines;
|
|
10572
10792
|
}
|
|
10573
10793
|
function authoredPackageStackFrames(packaged) {
|
|
10574
|
-
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess',
|
|
10794
|
+
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _391 => _391.trim, 'call', _392 => _392()])));
|
|
10575
10795
|
if (!stack) return [];
|
|
10576
10796
|
return stack.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).filter(
|
|
10577
10797
|
(line) => !line.includes("/virtual/deepline-plays/") && !line.includes("/apps/play-runner/") && !line.includes("/shared_libs/play-runtime/") && !line.includes("node:internal")
|
|
@@ -10603,9 +10823,9 @@ function activityIsoTimestamp(value) {
|
|
|
10603
10823
|
}
|
|
10604
10824
|
function buildRunActivityTextLines(run) {
|
|
10605
10825
|
const activity = readRecord(run.activity);
|
|
10606
|
-
const observation = readRecord(_optionalChain([activity, 'optionalAccess',
|
|
10607
|
-
const state = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
10608
|
-
const target = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
10826
|
+
const observation = readRecord(_optionalChain([activity, 'optionalAccess', _393 => _393.observation]));
|
|
10827
|
+
const state = readRecord(_optionalChain([observation, 'optionalAccess', _394 => _394.state]));
|
|
10828
|
+
const target = readRecord(_optionalChain([observation, 'optionalAccess', _395 => _395.target]));
|
|
10609
10829
|
if (!activity || !observation || !state) return [];
|
|
10610
10830
|
const kind = typeof state.kind === "string" ? state.kind : "unknown";
|
|
10611
10831
|
if (kind === "completed") return [];
|
|
@@ -10650,11 +10870,11 @@ function buildRunActivityTextLines(run) {
|
|
|
10650
10870
|
}
|
|
10651
10871
|
function formatObservedRunCounter(value) {
|
|
10652
10872
|
const counter = readRecord(value);
|
|
10653
|
-
const count2 = _optionalChain([counter, 'optionalAccess',
|
|
10873
|
+
const count2 = _optionalChain([counter, 'optionalAccess', _396 => _396.value]);
|
|
10654
10874
|
if (typeof count2 !== "number" || !Number.isSafeInteger(count2) || count2 < 0) {
|
|
10655
10875
|
return "unknown";
|
|
10656
10876
|
}
|
|
10657
|
-
return _optionalChain([counter, 'optionalAccess',
|
|
10877
|
+
return _optionalChain([counter, 'optionalAccess', _397 => _397.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
|
|
10658
10878
|
}
|
|
10659
10879
|
function buildRunStatusEvidenceTextLines(packaged) {
|
|
10660
10880
|
const evidence = readRecord(packaged.runStatus);
|
|
@@ -10667,13 +10887,13 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10667
10887
|
);
|
|
10668
10888
|
}
|
|
10669
10889
|
const source = readRecord(evidence.source);
|
|
10670
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
10890
|
+
if (_optionalChain([source, 'optionalAccess', _398 => _398.aligned]) === false) {
|
|
10671
10891
|
lines.push(
|
|
10672
10892
|
` consistency: run snapshot event ${String(source.runSnapshotLedgerNextSeq)} and progress event ${String(source.ledgerNextSeq)} differ; retry this read to align them`
|
|
10673
10893
|
);
|
|
10674
10894
|
}
|
|
10675
10895
|
const focus = readRecord(evidence.focusStep);
|
|
10676
|
-
const rows = readRecord(_optionalChain([focus, 'optionalAccess',
|
|
10896
|
+
const rows = readRecord(_optionalChain([focus, 'optionalAccess', _399 => _399.rows]));
|
|
10677
10897
|
if (focus) {
|
|
10678
10898
|
const id = typeof focus.id === "string" && focus.id.trim() ? focus.id.trim() : "unknown step";
|
|
10679
10899
|
const label = typeof focus.label === "string" && focus.label.trim() ? ` (${focus.label.trim()})` : "";
|
|
@@ -10681,7 +10901,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10681
10901
|
const known = readRecordArray(packaged.steps).find(
|
|
10682
10902
|
(step) => typeof step.id === "string" && (id === step.id || id.endsWith(`:${step.id}`)) && typeof step.label === "string"
|
|
10683
10903
|
);
|
|
10684
|
-
const state = typeof _optionalChain([known, 'optionalAccess',
|
|
10904
|
+
const state = typeof _optionalChain([known, 'optionalAccess', _400 => _400.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
|
|
10685
10905
|
deriveNodeExecutionState({
|
|
10686
10906
|
reported: {
|
|
10687
10907
|
status: focus.status.trim(),
|
|
@@ -10691,7 +10911,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10691
10911
|
total: rows.total
|
|
10692
10912
|
} : null
|
|
10693
10913
|
},
|
|
10694
|
-
runStatus: _optionalChain([run, 'optionalAccess',
|
|
10914
|
+
runStatus: _optionalChain([run, 'optionalAccess', _401 => _401.status])
|
|
10695
10915
|
})
|
|
10696
10916
|
) : null;
|
|
10697
10917
|
lines.push(` current step: ${id}${label}${state ? `: ${state}` : ""}`);
|
|
@@ -10739,7 +10959,7 @@ function formatRecentRunLogLines(value) {
|
|
|
10739
10959
|
(line) => typeof line === "string"
|
|
10740
10960
|
);
|
|
10741
10961
|
if (tail.length === 0) return [];
|
|
10742
|
-
const shown = tail.map((line) =>
|
|
10962
|
+
const shown = tail.map((line) => _chunk775AZTO7js.classifyLogLine.call(void 0, line)).filter(
|
|
10743
10963
|
(entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
|
|
10744
10964
|
).slice(-8);
|
|
10745
10965
|
const total = readNonNegativeInteger(logs.totalCount);
|
|
@@ -10783,7 +11003,7 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10783
11003
|
lines.push(` recovery: ${mode}${sourceRunId}`);
|
|
10784
11004
|
}
|
|
10785
11005
|
const runError = typeof run.error === "string" && run.error.trim() ? run.error.trim() : null;
|
|
10786
|
-
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess',
|
|
11006
|
+
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _402 => _402.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
|
|
10787
11007
|
const displayRunError = _nullishCoalesce(structuredRuntimeLimitMessage, () => ( runError));
|
|
10788
11008
|
if (!isRuntimeLimitCheckpoint && displayRunError && (status === "failed" || status === "cancelled")) {
|
|
10789
11009
|
lines.push(` error: ${truncateErrorForDisplay(displayRunError, runId)}`);
|
|
@@ -10794,11 +11014,11 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10794
11014
|
}
|
|
10795
11015
|
}
|
|
10796
11016
|
const failedLogs = readRecord(packaged.failedLogs);
|
|
10797
|
-
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess',
|
|
11017
|
+
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _403 => _403.entries])) ? failedLogs.entries.filter(
|
|
10798
11018
|
(entry) => typeof entry === "string"
|
|
10799
11019
|
) : [];
|
|
10800
|
-
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
10801
|
-
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
11020
|
+
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _404 => _404.association]) === "string" ? failedLogs.association : null;
|
|
11021
|
+
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _405 => _405.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
|
|
10802
11022
|
if (failedLogEntries.length > 0) {
|
|
10803
11023
|
lines.push(" failed logs:");
|
|
10804
11024
|
lines.push(...failedLogEntries.map((entry) => ` ${entry}`));
|
|
@@ -10817,8 +11037,8 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10817
11037
|
)
|
|
10818
11038
|
).slice(0, 16) : [];
|
|
10819
11039
|
lines.push(...packageWarnings.map((warning) => ` warning: ${warning}`));
|
|
10820
|
-
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess',
|
|
10821
|
-
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess',
|
|
11040
|
+
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _406 => _406.next]));
|
|
11041
|
+
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _407 => _407.logs]) === "string") {
|
|
10822
11042
|
lines.push(
|
|
10823
11043
|
failedLogAssociation === "retained_before_truncation" ? ` retained logs: ${failedLogNext.logs}` : ` retry failed logs: ${failedLogNext.logs}`
|
|
10824
11044
|
);
|
|
@@ -10846,20 +11066,20 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10846
11066
|
const stepStatus = typeof step.status === "string" ? step.status : status;
|
|
10847
11067
|
const output = step.output && typeof step.output === "object" && !Array.isArray(step.output) ? step.output : null;
|
|
10848
11068
|
const rowCount = output && typeof output.rowCount === "number" ? ` rows=${formatInteger(output.rowCount)}` : "";
|
|
10849
|
-
const preview = _optionalChain([output, 'optionalAccess',
|
|
10850
|
-
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
11069
|
+
const preview = _optionalChain([output, 'optionalAccess', _408 => _408.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
|
|
11070
|
+
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _409 => _409.rows])) ? preview.rows.length : null;
|
|
10851
11071
|
lines.push(` ${kind} ${id}: ${stepStatus}${rowCount}`);
|
|
10852
|
-
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess',
|
|
11072
|
+
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _410 => _410.summary])));
|
|
10853
11073
|
if (previewRows !== null) {
|
|
10854
11074
|
lines.push(
|
|
10855
|
-
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess',
|
|
11075
|
+
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _411 => _411.truncated]) ? " truncated" : ""}`
|
|
10856
11076
|
);
|
|
10857
11077
|
}
|
|
10858
11078
|
}
|
|
10859
11079
|
const inspectCommand = actionToCommand(next.inspect);
|
|
10860
11080
|
const fullResultCommand = actionToCommand(next.full);
|
|
10861
11081
|
const hasCatalogExportAction = packageDatasetRecords(packaged).some(
|
|
10862
|
-
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call',
|
|
11082
|
+
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _412 => _412(dataset.actions), 'optionalAccess', _413 => _413.exportCsv])))
|
|
10863
11083
|
);
|
|
10864
11084
|
const legacyExportCommand = hasCatalogExportAction ? null : actionToCommand(next.export);
|
|
10865
11085
|
const runAgainCommand = typeof next.run === "string" && next.run.trim() ? next.run.trim() : null;
|
|
@@ -10924,7 +11144,7 @@ function withOrdinaryRunAgainCommand(status, options, resolvedRevisionId) {
|
|
|
10924
11144
|
}
|
|
10925
11145
|
function buildBillingRollupTextLines(status) {
|
|
10926
11146
|
const billing = status.billing;
|
|
10927
|
-
const rollup = _optionalChain([billing, 'optionalAccess',
|
|
11147
|
+
const rollup = _optionalChain([billing, 'optionalAccess', _414 => _414.rollup]);
|
|
10928
11148
|
if (!rollup) return [];
|
|
10929
11149
|
const total = formatCreditAmount2(rollup.totalCreditsRollup);
|
|
10930
11150
|
if (rollup.childCredits > 0 && rollup.descendantRunCount > 0) {
|
|
@@ -10943,7 +11163,7 @@ function buildBillingRollupTextLines(status) {
|
|
|
10943
11163
|
return [` cost: ${total} credits`];
|
|
10944
11164
|
}
|
|
10945
11165
|
function playRunRateLimitedNotice(status) {
|
|
10946
|
-
const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call',
|
|
11166
|
+
const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call', _415 => _415(status), 'optionalAccess', _416 => _416.rateLimited]), () => ( status.rateLimited));
|
|
10947
11167
|
return notice && typeof notice === "object" ? notice : null;
|
|
10948
11168
|
}
|
|
10949
11169
|
function withRateLimitedNotice(status, notice) {
|
|
@@ -10983,7 +11203,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
10983
11203
|
const overview = buildRunOverview(status);
|
|
10984
11204
|
const { run } = overview;
|
|
10985
11205
|
const failed = run.status === "failed";
|
|
10986
|
-
const label = run.status === "completed" ? _optionalChain([overview, 'access',
|
|
11206
|
+
const label = run.status === "completed" ? _optionalChain([overview, 'access', _417 => _417.rowOutcomes, 'optionalAccess', _418 => _418.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
|
|
10987
11207
|
const rateLimited = playRunRateLimitedNotice(status);
|
|
10988
11208
|
const lines = [
|
|
10989
11209
|
...rateLimited ? [rateLimited.message] : [],
|
|
@@ -11005,7 +11225,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11005
11225
|
...formatJsonPreview(compactReturnValue(overview.result))
|
|
11006
11226
|
);
|
|
11007
11227
|
}
|
|
11008
|
-
if (_optionalChain([overview, 'access',
|
|
11228
|
+
if (_optionalChain([overview, 'access', _419 => _419.rowOutcomes, 'optionalAccess', _420 => _420.hasRowFailures])) {
|
|
11009
11229
|
lines.push(
|
|
11010
11230
|
`Rows: ${overview.rowOutcomes.completedRows} completed, ${overview.rowOutcomes.failedRows} failed`
|
|
11011
11231
|
);
|
|
@@ -11034,17 +11254,17 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11034
11254
|
}
|
|
11035
11255
|
function writePlayResult(status, jsonOutput, options) {
|
|
11036
11256
|
const packaged = getPlayRunPackage(status);
|
|
11037
|
-
if (status.package)
|
|
11038
|
-
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
11257
|
+
if (status.package) _chunkTVW6USSGjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
11258
|
+
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _421 => _421.hits]), () => ( null));
|
|
11039
11259
|
if (jsonOutput) {
|
|
11040
|
-
const payload2 = _optionalChain([options, 'optionalAccess',
|
|
11041
|
-
|
|
11260
|
+
const payload2 = _optionalChain([options, 'optionalAccess', _422 => _422.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
|
|
11261
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
11042
11262
|
hits ? { ...payload2, hits } : payload2,
|
|
11043
|
-
{ json: true, fields: _optionalChain([options, 'optionalAccess',
|
|
11263
|
+
{ json: true, fields: _optionalChain([options, 'optionalAccess', _423 => _423.jsonFields]) }
|
|
11044
11264
|
);
|
|
11045
11265
|
return;
|
|
11046
11266
|
}
|
|
11047
|
-
if (packaged && !_optionalChain([options, 'optionalAccess',
|
|
11267
|
+
if (packaged && !_optionalChain([options, 'optionalAccess', _424 => _424.fullJson])) {
|
|
11048
11268
|
const {
|
|
11049
11269
|
logs: _logs,
|
|
11050
11270
|
failedLogs: _failedLogs,
|
|
@@ -11054,7 +11274,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11054
11274
|
...buildPlayCompletionTextLines(status),
|
|
11055
11275
|
...formatRunHitsLines(hits)
|
|
11056
11276
|
];
|
|
11057
|
-
|
|
11277
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0, displayPackage, {
|
|
11058
11278
|
json: false,
|
|
11059
11279
|
text: `${lines2.join("\n")}
|
|
11060
11280
|
`
|
|
@@ -11104,8 +11324,8 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11104
11324
|
lines.push(...renderedServerView.actions);
|
|
11105
11325
|
lines.push(...buildBillingRollupTextLines(status));
|
|
11106
11326
|
const compact = compactPlayStatus(status);
|
|
11107
|
-
const payload = _optionalChain([options, 'optionalAccess',
|
|
11108
|
-
|
|
11327
|
+
const payload = _optionalChain([options, 'optionalAccess', _425 => _425.fullJson]) ? status : compact;
|
|
11328
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
11109
11329
|
{
|
|
11110
11330
|
...payload,
|
|
11111
11331
|
render: {
|
|
@@ -11166,7 +11386,7 @@ async function resolvePlayRunOutputStatus(input) {
|
|
|
11166
11386
|
const fromDurableStatus = input.fromDurableStatus === true || fullDurableTerminalStatuses.has(input.status);
|
|
11167
11387
|
const refreshForFullJson = input.fullJson && !fromDurableStatus;
|
|
11168
11388
|
const streamedTextPackageIncomplete = input.status.status === "completed" && playRunPackageTextLedgerIncomplete(streamedPackage);
|
|
11169
|
-
const refreshFailedTerminal = input.status.status === "failed" && (!fromDurableStatus || _optionalChain([readRecord, 'call',
|
|
11389
|
+
const refreshFailedTerminal = input.status.status === "failed" && (!fromDurableStatus || _optionalChain([readRecord, 'call', _426 => _426(_optionalChain([streamedPackage, 'optionalAccess', _427 => _427.run])), 'optionalAccess', _428 => _428.status]) !== "failed");
|
|
11170
11390
|
if (!refreshForFullJson && !streamedTextPackageIncomplete && !refreshFailedTerminal) {
|
|
11171
11391
|
if (input.fullJson && fromDurableStatus && TERMINAL_PLAY_STATUSES.has(input.status.status)) {
|
|
11172
11392
|
fullDurableTerminalStatuses.add(input.status);
|
|
@@ -11273,14 +11493,14 @@ function mergeExportColumns(preferredColumns, rows) {
|
|
|
11273
11493
|
return columns;
|
|
11274
11494
|
}
|
|
11275
11495
|
function sqlSafeExportColumnName(id) {
|
|
11276
|
-
const prefix = _nullishCoalesce(_optionalChain([id, 'access',
|
|
11496
|
+
const prefix = _nullishCoalesce(_optionalChain([id, 'access', _429 => _429.trim, 'call', _430 => _430(), 'access', _431 => _431.match, 'call', _432 => _432(/^_+/), 'optionalAccess', _433 => _433[0]]), () => ( ""));
|
|
11277
11497
|
const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
11278
11498
|
const safe = `${prefix}${normalized || "column"}`;
|
|
11279
11499
|
return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
|
|
11280
11500
|
}
|
|
11281
11501
|
async function fetchBackingDatasetRows(input) {
|
|
11282
11502
|
const playName = extractRunPlayName(input.status);
|
|
11283
|
-
const tableNamespace = _optionalChain([input, 'access',
|
|
11503
|
+
const tableNamespace = _optionalChain([input, 'access', _434 => _434.rowsInfo, 'access', _435 => _435.tableNamespace, 'optionalAccess', _436 => _436.trim, 'call', _437 => _437()]);
|
|
11284
11504
|
if (!playName || !tableNamespace) {
|
|
11285
11505
|
return null;
|
|
11286
11506
|
}
|
|
@@ -11320,7 +11540,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11320
11540
|
seenEnvelopeKeys.add(key);
|
|
11321
11541
|
}
|
|
11322
11542
|
sheetRows.push(...page.rows);
|
|
11323
|
-
const summaryTotal = _optionalChain([page, 'access',
|
|
11543
|
+
const summaryTotal = _optionalChain([page, 'access', _438 => _438.summary, 'optionalAccess', _439 => _439.stats, 'optionalAccess', _440 => _440.total]);
|
|
11324
11544
|
if (typeof summaryTotal === "number" && Number.isFinite(summaryTotal)) {
|
|
11325
11545
|
settledTotal = Math.max(_nullishCoalesce(settledTotal, () => ( 0)), Math.trunc(summaryTotal));
|
|
11326
11546
|
}
|
|
@@ -11329,7 +11549,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11329
11549
|
}
|
|
11330
11550
|
offset += page.rows.length;
|
|
11331
11551
|
}
|
|
11332
|
-
const withError =
|
|
11552
|
+
const withError = _chunkTVW6USSGjs.tableExportHasFailedRows.call(void 0,
|
|
11333
11553
|
sheetRows.filter(
|
|
11334
11554
|
(row) => Boolean(row) && typeof row === "object" && !Array.isArray(row)
|
|
11335
11555
|
)
|
|
@@ -11345,7 +11565,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11345
11565
|
return [
|
|
11346
11566
|
withError ? {
|
|
11347
11567
|
...exported,
|
|
11348
|
-
[
|
|
11568
|
+
[_chunkTVW6USSGjs.TABLE_EXPORT_ERROR_COLUMN]: _chunkTVW6USSGjs.tableExportErrorCell.call(void 0,
|
|
11349
11569
|
row
|
|
11350
11570
|
)
|
|
11351
11571
|
} : exported
|
|
@@ -11414,7 +11634,7 @@ function assertDatasetHasExportableRows(input) {
|
|
|
11414
11634
|
const rowOutcomes = _nullishCoalesce(readRowOutcomeSummary(input.status), () => ( readRowOutcomeSummary(
|
|
11415
11635
|
getRecordField(getRecordField(input.status, "result"), "_metadata")
|
|
11416
11636
|
)));
|
|
11417
|
-
if (input.allowEmpty === true && input.status.status === "completed" && !getRecordField(input.status, "error") && !getRecordField(input.status.progress, "error") && structuredErrorsForStatus(input.status).length === 0 && input.rowsInfo.complete && input.rowsInfo.totalRows === 0 && _optionalChain([rowOutcomes, 'optionalAccess',
|
|
11637
|
+
if (input.allowEmpty === true && input.status.status === "completed" && !getRecordField(input.status, "error") && !getRecordField(input.status.progress, "error") && structuredErrorsForStatus(input.status).length === 0 && input.rowsInfo.complete && input.rowsInfo.totalRows === 0 && _optionalChain([rowOutcomes, 'optionalAccess', _441 => _441.failedRows]) === 0 && !rowOutcomes.hasRowFailures) {
|
|
11418
11638
|
return input.rowsInfo;
|
|
11419
11639
|
}
|
|
11420
11640
|
const datasetLabel = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(input.datasetPath, () => ( input.rowsInfo.tableNamespace)), () => ( input.rowsInfo.source)), () => ( "result.rows"));
|
|
@@ -11486,8 +11706,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11486
11706
|
path: dataset.exportFile(outPath, options),
|
|
11487
11707
|
rowsInfo: dataset.info(),
|
|
11488
11708
|
currentTable: false,
|
|
11489
|
-
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11490
|
-
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11709
|
+
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _442 => _442.source]), () => ( null)),
|
|
11710
|
+
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _443 => _443.info, 'call', _444 => _444()]), () => ( null))
|
|
11491
11711
|
};
|
|
11492
11712
|
};
|
|
11493
11713
|
const run = Run.open({
|
|
@@ -11499,7 +11719,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11499
11719
|
const returnedRows = datasets.returned().map((dataset) => dataset.info());
|
|
11500
11720
|
const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
|
|
11501
11721
|
const selectedDataset = run.dataset(options.datasetPath);
|
|
11502
|
-
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11722
|
+
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _445 => _445.info, 'call', _446 => _446()]), () => ( null));
|
|
11503
11723
|
if (!selectedDataset && options.datasetPath) {
|
|
11504
11724
|
const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
|
|
11505
11725
|
const commands = datasetChoiceLines({
|
|
@@ -11612,7 +11832,7 @@ ${commands.join("\n")}`,
|
|
|
11612
11832
|
throw error;
|
|
11613
11833
|
}
|
|
11614
11834
|
}
|
|
11615
|
-
if (_optionalChain([fetchedRowsInfo, 'optionalAccess',
|
|
11835
|
+
if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _447 => _447.complete])) {
|
|
11616
11836
|
const guarded2 = assertDatasetHasExportableRows({
|
|
11617
11837
|
rowsInfo: fetchedRowsInfo,
|
|
11618
11838
|
status,
|
|
@@ -11677,7 +11897,7 @@ function extractActiveRunsFromError(error) {
|
|
|
11677
11897
|
if (!(error instanceof _chunkDIAWYWT5js.DeeplineError)) {
|
|
11678
11898
|
return [];
|
|
11679
11899
|
}
|
|
11680
|
-
const response = _optionalChain([error, 'access',
|
|
11900
|
+
const response = _optionalChain([error, 'access', _448 => _448.details, 'optionalAccess', _449 => _449.response]);
|
|
11681
11901
|
if (!response || typeof response !== "object" || Array.isArray(response)) {
|
|
11682
11902
|
return [];
|
|
11683
11903
|
}
|
|
@@ -11794,8 +12014,8 @@ function renderServerResultView(value) {
|
|
|
11794
12014
|
return { lines: [], actions: [] };
|
|
11795
12015
|
}
|
|
11796
12016
|
const view = value;
|
|
11797
|
-
const renderedSections = Array.isArray(_optionalChain([view, 'access',
|
|
11798
|
-
const renderedActions = Array.isArray(_optionalChain([view, 'access',
|
|
12017
|
+
const renderedSections = Array.isArray(_optionalChain([view, 'access', _450 => _450.render, 'optionalAccess', _451 => _451.sections])) ? view.render.sections : [];
|
|
12018
|
+
const renderedActions = Array.isArray(_optionalChain([view, 'access', _452 => _452.render, 'optionalAccess', _453 => _453.actions])) ? view.render.actions : [];
|
|
11799
12019
|
if (renderedSections.length > 0 || renderedActions.length > 0) {
|
|
11800
12020
|
const lines2 = [];
|
|
11801
12021
|
for (const section of renderedSections) {
|
|
@@ -11833,7 +12053,7 @@ function renderServerResultView(value) {
|
|
|
11833
12053
|
}
|
|
11834
12054
|
const tables = Array.isArray(view.tables) ? view.tables : [];
|
|
11835
12055
|
const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
|
|
11836
|
-
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess',
|
|
12056
|
+
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _454 => _454.queryCommand]) === "string") {
|
|
11837
12057
|
lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
|
|
11838
12058
|
}
|
|
11839
12059
|
if (tables.length > 0) {
|
|
@@ -11880,7 +12100,7 @@ function renderServerResultView(value) {
|
|
|
11880
12100
|
function writeStartedPlayRun(input) {
|
|
11881
12101
|
if (input.package && isPlayRunPackageValue(input.package)) {
|
|
11882
12102
|
const run = input.package.run;
|
|
11883
|
-
|
|
12103
|
+
_chunkTVW6USSGjs.recordPlayTermination.call(void 0, {
|
|
11884
12104
|
id: run.id,
|
|
11885
12105
|
status: run.status,
|
|
11886
12106
|
finishedAt: run.finishedAt
|
|
@@ -11893,7 +12113,7 @@ function writeStartedPlayRun(input) {
|
|
|
11893
12113
|
dashboardUrl: input.dashboardUrl,
|
|
11894
12114
|
package: input.package
|
|
11895
12115
|
};
|
|
11896
|
-
|
|
12116
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
|
|
11897
12117
|
json: true,
|
|
11898
12118
|
fields: input.jsonFields
|
|
11899
12119
|
});
|
|
@@ -11915,7 +12135,7 @@ function writeStartedPlayRun(input) {
|
|
|
11915
12135
|
input.progress.writeLine(output2, process.stdout);
|
|
11916
12136
|
return;
|
|
11917
12137
|
}
|
|
11918
|
-
|
|
12138
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0, input.package, {
|
|
11919
12139
|
json: false,
|
|
11920
12140
|
text: `${output2}
|
|
11921
12141
|
`
|
|
@@ -11944,7 +12164,7 @@ function writeStartedPlayRun(input) {
|
|
|
11944
12164
|
) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)}`] : []
|
|
11945
12165
|
];
|
|
11946
12166
|
if (input.jsonOutput) {
|
|
11947
|
-
|
|
12167
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
|
|
11948
12168
|
return;
|
|
11949
12169
|
}
|
|
11950
12170
|
if (input.dashboardUrl) {
|
|
@@ -11955,7 +12175,7 @@ function writeStartedPlayRun(input) {
|
|
|
11955
12175
|
input.progress.writeLine(output, process.stdout);
|
|
11956
12176
|
return;
|
|
11957
12177
|
}
|
|
11958
|
-
|
|
12178
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
11959
12179
|
{
|
|
11960
12180
|
...payload,
|
|
11961
12181
|
render: { sections: [{ title: "play run", lines }] }
|
|
@@ -11965,7 +12185,7 @@ function writeStartedPlayRun(input) {
|
|
|
11965
12185
|
);
|
|
11966
12186
|
}
|
|
11967
12187
|
function parsePlayCheckOptions(args) {
|
|
11968
|
-
const selection =
|
|
12188
|
+
const selection = _chunkBSKPQB2Pjs.parseJsonFields.call(void 0, args, "check");
|
|
11969
12189
|
args = selection.args;
|
|
11970
12190
|
const target = args[0];
|
|
11971
12191
|
if (!target || target.startsWith("-")) {
|
|
@@ -11977,7 +12197,7 @@ function parsePlayCheckOptions(args) {
|
|
|
11977
12197
|
if (arg !== "--json" && arg !== "--full")
|
|
11978
12198
|
throw new Error(`Unknown plays check option: ${arg}`);
|
|
11979
12199
|
}
|
|
11980
|
-
const jsonOutput =
|
|
12200
|
+
const jsonOutput = _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args);
|
|
11981
12201
|
return {
|
|
11982
12202
|
target,
|
|
11983
12203
|
jsonOutput,
|
|
@@ -12053,7 +12273,7 @@ ${PLAY_PUBLISH_USAGE}`
|
|
|
12053
12273
|
useLatest,
|
|
12054
12274
|
expectedArtifactHash,
|
|
12055
12275
|
dryRun,
|
|
12056
|
-
jsonOutput:
|
|
12276
|
+
jsonOutput: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)
|
|
12057
12277
|
};
|
|
12058
12278
|
}
|
|
12059
12279
|
var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
|
|
@@ -12094,7 +12314,7 @@ ${PLAY_SAVE_USAGE}`);
|
|
|
12094
12314
|
target,
|
|
12095
12315
|
expectedArtifactHash,
|
|
12096
12316
|
dryRun,
|
|
12097
|
-
jsonOutput:
|
|
12317
|
+
jsonOutput: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)
|
|
12098
12318
|
};
|
|
12099
12319
|
}
|
|
12100
12320
|
function printScheduledPlayCapacity(capacity) {
|
|
@@ -12147,7 +12367,7 @@ function checkHintExpression(value) {
|
|
|
12147
12367
|
return stringValue2(value).replace(/^toolExecutionResult\./, "result.");
|
|
12148
12368
|
}
|
|
12149
12369
|
function checkHintRawPath(value) {
|
|
12150
|
-
return _optionalChain([value, 'optionalAccess',
|
|
12370
|
+
return _optionalChain([value, 'optionalAccess', _455 => _455.startsWith, 'call', _456 => _456("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
|
|
12151
12371
|
}
|
|
12152
12372
|
function collectStaticPipelineToolIds(staticPipeline) {
|
|
12153
12373
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -12222,30 +12442,30 @@ function cronExecutionLabel(status) {
|
|
|
12222
12442
|
}
|
|
12223
12443
|
function readLiveCronMetadata(play) {
|
|
12224
12444
|
const record3 = readRecord(play);
|
|
12225
|
-
const metadata = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
12445
|
+
const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _457 => _457.triggerMetadata]));
|
|
12226
12446
|
return {
|
|
12227
|
-
schedule: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12228
|
-
timezone: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12229
|
-
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12230
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12231
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12447
|
+
schedule: typeof _optionalChain([metadata, 'optionalAccess', _458 => _458.cronSchedule]) === "string" ? metadata.cronSchedule : null,
|
|
12448
|
+
timezone: typeof _optionalChain([metadata, 'optionalAccess', _459 => _459.cronTimezone]) === "string" ? metadata.cronTimezone : null,
|
|
12449
|
+
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _460 => _460.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
|
|
12450
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _461 => _461.blockedAt]) === "number" ? metadata.blockedAt : null,
|
|
12451
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _462 => _462.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
|
|
12232
12452
|
};
|
|
12233
12453
|
}
|
|
12234
12454
|
function liveTriggerStatusLines(status, play) {
|
|
12235
12455
|
const cron = readLiveCronMetadata(play);
|
|
12236
|
-
if (!_optionalChain([status, 'optionalAccess',
|
|
12456
|
+
if (!_optionalChain([status, 'optionalAccess', _463 => _463.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _464 => _464.webhook])) return [];
|
|
12237
12457
|
const lines = [];
|
|
12238
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12458
|
+
if (_optionalChain([status, 'optionalAccess', _465 => _465.cron]) || cron.schedule) {
|
|
12239
12459
|
const timezone = cron.timezone ? ` (${cron.timezone})` : "";
|
|
12240
12460
|
lines.push(
|
|
12241
|
-
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
12461
|
+
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _466 => _466.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
|
|
12242
12462
|
);
|
|
12243
|
-
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess',
|
|
12463
|
+
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _467 => _467.cron]) === "active") {
|
|
12244
12464
|
lines.push(
|
|
12245
12465
|
` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
|
|
12246
12466
|
);
|
|
12247
12467
|
}
|
|
12248
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12468
|
+
if (_optionalChain([status, 'optionalAccess', _468 => _468.blockedReason])) {
|
|
12249
12469
|
lines.push(` Schedule issue: ${status.blockedReason}`);
|
|
12250
12470
|
if (status.blockedReasonCode || cron.blockedReasonCode) {
|
|
12251
12471
|
lines.push(
|
|
@@ -12261,7 +12481,7 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12261
12481
|
);
|
|
12262
12482
|
}
|
|
12263
12483
|
}
|
|
12264
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12484
|
+
if (_optionalChain([status, 'optionalAccess', _469 => _469.webhook])) {
|
|
12265
12485
|
lines.push(` Webhook: ${status.webhook}`);
|
|
12266
12486
|
}
|
|
12267
12487
|
return lines;
|
|
@@ -12269,11 +12489,11 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12269
12489
|
function triggerStatusFromMetadata(value) {
|
|
12270
12490
|
const metadata = readRecord(value);
|
|
12271
12491
|
return {
|
|
12272
|
-
cron: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12273
|
-
webhook: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12274
|
-
blockedReason: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12275
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12276
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12492
|
+
cron: typeof _optionalChain([metadata, 'optionalAccess', _470 => _470.cronStatus]) === "string" ? metadata.cronStatus : null,
|
|
12493
|
+
webhook: typeof _optionalChain([metadata, 'optionalAccess', _471 => _471.webhookStatus]) === "string" ? metadata.webhookStatus : null,
|
|
12494
|
+
blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _472 => _472.blockedReason]) === "string" ? metadata.blockedReason : null,
|
|
12495
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _473 => _473.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
|
|
12496
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _474 => _474.blockedAt]) === "number" ? metadata.blockedAt : null
|
|
12277
12497
|
};
|
|
12278
12498
|
}
|
|
12279
12499
|
function printPublishReceipt(input) {
|
|
@@ -12305,7 +12525,7 @@ function printBundledRuntimeWarning(bundle) {
|
|
|
12305
12525
|
async function handlePlayCheck(args) {
|
|
12306
12526
|
const options = parsePlayCheckOptions(args);
|
|
12307
12527
|
if (!isFileTarget(options.target)) {
|
|
12308
|
-
const client = new (0,
|
|
12528
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
12309
12529
|
try {
|
|
12310
12530
|
await assertCanonicalNamedPlayReference(client, options.target, {
|
|
12311
12531
|
command: "check"
|
|
@@ -12334,7 +12554,7 @@ async function handlePlayCheck(args) {
|
|
|
12334
12554
|
},
|
|
12335
12555
|
...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
|
|
12336
12556
|
};
|
|
12337
|
-
|
|
12557
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0, result, {
|
|
12338
12558
|
json: options.jsonOutput,
|
|
12339
12559
|
fields: options.jsonFields,
|
|
12340
12560
|
text: renderPlayCheckOutput(result) + "\n"
|
|
@@ -12344,7 +12564,7 @@ async function handlePlayCheck(args) {
|
|
|
12344
12564
|
const resolved = _path.resolve.call(void 0, options.target);
|
|
12345
12565
|
const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
|
|
12346
12566
|
if (options.jsonOutput) {
|
|
12347
|
-
|
|
12567
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
12348
12568
|
{
|
|
12349
12569
|
kind: "play_check",
|
|
12350
12570
|
checked: "named_contract",
|
|
@@ -12384,9 +12604,9 @@ async function handlePlayCheck(args) {
|
|
|
12384
12604
|
target: options.target,
|
|
12385
12605
|
full: options.full,
|
|
12386
12606
|
detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full`,
|
|
12387
|
-
publishCommand: _optionalChain([primary, 'optionalAccess',
|
|
12607
|
+
publishCommand: _optionalChain([primary, 'optionalAccess', _475 => _475.result, 'access', _476 => _476.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
|
|
12388
12608
|
});
|
|
12389
|
-
|
|
12609
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0, output, {
|
|
12390
12610
|
json: options.jsonOutput,
|
|
12391
12611
|
fields: options.jsonFields,
|
|
12392
12612
|
text: renderPlayCheckOutput(output) + "\n"
|
|
@@ -12399,7 +12619,7 @@ function resolvePlayCheckExportNames(sourceCode) {
|
|
|
12399
12619
|
return exports.map((entry) => entry.name);
|
|
12400
12620
|
}
|
|
12401
12621
|
function artifactForProductionCompatibilityCheck(artifact) {
|
|
12402
|
-
const rawEdition = _optionalChain([process, 'access',
|
|
12622
|
+
const rawEdition = _optionalChain([process, 'access', _477 => _477.env, 'access', _478 => _478.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _479 => _479.trim, 'call', _480 => _480()]);
|
|
12403
12623
|
if (!rawEdition) return artifact;
|
|
12404
12624
|
if (!/^\d+$/.test(rawEdition)) {
|
|
12405
12625
|
throw new Error(
|
|
@@ -12440,7 +12660,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12440
12660
|
}
|
|
12441
12661
|
const playName = _nullishCoalesce(graph.root.playName, () => ( fallbackName));
|
|
12442
12662
|
const authoringErrors = collectPlayGraphAuthoringErrors(graph);
|
|
12443
|
-
const client = new (0,
|
|
12663
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
12444
12664
|
const integrationMode = resolveEvalIntegrationMode();
|
|
12445
12665
|
const checked = await checkLocalPlayGraph({
|
|
12446
12666
|
client,
|
|
@@ -12450,7 +12670,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12450
12670
|
integrationMode,
|
|
12451
12671
|
prepareArtifact: artifactForProductionCompatibilityCheck
|
|
12452
12672
|
});
|
|
12453
|
-
const importedPlayName = _optionalChain([checked, 'access',
|
|
12673
|
+
const importedPlayName = _optionalChain([checked, 'access', _481 => _481.failedChild, 'optionalAccess', _482 => _482.playName]);
|
|
12454
12674
|
const diagnosticPrefix = importedPlayName ? `Imported Play ${importedPlayName}: ` : "";
|
|
12455
12675
|
const valid = checked.result.valid && !checked.failedChild && authoringErrors.length === 0;
|
|
12456
12676
|
const errors = [
|
|
@@ -12466,7 +12686,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12466
12686
|
valid,
|
|
12467
12687
|
errors: valid ? checked.result.errors : addPlayCheckRepairHints({
|
|
12468
12688
|
errors,
|
|
12469
|
-
sourceCode: _nullishCoalesce(_optionalChain([checked, 'access',
|
|
12689
|
+
sourceCode: _nullishCoalesce(_optionalChain([checked, 'access', _483 => _483.failedChild, 'optionalAccess', _484 => _484.sourceCode]), () => ( graph.root.sourceCode))
|
|
12470
12690
|
}),
|
|
12471
12691
|
...checked.failedChild && checked.result.issues ? {
|
|
12472
12692
|
issues: checked.result.issues.map((issue) => ({
|
|
@@ -12495,11 +12715,9 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12495
12715
|
let client;
|
|
12496
12716
|
let prefetchClient;
|
|
12497
12717
|
let admissionCapability;
|
|
12498
|
-
let
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
);
|
|
12502
|
-
const progress = _nullishCoalesce(_chunk5KNRQWHEjs.getActiveCliProgress.call(void 0, ), () => ( _chunk5KNRQWHEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12718
|
+
let cancelAdmissionCapability;
|
|
12719
|
+
let cliAdmission = _chunkC6QWRSMQjs.usesCliPlayAdmission.call(void 0, "plays run", process.argv.slice(2));
|
|
12720
|
+
const progress = _nullishCoalesce(_chunkEC2CVPN5js.getActiveCliProgress.call(void 0, ), () => ( _chunkEC2CVPN5js.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12503
12721
|
const absolutePlayPath = _path.resolve.call(void 0, options.target.path);
|
|
12504
12722
|
progress.phase("compiling play");
|
|
12505
12723
|
const sourceCode = traceCliSync(
|
|
@@ -12514,19 +12732,23 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12514
12732
|
console.error(error instanceof Error ? error.message : String(error));
|
|
12515
12733
|
return 1;
|
|
12516
12734
|
}
|
|
12517
|
-
if (!options.dryRun && options.watch && cliAdmission && options.maxTotalCredits === null && !inputContainsLocalFilePath(runtimeInput)) {
|
|
12518
|
-
const clientForPrefetch = new (0,
|
|
12735
|
+
if (!options.dryRun && options.watch && cliAdmission && Boolean(options.runIdFile) && options.maxTotalCredits === null && !inputContainsLocalFilePath(runtimeInput)) {
|
|
12736
|
+
const clientForPrefetch = new (0, _chunkIHMYIHF4js.DeeplineClient)(playRunClientOptions(options));
|
|
12519
12737
|
prefetchClient = clientForPrefetch;
|
|
12520
|
-
|
|
12738
|
+
const capabilityController = new AbortController();
|
|
12739
|
+
cancelAdmissionCapability = () => capabilityController.abort();
|
|
12740
|
+
admissionCapability = _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
12521
12741
|
"cli.play_admission_capability_prefetch",
|
|
12522
12742
|
{ targetKind: "file" },
|
|
12523
|
-
() => clientForPrefetch.prefetchPlayRunAdmissionCapability(
|
|
12743
|
+
() => clientForPrefetch.prefetchPlayRunAdmissionCapability({
|
|
12744
|
+
signal: capabilityController.signal
|
|
12745
|
+
})
|
|
12524
12746
|
);
|
|
12525
12747
|
void admissionCapability.catch(() => void 0);
|
|
12526
12748
|
}
|
|
12527
12749
|
let graph;
|
|
12528
12750
|
try {
|
|
12529
|
-
graph = await
|
|
12751
|
+
graph = await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
12530
12752
|
"cli.play_file_bundle_graph",
|
|
12531
12753
|
{ targetKind: "file" },
|
|
12532
12754
|
() => collectBundledPlayGraph(
|
|
@@ -12540,14 +12762,14 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12540
12762
|
if (options.dryRun) {
|
|
12541
12763
|
progress.complete();
|
|
12542
12764
|
renderLocalPlayExecutionPlan(
|
|
12543
|
-
|
|
12765
|
+
_chunkUQ3LQ6IFjs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile }),
|
|
12544
12766
|
{ dryRun: true, json: options.jsonOutput }
|
|
12545
12767
|
);
|
|
12546
12768
|
return 0;
|
|
12547
12769
|
}
|
|
12548
|
-
client = _nullishCoalesce(prefetchClient, () => ( new (0,
|
|
12770
|
+
client = _nullishCoalesce(prefetchClient, () => ( new (0, _chunkIHMYIHF4js.DeeplineClient)(playRunClientOptions(options))));
|
|
12549
12771
|
if (cliAdmission && (graph.root.importedPlayDependencies.length > 0 || inputContainsLocalFilePath(runtimeInput))) {
|
|
12550
|
-
await
|
|
12772
|
+
await _chunkC6QWRSMQjs.checkPlayRunCompatibility.call(void 0,
|
|
12551
12773
|
client.baseUrl,
|
|
12552
12774
|
options.maintenancePolicy
|
|
12553
12775
|
);
|
|
@@ -12560,7 +12782,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12560
12782
|
});
|
|
12561
12783
|
const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
|
|
12562
12784
|
if (canDeferCompilerManifest) {
|
|
12563
|
-
|
|
12785
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
12564
12786
|
phase: "cli.play_file_compile_manifests",
|
|
12565
12787
|
ms: 0,
|
|
12566
12788
|
ok: true,
|
|
@@ -12569,7 +12791,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12569
12791
|
reason: "validated_by_run_route"
|
|
12570
12792
|
});
|
|
12571
12793
|
} else {
|
|
12572
|
-
await
|
|
12794
|
+
await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
12573
12795
|
"cli.play_file_compile_manifests",
|
|
12574
12796
|
{ targetKind: "file", skipped: false },
|
|
12575
12797
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
@@ -12590,13 +12812,13 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12590
12812
|
if (bundleResult.importedPlayDependencies.length > 0) {
|
|
12591
12813
|
try {
|
|
12592
12814
|
renderLocalPlayExecutionPlan(
|
|
12593
|
-
|
|
12815
|
+
_chunkUQ3LQ6IFjs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile })
|
|
12594
12816
|
);
|
|
12595
12817
|
progress.phase("pinning imported plays");
|
|
12596
|
-
graph = await
|
|
12818
|
+
graph = await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
12597
12819
|
"cli.play_file_pin_imports",
|
|
12598
12820
|
{ targetKind: "file" },
|
|
12599
|
-
() =>
|
|
12821
|
+
() => _chunkUQ3LQ6IFjs.pinLocalPlayImports.call(void 0, client, graph)
|
|
12600
12822
|
);
|
|
12601
12823
|
bundleResult = graph.root;
|
|
12602
12824
|
} catch (error) {
|
|
@@ -12609,10 +12831,10 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12609
12831
|
(file) => stageFile(file.logicalPath, file.absolutePath)
|
|
12610
12832
|
);
|
|
12611
12833
|
const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
|
|
12612
|
-
const fileInputBindings =
|
|
12613
|
-
_optionalChain([compilerManifest, 'optionalAccess',
|
|
12834
|
+
const fileInputBindings = _chunkAUQQVDABjs.fileInputBindingsFromStaticPipeline.call(void 0,
|
|
12835
|
+
_optionalChain([compilerManifest, 'optionalAccess', _485 => _485.staticPipeline])
|
|
12614
12836
|
);
|
|
12615
|
-
const stagedFileInputs = await
|
|
12837
|
+
const stagedFileInputs = await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
12616
12838
|
"cli.play_stage_inputs",
|
|
12617
12839
|
{
|
|
12618
12840
|
targetKind: "file",
|
|
@@ -12659,10 +12881,10 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12659
12881
|
};
|
|
12660
12882
|
if (options.watch) {
|
|
12661
12883
|
progress.phase("starting run");
|
|
12662
|
-
const finalStatus = await
|
|
12884
|
+
const finalStatus = await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
12663
12885
|
"cli.play_start_watch",
|
|
12664
12886
|
{ targetKind: "file", playName },
|
|
12665
|
-
() => (options.runIdFile
|
|
12887
|
+
() => (options.runIdFile ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
|
|
12666
12888
|
client,
|
|
12667
12889
|
request: startRequest,
|
|
12668
12890
|
playName,
|
|
@@ -12673,15 +12895,16 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12673
12895
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
12674
12896
|
open: options.open,
|
|
12675
12897
|
progress,
|
|
12676
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
12677
|
-
onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12678
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
12898
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _486 => _486.onRunStarted]),
|
|
12899
|
+
onSubmission: _optionalChain([hooks, 'optionalAccess', _487 => _487.onSubmission]),
|
|
12900
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _488 => _488.onRunAdmitted]),
|
|
12679
12901
|
maintenancePolicy: options.maintenancePolicy,
|
|
12680
12902
|
...!options.runIdFile || options.fullJson ? { fullJson: options.fullJson } : {},
|
|
12681
12903
|
...cliAdmission ? {
|
|
12682
12904
|
cliAdmission: true,
|
|
12683
12905
|
streamTerminalWindowMs: PLAY_START_STREAM_TERMINAL_WINDOW_MS,
|
|
12684
|
-
...admissionCapability ? { admissionCapability } : {}
|
|
12906
|
+
...admissionCapability ? { admissionCapability } : {},
|
|
12907
|
+
...cancelAdmissionCapability ? { cancelAdmissionCapability } : {}
|
|
12685
12908
|
} : {}
|
|
12686
12909
|
}).catch(async (error) => {
|
|
12687
12910
|
throw await normalizePlayStartError(client, error, playName);
|
|
@@ -12704,8 +12927,8 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12704
12927
|
),
|
|
12705
12928
|
options
|
|
12706
12929
|
);
|
|
12707
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
12708
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12930
|
+
_optionalChain([hooks, 'optionalAccess', _489 => _489.onTerminalStatus, 'optionalCall', _490 => _490(outputStatus)]);
|
|
12931
|
+
if (_optionalChain([hooks, 'optionalAccess', _491 => _491.writeResult])) {
|
|
12709
12932
|
await hooks.writeResult(client, outputStatus);
|
|
12710
12933
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12711
12934
|
}
|
|
@@ -12720,20 +12943,20 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12720
12943
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12721
12944
|
}
|
|
12722
12945
|
progress.phase("starting run");
|
|
12723
|
-
const started = await
|
|
12946
|
+
const started = await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
12724
12947
|
"cli.play_start_unwatched",
|
|
12725
12948
|
{ targetKind: "file", playName },
|
|
12726
|
-
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12949
|
+
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _492 => _492.onSubmission]) }).catch(async (error) => {
|
|
12727
12950
|
throw await normalizePlayStartError(client, error, playName);
|
|
12728
12951
|
})
|
|
12729
12952
|
);
|
|
12730
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12731
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12953
|
+
await _optionalChain([hooks, 'optionalAccess', _493 => _493.onRunStarted, 'optionalCall', _494 => _494(started.workflowId)]);
|
|
12954
|
+
await _optionalChain([hooks, 'optionalAccess', _495 => _495.onRunAdmitted, 'optionalCall', _496 => _496(started.workflowId)]);
|
|
12732
12955
|
const resolvedDashboardUrl = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
12733
12956
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
12734
12957
|
progress.phase("started run");
|
|
12735
12958
|
progress.complete();
|
|
12736
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12959
|
+
if (_optionalChain([hooks, 'optionalAccess', _497 => _497.writeStarted])) {
|
|
12737
12960
|
hooks.writeStarted(started.workflowId, _nullishCoalesce(started.status, () => ( "started")));
|
|
12738
12961
|
return 0;
|
|
12739
12962
|
}
|
|
@@ -12760,7 +12983,7 @@ async function resolveNamedRunRevisionId(input) {
|
|
|
12760
12983
|
if (input.selector === "latest") {
|
|
12761
12984
|
const versions = await input.client.listPlayVersions(input.playName);
|
|
12762
12985
|
const latest = versions[0];
|
|
12763
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
12986
|
+
if (!_optionalChain([latest, 'optionalAccess', _498 => _498._id])) {
|
|
12764
12987
|
throw new Error(`No saved revisions found for ${input.playName}.`);
|
|
12765
12988
|
}
|
|
12766
12989
|
return latest._id;
|
|
@@ -12771,12 +12994,9 @@ async function handleNamedRun(options, hooks) {
|
|
|
12771
12994
|
if (options.target.kind !== "name") {
|
|
12772
12995
|
throw new Error("Expected a named play run target.");
|
|
12773
12996
|
}
|
|
12774
|
-
const client = new (0,
|
|
12775
|
-
let cliAdmission =
|
|
12776
|
-
|
|
12777
|
-
process.argv.slice(2)
|
|
12778
|
-
);
|
|
12779
|
-
const progress = _nullishCoalesce(_chunk5KNRQWHEjs.getActiveCliProgress.call(void 0, ), () => ( _chunk5KNRQWHEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12997
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)(playRunClientOptions(options));
|
|
12998
|
+
let cliAdmission = _chunkC6QWRSMQjs.usesCliPlayAdmission.call(void 0, "plays run", process.argv.slice(2));
|
|
12999
|
+
const progress = _nullishCoalesce(_chunkEC2CVPN5js.getActiveCliProgress.call(void 0, ), () => ( _chunkEC2CVPN5js.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12780
13000
|
const playName = options.target.name;
|
|
12781
13001
|
const runtimeInput = options.input ? { ...options.input } : {};
|
|
12782
13002
|
try {
|
|
@@ -12790,24 +13010,29 @@ async function handleNamedRun(options, hooks) {
|
|
|
12790
13010
|
revisionSelector: options.revisionSelector
|
|
12791
13011
|
});
|
|
12792
13012
|
let admissionCapability;
|
|
12793
|
-
|
|
12794
|
-
|
|
13013
|
+
let cancelAdmissionCapability;
|
|
13014
|
+
if (options.watch && cliAdmission && Boolean(options.runIdFile) && options.maxTotalCredits === null && !needsPlayDefinition && !inputContainsLocalFilePath(runtimeInput)) {
|
|
13015
|
+
const capabilityController = new AbortController();
|
|
13016
|
+
cancelAdmissionCapability = () => capabilityController.abort();
|
|
13017
|
+
admissionCapability = _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
12795
13018
|
"cli.play_admission_capability_prefetch",
|
|
12796
13019
|
{ targetKind: "name", playName },
|
|
12797
|
-
() => client.prefetchPlayRunAdmissionCapability(
|
|
13020
|
+
() => client.prefetchPlayRunAdmissionCapability({
|
|
13021
|
+
signal: capabilityController.signal
|
|
13022
|
+
})
|
|
12798
13023
|
);
|
|
12799
13024
|
void admissionCapability.catch(() => void 0);
|
|
12800
13025
|
}
|
|
12801
13026
|
const playDetail = needsPlayDefinition ? await (async () => {
|
|
12802
13027
|
progress.phase("loading play definition");
|
|
12803
|
-
return
|
|
13028
|
+
return _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
12804
13029
|
"cli.play_load_definition",
|
|
12805
13030
|
{ targetKind: "name", playName, skipped: false },
|
|
12806
13031
|
() => assertCanonicalNamedPlayReference(client, playName, {
|
|
12807
13032
|
command: "run"
|
|
12808
13033
|
})
|
|
12809
13034
|
);
|
|
12810
|
-
})() : (
|
|
13035
|
+
})() : (_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
12811
13036
|
phase: "cli.play_load_definition",
|
|
12812
13037
|
ms: 0,
|
|
12813
13038
|
ok: true,
|
|
@@ -12816,7 +13041,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12816
13041
|
skipped: true
|
|
12817
13042
|
}), null);
|
|
12818
13043
|
progress.phase("selecting revision");
|
|
12819
|
-
const selectedRevisionId = await
|
|
13044
|
+
const selectedRevisionId = await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
12820
13045
|
"cli.play_select_revision",
|
|
12821
13046
|
{
|
|
12822
13047
|
targetKind: "name",
|
|
@@ -12837,14 +13062,14 @@ async function handleNamedRun(options, hooks) {
|
|
|
12837
13062
|
maxTotalCredits: options.maxTotalCredits
|
|
12838
13063
|
});
|
|
12839
13064
|
const fileInputBindings = playDetail ? [
|
|
12840
|
-
...
|
|
12841
|
-
...
|
|
13065
|
+
..._chunkAUQQVDABjs.fileInputBindingsFromPlaySchema.call(void 0, playDetail.play.inputSchema),
|
|
13066
|
+
..._chunkAUQQVDABjs.fileInputBindingsFromStaticPipeline.call(void 0, playDetail.play.staticPipeline)
|
|
12842
13067
|
] : [];
|
|
12843
13068
|
if (cliAdmission && fileInputBindings.length > 0) {
|
|
12844
|
-
await
|
|
13069
|
+
await _chunkC6QWRSMQjs.checkPlayRunCompatibility.call(void 0, client.baseUrl, options.maintenancePolicy);
|
|
12845
13070
|
cliAdmission = false;
|
|
12846
13071
|
}
|
|
12847
|
-
const stagedFileInputs = await
|
|
13072
|
+
const stagedFileInputs = await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
12848
13073
|
"cli.play_stage_inputs",
|
|
12849
13074
|
{
|
|
12850
13075
|
targetKind: "name",
|
|
@@ -12867,7 +13092,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12867
13092
|
const testPolicyOverrides = {
|
|
12868
13093
|
...options.debugMapLatency ? { mapLatencyProfile: true } : {}
|
|
12869
13094
|
};
|
|
12870
|
-
const startRequest =
|
|
13095
|
+
const startRequest = _chunkAUQQVDABjs.buildNamedPlayRunRequest.call(void 0, {
|
|
12871
13096
|
name: playName,
|
|
12872
13097
|
revisionId: selectedRevisionId,
|
|
12873
13098
|
runtimeInput,
|
|
@@ -12888,10 +13113,10 @@ async function handleNamedRun(options, hooks) {
|
|
|
12888
13113
|
});
|
|
12889
13114
|
if (options.watch) {
|
|
12890
13115
|
progress.phase("starting run");
|
|
12891
|
-
const finalStatus = await
|
|
13116
|
+
const finalStatus = await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
12892
13117
|
"cli.play_start_watch",
|
|
12893
13118
|
{ targetKind: "name", playName },
|
|
12894
|
-
() => (options.runIdFile
|
|
13119
|
+
() => (options.runIdFile ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
|
|
12895
13120
|
client,
|
|
12896
13121
|
request: startRequest,
|
|
12897
13122
|
playName,
|
|
@@ -12902,15 +13127,16 @@ async function handleNamedRun(options, hooks) {
|
|
|
12902
13127
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
12903
13128
|
open: options.open,
|
|
12904
13129
|
progress,
|
|
12905
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
12906
|
-
onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12907
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
13130
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _499 => _499.onRunStarted]),
|
|
13131
|
+
onSubmission: _optionalChain([hooks, 'optionalAccess', _500 => _500.onSubmission]),
|
|
13132
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _501 => _501.onRunAdmitted]),
|
|
12908
13133
|
maintenancePolicy: options.maintenancePolicy,
|
|
12909
13134
|
...!options.runIdFile || options.fullJson ? { fullJson: options.fullJson } : {},
|
|
12910
13135
|
...cliAdmission ? {
|
|
12911
13136
|
cliAdmission: true,
|
|
12912
13137
|
streamTerminalWindowMs: PLAY_START_STREAM_TERMINAL_WINDOW_MS,
|
|
12913
|
-
...admissionCapability ? { admissionCapability } : {}
|
|
13138
|
+
...admissionCapability ? { admissionCapability } : {},
|
|
13139
|
+
...cancelAdmissionCapability ? { cancelAdmissionCapability } : {}
|
|
12914
13140
|
} : {}
|
|
12915
13141
|
}).catch(async (error) => {
|
|
12916
13142
|
throw await normalizePlayStartError(client, error, playName, {
|
|
@@ -12936,8 +13162,8 @@ async function handleNamedRun(options, hooks) {
|
|
|
12936
13162
|
options,
|
|
12937
13163
|
_nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
|
|
12938
13164
|
);
|
|
12939
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
12940
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
13165
|
+
_optionalChain([hooks, 'optionalAccess', _502 => _502.onTerminalStatus, 'optionalCall', _503 => _503(outputStatus)]);
|
|
13166
|
+
if (_optionalChain([hooks, 'optionalAccess', _504 => _504.writeResult])) {
|
|
12941
13167
|
await hooks.writeResult(client, outputStatus);
|
|
12942
13168
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12943
13169
|
}
|
|
@@ -12952,22 +13178,22 @@ async function handleNamedRun(options, hooks) {
|
|
|
12952
13178
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12953
13179
|
}
|
|
12954
13180
|
progress.phase("starting run");
|
|
12955
|
-
const started = await
|
|
13181
|
+
const started = await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
12956
13182
|
"cli.play_start_unwatched",
|
|
12957
13183
|
{ targetKind: "name", playName },
|
|
12958
|
-
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
13184
|
+
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _505 => _505.onSubmission]) }).catch(async (error) => {
|
|
12959
13185
|
throw await normalizePlayStartError(client, error, playName, {
|
|
12960
13186
|
suggestMissingPlay: true
|
|
12961
13187
|
});
|
|
12962
13188
|
})
|
|
12963
13189
|
);
|
|
12964
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12965
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13190
|
+
await _optionalChain([hooks, 'optionalAccess', _506 => _506.onRunStarted, 'optionalCall', _507 => _507(started.workflowId)]);
|
|
13191
|
+
await _optionalChain([hooks, 'optionalAccess', _508 => _508.onRunAdmitted, 'optionalCall', _509 => _509(started.workflowId)]);
|
|
12966
13192
|
const resolvedDashboardUrl = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
12967
13193
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
12968
13194
|
progress.phase("started run");
|
|
12969
13195
|
progress.complete();
|
|
12970
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
13196
|
+
if (_optionalChain([hooks, 'optionalAccess', _510 => _510.writeStarted])) {
|
|
12971
13197
|
hooks.writeStarted(started.workflowId, _nullishCoalesce(started.status, () => ( "started")));
|
|
12972
13198
|
return 0;
|
|
12973
13199
|
}
|
|
@@ -12992,12 +13218,12 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
12992
13218
|
const compact = compactPlayStatus(status);
|
|
12993
13219
|
const errors = Array.isArray(compact.errors) ? compact.errors : [];
|
|
12994
13220
|
const error = status.status === "failed" ? _nullishCoalesce(errors[0], () => ( {
|
|
12995
|
-
message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access',
|
|
13221
|
+
message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access', _511 => _511.progress, 'optionalAccess', _512 => _512.error]))), () => ( "Play failed. Inspect the run for details."))
|
|
12996
13222
|
})) : null;
|
|
12997
13223
|
const next = { status: `deepline runs get ${status.runId}` };
|
|
12998
|
-
const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access',
|
|
13224
|
+
const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access', _513 => _513.exec, 'call', _514 => _514(status.runId), 'optionalAccess', _515 => _515[1]]), () => ( extractRunPlayName(status))), () => ( null));
|
|
12999
13225
|
if (!terminal) {
|
|
13000
|
-
|
|
13226
|
+
_chunkTVW6USSGjs.writeExecutionOutput.call(void 0,
|
|
13001
13227
|
{ id: status.runId, status: status.status, next },
|
|
13002
13228
|
output
|
|
13003
13229
|
);
|
|
@@ -13056,11 +13282,11 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13056
13282
|
Object.entries(handle).filter(([key]) => source !== "result" || key !== "_metadata").map(([key, child]) => [key, materialize(child, `${source}.${key}`)])
|
|
13057
13283
|
);
|
|
13058
13284
|
};
|
|
13059
|
-
const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call',
|
|
13285
|
+
const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call', _516 => _516(status), 'optionalAccess', _517 => _517.outputs]));
|
|
13060
13286
|
const returned = status.result !== void 0 ? status.result : packagedOutputs ? Object.fromEntries(
|
|
13061
13287
|
Object.entries(packagedOutputs).map(([key, value]) => [
|
|
13062
13288
|
key,
|
|
13063
|
-
_optionalChain([readRecord, 'call',
|
|
13289
|
+
_optionalChain([readRecord, 'call', _518 => _518(value), 'optionalAccess', _519 => _519.kind]) === "value" ? _optionalChain([readRecord, 'call', _520 => _520(value), 'optionalAccess', _521 => _521.value]) : value
|
|
13064
13290
|
])
|
|
13065
13291
|
) : null;
|
|
13066
13292
|
let data = materialize(returned);
|
|
@@ -13072,10 +13298,10 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13072
13298
|
};
|
|
13073
13299
|
}
|
|
13074
13300
|
const byRows = new Map(collections.map((c) => [c.rows, c]));
|
|
13075
|
-
const allCollections =
|
|
13301
|
+
const allCollections = _chunkTVW6USSGjs.outputCollections.call(void 0, data).map(
|
|
13076
13302
|
(collection) => _nullishCoalesce(byRows.get(collection.rows), () => ( collection))
|
|
13077
13303
|
);
|
|
13078
|
-
|
|
13304
|
+
_chunkTVW6USSGjs.writeExecutionOutput.call(void 0,
|
|
13079
13305
|
{
|
|
13080
13306
|
id: status.runId,
|
|
13081
13307
|
status: status.status,
|
|
@@ -13083,7 +13309,7 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13083
13309
|
...allCollections.length ? { collections: allCollections } : {},
|
|
13084
13310
|
complete: allCollections.every((c) => c.complete === true) ? true : allCollections.some((c) => c.complete === false) ? false : null,
|
|
13085
13311
|
error,
|
|
13086
|
-
credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access',
|
|
13312
|
+
credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access', _522 => _522.billing, 'optionalAccess', _523 => _523.totalCredits]))), () => ( null)),
|
|
13087
13313
|
...playName ? { page: _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) } : {},
|
|
13088
13314
|
warnings: [
|
|
13089
13315
|
...buildRunWarnings(status, null),
|
|
@@ -13096,7 +13322,7 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13096
13322
|
}
|
|
13097
13323
|
var TOOL_EXECUTION_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
13098
13324
|
async function handlePlayRun(args, hooks) {
|
|
13099
|
-
const parsedOptions = Array.isArray(args) ?
|
|
13325
|
+
const parsedOptions = Array.isArray(args) ? _chunkNLRTFJGHjs.parsePlayRunOptions.call(void 0, args) : args;
|
|
13100
13326
|
const options = parsedOptions.runIdFile ? {
|
|
13101
13327
|
...parsedOptions,
|
|
13102
13328
|
runIdFile: parsedOptions.dryRun ? _path.resolve.call(void 0, parsedOptions.runIdFile) : await preflightRunIdFile(parsedOptions.runIdFile)
|
|
@@ -13113,7 +13339,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13113
13339
|
JSON.stringify({
|
|
13114
13340
|
version: 1,
|
|
13115
13341
|
admissionState: "submitted_unknown",
|
|
13116
|
-
baseUrl: new (0,
|
|
13342
|
+
baseUrl: new (0, _chunkIHMYIHF4js.DeeplineClient)().baseUrl,
|
|
13117
13343
|
...intent
|
|
13118
13344
|
})
|
|
13119
13345
|
);
|
|
@@ -13125,7 +13351,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13125
13351
|
} finally {
|
|
13126
13352
|
await removeRunIdTempFile(tempPath);
|
|
13127
13353
|
}
|
|
13128
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13354
|
+
await _optionalChain([hooks, 'optionalAccess', _524 => _524.onSubmission, 'optionalCall', _525 => _525(intent)]);
|
|
13129
13355
|
},
|
|
13130
13356
|
onRunStarted: async (runId) => {
|
|
13131
13357
|
try {
|
|
@@ -13136,7 +13362,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13136
13362
|
{ cause: error }
|
|
13137
13363
|
);
|
|
13138
13364
|
}
|
|
13139
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13365
|
+
await _optionalChain([hooks, 'optionalAccess', _526 => _526.onRunStarted, 'optionalCall', _527 => _527(runId)]);
|
|
13140
13366
|
},
|
|
13141
13367
|
onRunAdmitted: async (runId) => {
|
|
13142
13368
|
try {
|
|
@@ -13149,7 +13375,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13149
13375
|
{ cause: error }
|
|
13150
13376
|
);
|
|
13151
13377
|
}
|
|
13152
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13378
|
+
await _optionalChain([hooks, 'optionalAccess', _528 => _528.onRunAdmitted, 'optionalCall', _529 => _529(runId)]);
|
|
13153
13379
|
}
|
|
13154
13380
|
} : hooks;
|
|
13155
13381
|
if (options.target.kind === "file") {
|
|
@@ -13228,10 +13454,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13228
13454
|
...buildRunActivityTextLines(run),
|
|
13229
13455
|
...buildRunStatusEvidenceTextLines(overview)
|
|
13230
13456
|
];
|
|
13231
|
-
if (_optionalChain([overview, 'access',
|
|
13457
|
+
if (_optionalChain([overview, 'access', _530 => _530.runStatus, 'optionalAccess', _531 => _531.available]) === false)
|
|
13232
13458
|
lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
|
|
13233
|
-
const work = readRecord(_optionalChain([readRecord, 'call',
|
|
13234
|
-
if (work && !_optionalChain([overview, 'access',
|
|
13459
|
+
const work = readRecord(_optionalChain([readRecord, 'call', _532 => _532(run), 'optionalAccess', _533 => _533.work]));
|
|
13460
|
+
if (work && !_optionalChain([overview, 'access', _534 => _534.runStatus, 'optionalAccess', _535 => _535.available]))
|
|
13235
13461
|
lines.push(
|
|
13236
13462
|
` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
|
|
13237
13463
|
);
|
|
@@ -13282,7 +13508,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13282
13508
|
...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
|
|
13283
13509
|
...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
|
|
13284
13510
|
...overview.failedLogs.entries,
|
|
13285
|
-
..._optionalChain([overview, 'access',
|
|
13511
|
+
..._optionalChain([overview, 'access', _536 => _536.failedLogs, 'access', _537 => _537.next, 'optionalAccess', _538 => _538.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
|
|
13286
13512
|
]
|
|
13287
13513
|
});
|
|
13288
13514
|
sections.push({
|
|
@@ -13342,7 +13568,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13342
13568
|
);
|
|
13343
13569
|
return `${lines.join("\n")}
|
|
13344
13570
|
|
|
13345
|
-
${
|
|
13571
|
+
${_chunkBSKPQB2Pjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
|
|
13346
13572
|
}
|
|
13347
13573
|
var RUN_READ_TIMING_PROGRESS_INTERVAL_MS = 15e3;
|
|
13348
13574
|
async function withRunReadTiming(command, stage, enabled, action) {
|
|
@@ -13353,7 +13579,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
|
|
|
13353
13579
|
const progressTimer = setInterval(() => {
|
|
13354
13580
|
console.error(`[${command}] ${stage} still running after ${elapsedMs()}ms`);
|
|
13355
13581
|
}, RUN_READ_TIMING_PROGRESS_INTERVAL_MS);
|
|
13356
|
-
_optionalChain([progressTimer, 'access',
|
|
13582
|
+
_optionalChain([progressTimer, 'access', _539 => _539.unref, 'optionalCall', _540 => _540()]);
|
|
13357
13583
|
try {
|
|
13358
13584
|
const result = await action();
|
|
13359
13585
|
console.error(`[${command}] ${stage} completed in ${elapsedMs()}ms`);
|
|
@@ -13366,7 +13592,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
|
|
|
13366
13592
|
}
|
|
13367
13593
|
}
|
|
13368
13594
|
async function handleRunGet(args) {
|
|
13369
|
-
const selection =
|
|
13595
|
+
const selection = _chunkBSKPQB2Pjs.parseJsonFields.call(void 0,
|
|
13370
13596
|
args,
|
|
13371
13597
|
args.includes("--config") ? "config" : "get"
|
|
13372
13598
|
);
|
|
@@ -13379,7 +13605,7 @@ async function handleRunGet(args) {
|
|
|
13379
13605
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13380
13606
|
return 1;
|
|
13381
13607
|
}
|
|
13382
|
-
const client = new (0,
|
|
13608
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
13383
13609
|
const timing = args.includes("--timing");
|
|
13384
13610
|
if (args.includes("--web-url")) {
|
|
13385
13611
|
const status2 = await withRunReadTiming(
|
|
@@ -13394,7 +13620,7 @@ async function handleRunGet(args) {
|
|
|
13394
13620
|
return 1;
|
|
13395
13621
|
}
|
|
13396
13622
|
const dashboardUrl2 = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName2);
|
|
13397
|
-
|
|
13623
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
13398
13624
|
{ dashboardUrl: dashboardUrl2 },
|
|
13399
13625
|
{ json: args.includes("--json"), text: `${dashboardUrl2}
|
|
13400
13626
|
` }
|
|
@@ -13419,7 +13645,7 @@ async function handleRunGet(args) {
|
|
|
13419
13645
|
"This server does not support recorded configuration reads."
|
|
13420
13646
|
);
|
|
13421
13647
|
}
|
|
13422
|
-
|
|
13648
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
13423
13649
|
{ runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
|
|
13424
13650
|
{ json: true, fields: selection.fields }
|
|
13425
13651
|
);
|
|
@@ -13432,7 +13658,7 @@ async function handleRunGet(args) {
|
|
|
13432
13658
|
timing,
|
|
13433
13659
|
() => client.getRunInput(runId)
|
|
13434
13660
|
);
|
|
13435
|
-
|
|
13661
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0, input, { json: true });
|
|
13436
13662
|
return 0;
|
|
13437
13663
|
}
|
|
13438
13664
|
const full = args.includes("--full");
|
|
@@ -13445,7 +13671,7 @@ async function handleRunGet(args) {
|
|
|
13445
13671
|
failedLogs: args.includes("--log-failed")
|
|
13446
13672
|
})
|
|
13447
13673
|
);
|
|
13448
|
-
if (status.package)
|
|
13674
|
+
if (status.package) _chunkTVW6USSGjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
13449
13675
|
if (!status.package) {
|
|
13450
13676
|
const legacyStatus = full ? await withRunReadTiming(
|
|
13451
13677
|
"runs get",
|
|
@@ -13458,8 +13684,8 @@ async function handleRunGet(args) {
|
|
|
13458
13684
|
) : status;
|
|
13459
13685
|
const legacyPlayName = resolveRunPlayName(legacyStatus, runId);
|
|
13460
13686
|
const legacyDashboardUrl = legacyPlayName ? _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, legacyPlayName) : null;
|
|
13461
|
-
if (
|
|
13462
|
-
|
|
13687
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
13688
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
13463
13689
|
{
|
|
13464
13690
|
...full ? legacyStatus : compactPlayStatus(legacyStatus),
|
|
13465
13691
|
...legacyDashboardUrl ? { dashboardUrl: legacyDashboardUrl } : {}
|
|
@@ -13469,7 +13695,7 @@ async function handleRunGet(args) {
|
|
|
13469
13695
|
} else {
|
|
13470
13696
|
writePlayResult(legacyStatus, false, { fullJson: full });
|
|
13471
13697
|
if (legacyDashboardUrl)
|
|
13472
|
-
|
|
13698
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
13473
13699
|
{ dashboardUrl: legacyDashboardUrl },
|
|
13474
13700
|
{ json: false, text: `play page: ${legacyDashboardUrl}
|
|
13475
13701
|
` }
|
|
@@ -13499,10 +13725,10 @@ async function handleRunGet(args) {
|
|
|
13499
13725
|
)
|
|
13500
13726
|
]);
|
|
13501
13727
|
const hitLines = formatRunHitsLines(hits);
|
|
13502
|
-
const json =
|
|
13728
|
+
const json = _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args);
|
|
13503
13729
|
const playName = resolveRunPlayName(status, runId);
|
|
13504
13730
|
const dashboardUrl = playName ? _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) : void 0;
|
|
13505
|
-
|
|
13731
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
13506
13732
|
{
|
|
13507
13733
|
...overview,
|
|
13508
13734
|
...dashboardUrl ? { dashboardUrl } : {},
|
|
@@ -13606,9 +13832,9 @@ async function handleRunLifecycleStatus(args) {
|
|
|
13606
13832
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13607
13833
|
return 1;
|
|
13608
13834
|
}
|
|
13609
|
-
const status = await new (0,
|
|
13610
|
-
if (
|
|
13611
|
-
|
|
13835
|
+
const status = await new (0, _chunkIHMYIHF4js.DeeplineClient)().runs.status(runId);
|
|
13836
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
13837
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0, status, { json: true });
|
|
13612
13838
|
return 0;
|
|
13613
13839
|
}
|
|
13614
13840
|
if (!status.available) {
|
|
@@ -13648,7 +13874,7 @@ async function handleRunsRerun(args) {
|
|
|
13648
13874
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13649
13875
|
return 1;
|
|
13650
13876
|
}
|
|
13651
|
-
const options = { json:
|
|
13877
|
+
const options = { json: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args) };
|
|
13652
13878
|
for (let index = 0; index < args.length; index += 1) {
|
|
13653
13879
|
if (args[index] === "--idempotency-key") {
|
|
13654
13880
|
options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
|
|
@@ -13714,8 +13940,8 @@ ${usage2}
|
|
|
13714
13940
|
Discover Plays: ${next.discover}
|
|
13715
13941
|
Active runs: ${next.running}`
|
|
13716
13942
|
);
|
|
13717
|
-
if (
|
|
13718
|
-
|
|
13943
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
13944
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
13719
13945
|
{ ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
|
|
13720
13946
|
{ json: true }
|
|
13721
13947
|
);
|
|
@@ -13730,7 +13956,7 @@ Active runs: ${next.running}`
|
|
|
13730
13956
|
console.error("--offset requires --play.");
|
|
13731
13957
|
return 1;
|
|
13732
13958
|
}
|
|
13733
|
-
const client = new (0,
|
|
13959
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
13734
13960
|
const page = await withRunReadTiming(
|
|
13735
13961
|
"runs list",
|
|
13736
13962
|
"run inventory",
|
|
@@ -13765,7 +13991,7 @@ Active runs: ${next.running}`
|
|
|
13765
13991
|
executionTime: run.executionTime,
|
|
13766
13992
|
billingTotalCredits: run.billingTotalCredits,
|
|
13767
13993
|
billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
|
|
13768
|
-
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access',
|
|
13994
|
+
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _541 => _541.memo, 'optionalAccess', _542 => _542.playName]))), () => ( playName)), () => ( null)),
|
|
13769
13995
|
...nodeId ? { nodeObservation: _nullishCoalesce(run.nodeObservation, () => ( null)) } : {}
|
|
13770
13996
|
}));
|
|
13771
13997
|
const lines = runs.length === 0 ? [
|
|
@@ -13797,14 +14023,14 @@ Active runs: ${next.running}`
|
|
|
13797
14023
|
return lines2.join("\n");
|
|
13798
14024
|
});
|
|
13799
14025
|
const nextOffset = (_nullishCoalesce(_nullishCoalesce(page.offset, () => ( offset)), () => ( 0))) + runs.length;
|
|
13800
|
-
const nextPage = page.hasMore && playName ? `deepline runs list --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}${nodeId ? ` --node ${_chunkAID3OYVJjs.shellQuote.call(void 0, nodeId)}` : ""}${statusFilter ? ` --status ${_chunkAID3OYVJjs.shellQuote.call(void 0, statusFilter)}` : ""} --limit ${_nullishCoalesce(_nullishCoalesce(page.limit, () => ( limit)), () => ( 20))} --offset ${nextOffset}${
|
|
14026
|
+
const nextPage = page.hasMore && playName ? `deepline runs list --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}${nodeId ? ` --node ${_chunkAID3OYVJjs.shellQuote.call(void 0, nodeId)}` : ""}${statusFilter ? ` --status ${_chunkAID3OYVJjs.shellQuote.call(void 0, statusFilter)}` : ""} --limit ${_nullishCoalesce(_nullishCoalesce(page.limit, () => ( limit)), () => ( 20))} --offset ${nextOffset}${_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args) ? " --json" : ""}` : null;
|
|
13801
14027
|
if (page.hasMore) {
|
|
13802
14028
|
lines.push("List truncated \u2014 more runs match this filter.");
|
|
13803
14029
|
lines.push(
|
|
13804
14030
|
nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
|
|
13805
14031
|
);
|
|
13806
14032
|
}
|
|
13807
|
-
|
|
14033
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
13808
14034
|
{
|
|
13809
14035
|
runs,
|
|
13810
14036
|
count: runs.length,
|
|
@@ -13814,11 +14040,11 @@ Active runs: ${next.running}`
|
|
|
13814
14040
|
...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
|
|
13815
14041
|
next: {
|
|
13816
14042
|
page: nextPage,
|
|
13817
|
-
get: _optionalChain([runs, 'access',
|
|
14043
|
+
get: _optionalChain([runs, 'access', _543 => _543[0], 'optionalAccess', _544 => _544.id]) ? `deepline runs get ${runs[0].id}` : null
|
|
13818
14044
|
},
|
|
13819
14045
|
render: { sections: [{ title: "runs", lines }] }
|
|
13820
14046
|
},
|
|
13821
|
-
{ json:
|
|
14047
|
+
{ json: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args) }
|
|
13822
14048
|
);
|
|
13823
14049
|
return 0;
|
|
13824
14050
|
}
|
|
@@ -13848,7 +14074,7 @@ async function handleRunTail(args) {
|
|
|
13848
14074
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
13849
14075
|
return 1;
|
|
13850
14076
|
}
|
|
13851
|
-
const parsed =
|
|
14077
|
+
const parsed = _chunk775AZTO7js.parseLogLevel.call(void 0, value);
|
|
13852
14078
|
if (!parsed) {
|
|
13853
14079
|
console.error(
|
|
13854
14080
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -13886,9 +14112,9 @@ async function handleRunTail(args) {
|
|
|
13886
14112
|
);
|
|
13887
14113
|
return 1;
|
|
13888
14114
|
}
|
|
13889
|
-
const client = new (0,
|
|
14115
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
13890
14116
|
const jsonLines = args.includes("--jsonl");
|
|
13891
|
-
const jsonOutput = !jsonLines &&
|
|
14117
|
+
const jsonOutput = !jsonLines && _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args);
|
|
13892
14118
|
const compact = args.includes("--compact");
|
|
13893
14119
|
const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
|
|
13894
14120
|
const compactState = {
|
|
@@ -13969,7 +14195,7 @@ async function handleRunLogs(args) {
|
|
|
13969
14195
|
]);
|
|
13970
14196
|
const cursorIndex = args.indexOf("--cursor");
|
|
13971
14197
|
const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
13972
|
-
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue &&
|
|
14198
|
+
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunk775AZTO7js.isRunLogsCursor.call(void 0, cursorValue));
|
|
13973
14199
|
if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
|
|
13974
14200
|
return handleRunEventSearch(args);
|
|
13975
14201
|
}
|
|
@@ -14003,7 +14229,7 @@ async function handleRunLogs(args) {
|
|
|
14003
14229
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
14004
14230
|
return 1;
|
|
14005
14231
|
}
|
|
14006
|
-
const parsed =
|
|
14232
|
+
const parsed = _chunk775AZTO7js.parseLogLevel.call(void 0, value);
|
|
14007
14233
|
if (!parsed) {
|
|
14008
14234
|
console.error(
|
|
14009
14235
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -14050,12 +14276,12 @@ async function handleRunLogs(args) {
|
|
|
14050
14276
|
);
|
|
14051
14277
|
return 1;
|
|
14052
14278
|
}
|
|
14053
|
-
const client = new (0,
|
|
14279
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
14054
14280
|
if (outPath) {
|
|
14055
14281
|
const result2 = await client.runs.logs(runId, { all: true });
|
|
14056
|
-
const logs = result2.entries.filter((line) =>
|
|
14282
|
+
const logs = result2.entries.filter((line) => _chunk775AZTO7js.logLevelReaches.call(void 0, _chunk775AZTO7js.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunk775AZTO7js.classifyLogLine.call(void 0, line).line);
|
|
14057
14283
|
_fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
|
14058
|
-
|
|
14284
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
14059
14285
|
{
|
|
14060
14286
|
runId: result2.runId,
|
|
14061
14287
|
log_path: outPath,
|
|
@@ -14078,7 +14304,7 @@ async function handleRunLogs(args) {
|
|
|
14078
14304
|
]
|
|
14079
14305
|
}
|
|
14080
14306
|
},
|
|
14081
|
-
{ json:
|
|
14307
|
+
{ json: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args) }
|
|
14082
14308
|
);
|
|
14083
14309
|
return 0;
|
|
14084
14310
|
}
|
|
@@ -14109,7 +14335,7 @@ async function handleRunLogs(args) {
|
|
|
14109
14335
|
}
|
|
14110
14336
|
};
|
|
14111
14337
|
const text = buildRunLogsText(filteredResult);
|
|
14112
|
-
|
|
14338
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
14113
14339
|
{
|
|
14114
14340
|
runId: result.runId,
|
|
14115
14341
|
totalCount: result.totalCount,
|
|
@@ -14133,7 +14359,7 @@ async function handleRunLogs(args) {
|
|
|
14133
14359
|
render: { sections: [{ title: "run logs", lines: entries }] }
|
|
14134
14360
|
},
|
|
14135
14361
|
{
|
|
14136
|
-
json:
|
|
14362
|
+
json: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args),
|
|
14137
14363
|
text
|
|
14138
14364
|
}
|
|
14139
14365
|
);
|
|
@@ -14157,17 +14383,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
14157
14383
|
);
|
|
14158
14384
|
}
|
|
14159
14385
|
const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
|
|
14160
|
-
(entry) =>
|
|
14386
|
+
(entry) => _chunk775AZTO7js.logLevelReaches.call(void 0, _chunk775AZTO7js.classifyLogLine.call(void 0, entry.line).level, logLevel)
|
|
14161
14387
|
);
|
|
14162
14388
|
const selected = matching.slice(-limit);
|
|
14163
14389
|
const olderMatchesExist = matching.length > selected.length;
|
|
14164
14390
|
return {
|
|
14165
14391
|
entries: selected.map((entry) => entry.line),
|
|
14166
|
-
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14167
|
-
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14392
|
+
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _545 => _545[0], 'optionalAccess', _546 => _546.seq]), () => ( null)),
|
|
14393
|
+
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _547 => _547.at, 'call', _548 => _548(-1), 'optionalAccess', _549 => _549.seq]), () => ( null)),
|
|
14168
14394
|
truncated: result.truncated || olderMatchesExist,
|
|
14169
14395
|
hasMore: olderMatchesExist,
|
|
14170
|
-
nextCursor: olderMatchesExist ?
|
|
14396
|
+
nextCursor: olderMatchesExist ? _chunk775AZTO7js.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
|
|
14171
14397
|
};
|
|
14172
14398
|
}
|
|
14173
14399
|
async function handleRunEventSearch(args) {
|
|
@@ -14234,7 +14460,7 @@ ${usage2}`);
|
|
|
14234
14460
|
namespace,
|
|
14235
14461
|
...backend ? { backend } : {}
|
|
14236
14462
|
} : void 0;
|
|
14237
|
-
const client = new (0,
|
|
14463
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
14238
14464
|
const result = await client.runs.searchEvents({
|
|
14239
14465
|
...runId ? { runId } : {},
|
|
14240
14466
|
...values["--since"] ? { since: values["--since"] } : {},
|
|
@@ -14306,7 +14532,7 @@ ${renderedDetails}` : ""}`;
|
|
|
14306
14532
|
"--limit",
|
|
14307
14533
|
String(limit)
|
|
14308
14534
|
].join(" ") : null;
|
|
14309
|
-
|
|
14535
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
14310
14536
|
{
|
|
14311
14537
|
events,
|
|
14312
14538
|
nextCursor: result.nextCursor,
|
|
@@ -14317,19 +14543,19 @@ ${renderedDetails}` : ""}`;
|
|
|
14317
14543
|
render: { sections: [{ title: "runtime events", lines }] }
|
|
14318
14544
|
},
|
|
14319
14545
|
{
|
|
14320
|
-
json:
|
|
14546
|
+
json: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args),
|
|
14321
14547
|
text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
|
|
14322
14548
|
}
|
|
14323
14549
|
);
|
|
14324
14550
|
return 0;
|
|
14325
14551
|
}
|
|
14326
14552
|
function buildRunLogsText(result) {
|
|
14327
|
-
const lines = result.entries.map((line) =>
|
|
14553
|
+
const lines = result.entries.map((line) => _chunk775AZTO7js.classifyLogLine.call(void 0, line).line);
|
|
14328
14554
|
if (result.warning) {
|
|
14329
14555
|
if (lines.length > 0) lines.push("");
|
|
14330
14556
|
lines.push(`warning: ${result.warning}`);
|
|
14331
14557
|
lines.push(
|
|
14332
|
-
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access',
|
|
14558
|
+
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _550 => _550.next, 'optionalAccess', _551 => _551.logs]), () => ( `deepline runs logs ${result.runId} --out run.log`))}`
|
|
14333
14559
|
);
|
|
14334
14560
|
}
|
|
14335
14561
|
return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
|
|
@@ -14358,7 +14584,7 @@ async function handleRunStop(args) {
|
|
|
14358
14584
|
reason = args[++index];
|
|
14359
14585
|
}
|
|
14360
14586
|
}
|
|
14361
|
-
const client = new (0,
|
|
14587
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
14362
14588
|
const result = await client.runs.stop(runId, { reason });
|
|
14363
14589
|
const state = resolveRunStopState(result);
|
|
14364
14590
|
const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
|
|
@@ -14373,7 +14599,7 @@ async function handleRunStop(args) {
|
|
|
14373
14599
|
...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
|
|
14374
14600
|
`inspect: deepline runs get ${runId} --full`
|
|
14375
14601
|
];
|
|
14376
|
-
|
|
14602
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
14377
14603
|
{
|
|
14378
14604
|
...cancelling,
|
|
14379
14605
|
state,
|
|
@@ -14388,7 +14614,7 @@ async function handleRunStop(args) {
|
|
|
14388
14614
|
]
|
|
14389
14615
|
}
|
|
14390
14616
|
},
|
|
14391
|
-
{ json:
|
|
14617
|
+
{ json: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args) }
|
|
14392
14618
|
);
|
|
14393
14619
|
return 0;
|
|
14394
14620
|
}
|
|
@@ -14405,7 +14631,7 @@ async function handleRunStop(args) {
|
|
|
14405
14631
|
];
|
|
14406
14632
|
process.stderr.write(`${lines2.join("\n")}
|
|
14407
14633
|
`);
|
|
14408
|
-
|
|
14634
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
14409
14635
|
{
|
|
14410
14636
|
...result,
|
|
14411
14637
|
render: {
|
|
@@ -14420,7 +14646,7 @@ async function handleRunStop(args) {
|
|
|
14420
14646
|
]
|
|
14421
14647
|
}
|
|
14422
14648
|
},
|
|
14423
|
-
{ json:
|
|
14649
|
+
{ json: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args) }
|
|
14424
14650
|
);
|
|
14425
14651
|
return 1;
|
|
14426
14652
|
}
|
|
@@ -14431,12 +14657,12 @@ async function handleRunStop(args) {
|
|
|
14431
14657
|
`warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
|
|
14432
14658
|
] : []
|
|
14433
14659
|
];
|
|
14434
|
-
|
|
14660
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
14435
14661
|
{
|
|
14436
14662
|
...result,
|
|
14437
14663
|
render: { sections: [{ title: "run stop", lines }] }
|
|
14438
14664
|
},
|
|
14439
|
-
{ json:
|
|
14665
|
+
{ json: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args) }
|
|
14440
14666
|
);
|
|
14441
14667
|
return 0;
|
|
14442
14668
|
}
|
|
@@ -14486,18 +14712,18 @@ async function handleRunStopAll(args) {
|
|
|
14486
14712
|
reason = args[++index];
|
|
14487
14713
|
}
|
|
14488
14714
|
}
|
|
14489
|
-
const client = new (0,
|
|
14715
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
14490
14716
|
if (dryRun) {
|
|
14491
14717
|
const result2 = await client.runs.stopAll({ dryRun: true, reason });
|
|
14492
14718
|
const lines2 = buildStopAllDryRunTextLines(result2);
|
|
14493
|
-
|
|
14719
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
14494
14720
|
{
|
|
14495
14721
|
...result2,
|
|
14496
14722
|
render: {
|
|
14497
14723
|
sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
|
|
14498
14724
|
}
|
|
14499
14725
|
},
|
|
14500
|
-
{ json:
|
|
14726
|
+
{ json: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
|
|
14501
14727
|
` }
|
|
14502
14728
|
);
|
|
14503
14729
|
return 0;
|
|
@@ -14510,17 +14736,17 @@ async function handleRunStopAll(args) {
|
|
|
14510
14736
|
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
14511
14737
|
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
14512
14738
|
];
|
|
14513
|
-
|
|
14739
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
14514
14740
|
{
|
|
14515
14741
|
...result,
|
|
14516
14742
|
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
14517
14743
|
},
|
|
14518
|
-
{ json:
|
|
14744
|
+
{ json: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args) }
|
|
14519
14745
|
);
|
|
14520
14746
|
return result.failed > 0 || result.partial ? 1 : 0;
|
|
14521
14747
|
}
|
|
14522
14748
|
async function handleRunExport(args) {
|
|
14523
|
-
const selection =
|
|
14749
|
+
const selection = _chunkBSKPQB2Pjs.parseJsonFields.call(void 0, args, "export");
|
|
14524
14750
|
args = selection.args;
|
|
14525
14751
|
const usage2 = "Usage: deepline runs export <run-id> [--dataset result.rows] --out <path> [--format csv|json] [--summary full|counts] [--wait] [--timeout-ms 300000] [--metadata-out export.json] [--allow-empty] [--json]";
|
|
14526
14752
|
let runId;
|
|
@@ -14591,17 +14817,17 @@ async function handleRunExport(args) {
|
|
|
14591
14817
|
"INVALID_ARGUMENT"
|
|
14592
14818
|
);
|
|
14593
14819
|
}
|
|
14594
|
-
const client = new (0,
|
|
14820
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
14595
14821
|
let status = await client.getPlayStatus(runId, { full: true });
|
|
14596
14822
|
assertRunExportStatusIdentity(status, runId);
|
|
14597
14823
|
if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
|
|
14598
|
-
const progress =
|
|
14824
|
+
const progress = _chunkEC2CVPN5js.createCliProgress.call(void 0, !_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args));
|
|
14599
14825
|
try {
|
|
14600
14826
|
await waitForPlayCompletionByWatch({
|
|
14601
14827
|
client,
|
|
14602
14828
|
playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
|
|
14603
14829
|
workflowId: runId,
|
|
14604
|
-
jsonOutput:
|
|
14830
|
+
jsonOutput: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args),
|
|
14605
14831
|
emitLogs: false,
|
|
14606
14832
|
waitTimeoutMs,
|
|
14607
14833
|
startedAt: Date.now(),
|
|
@@ -14627,26 +14853,26 @@ async function handleRunExport(args) {
|
|
|
14627
14853
|
format,
|
|
14628
14854
|
summary
|
|
14629
14855
|
});
|
|
14630
|
-
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14631
|
-
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess',
|
|
14856
|
+
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _552 => _552.rowsInfo, 'access', _553 => _553.source]), () => ( datasetPath)), () => ( null));
|
|
14857
|
+
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _554 => _554.currentTable]) ? {
|
|
14632
14858
|
code: "CURRENT_SHARED_DATASET",
|
|
14633
14859
|
message: "This export is the current shared dataset and may include writes from another run.",
|
|
14634
14860
|
full_run_output_command: `deepline runs get ${status.runId} --full`
|
|
14635
14861
|
} : null;
|
|
14636
14862
|
const navigation = buildRunNavigation(status);
|
|
14637
|
-
const resolved = _optionalChain([exportResult, 'optionalAccess',
|
|
14863
|
+
const resolved = _optionalChain([exportResult, 'optionalAccess', _555 => _555.datasetInfo]);
|
|
14638
14864
|
const identity = navigation.datasets.find(
|
|
14639
|
-
(dataset) => _optionalChain([resolved, 'optionalAccess',
|
|
14865
|
+
(dataset) => _optionalChain([resolved, 'optionalAccess', _556 => _556.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _557 => _557.tableNamespace])
|
|
14640
14866
|
);
|
|
14641
14867
|
const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
|
|
14642
14868
|
const exportCommand = runExportRetryCommand(
|
|
14643
14869
|
status.runId,
|
|
14644
14870
|
outPath,
|
|
14645
|
-
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess',
|
|
14871
|
+
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _558 => _558.datasetPath]))),
|
|
14646
14872
|
{ format, summary }
|
|
14647
14873
|
) + (args.includes("--allow-empty") ? " --allow-empty" : "");
|
|
14648
|
-
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14649
|
-
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess',
|
|
14874
|
+
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _559 => _559.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _560 => _560.path]), () => ( null)) };
|
|
14875
|
+
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _561 => _561.rowsInfo, 'access', _562 => _562.exportedRowOutcomes]);
|
|
14650
14876
|
const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
|
|
14651
14877
|
count: exportedRowOutcomes.failed,
|
|
14652
14878
|
message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
|
|
@@ -14666,17 +14892,17 @@ async function handleRunExport(args) {
|
|
|
14666
14892
|
...fileLocation,
|
|
14667
14893
|
format,
|
|
14668
14894
|
source,
|
|
14669
|
-
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14895
|
+
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _563 => _563.rowsInfo, 'access', _564 => _564.totalRows]), () => ( null)),
|
|
14670
14896
|
...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
|
|
14671
14897
|
...rowFailures ? { rowFailures } : {},
|
|
14672
|
-
columns:
|
|
14898
|
+
columns: _chunkTVW6USSGjs.underscoreKeysLast.call(void 0, _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _565 => _565.rowsInfo, 'access', _566 => _566.columns]), () => ( []))),
|
|
14673
14899
|
...currentTableNotice ? { notice: currentTableNotice } : {},
|
|
14674
14900
|
...metadataOutPath ? { metadata_path: metadataOutPath } : {},
|
|
14675
14901
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
|
|
14676
14902
|
};
|
|
14677
14903
|
const lines = withRunNavigationLines(
|
|
14678
14904
|
[
|
|
14679
|
-
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14905
|
+
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _567 => _567.path]), () => ( outPath))}`,
|
|
14680
14906
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
|
|
14681
14907
|
`Partial export: run is ${status.status}; more rows may be saved.`,
|
|
14682
14908
|
`Export after completion: ${exportCommand} --wait`
|
|
@@ -14703,8 +14929,8 @@ async function handleRunExport(args) {
|
|
|
14703
14929
|
"utf-8"
|
|
14704
14930
|
);
|
|
14705
14931
|
}
|
|
14706
|
-
|
|
14707
|
-
json:
|
|
14932
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0, payload, {
|
|
14933
|
+
json: _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args),
|
|
14708
14934
|
fields: selection.fields,
|
|
14709
14935
|
text: `${lines.join("\n")}
|
|
14710
14936
|
`
|
|
@@ -14738,10 +14964,10 @@ async function handlePlayGet(args) {
|
|
|
14738
14964
|
);
|
|
14739
14965
|
return 2;
|
|
14740
14966
|
}
|
|
14741
|
-
const client = new (0,
|
|
14967
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
14742
14968
|
const explicitJson = args.includes("--json");
|
|
14743
14969
|
const sourceOutput = args.includes("--source");
|
|
14744
|
-
const jsonOutput = sourceOutput ? explicitJson :
|
|
14970
|
+
const jsonOutput = sourceOutput ? explicitJson : _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args);
|
|
14745
14971
|
const requestedRevisionFlags = [
|
|
14746
14972
|
args.includes("--working"),
|
|
14747
14973
|
args.includes("--live"),
|
|
@@ -14794,7 +15020,7 @@ async function handlePlayGet(args) {
|
|
|
14794
15020
|
...includeSource ? { source: sourceSelector } : {}
|
|
14795
15021
|
});
|
|
14796
15022
|
const source = detail.source;
|
|
14797
|
-
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
15023
|
+
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _568 => _568.files, 'access', _569 => _569[source.entryFile]]), () => ( ""));
|
|
14798
15024
|
let materializedFile = null;
|
|
14799
15025
|
try {
|
|
14800
15026
|
materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
|
|
@@ -14804,7 +15030,7 @@ async function handlePlayGet(args) {
|
|
|
14804
15030
|
}
|
|
14805
15031
|
const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
|
|
14806
15032
|
if (jsonOutput) {
|
|
14807
|
-
|
|
15033
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, {
|
|
14808
15034
|
...detail,
|
|
14809
15035
|
...materializedFile ? {
|
|
14810
15036
|
message: loadedMessage,
|
|
@@ -14845,16 +15071,16 @@ async function handlePlayGet(args) {
|
|
|
14845
15071
|
}
|
|
14846
15072
|
console.log(`Play: ${formatPlayReference(detail.play)}`);
|
|
14847
15073
|
console.log(
|
|
14848
|
-
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
15074
|
+
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _570 => _570.play, 'access', _571 => _571.workingRevision, 'optionalAccess', _572 => _572.version]), () => ( "\u2014"))}`
|
|
14849
15075
|
);
|
|
14850
|
-
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
15076
|
+
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _573 => _573.play, 'access', _574 => _574.liveRevision, 'optionalAccess', _575 => _575.version]), () => ( "\u2014"))}`);
|
|
14851
15077
|
if (detail.play.liveRevision) {
|
|
14852
15078
|
console.log(
|
|
14853
15079
|
`Live max credits per run: ${liveMaxCreditsPerRun(detail.play.liveRevision.sourceCode)}`
|
|
14854
15080
|
);
|
|
14855
15081
|
}
|
|
14856
15082
|
console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
|
|
14857
|
-
if (detail.play.isDraftDirty && _optionalChain([detail, 'access',
|
|
15083
|
+
if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _576 => _576.play, 'access', _577 => _577.liveRevision, 'optionalAccess', _578 => _578.version])) {
|
|
14858
15084
|
console.log(
|
|
14859
15085
|
` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
|
|
14860
15086
|
);
|
|
@@ -14866,7 +15092,7 @@ async function handlePlayGet(args) {
|
|
|
14866
15092
|
console.log(line);
|
|
14867
15093
|
}
|
|
14868
15094
|
console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
|
|
14869
|
-
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
15095
|
+
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _579 => _579.sheetSummary, 'optionalAccess', _580 => _580.stats, 'optionalAccess', _581 => _581.total]), () => ( 0))}`);
|
|
14870
15096
|
if (detail.customerDbUrl) {
|
|
14871
15097
|
console.log(`Customer DB: ${detail.customerDbUrl}`);
|
|
14872
15098
|
}
|
|
@@ -14882,7 +15108,7 @@ async function handlePlayGet(args) {
|
|
|
14882
15108
|
return 0;
|
|
14883
15109
|
}
|
|
14884
15110
|
function formatVersionLine(version) {
|
|
14885
|
-
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access',
|
|
15111
|
+
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _582 => _582.artifactHash, 'optionalAccess', _583 => _583.slice, 'call', _584 => _584(0, 12)]), () => ( "unknown-revision"));
|
|
14886
15112
|
const state = [
|
|
14887
15113
|
version.isLive ? "live" : null,
|
|
14888
15114
|
version.isWorking ? "working" : null
|
|
@@ -14896,8 +15122,8 @@ async function handlePlayVersions(args) {
|
|
|
14896
15122
|
console.error("Usage: deepline plays versions --name <name> [--json]");
|
|
14897
15123
|
return 1;
|
|
14898
15124
|
}
|
|
14899
|
-
const client = new (0,
|
|
14900
|
-
const jsonOutput =
|
|
15125
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
15126
|
+
const jsonOutput = _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args);
|
|
14901
15127
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
14902
15128
|
command: "versions"
|
|
14903
15129
|
});
|
|
@@ -14905,7 +15131,7 @@ async function handlePlayVersions(args) {
|
|
|
14905
15131
|
parseReferencedPlayTarget(playName).playName
|
|
14906
15132
|
);
|
|
14907
15133
|
if (jsonOutput) {
|
|
14908
|
-
|
|
15134
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, { versions });
|
|
14909
15135
|
return 0;
|
|
14910
15136
|
}
|
|
14911
15137
|
if (versions.length === 0) {
|
|
@@ -14918,7 +15144,7 @@ async function handlePlayVersions(args) {
|
|
|
14918
15144
|
return 0;
|
|
14919
15145
|
}
|
|
14920
15146
|
function formatPlayCostEstimate(estimate) {
|
|
14921
|
-
const computeSummary = _optionalChain([estimate, 'optionalAccess',
|
|
15147
|
+
const computeSummary = _optionalChain([estimate, 'optionalAccess', _585 => _585.compute]) ? `; ${estimate.status === "available" && estimate.source === "observed" ? "observed Deepline total includes usage-based compute; per-session ceiling" : "separate Deepline compute is usage-based; per-session ceiling"} across ${estimate.compute.pricedBackends.map(formatSandboxBackend).join(" and ")}: ${formatCredits(estimate.compute.maximumCredits)} credits (${formatSandboxBackend(estimate.compute.maximumBackend)} is highest; ${formatCredits(estimate.compute.maximumBillingSeconds)}s; total session count unbounded)` : "";
|
|
14922
15148
|
if (!estimate || estimate.status === "unavailable") {
|
|
14923
15149
|
return `unavailable${estimate ? `: ${estimate.message}${computeSummary}` : ""}`;
|
|
14924
15150
|
}
|
|
@@ -14948,8 +15174,8 @@ async function handlePlayCost(args) {
|
|
|
14948
15174
|
console.error("Usage: deepline plays cost <play> [--json]");
|
|
14949
15175
|
return 2;
|
|
14950
15176
|
}
|
|
14951
|
-
const result = await new (0,
|
|
14952
|
-
if (
|
|
15177
|
+
const result = await new (0, _chunkIHMYIHF4js.DeeplineClient)().getPlayCostEstimate(name);
|
|
15178
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) console.log(JSON.stringify(result, null, 2));
|
|
14953
15179
|
else
|
|
14954
15180
|
console.log(
|
|
14955
15181
|
`${result.reference}: ${formatPlayCostEstimate(result.costEstimate)}`
|
|
@@ -14957,11 +15183,11 @@ async function handlePlayCost(args) {
|
|
|
14957
15183
|
return 0;
|
|
14958
15184
|
}
|
|
14959
15185
|
async function handlePlayList(args) {
|
|
14960
|
-
const jsonOutput =
|
|
15186
|
+
const jsonOutput = _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args);
|
|
14961
15187
|
const showCost = args.includes("--show-cost");
|
|
14962
|
-
const client = new (0,
|
|
15188
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
14963
15189
|
const categoriesIndex = args.indexOf("--categories");
|
|
14964
|
-
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access',
|
|
15190
|
+
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _586 => _586[categoriesIndex + 1], 'optionalAccess', _587 => _587.trim, 'call', _588 => _588()]) : void 0;
|
|
14965
15191
|
const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
|
|
14966
15192
|
if (args.includes("--tag") && tags.length === 0) {
|
|
14967
15193
|
console.error(
|
|
@@ -14982,7 +15208,7 @@ async function handlePlayList(args) {
|
|
|
14982
15208
|
const cursorIndex = args.indexOf("--cursor");
|
|
14983
15209
|
const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
|
|
14984
15210
|
const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
14985
|
-
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess',
|
|
15211
|
+
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _589 => _589.trim, 'call', _590 => _590()])) {
|
|
14986
15212
|
console.error("Pass a positive --limit and a non-empty --cursor.");
|
|
14987
15213
|
return 2;
|
|
14988
15214
|
}
|
|
@@ -15023,7 +15249,7 @@ async function handlePlayList(args) {
|
|
|
15023
15249
|
if (play.inputSchema || play.hasInputSchema) {
|
|
15024
15250
|
lines.push(" inputSchema: yes");
|
|
15025
15251
|
}
|
|
15026
|
-
if (_optionalChain([play, 'access',
|
|
15252
|
+
if (_optionalChain([play, 'access', _591 => _591.triggerStatus, 'optionalAccess', _592 => _592.cron])) {
|
|
15027
15253
|
lines.push(
|
|
15028
15254
|
` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
|
|
15029
15255
|
);
|
|
@@ -15043,12 +15269,12 @@ async function handlePlayList(args) {
|
|
|
15043
15269
|
} else {
|
|
15044
15270
|
lines.push(" scheduled execution: not configured");
|
|
15045
15271
|
}
|
|
15046
|
-
if (_optionalChain([play, 'access',
|
|
15272
|
+
if (_optionalChain([play, 'access', _593 => _593.triggerStatus, 'optionalAccess', _594 => _594.webhook])) {
|
|
15047
15273
|
lines.push(` webhook: ${play.triggerStatus.webhook}`);
|
|
15048
15274
|
}
|
|
15049
15275
|
if (showCost) {
|
|
15050
15276
|
lines.push(
|
|
15051
|
-
` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access',
|
|
15277
|
+
` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access', _595 => _595.observedCost, 'optionalAccess', _596 => _596.displayText]), () => ( formatPlayCostEstimate(play.costEstimate)))}`
|
|
15052
15278
|
);
|
|
15053
15279
|
}
|
|
15054
15280
|
lines.push(` run: deepline run ${reference}`);
|
|
@@ -15057,7 +15283,7 @@ async function handlePlayList(args) {
|
|
|
15057
15283
|
lines.push("List truncated \u2014 more plays are available.");
|
|
15058
15284
|
lines.push(`Next page: ${nextPage}`);
|
|
15059
15285
|
}
|
|
15060
|
-
|
|
15286
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
15061
15287
|
{
|
|
15062
15288
|
plays,
|
|
15063
15289
|
count: plays.length,
|
|
@@ -15074,8 +15300,8 @@ async function handlePlayList(args) {
|
|
|
15074
15300
|
return 0;
|
|
15075
15301
|
}
|
|
15076
15302
|
async function handlePlayPin(args, pinned) {
|
|
15077
|
-
const target = _optionalChain([args, 'access',
|
|
15078
|
-
const jsonOutput =
|
|
15303
|
+
const target = _optionalChain([args, 'access', _597 => _597.find, 'call', _598 => _598((arg) => !arg.startsWith("-")), 'optionalAccess', _599 => _599.trim, 'call', _600 => _600()]);
|
|
15304
|
+
const jsonOutput = _chunkBSKPQB2Pjs.argsWantJson.call(void 0, args);
|
|
15079
15305
|
const dryRun = args.includes("--dry-run");
|
|
15080
15306
|
if (!target) {
|
|
15081
15307
|
console.error(
|
|
@@ -15093,11 +15319,11 @@ async function handlePlayPin(args, pinned) {
|
|
|
15093
15319
|
const name = parsedTarget.playName;
|
|
15094
15320
|
const plan = { name, pinned, dryRun };
|
|
15095
15321
|
if (dryRun) {
|
|
15096
|
-
|
|
15322
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, plan);
|
|
15097
15323
|
return 0;
|
|
15098
15324
|
}
|
|
15099
|
-
const result = await new (0,
|
|
15100
|
-
if (jsonOutput)
|
|
15325
|
+
const result = await new (0, _chunkIHMYIHF4js.DeeplineClient)().setPlayPinned(name, pinned);
|
|
15326
|
+
if (jsonOutput) _chunkBSKPQB2Pjs.printCompactJson.call(void 0, result);
|
|
15101
15327
|
else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
|
|
15102
15328
|
return 0;
|
|
15103
15329
|
}
|
|
@@ -15145,7 +15371,7 @@ function printPlayDescription(play) {
|
|
|
15145
15371
|
console.log(` ${line}`);
|
|
15146
15372
|
}
|
|
15147
15373
|
}
|
|
15148
|
-
if (_optionalChain([play, 'access',
|
|
15374
|
+
if (_optionalChain([play, 'access', _601 => _601.toolCategories, 'optionalAccess', _602 => _602.length])) {
|
|
15149
15375
|
console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
|
|
15150
15376
|
}
|
|
15151
15377
|
if (play.aliases.length > 0) {
|
|
@@ -15190,7 +15416,7 @@ function printPlayDescription(play) {
|
|
|
15190
15416
|
const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
|
|
15191
15417
|
if (runtimeLimit) {
|
|
15192
15418
|
console.log(
|
|
15193
|
-
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access',
|
|
15419
|
+
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _603 => _603.runtimeLimit, 'optionalAccess', _604 => _604.source]), () => ( "live"))})`
|
|
15194
15420
|
);
|
|
15195
15421
|
}
|
|
15196
15422
|
printScheduledPlayCapacity(play.activeScheduledPlays);
|
|
@@ -15218,17 +15444,17 @@ function formatPlayGrepMatches(matches) {
|
|
|
15218
15444
|
return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
|
|
15219
15445
|
}
|
|
15220
15446
|
async function handlePlayGrep(args) {
|
|
15221
|
-
const query = _optionalChain([args, 'access',
|
|
15447
|
+
const query = _optionalChain([args, 'access', _605 => _605[0], 'optionalAccess', _606 => _606.trim, 'call', _607 => _607()]);
|
|
15222
15448
|
if (!query) {
|
|
15223
15449
|
console.error("Usage: deepline plays grep <query> [--json]");
|
|
15224
15450
|
return 1;
|
|
15225
15451
|
}
|
|
15226
|
-
const client = new (0,
|
|
15452
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
15227
15453
|
const results = (await client.listPlays({ grep: query })).map(
|
|
15228
15454
|
summarizePlayGrepResult
|
|
15229
15455
|
);
|
|
15230
|
-
if (
|
|
15231
|
-
|
|
15456
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
15457
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, {
|
|
15232
15458
|
plays: results,
|
|
15233
15459
|
count: results.length,
|
|
15234
15460
|
query,
|
|
@@ -15242,7 +15468,7 @@ async function handlePlayGrep(args) {
|
|
|
15242
15468
|
`
|
|
15243
15469
|
);
|
|
15244
15470
|
for (const result of results) {
|
|
15245
|
-
console.log(_optionalChain([result, 'access',
|
|
15471
|
+
console.log(_optionalChain([result, 'access', _608 => _608.displayName, 'optionalAccess', _609 => _609.trim, 'call', _610 => _610()]) || result.name);
|
|
15246
15472
|
const matches = formatPlayGrepMatches(result.matches);
|
|
15247
15473
|
if (matches) console.log(` Matched: ${matches}`);
|
|
15248
15474
|
console.log(` Describe: ${result.describe}`);
|
|
@@ -15251,7 +15477,7 @@ async function handlePlayGrep(args) {
|
|
|
15251
15477
|
return 0;
|
|
15252
15478
|
}
|
|
15253
15479
|
async function handlePlayDescribe(args) {
|
|
15254
|
-
const selection =
|
|
15480
|
+
const selection = _chunkBSKPQB2Pjs.parseJsonFields.call(void 0, args, "describe");
|
|
15255
15481
|
args = selection.args;
|
|
15256
15482
|
const playName = args[0];
|
|
15257
15483
|
if (!playName) {
|
|
@@ -15285,8 +15511,8 @@ async function handlePlayDescribe(args) {
|
|
|
15285
15511
|
`deepline plays check ${playName}`,
|
|
15286
15512
|
...definedName ? [`deepline describe <workspace>/${definedName}`] : []
|
|
15287
15513
|
];
|
|
15288
|
-
if (
|
|
15289
|
-
|
|
15514
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
15515
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, {
|
|
15290
15516
|
ok: false,
|
|
15291
15517
|
error: { message },
|
|
15292
15518
|
next
|
|
@@ -15300,7 +15526,7 @@ async function handlePlayDescribe(args) {
|
|
|
15300
15526
|
}
|
|
15301
15527
|
return 2;
|
|
15302
15528
|
}
|
|
15303
|
-
const client = new (0,
|
|
15529
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
15304
15530
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
15305
15531
|
command: "describe"
|
|
15306
15532
|
});
|
|
@@ -15310,9 +15536,9 @@ async function handlePlayDescribe(args) {
|
|
|
15310
15536
|
compact: args.includes("--compact")
|
|
15311
15537
|
}
|
|
15312
15538
|
);
|
|
15313
|
-
if (
|
|
15314
|
-
if (selection.fields)
|
|
15315
|
-
else
|
|
15539
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
15540
|
+
if (selection.fields) _chunkBSKPQB2Pjs.printJson.call(void 0, play, selection.fields);
|
|
15541
|
+
else _chunkBSKPQB2Pjs.printCompactJson.call(void 0, play);
|
|
15316
15542
|
return 0;
|
|
15317
15543
|
}
|
|
15318
15544
|
printPlayDescription(play);
|
|
@@ -15334,7 +15560,7 @@ async function handlePlaySave(args) {
|
|
|
15334
15560
|
}
|
|
15335
15561
|
let graph;
|
|
15336
15562
|
try {
|
|
15337
|
-
graph = await
|
|
15563
|
+
graph = await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
15338
15564
|
"cli.play_save_bundle_graph",
|
|
15339
15565
|
{ targetKind: "file" },
|
|
15340
15566
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, options.target))
|
|
@@ -15356,7 +15582,7 @@ async function handlePlaySave(args) {
|
|
|
15356
15582
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
|
|
15357
15583
|
};
|
|
15358
15584
|
if (options.jsonOutput) {
|
|
15359
|
-
|
|
15585
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, result);
|
|
15360
15586
|
} else {
|
|
15361
15587
|
console.error(result.message);
|
|
15362
15588
|
console.error(` checked artifact: ${result.expectedArtifactHash}`);
|
|
@@ -15378,7 +15604,7 @@ async function handlePlaySave(args) {
|
|
|
15378
15604
|
};
|
|
15379
15605
|
if (options.dryRun) {
|
|
15380
15606
|
if (options.jsonOutput) {
|
|
15381
|
-
|
|
15607
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, dryRun);
|
|
15382
15608
|
} else {
|
|
15383
15609
|
console.log(`Dry run: ${playName}`);
|
|
15384
15610
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15387,14 +15613,14 @@ async function handlePlaySave(args) {
|
|
|
15387
15613
|
}
|
|
15388
15614
|
return 0;
|
|
15389
15615
|
}
|
|
15390
|
-
const client = new (0,
|
|
15616
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
15391
15617
|
try {
|
|
15392
|
-
await
|
|
15618
|
+
await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
15393
15619
|
"cli.play_save_compile_manifests",
|
|
15394
15620
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15395
15621
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
15396
15622
|
);
|
|
15397
|
-
const saved = await
|
|
15623
|
+
const saved = await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
15398
15624
|
"cli.play_save_register_draft",
|
|
15399
15625
|
{ targetKind: "file", playName, artifactHash },
|
|
15400
15626
|
() => client.registerPlayArtifact({
|
|
@@ -15423,7 +15649,7 @@ async function handlePlaySave(args) {
|
|
|
15423
15649
|
}
|
|
15424
15650
|
};
|
|
15425
15651
|
if (options.jsonOutput) {
|
|
15426
|
-
|
|
15652
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, result);
|
|
15427
15653
|
} else {
|
|
15428
15654
|
console.log(
|
|
15429
15655
|
`\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
|
|
@@ -15449,7 +15675,7 @@ async function handlePlayPublish(args) {
|
|
|
15449
15675
|
}
|
|
15450
15676
|
const { target: playName, useLatest } = options;
|
|
15451
15677
|
let revisionId = options.revisionId;
|
|
15452
|
-
const client = new (0,
|
|
15678
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
15453
15679
|
if (isFileTarget(playName)) {
|
|
15454
15680
|
if (revisionId || useLatest) {
|
|
15455
15681
|
console.error(
|
|
@@ -15459,7 +15685,7 @@ async function handlePlayPublish(args) {
|
|
|
15459
15685
|
}
|
|
15460
15686
|
let graph;
|
|
15461
15687
|
try {
|
|
15462
|
-
graph = await
|
|
15688
|
+
graph = await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
15463
15689
|
"cli.play_publish_bundle_graph",
|
|
15464
15690
|
{ targetKind: "file" },
|
|
15465
15691
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, playName))
|
|
@@ -15481,7 +15707,7 @@ async function handlePlayPublish(args) {
|
|
|
15481
15707
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
|
|
15482
15708
|
};
|
|
15483
15709
|
if (options.jsonOutput) {
|
|
15484
|
-
|
|
15710
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, result3);
|
|
15485
15711
|
} else {
|
|
15486
15712
|
console.error(result3.message);
|
|
15487
15713
|
console.error(` checked artifact: ${result3.expectedArtifactHash}`);
|
|
@@ -15504,7 +15730,7 @@ async function handlePlayPublish(args) {
|
|
|
15504
15730
|
};
|
|
15505
15731
|
if (options.dryRun) {
|
|
15506
15732
|
if (options.jsonOutput) {
|
|
15507
|
-
|
|
15733
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, dryRun);
|
|
15508
15734
|
} else {
|
|
15509
15735
|
console.log(`Dry run: ${rootPlayName}`);
|
|
15510
15736
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15523,12 +15749,12 @@ async function handlePlayPublish(args) {
|
|
|
15523
15749
|
}
|
|
15524
15750
|
}
|
|
15525
15751
|
try {
|
|
15526
|
-
await
|
|
15752
|
+
await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
15527
15753
|
"cli.play_publish_compile_manifests",
|
|
15528
15754
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15529
15755
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
15530
15756
|
);
|
|
15531
|
-
await
|
|
15757
|
+
await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
15532
15758
|
"cli.play_publish_imports",
|
|
15533
15759
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15534
15760
|
() => publishImportedPlayDependencies(client, graph)
|
|
@@ -15537,7 +15763,7 @@ async function handlePlayPublish(args) {
|
|
|
15537
15763
|
console.error(error instanceof Error ? error.message : String(error));
|
|
15538
15764
|
return 1;
|
|
15539
15765
|
}
|
|
15540
|
-
const published = await
|
|
15766
|
+
const published = await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
|
|
15541
15767
|
"cli.play_publish_register_root",
|
|
15542
15768
|
{
|
|
15543
15769
|
targetKind: "file",
|
|
@@ -15562,17 +15788,17 @@ async function handlePlayPublish(args) {
|
|
|
15562
15788
|
artifactHash,
|
|
15563
15789
|
liveVersion: _nullishCoalesce(published.version, () => ( null)),
|
|
15564
15790
|
revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
|
|
15565
|
-
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15566
|
-
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15791
|
+
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _611 => _611.version]), () => ( null)),
|
|
15792
|
+
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _612 => _612.artifactHash]), () => ( null)),
|
|
15567
15793
|
sourceBytes: {
|
|
15568
|
-
before: _optionalChain([previousLive, 'optionalAccess',
|
|
15794
|
+
before: _optionalChain([previousLive, 'optionalAccess', _613 => _613.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
|
|
15569
15795
|
after: Buffer.byteLength(graph.root.sourceCode, "utf8")
|
|
15570
15796
|
},
|
|
15571
15797
|
triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
|
|
15572
15798
|
triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
|
|
15573
15799
|
};
|
|
15574
15800
|
if (options.jsonOutput) {
|
|
15575
|
-
|
|
15801
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, result2);
|
|
15576
15802
|
} else {
|
|
15577
15803
|
printPublishReceipt({
|
|
15578
15804
|
name: rootPlayName,
|
|
@@ -15603,14 +15829,14 @@ async function handlePlayPublish(args) {
|
|
|
15603
15829
|
revisionId: _nullishCoalesce(revisionId, () => ( null)),
|
|
15604
15830
|
latest: useLatest
|
|
15605
15831
|
};
|
|
15606
|
-
|
|
15832
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, result2);
|
|
15607
15833
|
return 0;
|
|
15608
15834
|
}
|
|
15609
15835
|
const resolvedName = parseReferencedPlayTarget(playName).playName;
|
|
15610
15836
|
if (useLatest) {
|
|
15611
15837
|
const versions = await client.listPlayVersions(resolvedName);
|
|
15612
15838
|
const latest = versions[0];
|
|
15613
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
15839
|
+
if (!_optionalChain([latest, 'optionalAccess', _614 => _614._id])) {
|
|
15614
15840
|
console.error(`No saved revisions found for ${resolvedName}.`);
|
|
15615
15841
|
return 1;
|
|
15616
15842
|
}
|
|
@@ -15627,7 +15853,7 @@ async function handlePlayPublish(args) {
|
|
|
15627
15853
|
revisionId ? { revisionId } : {}
|
|
15628
15854
|
);
|
|
15629
15855
|
if (options.jsonOutput) {
|
|
15630
|
-
|
|
15856
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, result);
|
|
15631
15857
|
} else {
|
|
15632
15858
|
printPublishReceipt({
|
|
15633
15859
|
name: result.name,
|
|
@@ -15667,7 +15893,7 @@ async function handlePlayDelete(args) {
|
|
|
15667
15893
|
);
|
|
15668
15894
|
return 2;
|
|
15669
15895
|
}
|
|
15670
|
-
const client = new (0,
|
|
15896
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
15671
15897
|
let detail;
|
|
15672
15898
|
try {
|
|
15673
15899
|
detail = await client.getPlay(parseReferencedPlayTarget(playName).playName);
|
|
@@ -15691,8 +15917,8 @@ async function handlePlayDelete(args) {
|
|
|
15691
15917
|
name: resolvedName,
|
|
15692
15918
|
plannedMutation: "move saved org-owned play to Trash and stop triggers"
|
|
15693
15919
|
};
|
|
15694
|
-
if (
|
|
15695
|
-
|
|
15920
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
15921
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, result2);
|
|
15696
15922
|
} else {
|
|
15697
15923
|
process.stdout.write(
|
|
15698
15924
|
`Dry run: would move ${result2.name} to Trash and stop its active triggers.
|
|
@@ -15702,8 +15928,8 @@ async function handlePlayDelete(args) {
|
|
|
15702
15928
|
return 0;
|
|
15703
15929
|
}
|
|
15704
15930
|
const result = await client.deletePlay(resolvedName);
|
|
15705
|
-
if (
|
|
15706
|
-
|
|
15931
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
15932
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, result);
|
|
15707
15933
|
return result.archived || result.alreadyArchived ? 0 : 4;
|
|
15708
15934
|
}
|
|
15709
15935
|
if (result.alreadyArchived) {
|
|
@@ -15742,13 +15968,13 @@ async function handlePlayRestore(args) {
|
|
|
15742
15968
|
);
|
|
15743
15969
|
return 2;
|
|
15744
15970
|
}
|
|
15745
|
-
const client = new (0,
|
|
15971
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
15746
15972
|
try {
|
|
15747
15973
|
const result = await client.restorePlay(
|
|
15748
15974
|
parseReferencedPlayTarget(playName).playName
|
|
15749
15975
|
);
|
|
15750
|
-
if (
|
|
15751
|
-
|
|
15976
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
15977
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, result);
|
|
15752
15978
|
return result.restored || result.alreadyActive ? 0 : 4;
|
|
15753
15979
|
}
|
|
15754
15980
|
if (result.alreadyActive) {
|
|
@@ -15875,21 +16101,21 @@ Common commands:
|
|
|
15875
16101
|
resume: `deepline plays resume-submission ${_chunkAID3OYVJjs.shellQuote.call(void 0, path)} --json`
|
|
15876
16102
|
}
|
|
15877
16103
|
};
|
|
15878
|
-
|
|
16104
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0, result2, {
|
|
15879
16105
|
json: options.json,
|
|
15880
16106
|
text: `Submission ${saved.workflowId}: admission is unknown. ${result2.next.inspect}
|
|
15881
16107
|
`
|
|
15882
16108
|
});
|
|
15883
16109
|
return;
|
|
15884
16110
|
}
|
|
15885
|
-
const client = new (0,
|
|
16111
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
15886
16112
|
if (new URL(saved.baseUrl).origin !== new URL(client.baseUrl).origin) {
|
|
15887
16113
|
throw new Error(
|
|
15888
16114
|
"The submission belongs to a different API origin. Select its original host before recovery."
|
|
15889
16115
|
);
|
|
15890
16116
|
}
|
|
15891
16117
|
const result = await client.startPlayRun(saved.request);
|
|
15892
|
-
|
|
16118
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
15893
16119
|
{ ...result },
|
|
15894
16120
|
{
|
|
15895
16121
|
json: options.json,
|
|
@@ -15925,7 +16151,7 @@ Examples:
|
|
|
15925
16151
|
).action(async (target, options) => {
|
|
15926
16152
|
process.exitCode = await handlePlayCheck([
|
|
15927
16153
|
target,
|
|
15928
|
-
...
|
|
16154
|
+
..._chunkBSKPQB2Pjs.jsonFieldArgs.call(void 0, options.json),
|
|
15929
16155
|
...options.full ? ["--full"] : []
|
|
15930
16156
|
]);
|
|
15931
16157
|
});
|
|
@@ -15964,10 +16190,10 @@ Notes:
|
|
|
15964
16190
|
--force-tool-refresh re-executes completed tool receipts and may repeat billed
|
|
15965
16191
|
provider calls. It is independent from --force.
|
|
15966
16192
|
--max-concurrent-external-calls controls the per-run provider-tool/deepline.fetch
|
|
15967
|
-
resident-work ceiling. Default: ${
|
|
16193
|
+
resident-work ceiling. Default: ${_chunkNLRTFJGHjs.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS}; accepted range: 1-${_chunkNLRTFJGHjs.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS}.
|
|
15968
16194
|
Provider pacing and sandbox memory limits still apply.
|
|
15969
16195
|
--max-concurrent-rows sets the run-wide default and ceiling for live map row
|
|
15970
|
-
resolvers. Accepted range: 1-${
|
|
16196
|
+
resolvers. Accepted range: 1-${_chunkNLRTFJGHjs.MAX_CONFIGURABLE_CONCURRENT_ROWS}. The runtime
|
|
15971
16197
|
may lower it when source-row size exceeds the active-row memory budget.
|
|
15972
16198
|
--max-credits replaces the play's billing.maxCreditsPerRun for this run.
|
|
15973
16199
|
Tool calls that would exceed it are denied.
|
|
@@ -16081,10 +16307,10 @@ Examples:
|
|
|
16081
16307
|
"Refresh completed tool receipts; may repeat billed provider calls"
|
|
16082
16308
|
).option(
|
|
16083
16309
|
"--max-concurrent-external-calls <count>",
|
|
16084
|
-
`Concurrent provider-tool and deepline.fetch executions (${
|
|
16310
|
+
`Concurrent provider-tool and deepline.fetch executions (${_chunkNLRTFJGHjs.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS} default, max ${_chunkNLRTFJGHjs.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS})`
|
|
16085
16311
|
).option(
|
|
16086
16312
|
"--max-concurrent-rows <count>",
|
|
16087
|
-
`Run-wide dataset map row resolver ceiling (max ${
|
|
16313
|
+
`Run-wide dataset map row resolver ceiling (max ${_chunkNLRTFJGHjs.MAX_CONFIGURABLE_CONCURRENT_ROWS})`
|
|
16088
16314
|
).option("--max-credits <credits>", "Deepline-credit cap for this run").option("--open", "Open the play page in a browser after the run starts").option(
|
|
16089
16315
|
"--debug-map-latency",
|
|
16090
16316
|
"Internal diagnostics: emit one aggregate latency profile per dataset map"
|
|
@@ -16129,14 +16355,14 @@ JSON field selection:
|
|
|
16129
16355
|
passthroughArgs.shift();
|
|
16130
16356
|
}
|
|
16131
16357
|
const exitCode = await handlePlayRun(
|
|
16132
|
-
|
|
16358
|
+
_chunkNLRTFJGHjs.resolvePlayRunCliOptions.call(void 0,
|
|
16133
16359
|
_nullishCoalesce(effectiveTarget, () => ( void 0)),
|
|
16134
16360
|
options,
|
|
16135
16361
|
passthroughArgs,
|
|
16136
|
-
|
|
16362
|
+
_chunkU6WEGDD3js.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
16137
16363
|
)
|
|
16138
16364
|
);
|
|
16139
|
-
|
|
16365
|
+
_chunkU6WEGDD3js.recordCliTrace.call(void 0, {
|
|
16140
16366
|
phase: "cli.play_command_exit",
|
|
16141
16367
|
exitCode
|
|
16142
16368
|
});
|
|
@@ -16185,9 +16411,9 @@ Examples:
|
|
|
16185
16411
|
const limit = Number(options.historyLimit);
|
|
16186
16412
|
if (!Number.isInteger(limit) || limit < 1 || limit > 30)
|
|
16187
16413
|
throw new Error("--history-limit must be an integer from 1 to 30.");
|
|
16188
|
-
const client = new (0,
|
|
16414
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
16189
16415
|
if (options.binding) {
|
|
16190
|
-
|
|
16416
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0,
|
|
16191
16417
|
await client.getPlayTriggerHistory(options.binding, { limit })
|
|
16192
16418
|
);
|
|
16193
16419
|
return;
|
|
@@ -16195,7 +16421,7 @@ Examples:
|
|
|
16195
16421
|
const result = await client.listPlayTriggerInventory({
|
|
16196
16422
|
cursor: options.cursor
|
|
16197
16423
|
});
|
|
16198
|
-
|
|
16424
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, {
|
|
16199
16425
|
...result,
|
|
16200
16426
|
next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)}`
|
|
16201
16427
|
});
|
|
@@ -16254,7 +16480,7 @@ Examples:
|
|
|
16254
16480
|
if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
|
|
16255
16481
|
throw new Error("--group-by must be kind or trigger_source.");
|
|
16256
16482
|
}
|
|
16257
|
-
const result = await new (0,
|
|
16483
|
+
const result = await new (0, _chunkIHMYIHF4js.DeeplineClient)().getPlaysActivity({
|
|
16258
16484
|
timeZone: options.timeZone,
|
|
16259
16485
|
days,
|
|
16260
16486
|
...options.endDate ? { endDate: options.endDate } : {},
|
|
@@ -16268,7 +16494,7 @@ Examples:
|
|
|
16268
16494
|
`${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
|
|
16269
16495
|
);
|
|
16270
16496
|
}
|
|
16271
|
-
|
|
16497
|
+
_chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
|
|
16272
16498
|
{ ...result },
|
|
16273
16499
|
{
|
|
16274
16500
|
json: Boolean(options.json),
|
|
@@ -16297,7 +16523,7 @@ Examples:
|
|
|
16297
16523
|
false
|
|
16298
16524
|
);
|
|
16299
16525
|
});
|
|
16300
|
-
|
|
16526
|
+
_chunkNKPTM7SKjs.registerDeprecatedSearchCommand.call(void 0,
|
|
16301
16527
|
play,
|
|
16302
16528
|
(options) => options.all ? ["plays"] : ["prebuilts"]
|
|
16303
16529
|
);
|
|
@@ -16338,9 +16564,9 @@ Examples:
|
|
|
16338
16564
|
"--json [fields]",
|
|
16339
16565
|
"JSON output; optionally select comma-separated dotted paths"
|
|
16340
16566
|
);
|
|
16341
|
-
|
|
16567
|
+
_chunkTVW6USSGjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
|
|
16342
16568
|
async (target, options) => {
|
|
16343
|
-
const ownView = () => handlePlayDescribe(
|
|
16569
|
+
const ownView = () => handlePlayDescribe(_chunkBSKPQB2Pjs.describeArgs.call(void 0, target, options));
|
|
16344
16570
|
const [flagText] = [options.json].filter(
|
|
16345
16571
|
(value) => typeof value === "string"
|
|
16346
16572
|
);
|
|
@@ -16351,7 +16577,7 @@ Examples:
|
|
|
16351
16577
|
process.exitCode = await ownView();
|
|
16352
16578
|
return;
|
|
16353
16579
|
}
|
|
16354
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
16580
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-CP35DZ5Z.js")));
|
|
16355
16581
|
process.exitCode = await describeAnything(
|
|
16356
16582
|
name,
|
|
16357
16583
|
{
|
|
@@ -16469,7 +16695,7 @@ Examples:
|
|
|
16469
16695
|
deepline plays deployments <deployment-id>
|
|
16470
16696
|
`
|
|
16471
16697
|
).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output").action(
|
|
16472
|
-
async (id, options) => id ?
|
|
16698
|
+
async (id, options) => id ? _chunk5DCQWQCPjs.handleDeploymentGet.call(void 0, id, options) : _chunk5DCQWQCPjs.handleDeploymentsList.call(void 0, options)
|
|
16473
16699
|
);
|
|
16474
16700
|
addPublishHelp(
|
|
16475
16701
|
play.command("publish <target>").description(
|
|
@@ -16604,14 +16830,14 @@ Examples:
|
|
|
16604
16830
|
const limit = Number(options.limit);
|
|
16605
16831
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 1e3)
|
|
16606
16832
|
throw new Error("--limit must be an integer from 1 to 1000.");
|
|
16607
|
-
const result = await new (0,
|
|
16833
|
+
const result = await new (0, _chunkIHMYIHF4js.DeeplineClient)().runs.rowHistory({
|
|
16608
16834
|
playName: options.play,
|
|
16609
16835
|
runId,
|
|
16610
16836
|
tableNamespace: options.dataset,
|
|
16611
16837
|
limit,
|
|
16612
16838
|
cursor: options.cursor
|
|
16613
16839
|
});
|
|
16614
|
-
|
|
16840
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, {
|
|
16615
16841
|
...result,
|
|
16616
16842
|
...result.nextCursor ? {
|
|
16617
16843
|
next: `deepline runs rows-history ${_chunkAID3OYVJjs.shellQuote.call(void 0, runId)} --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.play)} --dataset ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.dataset)} --limit ${limit} --cursor ${_chunkAID3OYVJjs.shellQuote.call(void 0, result.nextCursor)} --json`
|
|
@@ -16685,7 +16911,7 @@ Examples:
|
|
|
16685
16911
|
new (0, _commander.Option)("--log-failed", "Attach terminal-failure logs").hideHelp()
|
|
16686
16912
|
).action(async (runId, options) => {
|
|
16687
16913
|
if (TOOL_EXECUTION_ID.test(runId)) {
|
|
16688
|
-
const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-
|
|
16914
|
+
const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-2EY2ETCZ.js")));
|
|
16689
16915
|
process.exitCode = await getToolExecutionReceipt(runId, {
|
|
16690
16916
|
receiptJson: options.json !== void 0
|
|
16691
16917
|
});
|
|
@@ -16693,7 +16919,7 @@ Examples:
|
|
|
16693
16919
|
}
|
|
16694
16920
|
process.exitCode = await handleRunGet([
|
|
16695
16921
|
runId,
|
|
16696
|
-
...
|
|
16922
|
+
..._chunkBSKPQB2Pjs.jsonFieldArgs.call(void 0, options.json),
|
|
16697
16923
|
...options.webUrl ? ["--web-url"] : [],
|
|
16698
16924
|
...options.full ? ["--full"] : [],
|
|
16699
16925
|
...options.input ? ["--input"] : [],
|
|
@@ -16983,7 +17209,7 @@ Examples:
|
|
|
16983
17209
|
...options.allowEmpty ? ["--allow-empty"] : [],
|
|
16984
17210
|
...options.wait ? ["--wait"] : [],
|
|
16985
17211
|
...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
|
|
16986
|
-
...
|
|
17212
|
+
..._chunkBSKPQB2Pjs.jsonFieldArgs.call(void 0, options.json)
|
|
16987
17213
|
]);
|
|
16988
17214
|
});
|
|
16989
17215
|
const share = play.command("share").description(
|
|
@@ -17124,8 +17350,8 @@ function absolutePublicPlayUrl(path) {
|
|
|
17124
17350
|
}
|
|
17125
17351
|
function shareUrlFields(status) {
|
|
17126
17352
|
return {
|
|
17127
|
-
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17128
|
-
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17353
|
+
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _615 => _615.share, 'optionalAccess', _616 => _616.publicPath])),
|
|
17354
|
+
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _617 => _617.share, 'optionalAccess', _618 => _618.canonicalPath]))
|
|
17129
17355
|
};
|
|
17130
17356
|
}
|
|
17131
17357
|
function shareStatusForOutput(status) {
|
|
@@ -17149,10 +17375,10 @@ async function handlePlayShareStatus(args) {
|
|
|
17149
17375
|
return 2;
|
|
17150
17376
|
}
|
|
17151
17377
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17152
|
-
const status = await new (0,
|
|
17378
|
+
const status = await new (0, _chunkIHMYIHF4js.DeeplineClient)().getSharePage(name);
|
|
17153
17379
|
const outputStatus = shareStatusForOutput(status);
|
|
17154
|
-
if (
|
|
17155
|
-
|
|
17380
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
17381
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, outputStatus);
|
|
17156
17382
|
return 0;
|
|
17157
17383
|
}
|
|
17158
17384
|
if (!outputStatus.share) {
|
|
@@ -17191,7 +17417,7 @@ async function handlePlaySharePublish(args) {
|
|
|
17191
17417
|
return 2;
|
|
17192
17418
|
}
|
|
17193
17419
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17194
|
-
const client = new (0,
|
|
17420
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
17195
17421
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17196
17422
|
let resolvedVersion;
|
|
17197
17423
|
if (!revisionId) {
|
|
@@ -17222,8 +17448,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17222
17448
|
);
|
|
17223
17449
|
if (!hasCompleted) {
|
|
17224
17450
|
const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
|
|
17225
|
-
if (
|
|
17226
|
-
|
|
17451
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
17452
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, {
|
|
17227
17453
|
ok: false,
|
|
17228
17454
|
code: "NO_SUCCESSFUL_RUN",
|
|
17229
17455
|
message,
|
|
@@ -17247,8 +17473,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17247
17473
|
};
|
|
17248
17474
|
if (args.includes("--dry-run")) {
|
|
17249
17475
|
const plan = { dryRun: true, name, version: resolvedVersion, ...request };
|
|
17250
|
-
if (
|
|
17251
|
-
|
|
17476
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
17477
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, plan);
|
|
17252
17478
|
} else {
|
|
17253
17479
|
console.log(
|
|
17254
17480
|
`Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
|
|
@@ -17258,13 +17484,13 @@ async function handlePlaySharePublish(args) {
|
|
|
17258
17484
|
}
|
|
17259
17485
|
const status = await client.publishSharePage(name, request);
|
|
17260
17486
|
const outputStatus = shareStatusForOutput(status);
|
|
17261
|
-
if (
|
|
17262
|
-
|
|
17487
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
17488
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, outputStatus);
|
|
17263
17489
|
return 0;
|
|
17264
17490
|
}
|
|
17265
17491
|
const urls = shareUrlFields(outputStatus);
|
|
17266
17492
|
console.log(
|
|
17267
|
-
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access',
|
|
17493
|
+
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _619 => _619.share, 'optionalAccess', _620 => _620.publicPath]))), () => ( ""))}`
|
|
17268
17494
|
);
|
|
17269
17495
|
if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
|
|
17270
17496
|
console.log(`Version URL: ${urls.canonicalUrl}`);
|
|
@@ -17290,9 +17516,9 @@ async function handlePlayShareUpdate(args) {
|
|
|
17290
17516
|
...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
|
|
17291
17517
|
...seoIndexing ? { seoIndexing } : {}
|
|
17292
17518
|
};
|
|
17293
|
-
const status = await new (0,
|
|
17294
|
-
if (
|
|
17295
|
-
|
|
17519
|
+
const status = await new (0, _chunkIHMYIHF4js.DeeplineClient)().updateSharePage(name, request);
|
|
17520
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
17521
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, status);
|
|
17296
17522
|
return 0;
|
|
17297
17523
|
}
|
|
17298
17524
|
console.log(`Updated ${name} share settings.`);
|
|
@@ -17307,13 +17533,13 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17307
17533
|
return 2;
|
|
17308
17534
|
}
|
|
17309
17535
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17310
|
-
const client = new (0,
|
|
17536
|
+
const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
|
|
17311
17537
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17312
17538
|
const versionFlag = shareFlagValue(args, "--version");
|
|
17313
17539
|
if (!revisionId && versionFlag) {
|
|
17314
17540
|
const versions = await client.listPlayVersions(name);
|
|
17315
17541
|
const chosen = versions.find((r) => r.version === Number(versionFlag));
|
|
17316
|
-
if (!_optionalChain([chosen, 'optionalAccess',
|
|
17542
|
+
if (!_optionalChain([chosen, 'optionalAccess', _621 => _621._id])) {
|
|
17317
17543
|
console.error(`Version ${versionFlag} not found for ${name}.`);
|
|
17318
17544
|
return 4;
|
|
17319
17545
|
}
|
|
@@ -17324,12 +17550,12 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17324
17550
|
revisionId ? { revisionId } : {}
|
|
17325
17551
|
);
|
|
17326
17552
|
const outputStatus = shareStatusForOutput(status);
|
|
17327
|
-
if (
|
|
17328
|
-
|
|
17553
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
17554
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, outputStatus);
|
|
17329
17555
|
return 0;
|
|
17330
17556
|
}
|
|
17331
17557
|
const urls = shareUrlFields(outputStatus);
|
|
17332
|
-
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access',
|
|
17558
|
+
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _622 => _622.share, 'optionalAccess', _623 => _623.publishedRevisionId]) === revisionId;
|
|
17333
17559
|
console.log(
|
|
17334
17560
|
`Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
|
|
17335
17561
|
);
|
|
@@ -17350,9 +17576,9 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17350
17576
|
return 2;
|
|
17351
17577
|
}
|
|
17352
17578
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17353
|
-
const status = await new (0,
|
|
17354
|
-
if (
|
|
17355
|
-
|
|
17579
|
+
const status = await new (0, _chunkIHMYIHF4js.DeeplineClient)().unpublishSharePage(name);
|
|
17580
|
+
if (_chunkBSKPQB2Pjs.argsWantJson.call(void 0, args)) {
|
|
17581
|
+
_chunkBSKPQB2Pjs.printCompactJson.call(void 0, status);
|
|
17356
17582
|
return 0;
|
|
17357
17583
|
}
|
|
17358
17584
|
console.log(`Unpublished ${name}; the public page has been removed.`);
|
|
@@ -17427,4 +17653,4 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17427
17653
|
|
|
17428
17654
|
|
|
17429
17655
|
|
|
17430
|
-
exports.PREBUILT_PLAY_TAG_KEYS = PREBUILT_PLAY_TAG_KEYS; exports.assertDatasetHasExportableRows = assertDatasetHasExportableRows; exports.buildPlayCompletionTextLines = buildPlayCompletionTextLines; exports.buildRunActivityTextLines = buildRunActivityTextLines; exports.buildRunLaunch = buildRunLaunch; exports.buildRunLogsText = buildRunLogsText; exports.buildRunPackageTextLines = buildRunPackageTextLines; exports.buildStopAllDryRunTextLines = buildStopAllDryRunTextLines; exports.clampJsonPreviewText = clampJsonPreviewText; exports.compactPlayStatus = compactPlayStatus; exports.csvColumnLines = csvColumnLines; exports.describeSleepUntil = describeSleepUntil; exports.exportPlayStatusRows = exportPlayStatusRows; exports.formatPlaySandboxRuntimeWarning = formatPlaySandboxRuntimeWarning; exports.formatStepLabelFromNodeId = formatStepLabelFromNodeId; exports.getFinalStatusFromLiveEvent = getFinalStatusFromLiveEvent; exports.getProgressLinesFromLiveEvent = getProgressLinesFromLiveEvent; exports.getRunningHeartbeatLine = getRunningHeartbeatLine; exports.getStepTransitionLineFromLiveEvent = getStepTransitionLineFromLiveEvent; exports.handlePlayCheck = handlePlayCheck; exports.handlePlayCost = handlePlayCost; exports.handlePlayDelete = handlePlayDelete; exports.handlePlayDescribe = handlePlayDescribe; exports.handlePlayGet = handlePlayGet; exports.handlePlayGrep = handlePlayGrep; exports.handlePlayList = handlePlayList; exports.handlePlayPin = handlePlayPin; exports.handlePlayPublish = handlePlayPublish; exports.handlePlayRestore = handlePlayRestore; exports.handlePlayRun = handlePlayRun; exports.handlePlaySave = handlePlaySave; exports.handlePlaySharePublish = handlePlaySharePublish; exports.handlePlayShareRegenerate = handlePlayShareRegenerate; exports.handlePlayShareStatus = handlePlayShareStatus; exports.handlePlayShareUnpublish = handlePlayShareUnpublish; exports.handlePlayShareUpdate = handlePlayShareUpdate; exports.handlePlayVersions = handlePlayVersions; exports.handleRunEventSearch = handleRunEventSearch; exports.handleRunExport = handleRunExport; exports.handleRunGet = handleRunGet; exports.handleRunLifecycleStatus = handleRunLifecycleStatus; exports.handleRunLogs = handleRunLogs; exports.handleRunStop = handleRunStop; exports.handleRunStopAll = handleRunStopAll; exports.handleRunTail = handleRunTail; exports.handleRunsList = handleRunsList; exports.handleRunsRerun = handleRunsRerun; exports.liveMaxCreditsPerRun = liveMaxCreditsPerRun; exports.loadPlayBundler = loadPlayBundler; exports.parsePlayPublishOptions = parsePlayPublishOptions; exports.parsePlayRunHeaderFlag =
|
|
17656
|
+
exports.PREBUILT_PLAY_TAG_KEYS = PREBUILT_PLAY_TAG_KEYS; exports.assertDatasetHasExportableRows = assertDatasetHasExportableRows; exports.buildPlayCompletionTextLines = buildPlayCompletionTextLines; exports.buildRunActivityTextLines = buildRunActivityTextLines; exports.buildRunLaunch = buildRunLaunch; exports.buildRunLogsText = buildRunLogsText; exports.buildRunPackageTextLines = buildRunPackageTextLines; exports.buildStopAllDryRunTextLines = buildStopAllDryRunTextLines; exports.clampJsonPreviewText = clampJsonPreviewText; exports.compactPlayStatus = compactPlayStatus; exports.csvColumnLines = csvColumnLines; exports.describeSleepUntil = describeSleepUntil; exports.exportPlayStatusRows = exportPlayStatusRows; exports.formatPlaySandboxRuntimeWarning = formatPlaySandboxRuntimeWarning; exports.formatStepLabelFromNodeId = formatStepLabelFromNodeId; exports.getFinalStatusFromLiveEvent = getFinalStatusFromLiveEvent; exports.getProgressLinesFromLiveEvent = getProgressLinesFromLiveEvent; exports.getRunningHeartbeatLine = getRunningHeartbeatLine; exports.getStepTransitionLineFromLiveEvent = getStepTransitionLineFromLiveEvent; exports.handlePlayCheck = handlePlayCheck; exports.handlePlayCost = handlePlayCost; exports.handlePlayDelete = handlePlayDelete; exports.handlePlayDescribe = handlePlayDescribe; exports.handlePlayGet = handlePlayGet; exports.handlePlayGrep = handlePlayGrep; exports.handlePlayList = handlePlayList; exports.handlePlayPin = handlePlayPin; exports.handlePlayPublish = handlePlayPublish; exports.handlePlayRestore = handlePlayRestore; exports.handlePlayRun = handlePlayRun; exports.handlePlaySave = handlePlaySave; exports.handlePlaySharePublish = handlePlaySharePublish; exports.handlePlayShareRegenerate = handlePlayShareRegenerate; exports.handlePlayShareStatus = handlePlayShareStatus; exports.handlePlayShareUnpublish = handlePlayShareUnpublish; exports.handlePlayShareUpdate = handlePlayShareUpdate; exports.handlePlayVersions = handlePlayVersions; exports.handleRunEventSearch = handleRunEventSearch; exports.handleRunExport = handleRunExport; exports.handleRunGet = handleRunGet; exports.handleRunLifecycleStatus = handleRunLifecycleStatus; exports.handleRunLogs = handleRunLogs; exports.handleRunStop = handleRunStop; exports.handleRunStopAll = handleRunStopAll; exports.handleRunTail = handleRunTail; exports.handleRunsList = handleRunsList; exports.handleRunsRerun = handleRunsRerun; exports.liveMaxCreditsPerRun = liveMaxCreditsPerRun; exports.loadPlayBundler = loadPlayBundler; exports.parsePlayPublishOptions = parsePlayPublishOptions; exports.parsePlayRunHeaderFlag = _chunkNLRTFJGHjs.parsePlayRunHeaderFlag; exports.parsePlayRunOptions = _chunkNLRTFJGHjs.parsePlayRunOptions; exports.preflightLocalFileInputs = preflightLocalFileInputs; exports.registerPlayCommands = registerPlayCommands; exports.renderRunOverviewText = renderRunOverviewText; exports.resolveDatasetByName = resolveDatasetByName; exports.resolvePlayRunOutputStatus = resolvePlayRunOutputStatus; exports.resolveRunStopState = resolveRunStopState; exports.selectRunLogTailPage = selectRunLogTailPage; exports.shouldPrintPlayProgressLine = shouldPrintPlayProgressLine; exports.startAndWaitForPlayCompletion = startAndWaitForPlayCompletion; exports.startAndWaitForPlayCompletionByStream = startAndWaitForPlayCompletionByStream; exports.truncateErrorForDisplay = truncateErrorForDisplay; exports.waitForPlayCompletionByWatch = waitForPlayCompletionByWatch; exports.withTerminalPlayIdentity = withTerminalPlayIdentity; exports.writeInlinePlay = writeInlinePlay; exports.writePlayRunIdFile = writePlayRunIdFile; exports.writePlayRunReceipt = writePlayRunReceipt;
|