deepline 0.3.422 → 0.3.424

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.
Files changed (156) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +15 -8
  2. package/dist/bundling-sources/sdk/src/index.ts +2 -0
  3. package/dist/bundling-sources/sdk/src/play.ts +227 -184
  4. package/dist/bundling-sources/sdk/src/plays/local-file-discovery.ts +9 -2
  5. package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +1 -1
  6. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  7. package/dist/bundling-sources/sdk/src/tool-calls.ts +3 -1
  8. package/dist/bundling-sources/sdk/src/types.ts +5 -5
  9. package/dist/bundling-sources/shared_libs/monitors/fleets/verdict.ts +11 -1
  10. package/dist/bundling-sources/shared_libs/monitors/inventory-reconciliation.ts +38 -4
  11. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +12 -0
  12. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-control-plane-capability.ts +25 -0
  13. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +10 -0
  14. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +201 -0
  15. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +42 -5
  16. package/dist/bundling-sources/shared_libs/monitors/provider-webhook-monitor-runtime.ts +5 -0
  17. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -36
  18. package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +179 -38
  19. package/dist/bundling-sources/shared_libs/plays/dataset.ts +2 -2
  20. package/dist/bundling-sources/shared_libs/plays/docflow.ts +4 -0
  21. package/dist/bundling-sources/shared_libs/plays/fetch-http-error.ts +1 -1
  22. package/dist/bundling-sources/shared_libs/plays/local-file-discovery.ts +12 -4
  23. package/dist/bundling-sources/shared_libs/plays/play-exports.ts +27 -5
  24. package/dist/bundling-sources/shared_libs/plays/script-entry.ts +992 -0
  25. package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +63 -0
  26. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +8 -4
  27. package/dist/bundling-sources/shared_libs/plays/ts-ast.ts +2 -0
  28. package/dist/cli/auth-MN7MWTFR.js +40 -0
  29. package/dist/cli/{auth-DMLBSXLV.mjs → auth-QITAQMHF.mjs} +4 -4
  30. package/dist/cli/{billing-IFGFPGJV.js → billing-N5AOFDSU.js} +73 -73
  31. package/dist/cli/{billing-SEXKROBQ.mjs → billing-UX2GH5L2.mjs} +4 -4
  32. package/dist/cli/{chunk-BL3LY54Y.js → chunk-22XGRO2M.js} +8 -8
  33. package/dist/cli/{chunk-AARWVK4C.mjs → chunk-2BQUML3X.mjs} +792 -69
  34. package/dist/cli/{chunk-ERFN2QY4.mjs → chunk-3DNKFH2G.mjs} +1 -1
  35. package/dist/cli/{chunk-QNBHQM5R.mjs → chunk-3FQUUVN2.mjs} +1 -1
  36. package/dist/cli/{chunk-4CAVSRQH.mjs → chunk-3O7KATMQ.mjs} +1 -1
  37. package/dist/cli/{chunk-S4KGXRCV.js → chunk-3VB5DQ7Y.js} +20 -20
  38. package/dist/cli/{chunk-VT6WJ26Y.mjs → chunk-5MD5I4MM.mjs} +1 -1
  39. package/dist/cli/{chunk-W74RDGRL.mjs → chunk-5OBCPN2C.mjs} +2 -2
  40. package/dist/cli/{chunk-LXRDHISW.js → chunk-5YLEB4CL.js} +8 -8
  41. package/dist/cli/{chunk-2JKQORUX.mjs → chunk-7KNBC4RJ.mjs} +2 -2
  42. package/dist/cli/{chunk-MLP4CAY7.mjs → chunk-7VC7STG5.mjs} +4 -4
  43. package/dist/cli/{chunk-KBJP3UAU.js → chunk-7W4N6VRE.js} +35 -35
  44. package/dist/cli/{chunk-3CE3WGKP.mjs → chunk-7Y5M5YE3.mjs} +2 -2
  45. package/dist/cli/{chunk-V4RAH5D6.js → chunk-CJD5QKYK.js} +26 -26
  46. package/dist/cli/{chunk-AYM2KZN3.js → chunk-DD6MM6WX.js} +6 -6
  47. package/dist/cli/{chunk-63ILLN5H.mjs → chunk-DS7Y7X26.mjs} +2 -2
  48. package/dist/cli/{chunk-CTNA5QY2.mjs → chunk-EER67G2B.mjs} +43 -28
  49. package/dist/cli/{chunk-OZHPZCAU.js → chunk-F3MMA7JY.js} +52 -52
  50. package/dist/cli/{chunk-CO3VMH33.mjs → chunk-FJ5U2IZY.mjs} +28 -27
  51. package/dist/cli/{chunk-27GJKC5Q.js → chunk-GXOQRZXG.js} +2 -2
  52. package/dist/cli/{chunk-AXDEH2AM.mjs → chunk-HBW6PEVG.mjs} +2 -2
  53. package/dist/cli/{chunk-PKBPSMOT.js → chunk-INFLI36H.js} +43 -28
  54. package/dist/cli/{chunk-4PG4ARL2.mjs → chunk-KPKU53YO.mjs} +1 -1
  55. package/dist/cli/{chunk-2LVM22ZU.js → chunk-LSZZVHQP.js} +2 -2
  56. package/dist/cli/{chunk-IMZ56EOH.mjs → chunk-LXTSVUZN.mjs} +2 -2
  57. package/dist/cli/{chunk-WGO2DY4L.js → chunk-M2VXDQI2.js} +11 -11
  58. package/dist/cli/{chunk-7OJEYJ6G.mjs → chunk-M67UCQKW.mjs} +3 -3
  59. package/dist/cli/{chunk-KXPIFC5S.mjs → chunk-MFXQVT7P.mjs} +3 -3
  60. package/dist/cli/{chunk-IHG7UAHD.mjs → chunk-MLJBCS3E.mjs} +32 -13
  61. package/dist/cli/{chunk-4EV2FKBI.js → chunk-OSNDC3VF.js} +16 -16
  62. package/dist/cli/{chunk-PXO253DP.mjs → chunk-OWWFCA7A.mjs} +1 -1
  63. package/dist/cli/{chunk-VRI3ABTK.js → chunk-PNGJIAJ3.js} +50 -50
  64. package/dist/cli/{chunk-HCYNAIHZ.js → chunk-QP5ATTMC.js} +4 -4
  65. package/dist/cli/{chunk-GEJDBXXM.js → chunk-QWRHGGUH.js} +1 -1
  66. package/dist/cli/{chunk-AD47BXN2.js → chunk-R2QWSSAG.js} +8 -8
  67. package/dist/cli/{chunk-QADCFSGH.js → chunk-RDIN3NKA.js} +17 -17
  68. package/dist/cli/{chunk-JRSULUPQ.js → chunk-RISEING7.js} +2 -2
  69. package/dist/cli/{chunk-M6SXXFMT.mjs → chunk-UOZCQPD4.mjs} +2 -2
  70. package/dist/cli/{chunk-TP26TAAF.mjs → chunk-UPH6UNUI.mjs} +1 -1
  71. package/dist/cli/{chunk-UQQRMCOL.js → chunk-UTF57UBW.js} +6 -6
  72. package/dist/cli/{chunk-FEKJENBB.mjs → chunk-VC5NKF4B.mjs} +3 -3
  73. package/dist/cli/{chunk-BQR6UN3C.js → chunk-VUYUI35Q.js} +32 -13
  74. package/dist/cli/{chunk-WP7T4BPE.js → chunk-YA3LMTLU.js} +1 -1
  75. package/dist/cli/{chunk-OQQOXSYA.js → chunk-YHRS6XTB.js} +845 -122
  76. package/dist/cli/{chunk-K4X472AT.js → chunk-YMASNIC5.js} +260 -259
  77. package/dist/cli/{chunk-SDCIROIS.mjs → chunk-ZMU2DDID.mjs} +5 -5
  78. package/dist/cli/command-docs.js +2 -2
  79. package/dist/cli/command-docs.mjs +1 -1
  80. package/dist/cli/{csv-J7UVP4KB.mjs → csv-NM5IHLVM.mjs} +3 -3
  81. package/dist/cli/{csv-Y4YWZSLB.js → csv-RL53NPRV.js} +12 -12
  82. package/dist/cli/{db-CQ6NHMLG.mjs → db-FZTIS4QG.mjs} +5 -5
  83. package/dist/cli/{db-SVFCM6YZ.js → db-RJCFUM2J.js} +26 -26
  84. package/dist/cli/{describe-FSDW6LTN.js → describe-A2MGAI3Y.js} +24 -24
  85. package/dist/cli/{describe-Y65BU7ZY.mjs → describe-T77IEILZ.mjs} +16 -16
  86. package/dist/cli/describe-core.d.mts +2 -2
  87. package/dist/cli/describe-core.d.ts +2 -2
  88. package/dist/cli/describe-core.js +4 -4
  89. package/dist/cli/describe-core.mjs +3 -3
  90. package/dist/cli/{executions-IW762OIJ.mjs → executions-AMQK53QX.mjs} +4 -4
  91. package/dist/cli/{executions-SJIKBRHT.js → executions-R6UPRZ5N.js} +6 -6
  92. package/dist/cli/{feedback-VMJIWAMT.mjs → feedback-BA5ZHVCZ.mjs} +3 -3
  93. package/dist/cli/{feedback-RCYSUOB3.js → feedback-JFT536KI.js} +7 -7
  94. package/dist/cli/{git-Q2WY3K6X.mjs → git-5ONARXFO.mjs} +4 -4
  95. package/dist/cli/git-NHQR3NKF.js +24 -0
  96. package/dist/cli/index.js +135 -135
  97. package/dist/cli/index.mjs +37 -37
  98. package/dist/cli/{legacy-noops-JVEE2VHK.mjs → legacy-noops-7J4K6QUX.mjs} +4 -4
  99. package/dist/cli/{legacy-noops-U4YPPYXU.js → legacy-noops-WT7M7WYD.js} +7 -7
  100. package/dist/cli/{monitors-AY4KQRTC.mjs → monitors-N3WDXW7H.mjs} +19 -13
  101. package/dist/cli/{monitors-BMAOQ37R.js → monitors-YH6PKEIW.js} +99 -93
  102. package/dist/cli/{org-ME4X6HWH.mjs → org-2V5ELSYS.mjs} +4 -4
  103. package/dist/cli/{org-G5IURX74.js → org-KGYHMT5P.js} +64 -64
  104. package/dist/cli/{play-X5GSZOKZ.js → play-2JOQQRZI.js} +606 -567
  105. package/dist/cli/{play-WLYU7WQL.mjs → play-CL2LCBAF.mjs} +113 -74
  106. package/dist/cli/{providers-2LBMNB7B.mjs → providers-I7EEPWNW.mjs} +4 -4
  107. package/dist/cli/{providers-AHEUVD3R.js → providers-VIP6MCWC.js} +7 -7
  108. package/dist/cli/{quickstart-DP2SKLIG.js → quickstart-33WC2KWE.js} +5 -5
  109. package/dist/cli/{quickstart-DBLYGHJP.mjs → quickstart-VRBKQODE.mjs} +3 -3
  110. package/dist/cli/{search-YKJHY3ZJ.mjs → search-7TDSKXOO.mjs} +5 -5
  111. package/dist/cli/search-A6RZZ4LK.js +30 -0
  112. package/dist/cli/{secrets-ECLARBO6.mjs → secrets-DGLCIN7Y.mjs} +4 -4
  113. package/dist/cli/{secrets-2P3I3OEZ.js → secrets-TQH5FXAC.js} +13 -13
  114. package/dist/cli/{sessions-MC4ZCTSN.js → sessions-4D4UDPIS.js} +5 -5
  115. package/dist/cli/{sessions-3GDFID7R.mjs → sessions-D6QGKQ2G.mjs} +4 -4
  116. package/dist/cli/{settings-RTPJXMOA.mjs → settings-6HVXBCVR.mjs} +8 -8
  117. package/dist/cli/{settings-7SVR2OVL.js → settings-V3QRG4AO.js} +75 -75
  118. package/dist/cli/{setup-4WLIJX36.js → setup-6WP7D5I3.js} +42 -42
  119. package/dist/cli/{setup-OKAZZGAW.mjs → setup-CSJ3HSL7.mjs} +7 -7
  120. package/dist/cli/{skills-2CVL6RG5.mjs → skills-2MTWP4PS.mjs} +5 -5
  121. package/dist/cli/skills-QOYOARZT.js +29 -0
  122. package/dist/cli/{tools-KAFHP6J4.mjs → tools-GAR3BWB6.mjs} +15 -15
  123. package/dist/cli/tools-MGEKAIOU.js +44 -0
  124. package/dist/cli/update-HMZCLFLZ.js +31 -0
  125. package/dist/cli/{update-3ZV3W7I4.mjs → update-XV3WV3MU.mjs} +7 -7
  126. package/dist/cli/{workflow-DKSUNZXE.mjs → workflow-DTZAWSB2.mjs} +9 -9
  127. package/dist/cli/{workflow-GULDFFP3.js → workflow-WNE7ORMT.js} +19 -19
  128. package/dist/{client-CCWIUnk7.d.mts → client-BcfFWD4Z.d.mts} +19 -15
  129. package/dist/{client-vHqBm-OL.d.ts → client-DH-fmT69.d.ts} +19 -15
  130. package/dist/{compiler-manifest-lzWpbV3w.d.mts → compiler-manifest-DaFuA1ki.d.mts} +35 -32
  131. package/dist/{compiler-manifest-lzWpbV3w.d.ts → compiler-manifest-DaFuA1ki.d.ts} +35 -32
  132. package/dist/{index-CtNK-0nI.d.mts → index-0yS9ihly.d.mts} +10 -3
  133. package/dist/{index-C8Cy-YTm.d.ts → index-CRAScKPg.d.ts} +10 -3
  134. package/dist/index.d.mts +120 -150
  135. package/dist/index.d.ts +120 -150
  136. package/dist/index.js +77 -12
  137. package/dist/index.mjs +74 -9
  138. package/dist/install-integrity.json +99 -98
  139. package/dist/plays/bundle-play-file.d.mts +3 -3
  140. package/dist/plays/bundle-play-file.d.ts +3 -3
  141. package/dist/plays/bundle-play-file.mjs +1 -1
  142. package/dist/plays/play-description.d.mts +2 -2
  143. package/dist/plays/play-description.d.ts +2 -2
  144. package/dist/plays/run-request.d.mts +2 -2
  145. package/dist/plays/run-request.d.ts +2 -2
  146. package/dist/release.d.mts +1 -1
  147. package/dist/release.d.ts +1 -1
  148. package/dist/release.js +2 -2
  149. package/dist/release.mjs +1 -1
  150. package/package.json +1 -1
  151. package/dist/cli/auth-HD5AM2WM.js +0 -40
  152. package/dist/cli/git-JAW3UEGA.js +0 -24
  153. package/dist/cli/search-4K3VSDS5.js +0 -30
  154. package/dist/cli/skills-ZNSQOXO2.js +0 -29
  155. package/dist/cli/tools-W4U4FT3R.js +0 -44
  156. package/dist/cli/update-IE2FPLB5.js +0 -31
@@ -1,17 +1,17 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
2
2
 
3
3
 
4
- var _chunk27GJKC5Qjs = require('./chunk-27GJKC5Q.js');
4
+ var _chunkGXOQRZXGjs = require('./chunk-GXOQRZXG.js');
5
5
 
6
6
 
7
- var _chunkBL3LY54Yjs = require('./chunk-BL3LY54Y.js');
7
+ var _chunk22XGRO2Mjs = require('./chunk-22XGRO2M.js');
8
8
 
9
9
 
10
10
 
11
- var _chunkV4RAH5D6js = require('./chunk-V4RAH5D6.js');
11
+ var _chunkCJD5QKYKjs = require('./chunk-CJD5QKYK.js');
12
12
 
13
13
 
14
- var _chunkBQR6UN3Cjs = require('./chunk-BQR6UN3C.js');
14
+ var _chunkVUYUI35Qjs = require('./chunk-VUYUI35Q.js');
15
15
 
16
16
 
17
17
  var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
@@ -23,7 +23,9 @@ require('./chunk-ZM2YPJQJ.js');
23
23
 
24
24
 
25
25
 
26
- var _chunkOQQOXSYAjs = require('./chunk-OQQOXSYA.js');
26
+
27
+
28
+ var _chunkYHRS6XTBjs = require('./chunk-YHRS6XTB.js');
27
29
  require('./chunk-3KC45UVF.js');
28
30
  require('./chunk-J33TSWO5.js');
29
31
 
@@ -32,7 +34,7 @@ var _chunkWU4U6VSBjs = require('./chunk-WU4U6VSB.js');
32
34
 
33
35
 
34
36
 
35
- var _chunkGEJDBXXMjs = require('./chunk-GEJDBXXM.js');
37
+ var _chunkQWRHGGUHjs = require('./chunk-QWRHGGUH.js');
36
38
  require('./chunk-VKKVSFRD.js');
37
39
 
38
40
 
@@ -47,7 +49,7 @@ require('./chunk-VKKVSFRD.js');
47
49
 
48
50
 
49
51
 
50
- var _chunkWGO2DY4Ljs = require('./chunk-WGO2DY4L.js');
52
+ var _chunkM2VXDQI2js = require('./chunk-M2VXDQI2.js');
51
53
  require('./chunk-E4CABWXL.js');
52
54
 
53
55
 
@@ -68,17 +70,17 @@ require('./chunk-XDVT3GOM.js');
68
70
 
69
71
 
70
72
 
71
- var _chunkUQQRMCOLjs = require('./chunk-UQQRMCOL.js');
73
+ var _chunkUTF57UBWjs = require('./chunk-UTF57UBW.js');
72
74
 
73
75
 
74
76
 
75
77
 
76
78
 
77
- var _chunk2LVM22ZUjs = require('./chunk-2LVM22ZU.js');
79
+ var _chunkLSZZVHQPjs = require('./chunk-LSZZVHQP.js');
78
80
 
79
81
 
80
82
 
81
- var _chunkOZHPZCAUjs = require('./chunk-OZHPZCAU.js');
83
+ var _chunkF3MMA7JYjs = require('./chunk-F3MMA7JY.js');
82
84
 
83
85
 
84
86
 
@@ -93,16 +95,16 @@ var _chunkOZHPZCAUjs = require('./chunk-OZHPZCAU.js');
93
95
 
94
96
 
95
97
 
96
- var _chunkAYM2KZN3js = require('./chunk-AYM2KZN3.js');
98
+ var _chunkDD6MM6WXjs = require('./chunk-DD6MM6WX.js');
97
99
 
98
100
 
99
- var _chunkHCYNAIHZjs = require('./chunk-HCYNAIHZ.js');
101
+ var _chunkQP5ATTMCjs = require('./chunk-QP5ATTMC.js');
100
102
  require('./chunk-NPBJI7RE.js');
101
103
  require('./chunk-XNYIZMNQ.js');
102
104
 
103
105
 
104
106
  var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
105
- require('./chunk-WP7T4BPE.js');
107
+ require('./chunk-YA3LMTLU.js');
106
108
  require('./chunk-OG64RBAC.js');
107
109
 
108
110
 
