deepline 0.3.482 → 0.3.484
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/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +100 -9
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/ambiguous-modal-create-state.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/compute-billing-job-state.ts +23 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-retirement-state.ts +25 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-retirement.ts +15 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/outbox-repair-operation-state.ts +30 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +95 -33
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +9 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/sandbox-cleanup-job-state.ts +23 -0
- package/dist/bundling-sources/shared_libs/product-notifications/destination-state.ts +93 -0
- package/dist/cli/{auth-R5GFDAMI.mjs → auth-EBFOTF7X.mjs} +5 -5
- package/dist/cli/auth-L5CSV3UO.js +43 -0
- package/dist/cli/{billing-SO5SFQFC.mjs → billing-2ZOIMW5V.mjs} +6 -6
- package/dist/cli/{billing-DXKVQPTC.js → billing-G2G3EF3I.js} +79 -79
- package/dist/cli/{chunk-Y4Y2QUFL.js → chunk-2AWYJXBX.js} +5 -5
- package/dist/cli/{chunk-OVSSKTXG.js → chunk-3XQIVEAT.js} +3 -3
- package/dist/cli/{chunk-RLG2MNXH.mjs → chunk-4OEOM6GP.mjs} +4 -4
- package/dist/cli/{chunk-LVOEZVDW.mjs → chunk-4OVHIWE7.mjs} +2 -2
- package/dist/cli/{chunk-G7N2DYQL.mjs → chunk-4SFC2XUF.mjs} +5 -5
- package/dist/cli/chunk-5AEDYVB6.mjs +6 -0
- package/dist/cli/{chunk-2KC3MJP5.mjs → chunk-5GOG5ZGC.mjs} +2 -2
- package/dist/cli/chunk-5K5CAND4.mjs +200 -0
- package/dist/cli/{chunk-AEMPAR6L.js → chunk-5KNRQWHE.js} +3 -3
- package/dist/cli/chunk-6GRZEYSG.js +200 -0
- package/dist/cli/{chunk-FQFAWIRK.mjs → chunk-6NPWXE32.mjs} +1 -1
- package/dist/cli/{chunk-AZRG5NWV.mjs → chunk-7K5CWKKZ.mjs} +2 -2
- package/dist/cli/{chunk-LMLN7R7X.mjs → chunk-AF7MOUZP.mjs} +2 -2
- package/dist/cli/{chunk-UVU4OCYO.js → chunk-C62NI2X6.js} +5 -5
- package/dist/cli/{chunk-BHID34HA.js → chunk-CYWBAV5H.js} +16 -16
- package/dist/cli/chunk-D3BCSAN7.js +6 -0
- package/dist/cli/{chunk-M6B2OZGA.js → chunk-DBJ62RAO.js} +3 -3
- package/dist/cli/{chunk-JLI7SK55.mjs → chunk-DEXSQGXB.mjs} +5 -5
- package/dist/cli/{chunk-Y6OKWGAM.mjs → chunk-EACX7QXO.mjs} +2 -2
- package/dist/cli/{chunk-3EN2BLAS.js → chunk-FQK7BULS.js} +1 -1
- package/dist/cli/{chunk-6NF7S5WY.js → chunk-FRD5WFT4.js} +6 -6
- package/dist/cli/{chunk-KDJZXX7I.mjs → chunk-HEI3BWIV.mjs} +1 -1
- package/dist/cli/{chunk-RLYJ4O6Q.js → chunk-IXWQOVNW.js} +53 -53
- package/dist/cli/{chunk-4V34YMLU.js → chunk-KA2LNIUP.js} +6 -6
- package/dist/cli/{chunk-VU2PUAEH.js → chunk-KGOC6HGI.js} +53 -53
- package/dist/cli/{chunk-AJT436SK.mjs → chunk-LTZXLYKE.mjs} +1 -1
- package/dist/cli/{chunk-ETJSPSOQ.js → chunk-M4PG7FGC.js} +2 -2
- package/dist/cli/{chunk-YT6GV6RP.js → chunk-NW4QJE54.js} +2 -2
- package/dist/cli/{chunk-MFNEJOQG.js → chunk-OHKKDPA5.js} +10 -10
- package/dist/cli/{chunk-7SZUHFJ6.mjs → chunk-PU52JXKA.mjs} +2 -2
- package/dist/cli/{chunk-2ZIUCN5I.js → chunk-QIDDTIVZ.js} +93 -93
- package/dist/cli/{chunk-DZRHML3J.js → chunk-RLLEH2SP.js} +26 -26
- package/dist/cli/{chunk-RCWBWM5J.mjs → chunk-TIRSKEZH.mjs} +1 -1
- package/dist/cli/{chunk-QCIG6V26.mjs → chunk-TN2GW57M.mjs} +1 -1
- package/dist/cli/{chunk-5MHCTVMM.mjs → chunk-TRLDJNVE.mjs} +1 -1
- package/dist/cli/{chunk-OO6HA5OT.js → chunk-U7IJAGWB.js} +7 -7
- package/dist/cli/{chunk-AZUDSDZX.js → chunk-UKM74PAA.js} +37 -37
- package/dist/cli/{chunk-NXTZ4UNI.js → chunk-UT4YMA2N.js} +4 -4
- package/dist/cli/{chunk-LKFQERA6.js → chunk-UWOY74RU.js} +21 -21
- package/dist/cli/{chunk-EC2QPBSZ.mjs → chunk-V7JCMBLU.mjs} +4 -4
- package/dist/cli/{chunk-SFZCKYTD.js → chunk-VEVGM6B5.js} +9 -9
- package/dist/cli/{chunk-DYHBKFCW.mjs → chunk-WXRM3UC6.mjs} +3 -3
- package/dist/cli/{chunk-BK3XMHPF.mjs → chunk-WYUCDLVR.mjs} +1 -1
- package/dist/cli/{chunk-SKBXTN5F.mjs → chunk-XZXIWPT3.mjs} +1 -1
- package/dist/cli/{chunk-DM7APZWK.mjs → chunk-YGN77QA5.mjs} +2 -2
- package/dist/cli/{chunk-FKGA7VKL.mjs → chunk-YHA3EV3I.mjs} +4 -4
- package/dist/cli/{chunk-HYS35M6H.mjs → chunk-YWC5AN26.mjs} +10 -10
- package/dist/cli/{chunk-FUVJPW7O.js → chunk-ZOKM7DVA.js} +8 -8
- package/dist/cli/{csv-IC3XJ4PV.mjs → csv-NLWVWD3H.mjs} +4 -4
- package/dist/cli/{csv-UWFQLI3K.js → csv-S3CHUKI6.js} +13 -13
- package/dist/cli/{db-RIPJQYF3.mjs → db-OGRPAEEM.mjs} +6 -6
- package/dist/cli/{db-PT73YDEP.js → db-WBSKMMOH.js} +27 -27
- package/dist/cli/{describe-GHI2MTDW.mjs → describe-FAD3Z7LN.mjs} +18 -17
- package/dist/cli/describe-UIAYCHWW.js +49 -0
- package/dist/cli/{executions-XUJBZF5H.mjs → executions-LYCL344R.mjs} +6 -6
- package/dist/cli/{executions-QUOWVXCU.js → executions-SOAZHCY4.js} +8 -8
- package/dist/cli/{feedback-JOZ7QNGH.mjs → feedback-AVF6V7SV.mjs} +4 -4
- package/dist/cli/{feedback-UDZ7BFB3.js → feedback-OROUPUNJ.js} +8 -8
- package/dist/cli/git-ATMWC27D.js +25 -0
- package/dist/cli/{git-O67OED4L.mjs → git-J5N5M57H.mjs} +5 -5
- package/dist/cli/index.js +138 -138
- package/dist/cli/index.mjs +42 -42
- package/dist/cli/{legacy-noops-T2G2TKO2.mjs → legacy-noops-ENRRM7BL.mjs} +5 -5
- package/dist/cli/{legacy-noops-ZFD6Z2ID.js → legacy-noops-QAQMZMEG.js} +8 -8
- package/dist/cli/{monitors-WSH4I37O.mjs → monitors-CKQ65WRL.mjs} +7 -7
- package/dist/cli/{monitors-QPWEWJW7.js → monitors-SFMQ5LFR.js} +91 -91
- package/dist/cli/{org-PZOFC4P3.js → org-3UNTDLT2.js} +72 -72
- package/dist/cli/{org-FVM465Q4.mjs → org-K4UIEU5P.mjs} +6 -6
- package/dist/cli/{pages-A5SLKL6L.mjs → pages-6GPGBIAH.mjs} +6 -6
- package/dist/cli/{pages-UMDOU2WF.js → pages-NKZTGB4C.js} +17 -17
- package/dist/cli/{play-XKJLIZQE.mjs → play-62BEE7IX.mjs} +26 -22
- package/dist/cli/{play-AFGL5D7B.js → play-BDEADESI.js} +495 -491
- package/dist/cli/{providers-CQDRM62K.js → providers-SXGP44GH.js} +9 -9
- package/dist/cli/{providers-A2EIHS3P.mjs → providers-X3CUWMFP.mjs} +6 -6
- package/dist/cli/{quickstart-BJ2XCUVV.mjs → quickstart-7LN22BKX.mjs} +4 -4
- package/dist/cli/{quickstart-NMJLH7T6.js → quickstart-XQ4426M4.js} +6 -6
- package/dist/cli/{run-S4XTJADQ.js → run-PBJ4ZJ4W.js} +37 -36
- package/dist/cli/{run-63I5M3ID.mjs → run-XXSN3B5A.mjs} +26 -25
- package/dist/cli/search-IGHLRLBD.js +32 -0
- package/dist/cli/{search-DUIWWZ56.mjs → search-M75VMADD.mjs} +8 -8
- package/dist/cli/{chunk-UXQZLXHZ.js → search-output-F6HCFYEI.js} +14 -194
- package/dist/cli/{chunk-EDBQIPMG.mjs → search-output-NUQAKWDM.mjs} +14 -194
- package/dist/cli/{secrets-FK4PQJ6U.mjs → secrets-J2H6V33R.mjs} +6 -6
- package/dist/cli/{secrets-Q6QEWCAT.js → secrets-LRYY4QPE.js} +15 -15
- package/dist/cli/{sessions-QJSN6AUL.mjs → sessions-IMT336UV.mjs} +5 -5
- package/dist/cli/{sessions-KF6JPKFK.js → sessions-YPF62CZE.js} +6 -6
- package/dist/cli/{settings-PIKGA5PF.js → settings-35YYC5WA.js} +78 -78
- package/dist/cli/{settings-UIQP5ERC.mjs → settings-PDWVQIGH.mjs} +11 -11
- package/dist/cli/{setup-4CALCNAA.mjs → setup-DG5DISSE.mjs} +9 -9
- package/dist/cli/{setup-ROKA4M5X.js → setup-UR7GOR7H.js} +47 -47
- package/dist/cli/skills-4U5WC4MJ.js +33 -0
- package/dist/cli/{skills-SQKRC7W4.mjs → skills-U6NJD5J7.mjs} +7 -7
- package/dist/cli/{tools-B6J53QS2.mjs → tools-2HGEOELR.mjs} +17 -16
- package/dist/cli/tools-PYJTQVVS.js +56 -0
- package/dist/cli/update-344OTRFM.js +33 -0
- package/dist/cli/{update-MVKCAJJV.mjs → update-FRAYBAHK.mjs} +9 -9
- package/dist/cli/{workflow-3BO5WPZO.mjs → workflow-DDKVTF36.mjs} +7 -7
- package/dist/cli/{workflow-VH2H4VS3.js → workflow-JKKLOMBX.js} +17 -17
- package/dist/index.js +10 -10
- package/dist/index.mjs +10 -10
- package/dist/install-integrity.json +106 -96
- package/dist/plays/bundle-play-file.mjs +6 -6
- 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.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-Q5VRDGL4.js +0 -43
- package/dist/cli/describe-72RFB7RS.js +0 -48
- package/dist/cli/git-A6SU7ITW.js +0 -25
- package/dist/cli/search-ACCI4VYH.js +0 -32
- package/dist/cli/skills-GZQSDPZX.js +0 -33
- package/dist/cli/tools-5C7ZVTDG.js +0 -55
- package/dist/cli/update-PR4QP7JN.js +0 -33
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkVEVGM6B5js = require('./chunk-VEVGM6B5.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -17,21 +17,21 @@ var _chunkSFZCKYTDjs = require('./chunk-SFZCKYTD.js');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkDBJ62RAOjs = require('./chunk-DBJ62RAO.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunk6GRZEYSGjs = require('./chunk-6GRZEYSG.js');
|
|
24
|
+
require('./chunk-D3BCSAN7.js');
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
|
|
27
|
-
var
|
|
28
|
+
var _chunkRLLEH2SPjs = require('./chunk-RLLEH2SP.js');
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
var _chunkIAYSWZDJjs = require('./chunk-IAYSWZDJ.js');
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
34
|
-
require('./chunk-ZM2YPJQJ.js');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
@@ -42,25 +42,25 @@ require('./chunk-ZM2YPJQJ.js');
|
|
|
42
42
|
var _chunkKQSTV4MWjs = require('./chunk-KQSTV4MW.js');
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
46
45
|
|
|
47
46
|
|
|
48
47
|
|
|
49
48
|
|
|
50
49
|
|
|
50
|
+
var _chunkYGCKMI5Pjs = require('./chunk-YGCKMI5P.js');
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
var
|
|
53
|
+
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
var _chunkA6QCMBGLjs = require('./chunk-A6QCMBGL.js');
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
var
|
|
60
|
+
var _chunkC62NI2X6js = require('./chunk-C62NI2X6.js');
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
var
|
|
63
|
+
var _chunk2AWYJXBXjs = require('./chunk-2AWYJXBX.js');
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
@@ -73,7 +73,7 @@ var _chunkY4Y2QUFLjs = require('./chunk-Y4Y2QUFL.js');
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
var
|
|
76
|
+
var _chunkFRD5WFT4js = require('./chunk-FRD5WFT4.js');
|
|
77
77
|
require('./chunk-E4CABWXL.js');
|
|
78
78
|
|
|
79
79
|
|
|
@@ -93,18 +93,18 @@ require('./chunk-XDVT3GOM.js');
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
var
|
|
96
|
+
var _chunkKA2LNIUPjs = require('./chunk-KA2LNIUP.js');
|
|
97
97
|
|
|
98
98
|
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
|
|
102
|
-
var
|
|
103
|
-
require('./chunk-
|
|
102
|
+
var _chunkNW4QJE54js = require('./chunk-NW4QJE54.js');
|
|
103
|
+
require('./chunk-IXWQOVNW.js');
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
|
|
107
|
-
var
|
|
107
|
+
var _chunk5KNRQWHEjs = require('./chunk-5KNRQWHE.js');
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
|
|
@@ -118,17 +118,17 @@ var _chunkAEMPAR6Ljs = require('./chunk-AEMPAR6L.js');
|
|
|
118
118
|
|
|
119
119
|
|
|
120
120
|
|
|
121
|
-
var
|
|
122
|
-
require('./chunk-
|
|
121
|
+
var _chunkU7IJAGWBjs = require('./chunk-U7IJAGWB.js');
|
|
122
|
+
require('./chunk-3XQIVEAT.js');
|
|
123
123
|
|
|
124
124
|
|
|
125
|
-
var
|
|
125
|
+
var _chunkUT4YMA2Njs = require('./chunk-UT4YMA2N.js');
|
|
126
126
|
require('./chunk-ALJJRZNJ.js');
|
|
127
127
|
require('./chunk-XNYIZMNQ.js');
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
131
|
-
require('./chunk-
|
|
131
|
+
require('./chunk-FQK7BULS.js');
|
|
132
132
|
require('./chunk-OG64RBAC.js');
|
|
133
133
|
|
|
134
134
|
|
|
@@ -2110,7 +2110,7 @@ function resolveField(key, command) {
|
|
|
2110
2110
|
function printSettings(result, json, name) {
|
|
2111
2111
|
result = { ...result, settings: parsePlaySettings(result.settings) };
|
|
2112
2112
|
const selected = fields.filter(([key]) => !name || key === name);
|
|
2113
|
-
|
|
2113
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
2114
2114
|
{
|
|
2115
2115
|
...result,
|
|
2116
2116
|
settings: Object.fromEntries(
|
|
@@ -2154,7 +2154,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2154
2154
|
valueSyntax: field.cli.valueSyntax,
|
|
2155
2155
|
examples: field.cli.examples
|
|
2156
2156
|
}));
|
|
2157
|
-
|
|
2157
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
2158
2158
|
{
|
|
2159
2159
|
fields: descriptions,
|
|
2160
2160
|
render: {
|
|
@@ -2179,7 +2179,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2179
2179
|
async (options, command) => {
|
|
2180
2180
|
if (options.name !== void 0) resolveField(options.name, command);
|
|
2181
2181
|
printSettings(
|
|
2182
|
-
await new (0,
|
|
2182
|
+
await new (0, _chunk2AWYJXBXjs.DeeplineClient)().getPlaySettings(options.play),
|
|
2183
2183
|
options.json,
|
|
2184
2184
|
options.name
|
|
2185
2185
|
);
|
|
@@ -2210,7 +2210,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2210
2210
|
);
|
|
2211
2211
|
}
|
|
2212
2212
|
if (options.dryRun) {
|
|
2213
|
-
|
|
2213
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
2214
2214
|
{
|
|
2215
2215
|
dryRun: true,
|
|
2216
2216
|
play,
|
|
@@ -2231,7 +2231,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2231
2231
|
return;
|
|
2232
2232
|
}
|
|
2233
2233
|
printSettings(
|
|
2234
|
-
await new (0,
|
|
2234
|
+
await new (0, _chunk2AWYJXBXjs.DeeplineClient)().updatePlaySettings(play, patch),
|
|
2235
2235
|
options.json
|
|
2236
2236
|
);
|
|
2237
2237
|
};
|
|
@@ -2257,13 +2257,13 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2257
2257
|
"--root must be person or team; --limit must be 1\u2013100.",
|
|
2258
2258
|
{ exitCode: 2 }
|
|
2259
2259
|
);
|
|
2260
|
-
const page = await new (0,
|
|
2260
|
+
const page = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().listPlaySettingsPaths({
|
|
2261
2261
|
root: options.root,
|
|
2262
2262
|
limit,
|
|
2263
2263
|
cursor: options.cursor
|
|
2264
2264
|
});
|
|
2265
2265
|
const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""}` : null;
|
|
2266
|
-
|
|
2266
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
2267
2267
|
{
|
|
2268
2268
|
...page,
|
|
2269
2269
|
nextCommand,
|
|
@@ -2314,7 +2314,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2314
2314
|
root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _12 => _12.root]), () => ( "person")),
|
|
2315
2315
|
folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.folders]), () => ( []))
|
|
2316
2316
|
};
|
|
2317
|
-
const client = new (0,
|
|
2317
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
2318
2318
|
const paths = [];
|
|
2319
2319
|
let cursor;
|
|
2320
2320
|
do {
|
|
@@ -2376,7 +2376,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2376
2376
|
moved.push(move.playName);
|
|
2377
2377
|
}
|
|
2378
2378
|
}
|
|
2379
|
-
|
|
2379
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
2380
2380
|
{
|
|
2381
2381
|
dryRun: Boolean(options.dryRun),
|
|
2382
2382
|
from: options.from,
|
|
@@ -2504,7 +2504,7 @@ function triggerLines(view) {
|
|
|
2504
2504
|
return lines;
|
|
2505
2505
|
}
|
|
2506
2506
|
function printView(view, json) {
|
|
2507
|
-
|
|
2507
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
2508
2508
|
{
|
|
2509
2509
|
...view,
|
|
2510
2510
|
render: {
|
|
@@ -2517,7 +2517,7 @@ function printView(view, json) {
|
|
|
2517
2517
|
);
|
|
2518
2518
|
}
|
|
2519
2519
|
function printResult(result, json) {
|
|
2520
|
-
|
|
2520
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
2521
2521
|
{
|
|
2522
2522
|
...result,
|
|
2523
2523
|
render: {
|
|
@@ -2547,7 +2547,7 @@ async function mutate(command, options, build) {
|
|
|
2547
2547
|
usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
|
|
2548
2548
|
}
|
|
2549
2549
|
if (options.dryRun) {
|
|
2550
|
-
|
|
2550
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
2551
2551
|
{
|
|
2552
2552
|
dryRun: true,
|
|
2553
2553
|
play: options.play,
|
|
@@ -2566,7 +2566,7 @@ async function mutate(command, options, build) {
|
|
|
2566
2566
|
return;
|
|
2567
2567
|
}
|
|
2568
2568
|
printResult(
|
|
2569
|
-
await new (0,
|
|
2569
|
+
await new (0, _chunk2AWYJXBXjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
|
|
2570
2570
|
options.json
|
|
2571
2571
|
);
|
|
2572
2572
|
}
|
|
@@ -2599,7 +2599,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2599
2599
|
}).addHelpText("after", help2);
|
|
2600
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) => {
|
|
2601
2601
|
printView(
|
|
2602
|
-
await new (0,
|
|
2602
|
+
await new (0, _chunk2AWYJXBXjs.DeeplineClient)().getPlayTriggerConfig(options.play),
|
|
2603
2603
|
options.json
|
|
2604
2604
|
);
|
|
2605
2605
|
});
|
|
@@ -2643,7 +2643,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2643
2643
|
if (options.auth === void 0) {
|
|
2644
2644
|
if (secrets.length || options.header || options.signaturePrefix)
|
|
2645
2645
|
usage(setWebhook, "--secret/--header need --auth.");
|
|
2646
|
-
const current = await new (0,
|
|
2646
|
+
const current = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().getPlayTriggerConfig(
|
|
2647
2647
|
options.play
|
|
2648
2648
|
);
|
|
2649
2649
|
return {
|
|
@@ -2720,7 +2720,7 @@ var KIND_DESCRIPTIONS = {
|
|
|
2720
2720
|
"receipt.skipped": "Saved work result: skipped.",
|
|
2721
2721
|
"runtime.event": "Other event."
|
|
2722
2722
|
};
|
|
2723
|
-
var RUN_LOGS_KIND_HELP =
|
|
2723
|
+
var RUN_LOGS_KIND_HELP = _chunkFRD5WFT4js.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
|
|
2724
2724
|
kind,
|
|
2725
2725
|
description: KIND_DESCRIPTIONS[kind]
|
|
2726
2726
|
}));
|
|
@@ -2857,9 +2857,9 @@ function configureRunQueryCommandErrors(command, resource) {
|
|
|
2857
2857
|
const args = program.args;
|
|
2858
2858
|
if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
|
|
2859
2859
|
error.exitCode = 2;
|
|
2860
|
-
if (
|
|
2861
|
-
|
|
2862
|
-
Object.assign(new (0,
|
|
2860
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
|
|
2861
|
+
_chunkU7IJAGWBjs.printJsonError.call(void 0,
|
|
2862
|
+
Object.assign(new (0, _chunkFRD5WFT4js.RunEventQueryInputError)(error.message), {
|
|
2863
2863
|
exitCode: 2,
|
|
2864
2864
|
retryable: false
|
|
2865
2865
|
})
|
|
@@ -2903,14 +2903,14 @@ function parseQuery(args, resource) {
|
|
|
2903
2903
|
if (VALUE_FLAGS.has(flag)) {
|
|
2904
2904
|
const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
|
|
2905
2905
|
if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
|
|
2906
|
-
throw new (0,
|
|
2906
|
+
throw new (0, _chunkFRD5WFT4js.RunEventQueryInputError)(
|
|
2907
2907
|
`${flag} requires a value. Use ${flag} <value>.`
|
|
2908
2908
|
);
|
|
2909
2909
|
}
|
|
2910
2910
|
if (flag === "--sum") sums.push(value);
|
|
2911
2911
|
else {
|
|
2912
2912
|
if (values[flag] !== void 0) {
|
|
2913
|
-
throw new (0,
|
|
2913
|
+
throw new (0, _chunkFRD5WFT4js.RunEventQueryInputError)(
|
|
2914
2914
|
`${flag} may only be supplied once.`
|
|
2915
2915
|
);
|
|
2916
2916
|
}
|
|
@@ -2924,12 +2924,12 @@ function parseQuery(args, resource) {
|
|
|
2924
2924
|
}
|
|
2925
2925
|
if (arg.startsWith("-")) {
|
|
2926
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.";
|
|
2927
|
-
throw new (0,
|
|
2927
|
+
throw new (0, _chunkFRD5WFT4js.RunEventQueryInputError)(
|
|
2928
2928
|
`Unsupported query flag ${flag}. ${correction}`
|
|
2929
2929
|
);
|
|
2930
2930
|
}
|
|
2931
2931
|
if (runId !== void 0) {
|
|
2932
|
-
throw new (0,
|
|
2932
|
+
throw new (0, _chunkFRD5WFT4js.RunEventQueryInputError)(
|
|
2933
2933
|
`Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
|
|
2934
2934
|
);
|
|
2935
2935
|
}
|
|
@@ -2937,7 +2937,7 @@ function parseQuery(args, resource) {
|
|
|
2937
2937
|
}
|
|
2938
2938
|
if (switches.has("--fields")) {
|
|
2939
2939
|
if (runId !== void 0) {
|
|
2940
|
-
throw new (0,
|
|
2940
|
+
throw new (0, _chunkFRD5WFT4js.RunEventQueryInputError)(
|
|
2941
2941
|
"--fields does not use a run ID. Omit the positional run ID."
|
|
2942
2942
|
);
|
|
2943
2943
|
}
|
|
@@ -2950,18 +2950,18 @@ function parseQuery(args, resource) {
|
|
|
2950
2950
|
)
|
|
2951
2951
|
];
|
|
2952
2952
|
if (incompatible.length) {
|
|
2953
|
-
throw new (0,
|
|
2953
|
+
throw new (0, _chunkFRD5WFT4js.RunEventQueryInputError)(
|
|
2954
2954
|
`--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
|
|
2955
2955
|
);
|
|
2956
2956
|
}
|
|
2957
2957
|
}
|
|
2958
2958
|
if (switches.has("--count") && values["--group-by"] !== void 0) {
|
|
2959
|
-
throw new (0,
|
|
2959
|
+
throw new (0, _chunkFRD5WFT4js.RunEventQueryInputError)(
|
|
2960
2960
|
"--count cannot be combined with --group-by. Use --group-by for counts per group."
|
|
2961
2961
|
);
|
|
2962
2962
|
}
|
|
2963
2963
|
if (sums.length && switches.has("--count")) {
|
|
2964
|
-
throw new (0,
|
|
2964
|
+
throw new (0, _chunkFRD5WFT4js.RunEventQueryInputError)(
|
|
2965
2965
|
"--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
|
|
2966
2966
|
);
|
|
2967
2967
|
}
|
|
@@ -2969,7 +2969,7 @@ function parseQuery(args, resource) {
|
|
|
2969
2969
|
if (operation === "count") {
|
|
2970
2970
|
for (const flag of ["--limit", "--cursor", "--payloads"]) {
|
|
2971
2971
|
if (values[flag] !== void 0 || switches.has(flag)) {
|
|
2972
|
-
throw new (0,
|
|
2972
|
+
throw new (0, _chunkFRD5WFT4js.RunEventQueryInputError)(
|
|
2973
2973
|
`--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
|
|
2974
2974
|
);
|
|
2975
2975
|
}
|
|
@@ -3004,16 +3004,16 @@ function parseQuery(args, resource) {
|
|
|
3004
3004
|
];
|
|
3005
3005
|
}
|
|
3006
3006
|
}
|
|
3007
|
-
const request =
|
|
3007
|
+
const request = _chunkFRD5WFT4js.normalizeRunEventOperationRequest.call(void 0, body);
|
|
3008
3008
|
const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
|
|
3009
3009
|
const backend = values["--runtime-backend"];
|
|
3010
3010
|
if (backend && backend !== "daytona" && backend !== "modal") {
|
|
3011
|
-
throw new (0,
|
|
3011
|
+
throw new (0, _chunkFRD5WFT4js.RunEventQueryInputError)(
|
|
3012
3012
|
"--runtime-backend must be daytona or modal."
|
|
3013
3013
|
);
|
|
3014
3014
|
}
|
|
3015
3015
|
if (backend && !namespace) {
|
|
3016
|
-
throw new (0,
|
|
3016
|
+
throw new (0, _chunkFRD5WFT4js.RunEventQueryInputError)(
|
|
3017
3017
|
"--runtime-backend requires --runtime-namespace."
|
|
3018
3018
|
);
|
|
3019
3019
|
}
|
|
@@ -3060,12 +3060,12 @@ async function handleRunEventQuery(args, resource = "logs") {
|
|
|
3060
3060
|
const failure = error instanceof Error ? error : new Error(String(error));
|
|
3061
3061
|
const record3 = failure;
|
|
3062
3062
|
const status = record3.statusCode;
|
|
3063
|
-
const exitCode = error instanceof
|
|
3063
|
+
const exitCode = error instanceof _chunkFRD5WFT4js.RunEventQueryInputError || status === 400 || status === 422 || record3.code === "INVALID_RUNTIME_SELECTION" ? 2 : status === 401 || status === 403 || record3.code === "CONFIG_ERROR" || record3.code === "RUNTIME_ENVIRONMENT_TOKEN_REQUIRED" ? 3 : status === 404 ? 4 : 5;
|
|
3064
3064
|
const diagnostic = Object.assign(failure, {
|
|
3065
3065
|
exitCode,
|
|
3066
3066
|
retryable: exitCode === 5
|
|
3067
3067
|
});
|
|
3068
|
-
if (
|
|
3068
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) _chunkU7IJAGWBjs.printJsonError.call(void 0, diagnostic);
|
|
3069
3069
|
else console.error(`Error: ${diagnostic.message}`);
|
|
3070
3070
|
return exitCode;
|
|
3071
3071
|
}
|
|
@@ -3080,7 +3080,7 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3080
3080
|
...criteria
|
|
3081
3081
|
} = request;
|
|
3082
3082
|
const options = { ...criteria, ...runtime ? { runtime } : {} };
|
|
3083
|
-
const client = new (0,
|
|
3083
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
3084
3084
|
let result;
|
|
3085
3085
|
if (request.operation === "fields") {
|
|
3086
3086
|
result = await client.runs[resource].fields(runtime ? { runtime } : {});
|
|
@@ -3146,13 +3146,13 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3146
3146
|
lines.push(`Next page: ${nextPage}`);
|
|
3147
3147
|
}
|
|
3148
3148
|
}
|
|
3149
|
-
|
|
3149
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
3150
3150
|
{
|
|
3151
3151
|
...result,
|
|
3152
3152
|
...nextPage ? { next: { page: nextPage } } : {},
|
|
3153
3153
|
render: { sections: [{ title: `run ${resource}`, lines }] }
|
|
3154
3154
|
},
|
|
3155
|
-
{ json:
|
|
3155
|
+
{ json: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
|
|
3156
3156
|
` }
|
|
3157
3157
|
);
|
|
3158
3158
|
return 0;
|
|
@@ -4071,7 +4071,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4071
4071
|
...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
|
|
4072
4072
|
);
|
|
4073
4073
|
}
|
|
4074
|
-
const response = await new (0,
|
|
4074
|
+
const response = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().runs.getReceipts(runId, {
|
|
4075
4075
|
keys
|
|
4076
4076
|
});
|
|
4077
4077
|
const failed = response.receipts.filter(
|
|
@@ -4083,7 +4083,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4083
4083
|
JSON.stringify(response, null, 2) + "\n",
|
|
4084
4084
|
{ flag: "wx", mode: 384 }
|
|
4085
4085
|
);
|
|
4086
|
-
|
|
4086
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
4087
4087
|
{
|
|
4088
4088
|
runId,
|
|
4089
4089
|
out: options.out,
|
|
@@ -4093,7 +4093,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4093
4093
|
{ json: true }
|
|
4094
4094
|
);
|
|
4095
4095
|
} else {
|
|
4096
|
-
|
|
4096
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
|
|
4097
4097
|
}
|
|
4098
4098
|
if (failed)
|
|
4099
4099
|
process.exitCode = response.receipts.some(
|
|
@@ -4132,7 +4132,7 @@ includes nextCommand when another page is available.
|
|
|
4132
4132
|
{ exitCode: 2 }
|
|
4133
4133
|
);
|
|
4134
4134
|
}
|
|
4135
|
-
const page = await new (0,
|
|
4135
|
+
const page = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().runs.children(parentRunId, {
|
|
4136
4136
|
launchKey: options.launchKey,
|
|
4137
4137
|
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
4138
4138
|
limit
|
|
@@ -4147,7 +4147,7 @@ includes nextCommand when another page is available.
|
|
|
4147
4147
|
"--limit",
|
|
4148
4148
|
String(limit)
|
|
4149
4149
|
].join(" ") : null;
|
|
4150
|
-
|
|
4150
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
4151
4151
|
{
|
|
4152
4152
|
parentRunId,
|
|
4153
4153
|
launchKey: options.launchKey,
|
|
@@ -4183,7 +4183,7 @@ async function handleRunsHistory(options) {
|
|
|
4183
4183
|
throw new Error("--limit must be a positive integer.");
|
|
4184
4184
|
}
|
|
4185
4185
|
}
|
|
4186
|
-
const page = await new (0,
|
|
4186
|
+
const page = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().runs.history({
|
|
4187
4187
|
cursor: options.cursor,
|
|
4188
4188
|
orgId: options.org,
|
|
4189
4189
|
search: options.search,
|
|
@@ -4199,7 +4199,7 @@ async function handleRunsHistory(options) {
|
|
|
4199
4199
|
);
|
|
4200
4200
|
}
|
|
4201
4201
|
if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
|
|
4202
|
-
|
|
4202
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
4203
4203
|
{ ...page, render: { sections: [{ title: "Run history", lines }] } },
|
|
4204
4204
|
options.json ? { json: true } : {}
|
|
4205
4205
|
);
|
|
@@ -4251,12 +4251,12 @@ async function runRunsRerunCommand(runId, options) {
|
|
|
4251
4251
|
return 1;
|
|
4252
4252
|
}
|
|
4253
4253
|
}
|
|
4254
|
-
const result = await new (0,
|
|
4254
|
+
const result = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().runs.rerun(runId, {
|
|
4255
4255
|
...idempotencyKey === void 0 ? {} : { idempotencyKey },
|
|
4256
4256
|
...inputOverrides === void 0 ? {} : { inputOverrides }
|
|
4257
4257
|
});
|
|
4258
|
-
if (
|
|
4259
|
-
|
|
4258
|
+
if (_chunkU7IJAGWBjs.shouldEmitJson.call(void 0, options.json)) {
|
|
4259
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, result, { json: true });
|
|
4260
4260
|
} else if (result.rateLimited) {
|
|
4261
4261
|
console.log(`
|
|
4262
4262
|
${result.rateLimited.message}`);
|
|
@@ -5080,13 +5080,13 @@ var RunDataset = class _RunDataset {
|
|
|
5080
5080
|
const absolutePath = _path.resolve.call(void 0, outPath);
|
|
5081
5081
|
_fs.writeFileSync.call(void 0,
|
|
5082
5082
|
absolutePath,
|
|
5083
|
-
`${JSON.stringify(
|
|
5083
|
+
`${JSON.stringify(_chunkDBJ62RAOjs.orderRunExportJson.call(void 0, this.rows), null, 2)}
|
|
5084
5084
|
`,
|
|
5085
5085
|
"utf-8"
|
|
5086
5086
|
);
|
|
5087
5087
|
return absolutePath;
|
|
5088
5088
|
}
|
|
5089
|
-
return
|
|
5089
|
+
return _chunkDBJ62RAOjs.writeRunDatasetCsv.call(void 0, {
|
|
5090
5090
|
rows: this.rows,
|
|
5091
5091
|
columns: this.#info.columns,
|
|
5092
5092
|
outPath
|
|
@@ -6783,7 +6783,7 @@ function renderOutcome(outcome) {
|
|
|
6783
6783
|
function printResult2(input) {
|
|
6784
6784
|
const failed = input.status === "failed" || input.status === "cancelled";
|
|
6785
6785
|
if (failed) process.exitCode = 1;
|
|
6786
|
-
|
|
6786
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
6787
6787
|
{
|
|
6788
6788
|
deployment: { ...input.deployment, status: input.status },
|
|
6789
6789
|
plays: input.outcomes,
|
|
@@ -6808,7 +6808,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6808
6808
|
const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
|
|
6809
6809
|
throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
|
|
6810
6810
|
});
|
|
6811
|
-
const { http, config } =
|
|
6811
|
+
const { http, config } = _chunkU7IJAGWBjs.getAuthedHttpClient.call(void 0, );
|
|
6812
6812
|
const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
|
|
6813
6813
|
const startDeployment = () => http.post("/api/v2/deployments", {
|
|
6814
6814
|
deliveryId,
|
|
@@ -6835,7 +6835,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6835
6835
|
},
|
|
6836
6836
|
{
|
|
6837
6837
|
bundle: bundleDeployPlayFile,
|
|
6838
|
-
fetchImpl:
|
|
6838
|
+
fetchImpl: _chunkUT4YMA2Njs.fetchWithDeploymentProtection,
|
|
6839
6839
|
// The plays are already here: "opening" the source is naming it.
|
|
6840
6840
|
openSource: async () => ({
|
|
6841
6841
|
open: async () => ({ repoRoot: root })
|
|
@@ -6961,7 +6961,7 @@ async function checkLocalPlayGraph(input) {
|
|
|
6961
6961
|
// src/cli/renderers/local-play-execution.ts
|
|
6962
6962
|
function renderLocalPlayExecutionPlan(plan, options = {}) {
|
|
6963
6963
|
if (options.dryRun) {
|
|
6964
|
-
|
|
6964
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
|
|
6965
6965
|
return;
|
|
6966
6966
|
}
|
|
6967
6967
|
process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
|
|
@@ -7133,7 +7133,7 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7133
7133
|
const startedAt = Date.now();
|
|
7134
7134
|
try {
|
|
7135
7135
|
const result = run();
|
|
7136
|
-
|
|
7136
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
7137
7137
|
phase,
|
|
7138
7138
|
ms: Date.now() - startedAt,
|
|
7139
7139
|
ok: true,
|
|
@@ -7141,7 +7141,7 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7141
7141
|
});
|
|
7142
7142
|
return result;
|
|
7143
7143
|
} catch (error) {
|
|
7144
|
-
|
|
7144
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
7145
7145
|
phase,
|
|
7146
7146
|
ms: Date.now() - startedAt,
|
|
7147
7147
|
ok: false,
|
|
@@ -7929,7 +7929,7 @@ function playStatusErrorText(status) {
|
|
|
7929
7929
|
function isRetryablePendingStartFailure(status) {
|
|
7930
7930
|
if (status.status !== "failed") return false;
|
|
7931
7931
|
if (status.runId && status.runId !== "pending") return false;
|
|
7932
|
-
return
|
|
7932
|
+
return _chunkFRD5WFT4js.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
|
|
7933
7933
|
}
|
|
7934
7934
|
function isAmbiguousPlayStartOutcomeError(error) {
|
|
7935
7935
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && typeof error.statusCode === "number") {
|
|
@@ -7978,13 +7978,13 @@ var PlayStartOutcomeUnknownError = (_class = class extends _chunkDIAWYWT5js.Deep
|
|
|
7978
7978
|
}, _class);
|
|
7979
7979
|
function watchSurfaceReaches(state, provenance, level) {
|
|
7980
7980
|
const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
|
|
7981
|
-
if (!
|
|
7981
|
+
if (!_chunkFRD5WFT4js.logLevelReaches.call(void 0, level, minimumLevel)) {
|
|
7982
7982
|
return false;
|
|
7983
7983
|
}
|
|
7984
|
-
if (
|
|
7984
|
+
if (_chunkFRD5WFT4js.logProvenanceReaches.call(void 0, provenance, "watch")) {
|
|
7985
7985
|
return true;
|
|
7986
7986
|
}
|
|
7987
|
-
return state.verbose === true &&
|
|
7987
|
+
return state.verbose === true && _chunkFRD5WFT4js.logProvenanceReaches.call(void 0, provenance, "debug");
|
|
7988
7988
|
}
|
|
7989
7989
|
function getEventPayload(event) {
|
|
7990
7990
|
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
@@ -8486,7 +8486,7 @@ function resolveRunPlayName(status, runId) {
|
|
|
8486
8486
|
}
|
|
8487
8487
|
function openPlayDashboard(dashboardUrl, open2) {
|
|
8488
8488
|
if (open2 && dashboardUrl) {
|
|
8489
|
-
|
|
8489
|
+
_chunkU7IJAGWBjs.openInBrowser.call(void 0, dashboardUrl);
|
|
8490
8490
|
}
|
|
8491
8491
|
}
|
|
8492
8492
|
function printPlayLogLines(input) {
|
|
@@ -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 (_chunkFRD5WFT4js.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
|
+
..._chunkNW4QJE54js.isCliTraceEnabled.call(void 0, ) ? {
|
|
8650
8650
|
onPoll: (observation) => {
|
|
8651
|
-
|
|
8651
|
+
_chunkNW4QJE54js.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
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
8666
8666
|
phase: "play_watch_terminal_status",
|
|
8667
8667
|
workflowId: input.workflowId,
|
|
8668
8668
|
full: input.fullJson === true
|
|
@@ -8732,7 +8732,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8732
8732
|
});
|
|
8733
8733
|
} catch (error) {
|
|
8734
8734
|
if (!(error instanceof _chunkGVAENVIGjs.CliPlayAdmissionUnsupportedError)) throw error;
|
|
8735
|
-
await
|
|
8735
|
+
await _chunkKA2LNIUPjs.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
|
+
_chunkNW4QJE54js.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 = _chunkFRD5WFT4js.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
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
8809
8809
|
phase: "play_watch_terminal_status",
|
|
8810
8810
|
workflowId,
|
|
8811
8811
|
full: true,
|
|
@@ -8875,7 +8875,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8875
8875
|
);
|
|
8876
8876
|
} catch (error) {
|
|
8877
8877
|
if (error instanceof _chunkGVAENVIGjs.CliPlayAdmissionUnsupportedError && input.cliAdmission) {
|
|
8878
|
-
await
|
|
8878
|
+
await _chunkKA2LNIUPjs.checkPlayRunCompatibility.call(void 0,
|
|
8879
8879
|
input.client.baseUrl,
|
|
8880
8880
|
input.maintenancePolicy
|
|
8881
8881
|
);
|
|
@@ -8911,7 +8911,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8911
8911
|
`[play watch] start response was ambiguous; retrying the same caller intent (${error.message})`
|
|
8912
8912
|
);
|
|
8913
8913
|
}
|
|
8914
|
-
|
|
8914
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
8915
8915
|
phase: "cli.play_start_stream_retry",
|
|
8916
8916
|
ms: 0,
|
|
8917
8917
|
ok: true,
|
|
@@ -8932,7 +8932,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8932
8932
|
`[play watch] start failed before run id with a transient error; retrying (${playStatusErrorText(status)})`
|
|
8933
8933
|
);
|
|
8934
8934
|
}
|
|
8935
|
-
|
|
8935
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
8936
8936
|
phase: "cli.play_start_stream_retry",
|
|
8937
8937
|
ms: 0,
|
|
8938
8938
|
ok: true,
|
|
@@ -8977,7 +8977,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
8977
8977
|
if (launchConfirmed || !runId || runId === "pending") return;
|
|
8978
8978
|
launchConfirmed = true;
|
|
8979
8979
|
await _optionalChain([input, 'access', _312 => _312.onRunAdmitted, 'optionalCall', _313 => _313(runId)]);
|
|
8980
|
-
|
|
8980
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
8981
8981
|
phase: "cli.play_start_admitted",
|
|
8982
8982
|
ms: Date.now() - startedAt,
|
|
8983
8983
|
ok: true,
|
|
@@ -9011,7 +9011,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9011
9011
|
full: input.fullJson
|
|
9012
9012
|
});
|
|
9013
9013
|
} catch (error) {
|
|
9014
|
-
if (
|
|
9014
|
+
if (_chunkFRD5WFT4js.isTransientPlayRunReadError.call(void 0, error)) {
|
|
9015
9015
|
return null;
|
|
9016
9016
|
}
|
|
9017
9017
|
throw error;
|
|
@@ -9142,7 +9142,11 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9142
9142
|
}
|
|
9143
9143
|
const fullPackage = getPlayRunPackage(finalStatus);
|
|
9144
9144
|
const fullRun = readRecord(_optionalChain([fullPackage, 'optionalAccess', _326 => _326.run]));
|
|
9145
|
-
const
|
|
9145
|
+
const fullSteps = _optionalChain([fullPackage, 'optionalAccess', _327 => _327.steps]);
|
|
9146
|
+
const scalarStep = Array.isArray(fullSteps) ? readRecord(fullSteps[0]) : null;
|
|
9147
|
+
const scalarExecution = readRecord(_optionalChain([scalarStep, 'optionalAccess', _328 => _328.execution]));
|
|
9148
|
+
const completeScalarSteps = Array.isArray(fullSteps) && (_optionalChain([fullPackage, 'optionalAccess', _329 => _329.stepsExpected]) === false && fullSteps.length === 0 || _optionalChain([fullPackage, 'optionalAccess', _330 => _330.stepsExpected]) !== false && fullSteps.length === 1 && typeof _optionalChain([scalarStep, 'optionalAccess', _331 => _331.id]) === "string" && scalarStep.id.trim().length > 0 && scalarStep.kind === "step" && scalarStep.status === "completed" && _optionalChain([scalarExecution, 'optionalAccess', _332 => _332.kind]) === "completed" && scalarExecution.rows === null);
|
|
9149
|
+
const reuseFullTerminal = input.jsonOutput && input.fullJson === true && input.request.terminalStatus === "full" && expectedFullRunId !== "" && finalStatus.runId === expectedFullRunId && _optionalChain([fullRun, 'optionalAccess', _333 => _333.id]) === expectedFullRunId && finalStatus.status === "completed" && fullRun.status === "completed" && finalStatus.finalStatusView === "full" && _optionalChain([fullPackage, 'optionalAccess', _334 => _334.resultState]) === "available" && Object.hasOwn(fullPackage, "result") && completeScalarSteps && Array.isArray(fullPackage.datasets) && fullPackage.datasets.length === 0;
|
|
9146
9150
|
let fromDurableStatus = reuseFullTerminal;
|
|
9147
9151
|
let canonicalTerminal;
|
|
9148
9152
|
if (input.request.profile === "absurd" && !reuseFullTerminal) {
|
|
@@ -9156,7 +9160,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9156
9160
|
};
|
|
9157
9161
|
}
|
|
9158
9162
|
if (!canonicalTerminal) {
|
|
9159
|
-
|
|
9163
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
9160
9164
|
phase: "cli.play_start_stream_stale_terminal_ignored",
|
|
9161
9165
|
ms: Date.now() - startedAt,
|
|
9162
9166
|
ok: true,
|
|
@@ -9177,14 +9181,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9177
9181
|
fromDurableStatus
|
|
9178
9182
|
}) : canonicalTerminal;
|
|
9179
9183
|
if (input.fullJson === true) {
|
|
9180
|
-
|
|
9184
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
9181
9185
|
phase: "play_watch_terminal_status",
|
|
9182
9186
|
workflowId: outputTerminal.runId || lastKnownWorkflowId || void 0,
|
|
9183
9187
|
full: true,
|
|
9184
9188
|
source: outputTerminal === canonicalTerminal ? fromDurableStatus ? "start_stream_durable" : "start_stream" : "durable_repair"
|
|
9185
9189
|
});
|
|
9186
9190
|
}
|
|
9187
|
-
|
|
9191
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
9188
9192
|
phase: "cli.play_start_stream_terminal",
|
|
9189
9193
|
ms: Date.now() - startedAt,
|
|
9190
9194
|
ok: true,
|
|
@@ -9204,7 +9208,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9204
9208
|
clearTimeout(timeout);
|
|
9205
9209
|
}
|
|
9206
9210
|
controller.abort();
|
|
9207
|
-
|
|
9211
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
9208
9212
|
phase: "cli.play_start_stream_handoff_to_tail",
|
|
9209
9213
|
ms: Date.now() - startedAt,
|
|
9210
9214
|
ok: true,
|
|
@@ -9235,7 +9239,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9235
9239
|
if (timedOut) {
|
|
9236
9240
|
const terminal = await fetchKnownTerminalStatus();
|
|
9237
9241
|
if (terminal) {
|
|
9238
|
-
|
|
9242
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
9239
9243
|
phase: "cli.play_start_stream_timeout_status_reconcile",
|
|
9240
9244
|
ms: Date.now() - startedAt,
|
|
9241
9245
|
ok: true,
|
|
@@ -9255,7 +9259,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9255
9259
|
lastPhase
|
|
9256
9260
|
});
|
|
9257
9261
|
}
|
|
9258
|
-
if (lastKnownWorkflowId && (terminalWindowExpired ||
|
|
9262
|
+
if (lastKnownWorkflowId && (terminalWindowExpired || _chunkFRD5WFT4js.isTransientPlayRunReadError.call(void 0, error))) {
|
|
9259
9263
|
if (timeout) {
|
|
9260
9264
|
clearTimeout(timeout);
|
|
9261
9265
|
}
|
|
@@ -9266,7 +9270,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9266
9270
|
`
|
|
9267
9271
|
);
|
|
9268
9272
|
}
|
|
9269
|
-
|
|
9273
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
9270
9274
|
phase: "cli.play_start_stream_reconnect",
|
|
9271
9275
|
ms: Date.now() - startedAt,
|
|
9272
9276
|
ok: true,
|
|
@@ -9293,7 +9297,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9293
9297
|
});
|
|
9294
9298
|
}
|
|
9295
9299
|
if (!lastKnownWorkflowId && isAmbiguousPlayStartOutcomeError(error)) {
|
|
9296
|
-
|
|
9300
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
9297
9301
|
phase: "cli.play_start_stream_transient_failure",
|
|
9298
9302
|
ms: Date.now() - startedAt,
|
|
9299
9303
|
ok: false,
|
|
@@ -9321,7 +9325,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9321
9325
|
`[play watch] start stream ended after run ${lastKnownWorkflowId}; reconnecting to canonical run stream`
|
|
9322
9326
|
);
|
|
9323
9327
|
}
|
|
9324
|
-
|
|
9328
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
9325
9329
|
phase: "cli.play_start_stream_reconnect",
|
|
9326
9330
|
ms: Date.now() - startedAt,
|
|
9327
9331
|
ok: true,
|
|
@@ -9401,29 +9405,29 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
|
|
|
9401
9405
|
"logs"
|
|
9402
9406
|
]);
|
|
9403
9407
|
function formatPlayLogLine(rawLine, state) {
|
|
9404
|
-
const classified =
|
|
9408
|
+
const classified = _chunkFRD5WFT4js.classifyLogLine.call(void 0, rawLine);
|
|
9405
9409
|
const line = classified.line;
|
|
9406
9410
|
const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
|
|
9407
|
-
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess',
|
|
9411
|
+
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _335 => _335[1]]) ? new Date(timestampMatch[1]) : null;
|
|
9408
9412
|
const timestamp = parsedTimestamp && !Number.isNaN(parsedTimestamp.getTime()) ? parsedTimestamp.toLocaleTimeString("en-US", {
|
|
9409
9413
|
hour12: false,
|
|
9410
9414
|
hour: "2-digit",
|
|
9411
9415
|
minute: "2-digit",
|
|
9412
9416
|
second: "2-digit"
|
|
9413
9417
|
}) : null;
|
|
9414
|
-
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess',
|
|
9418
|
+
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _336 => _336[2]]), () => ( line));
|
|
9415
9419
|
const prefix = timestamp ? `${timestamp} ` : "";
|
|
9416
9420
|
if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
|
|
9417
9421
|
const providerWait = formatProviderCapacityWaitLogLine(line);
|
|
9418
9422
|
if (providerWait && !state.verbose) {
|
|
9419
|
-
return
|
|
9423
|
+
return _chunkFRD5WFT4js.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
|
|
9420
9424
|
}
|
|
9421
9425
|
const mapProgress = formatMapProgressDiagnosticLogLine(line);
|
|
9422
9426
|
if (mapProgress && !state.verbose) {
|
|
9423
|
-
return
|
|
9427
|
+
return _chunkFRD5WFT4js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
|
|
9424
9428
|
}
|
|
9425
9429
|
if (/\[worker\] picked up run\b/.test(message)) {
|
|
9426
|
-
if (!
|
|
9430
|
+
if (!_chunkFRD5WFT4js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9427
9431
|
return null;
|
|
9428
9432
|
}
|
|
9429
9433
|
if (state.emittedRunnerStarted) {
|
|
@@ -9436,7 +9440,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
9436
9440
|
/^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
|
|
9437
9441
|
);
|
|
9438
9442
|
if (mapStart) {
|
|
9439
|
-
if (!
|
|
9443
|
+
if (!_chunkFRD5WFT4js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9440
9444
|
return null;
|
|
9441
9445
|
}
|
|
9442
9446
|
const [, rows, fields2, namespace, cached, pending] = mapStart;
|
|
@@ -9446,7 +9450,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
9446
9450
|
/^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
|
|
9447
9451
|
);
|
|
9448
9452
|
if (mapDone) {
|
|
9449
|
-
if (!
|
|
9453
|
+
if (!_chunkFRD5WFT4js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9450
9454
|
return null;
|
|
9451
9455
|
}
|
|
9452
9456
|
const [, results, executed, cached] = mapDone;
|
|
@@ -9628,20 +9632,20 @@ function collectDatasetHandleLines(value, path = "result") {
|
|
|
9628
9632
|
function buildRunWarnings(status, rowsInfo) {
|
|
9629
9633
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
9630
9634
|
const result = readRecord(status.result);
|
|
9631
|
-
const metadata = readRecord(_optionalChain([result, 'optionalAccess',
|
|
9632
|
-
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess',
|
|
9635
|
+
const metadata = readRecord(_optionalChain([result, 'optionalAccess', _337 => _337._metadata]));
|
|
9636
|
+
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess', _338 => _338.outputWarnings])) ? metadata.outputWarnings.map((warning) => readRecord(warning)).filter((warning) => {
|
|
9633
9637
|
if (!warning) return false;
|
|
9634
9638
|
return !(rowsInfo && !rowsInfo.complete && warning.reason === "array_preview_limit" && warning.originalItems === rowsInfo.totalRows && warning.retainedItems === rowsInfo.rows.length);
|
|
9635
|
-
}).map((warning) => _optionalChain([warning, 'optionalAccess',
|
|
9639
|
+
}).map((warning) => _optionalChain([warning, 'optionalAccess', _339 => _339.message])).filter(
|
|
9636
9640
|
(message) => typeof message === "string" && message.trim().length > 0
|
|
9637
9641
|
).slice(0, 16) : [];
|
|
9638
|
-
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess',
|
|
9642
|
+
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _340 => _340.hasRowFailures]) ? [
|
|
9639
9643
|
`${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.`
|
|
9640
9644
|
] : [];
|
|
9641
|
-
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9645
|
+
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _341 => _341.supersededRows]), () => ( 0))) > 0 ? [
|
|
9642
9646
|
`Latest-write-wins: ${formatSupersededRowsNotice(_nullishCoalesce(rowOutcomes.supersededRows, () => ( 0)))}; the newer write still owns that Runtime Sheet row.`
|
|
9643
9647
|
] : [];
|
|
9644
|
-
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess',
|
|
9648
|
+
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _342 => _342.totalRows]) === 0) {
|
|
9645
9649
|
return [
|
|
9646
9650
|
...rowOutcomeWarnings,
|
|
9647
9651
|
...supersededRowNotices,
|
|
@@ -9660,7 +9664,7 @@ function buildRunWarnings(status, rowsInfo) {
|
|
|
9660
9664
|
return [...rowOutcomeWarnings, ...supersededRowNotices, ...outputWarnings];
|
|
9661
9665
|
}
|
|
9662
9666
|
function buildRunNextCommands(status) {
|
|
9663
|
-
const runId = _optionalChain([status, 'access',
|
|
9667
|
+
const runId = _optionalChain([status, 'access', _343 => _343.runId, 'optionalAccess', _344 => _344.trim, 'call', _345 => _345()]);
|
|
9664
9668
|
if (!runId) {
|
|
9665
9669
|
const playName = extractRunPlayName(status);
|
|
9666
9670
|
return playName ? {
|
|
@@ -9811,14 +9815,14 @@ function extractToolIdFromErrorText(text) {
|
|
|
9811
9815
|
return null;
|
|
9812
9816
|
}
|
|
9813
9817
|
const lowerToolMatch = /\btool\s+([A-Za-z0-9_.:-]+)\s+\d{3}\b/.exec(text);
|
|
9814
|
-
if (_optionalChain([lowerToolMatch, 'optionalAccess',
|
|
9818
|
+
if (_optionalChain([lowerToolMatch, 'optionalAccess', _346 => _346[1]])) {
|
|
9815
9819
|
return lowerToolMatch[1];
|
|
9816
9820
|
}
|
|
9817
9821
|
const upperToolMatch = /\bTool\s+([A-Za-z0-9_.:-]+)\s+failed\b/.exec(text);
|
|
9818
|
-
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess',
|
|
9822
|
+
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _347 => _347[1]]), () => ( null));
|
|
9819
9823
|
}
|
|
9820
9824
|
function isInsufficientCreditsBilling(billing) {
|
|
9821
|
-
return _optionalChain([billing, 'optionalAccess',
|
|
9825
|
+
return _optionalChain([billing, 'optionalAccess', _348 => _348.kind]) === "insufficient_credits";
|
|
9822
9826
|
}
|
|
9823
9827
|
function extractBillingForStatus(status, error) {
|
|
9824
9828
|
const errorBilling = getObjectField(status, "errorBilling");
|
|
@@ -9860,8 +9864,8 @@ function formatInsufficientCreditsMessage(input) {
|
|
|
9860
9864
|
function buildInsufficientCreditsSummaryLines(input) {
|
|
9861
9865
|
const progress = input.status.progress;
|
|
9862
9866
|
const rowsInfo = extractCanonicalRowsInfo(input.status);
|
|
9863
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
9864
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
9867
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _349 => _349.rows, 'access', _350 => _350.length]))), () => ( null));
|
|
9868
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _351 => _351.totalRows]))), () => ( null));
|
|
9865
9869
|
const lines = [
|
|
9866
9870
|
" status: stopped_insufficient_credits",
|
|
9867
9871
|
completed === null ? " completed rows: unknown" : ` completed rows: ${formatInteger(completed)}${total !== null ? ` of ${formatInteger(total)}` : ""}`,
|
|
@@ -9880,7 +9884,7 @@ function buildInsufficientCreditsSummaryLines(input) {
|
|
|
9880
9884
|
lines.push(" ask user: ask whether they want to add Deepline credits");
|
|
9881
9885
|
lines.push(` top up after approval: ${recovery.topUp}`);
|
|
9882
9886
|
lines.push(` checkout fallback: ${recovery.checkout}`);
|
|
9883
|
-
const runId = _optionalChain([input, 'access',
|
|
9887
|
+
const runId = _optionalChain([input, 'access', _352 => _352.status, 'access', _353 => _353.runId, 'optionalAccess', _354 => _354.trim, 'call', _355 => _355()]);
|
|
9884
9888
|
if (runId) {
|
|
9885
9889
|
lines.push(` inspect: deepline runs get ${runId}`);
|
|
9886
9890
|
lines.push(
|
|
@@ -9962,10 +9966,10 @@ function normalizeRunStatusForEnvelope(status) {
|
|
|
9962
9966
|
function normalizeProgressForEnvelope(status, rowsInfo) {
|
|
9963
9967
|
const progress = status.progress;
|
|
9964
9968
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
9965
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9966
|
-
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9967
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9968
|
-
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9969
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _356 => _356.totalRows]), () => ( getNumericField(progress, "totalRows"))), () => ( getNumericField(progress, "total"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _357 => _357.totalRows]))), () => ( null));
|
|
9970
|
+
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _358 => _358.failedRows]), () => ( getNumericField(progress, "failed"))), () => ( getNumericField(progress, "failedRows"))), () => ( null));
|
|
9971
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _359 => _359.completedRows]), () => ( getNumericField(progress, "completed"))), () => ( getNumericField(progress, "completedRows"))), () => ( (status.status === "completed" ? total : null)));
|
|
9972
|
+
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _360 => _360.supersededRows]), () => ( getNumericField(progress, "supersededRows")));
|
|
9969
9973
|
const supersededOffset = _nullishCoalesce(supersededRows, () => ( 0));
|
|
9970
9974
|
const progressPending = getNumericField(progress, "pending");
|
|
9971
9975
|
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)));
|
|
@@ -10035,7 +10039,7 @@ function normalizeErrorsForEnvelope(status, error) {
|
|
|
10035
10039
|
];
|
|
10036
10040
|
}
|
|
10037
10041
|
function normalizeLogsForEnvelope(status) {
|
|
10038
|
-
const logs = Array.isArray(_optionalChain([status, 'access',
|
|
10042
|
+
const logs = Array.isArray(_optionalChain([status, 'access', _361 => _361.progress, 'optionalAccess', _362 => _362.logs])) ? status.progress.logs : [];
|
|
10039
10043
|
const totalCount = logs.length;
|
|
10040
10044
|
const entries = logs.slice(Math.max(0, logs.length - RUN_LOG_PREVIEW_LIMIT));
|
|
10041
10045
|
const firstSequence = entries.length === 0 ? null : logs.length - entries.length + 1;
|
|
@@ -10092,7 +10096,7 @@ function compactPlayStatus(status) {
|
|
|
10092
10096
|
const packaged = getPlayRunPackage(status);
|
|
10093
10097
|
if (packaged) {
|
|
10094
10098
|
const packagedRun = readRecord(packaged.run);
|
|
10095
|
-
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess',
|
|
10099
|
+
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess', _363 => _363.error]) === "string" ? packagedRun.error : null;
|
|
10096
10100
|
const error2 = _nullishCoalesce(selectRunErrorForDisplay(status), () => ( (typeof status.error === "string" ? String(status.error) : packagedError)));
|
|
10097
10101
|
const compactError = error2 ? compactRunErrorForEnvelope(error2, status.runId) : null;
|
|
10098
10102
|
const rowOutcomes2 = readRowOutcomeSummary(status);
|
|
@@ -10243,7 +10247,7 @@ function formatTopValuesPart(value) {
|
|
|
10243
10247
|
}
|
|
10244
10248
|
function formatPackageDatasetSummaryLines(summary, indent = " ") {
|
|
10245
10249
|
const record3 = readRecord(summary);
|
|
10246
|
-
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
10250
|
+
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _364 => _364.columnStats]));
|
|
10247
10251
|
if (!record3 || !columnStats) {
|
|
10248
10252
|
return [];
|
|
10249
10253
|
}
|
|
@@ -10331,7 +10335,7 @@ function packageDatasetRecords(packaged) {
|
|
|
10331
10335
|
if (catalog.length > 0) return catalog;
|
|
10332
10336
|
return readRecordArray(packaged.steps).flatMap((step) => {
|
|
10333
10337
|
const output = readRecord(step.output);
|
|
10334
|
-
return _optionalChain([output, 'optionalAccess',
|
|
10338
|
+
return _optionalChain([output, 'optionalAccess', _365 => _365.kind]) === "dataset" ? [output] : [];
|
|
10335
10339
|
});
|
|
10336
10340
|
}
|
|
10337
10341
|
function packageReturnedDatasetIdentity(packaged) {
|
|
@@ -10340,7 +10344,7 @@ function packageReturnedDatasetIdentity(packaged) {
|
|
|
10340
10344
|
const outputs = _nullishCoalesce(readRecord(packaged.outputs), () => ( {}));
|
|
10341
10345
|
for (const outputValue of Object.values(outputs)) {
|
|
10342
10346
|
const output = readRecord(outputValue);
|
|
10343
|
-
if (_optionalChain([output, 'optionalAccess',
|
|
10347
|
+
if (_optionalChain([output, 'optionalAccess', _366 => _366.kind]) !== "dataset") continue;
|
|
10344
10348
|
if (typeof output.datasetId === "string" && output.datasetId.trim()) {
|
|
10345
10349
|
datasetIds.add(output.datasetId.trim());
|
|
10346
10350
|
}
|
|
@@ -10376,7 +10380,7 @@ function formatRunStepProgress(progress, includeRowOutcomes = false) {
|
|
|
10376
10380
|
}
|
|
10377
10381
|
function formatPackageDatasetActionLines(packaged, options) {
|
|
10378
10382
|
const returned = packageReturnedDatasetIdentity(packaged);
|
|
10379
|
-
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
10383
|
+
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _367 => _367.includeSummary]), () => ( true));
|
|
10380
10384
|
const lines = [];
|
|
10381
10385
|
const steps = readRecordArray(packaged.steps);
|
|
10382
10386
|
const stepsByDatasetId = /* @__PURE__ */ new Map();
|
|
@@ -10385,10 +10389,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10385
10389
|
for (const step of steps) {
|
|
10386
10390
|
if (step.kind !== "dataset") continue;
|
|
10387
10391
|
const output = readRecord(step.output);
|
|
10388
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
10392
|
+
if (typeof _optionalChain([output, 'optionalAccess', _368 => _368.datasetId]) === "string") {
|
|
10389
10393
|
stepsByDatasetId.set(output.datasetId, step);
|
|
10390
10394
|
}
|
|
10391
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
10395
|
+
if (typeof _optionalChain([output, 'optionalAccess', _369 => _369.path]) === "string") {
|
|
10392
10396
|
stepsByPath.set(output.path, step);
|
|
10393
10397
|
}
|
|
10394
10398
|
if (typeof step.id === "string") {
|
|
@@ -10402,8 +10406,8 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10402
10406
|
const category = isReturned ? "returned" : dataset.recovered === true ? "recovered" : "persisted";
|
|
10403
10407
|
const rowCount = typeof dataset.rowCount === "number" && Number.isFinite(dataset.rowCount) ? Math.max(0, Math.trunc(dataset.rowCount)) : null;
|
|
10404
10408
|
const lifecycle = readRecord(dataset.lifecycle);
|
|
10405
|
-
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess',
|
|
10406
|
-
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess',
|
|
10409
|
+
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess', _370 => _370.complete]) === false;
|
|
10410
|
+
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess', _371 => _371.persistedRowsAtLeast]) === "number" && Number.isFinite(lifecycle.persistedRowsAtLeast) ? Math.max(0, Math.trunc(lifecycle.persistedRowsAtLeast)) : 0;
|
|
10407
10411
|
const actions2 = _nullishCoalesce(readRecord(dataset.actions), () => ( {}));
|
|
10408
10412
|
if (countUnconfirmed) {
|
|
10409
10413
|
lines.push(
|
|
@@ -10421,7 +10425,7 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10421
10425
|
}
|
|
10422
10426
|
}
|
|
10423
10427
|
const step = _nullishCoalesce(_nullishCoalesce((datasetId ? stepsByDatasetId.get(datasetId) : void 0), () => ( stepsByPath.get(path))), () => ( (typeof dataset.tableNamespace === "string" ? stepsByNamespace.get(dataset.tableNamespace) : void 0)));
|
|
10424
|
-
const progress = readRecord(_optionalChain([step, 'optionalAccess',
|
|
10428
|
+
const progress = readRecord(_optionalChain([step, 'optionalAccess', _372 => _372.progress]));
|
|
10425
10429
|
if (progress) {
|
|
10426
10430
|
lines.push(` progress: ${formatRunStepProgress(progress)}`);
|
|
10427
10431
|
}
|
|
@@ -10435,10 +10439,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10435
10439
|
}
|
|
10436
10440
|
const exportAction = readRecord(actions2.exportCsv);
|
|
10437
10441
|
const exportCommand = actionToCommand(exportAction);
|
|
10438
|
-
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess',
|
|
10442
|
+
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _373 => _373.scope]));
|
|
10439
10443
|
const queryAction = readRecord(actions2.query);
|
|
10440
|
-
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess',
|
|
10441
|
-
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess',
|
|
10444
|
+
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess', _374 => _374.scope]));
|
|
10445
|
+
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess', _375 => _375.kind]) === "run" ? actionToCommand(queryAction) : null;
|
|
10442
10446
|
const currentQueryCommand = actionToCommand(actions2.queryCurrentTable);
|
|
10443
10447
|
const legacyQueryCommand = actionToCommand(actions2.query);
|
|
10444
10448
|
if (runQueryCommand) {
|
|
@@ -10450,11 +10454,11 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10450
10454
|
}
|
|
10451
10455
|
if (exportCommand) {
|
|
10452
10456
|
lines.push(
|
|
10453
|
-
_optionalChain([exportScope, 'optionalAccess',
|
|
10457
|
+
_optionalChain([exportScope, 'optionalAccess', _376 => _376.kind]) === "database" ? ` export current table (may include other runs): ${exportCommand}` : ` export this run: ${exportCommand}`
|
|
10454
10458
|
);
|
|
10455
10459
|
}
|
|
10456
10460
|
const unavailable = readRecord(dataset.exportUnavailable);
|
|
10457
|
-
if (typeof _optionalChain([unavailable, 'optionalAccess',
|
|
10461
|
+
if (typeof _optionalChain([unavailable, 'optionalAccess', _377 => _377.reason]) === "string" && typeof unavailable.message === "string") {
|
|
10458
10462
|
lines.push(
|
|
10459
10463
|
` export unavailable (${unavailable.reason}): ${unavailable.message}`
|
|
10460
10464
|
);
|
|
@@ -10471,7 +10475,7 @@ function packageSavedRowCount(packaged) {
|
|
|
10471
10475
|
}
|
|
10472
10476
|
function runtimeLimitWindowLabel(runtimeLimitFailure) {
|
|
10473
10477
|
const message = _nullishCoalesce(getStringField(runtimeLimitFailure, "message"), () => ( ""));
|
|
10474
|
-
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access',
|
|
10478
|
+
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _378 => _378.exec, 'call', _379 => _379(message), 'optionalAccess', _380 => _380[1]]);
|
|
10475
10479
|
if (configuredSeconds) {
|
|
10476
10480
|
const seconds = Number(configuredSeconds);
|
|
10477
10481
|
if (Number.isSafeInteger(seconds) && seconds > 0) {
|
|
@@ -10518,7 +10522,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10518
10522
|
if (!outputs) return [];
|
|
10519
10523
|
const returned = Object.entries(outputs).filter(([, output]) => {
|
|
10520
10524
|
const record3 = readRecord(output);
|
|
10521
|
-
return _optionalChain([record3, 'optionalAccess',
|
|
10525
|
+
return _optionalChain([record3, 'optionalAccess', _381 => _381.kind]) === "dataset" || _optionalChain([record3, 'optionalAccess', _382 => _382.kind]) === "value" && Object.prototype.hasOwnProperty.call(record3, "value");
|
|
10522
10526
|
});
|
|
10523
10527
|
if (returned.length === 0) return [];
|
|
10524
10528
|
const datasets = packageDatasetRecords(packaged);
|
|
@@ -10538,10 +10542,10 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10538
10542
|
(candidate) => typeof output.datasetId === "string" && candidate.datasetId === output.datasetId || candidate.path === path
|
|
10539
10543
|
);
|
|
10540
10544
|
const stepOutput = datasetSteps.map((step) => readRecord(step.output)).find(
|
|
10541
|
-
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess',
|
|
10545
|
+
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _383 => _383.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _384 => _384.path]) === path
|
|
10542
10546
|
);
|
|
10543
|
-
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess',
|
|
10544
|
-
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
10547
|
+
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _385 => _385.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _386 => _386.preview]))));
|
|
10548
|
+
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _387 => _387.rows])) ? preview.rows.slice(0, 2) : [];
|
|
10545
10549
|
if (rows.length > 0) {
|
|
10546
10550
|
lines.push(` sample rows (${rows.length}):`);
|
|
10547
10551
|
lines.push(
|
|
@@ -10567,7 +10571,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10567
10571
|
return lines;
|
|
10568
10572
|
}
|
|
10569
10573
|
function authoredPackageStackFrames(packaged) {
|
|
10570
|
-
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess',
|
|
10574
|
+
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _388 => _388.trim, 'call', _389 => _389()])));
|
|
10571
10575
|
if (!stack) return [];
|
|
10572
10576
|
return stack.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).filter(
|
|
10573
10577
|
(line) => !line.includes("/virtual/deepline-plays/") && !line.includes("/apps/play-runner/") && !line.includes("/shared_libs/play-runtime/") && !line.includes("node:internal")
|
|
@@ -10599,9 +10603,9 @@ function activityIsoTimestamp(value) {
|
|
|
10599
10603
|
}
|
|
10600
10604
|
function buildRunActivityTextLines(run) {
|
|
10601
10605
|
const activity = readRecord(run.activity);
|
|
10602
|
-
const observation = readRecord(_optionalChain([activity, 'optionalAccess',
|
|
10603
|
-
const state = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
10604
|
-
const target = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
10606
|
+
const observation = readRecord(_optionalChain([activity, 'optionalAccess', _390 => _390.observation]));
|
|
10607
|
+
const state = readRecord(_optionalChain([observation, 'optionalAccess', _391 => _391.state]));
|
|
10608
|
+
const target = readRecord(_optionalChain([observation, 'optionalAccess', _392 => _392.target]));
|
|
10605
10609
|
if (!activity || !observation || !state) return [];
|
|
10606
10610
|
const kind = typeof state.kind === "string" ? state.kind : "unknown";
|
|
10607
10611
|
if (kind === "completed") return [];
|
|
@@ -10646,11 +10650,11 @@ function buildRunActivityTextLines(run) {
|
|
|
10646
10650
|
}
|
|
10647
10651
|
function formatObservedRunCounter(value) {
|
|
10648
10652
|
const counter = readRecord(value);
|
|
10649
|
-
const count2 = _optionalChain([counter, 'optionalAccess',
|
|
10653
|
+
const count2 = _optionalChain([counter, 'optionalAccess', _393 => _393.value]);
|
|
10650
10654
|
if (typeof count2 !== "number" || !Number.isSafeInteger(count2) || count2 < 0) {
|
|
10651
10655
|
return "unknown";
|
|
10652
10656
|
}
|
|
10653
|
-
return _optionalChain([counter, 'optionalAccess',
|
|
10657
|
+
return _optionalChain([counter, 'optionalAccess', _394 => _394.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
|
|
10654
10658
|
}
|
|
10655
10659
|
function buildRunStatusEvidenceTextLines(packaged) {
|
|
10656
10660
|
const evidence = readRecord(packaged.runStatus);
|
|
@@ -10663,13 +10667,13 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10663
10667
|
);
|
|
10664
10668
|
}
|
|
10665
10669
|
const source = readRecord(evidence.source);
|
|
10666
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
10670
|
+
if (_optionalChain([source, 'optionalAccess', _395 => _395.aligned]) === false) {
|
|
10667
10671
|
lines.push(
|
|
10668
10672
|
` consistency: run snapshot event ${String(source.runSnapshotLedgerNextSeq)} and progress event ${String(source.ledgerNextSeq)} differ; retry this read to align them`
|
|
10669
10673
|
);
|
|
10670
10674
|
}
|
|
10671
10675
|
const focus = readRecord(evidence.focusStep);
|
|
10672
|
-
const rows = readRecord(_optionalChain([focus, 'optionalAccess',
|
|
10676
|
+
const rows = readRecord(_optionalChain([focus, 'optionalAccess', _396 => _396.rows]));
|
|
10673
10677
|
if (focus) {
|
|
10674
10678
|
const id = typeof focus.id === "string" && focus.id.trim() ? focus.id.trim() : "unknown step";
|
|
10675
10679
|
const label = typeof focus.label === "string" && focus.label.trim() ? ` (${focus.label.trim()})` : "";
|
|
@@ -10677,7 +10681,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10677
10681
|
const known = readRecordArray(packaged.steps).find(
|
|
10678
10682
|
(step) => typeof step.id === "string" && (id === step.id || id.endsWith(`:${step.id}`)) && typeof step.label === "string"
|
|
10679
10683
|
);
|
|
10680
|
-
const state = typeof _optionalChain([known, 'optionalAccess',
|
|
10684
|
+
const state = typeof _optionalChain([known, 'optionalAccess', _397 => _397.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
|
|
10681
10685
|
deriveNodeExecutionState({
|
|
10682
10686
|
reported: {
|
|
10683
10687
|
status: focus.status.trim(),
|
|
@@ -10687,7 +10691,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10687
10691
|
total: rows.total
|
|
10688
10692
|
} : null
|
|
10689
10693
|
},
|
|
10690
|
-
runStatus: _optionalChain([run, 'optionalAccess',
|
|
10694
|
+
runStatus: _optionalChain([run, 'optionalAccess', _398 => _398.status])
|
|
10691
10695
|
})
|
|
10692
10696
|
) : null;
|
|
10693
10697
|
lines.push(` current step: ${id}${label}${state ? `: ${state}` : ""}`);
|
|
@@ -10735,7 +10739,7 @@ function formatRecentRunLogLines(value) {
|
|
|
10735
10739
|
(line) => typeof line === "string"
|
|
10736
10740
|
);
|
|
10737
10741
|
if (tail.length === 0) return [];
|
|
10738
|
-
const shown = tail.map((line) =>
|
|
10742
|
+
const shown = tail.map((line) => _chunkFRD5WFT4js.classifyLogLine.call(void 0, line)).filter(
|
|
10739
10743
|
(entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
|
|
10740
10744
|
).slice(-8);
|
|
10741
10745
|
const total = readNonNegativeInteger(logs.totalCount);
|
|
@@ -10779,7 +10783,7 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10779
10783
|
lines.push(` recovery: ${mode}${sourceRunId}`);
|
|
10780
10784
|
}
|
|
10781
10785
|
const runError = typeof run.error === "string" && run.error.trim() ? run.error.trim() : null;
|
|
10782
|
-
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess',
|
|
10786
|
+
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _399 => _399.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
|
|
10783
10787
|
const displayRunError = _nullishCoalesce(structuredRuntimeLimitMessage, () => ( runError));
|
|
10784
10788
|
if (!isRuntimeLimitCheckpoint && displayRunError && (status === "failed" || status === "cancelled")) {
|
|
10785
10789
|
lines.push(` error: ${truncateErrorForDisplay(displayRunError, runId)}`);
|
|
@@ -10790,11 +10794,11 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10790
10794
|
}
|
|
10791
10795
|
}
|
|
10792
10796
|
const failedLogs = readRecord(packaged.failedLogs);
|
|
10793
|
-
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess',
|
|
10797
|
+
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _400 => _400.entries])) ? failedLogs.entries.filter(
|
|
10794
10798
|
(entry) => typeof entry === "string"
|
|
10795
10799
|
) : [];
|
|
10796
|
-
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
10797
|
-
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
10800
|
+
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _401 => _401.association]) === "string" ? failedLogs.association : null;
|
|
10801
|
+
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _402 => _402.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
|
|
10798
10802
|
if (failedLogEntries.length > 0) {
|
|
10799
10803
|
lines.push(" failed logs:");
|
|
10800
10804
|
lines.push(...failedLogEntries.map((entry) => ` ${entry}`));
|
|
@@ -10813,8 +10817,8 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10813
10817
|
)
|
|
10814
10818
|
).slice(0, 16) : [];
|
|
10815
10819
|
lines.push(...packageWarnings.map((warning) => ` warning: ${warning}`));
|
|
10816
|
-
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess',
|
|
10817
|
-
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess',
|
|
10820
|
+
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _403 => _403.next]));
|
|
10821
|
+
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _404 => _404.logs]) === "string") {
|
|
10818
10822
|
lines.push(
|
|
10819
10823
|
failedLogAssociation === "retained_before_truncation" ? ` retained logs: ${failedLogNext.logs}` : ` retry failed logs: ${failedLogNext.logs}`
|
|
10820
10824
|
);
|
|
@@ -10842,20 +10846,20 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10842
10846
|
const stepStatus = typeof step.status === "string" ? step.status : status;
|
|
10843
10847
|
const output = step.output && typeof step.output === "object" && !Array.isArray(step.output) ? step.output : null;
|
|
10844
10848
|
const rowCount = output && typeof output.rowCount === "number" ? ` rows=${formatInteger(output.rowCount)}` : "";
|
|
10845
|
-
const preview = _optionalChain([output, 'optionalAccess',
|
|
10846
|
-
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
10849
|
+
const preview = _optionalChain([output, 'optionalAccess', _405 => _405.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
|
|
10850
|
+
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _406 => _406.rows])) ? preview.rows.length : null;
|
|
10847
10851
|
lines.push(` ${kind} ${id}: ${stepStatus}${rowCount}`);
|
|
10848
|
-
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess',
|
|
10852
|
+
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _407 => _407.summary])));
|
|
10849
10853
|
if (previewRows !== null) {
|
|
10850
10854
|
lines.push(
|
|
10851
|
-
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess',
|
|
10855
|
+
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _408 => _408.truncated]) ? " truncated" : ""}`
|
|
10852
10856
|
);
|
|
10853
10857
|
}
|
|
10854
10858
|
}
|
|
10855
10859
|
const inspectCommand = actionToCommand(next.inspect);
|
|
10856
10860
|
const fullResultCommand = actionToCommand(next.full);
|
|
10857
10861
|
const hasCatalogExportAction = packageDatasetRecords(packaged).some(
|
|
10858
|
-
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call',
|
|
10862
|
+
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _409 => _409(dataset.actions), 'optionalAccess', _410 => _410.exportCsv])))
|
|
10859
10863
|
);
|
|
10860
10864
|
const legacyExportCommand = hasCatalogExportAction ? null : actionToCommand(next.export);
|
|
10861
10865
|
const runAgainCommand = typeof next.run === "string" && next.run.trim() ? next.run.trim() : null;
|
|
@@ -10920,7 +10924,7 @@ function withOrdinaryRunAgainCommand(status, options, resolvedRevisionId) {
|
|
|
10920
10924
|
}
|
|
10921
10925
|
function buildBillingRollupTextLines(status) {
|
|
10922
10926
|
const billing = status.billing;
|
|
10923
|
-
const rollup = _optionalChain([billing, 'optionalAccess',
|
|
10927
|
+
const rollup = _optionalChain([billing, 'optionalAccess', _411 => _411.rollup]);
|
|
10924
10928
|
if (!rollup) return [];
|
|
10925
10929
|
const total = formatCreditAmount2(rollup.totalCreditsRollup);
|
|
10926
10930
|
if (rollup.childCredits > 0 && rollup.descendantRunCount > 0) {
|
|
@@ -10939,7 +10943,7 @@ function buildBillingRollupTextLines(status) {
|
|
|
10939
10943
|
return [` cost: ${total} credits`];
|
|
10940
10944
|
}
|
|
10941
10945
|
function playRunRateLimitedNotice(status) {
|
|
10942
|
-
const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call',
|
|
10946
|
+
const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call', _412 => _412(status), 'optionalAccess', _413 => _413.rateLimited]), () => ( status.rateLimited));
|
|
10943
10947
|
return notice && typeof notice === "object" ? notice : null;
|
|
10944
10948
|
}
|
|
10945
10949
|
function withRateLimitedNotice(status, notice) {
|
|
@@ -10979,7 +10983,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
10979
10983
|
const overview = buildRunOverview(status);
|
|
10980
10984
|
const { run } = overview;
|
|
10981
10985
|
const failed = run.status === "failed";
|
|
10982
|
-
const label = run.status === "completed" ? _optionalChain([overview, 'access',
|
|
10986
|
+
const label = run.status === "completed" ? _optionalChain([overview, 'access', _414 => _414.rowOutcomes, 'optionalAccess', _415 => _415.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
|
|
10983
10987
|
const rateLimited = playRunRateLimitedNotice(status);
|
|
10984
10988
|
const lines = [
|
|
10985
10989
|
...rateLimited ? [rateLimited.message] : [],
|
|
@@ -11001,7 +11005,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11001
11005
|
...formatJsonPreview(compactReturnValue(overview.result))
|
|
11002
11006
|
);
|
|
11003
11007
|
}
|
|
11004
|
-
if (_optionalChain([overview, 'access',
|
|
11008
|
+
if (_optionalChain([overview, 'access', _416 => _416.rowOutcomes, 'optionalAccess', _417 => _417.hasRowFailures])) {
|
|
11005
11009
|
lines.push(
|
|
11006
11010
|
`Rows: ${overview.rowOutcomes.completedRows} completed, ${overview.rowOutcomes.failedRows} failed`
|
|
11007
11011
|
);
|
|
@@ -11030,17 +11034,17 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11030
11034
|
}
|
|
11031
11035
|
function writePlayResult(status, jsonOutput, options) {
|
|
11032
11036
|
const packaged = getPlayRunPackage(status);
|
|
11033
|
-
if (status.package)
|
|
11034
|
-
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
11037
|
+
if (status.package) _chunkDBJ62RAOjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
11038
|
+
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _418 => _418.hits]), () => ( null));
|
|
11035
11039
|
if (jsonOutput) {
|
|
11036
|
-
const payload2 = _optionalChain([options, 'optionalAccess',
|
|
11037
|
-
|
|
11040
|
+
const payload2 = _optionalChain([options, 'optionalAccess', _419 => _419.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
|
|
11041
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
11038
11042
|
hits ? { ...payload2, hits } : payload2,
|
|
11039
|
-
{ json: true, fields: _optionalChain([options, 'optionalAccess',
|
|
11043
|
+
{ json: true, fields: _optionalChain([options, 'optionalAccess', _420 => _420.jsonFields]) }
|
|
11040
11044
|
);
|
|
11041
11045
|
return;
|
|
11042
11046
|
}
|
|
11043
|
-
if (packaged && !_optionalChain([options, 'optionalAccess',
|
|
11047
|
+
if (packaged && !_optionalChain([options, 'optionalAccess', _421 => _421.fullJson])) {
|
|
11044
11048
|
const {
|
|
11045
11049
|
logs: _logs,
|
|
11046
11050
|
failedLogs: _failedLogs,
|
|
@@ -11050,7 +11054,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11050
11054
|
...buildPlayCompletionTextLines(status),
|
|
11051
11055
|
...formatRunHitsLines(hits)
|
|
11052
11056
|
];
|
|
11053
|
-
|
|
11057
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, displayPackage, {
|
|
11054
11058
|
json: false,
|
|
11055
11059
|
text: `${lines2.join("\n")}
|
|
11056
11060
|
`
|
|
@@ -11100,8 +11104,8 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11100
11104
|
lines.push(...renderedServerView.actions);
|
|
11101
11105
|
lines.push(...buildBillingRollupTextLines(status));
|
|
11102
11106
|
const compact = compactPlayStatus(status);
|
|
11103
|
-
const payload = _optionalChain([options, 'optionalAccess',
|
|
11104
|
-
|
|
11107
|
+
const payload = _optionalChain([options, 'optionalAccess', _422 => _422.fullJson]) ? status : compact;
|
|
11108
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
11105
11109
|
{
|
|
11106
11110
|
...payload,
|
|
11107
11111
|
render: {
|
|
@@ -11162,7 +11166,7 @@ async function resolvePlayRunOutputStatus(input) {
|
|
|
11162
11166
|
const fromDurableStatus = input.fromDurableStatus === true || fullDurableTerminalStatuses.has(input.status);
|
|
11163
11167
|
const refreshForFullJson = input.fullJson && !fromDurableStatus;
|
|
11164
11168
|
const streamedTextPackageIncomplete = input.status.status === "completed" && playRunPackageTextLedgerIncomplete(streamedPackage);
|
|
11165
|
-
const refreshFailedTerminal = input.status.status === "failed" && (!fromDurableStatus || _optionalChain([readRecord, 'call',
|
|
11169
|
+
const refreshFailedTerminal = input.status.status === "failed" && (!fromDurableStatus || _optionalChain([readRecord, 'call', _423 => _423(_optionalChain([streamedPackage, 'optionalAccess', _424 => _424.run])), 'optionalAccess', _425 => _425.status]) !== "failed");
|
|
11166
11170
|
if (!refreshForFullJson && !streamedTextPackageIncomplete && !refreshFailedTerminal) {
|
|
11167
11171
|
if (input.fullJson && fromDurableStatus && TERMINAL_PLAY_STATUSES.has(input.status.status)) {
|
|
11168
11172
|
fullDurableTerminalStatuses.add(input.status);
|
|
@@ -11269,14 +11273,14 @@ function mergeExportColumns(preferredColumns, rows) {
|
|
|
11269
11273
|
return columns;
|
|
11270
11274
|
}
|
|
11271
11275
|
function sqlSafeExportColumnName(id) {
|
|
11272
|
-
const prefix = _nullishCoalesce(_optionalChain([id, 'access',
|
|
11276
|
+
const prefix = _nullishCoalesce(_optionalChain([id, 'access', _426 => _426.trim, 'call', _427 => _427(), 'access', _428 => _428.match, 'call', _429 => _429(/^_+/), 'optionalAccess', _430 => _430[0]]), () => ( ""));
|
|
11273
11277
|
const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
11274
11278
|
const safe = `${prefix}${normalized || "column"}`;
|
|
11275
11279
|
return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
|
|
11276
11280
|
}
|
|
11277
11281
|
async function fetchBackingDatasetRows(input) {
|
|
11278
11282
|
const playName = extractRunPlayName(input.status);
|
|
11279
|
-
const tableNamespace = _optionalChain([input, 'access',
|
|
11283
|
+
const tableNamespace = _optionalChain([input, 'access', _431 => _431.rowsInfo, 'access', _432 => _432.tableNamespace, 'optionalAccess', _433 => _433.trim, 'call', _434 => _434()]);
|
|
11280
11284
|
if (!playName || !tableNamespace) {
|
|
11281
11285
|
return null;
|
|
11282
11286
|
}
|
|
@@ -11316,7 +11320,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11316
11320
|
seenEnvelopeKeys.add(key);
|
|
11317
11321
|
}
|
|
11318
11322
|
sheetRows.push(...page.rows);
|
|
11319
|
-
const summaryTotal = _optionalChain([page, 'access',
|
|
11323
|
+
const summaryTotal = _optionalChain([page, 'access', _435 => _435.summary, 'optionalAccess', _436 => _436.stats, 'optionalAccess', _437 => _437.total]);
|
|
11320
11324
|
if (typeof summaryTotal === "number" && Number.isFinite(summaryTotal)) {
|
|
11321
11325
|
settledTotal = Math.max(_nullishCoalesce(settledTotal, () => ( 0)), Math.trunc(summaryTotal));
|
|
11322
11326
|
}
|
|
@@ -11325,7 +11329,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11325
11329
|
}
|
|
11326
11330
|
offset += page.rows.length;
|
|
11327
11331
|
}
|
|
11328
|
-
const withError =
|
|
11332
|
+
const withError = _chunkDBJ62RAOjs.tableExportHasFailedRows.call(void 0,
|
|
11329
11333
|
sheetRows.filter(
|
|
11330
11334
|
(row) => Boolean(row) && typeof row === "object" && !Array.isArray(row)
|
|
11331
11335
|
)
|
|
@@ -11341,7 +11345,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11341
11345
|
return [
|
|
11342
11346
|
withError ? {
|
|
11343
11347
|
...exported,
|
|
11344
|
-
[
|
|
11348
|
+
[_chunkDBJ62RAOjs.TABLE_EXPORT_ERROR_COLUMN]: _chunkDBJ62RAOjs.tableExportErrorCell.call(void 0,
|
|
11345
11349
|
row
|
|
11346
11350
|
)
|
|
11347
11351
|
} : exported
|
|
@@ -11410,7 +11414,7 @@ function assertDatasetHasExportableRows(input) {
|
|
|
11410
11414
|
const rowOutcomes = _nullishCoalesce(readRowOutcomeSummary(input.status), () => ( readRowOutcomeSummary(
|
|
11411
11415
|
getRecordField(getRecordField(input.status, "result"), "_metadata")
|
|
11412
11416
|
)));
|
|
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',
|
|
11417
|
+
if (input.allowEmpty === true && input.status.status === "completed" && !getRecordField(input.status, "error") && !getRecordField(input.status.progress, "error") && structuredErrorsForStatus(input.status).length === 0 && input.rowsInfo.complete && input.rowsInfo.totalRows === 0 && _optionalChain([rowOutcomes, 'optionalAccess', _438 => _438.failedRows]) === 0 && !rowOutcomes.hasRowFailures) {
|
|
11414
11418
|
return input.rowsInfo;
|
|
11415
11419
|
}
|
|
11416
11420
|
const datasetLabel = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(input.datasetPath, () => ( input.rowsInfo.tableNamespace)), () => ( input.rowsInfo.source)), () => ( "result.rows"));
|
|
@@ -11482,8 +11486,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11482
11486
|
path: dataset.exportFile(outPath, options),
|
|
11483
11487
|
rowsInfo: dataset.info(),
|
|
11484
11488
|
currentTable: false,
|
|
11485
|
-
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11486
|
-
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11489
|
+
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _439 => _439.source]), () => ( null)),
|
|
11490
|
+
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _440 => _440.info, 'call', _441 => _441()]), () => ( null))
|
|
11487
11491
|
};
|
|
11488
11492
|
};
|
|
11489
11493
|
const run = Run.open({
|
|
@@ -11495,7 +11499,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11495
11499
|
const returnedRows = datasets.returned().map((dataset) => dataset.info());
|
|
11496
11500
|
const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
|
|
11497
11501
|
const selectedDataset = run.dataset(options.datasetPath);
|
|
11498
|
-
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11502
|
+
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _442 => _442.info, 'call', _443 => _443()]), () => ( null));
|
|
11499
11503
|
if (!selectedDataset && options.datasetPath) {
|
|
11500
11504
|
const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
|
|
11501
11505
|
const commands = datasetChoiceLines({
|
|
@@ -11608,7 +11612,7 @@ ${commands.join("\n")}`,
|
|
|
11608
11612
|
throw error;
|
|
11609
11613
|
}
|
|
11610
11614
|
}
|
|
11611
|
-
if (_optionalChain([fetchedRowsInfo, 'optionalAccess',
|
|
11615
|
+
if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _444 => _444.complete])) {
|
|
11612
11616
|
const guarded2 = assertDatasetHasExportableRows({
|
|
11613
11617
|
rowsInfo: fetchedRowsInfo,
|
|
11614
11618
|
status,
|
|
@@ -11673,7 +11677,7 @@ function extractActiveRunsFromError(error) {
|
|
|
11673
11677
|
if (!(error instanceof _chunkDIAWYWT5js.DeeplineError)) {
|
|
11674
11678
|
return [];
|
|
11675
11679
|
}
|
|
11676
|
-
const response = _optionalChain([error, 'access',
|
|
11680
|
+
const response = _optionalChain([error, 'access', _445 => _445.details, 'optionalAccess', _446 => _446.response]);
|
|
11677
11681
|
if (!response || typeof response !== "object" || Array.isArray(response)) {
|
|
11678
11682
|
return [];
|
|
11679
11683
|
}
|
|
@@ -11790,8 +11794,8 @@ function renderServerResultView(value) {
|
|
|
11790
11794
|
return { lines: [], actions: [] };
|
|
11791
11795
|
}
|
|
11792
11796
|
const view = value;
|
|
11793
|
-
const renderedSections = Array.isArray(_optionalChain([view, 'access',
|
|
11794
|
-
const renderedActions = Array.isArray(_optionalChain([view, 'access',
|
|
11797
|
+
const renderedSections = Array.isArray(_optionalChain([view, 'access', _447 => _447.render, 'optionalAccess', _448 => _448.sections])) ? view.render.sections : [];
|
|
11798
|
+
const renderedActions = Array.isArray(_optionalChain([view, 'access', _449 => _449.render, 'optionalAccess', _450 => _450.actions])) ? view.render.actions : [];
|
|
11795
11799
|
if (renderedSections.length > 0 || renderedActions.length > 0) {
|
|
11796
11800
|
const lines2 = [];
|
|
11797
11801
|
for (const section of renderedSections) {
|
|
@@ -11829,7 +11833,7 @@ function renderServerResultView(value) {
|
|
|
11829
11833
|
}
|
|
11830
11834
|
const tables = Array.isArray(view.tables) ? view.tables : [];
|
|
11831
11835
|
const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
|
|
11832
|
-
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess',
|
|
11836
|
+
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _451 => _451.queryCommand]) === "string") {
|
|
11833
11837
|
lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
|
|
11834
11838
|
}
|
|
11835
11839
|
if (tables.length > 0) {
|
|
@@ -11876,7 +11880,7 @@ function renderServerResultView(value) {
|
|
|
11876
11880
|
function writeStartedPlayRun(input) {
|
|
11877
11881
|
if (input.package && isPlayRunPackageValue(input.package)) {
|
|
11878
11882
|
const run = input.package.run;
|
|
11879
|
-
|
|
11883
|
+
_chunkDBJ62RAOjs.recordPlayTermination.call(void 0, {
|
|
11880
11884
|
id: run.id,
|
|
11881
11885
|
status: run.status,
|
|
11882
11886
|
finishedAt: run.finishedAt
|
|
@@ -11889,7 +11893,7 @@ function writeStartedPlayRun(input) {
|
|
|
11889
11893
|
dashboardUrl: input.dashboardUrl,
|
|
11890
11894
|
package: input.package
|
|
11891
11895
|
};
|
|
11892
|
-
|
|
11896
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
|
|
11893
11897
|
json: true,
|
|
11894
11898
|
fields: input.jsonFields
|
|
11895
11899
|
});
|
|
@@ -11911,7 +11915,7 @@ function writeStartedPlayRun(input) {
|
|
|
11911
11915
|
input.progress.writeLine(output2, process.stdout);
|
|
11912
11916
|
return;
|
|
11913
11917
|
}
|
|
11914
|
-
|
|
11918
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, input.package, {
|
|
11915
11919
|
json: false,
|
|
11916
11920
|
text: `${output2}
|
|
11917
11921
|
`
|
|
@@ -11940,7 +11944,7 @@ function writeStartedPlayRun(input) {
|
|
|
11940
11944
|
) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)}`] : []
|
|
11941
11945
|
];
|
|
11942
11946
|
if (input.jsonOutput) {
|
|
11943
|
-
|
|
11947
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
|
|
11944
11948
|
return;
|
|
11945
11949
|
}
|
|
11946
11950
|
if (input.dashboardUrl) {
|
|
@@ -11951,7 +11955,7 @@ function writeStartedPlayRun(input) {
|
|
|
11951
11955
|
input.progress.writeLine(output, process.stdout);
|
|
11952
11956
|
return;
|
|
11953
11957
|
}
|
|
11954
|
-
|
|
11958
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
11955
11959
|
{
|
|
11956
11960
|
...payload,
|
|
11957
11961
|
render: { sections: [{ title: "play run", lines }] }
|
|
@@ -11961,7 +11965,7 @@ function writeStartedPlayRun(input) {
|
|
|
11961
11965
|
);
|
|
11962
11966
|
}
|
|
11963
11967
|
function parsePlayCheckOptions(args) {
|
|
11964
|
-
const selection =
|
|
11968
|
+
const selection = _chunkU7IJAGWBjs.parseJsonFields.call(void 0, args, "check");
|
|
11965
11969
|
args = selection.args;
|
|
11966
11970
|
const target = args[0];
|
|
11967
11971
|
if (!target || target.startsWith("-")) {
|
|
@@ -11973,7 +11977,7 @@ function parsePlayCheckOptions(args) {
|
|
|
11973
11977
|
if (arg !== "--json" && arg !== "--full")
|
|
11974
11978
|
throw new Error(`Unknown plays check option: ${arg}`);
|
|
11975
11979
|
}
|
|
11976
|
-
const jsonOutput =
|
|
11980
|
+
const jsonOutput = _chunkU7IJAGWBjs.argsWantJson.call(void 0, args);
|
|
11977
11981
|
return {
|
|
11978
11982
|
target,
|
|
11979
11983
|
jsonOutput,
|
|
@@ -12049,7 +12053,7 @@ ${PLAY_PUBLISH_USAGE}`
|
|
|
12049
12053
|
useLatest,
|
|
12050
12054
|
expectedArtifactHash,
|
|
12051
12055
|
dryRun,
|
|
12052
|
-
jsonOutput:
|
|
12056
|
+
jsonOutput: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args)
|
|
12053
12057
|
};
|
|
12054
12058
|
}
|
|
12055
12059
|
var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
|
|
@@ -12090,7 +12094,7 @@ ${PLAY_SAVE_USAGE}`);
|
|
|
12090
12094
|
target,
|
|
12091
12095
|
expectedArtifactHash,
|
|
12092
12096
|
dryRun,
|
|
12093
|
-
jsonOutput:
|
|
12097
|
+
jsonOutput: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args)
|
|
12094
12098
|
};
|
|
12095
12099
|
}
|
|
12096
12100
|
function printScheduledPlayCapacity(capacity) {
|
|
@@ -12143,7 +12147,7 @@ function checkHintExpression(value) {
|
|
|
12143
12147
|
return stringValue2(value).replace(/^toolExecutionResult\./, "result.");
|
|
12144
12148
|
}
|
|
12145
12149
|
function checkHintRawPath(value) {
|
|
12146
|
-
return _optionalChain([value, 'optionalAccess',
|
|
12150
|
+
return _optionalChain([value, 'optionalAccess', _452 => _452.startsWith, 'call', _453 => _453("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
|
|
12147
12151
|
}
|
|
12148
12152
|
function collectStaticPipelineToolIds(staticPipeline) {
|
|
12149
12153
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -12218,30 +12222,30 @@ function cronExecutionLabel(status) {
|
|
|
12218
12222
|
}
|
|
12219
12223
|
function readLiveCronMetadata(play) {
|
|
12220
12224
|
const record3 = readRecord(play);
|
|
12221
|
-
const metadata = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
12225
|
+
const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _454 => _454.triggerMetadata]));
|
|
12222
12226
|
return {
|
|
12223
|
-
schedule: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12224
|
-
timezone: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12225
|
-
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12226
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12227
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12227
|
+
schedule: typeof _optionalChain([metadata, 'optionalAccess', _455 => _455.cronSchedule]) === "string" ? metadata.cronSchedule : null,
|
|
12228
|
+
timezone: typeof _optionalChain([metadata, 'optionalAccess', _456 => _456.cronTimezone]) === "string" ? metadata.cronTimezone : null,
|
|
12229
|
+
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _457 => _457.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
|
|
12230
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _458 => _458.blockedAt]) === "number" ? metadata.blockedAt : null,
|
|
12231
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _459 => _459.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
|
|
12228
12232
|
};
|
|
12229
12233
|
}
|
|
12230
12234
|
function liveTriggerStatusLines(status, play) {
|
|
12231
12235
|
const cron = readLiveCronMetadata(play);
|
|
12232
|
-
if (!_optionalChain([status, 'optionalAccess',
|
|
12236
|
+
if (!_optionalChain([status, 'optionalAccess', _460 => _460.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _461 => _461.webhook])) return [];
|
|
12233
12237
|
const lines = [];
|
|
12234
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12238
|
+
if (_optionalChain([status, 'optionalAccess', _462 => _462.cron]) || cron.schedule) {
|
|
12235
12239
|
const timezone = cron.timezone ? ` (${cron.timezone})` : "";
|
|
12236
12240
|
lines.push(
|
|
12237
|
-
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
12241
|
+
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _463 => _463.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
|
|
12238
12242
|
);
|
|
12239
|
-
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess',
|
|
12243
|
+
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _464 => _464.cron]) === "active") {
|
|
12240
12244
|
lines.push(
|
|
12241
12245
|
` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
|
|
12242
12246
|
);
|
|
12243
12247
|
}
|
|
12244
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12248
|
+
if (_optionalChain([status, 'optionalAccess', _465 => _465.blockedReason])) {
|
|
12245
12249
|
lines.push(` Schedule issue: ${status.blockedReason}`);
|
|
12246
12250
|
if (status.blockedReasonCode || cron.blockedReasonCode) {
|
|
12247
12251
|
lines.push(
|
|
@@ -12257,7 +12261,7 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12257
12261
|
);
|
|
12258
12262
|
}
|
|
12259
12263
|
}
|
|
12260
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12264
|
+
if (_optionalChain([status, 'optionalAccess', _466 => _466.webhook])) {
|
|
12261
12265
|
lines.push(` Webhook: ${status.webhook}`);
|
|
12262
12266
|
}
|
|
12263
12267
|
return lines;
|
|
@@ -12265,11 +12269,11 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12265
12269
|
function triggerStatusFromMetadata(value) {
|
|
12266
12270
|
const metadata = readRecord(value);
|
|
12267
12271
|
return {
|
|
12268
|
-
cron: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12269
|
-
webhook: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12270
|
-
blockedReason: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12271
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12272
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12272
|
+
cron: typeof _optionalChain([metadata, 'optionalAccess', _467 => _467.cronStatus]) === "string" ? metadata.cronStatus : null,
|
|
12273
|
+
webhook: typeof _optionalChain([metadata, 'optionalAccess', _468 => _468.webhookStatus]) === "string" ? metadata.webhookStatus : null,
|
|
12274
|
+
blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _469 => _469.blockedReason]) === "string" ? metadata.blockedReason : null,
|
|
12275
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _470 => _470.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
|
|
12276
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _471 => _471.blockedAt]) === "number" ? metadata.blockedAt : null
|
|
12273
12277
|
};
|
|
12274
12278
|
}
|
|
12275
12279
|
function printPublishReceipt(input) {
|
|
@@ -12301,7 +12305,7 @@ function printBundledRuntimeWarning(bundle) {
|
|
|
12301
12305
|
async function handlePlayCheck(args) {
|
|
12302
12306
|
const options = parsePlayCheckOptions(args);
|
|
12303
12307
|
if (!isFileTarget(options.target)) {
|
|
12304
|
-
const client = new (0,
|
|
12308
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
12305
12309
|
try {
|
|
12306
12310
|
await assertCanonicalNamedPlayReference(client, options.target, {
|
|
12307
12311
|
command: "check"
|
|
@@ -12330,7 +12334,7 @@ async function handlePlayCheck(args) {
|
|
|
12330
12334
|
},
|
|
12331
12335
|
...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
|
|
12332
12336
|
};
|
|
12333
|
-
|
|
12337
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, result, {
|
|
12334
12338
|
json: options.jsonOutput,
|
|
12335
12339
|
fields: options.jsonFields,
|
|
12336
12340
|
text: renderPlayCheckOutput(result) + "\n"
|
|
@@ -12340,7 +12344,7 @@ async function handlePlayCheck(args) {
|
|
|
12340
12344
|
const resolved = _path.resolve.call(void 0, options.target);
|
|
12341
12345
|
const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
|
|
12342
12346
|
if (options.jsonOutput) {
|
|
12343
|
-
|
|
12347
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
12344
12348
|
{
|
|
12345
12349
|
kind: "play_check",
|
|
12346
12350
|
checked: "named_contract",
|
|
@@ -12380,9 +12384,9 @@ async function handlePlayCheck(args) {
|
|
|
12380
12384
|
target: options.target,
|
|
12381
12385
|
full: options.full,
|
|
12382
12386
|
detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full`,
|
|
12383
|
-
publishCommand: _optionalChain([primary, 'optionalAccess',
|
|
12387
|
+
publishCommand: _optionalChain([primary, 'optionalAccess', _472 => _472.result, 'access', _473 => _473.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
|
|
12384
12388
|
});
|
|
12385
|
-
|
|
12389
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, output, {
|
|
12386
12390
|
json: options.jsonOutput,
|
|
12387
12391
|
fields: options.jsonFields,
|
|
12388
12392
|
text: renderPlayCheckOutput(output) + "\n"
|
|
@@ -12395,7 +12399,7 @@ function resolvePlayCheckExportNames(sourceCode) {
|
|
|
12395
12399
|
return exports.map((entry) => entry.name);
|
|
12396
12400
|
}
|
|
12397
12401
|
function artifactForProductionCompatibilityCheck(artifact) {
|
|
12398
|
-
const rawEdition = _optionalChain([process, 'access',
|
|
12402
|
+
const rawEdition = _optionalChain([process, 'access', _474 => _474.env, 'access', _475 => _475.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _476 => _476.trim, 'call', _477 => _477()]);
|
|
12399
12403
|
if (!rawEdition) return artifact;
|
|
12400
12404
|
if (!/^\d+$/.test(rawEdition)) {
|
|
12401
12405
|
throw new Error(
|
|
@@ -12436,7 +12440,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12436
12440
|
}
|
|
12437
12441
|
const playName = _nullishCoalesce(graph.root.playName, () => ( fallbackName));
|
|
12438
12442
|
const authoringErrors = collectPlayGraphAuthoringErrors(graph);
|
|
12439
|
-
const client = new (0,
|
|
12443
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
12440
12444
|
const integrationMode = resolveEvalIntegrationMode();
|
|
12441
12445
|
const checked = await checkLocalPlayGraph({
|
|
12442
12446
|
client,
|
|
@@ -12446,7 +12450,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12446
12450
|
integrationMode,
|
|
12447
12451
|
prepareArtifact: artifactForProductionCompatibilityCheck
|
|
12448
12452
|
});
|
|
12449
|
-
const importedPlayName = _optionalChain([checked, 'access',
|
|
12453
|
+
const importedPlayName = _optionalChain([checked, 'access', _478 => _478.failedChild, 'optionalAccess', _479 => _479.playName]);
|
|
12450
12454
|
const diagnosticPrefix = importedPlayName ? `Imported Play ${importedPlayName}: ` : "";
|
|
12451
12455
|
const valid = checked.result.valid && !checked.failedChild && authoringErrors.length === 0;
|
|
12452
12456
|
const errors = [
|
|
@@ -12462,7 +12466,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12462
12466
|
valid,
|
|
12463
12467
|
errors: valid ? checked.result.errors : addPlayCheckRepairHints({
|
|
12464
12468
|
errors,
|
|
12465
|
-
sourceCode: _nullishCoalesce(_optionalChain([checked, 'access',
|
|
12469
|
+
sourceCode: _nullishCoalesce(_optionalChain([checked, 'access', _480 => _480.failedChild, 'optionalAccess', _481 => _481.sourceCode]), () => ( graph.root.sourceCode))
|
|
12466
12470
|
}),
|
|
12467
12471
|
...checked.failedChild && checked.result.issues ? {
|
|
12468
12472
|
issues: checked.result.issues.map((issue) => ({
|
|
@@ -12491,11 +12495,11 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12491
12495
|
let client;
|
|
12492
12496
|
let prefetchClient;
|
|
12493
12497
|
let admissionCapability;
|
|
12494
|
-
let cliAdmission =
|
|
12498
|
+
let cliAdmission = _chunkKA2LNIUPjs.usesInlinePlayAdmission.call(void 0,
|
|
12495
12499
|
"plays run",
|
|
12496
12500
|
process.argv.slice(2)
|
|
12497
12501
|
);
|
|
12498
|
-
const progress = _nullishCoalesce(
|
|
12502
|
+
const progress = _nullishCoalesce(_chunk5KNRQWHEjs.getActiveCliProgress.call(void 0, ), () => ( _chunk5KNRQWHEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12499
12503
|
const absolutePlayPath = _path.resolve.call(void 0, options.target.path);
|
|
12500
12504
|
progress.phase("compiling play");
|
|
12501
12505
|
const sourceCode = traceCliSync(
|
|
@@ -12511,9 +12515,9 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12511
12515
|
return 1;
|
|
12512
12516
|
}
|
|
12513
12517
|
if (!options.dryRun && options.watch && cliAdmission && options.maxTotalCredits === null && !inputContainsLocalFilePath(runtimeInput)) {
|
|
12514
|
-
const clientForPrefetch = new (0,
|
|
12518
|
+
const clientForPrefetch = new (0, _chunk2AWYJXBXjs.DeeplineClient)(playRunClientOptions(options));
|
|
12515
12519
|
prefetchClient = clientForPrefetch;
|
|
12516
|
-
admissionCapability =
|
|
12520
|
+
admissionCapability = _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
12517
12521
|
"cli.play_admission_capability_prefetch",
|
|
12518
12522
|
{ targetKind: "file" },
|
|
12519
12523
|
() => clientForPrefetch.prefetchPlayRunAdmissionCapability()
|
|
@@ -12522,7 +12526,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12522
12526
|
}
|
|
12523
12527
|
let graph;
|
|
12524
12528
|
try {
|
|
12525
|
-
graph = await
|
|
12529
|
+
graph = await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
12526
12530
|
"cli.play_file_bundle_graph",
|
|
12527
12531
|
{ targetKind: "file" },
|
|
12528
12532
|
() => collectBundledPlayGraph(
|
|
@@ -12536,14 +12540,14 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12536
12540
|
if (options.dryRun) {
|
|
12537
12541
|
progress.complete();
|
|
12538
12542
|
renderLocalPlayExecutionPlan(
|
|
12539
|
-
|
|
12543
|
+
_chunkC62NI2X6js.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile }),
|
|
12540
12544
|
{ dryRun: true, json: options.jsonOutput }
|
|
12541
12545
|
);
|
|
12542
12546
|
return 0;
|
|
12543
12547
|
}
|
|
12544
|
-
client = _nullishCoalesce(prefetchClient, () => ( new (0,
|
|
12548
|
+
client = _nullishCoalesce(prefetchClient, () => ( new (0, _chunk2AWYJXBXjs.DeeplineClient)(playRunClientOptions(options))));
|
|
12545
12549
|
if (cliAdmission && (graph.root.importedPlayDependencies.length > 0 || inputContainsLocalFilePath(runtimeInput))) {
|
|
12546
|
-
await
|
|
12550
|
+
await _chunkKA2LNIUPjs.checkPlayRunCompatibility.call(void 0,
|
|
12547
12551
|
client.baseUrl,
|
|
12548
12552
|
options.maintenancePolicy
|
|
12549
12553
|
);
|
|
@@ -12556,7 +12560,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12556
12560
|
});
|
|
12557
12561
|
const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
|
|
12558
12562
|
if (canDeferCompilerManifest) {
|
|
12559
|
-
|
|
12563
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
12560
12564
|
phase: "cli.play_file_compile_manifests",
|
|
12561
12565
|
ms: 0,
|
|
12562
12566
|
ok: true,
|
|
@@ -12565,7 +12569,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12565
12569
|
reason: "validated_by_run_route"
|
|
12566
12570
|
});
|
|
12567
12571
|
} else {
|
|
12568
|
-
await
|
|
12572
|
+
await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
12569
12573
|
"cli.play_file_compile_manifests",
|
|
12570
12574
|
{ targetKind: "file", skipped: false },
|
|
12571
12575
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
@@ -12586,13 +12590,13 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12586
12590
|
if (bundleResult.importedPlayDependencies.length > 0) {
|
|
12587
12591
|
try {
|
|
12588
12592
|
renderLocalPlayExecutionPlan(
|
|
12589
|
-
|
|
12593
|
+
_chunkC62NI2X6js.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile })
|
|
12590
12594
|
);
|
|
12591
12595
|
progress.phase("pinning imported plays");
|
|
12592
|
-
graph = await
|
|
12596
|
+
graph = await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
12593
12597
|
"cli.play_file_pin_imports",
|
|
12594
12598
|
{ targetKind: "file" },
|
|
12595
|
-
() =>
|
|
12599
|
+
() => _chunkC62NI2X6js.pinLocalPlayImports.call(void 0, client, graph)
|
|
12596
12600
|
);
|
|
12597
12601
|
bundleResult = graph.root;
|
|
12598
12602
|
} catch (error) {
|
|
@@ -12606,9 +12610,9 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12606
12610
|
);
|
|
12607
12611
|
const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
|
|
12608
12612
|
const fileInputBindings = _chunkGVAENVIGjs.fileInputBindingsFromStaticPipeline.call(void 0,
|
|
12609
|
-
_optionalChain([compilerManifest, 'optionalAccess',
|
|
12613
|
+
_optionalChain([compilerManifest, 'optionalAccess', _482 => _482.staticPipeline])
|
|
12610
12614
|
);
|
|
12611
|
-
const stagedFileInputs = await
|
|
12615
|
+
const stagedFileInputs = await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
12612
12616
|
"cli.play_stage_inputs",
|
|
12613
12617
|
{
|
|
12614
12618
|
targetKind: "file",
|
|
@@ -12655,7 +12659,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12655
12659
|
};
|
|
12656
12660
|
if (options.watch) {
|
|
12657
12661
|
progress.phase("starting run");
|
|
12658
|
-
const finalStatus = await
|
|
12662
|
+
const finalStatus = await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
12659
12663
|
"cli.play_start_watch",
|
|
12660
12664
|
{ targetKind: "file", playName },
|
|
12661
12665
|
() => (options.runIdFile || cliAdmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
|
|
@@ -12669,9 +12673,9 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12669
12673
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
12670
12674
|
open: options.open,
|
|
12671
12675
|
progress,
|
|
12672
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
12673
|
-
onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12674
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
12676
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _483 => _483.onRunStarted]),
|
|
12677
|
+
onSubmission: _optionalChain([hooks, 'optionalAccess', _484 => _484.onSubmission]),
|
|
12678
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _485 => _485.onRunAdmitted]),
|
|
12675
12679
|
maintenancePolicy: options.maintenancePolicy,
|
|
12676
12680
|
...!options.runIdFile || options.fullJson ? { fullJson: options.fullJson } : {},
|
|
12677
12681
|
...cliAdmission ? {
|
|
@@ -12700,8 +12704,8 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12700
12704
|
),
|
|
12701
12705
|
options
|
|
12702
12706
|
);
|
|
12703
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
12704
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12707
|
+
_optionalChain([hooks, 'optionalAccess', _486 => _486.onTerminalStatus, 'optionalCall', _487 => _487(outputStatus)]);
|
|
12708
|
+
if (_optionalChain([hooks, 'optionalAccess', _488 => _488.writeResult])) {
|
|
12705
12709
|
await hooks.writeResult(client, outputStatus);
|
|
12706
12710
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12707
12711
|
}
|
|
@@ -12716,20 +12720,20 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12716
12720
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12717
12721
|
}
|
|
12718
12722
|
progress.phase("starting run");
|
|
12719
|
-
const started = await
|
|
12723
|
+
const started = await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
12720
12724
|
"cli.play_start_unwatched",
|
|
12721
12725
|
{ targetKind: "file", playName },
|
|
12722
|
-
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12726
|
+
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _489 => _489.onSubmission]) }).catch(async (error) => {
|
|
12723
12727
|
throw await normalizePlayStartError(client, error, playName);
|
|
12724
12728
|
})
|
|
12725
12729
|
);
|
|
12726
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12727
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12730
|
+
await _optionalChain([hooks, 'optionalAccess', _490 => _490.onRunStarted, 'optionalCall', _491 => _491(started.workflowId)]);
|
|
12731
|
+
await _optionalChain([hooks, 'optionalAccess', _492 => _492.onRunAdmitted, 'optionalCall', _493 => _493(started.workflowId)]);
|
|
12728
12732
|
const resolvedDashboardUrl = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
12729
12733
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
12730
12734
|
progress.phase("started run");
|
|
12731
12735
|
progress.complete();
|
|
12732
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12736
|
+
if (_optionalChain([hooks, 'optionalAccess', _494 => _494.writeStarted])) {
|
|
12733
12737
|
hooks.writeStarted(started.workflowId, _nullishCoalesce(started.status, () => ( "started")));
|
|
12734
12738
|
return 0;
|
|
12735
12739
|
}
|
|
@@ -12756,7 +12760,7 @@ async function resolveNamedRunRevisionId(input) {
|
|
|
12756
12760
|
if (input.selector === "latest") {
|
|
12757
12761
|
const versions = await input.client.listPlayVersions(input.playName);
|
|
12758
12762
|
const latest = versions[0];
|
|
12759
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
12763
|
+
if (!_optionalChain([latest, 'optionalAccess', _495 => _495._id])) {
|
|
12760
12764
|
throw new Error(`No saved revisions found for ${input.playName}.`);
|
|
12761
12765
|
}
|
|
12762
12766
|
return latest._id;
|
|
@@ -12767,12 +12771,12 @@ async function handleNamedRun(options, hooks) {
|
|
|
12767
12771
|
if (options.target.kind !== "name") {
|
|
12768
12772
|
throw new Error("Expected a named play run target.");
|
|
12769
12773
|
}
|
|
12770
|
-
const client = new (0,
|
|
12771
|
-
let cliAdmission =
|
|
12774
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)(playRunClientOptions(options));
|
|
12775
|
+
let cliAdmission = _chunkKA2LNIUPjs.usesInlinePlayAdmission.call(void 0,
|
|
12772
12776
|
"plays run",
|
|
12773
12777
|
process.argv.slice(2)
|
|
12774
12778
|
);
|
|
12775
|
-
const progress = _nullishCoalesce(
|
|
12779
|
+
const progress = _nullishCoalesce(_chunk5KNRQWHEjs.getActiveCliProgress.call(void 0, ), () => ( _chunk5KNRQWHEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12776
12780
|
const playName = options.target.name;
|
|
12777
12781
|
const runtimeInput = options.input ? { ...options.input } : {};
|
|
12778
12782
|
try {
|
|
@@ -12787,7 +12791,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12787
12791
|
});
|
|
12788
12792
|
let admissionCapability;
|
|
12789
12793
|
if (options.watch && cliAdmission && options.maxTotalCredits === null && !needsPlayDefinition && !inputContainsLocalFilePath(runtimeInput)) {
|
|
12790
|
-
admissionCapability =
|
|
12794
|
+
admissionCapability = _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
12791
12795
|
"cli.play_admission_capability_prefetch",
|
|
12792
12796
|
{ targetKind: "name", playName },
|
|
12793
12797
|
() => client.prefetchPlayRunAdmissionCapability()
|
|
@@ -12796,14 +12800,14 @@ async function handleNamedRun(options, hooks) {
|
|
|
12796
12800
|
}
|
|
12797
12801
|
const playDetail = needsPlayDefinition ? await (async () => {
|
|
12798
12802
|
progress.phase("loading play definition");
|
|
12799
|
-
return
|
|
12803
|
+
return _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
12800
12804
|
"cli.play_load_definition",
|
|
12801
12805
|
{ targetKind: "name", playName, skipped: false },
|
|
12802
12806
|
() => assertCanonicalNamedPlayReference(client, playName, {
|
|
12803
12807
|
command: "run"
|
|
12804
12808
|
})
|
|
12805
12809
|
);
|
|
12806
|
-
})() : (
|
|
12810
|
+
})() : (_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
12807
12811
|
phase: "cli.play_load_definition",
|
|
12808
12812
|
ms: 0,
|
|
12809
12813
|
ok: true,
|
|
@@ -12812,7 +12816,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12812
12816
|
skipped: true
|
|
12813
12817
|
}), null);
|
|
12814
12818
|
progress.phase("selecting revision");
|
|
12815
|
-
const selectedRevisionId = await
|
|
12819
|
+
const selectedRevisionId = await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
12816
12820
|
"cli.play_select_revision",
|
|
12817
12821
|
{
|
|
12818
12822
|
targetKind: "name",
|
|
@@ -12837,10 +12841,10 @@ async function handleNamedRun(options, hooks) {
|
|
|
12837
12841
|
..._chunkGVAENVIGjs.fileInputBindingsFromStaticPipeline.call(void 0, playDetail.play.staticPipeline)
|
|
12838
12842
|
] : [];
|
|
12839
12843
|
if (cliAdmission && fileInputBindings.length > 0) {
|
|
12840
|
-
await
|
|
12844
|
+
await _chunkKA2LNIUPjs.checkPlayRunCompatibility.call(void 0, client.baseUrl, options.maintenancePolicy);
|
|
12841
12845
|
cliAdmission = false;
|
|
12842
12846
|
}
|
|
12843
|
-
const stagedFileInputs = await
|
|
12847
|
+
const stagedFileInputs = await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
12844
12848
|
"cli.play_stage_inputs",
|
|
12845
12849
|
{
|
|
12846
12850
|
targetKind: "name",
|
|
@@ -12884,7 +12888,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12884
12888
|
});
|
|
12885
12889
|
if (options.watch) {
|
|
12886
12890
|
progress.phase("starting run");
|
|
12887
|
-
const finalStatus = await
|
|
12891
|
+
const finalStatus = await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
12888
12892
|
"cli.play_start_watch",
|
|
12889
12893
|
{ targetKind: "name", playName },
|
|
12890
12894
|
() => (options.runIdFile || cliAdmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
|
|
@@ -12898,9 +12902,9 @@ async function handleNamedRun(options, hooks) {
|
|
|
12898
12902
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
12899
12903
|
open: options.open,
|
|
12900
12904
|
progress,
|
|
12901
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
12902
|
-
onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12903
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
12905
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _496 => _496.onRunStarted]),
|
|
12906
|
+
onSubmission: _optionalChain([hooks, 'optionalAccess', _497 => _497.onSubmission]),
|
|
12907
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _498 => _498.onRunAdmitted]),
|
|
12904
12908
|
maintenancePolicy: options.maintenancePolicy,
|
|
12905
12909
|
...!options.runIdFile || options.fullJson ? { fullJson: options.fullJson } : {},
|
|
12906
12910
|
...cliAdmission ? {
|
|
@@ -12932,8 +12936,8 @@ async function handleNamedRun(options, hooks) {
|
|
|
12932
12936
|
options,
|
|
12933
12937
|
_nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
|
|
12934
12938
|
);
|
|
12935
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
12936
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12939
|
+
_optionalChain([hooks, 'optionalAccess', _499 => _499.onTerminalStatus, 'optionalCall', _500 => _500(outputStatus)]);
|
|
12940
|
+
if (_optionalChain([hooks, 'optionalAccess', _501 => _501.writeResult])) {
|
|
12937
12941
|
await hooks.writeResult(client, outputStatus);
|
|
12938
12942
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12939
12943
|
}
|
|
@@ -12948,22 +12952,22 @@ async function handleNamedRun(options, hooks) {
|
|
|
12948
12952
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12949
12953
|
}
|
|
12950
12954
|
progress.phase("starting run");
|
|
12951
|
-
const started = await
|
|
12955
|
+
const started = await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
12952
12956
|
"cli.play_start_unwatched",
|
|
12953
12957
|
{ targetKind: "name", playName },
|
|
12954
|
-
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12958
|
+
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _502 => _502.onSubmission]) }).catch(async (error) => {
|
|
12955
12959
|
throw await normalizePlayStartError(client, error, playName, {
|
|
12956
12960
|
suggestMissingPlay: true
|
|
12957
12961
|
});
|
|
12958
12962
|
})
|
|
12959
12963
|
);
|
|
12960
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12961
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12964
|
+
await _optionalChain([hooks, 'optionalAccess', _503 => _503.onRunStarted, 'optionalCall', _504 => _504(started.workflowId)]);
|
|
12965
|
+
await _optionalChain([hooks, 'optionalAccess', _505 => _505.onRunAdmitted, 'optionalCall', _506 => _506(started.workflowId)]);
|
|
12962
12966
|
const resolvedDashboardUrl = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
12963
12967
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
12964
12968
|
progress.phase("started run");
|
|
12965
12969
|
progress.complete();
|
|
12966
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12970
|
+
if (_optionalChain([hooks, 'optionalAccess', _507 => _507.writeStarted])) {
|
|
12967
12971
|
hooks.writeStarted(started.workflowId, _nullishCoalesce(started.status, () => ( "started")));
|
|
12968
12972
|
return 0;
|
|
12969
12973
|
}
|
|
@@ -12988,12 +12992,12 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
12988
12992
|
const compact = compactPlayStatus(status);
|
|
12989
12993
|
const errors = Array.isArray(compact.errors) ? compact.errors : [];
|
|
12990
12994
|
const error = status.status === "failed" ? _nullishCoalesce(errors[0], () => ( {
|
|
12991
|
-
message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access',
|
|
12995
|
+
message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access', _508 => _508.progress, 'optionalAccess', _509 => _509.error]))), () => ( "Play failed. Inspect the run for details."))
|
|
12992
12996
|
})) : null;
|
|
12993
12997
|
const next = { status: `deepline runs get ${status.runId}` };
|
|
12994
|
-
const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access',
|
|
12998
|
+
const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access', _510 => _510.exec, 'call', _511 => _511(status.runId), 'optionalAccess', _512 => _512[1]]), () => ( extractRunPlayName(status))), () => ( null));
|
|
12995
12999
|
if (!terminal) {
|
|
12996
|
-
|
|
13000
|
+
_chunkDBJ62RAOjs.writeExecutionOutput.call(void 0,
|
|
12997
13001
|
{ id: status.runId, status: status.status, next },
|
|
12998
13002
|
output
|
|
12999
13003
|
);
|
|
@@ -13052,11 +13056,11 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13052
13056
|
Object.entries(handle).filter(([key]) => source !== "result" || key !== "_metadata").map(([key, child]) => [key, materialize(child, `${source}.${key}`)])
|
|
13053
13057
|
);
|
|
13054
13058
|
};
|
|
13055
|
-
const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call',
|
|
13059
|
+
const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call', _513 => _513(status), 'optionalAccess', _514 => _514.outputs]));
|
|
13056
13060
|
const returned = status.result !== void 0 ? status.result : packagedOutputs ? Object.fromEntries(
|
|
13057
13061
|
Object.entries(packagedOutputs).map(([key, value]) => [
|
|
13058
13062
|
key,
|
|
13059
|
-
_optionalChain([readRecord, 'call',
|
|
13063
|
+
_optionalChain([readRecord, 'call', _515 => _515(value), 'optionalAccess', _516 => _516.kind]) === "value" ? _optionalChain([readRecord, 'call', _517 => _517(value), 'optionalAccess', _518 => _518.value]) : value
|
|
13060
13064
|
])
|
|
13061
13065
|
) : null;
|
|
13062
13066
|
let data = materialize(returned);
|
|
@@ -13068,10 +13072,10 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13068
13072
|
};
|
|
13069
13073
|
}
|
|
13070
13074
|
const byRows = new Map(collections.map((c) => [c.rows, c]));
|
|
13071
|
-
const allCollections =
|
|
13075
|
+
const allCollections = _chunkDBJ62RAOjs.outputCollections.call(void 0, data).map(
|
|
13072
13076
|
(collection) => _nullishCoalesce(byRows.get(collection.rows), () => ( collection))
|
|
13073
13077
|
);
|
|
13074
|
-
|
|
13078
|
+
_chunkDBJ62RAOjs.writeExecutionOutput.call(void 0,
|
|
13075
13079
|
{
|
|
13076
13080
|
id: status.runId,
|
|
13077
13081
|
status: status.status,
|
|
@@ -13079,7 +13083,7 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13079
13083
|
...allCollections.length ? { collections: allCollections } : {},
|
|
13080
13084
|
complete: allCollections.every((c) => c.complete === true) ? true : allCollections.some((c) => c.complete === false) ? false : null,
|
|
13081
13085
|
error,
|
|
13082
|
-
credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access',
|
|
13086
|
+
credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access', _519 => _519.billing, 'optionalAccess', _520 => _520.totalCredits]))), () => ( null)),
|
|
13083
13087
|
...playName ? { page: _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) } : {},
|
|
13084
13088
|
warnings: [
|
|
13085
13089
|
...buildRunWarnings(status, null),
|
|
@@ -13092,7 +13096,7 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13092
13096
|
}
|
|
13093
13097
|
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;
|
|
13094
13098
|
async function handlePlayRun(args, hooks) {
|
|
13095
|
-
const parsedOptions = Array.isArray(args) ?
|
|
13099
|
+
const parsedOptions = Array.isArray(args) ? _chunkVEVGM6B5js.parsePlayRunOptions.call(void 0, args) : args;
|
|
13096
13100
|
const options = parsedOptions.runIdFile ? {
|
|
13097
13101
|
...parsedOptions,
|
|
13098
13102
|
runIdFile: parsedOptions.dryRun ? _path.resolve.call(void 0, parsedOptions.runIdFile) : await preflightRunIdFile(parsedOptions.runIdFile)
|
|
@@ -13109,7 +13113,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13109
13113
|
JSON.stringify({
|
|
13110
13114
|
version: 1,
|
|
13111
13115
|
admissionState: "submitted_unknown",
|
|
13112
|
-
baseUrl: new (0,
|
|
13116
|
+
baseUrl: new (0, _chunk2AWYJXBXjs.DeeplineClient)().baseUrl,
|
|
13113
13117
|
...intent
|
|
13114
13118
|
})
|
|
13115
13119
|
);
|
|
@@ -13121,7 +13125,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13121
13125
|
} finally {
|
|
13122
13126
|
await removeRunIdTempFile(tempPath);
|
|
13123
13127
|
}
|
|
13124
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13128
|
+
await _optionalChain([hooks, 'optionalAccess', _521 => _521.onSubmission, 'optionalCall', _522 => _522(intent)]);
|
|
13125
13129
|
},
|
|
13126
13130
|
onRunStarted: async (runId) => {
|
|
13127
13131
|
try {
|
|
@@ -13132,7 +13136,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13132
13136
|
{ cause: error }
|
|
13133
13137
|
);
|
|
13134
13138
|
}
|
|
13135
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13139
|
+
await _optionalChain([hooks, 'optionalAccess', _523 => _523.onRunStarted, 'optionalCall', _524 => _524(runId)]);
|
|
13136
13140
|
},
|
|
13137
13141
|
onRunAdmitted: async (runId) => {
|
|
13138
13142
|
try {
|
|
@@ -13145,7 +13149,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13145
13149
|
{ cause: error }
|
|
13146
13150
|
);
|
|
13147
13151
|
}
|
|
13148
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13152
|
+
await _optionalChain([hooks, 'optionalAccess', _525 => _525.onRunAdmitted, 'optionalCall', _526 => _526(runId)]);
|
|
13149
13153
|
}
|
|
13150
13154
|
} : hooks;
|
|
13151
13155
|
if (options.target.kind === "file") {
|
|
@@ -13224,10 +13228,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13224
13228
|
...buildRunActivityTextLines(run),
|
|
13225
13229
|
...buildRunStatusEvidenceTextLines(overview)
|
|
13226
13230
|
];
|
|
13227
|
-
if (_optionalChain([overview, 'access',
|
|
13231
|
+
if (_optionalChain([overview, 'access', _527 => _527.runStatus, 'optionalAccess', _528 => _528.available]) === false)
|
|
13228
13232
|
lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
|
|
13229
|
-
const work = readRecord(_optionalChain([readRecord, 'call',
|
|
13230
|
-
if (work && !_optionalChain([overview, 'access',
|
|
13233
|
+
const work = readRecord(_optionalChain([readRecord, 'call', _529 => _529(run), 'optionalAccess', _530 => _530.work]));
|
|
13234
|
+
if (work && !_optionalChain([overview, 'access', _531 => _531.runStatus, 'optionalAccess', _532 => _532.available]))
|
|
13231
13235
|
lines.push(
|
|
13232
13236
|
` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
|
|
13233
13237
|
);
|
|
@@ -13278,7 +13282,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13278
13282
|
...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
|
|
13279
13283
|
...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
|
|
13280
13284
|
...overview.failedLogs.entries,
|
|
13281
|
-
..._optionalChain([overview, 'access',
|
|
13285
|
+
..._optionalChain([overview, 'access', _533 => _533.failedLogs, 'access', _534 => _534.next, 'optionalAccess', _535 => _535.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
|
|
13282
13286
|
]
|
|
13283
13287
|
});
|
|
13284
13288
|
sections.push({
|
|
@@ -13338,7 +13342,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13338
13342
|
);
|
|
13339
13343
|
return `${lines.join("\n")}
|
|
13340
13344
|
|
|
13341
|
-
${
|
|
13345
|
+
${_chunkU7IJAGWBjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
|
|
13342
13346
|
}
|
|
13343
13347
|
var RUN_READ_TIMING_PROGRESS_INTERVAL_MS = 15e3;
|
|
13344
13348
|
async function withRunReadTiming(command, stage, enabled, action) {
|
|
@@ -13349,7 +13353,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
|
|
|
13349
13353
|
const progressTimer = setInterval(() => {
|
|
13350
13354
|
console.error(`[${command}] ${stage} still running after ${elapsedMs()}ms`);
|
|
13351
13355
|
}, RUN_READ_TIMING_PROGRESS_INTERVAL_MS);
|
|
13352
|
-
_optionalChain([progressTimer, 'access',
|
|
13356
|
+
_optionalChain([progressTimer, 'access', _536 => _536.unref, 'optionalCall', _537 => _537()]);
|
|
13353
13357
|
try {
|
|
13354
13358
|
const result = await action();
|
|
13355
13359
|
console.error(`[${command}] ${stage} completed in ${elapsedMs()}ms`);
|
|
@@ -13362,7 +13366,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
|
|
|
13362
13366
|
}
|
|
13363
13367
|
}
|
|
13364
13368
|
async function handleRunGet(args) {
|
|
13365
|
-
const selection =
|
|
13369
|
+
const selection = _chunkU7IJAGWBjs.parseJsonFields.call(void 0,
|
|
13366
13370
|
args,
|
|
13367
13371
|
args.includes("--config") ? "config" : "get"
|
|
13368
13372
|
);
|
|
@@ -13375,7 +13379,7 @@ async function handleRunGet(args) {
|
|
|
13375
13379
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13376
13380
|
return 1;
|
|
13377
13381
|
}
|
|
13378
|
-
const client = new (0,
|
|
13382
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
13379
13383
|
const timing = args.includes("--timing");
|
|
13380
13384
|
if (args.includes("--web-url")) {
|
|
13381
13385
|
const status2 = await withRunReadTiming(
|
|
@@ -13390,7 +13394,7 @@ async function handleRunGet(args) {
|
|
|
13390
13394
|
return 1;
|
|
13391
13395
|
}
|
|
13392
13396
|
const dashboardUrl2 = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName2);
|
|
13393
|
-
|
|
13397
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
13394
13398
|
{ dashboardUrl: dashboardUrl2 },
|
|
13395
13399
|
{ json: args.includes("--json"), text: `${dashboardUrl2}
|
|
13396
13400
|
` }
|
|
@@ -13415,7 +13419,7 @@ async function handleRunGet(args) {
|
|
|
13415
13419
|
"This server does not support recorded configuration reads."
|
|
13416
13420
|
);
|
|
13417
13421
|
}
|
|
13418
|
-
|
|
13422
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
13419
13423
|
{ runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
|
|
13420
13424
|
{ json: true, fields: selection.fields }
|
|
13421
13425
|
);
|
|
@@ -13428,7 +13432,7 @@ async function handleRunGet(args) {
|
|
|
13428
13432
|
timing,
|
|
13429
13433
|
() => client.getRunInput(runId)
|
|
13430
13434
|
);
|
|
13431
|
-
|
|
13435
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, input, { json: true });
|
|
13432
13436
|
return 0;
|
|
13433
13437
|
}
|
|
13434
13438
|
const full = args.includes("--full");
|
|
@@ -13441,7 +13445,7 @@ async function handleRunGet(args) {
|
|
|
13441
13445
|
failedLogs: args.includes("--log-failed")
|
|
13442
13446
|
})
|
|
13443
13447
|
);
|
|
13444
|
-
if (status.package)
|
|
13448
|
+
if (status.package) _chunkDBJ62RAOjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
13445
13449
|
if (!status.package) {
|
|
13446
13450
|
const legacyStatus = full ? await withRunReadTiming(
|
|
13447
13451
|
"runs get",
|
|
@@ -13454,8 +13458,8 @@ async function handleRunGet(args) {
|
|
|
13454
13458
|
) : status;
|
|
13455
13459
|
const legacyPlayName = resolveRunPlayName(legacyStatus, runId);
|
|
13456
13460
|
const legacyDashboardUrl = legacyPlayName ? _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, legacyPlayName) : null;
|
|
13457
|
-
if (
|
|
13458
|
-
|
|
13461
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
13462
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
13459
13463
|
{
|
|
13460
13464
|
...full ? legacyStatus : compactPlayStatus(legacyStatus),
|
|
13461
13465
|
...legacyDashboardUrl ? { dashboardUrl: legacyDashboardUrl } : {}
|
|
@@ -13465,7 +13469,7 @@ async function handleRunGet(args) {
|
|
|
13465
13469
|
} else {
|
|
13466
13470
|
writePlayResult(legacyStatus, false, { fullJson: full });
|
|
13467
13471
|
if (legacyDashboardUrl)
|
|
13468
|
-
|
|
13472
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
13469
13473
|
{ dashboardUrl: legacyDashboardUrl },
|
|
13470
13474
|
{ json: false, text: `play page: ${legacyDashboardUrl}
|
|
13471
13475
|
` }
|
|
@@ -13495,10 +13499,10 @@ async function handleRunGet(args) {
|
|
|
13495
13499
|
)
|
|
13496
13500
|
]);
|
|
13497
13501
|
const hitLines = formatRunHitsLines(hits);
|
|
13498
|
-
const json =
|
|
13502
|
+
const json = _chunkU7IJAGWBjs.argsWantJson.call(void 0, args);
|
|
13499
13503
|
const playName = resolveRunPlayName(status, runId);
|
|
13500
13504
|
const dashboardUrl = playName ? _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) : void 0;
|
|
13501
|
-
|
|
13505
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
13502
13506
|
{
|
|
13503
13507
|
...overview,
|
|
13504
13508
|
...dashboardUrl ? { dashboardUrl } : {},
|
|
@@ -13602,9 +13606,9 @@ async function handleRunLifecycleStatus(args) {
|
|
|
13602
13606
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13603
13607
|
return 1;
|
|
13604
13608
|
}
|
|
13605
|
-
const status = await new (0,
|
|
13606
|
-
if (
|
|
13607
|
-
|
|
13609
|
+
const status = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().runs.status(runId);
|
|
13610
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
13611
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, status, { json: true });
|
|
13608
13612
|
return 0;
|
|
13609
13613
|
}
|
|
13610
13614
|
if (!status.available) {
|
|
@@ -13644,7 +13648,7 @@ async function handleRunsRerun(args) {
|
|
|
13644
13648
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13645
13649
|
return 1;
|
|
13646
13650
|
}
|
|
13647
|
-
const options = { json:
|
|
13651
|
+
const options = { json: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args) };
|
|
13648
13652
|
for (let index = 0; index < args.length; index += 1) {
|
|
13649
13653
|
if (args[index] === "--idempotency-key") {
|
|
13650
13654
|
options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
|
|
@@ -13710,8 +13714,8 @@ ${usage2}
|
|
|
13710
13714
|
Discover Plays: ${next.discover}
|
|
13711
13715
|
Active runs: ${next.running}`
|
|
13712
13716
|
);
|
|
13713
|
-
if (
|
|
13714
|
-
|
|
13717
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
13718
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
13715
13719
|
{ ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
|
|
13716
13720
|
{ json: true }
|
|
13717
13721
|
);
|
|
@@ -13726,7 +13730,7 @@ Active runs: ${next.running}`
|
|
|
13726
13730
|
console.error("--offset requires --play.");
|
|
13727
13731
|
return 1;
|
|
13728
13732
|
}
|
|
13729
|
-
const client = new (0,
|
|
13733
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
13730
13734
|
const page = await withRunReadTiming(
|
|
13731
13735
|
"runs list",
|
|
13732
13736
|
"run inventory",
|
|
@@ -13761,7 +13765,7 @@ Active runs: ${next.running}`
|
|
|
13761
13765
|
executionTime: run.executionTime,
|
|
13762
13766
|
billingTotalCredits: run.billingTotalCredits,
|
|
13763
13767
|
billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
|
|
13764
|
-
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access',
|
|
13768
|
+
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _538 => _538.memo, 'optionalAccess', _539 => _539.playName]))), () => ( playName)), () => ( null)),
|
|
13765
13769
|
...nodeId ? { nodeObservation: _nullishCoalesce(run.nodeObservation, () => ( null)) } : {}
|
|
13766
13770
|
}));
|
|
13767
13771
|
const lines = runs.length === 0 ? [
|
|
@@ -13793,14 +13797,14 @@ Active runs: ${next.running}`
|
|
|
13793
13797
|
return lines2.join("\n");
|
|
13794
13798
|
});
|
|
13795
13799
|
const nextOffset = (_nullishCoalesce(_nullishCoalesce(page.offset, () => ( offset)), () => ( 0))) + runs.length;
|
|
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}${
|
|
13800
|
+
const nextPage = page.hasMore && playName ? `deepline runs list --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}${nodeId ? ` --node ${_chunkAID3OYVJjs.shellQuote.call(void 0, nodeId)}` : ""}${statusFilter ? ` --status ${_chunkAID3OYVJjs.shellQuote.call(void 0, statusFilter)}` : ""} --limit ${_nullishCoalesce(_nullishCoalesce(page.limit, () => ( limit)), () => ( 20))} --offset ${nextOffset}${_chunkU7IJAGWBjs.argsWantJson.call(void 0, args) ? " --json" : ""}` : null;
|
|
13797
13801
|
if (page.hasMore) {
|
|
13798
13802
|
lines.push("List truncated \u2014 more runs match this filter.");
|
|
13799
13803
|
lines.push(
|
|
13800
13804
|
nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
|
|
13801
13805
|
);
|
|
13802
13806
|
}
|
|
13803
|
-
|
|
13807
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
13804
13808
|
{
|
|
13805
13809
|
runs,
|
|
13806
13810
|
count: runs.length,
|
|
@@ -13810,11 +13814,11 @@ Active runs: ${next.running}`
|
|
|
13810
13814
|
...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
|
|
13811
13815
|
next: {
|
|
13812
13816
|
page: nextPage,
|
|
13813
|
-
get: _optionalChain([runs, 'access',
|
|
13817
|
+
get: _optionalChain([runs, 'access', _540 => _540[0], 'optionalAccess', _541 => _541.id]) ? `deepline runs get ${runs[0].id}` : null
|
|
13814
13818
|
},
|
|
13815
13819
|
render: { sections: [{ title: "runs", lines }] }
|
|
13816
13820
|
},
|
|
13817
|
-
{ json:
|
|
13821
|
+
{ json: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args) }
|
|
13818
13822
|
);
|
|
13819
13823
|
return 0;
|
|
13820
13824
|
}
|
|
@@ -13844,7 +13848,7 @@ async function handleRunTail(args) {
|
|
|
13844
13848
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
13845
13849
|
return 1;
|
|
13846
13850
|
}
|
|
13847
|
-
const parsed =
|
|
13851
|
+
const parsed = _chunkFRD5WFT4js.parseLogLevel.call(void 0, value);
|
|
13848
13852
|
if (!parsed) {
|
|
13849
13853
|
console.error(
|
|
13850
13854
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -13882,9 +13886,9 @@ async function handleRunTail(args) {
|
|
|
13882
13886
|
);
|
|
13883
13887
|
return 1;
|
|
13884
13888
|
}
|
|
13885
|
-
const client = new (0,
|
|
13889
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
13886
13890
|
const jsonLines = args.includes("--jsonl");
|
|
13887
|
-
const jsonOutput = !jsonLines &&
|
|
13891
|
+
const jsonOutput = !jsonLines && _chunkU7IJAGWBjs.argsWantJson.call(void 0, args);
|
|
13888
13892
|
const compact = args.includes("--compact");
|
|
13889
13893
|
const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
|
|
13890
13894
|
const compactState = {
|
|
@@ -13965,7 +13969,7 @@ async function handleRunLogs(args) {
|
|
|
13965
13969
|
]);
|
|
13966
13970
|
const cursorIndex = args.indexOf("--cursor");
|
|
13967
13971
|
const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
13968
|
-
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue &&
|
|
13972
|
+
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkFRD5WFT4js.isRunLogsCursor.call(void 0, cursorValue));
|
|
13969
13973
|
if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
|
|
13970
13974
|
return handleRunEventSearch(args);
|
|
13971
13975
|
}
|
|
@@ -13999,7 +14003,7 @@ async function handleRunLogs(args) {
|
|
|
13999
14003
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
14000
14004
|
return 1;
|
|
14001
14005
|
}
|
|
14002
|
-
const parsed =
|
|
14006
|
+
const parsed = _chunkFRD5WFT4js.parseLogLevel.call(void 0, value);
|
|
14003
14007
|
if (!parsed) {
|
|
14004
14008
|
console.error(
|
|
14005
14009
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -14046,12 +14050,12 @@ async function handleRunLogs(args) {
|
|
|
14046
14050
|
);
|
|
14047
14051
|
return 1;
|
|
14048
14052
|
}
|
|
14049
|
-
const client = new (0,
|
|
14053
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
14050
14054
|
if (outPath) {
|
|
14051
14055
|
const result2 = await client.runs.logs(runId, { all: true });
|
|
14052
|
-
const logs = result2.entries.filter((line) =>
|
|
14056
|
+
const logs = result2.entries.filter((line) => _chunkFRD5WFT4js.logLevelReaches.call(void 0, _chunkFRD5WFT4js.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkFRD5WFT4js.classifyLogLine.call(void 0, line).line);
|
|
14053
14057
|
_fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
|
14054
|
-
|
|
14058
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
14055
14059
|
{
|
|
14056
14060
|
runId: result2.runId,
|
|
14057
14061
|
log_path: outPath,
|
|
@@ -14074,7 +14078,7 @@ async function handleRunLogs(args) {
|
|
|
14074
14078
|
]
|
|
14075
14079
|
}
|
|
14076
14080
|
},
|
|
14077
|
-
{ json:
|
|
14081
|
+
{ json: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args) }
|
|
14078
14082
|
);
|
|
14079
14083
|
return 0;
|
|
14080
14084
|
}
|
|
@@ -14105,7 +14109,7 @@ async function handleRunLogs(args) {
|
|
|
14105
14109
|
}
|
|
14106
14110
|
};
|
|
14107
14111
|
const text = buildRunLogsText(filteredResult);
|
|
14108
|
-
|
|
14112
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
14109
14113
|
{
|
|
14110
14114
|
runId: result.runId,
|
|
14111
14115
|
totalCount: result.totalCount,
|
|
@@ -14129,7 +14133,7 @@ async function handleRunLogs(args) {
|
|
|
14129
14133
|
render: { sections: [{ title: "run logs", lines: entries }] }
|
|
14130
14134
|
},
|
|
14131
14135
|
{
|
|
14132
|
-
json:
|
|
14136
|
+
json: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args),
|
|
14133
14137
|
text
|
|
14134
14138
|
}
|
|
14135
14139
|
);
|
|
@@ -14153,17 +14157,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
14153
14157
|
);
|
|
14154
14158
|
}
|
|
14155
14159
|
const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
|
|
14156
|
-
(entry) =>
|
|
14160
|
+
(entry) => _chunkFRD5WFT4js.logLevelReaches.call(void 0, _chunkFRD5WFT4js.classifyLogLine.call(void 0, entry.line).level, logLevel)
|
|
14157
14161
|
);
|
|
14158
14162
|
const selected = matching.slice(-limit);
|
|
14159
14163
|
const olderMatchesExist = matching.length > selected.length;
|
|
14160
14164
|
return {
|
|
14161
14165
|
entries: selected.map((entry) => entry.line),
|
|
14162
|
-
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14163
|
-
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14166
|
+
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _542 => _542[0], 'optionalAccess', _543 => _543.seq]), () => ( null)),
|
|
14167
|
+
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _544 => _544.at, 'call', _545 => _545(-1), 'optionalAccess', _546 => _546.seq]), () => ( null)),
|
|
14164
14168
|
truncated: result.truncated || olderMatchesExist,
|
|
14165
14169
|
hasMore: olderMatchesExist,
|
|
14166
|
-
nextCursor: olderMatchesExist ?
|
|
14170
|
+
nextCursor: olderMatchesExist ? _chunkFRD5WFT4js.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
|
|
14167
14171
|
};
|
|
14168
14172
|
}
|
|
14169
14173
|
async function handleRunEventSearch(args) {
|
|
@@ -14230,7 +14234,7 @@ ${usage2}`);
|
|
|
14230
14234
|
namespace,
|
|
14231
14235
|
...backend ? { backend } : {}
|
|
14232
14236
|
} : void 0;
|
|
14233
|
-
const client = new (0,
|
|
14237
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
14234
14238
|
const result = await client.runs.searchEvents({
|
|
14235
14239
|
...runId ? { runId } : {},
|
|
14236
14240
|
...values["--since"] ? { since: values["--since"] } : {},
|
|
@@ -14302,7 +14306,7 @@ ${renderedDetails}` : ""}`;
|
|
|
14302
14306
|
"--limit",
|
|
14303
14307
|
String(limit)
|
|
14304
14308
|
].join(" ") : null;
|
|
14305
|
-
|
|
14309
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
14306
14310
|
{
|
|
14307
14311
|
events,
|
|
14308
14312
|
nextCursor: result.nextCursor,
|
|
@@ -14313,19 +14317,19 @@ ${renderedDetails}` : ""}`;
|
|
|
14313
14317
|
render: { sections: [{ title: "runtime events", lines }] }
|
|
14314
14318
|
},
|
|
14315
14319
|
{
|
|
14316
|
-
json:
|
|
14320
|
+
json: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args),
|
|
14317
14321
|
text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
|
|
14318
14322
|
}
|
|
14319
14323
|
);
|
|
14320
14324
|
return 0;
|
|
14321
14325
|
}
|
|
14322
14326
|
function buildRunLogsText(result) {
|
|
14323
|
-
const lines = result.entries.map((line) =>
|
|
14327
|
+
const lines = result.entries.map((line) => _chunkFRD5WFT4js.classifyLogLine.call(void 0, line).line);
|
|
14324
14328
|
if (result.warning) {
|
|
14325
14329
|
if (lines.length > 0) lines.push("");
|
|
14326
14330
|
lines.push(`warning: ${result.warning}`);
|
|
14327
14331
|
lines.push(
|
|
14328
|
-
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access',
|
|
14332
|
+
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _547 => _547.next, 'optionalAccess', _548 => _548.logs]), () => ( `deepline runs logs ${result.runId} --out run.log`))}`
|
|
14329
14333
|
);
|
|
14330
14334
|
}
|
|
14331
14335
|
return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
|
|
@@ -14354,7 +14358,7 @@ async function handleRunStop(args) {
|
|
|
14354
14358
|
reason = args[++index];
|
|
14355
14359
|
}
|
|
14356
14360
|
}
|
|
14357
|
-
const client = new (0,
|
|
14361
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
14358
14362
|
const result = await client.runs.stop(runId, { reason });
|
|
14359
14363
|
const state = resolveRunStopState(result);
|
|
14360
14364
|
const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
|
|
@@ -14369,7 +14373,7 @@ async function handleRunStop(args) {
|
|
|
14369
14373
|
...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
|
|
14370
14374
|
`inspect: deepline runs get ${runId} --full`
|
|
14371
14375
|
];
|
|
14372
|
-
|
|
14376
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
14373
14377
|
{
|
|
14374
14378
|
...cancelling,
|
|
14375
14379
|
state,
|
|
@@ -14384,7 +14388,7 @@ async function handleRunStop(args) {
|
|
|
14384
14388
|
]
|
|
14385
14389
|
}
|
|
14386
14390
|
},
|
|
14387
|
-
{ json:
|
|
14391
|
+
{ json: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args) }
|
|
14388
14392
|
);
|
|
14389
14393
|
return 0;
|
|
14390
14394
|
}
|
|
@@ -14401,7 +14405,7 @@ async function handleRunStop(args) {
|
|
|
14401
14405
|
];
|
|
14402
14406
|
process.stderr.write(`${lines2.join("\n")}
|
|
14403
14407
|
`);
|
|
14404
|
-
|
|
14408
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
14405
14409
|
{
|
|
14406
14410
|
...result,
|
|
14407
14411
|
render: {
|
|
@@ -14416,7 +14420,7 @@ async function handleRunStop(args) {
|
|
|
14416
14420
|
]
|
|
14417
14421
|
}
|
|
14418
14422
|
},
|
|
14419
|
-
{ json:
|
|
14423
|
+
{ json: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args) }
|
|
14420
14424
|
);
|
|
14421
14425
|
return 1;
|
|
14422
14426
|
}
|
|
@@ -14427,12 +14431,12 @@ async function handleRunStop(args) {
|
|
|
14427
14431
|
`warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
|
|
14428
14432
|
] : []
|
|
14429
14433
|
];
|
|
14430
|
-
|
|
14434
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
14431
14435
|
{
|
|
14432
14436
|
...result,
|
|
14433
14437
|
render: { sections: [{ title: "run stop", lines }] }
|
|
14434
14438
|
},
|
|
14435
|
-
{ json:
|
|
14439
|
+
{ json: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args) }
|
|
14436
14440
|
);
|
|
14437
14441
|
return 0;
|
|
14438
14442
|
}
|
|
@@ -14482,18 +14486,18 @@ async function handleRunStopAll(args) {
|
|
|
14482
14486
|
reason = args[++index];
|
|
14483
14487
|
}
|
|
14484
14488
|
}
|
|
14485
|
-
const client = new (0,
|
|
14489
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
14486
14490
|
if (dryRun) {
|
|
14487
14491
|
const result2 = await client.runs.stopAll({ dryRun: true, reason });
|
|
14488
14492
|
const lines2 = buildStopAllDryRunTextLines(result2);
|
|
14489
|
-
|
|
14493
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
14490
14494
|
{
|
|
14491
14495
|
...result2,
|
|
14492
14496
|
render: {
|
|
14493
14497
|
sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
|
|
14494
14498
|
}
|
|
14495
14499
|
},
|
|
14496
|
-
{ json:
|
|
14500
|
+
{ json: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
|
|
14497
14501
|
` }
|
|
14498
14502
|
);
|
|
14499
14503
|
return 0;
|
|
@@ -14506,17 +14510,17 @@ async function handleRunStopAll(args) {
|
|
|
14506
14510
|
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
14507
14511
|
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
14508
14512
|
];
|
|
14509
|
-
|
|
14513
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
14510
14514
|
{
|
|
14511
14515
|
...result,
|
|
14512
14516
|
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
14513
14517
|
},
|
|
14514
|
-
{ json:
|
|
14518
|
+
{ json: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args) }
|
|
14515
14519
|
);
|
|
14516
14520
|
return result.failed > 0 || result.partial ? 1 : 0;
|
|
14517
14521
|
}
|
|
14518
14522
|
async function handleRunExport(args) {
|
|
14519
|
-
const selection =
|
|
14523
|
+
const selection = _chunkU7IJAGWBjs.parseJsonFields.call(void 0, args, "export");
|
|
14520
14524
|
args = selection.args;
|
|
14521
14525
|
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]";
|
|
14522
14526
|
let runId;
|
|
@@ -14587,17 +14591,17 @@ async function handleRunExport(args) {
|
|
|
14587
14591
|
"INVALID_ARGUMENT"
|
|
14588
14592
|
);
|
|
14589
14593
|
}
|
|
14590
|
-
const client = new (0,
|
|
14594
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
14591
14595
|
let status = await client.getPlayStatus(runId, { full: true });
|
|
14592
14596
|
assertRunExportStatusIdentity(status, runId);
|
|
14593
14597
|
if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
|
|
14594
|
-
const progress =
|
|
14598
|
+
const progress = _chunk5KNRQWHEjs.createCliProgress.call(void 0, !_chunkU7IJAGWBjs.argsWantJson.call(void 0, args));
|
|
14595
14599
|
try {
|
|
14596
14600
|
await waitForPlayCompletionByWatch({
|
|
14597
14601
|
client,
|
|
14598
14602
|
playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
|
|
14599
14603
|
workflowId: runId,
|
|
14600
|
-
jsonOutput:
|
|
14604
|
+
jsonOutput: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args),
|
|
14601
14605
|
emitLogs: false,
|
|
14602
14606
|
waitTimeoutMs,
|
|
14603
14607
|
startedAt: Date.now(),
|
|
@@ -14623,26 +14627,26 @@ async function handleRunExport(args) {
|
|
|
14623
14627
|
format,
|
|
14624
14628
|
summary
|
|
14625
14629
|
});
|
|
14626
|
-
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14627
|
-
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess',
|
|
14630
|
+
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _549 => _549.rowsInfo, 'access', _550 => _550.source]), () => ( datasetPath)), () => ( null));
|
|
14631
|
+
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _551 => _551.currentTable]) ? {
|
|
14628
14632
|
code: "CURRENT_SHARED_DATASET",
|
|
14629
14633
|
message: "This export is the current shared dataset and may include writes from another run.",
|
|
14630
14634
|
full_run_output_command: `deepline runs get ${status.runId} --full`
|
|
14631
14635
|
} : null;
|
|
14632
14636
|
const navigation = buildRunNavigation(status);
|
|
14633
|
-
const resolved = _optionalChain([exportResult, 'optionalAccess',
|
|
14637
|
+
const resolved = _optionalChain([exportResult, 'optionalAccess', _552 => _552.datasetInfo]);
|
|
14634
14638
|
const identity = navigation.datasets.find(
|
|
14635
|
-
(dataset) => _optionalChain([resolved, 'optionalAccess',
|
|
14639
|
+
(dataset) => _optionalChain([resolved, 'optionalAccess', _553 => _553.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _554 => _554.tableNamespace])
|
|
14636
14640
|
);
|
|
14637
14641
|
const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
|
|
14638
14642
|
const exportCommand = runExportRetryCommand(
|
|
14639
14643
|
status.runId,
|
|
14640
14644
|
outPath,
|
|
14641
|
-
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess',
|
|
14645
|
+
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _555 => _555.datasetPath]))),
|
|
14642
14646
|
{ format, summary }
|
|
14643
14647
|
) + (args.includes("--allow-empty") ? " --allow-empty" : "");
|
|
14644
|
-
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14645
|
-
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess',
|
|
14648
|
+
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _556 => _556.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _557 => _557.path]), () => ( null)) };
|
|
14649
|
+
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _558 => _558.rowsInfo, 'access', _559 => _559.exportedRowOutcomes]);
|
|
14646
14650
|
const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
|
|
14647
14651
|
count: exportedRowOutcomes.failed,
|
|
14648
14652
|
message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
|
|
@@ -14662,17 +14666,17 @@ async function handleRunExport(args) {
|
|
|
14662
14666
|
...fileLocation,
|
|
14663
14667
|
format,
|
|
14664
14668
|
source,
|
|
14665
|
-
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14669
|
+
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _560 => _560.rowsInfo, 'access', _561 => _561.totalRows]), () => ( null)),
|
|
14666
14670
|
...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
|
|
14667
14671
|
...rowFailures ? { rowFailures } : {},
|
|
14668
|
-
columns:
|
|
14672
|
+
columns: _chunkDBJ62RAOjs.underscoreKeysLast.call(void 0, _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _562 => _562.rowsInfo, 'access', _563 => _563.columns]), () => ( []))),
|
|
14669
14673
|
...currentTableNotice ? { notice: currentTableNotice } : {},
|
|
14670
14674
|
...metadataOutPath ? { metadata_path: metadataOutPath } : {},
|
|
14671
14675
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
|
|
14672
14676
|
};
|
|
14673
14677
|
const lines = withRunNavigationLines(
|
|
14674
14678
|
[
|
|
14675
|
-
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14679
|
+
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _564 => _564.path]), () => ( outPath))}`,
|
|
14676
14680
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
|
|
14677
14681
|
`Partial export: run is ${status.status}; more rows may be saved.`,
|
|
14678
14682
|
`Export after completion: ${exportCommand} --wait`
|
|
@@ -14699,8 +14703,8 @@ async function handleRunExport(args) {
|
|
|
14699
14703
|
"utf-8"
|
|
14700
14704
|
);
|
|
14701
14705
|
}
|
|
14702
|
-
|
|
14703
|
-
json:
|
|
14706
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, payload, {
|
|
14707
|
+
json: _chunkU7IJAGWBjs.argsWantJson.call(void 0, args),
|
|
14704
14708
|
fields: selection.fields,
|
|
14705
14709
|
text: `${lines.join("\n")}
|
|
14706
14710
|
`
|
|
@@ -14734,10 +14738,10 @@ async function handlePlayGet(args) {
|
|
|
14734
14738
|
);
|
|
14735
14739
|
return 2;
|
|
14736
14740
|
}
|
|
14737
|
-
const client = new (0,
|
|
14741
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
14738
14742
|
const explicitJson = args.includes("--json");
|
|
14739
14743
|
const sourceOutput = args.includes("--source");
|
|
14740
|
-
const jsonOutput = sourceOutput ? explicitJson :
|
|
14744
|
+
const jsonOutput = sourceOutput ? explicitJson : _chunkU7IJAGWBjs.argsWantJson.call(void 0, args);
|
|
14741
14745
|
const requestedRevisionFlags = [
|
|
14742
14746
|
args.includes("--working"),
|
|
14743
14747
|
args.includes("--live"),
|
|
@@ -14790,7 +14794,7 @@ async function handlePlayGet(args) {
|
|
|
14790
14794
|
...includeSource ? { source: sourceSelector } : {}
|
|
14791
14795
|
});
|
|
14792
14796
|
const source = detail.source;
|
|
14793
|
-
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
14797
|
+
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _565 => _565.files, 'access', _566 => _566[source.entryFile]]), () => ( ""));
|
|
14794
14798
|
let materializedFile = null;
|
|
14795
14799
|
try {
|
|
14796
14800
|
materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
|
|
@@ -14800,7 +14804,7 @@ async function handlePlayGet(args) {
|
|
|
14800
14804
|
}
|
|
14801
14805
|
const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
|
|
14802
14806
|
if (jsonOutput) {
|
|
14803
|
-
|
|
14807
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, {
|
|
14804
14808
|
...detail,
|
|
14805
14809
|
...materializedFile ? {
|
|
14806
14810
|
message: loadedMessage,
|
|
@@ -14841,16 +14845,16 @@ async function handlePlayGet(args) {
|
|
|
14841
14845
|
}
|
|
14842
14846
|
console.log(`Play: ${formatPlayReference(detail.play)}`);
|
|
14843
14847
|
console.log(
|
|
14844
|
-
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14848
|
+
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _567 => _567.play, 'access', _568 => _568.workingRevision, 'optionalAccess', _569 => _569.version]), () => ( "\u2014"))}`
|
|
14845
14849
|
);
|
|
14846
|
-
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14850
|
+
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _570 => _570.play, 'access', _571 => _571.liveRevision, 'optionalAccess', _572 => _572.version]), () => ( "\u2014"))}`);
|
|
14847
14851
|
if (detail.play.liveRevision) {
|
|
14848
14852
|
console.log(
|
|
14849
14853
|
`Live max credits per run: ${liveMaxCreditsPerRun(detail.play.liveRevision.sourceCode)}`
|
|
14850
14854
|
);
|
|
14851
14855
|
}
|
|
14852
14856
|
console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
|
|
14853
|
-
if (detail.play.isDraftDirty && _optionalChain([detail, 'access',
|
|
14857
|
+
if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _573 => _573.play, 'access', _574 => _574.liveRevision, 'optionalAccess', _575 => _575.version])) {
|
|
14854
14858
|
console.log(
|
|
14855
14859
|
` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
|
|
14856
14860
|
);
|
|
@@ -14862,7 +14866,7 @@ async function handlePlayGet(args) {
|
|
|
14862
14866
|
console.log(line);
|
|
14863
14867
|
}
|
|
14864
14868
|
console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
|
|
14865
|
-
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14869
|
+
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _576 => _576.sheetSummary, 'optionalAccess', _577 => _577.stats, 'optionalAccess', _578 => _578.total]), () => ( 0))}`);
|
|
14866
14870
|
if (detail.customerDbUrl) {
|
|
14867
14871
|
console.log(`Customer DB: ${detail.customerDbUrl}`);
|
|
14868
14872
|
}
|
|
@@ -14878,7 +14882,7 @@ async function handlePlayGet(args) {
|
|
|
14878
14882
|
return 0;
|
|
14879
14883
|
}
|
|
14880
14884
|
function formatVersionLine(version) {
|
|
14881
|
-
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access',
|
|
14885
|
+
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _579 => _579.artifactHash, 'optionalAccess', _580 => _580.slice, 'call', _581 => _581(0, 12)]), () => ( "unknown-revision"));
|
|
14882
14886
|
const state = [
|
|
14883
14887
|
version.isLive ? "live" : null,
|
|
14884
14888
|
version.isWorking ? "working" : null
|
|
@@ -14892,8 +14896,8 @@ async function handlePlayVersions(args) {
|
|
|
14892
14896
|
console.error("Usage: deepline plays versions --name <name> [--json]");
|
|
14893
14897
|
return 1;
|
|
14894
14898
|
}
|
|
14895
|
-
const client = new (0,
|
|
14896
|
-
const jsonOutput =
|
|
14899
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
14900
|
+
const jsonOutput = _chunkU7IJAGWBjs.argsWantJson.call(void 0, args);
|
|
14897
14901
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
14898
14902
|
command: "versions"
|
|
14899
14903
|
});
|
|
@@ -14901,7 +14905,7 @@ async function handlePlayVersions(args) {
|
|
|
14901
14905
|
parseReferencedPlayTarget(playName).playName
|
|
14902
14906
|
);
|
|
14903
14907
|
if (jsonOutput) {
|
|
14904
|
-
|
|
14908
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, { versions });
|
|
14905
14909
|
return 0;
|
|
14906
14910
|
}
|
|
14907
14911
|
if (versions.length === 0) {
|
|
@@ -14914,7 +14918,7 @@ async function handlePlayVersions(args) {
|
|
|
14914
14918
|
return 0;
|
|
14915
14919
|
}
|
|
14916
14920
|
function formatPlayCostEstimate(estimate) {
|
|
14917
|
-
const computeSummary = _optionalChain([estimate, 'optionalAccess',
|
|
14921
|
+
const computeSummary = _optionalChain([estimate, 'optionalAccess', _582 => _582.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)` : "";
|
|
14918
14922
|
if (!estimate || estimate.status === "unavailable") {
|
|
14919
14923
|
return `unavailable${estimate ? `: ${estimate.message}${computeSummary}` : ""}`;
|
|
14920
14924
|
}
|
|
@@ -14944,8 +14948,8 @@ async function handlePlayCost(args) {
|
|
|
14944
14948
|
console.error("Usage: deepline plays cost <play> [--json]");
|
|
14945
14949
|
return 2;
|
|
14946
14950
|
}
|
|
14947
|
-
const result = await new (0,
|
|
14948
|
-
if (
|
|
14951
|
+
const result = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().getPlayCostEstimate(name);
|
|
14952
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) console.log(JSON.stringify(result, null, 2));
|
|
14949
14953
|
else
|
|
14950
14954
|
console.log(
|
|
14951
14955
|
`${result.reference}: ${formatPlayCostEstimate(result.costEstimate)}`
|
|
@@ -14953,11 +14957,11 @@ async function handlePlayCost(args) {
|
|
|
14953
14957
|
return 0;
|
|
14954
14958
|
}
|
|
14955
14959
|
async function handlePlayList(args) {
|
|
14956
|
-
const jsonOutput =
|
|
14960
|
+
const jsonOutput = _chunkU7IJAGWBjs.argsWantJson.call(void 0, args);
|
|
14957
14961
|
const showCost = args.includes("--show-cost");
|
|
14958
|
-
const client = new (0,
|
|
14962
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
14959
14963
|
const categoriesIndex = args.indexOf("--categories");
|
|
14960
|
-
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access',
|
|
14964
|
+
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _583 => _583[categoriesIndex + 1], 'optionalAccess', _584 => _584.trim, 'call', _585 => _585()]) : void 0;
|
|
14961
14965
|
const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
|
|
14962
14966
|
if (args.includes("--tag") && tags.length === 0) {
|
|
14963
14967
|
console.error(
|
|
@@ -14978,7 +14982,7 @@ async function handlePlayList(args) {
|
|
|
14978
14982
|
const cursorIndex = args.indexOf("--cursor");
|
|
14979
14983
|
const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
|
|
14980
14984
|
const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
14981
|
-
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess',
|
|
14985
|
+
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _586 => _586.trim, 'call', _587 => _587()])) {
|
|
14982
14986
|
console.error("Pass a positive --limit and a non-empty --cursor.");
|
|
14983
14987
|
return 2;
|
|
14984
14988
|
}
|
|
@@ -15019,7 +15023,7 @@ async function handlePlayList(args) {
|
|
|
15019
15023
|
if (play.inputSchema || play.hasInputSchema) {
|
|
15020
15024
|
lines.push(" inputSchema: yes");
|
|
15021
15025
|
}
|
|
15022
|
-
if (_optionalChain([play, 'access',
|
|
15026
|
+
if (_optionalChain([play, 'access', _588 => _588.triggerStatus, 'optionalAccess', _589 => _589.cron])) {
|
|
15023
15027
|
lines.push(
|
|
15024
15028
|
` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
|
|
15025
15029
|
);
|
|
@@ -15039,12 +15043,12 @@ async function handlePlayList(args) {
|
|
|
15039
15043
|
} else {
|
|
15040
15044
|
lines.push(" scheduled execution: not configured");
|
|
15041
15045
|
}
|
|
15042
|
-
if (_optionalChain([play, 'access',
|
|
15046
|
+
if (_optionalChain([play, 'access', _590 => _590.triggerStatus, 'optionalAccess', _591 => _591.webhook])) {
|
|
15043
15047
|
lines.push(` webhook: ${play.triggerStatus.webhook}`);
|
|
15044
15048
|
}
|
|
15045
15049
|
if (showCost) {
|
|
15046
15050
|
lines.push(
|
|
15047
|
-
` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access',
|
|
15051
|
+
` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access', _592 => _592.observedCost, 'optionalAccess', _593 => _593.displayText]), () => ( formatPlayCostEstimate(play.costEstimate)))}`
|
|
15048
15052
|
);
|
|
15049
15053
|
}
|
|
15050
15054
|
lines.push(` run: deepline run ${reference}`);
|
|
@@ -15053,7 +15057,7 @@ async function handlePlayList(args) {
|
|
|
15053
15057
|
lines.push("List truncated \u2014 more plays are available.");
|
|
15054
15058
|
lines.push(`Next page: ${nextPage}`);
|
|
15055
15059
|
}
|
|
15056
|
-
|
|
15060
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
15057
15061
|
{
|
|
15058
15062
|
plays,
|
|
15059
15063
|
count: plays.length,
|
|
@@ -15070,8 +15074,8 @@ async function handlePlayList(args) {
|
|
|
15070
15074
|
return 0;
|
|
15071
15075
|
}
|
|
15072
15076
|
async function handlePlayPin(args, pinned) {
|
|
15073
|
-
const target = _optionalChain([args, 'access',
|
|
15074
|
-
const jsonOutput =
|
|
15077
|
+
const target = _optionalChain([args, 'access', _594 => _594.find, 'call', _595 => _595((arg) => !arg.startsWith("-")), 'optionalAccess', _596 => _596.trim, 'call', _597 => _597()]);
|
|
15078
|
+
const jsonOutput = _chunkU7IJAGWBjs.argsWantJson.call(void 0, args);
|
|
15075
15079
|
const dryRun = args.includes("--dry-run");
|
|
15076
15080
|
if (!target) {
|
|
15077
15081
|
console.error(
|
|
@@ -15089,11 +15093,11 @@ async function handlePlayPin(args, pinned) {
|
|
|
15089
15093
|
const name = parsedTarget.playName;
|
|
15090
15094
|
const plan = { name, pinned, dryRun };
|
|
15091
15095
|
if (dryRun) {
|
|
15092
|
-
|
|
15096
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, plan);
|
|
15093
15097
|
return 0;
|
|
15094
15098
|
}
|
|
15095
|
-
const result = await new (0,
|
|
15096
|
-
if (jsonOutput)
|
|
15099
|
+
const result = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().setPlayPinned(name, pinned);
|
|
15100
|
+
if (jsonOutput) _chunkU7IJAGWBjs.printCompactJson.call(void 0, result);
|
|
15097
15101
|
else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
|
|
15098
15102
|
return 0;
|
|
15099
15103
|
}
|
|
@@ -15141,7 +15145,7 @@ function printPlayDescription(play) {
|
|
|
15141
15145
|
console.log(` ${line}`);
|
|
15142
15146
|
}
|
|
15143
15147
|
}
|
|
15144
|
-
if (_optionalChain([play, 'access',
|
|
15148
|
+
if (_optionalChain([play, 'access', _598 => _598.toolCategories, 'optionalAccess', _599 => _599.length])) {
|
|
15145
15149
|
console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
|
|
15146
15150
|
}
|
|
15147
15151
|
if (play.aliases.length > 0) {
|
|
@@ -15186,7 +15190,7 @@ function printPlayDescription(play) {
|
|
|
15186
15190
|
const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
|
|
15187
15191
|
if (runtimeLimit) {
|
|
15188
15192
|
console.log(
|
|
15189
|
-
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access',
|
|
15193
|
+
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _600 => _600.runtimeLimit, 'optionalAccess', _601 => _601.source]), () => ( "live"))})`
|
|
15190
15194
|
);
|
|
15191
15195
|
}
|
|
15192
15196
|
printScheduledPlayCapacity(play.activeScheduledPlays);
|
|
@@ -15214,17 +15218,17 @@ function formatPlayGrepMatches(matches) {
|
|
|
15214
15218
|
return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
|
|
15215
15219
|
}
|
|
15216
15220
|
async function handlePlayGrep(args) {
|
|
15217
|
-
const query = _optionalChain([args, 'access',
|
|
15221
|
+
const query = _optionalChain([args, 'access', _602 => _602[0], 'optionalAccess', _603 => _603.trim, 'call', _604 => _604()]);
|
|
15218
15222
|
if (!query) {
|
|
15219
15223
|
console.error("Usage: deepline plays grep <query> [--json]");
|
|
15220
15224
|
return 1;
|
|
15221
15225
|
}
|
|
15222
|
-
const client = new (0,
|
|
15226
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
15223
15227
|
const results = (await client.listPlays({ grep: query })).map(
|
|
15224
15228
|
summarizePlayGrepResult
|
|
15225
15229
|
);
|
|
15226
|
-
if (
|
|
15227
|
-
|
|
15230
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
15231
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, {
|
|
15228
15232
|
plays: results,
|
|
15229
15233
|
count: results.length,
|
|
15230
15234
|
query,
|
|
@@ -15238,7 +15242,7 @@ async function handlePlayGrep(args) {
|
|
|
15238
15242
|
`
|
|
15239
15243
|
);
|
|
15240
15244
|
for (const result of results) {
|
|
15241
|
-
console.log(_optionalChain([result, 'access',
|
|
15245
|
+
console.log(_optionalChain([result, 'access', _605 => _605.displayName, 'optionalAccess', _606 => _606.trim, 'call', _607 => _607()]) || result.name);
|
|
15242
15246
|
const matches = formatPlayGrepMatches(result.matches);
|
|
15243
15247
|
if (matches) console.log(` Matched: ${matches}`);
|
|
15244
15248
|
console.log(` Describe: ${result.describe}`);
|
|
@@ -15247,7 +15251,7 @@ async function handlePlayGrep(args) {
|
|
|
15247
15251
|
return 0;
|
|
15248
15252
|
}
|
|
15249
15253
|
async function handlePlayDescribe(args) {
|
|
15250
|
-
const selection =
|
|
15254
|
+
const selection = _chunkU7IJAGWBjs.parseJsonFields.call(void 0, args, "describe");
|
|
15251
15255
|
args = selection.args;
|
|
15252
15256
|
const playName = args[0];
|
|
15253
15257
|
if (!playName) {
|
|
@@ -15281,8 +15285,8 @@ async function handlePlayDescribe(args) {
|
|
|
15281
15285
|
`deepline plays check ${playName}`,
|
|
15282
15286
|
...definedName ? [`deepline describe <workspace>/${definedName}`] : []
|
|
15283
15287
|
];
|
|
15284
|
-
if (
|
|
15285
|
-
|
|
15288
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
15289
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, {
|
|
15286
15290
|
ok: false,
|
|
15287
15291
|
error: { message },
|
|
15288
15292
|
next
|
|
@@ -15296,7 +15300,7 @@ async function handlePlayDescribe(args) {
|
|
|
15296
15300
|
}
|
|
15297
15301
|
return 2;
|
|
15298
15302
|
}
|
|
15299
|
-
const client = new (0,
|
|
15303
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
15300
15304
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
15301
15305
|
command: "describe"
|
|
15302
15306
|
});
|
|
@@ -15306,9 +15310,9 @@ async function handlePlayDescribe(args) {
|
|
|
15306
15310
|
compact: args.includes("--compact")
|
|
15307
15311
|
}
|
|
15308
15312
|
);
|
|
15309
|
-
if (
|
|
15310
|
-
if (selection.fields)
|
|
15311
|
-
else
|
|
15313
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
15314
|
+
if (selection.fields) _chunkU7IJAGWBjs.printJson.call(void 0, play, selection.fields);
|
|
15315
|
+
else _chunkU7IJAGWBjs.printCompactJson.call(void 0, play);
|
|
15312
15316
|
return 0;
|
|
15313
15317
|
}
|
|
15314
15318
|
printPlayDescription(play);
|
|
@@ -15330,7 +15334,7 @@ async function handlePlaySave(args) {
|
|
|
15330
15334
|
}
|
|
15331
15335
|
let graph;
|
|
15332
15336
|
try {
|
|
15333
|
-
graph = await
|
|
15337
|
+
graph = await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
15334
15338
|
"cli.play_save_bundle_graph",
|
|
15335
15339
|
{ targetKind: "file" },
|
|
15336
15340
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, options.target))
|
|
@@ -15352,7 +15356,7 @@ async function handlePlaySave(args) {
|
|
|
15352
15356
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
|
|
15353
15357
|
};
|
|
15354
15358
|
if (options.jsonOutput) {
|
|
15355
|
-
|
|
15359
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, result);
|
|
15356
15360
|
} else {
|
|
15357
15361
|
console.error(result.message);
|
|
15358
15362
|
console.error(` checked artifact: ${result.expectedArtifactHash}`);
|
|
@@ -15374,7 +15378,7 @@ async function handlePlaySave(args) {
|
|
|
15374
15378
|
};
|
|
15375
15379
|
if (options.dryRun) {
|
|
15376
15380
|
if (options.jsonOutput) {
|
|
15377
|
-
|
|
15381
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, dryRun);
|
|
15378
15382
|
} else {
|
|
15379
15383
|
console.log(`Dry run: ${playName}`);
|
|
15380
15384
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15383,14 +15387,14 @@ async function handlePlaySave(args) {
|
|
|
15383
15387
|
}
|
|
15384
15388
|
return 0;
|
|
15385
15389
|
}
|
|
15386
|
-
const client = new (0,
|
|
15390
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
15387
15391
|
try {
|
|
15388
|
-
await
|
|
15392
|
+
await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
15389
15393
|
"cli.play_save_compile_manifests",
|
|
15390
15394
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15391
15395
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
15392
15396
|
);
|
|
15393
|
-
const saved = await
|
|
15397
|
+
const saved = await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
15394
15398
|
"cli.play_save_register_draft",
|
|
15395
15399
|
{ targetKind: "file", playName, artifactHash },
|
|
15396
15400
|
() => client.registerPlayArtifact({
|
|
@@ -15419,7 +15423,7 @@ async function handlePlaySave(args) {
|
|
|
15419
15423
|
}
|
|
15420
15424
|
};
|
|
15421
15425
|
if (options.jsonOutput) {
|
|
15422
|
-
|
|
15426
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, result);
|
|
15423
15427
|
} else {
|
|
15424
15428
|
console.log(
|
|
15425
15429
|
`\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
|
|
@@ -15445,7 +15449,7 @@ async function handlePlayPublish(args) {
|
|
|
15445
15449
|
}
|
|
15446
15450
|
const { target: playName, useLatest } = options;
|
|
15447
15451
|
let revisionId = options.revisionId;
|
|
15448
|
-
const client = new (0,
|
|
15452
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
15449
15453
|
if (isFileTarget(playName)) {
|
|
15450
15454
|
if (revisionId || useLatest) {
|
|
15451
15455
|
console.error(
|
|
@@ -15455,7 +15459,7 @@ async function handlePlayPublish(args) {
|
|
|
15455
15459
|
}
|
|
15456
15460
|
let graph;
|
|
15457
15461
|
try {
|
|
15458
|
-
graph = await
|
|
15462
|
+
graph = await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
15459
15463
|
"cli.play_publish_bundle_graph",
|
|
15460
15464
|
{ targetKind: "file" },
|
|
15461
15465
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, playName))
|
|
@@ -15477,7 +15481,7 @@ async function handlePlayPublish(args) {
|
|
|
15477
15481
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
|
|
15478
15482
|
};
|
|
15479
15483
|
if (options.jsonOutput) {
|
|
15480
|
-
|
|
15484
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, result3);
|
|
15481
15485
|
} else {
|
|
15482
15486
|
console.error(result3.message);
|
|
15483
15487
|
console.error(` checked artifact: ${result3.expectedArtifactHash}`);
|
|
@@ -15500,7 +15504,7 @@ async function handlePlayPublish(args) {
|
|
|
15500
15504
|
};
|
|
15501
15505
|
if (options.dryRun) {
|
|
15502
15506
|
if (options.jsonOutput) {
|
|
15503
|
-
|
|
15507
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, dryRun);
|
|
15504
15508
|
} else {
|
|
15505
15509
|
console.log(`Dry run: ${rootPlayName}`);
|
|
15506
15510
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15519,12 +15523,12 @@ async function handlePlayPublish(args) {
|
|
|
15519
15523
|
}
|
|
15520
15524
|
}
|
|
15521
15525
|
try {
|
|
15522
|
-
await
|
|
15526
|
+
await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
15523
15527
|
"cli.play_publish_compile_manifests",
|
|
15524
15528
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15525
15529
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
15526
15530
|
);
|
|
15527
|
-
await
|
|
15531
|
+
await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
15528
15532
|
"cli.play_publish_imports",
|
|
15529
15533
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15530
15534
|
() => publishImportedPlayDependencies(client, graph)
|
|
@@ -15533,7 +15537,7 @@ async function handlePlayPublish(args) {
|
|
|
15533
15537
|
console.error(error instanceof Error ? error.message : String(error));
|
|
15534
15538
|
return 1;
|
|
15535
15539
|
}
|
|
15536
|
-
const published = await
|
|
15540
|
+
const published = await _chunkNW4QJE54js.traceCliSpan.call(void 0,
|
|
15537
15541
|
"cli.play_publish_register_root",
|
|
15538
15542
|
{
|
|
15539
15543
|
targetKind: "file",
|
|
@@ -15558,17 +15562,17 @@ async function handlePlayPublish(args) {
|
|
|
15558
15562
|
artifactHash,
|
|
15559
15563
|
liveVersion: _nullishCoalesce(published.version, () => ( null)),
|
|
15560
15564
|
revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
|
|
15561
|
-
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15562
|
-
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15565
|
+
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _608 => _608.version]), () => ( null)),
|
|
15566
|
+
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _609 => _609.artifactHash]), () => ( null)),
|
|
15563
15567
|
sourceBytes: {
|
|
15564
|
-
before: _optionalChain([previousLive, 'optionalAccess',
|
|
15568
|
+
before: _optionalChain([previousLive, 'optionalAccess', _610 => _610.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
|
|
15565
15569
|
after: Buffer.byteLength(graph.root.sourceCode, "utf8")
|
|
15566
15570
|
},
|
|
15567
15571
|
triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
|
|
15568
15572
|
triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
|
|
15569
15573
|
};
|
|
15570
15574
|
if (options.jsonOutput) {
|
|
15571
|
-
|
|
15575
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, result2);
|
|
15572
15576
|
} else {
|
|
15573
15577
|
printPublishReceipt({
|
|
15574
15578
|
name: rootPlayName,
|
|
@@ -15599,14 +15603,14 @@ async function handlePlayPublish(args) {
|
|
|
15599
15603
|
revisionId: _nullishCoalesce(revisionId, () => ( null)),
|
|
15600
15604
|
latest: useLatest
|
|
15601
15605
|
};
|
|
15602
|
-
|
|
15606
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, result2);
|
|
15603
15607
|
return 0;
|
|
15604
15608
|
}
|
|
15605
15609
|
const resolvedName = parseReferencedPlayTarget(playName).playName;
|
|
15606
15610
|
if (useLatest) {
|
|
15607
15611
|
const versions = await client.listPlayVersions(resolvedName);
|
|
15608
15612
|
const latest = versions[0];
|
|
15609
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
15613
|
+
if (!_optionalChain([latest, 'optionalAccess', _611 => _611._id])) {
|
|
15610
15614
|
console.error(`No saved revisions found for ${resolvedName}.`);
|
|
15611
15615
|
return 1;
|
|
15612
15616
|
}
|
|
@@ -15623,7 +15627,7 @@ async function handlePlayPublish(args) {
|
|
|
15623
15627
|
revisionId ? { revisionId } : {}
|
|
15624
15628
|
);
|
|
15625
15629
|
if (options.jsonOutput) {
|
|
15626
|
-
|
|
15630
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, result);
|
|
15627
15631
|
} else {
|
|
15628
15632
|
printPublishReceipt({
|
|
15629
15633
|
name: result.name,
|
|
@@ -15663,7 +15667,7 @@ async function handlePlayDelete(args) {
|
|
|
15663
15667
|
);
|
|
15664
15668
|
return 2;
|
|
15665
15669
|
}
|
|
15666
|
-
const client = new (0,
|
|
15670
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
15667
15671
|
let detail;
|
|
15668
15672
|
try {
|
|
15669
15673
|
detail = await client.getPlay(parseReferencedPlayTarget(playName).playName);
|
|
@@ -15687,8 +15691,8 @@ async function handlePlayDelete(args) {
|
|
|
15687
15691
|
name: resolvedName,
|
|
15688
15692
|
plannedMutation: "move saved org-owned play to Trash and stop triggers"
|
|
15689
15693
|
};
|
|
15690
|
-
if (
|
|
15691
|
-
|
|
15694
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
15695
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, result2);
|
|
15692
15696
|
} else {
|
|
15693
15697
|
process.stdout.write(
|
|
15694
15698
|
`Dry run: would move ${result2.name} to Trash and stop its active triggers.
|
|
@@ -15698,8 +15702,8 @@ async function handlePlayDelete(args) {
|
|
|
15698
15702
|
return 0;
|
|
15699
15703
|
}
|
|
15700
15704
|
const result = await client.deletePlay(resolvedName);
|
|
15701
|
-
if (
|
|
15702
|
-
|
|
15705
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
15706
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, result);
|
|
15703
15707
|
return result.archived || result.alreadyArchived ? 0 : 4;
|
|
15704
15708
|
}
|
|
15705
15709
|
if (result.alreadyArchived) {
|
|
@@ -15738,13 +15742,13 @@ async function handlePlayRestore(args) {
|
|
|
15738
15742
|
);
|
|
15739
15743
|
return 2;
|
|
15740
15744
|
}
|
|
15741
|
-
const client = new (0,
|
|
15745
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
15742
15746
|
try {
|
|
15743
15747
|
const result = await client.restorePlay(
|
|
15744
15748
|
parseReferencedPlayTarget(playName).playName
|
|
15745
15749
|
);
|
|
15746
|
-
if (
|
|
15747
|
-
|
|
15750
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
15751
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, result);
|
|
15748
15752
|
return result.restored || result.alreadyActive ? 0 : 4;
|
|
15749
15753
|
}
|
|
15750
15754
|
if (result.alreadyActive) {
|
|
@@ -15871,21 +15875,21 @@ Common commands:
|
|
|
15871
15875
|
resume: `deepline plays resume-submission ${_chunkAID3OYVJjs.shellQuote.call(void 0, path)} --json`
|
|
15872
15876
|
}
|
|
15873
15877
|
};
|
|
15874
|
-
|
|
15878
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, result2, {
|
|
15875
15879
|
json: options.json,
|
|
15876
15880
|
text: `Submission ${saved.workflowId}: admission is unknown. ${result2.next.inspect}
|
|
15877
15881
|
`
|
|
15878
15882
|
});
|
|
15879
15883
|
return;
|
|
15880
15884
|
}
|
|
15881
|
-
const client = new (0,
|
|
15885
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
15882
15886
|
if (new URL(saved.baseUrl).origin !== new URL(client.baseUrl).origin) {
|
|
15883
15887
|
throw new Error(
|
|
15884
15888
|
"The submission belongs to a different API origin. Select its original host before recovery."
|
|
15885
15889
|
);
|
|
15886
15890
|
}
|
|
15887
15891
|
const result = await client.startPlayRun(saved.request);
|
|
15888
|
-
|
|
15892
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
15889
15893
|
{ ...result },
|
|
15890
15894
|
{
|
|
15891
15895
|
json: options.json,
|
|
@@ -15921,7 +15925,7 @@ Examples:
|
|
|
15921
15925
|
).action(async (target, options) => {
|
|
15922
15926
|
process.exitCode = await handlePlayCheck([
|
|
15923
15927
|
target,
|
|
15924
|
-
...
|
|
15928
|
+
..._chunkU7IJAGWBjs.jsonFieldArgs.call(void 0, options.json),
|
|
15925
15929
|
...options.full ? ["--full"] : []
|
|
15926
15930
|
]);
|
|
15927
15931
|
});
|
|
@@ -15960,10 +15964,10 @@ Notes:
|
|
|
15960
15964
|
--force-tool-refresh re-executes completed tool receipts and may repeat billed
|
|
15961
15965
|
provider calls. It is independent from --force.
|
|
15962
15966
|
--max-concurrent-external-calls controls the per-run provider-tool/deepline.fetch
|
|
15963
|
-
resident-work ceiling. Default: ${
|
|
15967
|
+
resident-work ceiling. Default: ${_chunkVEVGM6B5js.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS}; accepted range: 1-${_chunkVEVGM6B5js.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS}.
|
|
15964
15968
|
Provider pacing and sandbox memory limits still apply.
|
|
15965
15969
|
--max-concurrent-rows sets the run-wide default and ceiling for live map row
|
|
15966
|
-
resolvers. Accepted range: 1-${
|
|
15970
|
+
resolvers. Accepted range: 1-${_chunkVEVGM6B5js.MAX_CONFIGURABLE_CONCURRENT_ROWS}. The runtime
|
|
15967
15971
|
may lower it when source-row size exceeds the active-row memory budget.
|
|
15968
15972
|
--max-credits replaces the play's billing.maxCreditsPerRun for this run.
|
|
15969
15973
|
Tool calls that would exceed it are denied.
|
|
@@ -16077,10 +16081,10 @@ Examples:
|
|
|
16077
16081
|
"Refresh completed tool receipts; may repeat billed provider calls"
|
|
16078
16082
|
).option(
|
|
16079
16083
|
"--max-concurrent-external-calls <count>",
|
|
16080
|
-
`Concurrent provider-tool and deepline.fetch executions (${
|
|
16084
|
+
`Concurrent provider-tool and deepline.fetch executions (${_chunkVEVGM6B5js.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS} default, max ${_chunkVEVGM6B5js.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS})`
|
|
16081
16085
|
).option(
|
|
16082
16086
|
"--max-concurrent-rows <count>",
|
|
16083
|
-
`Run-wide dataset map row resolver ceiling (max ${
|
|
16087
|
+
`Run-wide dataset map row resolver ceiling (max ${_chunkVEVGM6B5js.MAX_CONFIGURABLE_CONCURRENT_ROWS})`
|
|
16084
16088
|
).option("--max-credits <credits>", "Deepline-credit cap for this run").option("--open", "Open the play page in a browser after the run starts").option(
|
|
16085
16089
|
"--debug-map-latency",
|
|
16086
16090
|
"Internal diagnostics: emit one aggregate latency profile per dataset map"
|
|
@@ -16125,14 +16129,14 @@ JSON field selection:
|
|
|
16125
16129
|
passthroughArgs.shift();
|
|
16126
16130
|
}
|
|
16127
16131
|
const exitCode = await handlePlayRun(
|
|
16128
|
-
|
|
16132
|
+
_chunkVEVGM6B5js.resolvePlayRunCliOptions.call(void 0,
|
|
16129
16133
|
_nullishCoalesce(effectiveTarget, () => ( void 0)),
|
|
16130
16134
|
options,
|
|
16131
16135
|
passthroughArgs,
|
|
16132
|
-
|
|
16136
|
+
_chunkNW4QJE54js.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
16133
16137
|
)
|
|
16134
16138
|
);
|
|
16135
|
-
|
|
16139
|
+
_chunkNW4QJE54js.recordCliTrace.call(void 0, {
|
|
16136
16140
|
phase: "cli.play_command_exit",
|
|
16137
16141
|
exitCode
|
|
16138
16142
|
});
|
|
@@ -16181,9 +16185,9 @@ Examples:
|
|
|
16181
16185
|
const limit = Number(options.historyLimit);
|
|
16182
16186
|
if (!Number.isInteger(limit) || limit < 1 || limit > 30)
|
|
16183
16187
|
throw new Error("--history-limit must be an integer from 1 to 30.");
|
|
16184
|
-
const client = new (0,
|
|
16188
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
16185
16189
|
if (options.binding) {
|
|
16186
|
-
|
|
16190
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0,
|
|
16187
16191
|
await client.getPlayTriggerHistory(options.binding, { limit })
|
|
16188
16192
|
);
|
|
16189
16193
|
return;
|
|
@@ -16191,7 +16195,7 @@ Examples:
|
|
|
16191
16195
|
const result = await client.listPlayTriggerInventory({
|
|
16192
16196
|
cursor: options.cursor
|
|
16193
16197
|
});
|
|
16194
|
-
|
|
16198
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, {
|
|
16195
16199
|
...result,
|
|
16196
16200
|
next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)}`
|
|
16197
16201
|
});
|
|
@@ -16250,7 +16254,7 @@ Examples:
|
|
|
16250
16254
|
if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
|
|
16251
16255
|
throw new Error("--group-by must be kind or trigger_source.");
|
|
16252
16256
|
}
|
|
16253
|
-
const result = await new (0,
|
|
16257
|
+
const result = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().getPlaysActivity({
|
|
16254
16258
|
timeZone: options.timeZone,
|
|
16255
16259
|
days,
|
|
16256
16260
|
...options.endDate ? { endDate: options.endDate } : {},
|
|
@@ -16264,7 +16268,7 @@ Examples:
|
|
|
16264
16268
|
`${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
|
|
16265
16269
|
);
|
|
16266
16270
|
}
|
|
16267
|
-
|
|
16271
|
+
_chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
|
|
16268
16272
|
{ ...result },
|
|
16269
16273
|
{
|
|
16270
16274
|
json: Boolean(options.json),
|
|
@@ -16293,7 +16297,7 @@ Examples:
|
|
|
16293
16297
|
false
|
|
16294
16298
|
);
|
|
16295
16299
|
});
|
|
16296
|
-
|
|
16300
|
+
_chunk6GRZEYSGjs.registerDeprecatedSearchCommand.call(void 0,
|
|
16297
16301
|
play,
|
|
16298
16302
|
(options) => options.all ? ["plays"] : ["prebuilts"]
|
|
16299
16303
|
);
|
|
@@ -16334,9 +16338,9 @@ Examples:
|
|
|
16334
16338
|
"--json [fields]",
|
|
16335
16339
|
"JSON output; optionally select comma-separated dotted paths"
|
|
16336
16340
|
);
|
|
16337
|
-
|
|
16341
|
+
_chunkDBJ62RAOjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
|
|
16338
16342
|
async (target, options) => {
|
|
16339
|
-
const ownView = () => handlePlayDescribe(
|
|
16343
|
+
const ownView = () => handlePlayDescribe(_chunkU7IJAGWBjs.describeArgs.call(void 0, target, options));
|
|
16340
16344
|
const [flagText] = [options.json].filter(
|
|
16341
16345
|
(value) => typeof value === "string"
|
|
16342
16346
|
);
|
|
@@ -16347,7 +16351,7 @@ Examples:
|
|
|
16347
16351
|
process.exitCode = await ownView();
|
|
16348
16352
|
return;
|
|
16349
16353
|
}
|
|
16350
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
16354
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-UIAYCHWW.js")));
|
|
16351
16355
|
process.exitCode = await describeAnything(
|
|
16352
16356
|
name,
|
|
16353
16357
|
{
|
|
@@ -16465,7 +16469,7 @@ Examples:
|
|
|
16465
16469
|
deepline plays deployments <deployment-id>
|
|
16466
16470
|
`
|
|
16467
16471
|
).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output").action(
|
|
16468
|
-
async (id, options) => id ?
|
|
16472
|
+
async (id, options) => id ? _chunkRLLEH2SPjs.handleDeploymentGet.call(void 0, id, options) : _chunkRLLEH2SPjs.handleDeploymentsList.call(void 0, options)
|
|
16469
16473
|
);
|
|
16470
16474
|
addPublishHelp(
|
|
16471
16475
|
play.command("publish <target>").description(
|
|
@@ -16600,14 +16604,14 @@ Examples:
|
|
|
16600
16604
|
const limit = Number(options.limit);
|
|
16601
16605
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 1e3)
|
|
16602
16606
|
throw new Error("--limit must be an integer from 1 to 1000.");
|
|
16603
|
-
const result = await new (0,
|
|
16607
|
+
const result = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().runs.rowHistory({
|
|
16604
16608
|
playName: options.play,
|
|
16605
16609
|
runId,
|
|
16606
16610
|
tableNamespace: options.dataset,
|
|
16607
16611
|
limit,
|
|
16608
16612
|
cursor: options.cursor
|
|
16609
16613
|
});
|
|
16610
|
-
|
|
16614
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, {
|
|
16611
16615
|
...result,
|
|
16612
16616
|
...result.nextCursor ? {
|
|
16613
16617
|
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`
|
|
@@ -16681,7 +16685,7 @@ Examples:
|
|
|
16681
16685
|
new (0, _commander.Option)("--log-failed", "Attach terminal-failure logs").hideHelp()
|
|
16682
16686
|
).action(async (runId, options) => {
|
|
16683
16687
|
if (TOOL_EXECUTION_ID.test(runId)) {
|
|
16684
|
-
const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-
|
|
16688
|
+
const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-PYJTQVVS.js")));
|
|
16685
16689
|
process.exitCode = await getToolExecutionReceipt(runId, {
|
|
16686
16690
|
receiptJson: options.json !== void 0
|
|
16687
16691
|
});
|
|
@@ -16689,7 +16693,7 @@ Examples:
|
|
|
16689
16693
|
}
|
|
16690
16694
|
process.exitCode = await handleRunGet([
|
|
16691
16695
|
runId,
|
|
16692
|
-
...
|
|
16696
|
+
..._chunkU7IJAGWBjs.jsonFieldArgs.call(void 0, options.json),
|
|
16693
16697
|
...options.webUrl ? ["--web-url"] : [],
|
|
16694
16698
|
...options.full ? ["--full"] : [],
|
|
16695
16699
|
...options.input ? ["--input"] : [],
|
|
@@ -16979,7 +16983,7 @@ Examples:
|
|
|
16979
16983
|
...options.allowEmpty ? ["--allow-empty"] : [],
|
|
16980
16984
|
...options.wait ? ["--wait"] : [],
|
|
16981
16985
|
...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
|
|
16982
|
-
...
|
|
16986
|
+
..._chunkU7IJAGWBjs.jsonFieldArgs.call(void 0, options.json)
|
|
16983
16987
|
]);
|
|
16984
16988
|
});
|
|
16985
16989
|
const share = play.command("share").description(
|
|
@@ -17120,8 +17124,8 @@ function absolutePublicPlayUrl(path) {
|
|
|
17120
17124
|
}
|
|
17121
17125
|
function shareUrlFields(status) {
|
|
17122
17126
|
return {
|
|
17123
|
-
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17124
|
-
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17127
|
+
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _612 => _612.share, 'optionalAccess', _613 => _613.publicPath])),
|
|
17128
|
+
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _614 => _614.share, 'optionalAccess', _615 => _615.canonicalPath]))
|
|
17125
17129
|
};
|
|
17126
17130
|
}
|
|
17127
17131
|
function shareStatusForOutput(status) {
|
|
@@ -17145,10 +17149,10 @@ async function handlePlayShareStatus(args) {
|
|
|
17145
17149
|
return 2;
|
|
17146
17150
|
}
|
|
17147
17151
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17148
|
-
const status = await new (0,
|
|
17152
|
+
const status = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().getSharePage(name);
|
|
17149
17153
|
const outputStatus = shareStatusForOutput(status);
|
|
17150
|
-
if (
|
|
17151
|
-
|
|
17154
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
17155
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, outputStatus);
|
|
17152
17156
|
return 0;
|
|
17153
17157
|
}
|
|
17154
17158
|
if (!outputStatus.share) {
|
|
@@ -17187,7 +17191,7 @@ async function handlePlaySharePublish(args) {
|
|
|
17187
17191
|
return 2;
|
|
17188
17192
|
}
|
|
17189
17193
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17190
|
-
const client = new (0,
|
|
17194
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
17191
17195
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17192
17196
|
let resolvedVersion;
|
|
17193
17197
|
if (!revisionId) {
|
|
@@ -17218,8 +17222,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17218
17222
|
);
|
|
17219
17223
|
if (!hasCompleted) {
|
|
17220
17224
|
const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
|
|
17221
|
-
if (
|
|
17222
|
-
|
|
17225
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
17226
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, {
|
|
17223
17227
|
ok: false,
|
|
17224
17228
|
code: "NO_SUCCESSFUL_RUN",
|
|
17225
17229
|
message,
|
|
@@ -17243,8 +17247,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17243
17247
|
};
|
|
17244
17248
|
if (args.includes("--dry-run")) {
|
|
17245
17249
|
const plan = { dryRun: true, name, version: resolvedVersion, ...request };
|
|
17246
|
-
if (
|
|
17247
|
-
|
|
17250
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
17251
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, plan);
|
|
17248
17252
|
} else {
|
|
17249
17253
|
console.log(
|
|
17250
17254
|
`Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
|
|
@@ -17254,13 +17258,13 @@ async function handlePlaySharePublish(args) {
|
|
|
17254
17258
|
}
|
|
17255
17259
|
const status = await client.publishSharePage(name, request);
|
|
17256
17260
|
const outputStatus = shareStatusForOutput(status);
|
|
17257
|
-
if (
|
|
17258
|
-
|
|
17261
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
17262
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, outputStatus);
|
|
17259
17263
|
return 0;
|
|
17260
17264
|
}
|
|
17261
17265
|
const urls = shareUrlFields(outputStatus);
|
|
17262
17266
|
console.log(
|
|
17263
|
-
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access',
|
|
17267
|
+
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _616 => _616.share, 'optionalAccess', _617 => _617.publicPath]))), () => ( ""))}`
|
|
17264
17268
|
);
|
|
17265
17269
|
if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
|
|
17266
17270
|
console.log(`Version URL: ${urls.canonicalUrl}`);
|
|
@@ -17286,9 +17290,9 @@ async function handlePlayShareUpdate(args) {
|
|
|
17286
17290
|
...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
|
|
17287
17291
|
...seoIndexing ? { seoIndexing } : {}
|
|
17288
17292
|
};
|
|
17289
|
-
const status = await new (0,
|
|
17290
|
-
if (
|
|
17291
|
-
|
|
17293
|
+
const status = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().updateSharePage(name, request);
|
|
17294
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
17295
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, status);
|
|
17292
17296
|
return 0;
|
|
17293
17297
|
}
|
|
17294
17298
|
console.log(`Updated ${name} share settings.`);
|
|
@@ -17303,13 +17307,13 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17303
17307
|
return 2;
|
|
17304
17308
|
}
|
|
17305
17309
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17306
|
-
const client = new (0,
|
|
17310
|
+
const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
|
|
17307
17311
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17308
17312
|
const versionFlag = shareFlagValue(args, "--version");
|
|
17309
17313
|
if (!revisionId && versionFlag) {
|
|
17310
17314
|
const versions = await client.listPlayVersions(name);
|
|
17311
17315
|
const chosen = versions.find((r) => r.version === Number(versionFlag));
|
|
17312
|
-
if (!_optionalChain([chosen, 'optionalAccess',
|
|
17316
|
+
if (!_optionalChain([chosen, 'optionalAccess', _618 => _618._id])) {
|
|
17313
17317
|
console.error(`Version ${versionFlag} not found for ${name}.`);
|
|
17314
17318
|
return 4;
|
|
17315
17319
|
}
|
|
@@ -17320,12 +17324,12 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17320
17324
|
revisionId ? { revisionId } : {}
|
|
17321
17325
|
);
|
|
17322
17326
|
const outputStatus = shareStatusForOutput(status);
|
|
17323
|
-
if (
|
|
17324
|
-
|
|
17327
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
17328
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, outputStatus);
|
|
17325
17329
|
return 0;
|
|
17326
17330
|
}
|
|
17327
17331
|
const urls = shareUrlFields(outputStatus);
|
|
17328
|
-
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access',
|
|
17332
|
+
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _619 => _619.share, 'optionalAccess', _620 => _620.publishedRevisionId]) === revisionId;
|
|
17329
17333
|
console.log(
|
|
17330
17334
|
`Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
|
|
17331
17335
|
);
|
|
@@ -17346,9 +17350,9 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17346
17350
|
return 2;
|
|
17347
17351
|
}
|
|
17348
17352
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17349
|
-
const status = await new (0,
|
|
17350
|
-
if (
|
|
17351
|
-
|
|
17353
|
+
const status = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().unpublishSharePage(name);
|
|
17354
|
+
if (_chunkU7IJAGWBjs.argsWantJson.call(void 0, args)) {
|
|
17355
|
+
_chunkU7IJAGWBjs.printCompactJson.call(void 0, status);
|
|
17352
17356
|
return 0;
|
|
17353
17357
|
}
|
|
17354
17358
|
console.log(`Unpublished ${name}; the public page has been removed.`);
|
|
@@ -17423,4 +17427,4 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17423
17427
|
|
|
17424
17428
|
|
|
17425
17429
|
|
|
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 =
|
|
17430
|
+
exports.PREBUILT_PLAY_TAG_KEYS = PREBUILT_PLAY_TAG_KEYS; exports.assertDatasetHasExportableRows = assertDatasetHasExportableRows; exports.buildPlayCompletionTextLines = buildPlayCompletionTextLines; exports.buildRunActivityTextLines = buildRunActivityTextLines; exports.buildRunLaunch = buildRunLaunch; exports.buildRunLogsText = buildRunLogsText; exports.buildRunPackageTextLines = buildRunPackageTextLines; exports.buildStopAllDryRunTextLines = buildStopAllDryRunTextLines; exports.clampJsonPreviewText = clampJsonPreviewText; exports.compactPlayStatus = compactPlayStatus; exports.csvColumnLines = csvColumnLines; exports.describeSleepUntil = describeSleepUntil; exports.exportPlayStatusRows = exportPlayStatusRows; exports.formatPlaySandboxRuntimeWarning = formatPlaySandboxRuntimeWarning; exports.formatStepLabelFromNodeId = formatStepLabelFromNodeId; exports.getFinalStatusFromLiveEvent = getFinalStatusFromLiveEvent; exports.getProgressLinesFromLiveEvent = getProgressLinesFromLiveEvent; exports.getRunningHeartbeatLine = getRunningHeartbeatLine; exports.getStepTransitionLineFromLiveEvent = getStepTransitionLineFromLiveEvent; exports.handlePlayCheck = handlePlayCheck; exports.handlePlayCost = handlePlayCost; exports.handlePlayDelete = handlePlayDelete; exports.handlePlayDescribe = handlePlayDescribe; exports.handlePlayGet = handlePlayGet; exports.handlePlayGrep = handlePlayGrep; exports.handlePlayList = handlePlayList; exports.handlePlayPin = handlePlayPin; exports.handlePlayPublish = handlePlayPublish; exports.handlePlayRestore = handlePlayRestore; exports.handlePlayRun = handlePlayRun; exports.handlePlaySave = handlePlaySave; exports.handlePlaySharePublish = handlePlaySharePublish; exports.handlePlayShareRegenerate = handlePlayShareRegenerate; exports.handlePlayShareStatus = handlePlayShareStatus; exports.handlePlayShareUnpublish = handlePlayShareUnpublish; exports.handlePlayShareUpdate = handlePlayShareUpdate; exports.handlePlayVersions = handlePlayVersions; exports.handleRunEventSearch = handleRunEventSearch; exports.handleRunExport = handleRunExport; exports.handleRunGet = handleRunGet; exports.handleRunLifecycleStatus = handleRunLifecycleStatus; exports.handleRunLogs = handleRunLogs; exports.handleRunStop = handleRunStop; exports.handleRunStopAll = handleRunStopAll; exports.handleRunTail = handleRunTail; exports.handleRunsList = handleRunsList; exports.handleRunsRerun = handleRunsRerun; exports.liveMaxCreditsPerRun = liveMaxCreditsPerRun; exports.loadPlayBundler = loadPlayBundler; exports.parsePlayPublishOptions = parsePlayPublishOptions; exports.parsePlayRunHeaderFlag = _chunkVEVGM6B5js.parsePlayRunHeaderFlag; exports.parsePlayRunOptions = _chunkVEVGM6B5js.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;
|