deepline 0.3.470 → 0.3.472
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 +14 -0
- package/dist/bundling-sources/sdk/src/index.ts +2 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +29 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/play-admission-outcome.ts +34 -8
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +131 -22
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +36 -1
- package/dist/cli/{auth-7J52UEWO.mjs → auth-35DAEPHC.mjs} +5 -5
- package/dist/cli/auth-Q5TM66UI.js +41 -0
- package/dist/cli/{billing-ASNWVDQG.js → billing-5ED5X2IO.js} +82 -81
- package/dist/cli/{billing-ORB3UZ73.mjs → billing-CXVBJEC4.mjs} +9 -8
- package/dist/cli/{chunk-4BQQ3Q3J.js → chunk-2DND7LLL.js} +8 -8
- package/dist/cli/{chunk-GDFO3ERN.js → chunk-2G4R4APL.js} +2 -2
- package/dist/cli/{chunk-RVQ333NB.mjs → chunk-2S36YV2K.mjs} +1 -1
- package/dist/cli/{chunk-EM2E7YIS.js → chunk-3L76SFGN.js} +53 -53
- package/dist/cli/{chunk-QG7UPPOK.mjs → chunk-4NFBYW7X.mjs} +3 -3
- package/dist/cli/{chunk-7WILY2XM.mjs → chunk-52VOORHM.mjs} +2 -2
- package/dist/cli/{chunk-CNQBCLQP.js → chunk-5FHU67AT.js} +3 -3
- package/dist/cli/{chunk-6B7XLHIE.mjs → chunk-6PKONIIP.mjs} +4 -4
- package/dist/cli/{chunk-HNP5V5BN.js → chunk-6ZTSHKJF.js} +25 -7
- package/dist/cli/{chunk-Y4OE46HH.js → chunk-7KAS4QOW.js} +112 -107
- package/dist/cli/{chunk-SHB7BUNQ.mjs → chunk-C5PY2PP6.mjs} +3 -3
- package/dist/cli/{chunk-CTDWQYBW.mjs → chunk-CFDQZQE2.mjs} +2 -2
- package/dist/cli/{chunk-262PYO4I.mjs → chunk-FHIO7WI2.mjs} +3 -3
- package/dist/cli/{chunk-6R5UKWRW.js → chunk-GJPRBELO.js} +16 -16
- package/dist/cli/{chunk-57F5VKHV.js → chunk-H7YFUC3J.js} +8 -8
- package/dist/cli/{chunk-F6OB5L74.js → chunk-HBVT4FW5.js} +6 -6
- package/dist/cli/{chunk-C7EA2VNR.js → chunk-IIQ6O5F3.js} +5 -5
- package/dist/cli/{chunk-3P4WOCRB.mjs → chunk-IPJ27SD2.mjs} +5 -5
- package/dist/cli/{chunk-JKVRBCZL.js → chunk-JDMR33HS.js} +1 -0
- package/dist/cli/{chunk-DSOTGAXS.mjs → chunk-JRZW4LWK.mjs} +1 -1
- package/dist/cli/{chunk-VL7OL7YR.mjs → chunk-KQJHIVCE.mjs} +1 -1
- package/dist/cli/{chunk-PWXHZPHK.js → chunk-L3AXQXNT.js} +10 -10
- package/dist/cli/{chunk-A7THVTRN.js → chunk-LQUOZGM6.js} +51 -51
- package/dist/cli/{chunk-YTFCKCII.js → chunk-M475BQ77.js} +3 -3
- package/dist/cli/{chunk-YBDQUVDE.mjs → chunk-MRZ7AO72.mjs} +10 -10
- package/dist/cli/{chunk-FAG4DFUC.mjs → chunk-NELMCOWK.mjs} +1 -0
- package/dist/cli/{chunk-SOME764Z.mjs → chunk-NZBZFEVA.mjs} +4 -4
- package/dist/cli/{chunk-ETTUFFBS.js → chunk-ODAARZSK.js} +36 -36
- package/dist/cli/{chunk-SETIOXN4.mjs → chunk-OMPW5ELS.mjs} +1 -1
- package/dist/cli/{chunk-NNCDHMCT.js → chunk-QLVYYDUI.js} +26 -26
- package/dist/cli/{chunk-SXQZYTUW.mjs → chunk-QSCLOPWR.mjs} +1 -1
- package/dist/cli/{chunk-PJX7BA7T.mjs → chunk-R6L6JRDR.mjs} +2 -2
- package/dist/cli/{chunk-3XLJPLXZ.mjs → chunk-R73LE2IM.mjs} +1 -1
- package/dist/cli/{chunk-F2XK4UN6.js → chunk-RDOPZK7A.js} +3 -3
- package/dist/cli/{chunk-44UR3BU2.js → chunk-RMQB72WW.js} +14 -14
- package/dist/cli/{chunk-D464JW3N.mjs → chunk-RZHUHL53.mjs} +19 -1
- package/dist/cli/{chunk-VBKN6ISP.js → chunk-SBPI7AEB.js} +93 -93
- package/dist/cli/{chunk-ORO2GFH4.js → chunk-SKVMC6K6.js} +5 -5
- package/dist/cli/{chunk-AGIEKE3L.js → chunk-SYWOSAW7.js} +4 -4
- package/dist/cli/{chunk-YFKOA4HW.mjs → chunk-T5H7ETIM.mjs} +4 -4
- package/dist/cli/{chunk-5ADROBCY.mjs → chunk-TMMODGPV.mjs} +2 -2
- package/dist/cli/{chunk-NSAKJQLX.js → chunk-UKKCS6Z4.js} +1 -1
- package/dist/cli/{chunk-KBNAI5BY.js → chunk-UPXGN62E.js} +21 -21
- package/dist/cli/{chunk-SV3B6KW4.mjs → chunk-UXFUD2MB.mjs} +5 -5
- package/dist/cli/{chunk-N72VIY7R.js → chunk-VDHDTXCK.js} +2 -2
- package/dist/cli/{chunk-MXAB4W6E.js → chunk-XSSIBO74.js} +8 -8
- package/dist/cli/{chunk-QW6HNDS7.mjs → chunk-YK64LQPQ.mjs} +7 -2
- package/dist/cli/{chunk-GLSFZYZB.mjs → chunk-YMB2CD55.mjs} +1 -1
- package/dist/cli/{chunk-F4L7WMLK.mjs → chunk-YNW47NOJ.mjs} +2 -2
- package/dist/cli/{chunk-FVYAEBGO.mjs → chunk-YUNPYX5T.mjs} +25 -7
- package/dist/cli/{chunk-WG3KGAII.js → chunk-Z52WEIBR.js} +19 -1
- package/dist/cli/{chunk-BWLXHUKH.mjs → chunk-ZZQIS3TH.mjs} +3 -3
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-D3JPZVUN.mjs → csv-OSDYY3QW.mjs} +4 -4
- package/dist/cli/{csv-FSXDIWBP.js → csv-SQJQM3B2.js} +13 -13
- package/dist/cli/{db-3UWDQXLF.mjs → db-2M6BU6G5.mjs} +7 -7
- package/dist/cli/{db-DZQUPWI3.js → db-ATDYXAD5.js} +28 -28
- package/dist/cli/describe-37QXXDCF.js +48 -0
- package/dist/cli/{describe-APG2GVFG.mjs → describe-WIAJCWF3.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-TDUX3575.mjs → executions-2J6CCJL2.mjs} +7 -7
- package/dist/cli/{executions-BFAPMPG2.js → executions-Y32LMYH6.js} +9 -9
- package/dist/cli/{feedback-BMV7PUDL.mjs → feedback-L4AVIMGI.mjs} +4 -4
- package/dist/cli/{feedback-2KNPCYTH.js → feedback-RXQLS6QU.js} +8 -8
- package/dist/cli/git-JGUR335T.js +25 -0
- package/dist/cli/{git-KBVONNE5.mjs → git-V3K77AWH.mjs} +5 -5
- package/dist/cli/index.js +139 -139
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-LE6LJO7F.js → legacy-noops-B2KJT4CZ.js} +8 -8
- package/dist/cli/{legacy-noops-GZDRRUFE.mjs → legacy-noops-LOGMYOY5.mjs} +5 -5
- package/dist/cli/{monitors-CW22L3VL.mjs → monitors-5ETSB7S7.mjs} +8 -8
- package/dist/cli/{monitors-PGBHMKOU.js → monitors-A5WYUCGD.js} +92 -92
- package/dist/cli/{org-3V2VAH5D.js → org-7EZDWYKK.js} +73 -73
- package/dist/cli/{org-K5C23LAV.mjs → org-BJOAUSXL.mjs} +7 -7
- package/dist/cli/{pages-7V2C7GWU.mjs → pages-3BYGBTVK.mjs} +7 -7
- package/dist/cli/{pages-2F73VVWC.js → pages-45VNTEQU.js} +18 -18
- package/dist/cli/{play-62KSZGJQ.js → play-5KER3JFU.js} +586 -518
- package/dist/cli/{play-VT7TPJUH.mjs → play-R7JQV533.mjs} +93 -25
- package/dist/cli/{providers-3SI3QBT3.js → providers-OHMZ6QIF.js} +10 -10
- package/dist/cli/{providers-LX562YG7.mjs → providers-RMFCE6MM.mjs} +7 -7
- package/dist/cli/{quickstart-5HA5IFTB.js → quickstart-GNRE4SAT.js} +6 -6
- package/dist/cli/{quickstart-ADE7FV26.mjs → quickstart-IHR4VC5K.mjs} +4 -4
- package/dist/cli/{run-4ZV4UDKP.js → run-77QIMUUV.js} +37 -37
- package/dist/cli/{run-OITZJ6QZ.mjs → run-Y4MIRFJY.mjs} +23 -23
- package/dist/cli/{search-BI5VZQMD.mjs → search-24YKTHMK.mjs} +8 -8
- package/dist/cli/search-S3VO2UKV.js +32 -0
- package/dist/cli/{secrets-A2R36AZ6.mjs → secrets-KHX62AWC.mjs} +7 -7
- package/dist/cli/{secrets-UAKNTMYB.js → secrets-SSEBT3IS.js} +16 -16
- package/dist/cli/{sessions-3JM3OXME.js → sessions-E6KNWYEH.js} +6 -6
- package/dist/cli/{sessions-PPOFUFBW.mjs → sessions-H7T25HGE.mjs} +5 -5
- package/dist/cli/{settings-C4M5HOD4.js → settings-GXUYF5G7.js} +79 -79
- package/dist/cli/{settings-PZA6TBOL.mjs → settings-XSJG6M32.mjs} +12 -12
- package/dist/cli/{setup-245XVTBR.mjs → setup-GD7IOD4U.mjs} +9 -9
- package/dist/cli/{setup-TY2OSI6D.js → setup-JP5YPIA4.js} +44 -44
- package/dist/cli/skills-C4KTW3US.js +31 -0
- package/dist/cli/{skills-ZAN23KLR.mjs → skills-HLHE3ENN.mjs} +7 -7
- package/dist/cli/tools-KS7JMRK6.js +55 -0
- package/dist/cli/{tools-GG4KDQBM.mjs → tools-Q4XIQX7W.mjs} +17 -17
- package/dist/cli/{update-XKXIL6DU.mjs → update-3KRMR2QJ.mjs} +9 -9
- package/dist/cli/update-GYTQYK2W.js +33 -0
- package/dist/cli/{workflow-VN7M3D2U.js → workflow-NMUESL3O.js} +18 -18
- package/dist/cli/{workflow-LVQVTFUJ.mjs → workflow-NOZ7WFEY.mjs} +8 -8
- package/dist/{client-CdJR18SJ.d.mts → client-C9bJ0QXu.d.mts} +1 -1
- package/dist/{client-B3tlWsw7.d.ts → client-CuNH54w3.d.ts} +1 -1
- package/dist/{client-core-CxHBKfE5.d.ts → client-core-C8Q6DKga.d.ts} +38 -2
- package/dist/{client-core-ByJD7QXj.d.mts → client-core-CSiXbe2n.d.mts} +38 -2
- package/dist/{compiler-manifest-D5dARg3M.d.ts → compiler-manifest-Zwm9yqOA.d.mts} +39 -0
- package/dist/{compiler-manifest-D5dARg3M.d.mts → compiler-manifest-Zwm9yqOA.d.ts} +39 -0
- package/dist/{errors-BtHHzWL8.d.ts → errors-CsYwlpn4.d.ts} +1 -1
- package/dist/{errors-BveMVPwA.d.mts → errors-nEsqNLL8.d.mts} +1 -1
- package/dist/{index-C6sovoYP.d.ts → index-9pUZqkPH.d.ts} +1 -1
- package/dist/{index-BboApDGD.d.mts → index-CXF2jtza.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +10 -10
- package/dist/index.mjs +7 -7
- package/dist/install-integrity.json +112 -112
- 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 +1 -1
- 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 +2 -2
- package/dist/plays/run-request.mjs +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-4DBOZZDX.js +0 -41
- package/dist/cli/describe-2ENX4O3U.js +0 -48
- package/dist/cli/git-LUW3GBSD.js +0 -25
- package/dist/cli/search-PXFM3MGW.js +0 -32
- package/dist/cli/skills-UYNRYDDI.js +0 -31
- package/dist/cli/tools-OBESOBG7.js +0 -55
- package/dist/cli/update-2VMXTKBN.js +0 -33
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkRMQB72WWjs = require('./chunk-RMQB72WW.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -17,14 +17,14 @@ var _chunk44UR3BU2js = require('./chunk-44UR3BU2.js');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkRDOPZK7Ajs = require('./chunk-RDOPZK7A.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunk2DND7LLLjs = require('./chunk-2DND7LLL.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkQLVYYDUIjs = require('./chunk-QLVYYDUI.js');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
var _chunkIAYSWZDJjs = require('./chunk-IAYSWZDJ.js');
|
|
@@ -40,7 +40,7 @@ require('./chunk-ZM2YPJQJ.js');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkZ52WEIBRjs = require('./chunk-Z52WEIBR.js');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
@@ -52,10 +52,10 @@ var _chunkA6QCMBGLjs = require('./chunk-A6QCMBGL.js');
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var _chunkIIQ6O5F3js = require('./chunk-IIQ6O5F3.js');
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _chunkSKVMC6K6js = require('./chunk-SKVMC6K6.js');
|
|
59
59
|
require('./chunk-VKKVSFRD.js');
|
|
60
60
|
|
|
61
61
|
|
|
@@ -69,7 +69,7 @@ require('./chunk-VKKVSFRD.js');
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
var
|
|
72
|
+
var _chunk7KAS4QOWjs = require('./chunk-7KAS4QOW.js');
|
|
73
73
|
require('./chunk-E4CABWXL.js');
|
|
74
74
|
|
|
75
75
|
|
|
@@ -80,7 +80,7 @@ require('./chunk-E4CABWXL.js');
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
var
|
|
83
|
+
var _chunkJDMR33HSjs = require('./chunk-JDMR33HS.js');
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
|
|
@@ -89,18 +89,18 @@ require('./chunk-XDVT3GOM.js');
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
var
|
|
92
|
+
var _chunkHBVT4FW5js = require('./chunk-HBVT4FW5.js');
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
var
|
|
99
|
-
require('./chunk-
|
|
98
|
+
var _chunk2G4R4APLjs = require('./chunk-2G4R4APL.js');
|
|
99
|
+
require('./chunk-3L76SFGN.js');
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
var
|
|
103
|
+
var _chunkM475BQ77js = require('./chunk-M475BQ77.js');
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
|
|
@@ -114,17 +114,17 @@ var _chunkYTFCKCIIjs = require('./chunk-YTFCKCII.js');
|
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
|
|
117
|
-
var
|
|
118
|
-
require('./chunk-
|
|
117
|
+
var _chunkH7YFUC3Jjs = require('./chunk-H7YFUC3J.js');
|
|
118
|
+
require('./chunk-5FHU67AT.js');
|
|
119
119
|
|
|
120
120
|
|
|
121
|
-
var
|
|
121
|
+
var _chunkSYWOSAW7js = require('./chunk-SYWOSAW7.js');
|
|
122
122
|
require('./chunk-ALJJRZNJ.js');
|
|
123
123
|
require('./chunk-XNYIZMNQ.js');
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
127
|
-
require('./chunk-
|
|
127
|
+
require('./chunk-UKKCS6Z4.js');
|
|
128
128
|
require('./chunk-OG64RBAC.js');
|
|
129
129
|
|
|
130
130
|
|
|
@@ -2106,7 +2106,7 @@ function resolveField(key, command) {
|
|
|
2106
2106
|
function printSettings(result, json, name) {
|
|
2107
2107
|
result = { ...result, settings: parsePlaySettings(result.settings) };
|
|
2108
2108
|
const selected = fields.filter(([key]) => !name || key === name);
|
|
2109
|
-
|
|
2109
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
2110
2110
|
{
|
|
2111
2111
|
...result,
|
|
2112
2112
|
settings: Object.fromEntries(
|
|
@@ -2150,7 +2150,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2150
2150
|
valueSyntax: field.cli.valueSyntax,
|
|
2151
2151
|
examples: field.cli.examples
|
|
2152
2152
|
}));
|
|
2153
|
-
|
|
2153
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
2154
2154
|
{
|
|
2155
2155
|
fields: descriptions,
|
|
2156
2156
|
render: {
|
|
@@ -2175,7 +2175,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2175
2175
|
async (options, command) => {
|
|
2176
2176
|
if (options.name !== void 0) resolveField(options.name, command);
|
|
2177
2177
|
printSettings(
|
|
2178
|
-
await new (0,
|
|
2178
|
+
await new (0, _chunkSKVMC6K6js.DeeplineClient)().getPlaySettings(options.play),
|
|
2179
2179
|
options.json,
|
|
2180
2180
|
options.name
|
|
2181
2181
|
);
|
|
@@ -2206,7 +2206,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2206
2206
|
);
|
|
2207
2207
|
}
|
|
2208
2208
|
if (options.dryRun) {
|
|
2209
|
-
|
|
2209
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
2210
2210
|
{
|
|
2211
2211
|
dryRun: true,
|
|
2212
2212
|
play,
|
|
@@ -2227,7 +2227,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2227
2227
|
return;
|
|
2228
2228
|
}
|
|
2229
2229
|
printSettings(
|
|
2230
|
-
await new (0,
|
|
2230
|
+
await new (0, _chunkSKVMC6K6js.DeeplineClient)().updatePlaySettings(play, patch),
|
|
2231
2231
|
options.json
|
|
2232
2232
|
);
|
|
2233
2233
|
};
|
|
@@ -2253,13 +2253,13 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2253
2253
|
"--root must be person or team; --limit must be 1\u2013100.",
|
|
2254
2254
|
{ exitCode: 2 }
|
|
2255
2255
|
);
|
|
2256
|
-
const page = await new (0,
|
|
2256
|
+
const page = await new (0, _chunkSKVMC6K6js.DeeplineClient)().listPlaySettingsPaths({
|
|
2257
2257
|
root: options.root,
|
|
2258
2258
|
limit,
|
|
2259
2259
|
cursor: options.cursor
|
|
2260
2260
|
});
|
|
2261
2261
|
const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""}` : null;
|
|
2262
|
-
|
|
2262
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
2263
2263
|
{
|
|
2264
2264
|
...page,
|
|
2265
2265
|
nextCommand,
|
|
@@ -2310,7 +2310,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2310
2310
|
root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _12 => _12.root]), () => ( "person")),
|
|
2311
2311
|
folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.folders]), () => ( []))
|
|
2312
2312
|
};
|
|
2313
|
-
const client = new (0,
|
|
2313
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
2314
2314
|
const paths = [];
|
|
2315
2315
|
let cursor;
|
|
2316
2316
|
do {
|
|
@@ -2372,7 +2372,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2372
2372
|
moved.push(move.playName);
|
|
2373
2373
|
}
|
|
2374
2374
|
}
|
|
2375
|
-
|
|
2375
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
2376
2376
|
{
|
|
2377
2377
|
dryRun: Boolean(options.dryRun),
|
|
2378
2378
|
from: options.from,
|
|
@@ -2500,7 +2500,7 @@ function triggerLines(view) {
|
|
|
2500
2500
|
return lines;
|
|
2501
2501
|
}
|
|
2502
2502
|
function printView(view, json) {
|
|
2503
|
-
|
|
2503
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
2504
2504
|
{
|
|
2505
2505
|
...view,
|
|
2506
2506
|
render: {
|
|
@@ -2513,7 +2513,7 @@ function printView(view, json) {
|
|
|
2513
2513
|
);
|
|
2514
2514
|
}
|
|
2515
2515
|
function printResult(result, json) {
|
|
2516
|
-
|
|
2516
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
2517
2517
|
{
|
|
2518
2518
|
...result,
|
|
2519
2519
|
render: {
|
|
@@ -2543,7 +2543,7 @@ async function mutate(command, options, build) {
|
|
|
2543
2543
|
usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
|
|
2544
2544
|
}
|
|
2545
2545
|
if (options.dryRun) {
|
|
2546
|
-
|
|
2546
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
2547
2547
|
{
|
|
2548
2548
|
dryRun: true,
|
|
2549
2549
|
play: options.play,
|
|
@@ -2562,7 +2562,7 @@ async function mutate(command, options, build) {
|
|
|
2562
2562
|
return;
|
|
2563
2563
|
}
|
|
2564
2564
|
printResult(
|
|
2565
|
-
await new (0,
|
|
2565
|
+
await new (0, _chunkSKVMC6K6js.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
|
|
2566
2566
|
options.json
|
|
2567
2567
|
);
|
|
2568
2568
|
}
|
|
@@ -2595,7 +2595,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2595
2595
|
}).addHelpText("after", help2);
|
|
2596
2596
|
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) => {
|
|
2597
2597
|
printView(
|
|
2598
|
-
await new (0,
|
|
2598
|
+
await new (0, _chunkSKVMC6K6js.DeeplineClient)().getPlayTriggerConfig(options.play),
|
|
2599
2599
|
options.json
|
|
2600
2600
|
);
|
|
2601
2601
|
});
|
|
@@ -2639,7 +2639,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2639
2639
|
if (options.auth === void 0) {
|
|
2640
2640
|
if (secrets.length || options.header || options.signaturePrefix)
|
|
2641
2641
|
usage(setWebhook, "--secret/--header need --auth.");
|
|
2642
|
-
const current = await new (0,
|
|
2642
|
+
const current = await new (0, _chunkSKVMC6K6js.DeeplineClient)().getPlayTriggerConfig(
|
|
2643
2643
|
options.play
|
|
2644
2644
|
);
|
|
2645
2645
|
return {
|
|
@@ -2716,7 +2716,7 @@ var KIND_DESCRIPTIONS = {
|
|
|
2716
2716
|
"receipt.skipped": "Saved work result: skipped.",
|
|
2717
2717
|
"runtime.event": "Other event."
|
|
2718
2718
|
};
|
|
2719
|
-
var RUN_LOGS_KIND_HELP =
|
|
2719
|
+
var RUN_LOGS_KIND_HELP = _chunk7KAS4QOWjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
|
|
2720
2720
|
kind,
|
|
2721
2721
|
description: KIND_DESCRIPTIONS[kind]
|
|
2722
2722
|
}));
|
|
@@ -2853,9 +2853,9 @@ function configureRunQueryCommandErrors(command, resource) {
|
|
|
2853
2853
|
const args = program.args;
|
|
2854
2854
|
if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
|
|
2855
2855
|
error.exitCode = 2;
|
|
2856
|
-
if (
|
|
2857
|
-
|
|
2858
|
-
Object.assign(new (0,
|
|
2856
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
|
|
2857
|
+
_chunkH7YFUC3Jjs.printJsonError.call(void 0,
|
|
2858
|
+
Object.assign(new (0, _chunk7KAS4QOWjs.RunEventQueryInputError)(error.message), {
|
|
2859
2859
|
exitCode: 2,
|
|
2860
2860
|
retryable: false
|
|
2861
2861
|
})
|
|
@@ -2899,14 +2899,14 @@ function parseQuery(args, resource) {
|
|
|
2899
2899
|
if (VALUE_FLAGS.has(flag)) {
|
|
2900
2900
|
const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
|
|
2901
2901
|
if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
|
|
2902
|
-
throw new (0,
|
|
2902
|
+
throw new (0, _chunk7KAS4QOWjs.RunEventQueryInputError)(
|
|
2903
2903
|
`${flag} requires a value. Use ${flag} <value>.`
|
|
2904
2904
|
);
|
|
2905
2905
|
}
|
|
2906
2906
|
if (flag === "--sum") sums.push(value);
|
|
2907
2907
|
else {
|
|
2908
2908
|
if (values[flag] !== void 0) {
|
|
2909
|
-
throw new (0,
|
|
2909
|
+
throw new (0, _chunk7KAS4QOWjs.RunEventQueryInputError)(
|
|
2910
2910
|
`${flag} may only be supplied once.`
|
|
2911
2911
|
);
|
|
2912
2912
|
}
|
|
@@ -2920,12 +2920,12 @@ function parseQuery(args, resource) {
|
|
|
2920
2920
|
}
|
|
2921
2921
|
if (arg.startsWith("-")) {
|
|
2922
2922
|
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.";
|
|
2923
|
-
throw new (0,
|
|
2923
|
+
throw new (0, _chunk7KAS4QOWjs.RunEventQueryInputError)(
|
|
2924
2924
|
`Unsupported query flag ${flag}. ${correction}`
|
|
2925
2925
|
);
|
|
2926
2926
|
}
|
|
2927
2927
|
if (runId !== void 0) {
|
|
2928
|
-
throw new (0,
|
|
2928
|
+
throw new (0, _chunk7KAS4QOWjs.RunEventQueryInputError)(
|
|
2929
2929
|
`Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
|
|
2930
2930
|
);
|
|
2931
2931
|
}
|
|
@@ -2933,7 +2933,7 @@ function parseQuery(args, resource) {
|
|
|
2933
2933
|
}
|
|
2934
2934
|
if (switches.has("--fields")) {
|
|
2935
2935
|
if (runId !== void 0) {
|
|
2936
|
-
throw new (0,
|
|
2936
|
+
throw new (0, _chunk7KAS4QOWjs.RunEventQueryInputError)(
|
|
2937
2937
|
"--fields does not use a run ID. Omit the positional run ID."
|
|
2938
2938
|
);
|
|
2939
2939
|
}
|
|
@@ -2946,18 +2946,18 @@ function parseQuery(args, resource) {
|
|
|
2946
2946
|
)
|
|
2947
2947
|
];
|
|
2948
2948
|
if (incompatible.length) {
|
|
2949
|
-
throw new (0,
|
|
2949
|
+
throw new (0, _chunk7KAS4QOWjs.RunEventQueryInputError)(
|
|
2950
2950
|
`--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
|
|
2951
2951
|
);
|
|
2952
2952
|
}
|
|
2953
2953
|
}
|
|
2954
2954
|
if (switches.has("--count") && values["--group-by"] !== void 0) {
|
|
2955
|
-
throw new (0,
|
|
2955
|
+
throw new (0, _chunk7KAS4QOWjs.RunEventQueryInputError)(
|
|
2956
2956
|
"--count cannot be combined with --group-by. Use --group-by for counts per group."
|
|
2957
2957
|
);
|
|
2958
2958
|
}
|
|
2959
2959
|
if (sums.length && switches.has("--count")) {
|
|
2960
|
-
throw new (0,
|
|
2960
|
+
throw new (0, _chunk7KAS4QOWjs.RunEventQueryInputError)(
|
|
2961
2961
|
"--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
|
|
2962
2962
|
);
|
|
2963
2963
|
}
|
|
@@ -2965,7 +2965,7 @@ function parseQuery(args, resource) {
|
|
|
2965
2965
|
if (operation === "count") {
|
|
2966
2966
|
for (const flag of ["--limit", "--cursor", "--payloads"]) {
|
|
2967
2967
|
if (values[flag] !== void 0 || switches.has(flag)) {
|
|
2968
|
-
throw new (0,
|
|
2968
|
+
throw new (0, _chunk7KAS4QOWjs.RunEventQueryInputError)(
|
|
2969
2969
|
`--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
|
|
2970
2970
|
);
|
|
2971
2971
|
}
|
|
@@ -3000,16 +3000,16 @@ function parseQuery(args, resource) {
|
|
|
3000
3000
|
];
|
|
3001
3001
|
}
|
|
3002
3002
|
}
|
|
3003
|
-
const request =
|
|
3003
|
+
const request = _chunk7KAS4QOWjs.normalizeRunEventOperationRequest.call(void 0, body);
|
|
3004
3004
|
const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
|
|
3005
3005
|
const backend = values["--runtime-backend"];
|
|
3006
3006
|
if (backend && backend !== "daytona" && backend !== "modal") {
|
|
3007
|
-
throw new (0,
|
|
3007
|
+
throw new (0, _chunk7KAS4QOWjs.RunEventQueryInputError)(
|
|
3008
3008
|
"--runtime-backend must be daytona or modal."
|
|
3009
3009
|
);
|
|
3010
3010
|
}
|
|
3011
3011
|
if (backend && !namespace) {
|
|
3012
|
-
throw new (0,
|
|
3012
|
+
throw new (0, _chunk7KAS4QOWjs.RunEventQueryInputError)(
|
|
3013
3013
|
"--runtime-backend requires --runtime-namespace."
|
|
3014
3014
|
);
|
|
3015
3015
|
}
|
|
@@ -3056,12 +3056,12 @@ async function handleRunEventQuery(args, resource = "logs") {
|
|
|
3056
3056
|
const failure = error instanceof Error ? error : new Error(String(error));
|
|
3057
3057
|
const record3 = failure;
|
|
3058
3058
|
const status = record3.statusCode;
|
|
3059
|
-
const exitCode = error instanceof
|
|
3059
|
+
const exitCode = error instanceof _chunk7KAS4QOWjs.RunEventQueryInputError || status === 400 || status === 422 || record3.code === "INVALID_RUNTIME_SELECTION" ? 2 : status === 401 || status === 403 || record3.code === "CONFIG_ERROR" || record3.code === "RUNTIME_ENVIRONMENT_TOKEN_REQUIRED" ? 3 : status === 404 ? 4 : 5;
|
|
3060
3060
|
const diagnostic = Object.assign(failure, {
|
|
3061
3061
|
exitCode,
|
|
3062
3062
|
retryable: exitCode === 5
|
|
3063
3063
|
});
|
|
3064
|
-
if (
|
|
3064
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) _chunkH7YFUC3Jjs.printJsonError.call(void 0, diagnostic);
|
|
3065
3065
|
else console.error(`Error: ${diagnostic.message}`);
|
|
3066
3066
|
return exitCode;
|
|
3067
3067
|
}
|
|
@@ -3076,7 +3076,7 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3076
3076
|
...criteria
|
|
3077
3077
|
} = request;
|
|
3078
3078
|
const options = { ...criteria, ...runtime ? { runtime } : {} };
|
|
3079
|
-
const client = new (0,
|
|
3079
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
3080
3080
|
let result;
|
|
3081
3081
|
if (request.operation === "fields") {
|
|
3082
3082
|
result = await client.runs[resource].fields(runtime ? { runtime } : {});
|
|
@@ -3142,13 +3142,13 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3142
3142
|
lines.push(`Next page: ${nextPage}`);
|
|
3143
3143
|
}
|
|
3144
3144
|
}
|
|
3145
|
-
|
|
3145
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
3146
3146
|
{
|
|
3147
3147
|
...result,
|
|
3148
3148
|
...nextPage ? { next: { page: nextPage } } : {},
|
|
3149
3149
|
render: { sections: [{ title: `run ${resource}`, lines }] }
|
|
3150
3150
|
},
|
|
3151
|
-
{ json:
|
|
3151
|
+
{ json: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
|
|
3152
3152
|
` }
|
|
3153
3153
|
);
|
|
3154
3154
|
return 0;
|
|
@@ -3219,7 +3219,7 @@ function rowCountsFrom(input) {
|
|
|
3219
3219
|
return { completed: c, failed: f, total: known };
|
|
3220
3220
|
}
|
|
3221
3221
|
function decodeRunStatus(status) {
|
|
3222
|
-
return
|
|
3222
|
+
return _chunkJDMR33HSjs.decodePlayRunPublicStatus.call(void 0, status);
|
|
3223
3223
|
}
|
|
3224
3224
|
function deriveRunExecutionState(input) {
|
|
3225
3225
|
const status = decodeRunStatus(input.status);
|
|
@@ -4067,7 +4067,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4067
4067
|
...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
|
|
4068
4068
|
);
|
|
4069
4069
|
}
|
|
4070
|
-
const response = await new (0,
|
|
4070
|
+
const response = await new (0, _chunkSKVMC6K6js.DeeplineClient)().runs.getReceipts(runId, {
|
|
4071
4071
|
keys
|
|
4072
4072
|
});
|
|
4073
4073
|
const failed = response.receipts.filter(
|
|
@@ -4079,7 +4079,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4079
4079
|
JSON.stringify(response, null, 2) + "\n",
|
|
4080
4080
|
{ flag: "wx", mode: 384 }
|
|
4081
4081
|
);
|
|
4082
|
-
|
|
4082
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
4083
4083
|
{
|
|
4084
4084
|
runId,
|
|
4085
4085
|
out: options.out,
|
|
@@ -4089,7 +4089,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4089
4089
|
{ json: true }
|
|
4090
4090
|
);
|
|
4091
4091
|
} else {
|
|
4092
|
-
|
|
4092
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
|
|
4093
4093
|
}
|
|
4094
4094
|
if (failed)
|
|
4095
4095
|
process.exitCode = response.receipts.some(
|
|
@@ -4128,7 +4128,7 @@ includes nextCommand when another page is available.
|
|
|
4128
4128
|
{ exitCode: 2 }
|
|
4129
4129
|
);
|
|
4130
4130
|
}
|
|
4131
|
-
const page = await new (0,
|
|
4131
|
+
const page = await new (0, _chunkSKVMC6K6js.DeeplineClient)().runs.children(parentRunId, {
|
|
4132
4132
|
launchKey: options.launchKey,
|
|
4133
4133
|
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
4134
4134
|
limit
|
|
@@ -4143,7 +4143,7 @@ includes nextCommand when another page is available.
|
|
|
4143
4143
|
"--limit",
|
|
4144
4144
|
String(limit)
|
|
4145
4145
|
].join(" ") : null;
|
|
4146
|
-
|
|
4146
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
4147
4147
|
{
|
|
4148
4148
|
parentRunId,
|
|
4149
4149
|
launchKey: options.launchKey,
|
|
@@ -4179,7 +4179,7 @@ async function handleRunsHistory(options) {
|
|
|
4179
4179
|
throw new Error("--limit must be a positive integer.");
|
|
4180
4180
|
}
|
|
4181
4181
|
}
|
|
4182
|
-
const page = await new (0,
|
|
4182
|
+
const page = await new (0, _chunkSKVMC6K6js.DeeplineClient)().runs.history({
|
|
4183
4183
|
cursor: options.cursor,
|
|
4184
4184
|
orgId: options.org,
|
|
4185
4185
|
search: options.search,
|
|
@@ -4195,7 +4195,7 @@ async function handleRunsHistory(options) {
|
|
|
4195
4195
|
);
|
|
4196
4196
|
}
|
|
4197
4197
|
if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
|
|
4198
|
-
|
|
4198
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
4199
4199
|
{ ...page, render: { sections: [{ title: "Run history", lines }] } },
|
|
4200
4200
|
options.json ? { json: true } : {}
|
|
4201
4201
|
);
|
|
@@ -4247,12 +4247,17 @@ async function runRunsRerunCommand(runId, options) {
|
|
|
4247
4247
|
return 1;
|
|
4248
4248
|
}
|
|
4249
4249
|
}
|
|
4250
|
-
const result = await new (0,
|
|
4250
|
+
const result = await new (0, _chunkSKVMC6K6js.DeeplineClient)().runs.rerun(runId, {
|
|
4251
4251
|
...idempotencyKey === void 0 ? {} : { idempotencyKey },
|
|
4252
4252
|
...inputOverrides === void 0 ? {} : { inputOverrides }
|
|
4253
4253
|
});
|
|
4254
|
-
if (
|
|
4255
|
-
|
|
4254
|
+
if (_chunkH7YFUC3Jjs.shouldEmitJson.call(void 0, options.json)) {
|
|
4255
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0, result, { json: true });
|
|
4256
|
+
} else if (result.rateLimited) {
|
|
4257
|
+
console.log(`
|
|
4258
|
+
${result.rateLimited.message}`);
|
|
4259
|
+
console.log(` inspect: deepline runs get ${result.runId}`);
|
|
4260
|
+
console.log(" No new run was started.");
|
|
4256
4261
|
} else {
|
|
4257
4262
|
console.log(
|
|
4258
4263
|
result.deduplicated === true ? `
|
|
@@ -5071,13 +5076,13 @@ var RunDataset = class _RunDataset {
|
|
|
5071
5076
|
const absolutePath = _path.resolve.call(void 0, outPath);
|
|
5072
5077
|
_fs.writeFileSync.call(void 0,
|
|
5073
5078
|
absolutePath,
|
|
5074
|
-
`${JSON.stringify(
|
|
5079
|
+
`${JSON.stringify(_chunkRDOPZK7Ajs.orderRunExportJson.call(void 0, this.rows), null, 2)}
|
|
5075
5080
|
`,
|
|
5076
5081
|
"utf-8"
|
|
5077
5082
|
);
|
|
5078
5083
|
return absolutePath;
|
|
5079
5084
|
}
|
|
5080
|
-
return
|
|
5085
|
+
return _chunkRDOPZK7Ajs.writeRunDatasetCsv.call(void 0, {
|
|
5081
5086
|
rows: this.rows,
|
|
5082
5087
|
columns: this.#info.columns,
|
|
5083
5088
|
outPath
|
|
@@ -5904,10 +5909,10 @@ function resolveOwnedPlayReferenceName(reference, ownerSlug) {
|
|
|
5904
5909
|
// ../plays/deploy/run-deployment.ts
|
|
5905
5910
|
var RUN_PLAY_METHOD_NAMES = /* @__PURE__ */ new Set(["runPlay", "runPlayAsync"]);
|
|
5906
5911
|
function isRunPlayReceiver(node) {
|
|
5907
|
-
return
|
|
5912
|
+
return _chunkZ52WEIBRjs.isAstNode.call(void 0, node) && node.type === "Identifier" && typeof node.name === "string" && (node.name === "ctx" || node.name.endsWith("Ctx"));
|
|
5908
5913
|
}
|
|
5909
5914
|
function stringLiteralValue(node) {
|
|
5910
|
-
if (!
|
|
5915
|
+
if (!_chunkZ52WEIBRjs.isAstNode.call(void 0, node)) return null;
|
|
5911
5916
|
if (node.type === "Literal" && typeof node.value === "string") {
|
|
5912
5917
|
return node.value;
|
|
5913
5918
|
}
|
|
@@ -5918,12 +5923,12 @@ function stringLiteralValue(node) {
|
|
|
5918
5923
|
return null;
|
|
5919
5924
|
}
|
|
5920
5925
|
async function extractRunPlayStringTargets(sourceCode) {
|
|
5921
|
-
const program =
|
|
5926
|
+
const program = _chunkZ52WEIBRjs.parsePlaySourceForAnalysis.call(void 0, sourceCode);
|
|
5922
5927
|
if (!program) return await _asyncNullishCoalesce(await extractWithCompiler(sourceCode), async () => ( []));
|
|
5923
5928
|
const targets = /* @__PURE__ */ new Set();
|
|
5924
5929
|
const visit = (node) => {
|
|
5925
5930
|
const callee = node.callee;
|
|
5926
|
-
if (node.type === "CallExpression" &&
|
|
5931
|
+
if (node.type === "CallExpression" && _chunkZ52WEIBRjs.isAstNode.call(void 0, callee) && callee.type === "MemberExpression" && callee.computed !== true && _chunkZ52WEIBRjs.isAstNode.call(void 0, callee.property) && RUN_PLAY_METHOD_NAMES.has(String(callee.property.name)) && isRunPlayReceiver(callee.object) && Array.isArray(node.arguments)) {
|
|
5927
5932
|
const playRef = stringLiteralValue(node.arguments[1]);
|
|
5928
5933
|
const ownedName = playRef === null ? null : resolveOwnedPlayReferenceName(playRef);
|
|
5929
5934
|
if (ownedName) targets.add(ownedName);
|
|
@@ -5931,7 +5936,7 @@ async function extractRunPlayStringTargets(sourceCode) {
|
|
|
5931
5936
|
for (const [key, value] of Object.entries(node)) {
|
|
5932
5937
|
if (key === "loc") continue;
|
|
5933
5938
|
for (const child of Array.isArray(value) ? value : [value]) {
|
|
5934
|
-
if (
|
|
5939
|
+
if (_chunkZ52WEIBRjs.isAstNode.call(void 0, child)) visit(child);
|
|
5935
5940
|
}
|
|
5936
5941
|
}
|
|
5937
5942
|
};
|
|
@@ -6797,7 +6802,7 @@ function renderOutcome(outcome) {
|
|
|
6797
6802
|
function printResult2(input) {
|
|
6798
6803
|
const failed = input.status === "failed" || input.status === "cancelled";
|
|
6799
6804
|
if (failed) process.exitCode = 1;
|
|
6800
|
-
|
|
6805
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
6801
6806
|
{
|
|
6802
6807
|
deployment: { ...input.deployment, status: input.status },
|
|
6803
6808
|
plays: input.outcomes,
|
|
@@ -6822,7 +6827,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6822
6827
|
const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
|
|
6823
6828
|
throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
|
|
6824
6829
|
});
|
|
6825
|
-
const { http, config } =
|
|
6830
|
+
const { http, config } = _chunkH7YFUC3Jjs.getAuthedHttpClient.call(void 0, );
|
|
6826
6831
|
const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
|
|
6827
6832
|
const startDeployment = () => http.post("/api/v2/deployments", {
|
|
6828
6833
|
deliveryId,
|
|
@@ -6849,7 +6854,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6849
6854
|
},
|
|
6850
6855
|
{
|
|
6851
6856
|
bundle: bundleDeployPlayFile,
|
|
6852
|
-
fetchImpl:
|
|
6857
|
+
fetchImpl: _chunkSYWOSAW7js.fetchWithDeploymentProtection,
|
|
6853
6858
|
// The plays are already here: "opening" the source is naming it.
|
|
6854
6859
|
openSource: async () => ({
|
|
6855
6860
|
open: async () => ({ repoRoot: root })
|
|
@@ -6975,7 +6980,7 @@ async function checkLocalPlayGraph(input) {
|
|
|
6975
6980
|
// src/cli/renderers/local-play-execution.ts
|
|
6976
6981
|
function renderLocalPlayExecutionPlan(plan, options = {}) {
|
|
6977
6982
|
if (options.dryRun) {
|
|
6978
|
-
|
|
6983
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
|
|
6979
6984
|
return;
|
|
6980
6985
|
}
|
|
6981
6986
|
process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
|
|
@@ -7147,7 +7152,7 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7147
7152
|
const startedAt = Date.now();
|
|
7148
7153
|
try {
|
|
7149
7154
|
const result = run();
|
|
7150
|
-
|
|
7155
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
7151
7156
|
phase,
|
|
7152
7157
|
ms: Date.now() - startedAt,
|
|
7153
7158
|
ok: true,
|
|
@@ -7155,7 +7160,7 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7155
7160
|
});
|
|
7156
7161
|
return result;
|
|
7157
7162
|
} catch (error) {
|
|
7158
|
-
|
|
7163
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
7159
7164
|
phase,
|
|
7160
7165
|
ms: Date.now() - startedAt,
|
|
7161
7166
|
ok: false,
|
|
@@ -7515,8 +7520,8 @@ async function ensureEditableRemotePlay(client, target) {
|
|
|
7515
7520
|
return detail;
|
|
7516
7521
|
}
|
|
7517
7522
|
function writeInlinePlay(code) {
|
|
7518
|
-
const filePath = _path.resolve.call(void 0,
|
|
7519
|
-
const source =
|
|
7523
|
+
const filePath = _path.resolve.call(void 0, _chunkZ52WEIBRjs.INLINE_PLAY_FILE);
|
|
7524
|
+
const source = _chunkZ52WEIBRjs.inlinePlaySource.call(void 0, code);
|
|
7520
7525
|
try {
|
|
7521
7526
|
_fs.writeFileSync.call(void 0, filePath, source, { flag: "wx" });
|
|
7522
7527
|
} catch (error) {
|
|
@@ -7535,7 +7540,7 @@ function buildMissingDefinePlayError(filePath) {
|
|
|
7535
7540
|
);
|
|
7536
7541
|
}
|
|
7537
7542
|
function extractPlayName(code, filePath) {
|
|
7538
|
-
const definedPlayName =
|
|
7543
|
+
const definedPlayName = _chunkZ52WEIBRjs.extractDefinedPlayName.call(void 0, code, filePath);
|
|
7539
7544
|
if (definedPlayName) {
|
|
7540
7545
|
return definedPlayName;
|
|
7541
7546
|
}
|
|
@@ -7614,7 +7619,7 @@ function collectLocalFileInputRefs(value, inputPath, key, out) {
|
|
|
7614
7619
|
if (!trimmed || isUrlValue(trimmed)) {
|
|
7615
7620
|
return;
|
|
7616
7621
|
}
|
|
7617
|
-
const keyIsCsvData = key ===
|
|
7622
|
+
const keyIsCsvData = key === _chunkJDMR33HSjs.CSV_DATA_INPUT_KEY;
|
|
7618
7623
|
const endsWithCsv = /\.csv$/i.test(trimmed);
|
|
7619
7624
|
const looksLikeFile = /\.[a-z0-9]{1,8}$/i.test(trimmed);
|
|
7620
7625
|
if (keyIsCsvData) {
|
|
@@ -7645,14 +7650,14 @@ function collectLocalFileInputRefs(value, inputPath, key, out) {
|
|
|
7645
7650
|
}
|
|
7646
7651
|
}
|
|
7647
7652
|
function preflightLocalFileInputs(runtimeInput) {
|
|
7648
|
-
if (
|
|
7649
|
-
const csvValue = runtimeInput[
|
|
7653
|
+
if (_chunkJDMR33HSjs.CSV_DATA_INPUT_KEY in runtimeInput) {
|
|
7654
|
+
const csvValue = runtimeInput[_chunkJDMR33HSjs.CSV_DATA_INPUT_KEY];
|
|
7650
7655
|
if (typeof csvValue === "string" && csvValue.trim().length === 0) {
|
|
7651
7656
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
7652
|
-
`Input ${
|
|
7657
|
+
`Input ${_chunkJDMR33HSjs.CSV_DATA_INPUT_KEY} is an empty string. Provide a path to a CSV file (or a CSV URL). No run was created.`,
|
|
7653
7658
|
void 0,
|
|
7654
7659
|
"PLAY_INPUT_FILE_PREFLIGHT",
|
|
7655
|
-
{ inputPath:
|
|
7660
|
+
{ inputPath: _chunkJDMR33HSjs.CSV_DATA_INPUT_KEY, reason: "csv_empty_string" }
|
|
7656
7661
|
);
|
|
7657
7662
|
}
|
|
7658
7663
|
}
|
|
@@ -7719,7 +7724,7 @@ var NODE_STAGED_FILE_CODEC = {
|
|
|
7719
7724
|
)
|
|
7720
7725
|
};
|
|
7721
7726
|
async function stageFileInputArgs(input) {
|
|
7722
|
-
return
|
|
7727
|
+
return _chunkJDMR33HSjs.stageFileInputs.call(void 0, {
|
|
7723
7728
|
stage: (files) => input.client.stagePlayFiles(files),
|
|
7724
7729
|
runtimeInput: input.runtimeInput,
|
|
7725
7730
|
bindings: input.bindings,
|
|
@@ -7743,7 +7748,7 @@ function stageFile(logicalPath, absolutePath) {
|
|
|
7743
7748
|
logicalPath,
|
|
7744
7749
|
contentBase64: buffer.toString("base64"),
|
|
7745
7750
|
contentHash: _crypto.createHash.call(void 0, "sha256").update(buffer).digest("hex"),
|
|
7746
|
-
contentType:
|
|
7751
|
+
contentType: _chunkJDMR33HSjs.stagedFileContentType.call(void 0, absolutePath),
|
|
7747
7752
|
bytes: buffer.byteLength
|
|
7748
7753
|
};
|
|
7749
7754
|
}
|
|
@@ -7764,7 +7769,7 @@ function unresolvedPackagedFilesMessage(node) {
|
|
|
7764
7769
|
const details = node.unresolvedFileReferences.map((unresolved) => `${unresolved.sourceFragment}: ${unresolved.message}`).join("; ");
|
|
7765
7770
|
return `Failed to package local deepline.csv(...) files in ${node.filePath}: ${details}`;
|
|
7766
7771
|
}
|
|
7767
|
-
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName =
|
|
7772
|
+
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName = _chunkZ52WEIBRjs.PLAY_DEFAULT_EXPORT, options = {}) {
|
|
7768
7773
|
const playBundler = await loadPlayBundler();
|
|
7769
7774
|
const nodes = /* @__PURE__ */ new Map();
|
|
7770
7775
|
const diagnostics = [];
|
|
@@ -7778,7 +7783,7 @@ async function collectBundledPlayGraph(entryFile, profile = null, entryExportNam
|
|
|
7778
7783
|
const bundleResult = await playBundler.bundlePlayFile(absolutePath, {
|
|
7779
7784
|
target: artifactKind,
|
|
7780
7785
|
...options.cache === false ? { cache: false } : {},
|
|
7781
|
-
...absolutePath === rootPath && entryExportName !==
|
|
7786
|
+
...absolutePath === rootPath && entryExportName !== _chunkZ52WEIBRjs.PLAY_DEFAULT_EXPORT ? { exportName: entryExportName } : {}
|
|
7782
7787
|
});
|
|
7783
7788
|
if (bundleResult.success === false) {
|
|
7784
7789
|
diagnostics.push(
|
|
@@ -7942,7 +7947,7 @@ function playStatusErrorText(status) {
|
|
|
7942
7947
|
function isRetryablePendingStartFailure(status) {
|
|
7943
7948
|
if (status.status !== "failed") return false;
|
|
7944
7949
|
if (status.runId && status.runId !== "pending") return false;
|
|
7945
|
-
return
|
|
7950
|
+
return _chunk7KAS4QOWjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
|
|
7946
7951
|
}
|
|
7947
7952
|
function isAmbiguousPlayStartOutcomeError(error) {
|
|
7948
7953
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && typeof error.statusCode === "number") {
|
|
@@ -7991,13 +7996,13 @@ var PlayStartOutcomeUnknownError = (_class = class extends _chunkDIAWYWT5js.Deep
|
|
|
7991
7996
|
}, _class);
|
|
7992
7997
|
function watchSurfaceReaches(state, provenance, level) {
|
|
7993
7998
|
const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
|
|
7994
|
-
if (!
|
|
7999
|
+
if (!_chunk7KAS4QOWjs.logLevelReaches.call(void 0, level, minimumLevel)) {
|
|
7995
8000
|
return false;
|
|
7996
8001
|
}
|
|
7997
|
-
if (
|
|
8002
|
+
if (_chunk7KAS4QOWjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
|
|
7998
8003
|
return true;
|
|
7999
8004
|
}
|
|
8000
|
-
return state.verbose === true &&
|
|
8005
|
+
return state.verbose === true && _chunk7KAS4QOWjs.logProvenanceReaches.call(void 0, provenance, "debug");
|
|
8001
8006
|
}
|
|
8002
8007
|
function getEventPayload(event) {
|
|
8003
8008
|
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
@@ -8499,7 +8504,7 @@ function resolveRunPlayName(status, runId) {
|
|
|
8499
8504
|
}
|
|
8500
8505
|
function openPlayDashboard(dashboardUrl, open2) {
|
|
8501
8506
|
if (open2 && dashboardUrl) {
|
|
8502
|
-
|
|
8507
|
+
_chunkH7YFUC3Jjs.openInBrowser.call(void 0, dashboardUrl);
|
|
8503
8508
|
}
|
|
8504
8509
|
}
|
|
8505
8510
|
function printPlayLogLines(input) {
|
|
@@ -8576,7 +8581,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8576
8581
|
...input.fullJson === void 0 ? {} : { full: input.fullJson }
|
|
8577
8582
|
});
|
|
8578
8583
|
} catch (error) {
|
|
8579
|
-
if (
|
|
8584
|
+
if (_chunk7KAS4QOWjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
8580
8585
|
return null;
|
|
8581
8586
|
}
|
|
8582
8587
|
throw error;
|
|
@@ -8656,9 +8661,9 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8656
8661
|
signal: controller.signal,
|
|
8657
8662
|
deferLogs: !input.emitLogs,
|
|
8658
8663
|
omitTerminalLogs: !input.emitLogs,
|
|
8659
|
-
...
|
|
8664
|
+
..._chunk2G4R4APLjs.isCliTraceEnabled.call(void 0, ) ? {
|
|
8660
8665
|
onPoll: (observation) => {
|
|
8661
|
-
|
|
8666
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
8662
8667
|
phase: "play_watch_poll",
|
|
8663
8668
|
workflowId: input.workflowId,
|
|
8664
8669
|
ms: observation.durationMs,
|
|
@@ -8672,7 +8677,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8672
8677
|
full: input.fullJson,
|
|
8673
8678
|
billing: false,
|
|
8674
8679
|
onStatus: async (status) => {
|
|
8675
|
-
|
|
8680
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
8676
8681
|
phase: "play_watch_terminal_status",
|
|
8677
8682
|
workflowId: input.workflowId,
|
|
8678
8683
|
full: input.fullJson === true
|
|
@@ -8741,8 +8746,8 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8741
8746
|
...input.cliAdmission ? { cliAdmission: true } : {}
|
|
8742
8747
|
});
|
|
8743
8748
|
} catch (error) {
|
|
8744
|
-
if (!(error instanceof
|
|
8745
|
-
await
|
|
8749
|
+
if (!(error instanceof _chunkJDMR33HSjs.CliPlayAdmissionUnsupportedError)) throw error;
|
|
8750
|
+
await _chunkHBVT4FW5js.checkPlayRunCompatibility.call(void 0,
|
|
8746
8751
|
input.client.baseUrl,
|
|
8747
8752
|
input.maintenancePolicy
|
|
8748
8753
|
);
|
|
@@ -8776,8 +8781,10 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8776
8781
|
await _optionalChain([input, 'access', _301 => _301.onRunStarted, 'optionalCall', _302 => _302(workflowId)]);
|
|
8777
8782
|
await _optionalChain([input, 'access', _303 => _303.onRunAdmitted, 'optionalCall', _304 => _304(workflowId)]);
|
|
8778
8783
|
const dashboardUrl = _nullishCoalesce(started.dashboardUrl, () => ( _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, input.client.baseUrl, input.playName)));
|
|
8784
|
+
const rateLimited = _nullishCoalesce(started.rateLimited, () => ( null));
|
|
8779
8785
|
if (!input.jsonOutput) {
|
|
8780
8786
|
writeStartedPlayRun({
|
|
8787
|
+
rateLimited,
|
|
8781
8788
|
runId: workflowId,
|
|
8782
8789
|
playName: input.playName,
|
|
8783
8790
|
dashboardUrl,
|
|
@@ -8788,7 +8795,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8788
8795
|
}
|
|
8789
8796
|
openPlayDashboard(dashboardUrl, _nullishCoalesce(input.open, () => ( false)));
|
|
8790
8797
|
input.progress.phase("running");
|
|
8791
|
-
|
|
8798
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
8792
8799
|
phase: "cli.play_start_admitted",
|
|
8793
8800
|
ms: Date.now() - startedAt,
|
|
8794
8801
|
ok: true,
|
|
@@ -8805,7 +8812,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8805
8812
|
startedAt,
|
|
8806
8813
|
waitTimeoutMs: input.waitTimeoutMs
|
|
8807
8814
|
});
|
|
8808
|
-
const initialStatus =
|
|
8815
|
+
const initialStatus = _chunk7KAS4QOWjs.normalizePlayStatus.call(void 0, initialTerminal);
|
|
8809
8816
|
const status2 = await resolvePlayRunOutputStatus({
|
|
8810
8817
|
client: input.client,
|
|
8811
8818
|
status: initialStatus,
|
|
@@ -8813,16 +8820,19 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8813
8820
|
jsonOutput: input.jsonOutput,
|
|
8814
8821
|
fromDurableStatus: true
|
|
8815
8822
|
});
|
|
8816
|
-
|
|
8823
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
8817
8824
|
phase: "play_watch_terminal_status",
|
|
8818
8825
|
workflowId,
|
|
8819
8826
|
full: true,
|
|
8820
8827
|
source: status2 === initialStatus ? "start_response" : "durable_repair"
|
|
8821
8828
|
});
|
|
8822
|
-
const completedStatus =
|
|
8829
|
+
const completedStatus = withRateLimitedNotice(
|
|
8830
|
+
{ ...status2, dashboardUrl },
|
|
8831
|
+
rateLimited
|
|
8832
|
+
);
|
|
8823
8833
|
return input.request.revisionId ? { ...completedStatus, revisionId: input.request.revisionId } : completedStatus;
|
|
8824
8834
|
}
|
|
8825
|
-
const
|
|
8835
|
+
const watchedStatus = await waitForPlayCompletionByWatch({
|
|
8826
8836
|
...input,
|
|
8827
8837
|
workflowId,
|
|
8828
8838
|
dashboardUrl,
|
|
@@ -8837,6 +8847,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8837
8847
|
lastStatusHeartbeatAt: 0
|
|
8838
8848
|
}
|
|
8839
8849
|
});
|
|
8850
|
+
const status = withRateLimitedNotice(watchedStatus, rateLimited);
|
|
8840
8851
|
return input.request.revisionId ? { ...status, revisionId: input.request.revisionId } : status;
|
|
8841
8852
|
}
|
|
8842
8853
|
async function startAndWaitForPlayCompletionByStream(input) {
|
|
@@ -8854,10 +8865,17 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8854
8865
|
for (let attempt = 0; attempt <= retryDelays.length; attempt += 1) {
|
|
8855
8866
|
let status;
|
|
8856
8867
|
try {
|
|
8857
|
-
|
|
8868
|
+
const notice = { value: null };
|
|
8869
|
+
status = withRateLimitedNotice(
|
|
8870
|
+
await startAndWaitForPlayCompletionByStreamOnce({
|
|
8871
|
+
...pinnedInput,
|
|
8872
|
+
rateLimitedNotice: notice
|
|
8873
|
+
}),
|
|
8874
|
+
notice.value
|
|
8875
|
+
);
|
|
8858
8876
|
} catch (error) {
|
|
8859
|
-
if (error instanceof
|
|
8860
|
-
await
|
|
8877
|
+
if (error instanceof _chunkJDMR33HSjs.CliPlayAdmissionUnsupportedError && input.cliAdmission) {
|
|
8878
|
+
await _chunkHBVT4FW5js.checkPlayRunCompatibility.call(void 0,
|
|
8861
8879
|
input.client.baseUrl,
|
|
8862
8880
|
input.maintenancePolicy
|
|
8863
8881
|
);
|
|
@@ -8884,7 +8902,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8884
8902
|
`[play watch] start response was ambiguous; retrying the same caller intent (${error.message})`
|
|
8885
8903
|
);
|
|
8886
8904
|
}
|
|
8887
|
-
|
|
8905
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
8888
8906
|
phase: "cli.play_start_stream_retry",
|
|
8889
8907
|
ms: 0,
|
|
8890
8908
|
ok: true,
|
|
@@ -8905,7 +8923,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8905
8923
|
`[play watch] start failed before run id with a transient error; retrying (${playStatusErrorText(status)})`
|
|
8906
8924
|
);
|
|
8907
8925
|
}
|
|
8908
|
-
|
|
8926
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
8909
8927
|
phase: "cli.play_start_stream_retry",
|
|
8910
8928
|
ms: 0,
|
|
8911
8929
|
ok: true,
|
|
@@ -8943,13 +8961,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
8943
8961
|
let eventCount = 0;
|
|
8944
8962
|
let firstRunIdMs = null;
|
|
8945
8963
|
let launchConfirmed = false;
|
|
8964
|
+
const notice = _nullishCoalesce(input.rateLimitedNotice, () => ( { value: null }));
|
|
8946
8965
|
let terminalWindowExpired = false;
|
|
8947
8966
|
let terminalWindowTimer = null;
|
|
8948
8967
|
const confirmAdmission = async (runId) => {
|
|
8949
8968
|
if (launchConfirmed || !runId || runId === "pending") return;
|
|
8950
8969
|
launchConfirmed = true;
|
|
8951
8970
|
await _optionalChain([input, 'access', _312 => _312.onRunAdmitted, 'optionalCall', _313 => _313(runId)]);
|
|
8952
|
-
|
|
8971
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
8953
8972
|
phase: "cli.play_start_admitted",
|
|
8954
8973
|
ms: Date.now() - startedAt,
|
|
8955
8974
|
ok: true,
|
|
@@ -8983,7 +9002,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
8983
9002
|
full: input.fullJson
|
|
8984
9003
|
});
|
|
8985
9004
|
} catch (error) {
|
|
8986
|
-
if (
|
|
9005
|
+
if (_chunk7KAS4QOWjs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
8987
9006
|
return null;
|
|
8988
9007
|
}
|
|
8989
9008
|
throw error;
|
|
@@ -9009,13 +9028,17 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9009
9028
|
if (eventRevisionId) {
|
|
9010
9029
|
launchedRevisionId = eventRevisionId;
|
|
9011
9030
|
}
|
|
9031
|
+
const eventRateLimited = _optionalChain([getEventPayload, 'call', _314 => _314(event), 'optionalAccess', _315 => _315.rateLimited]);
|
|
9032
|
+
if (eventRateLimited && typeof eventRateLimited === "object") {
|
|
9033
|
+
notice.value = eventRateLimited;
|
|
9034
|
+
}
|
|
9012
9035
|
const eventRunId = getRunIdFromLiveEvent(event);
|
|
9013
9036
|
if (typeof eventRunId === "string" && eventRunId && eventRunId !== "pending") {
|
|
9014
9037
|
const runStartedNow = !lastKnownWorkflowId;
|
|
9015
9038
|
lastKnownWorkflowId = eventRunId;
|
|
9016
9039
|
firstRunIdMs ??= Date.now() - startedAt;
|
|
9017
9040
|
if (runStartedNow) {
|
|
9018
|
-
await _optionalChain([input, 'access',
|
|
9041
|
+
await _optionalChain([input, 'access', _316 => _316.onRunStarted, 'optionalCall', _317 => _317(eventRunId)]);
|
|
9019
9042
|
}
|
|
9020
9043
|
}
|
|
9021
9044
|
if (!launchConfirmed && eventConfirmsPlayRunLaunch(event) && eventRunId === lastKnownWorkflowId) {
|
|
@@ -9025,6 +9048,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9025
9048
|
if (workflowId !== "pending" && !emittedDashboardUrl) {
|
|
9026
9049
|
if (!input.jsonOutput) {
|
|
9027
9050
|
writeStartedPlayRun({
|
|
9051
|
+
rateLimited: notice.value,
|
|
9028
9052
|
runId: workflowId,
|
|
9029
9053
|
playName: input.playName,
|
|
9030
9054
|
dashboardUrl,
|
|
@@ -9116,7 +9140,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9116
9140
|
};
|
|
9117
9141
|
}
|
|
9118
9142
|
if (!canonicalTerminal) {
|
|
9119
|
-
|
|
9143
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
9120
9144
|
phase: "cli.play_start_stream_stale_terminal_ignored",
|
|
9121
9145
|
ms: Date.now() - startedAt,
|
|
9122
9146
|
ok: true,
|
|
@@ -9137,14 +9161,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9137
9161
|
fromDurableStatus
|
|
9138
9162
|
}) : canonicalTerminal;
|
|
9139
9163
|
if (input.fullJson === true) {
|
|
9140
|
-
|
|
9164
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
9141
9165
|
phase: "play_watch_terminal_status",
|
|
9142
9166
|
workflowId: outputTerminal.runId || lastKnownWorkflowId || void 0,
|
|
9143
9167
|
full: true,
|
|
9144
9168
|
source: outputTerminal === canonicalTerminal ? fromDurableStatus ? "start_stream_durable" : "start_stream" : "durable_repair"
|
|
9145
9169
|
});
|
|
9146
9170
|
}
|
|
9147
|
-
|
|
9171
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
9148
9172
|
phase: "cli.play_start_stream_terminal",
|
|
9149
9173
|
ms: Date.now() - startedAt,
|
|
9150
9174
|
ok: true,
|
|
@@ -9164,7 +9188,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9164
9188
|
clearTimeout(timeout);
|
|
9165
9189
|
}
|
|
9166
9190
|
controller.abort();
|
|
9167
|
-
|
|
9191
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
9168
9192
|
phase: "cli.play_start_stream_handoff_to_tail",
|
|
9169
9193
|
ms: Date.now() - startedAt,
|
|
9170
9194
|
ok: true,
|
|
@@ -9195,7 +9219,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9195
9219
|
if (timedOut) {
|
|
9196
9220
|
const terminal = await fetchKnownTerminalStatus();
|
|
9197
9221
|
if (terminal) {
|
|
9198
|
-
|
|
9222
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
9199
9223
|
phase: "cli.play_start_stream_timeout_status_reconcile",
|
|
9200
9224
|
ms: Date.now() - startedAt,
|
|
9201
9225
|
ok: true,
|
|
@@ -9215,7 +9239,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9215
9239
|
lastPhase
|
|
9216
9240
|
});
|
|
9217
9241
|
}
|
|
9218
|
-
if (lastKnownWorkflowId && (terminalWindowExpired ||
|
|
9242
|
+
if (lastKnownWorkflowId && (terminalWindowExpired || _chunk7KAS4QOWjs.isTransientPlayRunReadError.call(void 0, error))) {
|
|
9219
9243
|
if (timeout) {
|
|
9220
9244
|
clearTimeout(timeout);
|
|
9221
9245
|
}
|
|
@@ -9226,7 +9250,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9226
9250
|
`
|
|
9227
9251
|
);
|
|
9228
9252
|
}
|
|
9229
|
-
|
|
9253
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
9230
9254
|
phase: "cli.play_start_stream_reconnect",
|
|
9231
9255
|
ms: Date.now() - startedAt,
|
|
9232
9256
|
ok: true,
|
|
@@ -9253,7 +9277,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9253
9277
|
});
|
|
9254
9278
|
}
|
|
9255
9279
|
if (!lastKnownWorkflowId && isAmbiguousPlayStartOutcomeError(error)) {
|
|
9256
|
-
|
|
9280
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
9257
9281
|
phase: "cli.play_start_stream_transient_failure",
|
|
9258
9282
|
ms: Date.now() - startedAt,
|
|
9259
9283
|
ok: false,
|
|
@@ -9281,7 +9305,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9281
9305
|
`[play watch] start stream ended after run ${lastKnownWorkflowId}; reconnecting to canonical run stream`
|
|
9282
9306
|
);
|
|
9283
9307
|
}
|
|
9284
|
-
|
|
9308
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
9285
9309
|
phase: "cli.play_start_stream_reconnect",
|
|
9286
9310
|
ms: Date.now() - startedAt,
|
|
9287
9311
|
ok: true,
|
|
@@ -9361,29 +9385,29 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
|
|
|
9361
9385
|
"logs"
|
|
9362
9386
|
]);
|
|
9363
9387
|
function formatPlayLogLine(rawLine, state) {
|
|
9364
|
-
const classified =
|
|
9388
|
+
const classified = _chunk7KAS4QOWjs.classifyLogLine.call(void 0, rawLine);
|
|
9365
9389
|
const line = classified.line;
|
|
9366
9390
|
const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
|
|
9367
|
-
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess',
|
|
9391
|
+
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _318 => _318[1]]) ? new Date(timestampMatch[1]) : null;
|
|
9368
9392
|
const timestamp = parsedTimestamp && !Number.isNaN(parsedTimestamp.getTime()) ? parsedTimestamp.toLocaleTimeString("en-US", {
|
|
9369
9393
|
hour12: false,
|
|
9370
9394
|
hour: "2-digit",
|
|
9371
9395
|
minute: "2-digit",
|
|
9372
9396
|
second: "2-digit"
|
|
9373
9397
|
}) : null;
|
|
9374
|
-
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess',
|
|
9398
|
+
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _319 => _319[2]]), () => ( line));
|
|
9375
9399
|
const prefix = timestamp ? `${timestamp} ` : "";
|
|
9376
9400
|
if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
|
|
9377
9401
|
const providerWait = formatProviderCapacityWaitLogLine(line);
|
|
9378
9402
|
if (providerWait && !state.verbose) {
|
|
9379
|
-
return
|
|
9403
|
+
return _chunk7KAS4QOWjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
|
|
9380
9404
|
}
|
|
9381
9405
|
const mapProgress = formatMapProgressDiagnosticLogLine(line);
|
|
9382
9406
|
if (mapProgress && !state.verbose) {
|
|
9383
|
-
return
|
|
9407
|
+
return _chunk7KAS4QOWjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
|
|
9384
9408
|
}
|
|
9385
9409
|
if (/\[worker\] picked up run\b/.test(message)) {
|
|
9386
|
-
if (!
|
|
9410
|
+
if (!_chunk7KAS4QOWjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9387
9411
|
return null;
|
|
9388
9412
|
}
|
|
9389
9413
|
if (state.emittedRunnerStarted) {
|
|
@@ -9396,7 +9420,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
9396
9420
|
/^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
|
|
9397
9421
|
);
|
|
9398
9422
|
if (mapStart) {
|
|
9399
|
-
if (!
|
|
9423
|
+
if (!_chunk7KAS4QOWjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9400
9424
|
return null;
|
|
9401
9425
|
}
|
|
9402
9426
|
const [, rows, fields2, namespace, cached, pending] = mapStart;
|
|
@@ -9406,7 +9430,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
9406
9430
|
/^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
|
|
9407
9431
|
);
|
|
9408
9432
|
if (mapDone) {
|
|
9409
|
-
if (!
|
|
9433
|
+
if (!_chunk7KAS4QOWjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9410
9434
|
return null;
|
|
9411
9435
|
}
|
|
9412
9436
|
const [, results, executed, cached] = mapDone;
|
|
@@ -9588,20 +9612,20 @@ function collectDatasetHandleLines(value, path = "result") {
|
|
|
9588
9612
|
function buildRunWarnings(status, rowsInfo) {
|
|
9589
9613
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
9590
9614
|
const result = readRecord(status.result);
|
|
9591
|
-
const metadata = readRecord(_optionalChain([result, 'optionalAccess',
|
|
9592
|
-
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess',
|
|
9615
|
+
const metadata = readRecord(_optionalChain([result, 'optionalAccess', _320 => _320._metadata]));
|
|
9616
|
+
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess', _321 => _321.outputWarnings])) ? metadata.outputWarnings.map((warning) => readRecord(warning)).filter((warning) => {
|
|
9593
9617
|
if (!warning) return false;
|
|
9594
9618
|
return !(rowsInfo && !rowsInfo.complete && warning.reason === "array_preview_limit" && warning.originalItems === rowsInfo.totalRows && warning.retainedItems === rowsInfo.rows.length);
|
|
9595
|
-
}).map((warning) => _optionalChain([warning, 'optionalAccess',
|
|
9619
|
+
}).map((warning) => _optionalChain([warning, 'optionalAccess', _322 => _322.message])).filter(
|
|
9596
9620
|
(message) => typeof message === "string" && message.trim().length > 0
|
|
9597
9621
|
).slice(0, 16) : [];
|
|
9598
|
-
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess',
|
|
9622
|
+
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _323 => _323.hasRowFailures]) ? [
|
|
9599
9623
|
`${status.status === "completed" ? "Run completed" : "Run ended"} with ${formatInteger(rowOutcomes.failedRows)} failed row(s); inspect the persisted failed rows before treating the output as complete.`
|
|
9600
9624
|
] : [];
|
|
9601
|
-
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9625
|
+
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _324 => _324.supersededRows]), () => ( 0))) > 0 ? [
|
|
9602
9626
|
`Latest-write-wins: ${formatSupersededRowsNotice(_nullishCoalesce(rowOutcomes.supersededRows, () => ( 0)))}; the newer write still owns that Runtime Sheet row.`
|
|
9603
9627
|
] : [];
|
|
9604
|
-
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess',
|
|
9628
|
+
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _325 => _325.totalRows]) === 0) {
|
|
9605
9629
|
return [
|
|
9606
9630
|
...rowOutcomeWarnings,
|
|
9607
9631
|
...supersededRowNotices,
|
|
@@ -9620,7 +9644,7 @@ function buildRunWarnings(status, rowsInfo) {
|
|
|
9620
9644
|
return [...rowOutcomeWarnings, ...supersededRowNotices, ...outputWarnings];
|
|
9621
9645
|
}
|
|
9622
9646
|
function buildRunNextCommands(status) {
|
|
9623
|
-
const runId = _optionalChain([status, 'access',
|
|
9647
|
+
const runId = _optionalChain([status, 'access', _326 => _326.runId, 'optionalAccess', _327 => _327.trim, 'call', _328 => _328()]);
|
|
9624
9648
|
if (!runId) {
|
|
9625
9649
|
const playName = extractRunPlayName(status);
|
|
9626
9650
|
return playName ? {
|
|
@@ -9771,14 +9795,14 @@ function extractToolIdFromErrorText(text) {
|
|
|
9771
9795
|
return null;
|
|
9772
9796
|
}
|
|
9773
9797
|
const lowerToolMatch = /\btool\s+([A-Za-z0-9_.:-]+)\s+\d{3}\b/.exec(text);
|
|
9774
|
-
if (_optionalChain([lowerToolMatch, 'optionalAccess',
|
|
9798
|
+
if (_optionalChain([lowerToolMatch, 'optionalAccess', _329 => _329[1]])) {
|
|
9775
9799
|
return lowerToolMatch[1];
|
|
9776
9800
|
}
|
|
9777
9801
|
const upperToolMatch = /\bTool\s+([A-Za-z0-9_.:-]+)\s+failed\b/.exec(text);
|
|
9778
|
-
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess',
|
|
9802
|
+
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _330 => _330[1]]), () => ( null));
|
|
9779
9803
|
}
|
|
9780
9804
|
function isInsufficientCreditsBilling(billing) {
|
|
9781
|
-
return _optionalChain([billing, 'optionalAccess',
|
|
9805
|
+
return _optionalChain([billing, 'optionalAccess', _331 => _331.kind]) === "insufficient_credits";
|
|
9782
9806
|
}
|
|
9783
9807
|
function extractBillingForStatus(status, error) {
|
|
9784
9808
|
const errorBilling = getObjectField(status, "errorBilling");
|
|
@@ -9820,8 +9844,8 @@ function formatInsufficientCreditsMessage(input) {
|
|
|
9820
9844
|
function buildInsufficientCreditsSummaryLines(input) {
|
|
9821
9845
|
const progress = input.status.progress;
|
|
9822
9846
|
const rowsInfo = extractCanonicalRowsInfo(input.status);
|
|
9823
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
9824
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
9847
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _332 => _332.rows, 'access', _333 => _333.length]))), () => ( null));
|
|
9848
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _334 => _334.totalRows]))), () => ( null));
|
|
9825
9849
|
const lines = [
|
|
9826
9850
|
" status: stopped_insufficient_credits",
|
|
9827
9851
|
completed === null ? " completed rows: unknown" : ` completed rows: ${formatInteger(completed)}${total !== null ? ` of ${formatInteger(total)}` : ""}`,
|
|
@@ -9840,7 +9864,7 @@ function buildInsufficientCreditsSummaryLines(input) {
|
|
|
9840
9864
|
lines.push(" ask user: ask whether they want to add Deepline credits");
|
|
9841
9865
|
lines.push(` top up after approval: ${recovery.topUp}`);
|
|
9842
9866
|
lines.push(` checkout fallback: ${recovery.checkout}`);
|
|
9843
|
-
const runId = _optionalChain([input, 'access',
|
|
9867
|
+
const runId = _optionalChain([input, 'access', _335 => _335.status, 'access', _336 => _336.runId, 'optionalAccess', _337 => _337.trim, 'call', _338 => _338()]);
|
|
9844
9868
|
if (runId) {
|
|
9845
9869
|
lines.push(` inspect: deepline runs get ${runId}`);
|
|
9846
9870
|
lines.push(
|
|
@@ -9922,10 +9946,10 @@ function normalizeRunStatusForEnvelope(status) {
|
|
|
9922
9946
|
function normalizeProgressForEnvelope(status, rowsInfo) {
|
|
9923
9947
|
const progress = status.progress;
|
|
9924
9948
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
9925
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9926
|
-
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9927
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9928
|
-
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9949
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _339 => _339.totalRows]), () => ( getNumericField(progress, "totalRows"))), () => ( getNumericField(progress, "total"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _340 => _340.totalRows]))), () => ( null));
|
|
9950
|
+
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _341 => _341.failedRows]), () => ( getNumericField(progress, "failed"))), () => ( getNumericField(progress, "failedRows"))), () => ( null));
|
|
9951
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _342 => _342.completedRows]), () => ( getNumericField(progress, "completed"))), () => ( getNumericField(progress, "completedRows"))), () => ( (status.status === "completed" ? total : null)));
|
|
9952
|
+
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _343 => _343.supersededRows]), () => ( getNumericField(progress, "supersededRows")));
|
|
9929
9953
|
const supersededOffset = _nullishCoalesce(supersededRows, () => ( 0));
|
|
9930
9954
|
const progressPending = getNumericField(progress, "pending");
|
|
9931
9955
|
const pending = _nullishCoalesce((progressPending !== null ? Math.max(0, progressPending - supersededOffset) : null), () => ( (typeof total === "number" && typeof completed === "number" && typeof failed === "number" ? Math.max(0, total - completed - failed - supersededOffset) : null)));
|
|
@@ -9995,7 +10019,7 @@ function normalizeErrorsForEnvelope(status, error) {
|
|
|
9995
10019
|
];
|
|
9996
10020
|
}
|
|
9997
10021
|
function normalizeLogsForEnvelope(status) {
|
|
9998
|
-
const logs = Array.isArray(_optionalChain([status, 'access',
|
|
10022
|
+
const logs = Array.isArray(_optionalChain([status, 'access', _344 => _344.progress, 'optionalAccess', _345 => _345.logs])) ? status.progress.logs : [];
|
|
9999
10023
|
const totalCount = logs.length;
|
|
10000
10024
|
const entries = logs.slice(Math.max(0, logs.length - RUN_LOG_PREVIEW_LIMIT));
|
|
10001
10025
|
const firstSequence = entries.length === 0 ? null : logs.length - entries.length + 1;
|
|
@@ -10052,7 +10076,7 @@ function compactPlayStatus(status) {
|
|
|
10052
10076
|
const packaged = getPlayRunPackage(status);
|
|
10053
10077
|
if (packaged) {
|
|
10054
10078
|
const packagedRun = readRecord(packaged.run);
|
|
10055
|
-
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess',
|
|
10079
|
+
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess', _346 => _346.error]) === "string" ? packagedRun.error : null;
|
|
10056
10080
|
const error2 = _nullishCoalesce(selectRunErrorForDisplay(status), () => ( (typeof status.error === "string" ? String(status.error) : packagedError)));
|
|
10057
10081
|
const compactError = error2 ? compactRunErrorForEnvelope(error2, status.runId) : null;
|
|
10058
10082
|
const rowOutcomes2 = readRowOutcomeSummary(status);
|
|
@@ -10203,7 +10227,7 @@ function formatTopValuesPart(value) {
|
|
|
10203
10227
|
}
|
|
10204
10228
|
function formatPackageDatasetSummaryLines(summary, indent = " ") {
|
|
10205
10229
|
const record3 = readRecord(summary);
|
|
10206
|
-
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
10230
|
+
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _347 => _347.columnStats]));
|
|
10207
10231
|
if (!record3 || !columnStats) {
|
|
10208
10232
|
return [];
|
|
10209
10233
|
}
|
|
@@ -10291,7 +10315,7 @@ function packageDatasetRecords(packaged) {
|
|
|
10291
10315
|
if (catalog.length > 0) return catalog;
|
|
10292
10316
|
return readRecordArray(packaged.steps).flatMap((step) => {
|
|
10293
10317
|
const output = readRecord(step.output);
|
|
10294
|
-
return _optionalChain([output, 'optionalAccess',
|
|
10318
|
+
return _optionalChain([output, 'optionalAccess', _348 => _348.kind]) === "dataset" ? [output] : [];
|
|
10295
10319
|
});
|
|
10296
10320
|
}
|
|
10297
10321
|
function packageReturnedDatasetIdentity(packaged) {
|
|
@@ -10300,7 +10324,7 @@ function packageReturnedDatasetIdentity(packaged) {
|
|
|
10300
10324
|
const outputs = _nullishCoalesce(readRecord(packaged.outputs), () => ( {}));
|
|
10301
10325
|
for (const outputValue of Object.values(outputs)) {
|
|
10302
10326
|
const output = readRecord(outputValue);
|
|
10303
|
-
if (_optionalChain([output, 'optionalAccess',
|
|
10327
|
+
if (_optionalChain([output, 'optionalAccess', _349 => _349.kind]) !== "dataset") continue;
|
|
10304
10328
|
if (typeof output.datasetId === "string" && output.datasetId.trim()) {
|
|
10305
10329
|
datasetIds.add(output.datasetId.trim());
|
|
10306
10330
|
}
|
|
@@ -10336,7 +10360,7 @@ function formatRunStepProgress(progress, includeRowOutcomes = false) {
|
|
|
10336
10360
|
}
|
|
10337
10361
|
function formatPackageDatasetActionLines(packaged, options) {
|
|
10338
10362
|
const returned = packageReturnedDatasetIdentity(packaged);
|
|
10339
|
-
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
10363
|
+
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _350 => _350.includeSummary]), () => ( true));
|
|
10340
10364
|
const lines = [];
|
|
10341
10365
|
const steps = readRecordArray(packaged.steps);
|
|
10342
10366
|
const stepsByDatasetId = /* @__PURE__ */ new Map();
|
|
@@ -10345,10 +10369,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10345
10369
|
for (const step of steps) {
|
|
10346
10370
|
if (step.kind !== "dataset") continue;
|
|
10347
10371
|
const output = readRecord(step.output);
|
|
10348
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
10372
|
+
if (typeof _optionalChain([output, 'optionalAccess', _351 => _351.datasetId]) === "string") {
|
|
10349
10373
|
stepsByDatasetId.set(output.datasetId, step);
|
|
10350
10374
|
}
|
|
10351
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
10375
|
+
if (typeof _optionalChain([output, 'optionalAccess', _352 => _352.path]) === "string") {
|
|
10352
10376
|
stepsByPath.set(output.path, step);
|
|
10353
10377
|
}
|
|
10354
10378
|
if (typeof step.id === "string") {
|
|
@@ -10362,8 +10386,8 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10362
10386
|
const category = isReturned ? "returned" : dataset.recovered === true ? "recovered" : "persisted";
|
|
10363
10387
|
const rowCount = typeof dataset.rowCount === "number" && Number.isFinite(dataset.rowCount) ? Math.max(0, Math.trunc(dataset.rowCount)) : null;
|
|
10364
10388
|
const lifecycle = readRecord(dataset.lifecycle);
|
|
10365
|
-
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess',
|
|
10366
|
-
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess',
|
|
10389
|
+
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess', _353 => _353.complete]) === false;
|
|
10390
|
+
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess', _354 => _354.persistedRowsAtLeast]) === "number" && Number.isFinite(lifecycle.persistedRowsAtLeast) ? Math.max(0, Math.trunc(lifecycle.persistedRowsAtLeast)) : 0;
|
|
10367
10391
|
const actions2 = _nullishCoalesce(readRecord(dataset.actions), () => ( {}));
|
|
10368
10392
|
if (countUnconfirmed) {
|
|
10369
10393
|
lines.push(
|
|
@@ -10381,7 +10405,7 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10381
10405
|
}
|
|
10382
10406
|
}
|
|
10383
10407
|
const step = _nullishCoalesce(_nullishCoalesce((datasetId ? stepsByDatasetId.get(datasetId) : void 0), () => ( stepsByPath.get(path))), () => ( (typeof dataset.tableNamespace === "string" ? stepsByNamespace.get(dataset.tableNamespace) : void 0)));
|
|
10384
|
-
const progress = readRecord(_optionalChain([step, 'optionalAccess',
|
|
10408
|
+
const progress = readRecord(_optionalChain([step, 'optionalAccess', _355 => _355.progress]));
|
|
10385
10409
|
if (progress) {
|
|
10386
10410
|
lines.push(` progress: ${formatRunStepProgress(progress)}`);
|
|
10387
10411
|
}
|
|
@@ -10395,10 +10419,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10395
10419
|
}
|
|
10396
10420
|
const exportAction = readRecord(actions2.exportCsv);
|
|
10397
10421
|
const exportCommand = actionToCommand(exportAction);
|
|
10398
|
-
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess',
|
|
10422
|
+
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _356 => _356.scope]));
|
|
10399
10423
|
const queryAction = readRecord(actions2.query);
|
|
10400
|
-
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess',
|
|
10401
|
-
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess',
|
|
10424
|
+
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess', _357 => _357.scope]));
|
|
10425
|
+
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess', _358 => _358.kind]) === "run" ? actionToCommand(queryAction) : null;
|
|
10402
10426
|
const currentQueryCommand = actionToCommand(actions2.queryCurrentTable);
|
|
10403
10427
|
const legacyQueryCommand = actionToCommand(actions2.query);
|
|
10404
10428
|
if (runQueryCommand) {
|
|
@@ -10410,11 +10434,11 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10410
10434
|
}
|
|
10411
10435
|
if (exportCommand) {
|
|
10412
10436
|
lines.push(
|
|
10413
|
-
_optionalChain([exportScope, 'optionalAccess',
|
|
10437
|
+
_optionalChain([exportScope, 'optionalAccess', _359 => _359.kind]) === "database" ? ` export current table (may include other runs): ${exportCommand}` : ` export this run: ${exportCommand}`
|
|
10414
10438
|
);
|
|
10415
10439
|
}
|
|
10416
10440
|
const unavailable = readRecord(dataset.exportUnavailable);
|
|
10417
|
-
if (typeof _optionalChain([unavailable, 'optionalAccess',
|
|
10441
|
+
if (typeof _optionalChain([unavailable, 'optionalAccess', _360 => _360.reason]) === "string" && typeof unavailable.message === "string") {
|
|
10418
10442
|
lines.push(
|
|
10419
10443
|
` export unavailable (${unavailable.reason}): ${unavailable.message}`
|
|
10420
10444
|
);
|
|
@@ -10431,7 +10455,7 @@ function packageSavedRowCount(packaged) {
|
|
|
10431
10455
|
}
|
|
10432
10456
|
function runtimeLimitWindowLabel(runtimeLimitFailure) {
|
|
10433
10457
|
const message = _nullishCoalesce(getStringField(runtimeLimitFailure, "message"), () => ( ""));
|
|
10434
|
-
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access',
|
|
10458
|
+
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _361 => _361.exec, 'call', _362 => _362(message), 'optionalAccess', _363 => _363[1]]);
|
|
10435
10459
|
if (configuredSeconds) {
|
|
10436
10460
|
const seconds = Number(configuredSeconds);
|
|
10437
10461
|
if (Number.isSafeInteger(seconds) && seconds > 0) {
|
|
@@ -10478,7 +10502,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10478
10502
|
if (!outputs) return [];
|
|
10479
10503
|
const returned = Object.entries(outputs).filter(([, output]) => {
|
|
10480
10504
|
const record3 = readRecord(output);
|
|
10481
|
-
return _optionalChain([record3, 'optionalAccess',
|
|
10505
|
+
return _optionalChain([record3, 'optionalAccess', _364 => _364.kind]) === "dataset" || _optionalChain([record3, 'optionalAccess', _365 => _365.kind]) === "value" && Object.prototype.hasOwnProperty.call(record3, "value");
|
|
10482
10506
|
});
|
|
10483
10507
|
if (returned.length === 0) return [];
|
|
10484
10508
|
const datasets = packageDatasetRecords(packaged);
|
|
@@ -10498,10 +10522,10 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10498
10522
|
(candidate) => typeof output.datasetId === "string" && candidate.datasetId === output.datasetId || candidate.path === path
|
|
10499
10523
|
);
|
|
10500
10524
|
const stepOutput = datasetSteps.map((step) => readRecord(step.output)).find(
|
|
10501
|
-
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess',
|
|
10525
|
+
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _366 => _366.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _367 => _367.path]) === path
|
|
10502
10526
|
);
|
|
10503
|
-
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess',
|
|
10504
|
-
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
10527
|
+
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _368 => _368.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _369 => _369.preview]))));
|
|
10528
|
+
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _370 => _370.rows])) ? preview.rows.slice(0, 2) : [];
|
|
10505
10529
|
if (rows.length > 0) {
|
|
10506
10530
|
lines.push(` sample rows (${rows.length}):`);
|
|
10507
10531
|
lines.push(
|
|
@@ -10527,7 +10551,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10527
10551
|
return lines;
|
|
10528
10552
|
}
|
|
10529
10553
|
function authoredPackageStackFrames(packaged) {
|
|
10530
|
-
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess',
|
|
10554
|
+
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _371 => _371.trim, 'call', _372 => _372()])));
|
|
10531
10555
|
if (!stack) return [];
|
|
10532
10556
|
return stack.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).filter(
|
|
10533
10557
|
(line) => !line.includes("/virtual/deepline-plays/") && !line.includes("/apps/play-runner/") && !line.includes("/shared_libs/play-runtime/") && !line.includes("node:internal")
|
|
@@ -10559,9 +10583,9 @@ function activityIsoTimestamp(value) {
|
|
|
10559
10583
|
}
|
|
10560
10584
|
function buildRunActivityTextLines(run) {
|
|
10561
10585
|
const activity = readRecord(run.activity);
|
|
10562
|
-
const observation = readRecord(_optionalChain([activity, 'optionalAccess',
|
|
10563
|
-
const state = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
10564
|
-
const target = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
10586
|
+
const observation = readRecord(_optionalChain([activity, 'optionalAccess', _373 => _373.observation]));
|
|
10587
|
+
const state = readRecord(_optionalChain([observation, 'optionalAccess', _374 => _374.state]));
|
|
10588
|
+
const target = readRecord(_optionalChain([observation, 'optionalAccess', _375 => _375.target]));
|
|
10565
10589
|
if (!activity || !observation || !state) return [];
|
|
10566
10590
|
const kind = typeof state.kind === "string" ? state.kind : "unknown";
|
|
10567
10591
|
if (kind === "completed") return [];
|
|
@@ -10606,11 +10630,11 @@ function buildRunActivityTextLines(run) {
|
|
|
10606
10630
|
}
|
|
10607
10631
|
function formatObservedRunCounter(value) {
|
|
10608
10632
|
const counter = readRecord(value);
|
|
10609
|
-
const count2 = _optionalChain([counter, 'optionalAccess',
|
|
10633
|
+
const count2 = _optionalChain([counter, 'optionalAccess', _376 => _376.value]);
|
|
10610
10634
|
if (typeof count2 !== "number" || !Number.isSafeInteger(count2) || count2 < 0) {
|
|
10611
10635
|
return "unknown";
|
|
10612
10636
|
}
|
|
10613
|
-
return _optionalChain([counter, 'optionalAccess',
|
|
10637
|
+
return _optionalChain([counter, 'optionalAccess', _377 => _377.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
|
|
10614
10638
|
}
|
|
10615
10639
|
function buildRunStatusEvidenceTextLines(packaged) {
|
|
10616
10640
|
const evidence = readRecord(packaged.runStatus);
|
|
@@ -10623,13 +10647,13 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10623
10647
|
);
|
|
10624
10648
|
}
|
|
10625
10649
|
const source = readRecord(evidence.source);
|
|
10626
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
10650
|
+
if (_optionalChain([source, 'optionalAccess', _378 => _378.aligned]) === false) {
|
|
10627
10651
|
lines.push(
|
|
10628
10652
|
` consistency: run snapshot event ${String(source.runSnapshotLedgerNextSeq)} and progress event ${String(source.ledgerNextSeq)} differ; retry this read to align them`
|
|
10629
10653
|
);
|
|
10630
10654
|
}
|
|
10631
10655
|
const focus = readRecord(evidence.focusStep);
|
|
10632
|
-
const rows = readRecord(_optionalChain([focus, 'optionalAccess',
|
|
10656
|
+
const rows = readRecord(_optionalChain([focus, 'optionalAccess', _379 => _379.rows]));
|
|
10633
10657
|
if (focus) {
|
|
10634
10658
|
const id = typeof focus.id === "string" && focus.id.trim() ? focus.id.trim() : "unknown step";
|
|
10635
10659
|
const label = typeof focus.label === "string" && focus.label.trim() ? ` (${focus.label.trim()})` : "";
|
|
@@ -10637,7 +10661,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10637
10661
|
const known = readRecordArray(packaged.steps).find(
|
|
10638
10662
|
(step) => typeof step.id === "string" && (id === step.id || id.endsWith(`:${step.id}`)) && typeof step.label === "string"
|
|
10639
10663
|
);
|
|
10640
|
-
const state = typeof _optionalChain([known, 'optionalAccess',
|
|
10664
|
+
const state = typeof _optionalChain([known, 'optionalAccess', _380 => _380.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
|
|
10641
10665
|
deriveNodeExecutionState({
|
|
10642
10666
|
reported: {
|
|
10643
10667
|
status: focus.status.trim(),
|
|
@@ -10647,7 +10671,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10647
10671
|
total: rows.total
|
|
10648
10672
|
} : null
|
|
10649
10673
|
},
|
|
10650
|
-
runStatus: _optionalChain([run, 'optionalAccess',
|
|
10674
|
+
runStatus: _optionalChain([run, 'optionalAccess', _381 => _381.status])
|
|
10651
10675
|
})
|
|
10652
10676
|
) : null;
|
|
10653
10677
|
lines.push(` current step: ${id}${label}${state ? `: ${state}` : ""}`);
|
|
@@ -10695,7 +10719,7 @@ function formatRecentRunLogLines(value) {
|
|
|
10695
10719
|
(line) => typeof line === "string"
|
|
10696
10720
|
);
|
|
10697
10721
|
if (tail.length === 0) return [];
|
|
10698
|
-
const shown = tail.map((line) =>
|
|
10722
|
+
const shown = tail.map((line) => _chunk7KAS4QOWjs.classifyLogLine.call(void 0, line)).filter(
|
|
10699
10723
|
(entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
|
|
10700
10724
|
).slice(-8);
|
|
10701
10725
|
const total = readNonNegativeInteger(logs.totalCount);
|
|
@@ -10739,7 +10763,7 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10739
10763
|
lines.push(` recovery: ${mode}${sourceRunId}`);
|
|
10740
10764
|
}
|
|
10741
10765
|
const runError = typeof run.error === "string" && run.error.trim() ? run.error.trim() : null;
|
|
10742
|
-
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess',
|
|
10766
|
+
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _382 => _382.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
|
|
10743
10767
|
const displayRunError = _nullishCoalesce(structuredRuntimeLimitMessage, () => ( runError));
|
|
10744
10768
|
if (!isRuntimeLimitCheckpoint && displayRunError && (status === "failed" || status === "cancelled")) {
|
|
10745
10769
|
lines.push(` error: ${truncateErrorForDisplay(displayRunError, runId)}`);
|
|
@@ -10750,11 +10774,11 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10750
10774
|
}
|
|
10751
10775
|
}
|
|
10752
10776
|
const failedLogs = readRecord(packaged.failedLogs);
|
|
10753
|
-
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess',
|
|
10777
|
+
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _383 => _383.entries])) ? failedLogs.entries.filter(
|
|
10754
10778
|
(entry) => typeof entry === "string"
|
|
10755
10779
|
) : [];
|
|
10756
|
-
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
10757
|
-
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
10780
|
+
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _384 => _384.association]) === "string" ? failedLogs.association : null;
|
|
10781
|
+
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _385 => _385.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
|
|
10758
10782
|
if (failedLogEntries.length > 0) {
|
|
10759
10783
|
lines.push(" failed logs:");
|
|
10760
10784
|
lines.push(...failedLogEntries.map((entry) => ` ${entry}`));
|
|
@@ -10773,8 +10797,8 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10773
10797
|
)
|
|
10774
10798
|
).slice(0, 16) : [];
|
|
10775
10799
|
lines.push(...packageWarnings.map((warning) => ` warning: ${warning}`));
|
|
10776
|
-
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess',
|
|
10777
|
-
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess',
|
|
10800
|
+
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _386 => _386.next]));
|
|
10801
|
+
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _387 => _387.logs]) === "string") {
|
|
10778
10802
|
lines.push(
|
|
10779
10803
|
failedLogAssociation === "retained_before_truncation" ? ` retained logs: ${failedLogNext.logs}` : ` retry failed logs: ${failedLogNext.logs}`
|
|
10780
10804
|
);
|
|
@@ -10802,20 +10826,20 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10802
10826
|
const stepStatus = typeof step.status === "string" ? step.status : status;
|
|
10803
10827
|
const output = step.output && typeof step.output === "object" && !Array.isArray(step.output) ? step.output : null;
|
|
10804
10828
|
const rowCount = output && typeof output.rowCount === "number" ? ` rows=${formatInteger(output.rowCount)}` : "";
|
|
10805
|
-
const preview = _optionalChain([output, 'optionalAccess',
|
|
10806
|
-
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
10829
|
+
const preview = _optionalChain([output, 'optionalAccess', _388 => _388.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
|
|
10830
|
+
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _389 => _389.rows])) ? preview.rows.length : null;
|
|
10807
10831
|
lines.push(` ${kind} ${id}: ${stepStatus}${rowCount}`);
|
|
10808
|
-
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess',
|
|
10832
|
+
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _390 => _390.summary])));
|
|
10809
10833
|
if (previewRows !== null) {
|
|
10810
10834
|
lines.push(
|
|
10811
|
-
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess',
|
|
10835
|
+
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _391 => _391.truncated]) ? " truncated" : ""}`
|
|
10812
10836
|
);
|
|
10813
10837
|
}
|
|
10814
10838
|
}
|
|
10815
10839
|
const inspectCommand = actionToCommand(next.inspect);
|
|
10816
10840
|
const fullResultCommand = actionToCommand(next.full);
|
|
10817
10841
|
const hasCatalogExportAction = packageDatasetRecords(packaged).some(
|
|
10818
|
-
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call',
|
|
10842
|
+
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _392 => _392(dataset.actions), 'optionalAccess', _393 => _393.exportCsv])))
|
|
10819
10843
|
);
|
|
10820
10844
|
const legacyExportCommand = hasCatalogExportAction ? null : actionToCommand(next.export);
|
|
10821
10845
|
const runAgainCommand = typeof next.run === "string" && next.run.trim() ? next.run.trim() : null;
|
|
@@ -10880,7 +10904,7 @@ function withOrdinaryRunAgainCommand(status, options, resolvedRevisionId) {
|
|
|
10880
10904
|
}
|
|
10881
10905
|
function buildBillingRollupTextLines(status) {
|
|
10882
10906
|
const billing = status.billing;
|
|
10883
|
-
const rollup = _optionalChain([billing, 'optionalAccess',
|
|
10907
|
+
const rollup = _optionalChain([billing, 'optionalAccess', _394 => _394.rollup]);
|
|
10884
10908
|
if (!rollup) return [];
|
|
10885
10909
|
const total = formatCreditAmount2(rollup.totalCreditsRollup);
|
|
10886
10910
|
if (rollup.childCredits > 0 && rollup.descendantRunCount > 0) {
|
|
@@ -10898,6 +10922,19 @@ function buildBillingRollupTextLines(status) {
|
|
|
10898
10922
|
}
|
|
10899
10923
|
return [` cost: ${total} credits`];
|
|
10900
10924
|
}
|
|
10925
|
+
function playRunRateLimitedNotice(status) {
|
|
10926
|
+
const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call', _395 => _395(status), 'optionalAccess', _396 => _396.rateLimited]), () => ( status.rateLimited));
|
|
10927
|
+
return notice && typeof notice === "object" ? notice : null;
|
|
10928
|
+
}
|
|
10929
|
+
function withRateLimitedNotice(status, notice) {
|
|
10930
|
+
if (!notice) return status;
|
|
10931
|
+
const packaged = getPlayRunPackage(status);
|
|
10932
|
+
if (!packaged) return { ...status, rateLimited: notice };
|
|
10933
|
+
return packaged === status ? { ...status, rateLimited: notice } : {
|
|
10934
|
+
...status,
|
|
10935
|
+
package: { ...packaged, rateLimited: notice }
|
|
10936
|
+
};
|
|
10937
|
+
}
|
|
10901
10938
|
function buildRunLaunch(status) {
|
|
10902
10939
|
const compact = compactPlayStatus(status);
|
|
10903
10940
|
const headline = Object.fromEntries(
|
|
@@ -10905,6 +10942,7 @@ function buildRunLaunch(status) {
|
|
|
10905
10942
|
"schemaVersion",
|
|
10906
10943
|
"kind",
|
|
10907
10944
|
"apiVersion",
|
|
10945
|
+
"rateLimited",
|
|
10908
10946
|
"dashboardUrl",
|
|
10909
10947
|
"progress",
|
|
10910
10948
|
"rowOutcomes",
|
|
@@ -10925,8 +10963,10 @@ function buildPlayCompletionTextLines(status) {
|
|
|
10925
10963
|
const overview = buildRunOverview(status);
|
|
10926
10964
|
const { run } = overview;
|
|
10927
10965
|
const failed = run.status === "failed";
|
|
10928
|
-
const label = run.status === "completed" ? _optionalChain([overview, 'access',
|
|
10966
|
+
const label = run.status === "completed" ? _optionalChain([overview, 'access', _397 => _397.rowOutcomes, 'optionalAccess', _398 => _398.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
|
|
10967
|
+
const rateLimited = playRunRateLimitedNotice(status);
|
|
10929
10968
|
const lines = [
|
|
10969
|
+
...rateLimited ? [rateLimited.message] : [],
|
|
10930
10970
|
`${label} ${_nullishCoalesce(_nullishCoalesce(run.playName, () => ( status.playName)), () => ( "Play"))}`,
|
|
10931
10971
|
`Run: ${run.id}`
|
|
10932
10972
|
];
|
|
@@ -10945,7 +10985,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
10945
10985
|
...formatJsonPreview(compactReturnValue(overview.result))
|
|
10946
10986
|
);
|
|
10947
10987
|
}
|
|
10948
|
-
if (_optionalChain([overview, 'access',
|
|
10988
|
+
if (_optionalChain([overview, 'access', _399 => _399.rowOutcomes, 'optionalAccess', _400 => _400.hasRowFailures])) {
|
|
10949
10989
|
lines.push(
|
|
10950
10990
|
`Rows: ${overview.rowOutcomes.completedRows} completed, ${overview.rowOutcomes.failedRows} failed`
|
|
10951
10991
|
);
|
|
@@ -10974,17 +11014,17 @@ function buildPlayCompletionTextLines(status) {
|
|
|
10974
11014
|
}
|
|
10975
11015
|
function writePlayResult(status, jsonOutput, options) {
|
|
10976
11016
|
const packaged = getPlayRunPackage(status);
|
|
10977
|
-
if (status.package)
|
|
10978
|
-
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
11017
|
+
if (status.package) _chunkRDOPZK7Ajs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
11018
|
+
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _401 => _401.hits]), () => ( null));
|
|
10979
11019
|
if (jsonOutput) {
|
|
10980
|
-
const payload2 = _optionalChain([options, 'optionalAccess',
|
|
10981
|
-
|
|
11020
|
+
const payload2 = _optionalChain([options, 'optionalAccess', _402 => _402.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
|
|
11021
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
10982
11022
|
hits ? { ...payload2, hits } : payload2,
|
|
10983
|
-
{ json: true, fields: _optionalChain([options, 'optionalAccess',
|
|
11023
|
+
{ json: true, fields: _optionalChain([options, 'optionalAccess', _403 => _403.jsonFields]) }
|
|
10984
11024
|
);
|
|
10985
11025
|
return;
|
|
10986
11026
|
}
|
|
10987
|
-
if (packaged && !_optionalChain([options, 'optionalAccess',
|
|
11027
|
+
if (packaged && !_optionalChain([options, 'optionalAccess', _404 => _404.fullJson])) {
|
|
10988
11028
|
const {
|
|
10989
11029
|
logs: _logs,
|
|
10990
11030
|
failedLogs: _failedLogs,
|
|
@@ -10994,7 +11034,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
10994
11034
|
...buildPlayCompletionTextLines(status),
|
|
10995
11035
|
...formatRunHitsLines(hits)
|
|
10996
11036
|
];
|
|
10997
|
-
|
|
11037
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0, displayPackage, {
|
|
10998
11038
|
json: false,
|
|
10999
11039
|
text: `${lines2.join("\n")}
|
|
11000
11040
|
`
|
|
@@ -11044,8 +11084,8 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11044
11084
|
lines.push(...renderedServerView.actions);
|
|
11045
11085
|
lines.push(...buildBillingRollupTextLines(status));
|
|
11046
11086
|
const compact = compactPlayStatus(status);
|
|
11047
|
-
const payload = _optionalChain([options, 'optionalAccess',
|
|
11048
|
-
|
|
11087
|
+
const payload = _optionalChain([options, 'optionalAccess', _405 => _405.fullJson]) ? status : compact;
|
|
11088
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
11049
11089
|
{
|
|
11050
11090
|
...payload,
|
|
11051
11091
|
render: {
|
|
@@ -11098,7 +11138,7 @@ async function resolvePlayRunOutputStatus(input) {
|
|
|
11098
11138
|
const streamedPackage = getPlayRunPackage(input.status);
|
|
11099
11139
|
const refreshForFullJson = input.fullJson && !input.fromDurableStatus;
|
|
11100
11140
|
const streamedTextPackageIncomplete = input.status.status === "completed" && playRunPackageTextLedgerIncomplete(streamedPackage);
|
|
11101
|
-
const refreshFailedTerminal = input.status.status === "failed" && (!input.fromDurableStatus || _optionalChain([readRecord, 'call',
|
|
11141
|
+
const refreshFailedTerminal = input.status.status === "failed" && (!input.fromDurableStatus || _optionalChain([readRecord, 'call', _406 => _406(_optionalChain([streamedPackage, 'optionalAccess', _407 => _407.run])), 'optionalAccess', _408 => _408.status]) !== "failed");
|
|
11102
11142
|
if (!refreshForFullJson && !streamedTextPackageIncomplete && !refreshFailedTerminal) {
|
|
11103
11143
|
return input.status;
|
|
11104
11144
|
}
|
|
@@ -11198,14 +11238,14 @@ function mergeExportColumns(preferredColumns, rows) {
|
|
|
11198
11238
|
return columns;
|
|
11199
11239
|
}
|
|
11200
11240
|
function sqlSafeExportColumnName(id) {
|
|
11201
|
-
const prefix = _nullishCoalesce(_optionalChain([id, 'access',
|
|
11241
|
+
const prefix = _nullishCoalesce(_optionalChain([id, 'access', _409 => _409.trim, 'call', _410 => _410(), 'access', _411 => _411.match, 'call', _412 => _412(/^_+/), 'optionalAccess', _413 => _413[0]]), () => ( ""));
|
|
11202
11242
|
const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
11203
11243
|
const safe = `${prefix}${normalized || "column"}`;
|
|
11204
11244
|
return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
|
|
11205
11245
|
}
|
|
11206
11246
|
async function fetchBackingDatasetRows(input) {
|
|
11207
11247
|
const playName = extractRunPlayName(input.status);
|
|
11208
|
-
const tableNamespace = _optionalChain([input, 'access',
|
|
11248
|
+
const tableNamespace = _optionalChain([input, 'access', _414 => _414.rowsInfo, 'access', _415 => _415.tableNamespace, 'optionalAccess', _416 => _416.trim, 'call', _417 => _417()]);
|
|
11209
11249
|
if (!playName || !tableNamespace) {
|
|
11210
11250
|
return null;
|
|
11211
11251
|
}
|
|
@@ -11245,7 +11285,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11245
11285
|
seenEnvelopeKeys.add(key);
|
|
11246
11286
|
}
|
|
11247
11287
|
sheetRows.push(...page.rows);
|
|
11248
|
-
const summaryTotal = _optionalChain([page, 'access',
|
|
11288
|
+
const summaryTotal = _optionalChain([page, 'access', _418 => _418.summary, 'optionalAccess', _419 => _419.stats, 'optionalAccess', _420 => _420.total]);
|
|
11249
11289
|
if (typeof summaryTotal === "number" && Number.isFinite(summaryTotal)) {
|
|
11250
11290
|
settledTotal = Math.max(_nullishCoalesce(settledTotal, () => ( 0)), Math.trunc(summaryTotal));
|
|
11251
11291
|
}
|
|
@@ -11254,7 +11294,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11254
11294
|
}
|
|
11255
11295
|
offset += page.rows.length;
|
|
11256
11296
|
}
|
|
11257
|
-
const withError =
|
|
11297
|
+
const withError = _chunkRDOPZK7Ajs.tableExportHasFailedRows.call(void 0,
|
|
11258
11298
|
sheetRows.filter(
|
|
11259
11299
|
(row) => Boolean(row) && typeof row === "object" && !Array.isArray(row)
|
|
11260
11300
|
)
|
|
@@ -11270,7 +11310,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11270
11310
|
return [
|
|
11271
11311
|
withError ? {
|
|
11272
11312
|
...exported,
|
|
11273
|
-
[
|
|
11313
|
+
[_chunkRDOPZK7Ajs.TABLE_EXPORT_ERROR_COLUMN]: _chunkRDOPZK7Ajs.tableExportErrorCell.call(void 0,
|
|
11274
11314
|
row
|
|
11275
11315
|
)
|
|
11276
11316
|
} : exported
|
|
@@ -11339,7 +11379,7 @@ function assertDatasetHasExportableRows(input) {
|
|
|
11339
11379
|
const rowOutcomes = _nullishCoalesce(readRowOutcomeSummary(input.status), () => ( readRowOutcomeSummary(
|
|
11340
11380
|
getRecordField(getRecordField(input.status, "result"), "_metadata")
|
|
11341
11381
|
)));
|
|
11342
|
-
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',
|
|
11382
|
+
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', _421 => _421.failedRows]) === 0 && !rowOutcomes.hasRowFailures) {
|
|
11343
11383
|
return input.rowsInfo;
|
|
11344
11384
|
}
|
|
11345
11385
|
const datasetLabel = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(input.datasetPath, () => ( input.rowsInfo.tableNamespace)), () => ( input.rowsInfo.source)), () => ( "result.rows"));
|
|
@@ -11411,8 +11451,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11411
11451
|
path: dataset.exportFile(outPath, options),
|
|
11412
11452
|
rowsInfo: dataset.info(),
|
|
11413
11453
|
currentTable: false,
|
|
11414
|
-
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11415
|
-
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11454
|
+
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _422 => _422.source]), () => ( null)),
|
|
11455
|
+
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _423 => _423.info, 'call', _424 => _424()]), () => ( null))
|
|
11416
11456
|
};
|
|
11417
11457
|
};
|
|
11418
11458
|
const run = Run.open({
|
|
@@ -11424,7 +11464,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11424
11464
|
const returnedRows = datasets.returned().map((dataset) => dataset.info());
|
|
11425
11465
|
const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
|
|
11426
11466
|
const selectedDataset = run.dataset(options.datasetPath);
|
|
11427
|
-
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11467
|
+
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _425 => _425.info, 'call', _426 => _426()]), () => ( null));
|
|
11428
11468
|
if (!selectedDataset && options.datasetPath) {
|
|
11429
11469
|
const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
|
|
11430
11470
|
const commands = datasetChoiceLines({
|
|
@@ -11537,7 +11577,7 @@ ${commands.join("\n")}`,
|
|
|
11537
11577
|
throw error;
|
|
11538
11578
|
}
|
|
11539
11579
|
}
|
|
11540
|
-
if (_optionalChain([fetchedRowsInfo, 'optionalAccess',
|
|
11580
|
+
if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _427 => _427.complete])) {
|
|
11541
11581
|
const guarded2 = assertDatasetHasExportableRows({
|
|
11542
11582
|
rowsInfo: fetchedRowsInfo,
|
|
11543
11583
|
status,
|
|
@@ -11602,7 +11642,7 @@ function extractActiveRunsFromError(error) {
|
|
|
11602
11642
|
if (!(error instanceof _chunkDIAWYWT5js.DeeplineError)) {
|
|
11603
11643
|
return [];
|
|
11604
11644
|
}
|
|
11605
|
-
const response = _optionalChain([error, 'access',
|
|
11645
|
+
const response = _optionalChain([error, 'access', _428 => _428.details, 'optionalAccess', _429 => _429.response]);
|
|
11606
11646
|
if (!response || typeof response !== "object" || Array.isArray(response)) {
|
|
11607
11647
|
return [];
|
|
11608
11648
|
}
|
|
@@ -11719,8 +11759,8 @@ function renderServerResultView(value) {
|
|
|
11719
11759
|
return { lines: [], actions: [] };
|
|
11720
11760
|
}
|
|
11721
11761
|
const view = value;
|
|
11722
|
-
const renderedSections = Array.isArray(_optionalChain([view, 'access',
|
|
11723
|
-
const renderedActions = Array.isArray(_optionalChain([view, 'access',
|
|
11762
|
+
const renderedSections = Array.isArray(_optionalChain([view, 'access', _430 => _430.render, 'optionalAccess', _431 => _431.sections])) ? view.render.sections : [];
|
|
11763
|
+
const renderedActions = Array.isArray(_optionalChain([view, 'access', _432 => _432.render, 'optionalAccess', _433 => _433.actions])) ? view.render.actions : [];
|
|
11724
11764
|
if (renderedSections.length > 0 || renderedActions.length > 0) {
|
|
11725
11765
|
const lines2 = [];
|
|
11726
11766
|
for (const section of renderedSections) {
|
|
@@ -11758,7 +11798,7 @@ function renderServerResultView(value) {
|
|
|
11758
11798
|
}
|
|
11759
11799
|
const tables = Array.isArray(view.tables) ? view.tables : [];
|
|
11760
11800
|
const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
|
|
11761
|
-
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess',
|
|
11801
|
+
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _434 => _434.queryCommand]) === "string") {
|
|
11762
11802
|
lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
|
|
11763
11803
|
}
|
|
11764
11804
|
if (tables.length > 0) {
|
|
@@ -11805,7 +11845,7 @@ function renderServerResultView(value) {
|
|
|
11805
11845
|
function writeStartedPlayRun(input) {
|
|
11806
11846
|
if (input.package && isPlayRunPackageValue(input.package)) {
|
|
11807
11847
|
const run = input.package.run;
|
|
11808
|
-
|
|
11848
|
+
_chunkRDOPZK7Ajs.recordPlayTermination.call(void 0, {
|
|
11809
11849
|
id: run.id,
|
|
11810
11850
|
status: run.status,
|
|
11811
11851
|
finishedAt: run.finishedAt
|
|
@@ -11818,7 +11858,7 @@ function writeStartedPlayRun(input) {
|
|
|
11818
11858
|
dashboardUrl: input.dashboardUrl,
|
|
11819
11859
|
package: input.package
|
|
11820
11860
|
};
|
|
11821
|
-
|
|
11861
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
|
|
11822
11862
|
json: true,
|
|
11823
11863
|
fields: input.jsonFields
|
|
11824
11864
|
});
|
|
@@ -11840,7 +11880,7 @@ function writeStartedPlayRun(input) {
|
|
|
11840
11880
|
input.progress.writeLine(output2, process.stdout);
|
|
11841
11881
|
return;
|
|
11842
11882
|
}
|
|
11843
|
-
|
|
11883
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0, input.package, {
|
|
11844
11884
|
json: false,
|
|
11845
11885
|
text: `${output2}
|
|
11846
11886
|
`
|
|
@@ -11861,7 +11901,7 @@ function writeStartedPlayRun(input) {
|
|
|
11861
11901
|
}
|
|
11862
11902
|
};
|
|
11863
11903
|
const lines = [
|
|
11864
|
-
`Started ${input.playName}`,
|
|
11904
|
+
input.rateLimited ? input.rateLimited.message : `Started ${input.playName}`,
|
|
11865
11905
|
`Run: ${input.runId}`,
|
|
11866
11906
|
`Logs: deepline runs logs ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)}`,
|
|
11867
11907
|
...["started", "queued", "running", "waiting"].includes(
|
|
@@ -11869,7 +11909,7 @@ function writeStartedPlayRun(input) {
|
|
|
11869
11909
|
) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)}`] : []
|
|
11870
11910
|
];
|
|
11871
11911
|
if (input.jsonOutput) {
|
|
11872
|
-
|
|
11912
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
|
|
11873
11913
|
return;
|
|
11874
11914
|
}
|
|
11875
11915
|
if (input.dashboardUrl) {
|
|
@@ -11880,7 +11920,7 @@ function writeStartedPlayRun(input) {
|
|
|
11880
11920
|
input.progress.writeLine(output, process.stdout);
|
|
11881
11921
|
return;
|
|
11882
11922
|
}
|
|
11883
|
-
|
|
11923
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
11884
11924
|
{
|
|
11885
11925
|
...payload,
|
|
11886
11926
|
render: { sections: [{ title: "play run", lines }] }
|
|
@@ -11890,7 +11930,7 @@ function writeStartedPlayRun(input) {
|
|
|
11890
11930
|
);
|
|
11891
11931
|
}
|
|
11892
11932
|
function parsePlayCheckOptions(args) {
|
|
11893
|
-
const selection =
|
|
11933
|
+
const selection = _chunkH7YFUC3Jjs.parseJsonFields.call(void 0, args, "check");
|
|
11894
11934
|
args = selection.args;
|
|
11895
11935
|
const target = args[0];
|
|
11896
11936
|
if (!target || target.startsWith("-")) {
|
|
@@ -11902,7 +11942,7 @@ function parsePlayCheckOptions(args) {
|
|
|
11902
11942
|
if (arg !== "--json" && arg !== "--full")
|
|
11903
11943
|
throw new Error(`Unknown plays check option: ${arg}`);
|
|
11904
11944
|
}
|
|
11905
|
-
const jsonOutput =
|
|
11945
|
+
const jsonOutput = _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args);
|
|
11906
11946
|
return {
|
|
11907
11947
|
target,
|
|
11908
11948
|
jsonOutput,
|
|
@@ -11978,7 +12018,7 @@ ${PLAY_PUBLISH_USAGE}`
|
|
|
11978
12018
|
useLatest,
|
|
11979
12019
|
expectedArtifactHash,
|
|
11980
12020
|
dryRun,
|
|
11981
|
-
jsonOutput:
|
|
12021
|
+
jsonOutput: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)
|
|
11982
12022
|
};
|
|
11983
12023
|
}
|
|
11984
12024
|
var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
|
|
@@ -12019,7 +12059,7 @@ ${PLAY_SAVE_USAGE}`);
|
|
|
12019
12059
|
target,
|
|
12020
12060
|
expectedArtifactHash,
|
|
12021
12061
|
dryRun,
|
|
12022
|
-
jsonOutput:
|
|
12062
|
+
jsonOutput: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)
|
|
12023
12063
|
};
|
|
12024
12064
|
}
|
|
12025
12065
|
function printScheduledPlayCapacity(capacity) {
|
|
@@ -12072,7 +12112,7 @@ function checkHintExpression(value) {
|
|
|
12072
12112
|
return stringValue2(value).replace(/^toolExecutionResult\./, "result.");
|
|
12073
12113
|
}
|
|
12074
12114
|
function checkHintRawPath(value) {
|
|
12075
|
-
return _optionalChain([value, 'optionalAccess',
|
|
12115
|
+
return _optionalChain([value, 'optionalAccess', _435 => _435.startsWith, 'call', _436 => _436("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
|
|
12076
12116
|
}
|
|
12077
12117
|
function collectStaticPipelineToolIds(staticPipeline) {
|
|
12078
12118
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -12147,30 +12187,30 @@ function cronExecutionLabel(status) {
|
|
|
12147
12187
|
}
|
|
12148
12188
|
function readLiveCronMetadata(play) {
|
|
12149
12189
|
const record3 = readRecord(play);
|
|
12150
|
-
const metadata = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
12190
|
+
const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _437 => _437.triggerMetadata]));
|
|
12151
12191
|
return {
|
|
12152
|
-
schedule: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12153
|
-
timezone: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12154
|
-
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12155
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12156
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12192
|
+
schedule: typeof _optionalChain([metadata, 'optionalAccess', _438 => _438.cronSchedule]) === "string" ? metadata.cronSchedule : null,
|
|
12193
|
+
timezone: typeof _optionalChain([metadata, 'optionalAccess', _439 => _439.cronTimezone]) === "string" ? metadata.cronTimezone : null,
|
|
12194
|
+
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _440 => _440.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
|
|
12195
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _441 => _441.blockedAt]) === "number" ? metadata.blockedAt : null,
|
|
12196
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _442 => _442.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
|
|
12157
12197
|
};
|
|
12158
12198
|
}
|
|
12159
12199
|
function liveTriggerStatusLines(status, play) {
|
|
12160
12200
|
const cron = readLiveCronMetadata(play);
|
|
12161
|
-
if (!_optionalChain([status, 'optionalAccess',
|
|
12201
|
+
if (!_optionalChain([status, 'optionalAccess', _443 => _443.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _444 => _444.webhook])) return [];
|
|
12162
12202
|
const lines = [];
|
|
12163
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12203
|
+
if (_optionalChain([status, 'optionalAccess', _445 => _445.cron]) || cron.schedule) {
|
|
12164
12204
|
const timezone = cron.timezone ? ` (${cron.timezone})` : "";
|
|
12165
12205
|
lines.push(
|
|
12166
|
-
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
12206
|
+
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _446 => _446.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
|
|
12167
12207
|
);
|
|
12168
|
-
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess',
|
|
12208
|
+
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _447 => _447.cron]) === "active") {
|
|
12169
12209
|
lines.push(
|
|
12170
12210
|
` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
|
|
12171
12211
|
);
|
|
12172
12212
|
}
|
|
12173
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12213
|
+
if (_optionalChain([status, 'optionalAccess', _448 => _448.blockedReason])) {
|
|
12174
12214
|
lines.push(` Schedule issue: ${status.blockedReason}`);
|
|
12175
12215
|
if (status.blockedReasonCode || cron.blockedReasonCode) {
|
|
12176
12216
|
lines.push(
|
|
@@ -12186,7 +12226,7 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12186
12226
|
);
|
|
12187
12227
|
}
|
|
12188
12228
|
}
|
|
12189
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12229
|
+
if (_optionalChain([status, 'optionalAccess', _449 => _449.webhook])) {
|
|
12190
12230
|
lines.push(` Webhook: ${status.webhook}`);
|
|
12191
12231
|
}
|
|
12192
12232
|
return lines;
|
|
@@ -12194,11 +12234,11 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12194
12234
|
function triggerStatusFromMetadata(value) {
|
|
12195
12235
|
const metadata = readRecord(value);
|
|
12196
12236
|
return {
|
|
12197
|
-
cron: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12198
|
-
webhook: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12199
|
-
blockedReason: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12200
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12201
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12237
|
+
cron: typeof _optionalChain([metadata, 'optionalAccess', _450 => _450.cronStatus]) === "string" ? metadata.cronStatus : null,
|
|
12238
|
+
webhook: typeof _optionalChain([metadata, 'optionalAccess', _451 => _451.webhookStatus]) === "string" ? metadata.webhookStatus : null,
|
|
12239
|
+
blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _452 => _452.blockedReason]) === "string" ? metadata.blockedReason : null,
|
|
12240
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _453 => _453.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
|
|
12241
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _454 => _454.blockedAt]) === "number" ? metadata.blockedAt : null
|
|
12202
12242
|
};
|
|
12203
12243
|
}
|
|
12204
12244
|
function printPublishReceipt(input) {
|
|
@@ -12230,7 +12270,7 @@ function printBundledRuntimeWarning(bundle) {
|
|
|
12230
12270
|
async function handlePlayCheck(args) {
|
|
12231
12271
|
const options = parsePlayCheckOptions(args);
|
|
12232
12272
|
if (!isFileTarget(options.target)) {
|
|
12233
|
-
const client = new (0,
|
|
12273
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
12234
12274
|
try {
|
|
12235
12275
|
await assertCanonicalNamedPlayReference(client, options.target, {
|
|
12236
12276
|
command: "check"
|
|
@@ -12259,7 +12299,7 @@ async function handlePlayCheck(args) {
|
|
|
12259
12299
|
},
|
|
12260
12300
|
...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
|
|
12261
12301
|
};
|
|
12262
|
-
|
|
12302
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0, result, {
|
|
12263
12303
|
json: options.jsonOutput,
|
|
12264
12304
|
fields: options.jsonFields,
|
|
12265
12305
|
text: renderPlayCheckOutput(result) + "\n"
|
|
@@ -12269,7 +12309,7 @@ async function handlePlayCheck(args) {
|
|
|
12269
12309
|
const resolved = _path.resolve.call(void 0, options.target);
|
|
12270
12310
|
const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
|
|
12271
12311
|
if (options.jsonOutput) {
|
|
12272
|
-
|
|
12312
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
12273
12313
|
{
|
|
12274
12314
|
kind: "play_check",
|
|
12275
12315
|
checked: "named_contract",
|
|
@@ -12302,16 +12342,16 @@ async function handlePlayCheck(args) {
|
|
|
12302
12342
|
);
|
|
12303
12343
|
}
|
|
12304
12344
|
const primary = outcomes.find(
|
|
12305
|
-
(outcome) => outcome.exportName ===
|
|
12345
|
+
(outcome) => outcome.exportName === _chunkZ52WEIBRjs.PLAY_DEFAULT_EXPORT
|
|
12306
12346
|
);
|
|
12307
12347
|
const output = buildPlayCheckOutput({
|
|
12308
12348
|
outcomes,
|
|
12309
12349
|
target: options.target,
|
|
12310
12350
|
full: options.full,
|
|
12311
12351
|
detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full`,
|
|
12312
|
-
publishCommand: _optionalChain([primary, 'optionalAccess',
|
|
12352
|
+
publishCommand: _optionalChain([primary, 'optionalAccess', _455 => _455.result, 'access', _456 => _456.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
|
|
12313
12353
|
});
|
|
12314
|
-
|
|
12354
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0, output, {
|
|
12315
12355
|
json: options.jsonOutput,
|
|
12316
12356
|
fields: options.jsonFields,
|
|
12317
12357
|
text: renderPlayCheckOutput(output) + "\n"
|
|
@@ -12319,12 +12359,12 @@ async function handlePlayCheck(args) {
|
|
|
12319
12359
|
return output.valid ? 0 : 1;
|
|
12320
12360
|
}
|
|
12321
12361
|
function resolvePlayCheckExportNames(sourceCode) {
|
|
12322
|
-
const exports =
|
|
12323
|
-
if (!exports || exports.length === 0) return [
|
|
12362
|
+
const exports = _chunkZ52WEIBRjs.listPlayFileExports.call(void 0, sourceCode);
|
|
12363
|
+
if (!exports || exports.length === 0) return [_chunkZ52WEIBRjs.PLAY_DEFAULT_EXPORT];
|
|
12324
12364
|
return exports.map((entry) => entry.name);
|
|
12325
12365
|
}
|
|
12326
12366
|
function artifactForProductionCompatibilityCheck(artifact) {
|
|
12327
|
-
const rawEdition = _optionalChain([process, 'access',
|
|
12367
|
+
const rawEdition = _optionalChain([process, 'access', _457 => _457.env, 'access', _458 => _458.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _459 => _459.trim, 'call', _460 => _460()]);
|
|
12328
12368
|
if (!rawEdition) return artifact;
|
|
12329
12369
|
if (!/^\d+$/.test(rawEdition)) {
|
|
12330
12370
|
throw new Error(
|
|
@@ -12365,7 +12405,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12365
12405
|
}
|
|
12366
12406
|
const playName = _nullishCoalesce(graph.root.playName, () => ( fallbackName));
|
|
12367
12407
|
const authoringErrors = collectPlayGraphAuthoringErrors(graph);
|
|
12368
|
-
const client = new (0,
|
|
12408
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
12369
12409
|
const integrationMode = resolveEvalIntegrationMode();
|
|
12370
12410
|
const checked = await checkLocalPlayGraph({
|
|
12371
12411
|
client,
|
|
@@ -12375,7 +12415,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12375
12415
|
integrationMode,
|
|
12376
12416
|
prepareArtifact: artifactForProductionCompatibilityCheck
|
|
12377
12417
|
});
|
|
12378
|
-
const importedPlayName = _optionalChain([checked, 'access',
|
|
12418
|
+
const importedPlayName = _optionalChain([checked, 'access', _461 => _461.failedChild, 'optionalAccess', _462 => _462.playName]);
|
|
12379
12419
|
const diagnosticPrefix = importedPlayName ? `Imported Play ${importedPlayName}: ` : "";
|
|
12380
12420
|
const valid = checked.result.valid && !checked.failedChild && authoringErrors.length === 0;
|
|
12381
12421
|
const errors = [
|
|
@@ -12391,7 +12431,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12391
12431
|
valid,
|
|
12392
12432
|
errors: valid ? checked.result.errors : addPlayCheckRepairHints({
|
|
12393
12433
|
errors,
|
|
12394
|
-
sourceCode: _nullishCoalesce(_optionalChain([checked, 'access',
|
|
12434
|
+
sourceCode: _nullishCoalesce(_optionalChain([checked, 'access', _463 => _463.failedChild, 'optionalAccess', _464 => _464.sourceCode]), () => ( graph.root.sourceCode))
|
|
12395
12435
|
}),
|
|
12396
12436
|
...checked.failedChild && checked.result.issues ? {
|
|
12397
12437
|
issues: checked.result.issues.map((issue) => ({
|
|
@@ -12418,11 +12458,11 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12418
12458
|
throw new Error("Expected a file-backed play run target.");
|
|
12419
12459
|
}
|
|
12420
12460
|
let client;
|
|
12421
|
-
let cliAdmission =
|
|
12461
|
+
let cliAdmission = _chunkHBVT4FW5js.usesInlinePlayAdmission.call(void 0,
|
|
12422
12462
|
"plays run",
|
|
12423
12463
|
process.argv.slice(2)
|
|
12424
12464
|
);
|
|
12425
|
-
const progress = _nullishCoalesce(
|
|
12465
|
+
const progress = _nullishCoalesce(_chunkM475BQ77js.getActiveCliProgress.call(void 0, ), () => ( _chunkM475BQ77js.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12426
12466
|
const absolutePlayPath = _path.resolve.call(void 0, options.target.path);
|
|
12427
12467
|
progress.phase("compiling play");
|
|
12428
12468
|
const sourceCode = traceCliSync(
|
|
@@ -12439,13 +12479,13 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12439
12479
|
}
|
|
12440
12480
|
let graph;
|
|
12441
12481
|
try {
|
|
12442
|
-
graph = await
|
|
12482
|
+
graph = await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
12443
12483
|
"cli.play_file_bundle_graph",
|
|
12444
12484
|
{ targetKind: "file" },
|
|
12445
12485
|
() => collectBundledPlayGraph(
|
|
12446
12486
|
absolutePlayPath,
|
|
12447
12487
|
options.profile,
|
|
12448
|
-
|
|
12488
|
+
_chunkZ52WEIBRjs.PLAY_DEFAULT_EXPORT,
|
|
12449
12489
|
{ cache: !options.dryRun }
|
|
12450
12490
|
)
|
|
12451
12491
|
);
|
|
@@ -12453,14 +12493,14 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12453
12493
|
if (options.dryRun) {
|
|
12454
12494
|
progress.complete();
|
|
12455
12495
|
renderLocalPlayExecutionPlan(
|
|
12456
|
-
|
|
12496
|
+
_chunkIIQ6O5F3js.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile }),
|
|
12457
12497
|
{ dryRun: true, json: options.jsonOutput }
|
|
12458
12498
|
);
|
|
12459
12499
|
return 0;
|
|
12460
12500
|
}
|
|
12461
|
-
client = new (0,
|
|
12501
|
+
client = new (0, _chunkSKVMC6K6js.DeeplineClient)(playRunClientOptions(options));
|
|
12462
12502
|
if (cliAdmission && (graph.root.importedPlayDependencies.length > 0 || inputContainsLocalFilePath(runtimeInput))) {
|
|
12463
|
-
await
|
|
12503
|
+
await _chunkHBVT4FW5js.checkPlayRunCompatibility.call(void 0,
|
|
12464
12504
|
client.baseUrl,
|
|
12465
12505
|
options.maintenancePolicy
|
|
12466
12506
|
);
|
|
@@ -12473,7 +12513,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12473
12513
|
});
|
|
12474
12514
|
const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
|
|
12475
12515
|
if (canDeferCompilerManifest) {
|
|
12476
|
-
|
|
12516
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
12477
12517
|
phase: "cli.play_file_compile_manifests",
|
|
12478
12518
|
ms: 0,
|
|
12479
12519
|
ok: true,
|
|
@@ -12482,7 +12522,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12482
12522
|
reason: "validated_by_run_route"
|
|
12483
12523
|
});
|
|
12484
12524
|
} else {
|
|
12485
|
-
await
|
|
12525
|
+
await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
12486
12526
|
"cli.play_file_compile_manifests",
|
|
12487
12527
|
{ targetKind: "file", skipped: false },
|
|
12488
12528
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
@@ -12503,13 +12543,13 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12503
12543
|
if (bundleResult.importedPlayDependencies.length > 0) {
|
|
12504
12544
|
try {
|
|
12505
12545
|
renderLocalPlayExecutionPlan(
|
|
12506
|
-
|
|
12546
|
+
_chunkIIQ6O5F3js.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile })
|
|
12507
12547
|
);
|
|
12508
12548
|
progress.phase("pinning imported plays");
|
|
12509
|
-
graph = await
|
|
12549
|
+
graph = await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
12510
12550
|
"cli.play_file_pin_imports",
|
|
12511
12551
|
{ targetKind: "file" },
|
|
12512
|
-
() =>
|
|
12552
|
+
() => _chunkIIQ6O5F3js.pinLocalPlayImports.call(void 0, client, graph)
|
|
12513
12553
|
);
|
|
12514
12554
|
bundleResult = graph.root;
|
|
12515
12555
|
} catch (error) {
|
|
@@ -12522,10 +12562,10 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12522
12562
|
(file) => stageFile(file.logicalPath, file.absolutePath)
|
|
12523
12563
|
);
|
|
12524
12564
|
const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
|
|
12525
|
-
const fileInputBindings =
|
|
12526
|
-
_optionalChain([compilerManifest, 'optionalAccess',
|
|
12565
|
+
const fileInputBindings = _chunkJDMR33HSjs.fileInputBindingsFromStaticPipeline.call(void 0,
|
|
12566
|
+
_optionalChain([compilerManifest, 'optionalAccess', _465 => _465.staticPipeline])
|
|
12527
12567
|
);
|
|
12528
|
-
const stagedFileInputs = await
|
|
12568
|
+
const stagedFileInputs = await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
12529
12569
|
"cli.play_stage_inputs",
|
|
12530
12570
|
{
|
|
12531
12571
|
targetKind: "file",
|
|
@@ -12572,7 +12612,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12572
12612
|
};
|
|
12573
12613
|
if (options.watch) {
|
|
12574
12614
|
progress.phase("starting run");
|
|
12575
|
-
const finalStatus = await
|
|
12615
|
+
const finalStatus = await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
12576
12616
|
"cli.play_start_watch",
|
|
12577
12617
|
{ targetKind: "file", playName },
|
|
12578
12618
|
() => (options.runIdFile || cliAdmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
|
|
@@ -12586,9 +12626,9 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12586
12626
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
12587
12627
|
open: options.open,
|
|
12588
12628
|
progress,
|
|
12589
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
12590
|
-
onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12591
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
12629
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _466 => _466.onRunStarted]),
|
|
12630
|
+
onSubmission: _optionalChain([hooks, 'optionalAccess', _467 => _467.onSubmission]),
|
|
12631
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _468 => _468.onRunAdmitted]),
|
|
12592
12632
|
maintenancePolicy: options.maintenancePolicy,
|
|
12593
12633
|
...options.runIdFile ? {} : { fullJson: options.fullJson },
|
|
12594
12634
|
...cliAdmission ? {
|
|
@@ -12616,8 +12656,8 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12616
12656
|
),
|
|
12617
12657
|
options
|
|
12618
12658
|
);
|
|
12619
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
12620
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12659
|
+
_optionalChain([hooks, 'optionalAccess', _469 => _469.onTerminalStatus, 'optionalCall', _470 => _470(outputStatus)]);
|
|
12660
|
+
if (_optionalChain([hooks, 'optionalAccess', _471 => _471.writeResult])) {
|
|
12621
12661
|
await hooks.writeResult(client, outputStatus);
|
|
12622
12662
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12623
12663
|
}
|
|
@@ -12632,20 +12672,20 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12632
12672
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12633
12673
|
}
|
|
12634
12674
|
progress.phase("starting run");
|
|
12635
|
-
const started = await
|
|
12675
|
+
const started = await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
12636
12676
|
"cli.play_start_unwatched",
|
|
12637
12677
|
{ targetKind: "file", playName },
|
|
12638
|
-
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12678
|
+
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _472 => _472.onSubmission]) }).catch(async (error) => {
|
|
12639
12679
|
throw await normalizePlayStartError(client, error, playName);
|
|
12640
12680
|
})
|
|
12641
12681
|
);
|
|
12642
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12643
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12682
|
+
await _optionalChain([hooks, 'optionalAccess', _473 => _473.onRunStarted, 'optionalCall', _474 => _474(started.workflowId)]);
|
|
12683
|
+
await _optionalChain([hooks, 'optionalAccess', _475 => _475.onRunAdmitted, 'optionalCall', _476 => _476(started.workflowId)]);
|
|
12644
12684
|
const resolvedDashboardUrl = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
12645
12685
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
12646
12686
|
progress.phase("started run");
|
|
12647
12687
|
progress.complete();
|
|
12648
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12688
|
+
if (_optionalChain([hooks, 'optionalAccess', _477 => _477.writeStarted])) {
|
|
12649
12689
|
hooks.writeStarted(started.workflowId, _nullishCoalesce(started.status, () => ( "started")));
|
|
12650
12690
|
return 0;
|
|
12651
12691
|
}
|
|
@@ -12672,7 +12712,7 @@ async function resolveNamedRunRevisionId(input) {
|
|
|
12672
12712
|
if (input.selector === "latest") {
|
|
12673
12713
|
const versions = await input.client.listPlayVersions(input.playName);
|
|
12674
12714
|
const latest = versions[0];
|
|
12675
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
12715
|
+
if (!_optionalChain([latest, 'optionalAccess', _478 => _478._id])) {
|
|
12676
12716
|
throw new Error(`No saved revisions found for ${input.playName}.`);
|
|
12677
12717
|
}
|
|
12678
12718
|
return latest._id;
|
|
@@ -12683,12 +12723,12 @@ async function handleNamedRun(options, hooks) {
|
|
|
12683
12723
|
if (options.target.kind !== "name") {
|
|
12684
12724
|
throw new Error("Expected a named play run target.");
|
|
12685
12725
|
}
|
|
12686
|
-
const client = new (0,
|
|
12687
|
-
let cliAdmission =
|
|
12726
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)(playRunClientOptions(options));
|
|
12727
|
+
let cliAdmission = _chunkHBVT4FW5js.usesInlinePlayAdmission.call(void 0,
|
|
12688
12728
|
"plays run",
|
|
12689
12729
|
process.argv.slice(2)
|
|
12690
12730
|
);
|
|
12691
|
-
const progress = _nullishCoalesce(
|
|
12731
|
+
const progress = _nullishCoalesce(_chunkM475BQ77js.getActiveCliProgress.call(void 0, ), () => ( _chunkM475BQ77js.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12692
12732
|
const playName = options.target.name;
|
|
12693
12733
|
const runtimeInput = options.input ? { ...options.input } : {};
|
|
12694
12734
|
try {
|
|
@@ -12703,14 +12743,14 @@ async function handleNamedRun(options, hooks) {
|
|
|
12703
12743
|
});
|
|
12704
12744
|
const playDetail = needsPlayDefinition ? await (async () => {
|
|
12705
12745
|
progress.phase("loading play definition");
|
|
12706
|
-
return
|
|
12746
|
+
return _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
12707
12747
|
"cli.play_load_definition",
|
|
12708
12748
|
{ targetKind: "name", playName, skipped: false },
|
|
12709
12749
|
() => assertCanonicalNamedPlayReference(client, playName, {
|
|
12710
12750
|
command: "run"
|
|
12711
12751
|
})
|
|
12712
12752
|
);
|
|
12713
|
-
})() : (
|
|
12753
|
+
})() : (_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
12714
12754
|
phase: "cli.play_load_definition",
|
|
12715
12755
|
ms: 0,
|
|
12716
12756
|
ok: true,
|
|
@@ -12719,7 +12759,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12719
12759
|
skipped: true
|
|
12720
12760
|
}), null);
|
|
12721
12761
|
progress.phase("selecting revision");
|
|
12722
|
-
const selectedRevisionId = await
|
|
12762
|
+
const selectedRevisionId = await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
12723
12763
|
"cli.play_select_revision",
|
|
12724
12764
|
{
|
|
12725
12765
|
targetKind: "name",
|
|
@@ -12740,14 +12780,14 @@ async function handleNamedRun(options, hooks) {
|
|
|
12740
12780
|
maxTotalCredits: options.maxTotalCredits
|
|
12741
12781
|
});
|
|
12742
12782
|
const fileInputBindings = playDetail ? [
|
|
12743
|
-
...
|
|
12744
|
-
...
|
|
12783
|
+
..._chunkJDMR33HSjs.fileInputBindingsFromPlaySchema.call(void 0, playDetail.play.inputSchema),
|
|
12784
|
+
..._chunkJDMR33HSjs.fileInputBindingsFromStaticPipeline.call(void 0, playDetail.play.staticPipeline)
|
|
12745
12785
|
] : [];
|
|
12746
12786
|
if (cliAdmission && fileInputBindings.length > 0) {
|
|
12747
|
-
await
|
|
12787
|
+
await _chunkHBVT4FW5js.checkPlayRunCompatibility.call(void 0, client.baseUrl, options.maintenancePolicy);
|
|
12748
12788
|
cliAdmission = false;
|
|
12749
12789
|
}
|
|
12750
|
-
const stagedFileInputs = await
|
|
12790
|
+
const stagedFileInputs = await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
12751
12791
|
"cli.play_stage_inputs",
|
|
12752
12792
|
{
|
|
12753
12793
|
targetKind: "name",
|
|
@@ -12770,7 +12810,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12770
12810
|
const testPolicyOverrides = {
|
|
12771
12811
|
...options.debugMapLatency ? { mapLatencyProfile: true } : {}
|
|
12772
12812
|
};
|
|
12773
|
-
const startRequest =
|
|
12813
|
+
const startRequest = _chunkJDMR33HSjs.buildNamedPlayRunRequest.call(void 0, {
|
|
12774
12814
|
name: playName,
|
|
12775
12815
|
revisionId: selectedRevisionId,
|
|
12776
12816
|
runtimeInput,
|
|
@@ -12791,7 +12831,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12791
12831
|
});
|
|
12792
12832
|
if (options.watch) {
|
|
12793
12833
|
progress.phase("starting run");
|
|
12794
|
-
const finalStatus = await
|
|
12834
|
+
const finalStatus = await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
12795
12835
|
"cli.play_start_watch",
|
|
12796
12836
|
{ targetKind: "name", playName },
|
|
12797
12837
|
() => (options.runIdFile || cliAdmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
|
|
@@ -12805,9 +12845,9 @@ async function handleNamedRun(options, hooks) {
|
|
|
12805
12845
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
12806
12846
|
open: options.open,
|
|
12807
12847
|
progress,
|
|
12808
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
12809
|
-
onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12810
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
12848
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _479 => _479.onRunStarted]),
|
|
12849
|
+
onSubmission: _optionalChain([hooks, 'optionalAccess', _480 => _480.onSubmission]),
|
|
12850
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _481 => _481.onRunAdmitted]),
|
|
12811
12851
|
maintenancePolicy: options.maintenancePolicy,
|
|
12812
12852
|
...options.runIdFile ? {} : { fullJson: options.fullJson },
|
|
12813
12853
|
...cliAdmission ? {
|
|
@@ -12838,8 +12878,8 @@ async function handleNamedRun(options, hooks) {
|
|
|
12838
12878
|
options,
|
|
12839
12879
|
_nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
|
|
12840
12880
|
);
|
|
12841
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
12842
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12881
|
+
_optionalChain([hooks, 'optionalAccess', _482 => _482.onTerminalStatus, 'optionalCall', _483 => _483(outputStatus)]);
|
|
12882
|
+
if (_optionalChain([hooks, 'optionalAccess', _484 => _484.writeResult])) {
|
|
12843
12883
|
await hooks.writeResult(client, outputStatus);
|
|
12844
12884
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12845
12885
|
}
|
|
@@ -12854,22 +12894,22 @@ async function handleNamedRun(options, hooks) {
|
|
|
12854
12894
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12855
12895
|
}
|
|
12856
12896
|
progress.phase("starting run");
|
|
12857
|
-
const started = await
|
|
12897
|
+
const started = await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
12858
12898
|
"cli.play_start_unwatched",
|
|
12859
12899
|
{ targetKind: "name", playName },
|
|
12860
|
-
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12900
|
+
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _485 => _485.onSubmission]) }).catch(async (error) => {
|
|
12861
12901
|
throw await normalizePlayStartError(client, error, playName, {
|
|
12862
12902
|
suggestMissingPlay: true
|
|
12863
12903
|
});
|
|
12864
12904
|
})
|
|
12865
12905
|
);
|
|
12866
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12867
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12906
|
+
await _optionalChain([hooks, 'optionalAccess', _486 => _486.onRunStarted, 'optionalCall', _487 => _487(started.workflowId)]);
|
|
12907
|
+
await _optionalChain([hooks, 'optionalAccess', _488 => _488.onRunAdmitted, 'optionalCall', _489 => _489(started.workflowId)]);
|
|
12868
12908
|
const resolvedDashboardUrl = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
12869
12909
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
12870
12910
|
progress.phase("started run");
|
|
12871
12911
|
progress.complete();
|
|
12872
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12912
|
+
if (_optionalChain([hooks, 'optionalAccess', _490 => _490.writeStarted])) {
|
|
12873
12913
|
hooks.writeStarted(started.workflowId, _nullishCoalesce(started.status, () => ( "started")));
|
|
12874
12914
|
return 0;
|
|
12875
12915
|
}
|
|
@@ -12894,12 +12934,12 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
12894
12934
|
const compact = compactPlayStatus(status);
|
|
12895
12935
|
const errors = Array.isArray(compact.errors) ? compact.errors : [];
|
|
12896
12936
|
const error = status.status === "failed" ? _nullishCoalesce(errors[0], () => ( {
|
|
12897
|
-
message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access',
|
|
12937
|
+
message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access', _491 => _491.progress, 'optionalAccess', _492 => _492.error]))), () => ( "Play failed. Inspect the run for details."))
|
|
12898
12938
|
})) : null;
|
|
12899
12939
|
const next = { status: `deepline runs get ${status.runId}` };
|
|
12900
|
-
const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access',
|
|
12940
|
+
const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access', _493 => _493.exec, 'call', _494 => _494(status.runId), 'optionalAccess', _495 => _495[1]]), () => ( extractRunPlayName(status))), () => ( null));
|
|
12901
12941
|
if (!terminal) {
|
|
12902
|
-
|
|
12942
|
+
_chunkRDOPZK7Ajs.writeExecutionOutput.call(void 0,
|
|
12903
12943
|
{ id: status.runId, status: status.status, next },
|
|
12904
12944
|
output
|
|
12905
12945
|
);
|
|
@@ -12958,11 +12998,11 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
12958
12998
|
Object.entries(handle).filter(([key]) => source !== "result" || key !== "_metadata").map(([key, child]) => [key, materialize(child, `${source}.${key}`)])
|
|
12959
12999
|
);
|
|
12960
13000
|
};
|
|
12961
|
-
const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call',
|
|
13001
|
+
const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call', _496 => _496(status), 'optionalAccess', _497 => _497.outputs]));
|
|
12962
13002
|
const returned = status.result !== void 0 ? status.result : packagedOutputs ? Object.fromEntries(
|
|
12963
13003
|
Object.entries(packagedOutputs).map(([key, value]) => [
|
|
12964
13004
|
key,
|
|
12965
|
-
_optionalChain([readRecord, 'call',
|
|
13005
|
+
_optionalChain([readRecord, 'call', _498 => _498(value), 'optionalAccess', _499 => _499.kind]) === "value" ? _optionalChain([readRecord, 'call', _500 => _500(value), 'optionalAccess', _501 => _501.value]) : value
|
|
12966
13006
|
])
|
|
12967
13007
|
) : null;
|
|
12968
13008
|
let data = materialize(returned);
|
|
@@ -12974,10 +13014,10 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
12974
13014
|
};
|
|
12975
13015
|
}
|
|
12976
13016
|
const byRows = new Map(collections.map((c) => [c.rows, c]));
|
|
12977
|
-
const allCollections =
|
|
13017
|
+
const allCollections = _chunkRDOPZK7Ajs.outputCollections.call(void 0, data).map(
|
|
12978
13018
|
(collection) => _nullishCoalesce(byRows.get(collection.rows), () => ( collection))
|
|
12979
13019
|
);
|
|
12980
|
-
|
|
13020
|
+
_chunkRDOPZK7Ajs.writeExecutionOutput.call(void 0,
|
|
12981
13021
|
{
|
|
12982
13022
|
id: status.runId,
|
|
12983
13023
|
status: status.status,
|
|
@@ -12985,7 +13025,7 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
12985
13025
|
...allCollections.length ? { collections: allCollections } : {},
|
|
12986
13026
|
complete: allCollections.every((c) => c.complete === true) ? true : allCollections.some((c) => c.complete === false) ? false : null,
|
|
12987
13027
|
error,
|
|
12988
|
-
credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access',
|
|
13028
|
+
credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access', _502 => _502.billing, 'optionalAccess', _503 => _503.totalCredits]))), () => ( null)),
|
|
12989
13029
|
...playName ? { page: _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) } : {},
|
|
12990
13030
|
warnings: [
|
|
12991
13031
|
...buildRunWarnings(status, null),
|
|
@@ -12998,7 +13038,7 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
12998
13038
|
}
|
|
12999
13039
|
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;
|
|
13000
13040
|
async function handlePlayRun(args, hooks) {
|
|
13001
|
-
const parsedOptions = Array.isArray(args) ?
|
|
13041
|
+
const parsedOptions = Array.isArray(args) ? _chunkRMQB72WWjs.parsePlayRunOptions.call(void 0, args) : args;
|
|
13002
13042
|
const options = parsedOptions.runIdFile ? {
|
|
13003
13043
|
...parsedOptions,
|
|
13004
13044
|
runIdFile: parsedOptions.dryRun ? _path.resolve.call(void 0, parsedOptions.runIdFile) : await preflightRunIdFile(parsedOptions.runIdFile)
|
|
@@ -13015,7 +13055,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13015
13055
|
JSON.stringify({
|
|
13016
13056
|
version: 1,
|
|
13017
13057
|
admissionState: "submitted_unknown",
|
|
13018
|
-
baseUrl: new (0,
|
|
13058
|
+
baseUrl: new (0, _chunkSKVMC6K6js.DeeplineClient)().baseUrl,
|
|
13019
13059
|
...intent
|
|
13020
13060
|
})
|
|
13021
13061
|
);
|
|
@@ -13027,7 +13067,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13027
13067
|
} finally {
|
|
13028
13068
|
await removeRunIdTempFile(tempPath);
|
|
13029
13069
|
}
|
|
13030
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13070
|
+
await _optionalChain([hooks, 'optionalAccess', _504 => _504.onSubmission, 'optionalCall', _505 => _505(intent)]);
|
|
13031
13071
|
},
|
|
13032
13072
|
onRunStarted: async (runId) => {
|
|
13033
13073
|
try {
|
|
@@ -13038,7 +13078,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13038
13078
|
{ cause: error }
|
|
13039
13079
|
);
|
|
13040
13080
|
}
|
|
13041
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13081
|
+
await _optionalChain([hooks, 'optionalAccess', _506 => _506.onRunStarted, 'optionalCall', _507 => _507(runId)]);
|
|
13042
13082
|
},
|
|
13043
13083
|
onRunAdmitted: async (runId) => {
|
|
13044
13084
|
try {
|
|
@@ -13051,7 +13091,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13051
13091
|
{ cause: error }
|
|
13052
13092
|
);
|
|
13053
13093
|
}
|
|
13054
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13094
|
+
await _optionalChain([hooks, 'optionalAccess', _508 => _508.onRunAdmitted, 'optionalCall', _509 => _509(runId)]);
|
|
13055
13095
|
}
|
|
13056
13096
|
} : hooks;
|
|
13057
13097
|
if (options.target.kind === "file") {
|
|
@@ -13130,10 +13170,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13130
13170
|
...buildRunActivityTextLines(run),
|
|
13131
13171
|
...buildRunStatusEvidenceTextLines(overview)
|
|
13132
13172
|
];
|
|
13133
|
-
if (_optionalChain([overview, 'access',
|
|
13173
|
+
if (_optionalChain([overview, 'access', _510 => _510.runStatus, 'optionalAccess', _511 => _511.available]) === false)
|
|
13134
13174
|
lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
|
|
13135
|
-
const work = readRecord(_optionalChain([readRecord, 'call',
|
|
13136
|
-
if (work && !_optionalChain([overview, 'access',
|
|
13175
|
+
const work = readRecord(_optionalChain([readRecord, 'call', _512 => _512(run), 'optionalAccess', _513 => _513.work]));
|
|
13176
|
+
if (work && !_optionalChain([overview, 'access', _514 => _514.runStatus, 'optionalAccess', _515 => _515.available]))
|
|
13137
13177
|
lines.push(
|
|
13138
13178
|
` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
|
|
13139
13179
|
);
|
|
@@ -13184,7 +13224,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13184
13224
|
...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
|
|
13185
13225
|
...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
|
|
13186
13226
|
...overview.failedLogs.entries,
|
|
13187
|
-
..._optionalChain([overview, 'access',
|
|
13227
|
+
..._optionalChain([overview, 'access', _516 => _516.failedLogs, 'access', _517 => _517.next, 'optionalAccess', _518 => _518.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
|
|
13188
13228
|
]
|
|
13189
13229
|
});
|
|
13190
13230
|
sections.push({
|
|
@@ -13244,7 +13284,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13244
13284
|
);
|
|
13245
13285
|
return `${lines.join("\n")}
|
|
13246
13286
|
|
|
13247
|
-
${
|
|
13287
|
+
${_chunkH7YFUC3Jjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
|
|
13248
13288
|
}
|
|
13249
13289
|
var RUN_READ_TIMING_PROGRESS_INTERVAL_MS = 15e3;
|
|
13250
13290
|
async function withRunReadTiming(command, stage, enabled, action) {
|
|
@@ -13255,7 +13295,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
|
|
|
13255
13295
|
const progressTimer = setInterval(() => {
|
|
13256
13296
|
console.error(`[${command}] ${stage} still running after ${elapsedMs()}ms`);
|
|
13257
13297
|
}, RUN_READ_TIMING_PROGRESS_INTERVAL_MS);
|
|
13258
|
-
_optionalChain([progressTimer, 'access',
|
|
13298
|
+
_optionalChain([progressTimer, 'access', _519 => _519.unref, 'optionalCall', _520 => _520()]);
|
|
13259
13299
|
try {
|
|
13260
13300
|
const result = await action();
|
|
13261
13301
|
console.error(`[${command}] ${stage} completed in ${elapsedMs()}ms`);
|
|
@@ -13268,7 +13308,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
|
|
|
13268
13308
|
}
|
|
13269
13309
|
}
|
|
13270
13310
|
async function handleRunGet(args) {
|
|
13271
|
-
const selection =
|
|
13311
|
+
const selection = _chunkH7YFUC3Jjs.parseJsonFields.call(void 0,
|
|
13272
13312
|
args,
|
|
13273
13313
|
args.includes("--config") ? "config" : "get"
|
|
13274
13314
|
);
|
|
@@ -13281,7 +13321,7 @@ async function handleRunGet(args) {
|
|
|
13281
13321
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13282
13322
|
return 1;
|
|
13283
13323
|
}
|
|
13284
|
-
const client = new (0,
|
|
13324
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
13285
13325
|
const timing = args.includes("--timing");
|
|
13286
13326
|
if (args.includes("--web-url")) {
|
|
13287
13327
|
const status2 = await withRunReadTiming(
|
|
@@ -13296,7 +13336,7 @@ async function handleRunGet(args) {
|
|
|
13296
13336
|
return 1;
|
|
13297
13337
|
}
|
|
13298
13338
|
const dashboardUrl2 = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName2);
|
|
13299
|
-
|
|
13339
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
13300
13340
|
{ dashboardUrl: dashboardUrl2 },
|
|
13301
13341
|
{ json: args.includes("--json"), text: `${dashboardUrl2}
|
|
13302
13342
|
` }
|
|
@@ -13321,7 +13361,7 @@ async function handleRunGet(args) {
|
|
|
13321
13361
|
"This server does not support recorded configuration reads."
|
|
13322
13362
|
);
|
|
13323
13363
|
}
|
|
13324
|
-
|
|
13364
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
13325
13365
|
{ runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
|
|
13326
13366
|
{ json: true, fields: selection.fields }
|
|
13327
13367
|
);
|
|
@@ -13334,7 +13374,7 @@ async function handleRunGet(args) {
|
|
|
13334
13374
|
timing,
|
|
13335
13375
|
() => client.getRunInput(runId)
|
|
13336
13376
|
);
|
|
13337
|
-
|
|
13377
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0, input, { json: true });
|
|
13338
13378
|
return 0;
|
|
13339
13379
|
}
|
|
13340
13380
|
const full = args.includes("--full");
|
|
@@ -13347,7 +13387,7 @@ async function handleRunGet(args) {
|
|
|
13347
13387
|
failedLogs: args.includes("--log-failed")
|
|
13348
13388
|
})
|
|
13349
13389
|
);
|
|
13350
|
-
if (status.package)
|
|
13390
|
+
if (status.package) _chunkRDOPZK7Ajs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
13351
13391
|
if (!status.package) {
|
|
13352
13392
|
const legacyStatus = full ? await withRunReadTiming(
|
|
13353
13393
|
"runs get",
|
|
@@ -13360,8 +13400,8 @@ async function handleRunGet(args) {
|
|
|
13360
13400
|
) : status;
|
|
13361
13401
|
const legacyPlayName = resolveRunPlayName(legacyStatus, runId);
|
|
13362
13402
|
const legacyDashboardUrl = legacyPlayName ? _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, legacyPlayName) : null;
|
|
13363
|
-
if (
|
|
13364
|
-
|
|
13403
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
13404
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
13365
13405
|
{
|
|
13366
13406
|
...full ? legacyStatus : compactPlayStatus(legacyStatus),
|
|
13367
13407
|
...legacyDashboardUrl ? { dashboardUrl: legacyDashboardUrl } : {}
|
|
@@ -13371,7 +13411,7 @@ async function handleRunGet(args) {
|
|
|
13371
13411
|
} else {
|
|
13372
13412
|
writePlayResult(legacyStatus, false, { fullJson: full });
|
|
13373
13413
|
if (legacyDashboardUrl)
|
|
13374
|
-
|
|
13414
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
13375
13415
|
{ dashboardUrl: legacyDashboardUrl },
|
|
13376
13416
|
{ json: false, text: `play page: ${legacyDashboardUrl}
|
|
13377
13417
|
` }
|
|
@@ -13401,10 +13441,10 @@ async function handleRunGet(args) {
|
|
|
13401
13441
|
)
|
|
13402
13442
|
]);
|
|
13403
13443
|
const hitLines = formatRunHitsLines(hits);
|
|
13404
|
-
const json =
|
|
13444
|
+
const json = _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args);
|
|
13405
13445
|
const playName = resolveRunPlayName(status, runId);
|
|
13406
13446
|
const dashboardUrl = playName ? _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) : void 0;
|
|
13407
|
-
|
|
13447
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
13408
13448
|
{
|
|
13409
13449
|
...overview,
|
|
13410
13450
|
...dashboardUrl ? { dashboardUrl } : {},
|
|
@@ -13508,9 +13548,9 @@ async function handleRunLifecycleStatus(args) {
|
|
|
13508
13548
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13509
13549
|
return 1;
|
|
13510
13550
|
}
|
|
13511
|
-
const status = await new (0,
|
|
13512
|
-
if (
|
|
13513
|
-
|
|
13551
|
+
const status = await new (0, _chunkSKVMC6K6js.DeeplineClient)().runs.status(runId);
|
|
13552
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
13553
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0, status, { json: true });
|
|
13514
13554
|
return 0;
|
|
13515
13555
|
}
|
|
13516
13556
|
if (!status.available) {
|
|
@@ -13550,7 +13590,7 @@ async function handleRunsRerun(args) {
|
|
|
13550
13590
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13551
13591
|
return 1;
|
|
13552
13592
|
}
|
|
13553
|
-
const options = { json:
|
|
13593
|
+
const options = { json: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args) };
|
|
13554
13594
|
for (let index = 0; index < args.length; index += 1) {
|
|
13555
13595
|
if (args[index] === "--idempotency-key") {
|
|
13556
13596
|
options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
|
|
@@ -13616,8 +13656,8 @@ ${usage2}
|
|
|
13616
13656
|
Discover Plays: ${next.discover}
|
|
13617
13657
|
Active runs: ${next.running}`
|
|
13618
13658
|
);
|
|
13619
|
-
if (
|
|
13620
|
-
|
|
13659
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
13660
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
13621
13661
|
{ ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
|
|
13622
13662
|
{ json: true }
|
|
13623
13663
|
);
|
|
@@ -13632,7 +13672,7 @@ Active runs: ${next.running}`
|
|
|
13632
13672
|
console.error("--offset requires --play.");
|
|
13633
13673
|
return 1;
|
|
13634
13674
|
}
|
|
13635
|
-
const client = new (0,
|
|
13675
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
13636
13676
|
const page = await withRunReadTiming(
|
|
13637
13677
|
"runs list",
|
|
13638
13678
|
"run inventory",
|
|
@@ -13667,7 +13707,7 @@ Active runs: ${next.running}`
|
|
|
13667
13707
|
executionTime: run.executionTime,
|
|
13668
13708
|
billingTotalCredits: run.billingTotalCredits,
|
|
13669
13709
|
billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
|
|
13670
|
-
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access',
|
|
13710
|
+
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _521 => _521.memo, 'optionalAccess', _522 => _522.playName]))), () => ( playName)), () => ( null)),
|
|
13671
13711
|
...nodeId ? { nodeObservation: _nullishCoalesce(run.nodeObservation, () => ( null)) } : {}
|
|
13672
13712
|
}));
|
|
13673
13713
|
const lines = runs.length === 0 ? [
|
|
@@ -13699,14 +13739,14 @@ Active runs: ${next.running}`
|
|
|
13699
13739
|
return lines2.join("\n");
|
|
13700
13740
|
});
|
|
13701
13741
|
const nextOffset = (_nullishCoalesce(_nullishCoalesce(page.offset, () => ( offset)), () => ( 0))) + runs.length;
|
|
13702
|
-
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}${
|
|
13742
|
+
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}${_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args) ? " --json" : ""}` : null;
|
|
13703
13743
|
if (page.hasMore) {
|
|
13704
13744
|
lines.push("List truncated \u2014 more runs match this filter.");
|
|
13705
13745
|
lines.push(
|
|
13706
13746
|
nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
|
|
13707
13747
|
);
|
|
13708
13748
|
}
|
|
13709
|
-
|
|
13749
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
13710
13750
|
{
|
|
13711
13751
|
runs,
|
|
13712
13752
|
count: runs.length,
|
|
@@ -13716,11 +13756,11 @@ Active runs: ${next.running}`
|
|
|
13716
13756
|
...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
|
|
13717
13757
|
next: {
|
|
13718
13758
|
page: nextPage,
|
|
13719
|
-
get: _optionalChain([runs, 'access',
|
|
13759
|
+
get: _optionalChain([runs, 'access', _523 => _523[0], 'optionalAccess', _524 => _524.id]) ? `deepline runs get ${runs[0].id}` : null
|
|
13720
13760
|
},
|
|
13721
13761
|
render: { sections: [{ title: "runs", lines }] }
|
|
13722
13762
|
},
|
|
13723
|
-
{ json:
|
|
13763
|
+
{ json: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args) }
|
|
13724
13764
|
);
|
|
13725
13765
|
return 0;
|
|
13726
13766
|
}
|
|
@@ -13750,7 +13790,7 @@ async function handleRunTail(args) {
|
|
|
13750
13790
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
13751
13791
|
return 1;
|
|
13752
13792
|
}
|
|
13753
|
-
const parsed =
|
|
13793
|
+
const parsed = _chunk7KAS4QOWjs.parseLogLevel.call(void 0, value);
|
|
13754
13794
|
if (!parsed) {
|
|
13755
13795
|
console.error(
|
|
13756
13796
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -13788,9 +13828,9 @@ async function handleRunTail(args) {
|
|
|
13788
13828
|
);
|
|
13789
13829
|
return 1;
|
|
13790
13830
|
}
|
|
13791
|
-
const client = new (0,
|
|
13831
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
13792
13832
|
const jsonLines = args.includes("--jsonl");
|
|
13793
|
-
const jsonOutput = !jsonLines &&
|
|
13833
|
+
const jsonOutput = !jsonLines && _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args);
|
|
13794
13834
|
const compact = args.includes("--compact");
|
|
13795
13835
|
const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
|
|
13796
13836
|
const compactState = {
|
|
@@ -13871,7 +13911,7 @@ async function handleRunLogs(args) {
|
|
|
13871
13911
|
]);
|
|
13872
13912
|
const cursorIndex = args.indexOf("--cursor");
|
|
13873
13913
|
const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
13874
|
-
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue &&
|
|
13914
|
+
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunk7KAS4QOWjs.isRunLogsCursor.call(void 0, cursorValue));
|
|
13875
13915
|
if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
|
|
13876
13916
|
return handleRunEventSearch(args);
|
|
13877
13917
|
}
|
|
@@ -13905,7 +13945,7 @@ async function handleRunLogs(args) {
|
|
|
13905
13945
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
13906
13946
|
return 1;
|
|
13907
13947
|
}
|
|
13908
|
-
const parsed =
|
|
13948
|
+
const parsed = _chunk7KAS4QOWjs.parseLogLevel.call(void 0, value);
|
|
13909
13949
|
if (!parsed) {
|
|
13910
13950
|
console.error(
|
|
13911
13951
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -13952,12 +13992,12 @@ async function handleRunLogs(args) {
|
|
|
13952
13992
|
);
|
|
13953
13993
|
return 1;
|
|
13954
13994
|
}
|
|
13955
|
-
const client = new (0,
|
|
13995
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
13956
13996
|
if (outPath) {
|
|
13957
13997
|
const result2 = await client.runs.logs(runId, { all: true });
|
|
13958
|
-
const logs = result2.entries.filter((line) =>
|
|
13998
|
+
const logs = result2.entries.filter((line) => _chunk7KAS4QOWjs.logLevelReaches.call(void 0, _chunk7KAS4QOWjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunk7KAS4QOWjs.classifyLogLine.call(void 0, line).line);
|
|
13959
13999
|
_fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
|
13960
|
-
|
|
14000
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
13961
14001
|
{
|
|
13962
14002
|
runId: result2.runId,
|
|
13963
14003
|
log_path: outPath,
|
|
@@ -13980,7 +14020,7 @@ async function handleRunLogs(args) {
|
|
|
13980
14020
|
]
|
|
13981
14021
|
}
|
|
13982
14022
|
},
|
|
13983
|
-
{ json:
|
|
14023
|
+
{ json: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args) }
|
|
13984
14024
|
);
|
|
13985
14025
|
return 0;
|
|
13986
14026
|
}
|
|
@@ -14011,7 +14051,7 @@ async function handleRunLogs(args) {
|
|
|
14011
14051
|
}
|
|
14012
14052
|
};
|
|
14013
14053
|
const text = buildRunLogsText(filteredResult);
|
|
14014
|
-
|
|
14054
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
14015
14055
|
{
|
|
14016
14056
|
runId: result.runId,
|
|
14017
14057
|
totalCount: result.totalCount,
|
|
@@ -14035,7 +14075,7 @@ async function handleRunLogs(args) {
|
|
|
14035
14075
|
render: { sections: [{ title: "run logs", lines: entries }] }
|
|
14036
14076
|
},
|
|
14037
14077
|
{
|
|
14038
|
-
json:
|
|
14078
|
+
json: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args),
|
|
14039
14079
|
text
|
|
14040
14080
|
}
|
|
14041
14081
|
);
|
|
@@ -14059,17 +14099,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
14059
14099
|
);
|
|
14060
14100
|
}
|
|
14061
14101
|
const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
|
|
14062
|
-
(entry) =>
|
|
14102
|
+
(entry) => _chunk7KAS4QOWjs.logLevelReaches.call(void 0, _chunk7KAS4QOWjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
|
|
14063
14103
|
);
|
|
14064
14104
|
const selected = matching.slice(-limit);
|
|
14065
14105
|
const olderMatchesExist = matching.length > selected.length;
|
|
14066
14106
|
return {
|
|
14067
14107
|
entries: selected.map((entry) => entry.line),
|
|
14068
|
-
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14069
|
-
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14108
|
+
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _525 => _525[0], 'optionalAccess', _526 => _526.seq]), () => ( null)),
|
|
14109
|
+
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _527 => _527.at, 'call', _528 => _528(-1), 'optionalAccess', _529 => _529.seq]), () => ( null)),
|
|
14070
14110
|
truncated: result.truncated || olderMatchesExist,
|
|
14071
14111
|
hasMore: olderMatchesExist,
|
|
14072
|
-
nextCursor: olderMatchesExist ?
|
|
14112
|
+
nextCursor: olderMatchesExist ? _chunk7KAS4QOWjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
|
|
14073
14113
|
};
|
|
14074
14114
|
}
|
|
14075
14115
|
async function handleRunEventSearch(args) {
|
|
@@ -14136,7 +14176,7 @@ ${usage2}`);
|
|
|
14136
14176
|
namespace,
|
|
14137
14177
|
...backend ? { backend } : {}
|
|
14138
14178
|
} : void 0;
|
|
14139
|
-
const client = new (0,
|
|
14179
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
14140
14180
|
const result = await client.runs.searchEvents({
|
|
14141
14181
|
...runId ? { runId } : {},
|
|
14142
14182
|
...values["--since"] ? { since: values["--since"] } : {},
|
|
@@ -14208,7 +14248,7 @@ ${renderedDetails}` : ""}`;
|
|
|
14208
14248
|
"--limit",
|
|
14209
14249
|
String(limit)
|
|
14210
14250
|
].join(" ") : null;
|
|
14211
|
-
|
|
14251
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
14212
14252
|
{
|
|
14213
14253
|
events,
|
|
14214
14254
|
nextCursor: result.nextCursor,
|
|
@@ -14219,19 +14259,19 @@ ${renderedDetails}` : ""}`;
|
|
|
14219
14259
|
render: { sections: [{ title: "runtime events", lines }] }
|
|
14220
14260
|
},
|
|
14221
14261
|
{
|
|
14222
|
-
json:
|
|
14262
|
+
json: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args),
|
|
14223
14263
|
text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
|
|
14224
14264
|
}
|
|
14225
14265
|
);
|
|
14226
14266
|
return 0;
|
|
14227
14267
|
}
|
|
14228
14268
|
function buildRunLogsText(result) {
|
|
14229
|
-
const lines = result.entries.map((line) =>
|
|
14269
|
+
const lines = result.entries.map((line) => _chunk7KAS4QOWjs.classifyLogLine.call(void 0, line).line);
|
|
14230
14270
|
if (result.warning) {
|
|
14231
14271
|
if (lines.length > 0) lines.push("");
|
|
14232
14272
|
lines.push(`warning: ${result.warning}`);
|
|
14233
14273
|
lines.push(
|
|
14234
|
-
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access',
|
|
14274
|
+
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _530 => _530.next, 'optionalAccess', _531 => _531.logs]), () => ( `deepline runs logs ${result.runId} --out run.log`))}`
|
|
14235
14275
|
);
|
|
14236
14276
|
}
|
|
14237
14277
|
return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
|
|
@@ -14260,7 +14300,7 @@ async function handleRunStop(args) {
|
|
|
14260
14300
|
reason = args[++index];
|
|
14261
14301
|
}
|
|
14262
14302
|
}
|
|
14263
|
-
const client = new (0,
|
|
14303
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
14264
14304
|
const result = await client.runs.stop(runId, { reason });
|
|
14265
14305
|
const state = resolveRunStopState(result);
|
|
14266
14306
|
const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
|
|
@@ -14275,7 +14315,7 @@ async function handleRunStop(args) {
|
|
|
14275
14315
|
...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
|
|
14276
14316
|
`inspect: deepline runs get ${runId} --full`
|
|
14277
14317
|
];
|
|
14278
|
-
|
|
14318
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
14279
14319
|
{
|
|
14280
14320
|
...cancelling,
|
|
14281
14321
|
state,
|
|
@@ -14290,7 +14330,7 @@ async function handleRunStop(args) {
|
|
|
14290
14330
|
]
|
|
14291
14331
|
}
|
|
14292
14332
|
},
|
|
14293
|
-
{ json:
|
|
14333
|
+
{ json: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args) }
|
|
14294
14334
|
);
|
|
14295
14335
|
return 0;
|
|
14296
14336
|
}
|
|
@@ -14307,7 +14347,7 @@ async function handleRunStop(args) {
|
|
|
14307
14347
|
];
|
|
14308
14348
|
process.stderr.write(`${lines2.join("\n")}
|
|
14309
14349
|
`);
|
|
14310
|
-
|
|
14350
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
14311
14351
|
{
|
|
14312
14352
|
...result,
|
|
14313
14353
|
render: {
|
|
@@ -14322,7 +14362,7 @@ async function handleRunStop(args) {
|
|
|
14322
14362
|
]
|
|
14323
14363
|
}
|
|
14324
14364
|
},
|
|
14325
|
-
{ json:
|
|
14365
|
+
{ json: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args) }
|
|
14326
14366
|
);
|
|
14327
14367
|
return 1;
|
|
14328
14368
|
}
|
|
@@ -14333,12 +14373,12 @@ async function handleRunStop(args) {
|
|
|
14333
14373
|
`warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
|
|
14334
14374
|
] : []
|
|
14335
14375
|
];
|
|
14336
|
-
|
|
14376
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
14337
14377
|
{
|
|
14338
14378
|
...result,
|
|
14339
14379
|
render: { sections: [{ title: "run stop", lines }] }
|
|
14340
14380
|
},
|
|
14341
|
-
{ json:
|
|
14381
|
+
{ json: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args) }
|
|
14342
14382
|
);
|
|
14343
14383
|
return 0;
|
|
14344
14384
|
}
|
|
@@ -14388,18 +14428,18 @@ async function handleRunStopAll(args) {
|
|
|
14388
14428
|
reason = args[++index];
|
|
14389
14429
|
}
|
|
14390
14430
|
}
|
|
14391
|
-
const client = new (0,
|
|
14431
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
14392
14432
|
if (dryRun) {
|
|
14393
14433
|
const result2 = await client.runs.stopAll({ dryRun: true, reason });
|
|
14394
14434
|
const lines2 = buildStopAllDryRunTextLines(result2);
|
|
14395
|
-
|
|
14435
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
14396
14436
|
{
|
|
14397
14437
|
...result2,
|
|
14398
14438
|
render: {
|
|
14399
14439
|
sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
|
|
14400
14440
|
}
|
|
14401
14441
|
},
|
|
14402
|
-
{ json:
|
|
14442
|
+
{ json: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
|
|
14403
14443
|
` }
|
|
14404
14444
|
);
|
|
14405
14445
|
return 0;
|
|
@@ -14412,17 +14452,17 @@ async function handleRunStopAll(args) {
|
|
|
14412
14452
|
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
14413
14453
|
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
14414
14454
|
];
|
|
14415
|
-
|
|
14455
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
14416
14456
|
{
|
|
14417
14457
|
...result,
|
|
14418
14458
|
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
14419
14459
|
},
|
|
14420
|
-
{ json:
|
|
14460
|
+
{ json: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args) }
|
|
14421
14461
|
);
|
|
14422
14462
|
return result.failed > 0 || result.partial ? 1 : 0;
|
|
14423
14463
|
}
|
|
14424
14464
|
async function handleRunExport(args) {
|
|
14425
|
-
const selection =
|
|
14465
|
+
const selection = _chunkH7YFUC3Jjs.parseJsonFields.call(void 0, args, "export");
|
|
14426
14466
|
args = selection.args;
|
|
14427
14467
|
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]";
|
|
14428
14468
|
let runId;
|
|
@@ -14493,17 +14533,17 @@ async function handleRunExport(args) {
|
|
|
14493
14533
|
"INVALID_ARGUMENT"
|
|
14494
14534
|
);
|
|
14495
14535
|
}
|
|
14496
|
-
const client = new (0,
|
|
14536
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
14497
14537
|
let status = await client.getPlayStatus(runId, { full: true });
|
|
14498
14538
|
assertRunExportStatusIdentity(status, runId);
|
|
14499
14539
|
if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
|
|
14500
|
-
const progress =
|
|
14540
|
+
const progress = _chunkM475BQ77js.createCliProgress.call(void 0, !_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args));
|
|
14501
14541
|
try {
|
|
14502
14542
|
await waitForPlayCompletionByWatch({
|
|
14503
14543
|
client,
|
|
14504
14544
|
playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
|
|
14505
14545
|
workflowId: runId,
|
|
14506
|
-
jsonOutput:
|
|
14546
|
+
jsonOutput: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args),
|
|
14507
14547
|
emitLogs: false,
|
|
14508
14548
|
waitTimeoutMs,
|
|
14509
14549
|
startedAt: Date.now(),
|
|
@@ -14529,26 +14569,26 @@ async function handleRunExport(args) {
|
|
|
14529
14569
|
format,
|
|
14530
14570
|
summary
|
|
14531
14571
|
});
|
|
14532
|
-
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14533
|
-
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess',
|
|
14572
|
+
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _532 => _532.rowsInfo, 'access', _533 => _533.source]), () => ( datasetPath)), () => ( null));
|
|
14573
|
+
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _534 => _534.currentTable]) ? {
|
|
14534
14574
|
code: "CURRENT_SHARED_DATASET",
|
|
14535
14575
|
message: "This export is the current shared dataset and may include writes from another run.",
|
|
14536
14576
|
full_run_output_command: `deepline runs get ${status.runId} --full`
|
|
14537
14577
|
} : null;
|
|
14538
14578
|
const navigation = buildRunNavigation(status);
|
|
14539
|
-
const resolved = _optionalChain([exportResult, 'optionalAccess',
|
|
14579
|
+
const resolved = _optionalChain([exportResult, 'optionalAccess', _535 => _535.datasetInfo]);
|
|
14540
14580
|
const identity = navigation.datasets.find(
|
|
14541
|
-
(dataset) => _optionalChain([resolved, 'optionalAccess',
|
|
14581
|
+
(dataset) => _optionalChain([resolved, 'optionalAccess', _536 => _536.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _537 => _537.tableNamespace])
|
|
14542
14582
|
);
|
|
14543
14583
|
const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
|
|
14544
14584
|
const exportCommand = runExportRetryCommand(
|
|
14545
14585
|
status.runId,
|
|
14546
14586
|
outPath,
|
|
14547
|
-
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess',
|
|
14587
|
+
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _538 => _538.datasetPath]))),
|
|
14548
14588
|
{ format, summary }
|
|
14549
14589
|
) + (args.includes("--allow-empty") ? " --allow-empty" : "");
|
|
14550
|
-
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14551
|
-
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess',
|
|
14590
|
+
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _539 => _539.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _540 => _540.path]), () => ( null)) };
|
|
14591
|
+
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _541 => _541.rowsInfo, 'access', _542 => _542.exportedRowOutcomes]);
|
|
14552
14592
|
const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
|
|
14553
14593
|
count: exportedRowOutcomes.failed,
|
|
14554
14594
|
message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
|
|
@@ -14568,17 +14608,17 @@ async function handleRunExport(args) {
|
|
|
14568
14608
|
...fileLocation,
|
|
14569
14609
|
format,
|
|
14570
14610
|
source,
|
|
14571
|
-
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14611
|
+
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _543 => _543.rowsInfo, 'access', _544 => _544.totalRows]), () => ( null)),
|
|
14572
14612
|
...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
|
|
14573
14613
|
...rowFailures ? { rowFailures } : {},
|
|
14574
|
-
columns:
|
|
14614
|
+
columns: _chunkRDOPZK7Ajs.underscoreKeysLast.call(void 0, _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _545 => _545.rowsInfo, 'access', _546 => _546.columns]), () => ( []))),
|
|
14575
14615
|
...currentTableNotice ? { notice: currentTableNotice } : {},
|
|
14576
14616
|
...metadataOutPath ? { metadata_path: metadataOutPath } : {},
|
|
14577
14617
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
|
|
14578
14618
|
};
|
|
14579
14619
|
const lines = withRunNavigationLines(
|
|
14580
14620
|
[
|
|
14581
|
-
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14621
|
+
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _547 => _547.path]), () => ( outPath))}`,
|
|
14582
14622
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
|
|
14583
14623
|
`Partial export: run is ${status.status}; more rows may be saved.`,
|
|
14584
14624
|
`Export after completion: ${exportCommand} --wait`
|
|
@@ -14605,8 +14645,8 @@ async function handleRunExport(args) {
|
|
|
14605
14645
|
"utf-8"
|
|
14606
14646
|
);
|
|
14607
14647
|
}
|
|
14608
|
-
|
|
14609
|
-
json:
|
|
14648
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0, payload, {
|
|
14649
|
+
json: _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args),
|
|
14610
14650
|
fields: selection.fields,
|
|
14611
14651
|
text: `${lines.join("\n")}
|
|
14612
14652
|
`
|
|
@@ -14640,10 +14680,10 @@ async function handlePlayGet(args) {
|
|
|
14640
14680
|
);
|
|
14641
14681
|
return 2;
|
|
14642
14682
|
}
|
|
14643
|
-
const client = new (0,
|
|
14683
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
14644
14684
|
const explicitJson = args.includes("--json");
|
|
14645
14685
|
const sourceOutput = args.includes("--source");
|
|
14646
|
-
const jsonOutput = sourceOutput ? explicitJson :
|
|
14686
|
+
const jsonOutput = sourceOutput ? explicitJson : _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args);
|
|
14647
14687
|
const requestedRevisionFlags = [
|
|
14648
14688
|
args.includes("--working"),
|
|
14649
14689
|
args.includes("--live"),
|
|
@@ -14693,7 +14733,7 @@ async function handlePlayGet(args) {
|
|
|
14693
14733
|
...includeSource ? { source: sourceSelector } : {}
|
|
14694
14734
|
});
|
|
14695
14735
|
const source = detail.source;
|
|
14696
|
-
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
14736
|
+
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _548 => _548.files, 'access', _549 => _549[source.entryFile]]), () => ( ""));
|
|
14697
14737
|
let materializedFile = null;
|
|
14698
14738
|
try {
|
|
14699
14739
|
materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
|
|
@@ -14703,7 +14743,7 @@ async function handlePlayGet(args) {
|
|
|
14703
14743
|
}
|
|
14704
14744
|
const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
|
|
14705
14745
|
if (jsonOutput) {
|
|
14706
|
-
|
|
14746
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, {
|
|
14707
14747
|
...detail,
|
|
14708
14748
|
...materializedFile ? {
|
|
14709
14749
|
message: loadedMessage,
|
|
@@ -14744,16 +14784,16 @@ async function handlePlayGet(args) {
|
|
|
14744
14784
|
}
|
|
14745
14785
|
console.log(`Play: ${formatPlayReference(detail.play)}`);
|
|
14746
14786
|
console.log(
|
|
14747
|
-
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14787
|
+
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _550 => _550.play, 'access', _551 => _551.workingRevision, 'optionalAccess', _552 => _552.version]), () => ( "\u2014"))}`
|
|
14748
14788
|
);
|
|
14749
|
-
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14789
|
+
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _553 => _553.play, 'access', _554 => _554.liveRevision, 'optionalAccess', _555 => _555.version]), () => ( "\u2014"))}`);
|
|
14750
14790
|
if (detail.play.liveRevision) {
|
|
14751
14791
|
console.log(
|
|
14752
14792
|
`Live max credits per run: ${liveMaxCreditsPerRun(detail.play.liveRevision.sourceCode)}`
|
|
14753
14793
|
);
|
|
14754
14794
|
}
|
|
14755
14795
|
console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
|
|
14756
|
-
if (detail.play.isDraftDirty && _optionalChain([detail, 'access',
|
|
14796
|
+
if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _556 => _556.play, 'access', _557 => _557.liveRevision, 'optionalAccess', _558 => _558.version])) {
|
|
14757
14797
|
console.log(
|
|
14758
14798
|
` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
|
|
14759
14799
|
);
|
|
@@ -14765,7 +14805,7 @@ async function handlePlayGet(args) {
|
|
|
14765
14805
|
console.log(line);
|
|
14766
14806
|
}
|
|
14767
14807
|
console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
|
|
14768
|
-
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14808
|
+
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _559 => _559.sheetSummary, 'optionalAccess', _560 => _560.stats, 'optionalAccess', _561 => _561.total]), () => ( 0))}`);
|
|
14769
14809
|
if (detail.customerDbUrl) {
|
|
14770
14810
|
console.log(`Customer DB: ${detail.customerDbUrl}`);
|
|
14771
14811
|
}
|
|
@@ -14781,7 +14821,7 @@ async function handlePlayGet(args) {
|
|
|
14781
14821
|
return 0;
|
|
14782
14822
|
}
|
|
14783
14823
|
function formatVersionLine(version) {
|
|
14784
|
-
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access',
|
|
14824
|
+
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _562 => _562.artifactHash, 'optionalAccess', _563 => _563.slice, 'call', _564 => _564(0, 12)]), () => ( "unknown-revision"));
|
|
14785
14825
|
const state = [
|
|
14786
14826
|
version.isLive ? "live" : null,
|
|
14787
14827
|
version.isWorking ? "working" : null
|
|
@@ -14795,8 +14835,8 @@ async function handlePlayVersions(args) {
|
|
|
14795
14835
|
console.error("Usage: deepline plays versions --name <name> [--json]");
|
|
14796
14836
|
return 1;
|
|
14797
14837
|
}
|
|
14798
|
-
const client = new (0,
|
|
14799
|
-
const jsonOutput =
|
|
14838
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
14839
|
+
const jsonOutput = _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args);
|
|
14800
14840
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
14801
14841
|
command: "versions"
|
|
14802
14842
|
});
|
|
@@ -14804,7 +14844,7 @@ async function handlePlayVersions(args) {
|
|
|
14804
14844
|
parseReferencedPlayTarget(playName).playName
|
|
14805
14845
|
);
|
|
14806
14846
|
if (jsonOutput) {
|
|
14807
|
-
|
|
14847
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, { versions });
|
|
14808
14848
|
return 0;
|
|
14809
14849
|
}
|
|
14810
14850
|
if (versions.length === 0) {
|
|
@@ -14817,7 +14857,7 @@ async function handlePlayVersions(args) {
|
|
|
14817
14857
|
return 0;
|
|
14818
14858
|
}
|
|
14819
14859
|
function formatPlayCostEstimate(estimate) {
|
|
14820
|
-
const computeSummary = _optionalChain([estimate, 'optionalAccess',
|
|
14860
|
+
const computeSummary = _optionalChain([estimate, 'optionalAccess', _565 => _565.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)` : "";
|
|
14821
14861
|
if (!estimate || estimate.status === "unavailable") {
|
|
14822
14862
|
return `unavailable${estimate ? `: ${estimate.message}${computeSummary}` : ""}`;
|
|
14823
14863
|
}
|
|
@@ -14841,12 +14881,26 @@ var PREBUILT_PLAY_TAG_KEYS = [
|
|
|
14841
14881
|
"contact-info",
|
|
14842
14882
|
"signals"
|
|
14843
14883
|
];
|
|
14884
|
+
async function handlePlayCost(args) {
|
|
14885
|
+
const name = args[0];
|
|
14886
|
+
if (!name) {
|
|
14887
|
+
console.error("Usage: deepline plays cost <play> [--json]");
|
|
14888
|
+
return 2;
|
|
14889
|
+
}
|
|
14890
|
+
const result = await new (0, _chunkSKVMC6K6js.DeeplineClient)().getPlayCostEstimate(name);
|
|
14891
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) console.log(JSON.stringify(result, null, 2));
|
|
14892
|
+
else
|
|
14893
|
+
console.log(
|
|
14894
|
+
`${result.reference}: ${formatPlayCostEstimate(result.costEstimate)}`
|
|
14895
|
+
);
|
|
14896
|
+
return 0;
|
|
14897
|
+
}
|
|
14844
14898
|
async function handlePlayList(args) {
|
|
14845
|
-
const jsonOutput =
|
|
14899
|
+
const jsonOutput = _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args);
|
|
14846
14900
|
const showCost = args.includes("--show-cost");
|
|
14847
|
-
const client = new (0,
|
|
14901
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
14848
14902
|
const categoriesIndex = args.indexOf("--categories");
|
|
14849
|
-
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access',
|
|
14903
|
+
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _566 => _566[categoriesIndex + 1], 'optionalAccess', _567 => _567.trim, 'call', _568 => _568()]) : void 0;
|
|
14850
14904
|
const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
|
|
14851
14905
|
if (args.includes("--tag") && tags.length === 0) {
|
|
14852
14906
|
console.error(
|
|
@@ -14867,15 +14921,16 @@ async function handlePlayList(args) {
|
|
|
14867
14921
|
const cursorIndex = args.indexOf("--cursor");
|
|
14868
14922
|
const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
|
|
14869
14923
|
const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
14870
|
-
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess',
|
|
14924
|
+
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _569 => _569.trim, 'call', _570 => _570()])) {
|
|
14871
14925
|
console.error("Pass a positive --limit and a non-empty --cursor.");
|
|
14872
14926
|
return 2;
|
|
14873
14927
|
}
|
|
14874
14928
|
const page = await client.listPlaysPage({
|
|
14875
14929
|
categories,
|
|
14876
14930
|
...tags.length > 0 ? { tags } : {},
|
|
14877
|
-
includeToolCategories:
|
|
14931
|
+
includeToolCategories: !args.includes("--summary"),
|
|
14878
14932
|
...showCost ? { includeCostEstimates: true } : {},
|
|
14933
|
+
...args.includes("--summary") ? { summaryOnly: true } : {},
|
|
14879
14934
|
limit,
|
|
14880
14935
|
cursor
|
|
14881
14936
|
});
|
|
@@ -14907,7 +14962,7 @@ async function handlePlayList(args) {
|
|
|
14907
14962
|
if (play.inputSchema || play.hasInputSchema) {
|
|
14908
14963
|
lines.push(" inputSchema: yes");
|
|
14909
14964
|
}
|
|
14910
|
-
if (_optionalChain([play, 'access',
|
|
14965
|
+
if (_optionalChain([play, 'access', _571 => _571.triggerStatus, 'optionalAccess', _572 => _572.cron])) {
|
|
14911
14966
|
lines.push(
|
|
14912
14967
|
` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
|
|
14913
14968
|
);
|
|
@@ -14927,12 +14982,12 @@ async function handlePlayList(args) {
|
|
|
14927
14982
|
} else {
|
|
14928
14983
|
lines.push(" scheduled execution: not configured");
|
|
14929
14984
|
}
|
|
14930
|
-
if (_optionalChain([play, 'access',
|
|
14985
|
+
if (_optionalChain([play, 'access', _573 => _573.triggerStatus, 'optionalAccess', _574 => _574.webhook])) {
|
|
14931
14986
|
lines.push(` webhook: ${play.triggerStatus.webhook}`);
|
|
14932
14987
|
}
|
|
14933
14988
|
if (showCost) {
|
|
14934
14989
|
lines.push(
|
|
14935
|
-
` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access',
|
|
14990
|
+
` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access', _575 => _575.observedCost, 'optionalAccess', _576 => _576.displayText]), () => ( formatPlayCostEstimate(play.costEstimate)))}`
|
|
14936
14991
|
);
|
|
14937
14992
|
}
|
|
14938
14993
|
lines.push(` run: deepline run ${reference}`);
|
|
@@ -14941,7 +14996,7 @@ async function handlePlayList(args) {
|
|
|
14941
14996
|
lines.push("List truncated \u2014 more plays are available.");
|
|
14942
14997
|
lines.push(`Next page: ${nextPage}`);
|
|
14943
14998
|
}
|
|
14944
|
-
|
|
14999
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
14945
15000
|
{
|
|
14946
15001
|
plays,
|
|
14947
15002
|
count: plays.length,
|
|
@@ -14958,8 +15013,8 @@ async function handlePlayList(args) {
|
|
|
14958
15013
|
return 0;
|
|
14959
15014
|
}
|
|
14960
15015
|
async function handlePlayPin(args, pinned) {
|
|
14961
|
-
const target = _optionalChain([args, 'access',
|
|
14962
|
-
const jsonOutput =
|
|
15016
|
+
const target = _optionalChain([args, 'access', _577 => _577.find, 'call', _578 => _578((arg) => !arg.startsWith("-")), 'optionalAccess', _579 => _579.trim, 'call', _580 => _580()]);
|
|
15017
|
+
const jsonOutput = _chunkH7YFUC3Jjs.argsWantJson.call(void 0, args);
|
|
14963
15018
|
const dryRun = args.includes("--dry-run");
|
|
14964
15019
|
if (!target) {
|
|
14965
15020
|
console.error(
|
|
@@ -14977,11 +15032,11 @@ async function handlePlayPin(args, pinned) {
|
|
|
14977
15032
|
const name = parsedTarget.playName;
|
|
14978
15033
|
const plan = { name, pinned, dryRun };
|
|
14979
15034
|
if (dryRun) {
|
|
14980
|
-
|
|
15035
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, plan);
|
|
14981
15036
|
return 0;
|
|
14982
15037
|
}
|
|
14983
|
-
const result = await new (0,
|
|
14984
|
-
if (jsonOutput)
|
|
15038
|
+
const result = await new (0, _chunkSKVMC6K6js.DeeplineClient)().setPlayPinned(name, pinned);
|
|
15039
|
+
if (jsonOutput) _chunkH7YFUC3Jjs.printCompactJson.call(void 0, result);
|
|
14985
15040
|
else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
|
|
14986
15041
|
return 0;
|
|
14987
15042
|
}
|
|
@@ -15029,7 +15084,7 @@ function printPlayDescription(play) {
|
|
|
15029
15084
|
console.log(` ${line}`);
|
|
15030
15085
|
}
|
|
15031
15086
|
}
|
|
15032
|
-
if (_optionalChain([play, 'access',
|
|
15087
|
+
if (_optionalChain([play, 'access', _581 => _581.toolCategories, 'optionalAccess', _582 => _582.length])) {
|
|
15033
15088
|
console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
|
|
15034
15089
|
}
|
|
15035
15090
|
if (play.aliases.length > 0) {
|
|
@@ -15074,7 +15129,7 @@ function printPlayDescription(play) {
|
|
|
15074
15129
|
const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
|
|
15075
15130
|
if (runtimeLimit) {
|
|
15076
15131
|
console.log(
|
|
15077
|
-
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access',
|
|
15132
|
+
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _583 => _583.runtimeLimit, 'optionalAccess', _584 => _584.source]), () => ( "live"))})`
|
|
15078
15133
|
);
|
|
15079
15134
|
}
|
|
15080
15135
|
printScheduledPlayCapacity(play.activeScheduledPlays);
|
|
@@ -15102,17 +15157,17 @@ function formatPlayGrepMatches(matches) {
|
|
|
15102
15157
|
return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
|
|
15103
15158
|
}
|
|
15104
15159
|
async function handlePlayGrep(args) {
|
|
15105
|
-
const query = _optionalChain([args, 'access',
|
|
15160
|
+
const query = _optionalChain([args, 'access', _585 => _585[0], 'optionalAccess', _586 => _586.trim, 'call', _587 => _587()]);
|
|
15106
15161
|
if (!query) {
|
|
15107
15162
|
console.error("Usage: deepline plays grep <query> [--json]");
|
|
15108
15163
|
return 1;
|
|
15109
15164
|
}
|
|
15110
|
-
const client = new (0,
|
|
15165
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
15111
15166
|
const results = (await client.listPlays({ grep: query })).map(
|
|
15112
15167
|
summarizePlayGrepResult
|
|
15113
15168
|
);
|
|
15114
|
-
if (
|
|
15115
|
-
|
|
15169
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
15170
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, {
|
|
15116
15171
|
plays: results,
|
|
15117
15172
|
count: results.length,
|
|
15118
15173
|
query,
|
|
@@ -15126,7 +15181,7 @@ async function handlePlayGrep(args) {
|
|
|
15126
15181
|
`
|
|
15127
15182
|
);
|
|
15128
15183
|
for (const result of results) {
|
|
15129
|
-
console.log(_optionalChain([result, 'access',
|
|
15184
|
+
console.log(_optionalChain([result, 'access', _588 => _588.displayName, 'optionalAccess', _589 => _589.trim, 'call', _590 => _590()]) || result.name);
|
|
15130
15185
|
const matches = formatPlayGrepMatches(result.matches);
|
|
15131
15186
|
if (matches) console.log(` Matched: ${matches}`);
|
|
15132
15187
|
console.log(` Describe: ${result.describe}`);
|
|
@@ -15135,7 +15190,7 @@ async function handlePlayGrep(args) {
|
|
|
15135
15190
|
return 0;
|
|
15136
15191
|
}
|
|
15137
15192
|
async function handlePlayDescribe(args) {
|
|
15138
|
-
const selection =
|
|
15193
|
+
const selection = _chunkH7YFUC3Jjs.parseJsonFields.call(void 0, args, "describe");
|
|
15139
15194
|
args = selection.args;
|
|
15140
15195
|
const playName = args[0];
|
|
15141
15196
|
if (!playName) {
|
|
@@ -15169,8 +15224,8 @@ async function handlePlayDescribe(args) {
|
|
|
15169
15224
|
`deepline plays check ${playName}`,
|
|
15170
15225
|
...definedName ? [`deepline describe <workspace>/${definedName}`] : []
|
|
15171
15226
|
];
|
|
15172
|
-
if (
|
|
15173
|
-
|
|
15227
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
15228
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, {
|
|
15174
15229
|
ok: false,
|
|
15175
15230
|
error: { message },
|
|
15176
15231
|
next
|
|
@@ -15184,7 +15239,7 @@ async function handlePlayDescribe(args) {
|
|
|
15184
15239
|
}
|
|
15185
15240
|
return 2;
|
|
15186
15241
|
}
|
|
15187
|
-
const client = new (0,
|
|
15242
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
15188
15243
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
15189
15244
|
command: "describe"
|
|
15190
15245
|
});
|
|
@@ -15194,9 +15249,9 @@ async function handlePlayDescribe(args) {
|
|
|
15194
15249
|
compact: args.includes("--compact")
|
|
15195
15250
|
}
|
|
15196
15251
|
);
|
|
15197
|
-
if (
|
|
15198
|
-
if (selection.fields)
|
|
15199
|
-
else
|
|
15252
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
15253
|
+
if (selection.fields) _chunkH7YFUC3Jjs.printJson.call(void 0, play, selection.fields);
|
|
15254
|
+
else _chunkH7YFUC3Jjs.printCompactJson.call(void 0, play);
|
|
15200
15255
|
return 0;
|
|
15201
15256
|
}
|
|
15202
15257
|
printPlayDescription(play);
|
|
@@ -15218,7 +15273,7 @@ async function handlePlaySave(args) {
|
|
|
15218
15273
|
}
|
|
15219
15274
|
let graph;
|
|
15220
15275
|
try {
|
|
15221
|
-
graph = await
|
|
15276
|
+
graph = await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
15222
15277
|
"cli.play_save_bundle_graph",
|
|
15223
15278
|
{ targetKind: "file" },
|
|
15224
15279
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, options.target))
|
|
@@ -15240,7 +15295,7 @@ async function handlePlaySave(args) {
|
|
|
15240
15295
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
|
|
15241
15296
|
};
|
|
15242
15297
|
if (options.jsonOutput) {
|
|
15243
|
-
|
|
15298
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, result);
|
|
15244
15299
|
} else {
|
|
15245
15300
|
console.error(result.message);
|
|
15246
15301
|
console.error(` checked artifact: ${result.expectedArtifactHash}`);
|
|
@@ -15262,7 +15317,7 @@ async function handlePlaySave(args) {
|
|
|
15262
15317
|
};
|
|
15263
15318
|
if (options.dryRun) {
|
|
15264
15319
|
if (options.jsonOutput) {
|
|
15265
|
-
|
|
15320
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, dryRun);
|
|
15266
15321
|
} else {
|
|
15267
15322
|
console.log(`Dry run: ${playName}`);
|
|
15268
15323
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15271,14 +15326,14 @@ async function handlePlaySave(args) {
|
|
|
15271
15326
|
}
|
|
15272
15327
|
return 0;
|
|
15273
15328
|
}
|
|
15274
|
-
const client = new (0,
|
|
15329
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
15275
15330
|
try {
|
|
15276
|
-
await
|
|
15331
|
+
await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
15277
15332
|
"cli.play_save_compile_manifests",
|
|
15278
15333
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15279
15334
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
15280
15335
|
);
|
|
15281
|
-
const saved = await
|
|
15336
|
+
const saved = await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
15282
15337
|
"cli.play_save_register_draft",
|
|
15283
15338
|
{ targetKind: "file", playName, artifactHash },
|
|
15284
15339
|
() => client.registerPlayArtifact({
|
|
@@ -15307,7 +15362,7 @@ async function handlePlaySave(args) {
|
|
|
15307
15362
|
}
|
|
15308
15363
|
};
|
|
15309
15364
|
if (options.jsonOutput) {
|
|
15310
|
-
|
|
15365
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, result);
|
|
15311
15366
|
} else {
|
|
15312
15367
|
console.log(
|
|
15313
15368
|
`\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
|
|
@@ -15333,7 +15388,7 @@ async function handlePlayPublish(args) {
|
|
|
15333
15388
|
}
|
|
15334
15389
|
const { target: playName, useLatest } = options;
|
|
15335
15390
|
let revisionId = options.revisionId;
|
|
15336
|
-
const client = new (0,
|
|
15391
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
15337
15392
|
if (isFileTarget(playName)) {
|
|
15338
15393
|
if (revisionId || useLatest) {
|
|
15339
15394
|
console.error(
|
|
@@ -15343,7 +15398,7 @@ async function handlePlayPublish(args) {
|
|
|
15343
15398
|
}
|
|
15344
15399
|
let graph;
|
|
15345
15400
|
try {
|
|
15346
|
-
graph = await
|
|
15401
|
+
graph = await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
15347
15402
|
"cli.play_publish_bundle_graph",
|
|
15348
15403
|
{ targetKind: "file" },
|
|
15349
15404
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, playName))
|
|
@@ -15365,7 +15420,7 @@ async function handlePlayPublish(args) {
|
|
|
15365
15420
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
|
|
15366
15421
|
};
|
|
15367
15422
|
if (options.jsonOutput) {
|
|
15368
|
-
|
|
15423
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, result3);
|
|
15369
15424
|
} else {
|
|
15370
15425
|
console.error(result3.message);
|
|
15371
15426
|
console.error(` checked artifact: ${result3.expectedArtifactHash}`);
|
|
@@ -15388,7 +15443,7 @@ async function handlePlayPublish(args) {
|
|
|
15388
15443
|
};
|
|
15389
15444
|
if (options.dryRun) {
|
|
15390
15445
|
if (options.jsonOutput) {
|
|
15391
|
-
|
|
15446
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, dryRun);
|
|
15392
15447
|
} else {
|
|
15393
15448
|
console.log(`Dry run: ${rootPlayName}`);
|
|
15394
15449
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15407,12 +15462,12 @@ async function handlePlayPublish(args) {
|
|
|
15407
15462
|
}
|
|
15408
15463
|
}
|
|
15409
15464
|
try {
|
|
15410
|
-
await
|
|
15465
|
+
await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
15411
15466
|
"cli.play_publish_compile_manifests",
|
|
15412
15467
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15413
15468
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
15414
15469
|
);
|
|
15415
|
-
await
|
|
15470
|
+
await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
15416
15471
|
"cli.play_publish_imports",
|
|
15417
15472
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15418
15473
|
() => publishImportedPlayDependencies(client, graph)
|
|
@@ -15421,7 +15476,7 @@ async function handlePlayPublish(args) {
|
|
|
15421
15476
|
console.error(error instanceof Error ? error.message : String(error));
|
|
15422
15477
|
return 1;
|
|
15423
15478
|
}
|
|
15424
|
-
const published = await
|
|
15479
|
+
const published = await _chunk2G4R4APLjs.traceCliSpan.call(void 0,
|
|
15425
15480
|
"cli.play_publish_register_root",
|
|
15426
15481
|
{
|
|
15427
15482
|
targetKind: "file",
|
|
@@ -15446,17 +15501,17 @@ async function handlePlayPublish(args) {
|
|
|
15446
15501
|
artifactHash,
|
|
15447
15502
|
liveVersion: _nullishCoalesce(published.version, () => ( null)),
|
|
15448
15503
|
revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
|
|
15449
|
-
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15450
|
-
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15504
|
+
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _591 => _591.version]), () => ( null)),
|
|
15505
|
+
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _592 => _592.artifactHash]), () => ( null)),
|
|
15451
15506
|
sourceBytes: {
|
|
15452
|
-
before: _optionalChain([previousLive, 'optionalAccess',
|
|
15507
|
+
before: _optionalChain([previousLive, 'optionalAccess', _593 => _593.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
|
|
15453
15508
|
after: Buffer.byteLength(graph.root.sourceCode, "utf8")
|
|
15454
15509
|
},
|
|
15455
15510
|
triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
|
|
15456
15511
|
triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
|
|
15457
15512
|
};
|
|
15458
15513
|
if (options.jsonOutput) {
|
|
15459
|
-
|
|
15514
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, result2);
|
|
15460
15515
|
} else {
|
|
15461
15516
|
printPublishReceipt({
|
|
15462
15517
|
name: rootPlayName,
|
|
@@ -15487,14 +15542,14 @@ async function handlePlayPublish(args) {
|
|
|
15487
15542
|
revisionId: _nullishCoalesce(revisionId, () => ( null)),
|
|
15488
15543
|
latest: useLatest
|
|
15489
15544
|
};
|
|
15490
|
-
|
|
15545
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, result2);
|
|
15491
15546
|
return 0;
|
|
15492
15547
|
}
|
|
15493
15548
|
const resolvedName = parseReferencedPlayTarget(playName).playName;
|
|
15494
15549
|
if (useLatest) {
|
|
15495
15550
|
const versions = await client.listPlayVersions(resolvedName);
|
|
15496
15551
|
const latest = versions[0];
|
|
15497
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
15552
|
+
if (!_optionalChain([latest, 'optionalAccess', _594 => _594._id])) {
|
|
15498
15553
|
console.error(`No saved revisions found for ${resolvedName}.`);
|
|
15499
15554
|
return 1;
|
|
15500
15555
|
}
|
|
@@ -15511,7 +15566,7 @@ async function handlePlayPublish(args) {
|
|
|
15511
15566
|
revisionId ? { revisionId } : {}
|
|
15512
15567
|
);
|
|
15513
15568
|
if (options.jsonOutput) {
|
|
15514
|
-
|
|
15569
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, result);
|
|
15515
15570
|
} else {
|
|
15516
15571
|
printPublishReceipt({
|
|
15517
15572
|
name: result.name,
|
|
@@ -15551,7 +15606,7 @@ async function handlePlayDelete(args) {
|
|
|
15551
15606
|
);
|
|
15552
15607
|
return 2;
|
|
15553
15608
|
}
|
|
15554
|
-
const client = new (0,
|
|
15609
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
15555
15610
|
let detail;
|
|
15556
15611
|
try {
|
|
15557
15612
|
detail = await client.getPlay(parseReferencedPlayTarget(playName).playName);
|
|
@@ -15575,8 +15630,8 @@ async function handlePlayDelete(args) {
|
|
|
15575
15630
|
name: resolvedName,
|
|
15576
15631
|
plannedMutation: "move saved org-owned play to Trash and stop triggers"
|
|
15577
15632
|
};
|
|
15578
|
-
if (
|
|
15579
|
-
|
|
15633
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
15634
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, result2);
|
|
15580
15635
|
} else {
|
|
15581
15636
|
process.stdout.write(
|
|
15582
15637
|
`Dry run: would move ${result2.name} to Trash and stop its active triggers.
|
|
@@ -15586,8 +15641,8 @@ async function handlePlayDelete(args) {
|
|
|
15586
15641
|
return 0;
|
|
15587
15642
|
}
|
|
15588
15643
|
const result = await client.deletePlay(resolvedName);
|
|
15589
|
-
if (
|
|
15590
|
-
|
|
15644
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
15645
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, result);
|
|
15591
15646
|
return result.archived || result.alreadyArchived ? 0 : 4;
|
|
15592
15647
|
}
|
|
15593
15648
|
if (result.alreadyArchived) {
|
|
@@ -15626,13 +15681,13 @@ async function handlePlayRestore(args) {
|
|
|
15626
15681
|
);
|
|
15627
15682
|
return 2;
|
|
15628
15683
|
}
|
|
15629
|
-
const client = new (0,
|
|
15684
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
15630
15685
|
try {
|
|
15631
15686
|
const result = await client.restorePlay(
|
|
15632
15687
|
parseReferencedPlayTarget(playName).playName
|
|
15633
15688
|
);
|
|
15634
|
-
if (
|
|
15635
|
-
|
|
15689
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
15690
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, result);
|
|
15636
15691
|
return result.restored || result.alreadyActive ? 0 : 4;
|
|
15637
15692
|
}
|
|
15638
15693
|
if (result.alreadyActive) {
|
|
@@ -15759,21 +15814,21 @@ Common commands:
|
|
|
15759
15814
|
resume: `deepline plays resume-submission ${_chunkAID3OYVJjs.shellQuote.call(void 0, path)} --json`
|
|
15760
15815
|
}
|
|
15761
15816
|
};
|
|
15762
|
-
|
|
15817
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0, result2, {
|
|
15763
15818
|
json: options.json,
|
|
15764
15819
|
text: `Submission ${saved.workflowId}: admission is unknown. ${result2.next.inspect}
|
|
15765
15820
|
`
|
|
15766
15821
|
});
|
|
15767
15822
|
return;
|
|
15768
15823
|
}
|
|
15769
|
-
const client = new (0,
|
|
15824
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
15770
15825
|
if (new URL(saved.baseUrl).origin !== new URL(client.baseUrl).origin) {
|
|
15771
15826
|
throw new Error(
|
|
15772
15827
|
"The submission belongs to a different API origin. Select its original host before recovery."
|
|
15773
15828
|
);
|
|
15774
15829
|
}
|
|
15775
15830
|
const result = await client.startPlayRun(saved.request);
|
|
15776
|
-
|
|
15831
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
15777
15832
|
{ ...result },
|
|
15778
15833
|
{
|
|
15779
15834
|
json: options.json,
|
|
@@ -15809,7 +15864,7 @@ Examples:
|
|
|
15809
15864
|
).action(async (target, options) => {
|
|
15810
15865
|
process.exitCode = await handlePlayCheck([
|
|
15811
15866
|
target,
|
|
15812
|
-
...
|
|
15867
|
+
..._chunkH7YFUC3Jjs.jsonFieldArgs.call(void 0, options.json),
|
|
15813
15868
|
...options.full ? ["--full"] : []
|
|
15814
15869
|
]);
|
|
15815
15870
|
});
|
|
@@ -15848,10 +15903,10 @@ Notes:
|
|
|
15848
15903
|
--force-tool-refresh re-executes completed tool receipts and may repeat billed
|
|
15849
15904
|
provider calls. It is independent from --force.
|
|
15850
15905
|
--max-concurrent-external-calls controls the per-run provider-tool/deepline.fetch
|
|
15851
|
-
resident-work ceiling. Default: ${
|
|
15906
|
+
resident-work ceiling. Default: ${_chunkRMQB72WWjs.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS}; accepted range: 1-${_chunkRMQB72WWjs.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS}.
|
|
15852
15907
|
Provider pacing and sandbox memory limits still apply.
|
|
15853
15908
|
--max-concurrent-rows sets the run-wide default and ceiling for live map row
|
|
15854
|
-
resolvers. Accepted range: 1-${
|
|
15909
|
+
resolvers. Accepted range: 1-${_chunkRMQB72WWjs.MAX_CONFIGURABLE_CONCURRENT_ROWS}. The runtime
|
|
15855
15910
|
may lower it when source-row size exceeds the active-row memory budget.
|
|
15856
15911
|
--max-credits replaces the play's billing.maxCreditsPerRun for this run.
|
|
15857
15912
|
Tool calls that would exceed it are denied.
|
|
@@ -15965,10 +16020,10 @@ Examples:
|
|
|
15965
16020
|
"Refresh completed tool receipts; may repeat billed provider calls"
|
|
15966
16021
|
).option(
|
|
15967
16022
|
"--max-concurrent-external-calls <count>",
|
|
15968
|
-
`Concurrent provider-tool and deepline.fetch executions (${
|
|
16023
|
+
`Concurrent provider-tool and deepline.fetch executions (${_chunkRMQB72WWjs.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS} default, max ${_chunkRMQB72WWjs.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS})`
|
|
15969
16024
|
).option(
|
|
15970
16025
|
"--max-concurrent-rows <count>",
|
|
15971
|
-
`Run-wide dataset map row resolver ceiling (max ${
|
|
16026
|
+
`Run-wide dataset map row resolver ceiling (max ${_chunkRMQB72WWjs.MAX_CONFIGURABLE_CONCURRENT_ROWS})`
|
|
15972
16027
|
).option("--max-credits <credits>", "Deepline-credit cap for this run").option("--open", "Open the play page in a browser after the run starts").option(
|
|
15973
16028
|
"--debug-map-latency",
|
|
15974
16029
|
"Internal diagnostics: emit one aggregate latency profile per dataset map"
|
|
@@ -16013,14 +16068,14 @@ JSON field selection:
|
|
|
16013
16068
|
passthroughArgs.shift();
|
|
16014
16069
|
}
|
|
16015
16070
|
const exitCode = await handlePlayRun(
|
|
16016
|
-
|
|
16071
|
+
_chunkRMQB72WWjs.resolvePlayRunCliOptions.call(void 0,
|
|
16017
16072
|
_nullishCoalesce(effectiveTarget, () => ( void 0)),
|
|
16018
16073
|
options,
|
|
16019
16074
|
passthroughArgs,
|
|
16020
|
-
|
|
16075
|
+
_chunk2G4R4APLjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
16021
16076
|
)
|
|
16022
16077
|
);
|
|
16023
|
-
|
|
16078
|
+
_chunk2G4R4APLjs.recordCliTrace.call(void 0, {
|
|
16024
16079
|
phase: "cli.play_command_exit",
|
|
16025
16080
|
exitCode
|
|
16026
16081
|
});
|
|
@@ -16069,9 +16124,9 @@ Examples:
|
|
|
16069
16124
|
const limit = Number(options.historyLimit);
|
|
16070
16125
|
if (!Number.isInteger(limit) || limit < 1 || limit > 30)
|
|
16071
16126
|
throw new Error("--history-limit must be an integer from 1 to 30.");
|
|
16072
|
-
const client = new (0,
|
|
16127
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
16073
16128
|
if (options.binding) {
|
|
16074
|
-
|
|
16129
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0,
|
|
16075
16130
|
await client.getPlayTriggerHistory(options.binding, { limit })
|
|
16076
16131
|
);
|
|
16077
16132
|
return;
|
|
@@ -16079,11 +16134,19 @@ Examples:
|
|
|
16079
16134
|
const result = await client.listPlayTriggerInventory({
|
|
16080
16135
|
cursor: options.cursor
|
|
16081
16136
|
});
|
|
16082
|
-
|
|
16137
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, {
|
|
16083
16138
|
...result,
|
|
16084
16139
|
next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)}`
|
|
16085
16140
|
});
|
|
16086
16141
|
});
|
|
16142
|
+
play.command("cost <play>").description(
|
|
16143
|
+
"Estimate one saved or prebuilt Play in the current workspace."
|
|
16144
|
+
).option("--json", "Emit the cost estimate as JSON").action(async (name, options) => {
|
|
16145
|
+
process.exitCode = await handlePlayCost([
|
|
16146
|
+
name,
|
|
16147
|
+
...options.json ? ["--json"] : []
|
|
16148
|
+
]);
|
|
16149
|
+
});
|
|
16087
16150
|
play.command("list").description("List saved and prebuilt plays.").addHelpText(
|
|
16088
16151
|
"after",
|
|
16089
16152
|
`
|
|
@@ -16102,7 +16165,10 @@ Examples:
|
|
|
16102
16165
|
deepline plays list --tag smb
|
|
16103
16166
|
deepline search "name and company domain -> work email" --type prebuilts
|
|
16104
16167
|
`
|
|
16105
|
-
).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(
|
|
16168
|
+
).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(
|
|
16169
|
+
"--summary",
|
|
16170
|
+
"Load metadata without authored source or revision payloads"
|
|
16171
|
+
).option("--json", "Emit JSON output").option(
|
|
16106
16172
|
"--categories <categories>",
|
|
16107
16173
|
"Filter by comma-separated canonical tool categories"
|
|
16108
16174
|
).option(
|
|
@@ -16113,6 +16179,7 @@ Examples:
|
|
|
16113
16179
|
...options.limit ? ["--limit", options.limit] : [],
|
|
16114
16180
|
...options.cursor ? ["--cursor", options.cursor] : [],
|
|
16115
16181
|
...options.showCost ? ["--show-cost"] : [],
|
|
16182
|
+
...options.summary ? ["--summary"] : [],
|
|
16116
16183
|
...options.categories ? ["--categories", options.categories] : [],
|
|
16117
16184
|
...(_nullishCoalesce(options.tag, () => ( []))).flatMap((tag) => ["--tag", tag]),
|
|
16118
16185
|
...options.json ? ["--json"] : []
|
|
@@ -16126,7 +16193,7 @@ Examples:
|
|
|
16126
16193
|
if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
|
|
16127
16194
|
throw new Error("--group-by must be kind or trigger_source.");
|
|
16128
16195
|
}
|
|
16129
|
-
const result = await new (0,
|
|
16196
|
+
const result = await new (0, _chunkSKVMC6K6js.DeeplineClient)().getPlaysActivity({
|
|
16130
16197
|
timeZone: options.timeZone,
|
|
16131
16198
|
days,
|
|
16132
16199
|
...options.endDate ? { endDate: options.endDate } : {},
|
|
@@ -16140,7 +16207,7 @@ Examples:
|
|
|
16140
16207
|
`${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
|
|
16141
16208
|
);
|
|
16142
16209
|
}
|
|
16143
|
-
|
|
16210
|
+
_chunkH7YFUC3Jjs.printCommandEnvelope.call(void 0,
|
|
16144
16211
|
{ ...result },
|
|
16145
16212
|
{
|
|
16146
16213
|
json: Boolean(options.json),
|
|
@@ -16169,7 +16236,7 @@ Examples:
|
|
|
16169
16236
|
false
|
|
16170
16237
|
);
|
|
16171
16238
|
});
|
|
16172
|
-
|
|
16239
|
+
_chunk2DND7LLLjs.registerDeprecatedSearchCommand.call(void 0,
|
|
16173
16240
|
play,
|
|
16174
16241
|
(options) => options.all ? ["plays"] : ["prebuilts"]
|
|
16175
16242
|
);
|
|
@@ -16210,9 +16277,9 @@ Examples:
|
|
|
16210
16277
|
"--json [fields]",
|
|
16211
16278
|
"JSON output; optionally select comma-separated dotted paths"
|
|
16212
16279
|
);
|
|
16213
|
-
|
|
16280
|
+
_chunkRDOPZK7Ajs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
|
|
16214
16281
|
async (target, options) => {
|
|
16215
|
-
const ownView = () => handlePlayDescribe(
|
|
16282
|
+
const ownView = () => handlePlayDescribe(_chunkH7YFUC3Jjs.describeArgs.call(void 0, target, options));
|
|
16216
16283
|
const [flagText] = [options.json].filter(
|
|
16217
16284
|
(value) => typeof value === "string"
|
|
16218
16285
|
);
|
|
@@ -16223,7 +16290,7 @@ Examples:
|
|
|
16223
16290
|
process.exitCode = await ownView();
|
|
16224
16291
|
return;
|
|
16225
16292
|
}
|
|
16226
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
16293
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-37QXXDCF.js")));
|
|
16227
16294
|
process.exitCode = await describeAnything(
|
|
16228
16295
|
name,
|
|
16229
16296
|
{
|
|
@@ -16341,7 +16408,7 @@ Examples:
|
|
|
16341
16408
|
deepline plays deployments <deployment-id>
|
|
16342
16409
|
`
|
|
16343
16410
|
).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output").action(
|
|
16344
|
-
async (id, options) => id ?
|
|
16411
|
+
async (id, options) => id ? _chunkQLVYYDUIjs.handleDeploymentGet.call(void 0, id, options) : _chunkQLVYYDUIjs.handleDeploymentsList.call(void 0, options)
|
|
16345
16412
|
);
|
|
16346
16413
|
addPublishHelp(
|
|
16347
16414
|
play.command("publish <target>").description(
|
|
@@ -16476,14 +16543,14 @@ Examples:
|
|
|
16476
16543
|
const limit = Number(options.limit);
|
|
16477
16544
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 1e3)
|
|
16478
16545
|
throw new Error("--limit must be an integer from 1 to 1000.");
|
|
16479
|
-
const result = await new (0,
|
|
16546
|
+
const result = await new (0, _chunkSKVMC6K6js.DeeplineClient)().runs.rowHistory({
|
|
16480
16547
|
playName: options.play,
|
|
16481
16548
|
runId,
|
|
16482
16549
|
tableNamespace: options.dataset,
|
|
16483
16550
|
limit,
|
|
16484
16551
|
cursor: options.cursor
|
|
16485
16552
|
});
|
|
16486
|
-
|
|
16553
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, {
|
|
16487
16554
|
...result,
|
|
16488
16555
|
...result.nextCursor ? {
|
|
16489
16556
|
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`
|
|
@@ -16557,7 +16624,7 @@ Examples:
|
|
|
16557
16624
|
new (0, _commander.Option)("--log-failed", "Attach terminal-failure logs").hideHelp()
|
|
16558
16625
|
).action(async (runId, options) => {
|
|
16559
16626
|
if (TOOL_EXECUTION_ID.test(runId)) {
|
|
16560
|
-
const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-
|
|
16627
|
+
const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-KS7JMRK6.js")));
|
|
16561
16628
|
process.exitCode = await getToolExecutionReceipt(runId, {
|
|
16562
16629
|
receiptJson: options.json !== void 0
|
|
16563
16630
|
});
|
|
@@ -16565,7 +16632,7 @@ Examples:
|
|
|
16565
16632
|
}
|
|
16566
16633
|
process.exitCode = await handleRunGet([
|
|
16567
16634
|
runId,
|
|
16568
|
-
...
|
|
16635
|
+
..._chunkH7YFUC3Jjs.jsonFieldArgs.call(void 0, options.json),
|
|
16569
16636
|
...options.webUrl ? ["--web-url"] : [],
|
|
16570
16637
|
...options.full ? ["--full"] : [],
|
|
16571
16638
|
...options.input ? ["--input"] : [],
|
|
@@ -16855,7 +16922,7 @@ Examples:
|
|
|
16855
16922
|
...options.allowEmpty ? ["--allow-empty"] : [],
|
|
16856
16923
|
...options.wait ? ["--wait"] : [],
|
|
16857
16924
|
...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
|
|
16858
|
-
...
|
|
16925
|
+
..._chunkH7YFUC3Jjs.jsonFieldArgs.call(void 0, options.json)
|
|
16859
16926
|
]);
|
|
16860
16927
|
});
|
|
16861
16928
|
const share = play.command("share").description(
|
|
@@ -16996,8 +17063,8 @@ function absolutePublicPlayUrl(path) {
|
|
|
16996
17063
|
}
|
|
16997
17064
|
function shareUrlFields(status) {
|
|
16998
17065
|
return {
|
|
16999
|
-
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17000
|
-
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17066
|
+
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _595 => _595.share, 'optionalAccess', _596 => _596.publicPath])),
|
|
17067
|
+
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _597 => _597.share, 'optionalAccess', _598 => _598.canonicalPath]))
|
|
17001
17068
|
};
|
|
17002
17069
|
}
|
|
17003
17070
|
function shareStatusForOutput(status) {
|
|
@@ -17021,10 +17088,10 @@ async function handlePlayShareStatus(args) {
|
|
|
17021
17088
|
return 2;
|
|
17022
17089
|
}
|
|
17023
17090
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17024
|
-
const status = await new (0,
|
|
17091
|
+
const status = await new (0, _chunkSKVMC6K6js.DeeplineClient)().getSharePage(name);
|
|
17025
17092
|
const outputStatus = shareStatusForOutput(status);
|
|
17026
|
-
if (
|
|
17027
|
-
|
|
17093
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
17094
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, outputStatus);
|
|
17028
17095
|
return 0;
|
|
17029
17096
|
}
|
|
17030
17097
|
if (!outputStatus.share) {
|
|
@@ -17063,7 +17130,7 @@ async function handlePlaySharePublish(args) {
|
|
|
17063
17130
|
return 2;
|
|
17064
17131
|
}
|
|
17065
17132
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17066
|
-
const client = new (0,
|
|
17133
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
17067
17134
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17068
17135
|
let resolvedVersion;
|
|
17069
17136
|
if (!revisionId) {
|
|
@@ -17094,8 +17161,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17094
17161
|
);
|
|
17095
17162
|
if (!hasCompleted) {
|
|
17096
17163
|
const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
|
|
17097
|
-
if (
|
|
17098
|
-
|
|
17164
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
17165
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, {
|
|
17099
17166
|
ok: false,
|
|
17100
17167
|
code: "NO_SUCCESSFUL_RUN",
|
|
17101
17168
|
message,
|
|
@@ -17119,8 +17186,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17119
17186
|
};
|
|
17120
17187
|
if (args.includes("--dry-run")) {
|
|
17121
17188
|
const plan = { dryRun: true, name, version: resolvedVersion, ...request };
|
|
17122
|
-
if (
|
|
17123
|
-
|
|
17189
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
17190
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, plan);
|
|
17124
17191
|
} else {
|
|
17125
17192
|
console.log(
|
|
17126
17193
|
`Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
|
|
@@ -17130,13 +17197,13 @@ async function handlePlaySharePublish(args) {
|
|
|
17130
17197
|
}
|
|
17131
17198
|
const status = await client.publishSharePage(name, request);
|
|
17132
17199
|
const outputStatus = shareStatusForOutput(status);
|
|
17133
|
-
if (
|
|
17134
|
-
|
|
17200
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
17201
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, outputStatus);
|
|
17135
17202
|
return 0;
|
|
17136
17203
|
}
|
|
17137
17204
|
const urls = shareUrlFields(outputStatus);
|
|
17138
17205
|
console.log(
|
|
17139
|
-
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access',
|
|
17206
|
+
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _599 => _599.share, 'optionalAccess', _600 => _600.publicPath]))), () => ( ""))}`
|
|
17140
17207
|
);
|
|
17141
17208
|
if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
|
|
17142
17209
|
console.log(`Version URL: ${urls.canonicalUrl}`);
|
|
@@ -17162,9 +17229,9 @@ async function handlePlayShareUpdate(args) {
|
|
|
17162
17229
|
...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
|
|
17163
17230
|
...seoIndexing ? { seoIndexing } : {}
|
|
17164
17231
|
};
|
|
17165
|
-
const status = await new (0,
|
|
17166
|
-
if (
|
|
17167
|
-
|
|
17232
|
+
const status = await new (0, _chunkSKVMC6K6js.DeeplineClient)().updateSharePage(name, request);
|
|
17233
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
17234
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, status);
|
|
17168
17235
|
return 0;
|
|
17169
17236
|
}
|
|
17170
17237
|
console.log(`Updated ${name} share settings.`);
|
|
@@ -17179,13 +17246,13 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17179
17246
|
return 2;
|
|
17180
17247
|
}
|
|
17181
17248
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17182
|
-
const client = new (0,
|
|
17249
|
+
const client = new (0, _chunkSKVMC6K6js.DeeplineClient)();
|
|
17183
17250
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17184
17251
|
const versionFlag = shareFlagValue(args, "--version");
|
|
17185
17252
|
if (!revisionId && versionFlag) {
|
|
17186
17253
|
const versions = await client.listPlayVersions(name);
|
|
17187
17254
|
const chosen = versions.find((r) => r.version === Number(versionFlag));
|
|
17188
|
-
if (!_optionalChain([chosen, 'optionalAccess',
|
|
17255
|
+
if (!_optionalChain([chosen, 'optionalAccess', _601 => _601._id])) {
|
|
17189
17256
|
console.error(`Version ${versionFlag} not found for ${name}.`);
|
|
17190
17257
|
return 4;
|
|
17191
17258
|
}
|
|
@@ -17196,12 +17263,12 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17196
17263
|
revisionId ? { revisionId } : {}
|
|
17197
17264
|
);
|
|
17198
17265
|
const outputStatus = shareStatusForOutput(status);
|
|
17199
|
-
if (
|
|
17200
|
-
|
|
17266
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
17267
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, outputStatus);
|
|
17201
17268
|
return 0;
|
|
17202
17269
|
}
|
|
17203
17270
|
const urls = shareUrlFields(outputStatus);
|
|
17204
|
-
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access',
|
|
17271
|
+
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _602 => _602.share, 'optionalAccess', _603 => _603.publishedRevisionId]) === revisionId;
|
|
17205
17272
|
console.log(
|
|
17206
17273
|
`Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
|
|
17207
17274
|
);
|
|
@@ -17222,9 +17289,9 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17222
17289
|
return 2;
|
|
17223
17290
|
}
|
|
17224
17291
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17225
|
-
const status = await new (0,
|
|
17226
|
-
if (
|
|
17227
|
-
|
|
17292
|
+
const status = await new (0, _chunkSKVMC6K6js.DeeplineClient)().unpublishSharePage(name);
|
|
17293
|
+
if (_chunkH7YFUC3Jjs.argsWantJson.call(void 0, args)) {
|
|
17294
|
+
_chunkH7YFUC3Jjs.printCompactJson.call(void 0, status);
|
|
17228
17295
|
return 0;
|
|
17229
17296
|
}
|
|
17230
17297
|
console.log(`Unpublished ${name}; the public page has been removed.`);
|
|
@@ -17298,4 +17365,5 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17298
17365
|
|
|
17299
17366
|
|
|
17300
17367
|
|
|
17301
|
-
|
|
17368
|
+
|
|
17369
|
+
exports.PREBUILT_PLAY_TAG_KEYS = PREBUILT_PLAY_TAG_KEYS; exports.assertDatasetHasExportableRows = assertDatasetHasExportableRows; exports.buildPlayCompletionTextLines = buildPlayCompletionTextLines; exports.buildRunActivityTextLines = buildRunActivityTextLines; exports.buildRunLaunch = buildRunLaunch; exports.buildRunLogsText = buildRunLogsText; exports.buildRunPackageTextLines = buildRunPackageTextLines; exports.buildStopAllDryRunTextLines = buildStopAllDryRunTextLines; exports.clampJsonPreviewText = clampJsonPreviewText; exports.compactPlayStatus = compactPlayStatus; exports.csvColumnLines = csvColumnLines; exports.describeSleepUntil = describeSleepUntil; exports.exportPlayStatusRows = exportPlayStatusRows; exports.formatPlaySandboxRuntimeWarning = formatPlaySandboxRuntimeWarning; exports.formatStepLabelFromNodeId = formatStepLabelFromNodeId; exports.getFinalStatusFromLiveEvent = getFinalStatusFromLiveEvent; exports.getProgressLinesFromLiveEvent = getProgressLinesFromLiveEvent; exports.getRunningHeartbeatLine = getRunningHeartbeatLine; exports.getStepTransitionLineFromLiveEvent = getStepTransitionLineFromLiveEvent; exports.handlePlayCheck = handlePlayCheck; exports.handlePlayCost = handlePlayCost; exports.handlePlayDelete = handlePlayDelete; exports.handlePlayDescribe = handlePlayDescribe; exports.handlePlayGet = handlePlayGet; exports.handlePlayGrep = handlePlayGrep; exports.handlePlayList = handlePlayList; exports.handlePlayPin = handlePlayPin; exports.handlePlayPublish = handlePlayPublish; exports.handlePlayRestore = handlePlayRestore; exports.handlePlayRun = handlePlayRun; exports.handlePlaySave = handlePlaySave; exports.handlePlaySharePublish = handlePlaySharePublish; exports.handlePlayShareRegenerate = handlePlayShareRegenerate; exports.handlePlayShareStatus = handlePlayShareStatus; exports.handlePlayShareUnpublish = handlePlayShareUnpublish; exports.handlePlayShareUpdate = handlePlayShareUpdate; exports.handlePlayVersions = handlePlayVersions; exports.handleRunEventSearch = handleRunEventSearch; exports.handleRunExport = handleRunExport; exports.handleRunGet = handleRunGet; exports.handleRunLifecycleStatus = handleRunLifecycleStatus; exports.handleRunLogs = handleRunLogs; exports.handleRunStop = handleRunStop; exports.handleRunStopAll = handleRunStopAll; exports.handleRunTail = handleRunTail; exports.handleRunsList = handleRunsList; exports.handleRunsRerun = handleRunsRerun; exports.liveMaxCreditsPerRun = liveMaxCreditsPerRun; exports.loadPlayBundler = loadPlayBundler; exports.parsePlayPublishOptions = parsePlayPublishOptions; exports.parsePlayRunHeaderFlag = _chunkRMQB72WWjs.parsePlayRunHeaderFlag; exports.parsePlayRunOptions = _chunkRMQB72WWjs.parsePlayRunOptions; exports.preflightLocalFileInputs = preflightLocalFileInputs; exports.registerPlayCommands = registerPlayCommands; exports.renderRunOverviewText = renderRunOverviewText; exports.resolveDatasetByName = resolveDatasetByName; exports.resolvePlayRunOutputStatus = resolvePlayRunOutputStatus; exports.resolveRunStopState = resolveRunStopState; exports.selectRunLogTailPage = selectRunLogTailPage; exports.shouldPrintPlayProgressLine = shouldPrintPlayProgressLine; exports.startAndWaitForPlayCompletion = startAndWaitForPlayCompletion; exports.startAndWaitForPlayCompletionByStream = startAndWaitForPlayCompletionByStream; exports.truncateErrorForDisplay = truncateErrorForDisplay; exports.waitForPlayCompletionByWatch = waitForPlayCompletionByWatch; exports.withTerminalPlayIdentity = withTerminalPlayIdentity; exports.writeInlinePlay = writeInlinePlay; exports.writePlayRunIdFile = writePlayRunIdFile; exports.writePlayRunReceipt = writePlayRunReceipt;
|