deepline 0.3.535 → 0.3.536
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 +232 -147
- package/dist/bundling-sources/sdk/src/index.ts +4 -0
- package/dist/bundling-sources/sdk/src/plays/local-file-discovery.ts +27 -1
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +16 -5
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +2 -23
- package/dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts +26 -14
- package/dist/bundling-sources/shared_libs/integration-contracts/monitor-input-contract.ts +33 -8
- package/dist/bundling-sources/shared_libs/monitors/fleets/count-drift-alert.ts +121 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +8 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +14 -82
- package/dist/bundling-sources/shared_libs/monitors/package.json +1 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +4 -4
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +0 -26
- package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +21 -31
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +88 -96
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +12 -10
- package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +71 -2
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +127 -9
- package/dist/bundling-sources/shared_libs/play-runtime/memory-ledger.ts +15 -2
- package/dist/bundling-sources/shared_libs/play-runtime/prebuilt-result-quality.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/fixture-capacity-simulator.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/gradient2-concurrency-controller.ts +41 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/provider-capacity-policy.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/provider-concurrency-policy.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +5 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +8 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-compute-usage.ts +31 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +26 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +11 -4
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +73 -18
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +169 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +26 -4
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +84 -49
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -32
- package/dist/bundling-sources/shared_libs/plays/launch/input-contract.ts +13 -1
- package/dist/bundling-sources/shared_libs/plays/local-file-discovery.ts +68 -1
- package/dist/bundling-sources/shared_libs/product-notifications/configuration-draft.ts +57 -1
- package/dist/bundling-sources/shared_libs/product-notifications/configuration.ts +22 -9
- package/dist/cli/auth-6XQKFOLG.js +43 -0
- package/dist/cli/{auth-ZCTMB5RA.mjs → auth-KCTCUO7P.mjs} +7 -7
- package/dist/cli/{billing-GVFKZQH3.js → billing-4VBGZ3CT.js} +273 -112
- package/dist/cli/{billing-OU2ZHL72.mjs → billing-OOJHKLNS.mjs} +185 -24
- package/dist/cli/{chunk-FGN75ZN6.js → chunk-2B4IOGFD.js} +390 -382
- package/dist/cli/{chunk-KOZBZPRM.js → chunk-2FCSUOYN.js} +55 -55
- package/dist/cli/{chunk-T2N3B7IQ.js → chunk-2GJZLIKW.js} +8 -8
- package/dist/cli/{chunk-AUEUAPVS.mjs → chunk-2YWJS76L.mjs} +1 -1
- package/dist/cli/{chunk-W5YJYU4G.mjs → chunk-3PCYV6ZJ.mjs} +2 -2
- package/dist/cli/{chunk-UUQ2OXMH.js → chunk-4E5JXZ3W.js} +18 -20
- package/dist/cli/{chunk-R4RG4FV5.mjs → chunk-4KWD3MX2.mjs} +13 -10
- package/dist/cli/{chunk-XSOTEVOB.js → chunk-6BBGUQJJ.js} +50 -141
- package/dist/cli/{chunk-PHLNYBAA.js → chunk-6VUGBQZQ.js} +5 -5
- package/dist/cli/{chunk-G2DLG32W.mjs → chunk-AB2GBOD4.mjs} +40 -27
- package/dist/cli/{chunk-JWWYLGUT.mjs → chunk-ANUKBZ6W.mjs} +475 -11
- package/dist/cli/{chunk-FZKPPB5P.mjs → chunk-BASLYGXK.mjs} +85 -77
- package/dist/cli/{chunk-SQWET4SL.js → chunk-BBTKAASQ.js} +2 -1
- package/dist/cli/{chunk-NRO3NTVO.js → chunk-CBV7AKWM.js} +5 -5
- package/dist/cli/{chunk-PI5R65OQ.js → chunk-CIDN5K23.js} +1 -1
- package/dist/cli/{chunk-QNHHZ63P.mjs → chunk-CQBIO6HW.mjs} +1 -1
- package/dist/cli/{chunk-2KHUFWTK.js → chunk-CQDQNZGH.js} +42 -37
- package/dist/cli/{chunk-D4MHCCIR.js → chunk-CWSLUNA6.js} +33 -33
- package/dist/cli/{chunk-E3CLOVG5.mjs → chunk-CXTW7SRW.mjs} +50 -141
- package/dist/cli/{chunk-H6SWS5CG.mjs → chunk-DA2I2M7D.mjs} +2 -2
- package/dist/cli/{chunk-WAIBM6KX.mjs → chunk-DQHUJMCL.mjs} +5 -5
- package/dist/cli/{chunk-DWPY6ZID.mjs → chunk-DUYAMLOC.mjs} +1 -1
- package/dist/cli/{chunk-K53NKWZO.mjs → chunk-E24UGPGG.mjs} +13 -15
- package/dist/cli/{chunk-STR5LXK4.mjs → chunk-FSIVF2SI.mjs} +1 -1
- package/dist/cli/{chunk-7R5DAANG.mjs → chunk-GF32SBST.mjs} +1 -1
- package/dist/cli/{chunk-7CWSAEYS.mjs → chunk-GHLDCLSC.mjs} +1 -1
- package/dist/cli/{chunk-ZUVE63Y7.js → chunk-GTVZKY3F.js} +2 -2
- package/dist/cli/{chunk-J75DANZY.mjs → chunk-HAJQGP5V.mjs} +2 -2
- package/dist/cli/{chunk-RFQWSH6I.js → chunk-HWDKRN7L.js} +3 -3
- package/dist/cli/{chunk-5YAJGRWB.js → chunk-IPVRMYWT.js} +7 -7
- package/dist/cli/{chunk-ZPGGW27Q.mjs → chunk-JL2OTMSG.mjs} +1 -0
- package/dist/cli/{chunk-K76AEBFY.mjs → chunk-JUHDJNSI.mjs} +4 -4
- package/dist/cli/{chunk-R2KKEHJN.mjs → chunk-KPQHUVYW.mjs} +5 -5
- package/dist/cli/{chunk-6LHX33VN.js → chunk-KWYGWO4Y.js} +9 -6
- package/dist/cli/{chunk-7PXP2FQK.js → chunk-LDGZFDUB.js} +2 -2
- package/dist/cli/{chunk-KWGXHPHL.js → chunk-LN6RXDTB.js} +523 -59
- package/dist/cli/{chunk-TCVCFZP6.mjs → chunk-LZXZQPA2.mjs} +4 -1
- package/dist/cli/{chunk-2D6SWQTK.js → chunk-MSP4DTSD.js} +13 -13
- package/dist/cli/{chunk-BNH4Y35W.mjs → chunk-OLH2PHMC.mjs} +2 -2
- package/dist/cli/{chunk-QYBAHYP4.mjs → chunk-OUDTOMZC.mjs} +7 -9
- package/dist/cli/{chunk-GESIFFQX.mjs → chunk-OVX3Q5Q3.mjs} +1 -1
- package/dist/cli/{chunk-6TYRRNXY.mjs → chunk-PNY3BWHP.mjs} +2 -2
- package/dist/cli/{chunk-DYIWDUY4.js → chunk-Q4MNUOS4.js} +316 -303
- package/dist/cli/{chunk-5EKNDNFQ.js → chunk-Q5CXV3E3.js} +2 -2
- package/dist/cli/{chunk-W6T23EUC.mjs → chunk-RVSSQPQO.mjs} +1 -1
- package/dist/cli/{chunk-WNNA4L6Z.js → chunk-SLPJ3LXI.js} +22 -22
- package/dist/cli/{chunk-K3IPGMGP.js → chunk-TX5TUHJN.js} +17 -19
- package/dist/cli/{chunk-IF75RD6U.js → chunk-U2LVWCTD.js} +18 -6
- package/dist/cli/{chunk-ZS2WHWWL.js → chunk-UNDLNT3V.js} +1 -1
- package/dist/cli/{chunk-4NLRWKZB.js → chunk-VBDZIMWD.js} +26 -26
- package/dist/cli/{chunk-DAPKLYST.js → chunk-W7AEIGZR.js} +41 -41
- package/dist/cli/{chunk-LVISZFYO.mjs → chunk-WC5M3JXE.mjs} +2 -2
- package/dist/cli/{chunk-C374C22Y.js → chunk-WOQO3GV4.js} +14 -11
- package/dist/cli/{chunk-243O3FH5.js → chunk-XBAH3TKU.js} +5 -5
- package/dist/cli/{chunk-DFJODFMC.mjs → chunk-XJD2GYUP.mjs} +5 -5
- package/dist/cli/{chunk-BF65LB7X.mjs → chunk-XVZRJJDS.mjs} +4 -4
- package/dist/cli/{chunk-OM732MGV.js → chunk-Y2NTPYGS.js} +17 -17
- package/dist/cli/{chunk-YFZLZNTH.mjs → chunk-YBMHOH6H.mjs} +4 -4
- package/dist/cli/{chunk-RKY4LBX3.mjs → chunk-YRLAUGQY.mjs} +3 -3
- package/dist/cli/{chunk-FKD3KL5Q.mjs → chunk-Z2XA6YU4.mjs} +10 -5
- package/dist/cli/{chunk-JQQG4QL4.mjs → chunk-Z7UIOGW4.mjs} +3 -3
- package/dist/cli/{chunk-HYBZWSSH.js → chunk-ZEV2Y56V.js} +44 -44
- package/dist/cli/{chunk-MI6ZP7XI.mjs → chunk-ZG7BOECV.mjs} +18 -6
- package/dist/cli/{chunk-HWPOXCCK.js → chunk-ZILSRDIN.js} +8 -8
- package/dist/cli/{chunk-CIDATNTY.js → chunk-ZISEH7OL.js} +16 -16
- package/dist/cli/{chunk-KA6ZERJL.js → chunk-ZZ4MF2GI.js} +6 -6
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-CD55KEIO.js → csv-2V2DIFNG.js} +15 -15
- package/dist/cli/{csv-CLPVMIRF.mjs → csv-P3HLK4GO.mjs} +6 -6
- package/dist/cli/{db-MQKLDAEO.js → db-MREAQVW6.js} +36 -36
- package/dist/cli/{db-AU4SMWUN.mjs → db-ZYOY3QRQ.mjs} +9 -9
- package/dist/cli/describe-IKZFOADR.mjs +49 -0
- package/dist/cli/describe-WW3OQRLP.js +49 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +5 -5
- package/dist/cli/describe-core.mjs +4 -4
- package/dist/cli/{executions-77GOLWRM.js → executions-H5IJ7QSQ.js} +11 -11
- package/dist/cli/{executions-TFIJPUX7.mjs → executions-KTSY5M34.mjs} +9 -9
- package/dist/cli/{feedback-OV5YAL3A.js → feedback-724QK3Z5.js} +16 -16
- package/dist/cli/{feedback-2WRSZ5WL.mjs → feedback-WWJRIXEU.mjs} +8 -8
- package/dist/cli/git-PHYRD56H.js +25 -0
- package/dist/cli/{git-VNS4ATLZ.mjs → git-R5VRG7X6.mjs} +7 -7
- package/dist/cli/index.js +151 -157
- package/dist/cli/index.mjs +51 -57
- package/dist/cli/{legacy-noops-HDOB5C6F.js → legacy-noops-C6GDEGPU.js} +11 -11
- package/dist/cli/{legacy-noops-C732QDCY.mjs → legacy-noops-PWZ5XLAO.mjs} +8 -8
- package/dist/cli/{monitors-5IUMHH3E.js → monitors-VAVQ4WCE.js} +125 -122
- package/dist/cli/{monitors-2LYEFXOU.mjs → monitors-WQSKMHAP.mjs} +19 -16
- package/dist/cli/{org-ADW2EVAC.js → org-CWWRWXZQ.js} +89 -89
- package/dist/cli/{org-G4YGZPHS.mjs → org-MAL4QPVF.mjs} +9 -9
- package/dist/cli/{play-7GQ56C2D.mjs → play-ILW6MSNG.mjs} +123 -76
- package/dist/cli/{play-EHSOSSHT.js → play-WJOWK5PQ.js} +641 -594
- package/dist/cli/{providers-WL3YTCSV.mjs → providers-4V2NMLZZ.mjs} +9 -9
- package/dist/cli/{providers-PWCF6OOO.js → providers-W662ANCH.js} +12 -12
- package/dist/cli/{quickstart-ZKI5MURA.js → quickstart-BW6EBUYX.js} +8 -8
- package/dist/cli/{quickstart-323XOPGI.mjs → quickstart-C22BR743.mjs} +6 -6
- package/dist/cli/{run-XZPWA6JS.js → run-KW7KW4FX.js} +50 -53
- package/dist/cli/{run-ZCNZU3K2.mjs → run-SPAU5IMW.mjs} +31 -34
- package/dist/cli/search-HLE54W5G.js +32 -0
- package/dist/cli/{search-CVLVSFMJ.mjs → search-XPC75HLM.mjs} +10 -11
- package/dist/cli/{search-output-6PY6RN2R.mjs → search-output-JKYJSEPM.mjs} +6 -6
- package/dist/cli/{search-output-7HRSSRBS.js → search-output-VJYE7USJ.js} +8 -8
- package/dist/cli/{secrets-6S2ZWDIM.mjs → secrets-OJG73GXQ.mjs} +9 -9
- package/dist/cli/{secrets-IYD5VKY4.js → secrets-YB57KGSB.js} +18 -18
- package/dist/cli/{sessions-GVEX5TUJ.mjs → sessions-7ZL37BW4.mjs} +8 -8
- package/dist/cli/sessions-VEBYZIEU.js +22 -0
- package/dist/cli/{settings-CANK4HJQ.js → settings-A7DD2ZYE.js} +88 -89
- package/dist/cli/{settings-BN5MJZ3C.mjs → settings-RKSQB7FA.mjs} +15 -16
- package/dist/cli/{setup-JNMSCCU4.mjs → setup-NXDUTITY.mjs} +11 -12
- package/dist/cli/{setup-YSGKGLSJ.js → setup-S3K5YU62.js} +51 -52
- package/dist/cli/skills-NVQ744CN.js +36 -0
- package/dist/cli/{skills-QCQN2UM2.mjs → skills-VMFAIDO6.mjs} +9 -10
- package/dist/cli/{tools-CDPOID7V.mjs → tools-52NTHBSJ.mjs} +20 -21
- package/dist/cli/tools-SBDUL3WB.js +56 -0
- package/dist/cli/update-HHVFZPCV.js +34 -0
- package/dist/cli/{update-D3ZERUQ3.mjs → update-SAKBEKMV.mjs} +11 -12
- package/dist/cli/{views-RDZRWQBQ.mjs → views-ACRV7MD6.mjs} +54 -10
- package/dist/cli/{views-4NV2KQKA.js → views-C3GJOBDG.js} +66 -22
- package/dist/cli/{workflow-2CG3TVCG.mjs → workflow-CS22E7TC.mjs} +10 -10
- package/dist/cli/{workflow-RABJCAZC.js → workflow-ZNWCZEGN.js} +20 -20
- package/dist/{client-DhSvMO3A.d.mts → client-BlLYQDNo.d.mts} +1 -1
- package/dist/{client-oGNJMQFd.d.ts → client-DSQlkIDO.d.ts} +1 -1
- package/dist/{client-core-CdWH6Sii.d.ts → client-core-CDwapXy5.d.ts} +159 -108
- package/dist/{client-core-CVG1Et-4.d.mts → client-core-rX7n2H8U.d.mts} +159 -108
- package/dist/{compiler-manifest-D2ZlBGxj.d.ts → compiler-manifest-BHNC4RL-.d.mts} +15 -22
- package/dist/{compiler-manifest-D2ZlBGxj.d.mts → compiler-manifest-BHNC4RL-.d.ts} +15 -22
- package/dist/{errors-B-gOQdj-.d.mts → errors-D7sPXrvB.d.mts} +1 -1
- package/dist/{errors-CB0KAmmV.d.ts → errors-lhtIWG5Z.d.ts} +1 -1
- package/dist/{index-c3nvUGCS.d.ts → index-CQTBHXHr.d.ts} +1 -1
- package/dist/{index-BbJADro4.d.mts → index-NaDZq2xf.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +15 -15
- package/dist/index.mjs +11 -11
- package/dist/install-integrity.json +129 -132
- package/dist/monitor-fleet-contract.d.mts +17 -11
- package/dist/monitor-fleet-contract.d.ts +17 -11
- package/dist/monitor-fleet-contract.js +3 -3
- package/dist/monitor-fleet-contract.mjs +2 -2
- package/dist/monitor-input-contract.js +2 -2
- package/dist/monitor-input-contract.mjs +1 -1
- 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 +17 -5
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +3 -3
- package/dist/plays/run-request.mjs +2 -2
- 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 +12 -12
- package/dist/server.mjs +6 -6
- package/package.json +1 -1
- package/dist/cli/auth-VDCU3T6A.js +0 -43
- package/dist/cli/chunk-4QELPWUW.mjs +0 -405
- package/dist/cli/chunk-T7RBM2WX.js +0 -405
- package/dist/cli/describe-5BFNHT5V.js +0 -50
- package/dist/cli/describe-AWJUXE2U.mjs +0 -50
- package/dist/cli/git-HGMX52XU.js +0 -25
- package/dist/cli/pages-KXKWSCEV.mjs +0 -266
- package/dist/cli/pages-VTJGAI2D.js +0 -266
- package/dist/cli/search-J6EY7DQN.js +0 -33
- package/dist/cli/sessions-7HPIVSQ4.js +0 -22
- package/dist/cli/skills-WDGSSKJZ.js +0 -37
- package/dist/cli/tools-URNVXSTZ.js +0 -57
- package/dist/cli/update-Q6JW32IA.js +0 -35
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkY2NTPYGSjs = require('./chunk-Y2NTPYGS.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -18,15 +18,15 @@ var _chunkOM732MGVjs = require('./chunk-OM732MGV.js');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkKWYGWO4Yjs = require('./chunk-KWYGWO4Y.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkTX5TUHJNjs = require('./chunk-TX5TUHJN.js');
|
|
25
25
|
require('./chunk-D3BCSAN7.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkVBDZIMWDjs = require('./chunk-VBDZIMWD.js');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
@@ -47,14 +47,14 @@ var _chunkKQSTV4MWjs = require('./chunk-KQSTV4MW.js');
|
|
|
47
47
|
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
var
|
|
50
|
+
var _chunkCBV7AKWMjs = require('./chunk-CBV7AKWM.js');
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
var
|
|
54
|
+
var _chunk6VUGBQZQjs = require('./chunk-6VUGBQZQ.js');
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
var
|
|
57
|
+
var _chunkXBAH3TKUjs = require('./chunk-XBAH3TKU.js');
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
@@ -67,7 +67,7 @@ var _chunk243O3FH5js = require('./chunk-243O3FH5.js');
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
var
|
|
70
|
+
var _chunk2B4IOGFDjs = require('./chunk-2B4IOGFD.js');
|
|
71
71
|
require('./chunk-E4CABWXL.js');
|
|
72
72
|
|
|
73
73
|
|
|
@@ -82,7 +82,7 @@ require('./chunk-E4CABWXL.js');
|
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
var
|
|
85
|
+
var _chunkCQDQNZGHjs = require('./chunk-CQDQNZGH.js');
|
|
86
86
|
|
|
87
87
|
|
|
88
88
|
|
|
@@ -91,19 +91,18 @@ require('./chunk-XDVT3GOM.js');
|
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
|
|
94
|
-
var
|
|
94
|
+
var _chunkZZ4MF2GIjs = require('./chunk-ZZ4MF2GI.js');
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
|
|
99
99
|
|
|
100
|
-
var
|
|
101
|
-
require('./chunk-
|
|
100
|
+
var _chunkLDGZFDUBjs = require('./chunk-LDGZFDUB.js');
|
|
101
|
+
require('./chunk-ZEV2Y56V.js');
|
|
102
102
|
|
|
103
103
|
|
|
104
104
|
|
|
105
|
-
var
|
|
106
|
-
require('./chunk-T7RBM2WX.js');
|
|
105
|
+
var _chunkHWDKRN7Ljs = require('./chunk-HWDKRN7L.js');
|
|
107
106
|
|
|
108
107
|
|
|
109
108
|
var _chunkR7J7CJPZjs = require('./chunk-R7J7CJPZ.js');
|
|
@@ -123,17 +122,17 @@ var _chunkYGCKMI5Pjs = require('./chunk-YGCKMI5P.js');
|
|
|
123
122
|
|
|
124
123
|
|
|
125
124
|
|
|
126
|
-
var
|
|
127
|
-
require('./chunk-
|
|
125
|
+
var _chunkLN6RXDTBjs = require('./chunk-LN6RXDTB.js');
|
|
126
|
+
require('./chunk-ZILSRDIN.js');
|
|
128
127
|
|
|
129
128
|
|
|
130
|
-
var
|
|
131
|
-
require('./chunk-
|
|
129
|
+
var _chunkCWSLUNA6js = require('./chunk-CWSLUNA6.js');
|
|
130
|
+
require('./chunk-2GJZLIKW.js');
|
|
132
131
|
require('./chunk-XNYIZMNQ.js');
|
|
133
132
|
|
|
134
133
|
|
|
135
|
-
var
|
|
136
|
-
require('./chunk-
|
|
134
|
+
var _chunkBBTKAASQjs = require('./chunk-BBTKAASQ.js');
|
|
135
|
+
require('./chunk-CIDN5K23.js');
|
|
137
136
|
require('./chunk-OG64RBAC.js');
|
|
138
137
|
|
|
139
138
|
|
|
@@ -2115,7 +2114,7 @@ function resolveField(key, command) {
|
|
|
2115
2114
|
function printSettings(result, json, name) {
|
|
2116
2115
|
result = { ...result, settings: parsePlaySettings(result.settings) };
|
|
2117
2116
|
const selected = fields.filter(([key]) => !name || key === name);
|
|
2118
|
-
|
|
2117
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
2119
2118
|
{
|
|
2120
2119
|
...result,
|
|
2121
2120
|
settings: Object.fromEntries(
|
|
@@ -2159,7 +2158,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2159
2158
|
valueSyntax: field.cli.valueSyntax,
|
|
2160
2159
|
examples: field.cli.examples
|
|
2161
2160
|
}));
|
|
2162
|
-
|
|
2161
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
2163
2162
|
{
|
|
2164
2163
|
fields: descriptions,
|
|
2165
2164
|
render: {
|
|
@@ -2184,7 +2183,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2184
2183
|
async (options, command) => {
|
|
2185
2184
|
if (options.name !== void 0) resolveField(options.name, command);
|
|
2186
2185
|
printSettings(
|
|
2187
|
-
await new (0,
|
|
2186
|
+
await new (0, _chunkXBAH3TKUjs.DeeplineClient)().getPlaySettings(options.play),
|
|
2188
2187
|
options.json,
|
|
2189
2188
|
options.name
|
|
2190
2189
|
);
|
|
@@ -2215,7 +2214,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2215
2214
|
);
|
|
2216
2215
|
}
|
|
2217
2216
|
if (options.dryRun) {
|
|
2218
|
-
|
|
2217
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
2219
2218
|
{
|
|
2220
2219
|
dryRun: true,
|
|
2221
2220
|
play,
|
|
@@ -2236,7 +2235,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2236
2235
|
return;
|
|
2237
2236
|
}
|
|
2238
2237
|
printSettings(
|
|
2239
|
-
await new (0,
|
|
2238
|
+
await new (0, _chunkXBAH3TKUjs.DeeplineClient)().updatePlaySettings(play, patch),
|
|
2240
2239
|
options.json
|
|
2241
2240
|
);
|
|
2242
2241
|
};
|
|
@@ -2262,13 +2261,13 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2262
2261
|
"--root must be person or team; --limit must be 1\u2013100.",
|
|
2263
2262
|
{ exitCode: 2 }
|
|
2264
2263
|
);
|
|
2265
|
-
const page = await new (0,
|
|
2264
|
+
const page = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().listPlaySettingsPaths({
|
|
2266
2265
|
root: options.root,
|
|
2267
2266
|
limit,
|
|
2268
2267
|
cursor: options.cursor
|
|
2269
2268
|
});
|
|
2270
2269
|
const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""}` : null;
|
|
2271
|
-
|
|
2270
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
2272
2271
|
{
|
|
2273
2272
|
...page,
|
|
2274
2273
|
nextCommand,
|
|
@@ -2319,7 +2318,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2319
2318
|
root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _12 => _12.root]), () => ( "person")),
|
|
2320
2319
|
folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.folders]), () => ( []))
|
|
2321
2320
|
};
|
|
2322
|
-
const client = new (0,
|
|
2321
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
2323
2322
|
const paths = [];
|
|
2324
2323
|
let cursor;
|
|
2325
2324
|
do {
|
|
@@ -2381,7 +2380,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2381
2380
|
moved.push(move.playName);
|
|
2382
2381
|
}
|
|
2383
2382
|
}
|
|
2384
|
-
|
|
2383
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
2385
2384
|
{
|
|
2386
2385
|
dryRun: Boolean(options.dryRun),
|
|
2387
2386
|
from: options.from,
|
|
@@ -2509,7 +2508,7 @@ function triggerLines(view) {
|
|
|
2509
2508
|
return lines;
|
|
2510
2509
|
}
|
|
2511
2510
|
function printView(view, json) {
|
|
2512
|
-
|
|
2511
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
2513
2512
|
{
|
|
2514
2513
|
...view,
|
|
2515
2514
|
render: {
|
|
@@ -2522,7 +2521,7 @@ function printView(view, json) {
|
|
|
2522
2521
|
);
|
|
2523
2522
|
}
|
|
2524
2523
|
function printResult(result, json) {
|
|
2525
|
-
|
|
2524
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
2526
2525
|
{
|
|
2527
2526
|
...result,
|
|
2528
2527
|
render: {
|
|
@@ -2552,7 +2551,7 @@ async function mutate(command, options, build) {
|
|
|
2552
2551
|
usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
|
|
2553
2552
|
}
|
|
2554
2553
|
if (options.dryRun) {
|
|
2555
|
-
|
|
2554
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
2556
2555
|
{
|
|
2557
2556
|
dryRun: true,
|
|
2558
2557
|
play: options.play,
|
|
@@ -2571,7 +2570,7 @@ async function mutate(command, options, build) {
|
|
|
2571
2570
|
return;
|
|
2572
2571
|
}
|
|
2573
2572
|
printResult(
|
|
2574
|
-
await new (0,
|
|
2573
|
+
await new (0, _chunkXBAH3TKUjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
|
|
2575
2574
|
options.json
|
|
2576
2575
|
);
|
|
2577
2576
|
}
|
|
@@ -2604,7 +2603,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2604
2603
|
}).addHelpText("after", help2);
|
|
2605
2604
|
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) => {
|
|
2606
2605
|
printView(
|
|
2607
|
-
await new (0,
|
|
2606
|
+
await new (0, _chunkXBAH3TKUjs.DeeplineClient)().getPlayTriggerConfig(options.play),
|
|
2608
2607
|
options.json
|
|
2609
2608
|
);
|
|
2610
2609
|
});
|
|
@@ -2648,7 +2647,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2648
2647
|
if (options.auth === void 0) {
|
|
2649
2648
|
if (secrets.length || options.header || options.signaturePrefix)
|
|
2650
2649
|
usage(setWebhook, "--secret/--header need --auth.");
|
|
2651
|
-
const current = await new (0,
|
|
2650
|
+
const current = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().getPlayTriggerConfig(
|
|
2652
2651
|
options.play
|
|
2653
2652
|
);
|
|
2654
2653
|
return {
|
|
@@ -2725,7 +2724,7 @@ var KIND_DESCRIPTIONS = {
|
|
|
2725
2724
|
"receipt.skipped": "Saved work result: skipped.",
|
|
2726
2725
|
"runtime.event": "Other event."
|
|
2727
2726
|
};
|
|
2728
|
-
var RUN_LOGS_KIND_HELP =
|
|
2727
|
+
var RUN_LOGS_KIND_HELP = _chunk2B4IOGFDjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
|
|
2729
2728
|
kind,
|
|
2730
2729
|
description: KIND_DESCRIPTIONS[kind]
|
|
2731
2730
|
}));
|
|
@@ -2862,9 +2861,9 @@ function configureRunQueryCommandErrors(command, resource) {
|
|
|
2862
2861
|
const args = program.args;
|
|
2863
2862
|
if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
|
|
2864
2863
|
error.exitCode = 2;
|
|
2865
|
-
if (
|
|
2866
|
-
|
|
2867
|
-
Object.assign(new (0,
|
|
2864
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
|
|
2865
|
+
_chunkLN6RXDTBjs.printJsonError.call(void 0,
|
|
2866
|
+
Object.assign(new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(error.message), {
|
|
2868
2867
|
exitCode: 2,
|
|
2869
2868
|
retryable: false
|
|
2870
2869
|
})
|
|
@@ -2908,14 +2907,14 @@ function parseQuery(args, resource) {
|
|
|
2908
2907
|
if (VALUE_FLAGS.has(flag)) {
|
|
2909
2908
|
const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
|
|
2910
2909
|
if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
|
|
2911
|
-
throw new (0,
|
|
2910
|
+
throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
|
|
2912
2911
|
`${flag} requires a value. Use ${flag} <value>.`
|
|
2913
2912
|
);
|
|
2914
2913
|
}
|
|
2915
2914
|
if (flag === "--sum") sums.push(value);
|
|
2916
2915
|
else {
|
|
2917
2916
|
if (values[flag] !== void 0) {
|
|
2918
|
-
throw new (0,
|
|
2917
|
+
throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
|
|
2919
2918
|
`${flag} may only be supplied once.`
|
|
2920
2919
|
);
|
|
2921
2920
|
}
|
|
@@ -2929,12 +2928,12 @@ function parseQuery(args, resource) {
|
|
|
2929
2928
|
}
|
|
2930
2929
|
if (arg.startsWith("-")) {
|
|
2931
2930
|
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.";
|
|
2932
|
-
throw new (0,
|
|
2931
|
+
throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
|
|
2933
2932
|
`Unsupported query flag ${flag}. ${correction}`
|
|
2934
2933
|
);
|
|
2935
2934
|
}
|
|
2936
2935
|
if (runId !== void 0) {
|
|
2937
|
-
throw new (0,
|
|
2936
|
+
throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
|
|
2938
2937
|
`Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
|
|
2939
2938
|
);
|
|
2940
2939
|
}
|
|
@@ -2942,7 +2941,7 @@ function parseQuery(args, resource) {
|
|
|
2942
2941
|
}
|
|
2943
2942
|
if (switches.has("--fields")) {
|
|
2944
2943
|
if (runId !== void 0) {
|
|
2945
|
-
throw new (0,
|
|
2944
|
+
throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
|
|
2946
2945
|
"--fields does not use a run ID. Omit the positional run ID."
|
|
2947
2946
|
);
|
|
2948
2947
|
}
|
|
@@ -2955,18 +2954,18 @@ function parseQuery(args, resource) {
|
|
|
2955
2954
|
)
|
|
2956
2955
|
];
|
|
2957
2956
|
if (incompatible.length) {
|
|
2958
|
-
throw new (0,
|
|
2957
|
+
throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
|
|
2959
2958
|
`--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
|
|
2960
2959
|
);
|
|
2961
2960
|
}
|
|
2962
2961
|
}
|
|
2963
2962
|
if (switches.has("--count") && values["--group-by"] !== void 0) {
|
|
2964
|
-
throw new (0,
|
|
2963
|
+
throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
|
|
2965
2964
|
"--count cannot be combined with --group-by. Use --group-by for counts per group."
|
|
2966
2965
|
);
|
|
2967
2966
|
}
|
|
2968
2967
|
if (sums.length && switches.has("--count")) {
|
|
2969
|
-
throw new (0,
|
|
2968
|
+
throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
|
|
2970
2969
|
"--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
|
|
2971
2970
|
);
|
|
2972
2971
|
}
|
|
@@ -2974,7 +2973,7 @@ function parseQuery(args, resource) {
|
|
|
2974
2973
|
if (operation === "count") {
|
|
2975
2974
|
for (const flag of ["--limit", "--cursor", "--payloads"]) {
|
|
2976
2975
|
if (values[flag] !== void 0 || switches.has(flag)) {
|
|
2977
|
-
throw new (0,
|
|
2976
|
+
throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
|
|
2978
2977
|
`--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
|
|
2979
2978
|
);
|
|
2980
2979
|
}
|
|
@@ -3009,16 +3008,16 @@ function parseQuery(args, resource) {
|
|
|
3009
3008
|
];
|
|
3010
3009
|
}
|
|
3011
3010
|
}
|
|
3012
|
-
const request =
|
|
3011
|
+
const request = _chunk2B4IOGFDjs.normalizeRunEventOperationRequest.call(void 0, body);
|
|
3013
3012
|
const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
|
|
3014
3013
|
const backend = values["--runtime-backend"];
|
|
3015
3014
|
if (backend && backend !== "daytona" && backend !== "modal") {
|
|
3016
|
-
throw new (0,
|
|
3015
|
+
throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
|
|
3017
3016
|
"--runtime-backend must be daytona or modal."
|
|
3018
3017
|
);
|
|
3019
3018
|
}
|
|
3020
3019
|
if (backend && !namespace) {
|
|
3021
|
-
throw new (0,
|
|
3020
|
+
throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
|
|
3022
3021
|
"--runtime-backend requires --runtime-namespace."
|
|
3023
3022
|
);
|
|
3024
3023
|
}
|
|
@@ -3065,12 +3064,12 @@ async function handleRunEventQuery(args, resource = "logs") {
|
|
|
3065
3064
|
const failure = error instanceof Error ? error : new Error(String(error));
|
|
3066
3065
|
const record4 = failure;
|
|
3067
3066
|
const status = record4.statusCode;
|
|
3068
|
-
const exitCode = error instanceof
|
|
3067
|
+
const exitCode = error instanceof _chunk2B4IOGFDjs.RunEventQueryInputError || status === 400 || status === 422 || record4.code === "INVALID_RUNTIME_SELECTION" ? 2 : status === 401 || status === 403 || record4.code === "CONFIG_ERROR" || record4.code === "RUNTIME_ENVIRONMENT_TOKEN_REQUIRED" ? 3 : status === 404 ? 4 : 5;
|
|
3069
3068
|
const diagnostic = Object.assign(failure, {
|
|
3070
3069
|
exitCode,
|
|
3071
3070
|
retryable: exitCode === 5
|
|
3072
3071
|
});
|
|
3073
|
-
if (
|
|
3072
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) _chunkLN6RXDTBjs.printJsonError.call(void 0, diagnostic);
|
|
3074
3073
|
else console.error(`Error: ${diagnostic.message}`);
|
|
3075
3074
|
return exitCode;
|
|
3076
3075
|
}
|
|
@@ -3085,7 +3084,7 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3085
3084
|
...criteria
|
|
3086
3085
|
} = request;
|
|
3087
3086
|
const options = { ...criteria, ...runtime ? { runtime } : {} };
|
|
3088
|
-
const client = new (0,
|
|
3087
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
3089
3088
|
let result;
|
|
3090
3089
|
if (request.operation === "fields") {
|
|
3091
3090
|
result = await client.runs[resource].fields(runtime ? { runtime } : {});
|
|
@@ -3151,13 +3150,13 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3151
3150
|
lines.push(`Next page: ${nextPage}`);
|
|
3152
3151
|
}
|
|
3153
3152
|
}
|
|
3154
|
-
|
|
3153
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
3155
3154
|
{
|
|
3156
3155
|
...result,
|
|
3157
3156
|
...nextPage ? { next: { page: nextPage } } : {},
|
|
3158
3157
|
render: { sections: [{ title: `run ${resource}`, lines }] }
|
|
3159
3158
|
},
|
|
3160
|
-
{ json:
|
|
3159
|
+
{ json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
|
|
3161
3160
|
` }
|
|
3162
3161
|
);
|
|
3163
3162
|
return 0;
|
|
@@ -3228,7 +3227,7 @@ function rowCountsFrom(input) {
|
|
|
3228
3227
|
return { completed: c, failed: f, total: known };
|
|
3229
3228
|
}
|
|
3230
3229
|
function decodeRunStatus(status) {
|
|
3231
|
-
return
|
|
3230
|
+
return _chunkCQDQNZGHjs.decodePlayRunPublicStatus.call(void 0, status);
|
|
3232
3231
|
}
|
|
3233
3232
|
function deriveRunExecutionState(input) {
|
|
3234
3233
|
const status = decodeRunStatus(input.status);
|
|
@@ -4119,7 +4118,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4119
4118
|
...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
|
|
4120
4119
|
);
|
|
4121
4120
|
}
|
|
4122
|
-
const response = await new (0,
|
|
4121
|
+
const response = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().runs.getReceipts(runId, {
|
|
4123
4122
|
keys
|
|
4124
4123
|
});
|
|
4125
4124
|
const failed = response.receipts.filter(
|
|
@@ -4131,7 +4130,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4131
4130
|
JSON.stringify(response, null, 2) + "\n",
|
|
4132
4131
|
{ flag: "wx", mode: 384 }
|
|
4133
4132
|
);
|
|
4134
|
-
|
|
4133
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
4135
4134
|
{
|
|
4136
4135
|
runId,
|
|
4137
4136
|
out: options.out,
|
|
@@ -4141,7 +4140,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4141
4140
|
{ json: true }
|
|
4142
4141
|
);
|
|
4143
4142
|
} else {
|
|
4144
|
-
|
|
4143
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
|
|
4145
4144
|
}
|
|
4146
4145
|
if (failed)
|
|
4147
4146
|
process.exitCode = response.receipts.some(
|
|
@@ -4180,7 +4179,7 @@ includes nextCommand when another page is available.
|
|
|
4180
4179
|
{ exitCode: 2 }
|
|
4181
4180
|
);
|
|
4182
4181
|
}
|
|
4183
|
-
const page = await new (0,
|
|
4182
|
+
const page = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().runs.children(parentRunId, {
|
|
4184
4183
|
launchKey: options.launchKey,
|
|
4185
4184
|
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
4186
4185
|
limit
|
|
@@ -4195,7 +4194,7 @@ includes nextCommand when another page is available.
|
|
|
4195
4194
|
"--limit",
|
|
4196
4195
|
String(limit)
|
|
4197
4196
|
].join(" ") : null;
|
|
4198
|
-
|
|
4197
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
4199
4198
|
{
|
|
4200
4199
|
parentRunId,
|
|
4201
4200
|
launchKey: options.launchKey,
|
|
@@ -4231,7 +4230,7 @@ async function handleRunsHistory(options) {
|
|
|
4231
4230
|
throw new Error("--limit must be a positive integer.");
|
|
4232
4231
|
}
|
|
4233
4232
|
}
|
|
4234
|
-
const page = await new (0,
|
|
4233
|
+
const page = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().runs.history({
|
|
4235
4234
|
cursor: options.cursor,
|
|
4236
4235
|
orgId: options.org,
|
|
4237
4236
|
search: options.search,
|
|
@@ -4247,7 +4246,7 @@ async function handleRunsHistory(options) {
|
|
|
4247
4246
|
);
|
|
4248
4247
|
}
|
|
4249
4248
|
if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
|
|
4250
|
-
|
|
4249
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
4251
4250
|
{ ...page, render: { sections: [{ title: "Run history", lines }] } },
|
|
4252
4251
|
options.json ? { json: true } : {}
|
|
4253
4252
|
);
|
|
@@ -4300,12 +4299,12 @@ async function runRunsRerunCommand(runId, options) {
|
|
|
4300
4299
|
}
|
|
4301
4300
|
}
|
|
4302
4301
|
if (options.notice) console.error(options.notice);
|
|
4303
|
-
const result = await new (0,
|
|
4302
|
+
const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().runs.rerun(runId, {
|
|
4304
4303
|
...idempotencyKey === void 0 ? {} : { idempotencyKey },
|
|
4305
4304
|
...inputOverrides === void 0 ? {} : { inputOverrides }
|
|
4306
4305
|
});
|
|
4307
|
-
if (
|
|
4308
|
-
|
|
4306
|
+
if (_chunkLN6RXDTBjs.shouldEmitJson.call(void 0, options.json)) {
|
|
4307
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, result, { json: true });
|
|
4309
4308
|
} else if (result.rateLimited) {
|
|
4310
4309
|
console.log(`
|
|
4311
4310
|
${result.rateLimited.message}`);
|
|
@@ -4329,18 +4328,18 @@ Rerun started from ${runId}${inputOverrides ? " with input overrides" : ""}.`
|
|
|
4329
4328
|
// src/cli/operations/runs-resume.ts
|
|
4330
4329
|
async function runRunsResumeCommand(runId) {
|
|
4331
4330
|
try {
|
|
4332
|
-
const result = await new (0,
|
|
4331
|
+
const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().runs.resume(runId);
|
|
4333
4332
|
if (result.runId !== runId || result.resumed !== true || !Number.isSafeInteger(result.epoch) || result.epoch < 1)
|
|
4334
4333
|
throw new Error(
|
|
4335
4334
|
"Invalid resume receipt: expected the requested run and a new positive epoch."
|
|
4336
4335
|
);
|
|
4337
4336
|
console.log(
|
|
4338
|
-
`Resumed run ${result.runId} at epoch ${result.epoch}.
|
|
4337
|
+
`Resumed run ${result.runId} at epoch ${result.epoch}. Matching completed operations can be recovered; unfinished or unrecorded work can incur charges.`
|
|
4339
4338
|
);
|
|
4340
4339
|
console.log(` inspect: deepline runs get ${result.runId}`);
|
|
4341
4340
|
return 0;
|
|
4342
4341
|
} catch (error) {
|
|
4343
|
-
if (error instanceof
|
|
4342
|
+
if (error instanceof _chunkBBTKAASQjs.DeeplineError && error.code && !error.message.includes(error.code))
|
|
4344
4343
|
error.message = `${error.code}: ${error.message}`;
|
|
4345
4344
|
throw error;
|
|
4346
4345
|
}
|
|
@@ -4368,7 +4367,7 @@ function isUnambiguousLocalFilePath(value) {
|
|
|
4368
4367
|
const trimmed = value.trim();
|
|
4369
4368
|
return nodePath.posix.isAbsolute(trimmed) || nodePath.win32.isAbsolute(trimmed) || /^\.\.?[\\/]/.test(trimmed) || trimmed.includes("\\");
|
|
4370
4369
|
}
|
|
4371
|
-
function resolveCliFileInput(value, binding, environment = hostFileInputPathEnvironment()) {
|
|
4370
|
+
function resolveCliFileInput(value, binding, environment = hostFileInputPathEnvironment(), packagedFiles) {
|
|
4372
4371
|
if (typeof value !== "string") return null;
|
|
4373
4372
|
const trimmed = value.trim();
|
|
4374
4373
|
if (!trimmed || URL_VALUE.test(trimmed)) return null;
|
|
@@ -4380,13 +4379,21 @@ function resolveCliFileInput(value, binding, environment = hostFileInputPathEnvi
|
|
|
4380
4379
|
};
|
|
4381
4380
|
}
|
|
4382
4381
|
if (isUnambiguousLocalFilePath(trimmed)) {
|
|
4383
|
-
throw new (0,
|
|
4382
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
4384
4383
|
`Input ${binding.inputPath} is a local file path that is not a readable file: ${trimmed} (resolved to ${absolutePath}). Pass a readable file path or an https:// URL. No run was created.`,
|
|
4385
4384
|
void 0,
|
|
4386
4385
|
"PLAY_INPUT_FILE_PREFLIGHT",
|
|
4387
4386
|
{ inputPath: binding.inputPath, path: trimmed, resolved: absolutePath }
|
|
4388
4387
|
);
|
|
4389
4388
|
}
|
|
4389
|
+
if (packagedFiles && !packagedFiles.has(trimmed)) {
|
|
4390
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
4391
|
+
`Input ${binding.inputPath} is not a readable local file, a URL, or a file packaged with the Play: ${trimmed} (resolved to ${absolutePath}). Pass a readable file path or an https:// URL. No run was created.`,
|
|
4392
|
+
void 0,
|
|
4393
|
+
"PLAY_INPUT_FILE_PREFLIGHT",
|
|
4394
|
+
{ inputPath: binding.inputPath, path: trimmed, resolved: absolutePath }
|
|
4395
|
+
);
|
|
4396
|
+
}
|
|
4390
4397
|
return null;
|
|
4391
4398
|
}
|
|
4392
4399
|
|
|
@@ -4435,7 +4442,7 @@ function runTableHitCounts(tableNamespace, summary) {
|
|
|
4435
4442
|
const columns = {};
|
|
4436
4443
|
for (const column of Object.keys(_nullishCoalesce(summary.columns, () => ( {})))) {
|
|
4437
4444
|
if (column.includes(".")) continue;
|
|
4438
|
-
const physical =
|
|
4445
|
+
const physical = _chunkCQDQNZGHjs.sqlSafePlayColumnName.call(void 0, column);
|
|
4439
4446
|
if (legColumns.has(physical)) continue;
|
|
4440
4447
|
const count2 = filled[physical];
|
|
4441
4448
|
if (typeof count2 === "number") columns[column] = count2;
|
|
@@ -5163,13 +5170,13 @@ var RunDataset = class _RunDataset {
|
|
|
5163
5170
|
const absolutePath = _path.resolve.call(void 0, outPath);
|
|
5164
5171
|
_fs.writeFileSync.call(void 0,
|
|
5165
5172
|
absolutePath,
|
|
5166
|
-
`${JSON.stringify(
|
|
5173
|
+
`${JSON.stringify(_chunkKWYGWO4Yjs.orderRunExportJson.call(void 0, this.rows), null, 2)}
|
|
5167
5174
|
`,
|
|
5168
5175
|
"utf-8"
|
|
5169
5176
|
);
|
|
5170
5177
|
return absolutePath;
|
|
5171
5178
|
}
|
|
5172
|
-
return
|
|
5179
|
+
return _chunkKWYGWO4Yjs.writeRunDatasetCsv.call(void 0, {
|
|
5173
5180
|
rows: this.rows,
|
|
5174
5181
|
columns: this.#info.columns,
|
|
5175
5182
|
outPath
|
|
@@ -5186,7 +5193,7 @@ function resolveDatasetByName(available, datasetPath) {
|
|
|
5186
5193
|
function uniqueDatasetMatch(infos, selector) {
|
|
5187
5194
|
const matches = distinctCanonicalRowsInfos(infos);
|
|
5188
5195
|
if (matches.length > 1) {
|
|
5189
|
-
throw new (0,
|
|
5196
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
5190
5197
|
`Dataset selector '${selector}' is ambiguous; it matches multiple identities. Choose a unique Dataset ID or path.`,
|
|
5191
5198
|
void 0,
|
|
5192
5199
|
"RUN_EXPORT_DATASET_AMBIGUOUS",
|
|
@@ -5279,7 +5286,7 @@ function resolveReturnedDataset(output, available) {
|
|
|
5279
5286
|
if (legacy && (!datasetId || !legacy.datasetId)) {
|
|
5280
5287
|
return datasetId ? { ...legacy, datasetId } : legacy;
|
|
5281
5288
|
}
|
|
5282
|
-
throw new (0,
|
|
5289
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
5283
5290
|
`Returned Dataset '${_nullishCoalesce(_nullishCoalesce(datasetId, () => ( path)), () => ( "unknown"))}' is missing from the run catalog; cannot choose another dataset in its place.`,
|
|
5284
5291
|
void 0,
|
|
5285
5292
|
"RUN_EXPORT_DATASET_NOT_FOUND",
|
|
@@ -6674,7 +6681,7 @@ function renderOutcome(outcome) {
|
|
|
6674
6681
|
function printResult2(input) {
|
|
6675
6682
|
const failed = input.status === "failed" || input.status === "cancelled";
|
|
6676
6683
|
if (failed) process.exitCode = 1;
|
|
6677
|
-
|
|
6684
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
6678
6685
|
{
|
|
6679
6686
|
deployment: { ...input.deployment, status: input.status },
|
|
6680
6687
|
plays: input.outcomes,
|
|
@@ -6699,7 +6706,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6699
6706
|
const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
|
|
6700
6707
|
throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
|
|
6701
6708
|
});
|
|
6702
|
-
const { http, config } =
|
|
6709
|
+
const { http, config } = _chunkLN6RXDTBjs.getAuthedHttpClient.call(void 0, );
|
|
6703
6710
|
const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
|
|
6704
6711
|
const startDeployment = () => http.post("/api/v2/deployments", {
|
|
6705
6712
|
deliveryId,
|
|
@@ -6726,7 +6733,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6726
6733
|
},
|
|
6727
6734
|
{
|
|
6728
6735
|
bundle: bundleDeployPlayFile,
|
|
6729
|
-
fetchImpl:
|
|
6736
|
+
fetchImpl: _chunkCWSLUNA6js.fetchWithDeploymentProtection,
|
|
6730
6737
|
// The plays are already here: "opening" the source is naming it.
|
|
6731
6738
|
openSource: async () => ({
|
|
6732
6739
|
open: async () => ({ repoRoot: root })
|
|
@@ -6852,7 +6859,7 @@ async function checkLocalPlayGraph(input) {
|
|
|
6852
6859
|
// src/cli/renderers/local-play-execution.ts
|
|
6853
6860
|
function renderLocalPlayExecutionPlan(plan, options = {}) {
|
|
6854
6861
|
if (options.dryRun) {
|
|
6855
|
-
|
|
6862
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
|
|
6856
6863
|
return;
|
|
6857
6864
|
}
|
|
6858
6865
|
process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
|
|
@@ -7024,7 +7031,7 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7024
7031
|
const startedAt = Date.now();
|
|
7025
7032
|
try {
|
|
7026
7033
|
const result = run();
|
|
7027
|
-
|
|
7034
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
7028
7035
|
phase,
|
|
7029
7036
|
ms: Date.now() - startedAt,
|
|
7030
7037
|
ok: true,
|
|
@@ -7032,7 +7039,7 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7032
7039
|
});
|
|
7033
7040
|
return result;
|
|
7034
7041
|
} catch (error) {
|
|
7035
|
-
|
|
7042
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
7036
7043
|
phase,
|
|
7037
7044
|
ms: Date.now() - startedAt,
|
|
7038
7045
|
ok: false,
|
|
@@ -7085,10 +7092,10 @@ function buildBarePrebuiltReferenceError(input) {
|
|
|
7085
7092
|
return new Error(buildBarePrebuiltReferenceMessage(input));
|
|
7086
7093
|
}
|
|
7087
7094
|
function isPlayNotFoundError(error) {
|
|
7088
|
-
return error instanceof
|
|
7095
|
+
return error instanceof _chunkBBTKAASQjs.DeeplineError && (error.statusCode === 404 || error.code === "PLAY_NOT_FOUND" || error.code === "NOT_FOUND");
|
|
7089
7096
|
}
|
|
7090
7097
|
function isExplicitMissingPlayReferenceError(error) {
|
|
7091
|
-
if (!(error instanceof
|
|
7098
|
+
if (!(error instanceof _chunkBBTKAASQjs.DeeplineError)) {
|
|
7092
7099
|
return false;
|
|
7093
7100
|
}
|
|
7094
7101
|
if (error.statusCode !== 404 && error.code !== "PLAY_NOT_FOUND") {
|
|
@@ -7216,7 +7223,7 @@ function buildPlayReferenceNotFoundMessage(input) {
|
|
|
7216
7223
|
lines.push(
|
|
7217
7224
|
"",
|
|
7218
7225
|
"Search visible plays:",
|
|
7219
|
-
` deepline search
|
|
7226
|
+
` deepline search ${_chunkAID3OYVJjs.shellQuote.call(void 0, searchQuery)}`
|
|
7220
7227
|
);
|
|
7221
7228
|
}
|
|
7222
7229
|
return lines.join("\n");
|
|
@@ -7239,9 +7246,9 @@ async function buildPlayReferenceNotFoundError(input) {
|
|
|
7239
7246
|
} catch (e8) {
|
|
7240
7247
|
suggestions = [];
|
|
7241
7248
|
}
|
|
7242
|
-
const sourceError = input.sourceError instanceof
|
|
7249
|
+
const sourceError = input.sourceError instanceof _chunkBBTKAASQjs.DeeplineError ? input.sourceError : null;
|
|
7243
7250
|
const code = _optionalChain([sourceError, 'optionalAccess', _251 => _251.code]) && sourceError.code !== "API_ERROR" ? sourceError.code : "PLAY_NOT_FOUND";
|
|
7244
|
-
return new (0,
|
|
7251
|
+
return new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
7245
7252
|
buildPlayReferenceNotFoundMessage({
|
|
7246
7253
|
requested: input.target,
|
|
7247
7254
|
command: input.command,
|
|
@@ -7256,7 +7263,7 @@ async function isMissingRunPlayReferenceError(input) {
|
|
|
7256
7263
|
if (isExplicitMissingPlayReferenceError(input.error)) {
|
|
7257
7264
|
return true;
|
|
7258
7265
|
}
|
|
7259
|
-
if (!(input.error instanceof
|
|
7266
|
+
if (!(input.error instanceof _chunkBBTKAASQjs.DeeplineError) || input.error.statusCode !== 404 || !/^no artifact-backed revision found for play:/i.test(
|
|
7260
7267
|
input.error.message.trim()
|
|
7261
7268
|
)) {
|
|
7262
7269
|
return false;
|
|
@@ -7494,6 +7501,15 @@ function sourceGraphMentionsRunPlay(node) {
|
|
|
7494
7501
|
(source) => runPlayCallPattern.test(source)
|
|
7495
7502
|
);
|
|
7496
7503
|
}
|
|
7504
|
+
function mayBindBareFileName(node, runtimeInput) {
|
|
7505
|
+
const declaresCsvInput = [
|
|
7506
|
+
node.sourceCode,
|
|
7507
|
+
...Object.values(node.sourceFiles)
|
|
7508
|
+
].some((source) => /\bCsvInput\b/.test(source));
|
|
7509
|
+
return declaresCsvInput && Object.values(runtimeInput).some(
|
|
7510
|
+
(value) => typeof value === "string" && value.trim() !== "" && !isUrlValue(value)
|
|
7511
|
+
);
|
|
7512
|
+
}
|
|
7497
7513
|
function isUrlValue(value) {
|
|
7498
7514
|
return /^[a-z][a-z0-9+.-]*:\/\//i.test(value.trim());
|
|
7499
7515
|
}
|
|
@@ -7510,7 +7526,7 @@ function collectLocalFileInputRefs(value, inputPath, key, out) {
|
|
|
7510
7526
|
if (!trimmed || isUrlValue(trimmed)) {
|
|
7511
7527
|
return;
|
|
7512
7528
|
}
|
|
7513
|
-
const keyIsCsvData = key ===
|
|
7529
|
+
const keyIsCsvData = key === _chunkCQDQNZGHjs.CSV_DATA_INPUT_KEY;
|
|
7514
7530
|
const endsWithCsv = /\.csv$/i.test(trimmed);
|
|
7515
7531
|
const looksLikeFile = /\.[a-z0-9]{1,8}$/i.test(trimmed);
|
|
7516
7532
|
if (keyIsCsvData) {
|
|
@@ -7541,14 +7557,14 @@ function collectLocalFileInputRefs(value, inputPath, key, out) {
|
|
|
7541
7557
|
}
|
|
7542
7558
|
}
|
|
7543
7559
|
function preflightLocalFileInputs(runtimeInput) {
|
|
7544
|
-
if (
|
|
7545
|
-
const csvValue = runtimeInput[
|
|
7560
|
+
if (_chunkCQDQNZGHjs.CSV_DATA_INPUT_KEY in runtimeInput) {
|
|
7561
|
+
const csvValue = runtimeInput[_chunkCQDQNZGHjs.CSV_DATA_INPUT_KEY];
|
|
7546
7562
|
if (typeof csvValue === "string" && csvValue.trim().length === 0) {
|
|
7547
|
-
throw new (0,
|
|
7548
|
-
`Input ${
|
|
7563
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
7564
|
+
`Input ${_chunkCQDQNZGHjs.CSV_DATA_INPUT_KEY} is an empty string. Provide a path to a CSV file (or a CSV URL). No run was created.`,
|
|
7549
7565
|
void 0,
|
|
7550
7566
|
"PLAY_INPUT_FILE_PREFLIGHT",
|
|
7551
|
-
{ inputPath:
|
|
7567
|
+
{ inputPath: _chunkCQDQNZGHjs.CSV_DATA_INPUT_KEY, reason: "csv_empty_string" }
|
|
7552
7568
|
);
|
|
7553
7569
|
}
|
|
7554
7570
|
}
|
|
@@ -7559,7 +7575,7 @@ function preflightLocalFileInputs(runtimeInput) {
|
|
|
7559
7575
|
for (const ref of refs) {
|
|
7560
7576
|
const absolutePath = _path.resolve.call(void 0, ref.value);
|
|
7561
7577
|
if (!_fs.existsSync.call(void 0, absolutePath)) {
|
|
7562
|
-
throw new (0,
|
|
7578
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
7563
7579
|
`Input ${ref.inputPath} references a local file that does not exist: ${ref.value} (resolved to ${absolutePath}). No run was created.`,
|
|
7564
7580
|
void 0,
|
|
7565
7581
|
"PLAY_INPUT_FILE_PREFLIGHT",
|
|
@@ -7570,7 +7586,7 @@ function preflightLocalFileInputs(runtimeInput) {
|
|
|
7570
7586
|
try {
|
|
7571
7587
|
stat2 = _fs.statSync.call(void 0, absolutePath);
|
|
7572
7588
|
} catch (error) {
|
|
7573
|
-
throw new (0,
|
|
7589
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
7574
7590
|
`Input ${ref.inputPath} references a local file that is not readable: ${ref.value} (${error instanceof Error ? error.message : String(error)}). No run was created.`,
|
|
7575
7591
|
void 0,
|
|
7576
7592
|
"PLAY_INPUT_FILE_PREFLIGHT",
|
|
@@ -7578,7 +7594,7 @@ function preflightLocalFileInputs(runtimeInput) {
|
|
|
7578
7594
|
);
|
|
7579
7595
|
}
|
|
7580
7596
|
if (!stat2.isFile()) {
|
|
7581
|
-
throw new (0,
|
|
7597
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
7582
7598
|
`Input ${ref.inputPath} references ${ref.value}, which is not a file. No run was created.`,
|
|
7583
7599
|
void 0,
|
|
7584
7600
|
"PLAY_INPUT_FILE_PREFLIGHT",
|
|
@@ -7596,14 +7612,14 @@ function preflightCsvDataInput(ref, absolutePath) {
|
|
|
7596
7612
|
try {
|
|
7597
7613
|
content = _fs.readFileSync.call(void 0, absolutePath, "utf-8");
|
|
7598
7614
|
} catch (error) {
|
|
7599
|
-
throw new (0,
|
|
7615
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
7600
7616
|
`Input ${ref.inputPath} CSV ${ref.value} is not readable: ${error instanceof Error ? error.message : String(error)}. No run was created.`,
|
|
7601
7617
|
void 0,
|
|
7602
7618
|
"PLAY_INPUT_FILE_PREFLIGHT",
|
|
7603
7619
|
{ inputPath: ref.inputPath, path: ref.value }
|
|
7604
7620
|
);
|
|
7605
7621
|
}
|
|
7606
|
-
|
|
7622
|
+
_chunkCBV7AKWMjs.parseCsvDataInput.call(void 0, { inputPath: ref.inputPath, value: ref.value }, content);
|
|
7607
7623
|
}
|
|
7608
7624
|
function namedRunNeedsPlayDefinition(input) {
|
|
7609
7625
|
return input.revisionSelector === "latest" || inputContainsLocalFilePath(input.runtimeInput);
|
|
@@ -7615,12 +7631,17 @@ var NODE_STAGED_FILE_CODEC = {
|
|
|
7615
7631
|
)
|
|
7616
7632
|
};
|
|
7617
7633
|
async function stageFileInputArgs(input) {
|
|
7618
|
-
return
|
|
7634
|
+
return _chunkCQDQNZGHjs.stageFileInputs.call(void 0, {
|
|
7619
7635
|
stage: (files) => input.client.stagePlayFiles(files),
|
|
7620
7636
|
runtimeInput: input.runtimeInput,
|
|
7621
7637
|
bindings: input.bindings,
|
|
7622
7638
|
codec: NODE_STAGED_FILE_CODEC,
|
|
7623
|
-
resolveLocalFile: (value, binding) => resolveCliFileInput(
|
|
7639
|
+
resolveLocalFile: (value, binding) => resolveCliFileInput(
|
|
7640
|
+
value,
|
|
7641
|
+
binding,
|
|
7642
|
+
hostFileInputPathEnvironment(),
|
|
7643
|
+
input.packagedFiles
|
|
7644
|
+
),
|
|
7624
7645
|
onStaging: (fileCount) => input.progress.phase(
|
|
7625
7646
|
fileCount === 1 ? "staging input file" : "staging input files"
|
|
7626
7647
|
)
|
|
@@ -7632,7 +7653,7 @@ function stageFile(logicalPath, absolutePath) {
|
|
|
7632
7653
|
logicalPath,
|
|
7633
7654
|
contentBase64: buffer.toString("base64"),
|
|
7634
7655
|
contentHash: _crypto.createHash.call(void 0, "sha256").update(buffer).digest("hex"),
|
|
7635
|
-
contentType:
|
|
7656
|
+
contentType: _chunkCQDQNZGHjs.stagedFileContentType.call(void 0, absolutePath),
|
|
7636
7657
|
bytes: buffer.byteLength
|
|
7637
7658
|
};
|
|
7638
7659
|
}
|
|
@@ -7831,10 +7852,10 @@ function playStatusErrorText(status) {
|
|
|
7831
7852
|
function isRetryablePendingStartFailure(status) {
|
|
7832
7853
|
if (status.status !== "failed") return false;
|
|
7833
7854
|
if (status.runId && status.runId !== "pending") return false;
|
|
7834
|
-
return
|
|
7855
|
+
return _chunk2B4IOGFDjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
|
|
7835
7856
|
}
|
|
7836
7857
|
function isAmbiguousPlayStartOutcomeError(error) {
|
|
7837
|
-
if (error instanceof
|
|
7858
|
+
if (error instanceof _chunkBBTKAASQjs.DeeplineError && typeof error.statusCode === "number") {
|
|
7838
7859
|
return error.statusCode >= 500;
|
|
7839
7860
|
}
|
|
7840
7861
|
return true;
|
|
@@ -7857,14 +7878,14 @@ var RetryablePlayStartAttemptError = class extends Error {
|
|
|
7857
7878
|
this.name = "RetryablePlayStartAttemptError";
|
|
7858
7879
|
}
|
|
7859
7880
|
};
|
|
7860
|
-
var PlayStartOutcomeUnknownError = (_class = class extends
|
|
7881
|
+
var PlayStartOutcomeUnknownError = (_class = class extends _chunkBBTKAASQjs.DeeplineError {
|
|
7861
7882
|
__init() {this.retryable = false}
|
|
7862
7883
|
constructor(playName, cause, workflowId) {
|
|
7863
7884
|
const causeMessage = cause instanceof Error ? cause.message : String(cause);
|
|
7864
7885
|
const recoveryCommand = workflowId ? `deepline runs get ${_chunkAID3OYVJjs.shellQuote.call(void 0, workflowId)} --json` : `deepline runs list --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)} --json`;
|
|
7865
7886
|
super(
|
|
7866
7887
|
`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}`,
|
|
7867
|
-
cause instanceof
|
|
7888
|
+
cause instanceof _chunkBBTKAASQjs.DeeplineError ? cause.statusCode : void 0,
|
|
7868
7889
|
"PLAY_START_OUTCOME_UNKNOWN",
|
|
7869
7890
|
{
|
|
7870
7891
|
outcome: "unknown",
|
|
@@ -7881,13 +7902,13 @@ var PlayStartOutcomeUnknownError = (_class = class extends _chunkSQWET4SLjs.Deep
|
|
|
7881
7902
|
}, _class);
|
|
7882
7903
|
function watchSurfaceReaches(state, provenance, level) {
|
|
7883
7904
|
const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
|
|
7884
|
-
if (!
|
|
7905
|
+
if (!_chunk2B4IOGFDjs.logLevelReaches.call(void 0, level, minimumLevel)) {
|
|
7885
7906
|
return false;
|
|
7886
7907
|
}
|
|
7887
|
-
if (
|
|
7908
|
+
if (_chunk2B4IOGFDjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
|
|
7888
7909
|
return true;
|
|
7889
7910
|
}
|
|
7890
|
-
return state.verbose === true &&
|
|
7911
|
+
return state.verbose === true && _chunk2B4IOGFDjs.logProvenanceReaches.call(void 0, provenance, "debug");
|
|
7891
7912
|
}
|
|
7892
7913
|
function getEventPayload(event) {
|
|
7893
7914
|
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
@@ -8397,7 +8418,7 @@ function resolvePlayRunUrl(input) {
|
|
|
8397
8418
|
}
|
|
8398
8419
|
function openPlayDashboard(url, open2) {
|
|
8399
8420
|
if (open2 && url) {
|
|
8400
|
-
|
|
8421
|
+
_chunkLN6RXDTBjs.openInBrowser.call(void 0, url);
|
|
8401
8422
|
}
|
|
8402
8423
|
}
|
|
8403
8424
|
function printPlayLogLines(input) {
|
|
@@ -8414,7 +8435,7 @@ function assertPlayWaitNotTimedOut(input) {
|
|
|
8414
8435
|
const hasRealRunId = input.workflowId.length > 0 && input.workflowId !== "pending";
|
|
8415
8436
|
const phaseSuffix = input.lastPhase && input.lastPhase.trim() ? ` (last observed phase: ${input.lastPhase.trim()})` : "";
|
|
8416
8437
|
const tailHint = hasRealRunId ? ` The CLI stopped waiting; it did not cancel the run. Check its current state with 'deepline runs get ${input.workflowId}', or reattach with 'deepline runs watch ${input.workflowId}'. Do not start another run just to retrieve results.` : ` No run id was received, so acceptance is unknown. Check recent runs with 'deepline runs list --play <play-name>' before submitting again.`;
|
|
8417
|
-
throw new (0,
|
|
8438
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
8418
8439
|
`Timed out waiting for play ${hasRealRunId ? input.workflowId : "<no run id>"} after ${Math.ceil(input.waitTimeoutMs / 1e3)}s${phaseSuffix}.${tailHint}`,
|
|
8419
8440
|
void 0,
|
|
8420
8441
|
"PLAY_WAIT_TIMEOUT",
|
|
@@ -8429,7 +8450,7 @@ function assertPlayWaitNotTimedOut(input) {
|
|
|
8429
8450
|
var RUN_WATCH_RETRY_INTERVAL_MS = 2e3;
|
|
8430
8451
|
var RUN_WATCH_ADMISSION_VISIBILITY_RETRY_INTERVAL_MS = 500;
|
|
8431
8452
|
function isAdmittedRunVisibilityDelay(error) {
|
|
8432
|
-
return error instanceof
|
|
8453
|
+
return error instanceof _chunkBBTKAASQjs.DeeplineError && error.statusCode === 404 && error.message.trim() === "Workflow run not found.";
|
|
8433
8454
|
}
|
|
8434
8455
|
async function waitForPlayCompletionByWatch(input) {
|
|
8435
8456
|
let lastPhase = null;
|
|
@@ -8478,7 +8499,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8478
8499
|
...input.fullJson === void 0 ? {} : { full: input.fullJson }
|
|
8479
8500
|
});
|
|
8480
8501
|
} catch (error) {
|
|
8481
|
-
if (
|
|
8502
|
+
if (_chunk2B4IOGFDjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
8482
8503
|
return null;
|
|
8483
8504
|
}
|
|
8484
8505
|
throw error;
|
|
@@ -8559,9 +8580,9 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8559
8580
|
signal: controller.signal,
|
|
8560
8581
|
deferLogs: !input.emitLogs,
|
|
8561
8582
|
omitTerminalLogs: !input.emitLogs,
|
|
8562
|
-
...
|
|
8583
|
+
..._chunkLDGZFDUBjs.isCliTraceEnabled.call(void 0, ) ? {
|
|
8563
8584
|
onPoll: (observation) => {
|
|
8564
|
-
|
|
8585
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
8565
8586
|
phase: "play_watch_poll",
|
|
8566
8587
|
workflowId: input.workflowId,
|
|
8567
8588
|
ms: observation.durationMs,
|
|
@@ -8575,7 +8596,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8575
8596
|
full: input.fullJson,
|
|
8576
8597
|
billing: false,
|
|
8577
8598
|
onStatus: async (status) => {
|
|
8578
|
-
|
|
8599
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
8579
8600
|
phase: "play_watch_terminal_status",
|
|
8580
8601
|
workflowId: input.workflowId,
|
|
8581
8602
|
full: input.fullJson === true
|
|
@@ -8616,7 +8637,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8616
8637
|
const terminal = await fetchTerminalStatus();
|
|
8617
8638
|
if (terminal) return terminal;
|
|
8618
8639
|
assertPlayWaitNotTimedOut({ ...input, lastPhase });
|
|
8619
|
-
throw new (0,
|
|
8640
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
8620
8641
|
`Run watch for ${input.workflowId} ended before a terminal status.`,
|
|
8621
8642
|
void 0,
|
|
8622
8643
|
"PLAY_WATCH_ENDED"
|
|
@@ -8664,7 +8685,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8664
8685
|
signal: controller.signal,
|
|
8665
8686
|
cliAdmission: useCliAdmission
|
|
8666
8687
|
});
|
|
8667
|
-
|
|
8688
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
8668
8689
|
phase: "cli.play_start_admission_attempt",
|
|
8669
8690
|
ms: Date.now() - postStartedAt,
|
|
8670
8691
|
ok: true,
|
|
@@ -8676,7 +8697,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8676
8697
|
});
|
|
8677
8698
|
break;
|
|
8678
8699
|
} catch (error) {
|
|
8679
|
-
|
|
8700
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
8680
8701
|
phase: "cli.play_start_admission_attempt",
|
|
8681
8702
|
ms: Date.now() - postStartedAt,
|
|
8682
8703
|
ok: false,
|
|
@@ -8698,7 +8719,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8698
8719
|
prepared.workflowId
|
|
8699
8720
|
);
|
|
8700
8721
|
}
|
|
8701
|
-
if (callerIntentV2 && error instanceof
|
|
8722
|
+
if (callerIntentV2 && error instanceof _chunkCQDQNZGHjs.CliPlayAdmissionCallerIntentV2UnsupportedError) {
|
|
8702
8723
|
if (currentAttempt > 1) {
|
|
8703
8724
|
throw new PlayStartOutcomeUnknownError(
|
|
8704
8725
|
input.playName,
|
|
@@ -8719,7 +8740,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8719
8740
|
waitTimeoutMs: remaining === null ? null : Math.max(1, remaining)
|
|
8720
8741
|
});
|
|
8721
8742
|
}
|
|
8722
|
-
if (useCliAdmission && error instanceof
|
|
8743
|
+
if (useCliAdmission && error instanceof _chunkCQDQNZGHjs.CliPlayAdmissionUnsupportedError) {
|
|
8723
8744
|
if (currentAttempt > 1) {
|
|
8724
8745
|
throw new PlayStartOutcomeUnknownError(
|
|
8725
8746
|
input.playName,
|
|
@@ -8727,7 +8748,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8727
8748
|
prepared.workflowId
|
|
8728
8749
|
);
|
|
8729
8750
|
}
|
|
8730
|
-
await
|
|
8751
|
+
await _chunkZZ4MF2GIjs.checkPlayRunCompatibility.call(void 0,
|
|
8731
8752
|
input.client.baseUrl,
|
|
8732
8753
|
input.maintenancePolicy
|
|
8733
8754
|
);
|
|
@@ -8745,7 +8766,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8745
8766
|
`[play start] response was ambiguous; retrying the same caller intent (${error instanceof Error ? error.message : String(error)})`
|
|
8746
8767
|
);
|
|
8747
8768
|
}
|
|
8748
|
-
|
|
8769
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
8749
8770
|
phase: "cli.play_start_json_retry",
|
|
8750
8771
|
ms: 0,
|
|
8751
8772
|
ok: true,
|
|
@@ -8795,7 +8816,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8795
8816
|
}
|
|
8796
8817
|
const workflowId = started.workflowId;
|
|
8797
8818
|
if (!workflowId || workflowId === "pending") {
|
|
8798
|
-
throw new (0,
|
|
8819
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
8799
8820
|
"Play admission returned no run id. Check recent runs before submitting again.",
|
|
8800
8821
|
void 0,
|
|
8801
8822
|
"PLAY_START_MISSING_RUN_ID"
|
|
@@ -8825,7 +8846,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8825
8846
|
_nullishCoalesce(input.open, () => ( false))
|
|
8826
8847
|
);
|
|
8827
8848
|
input.progress.phase("running");
|
|
8828
|
-
|
|
8849
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
8829
8850
|
phase: "cli.play_start_admitted",
|
|
8830
8851
|
ms: Date.now() - startedAt,
|
|
8831
8852
|
ok: true,
|
|
@@ -8843,7 +8864,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8843
8864
|
startedAt,
|
|
8844
8865
|
waitTimeoutMs: input.waitTimeoutMs
|
|
8845
8866
|
});
|
|
8846
|
-
const initialStatus =
|
|
8867
|
+
const initialStatus = _chunk2B4IOGFDjs.normalizePlayStatus.call(void 0, initialTerminal);
|
|
8847
8868
|
const status2 = await resolvePlayRunOutputStatus({
|
|
8848
8869
|
client: input.client,
|
|
8849
8870
|
status: initialStatus,
|
|
@@ -8851,7 +8872,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8851
8872
|
jsonOutput: input.jsonOutput,
|
|
8852
8873
|
fromDurableStatus: true
|
|
8853
8874
|
});
|
|
8854
|
-
|
|
8875
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
8855
8876
|
phase: "play_watch_terminal_status",
|
|
8856
8877
|
workflowId,
|
|
8857
8878
|
full: true,
|
|
@@ -8942,7 +8963,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8942
8963
|
notice.value
|
|
8943
8964
|
);
|
|
8944
8965
|
} catch (error) {
|
|
8945
|
-
if (callerIntentV2 && error instanceof
|
|
8966
|
+
if (callerIntentV2 && error instanceof _chunkCQDQNZGHjs.CliPlayAdmissionCallerIntentV2UnsupportedError) {
|
|
8946
8967
|
const remaining = input.waitTimeoutMs === null ? null : input.waitTimeoutMs - (Date.now() - admissionStartedAt);
|
|
8947
8968
|
assertPlayWaitNotTimedOut({
|
|
8948
8969
|
workflowId: "",
|
|
@@ -8955,8 +8976,8 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8955
8976
|
waitTimeoutMs: remaining === null ? null : Math.max(1, remaining)
|
|
8956
8977
|
});
|
|
8957
8978
|
}
|
|
8958
|
-
if (error instanceof
|
|
8959
|
-
await
|
|
8979
|
+
if (error instanceof _chunkCQDQNZGHjs.CliPlayAdmissionUnsupportedError && input.cliAdmission) {
|
|
8980
|
+
await _chunkZZ4MF2GIjs.checkPlayRunCompatibility.call(void 0,
|
|
8960
8981
|
input.client.baseUrl,
|
|
8961
8982
|
input.maintenancePolicy,
|
|
8962
8983
|
admissionDeadline.signal
|
|
@@ -8983,7 +9004,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8983
9004
|
if (!(error instanceof RetryablePlayStartAttemptError)) throw error;
|
|
8984
9005
|
const retryDelayMs2 = retryDelays[attempt];
|
|
8985
9006
|
if (retryDelayMs2 === void 0) {
|
|
8986
|
-
throw new (0,
|
|
9007
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
8987
9008
|
`Play ${input.playName} did not start after retrying transient start failures.`,
|
|
8988
9009
|
void 0,
|
|
8989
9010
|
"PLAY_START_RETRY_EXHAUSTED",
|
|
@@ -8997,7 +9018,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8997
9018
|
`[play watch] start response was ambiguous; retrying the same caller intent (${error.message})`
|
|
8998
9019
|
);
|
|
8999
9020
|
}
|
|
9000
|
-
|
|
9021
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
9001
9022
|
phase: "cli.play_start_stream_retry",
|
|
9002
9023
|
ms: 0,
|
|
9003
9024
|
ok: true,
|
|
@@ -9018,7 +9039,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
9018
9039
|
`[play watch] start failed before run id with a transient error; retrying (${playStatusErrorText(status)})`
|
|
9019
9040
|
);
|
|
9020
9041
|
}
|
|
9021
|
-
|
|
9042
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
9022
9043
|
phase: "cli.play_start_stream_retry",
|
|
9023
9044
|
ms: 0,
|
|
9024
9045
|
ok: true,
|
|
@@ -9028,7 +9049,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
9028
9049
|
});
|
|
9029
9050
|
await sleepOrAbort(retryDelayMs, admissionDeadline.signal);
|
|
9030
9051
|
}
|
|
9031
|
-
throw new (0,
|
|
9052
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
9032
9053
|
`Play ${input.playName} did not start after retrying transient start failures.`,
|
|
9033
9054
|
void 0,
|
|
9034
9055
|
"PLAY_START_RETRY_EXHAUSTED"
|
|
@@ -9075,7 +9096,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9075
9096
|
if (launchConfirmed || !runId || runId === "pending") return;
|
|
9076
9097
|
launchConfirmed = true;
|
|
9077
9098
|
await _optionalChain([input, 'access', _314 => _314.onRunAdmitted, 'optionalCall', _315 => _315(runId)]);
|
|
9078
|
-
|
|
9099
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
9079
9100
|
phase: "cli.play_start_admitted",
|
|
9080
9101
|
ms: Date.now() - startedAt,
|
|
9081
9102
|
ok: true,
|
|
@@ -9109,7 +9130,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9109
9130
|
full: input.fullJson
|
|
9110
9131
|
});
|
|
9111
9132
|
} catch (error) {
|
|
9112
|
-
if (
|
|
9133
|
+
if (_chunk2B4IOGFDjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
9113
9134
|
return null;
|
|
9114
9135
|
}
|
|
9115
9136
|
throw error;
|
|
@@ -9251,7 +9272,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9251
9272
|
let fromDurableStatus = reuseFullTerminal;
|
|
9252
9273
|
let canonicalTerminal;
|
|
9253
9274
|
const streamedTerminalPackage = getPlayRunPackage(finalStatus);
|
|
9254
|
-
const streamedTerminalPlayRunPackage =
|
|
9275
|
+
const streamedTerminalPlayRunPackage = _chunkCQDQNZGHjs.isPlayRunPackage.call(void 0,
|
|
9255
9276
|
streamedTerminalPackage
|
|
9256
9277
|
) ? streamedTerminalPackage : null;
|
|
9257
9278
|
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);
|
|
@@ -9280,7 +9301,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9280
9301
|
};
|
|
9281
9302
|
}
|
|
9282
9303
|
if (!canonicalTerminal) {
|
|
9283
|
-
|
|
9304
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
9284
9305
|
phase: "cli.play_start_stream_stale_terminal_ignored",
|
|
9285
9306
|
ms: Date.now() - startedAt,
|
|
9286
9307
|
ok: true,
|
|
@@ -9301,14 +9322,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9301
9322
|
fromDurableStatus
|
|
9302
9323
|
}) : canonicalTerminal;
|
|
9303
9324
|
if (input.fullJson === true) {
|
|
9304
|
-
|
|
9325
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
9305
9326
|
phase: "play_watch_terminal_status",
|
|
9306
9327
|
workflowId: outputTerminal.runId || lastKnownWorkflowId || void 0,
|
|
9307
9328
|
full: true,
|
|
9308
9329
|
source: outputTerminal === canonicalTerminal ? fromDurableStatus ? "start_stream_durable" : "start_stream" : "durable_repair"
|
|
9309
9330
|
});
|
|
9310
9331
|
}
|
|
9311
|
-
|
|
9332
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
9312
9333
|
phase: "cli.play_start_stream_terminal",
|
|
9313
9334
|
ms: Date.now() - startedAt,
|
|
9314
9335
|
ok: true,
|
|
@@ -9328,7 +9349,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9328
9349
|
clearTimeout(timeout);
|
|
9329
9350
|
}
|
|
9330
9351
|
controller.abort();
|
|
9331
|
-
|
|
9352
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
9332
9353
|
phase: "cli.play_start_stream_handoff_to_tail",
|
|
9333
9354
|
ms: Date.now() - startedAt,
|
|
9334
9355
|
ok: true,
|
|
@@ -9359,7 +9380,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9359
9380
|
if (timedOut) {
|
|
9360
9381
|
const terminal = await fetchKnownTerminalStatus();
|
|
9361
9382
|
if (terminal) {
|
|
9362
|
-
|
|
9383
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
9363
9384
|
phase: "cli.play_start_stream_timeout_status_reconcile",
|
|
9364
9385
|
ms: Date.now() - startedAt,
|
|
9365
9386
|
ok: true,
|
|
@@ -9379,7 +9400,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9379
9400
|
lastPhase
|
|
9380
9401
|
});
|
|
9381
9402
|
}
|
|
9382
|
-
if (lastKnownWorkflowId && (terminalWindowExpired ||
|
|
9403
|
+
if (lastKnownWorkflowId && (terminalWindowExpired || _chunk2B4IOGFDjs.isTransientPlayRunReadError.call(void 0, error))) {
|
|
9383
9404
|
if (timeout) {
|
|
9384
9405
|
clearTimeout(timeout);
|
|
9385
9406
|
}
|
|
@@ -9390,7 +9411,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9390
9411
|
`
|
|
9391
9412
|
);
|
|
9392
9413
|
}
|
|
9393
|
-
|
|
9414
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
9394
9415
|
phase: "cli.play_start_stream_reconnect",
|
|
9395
9416
|
ms: Date.now() - startedAt,
|
|
9396
9417
|
ok: true,
|
|
@@ -9417,7 +9438,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9417
9438
|
});
|
|
9418
9439
|
}
|
|
9419
9440
|
if (!lastKnownWorkflowId && isAmbiguousPlayStartOutcomeError(error)) {
|
|
9420
|
-
|
|
9441
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
9421
9442
|
phase: "cli.play_start_stream_transient_failure",
|
|
9422
9443
|
ms: Date.now() - startedAt,
|
|
9423
9444
|
ok: false,
|
|
@@ -9445,7 +9466,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9445
9466
|
`[play watch] start stream ended after run ${lastKnownWorkflowId}; reconnecting to canonical run stream`
|
|
9446
9467
|
);
|
|
9447
9468
|
}
|
|
9448
|
-
|
|
9469
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
9449
9470
|
phase: "cli.play_start_stream_reconnect",
|
|
9450
9471
|
ms: Date.now() - startedAt,
|
|
9451
9472
|
ok: true,
|
|
@@ -9474,7 +9495,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9474
9495
|
}
|
|
9475
9496
|
const phaseSuffix = lastPhase && lastPhase.trim() ? ` (last observed phase: ${lastPhase.trim()})` : "";
|
|
9476
9497
|
const idSuffix = lastKnownWorkflowId ? ` runId=${lastKnownWorkflowId}` : "";
|
|
9477
|
-
const endedBeforeConfirmation = new (0,
|
|
9498
|
+
const endedBeforeConfirmation = new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
9478
9499
|
`Play start request ended before terminal status was observed${idSuffix}${phaseSuffix}.`,
|
|
9479
9500
|
void 0,
|
|
9480
9501
|
"PLAY_START_STREAM_ENDED",
|
|
@@ -9525,7 +9546,7 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
|
|
|
9525
9546
|
"logs"
|
|
9526
9547
|
]);
|
|
9527
9548
|
function formatPlayLogLine(rawLine, state) {
|
|
9528
|
-
const classified =
|
|
9549
|
+
const classified = _chunk2B4IOGFDjs.classifyLogLine.call(void 0, rawLine);
|
|
9529
9550
|
const line = classified.line;
|
|
9530
9551
|
const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
|
|
9531
9552
|
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _337 => _337[1]]) ? new Date(timestampMatch[1]) : null;
|
|
@@ -9540,14 +9561,14 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
9540
9561
|
if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
|
|
9541
9562
|
const providerWait = formatProviderCapacityWaitLogLine(line);
|
|
9542
9563
|
if (providerWait && !state.verbose) {
|
|
9543
|
-
return
|
|
9564
|
+
return _chunk2B4IOGFDjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
|
|
9544
9565
|
}
|
|
9545
9566
|
const mapProgress = formatMapProgressDiagnosticLogLine(line);
|
|
9546
9567
|
if (mapProgress && !state.verbose) {
|
|
9547
|
-
return
|
|
9568
|
+
return _chunk2B4IOGFDjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
|
|
9548
9569
|
}
|
|
9549
9570
|
if (/\[worker\] picked up run\b/.test(message)) {
|
|
9550
|
-
if (!
|
|
9571
|
+
if (!_chunk2B4IOGFDjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9551
9572
|
return null;
|
|
9552
9573
|
}
|
|
9553
9574
|
if (state.emittedRunnerStarted) {
|
|
@@ -9560,21 +9581,21 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
9560
9581
|
/^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
|
|
9561
9582
|
);
|
|
9562
9583
|
if (mapStart) {
|
|
9563
|
-
if (!
|
|
9584
|
+
if (!_chunk2B4IOGFDjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9564
9585
|
return null;
|
|
9565
9586
|
}
|
|
9566
9587
|
const [, rows, fields2, namespace, cached, pending] = mapStart;
|
|
9567
|
-
return `${prefix}map ${namespace}: ${formatInteger(Number(rows))} rows, ${fields2} fields, ${formatInteger(Number(cached))}
|
|
9588
|
+
return `${prefix}map ${namespace}: ${formatInteger(Number(rows))} rows, ${fields2} fields, ${formatInteger(Number(cached))} rows already satisfied, ${formatInteger(Number(pending))} pending`;
|
|
9568
9589
|
}
|
|
9569
9590
|
const mapDone = message.match(
|
|
9570
9591
|
/^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
|
|
9571
9592
|
);
|
|
9572
9593
|
if (mapDone) {
|
|
9573
|
-
if (!
|
|
9594
|
+
if (!_chunk2B4IOGFDjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9574
9595
|
return null;
|
|
9575
9596
|
}
|
|
9576
9597
|
const [, results, executed, cached] = mapDone;
|
|
9577
|
-
return `${prefix}done: ${formatInteger(Number(results))} results, ${formatInteger(Number(executed))} executed, ${formatInteger(Number(cached))}
|
|
9598
|
+
return `${prefix}done: ${formatInteger(Number(results))} results, ${formatInteger(Number(executed))} executed, ${formatInteger(Number(cached))} rows already satisfied`;
|
|
9578
9599
|
}
|
|
9579
9600
|
if (!watchSurfaceReaches(state, classified.provenance, classified.level)) {
|
|
9580
9601
|
return null;
|
|
@@ -9990,7 +10011,7 @@ function buildInsufficientCreditsSummaryLines(input) {
|
|
|
9990
10011
|
const lines = [
|
|
9991
10012
|
" status: stopped_insufficient_credits",
|
|
9992
10013
|
completed === null ? " completed rows: unknown" : ` completed rows: ${formatInteger(completed)}${total !== null ? ` of ${formatInteger(total)}` : ""}`,
|
|
9993
|
-
"
|
|
10014
|
+
" saved work: resume this run after adding credits to recover matching completed operations; unfinished work can incur charges"
|
|
9994
10015
|
];
|
|
9995
10016
|
const billingUrl = getStringField(input.billing, "billing_url");
|
|
9996
10017
|
const recommended = formatCreditAmount2(
|
|
@@ -10494,7 +10515,7 @@ function formatRunStepProgress(progress, includeRowOutcomes = false) {
|
|
|
10494
10515
|
executed === null ? `executed unknown${!includeRowOutcomes || total === null ? "" : ` (${formatInteger(total)} total)`}` : `${formatInteger(executed)}${total === null ? "" : `/${formatInteger(total)}`} executed`
|
|
10495
10516
|
];
|
|
10496
10517
|
for (const [key, label] of [
|
|
10497
|
-
["reused", "reused"],
|
|
10518
|
+
["reused", "duplicate rows reused"],
|
|
10498
10519
|
["skipped", "skipped"],
|
|
10499
10520
|
["pending", "remaining"],
|
|
10500
10521
|
["activeRows", "rows processing"],
|
|
@@ -10547,7 +10568,7 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10547
10568
|
} else if (includeSummary) {
|
|
10548
10569
|
if (category === "recovered" && Object.keys(actions2).length === 0) {
|
|
10549
10570
|
lines.push(
|
|
10550
|
-
` dataset ${path}: available, ${rowCount === null ? "
|
|
10571
|
+
` dataset ${path}: available, ${rowCount === null ? "unknown number of" : formatInteger(rowCount)} rows persisted; inspect or export before resuming unfinished work`
|
|
10551
10572
|
);
|
|
10552
10573
|
} else {
|
|
10553
10574
|
lines.push(
|
|
@@ -10598,15 +10619,29 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10598
10619
|
return lines;
|
|
10599
10620
|
}
|
|
10600
10621
|
function packageSavedRowCount(packaged) {
|
|
10601
|
-
const
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10622
|
+
const datasets = packageDatasetRecords(packaged);
|
|
10623
|
+
if (datasets.length === 0) return null;
|
|
10624
|
+
let total = 0;
|
|
10625
|
+
for (const dataset of datasets) {
|
|
10626
|
+
const rowCount = readNonNegativeInteger(dataset.rowCount);
|
|
10627
|
+
if (rowCount === null || _optionalChain([readRecord, 'call', _385 => _385(dataset.lifecycle), 'optionalAccess', _386 => _386.complete]) === false)
|
|
10628
|
+
return null;
|
|
10629
|
+
total += rowCount;
|
|
10630
|
+
}
|
|
10631
|
+
return total;
|
|
10632
|
+
}
|
|
10633
|
+
function formatRunRecoveryCommandLines(runId, status) {
|
|
10634
|
+
if (!["failed", "cancelled"].includes(status) || !runId || runId === "unknown")
|
|
10635
|
+
return [];
|
|
10636
|
+
return [
|
|
10637
|
+
` Resume same run (recommended, if eligible): deepline runs resume ${_chunkAID3OYVJjs.shellQuote.call(void 0, runId)}`,
|
|
10638
|
+
` Start over instead (new run; may repeat paid calls): deepline plays run --from-run ${_chunkAID3OYVJjs.shellQuote.call(void 0, runId)}`,
|
|
10639
|
+
"Resume can reuse matching saved operations, even with staleAfterSeconds: 0. New runs reuse matching cached results within staleAfterSeconds (0 means fresh). Fresh, missing, or unrecorded calls may charge again."
|
|
10640
|
+
];
|
|
10606
10641
|
}
|
|
10607
10642
|
function runtimeLimitWindowLabel(runtimeLimitFailure) {
|
|
10608
10643
|
const message = _nullishCoalesce(getStringField(runtimeLimitFailure, "message"), () => ( ""));
|
|
10609
|
-
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access',
|
|
10644
|
+
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _387 => _387.exec, 'call', _388 => _388(message), 'optionalAccess', _389 => _389[1]]);
|
|
10610
10645
|
if (configuredSeconds) {
|
|
10611
10646
|
const seconds = Number(configuredSeconds);
|
|
10612
10647
|
if (Number.isSafeInteger(seconds) && seconds > 0) {
|
|
@@ -10625,22 +10660,12 @@ function runtimeLimitWindowLabel(runtimeLimitFailure) {
|
|
|
10625
10660
|
function runtimeLimitCheckpointLines(packaged, runId, runtimeLimitFailure) {
|
|
10626
10661
|
const savedRows = packageSavedRowCount(packaged);
|
|
10627
10662
|
const lines = [
|
|
10628
|
-
`\
|
|
10629
|
-
""
|
|
10630
|
-
`The Play reached its ${runtimeLimitWindowLabel(runtimeLimitFailure)} runtime window.`
|
|
10663
|
+
`\u2717 runtime limit reached (${runtimeLimitWindowLabel(runtimeLimitFailure)}) ${runId}`,
|
|
10664
|
+
`Saved Dataset rows: ${savedRows === null ? "unknown" : formatInteger(savedRows)}`
|
|
10631
10665
|
];
|
|
10632
|
-
if (
|
|
10633
|
-
lines.push("
|
|
10634
|
-
} else {
|
|
10635
|
-
lines.push(
|
|
10636
|
-
`${formatInteger(savedRows)} ${savedRows === 1 ? "row was" : "rows were"} saved successfully.`
|
|
10637
|
-
);
|
|
10666
|
+
if (packageDatasetRecords(packaged).length === 0 && formatPackageValueOutputLines(packaged).length === 0) {
|
|
10667
|
+
lines.push("Rows kept only in memory were not published.");
|
|
10638
10668
|
}
|
|
10639
|
-
lines.push(
|
|
10640
|
-
"",
|
|
10641
|
-
"Run the same Play again to continue where you left off.",
|
|
10642
|
-
"Completed work will be reused automatically."
|
|
10643
|
-
);
|
|
10644
10669
|
return lines;
|
|
10645
10670
|
}
|
|
10646
10671
|
function formatInlinePackageValue(value) {
|
|
@@ -10653,7 +10678,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10653
10678
|
if (!outputs) return [];
|
|
10654
10679
|
const returned = Object.entries(outputs).filter(([, output]) => {
|
|
10655
10680
|
const record4 = readRecord(output);
|
|
10656
|
-
return _optionalChain([record4, 'optionalAccess',
|
|
10681
|
+
return _optionalChain([record4, 'optionalAccess', _390 => _390.kind]) === "dataset" || _optionalChain([record4, 'optionalAccess', _391 => _391.kind]) === "value" && Object.prototype.hasOwnProperty.call(record4, "value");
|
|
10657
10682
|
});
|
|
10658
10683
|
if (returned.length === 0) return [];
|
|
10659
10684
|
const datasets = packageDatasetRecords(packaged);
|
|
@@ -10673,10 +10698,10 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10673
10698
|
(candidate) => typeof output.datasetId === "string" && candidate.datasetId === output.datasetId || candidate.path === path
|
|
10674
10699
|
);
|
|
10675
10700
|
const stepOutput = datasetSteps.map((step) => readRecord(step.output)).find(
|
|
10676
|
-
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess',
|
|
10701
|
+
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _392 => _392.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _393 => _393.path]) === path
|
|
10677
10702
|
);
|
|
10678
|
-
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess',
|
|
10679
|
-
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
10703
|
+
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _394 => _394.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _395 => _395.preview]))));
|
|
10704
|
+
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _396 => _396.rows])) ? preview.rows.slice(0, 2) : [];
|
|
10680
10705
|
if (rows.length > 0) {
|
|
10681
10706
|
lines.push(` sample rows (${rows.length}):`);
|
|
10682
10707
|
lines.push(
|
|
@@ -10702,7 +10727,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10702
10727
|
return lines;
|
|
10703
10728
|
}
|
|
10704
10729
|
function authoredPackageStackFrames(packaged) {
|
|
10705
|
-
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess',
|
|
10730
|
+
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _397 => _397.trim, 'call', _398 => _398()])));
|
|
10706
10731
|
if (!stack) return [];
|
|
10707
10732
|
return stack.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).filter(
|
|
10708
10733
|
(line) => !line.includes("/virtual/deepline-plays/") && !line.includes("/apps/play-runner/") && !line.includes("/shared_libs/play-runtime/") && !line.includes("node:internal")
|
|
@@ -10734,9 +10759,9 @@ function activityIsoTimestamp(value) {
|
|
|
10734
10759
|
}
|
|
10735
10760
|
function buildRunActivityTextLines(run) {
|
|
10736
10761
|
const activity = readRecord(run.activity);
|
|
10737
|
-
const observation = readRecord(_optionalChain([activity, 'optionalAccess',
|
|
10738
|
-
const state = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
10739
|
-
const target = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
10762
|
+
const observation = readRecord(_optionalChain([activity, 'optionalAccess', _399 => _399.observation]));
|
|
10763
|
+
const state = readRecord(_optionalChain([observation, 'optionalAccess', _400 => _400.state]));
|
|
10764
|
+
const target = readRecord(_optionalChain([observation, 'optionalAccess', _401 => _401.target]));
|
|
10740
10765
|
if (!activity || !observation || !state) return [];
|
|
10741
10766
|
const kind = typeof state.kind === "string" ? state.kind : "unknown";
|
|
10742
10767
|
if (kind === "completed") return [];
|
|
@@ -10781,11 +10806,11 @@ function buildRunActivityTextLines(run) {
|
|
|
10781
10806
|
}
|
|
10782
10807
|
function formatObservedRunCounter(value) {
|
|
10783
10808
|
const counter = readRecord(value);
|
|
10784
|
-
const count2 = _optionalChain([counter, 'optionalAccess',
|
|
10809
|
+
const count2 = _optionalChain([counter, 'optionalAccess', _402 => _402.value]);
|
|
10785
10810
|
if (typeof count2 !== "number" || !Number.isSafeInteger(count2) || count2 < 0) {
|
|
10786
10811
|
return "unknown";
|
|
10787
10812
|
}
|
|
10788
|
-
return _optionalChain([counter, 'optionalAccess',
|
|
10813
|
+
return _optionalChain([counter, 'optionalAccess', _403 => _403.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
|
|
10789
10814
|
}
|
|
10790
10815
|
function buildRunStatusEvidenceTextLines(packaged) {
|
|
10791
10816
|
const evidence = readRecord(packaged.runStatus);
|
|
@@ -10798,13 +10823,13 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10798
10823
|
);
|
|
10799
10824
|
}
|
|
10800
10825
|
const source = readRecord(evidence.source);
|
|
10801
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
10826
|
+
if (_optionalChain([source, 'optionalAccess', _404 => _404.aligned]) === false) {
|
|
10802
10827
|
lines.push(
|
|
10803
10828
|
` consistency: run snapshot event ${String(source.runSnapshotLedgerNextSeq)} and progress event ${String(source.ledgerNextSeq)} differ; retry this read to align them`
|
|
10804
10829
|
);
|
|
10805
10830
|
}
|
|
10806
10831
|
const focus = readRecord(evidence.focusStep);
|
|
10807
|
-
const rows = readRecord(_optionalChain([focus, 'optionalAccess',
|
|
10832
|
+
const rows = readRecord(_optionalChain([focus, 'optionalAccess', _405 => _405.rows]));
|
|
10808
10833
|
if (focus) {
|
|
10809
10834
|
const id = typeof focus.id === "string" && focus.id.trim() ? focus.id.trim() : "unknown step";
|
|
10810
10835
|
const label = typeof focus.label === "string" && focus.label.trim() ? ` (${focus.label.trim()})` : "";
|
|
@@ -10812,7 +10837,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10812
10837
|
const known = readRecordArray(packaged.steps).find(
|
|
10813
10838
|
(step) => typeof step.id === "string" && (id === step.id || id.endsWith(`:${step.id}`)) && typeof step.label === "string"
|
|
10814
10839
|
);
|
|
10815
|
-
const state = typeof _optionalChain([known, 'optionalAccess',
|
|
10840
|
+
const state = typeof _optionalChain([known, 'optionalAccess', _406 => _406.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
|
|
10816
10841
|
deriveNodeExecutionState({
|
|
10817
10842
|
reported: {
|
|
10818
10843
|
status: focus.status.trim(),
|
|
@@ -10822,7 +10847,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10822
10847
|
total: rows.total
|
|
10823
10848
|
} : null
|
|
10824
10849
|
},
|
|
10825
|
-
runStatus: _optionalChain([run, 'optionalAccess',
|
|
10850
|
+
runStatus: _optionalChain([run, 'optionalAccess', _407 => _407.status])
|
|
10826
10851
|
})
|
|
10827
10852
|
) : null;
|
|
10828
10853
|
lines.push(` current step: ${id}${label}${state ? `: ${state}` : ""}`);
|
|
@@ -10870,7 +10895,7 @@ function formatRecentRunLogLines(value) {
|
|
|
10870
10895
|
(line) => typeof line === "string"
|
|
10871
10896
|
);
|
|
10872
10897
|
if (tail.length === 0) return [];
|
|
10873
|
-
const shown = tail.map((line) =>
|
|
10898
|
+
const shown = tail.map((line) => _chunk2B4IOGFDjs.classifyLogLine.call(void 0, line)).filter(
|
|
10874
10899
|
(entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
|
|
10875
10900
|
).slice(-8);
|
|
10876
10901
|
const total = readNonNegativeInteger(logs.totalCount);
|
|
@@ -10914,7 +10939,7 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10914
10939
|
lines.push(` recovery: ${mode}${sourceRunId}`);
|
|
10915
10940
|
}
|
|
10916
10941
|
const runError = typeof run.error === "string" && run.error.trim() ? run.error.trim() : null;
|
|
10917
|
-
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess',
|
|
10942
|
+
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _408 => _408.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
|
|
10918
10943
|
const displayRunError = _nullishCoalesce(structuredRuntimeLimitMessage, () => ( runError));
|
|
10919
10944
|
if (!isRuntimeLimitCheckpoint && displayRunError && (status === "failed" || status === "cancelled")) {
|
|
10920
10945
|
lines.push(` error: ${truncateErrorForDisplay(displayRunError, runId)}`);
|
|
@@ -10925,11 +10950,11 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10925
10950
|
}
|
|
10926
10951
|
}
|
|
10927
10952
|
const failedLogs = readRecord(packaged.failedLogs);
|
|
10928
|
-
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess',
|
|
10953
|
+
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _409 => _409.entries])) ? failedLogs.entries.filter(
|
|
10929
10954
|
(entry) => typeof entry === "string"
|
|
10930
10955
|
) : [];
|
|
10931
|
-
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
10932
|
-
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
10956
|
+
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _410 => _410.association]) === "string" ? failedLogs.association : null;
|
|
10957
|
+
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _411 => _411.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
|
|
10933
10958
|
if (failedLogEntries.length > 0) {
|
|
10934
10959
|
lines.push(" failed logs:");
|
|
10935
10960
|
lines.push(...failedLogEntries.map((entry) => ` ${entry}`));
|
|
@@ -10948,8 +10973,8 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10948
10973
|
)
|
|
10949
10974
|
).slice(0, 16) : [];
|
|
10950
10975
|
lines.push(...packageWarnings.map((warning) => ` warning: ${warning}`));
|
|
10951
|
-
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess',
|
|
10952
|
-
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess',
|
|
10976
|
+
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _412 => _412.next]));
|
|
10977
|
+
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _413 => _413.logs]) === "string") {
|
|
10953
10978
|
lines.push(
|
|
10954
10979
|
failedLogAssociation === "retained_before_truncation" ? ` retained logs: ${failedLogNext.logs}` : ` retry failed logs: ${failedLogNext.logs}`
|
|
10955
10980
|
);
|
|
@@ -10977,23 +11002,22 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10977
11002
|
const stepStatus = typeof step.status === "string" ? step.status : status;
|
|
10978
11003
|
const output = step.output && typeof step.output === "object" && !Array.isArray(step.output) ? step.output : null;
|
|
10979
11004
|
const rowCount = output && typeof output.rowCount === "number" ? ` rows=${formatInteger(output.rowCount)}` : "";
|
|
10980
|
-
const preview = _optionalChain([output, 'optionalAccess',
|
|
10981
|
-
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
11005
|
+
const preview = _optionalChain([output, 'optionalAccess', _414 => _414.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
|
|
11006
|
+
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _415 => _415.rows])) ? preview.rows.length : null;
|
|
10982
11007
|
lines.push(` ${kind} ${id}: ${stepStatus}${rowCount}`);
|
|
10983
|
-
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess',
|
|
11008
|
+
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _416 => _416.summary])));
|
|
10984
11009
|
if (previewRows !== null) {
|
|
10985
11010
|
lines.push(
|
|
10986
|
-
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess',
|
|
11011
|
+
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _417 => _417.truncated]) ? " truncated" : ""}`
|
|
10987
11012
|
);
|
|
10988
11013
|
}
|
|
10989
11014
|
}
|
|
10990
11015
|
const inspectCommand = actionToCommand(next.inspect);
|
|
10991
11016
|
const fullResultCommand = actionToCommand(next.full);
|
|
10992
11017
|
const hasCatalogExportAction = packageDatasetRecords(packaged).some(
|
|
10993
|
-
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call',
|
|
11018
|
+
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _418 => _418(dataset.actions), 'optionalAccess', _419 => _419.exportCsv])))
|
|
10994
11019
|
);
|
|
10995
11020
|
const legacyExportCommand = hasCatalogExportAction ? null : actionToCommand(next.export);
|
|
10996
|
-
const runAgainCommand = typeof next.run === "string" && next.run.trim() ? next.run.trim() : null;
|
|
10997
11021
|
if (inspectCommand) lines.push(` inspect: ${inspectCommand}`);
|
|
10998
11022
|
if (fullResultCommand)
|
|
10999
11023
|
lines.push(
|
|
@@ -11003,9 +11027,11 @@ function buildRunPackageTextLines(packaged) {
|
|
|
11003
11027
|
if (legacyExportCommand) {
|
|
11004
11028
|
lines.push(` export CSV: ${legacyExportCommand}`);
|
|
11005
11029
|
}
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
lines.push(
|
|
11030
|
+
lines.push(...formatRunRecoveryCommandLines(runId, status));
|
|
11031
|
+
if (status === "failed" || status === "cancelled") {
|
|
11032
|
+
lines.push(
|
|
11033
|
+
"Dataset reuse counts do not measure all tool or child-Play reuse."
|
|
11034
|
+
);
|
|
11009
11035
|
}
|
|
11010
11036
|
return lines;
|
|
11011
11037
|
}
|
|
@@ -11055,7 +11081,7 @@ function withOrdinaryRunAgainCommand(status, options, resolvedRevisionId) {
|
|
|
11055
11081
|
}
|
|
11056
11082
|
function buildBillingRollupTextLines(status) {
|
|
11057
11083
|
const billing = status.billing;
|
|
11058
|
-
const rollup = _optionalChain([billing, 'optionalAccess',
|
|
11084
|
+
const rollup = _optionalChain([billing, 'optionalAccess', _420 => _420.rollup]);
|
|
11059
11085
|
if (!rollup) return [];
|
|
11060
11086
|
const total = formatCreditAmount2(rollup.totalCreditsRollup);
|
|
11061
11087
|
if (rollup.childCredits > 0 && rollup.descendantRunCount > 0) {
|
|
@@ -11074,7 +11100,7 @@ function buildBillingRollupTextLines(status) {
|
|
|
11074
11100
|
return [` cost: ${total} credits`];
|
|
11075
11101
|
}
|
|
11076
11102
|
function playRunRateLimitedNotice(status) {
|
|
11077
|
-
const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call',
|
|
11103
|
+
const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call', _421 => _421(status), 'optionalAccess', _422 => _422.rateLimited]), () => ( status.rateLimited));
|
|
11078
11104
|
return notice && typeof notice === "object" ? notice : null;
|
|
11079
11105
|
}
|
|
11080
11106
|
function withRateLimitedNotice(status, notice) {
|
|
@@ -11115,7 +11141,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11115
11141
|
const overview = buildRunOverview(status);
|
|
11116
11142
|
const { run } = overview;
|
|
11117
11143
|
const failed = run.status === "failed";
|
|
11118
|
-
const label = run.status === "completed" ? _optionalChain([overview, 'access',
|
|
11144
|
+
const label = run.status === "completed" ? _optionalChain([overview, 'access', _423 => _423.rowOutcomes, 'optionalAccess', _424 => _424.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
|
|
11119
11145
|
const rateLimited = playRunRateLimitedNotice(status);
|
|
11120
11146
|
const lines = [
|
|
11121
11147
|
...rateLimited ? [rateLimited.message] : [],
|
|
@@ -11131,7 +11157,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11131
11157
|
}
|
|
11132
11158
|
if (overview.errorDetails.run)
|
|
11133
11159
|
lines.push(
|
|
11134
|
-
`Error: ${truncateErrorForDisplay(overview.errorDetails.run, run.id)}`
|
|
11160
|
+
`Error: ${readRecordArray(overview.errorDetails.reported).some((failure) => failure.code === "RUNTIME_LIMIT_EXCEEDED") ? "Runtime limit reached." : truncateErrorForDisplay(overview.errorDetails.run, run.id)}`
|
|
11135
11161
|
);
|
|
11136
11162
|
if (Object.hasOwn(overview, "result")) {
|
|
11137
11163
|
lines.push(
|
|
@@ -11139,7 +11165,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11139
11165
|
...formatJsonPreview(compactReturnValue(overview.result))
|
|
11140
11166
|
);
|
|
11141
11167
|
}
|
|
11142
|
-
if (_optionalChain([overview, 'access',
|
|
11168
|
+
if (_optionalChain([overview, 'access', _425 => _425.rowOutcomes, 'optionalAccess', _426 => _426.hasRowFailures])) {
|
|
11143
11169
|
lines.push(
|
|
11144
11170
|
`Rows: ${overview.rowOutcomes.completedRows} completed, ${overview.rowOutcomes.failedRows} failed`
|
|
11145
11171
|
);
|
|
@@ -11162,23 +11188,29 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11162
11188
|
_nullishCoalesce(overview.actions.getLogsCmd, () => ( `deepline runs logs ${_chunkAID3OYVJjs.shellQuote.call(void 0, run.id)}`))
|
|
11163
11189
|
)}`
|
|
11164
11190
|
);
|
|
11165
|
-
if (failed &&
|
|
11166
|
-
lines.push(
|
|
11191
|
+
if (failed && overview.datasets.length === 0 && !Object.hasOwn(overview, "result")) {
|
|
11192
|
+
lines.push(
|
|
11193
|
+
"No Dataset output is listed. Rows kept only in memory were not published."
|
|
11194
|
+
);
|
|
11195
|
+
}
|
|
11196
|
+
if (failed || run.status === "cancelled") {
|
|
11197
|
+
lines.push(...formatRunRecoveryCommandLines(run.id, run.status));
|
|
11198
|
+
}
|
|
11167
11199
|
return lines;
|
|
11168
11200
|
}
|
|
11169
11201
|
function writePlayResult(status, jsonOutput, options) {
|
|
11170
11202
|
const packaged = getPlayRunPackage(status);
|
|
11171
|
-
if (status.package)
|
|
11172
|
-
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
11203
|
+
if (status.package) _chunkKWYGWO4Yjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
11204
|
+
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _427 => _427.hits]), () => ( null));
|
|
11173
11205
|
if (jsonOutput) {
|
|
11174
|
-
const payload2 = _optionalChain([options, 'optionalAccess',
|
|
11175
|
-
|
|
11206
|
+
const payload2 = _optionalChain([options, 'optionalAccess', _428 => _428.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
|
|
11207
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
11176
11208
|
hits ? { ...payload2, hits } : payload2,
|
|
11177
|
-
{ json: true, fields: _optionalChain([options, 'optionalAccess',
|
|
11209
|
+
{ json: true, fields: _optionalChain([options, 'optionalAccess', _429 => _429.jsonFields]) }
|
|
11178
11210
|
);
|
|
11179
11211
|
return;
|
|
11180
11212
|
}
|
|
11181
|
-
if (packaged && !_optionalChain([options, 'optionalAccess',
|
|
11213
|
+
if (packaged && !_optionalChain([options, 'optionalAccess', _430 => _430.fullJson])) {
|
|
11182
11214
|
const {
|
|
11183
11215
|
logs: _logs,
|
|
11184
11216
|
failedLogs: _failedLogs,
|
|
@@ -11188,7 +11220,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11188
11220
|
...buildPlayCompletionTextLines(status),
|
|
11189
11221
|
...formatRunHitsLines(hits)
|
|
11190
11222
|
];
|
|
11191
|
-
|
|
11223
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, displayPackage, {
|
|
11192
11224
|
json: false,
|
|
11193
11225
|
text: `${lines2.join("\n")}
|
|
11194
11226
|
`
|
|
@@ -11222,10 +11254,9 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11222
11254
|
);
|
|
11223
11255
|
if (status.status === "failed") {
|
|
11224
11256
|
lines.push(` failed logs: deepline runs logs ${runId} --failed`);
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
}
|
|
11257
|
+
}
|
|
11258
|
+
if (publicStatus === "failed" || publicStatus === "cancelled") {
|
|
11259
|
+
lines.push(...formatRunRecoveryCommandLines(runId, publicStatus));
|
|
11229
11260
|
}
|
|
11230
11261
|
const renderedServerView = renderServerResultView(status.resultView);
|
|
11231
11262
|
if (result) {
|
|
@@ -11238,8 +11269,8 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11238
11269
|
lines.push(...renderedServerView.actions);
|
|
11239
11270
|
lines.push(...buildBillingRollupTextLines(status));
|
|
11240
11271
|
const compact = compactPlayStatus(status);
|
|
11241
|
-
const payload = _optionalChain([options, 'optionalAccess',
|
|
11242
|
-
|
|
11272
|
+
const payload = _optionalChain([options, 'optionalAccess', _431 => _431.fullJson]) ? status : compact;
|
|
11273
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
11243
11274
|
{
|
|
11244
11275
|
...payload,
|
|
11245
11276
|
render: {
|
|
@@ -11300,7 +11331,7 @@ async function resolvePlayRunOutputStatus(input) {
|
|
|
11300
11331
|
const fromDurableStatus = input.fromDurableStatus === true || fullDurableTerminalStatuses.has(input.status);
|
|
11301
11332
|
const refreshForFullJson = input.fullJson && !fromDurableStatus;
|
|
11302
11333
|
const streamedTextPackageIncomplete = input.status.status === "completed" && playRunPackageTextLedgerIncomplete(streamedPackage);
|
|
11303
|
-
const refreshFailedTerminal = input.status.status === "failed" && (!fromDurableStatus || _optionalChain([readRecord, 'call',
|
|
11334
|
+
const refreshFailedTerminal = input.status.status === "failed" && (!fromDurableStatus || _optionalChain([readRecord, 'call', _432 => _432(_optionalChain([streamedPackage, 'optionalAccess', _433 => _433.run])), 'optionalAccess', _434 => _434.status]) !== "failed");
|
|
11304
11335
|
if (!refreshForFullJson && !streamedTextPackageIncomplete && !refreshFailedTerminal) {
|
|
11305
11336
|
if (input.fullJson && fromDurableStatus && TERMINAL_PLAY_STATUSES.has(input.status.status)) {
|
|
11306
11337
|
fullDurableTerminalStatuses.add(input.status);
|
|
@@ -11407,14 +11438,14 @@ function mergeExportColumns(preferredColumns, rows) {
|
|
|
11407
11438
|
return columns;
|
|
11408
11439
|
}
|
|
11409
11440
|
function sqlSafeExportColumnName(id) {
|
|
11410
|
-
const prefix = _nullishCoalesce(_optionalChain([id, 'access',
|
|
11441
|
+
const prefix = _nullishCoalesce(_optionalChain([id, 'access', _435 => _435.trim, 'call', _436 => _436(), 'access', _437 => _437.match, 'call', _438 => _438(/^_+/), 'optionalAccess', _439 => _439[0]]), () => ( ""));
|
|
11411
11442
|
const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
11412
11443
|
const safe = `${prefix}${normalized || "column"}`;
|
|
11413
11444
|
return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
|
|
11414
11445
|
}
|
|
11415
11446
|
async function fetchBackingDatasetRows(input) {
|
|
11416
11447
|
const playName = extractRunPlayName(input.status);
|
|
11417
|
-
const tableNamespace = _optionalChain([input, 'access',
|
|
11448
|
+
const tableNamespace = _optionalChain([input, 'access', _440 => _440.rowsInfo, 'access', _441 => _441.tableNamespace, 'optionalAccess', _442 => _442.trim, 'call', _443 => _443()]);
|
|
11418
11449
|
if (!playName || !tableNamespace) {
|
|
11419
11450
|
return null;
|
|
11420
11451
|
}
|
|
@@ -11438,7 +11469,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11438
11469
|
if (seenEnvelopeKeys.has(key)) {
|
|
11439
11470
|
const activeRun = !TERMINAL_PLAY_STATUSES.has(input.status.status);
|
|
11440
11471
|
const waitCommand = `${input.retryCommand} --wait`;
|
|
11441
|
-
throw new (0,
|
|
11472
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
11442
11473
|
"The backing dataset returned a Runtime Sheet row more than once while paging; the export is not ready to write. " + (activeRun ? `Wait for this same run: ${waitCommand}. Do not rerun the Play to retrieve results.` : `Retry with: ${input.retryCommand}`),
|
|
11443
11474
|
void 0,
|
|
11444
11475
|
"RUN_EXPORT_NOT_READY",
|
|
@@ -11454,7 +11485,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11454
11485
|
seenEnvelopeKeys.add(key);
|
|
11455
11486
|
}
|
|
11456
11487
|
sheetRows.push(...page.rows);
|
|
11457
|
-
const summaryTotal = _optionalChain([page, 'access',
|
|
11488
|
+
const summaryTotal = _optionalChain([page, 'access', _444 => _444.summary, 'optionalAccess', _445 => _445.stats, 'optionalAccess', _446 => _446.total]);
|
|
11458
11489
|
if (typeof summaryTotal === "number" && Number.isFinite(summaryTotal)) {
|
|
11459
11490
|
settledTotal = Math.max(_nullishCoalesce(settledTotal, () => ( 0)), Math.trunc(summaryTotal));
|
|
11460
11491
|
}
|
|
@@ -11463,7 +11494,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11463
11494
|
}
|
|
11464
11495
|
offset += page.rows.length;
|
|
11465
11496
|
}
|
|
11466
|
-
const withError =
|
|
11497
|
+
const withError = _chunkKWYGWO4Yjs.tableExportHasFailedRows.call(void 0,
|
|
11467
11498
|
sheetRows.filter(
|
|
11468
11499
|
(row) => Boolean(row) && typeof row === "object" && !Array.isArray(row)
|
|
11469
11500
|
)
|
|
@@ -11479,7 +11510,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11479
11510
|
return [
|
|
11480
11511
|
withError ? {
|
|
11481
11512
|
...exported,
|
|
11482
|
-
[
|
|
11513
|
+
[_chunkKWYGWO4Yjs.TABLE_EXPORT_ERROR_COLUMN]: _chunkKWYGWO4Yjs.tableExportErrorCell.call(void 0,
|
|
11483
11514
|
row
|
|
11484
11515
|
)
|
|
11485
11516
|
} : exported
|
|
@@ -11548,7 +11579,7 @@ function assertDatasetHasExportableRows(input) {
|
|
|
11548
11579
|
const rowOutcomes = _nullishCoalesce(readRowOutcomeSummary(input.status), () => ( readRowOutcomeSummary(
|
|
11549
11580
|
getRecordField(getRecordField(input.status, "result"), "_metadata")
|
|
11550
11581
|
)));
|
|
11551
|
-
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',
|
|
11582
|
+
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', _447 => _447.failedRows]) === 0 && !rowOutcomes.hasRowFailures) {
|
|
11552
11583
|
return input.rowsInfo;
|
|
11553
11584
|
}
|
|
11554
11585
|
const datasetLabel = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(input.datasetPath, () => ( input.rowsInfo.tableNamespace)), () => ( input.rowsInfo.source)), () => ( "result.rows"));
|
|
@@ -11569,7 +11600,7 @@ function assertDatasetHasExportableRows(input) {
|
|
|
11569
11600
|
const currentTableQueryCommand2 = input.rowsInfo.currentTableQueryCommand;
|
|
11570
11601
|
if (!TERMINAL_PLAY_STATUSES.has(input.status.status)) {
|
|
11571
11602
|
const waitCommand = `${retryCommand} --wait`;
|
|
11572
|
-
throw new (0,
|
|
11603
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
11573
11604
|
`Run ${input.status.runId} is ${runStatus}; this dataset has zero rows to export yet. Wait for this same run: ${waitCommand}. Do not start another run to retrieve results.`,
|
|
11574
11605
|
void 0,
|
|
11575
11606
|
"RUN_EXPORT_EMPTY",
|
|
@@ -11587,7 +11618,7 @@ function assertDatasetHasExportableRows(input) {
|
|
|
11587
11618
|
);
|
|
11588
11619
|
}
|
|
11589
11620
|
const explanation = terminalRunWithMissingAdvertisedRows ? ` The terminal result advertised ${advertisedRows} row(s), but none are currently attributed to this run's durable sheet. Those rows may have been reused from an earlier run or the projection may still be lagging; export refuses to guess another run's rows. Retry the same export after projection catches up (do not rerun the Play): ${retryCommand}. If it remains empty, inspect the full package with ${inspectCommand}` + (currentTableQueryCommand2 ? `, then inspect the current table's _run_id/_writer_run_id with ${currentTableQueryCommand2} and export the run that owns those rows` : " and export the run that owns the durable dataset") + "; this command will not use a database-wide table query that could mix runs." : ` The run status is '${runStatus || "unknown"}', so it likely failed before persisting rows to this dataset. That means provider calls may have been billed without a durable row; inspect ${inspectCommand}, fix the failure cause, then rerun the Play so completed receipts can be reused.`;
|
|
11590
|
-
throw new (0,
|
|
11621
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
11591
11622
|
`Run ${input.status.runId} has zero rows to export from dataset '${datasetLabel}'.` + explanation + (available.length > 0 ? ` Available datasets: ${available.join(", ")}.` : " No datasets were materialized for this run."),
|
|
11592
11623
|
void 0,
|
|
11593
11624
|
"RUN_EXPORT_EMPTY",
|
|
@@ -11620,8 +11651,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11620
11651
|
path: dataset.exportFile(outPath, options),
|
|
11621
11652
|
rowsInfo: dataset.info(),
|
|
11622
11653
|
currentTable: false,
|
|
11623
|
-
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11624
|
-
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11654
|
+
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _448 => _448.source]), () => ( null)),
|
|
11655
|
+
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _449 => _449.info, 'call', _450 => _450()]), () => ( null))
|
|
11625
11656
|
};
|
|
11626
11657
|
};
|
|
11627
11658
|
const run = Run.open({
|
|
@@ -11633,7 +11664,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11633
11664
|
const returnedRows = datasets.returned().map((dataset) => dataset.info());
|
|
11634
11665
|
const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
|
|
11635
11666
|
const selectedDataset = run.dataset(options.datasetPath);
|
|
11636
|
-
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11667
|
+
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _451 => _451.info, 'call', _452 => _452()]), () => ( null));
|
|
11637
11668
|
if (!selectedDataset && options.datasetPath) {
|
|
11638
11669
|
const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
|
|
11639
11670
|
const commands = datasetChoiceLines({
|
|
@@ -11642,7 +11673,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11642
11673
|
outPath,
|
|
11643
11674
|
options
|
|
11644
11675
|
});
|
|
11645
|
-
throw new (0,
|
|
11676
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
11646
11677
|
`Run ${status.runId} did not return a dataset at ${options.datasetPath}.` + (available.length > 0 ? ` Available datasets: ${available.join(", ")}.
|
|
11647
11678
|
${commands.join("\n")}` : ""),
|
|
11648
11679
|
void 0,
|
|
@@ -11658,7 +11689,7 @@ ${commands.join("\n")}` : ""),
|
|
|
11658
11689
|
outPath,
|
|
11659
11690
|
options
|
|
11660
11691
|
});
|
|
11661
|
-
throw new (0,
|
|
11692
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
11662
11693
|
`Run ${status.runId} returned multiple datasets. Choose one:
|
|
11663
11694
|
${commands.join("\n")}`,
|
|
11664
11695
|
void 0,
|
|
@@ -11681,7 +11712,7 @@ ${commands.join("\n")}`,
|
|
|
11681
11712
|
outPath,
|
|
11682
11713
|
options
|
|
11683
11714
|
});
|
|
11684
|
-
throw new (0,
|
|
11715
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
11685
11716
|
`Run ${status.runId} has multiple recovered datasets. Choose one:
|
|
11686
11717
|
${commands.join("\n")}`,
|
|
11687
11718
|
void 0,
|
|
@@ -11697,14 +11728,14 @@ ${commands.join("\n")}`,
|
|
|
11697
11728
|
);
|
|
11698
11729
|
}
|
|
11699
11730
|
if (!rowsInfo) {
|
|
11700
|
-
throw new (0,
|
|
11731
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
11701
11732
|
`Run ${status.runId} did not expose a row-shaped final output to export.`
|
|
11702
11733
|
);
|
|
11703
11734
|
}
|
|
11704
11735
|
const canExportPreview = rowsInfo.complete && !rowsInfo.currentTable;
|
|
11705
11736
|
if (rowsInfo.exportUnavailableReason === "returned_dataset_not_persisted") {
|
|
11706
11737
|
const datasetLabel = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(options.datasetPath, () => ( rowsInfo.source)), () => ( rowsInfo.datasetId)), () => ( "result.rows"));
|
|
11707
|
-
throw new (0,
|
|
11738
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
11708
11739
|
_nullishCoalesce(rowsInfo.exportUnavailableMessage, () => ( `Run ${status.runId} returned rows for '${datasetLabel}' without a run-scoped durable dataset. Persist the rows with deepline.dataset("rows", rows).run() before returning them.`)),
|
|
11709
11740
|
void 0,
|
|
11710
11741
|
"RUN_EXPORT_NOT_AVAILABLE",
|
|
@@ -11739,14 +11770,14 @@ ${commands.join("\n")}`,
|
|
|
11739
11770
|
summary: options.summary
|
|
11740
11771
|
});
|
|
11741
11772
|
} catch (error) {
|
|
11742
|
-
if (error instanceof
|
|
11773
|
+
if (error instanceof _chunkBBTKAASQjs.DeeplineError && (error.code === "RUN_EXPORT_SCOPE_MISMATCH" || error.code === "RUN_EXPORT_NOT_READY")) {
|
|
11743
11774
|
throw error;
|
|
11744
11775
|
}
|
|
11745
11776
|
if (!canExportPreview) {
|
|
11746
11777
|
throw error;
|
|
11747
11778
|
}
|
|
11748
11779
|
}
|
|
11749
|
-
if (_optionalChain([fetchedRowsInfo, 'optionalAccess',
|
|
11780
|
+
if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _453 => _453.complete])) {
|
|
11750
11781
|
const guarded2 = assertDatasetHasExportableRows({
|
|
11751
11782
|
rowsInfo: fetchedRowsInfo,
|
|
11752
11783
|
status,
|
|
@@ -11780,7 +11811,7 @@ ${commands.join("\n")}`,
|
|
|
11780
11811
|
const previewReason = rowsInfo.currentTable ? "Legacy shared-table metadata does not prove this preview belongs to the run" : `Run output only includes ${rowsInfo.rows.length} preview row(s) of ${rowsInfo.totalRows}`;
|
|
11781
11812
|
const activeRun = !TERMINAL_PLAY_STATUSES.has(status.status);
|
|
11782
11813
|
const waitCommand = `${retryCommand} --wait`;
|
|
11783
|
-
throw new (0,
|
|
11814
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
11784
11815
|
`${previewReason}; the backing dataset was not ready to export yet. ` + (activeRun ? `The run is ${status.status}. Wait for this same run: ${waitCommand}. Do not rerun the Play to retrieve results.` : `Retry with: ${retryCommand}`),
|
|
11785
11816
|
void 0,
|
|
11786
11817
|
"RUN_EXPORT_NOT_READY",
|
|
@@ -11808,10 +11839,10 @@ ${commands.join("\n")}`,
|
|
|
11808
11839
|
return writeExport(guarded);
|
|
11809
11840
|
}
|
|
11810
11841
|
function extractActiveRunsFromError(error) {
|
|
11811
|
-
if (!(error instanceof
|
|
11842
|
+
if (!(error instanceof _chunkBBTKAASQjs.DeeplineError)) {
|
|
11812
11843
|
return [];
|
|
11813
11844
|
}
|
|
11814
|
-
const response = _optionalChain([error, 'access',
|
|
11845
|
+
const response = _optionalChain([error, 'access', _454 => _454.details, 'optionalAccess', _455 => _455.response]);
|
|
11815
11846
|
if (!response || typeof response !== "object" || Array.isArray(response)) {
|
|
11816
11847
|
return [];
|
|
11817
11848
|
}
|
|
@@ -11857,7 +11888,7 @@ function stringArrayField(record4, key) {
|
|
|
11857
11888
|
return value.filter((entry) => typeof entry === "string");
|
|
11858
11889
|
}
|
|
11859
11890
|
function extractPlayValidationErrors(value) {
|
|
11860
|
-
if (value instanceof
|
|
11891
|
+
if (value instanceof _chunkBBTKAASQjs.DeeplineError) {
|
|
11861
11892
|
return extractPlayValidationErrors(value.details);
|
|
11862
11893
|
}
|
|
11863
11894
|
if (!isRecord2(value)) {
|
|
@@ -11896,21 +11927,21 @@ function normalizePlayValidationError(error) {
|
|
|
11896
11927
|
if (!message.trim()) {
|
|
11897
11928
|
return error;
|
|
11898
11929
|
}
|
|
11899
|
-
return new (0,
|
|
11930
|
+
return new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
11900
11931
|
message,
|
|
11901
|
-
error instanceof
|
|
11902
|
-
error instanceof
|
|
11903
|
-
error instanceof
|
|
11932
|
+
error instanceof _chunkBBTKAASQjs.DeeplineError ? error.statusCode : void 0,
|
|
11933
|
+
error instanceof _chunkBBTKAASQjs.DeeplineError ? error.code : "PLAY_VALIDATION_ERROR",
|
|
11934
|
+
error instanceof _chunkBBTKAASQjs.DeeplineError ? error.details : void 0
|
|
11904
11935
|
);
|
|
11905
11936
|
}
|
|
11906
11937
|
async function normalizePlayStartError(client, error, playName, options = {}) {
|
|
11907
11938
|
const activeRuns = extractActiveRunsFromError(error);
|
|
11908
11939
|
if (activeRuns.length > 0) {
|
|
11909
|
-
return new (0,
|
|
11940
|
+
return new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
11910
11941
|
formatActiveRunConflictError({ playName, activeRuns }),
|
|
11911
|
-
error instanceof
|
|
11942
|
+
error instanceof _chunkBBTKAASQjs.DeeplineError ? error.statusCode : 409,
|
|
11912
11943
|
"ACTIVE_RUN_EXISTS",
|
|
11913
|
-
error instanceof
|
|
11944
|
+
error instanceof _chunkBBTKAASQjs.DeeplineError ? error.details : void 0
|
|
11914
11945
|
);
|
|
11915
11946
|
}
|
|
11916
11947
|
if (options.suggestMissingPlay && await isMissingRunPlayReferenceError({ client, error, playName })) {
|
|
@@ -11928,8 +11959,8 @@ function renderServerResultView(value) {
|
|
|
11928
11959
|
return { lines: [], actions: [] };
|
|
11929
11960
|
}
|
|
11930
11961
|
const view = value;
|
|
11931
|
-
const renderedSections = Array.isArray(_optionalChain([view, 'access',
|
|
11932
|
-
const renderedActions = Array.isArray(_optionalChain([view, 'access',
|
|
11962
|
+
const renderedSections = Array.isArray(_optionalChain([view, 'access', _456 => _456.render, 'optionalAccess', _457 => _457.sections])) ? view.render.sections : [];
|
|
11963
|
+
const renderedActions = Array.isArray(_optionalChain([view, 'access', _458 => _458.render, 'optionalAccess', _459 => _459.actions])) ? view.render.actions : [];
|
|
11933
11964
|
if (renderedSections.length > 0 || renderedActions.length > 0) {
|
|
11934
11965
|
const lines2 = [];
|
|
11935
11966
|
for (const section of renderedSections) {
|
|
@@ -11967,7 +11998,7 @@ function renderServerResultView(value) {
|
|
|
11967
11998
|
}
|
|
11968
11999
|
const tables = Array.isArray(view.tables) ? view.tables : [];
|
|
11969
12000
|
const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
|
|
11970
|
-
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess',
|
|
12001
|
+
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _460 => _460.queryCommand]) === "string") {
|
|
11971
12002
|
lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
|
|
11972
12003
|
}
|
|
11973
12004
|
if (tables.length > 0) {
|
|
@@ -12014,7 +12045,7 @@ function renderServerResultView(value) {
|
|
|
12014
12045
|
function writeStartedPlayRun(input) {
|
|
12015
12046
|
if (input.package && isPlayRunPackageValue(input.package)) {
|
|
12016
12047
|
const run = input.package.run;
|
|
12017
|
-
|
|
12048
|
+
_chunkKWYGWO4Yjs.recordPlayTermination.call(void 0, {
|
|
12018
12049
|
id: run.id,
|
|
12019
12050
|
status: run.status,
|
|
12020
12051
|
finishedAt: run.finishedAt
|
|
@@ -12027,7 +12058,7 @@ function writeStartedPlayRun(input) {
|
|
|
12027
12058
|
dashboardUrl: input.dashboardUrl,
|
|
12028
12059
|
package: input.package
|
|
12029
12060
|
};
|
|
12030
|
-
|
|
12061
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
|
|
12031
12062
|
json: true,
|
|
12032
12063
|
fields: input.jsonFields
|
|
12033
12064
|
});
|
|
@@ -12049,7 +12080,7 @@ function writeStartedPlayRun(input) {
|
|
|
12049
12080
|
input.progress.writeLine(output2, process.stdout);
|
|
12050
12081
|
return;
|
|
12051
12082
|
}
|
|
12052
|
-
|
|
12083
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, input.package, {
|
|
12053
12084
|
json: false,
|
|
12054
12085
|
text: `${output2}
|
|
12055
12086
|
`
|
|
@@ -12084,7 +12115,7 @@ function writeStartedPlayRun(input) {
|
|
|
12084
12115
|
) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)}`] : []
|
|
12085
12116
|
];
|
|
12086
12117
|
if (input.jsonOutput) {
|
|
12087
|
-
|
|
12118
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
|
|
12088
12119
|
return;
|
|
12089
12120
|
}
|
|
12090
12121
|
const output = lines.join("\n");
|
|
@@ -12092,7 +12123,7 @@ function writeStartedPlayRun(input) {
|
|
|
12092
12123
|
input.progress.writeLine(output, process.stdout);
|
|
12093
12124
|
return;
|
|
12094
12125
|
}
|
|
12095
|
-
|
|
12126
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
12096
12127
|
{
|
|
12097
12128
|
...payload,
|
|
12098
12129
|
render: { sections: [{ title: "play run", lines }] }
|
|
@@ -12102,7 +12133,7 @@ function writeStartedPlayRun(input) {
|
|
|
12102
12133
|
);
|
|
12103
12134
|
}
|
|
12104
12135
|
function parsePlayCheckOptions(args) {
|
|
12105
|
-
const selection =
|
|
12136
|
+
const selection = _chunkLN6RXDTBjs.parseJsonFields.call(void 0, args, "check");
|
|
12106
12137
|
args = selection.args;
|
|
12107
12138
|
const target = args[0];
|
|
12108
12139
|
if (!target || target.startsWith("-")) {
|
|
@@ -12114,7 +12145,7 @@ function parsePlayCheckOptions(args) {
|
|
|
12114
12145
|
if (arg !== "--json" && arg !== "--full")
|
|
12115
12146
|
throw new Error(`Unknown plays check option: ${arg}`);
|
|
12116
12147
|
}
|
|
12117
|
-
const jsonOutput =
|
|
12148
|
+
const jsonOutput = _chunkLN6RXDTBjs.argsWantJson.call(void 0, args);
|
|
12118
12149
|
return {
|
|
12119
12150
|
target,
|
|
12120
12151
|
jsonOutput,
|
|
@@ -12190,7 +12221,7 @@ ${PLAY_PUBLISH_USAGE}`
|
|
|
12190
12221
|
useLatest,
|
|
12191
12222
|
expectedArtifactHash,
|
|
12192
12223
|
dryRun,
|
|
12193
|
-
jsonOutput:
|
|
12224
|
+
jsonOutput: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args)
|
|
12194
12225
|
};
|
|
12195
12226
|
}
|
|
12196
12227
|
var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--watch-play <play-reference>] [--dry-run] [--json]\nUse --watch-play to show invalid source on your own open working canvas while keeping the last valid diagram.";
|
|
@@ -12239,7 +12270,7 @@ ${PLAY_SAVE_USAGE}`);
|
|
|
12239
12270
|
expectedArtifactHash,
|
|
12240
12271
|
watchPlay,
|
|
12241
12272
|
dryRun,
|
|
12242
|
-
jsonOutput:
|
|
12273
|
+
jsonOutput: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args)
|
|
12243
12274
|
};
|
|
12244
12275
|
}
|
|
12245
12276
|
function printScheduledPlayCapacity(capacity) {
|
|
@@ -12292,7 +12323,7 @@ function checkHintExpression(value) {
|
|
|
12292
12323
|
return stringValue2(value).replace(/^toolExecutionResult\./, "result.");
|
|
12293
12324
|
}
|
|
12294
12325
|
function checkHintRawPath(value) {
|
|
12295
|
-
return _optionalChain([value, 'optionalAccess',
|
|
12326
|
+
return _optionalChain([value, 'optionalAccess', _461 => _461.startsWith, 'call', _462 => _462("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
|
|
12296
12327
|
}
|
|
12297
12328
|
function collectStaticPipelineToolIds(staticPipeline) {
|
|
12298
12329
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -12367,30 +12398,30 @@ function cronExecutionLabel(status) {
|
|
|
12367
12398
|
}
|
|
12368
12399
|
function readLiveCronMetadata(play) {
|
|
12369
12400
|
const record4 = readRecord(play);
|
|
12370
|
-
const metadata = readRecord(_optionalChain([record4, 'optionalAccess',
|
|
12401
|
+
const metadata = readRecord(_optionalChain([record4, 'optionalAccess', _463 => _463.triggerMetadata]));
|
|
12371
12402
|
return {
|
|
12372
|
-
schedule: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12373
|
-
timezone: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12374
|
-
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12375
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12376
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12403
|
+
schedule: typeof _optionalChain([metadata, 'optionalAccess', _464 => _464.cronSchedule]) === "string" ? metadata.cronSchedule : null,
|
|
12404
|
+
timezone: typeof _optionalChain([metadata, 'optionalAccess', _465 => _465.cronTimezone]) === "string" ? metadata.cronTimezone : null,
|
|
12405
|
+
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _466 => _466.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
|
|
12406
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _467 => _467.blockedAt]) === "number" ? metadata.blockedAt : null,
|
|
12407
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _468 => _468.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
|
|
12377
12408
|
};
|
|
12378
12409
|
}
|
|
12379
12410
|
function liveTriggerStatusLines(status, play) {
|
|
12380
12411
|
const cron = readLiveCronMetadata(play);
|
|
12381
|
-
if (!_optionalChain([status, 'optionalAccess',
|
|
12412
|
+
if (!_optionalChain([status, 'optionalAccess', _469 => _469.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _470 => _470.webhook])) return [];
|
|
12382
12413
|
const lines = [];
|
|
12383
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12414
|
+
if (_optionalChain([status, 'optionalAccess', _471 => _471.cron]) || cron.schedule) {
|
|
12384
12415
|
const timezone = cron.timezone ? ` (${cron.timezone})` : "";
|
|
12385
12416
|
lines.push(
|
|
12386
|
-
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
12417
|
+
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _472 => _472.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
|
|
12387
12418
|
);
|
|
12388
|
-
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess',
|
|
12419
|
+
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _473 => _473.cron]) === "active") {
|
|
12389
12420
|
lines.push(
|
|
12390
12421
|
` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
|
|
12391
12422
|
);
|
|
12392
12423
|
}
|
|
12393
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12424
|
+
if (_optionalChain([status, 'optionalAccess', _474 => _474.blockedReason])) {
|
|
12394
12425
|
lines.push(` Schedule issue: ${status.blockedReason}`);
|
|
12395
12426
|
if (status.blockedReasonCode || cron.blockedReasonCode) {
|
|
12396
12427
|
lines.push(
|
|
@@ -12406,7 +12437,7 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12406
12437
|
);
|
|
12407
12438
|
}
|
|
12408
12439
|
}
|
|
12409
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12440
|
+
if (_optionalChain([status, 'optionalAccess', _475 => _475.webhook])) {
|
|
12410
12441
|
lines.push(` Webhook: ${status.webhook}`);
|
|
12411
12442
|
}
|
|
12412
12443
|
return lines;
|
|
@@ -12414,11 +12445,11 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12414
12445
|
function triggerStatusFromMetadata(value) {
|
|
12415
12446
|
const metadata = readRecord(value);
|
|
12416
12447
|
return {
|
|
12417
|
-
cron: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12418
|
-
webhook: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12419
|
-
blockedReason: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12420
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12421
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12448
|
+
cron: typeof _optionalChain([metadata, 'optionalAccess', _476 => _476.cronStatus]) === "string" ? metadata.cronStatus : null,
|
|
12449
|
+
webhook: typeof _optionalChain([metadata, 'optionalAccess', _477 => _477.webhookStatus]) === "string" ? metadata.webhookStatus : null,
|
|
12450
|
+
blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _478 => _478.blockedReason]) === "string" ? metadata.blockedReason : null,
|
|
12451
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _479 => _479.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
|
|
12452
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _480 => _480.blockedAt]) === "number" ? metadata.blockedAt : null
|
|
12422
12453
|
};
|
|
12423
12454
|
}
|
|
12424
12455
|
function printPublishReceipt(input) {
|
|
@@ -12450,7 +12481,7 @@ function printBundledRuntimeWarning(bundle) {
|
|
|
12450
12481
|
async function handlePlayCheck(args) {
|
|
12451
12482
|
const options = parsePlayCheckOptions(args);
|
|
12452
12483
|
if (!isFileTarget(options.target)) {
|
|
12453
|
-
const client = new (0,
|
|
12484
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
12454
12485
|
try {
|
|
12455
12486
|
await assertCanonicalNamedPlayReference(client, options.target, {
|
|
12456
12487
|
command: "check"
|
|
@@ -12479,7 +12510,7 @@ async function handlePlayCheck(args) {
|
|
|
12479
12510
|
},
|
|
12480
12511
|
...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
|
|
12481
12512
|
};
|
|
12482
|
-
|
|
12513
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, result, {
|
|
12483
12514
|
json: options.jsonOutput,
|
|
12484
12515
|
fields: options.jsonFields,
|
|
12485
12516
|
text: renderPlayCheckOutput(result) + "\n"
|
|
@@ -12489,7 +12520,7 @@ async function handlePlayCheck(args) {
|
|
|
12489
12520
|
const resolved = _path.resolve.call(void 0, options.target);
|
|
12490
12521
|
const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
|
|
12491
12522
|
if (options.jsonOutput) {
|
|
12492
|
-
|
|
12523
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
12493
12524
|
{
|
|
12494
12525
|
kind: "play_check",
|
|
12495
12526
|
checked: "named_contract",
|
|
@@ -12518,9 +12549,9 @@ async function handlePlayCheck(args) {
|
|
|
12518
12549
|
target: options.target,
|
|
12519
12550
|
full: options.full,
|
|
12520
12551
|
detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full`,
|
|
12521
|
-
publishCommand: _optionalChain([primary, 'optionalAccess',
|
|
12552
|
+
publishCommand: _optionalChain([primary, 'optionalAccess', _481 => _481.result, 'access', _482 => _482.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
|
|
12522
12553
|
});
|
|
12523
|
-
|
|
12554
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, output, {
|
|
12524
12555
|
json: options.jsonOutput,
|
|
12525
12556
|
fields: options.jsonFields,
|
|
12526
12557
|
text: renderPlayCheckOutput(output) + "\n"
|
|
@@ -12533,7 +12564,7 @@ function resolvePlayCheckExportNames(sourceCode) {
|
|
|
12533
12564
|
return exports.map((entry) => entry.name);
|
|
12534
12565
|
}
|
|
12535
12566
|
function artifactForProductionCompatibilityCheck(artifact) {
|
|
12536
|
-
const rawEdition = _optionalChain([process, 'access',
|
|
12567
|
+
const rawEdition = _optionalChain([process, 'access', _483 => _483.env, 'access', _484 => _484.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _485 => _485.trim, 'call', _486 => _486()]);
|
|
12537
12568
|
if (!rawEdition) return artifact;
|
|
12538
12569
|
if (!/^\d+$/.test(rawEdition)) {
|
|
12539
12570
|
throw new Error(
|
|
@@ -12588,7 +12619,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12588
12619
|
}
|
|
12589
12620
|
const playName = _nullishCoalesce(graph.root.playName, () => ( fallbackName));
|
|
12590
12621
|
const authoringErrors = collectPlayGraphAuthoringErrors(graph);
|
|
12591
|
-
const client = _nullishCoalesce(input.client, () => ( new (0,
|
|
12622
|
+
const client = _nullishCoalesce(input.client, () => ( new (0, _chunkXBAH3TKUjs.DeeplineClient)()));
|
|
12592
12623
|
const integrationMode = resolveEvalIntegrationMode();
|
|
12593
12624
|
const checked = await checkLocalPlayGraph({
|
|
12594
12625
|
client,
|
|
@@ -12598,7 +12629,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12598
12629
|
integrationMode,
|
|
12599
12630
|
prepareArtifact: artifactForProductionCompatibilityCheck
|
|
12600
12631
|
});
|
|
12601
|
-
const importedPlayName = _optionalChain([checked, 'access',
|
|
12632
|
+
const importedPlayName = _optionalChain([checked, 'access', _487 => _487.failedChild, 'optionalAccess', _488 => _488.playName]);
|
|
12602
12633
|
const diagnosticPrefix = importedPlayName ? `Imported Play ${importedPlayName}: ` : "";
|
|
12603
12634
|
const valid = checked.result.valid && !checked.failedChild && authoringErrors.length === 0;
|
|
12604
12635
|
const errors = [
|
|
@@ -12614,7 +12645,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12614
12645
|
valid,
|
|
12615
12646
|
errors: valid ? checked.result.errors : addPlayCheckRepairHints({
|
|
12616
12647
|
errors,
|
|
12617
|
-
sourceCode: _nullishCoalesce(_optionalChain([checked, 'access',
|
|
12648
|
+
sourceCode: _nullishCoalesce(_optionalChain([checked, 'access', _489 => _489.failedChild, 'optionalAccess', _490 => _490.sourceCode]), () => ( graph.root.sourceCode))
|
|
12618
12649
|
}),
|
|
12619
12650
|
...checked.failedChild && checked.result.issues ? {
|
|
12620
12651
|
issues: checked.result.issues.map((issue) => ({
|
|
@@ -12644,9 +12675,9 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12644
12675
|
let prefetchClient;
|
|
12645
12676
|
let admissionCapability;
|
|
12646
12677
|
let cancelAdmissionCapability;
|
|
12647
|
-
let cliAdmission =
|
|
12648
|
-
const progress = _nullishCoalesce(
|
|
12649
|
-
const reportError = _nullishCoalesce(_optionalChain([hooks, 'optionalAccess',
|
|
12678
|
+
let cliAdmission = _chunkZZ4MF2GIjs.usesCliPlayAdmission.call(void 0, "plays run", process.argv.slice(2));
|
|
12679
|
+
const progress = _nullishCoalesce(_chunkHWDKRN7Ljs.getActiveCliProgress.call(void 0, ), () => ( _chunkHWDKRN7Ljs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12680
|
+
const reportError = _nullishCoalesce(_optionalChain([hooks, 'optionalAccess', _491 => _491.writeDryRunError]), () => ( ((error) => console.error(error instanceof Error ? error.message : String(error)))));
|
|
12650
12681
|
const absolutePlayPath = _path.resolve.call(void 0, options.target.path);
|
|
12651
12682
|
progress.phase("compiling play");
|
|
12652
12683
|
const sourceCode = traceCliSync(
|
|
@@ -12662,11 +12693,11 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12662
12693
|
return 1;
|
|
12663
12694
|
}
|
|
12664
12695
|
if (!options.dryRun && options.watch && cliAdmission && Boolean(options.runIdFile) && options.maxTotalCredits === null && !inputContainsLocalFilePath(runtimeInput)) {
|
|
12665
|
-
const clientForPrefetch = new (0,
|
|
12696
|
+
const clientForPrefetch = new (0, _chunkXBAH3TKUjs.DeeplineClient)(playRunClientOptions(options));
|
|
12666
12697
|
prefetchClient = clientForPrefetch;
|
|
12667
12698
|
const capabilityController = new AbortController();
|
|
12668
12699
|
cancelAdmissionCapability = () => capabilityController.abort();
|
|
12669
|
-
admissionCapability =
|
|
12700
|
+
admissionCapability = _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
12670
12701
|
"cli.play_admission_capability_prefetch",
|
|
12671
12702
|
{ targetKind: "file" },
|
|
12672
12703
|
() => clientForPrefetch.prefetchPlayRunAdmissionCapability({
|
|
@@ -12677,7 +12708,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12677
12708
|
}
|
|
12678
12709
|
let graph;
|
|
12679
12710
|
try {
|
|
12680
|
-
graph = await
|
|
12711
|
+
graph = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
12681
12712
|
"cli.play_file_bundle_graph",
|
|
12682
12713
|
{ targetKind: "file" },
|
|
12683
12714
|
() => collectBundledPlayGraph(
|
|
@@ -12690,10 +12721,10 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12690
12721
|
assertPlayGraphAuthoring(graph);
|
|
12691
12722
|
if (options.dryRun) {
|
|
12692
12723
|
progress.complete();
|
|
12693
|
-
const plan =
|
|
12724
|
+
const plan = _chunk6VUGBQZQjs.planLocalPlayExecution.call(void 0, graph, {
|
|
12694
12725
|
runIdFile: options.runIdFile
|
|
12695
12726
|
});
|
|
12696
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12727
|
+
if (_optionalChain([hooks, 'optionalAccess', _492 => _492.writeDryRunPlan])) hooks.writeDryRunPlan(plan);
|
|
12697
12728
|
else
|
|
12698
12729
|
renderLocalPlayExecutionPlan(plan, {
|
|
12699
12730
|
dryRun: true,
|
|
@@ -12701,9 +12732,9 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12701
12732
|
});
|
|
12702
12733
|
return 0;
|
|
12703
12734
|
}
|
|
12704
|
-
client = _nullishCoalesce(prefetchClient, () => ( new (0,
|
|
12735
|
+
client = _nullishCoalesce(prefetchClient, () => ( new (0, _chunkXBAH3TKUjs.DeeplineClient)(playRunClientOptions(options))));
|
|
12705
12736
|
if (cliAdmission && (graph.root.importedPlayDependencies.length > 0 || inputContainsLocalFilePath(runtimeInput))) {
|
|
12706
|
-
await
|
|
12737
|
+
await _chunkZZ4MF2GIjs.checkPlayRunCompatibility.call(void 0,
|
|
12707
12738
|
client.baseUrl,
|
|
12708
12739
|
options.maintenancePolicy
|
|
12709
12740
|
);
|
|
@@ -12714,9 +12745,9 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12714
12745
|
playName: await _asyncNullishCoalesce(graph.root.playName, async () => ( await extractPlayName(sourceCode, absolutePlayPath))),
|
|
12715
12746
|
maxTotalCredits: options.maxTotalCredits
|
|
12716
12747
|
});
|
|
12717
|
-
const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
|
|
12748
|
+
const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput) && !mayBindBareFileName(graph.root, runtimeInput);
|
|
12718
12749
|
if (canDeferCompilerManifest) {
|
|
12719
|
-
|
|
12750
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
12720
12751
|
phase: "cli.play_file_compile_manifests",
|
|
12721
12752
|
ms: 0,
|
|
12722
12753
|
ok: true,
|
|
@@ -12725,7 +12756,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12725
12756
|
reason: "validated_by_run_route"
|
|
12726
12757
|
});
|
|
12727
12758
|
} else {
|
|
12728
|
-
await
|
|
12759
|
+
await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
12729
12760
|
"cli.play_file_compile_manifests",
|
|
12730
12761
|
{ targetKind: "file", skipped: false },
|
|
12731
12762
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
@@ -12733,7 +12764,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12733
12764
|
}
|
|
12734
12765
|
progress.phase("compiled play");
|
|
12735
12766
|
} catch (error) {
|
|
12736
|
-
if (error instanceof
|
|
12767
|
+
if (error instanceof _chunkKWYGWO4Yjs.ExecutionOutputError) throw error;
|
|
12737
12768
|
progress.fail();
|
|
12738
12769
|
reportError(normalizePlayValidationError(error));
|
|
12739
12770
|
return 1;
|
|
@@ -12744,13 +12775,13 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12744
12775
|
if (bundleResult.importedPlayDependencies.length > 0) {
|
|
12745
12776
|
try {
|
|
12746
12777
|
renderLocalPlayExecutionPlan(
|
|
12747
|
-
|
|
12778
|
+
_chunk6VUGBQZQjs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile })
|
|
12748
12779
|
);
|
|
12749
12780
|
progress.phase("pinning imported plays");
|
|
12750
|
-
graph = await
|
|
12781
|
+
graph = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
12751
12782
|
"cli.play_file_pin_imports",
|
|
12752
12783
|
{ targetKind: "file" },
|
|
12753
|
-
() =>
|
|
12784
|
+
() => _chunk6VUGBQZQjs.pinLocalPlayImports.call(void 0, client, graph)
|
|
12754
12785
|
);
|
|
12755
12786
|
bundleResult = graph.root;
|
|
12756
12787
|
} catch (error) {
|
|
@@ -12763,11 +12794,11 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12763
12794
|
(file) => stageFile(file.logicalPath, file.absolutePath)
|
|
12764
12795
|
);
|
|
12765
12796
|
const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
|
|
12766
|
-
const fileInputBindings =
|
|
12767
|
-
inputSchema: _optionalChain([compilerManifest, 'optionalAccess',
|
|
12768
|
-
staticPipeline: _optionalChain([compilerManifest, 'optionalAccess',
|
|
12797
|
+
const fileInputBindings = _chunkCQDQNZGHjs.playRunFileInputBindings.call(void 0, {
|
|
12798
|
+
inputSchema: _optionalChain([compilerManifest, 'optionalAccess', _493 => _493.authoringContract, 'optionalAccess', _494 => _494.inputSchema]),
|
|
12799
|
+
staticPipeline: _optionalChain([compilerManifest, 'optionalAccess', _495 => _495.staticPipeline])
|
|
12769
12800
|
});
|
|
12770
|
-
const stagedFileInputs = await
|
|
12801
|
+
const stagedFileInputs = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
12771
12802
|
"cli.play_stage_inputs",
|
|
12772
12803
|
{
|
|
12773
12804
|
targetKind: "file",
|
|
@@ -12777,7 +12808,10 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12777
12808
|
client,
|
|
12778
12809
|
runtimeInput,
|
|
12779
12810
|
bindings: fileInputBindings,
|
|
12780
|
-
progress
|
|
12811
|
+
progress,
|
|
12812
|
+
packagedFiles: new Set(
|
|
12813
|
+
bundleResult.packagedFiles.map((file) => file.logicalPath)
|
|
12814
|
+
)
|
|
12781
12815
|
})
|
|
12782
12816
|
);
|
|
12783
12817
|
const integrationMode = resolveEvalIntegrationMode();
|
|
@@ -12814,7 +12848,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12814
12848
|
};
|
|
12815
12849
|
if (options.watch) {
|
|
12816
12850
|
progress.phase("starting run");
|
|
12817
|
-
const finalStatus = await
|
|
12851
|
+
const finalStatus = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
12818
12852
|
"cli.play_start_watch",
|
|
12819
12853
|
{ targetKind: "file", playName },
|
|
12820
12854
|
() => (options.runIdFile ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
|
|
@@ -12828,9 +12862,9 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12828
12862
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
12829
12863
|
open: options.open,
|
|
12830
12864
|
progress,
|
|
12831
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
12832
|
-
onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12833
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
12865
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _496 => _496.onRunStarted]),
|
|
12866
|
+
onSubmission: _optionalChain([hooks, 'optionalAccess', _497 => _497.onSubmission]),
|
|
12867
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _498 => _498.onRunAdmitted]),
|
|
12834
12868
|
maintenancePolicy: options.maintenancePolicy,
|
|
12835
12869
|
...!options.runIdFile || options.fullJson ? { fullJson: options.fullJson } : {},
|
|
12836
12870
|
...cliAdmission ? {
|
|
@@ -12860,8 +12894,8 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12860
12894
|
),
|
|
12861
12895
|
options
|
|
12862
12896
|
);
|
|
12863
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
12864
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12897
|
+
_optionalChain([hooks, 'optionalAccess', _499 => _499.onTerminalStatus, 'optionalCall', _500 => _500(outputStatus)]);
|
|
12898
|
+
if (_optionalChain([hooks, 'optionalAccess', _501 => _501.writeResult])) {
|
|
12865
12899
|
await hooks.writeResult(client, outputStatus);
|
|
12866
12900
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12867
12901
|
}
|
|
@@ -12876,15 +12910,15 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12876
12910
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12877
12911
|
}
|
|
12878
12912
|
progress.phase("starting run");
|
|
12879
|
-
const started = await
|
|
12913
|
+
const started = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
12880
12914
|
"cli.play_start_unwatched",
|
|
12881
12915
|
{ targetKind: "file", playName },
|
|
12882
|
-
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12916
|
+
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _502 => _502.onSubmission]) }).catch(async (error) => {
|
|
12883
12917
|
throw await normalizePlayStartError(client, error, playName);
|
|
12884
12918
|
})
|
|
12885
12919
|
);
|
|
12886
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12887
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12920
|
+
await _optionalChain([hooks, 'optionalAccess', _503 => _503.onRunStarted, 'optionalCall', _504 => _504(started.workflowId)]);
|
|
12921
|
+
await _optionalChain([hooks, 'optionalAccess', _505 => _505.onRunAdmitted, 'optionalCall', _506 => _506(started.workflowId)]);
|
|
12888
12922
|
const resolvedDashboardUrl = _chunkXYIECA7Mjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
12889
12923
|
openPlayDashboard(
|
|
12890
12924
|
resolvePlayRunUrl({
|
|
@@ -12896,7 +12930,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12896
12930
|
);
|
|
12897
12931
|
progress.phase("started run");
|
|
12898
12932
|
progress.complete();
|
|
12899
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12933
|
+
if (_optionalChain([hooks, 'optionalAccess', _507 => _507.writeStarted])) {
|
|
12900
12934
|
hooks.writeStarted(
|
|
12901
12935
|
started.workflowId,
|
|
12902
12936
|
_nullishCoalesce(started.status, () => ( "started")),
|
|
@@ -12931,7 +12965,7 @@ async function resolveNamedRunRevisionId(input) {
|
|
|
12931
12965
|
if (input.selector === "latest") {
|
|
12932
12966
|
const versions = await input.client.listPlayVersions(input.playName);
|
|
12933
12967
|
const latest = versions[0];
|
|
12934
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
12968
|
+
if (!_optionalChain([latest, 'optionalAccess', _508 => _508._id])) {
|
|
12935
12969
|
throw new Error(`No saved revisions found for ${input.playName}.`);
|
|
12936
12970
|
}
|
|
12937
12971
|
return latest._id;
|
|
@@ -12942,9 +12976,9 @@ async function handleNamedRun(options, hooks) {
|
|
|
12942
12976
|
if (options.target.kind !== "name") {
|
|
12943
12977
|
throw new Error("Expected a named play run target.");
|
|
12944
12978
|
}
|
|
12945
|
-
const client = new (0,
|
|
12946
|
-
let cliAdmission =
|
|
12947
|
-
const progress = _nullishCoalesce(
|
|
12979
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)(playRunClientOptions(options));
|
|
12980
|
+
let cliAdmission = _chunkZZ4MF2GIjs.usesCliPlayAdmission.call(void 0, "plays run", process.argv.slice(2));
|
|
12981
|
+
const progress = _nullishCoalesce(_chunkHWDKRN7Ljs.getActiveCliProgress.call(void 0, ), () => ( _chunkHWDKRN7Ljs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12948
12982
|
const playName = options.target.name;
|
|
12949
12983
|
const runtimeInput = options.input ? { ...options.input } : {};
|
|
12950
12984
|
try {
|
|
@@ -12962,7 +12996,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12962
12996
|
if (options.watch && cliAdmission && Boolean(options.runIdFile) && options.maxTotalCredits === null && !needsPlayDefinition && !inputContainsLocalFilePath(runtimeInput)) {
|
|
12963
12997
|
const capabilityController = new AbortController();
|
|
12964
12998
|
cancelAdmissionCapability = () => capabilityController.abort();
|
|
12965
|
-
admissionCapability =
|
|
12999
|
+
admissionCapability = _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
12966
13000
|
"cli.play_admission_capability_prefetch",
|
|
12967
13001
|
{ targetKind: "name", playName },
|
|
12968
13002
|
() => client.prefetchPlayRunAdmissionCapability({
|
|
@@ -12973,14 +13007,14 @@ async function handleNamedRun(options, hooks) {
|
|
|
12973
13007
|
}
|
|
12974
13008
|
const playDetail = needsPlayDefinition ? await (async () => {
|
|
12975
13009
|
progress.phase("loading play definition");
|
|
12976
|
-
return
|
|
13010
|
+
return _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
12977
13011
|
"cli.play_load_definition",
|
|
12978
13012
|
{ targetKind: "name", playName, skipped: false },
|
|
12979
13013
|
() => assertCanonicalNamedPlayReference(client, playName, {
|
|
12980
13014
|
command: "run"
|
|
12981
13015
|
})
|
|
12982
13016
|
);
|
|
12983
|
-
})() : (
|
|
13017
|
+
})() : (_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
12984
13018
|
phase: "cli.play_load_definition",
|
|
12985
13019
|
ms: 0,
|
|
12986
13020
|
ok: true,
|
|
@@ -12989,7 +13023,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12989
13023
|
skipped: true
|
|
12990
13024
|
}), null);
|
|
12991
13025
|
progress.phase("selecting revision");
|
|
12992
|
-
const selectedRevisionId = await
|
|
13026
|
+
const selectedRevisionId = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
12993
13027
|
"cli.play_select_revision",
|
|
12994
13028
|
{
|
|
12995
13029
|
targetKind: "name",
|
|
@@ -13010,14 +13044,14 @@ async function handleNamedRun(options, hooks) {
|
|
|
13010
13044
|
maxTotalCredits: options.maxTotalCredits
|
|
13011
13045
|
});
|
|
13012
13046
|
const fileInputBindings = playDetail ? [
|
|
13013
|
-
...
|
|
13014
|
-
...
|
|
13047
|
+
..._chunkCQDQNZGHjs.fileInputBindingsFromPlaySchema.call(void 0, playDetail.play.inputSchema),
|
|
13048
|
+
..._chunkCQDQNZGHjs.fileInputBindingsFromStaticPipeline.call(void 0, playDetail.play.staticPipeline)
|
|
13015
13049
|
] : [];
|
|
13016
13050
|
if (cliAdmission && fileInputBindings.length > 0) {
|
|
13017
|
-
await
|
|
13051
|
+
await _chunkZZ4MF2GIjs.checkPlayRunCompatibility.call(void 0, client.baseUrl, options.maintenancePolicy);
|
|
13018
13052
|
cliAdmission = false;
|
|
13019
13053
|
}
|
|
13020
|
-
const stagedFileInputs = await
|
|
13054
|
+
const stagedFileInputs = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
13021
13055
|
"cli.play_stage_inputs",
|
|
13022
13056
|
{
|
|
13023
13057
|
targetKind: "name",
|
|
@@ -13040,7 +13074,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
13040
13074
|
const testPolicyOverrides = {
|
|
13041
13075
|
...options.debugMapLatency ? { mapLatencyProfile: true } : {}
|
|
13042
13076
|
};
|
|
13043
|
-
const startRequest =
|
|
13077
|
+
const startRequest = _chunkCQDQNZGHjs.buildNamedPlayRunRequest.call(void 0, {
|
|
13044
13078
|
name: playName,
|
|
13045
13079
|
revisionId: selectedRevisionId,
|
|
13046
13080
|
runtimeInput,
|
|
@@ -13061,7 +13095,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
13061
13095
|
});
|
|
13062
13096
|
if (options.watch) {
|
|
13063
13097
|
progress.phase("starting run");
|
|
13064
|
-
const finalStatus = await
|
|
13098
|
+
const finalStatus = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
13065
13099
|
"cli.play_start_watch",
|
|
13066
13100
|
{ targetKind: "name", playName },
|
|
13067
13101
|
() => (options.runIdFile ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
|
|
@@ -13075,9 +13109,9 @@ async function handleNamedRun(options, hooks) {
|
|
|
13075
13109
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
13076
13110
|
open: options.open,
|
|
13077
13111
|
progress,
|
|
13078
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
13079
|
-
onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
13080
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
13112
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _509 => _509.onRunStarted]),
|
|
13113
|
+
onSubmission: _optionalChain([hooks, 'optionalAccess', _510 => _510.onSubmission]),
|
|
13114
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _511 => _511.onRunAdmitted]),
|
|
13081
13115
|
maintenancePolicy: options.maintenancePolicy,
|
|
13082
13116
|
...!options.runIdFile || options.fullJson ? { fullJson: options.fullJson } : {},
|
|
13083
13117
|
...cliAdmission ? {
|
|
@@ -13110,8 +13144,8 @@ async function handleNamedRun(options, hooks) {
|
|
|
13110
13144
|
options,
|
|
13111
13145
|
_nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
|
|
13112
13146
|
);
|
|
13113
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
13114
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
13147
|
+
_optionalChain([hooks, 'optionalAccess', _512 => _512.onTerminalStatus, 'optionalCall', _513 => _513(outputStatus)]);
|
|
13148
|
+
if (_optionalChain([hooks, 'optionalAccess', _514 => _514.writeResult])) {
|
|
13115
13149
|
await hooks.writeResult(client, outputStatus);
|
|
13116
13150
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
13117
13151
|
}
|
|
@@ -13126,17 +13160,17 @@ async function handleNamedRun(options, hooks) {
|
|
|
13126
13160
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
13127
13161
|
}
|
|
13128
13162
|
progress.phase("starting run");
|
|
13129
|
-
const started = await
|
|
13163
|
+
const started = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
13130
13164
|
"cli.play_start_unwatched",
|
|
13131
13165
|
{ targetKind: "name", playName },
|
|
13132
|
-
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
13166
|
+
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _515 => _515.onSubmission]) }).catch(async (error) => {
|
|
13133
13167
|
throw await normalizePlayStartError(client, error, playName, {
|
|
13134
13168
|
suggestMissingPlay: true
|
|
13135
13169
|
});
|
|
13136
13170
|
})
|
|
13137
13171
|
);
|
|
13138
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13139
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13172
|
+
await _optionalChain([hooks, 'optionalAccess', _516 => _516.onRunStarted, 'optionalCall', _517 => _517(started.workflowId)]);
|
|
13173
|
+
await _optionalChain([hooks, 'optionalAccess', _518 => _518.onRunAdmitted, 'optionalCall', _519 => _519(started.workflowId)]);
|
|
13140
13174
|
const resolvedDashboardUrl = _chunkXYIECA7Mjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
13141
13175
|
openPlayDashboard(
|
|
13142
13176
|
resolvePlayRunUrl({
|
|
@@ -13148,7 +13182,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
13148
13182
|
);
|
|
13149
13183
|
progress.phase("started run");
|
|
13150
13184
|
progress.complete();
|
|
13151
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
13185
|
+
if (_optionalChain([hooks, 'optionalAccess', _520 => _520.writeStarted])) {
|
|
13152
13186
|
hooks.writeStarted(
|
|
13153
13187
|
started.workflowId,
|
|
13154
13188
|
_nullishCoalesce(started.status, () => ( "started")),
|
|
@@ -13181,12 +13215,12 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13181
13215
|
const compact = compactPlayStatus(status);
|
|
13182
13216
|
const errors = Array.isArray(compact.errors) ? compact.errors : [];
|
|
13183
13217
|
const error = status.status === "failed" ? _nullishCoalesce(errors[0], () => ( {
|
|
13184
|
-
message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access',
|
|
13218
|
+
message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access', _521 => _521.progress, 'optionalAccess', _522 => _522.error]))), () => ( "Play failed. Inspect the run for details."))
|
|
13185
13219
|
})) : null;
|
|
13186
13220
|
const next = { status: `deepline runs get ${status.runId}` };
|
|
13187
|
-
const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access',
|
|
13221
|
+
const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access', _523 => _523.exec, 'call', _524 => _524(status.runId), 'optionalAccess', _525 => _525[1]]), () => ( extractRunPlayName(status))), () => ( null));
|
|
13188
13222
|
if (!terminal) {
|
|
13189
|
-
|
|
13223
|
+
_chunkKWYGWO4Yjs.writeExecutionOutput.call(void 0,
|
|
13190
13224
|
{
|
|
13191
13225
|
id: status.runId,
|
|
13192
13226
|
status: status.status,
|
|
@@ -13214,11 +13248,11 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13214
13248
|
retryCommand: `deepline runs export ${status.runId}`
|
|
13215
13249
|
}), async () => ( info));
|
|
13216
13250
|
} catch (fetchError) {
|
|
13217
|
-
if (!info.complete || info.currentTable || fetchError instanceof
|
|
13251
|
+
if (!info.complete || info.currentTable || fetchError instanceof _chunkBBTKAASQjs.DeeplineError && fetchError.code === "RUN_EXPORT_SCOPE_MISMATCH")
|
|
13218
13252
|
throw fetchError;
|
|
13219
13253
|
}
|
|
13220
13254
|
if (!info.complete)
|
|
13221
|
-
throw new (0,
|
|
13255
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
13222
13256
|
`Dataset ${dataset.source} is incomplete. Export it with deepline runs export ${status.runId}; do not restart the run.`,
|
|
13223
13257
|
void 0,
|
|
13224
13258
|
"RUN_EXPORT_NOT_READY"
|
|
@@ -13250,11 +13284,11 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13250
13284
|
Object.entries(handle).filter(([key]) => source !== "result" || key !== "_metadata").map(([key, child]) => [key, materialize(child, `${source}.${key}`)])
|
|
13251
13285
|
);
|
|
13252
13286
|
};
|
|
13253
|
-
const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call',
|
|
13287
|
+
const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call', _526 => _526(status), 'optionalAccess', _527 => _527.outputs]));
|
|
13254
13288
|
const returned = status.result !== void 0 ? status.result : packagedOutputs ? Object.fromEntries(
|
|
13255
13289
|
Object.entries(packagedOutputs).map(([key, value]) => [
|
|
13256
13290
|
key,
|
|
13257
|
-
_optionalChain([readRecord, 'call',
|
|
13291
|
+
_optionalChain([readRecord, 'call', _528 => _528(value), 'optionalAccess', _529 => _529.kind]) === "value" ? _optionalChain([readRecord, 'call', _530 => _530(value), 'optionalAccess', _531 => _531.value]) : value
|
|
13258
13292
|
])
|
|
13259
13293
|
) : null;
|
|
13260
13294
|
let data = materialize(returned);
|
|
@@ -13266,10 +13300,10 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13266
13300
|
};
|
|
13267
13301
|
}
|
|
13268
13302
|
const byRows = new Map(collections.map((c) => [c.rows, c]));
|
|
13269
|
-
const allCollections =
|
|
13303
|
+
const allCollections = _chunkKWYGWO4Yjs.outputCollections.call(void 0, data).map(
|
|
13270
13304
|
(collection) => _nullishCoalesce(byRows.get(collection.rows), () => ( collection))
|
|
13271
13305
|
);
|
|
13272
|
-
|
|
13306
|
+
_chunkKWYGWO4Yjs.writeExecutionOutput.call(void 0,
|
|
13273
13307
|
{
|
|
13274
13308
|
id: status.runId,
|
|
13275
13309
|
status: status.status,
|
|
@@ -13277,7 +13311,7 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13277
13311
|
...allCollections.length ? { collections: allCollections } : {},
|
|
13278
13312
|
complete: allCollections.every((c) => c.complete === true) ? true : allCollections.some((c) => c.complete === false) ? false : null,
|
|
13279
13313
|
error,
|
|
13280
|
-
credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access',
|
|
13314
|
+
credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access', _532 => _532.billing, 'optionalAccess', _533 => _533.totalCredits]))), () => ( null)),
|
|
13281
13315
|
...playName ? { page: _chunkXYIECA7Mjs.buildPlayRunUrl.call(void 0, client.baseUrl, playName, status.runId) } : {},
|
|
13282
13316
|
warnings: [
|
|
13283
13317
|
...buildRunWarnings(status, null),
|
|
@@ -13290,7 +13324,7 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13290
13324
|
}
|
|
13291
13325
|
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;
|
|
13292
13326
|
async function handlePlayRun(args, hooks) {
|
|
13293
|
-
const parsedOptions = Array.isArray(args) ?
|
|
13327
|
+
const parsedOptions = Array.isArray(args) ? _chunkY2NTPYGSjs.parsePlayRunOptions.call(void 0, args) : args;
|
|
13294
13328
|
const options = parsedOptions.runIdFile ? {
|
|
13295
13329
|
...parsedOptions,
|
|
13296
13330
|
runIdFile: parsedOptions.dryRun ? _path.resolve.call(void 0, parsedOptions.runIdFile) : await preflightRunIdFile(parsedOptions.runIdFile)
|
|
@@ -13307,7 +13341,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13307
13341
|
JSON.stringify({
|
|
13308
13342
|
version: 1,
|
|
13309
13343
|
admissionState: "submitted_unknown",
|
|
13310
|
-
baseUrl: new (0,
|
|
13344
|
+
baseUrl: new (0, _chunkXBAH3TKUjs.DeeplineClient)().baseUrl,
|
|
13311
13345
|
...intent
|
|
13312
13346
|
})
|
|
13313
13347
|
);
|
|
@@ -13319,7 +13353,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13319
13353
|
} finally {
|
|
13320
13354
|
await removeRunIdTempFile(tempPath);
|
|
13321
13355
|
}
|
|
13322
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13356
|
+
await _optionalChain([hooks, 'optionalAccess', _534 => _534.onSubmission, 'optionalCall', _535 => _535(intent)]);
|
|
13323
13357
|
},
|
|
13324
13358
|
onRunStarted: async (runId) => {
|
|
13325
13359
|
try {
|
|
@@ -13330,7 +13364,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13330
13364
|
{ cause: error }
|
|
13331
13365
|
);
|
|
13332
13366
|
}
|
|
13333
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13367
|
+
await _optionalChain([hooks, 'optionalAccess', _536 => _536.onRunStarted, 'optionalCall', _537 => _537(runId)]);
|
|
13334
13368
|
},
|
|
13335
13369
|
onRunAdmitted: async (runId) => {
|
|
13336
13370
|
try {
|
|
@@ -13343,7 +13377,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13343
13377
|
{ cause: error }
|
|
13344
13378
|
);
|
|
13345
13379
|
}
|
|
13346
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13380
|
+
await _optionalChain([hooks, 'optionalAccess', _538 => _538.onRunAdmitted, 'optionalCall', _539 => _539(runId)]);
|
|
13347
13381
|
}
|
|
13348
13382
|
} : hooks;
|
|
13349
13383
|
if (options.target.kind === "file") {
|
|
@@ -13352,7 +13386,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13352
13386
|
}
|
|
13353
13387
|
const resolved = _path.resolve.call(void 0, options.target.path);
|
|
13354
13388
|
const message = `File not found: ${resolved}`;
|
|
13355
|
-
if (_optionalChain([runHooks, 'optionalAccess',
|
|
13389
|
+
if (_optionalChain([runHooks, 'optionalAccess', _540 => _540.writeDryRunError])) {
|
|
13356
13390
|
runHooks.writeDryRunError(message);
|
|
13357
13391
|
return 1;
|
|
13358
13392
|
}
|
|
@@ -13395,7 +13429,7 @@ function parseRunIdPositional(args, usage2) {
|
|
|
13395
13429
|
return arg;
|
|
13396
13430
|
}
|
|
13397
13431
|
}
|
|
13398
|
-
throw new (0,
|
|
13432
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(usage2);
|
|
13399
13433
|
}
|
|
13400
13434
|
function formatRunFactLines(value) {
|
|
13401
13435
|
if (Array.isArray(value)) return value.flatMap(formatRunFactLines);
|
|
@@ -13407,6 +13441,10 @@ function formatRunFactLines(value) {
|
|
|
13407
13441
|
}
|
|
13408
13442
|
function renderRunOverviewText(overview, extras = {}) {
|
|
13409
13443
|
const { run } = overview;
|
|
13444
|
+
const reportedErrors = readRecordArray(overview.errorDetails.reported);
|
|
13445
|
+
const isRuntimeLimit = reportedErrors.some(
|
|
13446
|
+
(failure) => failure.code === "RUNTIME_LIMIT_EXCEEDED"
|
|
13447
|
+
);
|
|
13410
13448
|
const runLabel = runExecutionLabel(
|
|
13411
13449
|
deriveRunExecutionState({
|
|
13412
13450
|
status: run.status,
|
|
@@ -13427,10 +13465,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13427
13465
|
...buildRunActivityTextLines(run),
|
|
13428
13466
|
...buildRunStatusEvidenceTextLines(overview)
|
|
13429
13467
|
];
|
|
13430
|
-
if (_optionalChain([overview, 'access',
|
|
13468
|
+
if (_optionalChain([overview, 'access', _541 => _541.runStatus, 'optionalAccess', _542 => _542.available]) === false)
|
|
13431
13469
|
lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
|
|
13432
|
-
const work = readRecord(_optionalChain([readRecord, 'call',
|
|
13433
|
-
if (work && !_optionalChain([overview, 'access',
|
|
13470
|
+
const work = readRecord(_optionalChain([readRecord, 'call', _543 => _543(run), 'optionalAccess', _544 => _544.work]));
|
|
13471
|
+
if (work && !_optionalChain([overview, 'access', _545 => _545.runStatus, 'optionalAccess', _546 => _546.available]))
|
|
13434
13472
|
lines.push(
|
|
13435
13473
|
` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
|
|
13436
13474
|
);
|
|
@@ -13442,8 +13480,15 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13442
13480
|
if (retries) lines.push(` retries: ${formatRunRetrySummary(retries)}`);
|
|
13443
13481
|
else if (run.retriesUnavailableReason)
|
|
13444
13482
|
lines.push(` retries: unavailable (${run.retriesUnavailableReason})`);
|
|
13445
|
-
if (run.error)
|
|
13483
|
+
if (run.error)
|
|
13484
|
+
lines.push(
|
|
13485
|
+
` error: ${isRuntimeLimit ? "Runtime limit reached." : run.error}`
|
|
13486
|
+
);
|
|
13446
13487
|
for (const warning of overview.warnings) lines.push(` warning: ${warning}`);
|
|
13488
|
+
if ((run.status === "failed" || run.status === "cancelled") && overview.datasets.length === 0 && !Object.hasOwn(overview, "result")) {
|
|
13489
|
+
lines.push("Rows kept only in memory were not published.");
|
|
13490
|
+
}
|
|
13491
|
+
lines.push(...formatRunRecoveryCommandLines(run.id, run.status));
|
|
13447
13492
|
const sections = [];
|
|
13448
13493
|
const jsonLines = (value) => (_nullishCoalesce(JSON.stringify(value, null, 2), () => ( "unavailable"))).split("\n");
|
|
13449
13494
|
if (overview.steps.length)
|
|
@@ -13464,10 +13509,14 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13464
13509
|
(step) => `${step.stepId}: ${step.label}${step.message ? ` \u2014 ${step.message}` : ""}`
|
|
13465
13510
|
)
|
|
13466
13511
|
});
|
|
13467
|
-
if (
|
|
13512
|
+
if (reportedErrors.some((failure) => failure.code !== "RUNTIME_LIMIT_EXCEEDED"))
|
|
13468
13513
|
sections.push({
|
|
13469
13514
|
title: "Reported errors",
|
|
13470
|
-
lines: formatRunFactLines(
|
|
13515
|
+
lines: formatRunFactLines(
|
|
13516
|
+
reportedErrors.filter(
|
|
13517
|
+
(failure) => failure.code !== "RUNTIME_LIMIT_EXCEEDED"
|
|
13518
|
+
)
|
|
13519
|
+
)
|
|
13471
13520
|
});
|
|
13472
13521
|
if (overview.rowOutcomes)
|
|
13473
13522
|
sections.push({
|
|
@@ -13485,7 +13534,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13485
13534
|
...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
|
|
13486
13535
|
...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
|
|
13487
13536
|
...overview.failedLogs.entries,
|
|
13488
|
-
..._optionalChain([overview, 'access',
|
|
13537
|
+
..._optionalChain([overview, 'access', _547 => _547.failedLogs, 'access', _548 => _548.next, 'optionalAccess', _549 => _549.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
|
|
13489
13538
|
]
|
|
13490
13539
|
});
|
|
13491
13540
|
sections.push({
|
|
@@ -13545,7 +13594,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13545
13594
|
);
|
|
13546
13595
|
return `${lines.join("\n")}
|
|
13547
13596
|
|
|
13548
|
-
${
|
|
13597
|
+
${_chunkLN6RXDTBjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
|
|
13549
13598
|
}
|
|
13550
13599
|
var RUN_READ_TIMING_PROGRESS_INTERVAL_MS = 15e3;
|
|
13551
13600
|
async function withRunReadTiming(command, stage, enabled, action) {
|
|
@@ -13556,7 +13605,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
|
|
|
13556
13605
|
const progressTimer = setInterval(() => {
|
|
13557
13606
|
console.error(`[${command}] ${stage} still running after ${elapsedMs()}ms`);
|
|
13558
13607
|
}, RUN_READ_TIMING_PROGRESS_INTERVAL_MS);
|
|
13559
|
-
_optionalChain([progressTimer, 'access',
|
|
13608
|
+
_optionalChain([progressTimer, 'access', _550 => _550.unref, 'optionalCall', _551 => _551()]);
|
|
13560
13609
|
try {
|
|
13561
13610
|
const result = await action();
|
|
13562
13611
|
console.error(`[${command}] ${stage} completed in ${elapsedMs()}ms`);
|
|
@@ -13569,7 +13618,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
|
|
|
13569
13618
|
}
|
|
13570
13619
|
}
|
|
13571
13620
|
async function handleRunGet(args) {
|
|
13572
|
-
const selection =
|
|
13621
|
+
const selection = _chunkLN6RXDTBjs.parseJsonFields.call(void 0,
|
|
13573
13622
|
args,
|
|
13574
13623
|
args.includes("--config") ? "config" : "get"
|
|
13575
13624
|
);
|
|
@@ -13582,7 +13631,7 @@ async function handleRunGet(args) {
|
|
|
13582
13631
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13583
13632
|
return 1;
|
|
13584
13633
|
}
|
|
13585
|
-
const client = new (0,
|
|
13634
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
13586
13635
|
const timing = args.includes("--timing");
|
|
13587
13636
|
const web = args.includes("--web");
|
|
13588
13637
|
if (web || args.includes("--web-url")) {
|
|
@@ -13600,8 +13649,8 @@ async function handleRunGet(args) {
|
|
|
13600
13649
|
const dashboardUrl2 = _chunkXYIECA7Mjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName2);
|
|
13601
13650
|
const runUrl2 = _chunkXYIECA7Mjs.buildPlayRunUrl.call(void 0, client.baseUrl, playName2, runId);
|
|
13602
13651
|
if (web) {
|
|
13603
|
-
const opened =
|
|
13604
|
-
|
|
13652
|
+
const opened = _chunkLN6RXDTBjs.openInBrowser.call(void 0, runUrl2);
|
|
13653
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
13605
13654
|
{ dashboardUrl: dashboardUrl2, runUrl: runUrl2, opened: opened === "opened" },
|
|
13606
13655
|
{
|
|
13607
13656
|
json: args.includes("--json"),
|
|
@@ -13612,7 +13661,7 @@ async function handleRunGet(args) {
|
|
|
13612
13661
|
);
|
|
13613
13662
|
return 0;
|
|
13614
13663
|
}
|
|
13615
|
-
|
|
13664
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
13616
13665
|
{ dashboardUrl: dashboardUrl2, runUrl: runUrl2 },
|
|
13617
13666
|
{ json: args.includes("--json"), text: `${runUrl2}
|
|
13618
13667
|
` }
|
|
@@ -13637,7 +13686,7 @@ async function handleRunGet(args) {
|
|
|
13637
13686
|
"This server does not support recorded configuration reads."
|
|
13638
13687
|
);
|
|
13639
13688
|
}
|
|
13640
|
-
|
|
13689
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
13641
13690
|
{ runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
|
|
13642
13691
|
{ json: true, fields: selection.fields }
|
|
13643
13692
|
);
|
|
@@ -13650,7 +13699,7 @@ async function handleRunGet(args) {
|
|
|
13650
13699
|
timing,
|
|
13651
13700
|
() => client.getRunInput(runId)
|
|
13652
13701
|
);
|
|
13653
|
-
|
|
13702
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, input, { json: true });
|
|
13654
13703
|
return 0;
|
|
13655
13704
|
}
|
|
13656
13705
|
const full = args.includes("--full");
|
|
@@ -13665,7 +13714,7 @@ async function handleRunGet(args) {
|
|
|
13665
13714
|
failedLogs: args.includes("--log-failed")
|
|
13666
13715
|
})
|
|
13667
13716
|
);
|
|
13668
|
-
if (status.package)
|
|
13717
|
+
if (status.package) _chunkKWYGWO4Yjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
13669
13718
|
if (!status.package) {
|
|
13670
13719
|
const legacyStatus = full ? await withRunReadTiming(
|
|
13671
13720
|
"runs get",
|
|
@@ -13679,8 +13728,8 @@ async function handleRunGet(args) {
|
|
|
13679
13728
|
const legacyPlayName = resolveRunPlayName(legacyStatus, runId);
|
|
13680
13729
|
const legacyDashboardUrl = legacyPlayName ? _chunkXYIECA7Mjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, legacyPlayName) : null;
|
|
13681
13730
|
const legacyRunUrl = legacyPlayName ? _chunkXYIECA7Mjs.buildPlayRunUrl.call(void 0, client.baseUrl, legacyPlayName, runId) : null;
|
|
13682
|
-
if (
|
|
13683
|
-
|
|
13731
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
13732
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
13684
13733
|
{
|
|
13685
13734
|
...full ? legacyStatus : compactPlayStatus(legacyStatus),
|
|
13686
13735
|
...legacyDashboardUrl ? { dashboardUrl: legacyDashboardUrl } : {},
|
|
@@ -13691,7 +13740,7 @@ async function handleRunGet(args) {
|
|
|
13691
13740
|
} else {
|
|
13692
13741
|
writePlayResult(legacyStatus, false, { fullJson: full });
|
|
13693
13742
|
if (legacyRunUrl)
|
|
13694
|
-
|
|
13743
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
13695
13744
|
{ dashboardUrl: legacyDashboardUrl, runUrl: legacyRunUrl },
|
|
13696
13745
|
{ json: false, text: `run page: ${legacyRunUrl}
|
|
13697
13746
|
` }
|
|
@@ -13721,11 +13770,11 @@ async function handleRunGet(args) {
|
|
|
13721
13770
|
)
|
|
13722
13771
|
]);
|
|
13723
13772
|
const hitLines = formatRunHitsLines(hits);
|
|
13724
|
-
const json =
|
|
13773
|
+
const json = _chunkLN6RXDTBjs.argsWantJson.call(void 0, args);
|
|
13725
13774
|
const playName = resolveRunPlayName(status, runId);
|
|
13726
13775
|
const dashboardUrl = playName ? _chunkXYIECA7Mjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) : void 0;
|
|
13727
13776
|
const runUrl = playName ? _chunkXYIECA7Mjs.buildPlayRunUrl.call(void 0, client.baseUrl, playName, runId) : void 0;
|
|
13728
|
-
|
|
13777
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
13729
13778
|
{
|
|
13730
13779
|
...overview,
|
|
13731
13780
|
...dashboardUrl ? { dashboardUrl } : {},
|
|
@@ -13830,9 +13879,9 @@ async function handleRunLifecycleStatus(args) {
|
|
|
13830
13879
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13831
13880
|
return 1;
|
|
13832
13881
|
}
|
|
13833
|
-
const status = await new (0,
|
|
13834
|
-
if (
|
|
13835
|
-
|
|
13882
|
+
const status = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().runs.status(runId);
|
|
13883
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
13884
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, status, { json: true });
|
|
13836
13885
|
return 0;
|
|
13837
13886
|
}
|
|
13838
13887
|
if (!status.available) {
|
|
@@ -13898,7 +13947,7 @@ async function handleRunsRerun(args) {
|
|
|
13898
13947
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13899
13948
|
return 1;
|
|
13900
13949
|
}
|
|
13901
|
-
const options = { json:
|
|
13950
|
+
const options = { json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args) };
|
|
13902
13951
|
for (let index = 0; index < args.length; index += 1) {
|
|
13903
13952
|
if (args[index] === "--idempotency-key") {
|
|
13904
13953
|
options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
|
|
@@ -13964,8 +14013,8 @@ ${usage2}
|
|
|
13964
14013
|
Discover Plays: ${next.discover}
|
|
13965
14014
|
Active runs: ${next.running}`
|
|
13966
14015
|
);
|
|
13967
|
-
if (
|
|
13968
|
-
|
|
14016
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
14017
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
13969
14018
|
{ ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
|
|
13970
14019
|
{ json: true }
|
|
13971
14020
|
);
|
|
@@ -13980,7 +14029,7 @@ Active runs: ${next.running}`
|
|
|
13980
14029
|
console.error("--offset requires --play.");
|
|
13981
14030
|
return 1;
|
|
13982
14031
|
}
|
|
13983
|
-
const client = new (0,
|
|
14032
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
13984
14033
|
const page = await withRunReadTiming(
|
|
13985
14034
|
"runs list",
|
|
13986
14035
|
"run inventory",
|
|
@@ -14015,7 +14064,7 @@ Active runs: ${next.running}`
|
|
|
14015
14064
|
executionTime: run.executionTime,
|
|
14016
14065
|
billingTotalCredits: run.billingTotalCredits,
|
|
14017
14066
|
billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
|
|
14018
|
-
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access',
|
|
14067
|
+
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _552 => _552.memo, 'optionalAccess', _553 => _553.playName]))), () => ( playName)), () => ( null)),
|
|
14019
14068
|
...nodeId ? { nodeObservation: _nullishCoalesce(run.nodeObservation, () => ( null)) } : {}
|
|
14020
14069
|
}));
|
|
14021
14070
|
const lines = runs.length === 0 ? [
|
|
@@ -14047,14 +14096,14 @@ Active runs: ${next.running}`
|
|
|
14047
14096
|
return lines2.join("\n");
|
|
14048
14097
|
});
|
|
14049
14098
|
const nextOffset = (_nullishCoalesce(_nullishCoalesce(page.offset, () => ( offset)), () => ( 0))) + runs.length;
|
|
14050
|
-
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}${
|
|
14099
|
+
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}${_chunkLN6RXDTBjs.argsWantJson.call(void 0, args) ? " --json" : ""}` : null;
|
|
14051
14100
|
if (page.hasMore) {
|
|
14052
14101
|
lines.push("List truncated \u2014 more runs match this filter.");
|
|
14053
14102
|
lines.push(
|
|
14054
14103
|
nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
|
|
14055
14104
|
);
|
|
14056
14105
|
}
|
|
14057
|
-
|
|
14106
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
14058
14107
|
{
|
|
14059
14108
|
runs,
|
|
14060
14109
|
count: runs.length,
|
|
@@ -14064,11 +14113,11 @@ Active runs: ${next.running}`
|
|
|
14064
14113
|
...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
|
|
14065
14114
|
next: {
|
|
14066
14115
|
page: nextPage,
|
|
14067
|
-
get: _optionalChain([runs, 'access',
|
|
14116
|
+
get: _optionalChain([runs, 'access', _554 => _554[0], 'optionalAccess', _555 => _555.id]) ? `deepline runs get ${runs[0].id}` : null
|
|
14068
14117
|
},
|
|
14069
14118
|
render: { sections: [{ title: "runs", lines }] }
|
|
14070
14119
|
},
|
|
14071
|
-
{ json:
|
|
14120
|
+
{ json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args) }
|
|
14072
14121
|
);
|
|
14073
14122
|
return 0;
|
|
14074
14123
|
}
|
|
@@ -14098,7 +14147,7 @@ async function handleRunTail(args) {
|
|
|
14098
14147
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
14099
14148
|
return 1;
|
|
14100
14149
|
}
|
|
14101
|
-
const parsed =
|
|
14150
|
+
const parsed = _chunk2B4IOGFDjs.parseLogLevel.call(void 0, value);
|
|
14102
14151
|
if (!parsed) {
|
|
14103
14152
|
console.error(
|
|
14104
14153
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -14136,9 +14185,9 @@ async function handleRunTail(args) {
|
|
|
14136
14185
|
);
|
|
14137
14186
|
return 1;
|
|
14138
14187
|
}
|
|
14139
|
-
const client = new (0,
|
|
14188
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
14140
14189
|
const jsonLines = args.includes("--jsonl");
|
|
14141
|
-
const jsonOutput = !jsonLines &&
|
|
14190
|
+
const jsonOutput = !jsonLines && _chunkLN6RXDTBjs.argsWantJson.call(void 0, args);
|
|
14142
14191
|
const compact = args.includes("--compact");
|
|
14143
14192
|
const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
|
|
14144
14193
|
const compactState = {
|
|
@@ -14219,7 +14268,7 @@ async function handleRunLogs(args) {
|
|
|
14219
14268
|
]);
|
|
14220
14269
|
const cursorIndex = args.indexOf("--cursor");
|
|
14221
14270
|
const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
14222
|
-
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue &&
|
|
14271
|
+
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunk2B4IOGFDjs.isRunLogsCursor.call(void 0, cursorValue));
|
|
14223
14272
|
if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
|
|
14224
14273
|
return handleRunEventSearch(args);
|
|
14225
14274
|
}
|
|
@@ -14253,7 +14302,7 @@ async function handleRunLogs(args) {
|
|
|
14253
14302
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
14254
14303
|
return 1;
|
|
14255
14304
|
}
|
|
14256
|
-
const parsed =
|
|
14305
|
+
const parsed = _chunk2B4IOGFDjs.parseLogLevel.call(void 0, value);
|
|
14257
14306
|
if (!parsed) {
|
|
14258
14307
|
console.error(
|
|
14259
14308
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -14300,12 +14349,12 @@ async function handleRunLogs(args) {
|
|
|
14300
14349
|
);
|
|
14301
14350
|
return 1;
|
|
14302
14351
|
}
|
|
14303
|
-
const client = new (0,
|
|
14352
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
14304
14353
|
if (outPath) {
|
|
14305
14354
|
const result2 = await client.runs.logs(runId, { all: true });
|
|
14306
|
-
const logs = result2.entries.filter((line) =>
|
|
14355
|
+
const logs = result2.entries.filter((line) => _chunk2B4IOGFDjs.logLevelReaches.call(void 0, _chunk2B4IOGFDjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunk2B4IOGFDjs.classifyLogLine.call(void 0, line).line);
|
|
14307
14356
|
_fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
|
14308
|
-
|
|
14357
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
14309
14358
|
{
|
|
14310
14359
|
runId: result2.runId,
|
|
14311
14360
|
log_path: outPath,
|
|
@@ -14328,7 +14377,7 @@ async function handleRunLogs(args) {
|
|
|
14328
14377
|
]
|
|
14329
14378
|
}
|
|
14330
14379
|
},
|
|
14331
|
-
{ json:
|
|
14380
|
+
{ json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args) }
|
|
14332
14381
|
);
|
|
14333
14382
|
return 0;
|
|
14334
14383
|
}
|
|
@@ -14359,7 +14408,7 @@ async function handleRunLogs(args) {
|
|
|
14359
14408
|
}
|
|
14360
14409
|
};
|
|
14361
14410
|
const text = buildRunLogsText(filteredResult);
|
|
14362
|
-
|
|
14411
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
14363
14412
|
{
|
|
14364
14413
|
runId: result.runId,
|
|
14365
14414
|
totalCount: result.totalCount,
|
|
@@ -14383,7 +14432,7 @@ async function handleRunLogs(args) {
|
|
|
14383
14432
|
render: { sections: [{ title: "run logs", lines: entries }] }
|
|
14384
14433
|
},
|
|
14385
14434
|
{
|
|
14386
|
-
json:
|
|
14435
|
+
json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args),
|
|
14387
14436
|
text
|
|
14388
14437
|
}
|
|
14389
14438
|
);
|
|
@@ -14407,17 +14456,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
14407
14456
|
);
|
|
14408
14457
|
}
|
|
14409
14458
|
const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
|
|
14410
|
-
(entry) =>
|
|
14459
|
+
(entry) => _chunk2B4IOGFDjs.logLevelReaches.call(void 0, _chunk2B4IOGFDjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
|
|
14411
14460
|
);
|
|
14412
14461
|
const selected = matching.slice(-limit);
|
|
14413
14462
|
const olderMatchesExist = matching.length > selected.length;
|
|
14414
14463
|
return {
|
|
14415
14464
|
entries: selected.map((entry) => entry.line),
|
|
14416
|
-
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14417
|
-
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14465
|
+
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _556 => _556[0], 'optionalAccess', _557 => _557.seq]), () => ( null)),
|
|
14466
|
+
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _558 => _558.at, 'call', _559 => _559(-1), 'optionalAccess', _560 => _560.seq]), () => ( null)),
|
|
14418
14467
|
truncated: result.truncated || olderMatchesExist,
|
|
14419
14468
|
hasMore: olderMatchesExist,
|
|
14420
|
-
nextCursor: olderMatchesExist ?
|
|
14469
|
+
nextCursor: olderMatchesExist ? _chunk2B4IOGFDjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
|
|
14421
14470
|
};
|
|
14422
14471
|
}
|
|
14423
14472
|
async function handleRunEventSearch(args) {
|
|
@@ -14484,7 +14533,7 @@ ${usage2}`);
|
|
|
14484
14533
|
namespace,
|
|
14485
14534
|
...backend ? { backend } : {}
|
|
14486
14535
|
} : void 0;
|
|
14487
|
-
const client = new (0,
|
|
14536
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
14488
14537
|
const result = await client.runs.searchEvents({
|
|
14489
14538
|
...runId ? { runId } : {},
|
|
14490
14539
|
...values["--since"] ? { since: values["--since"] } : {},
|
|
@@ -14556,7 +14605,7 @@ ${renderedDetails}` : ""}`;
|
|
|
14556
14605
|
"--limit",
|
|
14557
14606
|
String(limit)
|
|
14558
14607
|
].join(" ") : null;
|
|
14559
|
-
|
|
14608
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
14560
14609
|
{
|
|
14561
14610
|
events,
|
|
14562
14611
|
nextCursor: result.nextCursor,
|
|
@@ -14567,19 +14616,19 @@ ${renderedDetails}` : ""}`;
|
|
|
14567
14616
|
render: { sections: [{ title: "runtime events", lines }] }
|
|
14568
14617
|
},
|
|
14569
14618
|
{
|
|
14570
|
-
json:
|
|
14619
|
+
json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args),
|
|
14571
14620
|
text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
|
|
14572
14621
|
}
|
|
14573
14622
|
);
|
|
14574
14623
|
return 0;
|
|
14575
14624
|
}
|
|
14576
14625
|
function buildRunLogsText(result) {
|
|
14577
|
-
const lines = result.entries.map((line) =>
|
|
14626
|
+
const lines = result.entries.map((line) => _chunk2B4IOGFDjs.classifyLogLine.call(void 0, line).line);
|
|
14578
14627
|
if (result.warning) {
|
|
14579
14628
|
if (lines.length > 0) lines.push("");
|
|
14580
14629
|
lines.push(`warning: ${result.warning}`);
|
|
14581
14630
|
lines.push(
|
|
14582
|
-
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access',
|
|
14631
|
+
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _561 => _561.next, 'optionalAccess', _562 => _562.logs]), () => ( `deepline runs logs ${result.runId} --out run.log`))}`
|
|
14583
14632
|
);
|
|
14584
14633
|
}
|
|
14585
14634
|
return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
|
|
@@ -14608,7 +14657,7 @@ async function handleRunStop(args) {
|
|
|
14608
14657
|
reason = args[++index];
|
|
14609
14658
|
}
|
|
14610
14659
|
}
|
|
14611
|
-
const client = new (0,
|
|
14660
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
14612
14661
|
const result = await client.runs.stop(runId, { reason });
|
|
14613
14662
|
const state = resolveRunStopState(result);
|
|
14614
14663
|
const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
|
|
@@ -14623,7 +14672,7 @@ async function handleRunStop(args) {
|
|
|
14623
14672
|
...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
|
|
14624
14673
|
`inspect: deepline runs get ${runId} --full`
|
|
14625
14674
|
];
|
|
14626
|
-
|
|
14675
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
14627
14676
|
{
|
|
14628
14677
|
...cancelling,
|
|
14629
14678
|
state,
|
|
@@ -14638,7 +14687,7 @@ async function handleRunStop(args) {
|
|
|
14638
14687
|
]
|
|
14639
14688
|
}
|
|
14640
14689
|
},
|
|
14641
|
-
{ json:
|
|
14690
|
+
{ json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args) }
|
|
14642
14691
|
);
|
|
14643
14692
|
return 0;
|
|
14644
14693
|
}
|
|
@@ -14655,7 +14704,7 @@ async function handleRunStop(args) {
|
|
|
14655
14704
|
];
|
|
14656
14705
|
process.stderr.write(`${lines2.join("\n")}
|
|
14657
14706
|
`);
|
|
14658
|
-
|
|
14707
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
14659
14708
|
{
|
|
14660
14709
|
...result,
|
|
14661
14710
|
render: {
|
|
@@ -14670,7 +14719,7 @@ async function handleRunStop(args) {
|
|
|
14670
14719
|
]
|
|
14671
14720
|
}
|
|
14672
14721
|
},
|
|
14673
|
-
{ json:
|
|
14722
|
+
{ json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args) }
|
|
14674
14723
|
);
|
|
14675
14724
|
return 1;
|
|
14676
14725
|
}
|
|
@@ -14681,12 +14730,12 @@ async function handleRunStop(args) {
|
|
|
14681
14730
|
`warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
|
|
14682
14731
|
] : []
|
|
14683
14732
|
];
|
|
14684
|
-
|
|
14733
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
14685
14734
|
{
|
|
14686
14735
|
...result,
|
|
14687
14736
|
render: { sections: [{ title: "run stop", lines }] }
|
|
14688
14737
|
},
|
|
14689
|
-
{ json:
|
|
14738
|
+
{ json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args) }
|
|
14690
14739
|
);
|
|
14691
14740
|
return 0;
|
|
14692
14741
|
}
|
|
@@ -14736,18 +14785,18 @@ async function handleRunStopAll(args) {
|
|
|
14736
14785
|
reason = args[++index];
|
|
14737
14786
|
}
|
|
14738
14787
|
}
|
|
14739
|
-
const client = new (0,
|
|
14788
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
14740
14789
|
if (dryRun) {
|
|
14741
14790
|
const result2 = await client.runs.stopAll({ dryRun: true, reason });
|
|
14742
14791
|
const lines2 = buildStopAllDryRunTextLines(result2);
|
|
14743
|
-
|
|
14792
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
14744
14793
|
{
|
|
14745
14794
|
...result2,
|
|
14746
14795
|
render: {
|
|
14747
14796
|
sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
|
|
14748
14797
|
}
|
|
14749
14798
|
},
|
|
14750
|
-
{ json:
|
|
14799
|
+
{ json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
|
|
14751
14800
|
` }
|
|
14752
14801
|
);
|
|
14753
14802
|
return 0;
|
|
@@ -14760,17 +14809,17 @@ async function handleRunStopAll(args) {
|
|
|
14760
14809
|
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
14761
14810
|
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
14762
14811
|
];
|
|
14763
|
-
|
|
14812
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
14764
14813
|
{
|
|
14765
14814
|
...result,
|
|
14766
14815
|
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
14767
14816
|
},
|
|
14768
|
-
{ json:
|
|
14817
|
+
{ json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args) }
|
|
14769
14818
|
);
|
|
14770
14819
|
return result.failed > 0 || result.partial ? 1 : 0;
|
|
14771
14820
|
}
|
|
14772
14821
|
async function handleRunExport(args) {
|
|
14773
|
-
const selection =
|
|
14822
|
+
const selection = _chunkLN6RXDTBjs.parseJsonFields.call(void 0, args, "export");
|
|
14774
14823
|
args = selection.args;
|
|
14775
14824
|
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]";
|
|
14776
14825
|
let runId;
|
|
@@ -14804,7 +14853,7 @@ async function handleRunExport(args) {
|
|
|
14804
14853
|
if (arg === "--summary") {
|
|
14805
14854
|
const value = args[++index];
|
|
14806
14855
|
if (value !== "full" && value !== "counts") {
|
|
14807
|
-
throw new (0,
|
|
14856
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
14808
14857
|
"Invalid --summary. Choose full or counts.",
|
|
14809
14858
|
void 0,
|
|
14810
14859
|
"INVALID_ARGUMENT"
|
|
@@ -14815,7 +14864,7 @@ async function handleRunExport(args) {
|
|
|
14815
14864
|
if (arg === "--timeout-ms") {
|
|
14816
14865
|
waitTimeoutMs = parsePositiveInteger(_nullishCoalesce(args[++index], () => ( "")), arg);
|
|
14817
14866
|
if (!wait) {
|
|
14818
|
-
throw new (0,
|
|
14867
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
14819
14868
|
"--timeout-ms requires --wait.",
|
|
14820
14869
|
void 0,
|
|
14821
14870
|
"INVALID_ARGUMENT"
|
|
@@ -14828,30 +14877,30 @@ async function handleRunExport(args) {
|
|
|
14828
14877
|
return 1;
|
|
14829
14878
|
}
|
|
14830
14879
|
if (format !== "csv" && format !== "json") {
|
|
14831
|
-
throw new (0,
|
|
14880
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
14832
14881
|
"Invalid --format. Choose csv or json.",
|
|
14833
14882
|
void 0,
|
|
14834
14883
|
"INVALID_ARGUMENT"
|
|
14835
14884
|
);
|
|
14836
14885
|
}
|
|
14837
14886
|
if (metadataOutPath === outPath) {
|
|
14838
|
-
throw new (0,
|
|
14887
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
14839
14888
|
"--metadata-out must differ from --out.",
|
|
14840
14889
|
void 0,
|
|
14841
14890
|
"INVALID_ARGUMENT"
|
|
14842
14891
|
);
|
|
14843
14892
|
}
|
|
14844
|
-
const client = new (0,
|
|
14893
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
14845
14894
|
let status = await client.getPlayStatus(runId, { full: true });
|
|
14846
14895
|
assertRunExportStatusIdentity(status, runId);
|
|
14847
14896
|
if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
|
|
14848
|
-
const progress =
|
|
14897
|
+
const progress = _chunkHWDKRN7Ljs.createCliProgress.call(void 0, !_chunkLN6RXDTBjs.argsWantJson.call(void 0, args));
|
|
14849
14898
|
try {
|
|
14850
14899
|
await waitForPlayCompletionByWatch({
|
|
14851
14900
|
client,
|
|
14852
14901
|
playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
|
|
14853
14902
|
workflowId: runId,
|
|
14854
|
-
jsonOutput:
|
|
14903
|
+
jsonOutput: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args),
|
|
14855
14904
|
emitLogs: false,
|
|
14856
14905
|
waitTimeoutMs,
|
|
14857
14906
|
startedAt: Date.now(),
|
|
@@ -14877,26 +14926,26 @@ async function handleRunExport(args) {
|
|
|
14877
14926
|
format,
|
|
14878
14927
|
summary
|
|
14879
14928
|
});
|
|
14880
|
-
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14881
|
-
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess',
|
|
14929
|
+
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _563 => _563.rowsInfo, 'access', _564 => _564.source]), () => ( datasetPath)), () => ( null));
|
|
14930
|
+
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _565 => _565.currentTable]) ? {
|
|
14882
14931
|
code: "CURRENT_SHARED_DATASET",
|
|
14883
14932
|
message: "This export is the current shared dataset and may include writes from another run.",
|
|
14884
14933
|
full_run_output_command: `deepline runs get ${status.runId} --full`
|
|
14885
14934
|
} : null;
|
|
14886
14935
|
const navigation = buildRunNavigation(status);
|
|
14887
|
-
const resolved = _optionalChain([exportResult, 'optionalAccess',
|
|
14936
|
+
const resolved = _optionalChain([exportResult, 'optionalAccess', _566 => _566.datasetInfo]);
|
|
14888
14937
|
const identity = navigation.datasets.find(
|
|
14889
|
-
(dataset) => _optionalChain([resolved, 'optionalAccess',
|
|
14938
|
+
(dataset) => _optionalChain([resolved, 'optionalAccess', _567 => _567.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _568 => _568.tableNamespace])
|
|
14890
14939
|
);
|
|
14891
14940
|
const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
|
|
14892
14941
|
const exportCommand = runExportRetryCommand(
|
|
14893
14942
|
status.runId,
|
|
14894
14943
|
outPath,
|
|
14895
|
-
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess',
|
|
14944
|
+
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _569 => _569.datasetPath]))),
|
|
14896
14945
|
{ format, summary }
|
|
14897
14946
|
) + (args.includes("--allow-empty") ? " --allow-empty" : "");
|
|
14898
|
-
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14899
|
-
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess',
|
|
14947
|
+
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _570 => _570.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _571 => _571.path]), () => ( null)) };
|
|
14948
|
+
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _572 => _572.rowsInfo, 'access', _573 => _573.exportedRowOutcomes]);
|
|
14900
14949
|
const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
|
|
14901
14950
|
count: exportedRowOutcomes.failed,
|
|
14902
14951
|
message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
|
|
@@ -14916,17 +14965,17 @@ async function handleRunExport(args) {
|
|
|
14916
14965
|
...fileLocation,
|
|
14917
14966
|
format,
|
|
14918
14967
|
source,
|
|
14919
|
-
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14968
|
+
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _574 => _574.rowsInfo, 'access', _575 => _575.totalRows]), () => ( null)),
|
|
14920
14969
|
...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
|
|
14921
14970
|
...rowFailures ? { rowFailures } : {},
|
|
14922
|
-
columns:
|
|
14971
|
+
columns: _chunkKWYGWO4Yjs.underscoreKeysLast.call(void 0, _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _576 => _576.rowsInfo, 'access', _577 => _577.columns]), () => ( []))),
|
|
14923
14972
|
...currentTableNotice ? { notice: currentTableNotice } : {},
|
|
14924
14973
|
...metadataOutPath ? { metadata_path: metadataOutPath } : {},
|
|
14925
14974
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
|
|
14926
14975
|
};
|
|
14927
14976
|
const lines = withRunNavigationLines(
|
|
14928
14977
|
[
|
|
14929
|
-
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14978
|
+
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _578 => _578.path]), () => ( outPath))}`,
|
|
14930
14979
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
|
|
14931
14980
|
`Partial export: run is ${status.status}; more rows may be saved.`,
|
|
14932
14981
|
`Export after completion: ${exportCommand} --wait`
|
|
@@ -14953,8 +15002,8 @@ async function handleRunExport(args) {
|
|
|
14953
15002
|
"utf-8"
|
|
14954
15003
|
);
|
|
14955
15004
|
}
|
|
14956
|
-
|
|
14957
|
-
json:
|
|
15005
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
|
|
15006
|
+
json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args),
|
|
14958
15007
|
fields: selection.fields,
|
|
14959
15008
|
text: `${lines.join("\n")}
|
|
14960
15009
|
`
|
|
@@ -14963,7 +15012,7 @@ async function handleRunExport(args) {
|
|
|
14963
15012
|
}
|
|
14964
15013
|
function assertRunExportStatusIdentity(status, requestedRunId) {
|
|
14965
15014
|
if (status.runId === requestedRunId) return;
|
|
14966
|
-
throw new (0,
|
|
15015
|
+
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
14967
15016
|
`Run status identity did not match requested run ${requestedRunId}; refusing to export rows for ${status.runId || "an unidentified run"}.`,
|
|
14968
15017
|
void 0,
|
|
14969
15018
|
"RUN_EXPORT_SCOPE_MISMATCH",
|
|
@@ -14988,10 +15037,10 @@ async function handlePlayGet(args) {
|
|
|
14988
15037
|
);
|
|
14989
15038
|
return 2;
|
|
14990
15039
|
}
|
|
14991
|
-
const client = new (0,
|
|
15040
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
14992
15041
|
const explicitJson = args.includes("--json");
|
|
14993
15042
|
const sourceOutput = args.includes("--source");
|
|
14994
|
-
const jsonOutput = sourceOutput ? explicitJson :
|
|
15043
|
+
const jsonOutput = sourceOutput ? explicitJson : _chunkLN6RXDTBjs.argsWantJson.call(void 0, args);
|
|
14995
15044
|
const requestedRevisionFlags = [
|
|
14996
15045
|
args.includes("--working"),
|
|
14997
15046
|
args.includes("--live"),
|
|
@@ -15044,7 +15093,7 @@ async function handlePlayGet(args) {
|
|
|
15044
15093
|
...includeSource ? { source: sourceSelector } : {}
|
|
15045
15094
|
});
|
|
15046
15095
|
const source = detail.source;
|
|
15047
|
-
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
15096
|
+
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _579 => _579.files, 'access', _580 => _580[source.entryFile]]), () => ( ""));
|
|
15048
15097
|
let materializedFile = null;
|
|
15049
15098
|
try {
|
|
15050
15099
|
materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
|
|
@@ -15054,7 +15103,7 @@ async function handlePlayGet(args) {
|
|
|
15054
15103
|
}
|
|
15055
15104
|
const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
|
|
15056
15105
|
if (jsonOutput) {
|
|
15057
|
-
|
|
15106
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, {
|
|
15058
15107
|
...detail,
|
|
15059
15108
|
...materializedFile ? {
|
|
15060
15109
|
message: loadedMessage,
|
|
@@ -15095,16 +15144,16 @@ async function handlePlayGet(args) {
|
|
|
15095
15144
|
}
|
|
15096
15145
|
console.log(`Play: ${formatPlayReference(detail.play)}`);
|
|
15097
15146
|
console.log(
|
|
15098
|
-
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
15147
|
+
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _581 => _581.play, 'access', _582 => _582.workingRevision, 'optionalAccess', _583 => _583.version]), () => ( "\u2014"))}`
|
|
15099
15148
|
);
|
|
15100
|
-
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
15149
|
+
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _584 => _584.play, 'access', _585 => _585.liveRevision, 'optionalAccess', _586 => _586.version]), () => ( "\u2014"))}`);
|
|
15101
15150
|
if (detail.play.liveRevision) {
|
|
15102
15151
|
console.log(
|
|
15103
15152
|
`Live max credits per run: ${liveMaxCreditsPerRun(detail.play.liveRevision.sourceCode)}`
|
|
15104
15153
|
);
|
|
15105
15154
|
}
|
|
15106
15155
|
console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
|
|
15107
|
-
if (detail.play.isDraftDirty && _optionalChain([detail, 'access',
|
|
15156
|
+
if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _587 => _587.play, 'access', _588 => _588.liveRevision, 'optionalAccess', _589 => _589.version])) {
|
|
15108
15157
|
console.log(
|
|
15109
15158
|
` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
|
|
15110
15159
|
);
|
|
@@ -15116,7 +15165,7 @@ async function handlePlayGet(args) {
|
|
|
15116
15165
|
console.log(line);
|
|
15117
15166
|
}
|
|
15118
15167
|
console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
|
|
15119
|
-
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
15168
|
+
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _590 => _590.sheetSummary, 'optionalAccess', _591 => _591.stats, 'optionalAccess', _592 => _592.total]), () => ( 0))}`);
|
|
15120
15169
|
if (detail.customerDbUrl) {
|
|
15121
15170
|
console.log(`Customer DB: ${detail.customerDbUrl}`);
|
|
15122
15171
|
}
|
|
@@ -15132,7 +15181,7 @@ async function handlePlayGet(args) {
|
|
|
15132
15181
|
return 0;
|
|
15133
15182
|
}
|
|
15134
15183
|
function formatVersionLine(version) {
|
|
15135
|
-
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access',
|
|
15184
|
+
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _593 => _593.artifactHash, 'optionalAccess', _594 => _594.slice, 'call', _595 => _595(0, 12)]), () => ( "unknown-revision"));
|
|
15136
15185
|
const state = [
|
|
15137
15186
|
version.isLive ? "live" : null,
|
|
15138
15187
|
version.isWorking ? "working" : null
|
|
@@ -15146,8 +15195,8 @@ async function handlePlayVersions(args) {
|
|
|
15146
15195
|
console.error("Usage: deepline plays versions --name <name> [--json]");
|
|
15147
15196
|
return 1;
|
|
15148
15197
|
}
|
|
15149
|
-
const client = new (0,
|
|
15150
|
-
const jsonOutput =
|
|
15198
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
15199
|
+
const jsonOutput = _chunkLN6RXDTBjs.argsWantJson.call(void 0, args);
|
|
15151
15200
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
15152
15201
|
command: "versions"
|
|
15153
15202
|
});
|
|
@@ -15155,7 +15204,7 @@ async function handlePlayVersions(args) {
|
|
|
15155
15204
|
parseReferencedPlayTarget(playName).playName
|
|
15156
15205
|
);
|
|
15157
15206
|
if (jsonOutput) {
|
|
15158
|
-
|
|
15207
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, { versions });
|
|
15159
15208
|
return 0;
|
|
15160
15209
|
}
|
|
15161
15210
|
if (versions.length === 0) {
|
|
@@ -15168,23 +15217,19 @@ async function handlePlayVersions(args) {
|
|
|
15168
15217
|
return 0;
|
|
15169
15218
|
}
|
|
15170
15219
|
function formatPlayCostEstimate(estimate) {
|
|
15171
|
-
const computeSummary = _optionalChain([estimate, 'optionalAccess', _594 => _594.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)` : "";
|
|
15172
15220
|
if (!estimate || estimate.status === "unavailable") {
|
|
15173
|
-
return `unavailable${estimate ? `: ${estimate.message}
|
|
15221
|
+
return `unavailable${estimate ? `: ${estimate.message}` : ""}`;
|
|
15174
15222
|
}
|
|
15175
15223
|
const credits = estimate.lowCredits === estimate.highCredits ? `${estimate.source === "observed" ? "~" : ""}${formatCredits(estimate.lowCredits)}` : `${formatCredits(estimate.lowCredits)}\u2013${formatCredits(estimate.highCredits)}`;
|
|
15176
15224
|
const unit = estimate.unit === "row" ? "output row" : "run";
|
|
15177
15225
|
const source = estimate.source === "observed" ? `observed from ${estimate.sampleRunCount} ${estimate.sampleRunCount === 1 ? "run" : "runs"}` : "static estimate";
|
|
15178
|
-
return `${credits} Deepline credits per ${unit} (${source})
|
|
15226
|
+
return `${credits} Deepline credits per ${unit} (${source})`;
|
|
15179
15227
|
}
|
|
15180
15228
|
function formatCredits(value) {
|
|
15181
15229
|
return value.toLocaleString("en-US", {
|
|
15182
15230
|
maximumFractionDigits: value < 1 ? 4 : 2
|
|
15183
15231
|
});
|
|
15184
15232
|
}
|
|
15185
|
-
function formatSandboxBackend(backend) {
|
|
15186
|
-
return backend === "daytona" ? "Daytona" : "Modal";
|
|
15187
|
-
}
|
|
15188
15233
|
var PREBUILT_PLAY_TAG_KEYS = [
|
|
15189
15234
|
"smb",
|
|
15190
15235
|
"find-prospects",
|
|
@@ -15198,8 +15243,8 @@ async function handlePlayCost(args) {
|
|
|
15198
15243
|
console.error("Usage: deepline plays cost <play> [--json]");
|
|
15199
15244
|
return 2;
|
|
15200
15245
|
}
|
|
15201
|
-
const result = await new (0,
|
|
15202
|
-
if (
|
|
15246
|
+
const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().getPlayCostEstimate(name);
|
|
15247
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) console.log(JSON.stringify(result, null, 2));
|
|
15203
15248
|
else
|
|
15204
15249
|
console.log(
|
|
15205
15250
|
`${result.reference}: ${formatPlayCostEstimate(result.costEstimate)}`
|
|
@@ -15207,11 +15252,11 @@ async function handlePlayCost(args) {
|
|
|
15207
15252
|
return 0;
|
|
15208
15253
|
}
|
|
15209
15254
|
async function handlePlayList(args) {
|
|
15210
|
-
const jsonOutput =
|
|
15255
|
+
const jsonOutput = _chunkLN6RXDTBjs.argsWantJson.call(void 0, args);
|
|
15211
15256
|
const showCost = args.includes("--show-cost");
|
|
15212
|
-
const client = new (0,
|
|
15257
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
15213
15258
|
const categoriesIndex = args.indexOf("--categories");
|
|
15214
|
-
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access',
|
|
15259
|
+
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _596 => _596[categoriesIndex + 1], 'optionalAccess', _597 => _597.trim, 'call', _598 => _598()]) : void 0;
|
|
15215
15260
|
const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
|
|
15216
15261
|
if (args.includes("--tag") && tags.length === 0) {
|
|
15217
15262
|
console.error(
|
|
@@ -15232,7 +15277,7 @@ async function handlePlayList(args) {
|
|
|
15232
15277
|
const cursorIndex = args.indexOf("--cursor");
|
|
15233
15278
|
const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
|
|
15234
15279
|
const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
15235
|
-
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess',
|
|
15280
|
+
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _599 => _599.trim, 'call', _600 => _600()])) {
|
|
15236
15281
|
console.error("Pass a positive --limit and a non-empty --cursor.");
|
|
15237
15282
|
return 2;
|
|
15238
15283
|
}
|
|
@@ -15273,7 +15318,7 @@ async function handlePlayList(args) {
|
|
|
15273
15318
|
if (play.inputSchema || play.hasInputSchema) {
|
|
15274
15319
|
lines.push(" inputSchema: yes");
|
|
15275
15320
|
}
|
|
15276
|
-
if (_optionalChain([play, 'access',
|
|
15321
|
+
if (_optionalChain([play, 'access', _601 => _601.triggerStatus, 'optionalAccess', _602 => _602.cron])) {
|
|
15277
15322
|
lines.push(
|
|
15278
15323
|
` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
|
|
15279
15324
|
);
|
|
@@ -15293,12 +15338,12 @@ async function handlePlayList(args) {
|
|
|
15293
15338
|
} else {
|
|
15294
15339
|
lines.push(" scheduled execution: not configured");
|
|
15295
15340
|
}
|
|
15296
|
-
if (_optionalChain([play, 'access',
|
|
15341
|
+
if (_optionalChain([play, 'access', _603 => _603.triggerStatus, 'optionalAccess', _604 => _604.webhook])) {
|
|
15297
15342
|
lines.push(` webhook: ${play.triggerStatus.webhook}`);
|
|
15298
15343
|
}
|
|
15299
15344
|
if (showCost) {
|
|
15300
15345
|
lines.push(
|
|
15301
|
-
` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access',
|
|
15346
|
+
` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access', _605 => _605.observedCost, 'optionalAccess', _606 => _606.displayText]), () => ( formatPlayCostEstimate(play.costEstimate)))}`
|
|
15302
15347
|
);
|
|
15303
15348
|
}
|
|
15304
15349
|
lines.push(` run: deepline run ${reference}`);
|
|
@@ -15307,7 +15352,7 @@ async function handlePlayList(args) {
|
|
|
15307
15352
|
lines.push("List truncated \u2014 more plays are available.");
|
|
15308
15353
|
lines.push(`Next page: ${nextPage}`);
|
|
15309
15354
|
}
|
|
15310
|
-
|
|
15355
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
15311
15356
|
{
|
|
15312
15357
|
plays,
|
|
15313
15358
|
count: plays.length,
|
|
@@ -15324,8 +15369,8 @@ async function handlePlayList(args) {
|
|
|
15324
15369
|
return 0;
|
|
15325
15370
|
}
|
|
15326
15371
|
async function handlePlayPin(args, pinned) {
|
|
15327
|
-
const target = _optionalChain([args, 'access',
|
|
15328
|
-
const jsonOutput =
|
|
15372
|
+
const target = _optionalChain([args, 'access', _607 => _607.find, 'call', _608 => _608((arg) => !arg.startsWith("-")), 'optionalAccess', _609 => _609.trim, 'call', _610 => _610()]);
|
|
15373
|
+
const jsonOutput = _chunkLN6RXDTBjs.argsWantJson.call(void 0, args);
|
|
15329
15374
|
const dryRun = args.includes("--dry-run");
|
|
15330
15375
|
if (!target) {
|
|
15331
15376
|
console.error(
|
|
@@ -15343,11 +15388,11 @@ async function handlePlayPin(args, pinned) {
|
|
|
15343
15388
|
const name = parsedTarget.playName;
|
|
15344
15389
|
const plan = { name, pinned, dryRun };
|
|
15345
15390
|
if (dryRun) {
|
|
15346
|
-
|
|
15391
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, plan);
|
|
15347
15392
|
return 0;
|
|
15348
15393
|
}
|
|
15349
|
-
const result = await new (0,
|
|
15350
|
-
if (jsonOutput)
|
|
15394
|
+
const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().setPlayPinned(name, pinned);
|
|
15395
|
+
if (jsonOutput) _chunkLN6RXDTBjs.printCompactJson.call(void 0, result);
|
|
15351
15396
|
else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
|
|
15352
15397
|
return 0;
|
|
15353
15398
|
}
|
|
@@ -15395,7 +15440,7 @@ function printPlayDescription(play) {
|
|
|
15395
15440
|
console.log(` ${line}`);
|
|
15396
15441
|
}
|
|
15397
15442
|
}
|
|
15398
|
-
if (_optionalChain([play, 'access',
|
|
15443
|
+
if (_optionalChain([play, 'access', _611 => _611.toolCategories, 'optionalAccess', _612 => _612.length])) {
|
|
15399
15444
|
console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
|
|
15400
15445
|
}
|
|
15401
15446
|
if (play.aliases.length > 0) {
|
|
@@ -15440,7 +15485,7 @@ function printPlayDescription(play) {
|
|
|
15440
15485
|
const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
|
|
15441
15486
|
if (runtimeLimit) {
|
|
15442
15487
|
console.log(
|
|
15443
|
-
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access',
|
|
15488
|
+
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _613 => _613.runtimeLimit, 'optionalAccess', _614 => _614.source]), () => ( "live"))})`
|
|
15444
15489
|
);
|
|
15445
15490
|
}
|
|
15446
15491
|
printScheduledPlayCapacity(play.activeScheduledPlays);
|
|
@@ -15468,17 +15513,17 @@ function formatPlayGrepMatches(matches) {
|
|
|
15468
15513
|
return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
|
|
15469
15514
|
}
|
|
15470
15515
|
async function handlePlayGrep(args) {
|
|
15471
|
-
const query = _optionalChain([args, 'access',
|
|
15516
|
+
const query = _optionalChain([args, 'access', _615 => _615[0], 'optionalAccess', _616 => _616.trim, 'call', _617 => _617()]);
|
|
15472
15517
|
if (!query) {
|
|
15473
15518
|
console.error("Usage: deepline plays grep <query> [--json]");
|
|
15474
15519
|
return 1;
|
|
15475
15520
|
}
|
|
15476
|
-
const client = new (0,
|
|
15521
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
15477
15522
|
const results = (await client.listPlays({ grep: query })).map(
|
|
15478
15523
|
summarizePlayGrepResult
|
|
15479
15524
|
);
|
|
15480
|
-
if (
|
|
15481
|
-
|
|
15525
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
15526
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, {
|
|
15482
15527
|
plays: results,
|
|
15483
15528
|
count: results.length,
|
|
15484
15529
|
query,
|
|
@@ -15492,7 +15537,7 @@ async function handlePlayGrep(args) {
|
|
|
15492
15537
|
`
|
|
15493
15538
|
);
|
|
15494
15539
|
for (const result of results) {
|
|
15495
|
-
console.log(_optionalChain([result, 'access',
|
|
15540
|
+
console.log(_optionalChain([result, 'access', _618 => _618.displayName, 'optionalAccess', _619 => _619.trim, 'call', _620 => _620()]) || result.name);
|
|
15496
15541
|
const matches = formatPlayGrepMatches(result.matches);
|
|
15497
15542
|
if (matches) console.log(` Matched: ${matches}`);
|
|
15498
15543
|
console.log(` Describe: ${result.describe}`);
|
|
@@ -15501,7 +15546,7 @@ async function handlePlayGrep(args) {
|
|
|
15501
15546
|
return 0;
|
|
15502
15547
|
}
|
|
15503
15548
|
async function handlePlayDescribe(args) {
|
|
15504
|
-
const selection =
|
|
15549
|
+
const selection = _chunkLN6RXDTBjs.parseJsonFields.call(void 0, args, "describe");
|
|
15505
15550
|
args = selection.args;
|
|
15506
15551
|
const playName = args[0];
|
|
15507
15552
|
if (!playName) {
|
|
@@ -15535,8 +15580,8 @@ async function handlePlayDescribe(args) {
|
|
|
15535
15580
|
`deepline plays check ${playName}`,
|
|
15536
15581
|
...definedName ? [`deepline describe <workspace>/${definedName}`] : []
|
|
15537
15582
|
];
|
|
15538
|
-
if (
|
|
15539
|
-
|
|
15583
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
15584
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, {
|
|
15540
15585
|
ok: false,
|
|
15541
15586
|
error: { message },
|
|
15542
15587
|
next
|
|
@@ -15550,7 +15595,7 @@ async function handlePlayDescribe(args) {
|
|
|
15550
15595
|
}
|
|
15551
15596
|
return 2;
|
|
15552
15597
|
}
|
|
15553
|
-
const client = new (0,
|
|
15598
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
15554
15599
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
15555
15600
|
command: "describe"
|
|
15556
15601
|
});
|
|
@@ -15560,9 +15605,9 @@ async function handlePlayDescribe(args) {
|
|
|
15560
15605
|
compact: args.includes("--compact")
|
|
15561
15606
|
}
|
|
15562
15607
|
);
|
|
15563
|
-
if (
|
|
15564
|
-
if (selection.fields)
|
|
15565
|
-
else
|
|
15608
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
15609
|
+
if (selection.fields) _chunkLN6RXDTBjs.printJson.call(void 0, play, selection.fields);
|
|
15610
|
+
else _chunkLN6RXDTBjs.printCompactJson.call(void 0, play);
|
|
15566
15611
|
return 0;
|
|
15567
15612
|
}
|
|
15568
15613
|
printPlayDescription(play);
|
|
@@ -15583,7 +15628,7 @@ async function handlePlaySave(args) {
|
|
|
15583
15628
|
return 2;
|
|
15584
15629
|
}
|
|
15585
15630
|
const watchPlay = options.dryRun ? void 0 : options.watchPlay;
|
|
15586
|
-
const client = watchPlay ? new (0,
|
|
15631
|
+
const client = watchPlay ? new (0, _chunkXBAH3TKUjs.DeeplineClient)() : void 0;
|
|
15587
15632
|
let attempt;
|
|
15588
15633
|
if (watchPlay && client) {
|
|
15589
15634
|
try {
|
|
@@ -15607,7 +15652,7 @@ async function handlePlaySave(args) {
|
|
|
15607
15652
|
};
|
|
15608
15653
|
let graph;
|
|
15609
15654
|
try {
|
|
15610
|
-
graph = await
|
|
15655
|
+
graph = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
15611
15656
|
"cli.play_save_bundle_graph",
|
|
15612
15657
|
{ targetKind: "file" },
|
|
15613
15658
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, options.target))
|
|
@@ -15636,7 +15681,7 @@ async function handlePlaySave(args) {
|
|
|
15636
15681
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
|
|
15637
15682
|
};
|
|
15638
15683
|
if (options.jsonOutput) {
|
|
15639
|
-
|
|
15684
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, result);
|
|
15640
15685
|
} else {
|
|
15641
15686
|
console.error(result.message);
|
|
15642
15687
|
console.error(` checked artifact: ${result.expectedArtifactHash}`);
|
|
@@ -15658,7 +15703,7 @@ async function handlePlaySave(args) {
|
|
|
15658
15703
|
};
|
|
15659
15704
|
if (options.dryRun) {
|
|
15660
15705
|
if (options.jsonOutput) {
|
|
15661
|
-
|
|
15706
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, dryRun);
|
|
15662
15707
|
} else {
|
|
15663
15708
|
console.log(`Dry run: ${playName}`);
|
|
15664
15709
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15667,14 +15712,14 @@ async function handlePlaySave(args) {
|
|
|
15667
15712
|
}
|
|
15668
15713
|
return 0;
|
|
15669
15714
|
}
|
|
15670
|
-
const saveClient = _nullishCoalesce(client, () => ( new (0,
|
|
15715
|
+
const saveClient = _nullishCoalesce(client, () => ( new (0, _chunkXBAH3TKUjs.DeeplineClient)()));
|
|
15671
15716
|
try {
|
|
15672
|
-
await
|
|
15717
|
+
await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
15673
15718
|
"cli.play_save_compile_manifests",
|
|
15674
15719
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15675
15720
|
() => compileBundledPlayGraphManifests(saveClient, graph)
|
|
15676
15721
|
);
|
|
15677
|
-
const saved = await
|
|
15722
|
+
const saved = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
15678
15723
|
"cli.play_save_register_draft",
|
|
15679
15724
|
{ targetKind: "file", playName, artifactHash },
|
|
15680
15725
|
() => saveClient.registerPlayArtifact({
|
|
@@ -15704,7 +15749,7 @@ async function handlePlaySave(args) {
|
|
|
15704
15749
|
}
|
|
15705
15750
|
};
|
|
15706
15751
|
if (options.jsonOutput) {
|
|
15707
|
-
|
|
15752
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, result);
|
|
15708
15753
|
} else {
|
|
15709
15754
|
console.log(
|
|
15710
15755
|
`\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
|
|
@@ -15733,7 +15778,7 @@ async function handlePlayPublish(args) {
|
|
|
15733
15778
|
}
|
|
15734
15779
|
const { target: playName, useLatest } = options;
|
|
15735
15780
|
let revisionId = options.revisionId;
|
|
15736
|
-
const client = new (0,
|
|
15781
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
15737
15782
|
if (isFileTarget(playName)) {
|
|
15738
15783
|
if (revisionId || useLatest) {
|
|
15739
15784
|
console.error(
|
|
@@ -15743,7 +15788,7 @@ async function handlePlayPublish(args) {
|
|
|
15743
15788
|
}
|
|
15744
15789
|
let graph;
|
|
15745
15790
|
try {
|
|
15746
|
-
graph = await
|
|
15791
|
+
graph = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
15747
15792
|
"cli.play_publish_bundle_graph",
|
|
15748
15793
|
{ targetKind: "file" },
|
|
15749
15794
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, playName))
|
|
@@ -15765,7 +15810,7 @@ async function handlePlayPublish(args) {
|
|
|
15765
15810
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
|
|
15766
15811
|
};
|
|
15767
15812
|
if (options.jsonOutput) {
|
|
15768
|
-
|
|
15813
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, result3);
|
|
15769
15814
|
} else {
|
|
15770
15815
|
console.error(result3.message);
|
|
15771
15816
|
console.error(` checked artifact: ${result3.expectedArtifactHash}`);
|
|
@@ -15788,7 +15833,7 @@ async function handlePlayPublish(args) {
|
|
|
15788
15833
|
};
|
|
15789
15834
|
if (options.dryRun) {
|
|
15790
15835
|
if (options.jsonOutput) {
|
|
15791
|
-
|
|
15836
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, dryRun);
|
|
15792
15837
|
} else {
|
|
15793
15838
|
console.log(`Dry run: ${rootPlayName}`);
|
|
15794
15839
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15801,18 +15846,18 @@ async function handlePlayPublish(args) {
|
|
|
15801
15846
|
try {
|
|
15802
15847
|
previousLive = await _asyncNullishCoalesce((await client.getPlay(rootPlayName)).play.liveRevision, async () => ( null));
|
|
15803
15848
|
} catch (error) {
|
|
15804
|
-
if (!(error instanceof
|
|
15849
|
+
if (!(error instanceof _chunkBBTKAASQjs.DeeplineError) || error.statusCode !== 404) {
|
|
15805
15850
|
console.error(error instanceof Error ? error.message : String(error));
|
|
15806
15851
|
return 5;
|
|
15807
15852
|
}
|
|
15808
15853
|
}
|
|
15809
15854
|
try {
|
|
15810
|
-
await
|
|
15855
|
+
await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
15811
15856
|
"cli.play_publish_compile_manifests",
|
|
15812
15857
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15813
15858
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
15814
15859
|
);
|
|
15815
|
-
await
|
|
15860
|
+
await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
15816
15861
|
"cli.play_publish_imports",
|
|
15817
15862
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15818
15863
|
() => publishImportedPlayDependencies(client, graph)
|
|
@@ -15821,7 +15866,7 @@ async function handlePlayPublish(args) {
|
|
|
15821
15866
|
console.error(error instanceof Error ? error.message : String(error));
|
|
15822
15867
|
return 1;
|
|
15823
15868
|
}
|
|
15824
|
-
const published = await
|
|
15869
|
+
const published = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
|
|
15825
15870
|
"cli.play_publish_register_root",
|
|
15826
15871
|
{
|
|
15827
15872
|
targetKind: "file",
|
|
@@ -15846,17 +15891,17 @@ async function handlePlayPublish(args) {
|
|
|
15846
15891
|
artifactHash,
|
|
15847
15892
|
liveVersion: _nullishCoalesce(published.version, () => ( null)),
|
|
15848
15893
|
revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
|
|
15849
|
-
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15850
|
-
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15894
|
+
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _621 => _621.version]), () => ( null)),
|
|
15895
|
+
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _622 => _622.artifactHash]), () => ( null)),
|
|
15851
15896
|
sourceBytes: {
|
|
15852
|
-
before: _optionalChain([previousLive, 'optionalAccess',
|
|
15897
|
+
before: _optionalChain([previousLive, 'optionalAccess', _623 => _623.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
|
|
15853
15898
|
after: Buffer.byteLength(graph.root.sourceCode, "utf8")
|
|
15854
15899
|
},
|
|
15855
15900
|
triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
|
|
15856
15901
|
triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
|
|
15857
15902
|
};
|
|
15858
15903
|
if (options.jsonOutput) {
|
|
15859
|
-
|
|
15904
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, result2);
|
|
15860
15905
|
} else {
|
|
15861
15906
|
printPublishReceipt({
|
|
15862
15907
|
name: rootPlayName,
|
|
@@ -15887,14 +15932,14 @@ async function handlePlayPublish(args) {
|
|
|
15887
15932
|
revisionId: _nullishCoalesce(revisionId, () => ( null)),
|
|
15888
15933
|
latest: useLatest
|
|
15889
15934
|
};
|
|
15890
|
-
|
|
15935
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, result2);
|
|
15891
15936
|
return 0;
|
|
15892
15937
|
}
|
|
15893
15938
|
const resolvedName = parseReferencedPlayTarget(playName).playName;
|
|
15894
15939
|
if (useLatest) {
|
|
15895
15940
|
const versions = await client.listPlayVersions(resolvedName);
|
|
15896
15941
|
const latest = versions[0];
|
|
15897
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
15942
|
+
if (!_optionalChain([latest, 'optionalAccess', _624 => _624._id])) {
|
|
15898
15943
|
console.error(`No saved revisions found for ${resolvedName}.`);
|
|
15899
15944
|
return 1;
|
|
15900
15945
|
}
|
|
@@ -15911,7 +15956,7 @@ async function handlePlayPublish(args) {
|
|
|
15911
15956
|
revisionId ? { revisionId } : {}
|
|
15912
15957
|
);
|
|
15913
15958
|
if (options.jsonOutput) {
|
|
15914
|
-
|
|
15959
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, result);
|
|
15915
15960
|
} else {
|
|
15916
15961
|
printPublishReceipt({
|
|
15917
15962
|
name: result.name,
|
|
@@ -15951,7 +15996,7 @@ async function handlePlayDelete(args) {
|
|
|
15951
15996
|
);
|
|
15952
15997
|
return 2;
|
|
15953
15998
|
}
|
|
15954
|
-
const client = new (0,
|
|
15999
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
15955
16000
|
let detail;
|
|
15956
16001
|
try {
|
|
15957
16002
|
detail = await client.getPlay(parseReferencedPlayTarget(playName).playName);
|
|
@@ -15975,8 +16020,8 @@ async function handlePlayDelete(args) {
|
|
|
15975
16020
|
name: resolvedName,
|
|
15976
16021
|
plannedMutation: "move saved org-owned play to Trash and stop triggers"
|
|
15977
16022
|
};
|
|
15978
|
-
if (
|
|
15979
|
-
|
|
16023
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
16024
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, result2);
|
|
15980
16025
|
} else {
|
|
15981
16026
|
process.stdout.write(
|
|
15982
16027
|
`Dry run: would move ${result2.name} to Trash and stop its active triggers.
|
|
@@ -15986,8 +16031,8 @@ async function handlePlayDelete(args) {
|
|
|
15986
16031
|
return 0;
|
|
15987
16032
|
}
|
|
15988
16033
|
const result = await client.deletePlay(resolvedName);
|
|
15989
|
-
if (
|
|
15990
|
-
|
|
16034
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
16035
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, result);
|
|
15991
16036
|
return result.archived || result.alreadyArchived ? 0 : 4;
|
|
15992
16037
|
}
|
|
15993
16038
|
if (result.alreadyArchived) {
|
|
@@ -16026,13 +16071,13 @@ async function handlePlayRestore(args) {
|
|
|
16026
16071
|
);
|
|
16027
16072
|
return 2;
|
|
16028
16073
|
}
|
|
16029
|
-
const client = new (0,
|
|
16074
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
16030
16075
|
try {
|
|
16031
16076
|
const result = await client.restorePlay(
|
|
16032
16077
|
parseReferencedPlayTarget(playName).playName
|
|
16033
16078
|
);
|
|
16034
|
-
if (
|
|
16035
|
-
|
|
16079
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
16080
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, result);
|
|
16036
16081
|
return result.restored || result.alreadyActive ? 0 : 4;
|
|
16037
16082
|
}
|
|
16038
16083
|
if (result.alreadyActive) {
|
|
@@ -16124,7 +16169,7 @@ Authoring:
|
|
|
16124
16169
|
Play work unless the caller explicitly asks to leave the inferred graph.
|
|
16125
16170
|
|
|
16126
16171
|
Common commands:
|
|
16127
|
-
deepline search "name and company domain -> work email"
|
|
16172
|
+
deepline search "name and company domain -> work email"
|
|
16128
16173
|
deepline describe prebuilt/person-linkedin-to-email
|
|
16129
16174
|
deepline plays check prebuilt/name-and-domain-to-email-waterfall-batch
|
|
16130
16175
|
deepline run prebuilt/person-linkedin-to-email --input '{"linkedin_url":"..."}'
|
|
@@ -16159,21 +16204,21 @@ Common commands:
|
|
|
16159
16204
|
resume: `deepline plays resume-submission ${_chunkAID3OYVJjs.shellQuote.call(void 0, path)} --json`
|
|
16160
16205
|
}
|
|
16161
16206
|
};
|
|
16162
|
-
|
|
16207
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, result2, {
|
|
16163
16208
|
json: options.json,
|
|
16164
16209
|
text: `Submission ${saved.workflowId}: admission is unknown. ${result2.next.inspect}
|
|
16165
16210
|
`
|
|
16166
16211
|
});
|
|
16167
16212
|
return;
|
|
16168
16213
|
}
|
|
16169
|
-
const client = new (0,
|
|
16214
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
16170
16215
|
if (new URL(saved.baseUrl).origin !== new URL(client.baseUrl).origin) {
|
|
16171
16216
|
throw new Error(
|
|
16172
16217
|
"The submission belongs to a different API origin. Select its original host before recovery."
|
|
16173
16218
|
);
|
|
16174
16219
|
}
|
|
16175
16220
|
const result = await client.startPlayRun(saved.request);
|
|
16176
|
-
|
|
16221
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
16177
16222
|
{ ...result },
|
|
16178
16223
|
{
|
|
16179
16224
|
json: options.json,
|
|
@@ -16209,7 +16254,7 @@ Examples:
|
|
|
16209
16254
|
).action(async (target, options) => {
|
|
16210
16255
|
process.exitCode = await handlePlayCheck([
|
|
16211
16256
|
target,
|
|
16212
|
-
...
|
|
16257
|
+
..._chunkLN6RXDTBjs.jsonFieldArgs.call(void 0, options.json),
|
|
16213
16258
|
...options.full ? ["--full"] : []
|
|
16214
16259
|
]);
|
|
16215
16260
|
});
|
|
@@ -16256,10 +16301,10 @@ Notes:
|
|
|
16256
16301
|
with a changed input is refused with a 409 conflict. Use one stable key per
|
|
16257
16302
|
exact intent. Without a key, each invocation starts a new run.
|
|
16258
16303
|
--max-concurrent-external-calls controls the per-run provider-tool/deepline.fetch
|
|
16259
|
-
resident-work ceiling. Default: ${
|
|
16304
|
+
resident-work ceiling. Default: ${_chunkY2NTPYGSjs.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS}; accepted range: 1-${_chunkY2NTPYGSjs.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS}.
|
|
16260
16305
|
Provider pacing and sandbox memory limits still apply.
|
|
16261
16306
|
--max-concurrent-rows sets the run-wide default and ceiling for live map row
|
|
16262
|
-
resolvers. Accepted range: 1-${
|
|
16307
|
+
resolvers. Accepted range: 1-${_chunkY2NTPYGSjs.MAX_CONFIGURABLE_CONCURRENT_ROWS}. The runtime
|
|
16263
16308
|
may lower it when source-row size exceeds the active-row memory budget.
|
|
16264
16309
|
--max-credits replaces the play's billing.maxCreditsPerRun for this run.
|
|
16265
16310
|
Tool calls that would exceed it are denied.
|
|
@@ -16384,10 +16429,10 @@ Examples:
|
|
|
16384
16429
|
).hideHelp()
|
|
16385
16430
|
).option(
|
|
16386
16431
|
"--max-concurrent-external-calls <count>",
|
|
16387
|
-
`Concurrent provider-tool and deepline.fetch executions (${
|
|
16432
|
+
`Concurrent provider-tool and deepline.fetch executions (${_chunkY2NTPYGSjs.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS} default, max ${_chunkY2NTPYGSjs.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS})`
|
|
16388
16433
|
).option(
|
|
16389
16434
|
"--max-concurrent-rows <count>",
|
|
16390
|
-
`Run-wide dataset map row resolver ceiling (max ${
|
|
16435
|
+
`Run-wide dataset map row resolver ceiling (max ${_chunkY2NTPYGSjs.MAX_CONFIGURABLE_CONCURRENT_ROWS})`
|
|
16391
16436
|
).option("--max-credits <credits>", "Deepline-credit cap for this run").option("--open", "Open the run page in a browser after the run starts").option(
|
|
16392
16437
|
"--debug-map-latency",
|
|
16393
16438
|
"Internal diagnostics: emit one aggregate latency profile per dataset map"
|
|
@@ -16438,7 +16483,7 @@ JSON field selection:
|
|
|
16438
16483
|
}
|
|
16439
16484
|
}
|
|
16440
16485
|
async function runPlayFromRun(target, options, command) {
|
|
16441
|
-
const runId = _optionalChain([options, 'access',
|
|
16486
|
+
const runId = _optionalChain([options, 'access', _625 => _625.fromRun, 'optionalAccess', _626 => _626.trim, 'call', _627 => _627()]);
|
|
16442
16487
|
if (!runId || runId.startsWith("--")) {
|
|
16443
16488
|
console.error("--from-run requires a run id.");
|
|
16444
16489
|
return 1;
|
|
@@ -16482,14 +16527,14 @@ JSON field selection:
|
|
|
16482
16527
|
passthroughArgs.shift();
|
|
16483
16528
|
}
|
|
16484
16529
|
const exitCode = await handlePlayRun(
|
|
16485
|
-
|
|
16530
|
+
_chunkY2NTPYGSjs.resolvePlayRunCliOptions.call(void 0,
|
|
16486
16531
|
_nullishCoalesce(effectiveTarget, () => ( void 0)),
|
|
16487
16532
|
options,
|
|
16488
16533
|
passthroughArgs,
|
|
16489
|
-
|
|
16534
|
+
_chunkLDGZFDUBjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
16490
16535
|
)
|
|
16491
16536
|
);
|
|
16492
|
-
|
|
16537
|
+
_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
|
|
16493
16538
|
phase: "cli.play_command_exit",
|
|
16494
16539
|
exitCode
|
|
16495
16540
|
});
|
|
@@ -16538,9 +16583,9 @@ Examples:
|
|
|
16538
16583
|
const limit = Number(options.historyLimit);
|
|
16539
16584
|
if (!Number.isInteger(limit) || limit < 1 || limit > 30)
|
|
16540
16585
|
throw new Error("--history-limit must be an integer from 1 to 30.");
|
|
16541
|
-
const client = new (0,
|
|
16586
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
16542
16587
|
if (options.binding) {
|
|
16543
|
-
|
|
16588
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0,
|
|
16544
16589
|
await client.getPlayTriggerHistory(options.binding, { limit })
|
|
16545
16590
|
);
|
|
16546
16591
|
return;
|
|
@@ -16548,7 +16593,7 @@ Examples:
|
|
|
16548
16593
|
const result = await client.listPlayTriggerInventory({
|
|
16549
16594
|
cursor: options.cursor
|
|
16550
16595
|
});
|
|
16551
|
-
|
|
16596
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, {
|
|
16552
16597
|
...result,
|
|
16553
16598
|
next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)}`
|
|
16554
16599
|
});
|
|
@@ -16577,7 +16622,7 @@ Notes:
|
|
|
16577
16622
|
Examples:
|
|
16578
16623
|
deepline plays list
|
|
16579
16624
|
deepline plays list --tag smb
|
|
16580
|
-
deepline search "name and company domain -> work email"
|
|
16625
|
+
deepline search "name and company domain -> work email"
|
|
16581
16626
|
`
|
|
16582
16627
|
).option("--limit <count>", "Page size").option("--cursor <cursor>", "Continue a previous page").option("--show-cost", "Include the per-row or per-run cost estimate").option(
|
|
16583
16628
|
"--summary",
|
|
@@ -16607,7 +16652,7 @@ Examples:
|
|
|
16607
16652
|
if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
|
|
16608
16653
|
throw new Error("--group-by must be kind or trigger_source.");
|
|
16609
16654
|
}
|
|
16610
|
-
const result = await new (0,
|
|
16655
|
+
const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().getPlaysActivity({
|
|
16611
16656
|
timeZone: options.timeZone,
|
|
16612
16657
|
days,
|
|
16613
16658
|
...options.endDate ? { endDate: options.endDate } : {},
|
|
@@ -16621,7 +16666,7 @@ Examples:
|
|
|
16621
16666
|
`${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
|
|
16622
16667
|
);
|
|
16623
16668
|
}
|
|
16624
|
-
|
|
16669
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
16625
16670
|
{ ...result },
|
|
16626
16671
|
{
|
|
16627
16672
|
json: Boolean(options.json),
|
|
@@ -16650,9 +16695,9 @@ Examples:
|
|
|
16650
16695
|
false
|
|
16651
16696
|
);
|
|
16652
16697
|
});
|
|
16653
|
-
|
|
16698
|
+
_chunkTX5TUHJNjs.registerDeprecatedSearchCommand.call(void 0,
|
|
16654
16699
|
play,
|
|
16655
|
-
(options) => options.all ? ["
|
|
16700
|
+
(options) => options.all ? ["prebuilts", "custom"] : ["prebuilts"]
|
|
16656
16701
|
);
|
|
16657
16702
|
play.command("grep <query>").description(
|
|
16658
16703
|
"Search active org-owned Plays through Convex full-text search."
|
|
@@ -16691,9 +16736,9 @@ Examples:
|
|
|
16691
16736
|
"--json [fields]",
|
|
16692
16737
|
"JSON output; optionally select comma-separated dotted paths"
|
|
16693
16738
|
);
|
|
16694
|
-
|
|
16739
|
+
_chunkKWYGWO4Yjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
|
|
16695
16740
|
async (target, options) => {
|
|
16696
|
-
const ownView = () => handlePlayDescribe(
|
|
16741
|
+
const ownView = () => handlePlayDescribe(_chunkLN6RXDTBjs.describeArgs.call(void 0, target, options));
|
|
16697
16742
|
const [flagText] = [options.json].filter(
|
|
16698
16743
|
(value) => typeof value === "string"
|
|
16699
16744
|
);
|
|
@@ -16704,7 +16749,7 @@ Examples:
|
|
|
16704
16749
|
process.exitCode = await ownView();
|
|
16705
16750
|
return;
|
|
16706
16751
|
}
|
|
16707
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
16752
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-WW3OQRLP.js")));
|
|
16708
16753
|
process.exitCode = await describeAnything(
|
|
16709
16754
|
name,
|
|
16710
16755
|
{
|
|
@@ -16827,7 +16872,7 @@ Examples:
|
|
|
16827
16872
|
deepline plays deployments <deployment-id>
|
|
16828
16873
|
`
|
|
16829
16874
|
).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output").action(
|
|
16830
|
-
async (id, options) => id ?
|
|
16875
|
+
async (id, options) => id ? _chunkVBDZIMWDjs.handleDeploymentGet.call(void 0, id, options) : _chunkVBDZIMWDjs.handleDeploymentsList.call(void 0, options)
|
|
16831
16876
|
);
|
|
16832
16877
|
addPublishHelp(
|
|
16833
16878
|
play.command("publish <target>").description(
|
|
@@ -16962,14 +17007,14 @@ Examples:
|
|
|
16962
17007
|
const limit = Number(options.limit);
|
|
16963
17008
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 1e3)
|
|
16964
17009
|
throw new Error("--limit must be an integer from 1 to 1000.");
|
|
16965
|
-
const result = await new (0,
|
|
17010
|
+
const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().runs.rowHistory({
|
|
16966
17011
|
playName: options.play,
|
|
16967
17012
|
runId,
|
|
16968
17013
|
tableNamespace: options.dataset,
|
|
16969
17014
|
limit,
|
|
16970
17015
|
cursor: options.cursor
|
|
16971
17016
|
});
|
|
16972
|
-
|
|
17017
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, {
|
|
16973
17018
|
...result,
|
|
16974
17019
|
...result.nextCursor ? {
|
|
16975
17020
|
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`
|
|
@@ -17047,7 +17092,7 @@ Examples:
|
|
|
17047
17092
|
new (0, _commander.Option)("--log-failed", "Attach terminal-failure logs").hideHelp()
|
|
17048
17093
|
).action(async (runId, options) => {
|
|
17049
17094
|
if (TOOL_EXECUTION_ID.test(runId)) {
|
|
17050
|
-
const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-
|
|
17095
|
+
const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-SBDUL3WB.js")));
|
|
17051
17096
|
process.exitCode = await getToolExecutionReceipt(runId, {
|
|
17052
17097
|
receiptJson: options.json !== void 0
|
|
17053
17098
|
});
|
|
@@ -17055,7 +17100,7 @@ Examples:
|
|
|
17055
17100
|
}
|
|
17056
17101
|
process.exitCode = await handleRunGet([
|
|
17057
17102
|
runId,
|
|
17058
|
-
...
|
|
17103
|
+
..._chunkLN6RXDTBjs.jsonFieldArgs.call(void 0, options.json),
|
|
17059
17104
|
...options.web ? ["--web"] : [],
|
|
17060
17105
|
...options.webUrl ? ["--web-url"] : [],
|
|
17061
17106
|
...options.full ? ["--full"] : [],
|
|
@@ -17111,7 +17156,9 @@ Examples:
|
|
|
17111
17156
|
`
|
|
17112
17157
|
Notes:
|
|
17113
17158
|
Continues the same run id with its original input and pinned revision.
|
|
17114
|
-
|
|
17159
|
+
Matching completed operations can be recovered, even when their calls used
|
|
17160
|
+
staleAfterSeconds: 0. Unfinished or unrecorded work can incur charges.
|
|
17161
|
+
Dataset reuse counts do not measure all work available to resume.
|
|
17115
17162
|
A run can be resumed for 14 days after it stops. To start over as a new
|
|
17116
17163
|
run instead, use deepline plays run --from-run <run-id>.
|
|
17117
17164
|
The server refuses while the run is still active, while its last attempt
|
|
@@ -17375,7 +17422,7 @@ Examples:
|
|
|
17375
17422
|
...options.allowEmpty ? ["--allow-empty"] : [],
|
|
17376
17423
|
...options.wait ? ["--wait"] : [],
|
|
17377
17424
|
...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
|
|
17378
|
-
...
|
|
17425
|
+
..._chunkLN6RXDTBjs.jsonFieldArgs.call(void 0, options.json)
|
|
17379
17426
|
]);
|
|
17380
17427
|
});
|
|
17381
17428
|
const share = play.command("share").description(
|
|
@@ -17516,8 +17563,8 @@ function absolutePublicPlayUrl(path) {
|
|
|
17516
17563
|
}
|
|
17517
17564
|
function shareUrlFields(status) {
|
|
17518
17565
|
return {
|
|
17519
|
-
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17520
|
-
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17566
|
+
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _628 => _628.share, 'optionalAccess', _629 => _629.publicPath])),
|
|
17567
|
+
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _630 => _630.share, 'optionalAccess', _631 => _631.canonicalPath]))
|
|
17521
17568
|
};
|
|
17522
17569
|
}
|
|
17523
17570
|
function shareStatusForOutput(status) {
|
|
@@ -17541,10 +17588,10 @@ async function handlePlayShareStatus(args) {
|
|
|
17541
17588
|
return 2;
|
|
17542
17589
|
}
|
|
17543
17590
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17544
|
-
const status = await new (0,
|
|
17591
|
+
const status = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().getSharePage(name);
|
|
17545
17592
|
const outputStatus = shareStatusForOutput(status);
|
|
17546
|
-
if (
|
|
17547
|
-
|
|
17593
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
17594
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, outputStatus);
|
|
17548
17595
|
return 0;
|
|
17549
17596
|
}
|
|
17550
17597
|
if (!outputStatus.share) {
|
|
@@ -17583,7 +17630,7 @@ async function handlePlaySharePublish(args) {
|
|
|
17583
17630
|
return 2;
|
|
17584
17631
|
}
|
|
17585
17632
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17586
|
-
const client = new (0,
|
|
17633
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
17587
17634
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17588
17635
|
let resolvedVersion;
|
|
17589
17636
|
if (!revisionId) {
|
|
@@ -17614,8 +17661,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17614
17661
|
);
|
|
17615
17662
|
if (!hasCompleted) {
|
|
17616
17663
|
const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
|
|
17617
|
-
if (
|
|
17618
|
-
|
|
17664
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
17665
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, {
|
|
17619
17666
|
ok: false,
|
|
17620
17667
|
code: "NO_SUCCESSFUL_RUN",
|
|
17621
17668
|
message,
|
|
@@ -17639,8 +17686,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17639
17686
|
};
|
|
17640
17687
|
if (args.includes("--dry-run")) {
|
|
17641
17688
|
const plan = { dryRun: true, name, version: resolvedVersion, ...request };
|
|
17642
|
-
if (
|
|
17643
|
-
|
|
17689
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
17690
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, plan);
|
|
17644
17691
|
} else {
|
|
17645
17692
|
console.log(
|
|
17646
17693
|
`Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
|
|
@@ -17650,13 +17697,13 @@ async function handlePlaySharePublish(args) {
|
|
|
17650
17697
|
}
|
|
17651
17698
|
const status = await client.publishSharePage(name, request);
|
|
17652
17699
|
const outputStatus = shareStatusForOutput(status);
|
|
17653
|
-
if (
|
|
17654
|
-
|
|
17700
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
17701
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, outputStatus);
|
|
17655
17702
|
return 0;
|
|
17656
17703
|
}
|
|
17657
17704
|
const urls = shareUrlFields(outputStatus);
|
|
17658
17705
|
console.log(
|
|
17659
|
-
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access',
|
|
17706
|
+
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _632 => _632.share, 'optionalAccess', _633 => _633.publicPath]))), () => ( ""))}`
|
|
17660
17707
|
);
|
|
17661
17708
|
if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
|
|
17662
17709
|
console.log(`Version URL: ${urls.canonicalUrl}`);
|
|
@@ -17682,9 +17729,9 @@ async function handlePlayShareUpdate(args) {
|
|
|
17682
17729
|
...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
|
|
17683
17730
|
...seoIndexing ? { seoIndexing } : {}
|
|
17684
17731
|
};
|
|
17685
|
-
const status = await new (0,
|
|
17686
|
-
if (
|
|
17687
|
-
|
|
17732
|
+
const status = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().updateSharePage(name, request);
|
|
17733
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
17734
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, status);
|
|
17688
17735
|
return 0;
|
|
17689
17736
|
}
|
|
17690
17737
|
console.log(`Updated ${name} share settings.`);
|
|
@@ -17699,13 +17746,13 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17699
17746
|
return 2;
|
|
17700
17747
|
}
|
|
17701
17748
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17702
|
-
const client = new (0,
|
|
17749
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
17703
17750
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17704
17751
|
const versionFlag = shareFlagValue(args, "--version");
|
|
17705
17752
|
if (!revisionId && versionFlag) {
|
|
17706
17753
|
const versions = await client.listPlayVersions(name);
|
|
17707
17754
|
const chosen = versions.find((r) => r.version === Number(versionFlag));
|
|
17708
|
-
if (!_optionalChain([chosen, 'optionalAccess',
|
|
17755
|
+
if (!_optionalChain([chosen, 'optionalAccess', _634 => _634._id])) {
|
|
17709
17756
|
console.error(`Version ${versionFlag} not found for ${name}.`);
|
|
17710
17757
|
return 4;
|
|
17711
17758
|
}
|
|
@@ -17716,12 +17763,12 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17716
17763
|
revisionId ? { revisionId } : {}
|
|
17717
17764
|
);
|
|
17718
17765
|
const outputStatus = shareStatusForOutput(status);
|
|
17719
|
-
if (
|
|
17720
|
-
|
|
17766
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
17767
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, outputStatus);
|
|
17721
17768
|
return 0;
|
|
17722
17769
|
}
|
|
17723
17770
|
const urls = shareUrlFields(outputStatus);
|
|
17724
|
-
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access',
|
|
17771
|
+
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _635 => _635.share, 'optionalAccess', _636 => _636.publishedRevisionId]) === revisionId;
|
|
17725
17772
|
console.log(
|
|
17726
17773
|
`Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
|
|
17727
17774
|
);
|
|
@@ -17742,9 +17789,9 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17742
17789
|
return 2;
|
|
17743
17790
|
}
|
|
17744
17791
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17745
|
-
const status = await new (0,
|
|
17746
|
-
if (
|
|
17747
|
-
|
|
17792
|
+
const status = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().unpublishSharePage(name);
|
|
17793
|
+
if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
|
|
17794
|
+
_chunkLN6RXDTBjs.printCompactJson.call(void 0, status);
|
|
17748
17795
|
return 0;
|
|
17749
17796
|
}
|
|
17750
17797
|
console.log(`Unpublished ${name}; the public page has been removed.`);
|
|
@@ -17822,4 +17869,4 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17822
17869
|
|
|
17823
17870
|
|
|
17824
17871
|
|
|
17825
|
-
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.checkPlayFileExports = checkPlayFileExports; 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 =
|
|
17872
|
+
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.checkPlayFileExports = checkPlayFileExports; 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 = _chunkY2NTPYGSjs.parsePlayRunHeaderFlag; exports.parsePlayRunOptions = _chunkY2NTPYGSjs.parsePlayRunOptions; exports.preflightLocalFileInputs = preflightLocalFileInputs; exports.registerPlayCommands = registerPlayCommands; exports.renderRunOverviewText = renderRunOverviewText; exports.resolveDatasetByName = resolveDatasetByName; exports.resolvePlayRunOutputStatus = resolvePlayRunOutputStatus; exports.resolvePlayRunUrl = resolvePlayRunUrl; exports.resolveRunStopState = resolveRunStopState; exports.selectRunLogTailPage = selectRunLogTailPage; exports.shouldPrintPlayProgressLine = shouldPrintPlayProgressLine; exports.startAndWaitForPlayCompletion = startAndWaitForPlayCompletion; exports.startAndWaitForPlayCompletionByStream = startAndWaitForPlayCompletionByStream; exports.takeFromRunRerunArgs = takeFromRunRerunArgs; exports.truncateErrorForDisplay = truncateErrorForDisplay; exports.waitForPlayCompletionByWatch = waitForPlayCompletionByWatch; exports.withTerminalPlayIdentity = withTerminalPlayIdentity; exports.writeInlinePlay = writeInlinePlay; exports.writePlayRunIdFile = writePlayRunIdFile; exports.writePlayRunReceipt = writePlayRunReceipt;
|