@@ -2084,7 +2086,7 @@ function resolveField(key, command) {
2084
2086
  function printSettings(result, json, name) {
2085
2087
  result = { ...result, settings: parsePlaySettings(result.settings) };
2086
2088
  const selected = fields.filter(([key]) => !name || key === name);
2087
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
2089
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
2088
2090
  {
2089
2091
  ...result,
2090
2092
  settings: Object.fromEntries(
@@ -2128,7 +2130,7 @@ function registerPlaySettingsCommands(plays) {
2128
2130
  valueSyntax: field.cli.valueSyntax,
2129
2131
  examples: field.cli.examples
2130
2132
  }));
2131
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
2133
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
2132
2134
  {
2133
2135
  fields: descriptions,
2134
2136
  render: {
@@ -2153,7 +2155,7 @@ function registerPlaySettingsCommands(plays) {
2153
2155
  async (options, command) => {
2154
2156
  if (options.name !== void 0) resolveField(options.name, command);
2155
2157
  printSettings(
2156
- await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().getPlaySettings(options.play),
2158
+ await new (0, _chunkM2VXDQI2js.DeeplineClient)().getPlaySettings(options.play),
2157
2159
  options.json,
2158
2160
  options.name
2159
2161
  );
@@ -2184,7 +2186,7 @@ function registerPlaySettingsCommands(plays) {
2184
2186
  );
2185
2187
  }
2186
2188
  if (options.dryRun) {
2187
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
2189
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
2188
2190
  {
2189
2191
  dryRun: true,
2190
2192
  play,
@@ -2205,7 +2207,7 @@ function registerPlaySettingsCommands(plays) {
2205
2207
  return;
2206
2208
  }
2207
2209
  printSettings(
2208
- await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().updatePlaySettings(play, patch),
2210
+ await new (0, _chunkM2VXDQI2js.DeeplineClient)().updatePlaySettings(play, patch),
2209
2211
  options.json
2210
2212
  );
2211
2213
  };
@@ -2231,13 +2233,13 @@ function registerPlaySettingsCommands(plays) {
2231
2233
  "--root must be person or team; --limit must be 1\u2013100.",
2232
2234
  { exitCode: 2 }
2233
2235
  );
2234
- const page = await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().listPlaySettingsPaths({
2236
+ const page = await new (0, _chunkM2VXDQI2js.DeeplineClient)().listPlaySettingsPaths({
2235
2237
  root: options.root,
2236
2238
  limit,
2237
2239
  cursor: options.cursor
2238
2240
  });
2239
2241
  const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""}` : null;
2240
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
2242
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
2241
2243
  {
2242
2244
  ...page,
2243
2245
  nextCommand,
@@ -2288,7 +2290,7 @@ function registerPlaySettingsCommands(plays) {
2288
2290
  root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.root]), () => ( "person")),
2289
2291
  folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _14 => _14.folders]), () => ( []))
2290
2292
  };
2291
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
2293
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
2292
2294
  const paths = [];
2293
2295
  let cursor;
2294
2296
  do {
@@ -2350,7 +2352,7 @@ function registerPlaySettingsCommands(plays) {
2350
2352
  moved.push(move.playName);
2351
2353
  }
2352
2354
  }
2353
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
2355
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
2354
2356
  {
2355
2357
  dryRun: Boolean(options.dryRun),
2356
2358
  from: options.from,
@@ -2478,7 +2480,7 @@ function triggerLines(view) {
2478
2480
  return lines;
2479
2481
  }
2480
2482
  function printView(view, json) {
2481
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
2483
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
2482
2484
  {
2483
2485
  ...view,
2484
2486
  render: {
@@ -2491,7 +2493,7 @@ function printView(view, json) {
2491
2493
  );
2492
2494
  }
2493
2495
  function printResult(result, json) {
2494
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
2496
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
2495
2497
  {
2496
2498
  ...result,
2497
2499
  render: {
@@ -2521,7 +2523,7 @@ async function mutate(command, options, build) {
2521
2523
  usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
2522
2524
  }
2523
2525
  if (options.dryRun) {
2524
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
2526
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
2525
2527
  {
2526
2528
  dryRun: true,
2527
2529
  play: options.play,
@@ -2540,7 +2542,7 @@ async function mutate(command, options, build) {
2540
2542
  return;
2541
2543
  }
2542
2544
  printResult(
2543
- await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
2545
+ await new (0, _chunkM2VXDQI2js.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
2544
2546
  options.json
2545
2547
  );
2546
2548
  }
@@ -2573,7 +2575,7 @@ function registerPlayTriggerConfigCommands(plays) {
2573
2575
  }).addHelpText("after", help2);
2574
2576
  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) => {
2575
2577
  printView(
2576
- await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().getPlayTriggerConfig(options.play),
2578
+ await new (0, _chunkM2VXDQI2js.DeeplineClient)().getPlayTriggerConfig(options.play),
2577
2579
  options.json
2578
2580
  );
2579
2581
  });
@@ -2617,7 +2619,7 @@ function registerPlayTriggerConfigCommands(plays) {
2617
2619
  if (options.auth === void 0) {
2618
2620
  if (secrets.length || options.header || options.signaturePrefix)
2619
2621
  usage(setWebhook, "--secret/--header need --auth.");
2620
- const current = await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().getPlayTriggerConfig(
2622
+ const current = await new (0, _chunkM2VXDQI2js.DeeplineClient)().getPlayTriggerConfig(
2621
2623
  options.play
2622
2624
  );
2623
2625
  return {
@@ -2694,7 +2696,7 @@ var KIND_DESCRIPTIONS = {
2694
2696
  "receipt.skipped": "Saved work result: skipped.",
2695
2697
  "runtime.event": "Other event."
2696
2698
  };
2697
- var RUN_LOGS_KIND_HELP = _chunkWGO2DY4Ljs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
2699
+ var RUN_LOGS_KIND_HELP = _chunkM2VXDQI2js.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
2698
2700
  kind,
2699
2701
  description: KIND_DESCRIPTIONS[kind]
2700
2702
  }));
@@ -2831,9 +2833,9 @@ function configureRunQueryCommandErrors(command, resource) {
2831
2833
  const args = program.args;
2832
2834
  if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
2833
2835
  error.exitCode = 2;
2834
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
2835
- _chunkAYM2KZN3js.printJsonError.call(void 0,
2836
- Object.assign(new (0, _chunkWGO2DY4Ljs.RunEventQueryInputError)(error.message), {
2836
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
2837
+ _chunkDD6MM6WXjs.printJsonError.call(void 0,
2838
+ Object.assign(new (0, _chunkM2VXDQI2js.RunEventQueryInputError)(error.message), {
2837
2839
  exitCode: 2,
2838
2840
  retryable: false
2839
2841
  })
@@ -2877,14 +2879,14 @@ function parseQuery(args, resource) {
2877
2879
  if (VALUE_FLAGS.has(flag)) {
2878
2880
  const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
2879
2881
  if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
2880
- throw new (0, _chunkWGO2DY4Ljs.RunEventQueryInputError)(
2882
+ throw new (0, _chunkM2VXDQI2js.RunEventQueryInputError)(
2881
2883
  `${flag} requires a value. Use ${flag} <value>.`
2882
2884
  );
2883
2885
  }
2884
2886
  if (flag === "--sum") sums.push(value);
2885
2887
  else {
2886
2888
  if (values[flag] !== void 0) {
2887
- throw new (0, _chunkWGO2DY4Ljs.RunEventQueryInputError)(
2889
+ throw new (0, _chunkM2VXDQI2js.RunEventQueryInputError)(
2888
2890
  `${flag} may only be supplied once.`
2889
2891
  );
2890
2892
  }
@@ -2898,12 +2900,12 @@ function parseQuery(args, resource) {
2898
2900
  }
2899
2901
  if (arg.startsWith("-")) {
2900
2902
  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.";
2901
- throw new (0, _chunkWGO2DY4Ljs.RunEventQueryInputError)(
2903
+ throw new (0, _chunkM2VXDQI2js.RunEventQueryInputError)(
2902
2904
  `Unsupported query flag ${flag}. ${correction}`
2903
2905
  );
2904
2906
  }
2905
2907
  if (runId !== void 0) {
2906
- throw new (0, _chunkWGO2DY4Ljs.RunEventQueryInputError)(
2908
+ throw new (0, _chunkM2VXDQI2js.RunEventQueryInputError)(
2907
2909
  `Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
2908
2910
  );
2909
2911
  }
@@ -2911,7 +2913,7 @@ function parseQuery(args, resource) {
2911
2913
  }
2912
2914
  if (switches.has("--fields")) {
2913
2915
  if (runId !== void 0) {
2914
- throw new (0, _chunkWGO2DY4Ljs.RunEventQueryInputError)(
2916
+ throw new (0, _chunkM2VXDQI2js.RunEventQueryInputError)(
2915
2917
  "--fields does not use a run ID. Omit the positional run ID."
2916
2918
  );
2917
2919
  }
@@ -2924,18 +2926,18 @@ function parseQuery(args, resource) {
2924
2926
  )
2925
2927
  ];
2926
2928
  if (incompatible.length) {
2927
- throw new (0, _chunkWGO2DY4Ljs.RunEventQueryInputError)(
2929
+ throw new (0, _chunkM2VXDQI2js.RunEventQueryInputError)(
2928
2930
  `--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
2929
2931
  );
2930
2932
  }
2931
2933
  }
2932
2934
  if (switches.has("--count") && values["--group-by"] !== void 0) {
2933
- throw new (0, _chunkWGO2DY4Ljs.RunEventQueryInputError)(
2935
+ throw new (0, _chunkM2VXDQI2js.RunEventQueryInputError)(
2934
2936
  "--count cannot be combined with --group-by. Use --group-by for counts per group."
2935
2937
  );
2936
2938
  }
2937
2939
  if (sums.length && switches.has("--count")) {
2938
- throw new (0, _chunkWGO2DY4Ljs.RunEventQueryInputError)(
2940
+ throw new (0, _chunkM2VXDQI2js.RunEventQueryInputError)(
2939
2941
  "--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
2940
2942
  );
2941
2943
  }
@@ -2943,7 +2945,7 @@ function parseQuery(args, resource) {
2943
2945
  if (operation === "count") {
2944
2946
  for (const flag of ["--limit", "--cursor", "--payloads"]) {
2945
2947
  if (values[flag] !== void 0 || switches.has(flag)) {
2946
- throw new (0, _chunkWGO2DY4Ljs.RunEventQueryInputError)(
2948
+ throw new (0, _chunkM2VXDQI2js.RunEventQueryInputError)(
2947
2949
  `--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
2948
2950
  );
2949
2951
  }
@@ -2978,16 +2980,16 @@ function parseQuery(args, resource) {
2978
2980
  ];
2979
2981
  }
2980
2982
  }
2981
- const request = _chunkWGO2DY4Ljs.normalizeRunEventOperationRequest.call(void 0, body);
2983
+ const request = _chunkM2VXDQI2js.normalizeRunEventOperationRequest.call(void 0, body);
2982
2984
  const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
2983
2985
  const backend = values["--runtime-backend"];
2984
2986
  if (backend && backend !== "daytona" && backend !== "modal") {
2985
- throw new (0, _chunkWGO2DY4Ljs.RunEventQueryInputError)(
2987
+ throw new (0, _chunkM2VXDQI2js.RunEventQueryInputError)(
2986
2988
  "--runtime-backend must be daytona or modal."
2987
2989
  );
2988
2990
  }
2989
2991
  if (backend && !namespace) {
2990
- throw new (0, _chunkWGO2DY4Ljs.RunEventQueryInputError)(
2992
+ throw new (0, _chunkM2VXDQI2js.RunEventQueryInputError)(
2991
2993
  "--runtime-backend requires --runtime-namespace."
2992
2994
  );
2993
2995
  }
@@ -3034,12 +3036,12 @@ async function handleRunEventQuery(args, resource = "logs") {
3034
3036
  const failure = error instanceof Error ? error : new Error(String(error));
3035
3037
  const record3 = failure;
3036
3038
  const status = record3.statusCode;
3037
- const exitCode = error instanceof _chunkWGO2DY4Ljs.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;
3039
+ const exitCode = error instanceof _chunkM2VXDQI2js.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;
3038
3040
  const diagnostic = Object.assign(failure, {
3039
3041
  exitCode,
3040
3042
  retryable: exitCode === 5
3041
3043
  });
3042
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) _chunkAYM2KZN3js.printJsonError.call(void 0, diagnostic);
3044
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) _chunkDD6MM6WXjs.printJsonError.call(void 0, diagnostic);
3043
3045
  else console.error(`Error: ${diagnostic.message}`);
3044
3046
  return exitCode;
3045
3047
  }
@@ -3054,7 +3056,7 @@ async function executeRunEventQuery(args, resource) {
3054
3056
  ...criteria
3055
3057
  } = request;
3056
3058
  const options = { ...criteria, ...runtime ? { runtime } : {} };
3057
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
3059
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
3058
3060
  let result;
3059
3061
  if (request.operation === "fields") {
3060
3062
  result = await client.runs[resource].fields(runtime ? { runtime } : {});
@@ -3120,13 +3122,13 @@ async function executeRunEventQuery(args, resource) {
3120
3122
  lines.push(`Next page: ${nextPage}`);
3121
3123
  }
3122
3124
  }
3123
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
3125
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
3124
3126
  {
3125
3127
  ...result,
3126
3128
  ...nextPage ? { next: { page: nextPage } } : {},
3127
3129
  render: { sections: [{ title: `run ${resource}`, lines }] }
3128
3130
  },
3129
- { json: _chunkAYM2KZN3js.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
3131
+ { json: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
3130
3132
  ` }
3131
3133
  );
3132
3134
  return 0;
@@ -3988,6 +3990,7 @@ ${JSON.stringify(value, null, 2)}` : `${key}: ${String(value)}`
3988
3990
 
3989
3991
 
3990
3992
 
3993
+
3991
3994
  var _fs = require('fs');
3992
3995
 
3993
3996
 
@@ -4044,7 +4047,7 @@ Existing credential redactions and referenced-list previews remain as stored.
4044
4047
  ...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
4045
4048
  );
4046
4049
  }
4047
- const response = await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().runs.getReceipts(runId, {
4050
+ const response = await new (0, _chunkM2VXDQI2js.DeeplineClient)().runs.getReceipts(runId, {
4048
4051
  keys
4049
4052
  });
4050
4053
  const failed = response.receipts.filter(
@@ -4056,7 +4059,7 @@ Existing credential redactions and referenced-list previews remain as stored.
4056
4059
  JSON.stringify(response, null, 2) + "\n",
4057
4060
  { flag: "wx", mode: 384 }
4058
4061
  );
4059
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
4062
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
4060
4063
  {
4061
4064
  runId,
4062
4065
  out: options.out,
@@ -4066,7 +4069,7 @@ Existing credential redactions and referenced-list previews remain as stored.
4066
4069
  { json: true }
4067
4070
  );
4068
4071
  } else {
4069
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0, { ...response }, { json: true });
4072
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
4070
4073
  }
4071
4074
  if (failed)
4072
4075
  process.exitCode = response.receipts.some(
@@ -4085,7 +4088,7 @@ function registerRunChildrenCommand(runs) {
4085
4088
  "List async child Runs for one launch key, one page at a time."
4086
4089
  ).requiredOption(
4087
4090
  "--launch-key <key>",
4088
- "Authored ctx.runPlayAsync launch key"
4091
+ "Authored deepline.runPlayAsync launch key"
4089
4092
  ).option("--cursor <cursor>", "Opaque cursor from the previous page").option("--limit <number>", "Rows to request (1\u201350; default 50)", "50").option("--json", "Emit JSON output").addHelpText(
4090
4093
  "after",
4091
4094
  `
@@ -4105,7 +4108,7 @@ includes nextCommand when another page is available.
4105
4108
  { exitCode: 2 }
4106
4109
  );
4107
4110
  }
4108
- const page = await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().runs.children(parentRunId, {
4111
+ const page = await new (0, _chunkM2VXDQI2js.DeeplineClient)().runs.children(parentRunId, {
4109
4112
  launchKey: options.launchKey,
4110
4113
  ...options.cursor !== void 0 ? { cursor: options.cursor } : {},
4111
4114
  limit
@@ -4120,7 +4123,7 @@ includes nextCommand when another page is available.
4120
4123
  "--limit",
4121
4124
  String(limit)
4122
4125
  ].join(" ") : null;
4123
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
4126
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
4124
4127
  {
4125
4128
  parentRunId,
4126
4129
  launchKey: options.launchKey,
@@ -4156,7 +4159,7 @@ async function handleRunsHistory(options) {
4156
4159
  throw new Error("--limit must be a positive integer.");
4157
4160
  }
4158
4161
  }
4159
- const page = await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().runs.history({
4162
+ const page = await new (0, _chunkM2VXDQI2js.DeeplineClient)().runs.history({
4160
4163
  cursor: options.cursor,
4161
4164
  orgId: options.org,
4162
4165
  search: options.search,
@@ -4172,7 +4175,7 @@ async function handleRunsHistory(options) {
4172
4175
  );
4173
4176
  }
4174
4177
  if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
4175
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
4178
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
4176
4179
  { ...page, render: { sections: [{ title: "Run history", lines }] } },
4177
4180
  options.json ? { json: true } : {}
4178
4181
  );
@@ -4224,12 +4227,12 @@ async function runRunsRerunCommand(runId, options) {
4224
4227
  return 1;
4225
4228
  }
4226
4229
  }
4227
- const result = await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().runs.rerun(runId, {
4230
+ const result = await new (0, _chunkM2VXDQI2js.DeeplineClient)().runs.rerun(runId, {
4228
4231
  ...idempotencyKey === void 0 ? {} : { idempotencyKey },
4229
4232
  ...inputOverrides === void 0 ? {} : { inputOverrides }
4230
4233
  });
4231
- if (_chunkAYM2KZN3js.shouldEmitJson.call(void 0, options.json)) {
4232
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0, result, { json: true });
4234
+ if (_chunkDD6MM6WXjs.shouldEmitJson.call(void 0, options.json)) {
4235
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0, result, { json: true });
4233
4236
  } else {
4234
4237
  console.log(
4235
4238
  result.deduplicated === true ? `
@@ -4497,7 +4500,7 @@ function projectRunDatasetCell(value) {
4497
4500
  const logicalValue = parseSerializedDatasetValue(value);
4498
4501
  if (logicalValue === null || logicalValue === void 0) return logicalValue;
4499
4502
  if (typeof logicalValue === "object") {
4500
- return _chunkAYM2KZN3js.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
4503
+ return _chunkDD6MM6WXjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
4501
4504
  }
4502
4505
  return logicalValue;
4503
4506
  }
@@ -5374,8 +5377,8 @@ function stringValue(value) {
5374
5377
  var EXTRACTED_GETTER_ERROR_HINT = "Deepline hint: extractedValues/extractedLists .get() only works for declared Deepline getters listed by `deepline describe <tool>`. Read tool-specific fields from `toolExecutionResult.toolResponse.rawV2` using the nesting shown in the response example, and use `toolExecutionResult.extractedLists.<name>.get()` for declared row/list outputs.";
5375
5378
  var DATASET_API_HINT = "Deepline hint: PlayDataset is lazy, durable, and async-only. Use `.count()`, `.first()`, `.at(index)`, `.peek(n)`, `.materialize(limit)`, or async iteration; do not use `.length`, numeric indexing, spread, synchronous iteration, `.rows`, or `.toArray()`.";
5376
5379
  var ROW_PROPERTY_HINT = "Deepline hint: this row type only contains fields produced by the CSV/schema and previous map steps. Check source column casing and the exact output field names from earlier steps before scaling.";
5377
- var TOOLS_EXECUTE_SIGNATURE_HINT = "Deepline hint: ctx.tools.execute requires a request object: `ctx.tools.execute({ id, tool, input, description })`. The stable `id` is required for logs, metadata, and result-cache identity; terminal cache reuse is based on play, tool, semantic input, auth scope, provider action version, and cache policy. In authoring edition 11, also choose `staleAfterSeconds`: `0` for fresh logical work, a positive integer for the maximum reusable result age in seconds, or `null` for indefinite result reuse.";
5378
- var RUN_PLAY_SIGNATURE_HINT = "Deepline hint: ctx.runPlay uses a stable key plus a composable child play reference. Direct-run-only or dataset-backed batch plays must be run directly, exported, then consumed by a separate play.";
5380
+ var TOOLS_EXECUTE_SIGNATURE_HINT = "Deepline hint: deepline.tools.execute requires a request object: `deepline.tools.execute({ id, tool, input, description })`. The stable `id` is required for logs, metadata, and result-cache identity; terminal cache reuse is based on play, tool, semantic input, auth scope, provider action version, and cache policy. In authoring edition 11, also choose `staleAfterSeconds`: `0` for fresh logical work, a positive integer for the maximum reusable result age in seconds, or `null` for indefinite result reuse.";
5381
+ var RUN_PLAY_SIGNATURE_HINT = "Deepline hint: deepline.runPlay uses a stable key plus a composable child play reference. Direct-run-only or dataset-backed batch plays must be run directly, exported, then consumed by a separate play.";
5379
5382
  var MAP_BACKED_CHILD_HINT = "Deepline hint: dataset-backed child plays own durable table state and cannot be called from another play. Run that play directly, export its dataset, then pass the CSV to the next play.";
5380
5383
  function sourceLineForError(sourceCode, error) {
5381
5384
  const match = error.match(/:(\d+):(\d+)\s/);
@@ -5400,7 +5403,7 @@ function looksLikeRowPropertyMismatch(error, sourceLine) {
5400
5403
  return /\brow\.[A-Za-z_][A-Za-z0-9_]*/.test(sourceLine);
5401
5404
  }
5402
5405
  function looksLikeToolsExecuteSignature(error, sourceLine) {
5403
- return /ctx\.tools\.execute requires a request object/i.test(error) || /Expected 1 arguments?, but got [2-9]/.test(error) && /\btools\.execute\(/.test(sourceLine);
5406
+ return /\w+\.tools\.execute requires a request object/i.test(error) || /Expected 1 arguments?, but got [2-9]/.test(error) && /\btools\.execute\(/.test(sourceLine);
5404
5407
  }
5405
5408
  function looksLikeRunPlaySignature(error, sourceLine) {
5406
5409
  return /ctx\.runPlay/i.test(error) || /(?:Expected|Argument of type|No overload matches)/.test(error) && /\brunPlay\(/.test(sourceLine);
@@ -6075,10 +6078,10 @@ function resolveOwnedPlayReferenceName(reference, ownerSlug) {
6075
6078
  // ../plays/deploy/run-deployment.ts
6076
6079
  var RUN_PLAY_METHOD_NAMES = /* @__PURE__ */ new Set(["runPlay", "runPlayAsync"]);
6077
6080
  function isRunPlayReceiver(node) {
6078
- return _chunkOQQOXSYAjs.isAstNode.call(void 0, node) && node.type === "Identifier" && typeof node.name === "string" && (node.name === "ctx" || node.name.endsWith("Ctx"));
6081
+ return _chunkYHRS6XTBjs.isAstNode.call(void 0, node) && node.type === "Identifier" && typeof node.name === "string" && (node.name === "ctx" || node.name.endsWith("Ctx"));
6079
6082
  }
6080
6083
  function stringLiteralValue(node) {
6081
- if (!_chunkOQQOXSYAjs.isAstNode.call(void 0, node)) return null;
6084
+ if (!_chunkYHRS6XTBjs.isAstNode.call(void 0, node)) return null;
6082
6085
  if (node.type === "Literal" && typeof node.value === "string") {
6083
6086
  return node.value;
6084
6087
  }
@@ -6089,12 +6092,12 @@ function stringLiteralValue(node) {
6089
6092
  return null;
6090
6093
  }
6091
6094
  async function extractRunPlayStringTargets(sourceCode) {
6092
- const program = _chunkOQQOXSYAjs.parsePlaySourceForAnalysis.call(void 0, sourceCode);
6095
+ const program = _chunkYHRS6XTBjs.parsePlaySourceForAnalysis.call(void 0, sourceCode);
6093
6096
  if (!program) return await _asyncNullishCoalesce(await extractWithCompiler(sourceCode), async () => ( []));
6094
6097
  const targets = /* @__PURE__ */ new Set();
6095
6098
  const visit = (node) => {
6096
6099
  const callee = node.callee;
6097
- if (node.type === "CallExpression" && _chunkOQQOXSYAjs.isAstNode.call(void 0, callee) && callee.type === "MemberExpression" && callee.computed !== true && _chunkOQQOXSYAjs.isAstNode.call(void 0, callee.property) && RUN_PLAY_METHOD_NAMES.has(String(callee.property.name)) && isRunPlayReceiver(callee.object) && Array.isArray(node.arguments)) {
6100
+ if (node.type === "CallExpression" && _chunkYHRS6XTBjs.isAstNode.call(void 0, callee) && callee.type === "MemberExpression" && callee.computed !== true && _chunkYHRS6XTBjs.isAstNode.call(void 0, callee.property) && RUN_PLAY_METHOD_NAMES.has(String(callee.property.name)) && isRunPlayReceiver(callee.object) && Array.isArray(node.arguments)) {
6098
6101
  const playRef = stringLiteralValue(node.arguments[1]);
6099
6102
  const ownedName = playRef === null ? null : resolveOwnedPlayReferenceName(playRef);
6100
6103
  if (ownedName) targets.add(ownedName);
@@ -6102,7 +6105,7 @@ async function extractRunPlayStringTargets(sourceCode) {
6102
6105
  for (const [key, value] of Object.entries(node)) {
6103
6106
  if (key === "loc") continue;
6104
6107
  for (const child of Array.isArray(value) ? value : [value]) {
6105
- if (_chunkOQQOXSYAjs.isAstNode.call(void 0, child)) visit(child);
6108
+ if (_chunkYHRS6XTBjs.isAstNode.call(void 0, child)) visit(child);
6106
6109
  }
6107
6110
  }
6108
6111
  };
@@ -6968,7 +6971,7 @@ function renderOutcome(outcome) {
6968
6971
  function printResult2(input) {
6969
6972
  const failed = input.status === "failed" || input.status === "cancelled";
6970
6973
  if (failed) process.exitCode = 1;
6971
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
6974
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
6972
6975
  {
6973
6976
  deployment: { ...input.deployment, status: input.status },
6974
6977
  plays: input.outcomes,
@@ -6993,7 +6996,7 @@ async function handlePlaysDeploy(directory, options) {
6993
6996
  const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
6994
6997
  throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
6995
6998
  });
6996
- const { http, config } = _chunkAYM2KZN3js.getAuthedHttpClient.call(void 0, );
6999
+ const { http, config } = _chunkDD6MM6WXjs.getAuthedHttpClient.call(void 0, );
6997
7000
  const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
6998
7001
  const startDeployment = () => http.post("/api/v2/deployments", {
6999
7002
  deliveryId,
@@ -7020,7 +7023,7 @@ async function handlePlaysDeploy(directory, options) {
7020
7023
  },
7021
7024
  {
7022
7025
  bundle: bundleDeployPlayFile,
7023
- fetchImpl: _chunkHCYNAIHZjs.fetchWithDeploymentProtection,
7026
+ fetchImpl: _chunkQP5ATTMCjs.fetchWithDeploymentProtection,
7024
7027
  // The plays are already here: "opening" the source is naming it.
7025
7028
  openSource: async () => ({
7026
7029
  open: async () => ({ repoRoot: root })
@@ -7588,9 +7591,9 @@ function parseInputFlagValue(raw) {
7588
7591
  return raw;
7589
7592
  }
7590
7593
  function parsePlayRunOptions(args, initialInput = null) {
7591
- const selection = _chunkAYM2KZN3js.parseJsonFields.call(void 0, args, "run");
7594
+ const selection = _chunkDD6MM6WXjs.parseJsonFields.call(void 0, args, "run");
7592
7595
  args = selection.args;
7593
- const usage2 = "Usage: deepline plays run <play-name> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--json] [--full] [--<input> value]\n Runs use the Absurd CJS runtime.\n --header '<name>: <value>' may repeat; each is sent on every request for this run.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and ctx.dataset guidance.";
7596
+ const usage2 = "Usage: deepline plays run <play-name> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--json] [--full] [--<input> value]\n Runs use the Absurd CJS runtime.\n --header '<name>: <value>' may repeat; each is sent on every request for this run.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and deepline.dataset guidance.";
7594
7597
  let filePath = null;
7595
7598
  let playName = null;
7596
7599
  let input = initialInput === null ? null : structuredClone(initialInput);
@@ -7600,7 +7603,7 @@ function parsePlayRunOptions(args, initialInput = null) {
7600
7603
  let revisionSelector = null;
7601
7604
  const watch = !args.includes("--no-wait");
7602
7605
  const dryRun = args.includes("--dry-run");
7603
- let jsonOutput = dryRun ? _chunkAYM2KZN3js.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkAYM2KZN3js.argsWantJson.call(void 0, args);
7606
+ let jsonOutput = dryRun ? _chunkDD6MM6WXjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkDD6MM6WXjs.argsWantJson.call(void 0, args);
7604
7607
  const fullJson = args.includes("--full");
7605
7608
  const force = args.includes("--force");
7606
7609
  const forceToolRefresh = args.includes("--force-tool-refresh");
@@ -7663,7 +7666,7 @@ function parsePlayRunOptions(args, initialInput = null) {
7663
7666
  "--log-level requires one of: debug, info, warn, error."
7664
7667
  );
7665
7668
  }
7666
- const parsed = _chunkWGO2DY4Ljs.parseLogLevel.call(void 0, value);
7669
+ const parsed = _chunkM2VXDQI2js.parseLogLevel.call(void 0, value);
7667
7670
  if (!parsed) {
7668
7671
  throw new Error(
7669
7672
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -7700,7 +7703,7 @@ function parsePlayRunOptions(args, initialInput = null) {
7700
7703
  throw new Error("--profile requires an execution profile id.");
7701
7704
  }
7702
7705
  profile = value.trim();
7703
- _chunkOQQOXSYAjs.resolveEnabledExecutionProfile.call(void 0, profile);
7706
+ _chunkYHRS6XTBjs.resolveEnabledExecutionProfile.call(void 0, profile);
7704
7707
  index += 1;
7705
7708
  continue;
7706
7709
  }
@@ -7946,7 +7949,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
7946
7949
  if (dryRun && resolvedTarget.kind !== "file")
7947
7950
  throw new Error("--dry-run currently requires a local Play file.");
7948
7951
  const profile = _nullishCoalesce(_optionalChain([stringOption, 'call', _237 => _237(options.profile, "--profile"), 'optionalAccess', _238 => _238.trim, 'call', _239 => _239()]), () => ( base.profile));
7949
- if (profile !== null) _chunkOQQOXSYAjs.resolveEnabledExecutionProfile.call(void 0, profile);
7952
+ if (profile !== null) _chunkYHRS6XTBjs.resolveEnabledExecutionProfile.call(void 0, profile);
7950
7953
  const countOption = (value, flag) => {
7951
7954
  if (value === void 0) return void 0;
7952
7955
  if (!/^[1-9]\d*$/.test(value))
@@ -7981,7 +7984,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
7981
7984
  const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
7982
7985
  (arg) => arg === "--log-level" || arg.startsWith("--log-level=")
7983
7986
  );
7984
- let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkWGO2DY4Ljs.parseLogLevel.call(void 0, options.logLevel);
7987
+ let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkM2VXDQI2js.parseLogLevel.call(void 0, options.logLevel);
7985
7988
  if (!logLevel)
7986
7989
  throw new Error("--log-level requires one of: debug, info, warn, error.");
7987
7990
  const debugAlias = options.logs || options.debug === true || inputArgs.some(
@@ -7995,13 +7998,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
7995
7998
  if (debugAlias || debugMapLatency && logLevel === "info")
7996
7999
  logLevel = "debug";
7997
8000
  const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
7998
- const jsonFields = options.json === void 0 ? base.jsonFields : _chunkAYM2KZN3js.parseJsonFields.call(void 0,
7999
- [...fullJson ? ["--full"] : [], ..._chunkAYM2KZN3js.jsonFieldArgs.call(void 0, options.json)],
8001
+ const jsonFields = options.json === void 0 ? base.jsonFields : _chunkDD6MM6WXjs.parseJsonFields.call(void 0,
8002
+ [...fullJson ? ["--full"] : [], ..._chunkDD6MM6WXjs.jsonFieldArgs.call(void 0, options.json)],
8000
8003
  "run"
8001
8004
  ).fields;
8002
8005
  const watch = options.wait === false ? false : base.watch;
8003
8006
  const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
8004
- const jsonOutput = dryRun || !watch ? explicitJson || _chunkAYM2KZN3js.argsWantJson.call(void 0, []) : explicitJson;
8007
+ const jsonOutput = dryRun || !watch ? explicitJson || _chunkDD6MM6WXjs.argsWantJson.call(void 0, []) : explicitJson;
8005
8008
  const verboseLogs = Boolean(
8006
8009
  debugAlias || logLevel === "debug" || debugMapLatency
8007
8010
  );
@@ -8122,7 +8125,7 @@ async function checkLocalPlayGraph(input) {
8122
8125
  // src/cli/renderers/local-play-execution.ts
8123
8126
  function renderLocalPlayExecutionPlan(plan, options = {}) {
8124
8127
  if (options.dryRun) {
8125
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
8128
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
8126
8129
  return;
8127
8130
  }
8128
8131
  process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
@@ -8294,7 +8297,7 @@ function traceCliSync(phase, fields2, run) {
8294
8297
  const startedAt = Date.now();
8295
8298
  try {
8296
8299
  const result = run();
8297
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
8300
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
8298
8301
  phase,
8299
8302
  ms: Date.now() - startedAt,
8300
8303
  ok: true,
@@ -8302,7 +8305,7 @@ function traceCliSync(phase, fields2, run) {
8302
8305
  });
8303
8306
  return result;
8304
8307
  } catch (error) {
8305
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
8308
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
8306
8309
  phase,
8307
8310
  ms: Date.now() - startedAt,
8308
8311
  ok: false,
@@ -8649,7 +8652,7 @@ function buildReadonlyPrebuiltPlayError(reference) {
8649
8652
  `Cannot edit or push ${reference} because Deepline prebuilt plays are read-only.
8650
8653
  To make your own version:
8651
8654
  1. Run: deepline plays get ${reference} --source --out ./${localName}.play.ts
8652
- 2. Change definePlay('${localName}', ...) to a new play name you own.
8655
+ 2. Change its export const config = { name } to a new play name you own.
8653
8656
  3. Run: deepline plays check ./${localName}.play.ts
8654
8657
  4. Run: deepline plays publish ./${localName}.play.ts
8655
8658
  5. Your play will then live under your workspace namespace.`
@@ -8663,13 +8666,28 @@ async function ensureEditableRemotePlay(client, target) {
8663
8666
  }
8664
8667
  return detail;
8665
8668
  }
8669
+ function writeInlinePlay(code) {
8670
+ const filePath = _path.resolve.call(void 0, _chunkYHRS6XTBjs.INLINE_PLAY_FILE);
8671
+ const source = _chunkYHRS6XTBjs.inlinePlaySource.call(void 0, code);
8672
+ try {
8673
+ _fs.writeFileSync.call(void 0, filePath, source, { flag: "wx" });
8674
+ } catch (error) {
8675
+ if (error.code === "EEXIST") {
8676
+ throw new Error(
8677
+ `${filePath} already exists. Remove it, or run it with: deepline plays run ${filePath}`
8678
+ );
8679
+ }
8680
+ throw error;
8681
+ }
8682
+ return filePath;
8683
+ }
8666
8684
  function buildMissingDefinePlayError(filePath) {
8667
8685
  return new Error(
8668
- `Play file ${filePath} must export definePlay('play-name', async (...) => { ... }). Plain \`export default async function ...\` plays are no longer supported for SDK/CLI file-backed runs.`
8686
+ `Play file ${filePath} is not a play. Write the play as \`import deepline from 'deepline'; export default async function (input: T) { ... return { ... }; }\`.`
8669
8687
  );
8670
8688
  }
8671
8689
  function extractPlayName(code, filePath) {
8672
- const definedPlayName = _chunkOQQOXSYAjs.extractDefinedPlayName.call(void 0, code);
8690
+ const definedPlayName = _chunkYHRS6XTBjs.extractDefinedPlayName.call(void 0, code, filePath);
8673
8691
  if (definedPlayName) {
8674
8692
  return definedPlayName;
8675
8693
  }
@@ -8896,14 +8914,14 @@ var PlayBundleGraphError = class extends Error {
8896
8914
  };
8897
8915
  function unresolvedPackagedFilesMessage(node) {
8898
8916
  const details = node.unresolvedFileReferences.map((unresolved) => `${unresolved.sourceFragment}: ${unresolved.message}`).join("; ");
8899
- return `Failed to package local ctx.csv(...) files in ${node.filePath}: ${details}`;
8917
+ return `Failed to package local deepline.csv(...) files in ${node.filePath}: ${details}`;
8900
8918
  }
8901
- async function collectBundledPlayGraph(entryFile, profile = null, entryExportName = _chunkOQQOXSYAjs.PLAY_DEFAULT_EXPORT, options = {}) {
8919
+ async function collectBundledPlayGraph(entryFile, profile = null, entryExportName = _chunkYHRS6XTBjs.PLAY_DEFAULT_EXPORT, options = {}) {
8902
8920
  const playBundler = await loadPlayBundler();
8903
8921
  const nodes = /* @__PURE__ */ new Map();
8904
8922
  const diagnostics = [];
8905
8923
  const visited = /* @__PURE__ */ new Set();
8906
- const artifactKind = _chunkOQQOXSYAjs.resolveEnabledExecutionProfile.call(void 0, profile).artifactKind;
8924
+ const artifactKind = _chunkYHRS6XTBjs.resolveEnabledExecutionProfile.call(void 0, profile).artifactKind;
8907
8925
  const rootPath = normalizePlayPath(entryFile);
8908
8926
  const visit = async (filePath) => {
8909
8927
  const absolutePath = normalizePlayPath(filePath);
@@ -8912,7 +8930,7 @@ async function collectBundledPlayGraph(entryFile, profile = null, entryExportNam
8912
8930
  const bundleResult = await playBundler.bundlePlayFile(absolutePath, {
8913
8931
  target: artifactKind,
8914
8932
  ...options.cache === false ? { cache: false } : {},
8915
- ...absolutePath === rootPath && entryExportName !== _chunkOQQOXSYAjs.PLAY_DEFAULT_EXPORT ? { exportName: entryExportName } : {}
8933
+ ...absolutePath === rootPath && entryExportName !== _chunkYHRS6XTBjs.PLAY_DEFAULT_EXPORT ? { exportName: entryExportName } : {}
8916
8934
  });
8917
8935
  if (bundleResult.success === false) {
8918
8936
  diagnostics.push(
@@ -8987,19 +9005,9 @@ function requireCompilerManifest(node) {
8987
9005
  }
8988
9006
  return node.compilerManifest;
8989
9007
  }
8990
- function missingPlayDescriptionMessage(node) {
8991
- const playName = _nullishCoalesce(node.playName, () => ( extractPlayName(node.sourceCode, node.filePath)));
8992
- return [
8993
- `Play description is required for ${playName} (${node.filePath}).`,
8994
- "Add a top-level description to definePlay so agents and future play surfaces can explain what this play does.",
8995
- `Example: definePlay("${playName}", async (ctx, input) => { ... }, { description: "Look up company details from a domain." })`,
8996
- `Object form: definePlay({ id: "${playName}", description: "Look up company details from a domain.", input, run })`
8997
- ].join(" ");
8998
- }
8999
9008
  function collectPlayGraphAuthoringErrors(graph) {
9000
9009
  return [...graph.nodes.values()].flatMap((node) => [
9001
- ...node.unresolvedFileReferences.length > 0 ? [unresolvedPackagedFilesMessage(node)] : [],
9002
- ..._optionalChain([node, 'access', _271 => _271.playDescription, 'optionalAccess', _272 => _272.trim, 'call', _273 => _273()]) ? [] : [missingPlayDescriptionMessage(node)]
9010
+ ...node.unresolvedFileReferences.length > 0 ? [unresolvedPackagedFilesMessage(node)] : []
9003
9011
  ]);
9004
9012
  }
9005
9013
  function assertPlayGraphAuthoring(graph) {
@@ -9024,7 +9032,7 @@ async function publishImportedPlayDependencies(client, graph) {
9024
9032
  }
9025
9033
  if (!node.playName) {
9026
9034
  throw new Error(
9027
- `Imported play ${absolutePath} must export definePlay(...) so it can be published for runtime composition.`
9035
+ `Imported play ${absolutePath} must be a script play (import deepline from 'deepline') or default-export a play function so it can be published for runtime composition.`
9028
9036
  );
9029
9037
  }
9030
9038
  await client.registerPlayArtifact({
@@ -9052,7 +9060,7 @@ function formatTimestamp(value) {
9052
9060
  return date.toISOString();
9053
9061
  }
9054
9062
  function isoTimestamp(value) {
9055
- return _nullishCoalesce(_optionalChain([timestampDate, 'call', _274 => _274(value), 'optionalAccess', _275 => _275.toISOString, 'call', _276 => _276()]), () => ( null));
9063
+ return _nullishCoalesce(_optionalChain([timestampDate, 'call', _271 => _271(value), 'optionalAccess', _272 => _272.toISOString, 'call', _273 => _273()]), () => ( null));
9056
9064
  }
9057
9065
  function formatRunLine(run) {
9058
9066
  const credits = typeof run.billingTotalCredits === "number" && Number.isFinite(run.billingTotalCredits) ? `${formatCreditAmount2(run.billingTotalCredits)} credits` : "\u2014";
@@ -9060,7 +9068,7 @@ function formatRunLine(run) {
9060
9068
  }
9061
9069
  function playStatusErrorText(status) {
9062
9070
  const chunks = [];
9063
- const progressError = _optionalChain([status, 'access', _277 => _277.progress, 'optionalAccess', _278 => _278.error]);
9071
+ const progressError = _optionalChain([status, 'access', _274 => _274.progress, 'optionalAccess', _275 => _275.error]);
9064
9072
  if (typeof progressError === "string" && progressError.trim()) {
9065
9073
  chunks.push(progressError.trim());
9066
9074
  }
@@ -9086,7 +9094,7 @@ function playStatusErrorText(status) {
9086
9094
  function isRetryablePendingStartFailure(status) {
9087
9095
  if (status.status !== "failed") return false;
9088
9096
  if (status.runId && status.runId !== "pending") return false;
9089
- return _chunkWGO2DY4Ljs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
9097
+ return _chunkM2VXDQI2js.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
9090
9098
  }
9091
9099
  function isAmbiguousPlayStartOutcomeError(error) {
9092
9100
  if (error instanceof _chunkPPDBRJRWjs.DeeplineError && typeof error.statusCode === "number") {
@@ -9135,13 +9143,13 @@ var PlayStartOutcomeUnknownError = (_class = class extends _chunkPPDBRJRWjs.Deep
9135
9143
  }, _class);
9136
9144
  function watchSurfaceReaches(state, provenance, level) {
9137
9145
  const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
9138
- if (!_chunkWGO2DY4Ljs.logLevelReaches.call(void 0, level, minimumLevel)) {
9146
+ if (!_chunkM2VXDQI2js.logLevelReaches.call(void 0, level, minimumLevel)) {
9139
9147
  return false;
9140
9148
  }
9141
- if (_chunkWGO2DY4Ljs.logProvenanceReaches.call(void 0, provenance, "watch")) {
9149
+ if (_chunkM2VXDQI2js.logProvenanceReaches.call(void 0, provenance, "watch")) {
9142
9150
  return true;
9143
9151
  }
9144
- return state.verbose === true && _chunkWGO2DY4Ljs.logProvenanceReaches.call(void 0, provenance, "debug");
9152
+ return state.verbose === true && _chunkM2VXDQI2js.logProvenanceReaches.call(void 0, provenance, "debug");
9145
9153
  }
9146
9154
  function getEventPayload(event) {
9147
9155
  return event.payload && typeof event.payload === "object" ? event.payload : {};
@@ -9164,7 +9172,7 @@ function getRunIdFromLiveEvent(event) {
9164
9172
  if (typeof directRunId === "string" && directRunId.trim()) {
9165
9173
  return directRunId;
9166
9174
  }
9167
- const packageRunId = _optionalChain([getRunRecordFromPackage, 'call', _279 => _279(payload), 'optionalAccess', _280 => _280.id]);
9175
+ const packageRunId = _optionalChain([getRunRecordFromPackage, 'call', _276 => _276(payload), 'optionalAccess', _277 => _277.id]);
9168
9176
  return typeof packageRunId === "string" && packageRunId.trim() ? packageRunId : null;
9169
9177
  }
9170
9178
  function eventConfirmsPlayRunLaunch(event) {
@@ -9185,19 +9193,19 @@ function getStatusFromLiveEvent(event) {
9185
9193
  return null;
9186
9194
  }
9187
9195
  const payload = getEventPayload(event);
9188
- return _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([getRunRecordFromPackage, 'call', _281 => _281(payload), 'optionalAccess', _282 => _282.status]))));
9196
+ return _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([getRunRecordFromPackage, 'call', _278 => _278(payload), 'optionalAccess', _279 => _279.status]))));
9189
9197
  }
9190
9198
  function readLiveRunField(event, field) {
9191
9199
  const payload = getEventPayload(event);
9192
9200
  if (field === "waitKind") {
9193
- const wait = _nullishCoalesce(payload.wait, () => ( _optionalChain([getRunRecordFromPackage, 'call', _283 => _283(payload), 'optionalAccess', _284 => _284.wait])));
9201
+ const wait = _nullishCoalesce(payload.wait, () => ( _optionalChain([getRunRecordFromPackage, 'call', _280 => _280(payload), 'optionalAccess', _281 => _281.wait])));
9194
9202
  if (wait && typeof wait === "object" && !Array.isArray(wait)) {
9195
9203
  const kind = wait.kind;
9196
9204
  if (typeof kind === "string" && kind.trim()) return kind.trim();
9197
9205
  }
9198
9206
  }
9199
9207
  const run = getRunRecordFromPackage(payload);
9200
- const records = [payload, payload.progress, run, _optionalChain([run, 'optionalAccess', _285 => _285.progress])].filter(
9208
+ const records = [payload, payload.progress, run, _optionalChain([run, 'optionalAccess', _282 => _282.progress])].filter(
9201
9209
  (value) => Boolean(value && typeof value === "object" && !Array.isArray(value))
9202
9210
  );
9203
9211
  for (const record3 of records) {
@@ -9212,7 +9220,7 @@ function getLiveRunStringField(event, field) {
9212
9220
  function getLiveRunActivity(event) {
9213
9221
  const payload = getEventPayload(event);
9214
9222
  const run = getRunRecordFromPackage(payload);
9215
- const candidates = [payload.activity, _optionalChain([run, 'optionalAccess', _286 => _286.activity])];
9223
+ const candidates = [payload.activity, _optionalChain([run, 'optionalAccess', _283 => _283.activity])];
9216
9224
  for (const candidate of candidates) {
9217
9225
  if (candidate && typeof candidate === "object" && !Array.isArray(candidate) && typeof candidate.summary === "string" && candidate.observation && typeof candidate.observation === "object") {
9218
9226
  return candidate;
@@ -9227,20 +9235,20 @@ function getRunLifecycleHint(input) {
9227
9235
  return null;
9228
9236
  }
9229
9237
  const activity = getLiveRunActivity(input.event);
9230
- const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _287 => _287.observation, 'access', _288 => _288.state, 'access', _289 => _289.kind]) === "active" && activity.observation.target.kind !== "runner";
9238
+ const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _284 => _284.observation, 'access', _285 => _285.state, 'access', _286 => _286.kind]) === "active" && activity.observation.target.kind !== "runner";
9231
9239
  const inspect = `'deepline runs get ${runId} --full'`;
9232
- const sleepState = _optionalChain([activity, 'optionalAccess', _290 => _290.observation, 'access', _291 => _291.state, 'access', _292 => _292.kind]) === "scheduled" && activity.observation.state.reason === "sleep" ? activity.observation.state : null;
9240
+ const sleepState = _optionalChain([activity, 'optionalAccess', _287 => _287.observation, 'access', _288 => _288.state, 'access', _289 => _289.kind]) === "scheduled" && activity.observation.state.reason === "sleep" ? activity.observation.state : null;
9233
9241
  if (status === "waiting" && (sleepState !== null || getLiveRunStringField(input.event, "waitKind") === "sleep")) {
9234
9242
  const recordedWake = readLiveRunField(input.event, "waitUntil");
9235
9243
  const projectedWake = sleepState && sleepState.resumeAt > activity.observation.observedAt ? sleepState.resumeAt : null;
9236
9244
  const resumeAt = _nullishCoalesce(projectedWake, () => ( (typeof recordedWake === "number" && Number.isFinite(recordedWake) ? recordedWake : null)));
9237
9245
  return {
9238
9246
  signature: [runId, status, "sleep", _nullishCoalesce(resumeAt, () => ( ""))].join(":"),
9239
- line: `[play waiting] ${runId} is ${describeSleepUntil(resumeAt)} (ctx.sleep). The command will continue watching; inspect it with ${inspect}.`
9247
+ line: `[play waiting] ${runId} is ${describeSleepUntil(resumeAt)} (deepline.sleep). The command will continue watching; inspect it with ${inspect}.`
9240
9248
  };
9241
9249
  }
9242
9250
  const typedEventWaitKind = getLiveRunStringField(input.event, "waitKind");
9243
- const activityEventWait = _optionalChain([activity, 'optionalAccess', _293 => _293.observation, 'access', _294 => _294.state, 'access', _295 => _295.kind]) === "waiting" && activity.observation.state.reason.kind === "external_event";
9251
+ const activityEventWait = _optionalChain([activity, 'optionalAccess', _290 => _290.observation, 'access', _291 => _291.state, 'access', _292 => _292.kind]) === "waiting" && activity.observation.state.reason.kind === "external_event";
9244
9252
  if (status === "waiting" && (typedEventWaitKind === "integration_event" || typedEventWaitKind === "integration_event_batch" || activityEventWait)) {
9245
9253
  return {
9246
9254
  signature: [
@@ -9313,12 +9321,12 @@ function getFinalStatusFromLiveEvent(event) {
9313
9321
  }
9314
9322
  const payload = getEventPayload(event);
9315
9323
  const packageRun = getRunRecordFromPackage(payload);
9316
- const status = _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([packageRun, 'optionalAccess', _296 => _296.status]))));
9324
+ const status = _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([packageRun, 'optionalAccess', _293 => _293.status]))));
9317
9325
  if (status !== "completed" && status !== "failed" && status !== "cancelled") {
9318
9326
  return null;
9319
9327
  }
9320
- const runId = typeof payload.runId === "string" ? payload.runId : typeof _optionalChain([packageRun, 'optionalAccess', _297 => _297.id]) === "string" ? packageRun.id : "";
9321
- const error = typeof payload.error === "string" ? payload.error : typeof _optionalChain([packageRun, 'optionalAccess', _298 => _298.error]) === "string" ? packageRun.error : void 0;
9328
+ const runId = typeof payload.runId === "string" ? payload.runId : typeof _optionalChain([packageRun, 'optionalAccess', _294 => _294.id]) === "string" ? packageRun.id : "";
9329
+ const error = typeof payload.error === "string" ? payload.error : typeof _optionalChain([packageRun, 'optionalAccess', _295 => _295.error]) === "string" ? packageRun.error : void 0;
9322
9330
  return {
9323
9331
  ...payload,
9324
9332
  runId,
@@ -9377,7 +9385,7 @@ function emitLiveDebugTableHints(input) {
9377
9385
  }
9378
9386
  input.state.emittedDebugKeys.add(tableKey);
9379
9387
  input.progress.writeLine(
9380
- `Possible dataset table ${tableNamespace}: created only after this ctx.dataset(...).run(...) executes. Inspect returned datasets with ${buildRunInspectCommand(input.runId)}`,
9388
+ `Possible dataset table ${tableNamespace}: created only after this deepline.dataset(...).run(...) executes. Inspect returned datasets with ${buildRunInspectCommand(input.runId)}`,
9381
9389
  process.stdout
9382
9390
  );
9383
9391
  }
@@ -9553,7 +9561,7 @@ function getProgressLinesFromLiveEvent(event) {
9553
9561
  (count2) => typeof count2 === "number" && Number.isSafeInteger(count2) && count2 >= 0
9554
9562
  )) {
9555
9563
  lines.push(
9556
- `progress calls: ${formatInteger(callCounts[0])} logical, ${formatInteger(callCounts[1])} provider requests, ${formatInteger(callCounts[2])} provider 429s${_optionalChain([calls, 'optionalAccess', _299 => _299.confirmed]) === true ? "" : " (observed)"}`
9564
+ `progress calls: ${formatInteger(callCounts[0])} logical, ${formatInteger(callCounts[1])} provider requests, ${formatInteger(callCounts[2])} provider 429s${_optionalChain([calls, 'optionalAccess', _296 => _296.confirmed]) === true ? "" : " (observed)"}`
9557
9565
  );
9558
9566
  }
9559
9567
  const rowOutcomes = readRowOutcomeSummary({
@@ -9604,7 +9612,7 @@ function getRunningHeartbeatLine(input) {
9604
9612
  return null;
9605
9613
  }
9606
9614
  const activity = getLiveRunActivity(input.event);
9607
- const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _300 => _300.observation, 'access', _301 => _301.state, 'access', _302 => _302.kind]) === "active" && activity.observation.target.kind !== "runner";
9615
+ const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _297 => _297.observation, 'access', _298 => _298.state, 'access', _299 => _299.kind]) === "active" && activity.observation.target.kind !== "runner";
9608
9616
  if (activity && activity.classified !== false && !activityConflictsWithDurableWait) {
9609
9617
  return `activity ${input.playName}: ${activity.summary}`;
9610
9618
  }
@@ -9637,13 +9645,13 @@ function printPlayStatusHeartbeat(input) {
9637
9645
  input.progress.writeLine(line);
9638
9646
  }
9639
9647
  function resolveRunPlayName(status, runId) {
9640
- const packaged = _optionalChain([status, 'access', _303 => _303.package, 'optionalAccess', _304 => _304.run, 'optionalAccess', _305 => _305.playName]);
9648
+ const packaged = _optionalChain([status, 'access', _300 => _300.package, 'optionalAccess', _301 => _301.run, 'optionalAccess', _302 => _302.playName]);
9641
9649
  if (typeof packaged === "string" && packaged.trim()) return packaged.trim();
9642
- return _nullishCoalesce(_nullishCoalesce(extractRunPlayName(status), () => ( _optionalChain([/^play\/(.+)\/(?:run|webhook)\//, 'access', _306 => _306.exec, 'call', _307 => _307(runId), 'optionalAccess', _308 => _308[1]]))), () => ( null));
9650
+ return _nullishCoalesce(_nullishCoalesce(extractRunPlayName(status), () => ( _optionalChain([/^play\/(.+)\/(?:run|webhook)\//, 'access', _303 => _303.exec, 'call', _304 => _304(runId), 'optionalAccess', _305 => _305[1]]))), () => ( null));
9643
9651
  }
9644
9652
  function openPlayDashboard(dashboardUrl, open2) {
9645
9653
  if (open2 && dashboardUrl) {
9646
- _chunkAYM2KZN3js.openInBrowser.call(void 0, dashboardUrl);
9654
+ _chunkDD6MM6WXjs.openInBrowser.call(void 0, dashboardUrl);
9647
9655
  }
9648
9656
  }
9649
9657
  function printPlayLogLines(input) {
@@ -9695,7 +9703,7 @@ async function waitForPlayCompletionByWatch(input) {
9695
9703
  const confirmAdmission = async () => {
9696
9704
  if (admissionConfirmed) return;
9697
9705
  admissionConfirmed = true;
9698
- await _optionalChain([input, 'access', _309 => _309.onRunAdmitted, 'optionalCall', _310 => _310(input.workflowId)]);
9706
+ await _optionalChain([input, 'access', _306 => _306.onRunAdmitted, 'optionalCall', _307 => _307(input.workflowId)]);
9699
9707
  };
9700
9708
  const withDashboardUrl = (status) => input.dashboardUrl ? { ...status, dashboardUrl: input.dashboardUrl } : status;
9701
9709
  const finishTerminalStatus = async (status) => {
@@ -9720,7 +9728,7 @@ async function waitForPlayCompletionByWatch(input) {
9720
9728
  ...input.fullJson === void 0 ? {} : { full: input.fullJson }
9721
9729
  });
9722
9730
  } catch (error) {
9723
- if (_chunkWGO2DY4Ljs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
9731
+ if (_chunkM2VXDQI2js.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
9724
9732
  return null;
9725
9733
  }
9726
9734
  throw error;
@@ -9800,9 +9808,9 @@ async function waitForPlayCompletionByWatch(input) {
9800
9808
  signal: controller.signal,
9801
9809
  deferLogs: !input.emitLogs,
9802
9810
  omitTerminalLogs: !input.emitLogs,
9803
- ..._chunk2LVM22ZUjs.isCliTraceEnabled.call(void 0, ) ? {
9811
+ ..._chunkLSZZVHQPjs.isCliTraceEnabled.call(void 0, ) ? {
9804
9812
  onPoll: (observation) => {
9805
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
9813
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
9806
9814
  phase: "play_watch_poll",
9807
9815
  workflowId: input.workflowId,
9808
9816
  ms: observation.durationMs,
@@ -9816,7 +9824,7 @@ async function waitForPlayCompletionByWatch(input) {
9816
9824
  full: input.fullJson,
9817
9825
  billing: false,
9818
9826
  onStatus: async (status) => {
9819
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
9827
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
9820
9828
  phase: "play_watch_terminal_status",
9821
9829
  workflowId: input.workflowId,
9822
9830
  full: input.fullJson === true
@@ -9886,7 +9894,7 @@ async function startAndWaitForPlayCompletion(input) {
9886
9894
  });
9887
9895
  } catch (error) {
9888
9896
  if (!(error instanceof _chunk2H4EY7KHjs.CliPlayAdmissionUnsupportedError)) throw error;
9889
- await _chunkUQQRMCOLjs.checkPlayRunCompatibility.call(void 0,
9897
+ await _chunkUTF57UBWjs.checkPlayRunCompatibility.call(void 0,
9890
9898
  input.client.baseUrl,
9891
9899
  input.maintenancePolicy
9892
9900
  );
@@ -9917,9 +9925,9 @@ async function startAndWaitForPlayCompletion(input) {
9917
9925
  "PLAY_START_MISSING_RUN_ID"
9918
9926
  );
9919
9927
  }
9920
- await _optionalChain([input, 'access', _311 => _311.onRunStarted, 'optionalCall', _312 => _312(workflowId)]);
9921
- await _optionalChain([input, 'access', _313 => _313.onRunAdmitted, 'optionalCall', _314 => _314(workflowId)]);
9922
- const dashboardUrl = _nullishCoalesce(started.dashboardUrl, () => ( _chunkBQR6UN3Cjs.buildPlayDashboardUrl.call(void 0, input.client.baseUrl, input.playName)));
9928
+ await _optionalChain([input, 'access', _308 => _308.onRunStarted, 'optionalCall', _309 => _309(workflowId)]);
9929
+ await _optionalChain([input, 'access', _310 => _310.onRunAdmitted, 'optionalCall', _311 => _311(workflowId)]);
9930
+ const dashboardUrl = _nullishCoalesce(started.dashboardUrl, () => ( _chunkVUYUI35Qjs.buildPlayDashboardUrl.call(void 0, input.client.baseUrl, input.playName)));
9923
9931
  if (!input.jsonOutput) {
9924
9932
  writeStartedPlayRun({
9925
9933
  runId: workflowId,
@@ -9932,7 +9940,7 @@ async function startAndWaitForPlayCompletion(input) {
9932
9940
  }
9933
9941
  openPlayDashboard(dashboardUrl, _nullishCoalesce(input.open, () => ( false)));
9934
9942
  input.progress.phase("running");
9935
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
9943
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
9936
9944
  phase: "cli.play_start_admitted",
9937
9945
  ms: Date.now() - startedAt,
9938
9946
  ok: true,
@@ -9941,15 +9949,15 @@ async function startAndWaitForPlayCompletion(input) {
9941
9949
  inlineCompatibility
9942
9950
  });
9943
9951
  const initialTerminal = readRecord(started.finalStatus);
9944
- const initialPackage = _nullishCoalesce(readRecord(_optionalChain([initialTerminal, 'optionalAccess', _315 => _315.package])), () => ( initialTerminal));
9945
- const initialRun = readRecord(_optionalChain([initialPackage, 'optionalAccess', _316 => _316.run]));
9946
- if (initialTerminal && _optionalChain([initialRun, 'optionalAccess', _317 => _317.id]) === workflowId && initialRun.status === "completed" && (initialTerminal.runId === void 0 || initialTerminal.runId === workflowId) && (initialTerminal.status === void 0 || initialTerminal.status === "completed") && input.fullJson === true && started.finalStatusView === "full") {
9952
+ const initialPackage = _nullishCoalesce(readRecord(_optionalChain([initialTerminal, 'optionalAccess', _312 => _312.package])), () => ( initialTerminal));
9953
+ const initialRun = readRecord(_optionalChain([initialPackage, 'optionalAccess', _313 => _313.run]));
9954
+ if (initialTerminal && _optionalChain([initialRun, 'optionalAccess', _314 => _314.id]) === workflowId && initialRun.status === "completed" && (initialTerminal.runId === void 0 || initialTerminal.runId === workflowId) && (initialTerminal.status === void 0 || initialTerminal.status === "completed") && input.fullJson === true && started.finalStatusView === "full") {
9947
9955
  assertPlayWaitNotTimedOut({
9948
9956
  workflowId,
9949
9957
  startedAt,
9950
9958
  waitTimeoutMs: input.waitTimeoutMs
9951
9959
  });
9952
- const initialStatus = _chunkWGO2DY4Ljs.normalizePlayStatus.call(void 0, initialTerminal);
9960
+ const initialStatus = _chunkM2VXDQI2js.normalizePlayStatus.call(void 0, initialTerminal);
9953
9961
  const status2 = await resolvePlayRunOutputStatus({
9954
9962
  client: input.client,
9955
9963
  status: initialStatus,
@@ -9957,7 +9965,7 @@ async function startAndWaitForPlayCompletion(input) {
9957
9965
  jsonOutput: input.jsonOutput,
9958
9966
  fromDurableStatus: true
9959
9967
  });
9960
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
9968
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
9961
9969
  phase: "play_watch_terminal_status",
9962
9970
  workflowId,
9963
9971
  full: true,
@@ -10001,7 +10009,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
10001
10009
  status = await startAndWaitForPlayCompletionByStreamOnce(pinnedInput);
10002
10010
  } catch (error) {
10003
10011
  if (error instanceof _chunk2H4EY7KHjs.CliPlayAdmissionUnsupportedError && input.cliAdmission) {
10004
- await _chunkUQQRMCOLjs.checkPlayRunCompatibility.call(void 0,
10012
+ await _chunkUTF57UBWjs.checkPlayRunCompatibility.call(void 0,
10005
10013
  input.client.baseUrl,
10006
10014
  input.maintenancePolicy
10007
10015
  );
@@ -10028,7 +10036,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
10028
10036
  `[play watch] start response was ambiguous; retrying the same caller intent (${error.message})`
10029
10037
  );
10030
10038
  }
10031
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
10039
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
10032
10040
  phase: "cli.play_start_stream_retry",
10033
10041
  ms: 0,
10034
10042
  ok: true,
@@ -10049,7 +10057,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
10049
10057
  `[play watch] start failed before run id with a transient error; retrying (${playStatusErrorText(status)})`
10050
10058
  );
10051
10059
  }
10052
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
10060
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
10053
10061
  phase: "cli.play_start_stream_retry",
10054
10062
  ms: 0,
10055
10063
  ok: true,
@@ -10067,7 +10075,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
10067
10075
  }
10068
10076
  async function startAndWaitForPlayCompletionByStreamOnce(input) {
10069
10077
  const startedAt = Date.now();
10070
- const dashboardUrl = _chunkBQR6UN3Cjs.buildPlayDashboardUrl.call(void 0,
10078
+ const dashboardUrl = _chunkVUYUI35Qjs.buildPlayDashboardUrl.call(void 0,
10071
10079
  input.client.baseUrl,
10072
10080
  input.playName
10073
10081
  );
@@ -10083,7 +10091,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10083
10091
  let timedOut = false;
10084
10092
  let emittedDashboardUrl = false;
10085
10093
  let lastKnownWorkflowId = "";
10086
- let launchedRevisionId = _optionalChain([input, 'access', _318 => _318.request, 'access', _319 => _319.revisionId, 'optionalAccess', _320 => _320.trim, 'call', _321 => _321()]) || null;
10094
+ let launchedRevisionId = _optionalChain([input, 'access', _315 => _315.request, 'access', _316 => _316.revisionId, 'optionalAccess', _317 => _317.trim, 'call', _318 => _318()]) || null;
10087
10095
  let eventCount = 0;
10088
10096
  let firstRunIdMs = null;
10089
10097
  let launchConfirmed = false;
@@ -10092,8 +10100,8 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10092
10100
  const confirmAdmission = async (runId) => {
10093
10101
  if (launchConfirmed || !runId || runId === "pending") return;
10094
10102
  launchConfirmed = true;
10095
- await _optionalChain([input, 'access', _322 => _322.onRunAdmitted, 'optionalCall', _323 => _323(runId)]);
10096
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
10103
+ await _optionalChain([input, 'access', _319 => _319.onRunAdmitted, 'optionalCall', _320 => _320(runId)]);
10104
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
10097
10105
  phase: "cli.play_start_admitted",
10098
10106
  ms: Date.now() - startedAt,
10099
10107
  ok: true,
@@ -10127,7 +10135,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10127
10135
  full: input.fullJson
10128
10136
  });
10129
10137
  } catch (error) {
10130
- if (_chunkWGO2DY4Ljs.isTransientPlayRunReadError.call(void 0, error)) {
10138
+ if (_chunkM2VXDQI2js.isTransientPlayRunReadError.call(void 0, error)) {
10131
10139
  return null;
10132
10140
  }
10133
10141
  throw error;
@@ -10159,7 +10167,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10159
10167
  lastKnownWorkflowId = eventRunId;
10160
10168
  firstRunIdMs ??= Date.now() - startedAt;
10161
10169
  if (runStartedNow) {
10162
- await _optionalChain([input, 'access', _324 => _324.onRunStarted, 'optionalCall', _325 => _325(eventRunId)]);
10170
+ await _optionalChain([input, 'access', _321 => _321.onRunStarted, 'optionalCall', _322 => _322(eventRunId)]);
10163
10171
  }
10164
10172
  }
10165
10173
  if (!launchConfirmed && eventConfirmsPlayRunLaunch(event) && eventRunId === lastKnownWorkflowId) {
@@ -10260,7 +10268,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10260
10268
  };
10261
10269
  }
10262
10270
  if (!canonicalTerminal) {
10263
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
10271
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
10264
10272
  phase: "cli.play_start_stream_stale_terminal_ignored",
10265
10273
  ms: Date.now() - startedAt,
10266
10274
  ok: true,
@@ -10281,14 +10289,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10281
10289
  fromDurableStatus
10282
10290
  }) : canonicalTerminal;
10283
10291
  if (input.fullJson === true) {
10284
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
10292
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
10285
10293
  phase: "play_watch_terminal_status",
10286
10294
  workflowId: outputTerminal.runId || lastKnownWorkflowId || void 0,
10287
10295
  full: true,
10288
10296
  source: outputTerminal === canonicalTerminal ? fromDurableStatus ? "start_stream_durable" : "start_stream" : "durable_repair"
10289
10297
  });
10290
10298
  }
10291
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
10299
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
10292
10300
  phase: "cli.play_start_stream_terminal",
10293
10301
  ms: Date.now() - startedAt,
10294
10302
  ok: true,
@@ -10308,7 +10316,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10308
10316
  clearTimeout(timeout);
10309
10317
  }
10310
10318
  controller.abort();
10311
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
10319
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
10312
10320
  phase: "cli.play_start_stream_handoff_to_tail",
10313
10321
  ms: Date.now() - startedAt,
10314
10322
  ok: true,
@@ -10339,7 +10347,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10339
10347
  if (timedOut) {
10340
10348
  const terminal = await fetchKnownTerminalStatus();
10341
10349
  if (terminal) {
10342
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
10350
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
10343
10351
  phase: "cli.play_start_stream_timeout_status_reconcile",
10344
10352
  ms: Date.now() - startedAt,
10345
10353
  ok: true,
@@ -10359,7 +10367,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10359
10367
  lastPhase
10360
10368
  });
10361
10369
  }
10362
- if (lastKnownWorkflowId && (terminalWindowExpired || _chunkWGO2DY4Ljs.isTransientPlayRunReadError.call(void 0, error))) {
10370
+ if (lastKnownWorkflowId && (terminalWindowExpired || _chunkM2VXDQI2js.isTransientPlayRunReadError.call(void 0, error))) {
10363
10371
  if (timeout) {
10364
10372
  clearTimeout(timeout);
10365
10373
  }
@@ -10370,7 +10378,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10370
10378
  `
10371
10379
  );
10372
10380
  }
10373
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
10381
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
10374
10382
  phase: "cli.play_start_stream_reconnect",
10375
10383
  ms: Date.now() - startedAt,
10376
10384
  ok: true,
@@ -10397,7 +10405,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10397
10405
  });
10398
10406
  }
10399
10407
  if (!lastKnownWorkflowId && isAmbiguousPlayStartOutcomeError(error)) {
10400
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
10408
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
10401
10409
  phase: "cli.play_start_stream_transient_failure",
10402
10410
  ms: Date.now() - startedAt,
10403
10411
  ok: false,
@@ -10425,7 +10433,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10425
10433
  `[play watch] start stream ended after run ${lastKnownWorkflowId}; reconnecting to canonical run stream`
10426
10434
  );
10427
10435
  }
10428
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
10436
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
10429
10437
  phase: "cli.play_start_stream_reconnect",
10430
10438
  ms: Date.now() - startedAt,
10431
10439
  ok: true,
@@ -10505,29 +10513,29 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
10505
10513
  "logs"
10506
10514
  ]);
10507
10515
  function formatPlayLogLine(rawLine, state) {
10508
- const classified = _chunkWGO2DY4Ljs.classifyLogLine.call(void 0, rawLine);
10516
+ const classified = _chunkM2VXDQI2js.classifyLogLine.call(void 0, rawLine);
10509
10517
  const line = classified.line;
10510
10518
  const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
10511
- const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _326 => _326[1]]) ? new Date(timestampMatch[1]) : null;
10519
+ const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _323 => _323[1]]) ? new Date(timestampMatch[1]) : null;
10512
10520
  const timestamp = parsedTimestamp && !Number.isNaN(parsedTimestamp.getTime()) ? parsedTimestamp.toLocaleTimeString("en-US", {
10513
10521
  hour12: false,
10514
10522
  hour: "2-digit",
10515
10523
  minute: "2-digit",
10516
10524
  second: "2-digit"
10517
10525
  }) : null;
10518
- const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _327 => _327[2]]), () => ( line));
10526
+ const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _324 => _324[2]]), () => ( line));
10519
10527
  const prefix = timestamp ? `${timestamp} ` : "";
10520
10528
  if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
10521
10529
  const providerWait = formatProviderCapacityWaitLogLine(line);
10522
10530
  if (providerWait && !state.verbose) {
10523
- return _chunkWGO2DY4Ljs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
10531
+ return _chunkM2VXDQI2js.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
10524
10532
  }
10525
10533
  const mapProgress = formatMapProgressDiagnosticLogLine(line);
10526
10534
  if (mapProgress && !state.verbose) {
10527
- return _chunkWGO2DY4Ljs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
10535
+ return _chunkM2VXDQI2js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
10528
10536
  }
10529
10537
  if (/\[worker\] picked up run\b/.test(message)) {
10530
- if (!_chunkWGO2DY4Ljs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10538
+ if (!_chunkM2VXDQI2js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10531
10539
  return null;
10532
10540
  }
10533
10541
  if (state.emittedRunnerStarted) {
@@ -10540,7 +10548,7 @@ function formatPlayLogLine(rawLine, state) {
10540
10548
  /^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
10541
10549
  );
10542
10550
  if (mapStart) {
10543
- if (!_chunkWGO2DY4Ljs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10551
+ if (!_chunkM2VXDQI2js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10544
10552
  return null;
10545
10553
  }
10546
10554
  const [, rows, fields2, namespace, cached, pending] = mapStart;
@@ -10550,7 +10558,7 @@ function formatPlayLogLine(rawLine, state) {
10550
10558
  /^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
10551
10559
  );
10552
10560
  if (mapDone) {
10553
- if (!_chunkWGO2DY4Ljs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10561
+ if (!_chunkM2VXDQI2js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10554
10562
  return null;
10555
10563
  }
10556
10564
  const [, results, executed, cached] = mapDone;
@@ -10732,20 +10740,20 @@ function collectDatasetHandleLines(value, path = "result") {
10732
10740
  function buildRunWarnings(status, rowsInfo) {
10733
10741
  const rowOutcomes = readRowOutcomeSummary(status);
10734
10742
  const result = readRecord(status.result);
10735
- const metadata = readRecord(_optionalChain([result, 'optionalAccess', _328 => _328._metadata]));
10736
- const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess', _329 => _329.outputWarnings])) ? metadata.outputWarnings.map((warning) => readRecord(warning)).filter((warning) => {
10743
+ const metadata = readRecord(_optionalChain([result, 'optionalAccess', _325 => _325._metadata]));
10744
+ const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess', _326 => _326.outputWarnings])) ? metadata.outputWarnings.map((warning) => readRecord(warning)).filter((warning) => {
10737
10745
  if (!warning) return false;
10738
10746
  return !(rowsInfo && !rowsInfo.complete && warning.reason === "array_preview_limit" && warning.originalItems === rowsInfo.totalRows && warning.retainedItems === rowsInfo.rows.length);
10739
- }).map((warning) => _optionalChain([warning, 'optionalAccess', _330 => _330.message])).filter(
10747
+ }).map((warning) => _optionalChain([warning, 'optionalAccess', _327 => _327.message])).filter(
10740
10748
  (message) => typeof message === "string" && message.trim().length > 0
10741
10749
  ).slice(0, 16) : [];
10742
- const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _331 => _331.hasRowFailures]) ? [
10750
+ const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _328 => _328.hasRowFailures]) ? [
10743
10751
  `${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.`
10744
10752
  ] : [];
10745
- const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _332 => _332.supersededRows]), () => ( 0))) > 0 ? [
10753
+ const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _329 => _329.supersededRows]), () => ( 0))) > 0 ? [
10746
10754
  `Latest-write-wins: ${formatSupersededRowsNotice(_nullishCoalesce(rowOutcomes.supersededRows, () => ( 0)))}; the newer write still owns that Runtime Sheet row.`
10747
10755
  ] : [];
10748
- if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _333 => _333.totalRows]) === 0) {
10756
+ if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _330 => _330.totalRows]) === 0) {
10749
10757
  return [
10750
10758
  ...rowOutcomeWarnings,
10751
10759
  ...supersededRowNotices,
@@ -10764,7 +10772,7 @@ function buildRunWarnings(status, rowsInfo) {
10764
10772
  return [...rowOutcomeWarnings, ...supersededRowNotices, ...outputWarnings];
10765
10773
  }
10766
10774
  function buildRunNextCommands(status) {
10767
- const runId = _optionalChain([status, 'access', _334 => _334.runId, 'optionalAccess', _335 => _335.trim, 'call', _336 => _336()]);
10775
+ const runId = _optionalChain([status, 'access', _331 => _331.runId, 'optionalAccess', _332 => _332.trim, 'call', _333 => _333()]);
10768
10776
  if (!runId) {
10769
10777
  const playName = extractRunPlayName(status);
10770
10778
  return playName ? {
@@ -10915,14 +10923,14 @@ function extractToolIdFromErrorText(text) {
10915
10923
  return null;
10916
10924
  }
10917
10925
  const lowerToolMatch = /\btool\s+([A-Za-z0-9_.:-]+)\s+\d{3}\b/.exec(text);
10918
- if (_optionalChain([lowerToolMatch, 'optionalAccess', _337 => _337[1]])) {
10926
+ if (_optionalChain([lowerToolMatch, 'optionalAccess', _334 => _334[1]])) {
10919
10927
  return lowerToolMatch[1];
10920
10928
  }
10921
10929
  const upperToolMatch = /\bTool\s+([A-Za-z0-9_.:-]+)\s+failed\b/.exec(text);
10922
- return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _338 => _338[1]]), () => ( null));
10930
+ return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _335 => _335[1]]), () => ( null));
10923
10931
  }
10924
10932
  function isInsufficientCreditsBilling(billing) {
10925
- return _optionalChain([billing, 'optionalAccess', _339 => _339.kind]) === "insufficient_credits";
10933
+ return _optionalChain([billing, 'optionalAccess', _336 => _336.kind]) === "insufficient_credits";
10926
10934
  }
10927
10935
  function extractBillingForStatus(status, error) {
10928
10936
  const errorBilling = getObjectField(status, "errorBilling");
@@ -10964,8 +10972,8 @@ function formatInsufficientCreditsMessage(input) {
10964
10972
  function buildInsufficientCreditsSummaryLines(input) {
10965
10973
  const progress = input.status.progress;
10966
10974
  const rowsInfo = extractCanonicalRowsInfo(input.status);
10967
- const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _340 => _340.rows, 'access', _341 => _341.length]))), () => ( null));
10968
- const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _342 => _342.totalRows]))), () => ( null));
10975
+ const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _337 => _337.rows, 'access', _338 => _338.length]))), () => ( null));
10976
+ const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _339 => _339.totalRows]))), () => ( null));
10969
10977
  const lines = [
10970
10978
  " status: stopped_insufficient_credits",
10971
10979
  completed === null ? " completed rows: unknown" : ` completed rows: ${formatInteger(completed)}${total !== null ? ` of ${formatInteger(total)}` : ""}`,
@@ -10984,7 +10992,7 @@ function buildInsufficientCreditsSummaryLines(input) {
10984
10992
  lines.push(" ask user: ask whether they want to add Deepline credits");
10985
10993
  lines.push(` top up after approval: ${recovery.topUp}`);
10986
10994
  lines.push(` checkout fallback: ${recovery.checkout}`);
10987
- const runId = _optionalChain([input, 'access', _343 => _343.status, 'access', _344 => _344.runId, 'optionalAccess', _345 => _345.trim, 'call', _346 => _346()]);
10995
+ const runId = _optionalChain([input, 'access', _340 => _340.status, 'access', _341 => _341.runId, 'optionalAccess', _342 => _342.trim, 'call', _343 => _343()]);
10988
10996
  if (runId) {
10989
10997
  lines.push(` inspect: deepline runs get ${runId}`);
10990
10998
  lines.push(
@@ -11066,10 +11074,10 @@ function normalizeRunStatusForEnvelope(status) {
11066
11074
  function normalizeProgressForEnvelope(status, rowsInfo) {
11067
11075
  const progress = status.progress;
11068
11076
  const rowOutcomes = readRowOutcomeSummary(status);
11069
- const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _347 => _347.totalRows]), () => ( getNumericField(progress, "totalRows"))), () => ( getNumericField(progress, "total"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _348 => _348.totalRows]))), () => ( null));
11070
- const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _349 => _349.failedRows]), () => ( getNumericField(progress, "failed"))), () => ( getNumericField(progress, "failedRows"))), () => ( null));
11071
- const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _350 => _350.completedRows]), () => ( getNumericField(progress, "completed"))), () => ( getNumericField(progress, "completedRows"))), () => ( (status.status === "completed" ? total : null)));
11072
- const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _351 => _351.supersededRows]), () => ( getNumericField(progress, "supersededRows")));
11077
+ const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _344 => _344.totalRows]), () => ( getNumericField(progress, "totalRows"))), () => ( getNumericField(progress, "total"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _345 => _345.totalRows]))), () => ( null));
11078
+ const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _346 => _346.failedRows]), () => ( getNumericField(progress, "failed"))), () => ( getNumericField(progress, "failedRows"))), () => ( null));
11079
+ const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _347 => _347.completedRows]), () => ( getNumericField(progress, "completed"))), () => ( getNumericField(progress, "completedRows"))), () => ( (status.status === "completed" ? total : null)));
11080
+ const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _348 => _348.supersededRows]), () => ( getNumericField(progress, "supersededRows")));
11073
11081
  const supersededOffset = _nullishCoalesce(supersededRows, () => ( 0));
11074
11082
  const progressPending = getNumericField(progress, "pending");
11075
11083
  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)));
@@ -11139,7 +11147,7 @@ function normalizeErrorsForEnvelope(status, error) {
11139
11147
  ];
11140
11148
  }
11141
11149
  function normalizeLogsForEnvelope(status) {
11142
- const logs = Array.isArray(_optionalChain([status, 'access', _352 => _352.progress, 'optionalAccess', _353 => _353.logs])) ? status.progress.logs : [];
11150
+ const logs = Array.isArray(_optionalChain([status, 'access', _349 => _349.progress, 'optionalAccess', _350 => _350.logs])) ? status.progress.logs : [];
11143
11151
  const totalCount = logs.length;
11144
11152
  const entries = logs.slice(Math.max(0, logs.length - RUN_LOG_PREVIEW_LIMIT));
11145
11153
  const firstSequence = entries.length === 0 ? null : logs.length - entries.length + 1;
@@ -11196,7 +11204,7 @@ function compactPlayStatus(status) {
11196
11204
  const packaged = getPlayRunPackage(status);
11197
11205
  if (packaged) {
11198
11206
  const packagedRun = readRecord(packaged.run);
11199
- const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess', _354 => _354.error]) === "string" ? packagedRun.error : null;
11207
+ const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess', _351 => _351.error]) === "string" ? packagedRun.error : null;
11200
11208
  const error2 = _nullishCoalesce(selectRunErrorForDisplay(status), () => ( (typeof status.error === "string" ? String(status.error) : packagedError)));
11201
11209
  const compactError = error2 ? compactRunErrorForEnvelope(error2, status.runId) : null;
11202
11210
  const rowOutcomes2 = readRowOutcomeSummary(status);
@@ -11347,7 +11355,7 @@ function formatTopValuesPart(value) {
11347
11355
  }
11348
11356
  function formatPackageDatasetSummaryLines(summary, indent = " ") {
11349
11357
  const record3 = readRecord(summary);
11350
- const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _355 => _355.columnStats]));
11358
+ const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _352 => _352.columnStats]));
11351
11359
  if (!record3 || !columnStats) {
11352
11360
  return [];
11353
11361
  }
@@ -11435,7 +11443,7 @@ function packageDatasetRecords(packaged) {
11435
11443
  if (catalog.length > 0) return catalog;
11436
11444
  return readRecordArray(packaged.steps).flatMap((step) => {
11437
11445
  const output = readRecord(step.output);
11438
- return _optionalChain([output, 'optionalAccess', _356 => _356.kind]) === "dataset" ? [output] : [];
11446
+ return _optionalChain([output, 'optionalAccess', _353 => _353.kind]) === "dataset" ? [output] : [];
11439
11447
  });
11440
11448
  }
11441
11449
  function packageReturnedDatasetIdentity(packaged) {
@@ -11444,7 +11452,7 @@ function packageReturnedDatasetIdentity(packaged) {
11444
11452
  const outputs = _nullishCoalesce(readRecord(packaged.outputs), () => ( {}));
11445
11453
  for (const outputValue of Object.values(outputs)) {
11446
11454
  const output = readRecord(outputValue);
11447
- if (_optionalChain([output, 'optionalAccess', _357 => _357.kind]) !== "dataset") continue;
11455
+ if (_optionalChain([output, 'optionalAccess', _354 => _354.kind]) !== "dataset") continue;
11448
11456
  if (typeof output.datasetId === "string" && output.datasetId.trim()) {
11449
11457
  datasetIds.add(output.datasetId.trim());
11450
11458
  }
@@ -11480,7 +11488,7 @@ function formatRunStepProgress(progress, includeRowOutcomes = false) {
11480
11488
  }
11481
11489
  function formatPackageDatasetActionLines(packaged, options) {
11482
11490
  const returned = packageReturnedDatasetIdentity(packaged);
11483
- const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _358 => _358.includeSummary]), () => ( true));
11491
+ const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _355 => _355.includeSummary]), () => ( true));
11484
11492
  const lines = [];
11485
11493
  const steps = readRecordArray(packaged.steps);
11486
11494
  const stepsByDatasetId = /* @__PURE__ */ new Map();
@@ -11489,10 +11497,10 @@ function formatPackageDatasetActionLines(packaged, options) {
11489
11497
  for (const step of steps) {
11490
11498
  if (step.kind !== "dataset") continue;
11491
11499
  const output = readRecord(step.output);
11492
- if (typeof _optionalChain([output, 'optionalAccess', _359 => _359.datasetId]) === "string") {
11500
+ if (typeof _optionalChain([output, 'optionalAccess', _356 => _356.datasetId]) === "string") {
11493
11501
  stepsByDatasetId.set(output.datasetId, step);
11494
11502
  }
11495
- if (typeof _optionalChain([output, 'optionalAccess', _360 => _360.path]) === "string") {
11503
+ if (typeof _optionalChain([output, 'optionalAccess', _357 => _357.path]) === "string") {
11496
11504
  stepsByPath.set(output.path, step);
11497
11505
  }
11498
11506
  if (typeof step.id === "string") {
@@ -11506,8 +11514,8 @@ function formatPackageDatasetActionLines(packaged, options) {
11506
11514
  const category = isReturned ? "returned" : dataset.recovered === true ? "recovered" : "persisted";
11507
11515
  const rowCount = typeof dataset.rowCount === "number" && Number.isFinite(dataset.rowCount) ? Math.max(0, Math.trunc(dataset.rowCount)) : null;
11508
11516
  const lifecycle = readRecord(dataset.lifecycle);
11509
- const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess', _361 => _361.complete]) === false;
11510
- const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess', _362 => _362.persistedRowsAtLeast]) === "number" && Number.isFinite(lifecycle.persistedRowsAtLeast) ? Math.max(0, Math.trunc(lifecycle.persistedRowsAtLeast)) : 0;
11517
+ const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess', _358 => _358.complete]) === false;
11518
+ const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess', _359 => _359.persistedRowsAtLeast]) === "number" && Number.isFinite(lifecycle.persistedRowsAtLeast) ? Math.max(0, Math.trunc(lifecycle.persistedRowsAtLeast)) : 0;
11511
11519
  const actions2 = _nullishCoalesce(readRecord(dataset.actions), () => ( {}));
11512
11520
  if (countUnconfirmed) {
11513
11521
  lines.push(
@@ -11525,7 +11533,7 @@ function formatPackageDatasetActionLines(packaged, options) {
11525
11533
  }
11526
11534
  }
11527
11535
  const step = _nullishCoalesce(_nullishCoalesce((datasetId ? stepsByDatasetId.get(datasetId) : void 0), () => ( stepsByPath.get(path))), () => ( (typeof dataset.tableNamespace === "string" ? stepsByNamespace.get(dataset.tableNamespace) : void 0)));
11528
- const progress = readRecord(_optionalChain([step, 'optionalAccess', _363 => _363.progress]));
11536
+ const progress = readRecord(_optionalChain([step, 'optionalAccess', _360 => _360.progress]));
11529
11537
  if (progress) {
11530
11538
  lines.push(` progress: ${formatRunStepProgress(progress)}`);
11531
11539
  }
@@ -11539,10 +11547,10 @@ function formatPackageDatasetActionLines(packaged, options) {
11539
11547
  }
11540
11548
  const exportAction = readRecord(actions2.exportCsv);
11541
11549
  const exportCommand = actionToCommand(exportAction);
11542
- const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _364 => _364.scope]));
11550
+ const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _361 => _361.scope]));
11543
11551
  const queryAction = readRecord(actions2.query);
11544
- const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess', _365 => _365.scope]));
11545
- const runQueryCommand = _optionalChain([queryScope, 'optionalAccess', _366 => _366.kind]) === "run" ? actionToCommand(queryAction) : null;
11552
+ const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess', _362 => _362.scope]));
11553
+ const runQueryCommand = _optionalChain([queryScope, 'optionalAccess', _363 => _363.kind]) === "run" ? actionToCommand(queryAction) : null;
11546
11554
  const currentQueryCommand = actionToCommand(actions2.queryCurrentTable);
11547
11555
  const legacyQueryCommand = actionToCommand(actions2.query);
11548
11556
  if (runQueryCommand) {
@@ -11554,11 +11562,11 @@ function formatPackageDatasetActionLines(packaged, options) {
11554
11562
  }
11555
11563
  if (exportCommand) {
11556
11564
  lines.push(
11557
- _optionalChain([exportScope, 'optionalAccess', _367 => _367.kind]) === "database" ? ` export current table (may include other runs): ${exportCommand}` : ` export this run: ${exportCommand}`
11565
+ _optionalChain([exportScope, 'optionalAccess', _364 => _364.kind]) === "database" ? ` export current table (may include other runs): ${exportCommand}` : ` export this run: ${exportCommand}`
11558
11566
  );
11559
11567
  }
11560
11568
  const unavailable = readRecord(dataset.exportUnavailable);
11561
- if (typeof _optionalChain([unavailable, 'optionalAccess', _368 => _368.reason]) === "string" && typeof unavailable.message === "string") {
11569
+ if (typeof _optionalChain([unavailable, 'optionalAccess', _365 => _365.reason]) === "string" && typeof unavailable.message === "string") {
11562
11570
  lines.push(
11563
11571
  ` export unavailable (${unavailable.reason}): ${unavailable.message}`
11564
11572
  );
@@ -11575,7 +11583,7 @@ function packageSavedRowCount(packaged) {
11575
11583
  }
11576
11584
  function runtimeLimitWindowLabel(runtimeLimitFailure) {
11577
11585
  const message = _nullishCoalesce(getStringField(runtimeLimitFailure, "message"), () => ( ""));
11578
- const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _369 => _369.exec, 'call', _370 => _370(message), 'optionalAccess', _371 => _371[1]]);
11586
+ const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _366 => _366.exec, 'call', _367 => _367(message), 'optionalAccess', _368 => _368[1]]);
11579
11587
  if (configuredSeconds) {
11580
11588
  const seconds = Number(configuredSeconds);
11581
11589
  if (Number.isSafeInteger(seconds) && seconds > 0) {
@@ -11622,7 +11630,7 @@ function formatPackageValueOutputLines(packaged) {
11622
11630
  if (!outputs) return [];
11623
11631
  const returned = Object.entries(outputs).filter(([, output]) => {
11624
11632
  const record3 = readRecord(output);
11625
- return _optionalChain([record3, 'optionalAccess', _372 => _372.kind]) === "dataset" || _optionalChain([record3, 'optionalAccess', _373 => _373.kind]) === "value" && Object.prototype.hasOwnProperty.call(record3, "value");
11633
+ return _optionalChain([record3, 'optionalAccess', _369 => _369.kind]) === "dataset" || _optionalChain([record3, 'optionalAccess', _370 => _370.kind]) === "value" && Object.prototype.hasOwnProperty.call(record3, "value");
11626
11634
  });
11627
11635
  if (returned.length === 0) return [];
11628
11636
  const datasets = packageDatasetRecords(packaged);
@@ -11642,10 +11650,10 @@ function formatPackageValueOutputLines(packaged) {
11642
11650
  (candidate) => typeof output.datasetId === "string" && candidate.datasetId === output.datasetId || candidate.path === path
11643
11651
  );
11644
11652
  const stepOutput = datasetSteps.map((step) => readRecord(step.output)).find(
11645
- (candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _374 => _374.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _375 => _375.path]) === path
11653
+ (candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _371 => _371.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _372 => _372.path]) === path
11646
11654
  );
11647
- const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _376 => _376.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _377 => _377.preview]))));
11648
- const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _378 => _378.rows])) ? preview.rows.slice(0, 2) : [];
11655
+ const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _373 => _373.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _374 => _374.preview]))));
11656
+ const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _375 => _375.rows])) ? preview.rows.slice(0, 2) : [];
11649
11657
  if (rows.length > 0) {
11650
11658
  lines.push(` sample rows (${rows.length}):`);
11651
11659
  lines.push(
@@ -11671,7 +11679,7 @@ function formatPackageValueOutputLines(packaged) {
11671
11679
  return lines;
11672
11680
  }
11673
11681
  function authoredPackageStackFrames(packaged) {
11674
- const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _379 => _379.trim, 'call', _380 => _380()])));
11682
+ const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _376 => _376.trim, 'call', _377 => _377()])));
11675
11683
  if (!stack) return [];
11676
11684
  return stack.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).filter(
11677
11685
  (line) => !line.includes("/virtual/deepline-plays/") && !line.includes("/apps/play-runner/") && !line.includes("/shared_libs/play-runtime/") && !line.includes("node:internal")
@@ -11703,9 +11711,9 @@ function activityIsoTimestamp(value) {
11703
11711
  }
11704
11712
  function buildRunActivityTextLines(run) {
11705
11713
  const activity = readRecord(run.activity);
11706
- const observation = readRecord(_optionalChain([activity, 'optionalAccess', _381 => _381.observation]));
11707
- const state = readRecord(_optionalChain([observation, 'optionalAccess', _382 => _382.state]));
11708
- const target = readRecord(_optionalChain([observation, 'optionalAccess', _383 => _383.target]));
11714
+ const observation = readRecord(_optionalChain([activity, 'optionalAccess', _378 => _378.observation]));
11715
+ const state = readRecord(_optionalChain([observation, 'optionalAccess', _379 => _379.state]));
11716
+ const target = readRecord(_optionalChain([observation, 'optionalAccess', _380 => _380.target]));
11709
11717
  if (!activity || !observation || !state) return [];
11710
11718
  const kind = typeof state.kind === "string" ? state.kind : "unknown";
11711
11719
  if (kind === "completed") return [];
@@ -11750,11 +11758,11 @@ function buildRunActivityTextLines(run) {
11750
11758
  }
11751
11759
  function formatObservedRunCounter(value) {
11752
11760
  const counter = readRecord(value);
11753
- const count2 = _optionalChain([counter, 'optionalAccess', _384 => _384.value]);
11761
+ const count2 = _optionalChain([counter, 'optionalAccess', _381 => _381.value]);
11754
11762
  if (typeof count2 !== "number" || !Number.isSafeInteger(count2) || count2 < 0) {
11755
11763
  return "unknown";
11756
11764
  }
11757
- return _optionalChain([counter, 'optionalAccess', _385 => _385.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
11765
+ return _optionalChain([counter, 'optionalAccess', _382 => _382.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
11758
11766
  }
11759
11767
  function buildRunStatusEvidenceTextLines(packaged) {
11760
11768
  const evidence = readRecord(packaged.runStatus);
@@ -11767,13 +11775,13 @@ function buildRunStatusEvidenceTextLines(packaged) {
11767
11775
  );
11768
11776
  }
11769
11777
  const source = readRecord(evidence.source);
11770
- if (_optionalChain([source, 'optionalAccess', _386 => _386.aligned]) === false) {
11778
+ if (_optionalChain([source, 'optionalAccess', _383 => _383.aligned]) === false) {
11771
11779
  lines.push(
11772
11780
  ` consistency: run snapshot event ${String(source.runSnapshotLedgerNextSeq)} and progress event ${String(source.ledgerNextSeq)} differ; retry this read to align them`
11773
11781
  );
11774
11782
  }
11775
11783
  const focus = readRecord(evidence.focusStep);
11776
- const rows = readRecord(_optionalChain([focus, 'optionalAccess', _387 => _387.rows]));
11784
+ const rows = readRecord(_optionalChain([focus, 'optionalAccess', _384 => _384.rows]));
11777
11785
  if (focus) {
11778
11786
  const id = typeof focus.id === "string" && focus.id.trim() ? focus.id.trim() : "unknown step";
11779
11787
  const label = typeof focus.label === "string" && focus.label.trim() ? ` (${focus.label.trim()})` : "";
@@ -11781,7 +11789,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
11781
11789
  const known = readRecordArray(packaged.steps).find(
11782
11790
  (step) => typeof step.id === "string" && (id === step.id || id.endsWith(`:${step.id}`)) && typeof step.label === "string"
11783
11791
  );
11784
- const state = typeof _optionalChain([known, 'optionalAccess', _388 => _388.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
11792
+ const state = typeof _optionalChain([known, 'optionalAccess', _385 => _385.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
11785
11793
  deriveNodeExecutionState({
11786
11794
  reported: {
11787
11795
  status: focus.status.trim(),
@@ -11791,7 +11799,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
11791
11799
  total: rows.total
11792
11800
  } : null
11793
11801
  },
11794
- runStatus: _optionalChain([run, 'optionalAccess', _389 => _389.status])
11802
+ runStatus: _optionalChain([run, 'optionalAccess', _386 => _386.status])
11795
11803
  })
11796
11804
  ) : null;
11797
11805
  lines.push(` current step: ${id}${label}${state ? `: ${state}` : ""}`);
@@ -11839,7 +11847,7 @@ function formatRecentRunLogLines(value) {
11839
11847
  (line) => typeof line === "string"
11840
11848
  );
11841
11849
  if (tail.length === 0) return [];
11842
- const shown = tail.map((line) => _chunkWGO2DY4Ljs.classifyLogLine.call(void 0, line)).filter(
11850
+ const shown = tail.map((line) => _chunkM2VXDQI2js.classifyLogLine.call(void 0, line)).filter(
11843
11851
  (entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
11844
11852
  ).slice(-8);
11845
11853
  const total = readNonNegativeInteger(logs.totalCount);
@@ -11883,7 +11891,7 @@ function buildRunPackageTextLines(packaged) {
11883
11891
  lines.push(` recovery: ${mode}${sourceRunId}`);
11884
11892
  }
11885
11893
  const runError = typeof run.error === "string" && run.error.trim() ? run.error.trim() : null;
11886
- const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _390 => _390.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
11894
+ const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _387 => _387.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
11887
11895
  const displayRunError = _nullishCoalesce(structuredRuntimeLimitMessage, () => ( runError));
11888
11896
  if (!isRuntimeLimitCheckpoint && displayRunError && (status === "failed" || status === "cancelled")) {
11889
11897
  lines.push(` error: ${truncateErrorForDisplay(displayRunError, runId)}`);
@@ -11894,11 +11902,11 @@ function buildRunPackageTextLines(packaged) {
11894
11902
  }
11895
11903
  }
11896
11904
  const failedLogs = readRecord(packaged.failedLogs);
11897
- const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _391 => _391.entries])) ? failedLogs.entries.filter(
11905
+ const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _388 => _388.entries])) ? failedLogs.entries.filter(
11898
11906
  (entry) => typeof entry === "string"
11899
11907
  ) : [];
11900
- const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _392 => _392.association]) === "string" ? failedLogs.association : null;
11901
- const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _393 => _393.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
11908
+ const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _389 => _389.association]) === "string" ? failedLogs.association : null;
11909
+ const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _390 => _390.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
11902
11910
  if (failedLogEntries.length > 0) {
11903
11911
  lines.push(" failed logs:");
11904
11912
  lines.push(...failedLogEntries.map((entry) => ` ${entry}`));
@@ -11917,8 +11925,8 @@ function buildRunPackageTextLines(packaged) {
11917
11925
  )
11918
11926
  ).slice(0, 16) : [];
11919
11927
  lines.push(...packageWarnings.map((warning) => ` warning: ${warning}`));
11920
- const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _394 => _394.next]));
11921
- if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _395 => _395.logs]) === "string") {
11928
+ const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _391 => _391.next]));
11929
+ if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _392 => _392.logs]) === "string") {
11922
11930
  lines.push(
11923
11931
  failedLogAssociation === "retained_before_truncation" ? ` retained logs: ${failedLogNext.logs}` : ` retry failed logs: ${failedLogNext.logs}`
11924
11932
  );
@@ -11946,20 +11954,20 @@ function buildRunPackageTextLines(packaged) {
11946
11954
  const stepStatus = typeof step.status === "string" ? step.status : status;
11947
11955
  const output = step.output && typeof step.output === "object" && !Array.isArray(step.output) ? step.output : null;
11948
11956
  const rowCount = output && typeof output.rowCount === "number" ? ` rows=${formatInteger(output.rowCount)}` : "";
11949
- const preview = _optionalChain([output, 'optionalAccess', _396 => _396.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
11950
- const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _397 => _397.rows])) ? preview.rows.length : null;
11957
+ const preview = _optionalChain([output, 'optionalAccess', _393 => _393.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
11958
+ const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _394 => _394.rows])) ? preview.rows.length : null;
11951
11959
  lines.push(` ${kind} ${id}: ${stepStatus}${rowCount}`);
11952
- lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _398 => _398.summary])));
11960
+ lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _395 => _395.summary])));
11953
11961
  if (previewRows !== null) {
11954
11962
  lines.push(
11955
- ` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _399 => _399.truncated]) ? " truncated" : ""}`
11963
+ ` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _396 => _396.truncated]) ? " truncated" : ""}`
11956
11964
  );
11957
11965
  }
11958
11966
  }
11959
11967
  const inspectCommand = actionToCommand(next.inspect);
11960
11968
  const fullResultCommand = actionToCommand(next.full);
11961
11969
  const hasCatalogExportAction = packageDatasetRecords(packaged).some(
11962
- (dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _400 => _400(dataset.actions), 'optionalAccess', _401 => _401.exportCsv])))
11970
+ (dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _397 => _397(dataset.actions), 'optionalAccess', _398 => _398.exportCsv])))
11963
11971
  );
11964
11972
  const legacyExportCommand = hasCatalogExportAction ? null : actionToCommand(next.export);
11965
11973
  const runAgainCommand = typeof next.run === "string" && next.run.trim() ? next.run.trim() : null;
@@ -12024,7 +12032,7 @@ function withOrdinaryRunAgainCommand(status, options, resolvedRevisionId) {
12024
12032
  }
12025
12033
  function buildBillingRollupTextLines(status) {
12026
12034
  const billing = status.billing;
12027
- const rollup = _optionalChain([billing, 'optionalAccess', _402 => _402.rollup]);
12035
+ const rollup = _optionalChain([billing, 'optionalAccess', _399 => _399.rollup]);
12028
12036
  if (!rollup) return [];
12029
12037
  const total = formatCreditAmount2(rollup.totalCreditsRollup);
12030
12038
  if (rollup.childCredits > 0 && rollup.descendantRunCount > 0) {
@@ -12069,7 +12077,7 @@ function buildPlayCompletionTextLines(status) {
12069
12077
  const overview = buildRunOverview(status);
12070
12078
  const { run } = overview;
12071
12079
  const failed = run.status === "failed";
12072
- const label = run.status === "completed" ? _optionalChain([overview, 'access', _403 => _403.rowOutcomes, 'optionalAccess', _404 => _404.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
12080
+ const label = run.status === "completed" ? _optionalChain([overview, 'access', _400 => _400.rowOutcomes, 'optionalAccess', _401 => _401.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
12073
12081
  const lines = [
12074
12082
  `${label} ${_nullishCoalesce(_nullishCoalesce(run.playName, () => ( status.playName)), () => ( "Play"))}`,
12075
12083
  `Run: ${run.id}`
@@ -12089,7 +12097,7 @@ function buildPlayCompletionTextLines(status) {
12089
12097
  ...formatJsonPreview(compactReturnValue(overview.result))
12090
12098
  );
12091
12099
  }
12092
- if (_optionalChain([overview, 'access', _405 => _405.rowOutcomes, 'optionalAccess', _406 => _406.hasRowFailures])) {
12100
+ if (_optionalChain([overview, 'access', _402 => _402.rowOutcomes, 'optionalAccess', _403 => _403.hasRowFailures])) {
12093
12101
  lines.push(
12094
12102
  `Rows: ${overview.rowOutcomes.completedRows} completed, ${overview.rowOutcomes.failedRows} failed`
12095
12103
  );
@@ -12118,17 +12126,17 @@ function buildPlayCompletionTextLines(status) {
12118
12126
  }
12119
12127
  function writePlayResult(status, jsonOutput, options) {
12120
12128
  const packaged = getPlayRunPackage(status);
12121
- if (status.package) _chunk27GJKC5Qjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
12122
- const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _407 => _407.hits]), () => ( null));
12129
+ if (status.package) _chunkGXOQRZXGjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
12130
+ const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _404 => _404.hits]), () => ( null));
12123
12131
  if (jsonOutput) {
12124
- const payload2 = _optionalChain([options, 'optionalAccess', _408 => _408.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
12125
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
12132
+ const payload2 = _optionalChain([options, 'optionalAccess', _405 => _405.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
12133
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
12126
12134
  hits ? { ...payload2, hits } : payload2,
12127
- { json: true, fields: _optionalChain([options, 'optionalAccess', _409 => _409.jsonFields]) }
12135
+ { json: true, fields: _optionalChain([options, 'optionalAccess', _406 => _406.jsonFields]) }
12128
12136
  );
12129
12137
  return;
12130
12138
  }
12131
- if (packaged && !_optionalChain([options, 'optionalAccess', _410 => _410.fullJson])) {
12139
+ if (packaged && !_optionalChain([options, 'optionalAccess', _407 => _407.fullJson])) {
12132
12140
  const {
12133
12141
  logs: _logs,
12134
12142
  failedLogs: _failedLogs,
@@ -12138,7 +12146,7 @@ function writePlayResult(status, jsonOutput, options) {
12138
12146
  ...buildPlayCompletionTextLines(status),
12139
12147
  ...formatRunHitsLines(hits)
12140
12148
  ];
12141
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0, displayPackage, {
12149
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0, displayPackage, {
12142
12150
  json: false,
12143
12151
  text: `${lines2.join("\n")}
12144
12152
  `
@@ -12188,8 +12196,8 @@ function writePlayResult(status, jsonOutput, options) {
12188
12196
  lines.push(...renderedServerView.actions);
12189
12197
  lines.push(...buildBillingRollupTextLines(status));
12190
12198
  const compact = compactPlayStatus(status);
12191
- const payload = _optionalChain([options, 'optionalAccess', _411 => _411.fullJson]) ? status : compact;
12192
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
12199
+ const payload = _optionalChain([options, 'optionalAccess', _408 => _408.fullJson]) ? status : compact;
12200
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
12193
12201
  {
12194
12202
  ...payload,
12195
12203
  render: {
@@ -12242,7 +12250,7 @@ async function resolvePlayRunOutputStatus(input) {
12242
12250
  const streamedPackage = getPlayRunPackage(input.status);
12243
12251
  const refreshForFullJson = input.fullJson && !input.fromDurableStatus;
12244
12252
  const streamedTextPackageIncomplete = input.status.status === "completed" && playRunPackageTextLedgerIncomplete(streamedPackage);
12245
- const refreshFailedTerminal = input.status.status === "failed" && (!input.fromDurableStatus || _optionalChain([readRecord, 'call', _412 => _412(_optionalChain([streamedPackage, 'optionalAccess', _413 => _413.run])), 'optionalAccess', _414 => _414.status]) !== "failed");
12253
+ const refreshFailedTerminal = input.status.status === "failed" && (!input.fromDurableStatus || _optionalChain([readRecord, 'call', _409 => _409(_optionalChain([streamedPackage, 'optionalAccess', _410 => _410.run])), 'optionalAccess', _411 => _411.status]) !== "failed");
12246
12254
  if (!refreshForFullJson && !streamedTextPackageIncomplete && !refreshFailedTerminal) {
12247
12255
  return input.status;
12248
12256
  }
@@ -12342,14 +12350,14 @@ function mergeExportColumns(preferredColumns, rows) {
12342
12350
  return columns;
12343
12351
  }
12344
12352
  function sqlSafeExportColumnName(id) {
12345
- const prefix = _nullishCoalesce(_optionalChain([id, 'access', _415 => _415.trim, 'call', _416 => _416(), 'access', _417 => _417.match, 'call', _418 => _418(/^_+/), 'optionalAccess', _419 => _419[0]]), () => ( ""));
12353
+ const prefix = _nullishCoalesce(_optionalChain([id, 'access', _412 => _412.trim, 'call', _413 => _413(), 'access', _414 => _414.match, 'call', _415 => _415(/^_+/), 'optionalAccess', _416 => _416[0]]), () => ( ""));
12346
12354
  const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
12347
12355
  const safe = `${prefix}${normalized || "column"}`;
12348
12356
  return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
12349
12357
  }
12350
12358
  async function fetchBackingDatasetRows(input) {
12351
12359
  const playName = extractRunPlayName(input.status);
12352
- const tableNamespace = _optionalChain([input, 'access', _420 => _420.rowsInfo, 'access', _421 => _421.tableNamespace, 'optionalAccess', _422 => _422.trim, 'call', _423 => _423()]);
12360
+ const tableNamespace = _optionalChain([input, 'access', _417 => _417.rowsInfo, 'access', _418 => _418.tableNamespace, 'optionalAccess', _419 => _419.trim, 'call', _420 => _420()]);
12353
12361
  if (!playName || !tableNamespace) {
12354
12362
  return null;
12355
12363
  }
@@ -12388,7 +12396,7 @@ async function fetchBackingDatasetRows(input) {
12388
12396
  seenEnvelopeKeys.add(key);
12389
12397
  }
12390
12398
  sheetRows.push(...page.rows);
12391
- const summaryTotal = _optionalChain([page, 'access', _424 => _424.summary, 'optionalAccess', _425 => _425.stats, 'optionalAccess', _426 => _426.total]);
12399
+ const summaryTotal = _optionalChain([page, 'access', _421 => _421.summary, 'optionalAccess', _422 => _422.stats, 'optionalAccess', _423 => _423.total]);
12392
12400
  if (typeof summaryTotal === "number" && Number.isFinite(summaryTotal)) {
12393
12401
  settledTotal = Math.max(_nullishCoalesce(settledTotal, () => ( 0)), Math.trunc(summaryTotal));
12394
12402
  }
@@ -12482,7 +12490,7 @@ function assertDatasetHasExportableRows(input) {
12482
12490
  const rowOutcomes = _nullishCoalesce(readRowOutcomeSummary(input.status), () => ( readRowOutcomeSummary(
12483
12491
  getRecordField(getRecordField(input.status, "result"), "_metadata")
12484
12492
  )));
12485
- 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', _427 => _427.failedRows]) === 0 && !rowOutcomes.hasRowFailures) {
12493
+ 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', _424 => _424.failedRows]) === 0 && !rowOutcomes.hasRowFailures) {
12486
12494
  return input.rowsInfo;
12487
12495
  }
12488
12496
  const datasetLabel = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(input.datasetPath, () => ( input.rowsInfo.tableNamespace)), () => ( input.rowsInfo.source)), () => ( "result.rows"));
@@ -12554,8 +12562,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
12554
12562
  path: dataset.exportFile(outPath, options),
12555
12563
  rowsInfo: dataset.info(),
12556
12564
  currentTable: false,
12557
- datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _428 => _428.source]), () => ( null)),
12558
- datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _429 => _429.info, 'call', _430 => _430()]), () => ( null))
12565
+ datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _425 => _425.source]), () => ( null)),
12566
+ datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _426 => _426.info, 'call', _427 => _427()]), () => ( null))
12559
12567
  };
12560
12568
  };
12561
12569
  const run = Run.open({
@@ -12567,7 +12575,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
12567
12575
  const returnedRows = datasets.returned().map((dataset) => dataset.info());
12568
12576
  const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
12569
12577
  const selectedDataset = run.dataset(options.datasetPath);
12570
- const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _431 => _431.info, 'call', _432 => _432()]), () => ( null));
12578
+ const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _428 => _428.info, 'call', _429 => _429()]), () => ( null));
12571
12579
  if (!selectedDataset && options.datasetPath) {
12572
12580
  const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
12573
12581
  const commands = datasetChoiceLines({
@@ -12639,7 +12647,7 @@ ${commands.join("\n")}`,
12639
12647
  if (rowsInfo.exportUnavailableReason === "returned_dataset_not_persisted") {
12640
12648
  const datasetLabel = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(options.datasetPath, () => ( rowsInfo.source)), () => ( rowsInfo.datasetId)), () => ( "result.rows"));
12641
12649
  throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
12642
- _nullishCoalesce(rowsInfo.exportUnavailableMessage, () => ( `Run ${status.runId} returned rows for '${datasetLabel}' without a run-scoped durable dataset. Persist the rows with ctx.dataset("rows", rows).run() before returning them.`)),
12650
+ _nullishCoalesce(rowsInfo.exportUnavailableMessage, () => ( `Run ${status.runId} returned rows for '${datasetLabel}' without a run-scoped durable dataset. Persist the rows with deepline.dataset("rows", rows).run() before returning them.`)),
12643
12651
  void 0,
12644
12652
  "RUN_EXPORT_NOT_AVAILABLE",
12645
12653
  {
@@ -12649,7 +12657,7 @@ ${commands.join("\n")}`,
12649
12657
  guidance: {
12650
12658
  do_not_rerun: false,
12651
12659
  reason: "The returned rows exist only in the in-memory tool result.",
12652
- persist_rows: 'ctx.dataset("rows", rows).run()'
12660
+ persist_rows: 'deepline.dataset("rows", rows).run()'
12653
12661
  }
12654
12662
  }
12655
12663
  );
@@ -12679,7 +12687,7 @@ ${commands.join("\n")}`,
12679
12687
  throw error;
12680
12688
  }
12681
12689
  }
12682
- if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _433 => _433.complete])) {
12690
+ if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _430 => _430.complete])) {
12683
12691
  const guarded2 = assertDatasetHasExportableRows({
12684
12692
  rowsInfo: fetchedRowsInfo,
12685
12693
  status,
@@ -12741,7 +12749,7 @@ function extractActiveRunsFromError(error) {
12741
12749
  if (!(error instanceof _chunkPPDBRJRWjs.DeeplineError)) {
12742
12750
  return [];
12743
12751
  }
12744
- const response = _optionalChain([error, 'access', _434 => _434.details, 'optionalAccess', _435 => _435.response]);
12752
+ const response = _optionalChain([error, 'access', _431 => _431.details, 'optionalAccess', _432 => _432.response]);
12745
12753
  if (!response || typeof response !== "object" || Array.isArray(response)) {
12746
12754
  return [];
12747
12755
  }
@@ -12860,8 +12868,8 @@ function renderServerResultView(value) {
12860
12868
  return { lines: [], actions: [] };
12861
12869
  }
12862
12870
  const view = value;
12863
- const renderedSections = Array.isArray(_optionalChain([view, 'access', _436 => _436.render, 'optionalAccess', _437 => _437.sections])) ? view.render.sections : [];
12864
- const renderedActions = Array.isArray(_optionalChain([view, 'access', _438 => _438.render, 'optionalAccess', _439 => _439.actions])) ? view.render.actions : [];
12871
+ const renderedSections = Array.isArray(_optionalChain([view, 'access', _433 => _433.render, 'optionalAccess', _434 => _434.sections])) ? view.render.sections : [];
12872
+ const renderedActions = Array.isArray(_optionalChain([view, 'access', _435 => _435.render, 'optionalAccess', _436 => _436.actions])) ? view.render.actions : [];
12865
12873
  if (renderedSections.length > 0 || renderedActions.length > 0) {
12866
12874
  const lines2 = [];
12867
12875
  for (const section of renderedSections) {
@@ -12899,7 +12907,7 @@ function renderServerResultView(value) {
12899
12907
  }
12900
12908
  const tables = Array.isArray(view.tables) ? view.tables : [];
12901
12909
  const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
12902
- if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _440 => _440.queryCommand]) === "string") {
12910
+ if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _437 => _437.queryCommand]) === "string") {
12903
12911
  lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
12904
12912
  }
12905
12913
  if (tables.length > 0) {
@@ -12946,7 +12954,7 @@ function renderServerResultView(value) {
12946
12954
  function writeStartedPlayRun(input) {
12947
12955
  if (input.package && isPlayRunPackageValue(input.package)) {
12948
12956
  const run = input.package.run;
12949
- _chunk27GJKC5Qjs.recordPlayTermination.call(void 0, {
12957
+ _chunkGXOQRZXGjs.recordPlayTermination.call(void 0, {
12950
12958
  id: run.id,
12951
12959
  status: run.status,
12952
12960
  finishedAt: run.finishedAt
@@ -12959,7 +12967,7 @@ function writeStartedPlayRun(input) {
12959
12967
  dashboardUrl: input.dashboardUrl,
12960
12968
  package: input.package
12961
12969
  };
12962
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
12970
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
12963
12971
  json: true,
12964
12972
  fields: input.jsonFields
12965
12973
  });
@@ -12981,7 +12989,7 @@ function writeStartedPlayRun(input) {
12981
12989
  input.progress.writeLine(output2, process.stdout);
12982
12990
  return;
12983
12991
  }
12984
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0, input.package, {
12992
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0, input.package, {
12985
12993
  json: false,
12986
12994
  text: `${output2}
12987
12995
  `
@@ -13010,7 +13018,7 @@ function writeStartedPlayRun(input) {
13010
13018
  ) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)}`] : []
13011
13019
  ];
13012
13020
  if (input.jsonOutput) {
13013
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
13021
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
13014
13022
  return;
13015
13023
  }
13016
13024
  if (input.dashboardUrl) {
@@ -13021,7 +13029,7 @@ function writeStartedPlayRun(input) {
13021
13029
  input.progress.writeLine(output, process.stdout);
13022
13030
  return;
13023
13031
  }
13024
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
13032
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
13025
13033
  {
13026
13034
  ...payload,
13027
13035
  render: { sections: [{ title: "play run", lines }] }
@@ -13031,7 +13039,7 @@ function writeStartedPlayRun(input) {
13031
13039
  );
13032
13040
  }
13033
13041
  function parsePlayCheckOptions(args) {
13034
- const selection = _chunkAYM2KZN3js.parseJsonFields.call(void 0, args, "check");
13042
+ const selection = _chunkDD6MM6WXjs.parseJsonFields.call(void 0, args, "check");
13035
13043
  args = selection.args;
13036
13044
  const target = args[0];
13037
13045
  if (!target || target.startsWith("-")) {
@@ -13043,7 +13051,7 @@ function parsePlayCheckOptions(args) {
13043
13051
  if (arg !== "--json" && arg !== "--full")
13044
13052
  throw new Error(`Unknown plays check option: ${arg}`);
13045
13053
  }
13046
- const jsonOutput = _chunkAYM2KZN3js.argsWantJson.call(void 0, args);
13054
+ const jsonOutput = _chunkDD6MM6WXjs.argsWantJson.call(void 0, args);
13047
13055
  return {
13048
13056
  target,
13049
13057
  jsonOutput,
@@ -13119,7 +13127,7 @@ ${PLAY_PUBLISH_USAGE}`
13119
13127
  useLatest,
13120
13128
  expectedArtifactHash,
13121
13129
  dryRun,
13122
- jsonOutput: _chunkAYM2KZN3js.argsWantJson.call(void 0, args)
13130
+ jsonOutput: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args)
13123
13131
  };
13124
13132
  }
13125
13133
  var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
@@ -13160,7 +13168,7 @@ ${PLAY_SAVE_USAGE}`);
13160
13168
  target,
13161
13169
  expectedArtifactHash,
13162
13170
  dryRun,
13163
- jsonOutput: _chunkAYM2KZN3js.argsWantJson.call(void 0, args)
13171
+ jsonOutput: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args)
13164
13172
  };
13165
13173
  }
13166
13174
  function printScheduledPlayCapacity(capacity) {
@@ -13213,7 +13221,7 @@ function checkHintExpression(value) {
13213
13221
  return stringValue2(value).replace(/^toolExecutionResult\./, "result.");
13214
13222
  }
13215
13223
  function checkHintRawPath(value) {
13216
- return _optionalChain([value, 'optionalAccess', _441 => _441.startsWith, 'call', _442 => _442("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
13224
+ return _optionalChain([value, 'optionalAccess', _438 => _438.startsWith, 'call', _439 => _439("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
13217
13225
  }
13218
13226
  function collectStaticPipelineToolIds(staticPipeline) {
13219
13227
  const seen = /* @__PURE__ */ new Set();
@@ -13288,30 +13296,30 @@ function cronExecutionLabel(status) {
13288
13296
  }
13289
13297
  function readLiveCronMetadata(play) {
13290
13298
  const record3 = readRecord(play);
13291
- const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _443 => _443.triggerMetadata]));
13299
+ const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _440 => _440.triggerMetadata]));
13292
13300
  return {
13293
- schedule: typeof _optionalChain([metadata, 'optionalAccess', _444 => _444.cronSchedule]) === "string" ? metadata.cronSchedule : null,
13294
- timezone: typeof _optionalChain([metadata, 'optionalAccess', _445 => _445.cronTimezone]) === "string" ? metadata.cronTimezone : null,
13295
- nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _446 => _446.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
13296
- blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _447 => _447.blockedAt]) === "number" ? metadata.blockedAt : null,
13297
- blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _448 => _448.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
13301
+ schedule: typeof _optionalChain([metadata, 'optionalAccess', _441 => _441.cronSchedule]) === "string" ? metadata.cronSchedule : null,
13302
+ timezone: typeof _optionalChain([metadata, 'optionalAccess', _442 => _442.cronTimezone]) === "string" ? metadata.cronTimezone : null,
13303
+ nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _443 => _443.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
13304
+ blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _444 => _444.blockedAt]) === "number" ? metadata.blockedAt : null,
13305
+ blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _445 => _445.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
13298
13306
  };
13299
13307
  }
13300
13308
  function liveTriggerStatusLines(status, play) {
13301
13309
  const cron = readLiveCronMetadata(play);
13302
- if (!_optionalChain([status, 'optionalAccess', _449 => _449.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _450 => _450.webhook])) return [];
13310
+ if (!_optionalChain([status, 'optionalAccess', _446 => _446.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _447 => _447.webhook])) return [];
13303
13311
  const lines = [];
13304
- if (_optionalChain([status, 'optionalAccess', _451 => _451.cron]) || cron.schedule) {
13312
+ if (_optionalChain([status, 'optionalAccess', _448 => _448.cron]) || cron.schedule) {
13305
13313
  const timezone = cron.timezone ? ` (${cron.timezone})` : "";
13306
13314
  lines.push(
13307
- ` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _452 => _452.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
13315
+ ` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _449 => _449.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
13308
13316
  );
13309
- if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _453 => _453.cron]) === "active") {
13317
+ if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _450 => _450.cron]) === "active") {
13310
13318
  lines.push(
13311
13319
  ` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
13312
13320
  );
13313
13321
  }
13314
- if (_optionalChain([status, 'optionalAccess', _454 => _454.blockedReason])) {
13322
+ if (_optionalChain([status, 'optionalAccess', _451 => _451.blockedReason])) {
13315
13323
  lines.push(` Schedule issue: ${status.blockedReason}`);
13316
13324
  if (status.blockedReasonCode || cron.blockedReasonCode) {
13317
13325
  lines.push(
@@ -13327,7 +13335,7 @@ function liveTriggerStatusLines(status, play) {
13327
13335
  );
13328
13336
  }
13329
13337
  }
13330
- if (_optionalChain([status, 'optionalAccess', _455 => _455.webhook])) {
13338
+ if (_optionalChain([status, 'optionalAccess', _452 => _452.webhook])) {
13331
13339
  lines.push(` Webhook: ${status.webhook}`);
13332
13340
  }
13333
13341
  return lines;
@@ -13335,11 +13343,11 @@ function liveTriggerStatusLines(status, play) {
13335
13343
  function triggerStatusFromMetadata(value) {
13336
13344
  const metadata = readRecord(value);
13337
13345
  return {
13338
- cron: typeof _optionalChain([metadata, 'optionalAccess', _456 => _456.cronStatus]) === "string" ? metadata.cronStatus : null,
13339
- webhook: typeof _optionalChain([metadata, 'optionalAccess', _457 => _457.webhookStatus]) === "string" ? metadata.webhookStatus : null,
13340
- blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _458 => _458.blockedReason]) === "string" ? metadata.blockedReason : null,
13341
- blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _459 => _459.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
13342
- blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _460 => _460.blockedAt]) === "number" ? metadata.blockedAt : null
13346
+ cron: typeof _optionalChain([metadata, 'optionalAccess', _453 => _453.cronStatus]) === "string" ? metadata.cronStatus : null,
13347
+ webhook: typeof _optionalChain([metadata, 'optionalAccess', _454 => _454.webhookStatus]) === "string" ? metadata.webhookStatus : null,
13348
+ blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _455 => _455.blockedReason]) === "string" ? metadata.blockedReason : null,
13349
+ blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _456 => _456.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
13350
+ blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _457 => _457.blockedAt]) === "number" ? metadata.blockedAt : null
13343
13351
  };
13344
13352
  }
13345
13353
  function printPublishReceipt(input) {
@@ -13371,7 +13379,7 @@ function printBundledRuntimeWarning(bundle) {
13371
13379
  async function handlePlayCheck(args) {
13372
13380
  const options = parsePlayCheckOptions(args);
13373
13381
  if (!isFileTarget2(options.target)) {
13374
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
13382
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
13375
13383
  try {
13376
13384
  await assertCanonicalNamedPlayReference(client, options.target, {
13377
13385
  command: "check"
@@ -13400,7 +13408,7 @@ async function handlePlayCheck(args) {
13400
13408
  },
13401
13409
  ...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
13402
13410
  };
13403
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0, result, {
13411
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0, result, {
13404
13412
  json: options.jsonOutput,
13405
13413
  fields: options.jsonFields,
13406
13414
  text: renderPlayCheckOutput(result) + "\n"
@@ -13410,7 +13418,7 @@ async function handlePlayCheck(args) {
13410
13418
  const resolved = _path.resolve.call(void 0, options.target);
13411
13419
  const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
13412
13420
  if (options.jsonOutput) {
13413
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
13421
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
13414
13422
  {
13415
13423
  kind: "play_check",
13416
13424
  checked: "named_contract",
@@ -13443,16 +13451,16 @@ async function handlePlayCheck(args) {
13443
13451
  );
13444
13452
  }
13445
13453
  const primary = outcomes.find(
13446
- (outcome) => outcome.exportName === _chunkOQQOXSYAjs.PLAY_DEFAULT_EXPORT
13454
+ (outcome) => outcome.exportName === _chunkYHRS6XTBjs.PLAY_DEFAULT_EXPORT
13447
13455
  );
13448
13456
  const output = buildPlayCheckOutput({
13449
13457
  outcomes,
13450
13458
  target: options.target,
13451
13459
  full: options.full,
13452
13460
  detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full`,
13453
- publishCommand: _optionalChain([primary, 'optionalAccess', _461 => _461.result, 'access', _462 => _462.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
13461
+ publishCommand: _optionalChain([primary, 'optionalAccess', _458 => _458.result, 'access', _459 => _459.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
13454
13462
  });
13455
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0, output, {
13463
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0, output, {
13456
13464
  json: options.jsonOutput,
13457
13465
  fields: options.jsonFields,
13458
13466
  text: renderPlayCheckOutput(output) + "\n"
@@ -13460,12 +13468,12 @@ async function handlePlayCheck(args) {
13460
13468
  return output.valid ? 0 : 1;
13461
13469
  }
13462
13470
  function resolvePlayCheckExportNames(sourceCode) {
13463
- const exports = _chunkOQQOXSYAjs.listPlayFileExports.call(void 0, sourceCode);
13464
- if (!exports || exports.length === 0) return [_chunkOQQOXSYAjs.PLAY_DEFAULT_EXPORT];
13471
+ const exports = _chunkYHRS6XTBjs.listPlayFileExports.call(void 0, sourceCode);
13472
+ if (!exports || exports.length === 0) return [_chunkYHRS6XTBjs.PLAY_DEFAULT_EXPORT];
13465
13473
  return exports.map((entry) => entry.name);
13466
13474
  }
13467
13475
  function artifactForProductionCompatibilityCheck(artifact) {
13468
- const rawEdition = _optionalChain([process, 'access', _463 => _463.env, 'access', _464 => _464.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _465 => _465.trim, 'call', _466 => _466()]);
13476
+ const rawEdition = _optionalChain([process, 'access', _460 => _460.env, 'access', _461 => _461.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _462 => _462.trim, 'call', _463 => _463()]);
13469
13477
  if (!rawEdition) return artifact;
13470
13478
  if (!/^\d+$/.test(rawEdition)) {
13471
13479
  throw new Error(
@@ -13506,7 +13514,7 @@ async function checkOneExportedPlay(input) {
13506
13514
  }
13507
13515
  const playName = _nullishCoalesce(graph.root.playName, () => ( fallbackName));
13508
13516
  const authoringErrors = collectPlayGraphAuthoringErrors(graph);
13509
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
13517
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
13510
13518
  const integrationMode = resolveEvalIntegrationMode();
13511
13519
  const checked = await checkLocalPlayGraph({
13512
13520
  client,
@@ -13516,7 +13524,7 @@ async function checkOneExportedPlay(input) {
13516
13524
  integrationMode,
13517
13525
  prepareArtifact: artifactForProductionCompatibilityCheck
13518
13526
  });
13519
- const importedPlayName = _optionalChain([checked, 'access', _467 => _467.failedChild, 'optionalAccess', _468 => _468.playName]);
13527
+ const importedPlayName = _optionalChain([checked, 'access', _464 => _464.failedChild, 'optionalAccess', _465 => _465.playName]);
13520
13528
  const diagnosticPrefix = importedPlayName ? `Imported Play ${importedPlayName}: ` : "";
13521
13529
  const valid = checked.result.valid && !checked.failedChild && authoringErrors.length === 0;
13522
13530
  const errors = [
@@ -13532,7 +13540,7 @@ async function checkOneExportedPlay(input) {
13532
13540
  valid,
13533
13541
  errors: valid ? checked.result.errors : addPlayCheckRepairHints({
13534
13542
  errors,
13535
- sourceCode: _nullishCoalesce(_optionalChain([checked, 'access', _469 => _469.failedChild, 'optionalAccess', _470 => _470.sourceCode]), () => ( graph.root.sourceCode))
13543
+ sourceCode: _nullishCoalesce(_optionalChain([checked, 'access', _466 => _466.failedChild, 'optionalAccess', _467 => _467.sourceCode]), () => ( graph.root.sourceCode))
13536
13544
  }),
13537
13545
  ...checked.failedChild && checked.result.issues ? {
13538
13546
  issues: checked.result.issues.map((issue) => ({
@@ -13559,11 +13567,11 @@ async function handleFileBackedRun(options, hooks) {
13559
13567
  throw new Error("Expected a file-backed play run target.");
13560
13568
  }
13561
13569
  let client;
13562
- let cliAdmission = _chunkUQQRMCOLjs.usesInlinePlayAdmission.call(void 0,
13570
+ let cliAdmission = _chunkUTF57UBWjs.usesInlinePlayAdmission.call(void 0,
13563
13571
  "plays run",
13564
13572
  process.argv.slice(2)
13565
13573
  );
13566
- const progress = _nullishCoalesce(_chunkOZHPZCAUjs.getActiveCliProgress.call(void 0, ), () => ( _chunkOZHPZCAUjs.createCliProgress.call(void 0, !options.jsonOutput)));
13574
+ const progress = _nullishCoalesce(_chunkF3MMA7JYjs.getActiveCliProgress.call(void 0, ), () => ( _chunkF3MMA7JYjs.createCliProgress.call(void 0, !options.jsonOutput)));
13567
13575
  const absolutePlayPath = _path.resolve.call(void 0, options.target.path);
13568
13576
  progress.phase("compiling play");
13569
13577
  const sourceCode = traceCliSync(
@@ -13580,13 +13588,13 @@ async function handleFileBackedRun(options, hooks) {
13580
13588
  }
13581
13589
  let graph;
13582
13590
  try {
13583
- graph = await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
13591
+ graph = await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
13584
13592
  "cli.play_file_bundle_graph",
13585
13593
  { targetKind: "file" },
13586
13594
  () => collectBundledPlayGraph(
13587
13595
  absolutePlayPath,
13588
13596
  options.profile,
13589
- _chunkOQQOXSYAjs.PLAY_DEFAULT_EXPORT,
13597
+ _chunkYHRS6XTBjs.PLAY_DEFAULT_EXPORT,
13590
13598
  { cache: !options.dryRun }
13591
13599
  )
13592
13600
  );
@@ -13594,14 +13602,14 @@ async function handleFileBackedRun(options, hooks) {
13594
13602
  if (options.dryRun) {
13595
13603
  progress.complete();
13596
13604
  renderLocalPlayExecutionPlan(
13597
- _chunkGEJDBXXMjs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile }),
13605
+ _chunkQWRHGGUHjs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile }),
13598
13606
  { dryRun: true, json: options.jsonOutput }
13599
13607
  );
13600
13608
  return 0;
13601
13609
  }
13602
- client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)(playRunClientOptions(options));
13610
+ client = new (0, _chunkM2VXDQI2js.DeeplineClient)(playRunClientOptions(options));
13603
13611
  if (cliAdmission && (graph.root.importedPlayDependencies.length > 0 || inputContainsLocalFilePath(runtimeInput))) {
13604
- await _chunkUQQRMCOLjs.checkPlayRunCompatibility.call(void 0,
13612
+ await _chunkUTF57UBWjs.checkPlayRunCompatibility.call(void 0,
13605
13613
  client.baseUrl,
13606
13614
  options.maintenancePolicy
13607
13615
  );
@@ -13614,7 +13622,7 @@ async function handleFileBackedRun(options, hooks) {
13614
13622
  });
13615
13623
  const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
13616
13624
  if (canDeferCompilerManifest) {
13617
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
13625
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
13618
13626
  phase: "cli.play_file_compile_manifests",
13619
13627
  ms: 0,
13620
13628
  ok: true,
@@ -13623,7 +13631,7 @@ async function handleFileBackedRun(options, hooks) {
13623
13631
  reason: "validated_by_run_route"
13624
13632
  });
13625
13633
  } else {
13626
- await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
13634
+ await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
13627
13635
  "cli.play_file_compile_manifests",
13628
13636
  { targetKind: "file", skipped: false },
13629
13637
  () => compileBundledPlayGraphManifests(client, graph)
@@ -13644,13 +13652,13 @@ async function handleFileBackedRun(options, hooks) {
13644
13652
  if (bundleResult.importedPlayDependencies.length > 0) {
13645
13653
  try {
13646
13654
  renderLocalPlayExecutionPlan(
13647
- _chunkGEJDBXXMjs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile })
13655
+ _chunkQWRHGGUHjs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile })
13648
13656
  );
13649
13657
  progress.phase("pinning imported plays");
13650
- graph = await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
13658
+ graph = await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
13651
13659
  "cli.play_file_pin_imports",
13652
13660
  { targetKind: "file" },
13653
- () => _chunkGEJDBXXMjs.pinLocalPlayImports.call(void 0, client, graph)
13661
+ () => _chunkQWRHGGUHjs.pinLocalPlayImports.call(void 0, client, graph)
13654
13662
  );
13655
13663
  bundleResult = graph.root;
13656
13664
  } catch (error) {
@@ -13664,9 +13672,9 @@ async function handleFileBackedRun(options, hooks) {
13664
13672
  );
13665
13673
  const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
13666
13674
  const fileInputBindings = _chunk2H4EY7KHjs.fileInputBindingsFromStaticPipeline.call(void 0,
13667
- _optionalChain([compilerManifest, 'optionalAccess', _471 => _471.staticPipeline])
13675
+ _optionalChain([compilerManifest, 'optionalAccess', _468 => _468.staticPipeline])
13668
13676
  );
13669
- const stagedFileInputs = await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
13677
+ const stagedFileInputs = await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
13670
13678
  "cli.play_stage_inputs",
13671
13679
  {
13672
13680
  targetKind: "file",
@@ -13713,7 +13721,7 @@ async function handleFileBackedRun(options, hooks) {
13713
13721
  };
13714
13722
  if (options.watch) {
13715
13723
  progress.phase("starting run");
13716
- const finalStatus = await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
13724
+ const finalStatus = await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
13717
13725
  "cli.play_start_watch",
13718
13726
  { targetKind: "file", playName },
13719
13727
  () => (options.runIdFile || cliAdmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
@@ -13727,9 +13735,9 @@ async function handleFileBackedRun(options, hooks) {
13727
13735
  waitTimeoutMs: options.waitTimeoutMs,
13728
13736
  open: options.open,
13729
13737
  progress,
13730
- onRunStarted: _optionalChain([hooks, 'optionalAccess', _472 => _472.onRunStarted]),
13731
- onSubmission: _optionalChain([hooks, 'optionalAccess', _473 => _473.onSubmission]),
13732
- onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _474 => _474.onRunAdmitted]),
13738
+ onRunStarted: _optionalChain([hooks, 'optionalAccess', _469 => _469.onRunStarted]),
13739
+ onSubmission: _optionalChain([hooks, 'optionalAccess', _470 => _470.onSubmission]),
13740
+ onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _471 => _471.onRunAdmitted]),
13733
13741
  maintenancePolicy: options.maintenancePolicy,
13734
13742
  ...options.runIdFile ? {} : { fullJson: options.fullJson },
13735
13743
  ...cliAdmission ? {
@@ -13757,7 +13765,7 @@ async function handleFileBackedRun(options, hooks) {
13757
13765
  ),
13758
13766
  options
13759
13767
  );
13760
- _optionalChain([hooks, 'optionalAccess', _475 => _475.onTerminalStatus, 'optionalCall', _476 => _476(outputStatus)]);
13768
+ _optionalChain([hooks, 'optionalAccess', _472 => _472.onTerminalStatus, 'optionalCall', _473 => _473(outputStatus)]);
13761
13769
  traceCliSync(
13762
13770
  "cli.play_write_result",
13763
13771
  { targetKind: "file", playName },
@@ -13769,16 +13777,16 @@ async function handleFileBackedRun(options, hooks) {
13769
13777
  return outputStatus.status === "completed" ? 0 : 1;
13770
13778
  }
13771
13779
  progress.phase("starting run");
13772
- const started = await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
13780
+ const started = await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
13773
13781
  "cli.play_start_unwatched",
13774
13782
  { targetKind: "file", playName },
13775
- () => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _477 => _477.onSubmission]) }).catch(async (error) => {
13783
+ () => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _474 => _474.onSubmission]) }).catch(async (error) => {
13776
13784
  throw await normalizePlayStartError(client, error, playName);
13777
13785
  })
13778
13786
  );
13779
- await _optionalChain([hooks, 'optionalAccess', _478 => _478.onRunStarted, 'optionalCall', _479 => _479(started.workflowId)]);
13780
- await _optionalChain([hooks, 'optionalAccess', _480 => _480.onRunAdmitted, 'optionalCall', _481 => _481(started.workflowId)]);
13781
- const resolvedDashboardUrl = _chunkBQR6UN3Cjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
13787
+ await _optionalChain([hooks, 'optionalAccess', _475 => _475.onRunStarted, 'optionalCall', _476 => _476(started.workflowId)]);
13788
+ await _optionalChain([hooks, 'optionalAccess', _477 => _477.onRunAdmitted, 'optionalCall', _478 => _478(started.workflowId)]);
13789
+ const resolvedDashboardUrl = _chunkVUYUI35Qjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
13782
13790
  openPlayDashboard(resolvedDashboardUrl, options.open);
13783
13791
  progress.phase("started run");
13784
13792
  progress.complete();
@@ -13805,7 +13813,7 @@ async function resolveNamedRunRevisionId(input) {
13805
13813
  if (input.selector === "latest") {
13806
13814
  const versions = await input.client.listPlayVersions(input.playName);
13807
13815
  const latest = versions[0];
13808
- if (!_optionalChain([latest, 'optionalAccess', _482 => _482._id])) {
13816
+ if (!_optionalChain([latest, 'optionalAccess', _479 => _479._id])) {
13809
13817
  throw new Error(`No saved revisions found for ${input.playName}.`);
13810
13818
  }
13811
13819
  return latest._id;
@@ -13816,12 +13824,12 @@ async function handleNamedRun(options, hooks) {
13816
13824
  if (options.target.kind !== "name") {
13817
13825
  throw new Error("Expected a named play run target.");
13818
13826
  }
13819
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)(playRunClientOptions(options));
13820
- let cliAdmission = _chunkUQQRMCOLjs.usesInlinePlayAdmission.call(void 0,
13827
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)(playRunClientOptions(options));
13828
+ let cliAdmission = _chunkUTF57UBWjs.usesInlinePlayAdmission.call(void 0,
13821
13829
  "plays run",
13822
13830
  process.argv.slice(2)
13823
13831
  );
13824
- const progress = _nullishCoalesce(_chunkOZHPZCAUjs.getActiveCliProgress.call(void 0, ), () => ( _chunkOZHPZCAUjs.createCliProgress.call(void 0, !options.jsonOutput)));
13832
+ const progress = _nullishCoalesce(_chunkF3MMA7JYjs.getActiveCliProgress.call(void 0, ), () => ( _chunkF3MMA7JYjs.createCliProgress.call(void 0, !options.jsonOutput)));
13825
13833
  const playName = options.target.name;
13826
13834
  const runtimeInput = options.input ? { ...options.input } : {};
13827
13835
  try {
@@ -13836,14 +13844,14 @@ async function handleNamedRun(options, hooks) {
13836
13844
  });
13837
13845
  const playDetail = needsPlayDefinition ? await (async () => {
13838
13846
  progress.phase("loading play definition");
13839
- return _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
13847
+ return _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
13840
13848
  "cli.play_load_definition",
13841
13849
  { targetKind: "name", playName, skipped: false },
13842
13850
  () => assertCanonicalNamedPlayReference(client, playName, {
13843
13851
  command: "run"
13844
13852
  })
13845
13853
  );
13846
- })() : (_chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
13854
+ })() : (_chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
13847
13855
  phase: "cli.play_load_definition",
13848
13856
  ms: 0,
13849
13857
  ok: true,
@@ -13852,7 +13860,7 @@ async function handleNamedRun(options, hooks) {
13852
13860
  skipped: true
13853
13861
  }), null);
13854
13862
  progress.phase("selecting revision");
13855
- const selectedRevisionId = await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
13863
+ const selectedRevisionId = await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
13856
13864
  "cli.play_select_revision",
13857
13865
  {
13858
13866
  targetKind: "name",
@@ -13877,10 +13885,10 @@ async function handleNamedRun(options, hooks) {
13877
13885
  ..._chunk2H4EY7KHjs.fileInputBindingsFromStaticPipeline.call(void 0, playDetail.play.staticPipeline)
13878
13886
  ] : [];
13879
13887
  if (cliAdmission && fileInputBindings.length > 0) {
13880
- await _chunkUQQRMCOLjs.checkPlayRunCompatibility.call(void 0, client.baseUrl, options.maintenancePolicy);
13888
+ await _chunkUTF57UBWjs.checkPlayRunCompatibility.call(void 0, client.baseUrl, options.maintenancePolicy);
13881
13889
  cliAdmission = false;
13882
13890
  }
13883
- const stagedFileInputs = await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
13891
+ const stagedFileInputs = await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
13884
13892
  "cli.play_stage_inputs",
13885
13893
  {
13886
13894
  targetKind: "name",
@@ -13924,7 +13932,7 @@ async function handleNamedRun(options, hooks) {
13924
13932
  });
13925
13933
  if (options.watch) {
13926
13934
  progress.phase("starting run");
13927
- const finalStatus = await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
13935
+ const finalStatus = await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
13928
13936
  "cli.play_start_watch",
13929
13937
  { targetKind: "name", playName },
13930
13938
  () => (options.runIdFile || cliAdmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
@@ -13938,9 +13946,9 @@ async function handleNamedRun(options, hooks) {
13938
13946
  waitTimeoutMs: options.waitTimeoutMs,
13939
13947
  open: options.open,
13940
13948
  progress,
13941
- onRunStarted: _optionalChain([hooks, 'optionalAccess', _483 => _483.onRunStarted]),
13942
- onSubmission: _optionalChain([hooks, 'optionalAccess', _484 => _484.onSubmission]),
13943
- onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _485 => _485.onRunAdmitted]),
13949
+ onRunStarted: _optionalChain([hooks, 'optionalAccess', _480 => _480.onRunStarted]),
13950
+ onSubmission: _optionalChain([hooks, 'optionalAccess', _481 => _481.onSubmission]),
13951
+ onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _482 => _482.onRunAdmitted]),
13944
13952
  maintenancePolicy: options.maintenancePolicy,
13945
13953
  ...options.runIdFile ? {} : { fullJson: options.fullJson },
13946
13954
  ...cliAdmission ? {
@@ -13971,7 +13979,7 @@ async function handleNamedRun(options, hooks) {
13971
13979
  options,
13972
13980
  _nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
13973
13981
  );
13974
- _optionalChain([hooks, 'optionalAccess', _486 => _486.onTerminalStatus, 'optionalCall', _487 => _487(outputStatus)]);
13982
+ _optionalChain([hooks, 'optionalAccess', _483 => _483.onTerminalStatus, 'optionalCall', _484 => _484(outputStatus)]);
13975
13983
  traceCliSync(
13976
13984
  "cli.play_write_result",
13977
13985
  { targetKind: "name", playName },
@@ -13983,18 +13991,18 @@ async function handleNamedRun(options, hooks) {
13983
13991
  return outputStatus.status === "completed" ? 0 : 1;
13984
13992
  }
13985
13993
  progress.phase("starting run");
13986
- const started = await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
13994
+ const started = await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
13987
13995
  "cli.play_start_unwatched",
13988
13996
  { targetKind: "name", playName },
13989
- () => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _488 => _488.onSubmission]) }).catch(async (error) => {
13997
+ () => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _485 => _485.onSubmission]) }).catch(async (error) => {
13990
13998
  throw await normalizePlayStartError(client, error, playName, {
13991
13999
  suggestMissingPlay: true
13992
14000
  });
13993
14001
  })
13994
14002
  );
13995
- await _optionalChain([hooks, 'optionalAccess', _489 => _489.onRunStarted, 'optionalCall', _490 => _490(started.workflowId)]);
13996
- await _optionalChain([hooks, 'optionalAccess', _491 => _491.onRunAdmitted, 'optionalCall', _492 => _492(started.workflowId)]);
13997
- const resolvedDashboardUrl = _chunkBQR6UN3Cjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
14003
+ await _optionalChain([hooks, 'optionalAccess', _486 => _486.onRunStarted, 'optionalCall', _487 => _487(started.workflowId)]);
14004
+ await _optionalChain([hooks, 'optionalAccess', _488 => _488.onRunAdmitted, 'optionalCall', _489 => _489(started.workflowId)]);
14005
+ const resolvedDashboardUrl = _chunkVUYUI35Qjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
13998
14006
  openPlayDashboard(resolvedDashboardUrl, options.open);
13999
14007
  progress.phase("started run");
14000
14008
  progress.complete();
@@ -14032,7 +14040,7 @@ async function handlePlayRun(args, hooks) {
14032
14040
  JSON.stringify({
14033
14041
  version: 1,
14034
14042
  admissionState: "submitted_unknown",
14035
- baseUrl: new (0, _chunkWGO2DY4Ljs.DeeplineClient)().baseUrl,
14043
+ baseUrl: new (0, _chunkM2VXDQI2js.DeeplineClient)().baseUrl,
14036
14044
  ...intent
14037
14045
  })
14038
14046
  );
@@ -14044,7 +14052,7 @@ async function handlePlayRun(args, hooks) {
14044
14052
  } finally {
14045
14053
  await removeRunIdTempFile(tempPath);
14046
14054
  }
14047
- await _optionalChain([hooks, 'optionalAccess', _493 => _493.onSubmission, 'optionalCall', _494 => _494(intent)]);
14055
+ await _optionalChain([hooks, 'optionalAccess', _490 => _490.onSubmission, 'optionalCall', _491 => _491(intent)]);
14048
14056
  },
14049
14057
  onRunStarted: async (runId) => {
14050
14058
  try {
@@ -14055,7 +14063,7 @@ async function handlePlayRun(args, hooks) {
14055
14063
  { cause: error }
14056
14064
  );
14057
14065
  }
14058
- await _optionalChain([hooks, 'optionalAccess', _495 => _495.onRunStarted, 'optionalCall', _496 => _496(runId)]);
14066
+ await _optionalChain([hooks, 'optionalAccess', _492 => _492.onRunStarted, 'optionalCall', _493 => _493(runId)]);
14059
14067
  },
14060
14068
  onRunAdmitted: async (runId) => {
14061
14069
  try {
@@ -14068,7 +14076,7 @@ async function handlePlayRun(args, hooks) {
14068
14076
  { cause: error }
14069
14077
  );
14070
14078
  }
14071
- await _optionalChain([hooks, 'optionalAccess', _497 => _497.onRunAdmitted, 'optionalCall', _498 => _498(runId)]);
14079
+ await _optionalChain([hooks, 'optionalAccess', _494 => _494.onRunAdmitted, 'optionalCall', _495 => _495(runId)]);
14072
14080
  }
14073
14081
  } : hooks;
14074
14082
  if (options.target.kind === "file") {
@@ -14147,10 +14155,10 @@ function renderRunOverviewText(overview, extras = {}) {
14147
14155
  ...buildRunActivityTextLines(run),
14148
14156
  ...buildRunStatusEvidenceTextLines(overview)
14149
14157
  ];
14150
- if (_optionalChain([overview, 'access', _499 => _499.runStatus, 'optionalAccess', _500 => _500.available]) === false)
14158
+ if (_optionalChain([overview, 'access', _496 => _496.runStatus, 'optionalAccess', _497 => _497.available]) === false)
14151
14159
  lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
14152
- const work = readRecord(_optionalChain([readRecord, 'call', _501 => _501(run), 'optionalAccess', _502 => _502.work]));
14153
- if (work && !_optionalChain([overview, 'access', _503 => _503.runStatus, 'optionalAccess', _504 => _504.available]))
14160
+ const work = readRecord(_optionalChain([readRecord, 'call', _498 => _498(run), 'optionalAccess', _499 => _499.work]));
14161
+ if (work && !_optionalChain([overview, 'access', _500 => _500.runStatus, 'optionalAccess', _501 => _501.available]))
14154
14162
  lines.push(
14155
14163
  ` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
14156
14164
  );
@@ -14201,7 +14209,7 @@ function renderRunOverviewText(overview, extras = {}) {
14201
14209
  ...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
14202
14210
  ...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
14203
14211
  ...overview.failedLogs.entries,
14204
- ..._optionalChain([overview, 'access', _505 => _505.failedLogs, 'access', _506 => _506.next, 'optionalAccess', _507 => _507.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
14212
+ ..._optionalChain([overview, 'access', _502 => _502.failedLogs, 'access', _503 => _503.next, 'optionalAccess', _504 => _504.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
14205
14213
  ]
14206
14214
  });
14207
14215
  sections.push({
@@ -14261,7 +14269,7 @@ function renderRunOverviewText(overview, extras = {}) {
14261
14269
  );
14262
14270
  return `${lines.join("\n")}
14263
14271
 
14264
- ${_chunkAYM2KZN3js.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
14272
+ ${_chunkDD6MM6WXjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
14265
14273
  }
14266
14274
  var RUN_READ_TIMING_PROGRESS_INTERVAL_MS = 15e3;
14267
14275
  async function withRunReadTiming(command, stage, enabled, action) {
@@ -14272,7 +14280,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
14272
14280
  const progressTimer = setInterval(() => {
14273
14281
  console.error(`[${command}] ${stage} still running after ${elapsedMs()}ms`);
14274
14282
  }, RUN_READ_TIMING_PROGRESS_INTERVAL_MS);
14275
- _optionalChain([progressTimer, 'access', _508 => _508.unref, 'optionalCall', _509 => _509()]);
14283
+ _optionalChain([progressTimer, 'access', _505 => _505.unref, 'optionalCall', _506 => _506()]);
14276
14284
  try {
14277
14285
  const result = await action();
14278
14286
  console.error(`[${command}] ${stage} completed in ${elapsedMs()}ms`);
@@ -14285,7 +14293,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
14285
14293
  }
14286
14294
  }
14287
14295
  async function handleRunGet(args) {
14288
- const selection = _chunkAYM2KZN3js.parseJsonFields.call(void 0,
14296
+ const selection = _chunkDD6MM6WXjs.parseJsonFields.call(void 0,
14289
14297
  args,
14290
14298
  args.includes("--config") ? "config" : "get"
14291
14299
  );
@@ -14298,7 +14306,7 @@ async function handleRunGet(args) {
14298
14306
  console.error(error instanceof Error ? error.message : usage2);
14299
14307
  return 1;
14300
14308
  }
14301
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
14309
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
14302
14310
  const timing = args.includes("--timing");
14303
14311
  if (args.includes("--web-url")) {
14304
14312
  const status2 = await withRunReadTiming(
@@ -14312,8 +14320,8 @@ async function handleRunGet(args) {
14312
14320
  console.error(`Run ${runId} does not name its play; no play page URL.`);
14313
14321
  return 1;
14314
14322
  }
14315
- const dashboardUrl2 = _chunkBQR6UN3Cjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName2);
14316
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
14323
+ const dashboardUrl2 = _chunkVUYUI35Qjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName2);
14324
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
14317
14325
  { dashboardUrl: dashboardUrl2 },
14318
14326
  { json: args.includes("--json"), text: `${dashboardUrl2}
14319
14327
  ` }
@@ -14338,7 +14346,7 @@ async function handleRunGet(args) {
14338
14346
  "This server does not support recorded configuration reads."
14339
14347
  );
14340
14348
  }
14341
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
14349
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
14342
14350
  { runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
14343
14351
  { json: true, fields: selection.fields }
14344
14352
  );
@@ -14351,7 +14359,7 @@ async function handleRunGet(args) {
14351
14359
  timing,
14352
14360
  () => client.getRunInput(runId)
14353
14361
  );
14354
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0, input, { json: true });
14362
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0, input, { json: true });
14355
14363
  return 0;
14356
14364
  }
14357
14365
  const full = args.includes("--full");
@@ -14364,7 +14372,7 @@ async function handleRunGet(args) {
14364
14372
  failedLogs: args.includes("--log-failed")
14365
14373
  })
14366
14374
  );
14367
- if (status.package) _chunk27GJKC5Qjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
14375
+ if (status.package) _chunkGXOQRZXGjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
14368
14376
  if (!status.package) {
14369
14377
  const legacyStatus = full ? await withRunReadTiming(
14370
14378
  "runs get",
@@ -14376,9 +14384,9 @@ async function handleRunGet(args) {
14376
14384
  })
14377
14385
  ) : status;
14378
14386
  const legacyPlayName = resolveRunPlayName(legacyStatus, runId);
14379
- const legacyDashboardUrl = legacyPlayName ? _chunkBQR6UN3Cjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, legacyPlayName) : null;
14380
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
14381
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
14387
+ const legacyDashboardUrl = legacyPlayName ? _chunkVUYUI35Qjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, legacyPlayName) : null;
14388
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
14389
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
14382
14390
  {
14383
14391
  ...full ? legacyStatus : compactPlayStatus(legacyStatus),
14384
14392
  ...legacyDashboardUrl ? { dashboardUrl: legacyDashboardUrl } : {}
@@ -14388,7 +14396,7 @@ async function handleRunGet(args) {
14388
14396
  } else {
14389
14397
  writePlayResult(legacyStatus, false, { fullJson: full });
14390
14398
  if (legacyDashboardUrl)
14391
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
14399
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
14392
14400
  { dashboardUrl: legacyDashboardUrl },
14393
14401
  { json: false, text: `play page: ${legacyDashboardUrl}
14394
14402
  ` }
@@ -14418,10 +14426,10 @@ async function handleRunGet(args) {
14418
14426
  )
14419
14427
  ]);
14420
14428
  const hitLines = formatRunHitsLines(hits);
14421
- const json = _chunkAYM2KZN3js.argsWantJson.call(void 0, args);
14429
+ const json = _chunkDD6MM6WXjs.argsWantJson.call(void 0, args);
14422
14430
  const playName = resolveRunPlayName(status, runId);
14423
- const dashboardUrl = playName ? _chunkBQR6UN3Cjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) : void 0;
14424
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
14431
+ const dashboardUrl = playName ? _chunkVUYUI35Qjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) : void 0;
14432
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
14425
14433
  {
14426
14434
  ...overview,
14427
14435
  ...dashboardUrl ? { dashboardUrl } : {},
@@ -14525,9 +14533,9 @@ async function handleRunLifecycleStatus(args) {
14525
14533
  console.error(error instanceof Error ? error.message : usage2);
14526
14534
  return 1;
14527
14535
  }
14528
- const status = await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().runs.status(runId);
14529
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
14530
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0, status, { json: true });
14536
+ const status = await new (0, _chunkM2VXDQI2js.DeeplineClient)().runs.status(runId);
14537
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
14538
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0, status, { json: true });
14531
14539
  return 0;
14532
14540
  }
14533
14541
  if (!status.available) {
@@ -14567,7 +14575,7 @@ async function handleRunsRerun(args) {
14567
14575
  console.error(error instanceof Error ? error.message : usage2);
14568
14576
  return 1;
14569
14577
  }
14570
- const options = { json: _chunkAYM2KZN3js.argsWantJson.call(void 0, args) };
14578
+ const options = { json: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args) };
14571
14579
  for (let index = 0; index < args.length; index += 1) {
14572
14580
  if (args[index] === "--idempotency-key") {
14573
14581
  options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
@@ -14633,8 +14641,8 @@ ${usage2}
14633
14641
  Discover Plays: ${next.discover}
14634
14642
  Active runs: ${next.running}`
14635
14643
  );
14636
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
14637
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
14644
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
14645
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
14638
14646
  { ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
14639
14647
  { json: true }
14640
14648
  );
@@ -14649,7 +14657,7 @@ Active runs: ${next.running}`
14649
14657
  console.error("--offset requires --play.");
14650
14658
  return 1;
14651
14659
  }
14652
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
14660
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
14653
14661
  const page = await withRunReadTiming(
14654
14662
  "runs list",
14655
14663
  "run inventory",
@@ -14684,7 +14692,7 @@ Active runs: ${next.running}`
14684
14692
  executionTime: run.executionTime,
14685
14693
  billingTotalCredits: run.billingTotalCredits,
14686
14694
  billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
14687
- playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _510 => _510.memo, 'optionalAccess', _511 => _511.playName]))), () => ( playName)), () => ( null)),
14695
+ playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _507 => _507.memo, 'optionalAccess', _508 => _508.playName]))), () => ( playName)), () => ( null)),
14688
14696
  ...nodeId ? { nodeObservation: _nullishCoalesce(run.nodeObservation, () => ( null)) } : {}
14689
14697
  }));
14690
14698
  const lines = runs.length === 0 ? [
@@ -14716,14 +14724,14 @@ Active runs: ${next.running}`
14716
14724
  return lines2.join("\n");
14717
14725
  });
14718
14726
  const nextOffset = (_nullishCoalesce(_nullishCoalesce(page.offset, () => ( offset)), () => ( 0))) + runs.length;
14719
- 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}${_chunkAYM2KZN3js.argsWantJson.call(void 0, args) ? " --json" : ""}` : null;
14727
+ 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}${_chunkDD6MM6WXjs.argsWantJson.call(void 0, args) ? " --json" : ""}` : null;
14720
14728
  if (page.hasMore) {
14721
14729
  lines.push("List truncated \u2014 more runs match this filter.");
14722
14730
  lines.push(
14723
14731
  nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
14724
14732
  );
14725
14733
  }
14726
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
14734
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
14727
14735
  {
14728
14736
  runs,
14729
14737
  count: runs.length,
@@ -14733,11 +14741,11 @@ Active runs: ${next.running}`
14733
14741
  ...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
14734
14742
  next: {
14735
14743
  page: nextPage,
14736
- get: _optionalChain([runs, 'access', _512 => _512[0], 'optionalAccess', _513 => _513.id]) ? `deepline runs get ${runs[0].id}` : null
14744
+ get: _optionalChain([runs, 'access', _509 => _509[0], 'optionalAccess', _510 => _510.id]) ? `deepline runs get ${runs[0].id}` : null
14737
14745
  },
14738
14746
  render: { sections: [{ title: "runs", lines }] }
14739
14747
  },
14740
- { json: _chunkAYM2KZN3js.argsWantJson.call(void 0, args) }
14748
+ { json: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args) }
14741
14749
  );
14742
14750
  return 0;
14743
14751
  }
@@ -14767,7 +14775,7 @@ async function handleRunTail(args) {
14767
14775
  console.error("--log-level requires one of: debug, info, warn, error.");
14768
14776
  return 1;
14769
14777
  }
14770
- const parsed = _chunkWGO2DY4Ljs.parseLogLevel.call(void 0, value);
14778
+ const parsed = _chunkM2VXDQI2js.parseLogLevel.call(void 0, value);
14771
14779
  if (!parsed) {
14772
14780
  console.error(
14773
14781
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -14805,9 +14813,9 @@ async function handleRunTail(args) {
14805
14813
  );
14806
14814
  return 1;
14807
14815
  }
14808
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
14816
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
14809
14817
  const jsonLines = args.includes("--jsonl");
14810
- const jsonOutput = !jsonLines && _chunkAYM2KZN3js.argsWantJson.call(void 0, args);
14818
+ const jsonOutput = !jsonLines && _chunkDD6MM6WXjs.argsWantJson.call(void 0, args);
14811
14819
  const compact = args.includes("--compact");
14812
14820
  const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
14813
14821
  const compactState = {
@@ -14888,7 +14896,7 @@ async function handleRunLogs(args) {
14888
14896
  ]);
14889
14897
  const cursorIndex = args.indexOf("--cursor");
14890
14898
  const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
14891
- const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkWGO2DY4Ljs.isRunLogsCursor.call(void 0, cursorValue));
14899
+ const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkM2VXDQI2js.isRunLogsCursor.call(void 0, cursorValue));
14892
14900
  if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
14893
14901
  return handleRunEventSearch(args);
14894
14902
  }
@@ -14922,7 +14930,7 @@ async function handleRunLogs(args) {
14922
14930
  console.error("--log-level requires one of: debug, info, warn, error.");
14923
14931
  return 1;
14924
14932
  }
14925
- const parsed = _chunkWGO2DY4Ljs.parseLogLevel.call(void 0, value);
14933
+ const parsed = _chunkM2VXDQI2js.parseLogLevel.call(void 0, value);
14926
14934
  if (!parsed) {
14927
14935
  console.error(
14928
14936
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -14969,12 +14977,12 @@ async function handleRunLogs(args) {
14969
14977
  );
14970
14978
  return 1;
14971
14979
  }
14972
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
14980
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
14973
14981
  if (outPath) {
14974
14982
  const result2 = await client.runs.logs(runId, { all: true });
14975
- const logs = result2.entries.filter((line) => _chunkWGO2DY4Ljs.logLevelReaches.call(void 0, _chunkWGO2DY4Ljs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkWGO2DY4Ljs.classifyLogLine.call(void 0, line).line);
14983
+ const logs = result2.entries.filter((line) => _chunkM2VXDQI2js.logLevelReaches.call(void 0, _chunkM2VXDQI2js.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkM2VXDQI2js.classifyLogLine.call(void 0, line).line);
14976
14984
  _fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
14977
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
14985
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
14978
14986
  {
14979
14987
  runId: result2.runId,
14980
14988
  log_path: outPath,
@@ -14997,7 +15005,7 @@ async function handleRunLogs(args) {
14997
15005
  ]
14998
15006
  }
14999
15007
  },
15000
- { json: _chunkAYM2KZN3js.argsWantJson.call(void 0, args) }
15008
+ { json: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args) }
15001
15009
  );
15002
15010
  return 0;
15003
15011
  }
@@ -15028,7 +15036,7 @@ async function handleRunLogs(args) {
15028
15036
  }
15029
15037
  };
15030
15038
  const text = buildRunLogsText(filteredResult);
15031
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
15039
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
15032
15040
  {
15033
15041
  runId: result.runId,
15034
15042
  totalCount: result.totalCount,
@@ -15052,7 +15060,7 @@ async function handleRunLogs(args) {
15052
15060
  render: { sections: [{ title: "run logs", lines: entries }] }
15053
15061
  },
15054
15062
  {
15055
- json: _chunkAYM2KZN3js.argsWantJson.call(void 0, args),
15063
+ json: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args),
15056
15064
  text
15057
15065
  }
15058
15066
  );
@@ -15076,17 +15084,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
15076
15084
  );
15077
15085
  }
15078
15086
  const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
15079
- (entry) => _chunkWGO2DY4Ljs.logLevelReaches.call(void 0, _chunkWGO2DY4Ljs.classifyLogLine.call(void 0, entry.line).level, logLevel)
15087
+ (entry) => _chunkM2VXDQI2js.logLevelReaches.call(void 0, _chunkM2VXDQI2js.classifyLogLine.call(void 0, entry.line).level, logLevel)
15080
15088
  );
15081
15089
  const selected = matching.slice(-limit);
15082
15090
  const olderMatchesExist = matching.length > selected.length;
15083
15091
  return {
15084
15092
  entries: selected.map((entry) => entry.line),
15085
- firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _514 => _514[0], 'optionalAccess', _515 => _515.seq]), () => ( null)),
15086
- lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _516 => _516.at, 'call', _517 => _517(-1), 'optionalAccess', _518 => _518.seq]), () => ( null)),
15093
+ firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _511 => _511[0], 'optionalAccess', _512 => _512.seq]), () => ( null)),
15094
+ lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _513 => _513.at, 'call', _514 => _514(-1), 'optionalAccess', _515 => _515.seq]), () => ( null)),
15087
15095
  truncated: result.truncated || olderMatchesExist,
15088
15096
  hasMore: olderMatchesExist,
15089
- nextCursor: olderMatchesExist ? _chunkWGO2DY4Ljs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
15097
+ nextCursor: olderMatchesExist ? _chunkM2VXDQI2js.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
15090
15098
  };
15091
15099
  }
15092
15100
  async function handleRunEventSearch(args) {
@@ -15153,7 +15161,7 @@ ${usage2}`);
15153
15161
  namespace,
15154
15162
  ...backend ? { backend } : {}
15155
15163
  } : void 0;
15156
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
15164
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
15157
15165
  const result = await client.runs.searchEvents({
15158
15166
  ...runId ? { runId } : {},
15159
15167
  ...values["--since"] ? { since: values["--since"] } : {},
@@ -15225,7 +15233,7 @@ ${renderedDetails}` : ""}`;
15225
15233
  "--limit",
15226
15234
  String(limit)
15227
15235
  ].join(" ") : null;
15228
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
15236
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
15229
15237
  {
15230
15238
  events,
15231
15239
  nextCursor: result.nextCursor,
@@ -15236,19 +15244,19 @@ ${renderedDetails}` : ""}`;
15236
15244
  render: { sections: [{ title: "runtime events", lines }] }
15237
15245
  },
15238
15246
  {
15239
- json: _chunkAYM2KZN3js.argsWantJson.call(void 0, args),
15247
+ json: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args),
15240
15248
  text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
15241
15249
  }
15242
15250
  );
15243
15251
  return 0;
15244
15252
  }
15245
15253
  function buildRunLogsText(result) {
15246
- const lines = result.entries.map((line) => _chunkWGO2DY4Ljs.classifyLogLine.call(void 0, line).line);
15254
+ const lines = result.entries.map((line) => _chunkM2VXDQI2js.classifyLogLine.call(void 0, line).line);
15247
15255
  if (result.warning) {
15248
15256
  if (lines.length > 0) lines.push("");
15249
15257
  lines.push(`warning: ${result.warning}`);
15250
15258
  lines.push(
15251
- `retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _519 => _519.next, 'optionalAccess', _520 => _520.logs]), () => ( `deepline runs logs ${result.runId} --out run.log`))}`
15259
+ `retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _516 => _516.next, 'optionalAccess', _517 => _517.logs]), () => ( `deepline runs logs ${result.runId} --out run.log`))}`
15252
15260
  );
15253
15261
  }
15254
15262
  return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
@@ -15277,7 +15285,7 @@ async function handleRunStop(args) {
15277
15285
  reason = args[++index];
15278
15286
  }
15279
15287
  }
15280
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
15288
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
15281
15289
  const result = await client.runs.stop(runId, { reason });
15282
15290
  const state = resolveRunStopState(result);
15283
15291
  const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
@@ -15292,7 +15300,7 @@ async function handleRunStop(args) {
15292
15300
  ...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
15293
15301
  `inspect: deepline runs get ${runId} --full`
15294
15302
  ];
15295
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
15303
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
15296
15304
  {
15297
15305
  ...cancelling,
15298
15306
  state,
@@ -15307,7 +15315,7 @@ async function handleRunStop(args) {
15307
15315
  ]
15308
15316
  }
15309
15317
  },
15310
- { json: _chunkAYM2KZN3js.argsWantJson.call(void 0, args) }
15318
+ { json: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args) }
15311
15319
  );
15312
15320
  return 0;
15313
15321
  }
@@ -15324,7 +15332,7 @@ async function handleRunStop(args) {
15324
15332
  ];
15325
15333
  process.stderr.write(`${lines2.join("\n")}
15326
15334
  `);
15327
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
15335
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
15328
15336
  {
15329
15337
  ...result,
15330
15338
  render: {
@@ -15339,7 +15347,7 @@ async function handleRunStop(args) {
15339
15347
  ]
15340
15348
  }
15341
15349
  },
15342
- { json: _chunkAYM2KZN3js.argsWantJson.call(void 0, args) }
15350
+ { json: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args) }
15343
15351
  );
15344
15352
  return 1;
15345
15353
  }
@@ -15350,12 +15358,12 @@ async function handleRunStop(args) {
15350
15358
  `warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
15351
15359
  ] : []
15352
15360
  ];
15353
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
15361
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
15354
15362
  {
15355
15363
  ...result,
15356
15364
  render: { sections: [{ title: "run stop", lines }] }
15357
15365
  },
15358
- { json: _chunkAYM2KZN3js.argsWantJson.call(void 0, args) }
15366
+ { json: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args) }
15359
15367
  );
15360
15368
  return 0;
15361
15369
  }
@@ -15405,18 +15413,18 @@ async function handleRunStopAll(args) {
15405
15413
  reason = args[++index];
15406
15414
  }
15407
15415
  }
15408
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
15416
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
15409
15417
  if (dryRun) {
15410
15418
  const result2 = await client.runs.stopAll({ dryRun: true, reason });
15411
15419
  const lines2 = buildStopAllDryRunTextLines(result2);
15412
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
15420
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
15413
15421
  {
15414
15422
  ...result2,
15415
15423
  render: {
15416
15424
  sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
15417
15425
  }
15418
15426
  },
15419
- { json: _chunkAYM2KZN3js.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
15427
+ { json: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
15420
15428
  ` }
15421
15429
  );
15422
15430
  return 0;
@@ -15429,17 +15437,17 @@ async function handleRunStopAll(args) {
15429
15437
  ...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
15430
15438
  ...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
15431
15439
  ];
15432
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
15440
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
15433
15441
  {
15434
15442
  ...result,
15435
15443
  render: { sections: [{ title: "workspace stop-all", lines }] }
15436
15444
  },
15437
- { json: _chunkAYM2KZN3js.argsWantJson.call(void 0, args) }
15445
+ { json: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args) }
15438
15446
  );
15439
15447
  return result.failed > 0 || result.partial ? 1 : 0;
15440
15448
  }
15441
15449
  async function handleRunExport(args) {
15442
- const selection = _chunkAYM2KZN3js.parseJsonFields.call(void 0, args, "export");
15450
+ const selection = _chunkDD6MM6WXjs.parseJsonFields.call(void 0, args, "export");
15443
15451
  args = selection.args;
15444
15452
  const usage2 = "Usage: deepline runs export <run-id> [--dataset result.rows] --out <path> [--format csv|json] [--wait] [--timeout-ms 300000] [--metadata-out export.json] [--allow-empty] [--json]";
15445
15453
  let runId;
@@ -15498,17 +15506,17 @@ async function handleRunExport(args) {
15498
15506
  "INVALID_ARGUMENT"
15499
15507
  );
15500
15508
  }
15501
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
15509
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
15502
15510
  let status = await client.getPlayStatus(runId, { full: true });
15503
15511
  assertRunExportStatusIdentity(status, runId);
15504
15512
  if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
15505
- const progress = _chunkOZHPZCAUjs.createCliProgress.call(void 0, !_chunkAYM2KZN3js.argsWantJson.call(void 0, args));
15513
+ const progress = _chunkF3MMA7JYjs.createCliProgress.call(void 0, !_chunkDD6MM6WXjs.argsWantJson.call(void 0, args));
15506
15514
  try {
15507
15515
  await waitForPlayCompletionByWatch({
15508
15516
  client,
15509
15517
  playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
15510
15518
  workflowId: runId,
15511
- jsonOutput: _chunkAYM2KZN3js.argsWantJson.call(void 0, args),
15519
+ jsonOutput: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args),
15512
15520
  emitLogs: false,
15513
15521
  waitTimeoutMs,
15514
15522
  startedAt: Date.now(),
@@ -15533,26 +15541,26 @@ async function handleRunExport(args) {
15533
15541
  allowEmpty: args.includes("--allow-empty"),
15534
15542
  format
15535
15543
  });
15536
- const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _521 => _521.rowsInfo, 'access', _522 => _522.source]), () => ( datasetPath)), () => ( null));
15537
- const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _523 => _523.currentTable]) ? {
15544
+ const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _518 => _518.rowsInfo, 'access', _519 => _519.source]), () => ( datasetPath)), () => ( null));
15545
+ const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _520 => _520.currentTable]) ? {
15538
15546
  code: "CURRENT_SHARED_DATASET",
15539
15547
  message: "This export is the current shared dataset and may include writes from another run.",
15540
15548
  full_run_output_command: `deepline runs get ${status.runId} --full`
15541
15549
  } : null;
15542
15550
  const navigation = buildRunNavigation(status);
15543
- const resolved = _optionalChain([exportResult, 'optionalAccess', _524 => _524.datasetInfo]);
15551
+ const resolved = _optionalChain([exportResult, 'optionalAccess', _521 => _521.datasetInfo]);
15544
15552
  const identity = navigation.datasets.find(
15545
- (dataset) => _optionalChain([resolved, 'optionalAccess', _525 => _525.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _526 => _526.tableNamespace])
15553
+ (dataset) => _optionalChain([resolved, 'optionalAccess', _522 => _522.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _523 => _523.tableNamespace])
15546
15554
  );
15547
15555
  const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
15548
15556
  const exportCommand = runExportRetryCommand(
15549
15557
  status.runId,
15550
15558
  outPath,
15551
- _nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _527 => _527.datasetPath]))),
15559
+ _nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _524 => _524.datasetPath]))),
15552
15560
  { format }
15553
15561
  ) + (args.includes("--allow-empty") ? " --allow-empty" : "");
15554
- const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _528 => _528.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _529 => _529.path]), () => ( null)) };
15555
- const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _530 => _530.rowsInfo, 'access', _531 => _531.exportedRowOutcomes]);
15562
+ const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _525 => _525.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _526 => _526.path]), () => ( null)) };
15563
+ const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _527 => _527.rowsInfo, 'access', _528 => _528.exportedRowOutcomes]);
15556
15564
  const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
15557
15565
  count: exportedRowOutcomes.failed,
15558
15566
  message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
@@ -15572,17 +15580,17 @@ async function handleRunExport(args) {
15572
15580
  ...fileLocation,
15573
15581
  format,
15574
15582
  source,
15575
- rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _532 => _532.rowsInfo, 'access', _533 => _533.totalRows]), () => ( null)),
15583
+ rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _529 => _529.rowsInfo, 'access', _530 => _530.totalRows]), () => ( null)),
15576
15584
  ...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
15577
15585
  ...rowFailures ? { rowFailures } : {},
15578
- columns: underscoreKeysLast(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _534 => _534.rowsInfo, 'access', _535 => _535.columns]), () => ( []))),
15586
+ columns: underscoreKeysLast(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _531 => _531.rowsInfo, 'access', _532 => _532.columns]), () => ( []))),
15579
15587
  ...currentTableNotice ? { notice: currentTableNotice } : {},
15580
15588
  ...metadataOutPath ? { metadata_path: metadataOutPath } : {},
15581
15589
  ...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
15582
15590
  };
15583
15591
  const lines = withRunNavigationLines(
15584
15592
  [
15585
- `Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _536 => _536.path]), () => ( outPath))}`,
15593
+ `Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _533 => _533.path]), () => ( outPath))}`,
15586
15594
  ...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
15587
15595
  `Partial export: run is ${status.status}; more rows may be saved.`,
15588
15596
  `Export after completion: ${exportCommand} --wait`
@@ -15609,8 +15617,8 @@ async function handleRunExport(args) {
15609
15617
  "utf-8"
15610
15618
  );
15611
15619
  }
15612
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0, payload, {
15613
- json: _chunkAYM2KZN3js.argsWantJson.call(void 0, args),
15620
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0, payload, {
15621
+ json: _chunkDD6MM6WXjs.argsWantJson.call(void 0, args),
15614
15622
  fields: selection.fields,
15615
15623
  text: `${lines.join("\n")}
