deepline 0.3.480 → 0.3.481
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 +35 -1
- package/dist/bundling-sources/sdk/src/http-core.ts +2 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +54 -31
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/legacy-radar-forward-routes.ts +569 -0
- package/dist/bundling-sources/shared_libs/monitors/legacy-radar-retirement.ts +451 -0
- package/dist/bundling-sources/shared_libs/monitors/package.json +5 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-array-input-receipts.ts +13 -6
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +125 -22
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +16 -53
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +34 -48
- package/dist/bundling-sources/shared_libs/security/receipt-admission-token.ts +44 -0
- package/dist/cli/auth-EQWYBNIE.js +43 -0
- package/dist/cli/{auth-KMKFQX7X.mjs → auth-FYY65LYD.mjs} +5 -5
- package/dist/cli/{billing-G3Y5FTQM.mjs → billing-3MELYUTI.mjs} +7 -7
- package/dist/cli/{billing-R5RCTEW6.js → billing-TROHWBSE.js} +80 -80
- package/dist/cli/{chunk-4V6KEXCM.js → chunk-27BYXQU4.js} +1 -1
- package/dist/cli/{chunk-OQOXR6JL.js → chunk-4CIVXXSU.js} +26 -26
- package/dist/cli/{chunk-RPJSVGSC.js → chunk-5ONCPLWC.js} +16 -16
- package/dist/cli/{chunk-K7E2DO5P.js → chunk-6VKDKATO.js} +53 -53
- package/dist/cli/{chunk-WQBJHB63.js → chunk-6WWBVWFQ.js} +7 -7
- package/dist/cli/{chunk-LLEBPM3N.mjs → chunk-6ZMUAASO.mjs} +4 -4
- package/dist/cli/{chunk-IQ6WL36K.mjs → chunk-75LUK4E5.mjs} +1 -1
- package/dist/cli/{chunk-AKCYZDBO.mjs → chunk-7VVC4RZX.mjs} +1 -1
- package/dist/cli/{chunk-JBQKBDDN.mjs → chunk-ASQJUUGB.mjs} +5 -5
- package/dist/cli/{chunk-DIDWIPMA.mjs → chunk-BJ5UFTWL.mjs} +28 -7
- package/dist/cli/{chunk-JH77OHD5.js → chunk-BJMEXKZY.js} +2 -2
- package/dist/cli/{chunk-53LLOGNV.mjs → chunk-C7UIUKW6.mjs} +2 -2
- package/dist/cli/{chunk-LHU6BMDV.js → chunk-CM3KC74A.js} +3 -3
- package/dist/cli/{chunk-XNXE7YWI.mjs → chunk-CS2P3EQS.mjs} +2 -2
- package/dist/cli/{chunk-APFFHSPL.js → chunk-CUSWZTS7.js} +8 -8
- package/dist/cli/{chunk-6AYQK7Z6.js → chunk-D3UHG54V.js} +199 -178
- package/dist/cli/{chunk-PM2CT7HZ.mjs → chunk-EJTU6X6C.mjs} +3 -3
- package/dist/cli/{chunk-FZX2DGQZ.js → chunk-EPEAQA6O.js} +37 -37
- package/dist/cli/{chunk-57MJL2HU.mjs → chunk-EPZSX7FZ.mjs} +4 -4
- package/dist/cli/{chunk-FZ42SO3Q.mjs → chunk-FXLMDAAY.mjs} +1 -1
- package/dist/cli/chunk-GBAT5NMI.mjs +789 -0
- package/dist/cli/{chunk-VPO2D7WV.js → chunk-GJOKFJ2Y.js} +10 -10
- package/dist/cli/{chunk-JDMR33HS.js → chunk-GVAENVIG.js} +28 -19
- package/dist/cli/{chunk-NELMCOWK.mjs → chunk-HNRELVCS.mjs} +27 -18
- package/dist/cli/{chunk-SUTQCM7U.mjs → chunk-HXG7TYRS.mjs} +2 -2
- package/dist/cli/{chunk-PDDUX5UY.js → chunk-J4D3PCQ2.js} +5 -5
- package/dist/cli/{chunk-PC42DFZC.mjs → chunk-JE27DTQM.mjs} +3 -3
- package/dist/cli/{chunk-MEJJD7PA.js → chunk-KDU6TSGE.js} +2 -2
- package/dist/cli/{chunk-NVTVS4AV.js → chunk-KPXP2DIY.js} +7 -9
- package/dist/cli/chunk-KQSTV4MW.js +789 -0
- package/dist/cli/{chunk-2AYWC63S.mjs → chunk-LISZBUA7.mjs} +2 -2
- package/dist/cli/{chunk-44TVNYYV.mjs → chunk-LTOY2GUJ.mjs} +10 -10
- package/dist/cli/{chunk-OGXG46LY.js → chunk-MKDWU3ZI.js} +93 -93
- package/dist/cli/{chunk-MTMOYZMK.mjs → chunk-N5267HEH.mjs} +1 -1
- package/dist/cli/{chunk-T7EWDIVM.mjs → chunk-PDJS6LFI.mjs} +2 -1
- package/dist/cli/{chunk-QEV3GFDS.js → chunk-R4EFW2I2.js} +3 -3
- package/dist/cli/{chunk-KQNQCZLB.mjs → chunk-RV2GB7KW.mjs} +2 -2
- package/dist/cli/{chunk-PYIWO4GS.mjs → chunk-S5BM6NPJ.mjs} +3 -5
- package/dist/cli/{chunk-7LMLHUCP.mjs → chunk-S5WXSC3P.mjs} +5 -5
- package/dist/cli/{chunk-63QH6FL3.mjs → chunk-SOGLBLMH.mjs} +4 -4
- package/dist/cli/{chunk-5IVGZCKY.js → chunk-SVPM2E2U.js} +5 -5
- package/dist/cli/{chunk-ZSWY5E3W.mjs → chunk-UUGSZZZH.mjs} +1 -1
- package/dist/cli/{chunk-TBJ23WKT.js → chunk-VBDR2DP6.js} +3 -3
- package/dist/cli/{chunk-TXFURKHD.mjs → chunk-VRAOWHXJ.mjs} +1 -1
- package/dist/cli/{chunk-ASARTL6E.mjs → chunk-VTKAIGW6.mjs} +3 -3
- package/dist/cli/{chunk-DQYJXVAF.js → chunk-WF5QE2IW.js} +17 -16
- package/dist/cli/{chunk-NBXG4S2X.js → chunk-WICQQ7GY.js} +53 -53
- package/dist/cli/{chunk-FFSOXQEM.js → chunk-WTWRZ5ZI.js} +8 -8
- package/dist/cli/{chunk-LBZLV6QF.js → chunk-X4XZFIK6.js} +14 -14
- package/dist/cli/{chunk-A3PZKD47.js → chunk-X6MEQBAT.js} +21 -21
- package/dist/cli/{csv-P3AEI4G4.mjs → csv-2EG7JW7V.mjs} +4 -4
- package/dist/cli/{csv-57D62T7L.js → csv-OUALOZBF.js} +13 -13
- package/dist/cli/{db-FWFYU34R.js → db-7BTOI6YB.js} +28 -28
- package/dist/cli/{db-PJQMPZJP.mjs → db-ECDQWI2Y.mjs} +7 -7
- package/dist/cli/describe-EXSH6OZD.js +48 -0
- package/dist/cli/{describe-F57VZZML.mjs → describe-KO6WKQIB.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-ZAJGMAAT.mjs → executions-3VMFBZT4.mjs} +7 -7
- package/dist/cli/{executions-YBT7NTY5.js → executions-VZSG3F3E.js} +9 -9
- package/dist/cli/{feedback-YLYY2EG4.js → feedback-ASKBWRXR.js} +8 -8
- package/dist/cli/{feedback-L3ZQCSY6.mjs → feedback-SN7AVALN.mjs} +4 -4
- package/dist/cli/{git-M7735NWJ.mjs → git-W2DZXEAY.mjs} +5 -5
- package/dist/cli/git-X2XUKYYX.js +25 -0
- package/dist/cli/index.js +167 -144
- package/dist/cli/index.mjs +73 -50
- package/dist/cli/{legacy-noops-TX37UP3U.js → legacy-noops-6KOC6LV7.js} +8 -8
- package/dist/cli/{legacy-noops-PKNMQMGY.mjs → legacy-noops-R2SML7ED.mjs} +5 -5
- package/dist/cli/{monitors-U7AUIOFZ.mjs → monitors-4VGZGJBT.mjs} +8 -8
- package/dist/cli/{monitors-5YTGQSGD.js → monitors-OJXDYU4G.js} +92 -92
- package/dist/cli/{org-N6DSSLLD.js → org-AELMZFUT.js} +73 -73
- package/dist/cli/{org-SRKZRVVH.mjs → org-UGN5ZG2Y.mjs} +7 -7
- package/dist/cli/{pages-YPN54RCC.js → pages-L26N7MK3.js} +18 -18
- package/dist/cli/{pages-UOPJUFCF.mjs → pages-ZYPAAYSS.mjs} +7 -7
- package/dist/cli/{play-4IK4WXWU.mjs → play-ENYB7X4S.mjs} +125 -53
- package/dist/cli/{play-MEYZEYOV.js → play-VTZWB3N5.js} +620 -548
- package/dist/cli/{providers-UGHUYP4C.mjs → providers-BZQTVAQG.mjs} +7 -7
- package/dist/cli/{providers-VS5MK4ZH.js → providers-HWBY6MGQ.js} +10 -10
- package/dist/cli/{quickstart-GW2ERQ2A.js → quickstart-D54IJ3PX.js} +6 -6
- package/dist/cli/{quickstart-YBOQSLFV.mjs → quickstart-SSQJDWPB.mjs} +4 -4
- package/dist/cli/{run-IVGMLY3J.js → run-45NKE7UY.js} +37 -37
- package/dist/cli/{run-44JT5GJM.mjs → run-FR3TPYT3.mjs} +23 -23
- package/dist/cli/{search-43NY73VR.mjs → search-CZCWSR5L.mjs} +8 -8
- package/dist/cli/search-V2GJKQQQ.js +32 -0
- package/dist/cli/{secrets-DABUD3B7.js → secrets-KJ5ZEDWT.js} +16 -16
- package/dist/cli/{secrets-ONDQGW3B.mjs → secrets-KKK55B4Y.mjs} +7 -7
- package/dist/cli/{sessions-AIAKKLSR.mjs → sessions-2YKA54PH.mjs} +5 -5
- package/dist/cli/{sessions-4ILQMBKR.js → sessions-QCNPUTDZ.js} +6 -6
- package/dist/cli/{settings-HSGKYOJT.mjs → settings-4NI2AS5V.mjs} +12 -12
- package/dist/cli/{settings-BWNLL7TP.js → settings-KM3LCPWD.js} +79 -79
- package/dist/cli/{setup-LE4OVH4M.mjs → setup-BZF3M54I.mjs} +9 -9
- package/dist/cli/{setup-37QOD4UT.js → setup-V5MTS2AA.js} +47 -47
- package/dist/cli/skills-CRFYW767.js +33 -0
- package/dist/cli/{skills-A3ZVR2YX.mjs → skills-NXYNB3LP.mjs} +7 -7
- package/dist/cli/{tools-ITKPPUDT.mjs → tools-57MWFRIZ.mjs} +17 -17
- package/dist/cli/tools-Q662HPVJ.js +55 -0
- package/dist/cli/{update-XJOSCOK5.mjs → update-QM6H677U.mjs} +9 -9
- package/dist/cli/update-TYHKF7F5.js +33 -0
- package/dist/cli/{workflow-KYQYFSND.mjs → workflow-NHYDIUWY.mjs} +8 -8
- package/dist/cli/{workflow-LERZ3TYV.js → workflow-TGEC4ITO.js} +18 -18
- package/dist/{client-B9N1bcGc.d.mts → client-DJ3r8VQJ.d.mts} +1 -1
- package/dist/{client-Btw075Hq.d.ts → client-JPSNljtj.d.ts} +1 -1
- package/dist/{client-core-TulbIeRB.d.mts → client-core-3SJlNsKU.d.mts} +21 -2
- package/dist/{client-core-DvGWlwtX.d.ts → client-core-rCoQ5Xz3.d.ts} +21 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10 -10
- package/dist/index.mjs +7 -7
- package/dist/install-integrity.json +106 -104
- package/dist/plays/bundle-play-file.mjs +5426 -12
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/plays/run-request.js +4 -2
- package/dist/plays/run-request.mjs +3 -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 +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-7FOB243B.js +0 -43
- package/dist/cli/chunk-7UFFWPQ2.js +0 -6188
- package/dist/cli/chunk-ZBSUXXZS.mjs +0 -6188
- package/dist/cli/describe-ZAYUBNUQ.js +0 -48
- package/dist/cli/git-A3433UTN.js +0 -25
- package/dist/cli/search-2XTYY7BF.js +0 -32
- package/dist/cli/skills-TULQXRQJ.js +0 -33
- package/dist/cli/tools-QYYBWDXU.js +0 -55
- package/dist/cli/update-XSMY7KWH.js +0 -33
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkX4XZFIK6js = require('./chunk-X4XZFIK6.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -17,14 +17,14 @@ var _chunkLBZLV6QFjs = require('./chunk-LBZLV6QF.js');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkR4EFW2I2js = require('./chunk-R4EFW2I2.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkCUSWZTS7js = require('./chunk-CUSWZTS7.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunk4CIVXXSUjs = require('./chunk-4CIVXXSU.js');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
var _chunkIAYSWZDJjs = require('./chunk-IAYSWZDJ.js');
|
|
@@ -39,12 +39,10 @@ require('./chunk-ZM2YPJQJ.js');
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
var _chunk7UFFWPQ2js = require('./chunk-7UFFWPQ2.js');
|
|
42
|
+
var _chunkKQSTV4MWjs = require('./chunk-KQSTV4MW.js');
|
|
44
43
|
|
|
45
44
|
|
|
46
45
|
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
47
|
-
require('./chunk-3KC45UVF.js');
|
|
48
46
|
|
|
49
47
|
|
|
50
48
|
|
|
@@ -53,18 +51,16 @@ require('./chunk-3KC45UVF.js');
|
|
|
53
51
|
|
|
54
52
|
|
|
55
53
|
var _chunkYGCKMI5Pjs = require('./chunk-YGCKMI5P.js');
|
|
56
|
-
require('./chunk-J33TSWO5.js');
|
|
57
54
|
|
|
58
55
|
|
|
59
56
|
var _chunkA6QCMBGLjs = require('./chunk-A6QCMBGL.js');
|
|
60
57
|
|
|
61
58
|
|
|
62
59
|
|
|
63
|
-
var
|
|
60
|
+
var _chunkSVPM2E2Ujs = require('./chunk-SVPM2E2U.js');
|
|
64
61
|
|
|
65
62
|
|
|
66
|
-
var
|
|
67
|
-
require('./chunk-VKKVSFRD.js');
|
|
63
|
+
var _chunkJ4D3PCQ2js = require('./chunk-J4D3PCQ2.js');
|
|
68
64
|
|
|
69
65
|
|
|
70
66
|
|
|
@@ -77,7 +73,7 @@ require('./chunk-VKKVSFRD.js');
|
|
|
77
73
|
|
|
78
74
|
|
|
79
75
|
|
|
80
|
-
var
|
|
76
|
+
var _chunkD3UHG54Vjs = require('./chunk-D3UHG54V.js');
|
|
81
77
|
require('./chunk-E4CABWXL.js');
|
|
82
78
|
|
|
83
79
|
|
|
@@ -88,7 +84,7 @@ require('./chunk-E4CABWXL.js');
|
|
|
88
84
|
|
|
89
85
|
|
|
90
86
|
|
|
91
|
-
var
|
|
87
|
+
var _chunkGVAENVIGjs = require('./chunk-GVAENVIG.js');
|
|
92
88
|
|
|
93
89
|
|
|
94
90
|
|
|
@@ -97,18 +93,18 @@ require('./chunk-XDVT3GOM.js');
|
|
|
97
93
|
|
|
98
94
|
|
|
99
95
|
|
|
100
|
-
var
|
|
96
|
+
var _chunkKPXP2DIYjs = require('./chunk-KPXP2DIY.js');
|
|
101
97
|
|
|
102
98
|
|
|
103
99
|
|
|
104
100
|
|
|
105
101
|
|
|
106
|
-
var
|
|
107
|
-
require('./chunk-
|
|
102
|
+
var _chunkBJMEXKZYjs = require('./chunk-BJMEXKZY.js');
|
|
103
|
+
require('./chunk-WICQQ7GY.js');
|
|
108
104
|
|
|
109
105
|
|
|
110
106
|
|
|
111
|
-
var
|
|
107
|
+
var _chunkCM3KC74Ajs = require('./chunk-CM3KC74A.js');
|
|
112
108
|
|
|
113
109
|
|
|
114
110
|
|
|
@@ -122,17 +118,17 @@ var _chunkLHU6BMDVjs = require('./chunk-LHU6BMDV.js');
|
|
|
122
118
|
|
|
123
119
|
|
|
124
120
|
|
|
125
|
-
var
|
|
126
|
-
require('./chunk-
|
|
121
|
+
var _chunk6WWBVWFQjs = require('./chunk-6WWBVWFQ.js');
|
|
122
|
+
require('./chunk-VBDR2DP6.js');
|
|
127
123
|
|
|
128
124
|
|
|
129
|
-
var
|
|
125
|
+
var _chunkWF5QE2IWjs = require('./chunk-WF5QE2IW.js');
|
|
130
126
|
require('./chunk-ALJJRZNJ.js');
|
|
131
127
|
require('./chunk-XNYIZMNQ.js');
|
|
132
128
|
|
|
133
129
|
|
|
134
130
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
135
|
-
require('./chunk-
|
|
131
|
+
require('./chunk-27BYXQU4.js');
|
|
136
132
|
require('./chunk-OG64RBAC.js');
|
|
137
133
|
|
|
138
134
|
|
|
@@ -2114,7 +2110,7 @@ function resolveField(key, command) {
|
|
|
2114
2110
|
function printSettings(result, json, name) {
|
|
2115
2111
|
result = { ...result, settings: parsePlaySettings(result.settings) };
|
|
2116
2112
|
const selected = fields.filter(([key]) => !name || key === name);
|
|
2117
|
-
|
|
2113
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
2118
2114
|
{
|
|
2119
2115
|
...result,
|
|
2120
2116
|
settings: Object.fromEntries(
|
|
@@ -2158,7 +2154,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2158
2154
|
valueSyntax: field.cli.valueSyntax,
|
|
2159
2155
|
examples: field.cli.examples
|
|
2160
2156
|
}));
|
|
2161
|
-
|
|
2157
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
2162
2158
|
{
|
|
2163
2159
|
fields: descriptions,
|
|
2164
2160
|
render: {
|
|
@@ -2183,7 +2179,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2183
2179
|
async (options, command) => {
|
|
2184
2180
|
if (options.name !== void 0) resolveField(options.name, command);
|
|
2185
2181
|
printSettings(
|
|
2186
|
-
await new (0,
|
|
2182
|
+
await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().getPlaySettings(options.play),
|
|
2187
2183
|
options.json,
|
|
2188
2184
|
options.name
|
|
2189
2185
|
);
|
|
@@ -2214,7 +2210,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2214
2210
|
);
|
|
2215
2211
|
}
|
|
2216
2212
|
if (options.dryRun) {
|
|
2217
|
-
|
|
2213
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
2218
2214
|
{
|
|
2219
2215
|
dryRun: true,
|
|
2220
2216
|
play,
|
|
@@ -2235,7 +2231,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2235
2231
|
return;
|
|
2236
2232
|
}
|
|
2237
2233
|
printSettings(
|
|
2238
|
-
await new (0,
|
|
2234
|
+
await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().updatePlaySettings(play, patch),
|
|
2239
2235
|
options.json
|
|
2240
2236
|
);
|
|
2241
2237
|
};
|
|
@@ -2261,13 +2257,13 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2261
2257
|
"--root must be person or team; --limit must be 1\u2013100.",
|
|
2262
2258
|
{ exitCode: 2 }
|
|
2263
2259
|
);
|
|
2264
|
-
const page = await new (0,
|
|
2260
|
+
const page = await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().listPlaySettingsPaths({
|
|
2265
2261
|
root: options.root,
|
|
2266
2262
|
limit,
|
|
2267
2263
|
cursor: options.cursor
|
|
2268
2264
|
});
|
|
2269
2265
|
const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""}` : null;
|
|
2270
|
-
|
|
2266
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
2271
2267
|
{
|
|
2272
2268
|
...page,
|
|
2273
2269
|
nextCommand,
|
|
@@ -2318,7 +2314,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2318
2314
|
root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _12 => _12.root]), () => ( "person")),
|
|
2319
2315
|
folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.folders]), () => ( []))
|
|
2320
2316
|
};
|
|
2321
|
-
const client = new (0,
|
|
2317
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
2322
2318
|
const paths = [];
|
|
2323
2319
|
let cursor;
|
|
2324
2320
|
do {
|
|
@@ -2380,7 +2376,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2380
2376
|
moved.push(move.playName);
|
|
2381
2377
|
}
|
|
2382
2378
|
}
|
|
2383
|
-
|
|
2379
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
2384
2380
|
{
|
|
2385
2381
|
dryRun: Boolean(options.dryRun),
|
|
2386
2382
|
from: options.from,
|
|
@@ -2508,7 +2504,7 @@ function triggerLines(view) {
|
|
|
2508
2504
|
return lines;
|
|
2509
2505
|
}
|
|
2510
2506
|
function printView(view, json) {
|
|
2511
|
-
|
|
2507
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
2512
2508
|
{
|
|
2513
2509
|
...view,
|
|
2514
2510
|
render: {
|
|
@@ -2521,7 +2517,7 @@ function printView(view, json) {
|
|
|
2521
2517
|
);
|
|
2522
2518
|
}
|
|
2523
2519
|
function printResult(result, json) {
|
|
2524
|
-
|
|
2520
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
2525
2521
|
{
|
|
2526
2522
|
...result,
|
|
2527
2523
|
render: {
|
|
@@ -2551,7 +2547,7 @@ async function mutate(command, options, build) {
|
|
|
2551
2547
|
usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
|
|
2552
2548
|
}
|
|
2553
2549
|
if (options.dryRun) {
|
|
2554
|
-
|
|
2550
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
2555
2551
|
{
|
|
2556
2552
|
dryRun: true,
|
|
2557
2553
|
play: options.play,
|
|
@@ -2570,7 +2566,7 @@ async function mutate(command, options, build) {
|
|
|
2570
2566
|
return;
|
|
2571
2567
|
}
|
|
2572
2568
|
printResult(
|
|
2573
|
-
await new (0,
|
|
2569
|
+
await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
|
|
2574
2570
|
options.json
|
|
2575
2571
|
);
|
|
2576
2572
|
}
|
|
@@ -2603,7 +2599,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2603
2599
|
}).addHelpText("after", help2);
|
|
2604
2600
|
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) => {
|
|
2605
2601
|
printView(
|
|
2606
|
-
await new (0,
|
|
2602
|
+
await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().getPlayTriggerConfig(options.play),
|
|
2607
2603
|
options.json
|
|
2608
2604
|
);
|
|
2609
2605
|
});
|
|
@@ -2647,7 +2643,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2647
2643
|
if (options.auth === void 0) {
|
|
2648
2644
|
if (secrets.length || options.header || options.signaturePrefix)
|
|
2649
2645
|
usage(setWebhook, "--secret/--header need --auth.");
|
|
2650
|
-
const current = await new (0,
|
|
2646
|
+
const current = await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().getPlayTriggerConfig(
|
|
2651
2647
|
options.play
|
|
2652
2648
|
);
|
|
2653
2649
|
return {
|
|
@@ -2724,7 +2720,7 @@ var KIND_DESCRIPTIONS = {
|
|
|
2724
2720
|
"receipt.skipped": "Saved work result: skipped.",
|
|
2725
2721
|
"runtime.event": "Other event."
|
|
2726
2722
|
};
|
|
2727
|
-
var RUN_LOGS_KIND_HELP =
|
|
2723
|
+
var RUN_LOGS_KIND_HELP = _chunkD3UHG54Vjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
|
|
2728
2724
|
kind,
|
|
2729
2725
|
description: KIND_DESCRIPTIONS[kind]
|
|
2730
2726
|
}));
|
|
@@ -2861,9 +2857,9 @@ function configureRunQueryCommandErrors(command, resource) {
|
|
|
2861
2857
|
const args = program.args;
|
|
2862
2858
|
if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
|
|
2863
2859
|
error.exitCode = 2;
|
|
2864
|
-
if (
|
|
2865
|
-
|
|
2866
|
-
Object.assign(new (0,
|
|
2860
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
|
|
2861
|
+
_chunk6WWBVWFQjs.printJsonError.call(void 0,
|
|
2862
|
+
Object.assign(new (0, _chunkD3UHG54Vjs.RunEventQueryInputError)(error.message), {
|
|
2867
2863
|
exitCode: 2,
|
|
2868
2864
|
retryable: false
|
|
2869
2865
|
})
|
|
@@ -2907,14 +2903,14 @@ function parseQuery(args, resource) {
|
|
|
2907
2903
|
if (VALUE_FLAGS.has(flag)) {
|
|
2908
2904
|
const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
|
|
2909
2905
|
if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
|
|
2910
|
-
throw new (0,
|
|
2906
|
+
throw new (0, _chunkD3UHG54Vjs.RunEventQueryInputError)(
|
|
2911
2907
|
`${flag} requires a value. Use ${flag} <value>.`
|
|
2912
2908
|
);
|
|
2913
2909
|
}
|
|
2914
2910
|
if (flag === "--sum") sums.push(value);
|
|
2915
2911
|
else {
|
|
2916
2912
|
if (values[flag] !== void 0) {
|
|
2917
|
-
throw new (0,
|
|
2913
|
+
throw new (0, _chunkD3UHG54Vjs.RunEventQueryInputError)(
|
|
2918
2914
|
`${flag} may only be supplied once.`
|
|
2919
2915
|
);
|
|
2920
2916
|
}
|
|
@@ -2928,12 +2924,12 @@ function parseQuery(args, resource) {
|
|
|
2928
2924
|
}
|
|
2929
2925
|
if (arg.startsWith("-")) {
|
|
2930
2926
|
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.";
|
|
2931
|
-
throw new (0,
|
|
2927
|
+
throw new (0, _chunkD3UHG54Vjs.RunEventQueryInputError)(
|
|
2932
2928
|
`Unsupported query flag ${flag}. ${correction}`
|
|
2933
2929
|
);
|
|
2934
2930
|
}
|
|
2935
2931
|
if (runId !== void 0) {
|
|
2936
|
-
throw new (0,
|
|
2932
|
+
throw new (0, _chunkD3UHG54Vjs.RunEventQueryInputError)(
|
|
2937
2933
|
`Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
|
|
2938
2934
|
);
|
|
2939
2935
|
}
|
|
@@ -2941,7 +2937,7 @@ function parseQuery(args, resource) {
|
|
|
2941
2937
|
}
|
|
2942
2938
|
if (switches.has("--fields")) {
|
|
2943
2939
|
if (runId !== void 0) {
|
|
2944
|
-
throw new (0,
|
|
2940
|
+
throw new (0, _chunkD3UHG54Vjs.RunEventQueryInputError)(
|
|
2945
2941
|
"--fields does not use a run ID. Omit the positional run ID."
|
|
2946
2942
|
);
|
|
2947
2943
|
}
|
|
@@ -2954,18 +2950,18 @@ function parseQuery(args, resource) {
|
|
|
2954
2950
|
)
|
|
2955
2951
|
];
|
|
2956
2952
|
if (incompatible.length) {
|
|
2957
|
-
throw new (0,
|
|
2953
|
+
throw new (0, _chunkD3UHG54Vjs.RunEventQueryInputError)(
|
|
2958
2954
|
`--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
|
|
2959
2955
|
);
|
|
2960
2956
|
}
|
|
2961
2957
|
}
|
|
2962
2958
|
if (switches.has("--count") && values["--group-by"] !== void 0) {
|
|
2963
|
-
throw new (0,
|
|
2959
|
+
throw new (0, _chunkD3UHG54Vjs.RunEventQueryInputError)(
|
|
2964
2960
|
"--count cannot be combined with --group-by. Use --group-by for counts per group."
|
|
2965
2961
|
);
|
|
2966
2962
|
}
|
|
2967
2963
|
if (sums.length && switches.has("--count")) {
|
|
2968
|
-
throw new (0,
|
|
2964
|
+
throw new (0, _chunkD3UHG54Vjs.RunEventQueryInputError)(
|
|
2969
2965
|
"--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
|
|
2970
2966
|
);
|
|
2971
2967
|
}
|
|
@@ -2973,7 +2969,7 @@ function parseQuery(args, resource) {
|
|
|
2973
2969
|
if (operation === "count") {
|
|
2974
2970
|
for (const flag of ["--limit", "--cursor", "--payloads"]) {
|
|
2975
2971
|
if (values[flag] !== void 0 || switches.has(flag)) {
|
|
2976
|
-
throw new (0,
|
|
2972
|
+
throw new (0, _chunkD3UHG54Vjs.RunEventQueryInputError)(
|
|
2977
2973
|
`--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
|
|
2978
2974
|
);
|
|
2979
2975
|
}
|
|
@@ -3008,16 +3004,16 @@ function parseQuery(args, resource) {
|
|
|
3008
3004
|
];
|
|
3009
3005
|
}
|
|
3010
3006
|
}
|
|
3011
|
-
const request =
|
|
3007
|
+
const request = _chunkD3UHG54Vjs.normalizeRunEventOperationRequest.call(void 0, body);
|
|
3012
3008
|
const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
|
|
3013
3009
|
const backend = values["--runtime-backend"];
|
|
3014
3010
|
if (backend && backend !== "daytona" && backend !== "modal") {
|
|
3015
|
-
throw new (0,
|
|
3011
|
+
throw new (0, _chunkD3UHG54Vjs.RunEventQueryInputError)(
|
|
3016
3012
|
"--runtime-backend must be daytona or modal."
|
|
3017
3013
|
);
|
|
3018
3014
|
}
|
|
3019
3015
|
if (backend && !namespace) {
|
|
3020
|
-
throw new (0,
|
|
3016
|
+
throw new (0, _chunkD3UHG54Vjs.RunEventQueryInputError)(
|
|
3021
3017
|
"--runtime-backend requires --runtime-namespace."
|
|
3022
3018
|
);
|
|
3023
3019
|
}
|
|
@@ -3064,12 +3060,12 @@ async function handleRunEventQuery(args, resource = "logs") {
|
|
|
3064
3060
|
const failure = error instanceof Error ? error : new Error(String(error));
|
|
3065
3061
|
const record3 = failure;
|
|
3066
3062
|
const status = record3.statusCode;
|
|
3067
|
-
const exitCode = error instanceof
|
|
3063
|
+
const exitCode = error instanceof _chunkD3UHG54Vjs.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;
|
|
3068
3064
|
const diagnostic = Object.assign(failure, {
|
|
3069
3065
|
exitCode,
|
|
3070
3066
|
retryable: exitCode === 5
|
|
3071
3067
|
});
|
|
3072
|
-
if (
|
|
3068
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) _chunk6WWBVWFQjs.printJsonError.call(void 0, diagnostic);
|
|
3073
3069
|
else console.error(`Error: ${diagnostic.message}`);
|
|
3074
3070
|
return exitCode;
|
|
3075
3071
|
}
|
|
@@ -3084,7 +3080,7 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3084
3080
|
...criteria
|
|
3085
3081
|
} = request;
|
|
3086
3082
|
const options = { ...criteria, ...runtime ? { runtime } : {} };
|
|
3087
|
-
const client = new (0,
|
|
3083
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
3088
3084
|
let result;
|
|
3089
3085
|
if (request.operation === "fields") {
|
|
3090
3086
|
result = await client.runs[resource].fields(runtime ? { runtime } : {});
|
|
@@ -3150,13 +3146,13 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3150
3146
|
lines.push(`Next page: ${nextPage}`);
|
|
3151
3147
|
}
|
|
3152
3148
|
}
|
|
3153
|
-
|
|
3149
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
3154
3150
|
{
|
|
3155
3151
|
...result,
|
|
3156
3152
|
...nextPage ? { next: { page: nextPage } } : {},
|
|
3157
3153
|
render: { sections: [{ title: `run ${resource}`, lines }] }
|
|
3158
3154
|
},
|
|
3159
|
-
{ json:
|
|
3155
|
+
{ json: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
|
|
3160
3156
|
` }
|
|
3161
3157
|
);
|
|
3162
3158
|
return 0;
|
|
@@ -3227,7 +3223,7 @@ function rowCountsFrom(input) {
|
|
|
3227
3223
|
return { completed: c, failed: f, total: known };
|
|
3228
3224
|
}
|
|
3229
3225
|
function decodeRunStatus(status) {
|
|
3230
|
-
return
|
|
3226
|
+
return _chunkGVAENVIGjs.decodePlayRunPublicStatus.call(void 0, status);
|
|
3231
3227
|
}
|
|
3232
3228
|
function deriveRunExecutionState(input) {
|
|
3233
3229
|
const status = decodeRunStatus(input.status);
|
|
@@ -4075,7 +4071,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4075
4071
|
...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
|
|
4076
4072
|
);
|
|
4077
4073
|
}
|
|
4078
|
-
const response = await new (0,
|
|
4074
|
+
const response = await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().runs.getReceipts(runId, {
|
|
4079
4075
|
keys
|
|
4080
4076
|
});
|
|
4081
4077
|
const failed = response.receipts.filter(
|
|
@@ -4087,7 +4083,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4087
4083
|
JSON.stringify(response, null, 2) + "\n",
|
|
4088
4084
|
{ flag: "wx", mode: 384 }
|
|
4089
4085
|
);
|
|
4090
|
-
|
|
4086
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
4091
4087
|
{
|
|
4092
4088
|
runId,
|
|
4093
4089
|
out: options.out,
|
|
@@ -4097,7 +4093,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4097
4093
|
{ json: true }
|
|
4098
4094
|
);
|
|
4099
4095
|
} else {
|
|
4100
|
-
|
|
4096
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
|
|
4101
4097
|
}
|
|
4102
4098
|
if (failed)
|
|
4103
4099
|
process.exitCode = response.receipts.some(
|
|
@@ -4136,7 +4132,7 @@ includes nextCommand when another page is available.
|
|
|
4136
4132
|
{ exitCode: 2 }
|
|
4137
4133
|
);
|
|
4138
4134
|
}
|
|
4139
|
-
const page = await new (0,
|
|
4135
|
+
const page = await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().runs.children(parentRunId, {
|
|
4140
4136
|
launchKey: options.launchKey,
|
|
4141
4137
|
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
4142
4138
|
limit
|
|
@@ -4151,7 +4147,7 @@ includes nextCommand when another page is available.
|
|
|
4151
4147
|
"--limit",
|
|
4152
4148
|
String(limit)
|
|
4153
4149
|
].join(" ") : null;
|
|
4154
|
-
|
|
4150
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
4155
4151
|
{
|
|
4156
4152
|
parentRunId,
|
|
4157
4153
|
launchKey: options.launchKey,
|
|
@@ -4187,7 +4183,7 @@ async function handleRunsHistory(options) {
|
|
|
4187
4183
|
throw new Error("--limit must be a positive integer.");
|
|
4188
4184
|
}
|
|
4189
4185
|
}
|
|
4190
|
-
const page = await new (0,
|
|
4186
|
+
const page = await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().runs.history({
|
|
4191
4187
|
cursor: options.cursor,
|
|
4192
4188
|
orgId: options.org,
|
|
4193
4189
|
search: options.search,
|
|
@@ -4203,7 +4199,7 @@ async function handleRunsHistory(options) {
|
|
|
4203
4199
|
);
|
|
4204
4200
|
}
|
|
4205
4201
|
if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
|
|
4206
|
-
|
|
4202
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
4207
4203
|
{ ...page, render: { sections: [{ title: "Run history", lines }] } },
|
|
4208
4204
|
options.json ? { json: true } : {}
|
|
4209
4205
|
);
|
|
@@ -4255,12 +4251,12 @@ async function runRunsRerunCommand(runId, options) {
|
|
|
4255
4251
|
return 1;
|
|
4256
4252
|
}
|
|
4257
4253
|
}
|
|
4258
|
-
const result = await new (0,
|
|
4254
|
+
const result = await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().runs.rerun(runId, {
|
|
4259
4255
|
...idempotencyKey === void 0 ? {} : { idempotencyKey },
|
|
4260
4256
|
...inputOverrides === void 0 ? {} : { inputOverrides }
|
|
4261
4257
|
});
|
|
4262
|
-
if (
|
|
4263
|
-
|
|
4258
|
+
if (_chunk6WWBVWFQjs.shouldEmitJson.call(void 0, options.json)) {
|
|
4259
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0, result, { json: true });
|
|
4264
4260
|
} else if (result.rateLimited) {
|
|
4265
4261
|
console.log(`
|
|
4266
4262
|
${result.rateLimited.message}`);
|
|
@@ -5084,13 +5080,13 @@ var RunDataset = class _RunDataset {
|
|
|
5084
5080
|
const absolutePath = _path.resolve.call(void 0, outPath);
|
|
5085
5081
|
_fs.writeFileSync.call(void 0,
|
|
5086
5082
|
absolutePath,
|
|
5087
|
-
`${JSON.stringify(
|
|
5083
|
+
`${JSON.stringify(_chunkR4EFW2I2js.orderRunExportJson.call(void 0, this.rows), null, 2)}
|
|
5088
5084
|
`,
|
|
5089
5085
|
"utf-8"
|
|
5090
5086
|
);
|
|
5091
5087
|
return absolutePath;
|
|
5092
5088
|
}
|
|
5093
|
-
return
|
|
5089
|
+
return _chunkR4EFW2I2js.writeRunDatasetCsv.call(void 0, {
|
|
5094
5090
|
rows: this.rows,
|
|
5095
5091
|
columns: this.#info.columns,
|
|
5096
5092
|
outPath
|
|
@@ -5894,10 +5890,10 @@ function resolveOwnedPlayReferenceName(reference, ownerSlug) {
|
|
|
5894
5890
|
// ../plays/deploy/run-deployment.ts
|
|
5895
5891
|
var RUN_PLAY_METHOD_NAMES = /* @__PURE__ */ new Set(["runPlay", "runPlayAsync"]);
|
|
5896
5892
|
function isRunPlayReceiver(node) {
|
|
5897
|
-
return
|
|
5893
|
+
return _chunkKQSTV4MWjs.isAstNode.call(void 0, node) && node.type === "Identifier" && typeof node.name === "string" && (node.name === "ctx" || node.name.endsWith("Ctx"));
|
|
5898
5894
|
}
|
|
5899
5895
|
function stringLiteralValue(node) {
|
|
5900
|
-
if (!
|
|
5896
|
+
if (!_chunkKQSTV4MWjs.isAstNode.call(void 0, node)) return null;
|
|
5901
5897
|
if (node.type === "Literal" && typeof node.value === "string") {
|
|
5902
5898
|
return node.value;
|
|
5903
5899
|
}
|
|
@@ -5908,12 +5904,12 @@ function stringLiteralValue(node) {
|
|
|
5908
5904
|
return null;
|
|
5909
5905
|
}
|
|
5910
5906
|
async function extractRunPlayStringTargets(sourceCode) {
|
|
5911
|
-
const program =
|
|
5907
|
+
const program = _chunkKQSTV4MWjs.parsePlaySourceForAnalysis.call(void 0, sourceCode);
|
|
5912
5908
|
if (!program) return await _asyncNullishCoalesce(await extractWithCompiler(sourceCode), async () => ( []));
|
|
5913
5909
|
const targets = /* @__PURE__ */ new Set();
|
|
5914
5910
|
const visit = (node) => {
|
|
5915
5911
|
const callee = node.callee;
|
|
5916
|
-
if (node.type === "CallExpression" &&
|
|
5912
|
+
if (node.type === "CallExpression" && _chunkKQSTV4MWjs.isAstNode.call(void 0, callee) && callee.type === "MemberExpression" && callee.computed !== true && _chunkKQSTV4MWjs.isAstNode.call(void 0, callee.property) && RUN_PLAY_METHOD_NAMES.has(String(callee.property.name)) && isRunPlayReceiver(callee.object) && Array.isArray(node.arguments)) {
|
|
5917
5913
|
const playRef = stringLiteralValue(node.arguments[1]);
|
|
5918
5914
|
const ownedName = playRef === null ? null : resolveOwnedPlayReferenceName(playRef);
|
|
5919
5915
|
if (ownedName) targets.add(ownedName);
|
|
@@ -5921,7 +5917,7 @@ async function extractRunPlayStringTargets(sourceCode) {
|
|
|
5921
5917
|
for (const [key, value] of Object.entries(node)) {
|
|
5922
5918
|
if (key === "loc") continue;
|
|
5923
5919
|
for (const child of Array.isArray(value) ? value : [value]) {
|
|
5924
|
-
if (
|
|
5920
|
+
if (_chunkKQSTV4MWjs.isAstNode.call(void 0, child)) visit(child);
|
|
5925
5921
|
}
|
|
5926
5922
|
}
|
|
5927
5923
|
};
|
|
@@ -6787,7 +6783,7 @@ function renderOutcome(outcome) {
|
|
|
6787
6783
|
function printResult2(input) {
|
|
6788
6784
|
const failed = input.status === "failed" || input.status === "cancelled";
|
|
6789
6785
|
if (failed) process.exitCode = 1;
|
|
6790
|
-
|
|
6786
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
6791
6787
|
{
|
|
6792
6788
|
deployment: { ...input.deployment, status: input.status },
|
|
6793
6789
|
plays: input.outcomes,
|
|
@@ -6812,7 +6808,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6812
6808
|
const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
|
|
6813
6809
|
throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
|
|
6814
6810
|
});
|
|
6815
|
-
const { http, config } =
|
|
6811
|
+
const { http, config } = _chunk6WWBVWFQjs.getAuthedHttpClient.call(void 0, );
|
|
6816
6812
|
const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
|
|
6817
6813
|
const startDeployment = () => http.post("/api/v2/deployments", {
|
|
6818
6814
|
deliveryId,
|
|
@@ -6839,7 +6835,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6839
6835
|
},
|
|
6840
6836
|
{
|
|
6841
6837
|
bundle: bundleDeployPlayFile,
|
|
6842
|
-
fetchImpl:
|
|
6838
|
+
fetchImpl: _chunkWF5QE2IWjs.fetchWithDeploymentProtection,
|
|
6843
6839
|
// The plays are already here: "opening" the source is naming it.
|
|
6844
6840
|
openSource: async () => ({
|
|
6845
6841
|
open: async () => ({ repoRoot: root })
|
|
@@ -6965,7 +6961,7 @@ async function checkLocalPlayGraph(input) {
|
|
|
6965
6961
|
// src/cli/renderers/local-play-execution.ts
|
|
6966
6962
|
function renderLocalPlayExecutionPlan(plan, options = {}) {
|
|
6967
6963
|
if (options.dryRun) {
|
|
6968
|
-
|
|
6964
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
|
|
6969
6965
|
return;
|
|
6970
6966
|
}
|
|
6971
6967
|
process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
|
|
@@ -7137,7 +7133,7 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7137
7133
|
const startedAt = Date.now();
|
|
7138
7134
|
try {
|
|
7139
7135
|
const result = run();
|
|
7140
|
-
|
|
7136
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
7141
7137
|
phase,
|
|
7142
7138
|
ms: Date.now() - startedAt,
|
|
7143
7139
|
ok: true,
|
|
@@ -7145,7 +7141,7 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7145
7141
|
});
|
|
7146
7142
|
return result;
|
|
7147
7143
|
} catch (error) {
|
|
7148
|
-
|
|
7144
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
7149
7145
|
phase,
|
|
7150
7146
|
ms: Date.now() - startedAt,
|
|
7151
7147
|
ok: false,
|
|
@@ -7505,8 +7501,8 @@ async function ensureEditableRemotePlay(client, target) {
|
|
|
7505
7501
|
return detail;
|
|
7506
7502
|
}
|
|
7507
7503
|
function writeInlinePlay(code) {
|
|
7508
|
-
const filePath = _path.resolve.call(void 0,
|
|
7509
|
-
const source =
|
|
7504
|
+
const filePath = _path.resolve.call(void 0, _chunkKQSTV4MWjs.INLINE_PLAY_FILE);
|
|
7505
|
+
const source = _chunkKQSTV4MWjs.inlinePlaySource.call(void 0, code);
|
|
7510
7506
|
try {
|
|
7511
7507
|
_fs.writeFileSync.call(void 0, filePath, source, { flag: "wx" });
|
|
7512
7508
|
} catch (error) {
|
|
@@ -7524,8 +7520,9 @@ function buildMissingDefinePlayError(filePath) {
|
|
|
7524
7520
|
`Play file ${filePath} is not a play. Write the play as \`import deepline from 'deepline'; export default async function (input: T) { ... return { ... }; }\`.`
|
|
7525
7521
|
);
|
|
7526
7522
|
}
|
|
7527
|
-
function extractPlayName(code, filePath) {
|
|
7528
|
-
const
|
|
7523
|
+
async function extractPlayName(code, filePath) {
|
|
7524
|
+
const { extractDefinedPlayName } = await loadPlayBundler();
|
|
7525
|
+
const definedPlayName = extractDefinedPlayName(code, filePath);
|
|
7529
7526
|
if (definedPlayName) {
|
|
7530
7527
|
return definedPlayName;
|
|
7531
7528
|
}
|
|
@@ -7604,7 +7601,7 @@ function collectLocalFileInputRefs(value, inputPath, key, out) {
|
|
|
7604
7601
|
if (!trimmed || isUrlValue(trimmed)) {
|
|
7605
7602
|
return;
|
|
7606
7603
|
}
|
|
7607
|
-
const keyIsCsvData = key ===
|
|
7604
|
+
const keyIsCsvData = key === _chunkGVAENVIGjs.CSV_DATA_INPUT_KEY;
|
|
7608
7605
|
const endsWithCsv = /\.csv$/i.test(trimmed);
|
|
7609
7606
|
const looksLikeFile = /\.[a-z0-9]{1,8}$/i.test(trimmed);
|
|
7610
7607
|
if (keyIsCsvData) {
|
|
@@ -7635,14 +7632,14 @@ function collectLocalFileInputRefs(value, inputPath, key, out) {
|
|
|
7635
7632
|
}
|
|
7636
7633
|
}
|
|
7637
7634
|
function preflightLocalFileInputs(runtimeInput) {
|
|
7638
|
-
if (
|
|
7639
|
-
const csvValue = runtimeInput[
|
|
7635
|
+
if (_chunkGVAENVIGjs.CSV_DATA_INPUT_KEY in runtimeInput) {
|
|
7636
|
+
const csvValue = runtimeInput[_chunkGVAENVIGjs.CSV_DATA_INPUT_KEY];
|
|
7640
7637
|
if (typeof csvValue === "string" && csvValue.trim().length === 0) {
|
|
7641
7638
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
7642
|
-
`Input ${
|
|
7639
|
+
`Input ${_chunkGVAENVIGjs.CSV_DATA_INPUT_KEY} is an empty string. Provide a path to a CSV file (or a CSV URL). No run was created.`,
|
|
7643
7640
|
void 0,
|
|
7644
7641
|
"PLAY_INPUT_FILE_PREFLIGHT",
|
|
7645
|
-
{ inputPath:
|
|
7642
|
+
{ inputPath: _chunkGVAENVIGjs.CSV_DATA_INPUT_KEY, reason: "csv_empty_string" }
|
|
7646
7643
|
);
|
|
7647
7644
|
}
|
|
7648
7645
|
}
|
|
@@ -7709,7 +7706,7 @@ var NODE_STAGED_FILE_CODEC = {
|
|
|
7709
7706
|
)
|
|
7710
7707
|
};
|
|
7711
7708
|
async function stageFileInputArgs(input) {
|
|
7712
|
-
return
|
|
7709
|
+
return _chunkGVAENVIGjs.stageFileInputs.call(void 0, {
|
|
7713
7710
|
stage: (files) => input.client.stagePlayFiles(files),
|
|
7714
7711
|
runtimeInput: input.runtimeInput,
|
|
7715
7712
|
bindings: input.bindings,
|
|
@@ -7733,7 +7730,7 @@ function stageFile(logicalPath, absolutePath) {
|
|
|
7733
7730
|
logicalPath,
|
|
7734
7731
|
contentBase64: buffer.toString("base64"),
|
|
7735
7732
|
contentHash: _crypto.createHash.call(void 0, "sha256").update(buffer).digest("hex"),
|
|
7736
|
-
contentType:
|
|
7733
|
+
contentType: _chunkGVAENVIGjs.stagedFileContentType.call(void 0, absolutePath),
|
|
7737
7734
|
bytes: buffer.byteLength
|
|
7738
7735
|
};
|
|
7739
7736
|
}
|
|
@@ -7754,7 +7751,7 @@ function unresolvedPackagedFilesMessage(node) {
|
|
|
7754
7751
|
const details = node.unresolvedFileReferences.map((unresolved) => `${unresolved.sourceFragment}: ${unresolved.message}`).join("; ");
|
|
7755
7752
|
return `Failed to package local deepline.csv(...) files in ${node.filePath}: ${details}`;
|
|
7756
7753
|
}
|
|
7757
|
-
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName =
|
|
7754
|
+
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName = _chunkKQSTV4MWjs.PLAY_DEFAULT_EXPORT, options = {}) {
|
|
7758
7755
|
const playBundler = await loadPlayBundler();
|
|
7759
7756
|
const nodes = /* @__PURE__ */ new Map();
|
|
7760
7757
|
const diagnostics = [];
|
|
@@ -7768,7 +7765,7 @@ async function collectBundledPlayGraph(entryFile, profile = null, entryExportNam
|
|
|
7768
7765
|
const bundleResult = await playBundler.bundlePlayFile(absolutePath, {
|
|
7769
7766
|
target: artifactKind,
|
|
7770
7767
|
...options.cache === false ? { cache: false } : {},
|
|
7771
|
-
...absolutePath === rootPath && entryExportName !==
|
|
7768
|
+
...absolutePath === rootPath && entryExportName !== _chunkKQSTV4MWjs.PLAY_DEFAULT_EXPORT ? { exportName: entryExportName } : {}
|
|
7772
7769
|
});
|
|
7773
7770
|
if (bundleResult.success === false) {
|
|
7774
7771
|
diagnostics.push(
|
|
@@ -7808,7 +7805,7 @@ async function compileBundledPlayGraphManifests(client, graph) {
|
|
|
7808
7805
|
}
|
|
7809
7806
|
await compileNode(child);
|
|
7810
7807
|
}
|
|
7811
|
-
const name =
|
|
7808
|
+
const name = await _asyncNullishCoalesce(node.playName, async () => ( await extractPlayName(node.sourceCode, node.filePath)));
|
|
7812
7809
|
node.compilerManifest = await client.compilePlayManifest({
|
|
7813
7810
|
name,
|
|
7814
7811
|
sourceCode: node.sourceCode,
|
|
@@ -7932,7 +7929,7 @@ function playStatusErrorText(status) {
|
|
|
7932
7929
|
function isRetryablePendingStartFailure(status) {
|
|
7933
7930
|
if (status.status !== "failed") return false;
|
|
7934
7931
|
if (status.runId && status.runId !== "pending") return false;
|
|
7935
|
-
return
|
|
7932
|
+
return _chunkD3UHG54Vjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
|
|
7936
7933
|
}
|
|
7937
7934
|
function isAmbiguousPlayStartOutcomeError(error) {
|
|
7938
7935
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && typeof error.statusCode === "number") {
|
|
@@ -7981,13 +7978,13 @@ var PlayStartOutcomeUnknownError = (_class = class extends _chunkDIAWYWT5js.Deep
|
|
|
7981
7978
|
}, _class);
|
|
7982
7979
|
function watchSurfaceReaches(state, provenance, level) {
|
|
7983
7980
|
const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
|
|
7984
|
-
if (!
|
|
7981
|
+
if (!_chunkD3UHG54Vjs.logLevelReaches.call(void 0, level, minimumLevel)) {
|
|
7985
7982
|
return false;
|
|
7986
7983
|
}
|
|
7987
|
-
if (
|
|
7984
|
+
if (_chunkD3UHG54Vjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
|
|
7988
7985
|
return true;
|
|
7989
7986
|
}
|
|
7990
|
-
return state.verbose === true &&
|
|
7987
|
+
return state.verbose === true && _chunkD3UHG54Vjs.logProvenanceReaches.call(void 0, provenance, "debug");
|
|
7991
7988
|
}
|
|
7992
7989
|
function getEventPayload(event) {
|
|
7993
7990
|
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
@@ -8489,7 +8486,7 @@ function resolveRunPlayName(status, runId) {
|
|
|
8489
8486
|
}
|
|
8490
8487
|
function openPlayDashboard(dashboardUrl, open2) {
|
|
8491
8488
|
if (open2 && dashboardUrl) {
|
|
8492
|
-
|
|
8489
|
+
_chunk6WWBVWFQjs.openInBrowser.call(void 0, dashboardUrl);
|
|
8493
8490
|
}
|
|
8494
8491
|
}
|
|
8495
8492
|
function printPlayLogLines(input) {
|
|
@@ -8543,7 +8540,10 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8543
8540
|
admissionConfirmed = true;
|
|
8544
8541
|
await _optionalChain([input, 'access', _299 => _299.onRunAdmitted, 'optionalCall', _300 => _300(input.workflowId)]);
|
|
8545
8542
|
};
|
|
8546
|
-
const withDashboardUrl = (status) =>
|
|
8543
|
+
const withDashboardUrl = (status) => carryFullDurableTerminalStatus(
|
|
8544
|
+
status,
|
|
8545
|
+
input.dashboardUrl ? { ...status, dashboardUrl: input.dashboardUrl } : status
|
|
8546
|
+
);
|
|
8547
8547
|
const finishTerminalStatus = async (status) => {
|
|
8548
8548
|
if (status.runId === input.workflowId && statusProvesPlayRunExecution(status.status)) {
|
|
8549
8549
|
await confirmAdmission();
|
|
@@ -8566,7 +8566,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8566
8566
|
...input.fullJson === void 0 ? {} : { full: input.fullJson }
|
|
8567
8567
|
});
|
|
8568
8568
|
} catch (error) {
|
|
8569
|
-
if (
|
|
8569
|
+
if (_chunkD3UHG54Vjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
8570
8570
|
return null;
|
|
8571
8571
|
}
|
|
8572
8572
|
throw error;
|
|
@@ -8646,9 +8646,9 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8646
8646
|
signal: controller.signal,
|
|
8647
8647
|
deferLogs: !input.emitLogs,
|
|
8648
8648
|
omitTerminalLogs: !input.emitLogs,
|
|
8649
|
-
...
|
|
8649
|
+
..._chunkBJMEXKZYjs.isCliTraceEnabled.call(void 0, ) ? {
|
|
8650
8650
|
onPoll: (observation) => {
|
|
8651
|
-
|
|
8651
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
8652
8652
|
phase: "play_watch_poll",
|
|
8653
8653
|
workflowId: input.workflowId,
|
|
8654
8654
|
ms: observation.durationMs,
|
|
@@ -8662,7 +8662,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8662
8662
|
full: input.fullJson,
|
|
8663
8663
|
billing: false,
|
|
8664
8664
|
onStatus: async (status) => {
|
|
8665
|
-
|
|
8665
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
8666
8666
|
phase: "play_watch_terminal_status",
|
|
8667
8667
|
workflowId: input.workflowId,
|
|
8668
8668
|
full: input.fullJson === true
|
|
@@ -8731,8 +8731,8 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8731
8731
|
...input.cliAdmission ? { cliAdmission: true } : {}
|
|
8732
8732
|
});
|
|
8733
8733
|
} catch (error) {
|
|
8734
|
-
if (!(error instanceof
|
|
8735
|
-
await
|
|
8734
|
+
if (!(error instanceof _chunkGVAENVIGjs.CliPlayAdmissionUnsupportedError)) throw error;
|
|
8735
|
+
await _chunkKPXP2DIYjs.checkPlayRunCompatibility.call(void 0,
|
|
8736
8736
|
input.client.baseUrl,
|
|
8737
8737
|
input.maintenancePolicy
|
|
8738
8738
|
);
|
|
@@ -8780,7 +8780,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8780
8780
|
}
|
|
8781
8781
|
openPlayDashboard(dashboardUrl, _nullishCoalesce(input.open, () => ( false)));
|
|
8782
8782
|
input.progress.phase("running");
|
|
8783
|
-
|
|
8783
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
8784
8784
|
phase: "cli.play_start_admitted",
|
|
8785
8785
|
ms: Date.now() - startedAt,
|
|
8786
8786
|
ok: true,
|
|
@@ -8797,7 +8797,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8797
8797
|
startedAt,
|
|
8798
8798
|
waitTimeoutMs: input.waitTimeoutMs
|
|
8799
8799
|
});
|
|
8800
|
-
const initialStatus =
|
|
8800
|
+
const initialStatus = _chunkD3UHG54Vjs.normalizePlayStatus.call(void 0, initialTerminal);
|
|
8801
8801
|
const status2 = await resolvePlayRunOutputStatus({
|
|
8802
8802
|
client: input.client,
|
|
8803
8803
|
status: initialStatus,
|
|
@@ -8805,7 +8805,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8805
8805
|
jsonOutput: input.jsonOutput,
|
|
8806
8806
|
fromDurableStatus: true
|
|
8807
8807
|
});
|
|
8808
|
-
|
|
8808
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
8809
8809
|
phase: "play_watch_terminal_status",
|
|
8810
8810
|
workflowId,
|
|
8811
8811
|
full: true,
|
|
@@ -8836,10 +8836,19 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8836
8836
|
return input.request.revisionId ? { ...status, revisionId: input.request.revisionId } : status;
|
|
8837
8837
|
}
|
|
8838
8838
|
async function startAndWaitForPlayCompletionByStream(input) {
|
|
8839
|
-
const
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8839
|
+
const admissionStartedAt = Date.now();
|
|
8840
|
+
const prepared = await input.client.preparePlayRunAdmission(
|
|
8841
|
+
{
|
|
8842
|
+
...input.request,
|
|
8843
|
+
...input.jsonOutput && input.fullJson === true ? { terminalStatus: "full" } : {}
|
|
8844
|
+
},
|
|
8845
|
+
{
|
|
8846
|
+
cliAdmission: input.cliAdmission,
|
|
8847
|
+
onSubmission: input.onSubmission,
|
|
8848
|
+
...input.admissionCapability ? { admissionCapability: input.admissionCapability } : {}
|
|
8849
|
+
}
|
|
8850
|
+
);
|
|
8851
|
+
const remainingWaitTimeout = () => input.waitTimeoutMs === null ? null : Math.max(1, input.waitTimeoutMs - (Date.now() - admissionStartedAt));
|
|
8843
8852
|
const pinnedInput = {
|
|
8844
8853
|
...input,
|
|
8845
8854
|
request: prepared.body,
|
|
@@ -8848,26 +8857,41 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8848
8857
|
};
|
|
8849
8858
|
const retryDelays = prepared.supportsCallerIntent ? PLAY_START_TRANSIENT_RETRY_DELAYS_MS : [];
|
|
8850
8859
|
for (let attempt = 0; attempt <= retryDelays.length; attempt += 1) {
|
|
8860
|
+
assertPlayWaitNotTimedOut({
|
|
8861
|
+
workflowId: _nullishCoalesce(prepared.workflowId, () => ( "")),
|
|
8862
|
+
startedAt: admissionStartedAt,
|
|
8863
|
+
waitTimeoutMs: input.waitTimeoutMs
|
|
8864
|
+
});
|
|
8851
8865
|
let status;
|
|
8852
8866
|
try {
|
|
8853
8867
|
const notice = { value: null };
|
|
8854
8868
|
status = withRateLimitedNotice(
|
|
8855
8869
|
await startAndWaitForPlayCompletionByStreamOnce({
|
|
8856
8870
|
...pinnedInput,
|
|
8871
|
+
waitTimeoutMs: remainingWaitTimeout(),
|
|
8857
8872
|
rateLimitedNotice: notice
|
|
8858
8873
|
}),
|
|
8859
8874
|
notice.value
|
|
8860
8875
|
);
|
|
8861
8876
|
} catch (error) {
|
|
8862
|
-
if (error instanceof
|
|
8863
|
-
await
|
|
8877
|
+
if (error instanceof _chunkGVAENVIGjs.CliPlayAdmissionUnsupportedError && input.cliAdmission) {
|
|
8878
|
+
await _chunkKPXP2DIYjs.checkPlayRunCompatibility.call(void 0,
|
|
8864
8879
|
input.client.baseUrl,
|
|
8865
8880
|
input.maintenancePolicy
|
|
8866
8881
|
);
|
|
8867
|
-
|
|
8882
|
+
assertPlayWaitNotTimedOut({
|
|
8883
|
+
workflowId: _nullishCoalesce(prepared.workflowId, () => ( "")),
|
|
8884
|
+
startedAt: admissionStartedAt,
|
|
8885
|
+
waitTimeoutMs: input.waitTimeoutMs
|
|
8886
|
+
});
|
|
8887
|
+
const legacyStart = input.onSubmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion;
|
|
8888
|
+
return legacyStart({
|
|
8868
8889
|
...input,
|
|
8890
|
+
request: prepared.body,
|
|
8891
|
+
onSubmission: void 0,
|
|
8869
8892
|
cliAdmission: false,
|
|
8870
|
-
streamTerminalWindowMs: void 0
|
|
8893
|
+
streamTerminalWindowMs: void 0,
|
|
8894
|
+
waitTimeoutMs: remainingWaitTimeout()
|
|
8871
8895
|
});
|
|
8872
8896
|
}
|
|
8873
8897
|
if (!(error instanceof RetryablePlayStartAttemptError)) throw error;
|
|
@@ -8887,7 +8911,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8887
8911
|
`[play watch] start response was ambiguous; retrying the same caller intent (${error.message})`
|
|
8888
8912
|
);
|
|
8889
8913
|
}
|
|
8890
|
-
|
|
8914
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
8891
8915
|
phase: "cli.play_start_stream_retry",
|
|
8892
8916
|
ms: 0,
|
|
8893
8917
|
ok: true,
|
|
@@ -8908,7 +8932,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8908
8932
|
`[play watch] start failed before run id with a transient error; retrying (${playStatusErrorText(status)})`
|
|
8909
8933
|
);
|
|
8910
8934
|
}
|
|
8911
|
-
|
|
8935
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
8912
8936
|
phase: "cli.play_start_stream_retry",
|
|
8913
8937
|
ms: 0,
|
|
8914
8938
|
ok: true,
|
|
@@ -8953,7 +8977,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
8953
8977
|
if (launchConfirmed || !runId || runId === "pending") return;
|
|
8954
8978
|
launchConfirmed = true;
|
|
8955
8979
|
await _optionalChain([input, 'access', _312 => _312.onRunAdmitted, 'optionalCall', _313 => _313(runId)]);
|
|
8956
|
-
|
|
8980
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
8957
8981
|
phase: "cli.play_start_admitted",
|
|
8958
8982
|
ms: Date.now() - startedAt,
|
|
8959
8983
|
ok: true,
|
|
@@ -8987,7 +9011,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
8987
9011
|
full: input.fullJson
|
|
8988
9012
|
});
|
|
8989
9013
|
} catch (error) {
|
|
8990
|
-
if (
|
|
9014
|
+
if (_chunkD3UHG54Vjs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
8991
9015
|
return null;
|
|
8992
9016
|
}
|
|
8993
9017
|
throw error;
|
|
@@ -9006,6 +9030,11 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9006
9030
|
signal: controller.signal
|
|
9007
9031
|
})) {
|
|
9008
9032
|
eventCount += 1;
|
|
9033
|
+
const expectedFullRunId = _optionalChain([input, 'access', _314 => _314.request, 'access', _315 => _315.workflowId, 'optionalAccess', _316 => _316.trim, 'call', _317 => _317()]) || lastKnownWorkflowId;
|
|
9034
|
+
const eventRunId = getRunIdFromLiveEvent(event);
|
|
9035
|
+
const pinnedRunId = input.fullJson === true && input.request.terminalStatus === "full" ? _optionalChain([input, 'access', _318 => _318.request, 'access', _319 => _319.workflowId, 'optionalAccess', _320 => _320.trim, 'call', _321 => _321()]) : void 0;
|
|
9036
|
+
if (pinnedRunId && eventRunId && eventRunId !== "pending" && eventRunId !== pinnedRunId)
|
|
9037
|
+
continue;
|
|
9009
9038
|
const eventRevisionId = getStringField(
|
|
9010
9039
|
getEventPayload(event),
|
|
9011
9040
|
"revisionId"
|
|
@@ -9013,17 +9042,16 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9013
9042
|
if (eventRevisionId) {
|
|
9014
9043
|
launchedRevisionId = eventRevisionId;
|
|
9015
9044
|
}
|
|
9016
|
-
const eventRateLimited = _optionalChain([getEventPayload, 'call',
|
|
9045
|
+
const eventRateLimited = _optionalChain([getEventPayload, 'call', _322 => _322(event), 'optionalAccess', _323 => _323.rateLimited]);
|
|
9017
9046
|
if (eventRateLimited && typeof eventRateLimited === "object") {
|
|
9018
9047
|
notice.value = eventRateLimited;
|
|
9019
9048
|
}
|
|
9020
|
-
const eventRunId = getRunIdFromLiveEvent(event);
|
|
9021
9049
|
if (typeof eventRunId === "string" && eventRunId && eventRunId !== "pending") {
|
|
9022
9050
|
const runStartedNow = !lastKnownWorkflowId;
|
|
9023
9051
|
lastKnownWorkflowId = eventRunId;
|
|
9024
9052
|
firstRunIdMs ??= Date.now() - startedAt;
|
|
9025
9053
|
if (runStartedNow) {
|
|
9026
|
-
await _optionalChain([input, 'access',
|
|
9054
|
+
await _optionalChain([input, 'access', _324 => _324.onRunStarted, 'optionalCall', _325 => _325(eventRunId)]);
|
|
9027
9055
|
}
|
|
9028
9056
|
}
|
|
9029
9057
|
if (!launchConfirmed && eventConfirmsPlayRunLaunch(event) && eventRunId === lastKnownWorkflowId) {
|
|
@@ -9112,9 +9140,12 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9112
9140
|
...launchedRevisionId ? { revisionId: launchedRevisionId } : {}
|
|
9113
9141
|
};
|
|
9114
9142
|
}
|
|
9115
|
-
|
|
9143
|
+
const fullPackage = getPlayRunPackage(finalStatus);
|
|
9144
|
+
const fullRun = readRecord(_optionalChain([fullPackage, 'optionalAccess', _326 => _326.run]));
|
|
9145
|
+
const reuseFullTerminal = input.jsonOutput && input.fullJson === true && input.request.terminalStatus === "full" && expectedFullRunId !== "" && finalStatus.runId === expectedFullRunId && _optionalChain([fullRun, 'optionalAccess', _327 => _327.id]) === expectedFullRunId && finalStatus.status === "completed" && fullRun.status === "completed" && finalStatus.finalStatusView === "full" && _optionalChain([fullPackage, 'optionalAccess', _328 => _328.resultState]) === "available" && Object.hasOwn(fullPackage, "result") && fullPackage.stepsExpected === false && Array.isArray(fullPackage.steps) && fullPackage.steps.length === 0 && Array.isArray(fullPackage.datasets) && fullPackage.datasets.length === 0;
|
|
9146
|
+
let fromDurableStatus = reuseFullTerminal;
|
|
9116
9147
|
let canonicalTerminal;
|
|
9117
|
-
if (input.request.profile === "absurd") {
|
|
9148
|
+
if (input.request.profile === "absurd" && !reuseFullTerminal) {
|
|
9118
9149
|
canonicalTerminal = await fetchKnownTerminalStatus();
|
|
9119
9150
|
fromDurableStatus = canonicalTerminal !== null;
|
|
9120
9151
|
} else {
|
|
@@ -9125,7 +9156,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9125
9156
|
};
|
|
9126
9157
|
}
|
|
9127
9158
|
if (!canonicalTerminal) {
|
|
9128
|
-
|
|
9159
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
9129
9160
|
phase: "cli.play_start_stream_stale_terminal_ignored",
|
|
9130
9161
|
ms: Date.now() - startedAt,
|
|
9131
9162
|
ok: true,
|
|
@@ -9146,14 +9177,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9146
9177
|
fromDurableStatus
|
|
9147
9178
|
}) : canonicalTerminal;
|
|
9148
9179
|
if (input.fullJson === true) {
|
|
9149
|
-
|
|
9180
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
9150
9181
|
phase: "play_watch_terminal_status",
|
|
9151
9182
|
workflowId: outputTerminal.runId || lastKnownWorkflowId || void 0,
|
|
9152
9183
|
full: true,
|
|
9153
9184
|
source: outputTerminal === canonicalTerminal ? fromDurableStatus ? "start_stream_durable" : "start_stream" : "durable_repair"
|
|
9154
9185
|
});
|
|
9155
9186
|
}
|
|
9156
|
-
|
|
9187
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
9157
9188
|
phase: "cli.play_start_stream_terminal",
|
|
9158
9189
|
ms: Date.now() - startedAt,
|
|
9159
9190
|
ok: true,
|
|
@@ -9173,7 +9204,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9173
9204
|
clearTimeout(timeout);
|
|
9174
9205
|
}
|
|
9175
9206
|
controller.abort();
|
|
9176
|
-
|
|
9207
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
9177
9208
|
phase: "cli.play_start_stream_handoff_to_tail",
|
|
9178
9209
|
ms: Date.now() - startedAt,
|
|
9179
9210
|
ok: true,
|
|
@@ -9204,7 +9235,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9204
9235
|
if (timedOut) {
|
|
9205
9236
|
const terminal = await fetchKnownTerminalStatus();
|
|
9206
9237
|
if (terminal) {
|
|
9207
|
-
|
|
9238
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
9208
9239
|
phase: "cli.play_start_stream_timeout_status_reconcile",
|
|
9209
9240
|
ms: Date.now() - startedAt,
|
|
9210
9241
|
ok: true,
|
|
@@ -9224,7 +9255,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9224
9255
|
lastPhase
|
|
9225
9256
|
});
|
|
9226
9257
|
}
|
|
9227
|
-
if (lastKnownWorkflowId && (terminalWindowExpired ||
|
|
9258
|
+
if (lastKnownWorkflowId && (terminalWindowExpired || _chunkD3UHG54Vjs.isTransientPlayRunReadError.call(void 0, error))) {
|
|
9228
9259
|
if (timeout) {
|
|
9229
9260
|
clearTimeout(timeout);
|
|
9230
9261
|
}
|
|
@@ -9235,7 +9266,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9235
9266
|
`
|
|
9236
9267
|
);
|
|
9237
9268
|
}
|
|
9238
|
-
|
|
9269
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
9239
9270
|
phase: "cli.play_start_stream_reconnect",
|
|
9240
9271
|
ms: Date.now() - startedAt,
|
|
9241
9272
|
ok: true,
|
|
@@ -9262,7 +9293,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9262
9293
|
});
|
|
9263
9294
|
}
|
|
9264
9295
|
if (!lastKnownWorkflowId && isAmbiguousPlayStartOutcomeError(error)) {
|
|
9265
|
-
|
|
9296
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
9266
9297
|
phase: "cli.play_start_stream_transient_failure",
|
|
9267
9298
|
ms: Date.now() - startedAt,
|
|
9268
9299
|
ok: false,
|
|
@@ -9290,7 +9321,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9290
9321
|
`[play watch] start stream ended after run ${lastKnownWorkflowId}; reconnecting to canonical run stream`
|
|
9291
9322
|
);
|
|
9292
9323
|
}
|
|
9293
|
-
|
|
9324
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
9294
9325
|
phase: "cli.play_start_stream_reconnect",
|
|
9295
9326
|
ms: Date.now() - startedAt,
|
|
9296
9327
|
ok: true,
|
|
@@ -9370,29 +9401,29 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
|
|
|
9370
9401
|
"logs"
|
|
9371
9402
|
]);
|
|
9372
9403
|
function formatPlayLogLine(rawLine, state) {
|
|
9373
|
-
const classified =
|
|
9404
|
+
const classified = _chunkD3UHG54Vjs.classifyLogLine.call(void 0, rawLine);
|
|
9374
9405
|
const line = classified.line;
|
|
9375
9406
|
const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
|
|
9376
|
-
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess',
|
|
9407
|
+
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _329 => _329[1]]) ? new Date(timestampMatch[1]) : null;
|
|
9377
9408
|
const timestamp = parsedTimestamp && !Number.isNaN(parsedTimestamp.getTime()) ? parsedTimestamp.toLocaleTimeString("en-US", {
|
|
9378
9409
|
hour12: false,
|
|
9379
9410
|
hour: "2-digit",
|
|
9380
9411
|
minute: "2-digit",
|
|
9381
9412
|
second: "2-digit"
|
|
9382
9413
|
}) : null;
|
|
9383
|
-
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess',
|
|
9414
|
+
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _330 => _330[2]]), () => ( line));
|
|
9384
9415
|
const prefix = timestamp ? `${timestamp} ` : "";
|
|
9385
9416
|
if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
|
|
9386
9417
|
const providerWait = formatProviderCapacityWaitLogLine(line);
|
|
9387
9418
|
if (providerWait && !state.verbose) {
|
|
9388
|
-
return
|
|
9419
|
+
return _chunkD3UHG54Vjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
|
|
9389
9420
|
}
|
|
9390
9421
|
const mapProgress = formatMapProgressDiagnosticLogLine(line);
|
|
9391
9422
|
if (mapProgress && !state.verbose) {
|
|
9392
|
-
return
|
|
9423
|
+
return _chunkD3UHG54Vjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
|
|
9393
9424
|
}
|
|
9394
9425
|
if (/\[worker\] picked up run\b/.test(message)) {
|
|
9395
|
-
if (!
|
|
9426
|
+
if (!_chunkD3UHG54Vjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9396
9427
|
return null;
|
|
9397
9428
|
}
|
|
9398
9429
|
if (state.emittedRunnerStarted) {
|
|
@@ -9405,7 +9436,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
9405
9436
|
/^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
|
|
9406
9437
|
);
|
|
9407
9438
|
if (mapStart) {
|
|
9408
|
-
if (!
|
|
9439
|
+
if (!_chunkD3UHG54Vjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9409
9440
|
return null;
|
|
9410
9441
|
}
|
|
9411
9442
|
const [, rows, fields2, namespace, cached, pending] = mapStart;
|
|
@@ -9415,7 +9446,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
9415
9446
|
/^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
|
|
9416
9447
|
);
|
|
9417
9448
|
if (mapDone) {
|
|
9418
|
-
if (!
|
|
9449
|
+
if (!_chunkD3UHG54Vjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9419
9450
|
return null;
|
|
9420
9451
|
}
|
|
9421
9452
|
const [, results, executed, cached] = mapDone;
|
|
@@ -9597,20 +9628,20 @@ function collectDatasetHandleLines(value, path = "result") {
|
|
|
9597
9628
|
function buildRunWarnings(status, rowsInfo) {
|
|
9598
9629
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
9599
9630
|
const result = readRecord(status.result);
|
|
9600
|
-
const metadata = readRecord(_optionalChain([result, 'optionalAccess',
|
|
9601
|
-
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess',
|
|
9631
|
+
const metadata = readRecord(_optionalChain([result, 'optionalAccess', _331 => _331._metadata]));
|
|
9632
|
+
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess', _332 => _332.outputWarnings])) ? metadata.outputWarnings.map((warning) => readRecord(warning)).filter((warning) => {
|
|
9602
9633
|
if (!warning) return false;
|
|
9603
9634
|
return !(rowsInfo && !rowsInfo.complete && warning.reason === "array_preview_limit" && warning.originalItems === rowsInfo.totalRows && warning.retainedItems === rowsInfo.rows.length);
|
|
9604
|
-
}).map((warning) => _optionalChain([warning, 'optionalAccess',
|
|
9635
|
+
}).map((warning) => _optionalChain([warning, 'optionalAccess', _333 => _333.message])).filter(
|
|
9605
9636
|
(message) => typeof message === "string" && message.trim().length > 0
|
|
9606
9637
|
).slice(0, 16) : [];
|
|
9607
|
-
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess',
|
|
9638
|
+
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _334 => _334.hasRowFailures]) ? [
|
|
9608
9639
|
`${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.`
|
|
9609
9640
|
] : [];
|
|
9610
|
-
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9641
|
+
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _335 => _335.supersededRows]), () => ( 0))) > 0 ? [
|
|
9611
9642
|
`Latest-write-wins: ${formatSupersededRowsNotice(_nullishCoalesce(rowOutcomes.supersededRows, () => ( 0)))}; the newer write still owns that Runtime Sheet row.`
|
|
9612
9643
|
] : [];
|
|
9613
|
-
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess',
|
|
9644
|
+
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _336 => _336.totalRows]) === 0) {
|
|
9614
9645
|
return [
|
|
9615
9646
|
...rowOutcomeWarnings,
|
|
9616
9647
|
...supersededRowNotices,
|
|
@@ -9629,7 +9660,7 @@ function buildRunWarnings(status, rowsInfo) {
|
|
|
9629
9660
|
return [...rowOutcomeWarnings, ...supersededRowNotices, ...outputWarnings];
|
|
9630
9661
|
}
|
|
9631
9662
|
function buildRunNextCommands(status) {
|
|
9632
|
-
const runId = _optionalChain([status, 'access',
|
|
9663
|
+
const runId = _optionalChain([status, 'access', _337 => _337.runId, 'optionalAccess', _338 => _338.trim, 'call', _339 => _339()]);
|
|
9633
9664
|
if (!runId) {
|
|
9634
9665
|
const playName = extractRunPlayName(status);
|
|
9635
9666
|
return playName ? {
|
|
@@ -9780,14 +9811,14 @@ function extractToolIdFromErrorText(text) {
|
|
|
9780
9811
|
return null;
|
|
9781
9812
|
}
|
|
9782
9813
|
const lowerToolMatch = /\btool\s+([A-Za-z0-9_.:-]+)\s+\d{3}\b/.exec(text);
|
|
9783
|
-
if (_optionalChain([lowerToolMatch, 'optionalAccess',
|
|
9814
|
+
if (_optionalChain([lowerToolMatch, 'optionalAccess', _340 => _340[1]])) {
|
|
9784
9815
|
return lowerToolMatch[1];
|
|
9785
9816
|
}
|
|
9786
9817
|
const upperToolMatch = /\bTool\s+([A-Za-z0-9_.:-]+)\s+failed\b/.exec(text);
|
|
9787
|
-
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess',
|
|
9818
|
+
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _341 => _341[1]]), () => ( null));
|
|
9788
9819
|
}
|
|
9789
9820
|
function isInsufficientCreditsBilling(billing) {
|
|
9790
|
-
return _optionalChain([billing, 'optionalAccess',
|
|
9821
|
+
return _optionalChain([billing, 'optionalAccess', _342 => _342.kind]) === "insufficient_credits";
|
|
9791
9822
|
}
|
|
9792
9823
|
function extractBillingForStatus(status, error) {
|
|
9793
9824
|
const errorBilling = getObjectField(status, "errorBilling");
|
|
@@ -9829,8 +9860,8 @@ function formatInsufficientCreditsMessage(input) {
|
|
|
9829
9860
|
function buildInsufficientCreditsSummaryLines(input) {
|
|
9830
9861
|
const progress = input.status.progress;
|
|
9831
9862
|
const rowsInfo = extractCanonicalRowsInfo(input.status);
|
|
9832
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
9833
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
9863
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _343 => _343.rows, 'access', _344 => _344.length]))), () => ( null));
|
|
9864
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _345 => _345.totalRows]))), () => ( null));
|
|
9834
9865
|
const lines = [
|
|
9835
9866
|
" status: stopped_insufficient_credits",
|
|
9836
9867
|
completed === null ? " completed rows: unknown" : ` completed rows: ${formatInteger(completed)}${total !== null ? ` of ${formatInteger(total)}` : ""}`,
|
|
@@ -9849,7 +9880,7 @@ function buildInsufficientCreditsSummaryLines(input) {
|
|
|
9849
9880
|
lines.push(" ask user: ask whether they want to add Deepline credits");
|
|
9850
9881
|
lines.push(` top up after approval: ${recovery.topUp}`);
|
|
9851
9882
|
lines.push(` checkout fallback: ${recovery.checkout}`);
|
|
9852
|
-
const runId = _optionalChain([input, 'access',
|
|
9883
|
+
const runId = _optionalChain([input, 'access', _346 => _346.status, 'access', _347 => _347.runId, 'optionalAccess', _348 => _348.trim, 'call', _349 => _349()]);
|
|
9853
9884
|
if (runId) {
|
|
9854
9885
|
lines.push(` inspect: deepline runs get ${runId}`);
|
|
9855
9886
|
lines.push(
|
|
@@ -9931,10 +9962,10 @@ function normalizeRunStatusForEnvelope(status) {
|
|
|
9931
9962
|
function normalizeProgressForEnvelope(status, rowsInfo) {
|
|
9932
9963
|
const progress = status.progress;
|
|
9933
9964
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
9934
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9935
|
-
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9936
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9937
|
-
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9965
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _350 => _350.totalRows]), () => ( getNumericField(progress, "totalRows"))), () => ( getNumericField(progress, "total"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _351 => _351.totalRows]))), () => ( null));
|
|
9966
|
+
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _352 => _352.failedRows]), () => ( getNumericField(progress, "failed"))), () => ( getNumericField(progress, "failedRows"))), () => ( null));
|
|
9967
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _353 => _353.completedRows]), () => ( getNumericField(progress, "completed"))), () => ( getNumericField(progress, "completedRows"))), () => ( (status.status === "completed" ? total : null)));
|
|
9968
|
+
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _354 => _354.supersededRows]), () => ( getNumericField(progress, "supersededRows")));
|
|
9938
9969
|
const supersededOffset = _nullishCoalesce(supersededRows, () => ( 0));
|
|
9939
9970
|
const progressPending = getNumericField(progress, "pending");
|
|
9940
9971
|
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)));
|
|
@@ -10004,7 +10035,7 @@ function normalizeErrorsForEnvelope(status, error) {
|
|
|
10004
10035
|
];
|
|
10005
10036
|
}
|
|
10006
10037
|
function normalizeLogsForEnvelope(status) {
|
|
10007
|
-
const logs = Array.isArray(_optionalChain([status, 'access',
|
|
10038
|
+
const logs = Array.isArray(_optionalChain([status, 'access', _355 => _355.progress, 'optionalAccess', _356 => _356.logs])) ? status.progress.logs : [];
|
|
10008
10039
|
const totalCount = logs.length;
|
|
10009
10040
|
const entries = logs.slice(Math.max(0, logs.length - RUN_LOG_PREVIEW_LIMIT));
|
|
10010
10041
|
const firstSequence = entries.length === 0 ? null : logs.length - entries.length + 1;
|
|
@@ -10061,7 +10092,7 @@ function compactPlayStatus(status) {
|
|
|
10061
10092
|
const packaged = getPlayRunPackage(status);
|
|
10062
10093
|
if (packaged) {
|
|
10063
10094
|
const packagedRun = readRecord(packaged.run);
|
|
10064
|
-
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess',
|
|
10095
|
+
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess', _357 => _357.error]) === "string" ? packagedRun.error : null;
|
|
10065
10096
|
const error2 = _nullishCoalesce(selectRunErrorForDisplay(status), () => ( (typeof status.error === "string" ? String(status.error) : packagedError)));
|
|
10066
10097
|
const compactError = error2 ? compactRunErrorForEnvelope(error2, status.runId) : null;
|
|
10067
10098
|
const rowOutcomes2 = readRowOutcomeSummary(status);
|
|
@@ -10212,7 +10243,7 @@ function formatTopValuesPart(value) {
|
|
|
10212
10243
|
}
|
|
10213
10244
|
function formatPackageDatasetSummaryLines(summary, indent = " ") {
|
|
10214
10245
|
const record3 = readRecord(summary);
|
|
10215
|
-
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
10246
|
+
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _358 => _358.columnStats]));
|
|
10216
10247
|
if (!record3 || !columnStats) {
|
|
10217
10248
|
return [];
|
|
10218
10249
|
}
|
|
@@ -10300,7 +10331,7 @@ function packageDatasetRecords(packaged) {
|
|
|
10300
10331
|
if (catalog.length > 0) return catalog;
|
|
10301
10332
|
return readRecordArray(packaged.steps).flatMap((step) => {
|
|
10302
10333
|
const output = readRecord(step.output);
|
|
10303
|
-
return _optionalChain([output, 'optionalAccess',
|
|
10334
|
+
return _optionalChain([output, 'optionalAccess', _359 => _359.kind]) === "dataset" ? [output] : [];
|
|
10304
10335
|
});
|
|
10305
10336
|
}
|
|
10306
10337
|
function packageReturnedDatasetIdentity(packaged) {
|
|
@@ -10309,7 +10340,7 @@ function packageReturnedDatasetIdentity(packaged) {
|
|
|
10309
10340
|
const outputs = _nullishCoalesce(readRecord(packaged.outputs), () => ( {}));
|
|
10310
10341
|
for (const outputValue of Object.values(outputs)) {
|
|
10311
10342
|
const output = readRecord(outputValue);
|
|
10312
|
-
if (_optionalChain([output, 'optionalAccess',
|
|
10343
|
+
if (_optionalChain([output, 'optionalAccess', _360 => _360.kind]) !== "dataset") continue;
|
|
10313
10344
|
if (typeof output.datasetId === "string" && output.datasetId.trim()) {
|
|
10314
10345
|
datasetIds.add(output.datasetId.trim());
|
|
10315
10346
|
}
|
|
@@ -10345,7 +10376,7 @@ function formatRunStepProgress(progress, includeRowOutcomes = false) {
|
|
|
10345
10376
|
}
|
|
10346
10377
|
function formatPackageDatasetActionLines(packaged, options) {
|
|
10347
10378
|
const returned = packageReturnedDatasetIdentity(packaged);
|
|
10348
|
-
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
10379
|
+
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _361 => _361.includeSummary]), () => ( true));
|
|
10349
10380
|
const lines = [];
|
|
10350
10381
|
const steps = readRecordArray(packaged.steps);
|
|
10351
10382
|
const stepsByDatasetId = /* @__PURE__ */ new Map();
|
|
@@ -10354,10 +10385,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10354
10385
|
for (const step of steps) {
|
|
10355
10386
|
if (step.kind !== "dataset") continue;
|
|
10356
10387
|
const output = readRecord(step.output);
|
|
10357
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
10388
|
+
if (typeof _optionalChain([output, 'optionalAccess', _362 => _362.datasetId]) === "string") {
|
|
10358
10389
|
stepsByDatasetId.set(output.datasetId, step);
|
|
10359
10390
|
}
|
|
10360
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
10391
|
+
if (typeof _optionalChain([output, 'optionalAccess', _363 => _363.path]) === "string") {
|
|
10361
10392
|
stepsByPath.set(output.path, step);
|
|
10362
10393
|
}
|
|
10363
10394
|
if (typeof step.id === "string") {
|
|
@@ -10371,8 +10402,8 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10371
10402
|
const category = isReturned ? "returned" : dataset.recovered === true ? "recovered" : "persisted";
|
|
10372
10403
|
const rowCount = typeof dataset.rowCount === "number" && Number.isFinite(dataset.rowCount) ? Math.max(0, Math.trunc(dataset.rowCount)) : null;
|
|
10373
10404
|
const lifecycle = readRecord(dataset.lifecycle);
|
|
10374
|
-
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess',
|
|
10375
|
-
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess',
|
|
10405
|
+
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess', _364 => _364.complete]) === false;
|
|
10406
|
+
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess', _365 => _365.persistedRowsAtLeast]) === "number" && Number.isFinite(lifecycle.persistedRowsAtLeast) ? Math.max(0, Math.trunc(lifecycle.persistedRowsAtLeast)) : 0;
|
|
10376
10407
|
const actions2 = _nullishCoalesce(readRecord(dataset.actions), () => ( {}));
|
|
10377
10408
|
if (countUnconfirmed) {
|
|
10378
10409
|
lines.push(
|
|
@@ -10390,7 +10421,7 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10390
10421
|
}
|
|
10391
10422
|
}
|
|
10392
10423
|
const step = _nullishCoalesce(_nullishCoalesce((datasetId ? stepsByDatasetId.get(datasetId) : void 0), () => ( stepsByPath.get(path))), () => ( (typeof dataset.tableNamespace === "string" ? stepsByNamespace.get(dataset.tableNamespace) : void 0)));
|
|
10393
|
-
const progress = readRecord(_optionalChain([step, 'optionalAccess',
|
|
10424
|
+
const progress = readRecord(_optionalChain([step, 'optionalAccess', _366 => _366.progress]));
|
|
10394
10425
|
if (progress) {
|
|
10395
10426
|
lines.push(` progress: ${formatRunStepProgress(progress)}`);
|
|
10396
10427
|
}
|
|
@@ -10404,10 +10435,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10404
10435
|
}
|
|
10405
10436
|
const exportAction = readRecord(actions2.exportCsv);
|
|
10406
10437
|
const exportCommand = actionToCommand(exportAction);
|
|
10407
|
-
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess',
|
|
10438
|
+
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _367 => _367.scope]));
|
|
10408
10439
|
const queryAction = readRecord(actions2.query);
|
|
10409
|
-
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess',
|
|
10410
|
-
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess',
|
|
10440
|
+
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess', _368 => _368.scope]));
|
|
10441
|
+
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess', _369 => _369.kind]) === "run" ? actionToCommand(queryAction) : null;
|
|
10411
10442
|
const currentQueryCommand = actionToCommand(actions2.queryCurrentTable);
|
|
10412
10443
|
const legacyQueryCommand = actionToCommand(actions2.query);
|
|
10413
10444
|
if (runQueryCommand) {
|
|
@@ -10419,11 +10450,11 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10419
10450
|
}
|
|
10420
10451
|
if (exportCommand) {
|
|
10421
10452
|
lines.push(
|
|
10422
|
-
_optionalChain([exportScope, 'optionalAccess',
|
|
10453
|
+
_optionalChain([exportScope, 'optionalAccess', _370 => _370.kind]) === "database" ? ` export current table (may include other runs): ${exportCommand}` : ` export this run: ${exportCommand}`
|
|
10423
10454
|
);
|
|
10424
10455
|
}
|
|
10425
10456
|
const unavailable = readRecord(dataset.exportUnavailable);
|
|
10426
|
-
if (typeof _optionalChain([unavailable, 'optionalAccess',
|
|
10457
|
+
if (typeof _optionalChain([unavailable, 'optionalAccess', _371 => _371.reason]) === "string" && typeof unavailable.message === "string") {
|
|
10427
10458
|
lines.push(
|
|
10428
10459
|
` export unavailable (${unavailable.reason}): ${unavailable.message}`
|
|
10429
10460
|
);
|
|
@@ -10440,7 +10471,7 @@ function packageSavedRowCount(packaged) {
|
|
|
10440
10471
|
}
|
|
10441
10472
|
function runtimeLimitWindowLabel(runtimeLimitFailure) {
|
|
10442
10473
|
const message = _nullishCoalesce(getStringField(runtimeLimitFailure, "message"), () => ( ""));
|
|
10443
|
-
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access',
|
|
10474
|
+
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _372 => _372.exec, 'call', _373 => _373(message), 'optionalAccess', _374 => _374[1]]);
|
|
10444
10475
|
if (configuredSeconds) {
|
|
10445
10476
|
const seconds = Number(configuredSeconds);
|
|
10446
10477
|
if (Number.isSafeInteger(seconds) && seconds > 0) {
|
|
@@ -10487,7 +10518,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10487
10518
|
if (!outputs) return [];
|
|
10488
10519
|
const returned = Object.entries(outputs).filter(([, output]) => {
|
|
10489
10520
|
const record3 = readRecord(output);
|
|
10490
|
-
return _optionalChain([record3, 'optionalAccess',
|
|
10521
|
+
return _optionalChain([record3, 'optionalAccess', _375 => _375.kind]) === "dataset" || _optionalChain([record3, 'optionalAccess', _376 => _376.kind]) === "value" && Object.prototype.hasOwnProperty.call(record3, "value");
|
|
10491
10522
|
});
|
|
10492
10523
|
if (returned.length === 0) return [];
|
|
10493
10524
|
const datasets = packageDatasetRecords(packaged);
|
|
@@ -10507,10 +10538,10 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10507
10538
|
(candidate) => typeof output.datasetId === "string" && candidate.datasetId === output.datasetId || candidate.path === path
|
|
10508
10539
|
);
|
|
10509
10540
|
const stepOutput = datasetSteps.map((step) => readRecord(step.output)).find(
|
|
10510
|
-
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess',
|
|
10541
|
+
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _377 => _377.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _378 => _378.path]) === path
|
|
10511
10542
|
);
|
|
10512
|
-
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess',
|
|
10513
|
-
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
10543
|
+
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _379 => _379.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _380 => _380.preview]))));
|
|
10544
|
+
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _381 => _381.rows])) ? preview.rows.slice(0, 2) : [];
|
|
10514
10545
|
if (rows.length > 0) {
|
|
10515
10546
|
lines.push(` sample rows (${rows.length}):`);
|
|
10516
10547
|
lines.push(
|
|
@@ -10536,7 +10567,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10536
10567
|
return lines;
|
|
10537
10568
|
}
|
|
10538
10569
|
function authoredPackageStackFrames(packaged) {
|
|
10539
|
-
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess',
|
|
10570
|
+
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _382 => _382.trim, 'call', _383 => _383()])));
|
|
10540
10571
|
if (!stack) return [];
|
|
10541
10572
|
return stack.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).filter(
|
|
10542
10573
|
(line) => !line.includes("/virtual/deepline-plays/") && !line.includes("/apps/play-runner/") && !line.includes("/shared_libs/play-runtime/") && !line.includes("node:internal")
|
|
@@ -10568,9 +10599,9 @@ function activityIsoTimestamp(value) {
|
|
|
10568
10599
|
}
|
|
10569
10600
|
function buildRunActivityTextLines(run) {
|
|
10570
10601
|
const activity = readRecord(run.activity);
|
|
10571
|
-
const observation = readRecord(_optionalChain([activity, 'optionalAccess',
|
|
10572
|
-
const state = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
10573
|
-
const target = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
10602
|
+
const observation = readRecord(_optionalChain([activity, 'optionalAccess', _384 => _384.observation]));
|
|
10603
|
+
const state = readRecord(_optionalChain([observation, 'optionalAccess', _385 => _385.state]));
|
|
10604
|
+
const target = readRecord(_optionalChain([observation, 'optionalAccess', _386 => _386.target]));
|
|
10574
10605
|
if (!activity || !observation || !state) return [];
|
|
10575
10606
|
const kind = typeof state.kind === "string" ? state.kind : "unknown";
|
|
10576
10607
|
if (kind === "completed") return [];
|
|
@@ -10615,11 +10646,11 @@ function buildRunActivityTextLines(run) {
|
|
|
10615
10646
|
}
|
|
10616
10647
|
function formatObservedRunCounter(value) {
|
|
10617
10648
|
const counter = readRecord(value);
|
|
10618
|
-
const count2 = _optionalChain([counter, 'optionalAccess',
|
|
10649
|
+
const count2 = _optionalChain([counter, 'optionalAccess', _387 => _387.value]);
|
|
10619
10650
|
if (typeof count2 !== "number" || !Number.isSafeInteger(count2) || count2 < 0) {
|
|
10620
10651
|
return "unknown";
|
|
10621
10652
|
}
|
|
10622
|
-
return _optionalChain([counter, 'optionalAccess',
|
|
10653
|
+
return _optionalChain([counter, 'optionalAccess', _388 => _388.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
|
|
10623
10654
|
}
|
|
10624
10655
|
function buildRunStatusEvidenceTextLines(packaged) {
|
|
10625
10656
|
const evidence = readRecord(packaged.runStatus);
|
|
@@ -10632,13 +10663,13 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10632
10663
|
);
|
|
10633
10664
|
}
|
|
10634
10665
|
const source = readRecord(evidence.source);
|
|
10635
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
10666
|
+
if (_optionalChain([source, 'optionalAccess', _389 => _389.aligned]) === false) {
|
|
10636
10667
|
lines.push(
|
|
10637
10668
|
` consistency: run snapshot event ${String(source.runSnapshotLedgerNextSeq)} and progress event ${String(source.ledgerNextSeq)} differ; retry this read to align them`
|
|
10638
10669
|
);
|
|
10639
10670
|
}
|
|
10640
10671
|
const focus = readRecord(evidence.focusStep);
|
|
10641
|
-
const rows = readRecord(_optionalChain([focus, 'optionalAccess',
|
|
10672
|
+
const rows = readRecord(_optionalChain([focus, 'optionalAccess', _390 => _390.rows]));
|
|
10642
10673
|
if (focus) {
|
|
10643
10674
|
const id = typeof focus.id === "string" && focus.id.trim() ? focus.id.trim() : "unknown step";
|
|
10644
10675
|
const label = typeof focus.label === "string" && focus.label.trim() ? ` (${focus.label.trim()})` : "";
|
|
@@ -10646,7 +10677,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10646
10677
|
const known = readRecordArray(packaged.steps).find(
|
|
10647
10678
|
(step) => typeof step.id === "string" && (id === step.id || id.endsWith(`:${step.id}`)) && typeof step.label === "string"
|
|
10648
10679
|
);
|
|
10649
|
-
const state = typeof _optionalChain([known, 'optionalAccess',
|
|
10680
|
+
const state = typeof _optionalChain([known, 'optionalAccess', _391 => _391.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
|
|
10650
10681
|
deriveNodeExecutionState({
|
|
10651
10682
|
reported: {
|
|
10652
10683
|
status: focus.status.trim(),
|
|
@@ -10656,7 +10687,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10656
10687
|
total: rows.total
|
|
10657
10688
|
} : null
|
|
10658
10689
|
},
|
|
10659
|
-
runStatus: _optionalChain([run, 'optionalAccess',
|
|
10690
|
+
runStatus: _optionalChain([run, 'optionalAccess', _392 => _392.status])
|
|
10660
10691
|
})
|
|
10661
10692
|
) : null;
|
|
10662
10693
|
lines.push(` current step: ${id}${label}${state ? `: ${state}` : ""}`);
|
|
@@ -10704,7 +10735,7 @@ function formatRecentRunLogLines(value) {
|
|
|
10704
10735
|
(line) => typeof line === "string"
|
|
10705
10736
|
);
|
|
10706
10737
|
if (tail.length === 0) return [];
|
|
10707
|
-
const shown = tail.map((line) =>
|
|
10738
|
+
const shown = tail.map((line) => _chunkD3UHG54Vjs.classifyLogLine.call(void 0, line)).filter(
|
|
10708
10739
|
(entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
|
|
10709
10740
|
).slice(-8);
|
|
10710
10741
|
const total = readNonNegativeInteger(logs.totalCount);
|
|
@@ -10748,7 +10779,7 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10748
10779
|
lines.push(` recovery: ${mode}${sourceRunId}`);
|
|
10749
10780
|
}
|
|
10750
10781
|
const runError = typeof run.error === "string" && run.error.trim() ? run.error.trim() : null;
|
|
10751
|
-
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess',
|
|
10782
|
+
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _393 => _393.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
|
|
10752
10783
|
const displayRunError = _nullishCoalesce(structuredRuntimeLimitMessage, () => ( runError));
|
|
10753
10784
|
if (!isRuntimeLimitCheckpoint && displayRunError && (status === "failed" || status === "cancelled")) {
|
|
10754
10785
|
lines.push(` error: ${truncateErrorForDisplay(displayRunError, runId)}`);
|
|
@@ -10759,11 +10790,11 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10759
10790
|
}
|
|
10760
10791
|
}
|
|
10761
10792
|
const failedLogs = readRecord(packaged.failedLogs);
|
|
10762
|
-
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess',
|
|
10793
|
+
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _394 => _394.entries])) ? failedLogs.entries.filter(
|
|
10763
10794
|
(entry) => typeof entry === "string"
|
|
10764
10795
|
) : [];
|
|
10765
|
-
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
10766
|
-
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
10796
|
+
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _395 => _395.association]) === "string" ? failedLogs.association : null;
|
|
10797
|
+
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _396 => _396.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
|
|
10767
10798
|
if (failedLogEntries.length > 0) {
|
|
10768
10799
|
lines.push(" failed logs:");
|
|
10769
10800
|
lines.push(...failedLogEntries.map((entry) => ` ${entry}`));
|
|
@@ -10782,8 +10813,8 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10782
10813
|
)
|
|
10783
10814
|
).slice(0, 16) : [];
|
|
10784
10815
|
lines.push(...packageWarnings.map((warning) => ` warning: ${warning}`));
|
|
10785
|
-
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess',
|
|
10786
|
-
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess',
|
|
10816
|
+
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _397 => _397.next]));
|
|
10817
|
+
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _398 => _398.logs]) === "string") {
|
|
10787
10818
|
lines.push(
|
|
10788
10819
|
failedLogAssociation === "retained_before_truncation" ? ` retained logs: ${failedLogNext.logs}` : ` retry failed logs: ${failedLogNext.logs}`
|
|
10789
10820
|
);
|
|
@@ -10811,20 +10842,20 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10811
10842
|
const stepStatus = typeof step.status === "string" ? step.status : status;
|
|
10812
10843
|
const output = step.output && typeof step.output === "object" && !Array.isArray(step.output) ? step.output : null;
|
|
10813
10844
|
const rowCount = output && typeof output.rowCount === "number" ? ` rows=${formatInteger(output.rowCount)}` : "";
|
|
10814
|
-
const preview = _optionalChain([output, 'optionalAccess',
|
|
10815
|
-
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
10845
|
+
const preview = _optionalChain([output, 'optionalAccess', _399 => _399.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
|
|
10846
|
+
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _400 => _400.rows])) ? preview.rows.length : null;
|
|
10816
10847
|
lines.push(` ${kind} ${id}: ${stepStatus}${rowCount}`);
|
|
10817
|
-
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess',
|
|
10848
|
+
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _401 => _401.summary])));
|
|
10818
10849
|
if (previewRows !== null) {
|
|
10819
10850
|
lines.push(
|
|
10820
|
-
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess',
|
|
10851
|
+
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _402 => _402.truncated]) ? " truncated" : ""}`
|
|
10821
10852
|
);
|
|
10822
10853
|
}
|
|
10823
10854
|
}
|
|
10824
10855
|
const inspectCommand = actionToCommand(next.inspect);
|
|
10825
10856
|
const fullResultCommand = actionToCommand(next.full);
|
|
10826
10857
|
const hasCatalogExportAction = packageDatasetRecords(packaged).some(
|
|
10827
|
-
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call',
|
|
10858
|
+
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _403 => _403(dataset.actions), 'optionalAccess', _404 => _404.exportCsv])))
|
|
10828
10859
|
);
|
|
10829
10860
|
const legacyExportCommand = hasCatalogExportAction ? null : actionToCommand(next.export);
|
|
10830
10861
|
const runAgainCommand = typeof next.run === "string" && next.run.trim() ? next.run.trim() : null;
|
|
@@ -10889,7 +10920,7 @@ function withOrdinaryRunAgainCommand(status, options, resolvedRevisionId) {
|
|
|
10889
10920
|
}
|
|
10890
10921
|
function buildBillingRollupTextLines(status) {
|
|
10891
10922
|
const billing = status.billing;
|
|
10892
|
-
const rollup = _optionalChain([billing, 'optionalAccess',
|
|
10923
|
+
const rollup = _optionalChain([billing, 'optionalAccess', _405 => _405.rollup]);
|
|
10893
10924
|
if (!rollup) return [];
|
|
10894
10925
|
const total = formatCreditAmount2(rollup.totalCreditsRollup);
|
|
10895
10926
|
if (rollup.childCredits > 0 && rollup.descendantRunCount > 0) {
|
|
@@ -10908,17 +10939,17 @@ function buildBillingRollupTextLines(status) {
|
|
|
10908
10939
|
return [` cost: ${total} credits`];
|
|
10909
10940
|
}
|
|
10910
10941
|
function playRunRateLimitedNotice(status) {
|
|
10911
|
-
const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call',
|
|
10942
|
+
const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call', _406 => _406(status), 'optionalAccess', _407 => _407.rateLimited]), () => ( status.rateLimited));
|
|
10912
10943
|
return notice && typeof notice === "object" ? notice : null;
|
|
10913
10944
|
}
|
|
10914
10945
|
function withRateLimitedNotice(status, notice) {
|
|
10915
10946
|
if (!notice) return status;
|
|
10916
10947
|
const packaged = getPlayRunPackage(status);
|
|
10917
|
-
|
|
10918
|
-
return packaged === status ? { ...status, rateLimited: notice } : {
|
|
10948
|
+
const withNotice = !packaged || packaged === status ? { ...status, rateLimited: notice } : {
|
|
10919
10949
|
...status,
|
|
10920
10950
|
package: { ...packaged, rateLimited: notice }
|
|
10921
10951
|
};
|
|
10952
|
+
return carryFullDurableTerminalStatus(status, withNotice);
|
|
10922
10953
|
}
|
|
10923
10954
|
function buildRunLaunch(status) {
|
|
10924
10955
|
const compact = compactPlayStatus(status);
|
|
@@ -10948,7 +10979,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
10948
10979
|
const overview = buildRunOverview(status);
|
|
10949
10980
|
const { run } = overview;
|
|
10950
10981
|
const failed = run.status === "failed";
|
|
10951
|
-
const label = run.status === "completed" ? _optionalChain([overview, 'access',
|
|
10982
|
+
const label = run.status === "completed" ? _optionalChain([overview, 'access', _408 => _408.rowOutcomes, 'optionalAccess', _409 => _409.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
|
|
10952
10983
|
const rateLimited = playRunRateLimitedNotice(status);
|
|
10953
10984
|
const lines = [
|
|
10954
10985
|
...rateLimited ? [rateLimited.message] : [],
|
|
@@ -10970,7 +11001,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
10970
11001
|
...formatJsonPreview(compactReturnValue(overview.result))
|
|
10971
11002
|
);
|
|
10972
11003
|
}
|
|
10973
|
-
if (_optionalChain([overview, 'access',
|
|
11004
|
+
if (_optionalChain([overview, 'access', _410 => _410.rowOutcomes, 'optionalAccess', _411 => _411.hasRowFailures])) {
|
|
10974
11005
|
lines.push(
|
|
10975
11006
|
`Rows: ${overview.rowOutcomes.completedRows} completed, ${overview.rowOutcomes.failedRows} failed`
|
|
10976
11007
|
);
|
|
@@ -10999,17 +11030,17 @@ function buildPlayCompletionTextLines(status) {
|
|
|
10999
11030
|
}
|
|
11000
11031
|
function writePlayResult(status, jsonOutput, options) {
|
|
11001
11032
|
const packaged = getPlayRunPackage(status);
|
|
11002
|
-
if (status.package)
|
|
11003
|
-
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
11033
|
+
if (status.package) _chunkR4EFW2I2js.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
11034
|
+
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _412 => _412.hits]), () => ( null));
|
|
11004
11035
|
if (jsonOutput) {
|
|
11005
|
-
const payload2 = _optionalChain([options, 'optionalAccess',
|
|
11006
|
-
|
|
11036
|
+
const payload2 = _optionalChain([options, 'optionalAccess', _413 => _413.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
|
|
11037
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
11007
11038
|
hits ? { ...payload2, hits } : payload2,
|
|
11008
|
-
{ json: true, fields: _optionalChain([options, 'optionalAccess',
|
|
11039
|
+
{ json: true, fields: _optionalChain([options, 'optionalAccess', _414 => _414.jsonFields]) }
|
|
11009
11040
|
);
|
|
11010
11041
|
return;
|
|
11011
11042
|
}
|
|
11012
|
-
if (packaged && !_optionalChain([options, 'optionalAccess',
|
|
11043
|
+
if (packaged && !_optionalChain([options, 'optionalAccess', _415 => _415.fullJson])) {
|
|
11013
11044
|
const {
|
|
11014
11045
|
logs: _logs,
|
|
11015
11046
|
failedLogs: _failedLogs,
|
|
@@ -11019,7 +11050,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11019
11050
|
...buildPlayCompletionTextLines(status),
|
|
11020
11051
|
...formatRunHitsLines(hits)
|
|
11021
11052
|
];
|
|
11022
|
-
|
|
11053
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0, displayPackage, {
|
|
11023
11054
|
json: false,
|
|
11024
11055
|
text: `${lines2.join("\n")}
|
|
11025
11056
|
`
|
|
@@ -11069,8 +11100,8 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11069
11100
|
lines.push(...renderedServerView.actions);
|
|
11070
11101
|
lines.push(...buildBillingRollupTextLines(status));
|
|
11071
11102
|
const compact = compactPlayStatus(status);
|
|
11072
|
-
const payload = _optionalChain([options, 'optionalAccess',
|
|
11073
|
-
|
|
11103
|
+
const payload = _optionalChain([options, 'optionalAccess', _416 => _416.fullJson]) ? status : compact;
|
|
11104
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
11074
11105
|
{
|
|
11075
11106
|
...payload,
|
|
11076
11107
|
render: {
|
|
@@ -11115,16 +11146,27 @@ function playRunPackageTextLedgerIncomplete(pkg) {
|
|
|
11115
11146
|
}
|
|
11116
11147
|
return false;
|
|
11117
11148
|
}
|
|
11149
|
+
var fullDurableTerminalStatuses = /* @__PURE__ */ new WeakSet();
|
|
11150
|
+
function carryFullDurableTerminalStatus(source, target) {
|
|
11151
|
+
if (fullDurableTerminalStatuses.has(source)) {
|
|
11152
|
+
fullDurableTerminalStatuses.add(target);
|
|
11153
|
+
}
|
|
11154
|
+
return target;
|
|
11155
|
+
}
|
|
11118
11156
|
async function resolvePlayRunOutputStatus(input) {
|
|
11119
11157
|
const runId = input.status.runId;
|
|
11120
11158
|
if (!runId || runId === "pending") {
|
|
11121
11159
|
return input.status;
|
|
11122
11160
|
}
|
|
11123
11161
|
const streamedPackage = getPlayRunPackage(input.status);
|
|
11124
|
-
const
|
|
11162
|
+
const fromDurableStatus = input.fromDurableStatus === true || fullDurableTerminalStatuses.has(input.status);
|
|
11163
|
+
const refreshForFullJson = input.fullJson && !fromDurableStatus;
|
|
11125
11164
|
const streamedTextPackageIncomplete = input.status.status === "completed" && playRunPackageTextLedgerIncomplete(streamedPackage);
|
|
11126
|
-
const refreshFailedTerminal = input.status.status === "failed" && (!
|
|
11165
|
+
const refreshFailedTerminal = input.status.status === "failed" && (!fromDurableStatus || _optionalChain([readRecord, 'call', _417 => _417(_optionalChain([streamedPackage, 'optionalAccess', _418 => _418.run])), 'optionalAccess', _419 => _419.status]) !== "failed");
|
|
11127
11166
|
if (!refreshForFullJson && !streamedTextPackageIncomplete && !refreshFailedTerminal) {
|
|
11167
|
+
if (input.fullJson && fromDurableStatus && TERMINAL_PLAY_STATUSES.has(input.status.status)) {
|
|
11168
|
+
fullDurableTerminalStatuses.add(input.status);
|
|
11169
|
+
}
|
|
11128
11170
|
return input.status;
|
|
11129
11171
|
}
|
|
11130
11172
|
let refreshedStatus = await input.client.getPlayStatus(runId, {
|
|
@@ -11145,7 +11187,11 @@ async function resolvePlayRunOutputStatus(input) {
|
|
|
11145
11187
|
return input.status;
|
|
11146
11188
|
}
|
|
11147
11189
|
const dashboardUrl = input.status.dashboardUrl;
|
|
11148
|
-
|
|
11190
|
+
const resolved = typeof dashboardUrl === "string" ? { ...refreshedStatus, dashboardUrl } : refreshedStatus;
|
|
11191
|
+
if (input.fullJson && TERMINAL_PLAY_STATUSES.has(resolved.status)) {
|
|
11192
|
+
fullDurableTerminalStatuses.add(resolved);
|
|
11193
|
+
}
|
|
11194
|
+
return resolved;
|
|
11149
11195
|
}
|
|
11150
11196
|
var RUN_EXPORT_PAGE_SIZE = 5e3;
|
|
11151
11197
|
function runExportRetryCommand(runId, outPath, datasetPath, options = {}) {
|
|
@@ -11223,14 +11269,14 @@ function mergeExportColumns(preferredColumns, rows) {
|
|
|
11223
11269
|
return columns;
|
|
11224
11270
|
}
|
|
11225
11271
|
function sqlSafeExportColumnName(id) {
|
|
11226
|
-
const prefix = _nullishCoalesce(_optionalChain([id, 'access',
|
|
11272
|
+
const prefix = _nullishCoalesce(_optionalChain([id, 'access', _420 => _420.trim, 'call', _421 => _421(), 'access', _422 => _422.match, 'call', _423 => _423(/^_+/), 'optionalAccess', _424 => _424[0]]), () => ( ""));
|
|
11227
11273
|
const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
11228
11274
|
const safe = `${prefix}${normalized || "column"}`;
|
|
11229
11275
|
return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
|
|
11230
11276
|
}
|
|
11231
11277
|
async function fetchBackingDatasetRows(input) {
|
|
11232
11278
|
const playName = extractRunPlayName(input.status);
|
|
11233
|
-
const tableNamespace = _optionalChain([input, 'access',
|
|
11279
|
+
const tableNamespace = _optionalChain([input, 'access', _425 => _425.rowsInfo, 'access', _426 => _426.tableNamespace, 'optionalAccess', _427 => _427.trim, 'call', _428 => _428()]);
|
|
11234
11280
|
if (!playName || !tableNamespace) {
|
|
11235
11281
|
return null;
|
|
11236
11282
|
}
|
|
@@ -11270,7 +11316,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11270
11316
|
seenEnvelopeKeys.add(key);
|
|
11271
11317
|
}
|
|
11272
11318
|
sheetRows.push(...page.rows);
|
|
11273
|
-
const summaryTotal = _optionalChain([page, 'access',
|
|
11319
|
+
const summaryTotal = _optionalChain([page, 'access', _429 => _429.summary, 'optionalAccess', _430 => _430.stats, 'optionalAccess', _431 => _431.total]);
|
|
11274
11320
|
if (typeof summaryTotal === "number" && Number.isFinite(summaryTotal)) {
|
|
11275
11321
|
settledTotal = Math.max(_nullishCoalesce(settledTotal, () => ( 0)), Math.trunc(summaryTotal));
|
|
11276
11322
|
}
|
|
@@ -11279,7 +11325,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11279
11325
|
}
|
|
11280
11326
|
offset += page.rows.length;
|
|
11281
11327
|
}
|
|
11282
|
-
const withError =
|
|
11328
|
+
const withError = _chunkR4EFW2I2js.tableExportHasFailedRows.call(void 0,
|
|
11283
11329
|
sheetRows.filter(
|
|
11284
11330
|
(row) => Boolean(row) && typeof row === "object" && !Array.isArray(row)
|
|
11285
11331
|
)
|
|
@@ -11295,7 +11341,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11295
11341
|
return [
|
|
11296
11342
|
withError ? {
|
|
11297
11343
|
...exported,
|
|
11298
|
-
[
|
|
11344
|
+
[_chunkR4EFW2I2js.TABLE_EXPORT_ERROR_COLUMN]: _chunkR4EFW2I2js.tableExportErrorCell.call(void 0,
|
|
11299
11345
|
row
|
|
11300
11346
|
)
|
|
11301
11347
|
} : exported
|
|
@@ -11364,7 +11410,7 @@ function assertDatasetHasExportableRows(input) {
|
|
|
11364
11410
|
const rowOutcomes = _nullishCoalesce(readRowOutcomeSummary(input.status), () => ( readRowOutcomeSummary(
|
|
11365
11411
|
getRecordField(getRecordField(input.status, "result"), "_metadata")
|
|
11366
11412
|
)));
|
|
11367
|
-
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',
|
|
11413
|
+
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', _432 => _432.failedRows]) === 0 && !rowOutcomes.hasRowFailures) {
|
|
11368
11414
|
return input.rowsInfo;
|
|
11369
11415
|
}
|
|
11370
11416
|
const datasetLabel = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(input.datasetPath, () => ( input.rowsInfo.tableNamespace)), () => ( input.rowsInfo.source)), () => ( "result.rows"));
|
|
@@ -11436,8 +11482,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11436
11482
|
path: dataset.exportFile(outPath, options),
|
|
11437
11483
|
rowsInfo: dataset.info(),
|
|
11438
11484
|
currentTable: false,
|
|
11439
|
-
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11440
|
-
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11485
|
+
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _433 => _433.source]), () => ( null)),
|
|
11486
|
+
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _434 => _434.info, 'call', _435 => _435()]), () => ( null))
|
|
11441
11487
|
};
|
|
11442
11488
|
};
|
|
11443
11489
|
const run = Run.open({
|
|
@@ -11449,7 +11495,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11449
11495
|
const returnedRows = datasets.returned().map((dataset) => dataset.info());
|
|
11450
11496
|
const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
|
|
11451
11497
|
const selectedDataset = run.dataset(options.datasetPath);
|
|
11452
|
-
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11498
|
+
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _436 => _436.info, 'call', _437 => _437()]), () => ( null));
|
|
11453
11499
|
if (!selectedDataset && options.datasetPath) {
|
|
11454
11500
|
const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
|
|
11455
11501
|
const commands = datasetChoiceLines({
|
|
@@ -11562,7 +11608,7 @@ ${commands.join("\n")}`,
|
|
|
11562
11608
|
throw error;
|
|
11563
11609
|
}
|
|
11564
11610
|
}
|
|
11565
|
-
if (_optionalChain([fetchedRowsInfo, 'optionalAccess',
|
|
11611
|
+
if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _438 => _438.complete])) {
|
|
11566
11612
|
const guarded2 = assertDatasetHasExportableRows({
|
|
11567
11613
|
rowsInfo: fetchedRowsInfo,
|
|
11568
11614
|
status,
|
|
@@ -11627,7 +11673,7 @@ function extractActiveRunsFromError(error) {
|
|
|
11627
11673
|
if (!(error instanceof _chunkDIAWYWT5js.DeeplineError)) {
|
|
11628
11674
|
return [];
|
|
11629
11675
|
}
|
|
11630
|
-
const response = _optionalChain([error, 'access',
|
|
11676
|
+
const response = _optionalChain([error, 'access', _439 => _439.details, 'optionalAccess', _440 => _440.response]);
|
|
11631
11677
|
if (!response || typeof response !== "object" || Array.isArray(response)) {
|
|
11632
11678
|
return [];
|
|
11633
11679
|
}
|
|
@@ -11744,8 +11790,8 @@ function renderServerResultView(value) {
|
|
|
11744
11790
|
return { lines: [], actions: [] };
|
|
11745
11791
|
}
|
|
11746
11792
|
const view = value;
|
|
11747
|
-
const renderedSections = Array.isArray(_optionalChain([view, 'access',
|
|
11748
|
-
const renderedActions = Array.isArray(_optionalChain([view, 'access',
|
|
11793
|
+
const renderedSections = Array.isArray(_optionalChain([view, 'access', _441 => _441.render, 'optionalAccess', _442 => _442.sections])) ? view.render.sections : [];
|
|
11794
|
+
const renderedActions = Array.isArray(_optionalChain([view, 'access', _443 => _443.render, 'optionalAccess', _444 => _444.actions])) ? view.render.actions : [];
|
|
11749
11795
|
if (renderedSections.length > 0 || renderedActions.length > 0) {
|
|
11750
11796
|
const lines2 = [];
|
|
11751
11797
|
for (const section of renderedSections) {
|
|
@@ -11783,7 +11829,7 @@ function renderServerResultView(value) {
|
|
|
11783
11829
|
}
|
|
11784
11830
|
const tables = Array.isArray(view.tables) ? view.tables : [];
|
|
11785
11831
|
const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
|
|
11786
|
-
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess',
|
|
11832
|
+
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _445 => _445.queryCommand]) === "string") {
|
|
11787
11833
|
lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
|
|
11788
11834
|
}
|
|
11789
11835
|
if (tables.length > 0) {
|
|
@@ -11830,7 +11876,7 @@ function renderServerResultView(value) {
|
|
|
11830
11876
|
function writeStartedPlayRun(input) {
|
|
11831
11877
|
if (input.package && isPlayRunPackageValue(input.package)) {
|
|
11832
11878
|
const run = input.package.run;
|
|
11833
|
-
|
|
11879
|
+
_chunkR4EFW2I2js.recordPlayTermination.call(void 0, {
|
|
11834
11880
|
id: run.id,
|
|
11835
11881
|
status: run.status,
|
|
11836
11882
|
finishedAt: run.finishedAt
|
|
@@ -11843,7 +11889,7 @@ function writeStartedPlayRun(input) {
|
|
|
11843
11889
|
dashboardUrl: input.dashboardUrl,
|
|
11844
11890
|
package: input.package
|
|
11845
11891
|
};
|
|
11846
|
-
|
|
11892
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
|
|
11847
11893
|
json: true,
|
|
11848
11894
|
fields: input.jsonFields
|
|
11849
11895
|
});
|
|
@@ -11865,7 +11911,7 @@ function writeStartedPlayRun(input) {
|
|
|
11865
11911
|
input.progress.writeLine(output2, process.stdout);
|
|
11866
11912
|
return;
|
|
11867
11913
|
}
|
|
11868
|
-
|
|
11914
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0, input.package, {
|
|
11869
11915
|
json: false,
|
|
11870
11916
|
text: `${output2}
|
|
11871
11917
|
`
|
|
@@ -11894,7 +11940,7 @@ function writeStartedPlayRun(input) {
|
|
|
11894
11940
|
) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)}`] : []
|
|
11895
11941
|
];
|
|
11896
11942
|
if (input.jsonOutput) {
|
|
11897
|
-
|
|
11943
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
|
|
11898
11944
|
return;
|
|
11899
11945
|
}
|
|
11900
11946
|
if (input.dashboardUrl) {
|
|
@@ -11905,7 +11951,7 @@ function writeStartedPlayRun(input) {
|
|
|
11905
11951
|
input.progress.writeLine(output, process.stdout);
|
|
11906
11952
|
return;
|
|
11907
11953
|
}
|
|
11908
|
-
|
|
11954
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
11909
11955
|
{
|
|
11910
11956
|
...payload,
|
|
11911
11957
|
render: { sections: [{ title: "play run", lines }] }
|
|
@@ -11915,7 +11961,7 @@ function writeStartedPlayRun(input) {
|
|
|
11915
11961
|
);
|
|
11916
11962
|
}
|
|
11917
11963
|
function parsePlayCheckOptions(args) {
|
|
11918
|
-
const selection =
|
|
11964
|
+
const selection = _chunk6WWBVWFQjs.parseJsonFields.call(void 0, args, "check");
|
|
11919
11965
|
args = selection.args;
|
|
11920
11966
|
const target = args[0];
|
|
11921
11967
|
if (!target || target.startsWith("-")) {
|
|
@@ -11927,7 +11973,7 @@ function parsePlayCheckOptions(args) {
|
|
|
11927
11973
|
if (arg !== "--json" && arg !== "--full")
|
|
11928
11974
|
throw new Error(`Unknown plays check option: ${arg}`);
|
|
11929
11975
|
}
|
|
11930
|
-
const jsonOutput =
|
|
11976
|
+
const jsonOutput = _chunk6WWBVWFQjs.argsWantJson.call(void 0, args);
|
|
11931
11977
|
return {
|
|
11932
11978
|
target,
|
|
11933
11979
|
jsonOutput,
|
|
@@ -12003,7 +12049,7 @@ ${PLAY_PUBLISH_USAGE}`
|
|
|
12003
12049
|
useLatest,
|
|
12004
12050
|
expectedArtifactHash,
|
|
12005
12051
|
dryRun,
|
|
12006
|
-
jsonOutput:
|
|
12052
|
+
jsonOutput: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args)
|
|
12007
12053
|
};
|
|
12008
12054
|
}
|
|
12009
12055
|
var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
|
|
@@ -12044,7 +12090,7 @@ ${PLAY_SAVE_USAGE}`);
|
|
|
12044
12090
|
target,
|
|
12045
12091
|
expectedArtifactHash,
|
|
12046
12092
|
dryRun,
|
|
12047
|
-
jsonOutput:
|
|
12093
|
+
jsonOutput: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args)
|
|
12048
12094
|
};
|
|
12049
12095
|
}
|
|
12050
12096
|
function printScheduledPlayCapacity(capacity) {
|
|
@@ -12097,7 +12143,7 @@ function checkHintExpression(value) {
|
|
|
12097
12143
|
return stringValue2(value).replace(/^toolExecutionResult\./, "result.");
|
|
12098
12144
|
}
|
|
12099
12145
|
function checkHintRawPath(value) {
|
|
12100
|
-
return _optionalChain([value, 'optionalAccess',
|
|
12146
|
+
return _optionalChain([value, 'optionalAccess', _446 => _446.startsWith, 'call', _447 => _447("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
|
|
12101
12147
|
}
|
|
12102
12148
|
function collectStaticPipelineToolIds(staticPipeline) {
|
|
12103
12149
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -12172,30 +12218,30 @@ function cronExecutionLabel(status) {
|
|
|
12172
12218
|
}
|
|
12173
12219
|
function readLiveCronMetadata(play) {
|
|
12174
12220
|
const record3 = readRecord(play);
|
|
12175
|
-
const metadata = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
12221
|
+
const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _448 => _448.triggerMetadata]));
|
|
12176
12222
|
return {
|
|
12177
|
-
schedule: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12178
|
-
timezone: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12179
|
-
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12180
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12181
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12223
|
+
schedule: typeof _optionalChain([metadata, 'optionalAccess', _449 => _449.cronSchedule]) === "string" ? metadata.cronSchedule : null,
|
|
12224
|
+
timezone: typeof _optionalChain([metadata, 'optionalAccess', _450 => _450.cronTimezone]) === "string" ? metadata.cronTimezone : null,
|
|
12225
|
+
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _451 => _451.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
|
|
12226
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _452 => _452.blockedAt]) === "number" ? metadata.blockedAt : null,
|
|
12227
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _453 => _453.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
|
|
12182
12228
|
};
|
|
12183
12229
|
}
|
|
12184
12230
|
function liveTriggerStatusLines(status, play) {
|
|
12185
12231
|
const cron = readLiveCronMetadata(play);
|
|
12186
|
-
if (!_optionalChain([status, 'optionalAccess',
|
|
12232
|
+
if (!_optionalChain([status, 'optionalAccess', _454 => _454.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _455 => _455.webhook])) return [];
|
|
12187
12233
|
const lines = [];
|
|
12188
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12234
|
+
if (_optionalChain([status, 'optionalAccess', _456 => _456.cron]) || cron.schedule) {
|
|
12189
12235
|
const timezone = cron.timezone ? ` (${cron.timezone})` : "";
|
|
12190
12236
|
lines.push(
|
|
12191
|
-
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
12237
|
+
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _457 => _457.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
|
|
12192
12238
|
);
|
|
12193
|
-
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess',
|
|
12239
|
+
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _458 => _458.cron]) === "active") {
|
|
12194
12240
|
lines.push(
|
|
12195
12241
|
` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
|
|
12196
12242
|
);
|
|
12197
12243
|
}
|
|
12198
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12244
|
+
if (_optionalChain([status, 'optionalAccess', _459 => _459.blockedReason])) {
|
|
12199
12245
|
lines.push(` Schedule issue: ${status.blockedReason}`);
|
|
12200
12246
|
if (status.blockedReasonCode || cron.blockedReasonCode) {
|
|
12201
12247
|
lines.push(
|
|
@@ -12211,7 +12257,7 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12211
12257
|
);
|
|
12212
12258
|
}
|
|
12213
12259
|
}
|
|
12214
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12260
|
+
if (_optionalChain([status, 'optionalAccess', _460 => _460.webhook])) {
|
|
12215
12261
|
lines.push(` Webhook: ${status.webhook}`);
|
|
12216
12262
|
}
|
|
12217
12263
|
return lines;
|
|
@@ -12219,11 +12265,11 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12219
12265
|
function triggerStatusFromMetadata(value) {
|
|
12220
12266
|
const metadata = readRecord(value);
|
|
12221
12267
|
return {
|
|
12222
|
-
cron: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12223
|
-
webhook: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12224
|
-
blockedReason: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12225
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12226
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12268
|
+
cron: typeof _optionalChain([metadata, 'optionalAccess', _461 => _461.cronStatus]) === "string" ? metadata.cronStatus : null,
|
|
12269
|
+
webhook: typeof _optionalChain([metadata, 'optionalAccess', _462 => _462.webhookStatus]) === "string" ? metadata.webhookStatus : null,
|
|
12270
|
+
blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _463 => _463.blockedReason]) === "string" ? metadata.blockedReason : null,
|
|
12271
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _464 => _464.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
|
|
12272
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _465 => _465.blockedAt]) === "number" ? metadata.blockedAt : null
|
|
12227
12273
|
};
|
|
12228
12274
|
}
|
|
12229
12275
|
function printPublishReceipt(input) {
|
|
@@ -12255,7 +12301,7 @@ function printBundledRuntimeWarning(bundle) {
|
|
|
12255
12301
|
async function handlePlayCheck(args) {
|
|
12256
12302
|
const options = parsePlayCheckOptions(args);
|
|
12257
12303
|
if (!isFileTarget(options.target)) {
|
|
12258
|
-
const client = new (0,
|
|
12304
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
12259
12305
|
try {
|
|
12260
12306
|
await assertCanonicalNamedPlayReference(client, options.target, {
|
|
12261
12307
|
command: "check"
|
|
@@ -12284,7 +12330,7 @@ async function handlePlayCheck(args) {
|
|
|
12284
12330
|
},
|
|
12285
12331
|
...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
|
|
12286
12332
|
};
|
|
12287
|
-
|
|
12333
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0, result, {
|
|
12288
12334
|
json: options.jsonOutput,
|
|
12289
12335
|
fields: options.jsonFields,
|
|
12290
12336
|
text: renderPlayCheckOutput(result) + "\n"
|
|
@@ -12294,7 +12340,7 @@ async function handlePlayCheck(args) {
|
|
|
12294
12340
|
const resolved = _path.resolve.call(void 0, options.target);
|
|
12295
12341
|
const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
|
|
12296
12342
|
if (options.jsonOutput) {
|
|
12297
|
-
|
|
12343
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
12298
12344
|
{
|
|
12299
12345
|
kind: "play_check",
|
|
12300
12346
|
checked: "named_contract",
|
|
@@ -12327,16 +12373,16 @@ async function handlePlayCheck(args) {
|
|
|
12327
12373
|
);
|
|
12328
12374
|
}
|
|
12329
12375
|
const primary = outcomes.find(
|
|
12330
|
-
(outcome) => outcome.exportName ===
|
|
12376
|
+
(outcome) => outcome.exportName === _chunkKQSTV4MWjs.PLAY_DEFAULT_EXPORT
|
|
12331
12377
|
);
|
|
12332
12378
|
const output = buildPlayCheckOutput({
|
|
12333
12379
|
outcomes,
|
|
12334
12380
|
target: options.target,
|
|
12335
12381
|
full: options.full,
|
|
12336
12382
|
detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full`,
|
|
12337
|
-
publishCommand: _optionalChain([primary, 'optionalAccess',
|
|
12383
|
+
publishCommand: _optionalChain([primary, 'optionalAccess', _466 => _466.result, 'access', _467 => _467.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
|
|
12338
12384
|
});
|
|
12339
|
-
|
|
12385
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0, output, {
|
|
12340
12386
|
json: options.jsonOutput,
|
|
12341
12387
|
fields: options.jsonFields,
|
|
12342
12388
|
text: renderPlayCheckOutput(output) + "\n"
|
|
@@ -12344,12 +12390,12 @@ async function handlePlayCheck(args) {
|
|
|
12344
12390
|
return output.valid ? 0 : 1;
|
|
12345
12391
|
}
|
|
12346
12392
|
function resolvePlayCheckExportNames(sourceCode) {
|
|
12347
|
-
const exports =
|
|
12348
|
-
if (!exports || exports.length === 0) return [
|
|
12393
|
+
const exports = _chunkKQSTV4MWjs.listPlayFileExports.call(void 0, sourceCode);
|
|
12394
|
+
if (!exports || exports.length === 0) return [_chunkKQSTV4MWjs.PLAY_DEFAULT_EXPORT];
|
|
12349
12395
|
return exports.map((entry) => entry.name);
|
|
12350
12396
|
}
|
|
12351
12397
|
function artifactForProductionCompatibilityCheck(artifact) {
|
|
12352
|
-
const rawEdition = _optionalChain([process, 'access',
|
|
12398
|
+
const rawEdition = _optionalChain([process, 'access', _468 => _468.env, 'access', _469 => _469.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _470 => _470.trim, 'call', _471 => _471()]);
|
|
12353
12399
|
if (!rawEdition) return artifact;
|
|
12354
12400
|
if (!/^\d+$/.test(rawEdition)) {
|
|
12355
12401
|
throw new Error(
|
|
@@ -12373,7 +12419,7 @@ function artifactForProductionCompatibilityCheck(artifact) {
|
|
|
12373
12419
|
}
|
|
12374
12420
|
async function checkOneExportedPlay(input) {
|
|
12375
12421
|
const { absolutePlayPath, sourceCode, exportName } = input;
|
|
12376
|
-
const fallbackName = extractPlayName(sourceCode, absolutePlayPath);
|
|
12422
|
+
const fallbackName = await extractPlayName(sourceCode, absolutePlayPath);
|
|
12377
12423
|
let graph;
|
|
12378
12424
|
try {
|
|
12379
12425
|
graph = await collectBundledPlayGraph(absolutePlayPath, null, exportName);
|
|
@@ -12390,7 +12436,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12390
12436
|
}
|
|
12391
12437
|
const playName = _nullishCoalesce(graph.root.playName, () => ( fallbackName));
|
|
12392
12438
|
const authoringErrors = collectPlayGraphAuthoringErrors(graph);
|
|
12393
|
-
const client = new (0,
|
|
12439
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
12394
12440
|
const integrationMode = resolveEvalIntegrationMode();
|
|
12395
12441
|
const checked = await checkLocalPlayGraph({
|
|
12396
12442
|
client,
|
|
@@ -12400,7 +12446,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12400
12446
|
integrationMode,
|
|
12401
12447
|
prepareArtifact: artifactForProductionCompatibilityCheck
|
|
12402
12448
|
});
|
|
12403
|
-
const importedPlayName = _optionalChain([checked, 'access',
|
|
12449
|
+
const importedPlayName = _optionalChain([checked, 'access', _472 => _472.failedChild, 'optionalAccess', _473 => _473.playName]);
|
|
12404
12450
|
const diagnosticPrefix = importedPlayName ? `Imported Play ${importedPlayName}: ` : "";
|
|
12405
12451
|
const valid = checked.result.valid && !checked.failedChild && authoringErrors.length === 0;
|
|
12406
12452
|
const errors = [
|
|
@@ -12416,7 +12462,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12416
12462
|
valid,
|
|
12417
12463
|
errors: valid ? checked.result.errors : addPlayCheckRepairHints({
|
|
12418
12464
|
errors,
|
|
12419
|
-
sourceCode: _nullishCoalesce(_optionalChain([checked, 'access',
|
|
12465
|
+
sourceCode: _nullishCoalesce(_optionalChain([checked, 'access', _474 => _474.failedChild, 'optionalAccess', _475 => _475.sourceCode]), () => ( graph.root.sourceCode))
|
|
12420
12466
|
}),
|
|
12421
12467
|
...checked.failedChild && checked.result.issues ? {
|
|
12422
12468
|
issues: checked.result.issues.map((issue) => ({
|
|
@@ -12443,11 +12489,13 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12443
12489
|
throw new Error("Expected a file-backed play run target.");
|
|
12444
12490
|
}
|
|
12445
12491
|
let client;
|
|
12446
|
-
let
|
|
12492
|
+
let prefetchClient;
|
|
12493
|
+
let admissionCapability;
|
|
12494
|
+
let cliAdmission = _chunkKPXP2DIYjs.usesInlinePlayAdmission.call(void 0,
|
|
12447
12495
|
"plays run",
|
|
12448
12496
|
process.argv.slice(2)
|
|
12449
12497
|
);
|
|
12450
|
-
const progress = _nullishCoalesce(
|
|
12498
|
+
const progress = _nullishCoalesce(_chunkCM3KC74Ajs.getActiveCliProgress.call(void 0, ), () => ( _chunkCM3KC74Ajs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12451
12499
|
const absolutePlayPath = _path.resolve.call(void 0, options.target.path);
|
|
12452
12500
|
progress.phase("compiling play");
|
|
12453
12501
|
const sourceCode = traceCliSync(
|
|
@@ -12462,15 +12510,25 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12462
12510
|
console.error(error instanceof Error ? error.message : String(error));
|
|
12463
12511
|
return 1;
|
|
12464
12512
|
}
|
|
12513
|
+
if (!options.dryRun && options.watch && cliAdmission && options.maxTotalCredits === null && !inputContainsLocalFilePath(runtimeInput)) {
|
|
12514
|
+
const clientForPrefetch = new (0, _chunkJ4D3PCQ2js.DeeplineClient)(playRunClientOptions(options));
|
|
12515
|
+
prefetchClient = clientForPrefetch;
|
|
12516
|
+
admissionCapability = _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
12517
|
+
"cli.play_admission_capability_prefetch",
|
|
12518
|
+
{ targetKind: "file" },
|
|
12519
|
+
() => clientForPrefetch.prefetchPlayRunAdmissionCapability()
|
|
12520
|
+
);
|
|
12521
|
+
void admissionCapability.catch(() => void 0);
|
|
12522
|
+
}
|
|
12465
12523
|
let graph;
|
|
12466
12524
|
try {
|
|
12467
|
-
graph = await
|
|
12525
|
+
graph = await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
12468
12526
|
"cli.play_file_bundle_graph",
|
|
12469
12527
|
{ targetKind: "file" },
|
|
12470
12528
|
() => collectBundledPlayGraph(
|
|
12471
12529
|
absolutePlayPath,
|
|
12472
12530
|
options.profile,
|
|
12473
|
-
|
|
12531
|
+
_chunkKQSTV4MWjs.PLAY_DEFAULT_EXPORT,
|
|
12474
12532
|
{ cache: !options.dryRun }
|
|
12475
12533
|
)
|
|
12476
12534
|
);
|
|
@@ -12478,14 +12536,14 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12478
12536
|
if (options.dryRun) {
|
|
12479
12537
|
progress.complete();
|
|
12480
12538
|
renderLocalPlayExecutionPlan(
|
|
12481
|
-
|
|
12539
|
+
_chunkSVPM2E2Ujs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile }),
|
|
12482
12540
|
{ dryRun: true, json: options.jsonOutput }
|
|
12483
12541
|
);
|
|
12484
12542
|
return 0;
|
|
12485
12543
|
}
|
|
12486
|
-
client = new (0,
|
|
12544
|
+
client = _nullishCoalesce(prefetchClient, () => ( new (0, _chunkJ4D3PCQ2js.DeeplineClient)(playRunClientOptions(options))));
|
|
12487
12545
|
if (cliAdmission && (graph.root.importedPlayDependencies.length > 0 || inputContainsLocalFilePath(runtimeInput))) {
|
|
12488
|
-
await
|
|
12546
|
+
await _chunkKPXP2DIYjs.checkPlayRunCompatibility.call(void 0,
|
|
12489
12547
|
client.baseUrl,
|
|
12490
12548
|
options.maintenancePolicy
|
|
12491
12549
|
);
|
|
@@ -12493,12 +12551,12 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12493
12551
|
}
|
|
12494
12552
|
await preflightPlayRunTotalBudget({
|
|
12495
12553
|
client,
|
|
12496
|
-
playName:
|
|
12554
|
+
playName: await _asyncNullishCoalesce(graph.root.playName, async () => ( await extractPlayName(sourceCode, absolutePlayPath))),
|
|
12497
12555
|
maxTotalCredits: options.maxTotalCredits
|
|
12498
12556
|
});
|
|
12499
12557
|
const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
|
|
12500
12558
|
if (canDeferCompilerManifest) {
|
|
12501
|
-
|
|
12559
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
12502
12560
|
phase: "cli.play_file_compile_manifests",
|
|
12503
12561
|
ms: 0,
|
|
12504
12562
|
ok: true,
|
|
@@ -12507,7 +12565,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12507
12565
|
reason: "validated_by_run_route"
|
|
12508
12566
|
});
|
|
12509
12567
|
} else {
|
|
12510
|
-
await
|
|
12568
|
+
await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
12511
12569
|
"cli.play_file_compile_manifests",
|
|
12512
12570
|
{ targetKind: "file", skipped: false },
|
|
12513
12571
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
@@ -12523,18 +12581,18 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12523
12581
|
return 1;
|
|
12524
12582
|
}
|
|
12525
12583
|
let bundleResult = graph.root;
|
|
12526
|
-
const playName =
|
|
12584
|
+
const playName = await _asyncNullishCoalesce(bundleResult.playName, async () => ( await extractPlayName(sourceCode, absolutePlayPath)));
|
|
12527
12585
|
printBundledRuntimeWarning(bundleResult);
|
|
12528
12586
|
if (bundleResult.importedPlayDependencies.length > 0) {
|
|
12529
12587
|
try {
|
|
12530
12588
|
renderLocalPlayExecutionPlan(
|
|
12531
|
-
|
|
12589
|
+
_chunkSVPM2E2Ujs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile })
|
|
12532
12590
|
);
|
|
12533
12591
|
progress.phase("pinning imported plays");
|
|
12534
|
-
graph = await
|
|
12592
|
+
graph = await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
12535
12593
|
"cli.play_file_pin_imports",
|
|
12536
12594
|
{ targetKind: "file" },
|
|
12537
|
-
() =>
|
|
12595
|
+
() => _chunkSVPM2E2Ujs.pinLocalPlayImports.call(void 0, client, graph)
|
|
12538
12596
|
);
|
|
12539
12597
|
bundleResult = graph.root;
|
|
12540
12598
|
} catch (error) {
|
|
@@ -12547,10 +12605,10 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12547
12605
|
(file) => stageFile(file.logicalPath, file.absolutePath)
|
|
12548
12606
|
);
|
|
12549
12607
|
const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
|
|
12550
|
-
const fileInputBindings =
|
|
12551
|
-
_optionalChain([compilerManifest, 'optionalAccess',
|
|
12608
|
+
const fileInputBindings = _chunkGVAENVIGjs.fileInputBindingsFromStaticPipeline.call(void 0,
|
|
12609
|
+
_optionalChain([compilerManifest, 'optionalAccess', _476 => _476.staticPipeline])
|
|
12552
12610
|
);
|
|
12553
|
-
const stagedFileInputs = await
|
|
12611
|
+
const stagedFileInputs = await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
12554
12612
|
"cli.play_stage_inputs",
|
|
12555
12613
|
{
|
|
12556
12614
|
targetKind: "file",
|
|
@@ -12597,7 +12655,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12597
12655
|
};
|
|
12598
12656
|
if (options.watch) {
|
|
12599
12657
|
progress.phase("starting run");
|
|
12600
|
-
const finalStatus = await
|
|
12658
|
+
const finalStatus = await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
12601
12659
|
"cli.play_start_watch",
|
|
12602
12660
|
{ targetKind: "file", playName },
|
|
12603
12661
|
() => (options.runIdFile || cliAdmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
|
|
@@ -12611,14 +12669,15 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12611
12669
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
12612
12670
|
open: options.open,
|
|
12613
12671
|
progress,
|
|
12614
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
12615
|
-
onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12616
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
12672
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _477 => _477.onRunStarted]),
|
|
12673
|
+
onSubmission: _optionalChain([hooks, 'optionalAccess', _478 => _478.onSubmission]),
|
|
12674
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _479 => _479.onRunAdmitted]),
|
|
12617
12675
|
maintenancePolicy: options.maintenancePolicy,
|
|
12618
|
-
|
|
12676
|
+
...!options.runIdFile || options.fullJson ? { fullJson: options.fullJson } : {},
|
|
12619
12677
|
...cliAdmission ? {
|
|
12620
12678
|
cliAdmission: true,
|
|
12621
|
-
streamTerminalWindowMs: PLAY_START_STREAM_TERMINAL_WINDOW_MS
|
|
12679
|
+
streamTerminalWindowMs: PLAY_START_STREAM_TERMINAL_WINDOW_MS,
|
|
12680
|
+
...admissionCapability ? { admissionCapability } : {}
|
|
12622
12681
|
} : {}
|
|
12623
12682
|
}).catch(async (error) => {
|
|
12624
12683
|
throw await normalizePlayStartError(client, error, playName);
|
|
@@ -12641,8 +12700,8 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12641
12700
|
),
|
|
12642
12701
|
options
|
|
12643
12702
|
);
|
|
12644
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
12645
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12703
|
+
_optionalChain([hooks, 'optionalAccess', _480 => _480.onTerminalStatus, 'optionalCall', _481 => _481(outputStatus)]);
|
|
12704
|
+
if (_optionalChain([hooks, 'optionalAccess', _482 => _482.writeResult])) {
|
|
12646
12705
|
await hooks.writeResult(client, outputStatus);
|
|
12647
12706
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12648
12707
|
}
|
|
@@ -12657,20 +12716,20 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12657
12716
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12658
12717
|
}
|
|
12659
12718
|
progress.phase("starting run");
|
|
12660
|
-
const started = await
|
|
12719
|
+
const started = await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
12661
12720
|
"cli.play_start_unwatched",
|
|
12662
12721
|
{ targetKind: "file", playName },
|
|
12663
|
-
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12722
|
+
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _483 => _483.onSubmission]) }).catch(async (error) => {
|
|
12664
12723
|
throw await normalizePlayStartError(client, error, playName);
|
|
12665
12724
|
})
|
|
12666
12725
|
);
|
|
12667
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12668
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12726
|
+
await _optionalChain([hooks, 'optionalAccess', _484 => _484.onRunStarted, 'optionalCall', _485 => _485(started.workflowId)]);
|
|
12727
|
+
await _optionalChain([hooks, 'optionalAccess', _486 => _486.onRunAdmitted, 'optionalCall', _487 => _487(started.workflowId)]);
|
|
12669
12728
|
const resolvedDashboardUrl = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
12670
12729
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
12671
12730
|
progress.phase("started run");
|
|
12672
12731
|
progress.complete();
|
|
12673
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12732
|
+
if (_optionalChain([hooks, 'optionalAccess', _488 => _488.writeStarted])) {
|
|
12674
12733
|
hooks.writeStarted(started.workflowId, _nullishCoalesce(started.status, () => ( "started")));
|
|
12675
12734
|
return 0;
|
|
12676
12735
|
}
|
|
@@ -12697,7 +12756,7 @@ async function resolveNamedRunRevisionId(input) {
|
|
|
12697
12756
|
if (input.selector === "latest") {
|
|
12698
12757
|
const versions = await input.client.listPlayVersions(input.playName);
|
|
12699
12758
|
const latest = versions[0];
|
|
12700
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
12759
|
+
if (!_optionalChain([latest, 'optionalAccess', _489 => _489._id])) {
|
|
12701
12760
|
throw new Error(`No saved revisions found for ${input.playName}.`);
|
|
12702
12761
|
}
|
|
12703
12762
|
return latest._id;
|
|
@@ -12708,12 +12767,12 @@ async function handleNamedRun(options, hooks) {
|
|
|
12708
12767
|
if (options.target.kind !== "name") {
|
|
12709
12768
|
throw new Error("Expected a named play run target.");
|
|
12710
12769
|
}
|
|
12711
|
-
const client = new (0,
|
|
12712
|
-
let cliAdmission =
|
|
12770
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)(playRunClientOptions(options));
|
|
12771
|
+
let cliAdmission = _chunkKPXP2DIYjs.usesInlinePlayAdmission.call(void 0,
|
|
12713
12772
|
"plays run",
|
|
12714
12773
|
process.argv.slice(2)
|
|
12715
12774
|
);
|
|
12716
|
-
const progress = _nullishCoalesce(
|
|
12775
|
+
const progress = _nullishCoalesce(_chunkCM3KC74Ajs.getActiveCliProgress.call(void 0, ), () => ( _chunkCM3KC74Ajs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12717
12776
|
const playName = options.target.name;
|
|
12718
12777
|
const runtimeInput = options.input ? { ...options.input } : {};
|
|
12719
12778
|
try {
|
|
@@ -12726,16 +12785,25 @@ async function handleNamedRun(options, hooks) {
|
|
|
12726
12785
|
runtimeInput,
|
|
12727
12786
|
revisionSelector: options.revisionSelector
|
|
12728
12787
|
});
|
|
12788
|
+
let admissionCapability;
|
|
12789
|
+
if (options.watch && cliAdmission && options.maxTotalCredits === null && !needsPlayDefinition && !inputContainsLocalFilePath(runtimeInput)) {
|
|
12790
|
+
admissionCapability = _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
12791
|
+
"cli.play_admission_capability_prefetch",
|
|
12792
|
+
{ targetKind: "name", playName },
|
|
12793
|
+
() => client.prefetchPlayRunAdmissionCapability()
|
|
12794
|
+
);
|
|
12795
|
+
void admissionCapability.catch(() => void 0);
|
|
12796
|
+
}
|
|
12729
12797
|
const playDetail = needsPlayDefinition ? await (async () => {
|
|
12730
12798
|
progress.phase("loading play definition");
|
|
12731
|
-
return
|
|
12799
|
+
return _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
12732
12800
|
"cli.play_load_definition",
|
|
12733
12801
|
{ targetKind: "name", playName, skipped: false },
|
|
12734
12802
|
() => assertCanonicalNamedPlayReference(client, playName, {
|
|
12735
12803
|
command: "run"
|
|
12736
12804
|
})
|
|
12737
12805
|
);
|
|
12738
|
-
})() : (
|
|
12806
|
+
})() : (_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
12739
12807
|
phase: "cli.play_load_definition",
|
|
12740
12808
|
ms: 0,
|
|
12741
12809
|
ok: true,
|
|
@@ -12744,7 +12812,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12744
12812
|
skipped: true
|
|
12745
12813
|
}), null);
|
|
12746
12814
|
progress.phase("selecting revision");
|
|
12747
|
-
const selectedRevisionId = await
|
|
12815
|
+
const selectedRevisionId = await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
12748
12816
|
"cli.play_select_revision",
|
|
12749
12817
|
{
|
|
12750
12818
|
targetKind: "name",
|
|
@@ -12765,14 +12833,14 @@ async function handleNamedRun(options, hooks) {
|
|
|
12765
12833
|
maxTotalCredits: options.maxTotalCredits
|
|
12766
12834
|
});
|
|
12767
12835
|
const fileInputBindings = playDetail ? [
|
|
12768
|
-
...
|
|
12769
|
-
...
|
|
12836
|
+
..._chunkGVAENVIGjs.fileInputBindingsFromPlaySchema.call(void 0, playDetail.play.inputSchema),
|
|
12837
|
+
..._chunkGVAENVIGjs.fileInputBindingsFromStaticPipeline.call(void 0, playDetail.play.staticPipeline)
|
|
12770
12838
|
] : [];
|
|
12771
12839
|
if (cliAdmission && fileInputBindings.length > 0) {
|
|
12772
|
-
await
|
|
12840
|
+
await _chunkKPXP2DIYjs.checkPlayRunCompatibility.call(void 0, client.baseUrl, options.maintenancePolicy);
|
|
12773
12841
|
cliAdmission = false;
|
|
12774
12842
|
}
|
|
12775
|
-
const stagedFileInputs = await
|
|
12843
|
+
const stagedFileInputs = await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
12776
12844
|
"cli.play_stage_inputs",
|
|
12777
12845
|
{
|
|
12778
12846
|
targetKind: "name",
|
|
@@ -12795,7 +12863,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12795
12863
|
const testPolicyOverrides = {
|
|
12796
12864
|
...options.debugMapLatency ? { mapLatencyProfile: true } : {}
|
|
12797
12865
|
};
|
|
12798
|
-
const startRequest =
|
|
12866
|
+
const startRequest = _chunkGVAENVIGjs.buildNamedPlayRunRequest.call(void 0, {
|
|
12799
12867
|
name: playName,
|
|
12800
12868
|
revisionId: selectedRevisionId,
|
|
12801
12869
|
runtimeInput,
|
|
@@ -12816,7 +12884,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12816
12884
|
});
|
|
12817
12885
|
if (options.watch) {
|
|
12818
12886
|
progress.phase("starting run");
|
|
12819
|
-
const finalStatus = await
|
|
12887
|
+
const finalStatus = await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
12820
12888
|
"cli.play_start_watch",
|
|
12821
12889
|
{ targetKind: "name", playName },
|
|
12822
12890
|
() => (options.runIdFile || cliAdmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
|
|
@@ -12830,14 +12898,15 @@ async function handleNamedRun(options, hooks) {
|
|
|
12830
12898
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
12831
12899
|
open: options.open,
|
|
12832
12900
|
progress,
|
|
12833
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
12834
|
-
onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12835
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
12901
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _490 => _490.onRunStarted]),
|
|
12902
|
+
onSubmission: _optionalChain([hooks, 'optionalAccess', _491 => _491.onSubmission]),
|
|
12903
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _492 => _492.onRunAdmitted]),
|
|
12836
12904
|
maintenancePolicy: options.maintenancePolicy,
|
|
12837
|
-
|
|
12905
|
+
...!options.runIdFile || options.fullJson ? { fullJson: options.fullJson } : {},
|
|
12838
12906
|
...cliAdmission ? {
|
|
12839
12907
|
cliAdmission: true,
|
|
12840
|
-
streamTerminalWindowMs: PLAY_START_STREAM_TERMINAL_WINDOW_MS
|
|
12908
|
+
streamTerminalWindowMs: PLAY_START_STREAM_TERMINAL_WINDOW_MS,
|
|
12909
|
+
...admissionCapability ? { admissionCapability } : {}
|
|
12841
12910
|
} : {}
|
|
12842
12911
|
}).catch(async (error) => {
|
|
12843
12912
|
throw await normalizePlayStartError(client, error, playName, {
|
|
@@ -12863,8 +12932,8 @@ async function handleNamedRun(options, hooks) {
|
|
|
12863
12932
|
options,
|
|
12864
12933
|
_nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
|
|
12865
12934
|
);
|
|
12866
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
12867
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12935
|
+
_optionalChain([hooks, 'optionalAccess', _493 => _493.onTerminalStatus, 'optionalCall', _494 => _494(outputStatus)]);
|
|
12936
|
+
if (_optionalChain([hooks, 'optionalAccess', _495 => _495.writeResult])) {
|
|
12868
12937
|
await hooks.writeResult(client, outputStatus);
|
|
12869
12938
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12870
12939
|
}
|
|
@@ -12879,22 +12948,22 @@ async function handleNamedRun(options, hooks) {
|
|
|
12879
12948
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12880
12949
|
}
|
|
12881
12950
|
progress.phase("starting run");
|
|
12882
|
-
const started = await
|
|
12951
|
+
const started = await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
12883
12952
|
"cli.play_start_unwatched",
|
|
12884
12953
|
{ targetKind: "name", playName },
|
|
12885
|
-
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12954
|
+
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _496 => _496.onSubmission]) }).catch(async (error) => {
|
|
12886
12955
|
throw await normalizePlayStartError(client, error, playName, {
|
|
12887
12956
|
suggestMissingPlay: true
|
|
12888
12957
|
});
|
|
12889
12958
|
})
|
|
12890
12959
|
);
|
|
12891
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12892
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12960
|
+
await _optionalChain([hooks, 'optionalAccess', _497 => _497.onRunStarted, 'optionalCall', _498 => _498(started.workflowId)]);
|
|
12961
|
+
await _optionalChain([hooks, 'optionalAccess', _499 => _499.onRunAdmitted, 'optionalCall', _500 => _500(started.workflowId)]);
|
|
12893
12962
|
const resolvedDashboardUrl = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
12894
12963
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
12895
12964
|
progress.phase("started run");
|
|
12896
12965
|
progress.complete();
|
|
12897
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12966
|
+
if (_optionalChain([hooks, 'optionalAccess', _501 => _501.writeStarted])) {
|
|
12898
12967
|
hooks.writeStarted(started.workflowId, _nullishCoalesce(started.status, () => ( "started")));
|
|
12899
12968
|
return 0;
|
|
12900
12969
|
}
|
|
@@ -12919,12 +12988,12 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
12919
12988
|
const compact = compactPlayStatus(status);
|
|
12920
12989
|
const errors = Array.isArray(compact.errors) ? compact.errors : [];
|
|
12921
12990
|
const error = status.status === "failed" ? _nullishCoalesce(errors[0], () => ( {
|
|
12922
|
-
message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access',
|
|
12991
|
+
message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access', _502 => _502.progress, 'optionalAccess', _503 => _503.error]))), () => ( "Play failed. Inspect the run for details."))
|
|
12923
12992
|
})) : null;
|
|
12924
12993
|
const next = { status: `deepline runs get ${status.runId}` };
|
|
12925
|
-
const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access',
|
|
12994
|
+
const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access', _504 => _504.exec, 'call', _505 => _505(status.runId), 'optionalAccess', _506 => _506[1]]), () => ( extractRunPlayName(status))), () => ( null));
|
|
12926
12995
|
if (!terminal) {
|
|
12927
|
-
|
|
12996
|
+
_chunkR4EFW2I2js.writeExecutionOutput.call(void 0,
|
|
12928
12997
|
{ id: status.runId, status: status.status, next },
|
|
12929
12998
|
output
|
|
12930
12999
|
);
|
|
@@ -12983,11 +13052,11 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
12983
13052
|
Object.entries(handle).filter(([key]) => source !== "result" || key !== "_metadata").map(([key, child]) => [key, materialize(child, `${source}.${key}`)])
|
|
12984
13053
|
);
|
|
12985
13054
|
};
|
|
12986
|
-
const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call',
|
|
13055
|
+
const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call', _507 => _507(status), 'optionalAccess', _508 => _508.outputs]));
|
|
12987
13056
|
const returned = status.result !== void 0 ? status.result : packagedOutputs ? Object.fromEntries(
|
|
12988
13057
|
Object.entries(packagedOutputs).map(([key, value]) => [
|
|
12989
13058
|
key,
|
|
12990
|
-
_optionalChain([readRecord, 'call',
|
|
13059
|
+
_optionalChain([readRecord, 'call', _509 => _509(value), 'optionalAccess', _510 => _510.kind]) === "value" ? _optionalChain([readRecord, 'call', _511 => _511(value), 'optionalAccess', _512 => _512.value]) : value
|
|
12991
13060
|
])
|
|
12992
13061
|
) : null;
|
|
12993
13062
|
let data = materialize(returned);
|
|
@@ -12999,10 +13068,10 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
12999
13068
|
};
|
|
13000
13069
|
}
|
|
13001
13070
|
const byRows = new Map(collections.map((c) => [c.rows, c]));
|
|
13002
|
-
const allCollections =
|
|
13071
|
+
const allCollections = _chunkR4EFW2I2js.outputCollections.call(void 0, data).map(
|
|
13003
13072
|
(collection) => _nullishCoalesce(byRows.get(collection.rows), () => ( collection))
|
|
13004
13073
|
);
|
|
13005
|
-
|
|
13074
|
+
_chunkR4EFW2I2js.writeExecutionOutput.call(void 0,
|
|
13006
13075
|
{
|
|
13007
13076
|
id: status.runId,
|
|
13008
13077
|
status: status.status,
|
|
@@ -13010,7 +13079,7 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13010
13079
|
...allCollections.length ? { collections: allCollections } : {},
|
|
13011
13080
|
complete: allCollections.every((c) => c.complete === true) ? true : allCollections.some((c) => c.complete === false) ? false : null,
|
|
13012
13081
|
error,
|
|
13013
|
-
credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access',
|
|
13082
|
+
credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access', _513 => _513.billing, 'optionalAccess', _514 => _514.totalCredits]))), () => ( null)),
|
|
13014
13083
|
...playName ? { page: _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) } : {},
|
|
13015
13084
|
warnings: [
|
|
13016
13085
|
...buildRunWarnings(status, null),
|
|
@@ -13023,7 +13092,7 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13023
13092
|
}
|
|
13024
13093
|
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;
|
|
13025
13094
|
async function handlePlayRun(args, hooks) {
|
|
13026
|
-
const parsedOptions = Array.isArray(args) ?
|
|
13095
|
+
const parsedOptions = Array.isArray(args) ? _chunkX4XZFIK6js.parsePlayRunOptions.call(void 0, args) : args;
|
|
13027
13096
|
const options = parsedOptions.runIdFile ? {
|
|
13028
13097
|
...parsedOptions,
|
|
13029
13098
|
runIdFile: parsedOptions.dryRun ? _path.resolve.call(void 0, parsedOptions.runIdFile) : await preflightRunIdFile(parsedOptions.runIdFile)
|
|
@@ -13040,7 +13109,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13040
13109
|
JSON.stringify({
|
|
13041
13110
|
version: 1,
|
|
13042
13111
|
admissionState: "submitted_unknown",
|
|
13043
|
-
baseUrl: new (0,
|
|
13112
|
+
baseUrl: new (0, _chunkJ4D3PCQ2js.DeeplineClient)().baseUrl,
|
|
13044
13113
|
...intent
|
|
13045
13114
|
})
|
|
13046
13115
|
);
|
|
@@ -13052,7 +13121,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13052
13121
|
} finally {
|
|
13053
13122
|
await removeRunIdTempFile(tempPath);
|
|
13054
13123
|
}
|
|
13055
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13124
|
+
await _optionalChain([hooks, 'optionalAccess', _515 => _515.onSubmission, 'optionalCall', _516 => _516(intent)]);
|
|
13056
13125
|
},
|
|
13057
13126
|
onRunStarted: async (runId) => {
|
|
13058
13127
|
try {
|
|
@@ -13063,7 +13132,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13063
13132
|
{ cause: error }
|
|
13064
13133
|
);
|
|
13065
13134
|
}
|
|
13066
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13135
|
+
await _optionalChain([hooks, 'optionalAccess', _517 => _517.onRunStarted, 'optionalCall', _518 => _518(runId)]);
|
|
13067
13136
|
},
|
|
13068
13137
|
onRunAdmitted: async (runId) => {
|
|
13069
13138
|
try {
|
|
@@ -13076,7 +13145,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13076
13145
|
{ cause: error }
|
|
13077
13146
|
);
|
|
13078
13147
|
}
|
|
13079
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13148
|
+
await _optionalChain([hooks, 'optionalAccess', _519 => _519.onRunAdmitted, 'optionalCall', _520 => _520(runId)]);
|
|
13080
13149
|
}
|
|
13081
13150
|
} : hooks;
|
|
13082
13151
|
if (options.target.kind === "file") {
|
|
@@ -13155,10 +13224,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13155
13224
|
...buildRunActivityTextLines(run),
|
|
13156
13225
|
...buildRunStatusEvidenceTextLines(overview)
|
|
13157
13226
|
];
|
|
13158
|
-
if (_optionalChain([overview, 'access',
|
|
13227
|
+
if (_optionalChain([overview, 'access', _521 => _521.runStatus, 'optionalAccess', _522 => _522.available]) === false)
|
|
13159
13228
|
lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
|
|
13160
|
-
const work = readRecord(_optionalChain([readRecord, 'call',
|
|
13161
|
-
if (work && !_optionalChain([overview, 'access',
|
|
13229
|
+
const work = readRecord(_optionalChain([readRecord, 'call', _523 => _523(run), 'optionalAccess', _524 => _524.work]));
|
|
13230
|
+
if (work && !_optionalChain([overview, 'access', _525 => _525.runStatus, 'optionalAccess', _526 => _526.available]))
|
|
13162
13231
|
lines.push(
|
|
13163
13232
|
` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
|
|
13164
13233
|
);
|
|
@@ -13209,7 +13278,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13209
13278
|
...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
|
|
13210
13279
|
...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
|
|
13211
13280
|
...overview.failedLogs.entries,
|
|
13212
|
-
..._optionalChain([overview, 'access',
|
|
13281
|
+
..._optionalChain([overview, 'access', _527 => _527.failedLogs, 'access', _528 => _528.next, 'optionalAccess', _529 => _529.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
|
|
13213
13282
|
]
|
|
13214
13283
|
});
|
|
13215
13284
|
sections.push({
|
|
@@ -13269,7 +13338,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13269
13338
|
);
|
|
13270
13339
|
return `${lines.join("\n")}
|
|
13271
13340
|
|
|
13272
|
-
${
|
|
13341
|
+
${_chunk6WWBVWFQjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
|
|
13273
13342
|
}
|
|
13274
13343
|
var RUN_READ_TIMING_PROGRESS_INTERVAL_MS = 15e3;
|
|
13275
13344
|
async function withRunReadTiming(command, stage, enabled, action) {
|
|
@@ -13280,7 +13349,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
|
|
|
13280
13349
|
const progressTimer = setInterval(() => {
|
|
13281
13350
|
console.error(`[${command}] ${stage} still running after ${elapsedMs()}ms`);
|
|
13282
13351
|
}, RUN_READ_TIMING_PROGRESS_INTERVAL_MS);
|
|
13283
|
-
_optionalChain([progressTimer, 'access',
|
|
13352
|
+
_optionalChain([progressTimer, 'access', _530 => _530.unref, 'optionalCall', _531 => _531()]);
|
|
13284
13353
|
try {
|
|
13285
13354
|
const result = await action();
|
|
13286
13355
|
console.error(`[${command}] ${stage} completed in ${elapsedMs()}ms`);
|
|
@@ -13293,7 +13362,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
|
|
|
13293
13362
|
}
|
|
13294
13363
|
}
|
|
13295
13364
|
async function handleRunGet(args) {
|
|
13296
|
-
const selection =
|
|
13365
|
+
const selection = _chunk6WWBVWFQjs.parseJsonFields.call(void 0,
|
|
13297
13366
|
args,
|
|
13298
13367
|
args.includes("--config") ? "config" : "get"
|
|
13299
13368
|
);
|
|
@@ -13306,7 +13375,7 @@ async function handleRunGet(args) {
|
|
|
13306
13375
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13307
13376
|
return 1;
|
|
13308
13377
|
}
|
|
13309
|
-
const client = new (0,
|
|
13378
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
13310
13379
|
const timing = args.includes("--timing");
|
|
13311
13380
|
if (args.includes("--web-url")) {
|
|
13312
13381
|
const status2 = await withRunReadTiming(
|
|
@@ -13321,7 +13390,7 @@ async function handleRunGet(args) {
|
|
|
13321
13390
|
return 1;
|
|
13322
13391
|
}
|
|
13323
13392
|
const dashboardUrl2 = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName2);
|
|
13324
|
-
|
|
13393
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
13325
13394
|
{ dashboardUrl: dashboardUrl2 },
|
|
13326
13395
|
{ json: args.includes("--json"), text: `${dashboardUrl2}
|
|
13327
13396
|
` }
|
|
@@ -13346,7 +13415,7 @@ async function handleRunGet(args) {
|
|
|
13346
13415
|
"This server does not support recorded configuration reads."
|
|
13347
13416
|
);
|
|
13348
13417
|
}
|
|
13349
|
-
|
|
13418
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
13350
13419
|
{ runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
|
|
13351
13420
|
{ json: true, fields: selection.fields }
|
|
13352
13421
|
);
|
|
@@ -13359,7 +13428,7 @@ async function handleRunGet(args) {
|
|
|
13359
13428
|
timing,
|
|
13360
13429
|
() => client.getRunInput(runId)
|
|
13361
13430
|
);
|
|
13362
|
-
|
|
13431
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0, input, { json: true });
|
|
13363
13432
|
return 0;
|
|
13364
13433
|
}
|
|
13365
13434
|
const full = args.includes("--full");
|
|
@@ -13372,7 +13441,7 @@ async function handleRunGet(args) {
|
|
|
13372
13441
|
failedLogs: args.includes("--log-failed")
|
|
13373
13442
|
})
|
|
13374
13443
|
);
|
|
13375
|
-
if (status.package)
|
|
13444
|
+
if (status.package) _chunkR4EFW2I2js.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
13376
13445
|
if (!status.package) {
|
|
13377
13446
|
const legacyStatus = full ? await withRunReadTiming(
|
|
13378
13447
|
"runs get",
|
|
@@ -13385,8 +13454,8 @@ async function handleRunGet(args) {
|
|
|
13385
13454
|
) : status;
|
|
13386
13455
|
const legacyPlayName = resolveRunPlayName(legacyStatus, runId);
|
|
13387
13456
|
const legacyDashboardUrl = legacyPlayName ? _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, legacyPlayName) : null;
|
|
13388
|
-
if (
|
|
13389
|
-
|
|
13457
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
13458
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
13390
13459
|
{
|
|
13391
13460
|
...full ? legacyStatus : compactPlayStatus(legacyStatus),
|
|
13392
13461
|
...legacyDashboardUrl ? { dashboardUrl: legacyDashboardUrl } : {}
|
|
@@ -13396,7 +13465,7 @@ async function handleRunGet(args) {
|
|
|
13396
13465
|
} else {
|
|
13397
13466
|
writePlayResult(legacyStatus, false, { fullJson: full });
|
|
13398
13467
|
if (legacyDashboardUrl)
|
|
13399
|
-
|
|
13468
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
13400
13469
|
{ dashboardUrl: legacyDashboardUrl },
|
|
13401
13470
|
{ json: false, text: `play page: ${legacyDashboardUrl}
|
|
13402
13471
|
` }
|
|
@@ -13426,10 +13495,10 @@ async function handleRunGet(args) {
|
|
|
13426
13495
|
)
|
|
13427
13496
|
]);
|
|
13428
13497
|
const hitLines = formatRunHitsLines(hits);
|
|
13429
|
-
const json =
|
|
13498
|
+
const json = _chunk6WWBVWFQjs.argsWantJson.call(void 0, args);
|
|
13430
13499
|
const playName = resolveRunPlayName(status, runId);
|
|
13431
13500
|
const dashboardUrl = playName ? _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) : void 0;
|
|
13432
|
-
|
|
13501
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
13433
13502
|
{
|
|
13434
13503
|
...overview,
|
|
13435
13504
|
...dashboardUrl ? { dashboardUrl } : {},
|
|
@@ -13533,9 +13602,9 @@ async function handleRunLifecycleStatus(args) {
|
|
|
13533
13602
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13534
13603
|
return 1;
|
|
13535
13604
|
}
|
|
13536
|
-
const status = await new (0,
|
|
13537
|
-
if (
|
|
13538
|
-
|
|
13605
|
+
const status = await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().runs.status(runId);
|
|
13606
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
13607
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0, status, { json: true });
|
|
13539
13608
|
return 0;
|
|
13540
13609
|
}
|
|
13541
13610
|
if (!status.available) {
|
|
@@ -13575,7 +13644,7 @@ async function handleRunsRerun(args) {
|
|
|
13575
13644
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13576
13645
|
return 1;
|
|
13577
13646
|
}
|
|
13578
|
-
const options = { json:
|
|
13647
|
+
const options = { json: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args) };
|
|
13579
13648
|
for (let index = 0; index < args.length; index += 1) {
|
|
13580
13649
|
if (args[index] === "--idempotency-key") {
|
|
13581
13650
|
options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
|
|
@@ -13641,8 +13710,8 @@ ${usage2}
|
|
|
13641
13710
|
Discover Plays: ${next.discover}
|
|
13642
13711
|
Active runs: ${next.running}`
|
|
13643
13712
|
);
|
|
13644
|
-
if (
|
|
13645
|
-
|
|
13713
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
13714
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
13646
13715
|
{ ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
|
|
13647
13716
|
{ json: true }
|
|
13648
13717
|
);
|
|
@@ -13657,7 +13726,7 @@ Active runs: ${next.running}`
|
|
|
13657
13726
|
console.error("--offset requires --play.");
|
|
13658
13727
|
return 1;
|
|
13659
13728
|
}
|
|
13660
|
-
const client = new (0,
|
|
13729
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
13661
13730
|
const page = await withRunReadTiming(
|
|
13662
13731
|
"runs list",
|
|
13663
13732
|
"run inventory",
|
|
@@ -13692,7 +13761,7 @@ Active runs: ${next.running}`
|
|
|
13692
13761
|
executionTime: run.executionTime,
|
|
13693
13762
|
billingTotalCredits: run.billingTotalCredits,
|
|
13694
13763
|
billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
|
|
13695
|
-
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access',
|
|
13764
|
+
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _532 => _532.memo, 'optionalAccess', _533 => _533.playName]))), () => ( playName)), () => ( null)),
|
|
13696
13765
|
...nodeId ? { nodeObservation: _nullishCoalesce(run.nodeObservation, () => ( null)) } : {}
|
|
13697
13766
|
}));
|
|
13698
13767
|
const lines = runs.length === 0 ? [
|
|
@@ -13724,14 +13793,14 @@ Active runs: ${next.running}`
|
|
|
13724
13793
|
return lines2.join("\n");
|
|
13725
13794
|
});
|
|
13726
13795
|
const nextOffset = (_nullishCoalesce(_nullishCoalesce(page.offset, () => ( offset)), () => ( 0))) + runs.length;
|
|
13727
|
-
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}${
|
|
13796
|
+
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}${_chunk6WWBVWFQjs.argsWantJson.call(void 0, args) ? " --json" : ""}` : null;
|
|
13728
13797
|
if (page.hasMore) {
|
|
13729
13798
|
lines.push("List truncated \u2014 more runs match this filter.");
|
|
13730
13799
|
lines.push(
|
|
13731
13800
|
nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
|
|
13732
13801
|
);
|
|
13733
13802
|
}
|
|
13734
|
-
|
|
13803
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
13735
13804
|
{
|
|
13736
13805
|
runs,
|
|
13737
13806
|
count: runs.length,
|
|
@@ -13741,11 +13810,11 @@ Active runs: ${next.running}`
|
|
|
13741
13810
|
...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
|
|
13742
13811
|
next: {
|
|
13743
13812
|
page: nextPage,
|
|
13744
|
-
get: _optionalChain([runs, 'access',
|
|
13813
|
+
get: _optionalChain([runs, 'access', _534 => _534[0], 'optionalAccess', _535 => _535.id]) ? `deepline runs get ${runs[0].id}` : null
|
|
13745
13814
|
},
|
|
13746
13815
|
render: { sections: [{ title: "runs", lines }] }
|
|
13747
13816
|
},
|
|
13748
|
-
{ json:
|
|
13817
|
+
{ json: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args) }
|
|
13749
13818
|
);
|
|
13750
13819
|
return 0;
|
|
13751
13820
|
}
|
|
@@ -13775,7 +13844,7 @@ async function handleRunTail(args) {
|
|
|
13775
13844
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
13776
13845
|
return 1;
|
|
13777
13846
|
}
|
|
13778
|
-
const parsed =
|
|
13847
|
+
const parsed = _chunkD3UHG54Vjs.parseLogLevel.call(void 0, value);
|
|
13779
13848
|
if (!parsed) {
|
|
13780
13849
|
console.error(
|
|
13781
13850
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -13813,9 +13882,9 @@ async function handleRunTail(args) {
|
|
|
13813
13882
|
);
|
|
13814
13883
|
return 1;
|
|
13815
13884
|
}
|
|
13816
|
-
const client = new (0,
|
|
13885
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
13817
13886
|
const jsonLines = args.includes("--jsonl");
|
|
13818
|
-
const jsonOutput = !jsonLines &&
|
|
13887
|
+
const jsonOutput = !jsonLines && _chunk6WWBVWFQjs.argsWantJson.call(void 0, args);
|
|
13819
13888
|
const compact = args.includes("--compact");
|
|
13820
13889
|
const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
|
|
13821
13890
|
const compactState = {
|
|
@@ -13896,7 +13965,7 @@ async function handleRunLogs(args) {
|
|
|
13896
13965
|
]);
|
|
13897
13966
|
const cursorIndex = args.indexOf("--cursor");
|
|
13898
13967
|
const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
13899
|
-
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue &&
|
|
13968
|
+
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkD3UHG54Vjs.isRunLogsCursor.call(void 0, cursorValue));
|
|
13900
13969
|
if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
|
|
13901
13970
|
return handleRunEventSearch(args);
|
|
13902
13971
|
}
|
|
@@ -13930,7 +13999,7 @@ async function handleRunLogs(args) {
|
|
|
13930
13999
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
13931
14000
|
return 1;
|
|
13932
14001
|
}
|
|
13933
|
-
const parsed =
|
|
14002
|
+
const parsed = _chunkD3UHG54Vjs.parseLogLevel.call(void 0, value);
|
|
13934
14003
|
if (!parsed) {
|
|
13935
14004
|
console.error(
|
|
13936
14005
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -13977,12 +14046,12 @@ async function handleRunLogs(args) {
|
|
|
13977
14046
|
);
|
|
13978
14047
|
return 1;
|
|
13979
14048
|
}
|
|
13980
|
-
const client = new (0,
|
|
14049
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
13981
14050
|
if (outPath) {
|
|
13982
14051
|
const result2 = await client.runs.logs(runId, { all: true });
|
|
13983
|
-
const logs = result2.entries.filter((line) =>
|
|
14052
|
+
const logs = result2.entries.filter((line) => _chunkD3UHG54Vjs.logLevelReaches.call(void 0, _chunkD3UHG54Vjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkD3UHG54Vjs.classifyLogLine.call(void 0, line).line);
|
|
13984
14053
|
_fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
|
13985
|
-
|
|
14054
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
13986
14055
|
{
|
|
13987
14056
|
runId: result2.runId,
|
|
13988
14057
|
log_path: outPath,
|
|
@@ -14005,7 +14074,7 @@ async function handleRunLogs(args) {
|
|
|
14005
14074
|
]
|
|
14006
14075
|
}
|
|
14007
14076
|
},
|
|
14008
|
-
{ json:
|
|
14077
|
+
{ json: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args) }
|
|
14009
14078
|
);
|
|
14010
14079
|
return 0;
|
|
14011
14080
|
}
|
|
@@ -14036,7 +14105,7 @@ async function handleRunLogs(args) {
|
|
|
14036
14105
|
}
|
|
14037
14106
|
};
|
|
14038
14107
|
const text = buildRunLogsText(filteredResult);
|
|
14039
|
-
|
|
14108
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
14040
14109
|
{
|
|
14041
14110
|
runId: result.runId,
|
|
14042
14111
|
totalCount: result.totalCount,
|
|
@@ -14060,7 +14129,7 @@ async function handleRunLogs(args) {
|
|
|
14060
14129
|
render: { sections: [{ title: "run logs", lines: entries }] }
|
|
14061
14130
|
},
|
|
14062
14131
|
{
|
|
14063
|
-
json:
|
|
14132
|
+
json: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args),
|
|
14064
14133
|
text
|
|
14065
14134
|
}
|
|
14066
14135
|
);
|
|
@@ -14084,17 +14153,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
14084
14153
|
);
|
|
14085
14154
|
}
|
|
14086
14155
|
const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
|
|
14087
|
-
(entry) =>
|
|
14156
|
+
(entry) => _chunkD3UHG54Vjs.logLevelReaches.call(void 0, _chunkD3UHG54Vjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
|
|
14088
14157
|
);
|
|
14089
14158
|
const selected = matching.slice(-limit);
|
|
14090
14159
|
const olderMatchesExist = matching.length > selected.length;
|
|
14091
14160
|
return {
|
|
14092
14161
|
entries: selected.map((entry) => entry.line),
|
|
14093
|
-
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14094
|
-
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14162
|
+
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _536 => _536[0], 'optionalAccess', _537 => _537.seq]), () => ( null)),
|
|
14163
|
+
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _538 => _538.at, 'call', _539 => _539(-1), 'optionalAccess', _540 => _540.seq]), () => ( null)),
|
|
14095
14164
|
truncated: result.truncated || olderMatchesExist,
|
|
14096
14165
|
hasMore: olderMatchesExist,
|
|
14097
|
-
nextCursor: olderMatchesExist ?
|
|
14166
|
+
nextCursor: olderMatchesExist ? _chunkD3UHG54Vjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
|
|
14098
14167
|
};
|
|
14099
14168
|
}
|
|
14100
14169
|
async function handleRunEventSearch(args) {
|
|
@@ -14161,7 +14230,7 @@ ${usage2}`);
|
|
|
14161
14230
|
namespace,
|
|
14162
14231
|
...backend ? { backend } : {}
|
|
14163
14232
|
} : void 0;
|
|
14164
|
-
const client = new (0,
|
|
14233
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
14165
14234
|
const result = await client.runs.searchEvents({
|
|
14166
14235
|
...runId ? { runId } : {},
|
|
14167
14236
|
...values["--since"] ? { since: values["--since"] } : {},
|
|
@@ -14233,7 +14302,7 @@ ${renderedDetails}` : ""}`;
|
|
|
14233
14302
|
"--limit",
|
|
14234
14303
|
String(limit)
|
|
14235
14304
|
].join(" ") : null;
|
|
14236
|
-
|
|
14305
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
14237
14306
|
{
|
|
14238
14307
|
events,
|
|
14239
14308
|
nextCursor: result.nextCursor,
|
|
@@ -14244,19 +14313,19 @@ ${renderedDetails}` : ""}`;
|
|
|
14244
14313
|
render: { sections: [{ title: "runtime events", lines }] }
|
|
14245
14314
|
},
|
|
14246
14315
|
{
|
|
14247
|
-
json:
|
|
14316
|
+
json: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args),
|
|
14248
14317
|
text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
|
|
14249
14318
|
}
|
|
14250
14319
|
);
|
|
14251
14320
|
return 0;
|
|
14252
14321
|
}
|
|
14253
14322
|
function buildRunLogsText(result) {
|
|
14254
|
-
const lines = result.entries.map((line) =>
|
|
14323
|
+
const lines = result.entries.map((line) => _chunkD3UHG54Vjs.classifyLogLine.call(void 0, line).line);
|
|
14255
14324
|
if (result.warning) {
|
|
14256
14325
|
if (lines.length > 0) lines.push("");
|
|
14257
14326
|
lines.push(`warning: ${result.warning}`);
|
|
14258
14327
|
lines.push(
|
|
14259
|
-
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access',
|
|
14328
|
+
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _541 => _541.next, 'optionalAccess', _542 => _542.logs]), () => ( `deepline runs logs ${result.runId} --out run.log`))}`
|
|
14260
14329
|
);
|
|
14261
14330
|
}
|
|
14262
14331
|
return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
|
|
@@ -14285,7 +14354,7 @@ async function handleRunStop(args) {
|
|
|
14285
14354
|
reason = args[++index];
|
|
14286
14355
|
}
|
|
14287
14356
|
}
|
|
14288
|
-
const client = new (0,
|
|
14357
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
14289
14358
|
const result = await client.runs.stop(runId, { reason });
|
|
14290
14359
|
const state = resolveRunStopState(result);
|
|
14291
14360
|
const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
|
|
@@ -14300,7 +14369,7 @@ async function handleRunStop(args) {
|
|
|
14300
14369
|
...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
|
|
14301
14370
|
`inspect: deepline runs get ${runId} --full`
|
|
14302
14371
|
];
|
|
14303
|
-
|
|
14372
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
14304
14373
|
{
|
|
14305
14374
|
...cancelling,
|
|
14306
14375
|
state,
|
|
@@ -14315,7 +14384,7 @@ async function handleRunStop(args) {
|
|
|
14315
14384
|
]
|
|
14316
14385
|
}
|
|
14317
14386
|
},
|
|
14318
|
-
{ json:
|
|
14387
|
+
{ json: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args) }
|
|
14319
14388
|
);
|
|
14320
14389
|
return 0;
|
|
14321
14390
|
}
|
|
@@ -14332,7 +14401,7 @@ async function handleRunStop(args) {
|
|
|
14332
14401
|
];
|
|
14333
14402
|
process.stderr.write(`${lines2.join("\n")}
|
|
14334
14403
|
`);
|
|
14335
|
-
|
|
14404
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
14336
14405
|
{
|
|
14337
14406
|
...result,
|
|
14338
14407
|
render: {
|
|
@@ -14347,7 +14416,7 @@ async function handleRunStop(args) {
|
|
|
14347
14416
|
]
|
|
14348
14417
|
}
|
|
14349
14418
|
},
|
|
14350
|
-
{ json:
|
|
14419
|
+
{ json: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args) }
|
|
14351
14420
|
);
|
|
14352
14421
|
return 1;
|
|
14353
14422
|
}
|
|
@@ -14358,12 +14427,12 @@ async function handleRunStop(args) {
|
|
|
14358
14427
|
`warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
|
|
14359
14428
|
] : []
|
|
14360
14429
|
];
|
|
14361
|
-
|
|
14430
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
14362
14431
|
{
|
|
14363
14432
|
...result,
|
|
14364
14433
|
render: { sections: [{ title: "run stop", lines }] }
|
|
14365
14434
|
},
|
|
14366
|
-
{ json:
|
|
14435
|
+
{ json: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args) }
|
|
14367
14436
|
);
|
|
14368
14437
|
return 0;
|
|
14369
14438
|
}
|
|
@@ -14413,18 +14482,18 @@ async function handleRunStopAll(args) {
|
|
|
14413
14482
|
reason = args[++index];
|
|
14414
14483
|
}
|
|
14415
14484
|
}
|
|
14416
|
-
const client = new (0,
|
|
14485
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
14417
14486
|
if (dryRun) {
|
|
14418
14487
|
const result2 = await client.runs.stopAll({ dryRun: true, reason });
|
|
14419
14488
|
const lines2 = buildStopAllDryRunTextLines(result2);
|
|
14420
|
-
|
|
14489
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
14421
14490
|
{
|
|
14422
14491
|
...result2,
|
|
14423
14492
|
render: {
|
|
14424
14493
|
sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
|
|
14425
14494
|
}
|
|
14426
14495
|
},
|
|
14427
|
-
{ json:
|
|
14496
|
+
{ json: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
|
|
14428
14497
|
` }
|
|
14429
14498
|
);
|
|
14430
14499
|
return 0;
|
|
@@ -14437,17 +14506,17 @@ async function handleRunStopAll(args) {
|
|
|
14437
14506
|
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
14438
14507
|
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
14439
14508
|
];
|
|
14440
|
-
|
|
14509
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
14441
14510
|
{
|
|
14442
14511
|
...result,
|
|
14443
14512
|
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
14444
14513
|
},
|
|
14445
|
-
{ json:
|
|
14514
|
+
{ json: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args) }
|
|
14446
14515
|
);
|
|
14447
14516
|
return result.failed > 0 || result.partial ? 1 : 0;
|
|
14448
14517
|
}
|
|
14449
14518
|
async function handleRunExport(args) {
|
|
14450
|
-
const selection =
|
|
14519
|
+
const selection = _chunk6WWBVWFQjs.parseJsonFields.call(void 0, args, "export");
|
|
14451
14520
|
args = selection.args;
|
|
14452
14521
|
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]";
|
|
14453
14522
|
let runId;
|
|
@@ -14518,17 +14587,17 @@ async function handleRunExport(args) {
|
|
|
14518
14587
|
"INVALID_ARGUMENT"
|
|
14519
14588
|
);
|
|
14520
14589
|
}
|
|
14521
|
-
const client = new (0,
|
|
14590
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
14522
14591
|
let status = await client.getPlayStatus(runId, { full: true });
|
|
14523
14592
|
assertRunExportStatusIdentity(status, runId);
|
|
14524
14593
|
if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
|
|
14525
|
-
const progress =
|
|
14594
|
+
const progress = _chunkCM3KC74Ajs.createCliProgress.call(void 0, !_chunk6WWBVWFQjs.argsWantJson.call(void 0, args));
|
|
14526
14595
|
try {
|
|
14527
14596
|
await waitForPlayCompletionByWatch({
|
|
14528
14597
|
client,
|
|
14529
14598
|
playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
|
|
14530
14599
|
workflowId: runId,
|
|
14531
|
-
jsonOutput:
|
|
14600
|
+
jsonOutput: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args),
|
|
14532
14601
|
emitLogs: false,
|
|
14533
14602
|
waitTimeoutMs,
|
|
14534
14603
|
startedAt: Date.now(),
|
|
@@ -14554,26 +14623,26 @@ async function handleRunExport(args) {
|
|
|
14554
14623
|
format,
|
|
14555
14624
|
summary
|
|
14556
14625
|
});
|
|
14557
|
-
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14558
|
-
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess',
|
|
14626
|
+
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _543 => _543.rowsInfo, 'access', _544 => _544.source]), () => ( datasetPath)), () => ( null));
|
|
14627
|
+
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _545 => _545.currentTable]) ? {
|
|
14559
14628
|
code: "CURRENT_SHARED_DATASET",
|
|
14560
14629
|
message: "This export is the current shared dataset and may include writes from another run.",
|
|
14561
14630
|
full_run_output_command: `deepline runs get ${status.runId} --full`
|
|
14562
14631
|
} : null;
|
|
14563
14632
|
const navigation = buildRunNavigation(status);
|
|
14564
|
-
const resolved = _optionalChain([exportResult, 'optionalAccess',
|
|
14633
|
+
const resolved = _optionalChain([exportResult, 'optionalAccess', _546 => _546.datasetInfo]);
|
|
14565
14634
|
const identity = navigation.datasets.find(
|
|
14566
|
-
(dataset) => _optionalChain([resolved, 'optionalAccess',
|
|
14635
|
+
(dataset) => _optionalChain([resolved, 'optionalAccess', _547 => _547.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _548 => _548.tableNamespace])
|
|
14567
14636
|
);
|
|
14568
14637
|
const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
|
|
14569
14638
|
const exportCommand = runExportRetryCommand(
|
|
14570
14639
|
status.runId,
|
|
14571
14640
|
outPath,
|
|
14572
|
-
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess',
|
|
14641
|
+
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _549 => _549.datasetPath]))),
|
|
14573
14642
|
{ format, summary }
|
|
14574
14643
|
) + (args.includes("--allow-empty") ? " --allow-empty" : "");
|
|
14575
|
-
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14576
|
-
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess',
|
|
14644
|
+
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _550 => _550.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _551 => _551.path]), () => ( null)) };
|
|
14645
|
+
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _552 => _552.rowsInfo, 'access', _553 => _553.exportedRowOutcomes]);
|
|
14577
14646
|
const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
|
|
14578
14647
|
count: exportedRowOutcomes.failed,
|
|
14579
14648
|
message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
|
|
@@ -14593,17 +14662,17 @@ async function handleRunExport(args) {
|
|
|
14593
14662
|
...fileLocation,
|
|
14594
14663
|
format,
|
|
14595
14664
|
source,
|
|
14596
|
-
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14665
|
+
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _554 => _554.rowsInfo, 'access', _555 => _555.totalRows]), () => ( null)),
|
|
14597
14666
|
...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
|
|
14598
14667
|
...rowFailures ? { rowFailures } : {},
|
|
14599
|
-
columns:
|
|
14668
|
+
columns: _chunkR4EFW2I2js.underscoreKeysLast.call(void 0, _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _556 => _556.rowsInfo, 'access', _557 => _557.columns]), () => ( []))),
|
|
14600
14669
|
...currentTableNotice ? { notice: currentTableNotice } : {},
|
|
14601
14670
|
...metadataOutPath ? { metadata_path: metadataOutPath } : {},
|
|
14602
14671
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
|
|
14603
14672
|
};
|
|
14604
14673
|
const lines = withRunNavigationLines(
|
|
14605
14674
|
[
|
|
14606
|
-
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14675
|
+
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _558 => _558.path]), () => ( outPath))}`,
|
|
14607
14676
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
|
|
14608
14677
|
`Partial export: run is ${status.status}; more rows may be saved.`,
|
|
14609
14678
|
`Export after completion: ${exportCommand} --wait`
|
|
@@ -14630,8 +14699,8 @@ async function handleRunExport(args) {
|
|
|
14630
14699
|
"utf-8"
|
|
14631
14700
|
);
|
|
14632
14701
|
}
|
|
14633
|
-
|
|
14634
|
-
json:
|
|
14702
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0, payload, {
|
|
14703
|
+
json: _chunk6WWBVWFQjs.argsWantJson.call(void 0, args),
|
|
14635
14704
|
fields: selection.fields,
|
|
14636
14705
|
text: `${lines.join("\n")}
|
|
14637
14706
|
`
|
|
@@ -14665,10 +14734,10 @@ async function handlePlayGet(args) {
|
|
|
14665
14734
|
);
|
|
14666
14735
|
return 2;
|
|
14667
14736
|
}
|
|
14668
|
-
const client = new (0,
|
|
14737
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
14669
14738
|
const explicitJson = args.includes("--json");
|
|
14670
14739
|
const sourceOutput = args.includes("--source");
|
|
14671
|
-
const jsonOutput = sourceOutput ? explicitJson :
|
|
14740
|
+
const jsonOutput = sourceOutput ? explicitJson : _chunk6WWBVWFQjs.argsWantJson.call(void 0, args);
|
|
14672
14741
|
const requestedRevisionFlags = [
|
|
14673
14742
|
args.includes("--working"),
|
|
14674
14743
|
args.includes("--live"),
|
|
@@ -14708,7 +14777,10 @@ async function handlePlayGet(args) {
|
|
|
14708
14777
|
);
|
|
14709
14778
|
return 2;
|
|
14710
14779
|
}
|
|
14711
|
-
const playName = isFileTarget(target) ? extractPlayName(
|
|
14780
|
+
const playName = isFileTarget(target) ? await extractPlayName(
|
|
14781
|
+
_fs.readFileSync.call(void 0, _path.resolve.call(void 0, target), "utf-8"),
|
|
14782
|
+
_path.resolve.call(void 0, target)
|
|
14783
|
+
) : parseReferencedPlayTarget(target).playName;
|
|
14712
14784
|
const includeSource = sourceOutput || outPath !== null;
|
|
14713
14785
|
const detail = isFileTarget(target) ? await client.getPlay(
|
|
14714
14786
|
playName,
|
|
@@ -14718,7 +14790,7 @@ async function handlePlayGet(args) {
|
|
|
14718
14790
|
...includeSource ? { source: sourceSelector } : {}
|
|
14719
14791
|
});
|
|
14720
14792
|
const source = detail.source;
|
|
14721
|
-
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
14793
|
+
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _559 => _559.files, 'access', _560 => _560[source.entryFile]]), () => ( ""));
|
|
14722
14794
|
let materializedFile = null;
|
|
14723
14795
|
try {
|
|
14724
14796
|
materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
|
|
@@ -14728,7 +14800,7 @@ async function handlePlayGet(args) {
|
|
|
14728
14800
|
}
|
|
14729
14801
|
const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
|
|
14730
14802
|
if (jsonOutput) {
|
|
14731
|
-
|
|
14803
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, {
|
|
14732
14804
|
...detail,
|
|
14733
14805
|
...materializedFile ? {
|
|
14734
14806
|
message: loadedMessage,
|
|
@@ -14769,16 +14841,16 @@ async function handlePlayGet(args) {
|
|
|
14769
14841
|
}
|
|
14770
14842
|
console.log(`Play: ${formatPlayReference(detail.play)}`);
|
|
14771
14843
|
console.log(
|
|
14772
|
-
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14844
|
+
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _561 => _561.play, 'access', _562 => _562.workingRevision, 'optionalAccess', _563 => _563.version]), () => ( "\u2014"))}`
|
|
14773
14845
|
);
|
|
14774
|
-
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14846
|
+
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _564 => _564.play, 'access', _565 => _565.liveRevision, 'optionalAccess', _566 => _566.version]), () => ( "\u2014"))}`);
|
|
14775
14847
|
if (detail.play.liveRevision) {
|
|
14776
14848
|
console.log(
|
|
14777
14849
|
`Live max credits per run: ${liveMaxCreditsPerRun(detail.play.liveRevision.sourceCode)}`
|
|
14778
14850
|
);
|
|
14779
14851
|
}
|
|
14780
14852
|
console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
|
|
14781
|
-
if (detail.play.isDraftDirty && _optionalChain([detail, 'access',
|
|
14853
|
+
if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _567 => _567.play, 'access', _568 => _568.liveRevision, 'optionalAccess', _569 => _569.version])) {
|
|
14782
14854
|
console.log(
|
|
14783
14855
|
` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
|
|
14784
14856
|
);
|
|
@@ -14790,7 +14862,7 @@ async function handlePlayGet(args) {
|
|
|
14790
14862
|
console.log(line);
|
|
14791
14863
|
}
|
|
14792
14864
|
console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
|
|
14793
|
-
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14865
|
+
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _570 => _570.sheetSummary, 'optionalAccess', _571 => _571.stats, 'optionalAccess', _572 => _572.total]), () => ( 0))}`);
|
|
14794
14866
|
if (detail.customerDbUrl) {
|
|
14795
14867
|
console.log(`Customer DB: ${detail.customerDbUrl}`);
|
|
14796
14868
|
}
|
|
@@ -14806,7 +14878,7 @@ async function handlePlayGet(args) {
|
|
|
14806
14878
|
return 0;
|
|
14807
14879
|
}
|
|
14808
14880
|
function formatVersionLine(version) {
|
|
14809
|
-
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access',
|
|
14881
|
+
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _573 => _573.artifactHash, 'optionalAccess', _574 => _574.slice, 'call', _575 => _575(0, 12)]), () => ( "unknown-revision"));
|
|
14810
14882
|
const state = [
|
|
14811
14883
|
version.isLive ? "live" : null,
|
|
14812
14884
|
version.isWorking ? "working" : null
|
|
@@ -14820,8 +14892,8 @@ async function handlePlayVersions(args) {
|
|
|
14820
14892
|
console.error("Usage: deepline plays versions --name <name> [--json]");
|
|
14821
14893
|
return 1;
|
|
14822
14894
|
}
|
|
14823
|
-
const client = new (0,
|
|
14824
|
-
const jsonOutput =
|
|
14895
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
14896
|
+
const jsonOutput = _chunk6WWBVWFQjs.argsWantJson.call(void 0, args);
|
|
14825
14897
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
14826
14898
|
command: "versions"
|
|
14827
14899
|
});
|
|
@@ -14829,7 +14901,7 @@ async function handlePlayVersions(args) {
|
|
|
14829
14901
|
parseReferencedPlayTarget(playName).playName
|
|
14830
14902
|
);
|
|
14831
14903
|
if (jsonOutput) {
|
|
14832
|
-
|
|
14904
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, { versions });
|
|
14833
14905
|
return 0;
|
|
14834
14906
|
}
|
|
14835
14907
|
if (versions.length === 0) {
|
|
@@ -14842,7 +14914,7 @@ async function handlePlayVersions(args) {
|
|
|
14842
14914
|
return 0;
|
|
14843
14915
|
}
|
|
14844
14916
|
function formatPlayCostEstimate(estimate) {
|
|
14845
|
-
const computeSummary = _optionalChain([estimate, 'optionalAccess',
|
|
14917
|
+
const computeSummary = _optionalChain([estimate, 'optionalAccess', _576 => _576.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)` : "";
|
|
14846
14918
|
if (!estimate || estimate.status === "unavailable") {
|
|
14847
14919
|
return `unavailable${estimate ? `: ${estimate.message}${computeSummary}` : ""}`;
|
|
14848
14920
|
}
|
|
@@ -14872,8 +14944,8 @@ async function handlePlayCost(args) {
|
|
|
14872
14944
|
console.error("Usage: deepline plays cost <play> [--json]");
|
|
14873
14945
|
return 2;
|
|
14874
14946
|
}
|
|
14875
|
-
const result = await new (0,
|
|
14876
|
-
if (
|
|
14947
|
+
const result = await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().getPlayCostEstimate(name);
|
|
14948
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) console.log(JSON.stringify(result, null, 2));
|
|
14877
14949
|
else
|
|
14878
14950
|
console.log(
|
|
14879
14951
|
`${result.reference}: ${formatPlayCostEstimate(result.costEstimate)}`
|
|
@@ -14881,11 +14953,11 @@ async function handlePlayCost(args) {
|
|
|
14881
14953
|
return 0;
|
|
14882
14954
|
}
|
|
14883
14955
|
async function handlePlayList(args) {
|
|
14884
|
-
const jsonOutput =
|
|
14956
|
+
const jsonOutput = _chunk6WWBVWFQjs.argsWantJson.call(void 0, args);
|
|
14885
14957
|
const showCost = args.includes("--show-cost");
|
|
14886
|
-
const client = new (0,
|
|
14958
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
14887
14959
|
const categoriesIndex = args.indexOf("--categories");
|
|
14888
|
-
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access',
|
|
14960
|
+
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _577 => _577[categoriesIndex + 1], 'optionalAccess', _578 => _578.trim, 'call', _579 => _579()]) : void 0;
|
|
14889
14961
|
const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
|
|
14890
14962
|
if (args.includes("--tag") && tags.length === 0) {
|
|
14891
14963
|
console.error(
|
|
@@ -14906,7 +14978,7 @@ async function handlePlayList(args) {
|
|
|
14906
14978
|
const cursorIndex = args.indexOf("--cursor");
|
|
14907
14979
|
const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
|
|
14908
14980
|
const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
14909
|
-
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess',
|
|
14981
|
+
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _580 => _580.trim, 'call', _581 => _581()])) {
|
|
14910
14982
|
console.error("Pass a positive --limit and a non-empty --cursor.");
|
|
14911
14983
|
return 2;
|
|
14912
14984
|
}
|
|
@@ -14947,7 +15019,7 @@ async function handlePlayList(args) {
|
|
|
14947
15019
|
if (play.inputSchema || play.hasInputSchema) {
|
|
14948
15020
|
lines.push(" inputSchema: yes");
|
|
14949
15021
|
}
|
|
14950
|
-
if (_optionalChain([play, 'access',
|
|
15022
|
+
if (_optionalChain([play, 'access', _582 => _582.triggerStatus, 'optionalAccess', _583 => _583.cron])) {
|
|
14951
15023
|
lines.push(
|
|
14952
15024
|
` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
|
|
14953
15025
|
);
|
|
@@ -14967,12 +15039,12 @@ async function handlePlayList(args) {
|
|
|
14967
15039
|
} else {
|
|
14968
15040
|
lines.push(" scheduled execution: not configured");
|
|
14969
15041
|
}
|
|
14970
|
-
if (_optionalChain([play, 'access',
|
|
15042
|
+
if (_optionalChain([play, 'access', _584 => _584.triggerStatus, 'optionalAccess', _585 => _585.webhook])) {
|
|
14971
15043
|
lines.push(` webhook: ${play.triggerStatus.webhook}`);
|
|
14972
15044
|
}
|
|
14973
15045
|
if (showCost) {
|
|
14974
15046
|
lines.push(
|
|
14975
|
-
` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access',
|
|
15047
|
+
` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access', _586 => _586.observedCost, 'optionalAccess', _587 => _587.displayText]), () => ( formatPlayCostEstimate(play.costEstimate)))}`
|
|
14976
15048
|
);
|
|
14977
15049
|
}
|
|
14978
15050
|
lines.push(` run: deepline run ${reference}`);
|
|
@@ -14981,7 +15053,7 @@ async function handlePlayList(args) {
|
|
|
14981
15053
|
lines.push("List truncated \u2014 more plays are available.");
|
|
14982
15054
|
lines.push(`Next page: ${nextPage}`);
|
|
14983
15055
|
}
|
|
14984
|
-
|
|
15056
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
14985
15057
|
{
|
|
14986
15058
|
plays,
|
|
14987
15059
|
count: plays.length,
|
|
@@ -14998,8 +15070,8 @@ async function handlePlayList(args) {
|
|
|
14998
15070
|
return 0;
|
|
14999
15071
|
}
|
|
15000
15072
|
async function handlePlayPin(args, pinned) {
|
|
15001
|
-
const target = _optionalChain([args, 'access',
|
|
15002
|
-
const jsonOutput =
|
|
15073
|
+
const target = _optionalChain([args, 'access', _588 => _588.find, 'call', _589 => _589((arg) => !arg.startsWith("-")), 'optionalAccess', _590 => _590.trim, 'call', _591 => _591()]);
|
|
15074
|
+
const jsonOutput = _chunk6WWBVWFQjs.argsWantJson.call(void 0, args);
|
|
15003
15075
|
const dryRun = args.includes("--dry-run");
|
|
15004
15076
|
if (!target) {
|
|
15005
15077
|
console.error(
|
|
@@ -15017,11 +15089,11 @@ async function handlePlayPin(args, pinned) {
|
|
|
15017
15089
|
const name = parsedTarget.playName;
|
|
15018
15090
|
const plan = { name, pinned, dryRun };
|
|
15019
15091
|
if (dryRun) {
|
|
15020
|
-
|
|
15092
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, plan);
|
|
15021
15093
|
return 0;
|
|
15022
15094
|
}
|
|
15023
|
-
const result = await new (0,
|
|
15024
|
-
if (jsonOutput)
|
|
15095
|
+
const result = await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().setPlayPinned(name, pinned);
|
|
15096
|
+
if (jsonOutput) _chunk6WWBVWFQjs.printCompactJson.call(void 0, result);
|
|
15025
15097
|
else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
|
|
15026
15098
|
return 0;
|
|
15027
15099
|
}
|
|
@@ -15069,7 +15141,7 @@ function printPlayDescription(play) {
|
|
|
15069
15141
|
console.log(` ${line}`);
|
|
15070
15142
|
}
|
|
15071
15143
|
}
|
|
15072
|
-
if (_optionalChain([play, 'access',
|
|
15144
|
+
if (_optionalChain([play, 'access', _592 => _592.toolCategories, 'optionalAccess', _593 => _593.length])) {
|
|
15073
15145
|
console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
|
|
15074
15146
|
}
|
|
15075
15147
|
if (play.aliases.length > 0) {
|
|
@@ -15114,7 +15186,7 @@ function printPlayDescription(play) {
|
|
|
15114
15186
|
const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
|
|
15115
15187
|
if (runtimeLimit) {
|
|
15116
15188
|
console.log(
|
|
15117
|
-
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access',
|
|
15189
|
+
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _594 => _594.runtimeLimit, 'optionalAccess', _595 => _595.source]), () => ( "live"))})`
|
|
15118
15190
|
);
|
|
15119
15191
|
}
|
|
15120
15192
|
printScheduledPlayCapacity(play.activeScheduledPlays);
|
|
@@ -15142,17 +15214,17 @@ function formatPlayGrepMatches(matches) {
|
|
|
15142
15214
|
return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
|
|
15143
15215
|
}
|
|
15144
15216
|
async function handlePlayGrep(args) {
|
|
15145
|
-
const query = _optionalChain([args, 'access',
|
|
15217
|
+
const query = _optionalChain([args, 'access', _596 => _596[0], 'optionalAccess', _597 => _597.trim, 'call', _598 => _598()]);
|
|
15146
15218
|
if (!query) {
|
|
15147
15219
|
console.error("Usage: deepline plays grep <query> [--json]");
|
|
15148
15220
|
return 1;
|
|
15149
15221
|
}
|
|
15150
|
-
const client = new (0,
|
|
15222
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
15151
15223
|
const results = (await client.listPlays({ grep: query })).map(
|
|
15152
15224
|
summarizePlayGrepResult
|
|
15153
15225
|
);
|
|
15154
|
-
if (
|
|
15155
|
-
|
|
15226
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
15227
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, {
|
|
15156
15228
|
plays: results,
|
|
15157
15229
|
count: results.length,
|
|
15158
15230
|
query,
|
|
@@ -15166,7 +15238,7 @@ async function handlePlayGrep(args) {
|
|
|
15166
15238
|
`
|
|
15167
15239
|
);
|
|
15168
15240
|
for (const result of results) {
|
|
15169
|
-
console.log(_optionalChain([result, 'access',
|
|
15241
|
+
console.log(_optionalChain([result, 'access', _599 => _599.displayName, 'optionalAccess', _600 => _600.trim, 'call', _601 => _601()]) || result.name);
|
|
15170
15242
|
const matches = formatPlayGrepMatches(result.matches);
|
|
15171
15243
|
if (matches) console.log(` Matched: ${matches}`);
|
|
15172
15244
|
console.log(` Describe: ${result.describe}`);
|
|
@@ -15175,7 +15247,7 @@ async function handlePlayGrep(args) {
|
|
|
15175
15247
|
return 0;
|
|
15176
15248
|
}
|
|
15177
15249
|
async function handlePlayDescribe(args) {
|
|
15178
|
-
const selection =
|
|
15250
|
+
const selection = _chunk6WWBVWFQjs.parseJsonFields.call(void 0, args, "describe");
|
|
15179
15251
|
args = selection.args;
|
|
15180
15252
|
const playName = args[0];
|
|
15181
15253
|
if (!playName) {
|
|
@@ -15195,9 +15267,9 @@ async function handlePlayDescribe(args) {
|
|
|
15195
15267
|
}
|
|
15196
15268
|
if (isFileTarget(playName) || looksLikeFilePath(playName)) {
|
|
15197
15269
|
const message = "Local play files can be checked and run, but describe only supports saved/prebuilt play references.";
|
|
15198
|
-
const definedName = isFileTarget(playName) ? (() => {
|
|
15270
|
+
const definedName = isFileTarget(playName) ? await (async () => {
|
|
15199
15271
|
try {
|
|
15200
|
-
return extractPlayName(
|
|
15272
|
+
return await extractPlayName(
|
|
15201
15273
|
_fs.readFileSync.call(void 0, _path.resolve.call(void 0, playName), "utf-8"),
|
|
15202
15274
|
playName
|
|
15203
15275
|
);
|
|
@@ -15209,8 +15281,8 @@ async function handlePlayDescribe(args) {
|
|
|
15209
15281
|
`deepline plays check ${playName}`,
|
|
15210
15282
|
...definedName ? [`deepline describe <workspace>/${definedName}`] : []
|
|
15211
15283
|
];
|
|
15212
|
-
if (
|
|
15213
|
-
|
|
15284
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
15285
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, {
|
|
15214
15286
|
ok: false,
|
|
15215
15287
|
error: { message },
|
|
15216
15288
|
next
|
|
@@ -15224,7 +15296,7 @@ async function handlePlayDescribe(args) {
|
|
|
15224
15296
|
}
|
|
15225
15297
|
return 2;
|
|
15226
15298
|
}
|
|
15227
|
-
const client = new (0,
|
|
15299
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
15228
15300
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
15229
15301
|
command: "describe"
|
|
15230
15302
|
});
|
|
@@ -15234,9 +15306,9 @@ async function handlePlayDescribe(args) {
|
|
|
15234
15306
|
compact: args.includes("--compact")
|
|
15235
15307
|
}
|
|
15236
15308
|
);
|
|
15237
|
-
if (
|
|
15238
|
-
if (selection.fields)
|
|
15239
|
-
else
|
|
15309
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
15310
|
+
if (selection.fields) _chunk6WWBVWFQjs.printJson.call(void 0, play, selection.fields);
|
|
15311
|
+
else _chunk6WWBVWFQjs.printCompactJson.call(void 0, play);
|
|
15240
15312
|
return 0;
|
|
15241
15313
|
}
|
|
15242
15314
|
printPlayDescription(play);
|
|
@@ -15258,7 +15330,7 @@ async function handlePlaySave(args) {
|
|
|
15258
15330
|
}
|
|
15259
15331
|
let graph;
|
|
15260
15332
|
try {
|
|
15261
|
-
graph = await
|
|
15333
|
+
graph = await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
15262
15334
|
"cli.play_save_bundle_graph",
|
|
15263
15335
|
{ targetKind: "file" },
|
|
15264
15336
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, options.target))
|
|
@@ -15268,7 +15340,7 @@ async function handlePlaySave(args) {
|
|
|
15268
15340
|
console.error(error instanceof Error ? error.message : String(error));
|
|
15269
15341
|
return 7;
|
|
15270
15342
|
}
|
|
15271
|
-
const playName =
|
|
15343
|
+
const playName = await _asyncNullishCoalesce(graph.root.playName, async () => ( await extractPlayName(graph.root.sourceCode, graph.root.filePath)));
|
|
15272
15344
|
const artifactHash = graph.root.artifact.artifactHash;
|
|
15273
15345
|
if (options.expectedArtifactHash && options.expectedArtifactHash !== artifactHash) {
|
|
15274
15346
|
const result = {
|
|
@@ -15280,7 +15352,7 @@ async function handlePlaySave(args) {
|
|
|
15280
15352
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
|
|
15281
15353
|
};
|
|
15282
15354
|
if (options.jsonOutput) {
|
|
15283
|
-
|
|
15355
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, result);
|
|
15284
15356
|
} else {
|
|
15285
15357
|
console.error(result.message);
|
|
15286
15358
|
console.error(` checked artifact: ${result.expectedArtifactHash}`);
|
|
@@ -15302,7 +15374,7 @@ async function handlePlaySave(args) {
|
|
|
15302
15374
|
};
|
|
15303
15375
|
if (options.dryRun) {
|
|
15304
15376
|
if (options.jsonOutput) {
|
|
15305
|
-
|
|
15377
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, dryRun);
|
|
15306
15378
|
} else {
|
|
15307
15379
|
console.log(`Dry run: ${playName}`);
|
|
15308
15380
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15311,14 +15383,14 @@ async function handlePlaySave(args) {
|
|
|
15311
15383
|
}
|
|
15312
15384
|
return 0;
|
|
15313
15385
|
}
|
|
15314
|
-
const client = new (0,
|
|
15386
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
15315
15387
|
try {
|
|
15316
|
-
await
|
|
15388
|
+
await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
15317
15389
|
"cli.play_save_compile_manifests",
|
|
15318
15390
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15319
15391
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
15320
15392
|
);
|
|
15321
|
-
const saved = await
|
|
15393
|
+
const saved = await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
15322
15394
|
"cli.play_save_register_draft",
|
|
15323
15395
|
{ targetKind: "file", playName, artifactHash },
|
|
15324
15396
|
() => client.registerPlayArtifact({
|
|
@@ -15347,7 +15419,7 @@ async function handlePlaySave(args) {
|
|
|
15347
15419
|
}
|
|
15348
15420
|
};
|
|
15349
15421
|
if (options.jsonOutput) {
|
|
15350
|
-
|
|
15422
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, result);
|
|
15351
15423
|
} else {
|
|
15352
15424
|
console.log(
|
|
15353
15425
|
`\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
|
|
@@ -15373,7 +15445,7 @@ async function handlePlayPublish(args) {
|
|
|
15373
15445
|
}
|
|
15374
15446
|
const { target: playName, useLatest } = options;
|
|
15375
15447
|
let revisionId = options.revisionId;
|
|
15376
|
-
const client = new (0,
|
|
15448
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
15377
15449
|
if (isFileTarget(playName)) {
|
|
15378
15450
|
if (revisionId || useLatest) {
|
|
15379
15451
|
console.error(
|
|
@@ -15383,7 +15455,7 @@ async function handlePlayPublish(args) {
|
|
|
15383
15455
|
}
|
|
15384
15456
|
let graph;
|
|
15385
15457
|
try {
|
|
15386
|
-
graph = await
|
|
15458
|
+
graph = await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
15387
15459
|
"cli.play_publish_bundle_graph",
|
|
15388
15460
|
{ targetKind: "file" },
|
|
15389
15461
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, playName))
|
|
@@ -15393,7 +15465,7 @@ async function handlePlayPublish(args) {
|
|
|
15393
15465
|
console.error(error instanceof Error ? error.message : String(error));
|
|
15394
15466
|
return 1;
|
|
15395
15467
|
}
|
|
15396
|
-
const rootPlayName =
|
|
15468
|
+
const rootPlayName = await _asyncNullishCoalesce(graph.root.playName, async () => ( await extractPlayName(graph.root.sourceCode, graph.root.filePath)));
|
|
15397
15469
|
const artifactHash = graph.root.artifact.artifactHash;
|
|
15398
15470
|
if (options.expectedArtifactHash && options.expectedArtifactHash !== artifactHash) {
|
|
15399
15471
|
const result3 = {
|
|
@@ -15405,7 +15477,7 @@ async function handlePlayPublish(args) {
|
|
|
15405
15477
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
|
|
15406
15478
|
};
|
|
15407
15479
|
if (options.jsonOutput) {
|
|
15408
|
-
|
|
15480
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, result3);
|
|
15409
15481
|
} else {
|
|
15410
15482
|
console.error(result3.message);
|
|
15411
15483
|
console.error(` checked artifact: ${result3.expectedArtifactHash}`);
|
|
@@ -15428,7 +15500,7 @@ async function handlePlayPublish(args) {
|
|
|
15428
15500
|
};
|
|
15429
15501
|
if (options.dryRun) {
|
|
15430
15502
|
if (options.jsonOutput) {
|
|
15431
|
-
|
|
15503
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, dryRun);
|
|
15432
15504
|
} else {
|
|
15433
15505
|
console.log(`Dry run: ${rootPlayName}`);
|
|
15434
15506
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15447,12 +15519,12 @@ async function handlePlayPublish(args) {
|
|
|
15447
15519
|
}
|
|
15448
15520
|
}
|
|
15449
15521
|
try {
|
|
15450
|
-
await
|
|
15522
|
+
await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
15451
15523
|
"cli.play_publish_compile_manifests",
|
|
15452
15524
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15453
15525
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
15454
15526
|
);
|
|
15455
|
-
await
|
|
15527
|
+
await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
15456
15528
|
"cli.play_publish_imports",
|
|
15457
15529
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15458
15530
|
() => publishImportedPlayDependencies(client, graph)
|
|
@@ -15461,7 +15533,7 @@ async function handlePlayPublish(args) {
|
|
|
15461
15533
|
console.error(error instanceof Error ? error.message : String(error));
|
|
15462
15534
|
return 1;
|
|
15463
15535
|
}
|
|
15464
|
-
const published = await
|
|
15536
|
+
const published = await _chunkBJMEXKZYjs.traceCliSpan.call(void 0,
|
|
15465
15537
|
"cli.play_publish_register_root",
|
|
15466
15538
|
{
|
|
15467
15539
|
targetKind: "file",
|
|
@@ -15486,17 +15558,17 @@ async function handlePlayPublish(args) {
|
|
|
15486
15558
|
artifactHash,
|
|
15487
15559
|
liveVersion: _nullishCoalesce(published.version, () => ( null)),
|
|
15488
15560
|
revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
|
|
15489
|
-
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15490
|
-
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15561
|
+
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _602 => _602.version]), () => ( null)),
|
|
15562
|
+
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _603 => _603.artifactHash]), () => ( null)),
|
|
15491
15563
|
sourceBytes: {
|
|
15492
|
-
before: _optionalChain([previousLive, 'optionalAccess',
|
|
15564
|
+
before: _optionalChain([previousLive, 'optionalAccess', _604 => _604.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
|
|
15493
15565
|
after: Buffer.byteLength(graph.root.sourceCode, "utf8")
|
|
15494
15566
|
},
|
|
15495
15567
|
triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
|
|
15496
15568
|
triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
|
|
15497
15569
|
};
|
|
15498
15570
|
if (options.jsonOutput) {
|
|
15499
|
-
|
|
15571
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, result2);
|
|
15500
15572
|
} else {
|
|
15501
15573
|
printPublishReceipt({
|
|
15502
15574
|
name: rootPlayName,
|
|
@@ -15527,14 +15599,14 @@ async function handlePlayPublish(args) {
|
|
|
15527
15599
|
revisionId: _nullishCoalesce(revisionId, () => ( null)),
|
|
15528
15600
|
latest: useLatest
|
|
15529
15601
|
};
|
|
15530
|
-
|
|
15602
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, result2);
|
|
15531
15603
|
return 0;
|
|
15532
15604
|
}
|
|
15533
15605
|
const resolvedName = parseReferencedPlayTarget(playName).playName;
|
|
15534
15606
|
if (useLatest) {
|
|
15535
15607
|
const versions = await client.listPlayVersions(resolvedName);
|
|
15536
15608
|
const latest = versions[0];
|
|
15537
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
15609
|
+
if (!_optionalChain([latest, 'optionalAccess', _605 => _605._id])) {
|
|
15538
15610
|
console.error(`No saved revisions found for ${resolvedName}.`);
|
|
15539
15611
|
return 1;
|
|
15540
15612
|
}
|
|
@@ -15551,7 +15623,7 @@ async function handlePlayPublish(args) {
|
|
|
15551
15623
|
revisionId ? { revisionId } : {}
|
|
15552
15624
|
);
|
|
15553
15625
|
if (options.jsonOutput) {
|
|
15554
|
-
|
|
15626
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, result);
|
|
15555
15627
|
} else {
|
|
15556
15628
|
printPublishReceipt({
|
|
15557
15629
|
name: result.name,
|
|
@@ -15591,7 +15663,7 @@ async function handlePlayDelete(args) {
|
|
|
15591
15663
|
);
|
|
15592
15664
|
return 2;
|
|
15593
15665
|
}
|
|
15594
|
-
const client = new (0,
|
|
15666
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
15595
15667
|
let detail;
|
|
15596
15668
|
try {
|
|
15597
15669
|
detail = await client.getPlay(parseReferencedPlayTarget(playName).playName);
|
|
@@ -15615,8 +15687,8 @@ async function handlePlayDelete(args) {
|
|
|
15615
15687
|
name: resolvedName,
|
|
15616
15688
|
plannedMutation: "move saved org-owned play to Trash and stop triggers"
|
|
15617
15689
|
};
|
|
15618
|
-
if (
|
|
15619
|
-
|
|
15690
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
15691
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, result2);
|
|
15620
15692
|
} else {
|
|
15621
15693
|
process.stdout.write(
|
|
15622
15694
|
`Dry run: would move ${result2.name} to Trash and stop its active triggers.
|
|
@@ -15626,8 +15698,8 @@ async function handlePlayDelete(args) {
|
|
|
15626
15698
|
return 0;
|
|
15627
15699
|
}
|
|
15628
15700
|
const result = await client.deletePlay(resolvedName);
|
|
15629
|
-
if (
|
|
15630
|
-
|
|
15701
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
15702
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, result);
|
|
15631
15703
|
return result.archived || result.alreadyArchived ? 0 : 4;
|
|
15632
15704
|
}
|
|
15633
15705
|
if (result.alreadyArchived) {
|
|
@@ -15666,13 +15738,13 @@ async function handlePlayRestore(args) {
|
|
|
15666
15738
|
);
|
|
15667
15739
|
return 2;
|
|
15668
15740
|
}
|
|
15669
|
-
const client = new (0,
|
|
15741
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
15670
15742
|
try {
|
|
15671
15743
|
const result = await client.restorePlay(
|
|
15672
15744
|
parseReferencedPlayTarget(playName).playName
|
|
15673
15745
|
);
|
|
15674
|
-
if (
|
|
15675
|
-
|
|
15746
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
15747
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, result);
|
|
15676
15748
|
return result.restored || result.alreadyActive ? 0 : 4;
|
|
15677
15749
|
}
|
|
15678
15750
|
if (result.alreadyActive) {
|
|
@@ -15799,21 +15871,21 @@ Common commands:
|
|
|
15799
15871
|
resume: `deepline plays resume-submission ${_chunkAID3OYVJjs.shellQuote.call(void 0, path)} --json`
|
|
15800
15872
|
}
|
|
15801
15873
|
};
|
|
15802
|
-
|
|
15874
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0, result2, {
|
|
15803
15875
|
json: options.json,
|
|
15804
15876
|
text: `Submission ${saved.workflowId}: admission is unknown. ${result2.next.inspect}
|
|
15805
15877
|
`
|
|
15806
15878
|
});
|
|
15807
15879
|
return;
|
|
15808
15880
|
}
|
|
15809
|
-
const client = new (0,
|
|
15881
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
15810
15882
|
if (new URL(saved.baseUrl).origin !== new URL(client.baseUrl).origin) {
|
|
15811
15883
|
throw new Error(
|
|
15812
15884
|
"The submission belongs to a different API origin. Select its original host before recovery."
|
|
15813
15885
|
);
|
|
15814
15886
|
}
|
|
15815
15887
|
const result = await client.startPlayRun(saved.request);
|
|
15816
|
-
|
|
15888
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
15817
15889
|
{ ...result },
|
|
15818
15890
|
{
|
|
15819
15891
|
json: options.json,
|
|
@@ -15849,7 +15921,7 @@ Examples:
|
|
|
15849
15921
|
).action(async (target, options) => {
|
|
15850
15922
|
process.exitCode = await handlePlayCheck([
|
|
15851
15923
|
target,
|
|
15852
|
-
...
|
|
15924
|
+
..._chunk6WWBVWFQjs.jsonFieldArgs.call(void 0, options.json),
|
|
15853
15925
|
...options.full ? ["--full"] : []
|
|
15854
15926
|
]);
|
|
15855
15927
|
});
|
|
@@ -15888,10 +15960,10 @@ Notes:
|
|
|
15888
15960
|
--force-tool-refresh re-executes completed tool receipts and may repeat billed
|
|
15889
15961
|
provider calls. It is independent from --force.
|
|
15890
15962
|
--max-concurrent-external-calls controls the per-run provider-tool/deepline.fetch
|
|
15891
|
-
resident-work ceiling. Default: ${
|
|
15963
|
+
resident-work ceiling. Default: ${_chunkX4XZFIK6js.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS}; accepted range: 1-${_chunkX4XZFIK6js.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS}.
|
|
15892
15964
|
Provider pacing and sandbox memory limits still apply.
|
|
15893
15965
|
--max-concurrent-rows sets the run-wide default and ceiling for live map row
|
|
15894
|
-
resolvers. Accepted range: 1-${
|
|
15966
|
+
resolvers. Accepted range: 1-${_chunkX4XZFIK6js.MAX_CONFIGURABLE_CONCURRENT_ROWS}. The runtime
|
|
15895
15967
|
may lower it when source-row size exceeds the active-row memory budget.
|
|
15896
15968
|
--max-credits replaces the play's billing.maxCreditsPerRun for this run.
|
|
15897
15969
|
Tool calls that would exceed it are denied.
|
|
@@ -16005,10 +16077,10 @@ Examples:
|
|
|
16005
16077
|
"Refresh completed tool receipts; may repeat billed provider calls"
|
|
16006
16078
|
).option(
|
|
16007
16079
|
"--max-concurrent-external-calls <count>",
|
|
16008
|
-
`Concurrent provider-tool and deepline.fetch executions (${
|
|
16080
|
+
`Concurrent provider-tool and deepline.fetch executions (${_chunkX4XZFIK6js.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS} default, max ${_chunkX4XZFIK6js.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS})`
|
|
16009
16081
|
).option(
|
|
16010
16082
|
"--max-concurrent-rows <count>",
|
|
16011
|
-
`Run-wide dataset map row resolver ceiling (max ${
|
|
16083
|
+
`Run-wide dataset map row resolver ceiling (max ${_chunkX4XZFIK6js.MAX_CONFIGURABLE_CONCURRENT_ROWS})`
|
|
16012
16084
|
).option("--max-credits <credits>", "Deepline-credit cap for this run").option("--open", "Open the play page in a browser after the run starts").option(
|
|
16013
16085
|
"--debug-map-latency",
|
|
16014
16086
|
"Internal diagnostics: emit one aggregate latency profile per dataset map"
|
|
@@ -16053,14 +16125,14 @@ JSON field selection:
|
|
|
16053
16125
|
passthroughArgs.shift();
|
|
16054
16126
|
}
|
|
16055
16127
|
const exitCode = await handlePlayRun(
|
|
16056
|
-
|
|
16128
|
+
_chunkX4XZFIK6js.resolvePlayRunCliOptions.call(void 0,
|
|
16057
16129
|
_nullishCoalesce(effectiveTarget, () => ( void 0)),
|
|
16058
16130
|
options,
|
|
16059
16131
|
passthroughArgs,
|
|
16060
|
-
|
|
16132
|
+
_chunkBJMEXKZYjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
16061
16133
|
)
|
|
16062
16134
|
);
|
|
16063
|
-
|
|
16135
|
+
_chunkBJMEXKZYjs.recordCliTrace.call(void 0, {
|
|
16064
16136
|
phase: "cli.play_command_exit",
|
|
16065
16137
|
exitCode
|
|
16066
16138
|
});
|
|
@@ -16109,9 +16181,9 @@ Examples:
|
|
|
16109
16181
|
const limit = Number(options.historyLimit);
|
|
16110
16182
|
if (!Number.isInteger(limit) || limit < 1 || limit > 30)
|
|
16111
16183
|
throw new Error("--history-limit must be an integer from 1 to 30.");
|
|
16112
|
-
const client = new (0,
|
|
16184
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
16113
16185
|
if (options.binding) {
|
|
16114
|
-
|
|
16186
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0,
|
|
16115
16187
|
await client.getPlayTriggerHistory(options.binding, { limit })
|
|
16116
16188
|
);
|
|
16117
16189
|
return;
|
|
@@ -16119,7 +16191,7 @@ Examples:
|
|
|
16119
16191
|
const result = await client.listPlayTriggerInventory({
|
|
16120
16192
|
cursor: options.cursor
|
|
16121
16193
|
});
|
|
16122
|
-
|
|
16194
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, {
|
|
16123
16195
|
...result,
|
|
16124
16196
|
next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)}`
|
|
16125
16197
|
});
|
|
@@ -16178,7 +16250,7 @@ Examples:
|
|
|
16178
16250
|
if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
|
|
16179
16251
|
throw new Error("--group-by must be kind or trigger_source.");
|
|
16180
16252
|
}
|
|
16181
|
-
const result = await new (0,
|
|
16253
|
+
const result = await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().getPlaysActivity({
|
|
16182
16254
|
timeZone: options.timeZone,
|
|
16183
16255
|
days,
|
|
16184
16256
|
...options.endDate ? { endDate: options.endDate } : {},
|
|
@@ -16192,7 +16264,7 @@ Examples:
|
|
|
16192
16264
|
`${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
|
|
16193
16265
|
);
|
|
16194
16266
|
}
|
|
16195
|
-
|
|
16267
|
+
_chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
|
|
16196
16268
|
{ ...result },
|
|
16197
16269
|
{
|
|
16198
16270
|
json: Boolean(options.json),
|
|
@@ -16221,7 +16293,7 @@ Examples:
|
|
|
16221
16293
|
false
|
|
16222
16294
|
);
|
|
16223
16295
|
});
|
|
16224
|
-
|
|
16296
|
+
_chunkCUSWZTS7js.registerDeprecatedSearchCommand.call(void 0,
|
|
16225
16297
|
play,
|
|
16226
16298
|
(options) => options.all ? ["plays"] : ["prebuilts"]
|
|
16227
16299
|
);
|
|
@@ -16262,9 +16334,9 @@ Examples:
|
|
|
16262
16334
|
"--json [fields]",
|
|
16263
16335
|
"JSON output; optionally select comma-separated dotted paths"
|
|
16264
16336
|
);
|
|
16265
|
-
|
|
16337
|
+
_chunkR4EFW2I2js.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
|
|
16266
16338
|
async (target, options) => {
|
|
16267
|
-
const ownView = () => handlePlayDescribe(
|
|
16339
|
+
const ownView = () => handlePlayDescribe(_chunk6WWBVWFQjs.describeArgs.call(void 0, target, options));
|
|
16268
16340
|
const [flagText] = [options.json].filter(
|
|
16269
16341
|
(value) => typeof value === "string"
|
|
16270
16342
|
);
|
|
@@ -16275,7 +16347,7 @@ Examples:
|
|
|
16275
16347
|
process.exitCode = await ownView();
|
|
16276
16348
|
return;
|
|
16277
16349
|
}
|
|
16278
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
16350
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-EXSH6OZD.js")));
|
|
16279
16351
|
process.exitCode = await describeAnything(
|
|
16280
16352
|
name,
|
|
16281
16353
|
{
|
|
@@ -16393,7 +16465,7 @@ Examples:
|
|
|
16393
16465
|
deepline plays deployments <deployment-id>
|
|
16394
16466
|
`
|
|
16395
16467
|
).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output").action(
|
|
16396
|
-
async (id, options) => id ?
|
|
16468
|
+
async (id, options) => id ? _chunk4CIVXXSUjs.handleDeploymentGet.call(void 0, id, options) : _chunk4CIVXXSUjs.handleDeploymentsList.call(void 0, options)
|
|
16397
16469
|
);
|
|
16398
16470
|
addPublishHelp(
|
|
16399
16471
|
play.command("publish <target>").description(
|
|
@@ -16528,14 +16600,14 @@ Examples:
|
|
|
16528
16600
|
const limit = Number(options.limit);
|
|
16529
16601
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 1e3)
|
|
16530
16602
|
throw new Error("--limit must be an integer from 1 to 1000.");
|
|
16531
|
-
const result = await new (0,
|
|
16603
|
+
const result = await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().runs.rowHistory({
|
|
16532
16604
|
playName: options.play,
|
|
16533
16605
|
runId,
|
|
16534
16606
|
tableNamespace: options.dataset,
|
|
16535
16607
|
limit,
|
|
16536
16608
|
cursor: options.cursor
|
|
16537
16609
|
});
|
|
16538
|
-
|
|
16610
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, {
|
|
16539
16611
|
...result,
|
|
16540
16612
|
...result.nextCursor ? {
|
|
16541
16613
|
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`
|
|
@@ -16609,7 +16681,7 @@ Examples:
|
|
|
16609
16681
|
new (0, _commander.Option)("--log-failed", "Attach terminal-failure logs").hideHelp()
|
|
16610
16682
|
).action(async (runId, options) => {
|
|
16611
16683
|
if (TOOL_EXECUTION_ID.test(runId)) {
|
|
16612
|
-
const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-
|
|
16684
|
+
const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-Q662HPVJ.js")));
|
|
16613
16685
|
process.exitCode = await getToolExecutionReceipt(runId, {
|
|
16614
16686
|
receiptJson: options.json !== void 0
|
|
16615
16687
|
});
|
|
@@ -16617,7 +16689,7 @@ Examples:
|
|
|
16617
16689
|
}
|
|
16618
16690
|
process.exitCode = await handleRunGet([
|
|
16619
16691
|
runId,
|
|
16620
|
-
...
|
|
16692
|
+
..._chunk6WWBVWFQjs.jsonFieldArgs.call(void 0, options.json),
|
|
16621
16693
|
...options.webUrl ? ["--web-url"] : [],
|
|
16622
16694
|
...options.full ? ["--full"] : [],
|
|
16623
16695
|
...options.input ? ["--input"] : [],
|
|
@@ -16907,7 +16979,7 @@ Examples:
|
|
|
16907
16979
|
...options.allowEmpty ? ["--allow-empty"] : [],
|
|
16908
16980
|
...options.wait ? ["--wait"] : [],
|
|
16909
16981
|
...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
|
|
16910
|
-
...
|
|
16982
|
+
..._chunk6WWBVWFQjs.jsonFieldArgs.call(void 0, options.json)
|
|
16911
16983
|
]);
|
|
16912
16984
|
});
|
|
16913
16985
|
const share = play.command("share").description(
|
|
@@ -17048,8 +17120,8 @@ function absolutePublicPlayUrl(path) {
|
|
|
17048
17120
|
}
|
|
17049
17121
|
function shareUrlFields(status) {
|
|
17050
17122
|
return {
|
|
17051
|
-
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17052
|
-
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17123
|
+
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _606 => _606.share, 'optionalAccess', _607 => _607.publicPath])),
|
|
17124
|
+
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _608 => _608.share, 'optionalAccess', _609 => _609.canonicalPath]))
|
|
17053
17125
|
};
|
|
17054
17126
|
}
|
|
17055
17127
|
function shareStatusForOutput(status) {
|
|
@@ -17073,10 +17145,10 @@ async function handlePlayShareStatus(args) {
|
|
|
17073
17145
|
return 2;
|
|
17074
17146
|
}
|
|
17075
17147
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17076
|
-
const status = await new (0,
|
|
17148
|
+
const status = await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().getSharePage(name);
|
|
17077
17149
|
const outputStatus = shareStatusForOutput(status);
|
|
17078
|
-
if (
|
|
17079
|
-
|
|
17150
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
17151
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, outputStatus);
|
|
17080
17152
|
return 0;
|
|
17081
17153
|
}
|
|
17082
17154
|
if (!outputStatus.share) {
|
|
@@ -17115,7 +17187,7 @@ async function handlePlaySharePublish(args) {
|
|
|
17115
17187
|
return 2;
|
|
17116
17188
|
}
|
|
17117
17189
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17118
|
-
const client = new (0,
|
|
17190
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
17119
17191
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17120
17192
|
let resolvedVersion;
|
|
17121
17193
|
if (!revisionId) {
|
|
@@ -17146,8 +17218,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17146
17218
|
);
|
|
17147
17219
|
if (!hasCompleted) {
|
|
17148
17220
|
const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
|
|
17149
|
-
if (
|
|
17150
|
-
|
|
17221
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
17222
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, {
|
|
17151
17223
|
ok: false,
|
|
17152
17224
|
code: "NO_SUCCESSFUL_RUN",
|
|
17153
17225
|
message,
|
|
@@ -17171,8 +17243,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17171
17243
|
};
|
|
17172
17244
|
if (args.includes("--dry-run")) {
|
|
17173
17245
|
const plan = { dryRun: true, name, version: resolvedVersion, ...request };
|
|
17174
|
-
if (
|
|
17175
|
-
|
|
17246
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
17247
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, plan);
|
|
17176
17248
|
} else {
|
|
17177
17249
|
console.log(
|
|
17178
17250
|
`Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
|
|
@@ -17182,13 +17254,13 @@ async function handlePlaySharePublish(args) {
|
|
|
17182
17254
|
}
|
|
17183
17255
|
const status = await client.publishSharePage(name, request);
|
|
17184
17256
|
const outputStatus = shareStatusForOutput(status);
|
|
17185
|
-
if (
|
|
17186
|
-
|
|
17257
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
17258
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, outputStatus);
|
|
17187
17259
|
return 0;
|
|
17188
17260
|
}
|
|
17189
17261
|
const urls = shareUrlFields(outputStatus);
|
|
17190
17262
|
console.log(
|
|
17191
|
-
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access',
|
|
17263
|
+
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _610 => _610.share, 'optionalAccess', _611 => _611.publicPath]))), () => ( ""))}`
|
|
17192
17264
|
);
|
|
17193
17265
|
if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
|
|
17194
17266
|
console.log(`Version URL: ${urls.canonicalUrl}`);
|
|
@@ -17214,9 +17286,9 @@ async function handlePlayShareUpdate(args) {
|
|
|
17214
17286
|
...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
|
|
17215
17287
|
...seoIndexing ? { seoIndexing } : {}
|
|
17216
17288
|
};
|
|
17217
|
-
const status = await new (0,
|
|
17218
|
-
if (
|
|
17219
|
-
|
|
17289
|
+
const status = await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().updateSharePage(name, request);
|
|
17290
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
17291
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, status);
|
|
17220
17292
|
return 0;
|
|
17221
17293
|
}
|
|
17222
17294
|
console.log(`Updated ${name} share settings.`);
|
|
@@ -17231,13 +17303,13 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17231
17303
|
return 2;
|
|
17232
17304
|
}
|
|
17233
17305
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17234
|
-
const client = new (0,
|
|
17306
|
+
const client = new (0, _chunkJ4D3PCQ2js.DeeplineClient)();
|
|
17235
17307
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17236
17308
|
const versionFlag = shareFlagValue(args, "--version");
|
|
17237
17309
|
if (!revisionId && versionFlag) {
|
|
17238
17310
|
const versions = await client.listPlayVersions(name);
|
|
17239
17311
|
const chosen = versions.find((r) => r.version === Number(versionFlag));
|
|
17240
|
-
if (!_optionalChain([chosen, 'optionalAccess',
|
|
17312
|
+
if (!_optionalChain([chosen, 'optionalAccess', _612 => _612._id])) {
|
|
17241
17313
|
console.error(`Version ${versionFlag} not found for ${name}.`);
|
|
17242
17314
|
return 4;
|
|
17243
17315
|
}
|
|
@@ -17248,12 +17320,12 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17248
17320
|
revisionId ? { revisionId } : {}
|
|
17249
17321
|
);
|
|
17250
17322
|
const outputStatus = shareStatusForOutput(status);
|
|
17251
|
-
if (
|
|
17252
|
-
|
|
17323
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
17324
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, outputStatus);
|
|
17253
17325
|
return 0;
|
|
17254
17326
|
}
|
|
17255
17327
|
const urls = shareUrlFields(outputStatus);
|
|
17256
|
-
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access',
|
|
17328
|
+
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _613 => _613.share, 'optionalAccess', _614 => _614.publishedRevisionId]) === revisionId;
|
|
17257
17329
|
console.log(
|
|
17258
17330
|
`Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
|
|
17259
17331
|
);
|
|
@@ -17274,9 +17346,9 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17274
17346
|
return 2;
|
|
17275
17347
|
}
|
|
17276
17348
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17277
|
-
const status = await new (0,
|
|
17278
|
-
if (
|
|
17279
|
-
|
|
17349
|
+
const status = await new (0, _chunkJ4D3PCQ2js.DeeplineClient)().unpublishSharePage(name);
|
|
17350
|
+
if (_chunk6WWBVWFQjs.argsWantJson.call(void 0, args)) {
|
|
17351
|
+
_chunk6WWBVWFQjs.printCompactJson.call(void 0, status);
|
|
17280
17352
|
return 0;
|
|
17281
17353
|
}
|
|
17282
17354
|
console.log(`Unpublished ${name}; the public page has been removed.`);
|
|
@@ -17351,4 +17423,4 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17351
17423
|
|
|
17352
17424
|
|
|
17353
17425
|
|
|
17354
|
-
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 =
|
|
17426
|
+
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 = _chunkX4XZFIK6js.parsePlayRunHeaderFlag; exports.parsePlayRunOptions = _chunkX4XZFIK6js.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;
|