15616
15624
  `
@@ -15644,10 +15652,10 @@ async function handlePlayGet(args) {
15644
15652
  );
15645
15653
  return 2;
15646
15654
  }
15647
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
15655
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
15648
15656
  const explicitJson = args.includes("--json");
15649
15657
  const sourceOutput = args.includes("--source");
15650
- const jsonOutput = sourceOutput ? explicitJson : _chunkAYM2KZN3js.argsWantJson.call(void 0, args);
15658
+ const jsonOutput = sourceOutput ? explicitJson : _chunkDD6MM6WXjs.argsWantJson.call(void 0, args);
15651
15659
  const requestedRevisionFlags = [
15652
15660
  args.includes("--working"),
15653
15661
  args.includes("--live"),
@@ -15697,7 +15705,7 @@ async function handlePlayGet(args) {
15697
15705
  ...includeSource ? { source: sourceSelector } : {}
15698
15706
  });
15699
15707
  const source = detail.source;
15700
- const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _537 => _537.files, 'access', _538 => _538[source.entryFile]]), () => ( ""));
15708
+ const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _534 => _534.files, 'access', _535 => _535[source.entryFile]]), () => ( ""));
15701
15709
  let materializedFile = null;
15702
15710
  try {
15703
15711
  materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
@@ -15707,7 +15715,7 @@ async function handlePlayGet(args) {
15707
15715
  }
15708
15716
  const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
15709
15717
  if (jsonOutput) {
15710
- _chunkAYM2KZN3js.printCompactJson.call(void 0, {
15718
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, {
15711
15719
  ...detail,
15712
15720
  ...materializedFile ? {
15713
15721
  message: loadedMessage,
@@ -15748,16 +15756,16 @@ async function handlePlayGet(args) {
15748
15756
  }
15749
15757
  console.log(`Play: ${formatPlayReference(detail.play)}`);
15750
15758
  console.log(
15751
- `Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _539 => _539.play, 'access', _540 => _540.workingRevision, 'optionalAccess', _541 => _541.version]), () => ( "\u2014"))}`
15759
+ `Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _536 => _536.play, 'access', _537 => _537.workingRevision, 'optionalAccess', _538 => _538.version]), () => ( "\u2014"))}`
15752
15760
  );
15753
- console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _542 => _542.play, 'access', _543 => _543.liveRevision, 'optionalAccess', _544 => _544.version]), () => ( "\u2014"))}`);
15761
+ console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _539 => _539.play, 'access', _540 => _540.liveRevision, 'optionalAccess', _541 => _541.version]), () => ( "\u2014"))}`);
15754
15762
  if (detail.play.liveRevision) {
15755
15763
  console.log(
15756
15764
  `Live max credits per run: ${liveMaxCreditsPerRun(detail.play.liveRevision.sourceCode)}`
15757
15765
  );
15758
15766
  }
15759
15767
  console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
15760
- if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _545 => _545.play, 'access', _546 => _546.liveRevision, 'optionalAccess', _547 => _547.version])) {
15768
+ if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _542 => _542.play, 'access', _543 => _543.liveRevision, 'optionalAccess', _544 => _544.version])) {
15761
15769
  console.log(
15762
15770
  ` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
15763
15771
  );
@@ -15769,7 +15777,7 @@ async function handlePlayGet(args) {
15769
15777
  console.log(line);
15770
15778
  }
15771
15779
  console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
15772
- console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _548 => _548.sheetSummary, 'optionalAccess', _549 => _549.stats, 'optionalAccess', _550 => _550.total]), () => ( 0))}`);
15780
+ console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _545 => _545.sheetSummary, 'optionalAccess', _546 => _546.stats, 'optionalAccess', _547 => _547.total]), () => ( 0))}`);
15773
15781
  if (detail.customerDbUrl) {
15774
15782
  console.log(`Customer DB: ${detail.customerDbUrl}`);
15775
15783
  }
@@ -15785,7 +15793,7 @@ async function handlePlayGet(args) {
15785
15793
  return 0;
15786
15794
  }
15787
15795
  function formatVersionLine(version) {
15788
- const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _551 => _551.artifactHash, 'optionalAccess', _552 => _552.slice, 'call', _553 => _553(0, 12)]), () => ( "unknown-revision"));
15796
+ const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _548 => _548.artifactHash, 'optionalAccess', _549 => _549.slice, 'call', _550 => _550(0, 12)]), () => ( "unknown-revision"));
15789
15797
  const state = [
15790
15798
  version.isLive ? "live" : null,
15791
15799
  version.isWorking ? "working" : null
@@ -15799,8 +15807,8 @@ async function handlePlayVersions(args) {
15799
15807
  console.error("Usage: deepline plays versions --name <name> [--json]");
15800
15808
  return 1;
15801
15809
  }
15802
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
15803
- const jsonOutput = _chunkAYM2KZN3js.argsWantJson.call(void 0, args);
15810
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
15811
+ const jsonOutput = _chunkDD6MM6WXjs.argsWantJson.call(void 0, args);
15804
15812
  await assertCanonicalNamedPlayReference(client, playName, {
15805
15813
  command: "versions"
15806
15814
  });
@@ -15808,7 +15816,7 @@ async function handlePlayVersions(args) {
15808
15816
  parseReferencedPlayTarget2(playName).playName
15809
15817
  );
15810
15818
  if (jsonOutput) {
15811
- _chunkAYM2KZN3js.printCompactJson.call(void 0, { versions });
15819
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, { versions });
15812
15820
  return 0;
15813
15821
  }
15814
15822
  if (versions.length === 0) {
@@ -15821,7 +15829,7 @@ async function handlePlayVersions(args) {
15821
15829
  return 0;
15822
15830
  }
15823
15831
  function formatPlayCostEstimate(estimate) {
15824
- const computeSummary = _optionalChain([estimate, 'optionalAccess', _554 => _554.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)` : "";
15832
+ const computeSummary = _optionalChain([estimate, 'optionalAccess', _551 => _551.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)` : "";
15825
15833
  if (!estimate || estimate.status === "unavailable") {
15826
15834
  return `unavailable${estimate ? `: ${estimate.message}${computeSummary}` : ""}`;
15827
15835
  }
@@ -15846,11 +15854,11 @@ var PREBUILT_PLAY_TAG_KEYS = [
15846
15854
  "signals"
15847
15855
  ];
15848
15856
  async function handlePlayList(args) {
15849
- const jsonOutput = _chunkAYM2KZN3js.argsWantJson.call(void 0, args);
15857
+ const jsonOutput = _chunkDD6MM6WXjs.argsWantJson.call(void 0, args);
15850
15858
  const showCost = args.includes("--show-cost");
15851
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
15859
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
15852
15860
  const categoriesIndex = args.indexOf("--categories");
15853
- const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _555 => _555[categoriesIndex + 1], 'optionalAccess', _556 => _556.trim, 'call', _557 => _557()]) : void 0;
15861
+ const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _552 => _552[categoriesIndex + 1], 'optionalAccess', _553 => _553.trim, 'call', _554 => _554()]) : void 0;
15854
15862
  const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
15855
15863
  if (args.includes("--tag") && tags.length === 0) {
15856
15864
  console.error(
@@ -15871,7 +15879,7 @@ async function handlePlayList(args) {
15871
15879
  const cursorIndex = args.indexOf("--cursor");
15872
15880
  const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
15873
15881
  const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
15874
- if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _558 => _558.trim, 'call', _559 => _559()])) {
15882
+ if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _555 => _555.trim, 'call', _556 => _556()])) {
15875
15883
  console.error("Pass a positive --limit and a non-empty --cursor.");
15876
15884
  return 2;
15877
15885
  }
@@ -15911,7 +15919,7 @@ async function handlePlayList(args) {
15911
15919
  if (play.inputSchema || play.hasInputSchema) {
15912
15920
  lines.push(" inputSchema: yes");
15913
15921
  }
15914
- if (_optionalChain([play, 'access', _560 => _560.triggerStatus, 'optionalAccess', _561 => _561.cron])) {
15922
+ if (_optionalChain([play, 'access', _557 => _557.triggerStatus, 'optionalAccess', _558 => _558.cron])) {
15915
15923
  lines.push(
15916
15924
  ` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
15917
15925
  );
@@ -15931,7 +15939,7 @@ async function handlePlayList(args) {
15931
15939
  } else {
15932
15940
  lines.push(" scheduled execution: not configured");
15933
15941
  }
15934
- if (_optionalChain([play, 'access', _562 => _562.triggerStatus, 'optionalAccess', _563 => _563.webhook])) {
15942
+ if (_optionalChain([play, 'access', _559 => _559.triggerStatus, 'optionalAccess', _560 => _560.webhook])) {
15935
15943
  lines.push(` webhook: ${play.triggerStatus.webhook}`);
15936
15944
  }
15937
15945
  if (showCost) {
@@ -15945,7 +15953,7 @@ async function handlePlayList(args) {
15945
15953
  lines.push("List truncated \u2014 more plays are available.");
15946
15954
  lines.push(`Next page: ${nextPage}`);
15947
15955
  }
15948
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
15956
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
15949
15957
  {
15950
15958
  plays,
15951
15959
  count: plays.length,
@@ -15962,8 +15970,8 @@ async function handlePlayList(args) {
15962
15970
  return 0;
15963
15971
  }
15964
15972
  async function handlePlayPin(args, pinned) {
15965
- const target = _optionalChain([args, 'access', _564 => _564.find, 'call', _565 => _565((arg) => !arg.startsWith("-")), 'optionalAccess', _566 => _566.trim, 'call', _567 => _567()]);
15966
- const jsonOutput = _chunkAYM2KZN3js.argsWantJson.call(void 0, args);
15973
+ const target = _optionalChain([args, 'access', _561 => _561.find, 'call', _562 => _562((arg) => !arg.startsWith("-")), 'optionalAccess', _563 => _563.trim, 'call', _564 => _564()]);
15974
+ const jsonOutput = _chunkDD6MM6WXjs.argsWantJson.call(void 0, args);
15967
15975
  const dryRun = args.includes("--dry-run");
15968
15976
  if (!target) {
15969
15977
  console.error(
@@ -15981,11 +15989,11 @@ async function handlePlayPin(args, pinned) {
15981
15989
  const name = parsedTarget.playName;
15982
15990
  const plan = { name, pinned, dryRun };
15983
15991
  if (dryRun) {
15984
- _chunkAYM2KZN3js.printCompactJson.call(void 0, plan);
15992
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, plan);
15985
15993
  return 0;
15986
15994
  }
15987
- const result = await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().setPlayPinned(name, pinned);
15988
- if (jsonOutput) _chunkAYM2KZN3js.printCompactJson.call(void 0, result);
15995
+ const result = await new (0, _chunkM2VXDQI2js.DeeplineClient)().setPlayPinned(name, pinned);
15996
+ if (jsonOutput) _chunkDD6MM6WXjs.printCompactJson.call(void 0, result);
15989
15997
  else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
15990
15998
  return 0;
15991
15999
  }
@@ -16033,7 +16041,7 @@ function printPlayDescription(play) {
16033
16041
  console.log(` ${line}`);
16034
16042
  }
16035
16043
  }
16036
- if (_optionalChain([play, 'access', _568 => _568.toolCategories, 'optionalAccess', _569 => _569.length])) {
16044
+ if (_optionalChain([play, 'access', _565 => _565.toolCategories, 'optionalAccess', _566 => _566.length])) {
16037
16045
  console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
16038
16046
  }
16039
16047
  if (play.aliases.length > 0) {
@@ -16078,7 +16086,7 @@ function printPlayDescription(play) {
16078
16086
  const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
16079
16087
  if (runtimeLimit) {
16080
16088
  console.log(
16081
- ` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _570 => _570.runtimeLimit, 'optionalAccess', _571 => _571.source]), () => ( "live"))})`
16089
+ ` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _567 => _567.runtimeLimit, 'optionalAccess', _568 => _568.source]), () => ( "live"))})`
16082
16090
  );
16083
16091
  }
16084
16092
  printScheduledPlayCapacity(play.activeScheduledPlays);
@@ -16106,17 +16114,17 @@ function formatPlayGrepMatches(matches) {
16106
16114
  return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
16107
16115
  }
16108
16116
  async function handlePlayGrep(args) {
16109
- const query = _optionalChain([args, 'access', _572 => _572[0], 'optionalAccess', _573 => _573.trim, 'call', _574 => _574()]);
16117
+ const query = _optionalChain([args, 'access', _569 => _569[0], 'optionalAccess', _570 => _570.trim, 'call', _571 => _571()]);
16110
16118
  if (!query) {
16111
16119
  console.error("Usage: deepline plays grep <query> [--json]");
16112
16120
  return 1;
16113
16121
  }
16114
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
16122
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
16115
16123
  const results = (await client.listPlays({ grep: query })).map(
16116
16124
  summarizePlayGrepResult
16117
16125
  );
16118
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
16119
- _chunkAYM2KZN3js.printCompactJson.call(void 0, {
16126
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
16127
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, {
16120
16128
  plays: results,
16121
16129
  count: results.length,
16122
16130
  query,
@@ -16130,7 +16138,7 @@ async function handlePlayGrep(args) {
16130
16138
  `
16131
16139
  );
16132
16140
  for (const result of results) {
16133
- console.log(_optionalChain([result, 'access', _575 => _575.displayName, 'optionalAccess', _576 => _576.trim, 'call', _577 => _577()]) || result.name);
16141
+ console.log(_optionalChain([result, 'access', _572 => _572.displayName, 'optionalAccess', _573 => _573.trim, 'call', _574 => _574()]) || result.name);
16134
16142
  const matches = formatPlayGrepMatches(result.matches);
16135
16143
  if (matches) console.log(` Matched: ${matches}`);
16136
16144
  console.log(` Describe: ${result.describe}`);
@@ -16139,7 +16147,7 @@ async function handlePlayGrep(args) {
16139
16147
  return 0;
16140
16148
  }
16141
16149
  async function handlePlayDescribe(args) {
16142
- const selection = _chunkAYM2KZN3js.parseJsonFields.call(void 0, args, "describe");
16150
+ const selection = _chunkDD6MM6WXjs.parseJsonFields.call(void 0, args, "describe");
16143
16151
  args = selection.args;
16144
16152
  const playName = args[0];
16145
16153
  if (!playName) {
@@ -16173,8 +16181,8 @@ async function handlePlayDescribe(args) {
16173
16181
  `deepline plays check ${playName}`,
16174
16182
  ...definedName ? [`deepline describe <workspace>/${definedName}`] : []
16175
16183
  ];
16176
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
16177
- _chunkAYM2KZN3js.printCompactJson.call(void 0, {
16184
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
16185
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, {
16178
16186
  ok: false,
16179
16187
  error: { message },
16180
16188
  next
@@ -16188,7 +16196,7 @@ async function handlePlayDescribe(args) {
16188
16196
  }
16189
16197
  return 2;
16190
16198
  }
16191
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
16199
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
16192
16200
  await assertCanonicalNamedPlayReference(client, playName, {
16193
16201
  command: "describe"
16194
16202
  });
@@ -16198,9 +16206,9 @@ async function handlePlayDescribe(args) {
16198
16206
  compact: args.includes("--compact")
16199
16207
  }
16200
16208
  );
16201
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
16202
- if (selection.fields) _chunkAYM2KZN3js.printJson.call(void 0, play, selection.fields);
16203
- else _chunkAYM2KZN3js.printCompactJson.call(void 0, play);
16209
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
16210
+ if (selection.fields) _chunkDD6MM6WXjs.printJson.call(void 0, play, selection.fields);
16211
+ else _chunkDD6MM6WXjs.printCompactJson.call(void 0, play);
16204
16212
  return 0;
16205
16213
  }
16206
16214
  printPlayDescription(play);
@@ -16222,7 +16230,7 @@ async function handlePlaySave(args) {
16222
16230
  }
16223
16231
  let graph;
16224
16232
  try {
16225
- graph = await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
16233
+ graph = await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
16226
16234
  "cli.play_save_bundle_graph",
16227
16235
  { targetKind: "file" },
16228
16236
  () => collectBundledPlayGraph(_path.resolve.call(void 0, options.target))
@@ -16244,7 +16252,7 @@ async function handlePlaySave(args) {
16244
16252
  next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
16245
16253
  };
16246
16254
  if (options.jsonOutput) {
16247
- _chunkAYM2KZN3js.printCompactJson.call(void 0, result);
16255
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, result);
16248
16256
  } else {
16249
16257
  console.error(result.message);
16250
16258
  console.error(` checked artifact: ${result.expectedArtifactHash}`);
@@ -16266,7 +16274,7 @@ async function handlePlaySave(args) {
16266
16274
  };
16267
16275
  if (options.dryRun) {
16268
16276
  if (options.jsonOutput) {
16269
- _chunkAYM2KZN3js.printCompactJson.call(void 0, dryRun);
16277
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, dryRun);
16270
16278
  } else {
16271
16279
  console.log(`Dry run: ${playName}`);
16272
16280
  console.log(` source: ${dryRun.sourceHash}`);
@@ -16275,14 +16283,14 @@ async function handlePlaySave(args) {
16275
16283
  }
16276
16284
  return 0;
16277
16285
  }
16278
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
16286
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
16279
16287
  try {
16280
- await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
16288
+ await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
16281
16289
  "cli.play_save_compile_manifests",
16282
16290
  { targetKind: "file", nodeCount: graph.nodes.size },
16283
16291
  () => compileBundledPlayGraphManifests(client, graph)
16284
16292
  );
16285
- const saved = await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
16293
+ const saved = await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
16286
16294
  "cli.play_save_register_draft",
16287
16295
  { targetKind: "file", playName, artifactHash },
16288
16296
  () => client.registerPlayArtifact({
@@ -16311,7 +16319,7 @@ async function handlePlaySave(args) {
16311
16319
  }
16312
16320
  };
16313
16321
  if (options.jsonOutput) {
16314
- _chunkAYM2KZN3js.printCompactJson.call(void 0, result);
16322
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, result);
16315
16323
  } else {
16316
16324
  console.log(
16317
16325
  `\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
@@ -16337,7 +16345,7 @@ async function handlePlayPublish(args) {
16337
16345
  }
16338
16346
  const { target: playName, useLatest } = options;
16339
16347
  let revisionId = options.revisionId;
16340
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
16348
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
16341
16349
  if (isFileTarget2(playName)) {
16342
16350
  if (revisionId || useLatest) {
16343
16351
  console.error(
@@ -16347,7 +16355,7 @@ async function handlePlayPublish(args) {
16347
16355
  }
16348
16356
  let graph;
16349
16357
  try {
16350
- graph = await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
16358
+ graph = await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
16351
16359
  "cli.play_publish_bundle_graph",
16352
16360
  { targetKind: "file" },
16353
16361
  () => collectBundledPlayGraph(_path.resolve.call(void 0, playName))
@@ -16369,7 +16377,7 @@ async function handlePlayPublish(args) {
16369
16377
  next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
16370
16378
  };
16371
16379
  if (options.jsonOutput) {
16372
- _chunkAYM2KZN3js.printCompactJson.call(void 0, result3);
16380
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, result3);
16373
16381
  } else {
16374
16382
  console.error(result3.message);
16375
16383
  console.error(` checked artifact: ${result3.expectedArtifactHash}`);
@@ -16392,7 +16400,7 @@ async function handlePlayPublish(args) {
16392
16400
  };
16393
16401
  if (options.dryRun) {
16394
16402
  if (options.jsonOutput) {
16395
- _chunkAYM2KZN3js.printCompactJson.call(void 0, dryRun);
16403
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, dryRun);
16396
16404
  } else {
16397
16405
  console.log(`Dry run: ${rootPlayName}`);
16398
16406
  console.log(` source: ${dryRun.sourceHash}`);
@@ -16411,12 +16419,12 @@ async function handlePlayPublish(args) {
16411
16419
  }
16412
16420
  }
16413
16421
  try {
16414
- await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
16422
+ await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
16415
16423
  "cli.play_publish_compile_manifests",
16416
16424
  { targetKind: "file", nodeCount: graph.nodes.size },
16417
16425
  () => compileBundledPlayGraphManifests(client, graph)
16418
16426
  );
16419
- await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
16427
+ await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
16420
16428
  "cli.play_publish_imports",
16421
16429
  { targetKind: "file", nodeCount: graph.nodes.size },
16422
16430
  () => publishImportedPlayDependencies(client, graph)
@@ -16425,7 +16433,7 @@ async function handlePlayPublish(args) {
16425
16433
  console.error(error instanceof Error ? error.message : String(error));
16426
16434
  return 1;
16427
16435
  }
16428
- const published = await _chunk2LVM22ZUjs.traceCliSpan.call(void 0,
16436
+ const published = await _chunkLSZZVHQPjs.traceCliSpan.call(void 0,
16429
16437
  "cli.play_publish_register_root",
16430
16438
  {
16431
16439
  targetKind: "file",
@@ -16450,17 +16458,17 @@ async function handlePlayPublish(args) {
16450
16458
  artifactHash,
16451
16459
  liveVersion: _nullishCoalesce(published.version, () => ( null)),
16452
16460
  revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
16453
- previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _578 => _578.version]), () => ( null)),
16454
- previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _579 => _579.artifactHash]), () => ( null)),
16461
+ previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _575 => _575.version]), () => ( null)),
16462
+ previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _576 => _576.artifactHash]), () => ( null)),
16455
16463
  sourceBytes: {
16456
- before: _optionalChain([previousLive, 'optionalAccess', _580 => _580.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
16464
+ before: _optionalChain([previousLive, 'optionalAccess', _577 => _577.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
16457
16465
  after: Buffer.byteLength(graph.root.sourceCode, "utf8")
16458
16466
  },
16459
16467
  triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
16460
16468
  triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
16461
16469
  };
16462
16470
  if (options.jsonOutput) {
16463
- _chunkAYM2KZN3js.printCompactJson.call(void 0, result2);
16471
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, result2);
16464
16472
  } else {
16465
16473
  printPublishReceipt({
16466
16474
  name: rootPlayName,
@@ -16491,14 +16499,14 @@ async function handlePlayPublish(args) {
16491
16499
  revisionId: _nullishCoalesce(revisionId, () => ( null)),
16492
16500
  latest: useLatest
16493
16501
  };
16494
- _chunkAYM2KZN3js.printCompactJson.call(void 0, result2);
16502
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, result2);
16495
16503
  return 0;
16496
16504
  }
16497
16505
  const resolvedName = parseReferencedPlayTarget2(playName).playName;
16498
16506
  if (useLatest) {
16499
16507
  const versions = await client.listPlayVersions(resolvedName);
16500
16508
  const latest = versions[0];
16501
- if (!_optionalChain([latest, 'optionalAccess', _581 => _581._id])) {
16509
+ if (!_optionalChain([latest, 'optionalAccess', _578 => _578._id])) {
16502
16510
  console.error(`No saved revisions found for ${resolvedName}.`);
16503
16511
  return 1;
16504
16512
  }
@@ -16515,7 +16523,7 @@ async function handlePlayPublish(args) {
16515
16523
  revisionId ? { revisionId } : {}
16516
16524
  );
16517
16525
  if (options.jsonOutput) {
16518
- _chunkAYM2KZN3js.printCompactJson.call(void 0, result);
16526
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, result);
16519
16527
  } else {
16520
16528
  printPublishReceipt({
16521
16529
  name: result.name,
@@ -16555,7 +16563,7 @@ async function handlePlayDelete(args) {
16555
16563
  );
16556
16564
  return 2;
16557
16565
  }
16558
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
16566
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
16559
16567
  let detail;
16560
16568
  try {
16561
16569
  detail = await client.getPlay(parseReferencedPlayTarget2(playName).playName);
@@ -16579,8 +16587,8 @@ async function handlePlayDelete(args) {
16579
16587
  name: resolvedName,
16580
16588
  plannedMutation: "move saved org-owned play to Trash and stop triggers"
16581
16589
  };
16582
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
16583
- _chunkAYM2KZN3js.printCompactJson.call(void 0, result2);
16590
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
16591
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, result2);
16584
16592
  } else {
16585
16593
  process.stdout.write(
16586
16594
  `Dry run: would move ${result2.name} to Trash and stop its active triggers.
@@ -16590,8 +16598,8 @@ async function handlePlayDelete(args) {
16590
16598
  return 0;
16591
16599
  }
16592
16600
  const result = await client.deletePlay(resolvedName);
16593
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
16594
- _chunkAYM2KZN3js.printCompactJson.call(void 0, result);
16601
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
16602
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, result);
16595
16603
  return result.archived || result.alreadyArchived ? 0 : 4;
16596
16604
  }
16597
16605
  if (result.alreadyArchived) {
@@ -16630,13 +16638,13 @@ async function handlePlayRestore(args) {
16630
16638
  );
16631
16639
  return 2;
16632
16640
  }
16633
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
16641
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
16634
16642
  try {
16635
16643
  const result = await client.restorePlay(
16636
16644
  parseReferencedPlayTarget2(playName).playName
16637
16645
  );
16638
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
16639
- _chunkAYM2KZN3js.printCompactJson.call(void 0, result);
16646
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
16647
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, result);
16640
16648
  return result.restored || result.alreadyActive ? 0 : 4;
16641
16649
  }
16642
16650
  if (result.alreadyActive) {
@@ -16662,7 +16670,7 @@ function registerPlayCommands(program) {
16662
16670
  `
16663
16671
  Concepts:
16664
16672
  Plays are durable cloud workflows.
16665
- Stable ctx.tools.execute({ id, tool, input, staleAfterSeconds: 0 }) requests fresh work.
16673
+ Stable deepline.tools.execute({ id, tool, input, staleAfterSeconds: 0 }) requests fresh work.
16666
16674
  In authoring edition 11, choose freshness explicitly: 0 for fresh logical
16667
16675
  work, a positive integer for the maximum reusable result age in seconds, or
16668
16676
  null for indefinite result reuse. A matching completed operation receipt can
@@ -16670,7 +16678,7 @@ Concepts:
16670
16678
  omitted-value behavior.
16671
16679
  Completed calls are replay-safe during recovery of the same run; unfinished calls may execute again.
16672
16680
  A stable id recovers a completed call; repeating plays run starts new work.
16673
- ctx.dataset adds row keys and row progress.
16681
+ deepline.dataset adds row keys and row progress.
16674
16682
  Named play runs use the live revision unless --latest or --revision-id is set.
16675
16683
  Installed npm and repo-local CLIs can run saved/prebuilt plays by name or
16676
16684
  bundle local .play.ts files for development workflows.
@@ -16700,8 +16708,23 @@ More options:
16700
16708
  deepline runs export -h
16701
16709
 
16702
16710
  Authoring:
16711
+ A play is a .play.ts file that default-exports an async function of its
16712
+ input; the file name is the default play name.
16713
+ import deepline from 'deepline';
16714
+ export default async function (input: { domain: string }) {
16715
+ const company = await deepline.tools.execute({
16716
+ id: 'company', tool: 'company_lookup', input: { domain: input.domain },
16717
+ description: 'Look up the company.',
16718
+ });
16719
+ return { company };
16720
+ }
16721
+ The parameter's type is the input contract and the returned object is the
16722
+ result. An optional export const config = { ... }; at the top of the file
16723
+ sets the name, triggers and runtime.
16724
+ Run code inline as the body of a play function (input holds --input):
16725
+ deepline plays run -e 'deepline.log("hello"); return { ok: true };'
16703
16726
  Use normal TypeScript interpolation for human-facing strings:
16704
- const readyMessage = \`Put \${input.title} through to send-ready.\`;
16727
+ const readyMessage = \`Put \${title} through to send-ready.\`;
16705
16728
  An authored diagram is optional but highly recommended for every new or
16706
16729
  substantially changed Play. Docflow parses only an explicit
16707
16730
  /** @mermaid ... */ block and its // @mermaid-node annotations; ordinary
@@ -16749,21 +16772,21 @@ Common commands:
16749
16772
  resume: `deepline plays resume-submission ${_chunkAID3OYVJjs.shellQuote.call(void 0, path)} --json`
16750
16773
  }
16751
16774
  };
16752
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0, result2, {
16775
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0, result2, {
16753
16776
  json: options.json,
16754
16777
  text: `Submission ${saved.workflowId}: admission is unknown. ${result2.next.inspect}
16755
16778
  `
16756
16779
  });
16757
16780
  return;
16758
16781
  }
16759
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
16782
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
16760
16783
  if (new URL(saved.baseUrl).origin !== new URL(client.baseUrl).origin) {
16761
16784
  throw new Error(
16762
16785
  "The submission belongs to a different API origin. Select its original host before recovery."
16763
16786
  );
16764
16787
  }
16765
16788
  const result = await client.startPlayRun(saved.request);
16766
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
16789
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
16767
16790
  { ...result },
16768
16791
  {
16769
16792
  json: options.json,
@@ -16799,7 +16822,7 @@ Examples:
16799
16822
  ).action(async (target, options) => {
16800
16823
  process.exitCode = await handlePlayCheck([
16801
16824
  target,
16802
- ..._chunkAYM2KZN3js.jsonFieldArgs.call(void 0, options.json),
16825
+ ..._chunkDD6MM6WXjs.jsonFieldArgs.call(void 0, options.json),
16803
16826
  ...options.full ? ["--full"] : []
16804
16827
  ]);
16805
16828
  });
@@ -16837,7 +16860,7 @@ Notes:
16837
16860
  It does not cancel active sibling runs.
16838
16861
  --force-tool-refresh re-executes completed tool receipts and may repeat billed
16839
16862
  provider calls. It is independent from --force.
16840
- --max-concurrent-external-calls controls the per-run provider-tool/ctx.fetch
16863
+ --max-concurrent-external-calls controls the per-run provider-tool/deepline.fetch
16841
16864
  resident-work ceiling. Default: ${DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS}; accepted range: 1-${MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS}.
16842
16865
  Provider pacing and sandbox memory limits still apply.
16843
16866
  --max-concurrent-rows sets the run-wide default and ceiling for live map row
@@ -16857,16 +16880,16 @@ Idempotent execution:
16857
16880
  still recover that operation after resume. Older authored editions keep their
16858
16881
  existing omitted-value behavior.
16859
16882
 
16860
- await ctx.tools.execute({ id: 'company_lookup', tool, input, staleAfterSeconds: 86400 });
16883
+ await deepline.tools.execute({ id: 'company_lookup', tool, input, staleAfterSeconds: 86400 });
16861
16884
 
16862
16885
  The authored id is still required for readable logs and metadata, but
16863
16886
  renaming it alone does not rebuy the same provider request.
16864
16887
 
16865
- For rows, use ctx.dataset plus a stable row key:
16888
+ For rows, use deepline.dataset plus a stable row key:
16866
16889
 
16867
- const rows = await ctx
16890
+ const rows = await deepline
16868
16891
  .dataset('companies_v1', companies)
16869
- .withColumn('cto', (row, ctx) => ctx.tools.execute({
16892
+ .withColumn('cto', (row) => deepline.tools.execute({
16870
16893
  id: 'find_cto',
16871
16894
  tool: 'dropleads_search_people',
16872
16895
  staleAfterSeconds: 86400,
@@ -16876,7 +16899,7 @@ Idempotent execution:
16876
16899
 
16877
16900
  Dataset cells are storage; put freshness on the actual call:
16878
16901
 
16879
- await ctx.tools.execute({
16902
+ await deepline.tools.execute({
16880
16903
  id: 'find_cto',
16881
16904
  tool: 'dropleads_search_people',
16882
16905
  input: { filters: { companyDomains: [row.domain], jobTitles: ['CTO'] }, pagination: { page: 1, limit: 1 } },
@@ -16888,6 +16911,7 @@ Examples:
16888
16911
  deepline plays run long-background-play --no-wait
16889
16912
  deepline plays run long-background-play --run-id-file ./run-id.json
16890
16913
  deepline plays run my.play.ts --input '{"domain":"stripe.com"}'
16914
+ deepline plays run -e 'deepline.log("hello"); return { ok: true };'
16891
16915
  deepline plays run my.play.ts --input '{"domain":"stripe.com"}' --log-level debug
16892
16916
  deepline plays run my.play.ts --profile absurd
16893
16917
  deepline plays run my.play.ts --max-concurrent-external-calls 20
@@ -16898,6 +16922,9 @@ Examples:
16898
16922
  deepline runs get <run-id>
16899
16923
  `
16900
16924
  ).option("--file <path>", "Local play file to run").option(
16925
+ "-e, --eval <code>",
16926
+ "Run code as the body of a play function (input holds --input), like a .play.ts file in this directory"
16927
+ ).option(
16901
16928
  "--dry-run",
16902
16929
  "Show the local execution and import pinning plan without mutation"
16903
16930
  ).option("--name <name>", "Saved play name to run").option("-i, --input <json>", "Input JSON object or @file path").option("--live", "Run the current live revision explicitly").option("--latest", "Run the newest saved revision, even if it is not live").option(
@@ -16951,7 +16978,7 @@ Examples:
16951
16978
  "Refresh completed tool receipts; may repeat billed provider calls"
16952
16979
  ).option(
16953
16980
  "--max-concurrent-external-calls <count>",
16954
- `Concurrent provider-tool and ctx.fetch executions (${DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS} default, max ${MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS})`
16981
+ `Concurrent provider-tool and deepline.fetch executions (${DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS} default, max ${MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS})`
16955
16982
  ).option(
16956
16983
  "--max-concurrent-rows <count>",
16957
16984
  `Run-wide dataset map row resolver ceiling (max ${MAX_CONFIGURABLE_CONCURRENT_ROWS})`
@@ -16974,32 +17001,44 @@ JSON field selection:
16974
17001
  explicitly to retrieve diagnostics. Bare --json prints the whole response.
16975
17002
  `
16976
17003
  ).action(
16977
- async (target, options, command) => {
16978
- const passthroughArgs = [...command.args];
16979
- const explicitTarget = options.file || options.name;
16980
- const targetIsInputFlag = typeof target === "string" && target.startsWith("--");
16981
- const effectiveTarget = explicitTarget || targetIsInputFlag ? null : target;
16982
- if (explicitTarget && typeof target === "string" && !targetIsInputFlag && !passthroughArgs.includes(target)) {
16983
- passthroughArgs.push(target);
16984
- }
16985
- if (effectiveTarget && passthroughArgs[0] === effectiveTarget) {
16986
- passthroughArgs.shift();
16987
- }
16988
- const exitCode = await handlePlayRun(
16989
- resolvePlayRunCliOptions(
16990
- _nullishCoalesce(effectiveTarget, () => ( void 0)),
16991
- options,
16992
- passthroughArgs,
16993
- _chunk2LVM22ZUjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
16994
- )
16995
- );
16996
- _chunk2LVM22ZUjs.recordCliTrace.call(void 0, {
16997
- phase: "cli.play_command_exit",
16998
- exitCode
16999
- });
17000
- process.exitCode = exitCode;
17004
+ async (target, cliOptions, command) => {
17005
+ const inlineFile = cliOptions.eval === void 0 ? null : writeInlinePlay(cliOptions.eval);
17006
+ try {
17007
+ process.exitCode = await runPlayCommand(
17008
+ target,
17009
+ inlineFile ? { ...cliOptions, file: inlineFile } : cliOptions,
17010
+ command
17011
+ );
17012
+ } finally {
17013
+ if (inlineFile) _fs.rmSync.call(void 0, inlineFile, { force: true });
17014
+ }
17001
17015
  }
17002
17016
  );
17017
+ async function runPlayCommand(target, options, command) {
17018
+ const passthroughArgs = [...command.args];
17019
+ const explicitTarget = options.file || options.name;
17020
+ const targetIsInputFlag = typeof target === "string" && target.startsWith("--");
17021
+ const effectiveTarget = explicitTarget || targetIsInputFlag ? null : target;
17022
+ if (explicitTarget && typeof target === "string" && !targetIsInputFlag && !passthroughArgs.includes(target)) {
17023
+ passthroughArgs.push(target);
17024
+ }
17025
+ if (effectiveTarget && passthroughArgs[0] === effectiveTarget) {
17026
+ passthroughArgs.shift();
17027
+ }
17028
+ const exitCode = await handlePlayRun(
17029
+ resolvePlayRunCliOptions(
17030
+ _nullishCoalesce(effectiveTarget, () => ( void 0)),
17031
+ options,
17032
+ passthroughArgs,
17033
+ _chunkLSZZVHQPjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
17034
+ )
17035
+ );
17036
+ _chunkLSZZVHQPjs.recordCliTrace.call(void 0, {
17037
+ phase: "cli.play_command_exit",
17038
+ exitCode
17039
+ });
17040
+ return exitCode;
17041
+ }
17003
17042
  registerPlaySettingsCommands(play);
17004
17043
  registerPlayTriggerConfigCommands(play);
17005
17044
  play.command("get <target>").description(
@@ -17043,9 +17082,9 @@ Examples:
17043
17082
  const limit = Number(options.historyLimit);
17044
17083
  if (!Number.isInteger(limit) || limit < 1 || limit > 30)
17045
17084
  throw new Error("--history-limit must be an integer from 1 to 30.");
17046
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
17085
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
17047
17086
  if (options.binding) {
17048
- _chunkAYM2KZN3js.printCompactJson.call(void 0,
17087
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0,
17049
17088
  await client.getPlayTriggerHistory(options.binding, { limit })
17050
17089
  );
17051
17090
  return;
@@ -17053,7 +17092,7 @@ Examples:
17053
17092
  const result = await client.listPlayTriggerInventory({
17054
17093
  cursor: options.cursor
17055
17094
  });
17056
- _chunkAYM2KZN3js.printCompactJson.call(void 0, {
17095
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, {
17057
17096
  ...result,
17058
17097
  next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)}`
17059
17098
  });
@@ -17100,7 +17139,7 @@ Examples:
17100
17139
  if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
17101
17140
  throw new Error("--group-by must be kind or trigger_source.");
17102
17141
  }
17103
- const result = await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().getPlaysActivity({
17142
+ const result = await new (0, _chunkM2VXDQI2js.DeeplineClient)().getPlaysActivity({
17104
17143
  timeZone: options.timeZone,
17105
17144
  days,
17106
17145
  ...options.endDate ? { endDate: options.endDate } : {},
@@ -17114,7 +17153,7 @@ Examples:
17114
17153
  `${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
17115
17154
  );
17116
17155
  }
17117
- _chunkAYM2KZN3js.printCommandEnvelope.call(void 0,
17156
+ _chunkDD6MM6WXjs.printCommandEnvelope.call(void 0,
17118
17157
  { ...result },
17119
17158
  {
17120
17159
  json: Boolean(options.json),
@@ -17143,7 +17182,7 @@ Examples:
17143
17182
  false
17144
17183
  );
17145
17184
  });
17146
- _chunkBL3LY54Yjs.registerDeprecatedSearchCommand.call(void 0,
17185
+ _chunk22XGRO2Mjs.registerDeprecatedSearchCommand.call(void 0,
17147
17186
  play,
17148
17187
  (options) => options.all ? ["plays"] : ["prebuilts"]
17149
17188
  );
@@ -17184,9 +17223,9 @@ Examples:
17184
17223
  "--json [fields]",
17185
17224
  "JSON output; optionally select comma-separated dotted paths"
17186
17225
  );
17187
- _chunk27GJKC5Qjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
17226
+ _chunkGXOQRZXGjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
17188
17227
  async (target, options) => {
17189
- const ownView = () => handlePlayDescribe(_chunkAYM2KZN3js.describeArgs.call(void 0, target, options));
17228
+ const ownView = () => handlePlayDescribe(_chunkDD6MM6WXjs.describeArgs.call(void 0, target, options));
17190
17229
  const [flagText] = [options.json].filter(
17191
17230
  (value) => typeof value === "string"
17192
17231
  );
@@ -17197,7 +17236,7 @@ Examples:
17197
17236
  process.exitCode = await ownView();
17198
17237
  return;
17199
17238
  }
17200
- const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-FSDW6LTN.js")));
17239
+ const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-A2MGAI3Y.js")));
17201
17240
  process.exitCode = await describeAnything(
17202
17241
  name,
17203
17242
  {
@@ -17315,7 +17354,7 @@ Examples:
17315
17354
  deepline plays deployments <deployment-id>
17316
17355
  `
17317
17356
  ).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output").action(
17318
- async (id, options) => id ? _chunkV4RAH5D6js.handleDeploymentGet.call(void 0, id, options) : _chunkV4RAH5D6js.handleDeploymentsList.call(void 0, options)
17357
+ async (id, options) => id ? _chunkCJD5QKYKjs.handleDeploymentGet.call(void 0, id, options) : _chunkCJD5QKYKjs.handleDeploymentsList.call(void 0, options)
17319
17358
  );
17320
17359
  addPublishHelp(
17321
17360
  play.command("publish <target>").description(
@@ -17450,14 +17489,14 @@ Examples:
17450
17489
  const limit = Number(options.limit);
17451
17490
  if (!Number.isSafeInteger(limit) || limit < 1 || limit > 1e3)
17452
17491
  throw new Error("--limit must be an integer from 1 to 1000.");
17453
- const result = await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().runs.rowHistory({
17492
+ const result = await new (0, _chunkM2VXDQI2js.DeeplineClient)().runs.rowHistory({
17454
17493
  playName: options.play,
17455
17494
  runId,
17456
17495
  tableNamespace: options.dataset,
17457
17496
  limit,
17458
17497
  cursor: options.cursor
17459
17498
  });
17460
- _chunkAYM2KZN3js.printCompactJson.call(void 0, {
17499
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, {
17461
17500
  ...result,
17462
17501
  ...result.nextCursor ? {
17463
17502
  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`
@@ -17527,7 +17566,7 @@ Examples:
17527
17566
  ).action(async (runId, options) => {
17528
17567
  process.exitCode = await handleRunGet([
17529
17568
  runId,
17530
- ..._chunkAYM2KZN3js.jsonFieldArgs.call(void 0, options.json),
17569
+ ..._chunkDD6MM6WXjs.jsonFieldArgs.call(void 0, options.json),
17531
17570
  ...options.webUrl ? ["--web-url"] : [],
17532
17571
  ...options.full ? ["--full"] : [],
17533
17572
  ...options.input ? ["--input"] : [],
@@ -17605,7 +17644,7 @@ Examples:
17605
17644
  "after",
17606
17645
  `
17607
17646
  Notes:
17608
- Stops all active runs visible to this workspace, including child runs created by ctx.runPlay.
17647
+ Stops all active runs visible to this workspace, including child runs created by deepline.runPlay.
17609
17648
  --dry-run lists the exact candidates (same scope, statuses, and order) and
17610
17649
  never cancels or mutates anything. A real stop-all exits nonzero when any
17611
17650
  cancellation failed or the candidate list was truncated; failed runs stay
@@ -17813,7 +17852,7 @@ Examples:
17813
17852
  ...options.allowEmpty ? ["--allow-empty"] : [],
17814
17853
  ...options.wait ? ["--wait"] : [],
17815
17854
  ...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
17816
- ..._chunkAYM2KZN3js.jsonFieldArgs.call(void 0, options.json)
17855
+ ..._chunkDD6MM6WXjs.jsonFieldArgs.call(void 0, options.json)
17817
17856
  ]);
17818
17857
  });
17819
17858
  const share = play.command("share").description(
@@ -17954,8 +17993,8 @@ function absolutePublicPlayUrl(path) {
17954
17993
  }
17955
17994
  function shareUrlFields(status) {
17956
17995
  return {
17957
- publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _582 => _582.share, 'optionalAccess', _583 => _583.publicPath])),
17958
- canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _584 => _584.share, 'optionalAccess', _585 => _585.canonicalPath]))
17996
+ publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _579 => _579.share, 'optionalAccess', _580 => _580.publicPath])),
17997
+ canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _581 => _581.share, 'optionalAccess', _582 => _582.canonicalPath]))
17959
17998
  };
17960
17999
  }
17961
18000
  function shareStatusForOutput(status) {
@@ -17979,10 +18018,10 @@ async function handlePlayShareStatus(args) {
17979
18018
  return 2;
17980
18019
  }
17981
18020
  const name = parseReferencedPlayTarget2(target).playName;
17982
- const status = await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().getSharePage(name);
18021
+ const status = await new (0, _chunkM2VXDQI2js.DeeplineClient)().getSharePage(name);
17983
18022
  const outputStatus = shareStatusForOutput(status);
17984
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
17985
- _chunkAYM2KZN3js.printCompactJson.call(void 0, outputStatus);
18023
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
18024
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, outputStatus);
17986
18025
  return 0;
17987
18026
  }
17988
18027
  if (!outputStatus.share) {
@@ -18021,7 +18060,7 @@ async function handlePlaySharePublish(args) {
18021
18060
  return 2;
18022
18061
  }
18023
18062
  const name = parseReferencedPlayTarget2(target).playName;
18024
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
18063
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
18025
18064
  let revisionId = shareFlagValue(args, "--revision-id");
18026
18065
  let resolvedVersion;
18027
18066
  if (!revisionId) {
@@ -18052,8 +18091,8 @@ async function handlePlaySharePublish(args) {
18052
18091
  );
18053
18092
  if (!hasCompleted) {
18054
18093
  const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
18055
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
18056
- _chunkAYM2KZN3js.printCompactJson.call(void 0, {
18094
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
18095
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, {
18057
18096
  ok: false,
18058
18097
  code: "NO_SUCCESSFUL_RUN",
18059
18098
  message,
@@ -18077,8 +18116,8 @@ async function handlePlaySharePublish(args) {
18077
18116
  };
18078
18117
  if (args.includes("--dry-run")) {
18079
18118
  const plan = { dryRun: true, name, version: resolvedVersion, ...request };
18080
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
18081
- _chunkAYM2KZN3js.printCompactJson.call(void 0, plan);
18119
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
18120
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, plan);
18082
18121
  } else {
18083
18122
  console.log(
18084
18123
  `Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
@@ -18088,13 +18127,13 @@ async function handlePlaySharePublish(args) {
18088
18127
  }
18089
18128
  const status = await client.publishSharePage(name, request);
18090
18129
  const outputStatus = shareStatusForOutput(status);
18091
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
18092
- _chunkAYM2KZN3js.printCompactJson.call(void 0, outputStatus);
18130
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
18131
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, outputStatus);
18093
18132
  return 0;
18094
18133
  }
18095
18134
  const urls = shareUrlFields(outputStatus);
18096
18135
  console.log(
18097
- `Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _586 => _586.share, 'optionalAccess', _587 => _587.publicPath]))), () => ( ""))}`
18136
+ `Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _583 => _583.share, 'optionalAccess', _584 => _584.publicPath]))), () => ( ""))}`
18098
18137
  );
18099
18138
  if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
18100
18139
  console.log(`Version URL: ${urls.canonicalUrl}`);
@@ -18120,9 +18159,9 @@ async function handlePlayShareUpdate(args) {
18120
18159
  ...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
18121
18160
  ...seoIndexing ? { seoIndexing } : {}
18122
18161
  };
18123
- const status = await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().updateSharePage(name, request);
18124
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
18125
- _chunkAYM2KZN3js.printCompactJson.call(void 0, status);
18162
+ const status = await new (0, _chunkM2VXDQI2js.DeeplineClient)().updateSharePage(name, request);
18163
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
18164
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, status);
18126
18165
  return 0;
18127
18166
  }
18128
18167
  console.log(`Updated ${name} share settings.`);
@@ -18137,13 +18176,13 @@ async function handlePlayShareRegenerate(args) {
18137
18176
  return 2;
18138
18177
  }
18139
18178
  const name = parseReferencedPlayTarget2(target).playName;
18140
- const client = new (0, _chunkWGO2DY4Ljs.DeeplineClient)();
18179
+ const client = new (0, _chunkM2VXDQI2js.DeeplineClient)();
18141
18180
  let revisionId = shareFlagValue(args, "--revision-id");
18142
18181
  const versionFlag = shareFlagValue(args, "--version");
18143
18182
  if (!revisionId && versionFlag) {
18144
18183
  const versions = await client.listPlayVersions(name);
18145
18184
  const chosen = versions.find((r) => r.version === Number(versionFlag));
18146
- if (!_optionalChain([chosen, 'optionalAccess', _588 => _588._id])) {
18185
+ if (!_optionalChain([chosen, 'optionalAccess', _585 => _585._id])) {
18147
18186
  console.error(`Version ${versionFlag} not found for ${name}.`);
18148
18187
  return 4;
18149
18188
  }
@@ -18154,12 +18193,12 @@ async function handlePlayShareRegenerate(args) {
18154
18193
  revisionId ? { revisionId } : {}
18155
18194
  );
18156
18195
  const outputStatus = shareStatusForOutput(status);
18157
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
18158
- _chunkAYM2KZN3js.printCompactJson.call(void 0, outputStatus);
18196
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
18197
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, outputStatus);
18159
18198
  return 0;
18160
18199
  }
18161
18200
  const urls = shareUrlFields(outputStatus);
18162
- const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _589 => _589.share, 'optionalAccess', _590 => _590.publishedRevisionId]) === revisionId;
18201
+ const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _586 => _586.share, 'optionalAccess', _587 => _587.publishedRevisionId]) === revisionId;
18163
18202
  console.log(
18164
18203
  `Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
18165
18204
  );
@@ -18180,9 +18219,9 @@ async function handlePlayShareUnpublish(args) {
18180
18219
  return 2;
18181
18220
  }
18182
18221
  const name = parseReferencedPlayTarget2(target).playName;
18183
- const status = await new (0, _chunkWGO2DY4Ljs.DeeplineClient)().unpublishSharePage(name);
18184
- if (_chunkAYM2KZN3js.argsWantJson.call(void 0, args)) {
18185
- _chunkAYM2KZN3js.printCompactJson.call(void 0, status);
18222
+ const status = await new (0, _chunkM2VXDQI2js.DeeplineClient)().unpublishSharePage(name);
18223
+ if (_chunkDD6MM6WXjs.argsWantJson.call(void 0, args)) {
18224
+ _chunkDD6MM6WXjs.printCompactJson.call(void 0, status);
18186
18225
  return 0;
18187
18226
  }
18188
18227
  console.log(`Unpublished ${name}; the public page has been removed.`);