deepline 0.3.328 → 0.3.330

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 (124) hide show
  1. package/dist/bundling-sources/sdk/src/billing-idempotency.ts +24 -0
  2. package/dist/bundling-sources/sdk/src/client.ts +22 -22
  3. package/dist/bundling-sources/sdk/src/index.ts +1 -0
  4. package/dist/bundling-sources/sdk/src/play.ts +55 -45
  5. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  6. package/dist/bundling-sources/sdk/src/types.ts +16 -0
  7. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
  8. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  9. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +31 -15
  10. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +22 -4
  11. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +29 -11
  12. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +145 -19
  13. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -10
  14. package/dist/bundling-sources/shared_libs/plays/dataset.ts +3 -0
  15. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +59 -10
  16. package/dist/cli/{auth-ANHHABWT.mjs → auth-A4XQ3KMW.mjs} +4 -4
  17. package/dist/cli/auth-XJJYQESF.js +31 -0
  18. package/dist/cli/{billing-R6NYYO6G.mjs → billing-634WZLKG.mjs} +36 -14
  19. package/dist/cli/{billing-GGVKLFE6.js → billing-WLHXYC5Z.js} +101 -79
  20. package/dist/cli/{chunk-ZND34HL7.mjs → chunk-3QZ22IZO.mjs} +4 -4
  21. package/dist/cli/{chunk-UDIPEHNJ.js → chunk-46IVSO6O.js} +141 -11
  22. package/dist/cli/{chunk-GZV5F6CL.mjs → chunk-56RM5AQF.mjs} +79 -26
  23. package/dist/cli/{chunk-UM4ZE3P7.mjs → chunk-5W636CDP.mjs} +2 -2
  24. package/dist/cli/{chunk-W6WV6UME.js → chunk-63W4744F.js} +563 -555
  25. package/dist/cli/{chunk-OOLIEDIJ.mjs → chunk-6VBXS43D.mjs} +2 -2
  26. package/dist/cli/{chunk-B2R66UTW.mjs → chunk-7DGZCMXQ.mjs} +1 -1
  27. package/dist/cli/{chunk-7DDNACAQ.js → chunk-7FWHOKNS.js} +26 -26
  28. package/dist/cli/{chunk-YIY74KUF.mjs → chunk-EV4QJE4J.mjs} +1 -1
  29. package/dist/cli/{chunk-2HKPAZVJ.js → chunk-FKKNYKDY.js} +14 -3
  30. package/dist/cli/{chunk-DNYRAZSK.js → chunk-FLIABSY6.js} +48 -48
  31. package/dist/cli/{chunk-O5GPNPOC.js → chunk-GHHLLEZK.js} +4 -4
  32. package/dist/cli/{chunk-ZFKUVDOM.js → chunk-GKZZ32EV.js} +60 -60
  33. package/dist/cli/{chunk-LJWC5HSO.js → chunk-GS7GA7PI.js} +15 -15
  34. package/dist/cli/{chunk-7R6KQSFA.mjs → chunk-GTBS6LQH.mjs} +38 -22
  35. package/dist/cli/{chunk-2FPVWL4W.js → chunk-LNDGT7NV.js} +119 -66
  36. package/dist/cli/{chunk-SMGNDW7O.mjs → chunk-LQ5DD2UF.mjs} +2 -2
  37. package/dist/cli/{chunk-WWVE4HFN.mjs → chunk-MBI3BVSQ.mjs} +1 -1
  38. package/dist/cli/{chunk-KP7W5NO6.mjs → chunk-NTVTZAVZ.mjs} +13 -2
  39. package/dist/cli/{chunk-XVKQ6D4K.js → chunk-O2L46S3I.js} +2 -2
  40. package/dist/cli/{chunk-BC7FMQ2G.mjs → chunk-PH2N6GC7.mjs} +1 -1
  41. package/dist/cli/{chunk-6ENR652E.mjs → chunk-SDSS4OTO.mjs} +77 -69
  42. package/dist/cli/{chunk-YFCHBN3C.mjs → chunk-SZCUJ4AL.mjs} +1 -1
  43. package/dist/cli/{chunk-AGH6YP2T.js → chunk-UQV5M6HN.js} +3 -3
  44. package/dist/cli/{chunk-7MABE3ZK.mjs → chunk-VFC6CZLF.mjs} +135 -5
  45. package/dist/cli/{chunk-DNMV2L7Q.js → chunk-WHKTRZ3J.js} +6 -6
  46. package/dist/cli/{chunk-Y4LXIUHX.js → chunk-XUNMVZOW.js} +1 -1
  47. package/dist/cli/{chunk-LEEXRXQQ.js → chunk-YFP4UH2Y.js} +6 -6
  48. package/dist/cli/{chunk-ITFUZEHE.js → chunk-YGFQ7YSM.js} +51 -35
  49. package/dist/cli/{chunk-AKKQ26RX.mjs → chunk-ZYPFCBW5.mjs} +1 -1
  50. package/dist/cli/client-3CREIHGC.js +20 -0
  51. package/dist/cli/{client-ZABA5NMD.mjs → client-WYFGEJOX.mjs} +3 -3
  52. package/dist/cli/{csv-VECE3PWX.mjs → csv-BDZSDXLU.mjs} +3 -3
  53. package/dist/cli/{csv-4ZK5ZJAJ.js → csv-THMQDXCJ.js} +12 -12
  54. package/dist/cli/{db-UJPCDBV7.js → db-5BQJOZG7.js} +29 -29
  55. package/dist/cli/{db-6VE4OEWW.mjs → db-R2LTNLFM.mjs} +4 -4
  56. package/dist/cli/{describe-CFUZZ326.js → describe-F4G5H3SC.js} +17 -17
  57. package/dist/cli/{describe-W6X5G4JR.mjs → describe-WECII7FS.mjs} +10 -10
  58. package/dist/cli/{executions-AI4DTQQL.js → executions-HJRVD4M6.js} +6 -6
  59. package/dist/cli/{executions-ZZWB75DF.mjs → executions-HPRIRB73.mjs} +4 -4
  60. package/dist/cli/{feedback-IM5Z6T5K.mjs → feedback-5VVW5WW7.mjs} +3 -3
  61. package/dist/cli/{feedback-FYSNSYUU.js → feedback-GHGDH43D.js} +6 -6
  62. package/dist/cli/{git-YNYTK3YW.mjs → git-BBXML2UJ.mjs} +4 -4
  63. package/dist/cli/git-NNEBLRVP.js +23 -0
  64. package/dist/cli/index.js +79 -79
  65. package/dist/cli/index.mjs +31 -31
  66. package/dist/cli/{legacy-noops-4DTMYYUY.mjs → legacy-noops-IALOUAGL.mjs} +4 -4
  67. package/dist/cli/{legacy-noops-PHJE2XFK.js → legacy-noops-VNZZ3VVT.js} +7 -7
  68. package/dist/cli/{monitors-27JP76WE.js → monitors-MLP6IA2R.js} +85 -85
  69. package/dist/cli/{monitors-HUP4MVWJ.mjs → monitors-VDEB2FKS.mjs} +4 -4
  70. package/dist/cli/{org-RHVDMUKN.js → org-N6ADDGEV.js} +60 -60
  71. package/dist/cli/{org-L3B2RR4U.mjs → org-SDSSKY42.mjs} +4 -4
  72. package/dist/cli/play-UTIPBVDQ.js +153 -0
  73. package/dist/cli/{play-UXIJVYNF.mjs → play-VSTVY6PM.mjs} +9 -9
  74. package/dist/cli/{providers-VL6VY56M.js → providers-TJ42O6NN.js} +7 -7
  75. package/dist/cli/{providers-FABWTNKR.mjs → providers-UKC7KD3W.mjs} +4 -4
  76. package/dist/cli/{quickstart-IIPZ6DSY.js → quickstart-7S7NMCMX.js} +5 -5
  77. package/dist/cli/{quickstart-OA54A4IE.mjs → quickstart-WSKATNHJ.mjs} +3 -3
  78. package/dist/cli/{search-YDK4V2EW.mjs → search-6OS6VVCJ.mjs} +5 -5
  79. package/dist/cli/search-Y6UGKL5C.js +26 -0
  80. package/dist/cli/{secrets-JGU7ZRUW.js → secrets-GWLYB2KD.js} +13 -13
  81. package/dist/cli/{secrets-4MQF6RF6.mjs → secrets-QTTR5R5M.mjs} +4 -4
  82. package/dist/cli/{sessions-PTHOMSZ5.mjs → sessions-Q7MY5YYI.mjs} +4 -4
  83. package/dist/cli/{sessions-I7ZZYSYW.js → sessions-SUURWTVX.js} +5 -5
  84. package/dist/cli/{settings-X4ENSGNK.mjs → settings-3D5YDD2B.mjs} +7 -7
  85. package/dist/cli/{settings-ZUUBKIG6.js → settings-W4DYMYFA.js} +74 -74
  86. package/dist/cli/{setup-4UM6FCZL.mjs → setup-5F5OGYKW.mjs} +6 -6
  87. package/dist/cli/{setup-6L576TQE.js → setup-NIUADTDP.js} +41 -41
  88. package/dist/cli/skills-SHUL5UT7.js +28 -0
  89. package/dist/cli/{skills-U3BS5KUI.mjs → skills-TV3ORUIG.mjs} +4 -4
  90. package/dist/cli/tools-GNIVV4OF.js +40 -0
  91. package/dist/cli/{tools-O4PX6UVB.mjs → tools-YSZWAFKO.mjs} +7 -6
  92. package/dist/cli/{update-OHWSK2WN.mjs → update-FJAMLGLT.mjs} +6 -6
  93. package/dist/cli/update-U3XGY6IT.js +28 -0
  94. package/dist/cli/{workflow-QWTZBLT3.js → workflow-C6ZCM5S4.js} +15 -15
  95. package/dist/cli/{workflow-RVMGBMLX.mjs → workflow-HDHBYC7S.mjs} +5 -5
  96. package/dist/{client-wiWPZhnI.d.mts → client-D5XOQKsA.d.mts} +20 -1
  97. package/dist/{client-DHq8dJ56.d.ts → client-l-IoLh8Z.d.ts} +20 -1
  98. package/dist/{compiler-manifest-9TkZ_ykI.d.mts → compiler-manifest-82q4jtfQ.d.mts} +44 -17
  99. package/dist/{compiler-manifest-9TkZ_ykI.d.ts → compiler-manifest-82q4jtfQ.d.ts} +44 -17
  100. package/dist/{index-B-5_Xhud.d.mts → index-BPbW2XHF.d.mts} +1 -1
  101. package/dist/{index-ykksoEyR.d.ts → index-k0rquHIm.d.ts} +1 -1
  102. package/dist/index.d.mts +14 -8
  103. package/dist/index.d.ts +14 -8
  104. package/dist/index.js +194 -69
  105. package/dist/index.mjs +162 -37
  106. package/dist/install-integrity.json +85 -84
  107. package/dist/plays/bundle-play-file.d.mts +3 -3
  108. package/dist/plays/bundle-play-file.d.ts +3 -3
  109. package/dist/plays/bundle-play-file.mjs +2 -2
  110. package/dist/plays/run-request.d.mts +2 -2
  111. package/dist/plays/run-request.d.ts +2 -2
  112. package/dist/release.d.mts +1 -1
  113. package/dist/release.d.ts +1 -1
  114. package/dist/release.js +2 -2
  115. package/dist/release.mjs +1 -1
  116. package/package.json +2 -1
  117. package/dist/cli/auth-EKRB4GMP.js +0 -31
  118. package/dist/cli/client-55BDB4LE.js +0 -20
  119. package/dist/cli/git-VWXH6LCP.js +0 -23
  120. package/dist/cli/play-UKH4VFPF.js +0 -153
  121. package/dist/cli/search-JD2VTR4A.js +0 -26
  122. package/dist/cli/skills-TLPNCERR.js +0 -28
  123. package/dist/cli/tools-26JTFFU4.js +0 -39
  124. package/dist/cli/update-35RRCU2G.js +0 -28
@@ -10,11 +10,11 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
10
10
  var _chunk5JLQPVNXjs = require('./chunk-5JLQPVNX.js');
11
11
 
12
12
 
13
- var _chunkUDIPEHNJjs = require('./chunk-UDIPEHNJ.js');
13
+ var _chunk46IVSO6Ojs = require('./chunk-46IVSO6O.js');
14
14
 
15
15
 
16
16
 
17
- var _chunk7DDNACAQjs = require('./chunk-7DDNACAQ.js');
17
+ var _chunk7FWHOKNSjs = require('./chunk-7FWHOKNS.js');
18
18
 
19
19
 
20
20
 
@@ -39,7 +39,7 @@ var _chunkLVEDPCLJjs = require('./chunk-LVEDPCLJ.js');
39
39
 
40
40
 
41
41
 
42
- var _chunkITFUZEHEjs = require('./chunk-ITFUZEHE.js');
42
+ var _chunkYGFQ7YSMjs = require('./chunk-YGFQ7YSM.js');
43
43
 
44
44
 
45
45
 
@@ -71,18 +71,19 @@ var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
71
71
 
72
72
 
73
73
 
74
- var _chunkDNMV2L7Qjs = require('./chunk-DNMV2L7Q.js');
75
74
 
75
+ var _chunkWHKTRZ3Jjs = require('./chunk-WHKTRZ3J.js');
76
76
 
77
- var _chunkO5GPNPOCjs = require('./chunk-O5GPNPOC.js');
78
77
 
78
+ var _chunkGHHLLEZKjs = require('./chunk-GHHLLEZK.js');
79
79
 
80
80
 
81
81
 
82
82
 
83
83
 
84
84
 
85
- var _chunkAGH6YP2Tjs = require('./chunk-AGH6YP2T.js');
85
+
86
+ var _chunkUQV5M6HNjs = require('./chunk-UQV5M6HN.js');
86
87
 
87
88
 
88
89
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
@@ -2066,7 +2067,7 @@ function resolveField(key, command) {
2066
2067
  function printSettings(result, json, name) {
2067
2068
  result = { ...result, settings: parsePlaySettings(result.settings) };
2068
2069
  const selected = fields.filter(([key]) => !name || key === name);
2069
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
2070
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
2070
2071
  {
2071
2072
  ...result,
2072
2073
  settings: Object.fromEntries(
@@ -2110,7 +2111,7 @@ function registerPlaySettingsCommands(plays) {
2110
2111
  valueSyntax: field.cli.valueSyntax,
2111
2112
  examples: field.cli.examples
2112
2113
  }));
2113
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
2114
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
2114
2115
  {
2115
2116
  fields: descriptions,
2116
2117
  render: {
@@ -2135,7 +2136,7 @@ function registerPlaySettingsCommands(plays) {
2135
2136
  async (options, command) => {
2136
2137
  if (options.name !== void 0) resolveField(options.name, command);
2137
2138
  printSettings(
2138
- await new (0, _chunkITFUZEHEjs.DeeplineClient)().getPlaySettings(options.play),
2139
+ await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().getPlaySettings(options.play),
2139
2140
  options.json,
2140
2141
  options.name
2141
2142
  );
@@ -2166,7 +2167,7 @@ function registerPlaySettingsCommands(plays) {
2166
2167
  );
2167
2168
  }
2168
2169
  if (options.dryRun) {
2169
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
2170
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
2170
2171
  {
2171
2172
  dryRun: true,
2172
2173
  play,
@@ -2187,7 +2188,7 @@ function registerPlaySettingsCommands(plays) {
2187
2188
  return;
2188
2189
  }
2189
2190
  printSettings(
2190
- await new (0, _chunkITFUZEHEjs.DeeplineClient)().updatePlaySettings(play, patch),
2191
+ await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().updatePlaySettings(play, patch),
2191
2192
  options.json
2192
2193
  );
2193
2194
  };
@@ -2213,13 +2214,13 @@ function registerPlaySettingsCommands(plays) {
2213
2214
  "--root must be person or team; --limit must be 1\u2013100.",
2214
2215
  { exitCode: 2 }
2215
2216
  );
2216
- const page = await new (0, _chunkITFUZEHEjs.DeeplineClient)().listPlaySettingsPaths({
2217
+ const page = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().listPlaySettingsPaths({
2217
2218
  root: options.root,
2218
2219
  limit,
2219
2220
  cursor: options.cursor
2220
2221
  });
2221
2222
  const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""} --json` : null;
2222
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
2223
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
2223
2224
  {
2224
2225
  ...page,
2225
2226
  nextCommand,
@@ -2270,7 +2271,7 @@ function registerPlaySettingsCommands(plays) {
2270
2271
  root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.root]), () => ( "person")),
2271
2272
  folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _14 => _14.folders]), () => ( []))
2272
2273
  };
2273
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
2274
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
2274
2275
  const paths = [];
2275
2276
  let cursor;
2276
2277
  do {
@@ -2332,7 +2333,7 @@ function registerPlaySettingsCommands(plays) {
2332
2333
  moved.push(move.playName);
2333
2334
  }
2334
2335
  }
2335
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
2336
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
2336
2337
  {
2337
2338
  dryRun: Boolean(options.dryRun),
2338
2339
  from: options.from,
@@ -2460,7 +2461,7 @@ function triggerLines(view) {
2460
2461
  return lines;
2461
2462
  }
2462
2463
  function printView(view, json) {
2463
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
2464
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
2464
2465
  {
2465
2466
  ...view,
2466
2467
  render: {
@@ -2473,7 +2474,7 @@ function printView(view, json) {
2473
2474
  );
2474
2475
  }
2475
2476
  function printResult(result, json) {
2476
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
2477
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
2477
2478
  {
2478
2479
  ...result,
2479
2480
  render: {
@@ -2503,7 +2504,7 @@ async function mutate(command, options, build) {
2503
2504
  usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
2504
2505
  }
2505
2506
  if (options.dryRun) {
2506
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
2507
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
2507
2508
  {
2508
2509
  dryRun: true,
2509
2510
  play: options.play,
@@ -2522,7 +2523,7 @@ async function mutate(command, options, build) {
2522
2523
  return;
2523
2524
  }
2524
2525
  printResult(
2525
- await new (0, _chunkITFUZEHEjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
2526
+ await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
2526
2527
  options.json
2527
2528
  );
2528
2529
  }
@@ -2555,7 +2556,7 @@ function registerPlayTriggerConfigCommands(plays) {
2555
2556
  }).addHelpText("after", help2);
2556
2557
  trigger.command("get").description("Show the cron and webhook triggers of a Play.").requiredOption("--play <play>", "Play to read").option("--json", "Emit JSON; automatic when piped").addHelpText("after", help2).action(async (options) => {
2557
2558
  printView(
2558
- await new (0, _chunkITFUZEHEjs.DeeplineClient)().getPlayTriggerConfig(options.play),
2559
+ await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().getPlayTriggerConfig(options.play),
2559
2560
  options.json
2560
2561
  );
2561
2562
  });
@@ -2599,7 +2600,7 @@ function registerPlayTriggerConfigCommands(plays) {
2599
2600
  if (options.auth === void 0) {
2600
2601
  if (secrets.length || options.header || options.signaturePrefix)
2601
2602
  usage(setWebhook, "--secret/--header need --auth.");
2602
- const current = await new (0, _chunkITFUZEHEjs.DeeplineClient)().getPlayTriggerConfig(
2603
+ const current = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().getPlayTriggerConfig(
2603
2604
  options.play
2604
2605
  );
2605
2606
  return {
@@ -2676,7 +2677,7 @@ var KIND_DESCRIPTIONS = {
2676
2677
  "receipt.skipped": "Saved work result: skipped.",
2677
2678
  "runtime.event": "Other event."
2678
2679
  };
2679
- var RUN_LOGS_KIND_HELP = _chunkITFUZEHEjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
2680
+ var RUN_LOGS_KIND_HELP = _chunkYGFQ7YSMjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
2680
2681
  kind,
2681
2682
  description: KIND_DESCRIPTIONS[kind]
2682
2683
  }));
@@ -2813,9 +2814,9 @@ function configureRunQueryCommandErrors(command, resource) {
2813
2814
  const args = program.args;
2814
2815
  if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
2815
2816
  error.exitCode = 2;
2816
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
2817
- _chunkDNMV2L7Qjs.printJsonError.call(void 0,
2818
- Object.assign(new (0, _chunkITFUZEHEjs.RunEventQueryInputError)(error.message), {
2817
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
2818
+ _chunkWHKTRZ3Jjs.printJsonError.call(void 0,
2819
+ Object.assign(new (0, _chunkYGFQ7YSMjs.RunEventQueryInputError)(error.message), {
2819
2820
  exitCode: 2,
2820
2821
  retryable: false
2821
2822
  })
@@ -2859,14 +2860,14 @@ function parseQuery(args, resource) {
2859
2860
  if (VALUE_FLAGS.has(flag)) {
2860
2861
  const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
2861
2862
  if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
2862
- throw new (0, _chunkITFUZEHEjs.RunEventQueryInputError)(
2863
+ throw new (0, _chunkYGFQ7YSMjs.RunEventQueryInputError)(
2863
2864
  `${flag} requires a value. Use ${flag} <value>.`
2864
2865
  );
2865
2866
  }
2866
2867
  if (flag === "--sum") sums.push(value);
2867
2868
  else {
2868
2869
  if (values[flag] !== void 0) {
2869
- throw new (0, _chunkITFUZEHEjs.RunEventQueryInputError)(
2870
+ throw new (0, _chunkYGFQ7YSMjs.RunEventQueryInputError)(
2870
2871
  `${flag} may only be supplied once.`
2871
2872
  );
2872
2873
  }
@@ -2880,12 +2881,12 @@ function parseQuery(args, resource) {
2880
2881
  }
2881
2882
  if (arg.startsWith("-")) {
2882
2883
  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.";
2883
- throw new (0, _chunkITFUZEHEjs.RunEventQueryInputError)(
2884
+ throw new (0, _chunkYGFQ7YSMjs.RunEventQueryInputError)(
2884
2885
  `Unsupported query flag ${flag}. ${correction}`
2885
2886
  );
2886
2887
  }
2887
2888
  if (runId !== void 0) {
2888
- throw new (0, _chunkITFUZEHEjs.RunEventQueryInputError)(
2889
+ throw new (0, _chunkYGFQ7YSMjs.RunEventQueryInputError)(
2889
2890
  `Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
2890
2891
  );
2891
2892
  }
@@ -2893,7 +2894,7 @@ function parseQuery(args, resource) {
2893
2894
  }
2894
2895
  if (switches.has("--fields")) {
2895
2896
  if (runId !== void 0) {
2896
- throw new (0, _chunkITFUZEHEjs.RunEventQueryInputError)(
2897
+ throw new (0, _chunkYGFQ7YSMjs.RunEventQueryInputError)(
2897
2898
  "--fields does not use a run ID. Omit the positional run ID."
2898
2899
  );
2899
2900
  }
@@ -2906,18 +2907,18 @@ function parseQuery(args, resource) {
2906
2907
  )
2907
2908
  ];
2908
2909
  if (incompatible.length) {
2909
- throw new (0, _chunkITFUZEHEjs.RunEventQueryInputError)(
2910
+ throw new (0, _chunkYGFQ7YSMjs.RunEventQueryInputError)(
2910
2911
  `--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
2911
2912
  );
2912
2913
  }
2913
2914
  }
2914
2915
  if (switches.has("--count") && values["--group-by"] !== void 0) {
2915
- throw new (0, _chunkITFUZEHEjs.RunEventQueryInputError)(
2916
+ throw new (0, _chunkYGFQ7YSMjs.RunEventQueryInputError)(
2916
2917
  "--count cannot be combined with --group-by. Use --group-by for counts per group."
2917
2918
  );
2918
2919
  }
2919
2920
  if (sums.length && switches.has("--count")) {
2920
- throw new (0, _chunkITFUZEHEjs.RunEventQueryInputError)(
2921
+ throw new (0, _chunkYGFQ7YSMjs.RunEventQueryInputError)(
2921
2922
  "--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
2922
2923
  );
2923
2924
  }
@@ -2925,7 +2926,7 @@ function parseQuery(args, resource) {
2925
2926
  if (operation === "count") {
2926
2927
  for (const flag of ["--limit", "--cursor", "--payloads"]) {
2927
2928
  if (values[flag] !== void 0 || switches.has(flag)) {
2928
- throw new (0, _chunkITFUZEHEjs.RunEventQueryInputError)(
2929
+ throw new (0, _chunkYGFQ7YSMjs.RunEventQueryInputError)(
2929
2930
  `--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
2930
2931
  );
2931
2932
  }
@@ -2960,16 +2961,16 @@ function parseQuery(args, resource) {
2960
2961
  ];
2961
2962
  }
2962
2963
  }
2963
- const request = _chunkITFUZEHEjs.normalizeRunEventOperationRequest.call(void 0, body);
2964
+ const request = _chunkYGFQ7YSMjs.normalizeRunEventOperationRequest.call(void 0, body);
2964
2965
  const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
2965
2966
  const backend = values["--runtime-backend"];
2966
2967
  if (backend && backend !== "daytona" && backend !== "modal") {
2967
- throw new (0, _chunkITFUZEHEjs.RunEventQueryInputError)(
2968
+ throw new (0, _chunkYGFQ7YSMjs.RunEventQueryInputError)(
2968
2969
  "--runtime-backend must be daytona or modal."
2969
2970
  );
2970
2971
  }
2971
2972
  if (backend && !namespace) {
2972
- throw new (0, _chunkITFUZEHEjs.RunEventQueryInputError)(
2973
+ throw new (0, _chunkYGFQ7YSMjs.RunEventQueryInputError)(
2973
2974
  "--runtime-backend requires --runtime-namespace."
2974
2975
  );
2975
2976
  }
@@ -3017,12 +3018,12 @@ async function handleRunEventQuery(args, resource = "logs") {
3017
3018
  const failure = error instanceof Error ? error : new Error(String(error));
3018
3019
  const record3 = failure;
3019
3020
  const status = record3.statusCode;
3020
- const exitCode = error instanceof _chunkITFUZEHEjs.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;
3021
+ const exitCode = error instanceof _chunkYGFQ7YSMjs.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;
3021
3022
  const diagnostic = Object.assign(failure, {
3022
3023
  exitCode,
3023
3024
  retryable: exitCode === 5
3024
3025
  });
3025
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) _chunkDNMV2L7Qjs.printJsonError.call(void 0, diagnostic);
3026
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) _chunkWHKTRZ3Jjs.printJsonError.call(void 0, diagnostic);
3026
3027
  else console.error(`Error: ${diagnostic.message}`);
3027
3028
  return exitCode;
3028
3029
  }
@@ -3037,7 +3038,7 @@ async function executeRunEventQuery(args, resource) {
3037
3038
  ...criteria
3038
3039
  } = request;
3039
3040
  const options = { ...criteria, ...runtime ? { runtime } : {} };
3040
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
3041
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
3041
3042
  let result;
3042
3043
  if (request.operation === "fields") {
3043
3044
  result = await client.runs[resource].fields(runtime ? { runtime } : {});
@@ -3103,13 +3104,13 @@ async function executeRunEventQuery(args, resource) {
3103
3104
  lines.push(`Next page: ${nextPage}`);
3104
3105
  }
3105
3106
  }
3106
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
3107
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
3107
3108
  {
3108
3109
  ...result,
3109
3110
  ...nextPage ? { next: { page: nextPage } } : {},
3110
3111
  render: { sections: [{ title: `run ${resource}`, lines }] }
3111
3112
  },
3112
- { json: _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
3113
+ { json: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
3113
3114
  ` }
3114
3115
  );
3115
3116
  return 0;
@@ -3929,7 +3930,7 @@ function checkedRunExample(plays, target) {
3929
3930
  const quote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
3930
3931
  const base = `deepline plays run --file ${quote(target)}`;
3931
3932
  return {
3932
- command: `${base}${_chunkITFUZEHEjs.playInputExampleArgs.call(void 0, schema)} --json`,
3933
+ command: `${base}${_chunkYGFQ7YSMjs.playInputExampleArgs.call(void 0, schema)} --json`,
3933
3934
  note: "Runs the local file without publishing and may spend credits. Supply the indicated file; JSON input must match inputSchema. Keep stderr separate from JSON stdout."
3934
3935
  };
3935
3936
  }
@@ -5180,10 +5181,13 @@ function generateProviderSourceBlock(input) {
5180
5181
  input: ${inputName},
5181
5182
  description: ${jsString(`Seed ${input.entity} rows from ${input.provider}.`)},
5182
5183
  });
5183
- // extractedLists.${getter}.get() returns a dataset handle of provider-shaped rows. Do not assume canonical fields;
5184
+ // extractedLists.${getter}.get() returns provider-shaped rows. Do not assume canonical fields;
5184
5185
  // inspect source_${input.index}.extractedLists.${getter}.keys or the provider output schema, then map explicitly below.
5185
- const sourceRowsDataset_${input.index} = ${accessorExpression(`source_${input.index}.extractedLists`, getter)}.get();
5186
- const sourceRows_${input.index} = (await sourceRowsDataset_${input.index}.peek(limit)) as ${input.collectionType}[];`;
5186
+ const sourceList_${input.index} = ${accessorExpression(`source_${input.index}.extractedLists`, getter)}.get();
5187
+ // Legacy admitted Plays use a dataset getter; the new contract returns an ordinary array.
5188
+ const sourceRows_${input.index} = (Array.isArray(sourceList_${input.index})
5189
+ ? sourceList_${input.index}.slice(0, limit)
5190
+ : await sourceList_${input.index}.peek(limit)) as ${input.collectionType}[];`;
5187
5191
  }
5188
5192
  function generateProviderSourceRowsBlock(input) {
5189
5193
  const blocks = input.source.values.map(
@@ -5549,7 +5553,7 @@ async function runPlayBootstrap(args) {
5549
5553
  return runMonitorBootstrap(args);
5550
5554
  }
5551
5555
  const options = parsePlayBootstrapOptions(args);
5552
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
5556
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
5553
5557
  const contracts = await loadBootstrapContracts(client, options);
5554
5558
  const csvContext = loadCsvContext(options.from);
5555
5559
  const source = generateBootstrapPlaySource({
@@ -5704,7 +5708,7 @@ Existing credential redactions and referenced-list previews remain as stored.
5704
5708
  ...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
5705
5709
  );
5706
5710
  }
5707
- const response = await new (0, _chunkITFUZEHEjs.DeeplineClient)().runs.getReceipts(runId, {
5711
+ const response = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().runs.getReceipts(runId, {
5708
5712
  keys
5709
5713
  });
5710
5714
  const failed = response.receipts.filter(
@@ -5716,7 +5720,7 @@ Existing credential redactions and referenced-list previews remain as stored.
5716
5720
  JSON.stringify(response, null, 2) + "\n",
5717
5721
  { flag: "wx", mode: 384 }
5718
5722
  );
5719
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
5723
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
5720
5724
  {
5721
5725
  runId,
5722
5726
  out: options.out,
@@ -5726,7 +5730,7 @@ Existing credential redactions and referenced-list previews remain as stored.
5726
5730
  { json: true }
5727
5731
  );
5728
5732
  } else {
5729
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
5733
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
5730
5734
  }
5731
5735
  if (failed)
5732
5736
  process.exitCode = response.receipts.some(
@@ -5765,7 +5769,7 @@ includes nextCommand when another page is available.
5765
5769
  { exitCode: 2 }
5766
5770
  );
5767
5771
  }
5768
- const page = await new (0, _chunkITFUZEHEjs.DeeplineClient)().runs.children(parentRunId, {
5772
+ const page = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().runs.children(parentRunId, {
5769
5773
  launchKey: options.launchKey,
5770
5774
  ...options.cursor !== void 0 ? { cursor: options.cursor } : {},
5771
5775
  limit
@@ -5781,7 +5785,7 @@ includes nextCommand when another page is available.
5781
5785
  String(limit),
5782
5786
  "--json"
5783
5787
  ].join(" ") : null;
5784
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
5788
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
5785
5789
  {
5786
5790
  parentRunId,
5787
5791
  launchKey: options.launchKey,
@@ -5817,7 +5821,7 @@ async function handleRunsHistory(options) {
5817
5821
  throw new Error("--limit must be a positive integer.");
5818
5822
  }
5819
5823
  }
5820
- const page = await new (0, _chunkITFUZEHEjs.DeeplineClient)().runs.history({
5824
+ const page = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().runs.history({
5821
5825
  cursor: options.cursor,
5822
5826
  orgId: options.org,
5823
5827
  search: options.search,
@@ -5833,7 +5837,7 @@ async function handleRunsHistory(options) {
5833
5837
  );
5834
5838
  }
5835
5839
  if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
5836
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
5840
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
5837
5841
  { ...page, render: { sections: [{ title: "Run history", lines }] } },
5838
5842
  options.json ? { json: true } : {}
5839
5843
  );
@@ -5857,11 +5861,60 @@ function registerRunHistoryCommand(runs) {
5857
5861
  ).action(handleRunsHistory);
5858
5862
  }
5859
5863
 
5864
+ // src/cli/operations/runs-rerun.ts
5865
+ async function runRunsRerunCommand(runId, options) {
5866
+ const idempotencyKey = _optionalChain([options, 'access', _149 => _149.idempotencyKey, 'optionalAccess', _150 => _150.trim, 'call', _151 => _151()]);
5867
+ if (options.idempotencyKey !== void 0 && (!idempotencyKey || options.idempotencyKey.startsWith("--"))) {
5868
+ console.error("--idempotency-key requires a non-empty value.");
5869
+ return 1;
5870
+ }
5871
+ let inputOverrides;
5872
+ if (options.inputOverrides !== void 0) {
5873
+ if (!options.inputOverrides || options.inputOverrides.startsWith("--")) {
5874
+ console.error("--input-overrides requires a JSON object.");
5875
+ return 1;
5876
+ }
5877
+ try {
5878
+ const parsed = JSON.parse(options.inputOverrides);
5879
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed) || Object.values(parsed).some(
5880
+ (entry) => entry !== null && !["string", "number", "boolean"].includes(typeof entry) || typeof entry === "number" && !Number.isFinite(entry)
5881
+ )) {
5882
+ throw new Error("expected scalar values");
5883
+ }
5884
+ inputOverrides = parsed;
5885
+ } catch (e3) {
5886
+ console.error(
5887
+ "--input-overrides must be a JSON object of scalar values."
5888
+ );
5889
+ return 1;
5890
+ }
5891
+ }
5892
+ const result = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().runs.rerun(runId, {
5893
+ ...idempotencyKey === void 0 ? {} : { idempotencyKey },
5894
+ ...inputOverrides === void 0 ? {} : { inputOverrides }
5895
+ });
5896
+ if (_chunkWHKTRZ3Jjs.shouldEmitJson.call(void 0, options.json)) {
5897
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, result, { json: true });
5898
+ } else {
5899
+ console.log(
5900
+ result.deduplicated === true ? `
5901
+ Rerun already exists for ${runId} (matched by idempotency key): ${result.runId}` : `
5902
+ Rerun started from ${runId}${inputOverrides ? " with input overrides" : ""}.`
5903
+ );
5904
+ console.log(` inspect: deepline runs get ${result.runId} --json`);
5905
+ console.log(` original input: deepline runs get ${result.runId} --input`);
5906
+ console.log(
5907
+ result.deduplicated === true ? " No new run was started. Use a different --idempotency-key to start another rerun." : ` This is a fresh run using the original input${inputOverrides ? " with the supplied field overrides" : ""} and pinned revision. Normal tool receipt reuse still applies.`
5908
+ );
5909
+ }
5910
+ return 0;
5911
+ }
5912
+
5860
5913
  // ../play-data-plane/column-names.ts
5861
5914
  var POSTGRES_IDENTIFIER_MAX_BYTES = 63;
5862
5915
  var HASH_SUFFIX_LENGTH = 10;
5863
5916
  function normalizePlayColumnName(id, preserveAuthoredPrefix = true) {
5864
- const prefix = preserveAuthoredPrefix ? _nullishCoalesce(_optionalChain([id, 'access', _149 => _149.trim, 'call', _150 => _150(), 'access', _151 => _151.match, 'call', _152 => _152(/^_+/), 'optionalAccess', _153 => _153[0]]), () => ( "")) : "";
5917
+ const prefix = preserveAuthoredPrefix ? _nullishCoalesce(_optionalChain([id, 'access', _152 => _152.trim, 'call', _153 => _153(), 'access', _154 => _154.match, 'call', _155 => _155(/^_+/), 'optionalAccess', _156 => _156[0]]), () => ( "")) : "";
5865
5918
  const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
5866
5919
  const safe = `${prefix}${normalized || "column"}`;
5867
5920
  return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
@@ -5923,8 +5976,8 @@ function formatHitShare(count2, total) {
5923
5976
 
5924
5977
  // src/cli/run-hit-counts.ts
5925
5978
  function runTableHitCounts(tableNamespace, summary) {
5926
- const rows = _nullishCoalesce(_optionalChain([summary, 'optionalAccess', _154 => _154.stats, 'optionalAccess', _155 => _155.total]), () => ( 0));
5927
- const filled = _optionalChain([summary, 'optionalAccess', _156 => _156.filled]);
5979
+ const rows = _nullishCoalesce(_optionalChain([summary, 'optionalAccess', _157 => _157.stats, 'optionalAccess', _158 => _158.total]), () => ( 0));
5980
+ const filled = _optionalChain([summary, 'optionalAccess', _159 => _159.filled]);
5928
5981
  if (!filled || rows <= 0) return null;
5929
5982
  const legColumns = new Set(
5930
5983
  Object.values(_nullishCoalesce(summary.cascades, () => ( {}))).flatMap((cascade) => cascade.legs)
@@ -5992,7 +6045,7 @@ function tableCellText(value) {
5992
6045
  value,
5993
6046
  (_key, nested) => typeof nested === "bigint" ? nested.toString() : nested
5994
6047
  ), () => ( ""));
5995
- } catch (e3) {
6048
+ } catch (e4) {
5996
6049
  return String(value);
5997
6050
  }
5998
6051
  }
@@ -6109,7 +6162,7 @@ function projectRunDatasetCell(value) {
6109
6162
  const logicalValue = parseSerializedDatasetValue(value);
6110
6163
  if (logicalValue === null || logicalValue === void 0) return logicalValue;
6111
6164
  if (typeof logicalValue === "object") {
6112
- return _chunkDNMV2L7Qjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
6165
+ return _chunkWHKTRZ3Jjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
6113
6166
  }
6114
6167
  return logicalValue;
6115
6168
  }
@@ -6146,7 +6199,7 @@ function parseSerializedDatasetValue(value) {
6146
6199
  if (!text || !["{", "["].includes(_nullishCoalesce(text[0], () => ( "")))) return value;
6147
6200
  try {
6148
6201
  return JSON.parse(text);
6149
- } catch (e4) {
6202
+ } catch (e5) {
6150
6203
  return value;
6151
6204
  }
6152
6205
  }
@@ -6210,7 +6263,7 @@ function mergeCanonicalRowsInfo(left, right) {
6210
6263
  ...currentTable ? { currentTable: true } : {},
6211
6264
  ...exportUnavailableReason ? {
6212
6265
  exportUnavailableReason,
6213
- ..._optionalChain([unavailableSource, 'optionalAccess', _157 => _157.exportUnavailableMessage]) ? {
6266
+ ..._optionalChain([unavailableSource, 'optionalAccess', _160 => _160.exportUnavailableMessage]) ? {
6214
6267
  exportUnavailableMessage: unavailableSource.exportUnavailableMessage
6215
6268
  } : {}
6216
6269
  } : {}
@@ -6382,7 +6435,7 @@ function totalRowsForDataset(result, datasetPath) {
6382
6435
  const metadata = isRecord2(result._metadata) ? result._metadata : null;
6383
6436
  const parentPath = datasetPath.split(".").slice(0, -1).join(".");
6384
6437
  const parent = parentPath ? valueAtPath({ result }, parentPath) : result;
6385
- return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _158 => _158.totalRows]), () => ( _optionalChain([metadata, 'optionalAccess', _159 => _159.rowCount]))), () => ( _optionalChain([metadata, 'optionalAccess', _160 => _160.count]))), () => ( (isRecord2(parent) ? _nullishCoalesce(_nullishCoalesce(parent.totalRows, () => ( parent.rowCount)), () => ( parent.count)) : void 0))), () => ( result.totalRows)), () => ( result.rowCount)), () => ( result.count));
6438
+ return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _161 => _161.totalRows]), () => ( _optionalChain([metadata, 'optionalAccess', _162 => _162.rowCount]))), () => ( _optionalChain([metadata, 'optionalAccess', _163 => _163.count]))), () => ( (isRecord2(parent) ? _nullishCoalesce(_nullishCoalesce(parent.totalRows, () => ( parent.rowCount)), () => ( parent.count)) : void 0))), () => ( result.totalRows)), () => ( result.rowCount)), () => ( result.count));
6386
6439
  }
6387
6440
  function rowArray(value) {
6388
6441
  if (!Array.isArray(value)) {
@@ -6444,8 +6497,8 @@ function canonicalRowsInfoFromCandidate(input) {
6444
6497
  };
6445
6498
  }
6446
6499
  if (isPackagedDatasetOutput(candidate.value)) {
6447
- const rawRows = _nullishCoalesce(rowArray(_optionalChain([candidate, 'access', _161 => _161.value, 'access', _162 => _162.preview, 'optionalAccess', _163 => _163.rows])), () => ( []));
6448
- const totalRows2 = _nullishCoalesce(_nullishCoalesce(readNumber(candidate.value.rowCount), () => ( readNumber(_optionalChain([candidate, 'access', _164 => _164.value, 'access', _165 => _165.preview, 'optionalAccess', _166 => _166.totalRows])))), () => ( rawRows.length));
6500
+ const rawRows = _nullishCoalesce(rowArray(_optionalChain([candidate, 'access', _164 => _164.value, 'access', _165 => _165.preview, 'optionalAccess', _166 => _166.rows])), () => ( []));
6501
+ const totalRows2 = _nullishCoalesce(_nullishCoalesce(readNumber(candidate.value.rowCount), () => ( readNumber(_optionalChain([candidate, 'access', _167 => _167.value, 'access', _168 => _168.preview, 'optionalAccess', _169 => _169.totalRows])))), () => ( rawRows.length));
6449
6502
  const explicitColumns = Array.isArray(candidate.value.columns) ? candidate.value.columns.filter(
6450
6503
  (column) => typeof column === "string"
6451
6504
  ) : [];
@@ -6541,12 +6594,12 @@ function collectDatasetCandidates(input) {
6541
6594
  }
6542
6595
  function collectCanonicalRowsInfos(statusOrResult) {
6543
6596
  const root = isRecord2(statusOrResult) ? statusOrResult : null;
6544
- const result = isRecord2(_optionalChain([root, 'optionalAccess', _167 => _167.result])) ? root.result : root;
6597
+ const result = isRecord2(_optionalChain([root, 'optionalAccess', _170 => _170.result])) ? root.result : root;
6545
6598
  if (!result) {
6546
6599
  return [];
6547
6600
  }
6548
6601
  const metadata = isRecord2(result._metadata) ? result._metadata : null;
6549
- const totalFromMetadata = _nullishCoalesce(_nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _168 => _168.totalRows]), () => ( _optionalChain([metadata, 'optionalAccess', _169 => _169.rowCount]))), () => ( _optionalChain([metadata, 'optionalAccess', _170 => _170.count])));
6602
+ const totalFromMetadata = _nullishCoalesce(_nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _171 => _171.totalRows]), () => ( _optionalChain([metadata, 'optionalAccess', _172 => _172.rowCount]))), () => ( _optionalChain([metadata, 'optionalAccess', _173 => _173.count])));
6550
6603
  const candidates = [
6551
6604
  {
6552
6605
  source: "result.contacts",
@@ -6571,7 +6624,7 @@ function collectCanonicalRowsInfos(statusOrResult) {
6571
6624
  ];
6572
6625
  if (isRecord2(result.output)) {
6573
6626
  const outputMetadata = isRecord2(result.output._metadata) ? result.output._metadata : null;
6574
- const outputTotalFromMetadata = _nullishCoalesce(_nullishCoalesce(_optionalChain([outputMetadata, 'optionalAccess', _171 => _171.totalRows]), () => ( _optionalChain([outputMetadata, 'optionalAccess', _172 => _172.rowCount]))), () => ( _optionalChain([outputMetadata, 'optionalAccess', _173 => _173.count])));
6627
+ const outputTotalFromMetadata = _nullishCoalesce(_nullishCoalesce(_optionalChain([outputMetadata, 'optionalAccess', _174 => _174.totalRows]), () => ( _optionalChain([outputMetadata, 'optionalAccess', _175 => _175.rowCount]))), () => ( _optionalChain([outputMetadata, 'optionalAccess', _176 => _176.count])));
6575
6628
  candidates.push(
6576
6629
  {
6577
6630
  source: "result.output.contacts",
@@ -6660,14 +6713,14 @@ function collectPackagedStepDatasetCandidates(statusOrResult) {
6660
6713
  {
6661
6714
  source,
6662
6715
  value: step.output,
6663
- total: _nullishCoalesce(_nullishCoalesce(step.output.rowCount, () => ( _optionalChain([step, 'access', _174 => _174.output, 'access', _175 => _175.preview, 'optionalAccess', _176 => _176.totalRows]))), () => ( void 0))
6716
+ total: _nullishCoalesce(_nullishCoalesce(step.output.rowCount, () => ( _optionalChain([step, 'access', _177 => _177.output, 'access', _178 => _178.preview, 'optionalAccess', _179 => _179.totalRows]))), () => ( void 0))
6664
6717
  }
6665
6718
  ] : [];
6666
6719
  });
6667
6720
  }
6668
6721
  function collectSerializedDatasetRowsInfos(statusOrResult) {
6669
6722
  const root = isRecord2(statusOrResult) ? statusOrResult : null;
6670
- const result = root && "result" in root ? isRecord2(root.result) ? root.result : null : _optionalChain([root, 'optionalAccess', _177 => _177.kind]) === "play_run" || isRecord2(_optionalChain([root, 'optionalAccess', _178 => _178.package])) ? null : root;
6723
+ const result = root && "result" in root ? isRecord2(root.result) ? root.result : null : _optionalChain([root, 'optionalAccess', _180 => _180.kind]) === "play_run" || isRecord2(_optionalChain([root, 'optionalAccess', _181 => _181.package])) ? null : root;
6671
6724
  const candidates = [];
6672
6725
  if (result) {
6673
6726
  collectDatasetCandidates({
@@ -6780,7 +6833,7 @@ var RunDatasetCatalog = class _RunDatasetCatalog {
6780
6833
  * a Run returns its sole returned Dataset, or its sole recovered Dataset.
6781
6834
  */
6782
6835
  choose(path) {
6783
- const requested = _optionalChain([path, 'optionalAccess', _179 => _179.trim, 'call', _180 => _180()]);
6836
+ const requested = _optionalChain([path, 'optionalAccess', _182 => _182.trim, 'call', _183 => _183()]);
6784
6837
  if (requested) {
6785
6838
  const info = uniqueDatasetMatch(
6786
6839
  this.#available.filter((dataset) => dataset.matches(requested)).map((dataset) => dataset.info()),
@@ -6788,7 +6841,7 @@ var RunDatasetCatalog = class _RunDatasetCatalog {
6788
6841
  );
6789
6842
  return info ? RunDataset.from({
6790
6843
  ...info,
6791
- source: _optionalChain([info, 'access', _181 => _181.sourceAliases, 'optionalAccess', _182 => _182.includes, 'call', _183 => _183(requested)]) ? requested : info.source
6844
+ source: _optionalChain([info, 'access', _184 => _184.sourceAliases, 'optionalAccess', _185 => _185.includes, 'call', _186 => _186(requested)]) ? requested : info.source
6792
6845
  }) : null;
6793
6846
  }
6794
6847
  if (this.#returned.length === 1) return this.#returned[0];
@@ -6831,7 +6884,7 @@ var RunDataset = class _RunDataset {
6831
6884
  return this.#info.exportUnavailableMessage;
6832
6885
  }
6833
6886
  matches(path) {
6834
- return this.source === path || _optionalChain([this, 'access', _184 => _184.#info, 'access', _185 => _185.sourceAliases, 'optionalAccess', _186 => _186.includes, 'call', _187 => _187(path)]) === true || this.#info.name === path || this.datasetId === path || this.tableNamespace === path || _optionalChain([this, 'access', _188 => _188.#info, 'access', _189 => _189.recoveredReturnPaths, 'optionalAccess', _190 => _190.includes, 'call', _191 => _191(path)]) === true;
6887
+ return this.source === path || _optionalChain([this, 'access', _187 => _187.#info, 'access', _188 => _188.sourceAliases, 'optionalAccess', _189 => _189.includes, 'call', _190 => _190(path)]) === true || this.#info.name === path || this.datasetId === path || this.tableNamespace === path || _optionalChain([this, 'access', _191 => _191.#info, 'access', _192 => _192.recoveredReturnPaths, 'optionalAccess', _193 => _193.includes, 'call', _194 => _194(path)]) === true;
6835
6888
  }
6836
6889
  /** Return a new Handle when its preview has been replaced by fetched rows. */
6837
6890
  withRows(info) {
@@ -6870,7 +6923,7 @@ var RunDataset = class _RunDataset {
6870
6923
  }
6871
6924
  };
6872
6925
  function resolveDatasetByName(available, datasetPath) {
6873
- return _nullishCoalesce(_optionalChain([RunDatasetCatalog, 'access', _192 => _192.from, 'call', _193 => _193({ runPackage: null, datasets: available }), 'access', _194 => _194.choose, 'call', _195 => _195(datasetPath), 'optionalAccess', _196 => _196.info, 'call', _197 => _197()]), () => ( null));
6926
+ return _nullishCoalesce(_optionalChain([RunDatasetCatalog, 'access', _195 => _195.from, 'call', _196 => _196({ runPackage: null, datasets: available }), 'access', _197 => _197.choose, 'call', _198 => _198(datasetPath), 'optionalAccess', _199 => _199.info, 'call', _200 => _200()]), () => ( null));
6874
6927
  }
6875
6928
  function uniqueDatasetMatch(infos, selector) {
6876
6929
  const matches = distinctCanonicalRowsInfos(infos);
@@ -6894,11 +6947,11 @@ function uniqueDatasetMatch(infos, selector) {
6894
6947
  function packageForDatasetSelection(runPackage) {
6895
6948
  const root = recordValue(runPackage);
6896
6949
  const nested = recordValue(root.package);
6897
- if (_optionalChain([nested, 'optionalAccess', _198 => _198.kind]) === "play_run") return nested;
6950
+ if (_optionalChain([nested, 'optionalAccess', _201 => _201.kind]) === "play_run") return nested;
6898
6951
  return root.kind === "play_run" ? root : null;
6899
6952
  }
6900
6953
  function withReturnedDatasetAliases(runPackage, available) {
6901
- const outputs = recordValue(_optionalChain([packageForDatasetSelection, 'call', _199 => _199(runPackage), 'optionalAccess', _200 => _200.outputs]));
6954
+ const outputs = recordValue(_optionalChain([packageForDatasetSelection, 'call', _202 => _202(runPackage), 'optionalAccess', _203 => _203.outputs]));
6902
6955
  if (Object.keys(outputs).length === 0) return available;
6903
6956
  const expanded = [...available];
6904
6957
  for (const outputValue of Object.values(outputs)) {
@@ -6912,7 +6965,7 @@ function withReturnedDatasetAliases(runPackage, available) {
6912
6965
  return expanded;
6913
6966
  }
6914
6967
  function returnedRunDatasets(runPackage, available) {
6915
- const rawOutputs = _optionalChain([packageForDatasetSelection, 'call', _201 => _201(runPackage), 'optionalAccess', _202 => _202.outputs]);
6968
+ const rawOutputs = _optionalChain([packageForDatasetSelection, 'call', _204 => _204(runPackage), 'optionalAccess', _205 => _205.outputs]);
6916
6969
  const outputs = recordValue(rawOutputs);
6917
6970
  if (rawOutputs && typeof rawOutputs === "object" && !Array.isArray(rawOutputs)) {
6918
6971
  const selected = [];
@@ -6931,7 +6984,7 @@ function returnedRunDatasets(runPackage, available) {
6931
6984
  return distinctCanonicalRowsInfos(
6932
6985
  available.filter(
6933
6986
  (info) => info.returned || [info.source, ..._nullishCoalesce(info.sourceAliases, () => ( []))].some(
6934
- (path) => _optionalChain([path, 'optionalAccess', _203 => _203.startsWith, 'call', _204 => _204("result.")])
6987
+ (path) => _optionalChain([path, 'optionalAccess', _206 => _206.startsWith, 'call', _207 => _207("result.")])
6935
6988
  ) && !info.recovered
6936
6989
  )
6937
6990
  );
@@ -6961,7 +7014,7 @@ function resolveReturnedDataset(output, available) {
6961
7014
  }
6962
7015
  const legacy = path ? uniqueDatasetMatch(
6963
7016
  available.filter(
6964
- (info) => info.source === path || _optionalChain([info, 'access', _205 => _205.sourceAliases, 'optionalAccess', _206 => _206.includes, 'call', _207 => _207(path)])
7017
+ (info) => info.source === path || _optionalChain([info, 'access', _208 => _208.sourceAliases, 'optionalAccess', _209 => _209.includes, 'call', _210 => _210(path)])
6965
7018
  ),
6966
7019
  path
6967
7020
  ) : null;
@@ -6991,7 +7044,7 @@ var RUN_PLAY_SIGNATURE_HINT = "Deepline hint: ctx.runPlay uses a stable key plus
6991
7044
  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.";
6992
7045
  function sourceLineForError(sourceCode, error) {
6993
7046
  const match = error.match(/:(\d+):(\d+)\s/);
6994
- const lineNumber = _optionalChain([match, 'optionalAccess', _208 => _208[1]]) ? Number(match[1]) : NaN;
7047
+ const lineNumber = _optionalChain([match, 'optionalAccess', _211 => _211[1]]) ? Number(match[1]) : NaN;
6995
7048
  if (!Number.isInteger(lineNumber) || lineNumber < 1) return "";
6996
7049
  return _nullishCoalesce(sourceCode.split(/\r?\n/)[lineNumber - 1], () => ( ""));
6997
7050
  }
@@ -7288,7 +7341,7 @@ var DeployApiClient = class {
7288
7341
  let parsed = null;
7289
7342
  try {
7290
7343
  parsed = text ? JSON.parse(text) : null;
7291
- } catch (e5) {
7344
+ } catch (e6) {
7292
7345
  parsed = text;
7293
7346
  }
7294
7347
  if (!response.ok) {
@@ -7524,7 +7577,7 @@ async function discoverDeploymentFiles(input) {
7524
7577
  }
7525
7578
  }
7526
7579
  const rootStat = await _promises.stat.call(void 0, input.projectRoot).catch(() => null);
7527
- if (!_optionalChain([rootStat, 'optionalAccess', _209 => _209.isDirectory, 'call', _210 => _210()])) {
7580
+ if (!_optionalChain([rootStat, 'optionalAccess', _212 => _212.isDirectory, 'call', _213 => _213()])) {
7528
7581
  throw new DeeplineManifestError(
7529
7582
  `Project root directory does not exist in the repo: ${input.projectRoot}`
7530
7583
  );
@@ -7550,7 +7603,7 @@ async function readMonitorFiles(input) {
7550
7603
  const raw = await _promises.readFile.call(void 0, _path.join.call(void 0, input.projectRoot, file), "utf8");
7551
7604
  try {
7552
7605
  return { file: sourcePath, definition: JSON.parse(raw) };
7553
- } catch (e6) {
7606
+ } catch (e7) {
7554
7607
  throw new DeeplineManifestError(
7555
7608
  `${sourcePath} must contain a monitor definition as valid JSON.`
7556
7609
  );
@@ -7626,33 +7679,33 @@ function resolveOwnedPlayReferenceName(reference, ownerSlug) {
7626
7679
  if (parsed.kind !== "org") {
7627
7680
  return null;
7628
7681
  }
7629
- const normalizedOwnerSlug = _nullishCoalesce(_optionalChain([ownerSlug, 'optionalAccess', _211 => _211.trim, 'call', _212 => _212(), 'access', _213 => _213.toLowerCase, 'call', _214 => _214()]), () => ( ""));
7682
+ const normalizedOwnerSlug = _nullishCoalesce(_optionalChain([ownerSlug, 'optionalAccess', _214 => _214.trim, 'call', _215 => _215(), 'access', _216 => _216.toLowerCase, 'call', _217 => _217()]), () => ( ""));
7630
7683
  return normalizedOwnerSlug && parsed.ownerSlug.trim().toLowerCase() === normalizedOwnerSlug ? parsed.name : null;
7631
7684
  }
7632
7685
 
7633
7686
  // ../plays/deploy/run-deployment.ts
7634
7687
  var RUN_PLAY_METHOD_NAMES = /* @__PURE__ */ new Set(["runPlay", "runPlayAsync"]);
7635
7688
  function isRunPlayReceiver(node) {
7636
- return _chunkAGH6YP2Tjs.isAstNode.call(void 0, node) && node.type === "Identifier" && typeof node.name === "string" && (node.name === "ctx" || node.name.endsWith("Ctx"));
7689
+ return _chunkUQV5M6HNjs.isAstNode.call(void 0, node) && node.type === "Identifier" && typeof node.name === "string" && (node.name === "ctx" || node.name.endsWith("Ctx"));
7637
7690
  }
7638
7691
  function stringLiteralValue(node) {
7639
- if (!_chunkAGH6YP2Tjs.isAstNode.call(void 0, node)) return null;
7692
+ if (!_chunkUQV5M6HNjs.isAstNode.call(void 0, node)) return null;
7640
7693
  if (node.type === "Literal" && typeof node.value === "string") {
7641
7694
  return node.value;
7642
7695
  }
7643
7696
  if (node.type === "TemplateLiteral" && Array.isArray(node.expressions) && node.expressions.length === 0 && Array.isArray(node.quasis) && node.quasis.length === 1) {
7644
- const cooked = _optionalChain([node, 'access', _215 => _215.quasis, 'access', _216 => _216[0], 'access', _217 => _217.value, 'optionalAccess', _218 => _218.cooked]);
7697
+ const cooked = _optionalChain([node, 'access', _218 => _218.quasis, 'access', _219 => _219[0], 'access', _220 => _220.value, 'optionalAccess', _221 => _221.cooked]);
7645
7698
  return typeof cooked === "string" ? cooked : null;
7646
7699
  }
7647
7700
  return null;
7648
7701
  }
7649
7702
  async function extractRunPlayStringTargets(sourceCode) {
7650
- const program = _chunkAGH6YP2Tjs.parsePlaySourceForAnalysis.call(void 0, sourceCode);
7703
+ const program = _chunkUQV5M6HNjs.parsePlaySourceForAnalysis.call(void 0, sourceCode);
7651
7704
  if (!program) return await _asyncNullishCoalesce(await extractWithCompiler(sourceCode), async () => ( []));
7652
7705
  const targets = /* @__PURE__ */ new Set();
7653
7706
  const visit = (node) => {
7654
7707
  const callee = node.callee;
7655
- if (node.type === "CallExpression" && _chunkAGH6YP2Tjs.isAstNode.call(void 0, callee) && callee.type === "MemberExpression" && callee.computed !== true && _chunkAGH6YP2Tjs.isAstNode.call(void 0, callee.property) && RUN_PLAY_METHOD_NAMES.has(String(callee.property.name)) && isRunPlayReceiver(callee.object) && Array.isArray(node.arguments)) {
7708
+ if (node.type === "CallExpression" && _chunkUQV5M6HNjs.isAstNode.call(void 0, callee) && callee.type === "MemberExpression" && callee.computed !== true && _chunkUQV5M6HNjs.isAstNode.call(void 0, callee.property) && RUN_PLAY_METHOD_NAMES.has(String(callee.property.name)) && isRunPlayReceiver(callee.object) && Array.isArray(node.arguments)) {
7656
7709
  const playRef = stringLiteralValue(node.arguments[1]);
7657
7710
  const ownedName = playRef === null ? null : resolveOwnedPlayReferenceName(playRef);
7658
7711
  if (ownedName) targets.add(ownedName);
@@ -7660,7 +7713,7 @@ async function extractRunPlayStringTargets(sourceCode) {
7660
7713
  for (const [key, value] of Object.entries(node)) {
7661
7714
  if (key === "loc") continue;
7662
7715
  for (const child of Array.isArray(value) ? value : [value]) {
7663
- if (_chunkAGH6YP2Tjs.isAstNode.call(void 0, child)) visit(child);
7716
+ if (_chunkUQV5M6HNjs.isAstNode.call(void 0, child)) visit(child);
7664
7717
  }
7665
7718
  }
7666
7719
  };
@@ -7672,7 +7725,7 @@ async function extractWithCompiler(sourceCode) {
7672
7725
  try {
7673
7726
  const loaded = await Promise.resolve().then(() => _interopRequireWildcard(require("typescript")));
7674
7727
  ts = _nullishCoalesce(loaded.default, () => ( loaded));
7675
- } catch (e7) {
7728
+ } catch (e8) {
7676
7729
  return null;
7677
7730
  }
7678
7731
  const sourceFile = ts.createSourceFile(
@@ -7765,7 +7818,7 @@ async function runDeployment(params, hooks) {
7765
7818
  `Deployment ${params.deploymentId} has no linked repository and no target directory was given.`
7766
7819
  );
7767
7820
  }
7768
- const checkRunName = _optionalChain([state, 'access', _219 => _219.checkRunName, 'optionalAccess', _220 => _220.trim, 'call', _221 => _221()]) || void 0;
7821
+ const checkRunName = _optionalChain([state, 'access', _222 => _222.checkRunName, 'optionalAccess', _223 => _223.trim, 'call', _224 => _224()]) || void 0;
7769
7822
  let mergedPullRequestNumber = null;
7770
7823
  let promoted = false;
7771
7824
  const setStatus = (input) => client.setStatus({
@@ -7836,7 +7889,7 @@ async function runDeployment(params, hooks) {
7836
7889
  finalStatus,
7837
7890
  outcomes,
7838
7891
  ...monitorRunResult(),
7839
- checkRunId: _optionalChain([checkRun, 'optionalAccess', _222 => _222.checkRunId])
7892
+ checkRunId: _optionalChain([checkRun, 'optionalAccess', _225 => _225.checkRunId])
7840
7893
  };
7841
7894
  };
7842
7895
  await _promises.mkdir.call(void 0, hooks.workRoot, { recursive: true });
@@ -7862,7 +7915,7 @@ async function runDeployment(params, hooks) {
7862
7915
  const source = await hooks.openSource({ client, deployment });
7863
7916
  if (deployment.isProduction) {
7864
7917
  try {
7865
- mergedPullRequestNumber = await _asyncNullishCoalesce(await _optionalChain([source, 'access', _223 => _223.findMergedPullRequest, 'optionalCall', _224 => _224()]), async () => ( null));
7918
+ mergedPullRequestNumber = await _asyncNullishCoalesce(await _optionalChain([source, 'access', _226 => _226.findMergedPullRequest, 'optionalCall', _227 => _227()]), async () => ( null));
7866
7919
  } catch (error) {
7867
7920
  console.warn("[deploy-worker] merged PR lookup failed", {
7868
7921
  deploymentId: params.deploymentId,
@@ -7932,15 +7985,15 @@ async function runDeployment(params, hooks) {
7932
7985
  return finishFailed({
7933
7986
  error: input.error,
7934
7987
  outcomes: input.outcomes,
7935
- checkRunId: _optionalChain([checkRun2, 'optionalAccess', _225 => _225.checkRunId])
7988
+ checkRunId: _optionalChain([checkRun2, 'optionalAccess', _228 => _228.checkRunId])
7936
7989
  });
7937
7990
  };
7938
7991
  postFailureCheck = async (summary) => await _asyncOptionalChain([(await postCheckOrNull({
7939
7992
  conclusion: "failure",
7940
7993
  title: "Deploy failed",
7941
7994
  summary
7942
- })), 'optionalAccess', async _226 => _226.checkRunId]);
7943
- const deploymentBranch = _optionalChain([deployment, 'access', _227 => _227.ref, 'optionalAccess', _228 => _228.startsWith, 'call', _229 => _229("refs/heads/")]) ? deployment.ref.slice("refs/heads/".length) : _nullishCoalesce(_optionalChain([project, 'optionalAccess', _230 => _230.productionBranch]), () => ( null));
7995
+ })), 'optionalAccess', async _229 => _229.checkRunId]);
7996
+ const deploymentBranch = _optionalChain([deployment, 'access', _230 => _230.ref, 'optionalAccess', _231 => _231.startsWith, 'call', _232 => _232("refs/heads/")]) ? deployment.ref.slice("refs/heads/".length) : _nullishCoalesce(_optionalChain([project, 'optionalAccess', _233 => _233.productionBranch]), () => ( null));
7944
7997
  const supersedeIfHeadMoved = async () => {
7945
7998
  if (!deployment.isProduction || !source.branchHead || !deploymentBranch) {
7946
7999
  return null;
@@ -7954,7 +8007,7 @@ async function runDeployment(params, hooks) {
7954
8007
  });
7955
8008
  await setStatus({
7956
8009
  status: "superseded",
7957
- error: `Branch ${deploymentBranch} is now at ${_nullishCoalesce(_optionalChain([head, 'optionalAccess', _231 => _231.slice, 'call', _232 => _232(0, 12)]), () => ( "<deleted>"))}; this deployment's commit is no longer the head.`,
8010
+ error: `Branch ${deploymentBranch} is now at ${_nullishCoalesce(_optionalChain([head, 'optionalAccess', _234 => _234.slice, 'call', _235 => _235(0, 12)]), () => ( "<deleted>"))}; this deployment's commit is no longer the head.`,
7958
8011
  buildSeconds: buildSeconds(),
7959
8012
  ...monitorOutcomes.length > 0 ? { results: monitorResults() } : {},
7960
8013
  ...head ? { observedHeadSha: head } : {}
@@ -8070,7 +8123,7 @@ async function runDeployment(params, hooks) {
8070
8123
  failPlay(file, repoRelativeFile, message);
8071
8124
  continue;
8072
8125
  }
8073
- const name = _nullishCoalesce(_optionalChain([result, 'access', _233 => _233.playName, 'optionalAccess', _234 => _234.trim, 'call', _235 => _235()]), () => ( ""));
8126
+ const name = _nullishCoalesce(_optionalChain([result, 'access', _236 => _236.playName, 'optionalAccess', _237 => _237.trim, 'call', _238 => _238()]), () => ( ""));
8074
8127
  if (!name) {
8075
8128
  failPlay(
8076
8129
  file,
@@ -8089,7 +8142,7 @@ async function runDeployment(params, hooks) {
8089
8142
  continue;
8090
8143
  }
8091
8144
  seenNames.set(name, file);
8092
- const disallowed = (_nullishCoalesce(_optionalChain([result, 'access', _236 => _236.artifact, 'access', _237 => _237.importPolicy, 'optionalAccess', _238 => _238.packages]), () => ( []))).map(
8145
+ const disallowed = (_nullishCoalesce(_optionalChain([result, 'access', _239 => _239.artifact, 'access', _240 => _240.importPolicy, 'optionalAccess', _241 => _241.packages]), () => ( []))).map(
8093
8146
  (pkg) => typeof pkg === "string" ? pkg : _nullishCoalesce(pkg.name, () => ( ""))
8094
8147
  ).filter((pkgName) => pkgName && pkgName !== "deepline");
8095
8148
  if (disallowed.length > 0) {
@@ -8173,7 +8226,7 @@ async function runDeployment(params, hooks) {
8173
8226
  const conflicts = [];
8174
8227
  for (const play of ordered) {
8175
8228
  const owner = stateByName.get(play.name);
8176
- if (!project || !_optionalChain([owner, 'optionalAccess', _239 => _239.playProjectRepo]) || owner.playProjectRepo === _optionalChain([project, 'optionalAccess', _240 => _240.repoFullName]) || owner.playProjectDisabled) {
8229
+ if (!project || !_optionalChain([owner, 'optionalAccess', _242 => _242.playProjectRepo]) || owner.playProjectRepo === _optionalChain([project, 'optionalAccess', _243 => _243.repoFullName]) || owner.playProjectDisabled) {
8177
8230
  continue;
8178
8231
  }
8179
8232
  const message = `The play name "${play.name}" is already deployed from ${owner.playProjectRepo}. A play name belongs to one repository at a time. Rename it here, or disable that deployment target first.`;
@@ -8196,16 +8249,16 @@ async function runDeployment(params, hooks) {
8196
8249
  }
8197
8250
  const playByName = new Map(ordered.map((play) => [play.name, play]));
8198
8251
  const sdkUpdated = (name) => {
8199
- const artifact = _optionalChain([playByName, 'access', _241 => _241.get, 'call', _242 => _242(name), 'optionalAccess', _243 => _243.result, 'access', _244 => _244.artifact]);
8200
- const live = _nullishCoalesce(_optionalChain([stateByName, 'access', _245 => _245.get, 'call', _246 => _246(name), 'optionalAccess', _247 => _247.liveRevision]), () => ( null));
8252
+ const artifact = _optionalChain([playByName, 'access', _244 => _244.get, 'call', _245 => _245(name), 'optionalAccess', _246 => _246.result, 'access', _247 => _247.artifact]);
8253
+ const live = _nullishCoalesce(_optionalChain([stateByName, 'access', _248 => _248.get, 'call', _249 => _249(name), 'optionalAccess', _250 => _250.liveRevision]), () => ( null));
8201
8254
  return artifact && isSdkUpdated(live, artifact) ? { sdkUpdated: true } : {};
8202
8255
  };
8203
8256
  const outcomes = [];
8204
8257
  const toRegister = [];
8205
8258
  const toPromote = [];
8206
8259
  const takeoverWarning = (state2) => {
8207
- const owner = _optionalChain([state2, 'optionalAccess', _248 => _248.playProjectRepo]);
8208
- if (!owner || owner === _optionalChain([project, 'optionalAccess', _249 => _249.repoFullName])) return void 0;
8260
+ const owner = _optionalChain([state2, 'optionalAccess', _251 => _251.playProjectRepo]);
8261
+ if (!owner || owner === _optionalChain([project, 'optionalAccess', _252 => _252.repoFullName])) return void 0;
8209
8262
  if (!project) {
8210
8263
  return `This play is deployed from ${owner}. This directory deploy made a different revision live, so it is marked drifted from ${owner} until that repository deploys again. If you are done with ${owner}, unlink it (deepline git unlink <id>) and this play is released from it.`;
8211
8264
  }
@@ -8217,8 +8270,8 @@ async function runDeployment(params, hooks) {
8217
8270
  const artifact = play.result.artifact;
8218
8271
  const importsOtherPlays = (_nullishCoalesce(play.result.importedPlayDependencies, () => ( []))).length > 0;
8219
8272
  const matches = (revision) => !importsOtherPlays && carriesArtifact(revision, artifact);
8220
- if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _250 => _250.liveRevision]), () => ( null)))) {
8221
- if (deployment.isProduction && project && (_optionalChain([playState, 'optionalAccess', _251 => _251.playProjectId]) !== project.id || _optionalChain([playState, 'optionalAccess', _252 => _252.driftFromGit]))) {
8273
+ if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _253 => _253.liveRevision]), () => ( null)))) {
8274
+ if (deployment.isProduction && project && (_optionalChain([playState, 'optionalAccess', _254 => _254.playProjectId]) !== project.id || _optionalChain([playState, 'optionalAccess', _255 => _255.driftFromGit]))) {
8222
8275
  toPromote.push({
8223
8276
  name: play.name,
8224
8277
  revisionId: playState.liveRevision.revisionId
@@ -8229,12 +8282,12 @@ async function runDeployment(params, hooks) {
8229
8282
  name: play.name,
8230
8283
  file: play.file,
8231
8284
  status: "unchanged",
8232
- version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess', _253 => _253.liveRevision, 'optionalAccess', _254 => _254.version]), () => ( void 0)),
8285
+ version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess', _256 => _256.liveRevision, 'optionalAccess', _257 => _257.version]), () => ( void 0)),
8233
8286
  ...warning ? { warning } : {}
8234
8287
  });
8235
8288
  continue;
8236
8289
  }
8237
- if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _255 => _255.workingRevision]), () => ( null)))) {
8290
+ if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _258 => _258.workingRevision]), () => ( null)))) {
8238
8291
  if (deployment.isProduction) {
8239
8292
  toPromote.push({
8240
8293
  name: play.name,
@@ -8245,7 +8298,7 @@ async function runDeployment(params, hooks) {
8245
8298
  name: play.name,
8246
8299
  file: play.file,
8247
8300
  status: "registered",
8248
- version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess', _256 => _256.workingRevision, 'optionalAccess', _257 => _257.version]), () => ( void 0)),
8301
+ version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess', _259 => _259.workingRevision, 'optionalAccess', _260 => _260.version]), () => ( void 0)),
8249
8302
  ...sdkUpdated(play.name),
8250
8303
  ...warning ? { warning } : {}
8251
8304
  });
@@ -8372,11 +8425,11 @@ async function runDeployment(params, hooks) {
8372
8425
  const promotion = await client.promote(toPromote);
8373
8426
  promoted = true;
8374
8427
  for (const outcome of promotion.outcomes) {
8375
- const previousVersion = _nullishCoalesce(_optionalChain([stateByName, 'access', _258 => _258.get, 'call', _259 => _259(outcome.name), 'optionalAccess', _260 => _260.liveRevision, 'optionalAccess', _261 => _261.version]), () => ( null));
8428
+ const previousVersion = _nullishCoalesce(_optionalChain([stateByName, 'access', _261 => _261.get, 'call', _262 => _262(outcome.name), 'optionalAccess', _263 => _263.liveRevision, 'optionalAccess', _264 => _264.version]), () => ( null));
8376
8429
  const warning = takeoverWarning(stateByName.get(outcome.name));
8377
8430
  outcomes.push({
8378
8431
  name: outcome.name,
8379
- file: _nullishCoalesce(_optionalChain([playByName, 'access', _262 => _262.get, 'call', _263 => _263(outcome.name), 'optionalAccess', _264 => _264.file]), () => ( outcome.name)),
8432
+ file: _nullishCoalesce(_optionalChain([playByName, 'access', _265 => _265.get, 'call', _266 => _266(outcome.name), 'optionalAccess', _267 => _267.file]), () => ( outcome.name)),
8380
8433
  status: outcome.status === "promoted" ? "promoted" : "failed",
8381
8434
  version: outcome.version,
8382
8435
  ...outcome.status === "promoted" && typeof previousVersion === "number" && previousVersion !== outcome.version ? { previousVersion } : {},
@@ -8388,7 +8441,7 @@ async function runDeployment(params, hooks) {
8388
8441
  } catch (error) {
8389
8442
  if (revokedFinalStatus(error)) throw error;
8390
8443
  const body = error instanceof DeployApiError ? error.body : null;
8391
- const errorText = _nullishCoalesce(_optionalChain([body, 'optionalAccess', _265 => _265.error]), () => ( (error instanceof Error ? error.message : String(error))));
8444
+ const errorText = _nullishCoalesce(_optionalChain([body, 'optionalAccess', _268 => _268.error]), () => ( (error instanceof Error ? error.message : String(error))));
8392
8445
  if (/PLAY_DEPLOYMENT_NOT_ACTIVE/.test(errorText)) {
8393
8446
  console.info("[deploy-worker] cancelled at promote", {
8394
8447
  deploymentId: params.deploymentId
@@ -8412,9 +8465,9 @@ async function runDeployment(params, hooks) {
8412
8465
  error: errorText,
8413
8466
  outcomes: [
8414
8467
  ...outcomes,
8415
- ...(_nullishCoalesce(_optionalChain([body, 'optionalAccess', _266 => _266.outcomes]), () => ( toPromote))).map((entry) => ({
8468
+ ...(_nullishCoalesce(_optionalChain([body, 'optionalAccess', _269 => _269.outcomes]), () => ( toPromote))).map((entry) => ({
8416
8469
  name: entry.name,
8417
- file: _nullishCoalesce(_optionalChain([playByName, 'access', _267 => _267.get, 'call', _268 => _268(entry.name), 'optionalAccess', _269 => _269.file]), () => ( entry.name)),
8470
+ file: _nullishCoalesce(_optionalChain([playByName, 'access', _270 => _270.get, 'call', _271 => _271(entry.name), 'optionalAccess', _272 => _272.file]), () => ( entry.name)),
8418
8471
  status: "failed",
8419
8472
  error: _nullishCoalesce(("error" in entry ? entry.error : void 0), () => ( errorText))
8420
8473
  }))
@@ -8458,7 +8511,7 @@ async function runDeployment(params, hooks) {
8458
8511
  });
8459
8512
  let checkRunId;
8460
8513
  try {
8461
- checkRunId = await _optionalChain([postFailureCheck, 'optionalCall', _270 => _270(message.slice(0, 2e3))]);
8514
+ checkRunId = await _optionalChain([postFailureCheck, 'optionalCall', _273 => _273(message.slice(0, 2e3))]);
8462
8515
  } catch (checkError) {
8463
8516
  const revokedAtCheck = revokedFinalStatus(checkError);
8464
8517
  if (revokedAtCheck) {
@@ -8526,7 +8579,7 @@ function renderOutcome(outcome) {
8526
8579
  function printResult2(input) {
8527
8580
  const failed = input.status === "failed" || input.status === "cancelled";
8528
8581
  if (failed) process.exitCode = 1;
8529
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
8582
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
8530
8583
  {
8531
8584
  deployment: { ...input.deployment, status: input.status },
8532
8585
  plays: input.outcomes,
@@ -8551,7 +8604,7 @@ async function handlePlaysDeploy(directory, options) {
8551
8604
  const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
8552
8605
  throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
8553
8606
  });
8554
- const { http, config } = _chunkDNMV2L7Qjs.getAuthedHttpClient.call(void 0, );
8607
+ const { http, config } = _chunkWHKTRZ3Jjs.getAuthedHttpClient.call(void 0, );
8555
8608
  const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
8556
8609
  const startDeployment = () => http.post("/api/v2/deployments", {
8557
8610
  deliveryId,
@@ -8578,14 +8631,14 @@ async function handlePlaysDeploy(directory, options) {
8578
8631
  },
8579
8632
  {
8580
8633
  bundle: bundleDeployPlayFile,
8581
- fetchImpl: _chunkO5GPNPOCjs.fetchWithDeploymentProtection,
8634
+ fetchImpl: _chunkGHHLLEZKjs.fetchWithDeploymentProtection,
8582
8635
  // The plays are already here: "opening" the source is naming it.
8583
8636
  openSource: async () => ({
8584
8637
  open: async () => ({ repoRoot: root })
8585
8638
  }),
8586
8639
  target: {
8587
8640
  rootDirectory: "",
8588
- manifestPath: _nullishCoalesce(_optionalChain([options, 'access', _271 => _271.manifest, 'optionalAccess', _272 => _272.trim, 'call', _273 => _273()]), () => ( ""))
8641
+ manifestPath: _nullishCoalesce(_optionalChain([options, 'access', _274 => _274.manifest, 'optionalAccess', _275 => _275.trim, 'call', _276 => _276()]), () => ( ""))
8589
8642
  },
8590
8643
  workRoot
8591
8644
  }
@@ -9101,7 +9154,7 @@ function parseJsonInput(raw, flag = "--input") {
9101
9154
  let parsed;
9102
9155
  try {
9103
9156
  parsed = JSON.parse(source);
9104
- } catch (e8) {
9157
+ } catch (e9) {
9105
9158
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
9106
9159
  `${flag} expects a valid JSON object or @input.json. A bare file path is not JSON.${flag === "--input" ? " Use the field names and run example from plays check <file> or deepline describe <play>. --csv contacts.csv supplies input.csv only when the Play declares that field." : ""}`,
9107
9160
  void 0,
@@ -9139,14 +9192,14 @@ function parseInputFlagValue(raw) {
9139
9192
  if (trimmed === "true" || trimmed === "false" || trimmed === "null" || trimmed.startsWith("{") || trimmed.startsWith("[") || /^-?\d+(\.\d+)?$/.test(trimmed)) {
9140
9193
  try {
9141
9194
  return JSON.parse(trimmed);
9142
- } catch (e9) {
9195
+ } catch (e10) {
9143
9196
  return raw;
9144
9197
  }
9145
9198
  }
9146
9199
  return raw;
9147
9200
  }
9148
9201
  function parsePlayRunOptions(args, initialInput = null) {
9149
- const selection = _chunkDNMV2L7Qjs.parseJsonFields.call(void 0, args, "run");
9202
+ const selection = _chunkWHKTRZ3Jjs.parseJsonFields.call(void 0, args, "run");
9150
9203
  args = selection.args;
9151
9204
  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.";
9152
9205
  let filePath = null;
@@ -9156,7 +9209,7 @@ function parsePlayRunOptions(args, initialInput = null) {
9156
9209
  let revisionSelector = null;
9157
9210
  const watch = !args.includes("--no-wait");
9158
9211
  const dryRun = args.includes("--dry-run");
9159
- let jsonOutput = dryRun ? _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args);
9212
+ let jsonOutput = dryRun ? _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args);
9160
9213
  const fullJson = args.includes("--full");
9161
9214
  const force = args.includes("--force");
9162
9215
  const forceToolRefresh = args.includes("--force-tool-refresh");
@@ -9203,7 +9256,7 @@ function parsePlayRunOptions(args, initialInput = null) {
9203
9256
  "--log-level requires one of: debug, info, warn, error."
9204
9257
  );
9205
9258
  }
9206
- const parsed = _chunkITFUZEHEjs.parseLogLevel.call(void 0, value);
9259
+ const parsed = _chunkYGFQ7YSMjs.parseLogLevel.call(void 0, value);
9207
9260
  if (!parsed) {
9208
9261
  throw new Error(
9209
9262
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -9240,7 +9293,7 @@ function parsePlayRunOptions(args, initialInput = null) {
9240
9293
  throw new Error("--profile requires an execution profile id.");
9241
9294
  }
9242
9295
  profile = value.trim();
9243
- _chunkAGH6YP2Tjs.resolveEnabledExecutionProfile.call(void 0, profile);
9296
+ _chunkUQV5M6HNjs.resolveEnabledExecutionProfile.call(void 0, profile);
9244
9297
  index += 1;
9245
9298
  continue;
9246
9299
  }
@@ -9477,8 +9530,8 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
9477
9530
  const dryRun = _nullishCoalesce(options.dryRun, () => ( base.dryRun));
9478
9531
  if (dryRun && resolvedTarget.kind !== "file")
9479
9532
  throw new Error("--dry-run currently requires a local Play file.");
9480
- const profile = _nullishCoalesce(_optionalChain([stringOption, 'call', _274 => _274(options.profile, "--profile"), 'optionalAccess', _275 => _275.trim, 'call', _276 => _276()]), () => ( base.profile));
9481
- if (profile !== null) _chunkAGH6YP2Tjs.resolveEnabledExecutionProfile.call(void 0, profile);
9533
+ const profile = _nullishCoalesce(_optionalChain([stringOption, 'call', _277 => _277(options.profile, "--profile"), 'optionalAccess', _278 => _278.trim, 'call', _279 => _279()]), () => ( base.profile));
9534
+ if (profile !== null) _chunkUQV5M6HNjs.resolveEnabledExecutionProfile.call(void 0, profile);
9482
9535
  const countOption = (value, flag) => {
9483
9536
  if (value === void 0) return void 0;
9484
9537
  if (!/^[1-9]\d*$/.test(value))
@@ -9510,7 +9563,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
9510
9563
  const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
9511
9564
  (arg) => arg === "--log-level" || arg.startsWith("--log-level=")
9512
9565
  );
9513
- let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkITFUZEHEjs.parseLogLevel.call(void 0, options.logLevel);
9566
+ let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkYGFQ7YSMjs.parseLogLevel.call(void 0, options.logLevel);
9514
9567
  if (!logLevel)
9515
9568
  throw new Error("--log-level requires one of: debug, info, warn, error.");
9516
9569
  const debugAlias = options.logs || options.debug === true || inputArgs.some(
@@ -9524,13 +9577,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
9524
9577
  if (debugAlias || debugMapLatency && logLevel === "info")
9525
9578
  logLevel = "debug";
9526
9579
  const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
9527
- const jsonFields = options.json === void 0 ? base.jsonFields : _chunkDNMV2L7Qjs.parseJsonFields.call(void 0,
9528
- [...fullJson ? ["--full"] : [], ..._chunkDNMV2L7Qjs.jsonFieldArgs.call(void 0, options.json)],
9580
+ const jsonFields = options.json === void 0 ? base.jsonFields : _chunkWHKTRZ3Jjs.parseJsonFields.call(void 0,
9581
+ [...fullJson ? ["--full"] : [], ..._chunkWHKTRZ3Jjs.jsonFieldArgs.call(void 0, options.json)],
9529
9582
  "run"
9530
9583
  ).fields;
9531
9584
  const watch = options.wait === false ? false : base.watch;
9532
9585
  const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
9533
- const jsonOutput = dryRun || !watch ? explicitJson || _chunkDNMV2L7Qjs.argsWantJson.call(void 0, []) : explicitJson;
9586
+ const jsonOutput = dryRun || !watch ? explicitJson || _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, []) : explicitJson;
9534
9587
  const verboseLogs = Boolean(
9535
9588
  debugAlias || logLevel === "debug" || debugMapLatency
9536
9589
  );
@@ -9574,7 +9627,7 @@ function playAuthoringGraphPath(parent, filePath) {
9574
9627
  // src/cli/renderers/local-play-execution.ts
9575
9628
  function renderLocalPlayExecutionPlan(plan, options = {}) {
9576
9629
  if (options.dryRun) {
9577
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
9630
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
9578
9631
  return;
9579
9632
  }
9580
9633
  process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
@@ -9658,7 +9711,7 @@ async function preflightRunIdFile(path) {
9658
9711
  `Cannot write --run-id-file destination ${destination}: ${error instanceof Error ? error.message : String(error)}`
9659
9712
  );
9660
9713
  } finally {
9661
- await _optionalChain([handle, 'optionalAccess', _277 => _277.close, 'call', _278 => _278()]);
9714
+ await _optionalChain([handle, 'optionalAccess', _280 => _280.close, 'call', _281 => _281()]);
9662
9715
  await removeRunIdTempFile(tempPath);
9663
9716
  }
9664
9717
  return destination;
@@ -9712,9 +9765,9 @@ async function writePlayRunIdFile(destination, runId, options = {}) {
9712
9765
  } catch (error) {
9713
9766
  if (error.code !== "EEXIST") throw error;
9714
9767
  const raced = await readRunIdFile(destination);
9715
- if (_optionalChain([raced, 'optionalAccess', _279 => _279.runId]) !== runId) {
9768
+ if (_optionalChain([raced, 'optionalAccess', _282 => _282.runId]) !== runId) {
9716
9769
  throw new Error(
9717
- `--run-id-file destination already records run ${_nullishCoalesce(_optionalChain([raced, 'optionalAccess', _280 => _280.runId]), () => ( "<invalid>"))}; refusing to replace it with ${runId}: ${destination}`
9770
+ `--run-id-file destination already records run ${_nullishCoalesce(_optionalChain([raced, 'optionalAccess', _283 => _283.runId]), () => ( "<invalid>"))}; refusing to replace it with ${runId}: ${destination}`
9718
9771
  );
9719
9772
  }
9720
9773
  if (!options.launchConfirmed || raced.launchConfirmed) return;
@@ -9730,7 +9783,7 @@ async function writePlayRunIdFile(destination, runId, options = {}) {
9730
9783
  }
9731
9784
  }
9732
9785
  } finally {
9733
- await _optionalChain([handle, 'optionalAccess', _281 => _281.close, 'call', _282 => _282()]);
9786
+ await _optionalChain([handle, 'optionalAccess', _284 => _284.close, 'call', _285 => _285()]);
9734
9787
  await removeRunIdTempFile(tempPath);
9735
9788
  }
9736
9789
  }
@@ -9799,10 +9852,10 @@ function playReferenceMatchTokens(value) {
9799
9852
  return normalizePlayReferenceForMatch(value).split("-").filter((token) => token.length > 1 && token !== "to" && token !== "and");
9800
9853
  }
9801
9854
  function playSuggestionReference(play) {
9802
- if (_optionalChain([play, 'access', _283 => _283.reference, 'optionalAccess', _284 => _284.trim, 'call', _285 => _285()])) {
9855
+ if (_optionalChain([play, 'access', _286 => _286.reference, 'optionalAccess', _287 => _287.trim, 'call', _288 => _288()])) {
9803
9856
  return play.reference.trim();
9804
9857
  }
9805
- const ownerSlug = _optionalChain([play, 'access', _286 => _286.ownerSlug, 'optionalAccess', _287 => _287.trim, 'call', _288 => _288()]);
9858
+ const ownerSlug = _optionalChain([play, 'access', _289 => _289.ownerSlug, 'optionalAccess', _290 => _290.trim, 'call', _291 => _291()]);
9806
9859
  return ownerSlug ? `${ownerSlug}/${play.name}` : play.name;
9807
9860
  }
9808
9861
  function scorePlayReferenceSuggestion(requested, play) {
@@ -9818,8 +9871,8 @@ function scorePlayReferenceSuggestion(requested, play) {
9818
9871
  const reference = playSuggestionReference(play);
9819
9872
  const referenceNorm = normalizePlayReferenceForMatch(reference);
9820
9873
  const nameNorm = normalizePlayReferenceForMatch(play.name);
9821
- const candidateNamespace = reference.includes("/") ? _optionalChain([reference, 'access', _289 => _289.split, 'call', _290 => _290("/"), 'access', _291 => _291[0], 'optionalAccess', _292 => _292.toLowerCase, 'call', _293 => _293()]) : null;
9822
- const requestedNamespace = _nullishCoalesce(_optionalChain([parsed, 'access', _294 => _294.ownerSlug, 'optionalAccess', _295 => _295.toLowerCase, 'call', _296 => _296()]), () => ( null));
9874
+ const candidateNamespace = reference.includes("/") ? _optionalChain([reference, 'access', _292 => _292.split, 'call', _293 => _293("/"), 'access', _294 => _294[0], 'optionalAccess', _295 => _295.toLowerCase, 'call', _296 => _296()]) : null;
9875
+ const requestedNamespace = _nullishCoalesce(_optionalChain([parsed, 'access', _297 => _297.ownerSlug, 'optionalAccess', _298 => _298.toLowerCase, 'call', _299 => _299()]), () => ( null));
9823
9876
  const aliases = (_nullishCoalesce(play.aliases, () => ( []))).map(normalizePlayReferenceForMatch);
9824
9877
  const searchable = [referenceNorm, nameNorm, ...aliases].filter(Boolean);
9825
9878
  const requestedTokens = playReferenceMatchTokens(requestedName);
@@ -9934,20 +9987,20 @@ async function buildPlayReferenceNotFoundError(input) {
9934
9987
  plays,
9935
9988
  limit: 5
9936
9989
  });
9937
- } catch (e10) {
9990
+ } catch (e11) {
9938
9991
  suggestions = [];
9939
9992
  }
9940
9993
  const sourceError = input.sourceError instanceof _chunk7P5AA3SNjs.DeeplineError ? input.sourceError : null;
9941
- const code = _optionalChain([sourceError, 'optionalAccess', _297 => _297.code]) && sourceError.code !== "API_ERROR" ? sourceError.code : "PLAY_NOT_FOUND";
9994
+ const code = _optionalChain([sourceError, 'optionalAccess', _300 => _300.code]) && sourceError.code !== "API_ERROR" ? sourceError.code : "PLAY_NOT_FOUND";
9942
9995
  return new (0, _chunk7P5AA3SNjs.DeeplineError)(
9943
9996
  buildPlayReferenceNotFoundMessage({
9944
9997
  requested: input.target,
9945
9998
  command: input.command,
9946
9999
  suggestions
9947
10000
  }),
9948
- _nullishCoalesce(_optionalChain([sourceError, 'optionalAccess', _298 => _298.statusCode]), () => ( 404)),
10001
+ _nullishCoalesce(_optionalChain([sourceError, 'optionalAccess', _301 => _301.statusCode]), () => ( 404)),
9949
10002
  code,
9950
- _optionalChain([sourceError, 'optionalAccess', _299 => _299.details])
10003
+ _optionalChain([sourceError, 'optionalAccess', _302 => _302.details])
9951
10004
  );
9952
10005
  }
9953
10006
  async function isMissingRunPlayReferenceError(input) {
@@ -9999,7 +10052,7 @@ function formatPlayReference(play) {
9999
10052
  if (play.reference) {
10000
10053
  return play.reference;
10001
10054
  }
10002
- const ownerSlug = _optionalChain([play, 'access', _300 => _300.ownerSlug, 'optionalAccess', _301 => _301.trim, 'call', _302 => _302()]) || "org";
10055
+ const ownerSlug = _optionalChain([play, 'access', _303 => _303.ownerSlug, 'optionalAccess', _304 => _304.trim, 'call', _305 => _305()]) || "org";
10003
10056
  return `${ownerSlug}/${play.name}`;
10004
10057
  }
10005
10058
  function formatPlayListReference(play) {
@@ -10029,7 +10082,7 @@ function materializeRemotePlaySource(input) {
10029
10082
  return null;
10030
10083
  }
10031
10084
  const entrySource = input.source.files[input.source.entryFile];
10032
- if (!_optionalChain([entrySource, 'optionalAccess', _303 => _303.trim, 'call', _304 => _304()])) {
10085
+ if (!_optionalChain([entrySource, 'optionalAccess', _306 => _306.trim, 'call', _307 => _307()])) {
10033
10086
  return null;
10034
10087
  }
10035
10088
  const files = Object.entries(input.source.files);
@@ -10113,7 +10166,7 @@ function buildMissingDefinePlayError(filePath) {
10113
10166
  );
10114
10167
  }
10115
10168
  function extractPlayName(code, filePath) {
10116
- const definedPlayName = _chunkAGH6YP2Tjs.extractDefinedPlayName.call(void 0, code);
10169
+ const definedPlayName = _chunkUQV5M6HNjs.extractDefinedPlayName.call(void 0, code);
10117
10170
  if (definedPlayName) {
10118
10171
  return definedPlayName;
10119
10172
  }
@@ -10328,7 +10381,7 @@ function stageFile(logicalPath, absolutePath) {
10328
10381
  function normalizePlayPath(filePath) {
10329
10382
  try {
10330
10383
  return _fs.realpathSync.native(_path.resolve.call(void 0, filePath));
10331
- } catch (e11) {
10384
+ } catch (e12) {
10332
10385
  return _path.resolve.call(void 0, filePath);
10333
10386
  }
10334
10387
  }
@@ -10339,11 +10392,11 @@ function formatUnresolvedPackagedFiles(filePath, unresolvedFileReferences) {
10339
10392
  const details = unresolvedFileReferences.map((unresolved) => `${unresolved.sourceFragment}: ${unresolved.message}`).join("; ");
10340
10393
  return `Failed to package local ctx.csv(...) files in ${filePath}: ${details}`;
10341
10394
  }
10342
- async function collectBundledPlayGraph(entryFile, profile = null, entryExportName = _chunkAGH6YP2Tjs.PLAY_DEFAULT_EXPORT, options = {}) {
10395
+ async function collectBundledPlayGraph(entryFile, profile = null, entryExportName = _chunkUQV5M6HNjs.PLAY_DEFAULT_EXPORT, options = {}) {
10343
10396
  const playBundler = await loadPlayBundler();
10344
10397
  const nodes = /* @__PURE__ */ new Map();
10345
10398
  const visiting = /* @__PURE__ */ new Set();
10346
- const artifactKind = _chunkAGH6YP2Tjs.resolveEnabledExecutionProfile.call(void 0, profile).artifactKind;
10399
+ const artifactKind = _chunkUQV5M6HNjs.resolveEnabledExecutionProfile.call(void 0, profile).artifactKind;
10347
10400
  const rootPath = normalizePlayPath(entryFile);
10348
10401
  const visit = async (filePath) => {
10349
10402
  const absolutePath = normalizePlayPath(filePath);
@@ -10361,7 +10414,7 @@ async function collectBundledPlayGraph(entryFile, profile = null, entryExportNam
10361
10414
  const bundleResult = await playBundler.bundlePlayFile(absolutePath, {
10362
10415
  target: artifactKind,
10363
10416
  ...options.cache === false ? { cache: false } : {},
10364
- ...absolutePath === rootPath && entryExportName !== _chunkAGH6YP2Tjs.PLAY_DEFAULT_EXPORT ? { exportName: entryExportName } : {}
10417
+ ...absolutePath === rootPath && entryExportName !== _chunkUQV5M6HNjs.PLAY_DEFAULT_EXPORT ? { exportName: entryExportName } : {}
10365
10418
  });
10366
10419
  if (bundleResult.success === false) {
10367
10420
  throw new Error(
@@ -10420,7 +10473,7 @@ async function compileBundledPlayGraphManifests(client, graph) {
10420
10473
  const child = graph.nodes.get(
10421
10474
  normalizePlayPath(dependency.filePath)
10422
10475
  );
10423
- if (!_optionalChain([child, 'optionalAccess', _305 => _305.compilerManifest])) {
10476
+ if (!_optionalChain([child, 'optionalAccess', _308 => _308.compilerManifest])) {
10424
10477
  throw new Error(
10425
10478
  `Missing compiler manifest for imported dependency ${dependency.filePath}.`
10426
10479
  );
@@ -10454,7 +10507,7 @@ function missingPlayDescriptionMessage(node) {
10454
10507
  ].join(" ");
10455
10508
  }
10456
10509
  function collectMissingPlayDescriptionErrors(graph) {
10457
- return [...graph.nodes.values()].filter((node) => !_optionalChain([node, 'access', _306 => _306.playDescription, 'optionalAccess', _307 => _307.trim, 'call', _308 => _308()])).map(missingPlayDescriptionMessage);
10510
+ return [...graph.nodes.values()].filter((node) => !_optionalChain([node, 'access', _309 => _309.playDescription, 'optionalAccess', _310 => _310.trim, 'call', _311 => _311()])).map(missingPlayDescriptionMessage);
10458
10511
  }
10459
10512
  function assertBundledPlayGraphDescriptions(graph) {
10460
10513
  const errors = collectMissingPlayDescriptionErrors(graph);
@@ -10506,7 +10559,7 @@ function formatTimestamp(value) {
10506
10559
  return date.toISOString();
10507
10560
  }
10508
10561
  function isoTimestamp(value) {
10509
- return _nullishCoalesce(_optionalChain([timestampDate, 'call', _309 => _309(value), 'optionalAccess', _310 => _310.toISOString, 'call', _311 => _311()]), () => ( null));
10562
+ return _nullishCoalesce(_optionalChain([timestampDate, 'call', _312 => _312(value), 'optionalAccess', _313 => _313.toISOString, 'call', _314 => _314()]), () => ( null));
10510
10563
  }
10511
10564
  function formatRunLine(run) {
10512
10565
  const credits = typeof run.billingTotalCredits === "number" && Number.isFinite(run.billingTotalCredits) ? `${formatCreditAmount2(run.billingTotalCredits)} credits` : "\u2014";
@@ -10514,7 +10567,7 @@ function formatRunLine(run) {
10514
10567
  }
10515
10568
  function playStatusErrorText(status) {
10516
10569
  const chunks = [];
10517
- const progressError = _optionalChain([status, 'access', _312 => _312.progress, 'optionalAccess', _313 => _313.error]);
10570
+ const progressError = _optionalChain([status, 'access', _315 => _315.progress, 'optionalAccess', _316 => _316.error]);
10518
10571
  if (typeof progressError === "string" && progressError.trim()) {
10519
10572
  chunks.push(progressError.trim());
10520
10573
  }
@@ -10540,7 +10593,7 @@ function playStatusErrorText(status) {
10540
10593
  function isRetryablePendingStartFailure(status) {
10541
10594
  if (status.status !== "failed") return false;
10542
10595
  if (status.runId && status.runId !== "pending") return false;
10543
- return _chunkITFUZEHEjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
10596
+ return _chunkYGFQ7YSMjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
10544
10597
  }
10545
10598
  function pendingStartFailureStatus(input) {
10546
10599
  const message = input.error instanceof Error ? input.error.message : String(input.error);
@@ -10567,13 +10620,13 @@ var PLAY_PROGRESS_HEARTBEAT_INTERVAL_MS = 15e3;
10567
10620
  var PLAY_STATUS_HEARTBEAT_INTERVAL_MS = 15e3;
10568
10621
  function watchSurfaceReaches(state, provenance, level) {
10569
10622
  const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
10570
- if (!_chunkITFUZEHEjs.logLevelReaches.call(void 0, level, minimumLevel)) {
10623
+ if (!_chunkYGFQ7YSMjs.logLevelReaches.call(void 0, level, minimumLevel)) {
10571
10624
  return false;
10572
10625
  }
10573
- if (_chunkITFUZEHEjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
10626
+ if (_chunkYGFQ7YSMjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
10574
10627
  return true;
10575
10628
  }
10576
- return state.verbose === true && _chunkITFUZEHEjs.logProvenanceReaches.call(void 0, provenance, "debug");
10629
+ return state.verbose === true && _chunkYGFQ7YSMjs.logProvenanceReaches.call(void 0, provenance, "debug");
10577
10630
  }
10578
10631
  function getEventPayload(event) {
10579
10632
  return event.payload && typeof event.payload === "object" ? event.payload : {};
@@ -10596,7 +10649,7 @@ function getRunIdFromLiveEvent(event) {
10596
10649
  if (typeof directRunId === "string" && directRunId.trim()) {
10597
10650
  return directRunId;
10598
10651
  }
10599
- const packageRunId = _optionalChain([getRunRecordFromPackage, 'call', _314 => _314(payload), 'optionalAccess', _315 => _315.id]);
10652
+ const packageRunId = _optionalChain([getRunRecordFromPackage, 'call', _317 => _317(payload), 'optionalAccess', _318 => _318.id]);
10600
10653
  return typeof packageRunId === "string" && packageRunId.trim() ? packageRunId : null;
10601
10654
  }
10602
10655
  function eventConfirmsPlayRunLaunch(event) {
@@ -10617,19 +10670,19 @@ function getStatusFromLiveEvent(event) {
10617
10670
  return null;
10618
10671
  }
10619
10672
  const payload = getEventPayload(event);
10620
- return _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([getRunRecordFromPackage, 'call', _316 => _316(payload), 'optionalAccess', _317 => _317.status]))));
10673
+ return _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([getRunRecordFromPackage, 'call', _319 => _319(payload), 'optionalAccess', _320 => _320.status]))));
10621
10674
  }
10622
10675
  function readLiveRunField(event, field) {
10623
10676
  const payload = getEventPayload(event);
10624
10677
  if (field === "waitKind") {
10625
- const wait = _nullishCoalesce(payload.wait, () => ( _optionalChain([getRunRecordFromPackage, 'call', _318 => _318(payload), 'optionalAccess', _319 => _319.wait])));
10678
+ const wait = _nullishCoalesce(payload.wait, () => ( _optionalChain([getRunRecordFromPackage, 'call', _321 => _321(payload), 'optionalAccess', _322 => _322.wait])));
10626
10679
  if (wait && typeof wait === "object" && !Array.isArray(wait)) {
10627
10680
  const kind = wait.kind;
10628
10681
  if (typeof kind === "string" && kind.trim()) return kind.trim();
10629
10682
  }
10630
10683
  }
10631
10684
  const run = getRunRecordFromPackage(payload);
10632
- const records = [payload, payload.progress, run, _optionalChain([run, 'optionalAccess', _320 => _320.progress])].filter(
10685
+ const records = [payload, payload.progress, run, _optionalChain([run, 'optionalAccess', _323 => _323.progress])].filter(
10633
10686
  (value) => Boolean(value && typeof value === "object" && !Array.isArray(value))
10634
10687
  );
10635
10688
  for (const record3 of records) {
@@ -10644,7 +10697,7 @@ function getLiveRunStringField(event, field) {
10644
10697
  function getLiveRunActivity(event) {
10645
10698
  const payload = getEventPayload(event);
10646
10699
  const run = getRunRecordFromPackage(payload);
10647
- const candidates = [payload.activity, _optionalChain([run, 'optionalAccess', _321 => _321.activity])];
10700
+ const candidates = [payload.activity, _optionalChain([run, 'optionalAccess', _324 => _324.activity])];
10648
10701
  for (const candidate of candidates) {
10649
10702
  if (candidate && typeof candidate === "object" && !Array.isArray(candidate) && typeof candidate.summary === "string" && candidate.observation && typeof candidate.observation === "object") {
10650
10703
  return candidate;
@@ -10659,9 +10712,9 @@ function getRunLifecycleHint(input) {
10659
10712
  return null;
10660
10713
  }
10661
10714
  const activity = getLiveRunActivity(input.event);
10662
- const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _322 => _322.observation, 'access', _323 => _323.state, 'access', _324 => _324.kind]) === "active" && activity.observation.target.kind !== "runner";
10715
+ const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _325 => _325.observation, 'access', _326 => _326.state, 'access', _327 => _327.kind]) === "active" && activity.observation.target.kind !== "runner";
10663
10716
  const inspect = `'deepline runs get ${runId} --full --json'`;
10664
- const sleepState = _optionalChain([activity, 'optionalAccess', _325 => _325.observation, 'access', _326 => _326.state, 'access', _327 => _327.kind]) === "scheduled" && activity.observation.state.reason === "sleep" ? activity.observation.state : null;
10717
+ const sleepState = _optionalChain([activity, 'optionalAccess', _328 => _328.observation, 'access', _329 => _329.state, 'access', _330 => _330.kind]) === "scheduled" && activity.observation.state.reason === "sleep" ? activity.observation.state : null;
10665
10718
  if (status === "waiting" && (sleepState !== null || getLiveRunStringField(input.event, "waitKind") === "sleep")) {
10666
10719
  const recordedWake = readLiveRunField(input.event, "waitUntil");
10667
10720
  const projectedWake = sleepState && sleepState.resumeAt > activity.observation.observedAt ? sleepState.resumeAt : null;
@@ -10672,7 +10725,7 @@ function getRunLifecycleHint(input) {
10672
10725
  };
10673
10726
  }
10674
10727
  const typedEventWaitKind = getLiveRunStringField(input.event, "waitKind");
10675
- const activityEventWait = _optionalChain([activity, 'optionalAccess', _328 => _328.observation, 'access', _329 => _329.state, 'access', _330 => _330.kind]) === "waiting" && activity.observation.state.reason.kind === "external_event";
10728
+ const activityEventWait = _optionalChain([activity, 'optionalAccess', _331 => _331.observation, 'access', _332 => _332.state, 'access', _333 => _333.kind]) === "waiting" && activity.observation.state.reason.kind === "external_event";
10676
10729
  if (status === "waiting" && (typedEventWaitKind === "integration_event" || typedEventWaitKind === "integration_event_batch" || activityEventWait)) {
10677
10730
  return {
10678
10731
  signature: [
@@ -10745,12 +10798,12 @@ function getFinalStatusFromLiveEvent(event) {
10745
10798
  }
10746
10799
  const payload = getEventPayload(event);
10747
10800
  const packageRun = getRunRecordFromPackage(payload);
10748
- const status = _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([packageRun, 'optionalAccess', _331 => _331.status]))));
10801
+ const status = _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([packageRun, 'optionalAccess', _334 => _334.status]))));
10749
10802
  if (status !== "completed" && status !== "failed" && status !== "cancelled") {
10750
10803
  return null;
10751
10804
  }
10752
- const runId = typeof payload.runId === "string" ? payload.runId : typeof _optionalChain([packageRun, 'optionalAccess', _332 => _332.id]) === "string" ? packageRun.id : "";
10753
- const error = typeof payload.error === "string" ? payload.error : typeof _optionalChain([packageRun, 'optionalAccess', _333 => _333.error]) === "string" ? packageRun.error : void 0;
10805
+ const runId = typeof payload.runId === "string" ? payload.runId : typeof _optionalChain([packageRun, 'optionalAccess', _335 => _335.id]) === "string" ? packageRun.id : "";
10806
+ const error = typeof payload.error === "string" ? payload.error : typeof _optionalChain([packageRun, 'optionalAccess', _336 => _336.error]) === "string" ? packageRun.error : void 0;
10754
10807
  return {
10755
10808
  ...payload,
10756
10809
  runId,
@@ -10985,7 +11038,7 @@ function getProgressLinesFromLiveEvent(event) {
10985
11038
  (count2) => typeof count2 === "number" && Number.isSafeInteger(count2) && count2 >= 0
10986
11039
  )) {
10987
11040
  lines.push(
10988
- `progress calls: ${formatInteger(callCounts[0])} logical, ${formatInteger(callCounts[1])} provider requests, ${formatInteger(callCounts[2])} provider 429s${_optionalChain([calls, 'optionalAccess', _334 => _334.confirmed]) === true ? "" : " (observed)"}`
11041
+ `progress calls: ${formatInteger(callCounts[0])} logical, ${formatInteger(callCounts[1])} provider requests, ${formatInteger(callCounts[2])} provider 429s${_optionalChain([calls, 'optionalAccess', _337 => _337.confirmed]) === true ? "" : " (observed)"}`
10989
11042
  );
10990
11043
  }
10991
11044
  const rowOutcomes = readRowOutcomeSummary({
@@ -11036,7 +11089,7 @@ function getRunningHeartbeatLine(input) {
11036
11089
  return null;
11037
11090
  }
11038
11091
  const activity = getLiveRunActivity(input.event);
11039
- const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _335 => _335.observation, 'access', _336 => _336.state, 'access', _337 => _337.kind]) === "active" && activity.observation.target.kind !== "runner";
11092
+ const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _338 => _338.observation, 'access', _339 => _339.state, 'access', _340 => _340.kind]) === "active" && activity.observation.target.kind !== "runner";
11040
11093
  if (activity && activity.classified !== false && !activityConflictsWithDurableWait) {
11041
11094
  return `activity ${input.playName}: ${activity.summary}`;
11042
11095
  }
@@ -11075,7 +11128,7 @@ function buildPlayDashboardUrl(baseUrl, playName) {
11075
11128
  }
11076
11129
  function openPlayDashboard(dashboardUrl, open2) {
11077
11130
  if (open2 && dashboardUrl) {
11078
- _chunkDNMV2L7Qjs.openInBrowser.call(void 0, dashboardUrl);
11131
+ _chunkWHKTRZ3Jjs.openInBrowser.call(void 0, dashboardUrl);
11079
11132
  }
11080
11133
  }
11081
11134
  function printPlayLogLines(input) {
@@ -11127,7 +11180,7 @@ async function waitForPlayCompletionByWatch(input) {
11127
11180
  const confirmAdmission = async () => {
11128
11181
  if (admissionConfirmed) return;
11129
11182
  admissionConfirmed = true;
11130
- await _optionalChain([input, 'access', _338 => _338.onRunAdmitted, 'optionalCall', _339 => _339(input.workflowId)]);
11183
+ await _optionalChain([input, 'access', _341 => _341.onRunAdmitted, 'optionalCall', _342 => _342(input.workflowId)]);
11131
11184
  };
11132
11185
  const withDashboardUrl = (status) => input.dashboardUrl ? { ...status, dashboardUrl: input.dashboardUrl } : status;
11133
11186
  const fetchTerminalStatus = async () => {
@@ -11137,7 +11190,7 @@ async function waitForPlayCompletionByWatch(input) {
11137
11190
  billing: false
11138
11191
  });
11139
11192
  } catch (error) {
11140
- if (_chunkITFUZEHEjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
11193
+ if (_chunkYGFQ7YSMjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
11141
11194
  return null;
11142
11195
  }
11143
11196
  throw error;
@@ -11299,14 +11352,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
11299
11352
  let timedOut = false;
11300
11353
  let emittedDashboardUrl = false;
11301
11354
  let lastKnownWorkflowId = "";
11302
- let launchedRevisionId = _optionalChain([input, 'access', _340 => _340.request, 'access', _341 => _341.revisionId, 'optionalAccess', _342 => _342.trim, 'call', _343 => _343()]) || null;
11355
+ let launchedRevisionId = _optionalChain([input, 'access', _343 => _343.request, 'access', _344 => _344.revisionId, 'optionalAccess', _345 => _345.trim, 'call', _346 => _346()]) || null;
11303
11356
  let eventCount = 0;
11304
11357
  let firstRunIdMs = null;
11305
11358
  let launchConfirmed = false;
11306
11359
  const confirmAdmission = async (runId) => {
11307
11360
  if (launchConfirmed || !runId || runId === "pending") return;
11308
11361
  launchConfirmed = true;
11309
- await _optionalChain([input, 'access', _344 => _344.onRunAdmitted, 'optionalCall', _345 => _345(runId)]);
11362
+ await _optionalChain([input, 'access', _347 => _347.onRunAdmitted, 'optionalCall', _348 => _348(runId)]);
11310
11363
  };
11311
11364
  let lastPhase = null;
11312
11365
  const timeout = input.waitTimeoutMs === null ? null : setTimeout(
@@ -11326,7 +11379,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
11326
11379
  billing: false
11327
11380
  });
11328
11381
  } catch (error) {
11329
- if (_chunkITFUZEHEjs.isTransientPlayRunReadError.call(void 0, error)) {
11382
+ if (_chunkYGFQ7YSMjs.isTransientPlayRunReadError.call(void 0, error)) {
11330
11383
  return null;
11331
11384
  }
11332
11385
  throw error;
@@ -11358,7 +11411,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
11358
11411
  lastKnownWorkflowId = eventRunId;
11359
11412
  firstRunIdMs ??= Date.now() - startedAt;
11360
11413
  if (runStartedNow) {
11361
- await _optionalChain([input, 'access', _346 => _346.onRunStarted, 'optionalCall', _347 => _347(eventRunId)]);
11414
+ await _optionalChain([input, 'access', _349 => _349.onRunStarted, 'optionalCall', _350 => _350(eventRunId)]);
11362
11415
  }
11363
11416
  }
11364
11417
  if (!launchConfirmed && eventConfirmsPlayRunLaunch(event) && eventRunId === lastKnownWorkflowId) {
@@ -11534,7 +11587,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
11534
11587
  lastPhase
11535
11588
  });
11536
11589
  }
11537
- if (lastKnownWorkflowId && _chunkITFUZEHEjs.isTransientPlayRunReadError.call(void 0, error)) {
11590
+ if (lastKnownWorkflowId && _chunkYGFQ7YSMjs.isTransientPlayRunReadError.call(void 0, error)) {
11538
11591
  if (timeout) {
11539
11592
  clearTimeout(timeout);
11540
11593
  }
@@ -11570,7 +11623,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
11570
11623
  onRunAdmitted: confirmAdmission
11571
11624
  });
11572
11625
  }
11573
- if (!lastKnownWorkflowId && _chunkITFUZEHEjs.isTransientPlayRunReadError.call(void 0, error)) {
11626
+ if (!lastKnownWorkflowId && _chunkYGFQ7YSMjs.isTransientPlayRunReadError.call(void 0, error)) {
11574
11627
  _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
11575
11628
  phase: "cli.play_start_stream_transient_failure",
11576
11629
  ms: Date.now() - startedAt,
@@ -11669,29 +11722,29 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
11669
11722
  "logs"
11670
11723
  ]);
11671
11724
  function formatPlayLogLine(rawLine, state) {
11672
- const classified = _chunkITFUZEHEjs.classifyLogLine.call(void 0, rawLine);
11725
+ const classified = _chunkYGFQ7YSMjs.classifyLogLine.call(void 0, rawLine);
11673
11726
  const line = classified.line;
11674
11727
  const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
11675
- const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _348 => _348[1]]) ? new Date(timestampMatch[1]) : null;
11728
+ const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _351 => _351[1]]) ? new Date(timestampMatch[1]) : null;
11676
11729
  const timestamp = parsedTimestamp && !Number.isNaN(parsedTimestamp.getTime()) ? parsedTimestamp.toLocaleTimeString("en-US", {
11677
11730
  hour12: false,
11678
11731
  hour: "2-digit",
11679
11732
  minute: "2-digit",
11680
11733
  second: "2-digit"
11681
11734
  }) : null;
11682
- const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _349 => _349[2]]), () => ( line));
11735
+ const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _352 => _352[2]]), () => ( line));
11683
11736
  const prefix = timestamp ? `${timestamp} ` : "";
11684
11737
  if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
11685
11738
  const providerWait = formatProviderCapacityWaitLogLine(line);
11686
11739
  if (providerWait && !state.verbose) {
11687
- return _chunkITFUZEHEjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
11740
+ return _chunkYGFQ7YSMjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
11688
11741
  }
11689
11742
  const mapProgress = formatMapProgressDiagnosticLogLine(line);
11690
11743
  if (mapProgress && !state.verbose) {
11691
- return _chunkITFUZEHEjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
11744
+ return _chunkYGFQ7YSMjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
11692
11745
  }
11693
11746
  if (/\[worker\] picked up run\b/.test(message)) {
11694
- if (!_chunkITFUZEHEjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11747
+ if (!_chunkYGFQ7YSMjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11695
11748
  return null;
11696
11749
  }
11697
11750
  if (state.emittedRunnerStarted) {
@@ -11704,7 +11757,7 @@ function formatPlayLogLine(rawLine, state) {
11704
11757
  /^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
11705
11758
  );
11706
11759
  if (mapStart) {
11707
- if (!_chunkITFUZEHEjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11760
+ if (!_chunkYGFQ7YSMjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11708
11761
  return null;
11709
11762
  }
11710
11763
  const [, rows, fields2, namespace, cached, pending] = mapStart;
@@ -11714,7 +11767,7 @@ function formatPlayLogLine(rawLine, state) {
11714
11767
  /^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
11715
11768
  );
11716
11769
  if (mapDone) {
11717
- if (!_chunkITFUZEHEjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11770
+ if (!_chunkYGFQ7YSMjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11718
11771
  return null;
11719
11772
  }
11720
11773
  const [, results, executed, cached] = mapDone;
@@ -11744,7 +11797,7 @@ function formatProviderCapacityWaitLogLine(line) {
11744
11797
  const record3 = readRecord(parsed);
11745
11798
  if (!record3) return null;
11746
11799
  details = record3;
11747
- } catch (e12) {
11800
+ } catch (e13) {
11748
11801
  return null;
11749
11802
  }
11750
11803
  const provider = typeof details.provider === "string" ? details.provider.trim() : "";
@@ -11764,7 +11817,7 @@ function formatMapProgressDiagnosticLogLine(line) {
11764
11817
  const record3 = readRecord(parsed);
11765
11818
  if (!record3) return null;
11766
11819
  details = record3;
11767
- } catch (e13) {
11820
+ } catch (e14) {
11768
11821
  return null;
11769
11822
  }
11770
11823
  const map = typeof details.map === "string" ? details.map.trim() : "";
@@ -11896,20 +11949,20 @@ function collectDatasetHandleLines(value, path = "result") {
11896
11949
  function buildRunWarnings(status, rowsInfo) {
11897
11950
  const rowOutcomes = readRowOutcomeSummary(status);
11898
11951
  const result = readRecord(status.result);
11899
- const metadata = readRecord(_optionalChain([result, 'optionalAccess', _350 => _350._metadata]));
11900
- const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess', _351 => _351.outputWarnings])) ? metadata.outputWarnings.map((warning) => readRecord(warning)).filter((warning) => {
11952
+ const metadata = readRecord(_optionalChain([result, 'optionalAccess', _353 => _353._metadata]));
11953
+ const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess', _354 => _354.outputWarnings])) ? metadata.outputWarnings.map((warning) => readRecord(warning)).filter((warning) => {
11901
11954
  if (!warning) return false;
11902
11955
  return !(rowsInfo && !rowsInfo.complete && warning.reason === "array_preview_limit" && warning.originalItems === rowsInfo.totalRows && warning.retainedItems === rowsInfo.rows.length);
11903
- }).map((warning) => _optionalChain([warning, 'optionalAccess', _352 => _352.message])).filter(
11956
+ }).map((warning) => _optionalChain([warning, 'optionalAccess', _355 => _355.message])).filter(
11904
11957
  (message) => typeof message === "string" && message.trim().length > 0
11905
11958
  ).slice(0, 16) : [];
11906
- const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _353 => _353.hasRowFailures]) ? [
11959
+ const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _356 => _356.hasRowFailures]) ? [
11907
11960
  `${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.`
11908
11961
  ] : [];
11909
- const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _354 => _354.supersededRows]), () => ( 0))) > 0 ? [
11962
+ const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _357 => _357.supersededRows]), () => ( 0))) > 0 ? [
11910
11963
  `Latest-write-wins: ${formatSupersededRowsNotice(_nullishCoalesce(rowOutcomes.supersededRows, () => ( 0)))}; the newer write still owns that Runtime Sheet row.`
11911
11964
  ] : [];
11912
- if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _355 => _355.totalRows]) === 0) {
11965
+ if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _358 => _358.totalRows]) === 0) {
11913
11966
  return [
11914
11967
  ...rowOutcomeWarnings,
11915
11968
  ...supersededRowNotices,
@@ -11928,7 +11981,7 @@ function buildRunWarnings(status, rowsInfo) {
11928
11981
  return [...rowOutcomeWarnings, ...supersededRowNotices, ...outputWarnings];
11929
11982
  }
11930
11983
  function buildRunNextCommands(status) {
11931
- const runId = _optionalChain([status, 'access', _356 => _356.runId, 'optionalAccess', _357 => _357.trim, 'call', _358 => _358()]);
11984
+ const runId = _optionalChain([status, 'access', _359 => _359.runId, 'optionalAccess', _360 => _360.trim, 'call', _361 => _361()]);
11932
11985
  if (!runId) {
11933
11986
  const playName = extractRunPlayName(status);
11934
11987
  return playName ? {
@@ -12034,7 +12087,7 @@ function extractJsonObjectFromText(text) {
12034
12087
  try {
12035
12088
  const parsed = JSON.parse(suffix);
12036
12089
  return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null;
12037
- } catch (e14) {
12090
+ } catch (e15) {
12038
12091
  let depth = 0;
12039
12092
  let inString = false;
12040
12093
  let escaped = false;
@@ -12060,7 +12113,7 @@ function extractJsonObjectFromText(text) {
12060
12113
  try {
12061
12114
  const parsed = JSON.parse(text.slice(start, index + 1));
12062
12115
  return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null;
12063
- } catch (e15) {
12116
+ } catch (e16) {
12064
12117
  return null;
12065
12118
  }
12066
12119
  }
@@ -12081,14 +12134,14 @@ function extractToolIdFromErrorText(text) {
12081
12134
  return null;
12082
12135
  }
12083
12136
  const lowerToolMatch = /\btool\s+([A-Za-z0-9_.:-]+)\s+\d{3}\b/.exec(text);
12084
- if (_optionalChain([lowerToolMatch, 'optionalAccess', _359 => _359[1]])) {
12137
+ if (_optionalChain([lowerToolMatch, 'optionalAccess', _362 => _362[1]])) {
12085
12138
  return lowerToolMatch[1];
12086
12139
  }
12087
12140
  const upperToolMatch = /\bTool\s+([A-Za-z0-9_.:-]+)\s+failed\b/.exec(text);
12088
- return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _360 => _360[1]]), () => ( null));
12141
+ return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _363 => _363[1]]), () => ( null));
12089
12142
  }
12090
12143
  function isInsufficientCreditsBilling(billing) {
12091
- return _optionalChain([billing, 'optionalAccess', _361 => _361.kind]) === "insufficient_credits";
12144
+ return _optionalChain([billing, 'optionalAccess', _364 => _364.kind]) === "insufficient_credits";
12092
12145
  }
12093
12146
  function extractBillingForStatus(status, error) {
12094
12147
  const errorBilling = getObjectField(status, "errorBilling");
@@ -12128,8 +12181,8 @@ function formatInsufficientCreditsMessage(input) {
12128
12181
  function buildInsufficientCreditsSummaryLines(input) {
12129
12182
  const progress = input.status.progress;
12130
12183
  const rowsInfo = extractCanonicalRowsInfo(input.status);
12131
- const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _362 => _362.rows, 'access', _363 => _363.length]))), () => ( null));
12132
- const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _364 => _364.totalRows]))), () => ( null));
12184
+ const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _365 => _365.rows, 'access', _366 => _366.length]))), () => ( null));
12185
+ const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _367 => _367.totalRows]))), () => ( null));
12133
12186
  const lines = [
12134
12187
  " status: stopped_insufficient_credits",
12135
12188
  completed === null ? " completed rows: unknown" : ` completed rows: ${formatInteger(completed)}${total !== null ? ` of ${formatInteger(total)}` : ""}`,
@@ -12148,7 +12201,7 @@ function buildInsufficientCreditsSummaryLines(input) {
12148
12201
  lines.push(" ask user: ask whether they want to add Deepline credits");
12149
12202
  lines.push(` top up after approval: ${recovery.topUp}`);
12150
12203
  lines.push(` checkout fallback: ${recovery.checkout}`);
12151
- const runId = _optionalChain([input, 'access', _365 => _365.status, 'access', _366 => _366.runId, 'optionalAccess', _367 => _367.trim, 'call', _368 => _368()]);
12204
+ const runId = _optionalChain([input, 'access', _368 => _368.status, 'access', _369 => _369.runId, 'optionalAccess', _370 => _370.trim, 'call', _371 => _371()]);
12152
12205
  if (runId) {
12153
12206
  lines.push(` inspect: deepline runs get ${runId} --json`);
12154
12207
  lines.push(
@@ -12230,10 +12283,10 @@ function normalizeRunStatusForEnvelope(status) {
12230
12283
  function normalizeProgressForEnvelope(status, rowsInfo) {
12231
12284
  const progress = status.progress;
12232
12285
  const rowOutcomes = readRowOutcomeSummary(status);
12233
- const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _369 => _369.totalRows]), () => ( getNumericField(progress, "totalRows"))), () => ( getNumericField(progress, "total"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _370 => _370.totalRows]))), () => ( null));
12234
- const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _371 => _371.failedRows]), () => ( getNumericField(progress, "failed"))), () => ( getNumericField(progress, "failedRows"))), () => ( null));
12235
- const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _372 => _372.completedRows]), () => ( getNumericField(progress, "completed"))), () => ( getNumericField(progress, "completedRows"))), () => ( (status.status === "completed" ? total : null)));
12236
- const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _373 => _373.supersededRows]), () => ( getNumericField(progress, "supersededRows")));
12286
+ const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _372 => _372.totalRows]), () => ( getNumericField(progress, "totalRows"))), () => ( getNumericField(progress, "total"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _373 => _373.totalRows]))), () => ( null));
12287
+ const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _374 => _374.failedRows]), () => ( getNumericField(progress, "failed"))), () => ( getNumericField(progress, "failedRows"))), () => ( null));
12288
+ const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _375 => _375.completedRows]), () => ( getNumericField(progress, "completed"))), () => ( getNumericField(progress, "completedRows"))), () => ( (status.status === "completed" ? total : null)));
12289
+ const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _376 => _376.supersededRows]), () => ( getNumericField(progress, "supersededRows")));
12237
12290
  const supersededOffset = _nullishCoalesce(supersededRows, () => ( 0));
12238
12291
  const progressPending = getNumericField(progress, "pending");
12239
12292
  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)));
@@ -12303,7 +12356,7 @@ function normalizeErrorsForEnvelope(status, error) {
12303
12356
  ];
12304
12357
  }
12305
12358
  function normalizeLogsForEnvelope(status) {
12306
- const logs = Array.isArray(_optionalChain([status, 'access', _374 => _374.progress, 'optionalAccess', _375 => _375.logs])) ? status.progress.logs : [];
12359
+ const logs = Array.isArray(_optionalChain([status, 'access', _377 => _377.progress, 'optionalAccess', _378 => _378.logs])) ? status.progress.logs : [];
12307
12360
  const totalCount = logs.length;
12308
12361
  const entries = logs.slice(Math.max(0, logs.length - RUN_LOG_PREVIEW_LIMIT));
12309
12362
  const firstSequence = entries.length === 0 ? null : logs.length - entries.length + 1;
@@ -12360,7 +12413,7 @@ function compactPlayStatus(status) {
12360
12413
  const packaged = getPlayRunPackage(status);
12361
12414
  if (packaged) {
12362
12415
  const packagedRun = readRecord(packaged.run);
12363
- const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess', _376 => _376.error]) === "string" ? packagedRun.error : null;
12416
+ const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess', _379 => _379.error]) === "string" ? packagedRun.error : null;
12364
12417
  const error2 = _nullishCoalesce(selectRunErrorForDisplay(status), () => ( (typeof status.error === "string" ? String(status.error) : packagedError)));
12365
12418
  const compactError = error2 ? compactRunErrorForEnvelope(error2, status.runId) : null;
12366
12419
  const rowOutcomes2 = readRowOutcomeSummary(status);
@@ -12511,7 +12564,7 @@ function formatTopValuesPart(value) {
12511
12564
  }
12512
12565
  function formatPackageDatasetSummaryLines(summary, indent = " ") {
12513
12566
  const record3 = readRecord(summary);
12514
- const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _377 => _377.columnStats]));
12567
+ const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _380 => _380.columnStats]));
12515
12568
  if (!record3 || !columnStats) {
12516
12569
  return [];
12517
12570
  }
@@ -12599,7 +12652,7 @@ function packageDatasetRecords(packaged) {
12599
12652
  if (catalog.length > 0) return catalog;
12600
12653
  return readRecordArray(packaged.steps).flatMap((step) => {
12601
12654
  const output = readRecord(step.output);
12602
- return _optionalChain([output, 'optionalAccess', _378 => _378.kind]) === "dataset" ? [output] : [];
12655
+ return _optionalChain([output, 'optionalAccess', _381 => _381.kind]) === "dataset" ? [output] : [];
12603
12656
  });
12604
12657
  }
12605
12658
  function packageReturnedDatasetIdentity(packaged) {
@@ -12608,7 +12661,7 @@ function packageReturnedDatasetIdentity(packaged) {
12608
12661
  const outputs = _nullishCoalesce(readRecord(packaged.outputs), () => ( {}));
12609
12662
  for (const outputValue of Object.values(outputs)) {
12610
12663
  const output = readRecord(outputValue);
12611
- if (_optionalChain([output, 'optionalAccess', _379 => _379.kind]) !== "dataset") continue;
12664
+ if (_optionalChain([output, 'optionalAccess', _382 => _382.kind]) !== "dataset") continue;
12612
12665
  if (typeof output.datasetId === "string" && output.datasetId.trim()) {
12613
12666
  datasetIds.add(output.datasetId.trim());
12614
12667
  }
@@ -12644,7 +12697,7 @@ function formatRunStepProgress(progress, includeRowOutcomes = false) {
12644
12697
  }
12645
12698
  function formatPackageDatasetActionLines(packaged, options) {
12646
12699
  const returned = packageReturnedDatasetIdentity(packaged);
12647
- const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _380 => _380.includeSummary]), () => ( true));
12700
+ const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _383 => _383.includeSummary]), () => ( true));
12648
12701
  const lines = [];
12649
12702
  const steps = readRecordArray(packaged.steps);
12650
12703
  const stepsByDatasetId = /* @__PURE__ */ new Map();
@@ -12653,10 +12706,10 @@ function formatPackageDatasetActionLines(packaged, options) {
12653
12706
  for (const step of steps) {
12654
12707
  if (step.kind !== "dataset") continue;
12655
12708
  const output = readRecord(step.output);
12656
- if (typeof _optionalChain([output, 'optionalAccess', _381 => _381.datasetId]) === "string") {
12709
+ if (typeof _optionalChain([output, 'optionalAccess', _384 => _384.datasetId]) === "string") {
12657
12710
  stepsByDatasetId.set(output.datasetId, step);
12658
12711
  }
12659
- if (typeof _optionalChain([output, 'optionalAccess', _382 => _382.path]) === "string") {
12712
+ if (typeof _optionalChain([output, 'optionalAccess', _385 => _385.path]) === "string") {
12660
12713
  stepsByPath.set(output.path, step);
12661
12714
  }
12662
12715
  if (typeof step.id === "string") {
@@ -12670,8 +12723,8 @@ function formatPackageDatasetActionLines(packaged, options) {
12670
12723
  const category = isReturned ? "returned" : dataset.recovered === true ? "recovered" : "persisted";
12671
12724
  const rowCount = typeof dataset.rowCount === "number" && Number.isFinite(dataset.rowCount) ? Math.max(0, Math.trunc(dataset.rowCount)) : null;
12672
12725
  const lifecycle = readRecord(dataset.lifecycle);
12673
- const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess', _383 => _383.complete]) === false;
12674
- const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess', _384 => _384.persistedRowsAtLeast]) === "number" && Number.isFinite(lifecycle.persistedRowsAtLeast) ? Math.max(0, Math.trunc(lifecycle.persistedRowsAtLeast)) : 0;
12726
+ const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess', _386 => _386.complete]) === false;
12727
+ const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess', _387 => _387.persistedRowsAtLeast]) === "number" && Number.isFinite(lifecycle.persistedRowsAtLeast) ? Math.max(0, Math.trunc(lifecycle.persistedRowsAtLeast)) : 0;
12675
12728
  const actions2 = _nullishCoalesce(readRecord(dataset.actions), () => ( {}));
12676
12729
  if (countUnconfirmed) {
12677
12730
  lines.push(
@@ -12689,7 +12742,7 @@ function formatPackageDatasetActionLines(packaged, options) {
12689
12742
  }
12690
12743
  }
12691
12744
  const step = _nullishCoalesce(_nullishCoalesce((datasetId ? stepsByDatasetId.get(datasetId) : void 0), () => ( stepsByPath.get(path))), () => ( (typeof dataset.tableNamespace === "string" ? stepsByNamespace.get(dataset.tableNamespace) : void 0)));
12692
- const progress = readRecord(_optionalChain([step, 'optionalAccess', _385 => _385.progress]));
12745
+ const progress = readRecord(_optionalChain([step, 'optionalAccess', _388 => _388.progress]));
12693
12746
  if (progress) {
12694
12747
  lines.push(` progress: ${formatRunStepProgress(progress)}`);
12695
12748
  }
@@ -12703,10 +12756,10 @@ function formatPackageDatasetActionLines(packaged, options) {
12703
12756
  }
12704
12757
  const exportAction = readRecord(actions2.exportCsv);
12705
12758
  const exportCommand = actionToCommand(exportAction);
12706
- const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _386 => _386.scope]));
12759
+ const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _389 => _389.scope]));
12707
12760
  const queryAction = readRecord(actions2.query);
12708
- const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess', _387 => _387.scope]));
12709
- const runQueryCommand = _optionalChain([queryScope, 'optionalAccess', _388 => _388.kind]) === "run" ? actionToCommand(queryAction) : null;
12761
+ const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess', _390 => _390.scope]));
12762
+ const runQueryCommand = _optionalChain([queryScope, 'optionalAccess', _391 => _391.kind]) === "run" ? actionToCommand(queryAction) : null;
12710
12763
  const currentQueryCommand = actionToCommand(actions2.queryCurrentTable);
12711
12764
  const legacyQueryCommand = actionToCommand(actions2.query);
12712
12765
  if (runQueryCommand) {
@@ -12718,11 +12771,11 @@ function formatPackageDatasetActionLines(packaged, options) {
12718
12771
  }
12719
12772
  if (exportCommand) {
12720
12773
  lines.push(
12721
- _optionalChain([exportScope, 'optionalAccess', _389 => _389.kind]) === "database" ? ` export current table (may include other runs): ${exportCommand}` : ` export this run: ${exportCommand}`
12774
+ _optionalChain([exportScope, 'optionalAccess', _392 => _392.kind]) === "database" ? ` export current table (may include other runs): ${exportCommand}` : ` export this run: ${exportCommand}`
12722
12775
  );
12723
12776
  }
12724
12777
  const unavailable = readRecord(dataset.exportUnavailable);
12725
- if (typeof _optionalChain([unavailable, 'optionalAccess', _390 => _390.reason]) === "string" && typeof unavailable.message === "string") {
12778
+ if (typeof _optionalChain([unavailable, 'optionalAccess', _393 => _393.reason]) === "string" && typeof unavailable.message === "string") {
12726
12779
  lines.push(
12727
12780
  ` export unavailable (${unavailable.reason}): ${unavailable.message}`
12728
12781
  );
@@ -12739,7 +12792,7 @@ function packageSavedRowCount(packaged) {
12739
12792
  }
12740
12793
  function runtimeLimitWindowLabel(runtimeLimitFailure) {
12741
12794
  const message = _nullishCoalesce(getStringField(runtimeLimitFailure, "message"), () => ( ""));
12742
- const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _391 => _391.exec, 'call', _392 => _392(message), 'optionalAccess', _393 => _393[1]]);
12795
+ const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _394 => _394.exec, 'call', _395 => _395(message), 'optionalAccess', _396 => _396[1]]);
12743
12796
  if (configuredSeconds) {
12744
12797
  const seconds = Number(configuredSeconds);
12745
12798
  if (Number.isSafeInteger(seconds) && seconds > 0) {
@@ -12786,7 +12839,7 @@ function formatPackageValueOutputLines(packaged) {
12786
12839
  if (!outputs) return [];
12787
12840
  const returned = Object.entries(outputs).filter(([, output]) => {
12788
12841
  const record3 = readRecord(output);
12789
- return _optionalChain([record3, 'optionalAccess', _394 => _394.kind]) === "dataset" || _optionalChain([record3, 'optionalAccess', _395 => _395.kind]) === "value" && Object.prototype.hasOwnProperty.call(record3, "value");
12842
+ return _optionalChain([record3, 'optionalAccess', _397 => _397.kind]) === "dataset" || _optionalChain([record3, 'optionalAccess', _398 => _398.kind]) === "value" && Object.prototype.hasOwnProperty.call(record3, "value");
12790
12843
  });
12791
12844
  if (returned.length === 0) return [];
12792
12845
  const datasets = packageDatasetRecords(packaged);
@@ -12806,10 +12859,10 @@ function formatPackageValueOutputLines(packaged) {
12806
12859
  (candidate) => typeof output.datasetId === "string" && candidate.datasetId === output.datasetId || candidate.path === path
12807
12860
  );
12808
12861
  const stepOutput = datasetSteps.map((step) => readRecord(step.output)).find(
12809
- (candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _396 => _396.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _397 => _397.path]) === path
12862
+ (candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _399 => _399.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _400 => _400.path]) === path
12810
12863
  );
12811
- const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _398 => _398.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _399 => _399.preview]))));
12812
- const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _400 => _400.rows])) ? preview.rows.slice(0, 2) : [];
12864
+ const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _401 => _401.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _402 => _402.preview]))));
12865
+ const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _403 => _403.rows])) ? preview.rows.slice(0, 2) : [];
12813
12866
  if (rows.length > 0) {
12814
12867
  lines.push(` sample rows (${rows.length}):`);
12815
12868
  lines.push(
@@ -12835,7 +12888,7 @@ function formatPackageValueOutputLines(packaged) {
12835
12888
  return lines;
12836
12889
  }
12837
12890
  function authoredPackageStackFrames(packaged) {
12838
- const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _401 => _401.trim, 'call', _402 => _402()])));
12891
+ const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _404 => _404.trim, 'call', _405 => _405()])));
12839
12892
  if (!stack) return [];
12840
12893
  return stack.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).filter(
12841
12894
  (line) => !line.includes("/virtual/deepline-plays/") && !line.includes("/apps/play-runner/") && !line.includes("/shared_libs/play-runtime/") && !line.includes("node:internal")
@@ -12867,9 +12920,9 @@ function activityIsoTimestamp(value) {
12867
12920
  }
12868
12921
  function buildRunActivityTextLines(run) {
12869
12922
  const activity = readRecord(run.activity);
12870
- const observation = readRecord(_optionalChain([activity, 'optionalAccess', _403 => _403.observation]));
12871
- const state = readRecord(_optionalChain([observation, 'optionalAccess', _404 => _404.state]));
12872
- const target = readRecord(_optionalChain([observation, 'optionalAccess', _405 => _405.target]));
12923
+ const observation = readRecord(_optionalChain([activity, 'optionalAccess', _406 => _406.observation]));
12924
+ const state = readRecord(_optionalChain([observation, 'optionalAccess', _407 => _407.state]));
12925
+ const target = readRecord(_optionalChain([observation, 'optionalAccess', _408 => _408.target]));
12873
12926
  if (!activity || !observation || !state) return [];
12874
12927
  const kind = typeof state.kind === "string" ? state.kind : "unknown";
12875
12928
  if (kind === "completed") return [];
@@ -12914,11 +12967,11 @@ function buildRunActivityTextLines(run) {
12914
12967
  }
12915
12968
  function formatObservedRunCounter(value) {
12916
12969
  const counter = readRecord(value);
12917
- const count2 = _optionalChain([counter, 'optionalAccess', _406 => _406.value]);
12970
+ const count2 = _optionalChain([counter, 'optionalAccess', _409 => _409.value]);
12918
12971
  if (typeof count2 !== "number" || !Number.isSafeInteger(count2) || count2 < 0) {
12919
12972
  return "unknown";
12920
12973
  }
12921
- return _optionalChain([counter, 'optionalAccess', _407 => _407.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
12974
+ return _optionalChain([counter, 'optionalAccess', _410 => _410.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
12922
12975
  }
12923
12976
  function buildRunStatusEvidenceTextLines(packaged) {
12924
12977
  const evidence = readRecord(packaged.runStatus);
@@ -12931,13 +12984,13 @@ function buildRunStatusEvidenceTextLines(packaged) {
12931
12984
  );
12932
12985
  }
12933
12986
  const source = readRecord(evidence.source);
12934
- if (_optionalChain([source, 'optionalAccess', _408 => _408.aligned]) === false) {
12987
+ if (_optionalChain([source, 'optionalAccess', _411 => _411.aligned]) === false) {
12935
12988
  lines.push(
12936
12989
  ` consistency: run snapshot event ${String(source.runSnapshotLedgerNextSeq)} and progress event ${String(source.ledgerNextSeq)} differ; retry this read to align them`
12937
12990
  );
12938
12991
  }
12939
12992
  const focus = readRecord(evidence.focusStep);
12940
- const rows = readRecord(_optionalChain([focus, 'optionalAccess', _409 => _409.rows]));
12993
+ const rows = readRecord(_optionalChain([focus, 'optionalAccess', _412 => _412.rows]));
12941
12994
  if (focus) {
12942
12995
  const id = typeof focus.id === "string" && focus.id.trim() ? focus.id.trim() : "unknown step";
12943
12996
  const label = typeof focus.label === "string" && focus.label.trim() ? ` (${focus.label.trim()})` : "";
@@ -12945,7 +12998,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
12945
12998
  const known = readRecordArray(packaged.steps).find(
12946
12999
  (step) => typeof step.id === "string" && (id === step.id || id.endsWith(`:${step.id}`)) && typeof step.label === "string"
12947
13000
  );
12948
- const state = typeof _optionalChain([known, 'optionalAccess', _410 => _410.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
13001
+ const state = typeof _optionalChain([known, 'optionalAccess', _413 => _413.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
12949
13002
  deriveNodeExecutionState({
12950
13003
  reported: {
12951
13004
  status: focus.status.trim(),
@@ -12955,7 +13008,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
12955
13008
  total: rows.total
12956
13009
  } : null
12957
13010
  },
12958
- runStatus: _optionalChain([run, 'optionalAccess', _411 => _411.status])
13011
+ runStatus: _optionalChain([run, 'optionalAccess', _414 => _414.status])
12959
13012
  })
12960
13013
  ) : null;
12961
13014
  lines.push(` current step: ${id}${label}${state ? `: ${state}` : ""}`);
@@ -13003,7 +13056,7 @@ function formatRecentRunLogLines(value) {
13003
13056
  (line) => typeof line === "string"
13004
13057
  );
13005
13058
  if (tail.length === 0) return [];
13006
- const shown = tail.map((line) => _chunkITFUZEHEjs.classifyLogLine.call(void 0, line)).filter(
13059
+ const shown = tail.map((line) => _chunkYGFQ7YSMjs.classifyLogLine.call(void 0, line)).filter(
13007
13060
  (entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
13008
13061
  ).slice(-8);
13009
13062
  const total = readNonNegativeInteger(logs.totalCount);
@@ -13047,7 +13100,7 @@ function buildRunPackageTextLines(packaged) {
13047
13100
  lines.push(` recovery: ${mode}${sourceRunId}`);
13048
13101
  }
13049
13102
  const runError = typeof run.error === "string" && run.error.trim() ? run.error.trim() : null;
13050
- const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _412 => _412.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
13103
+ const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _415 => _415.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
13051
13104
  const displayRunError = _nullishCoalesce(structuredRuntimeLimitMessage, () => ( runError));
13052
13105
  if (!isRuntimeLimitCheckpoint && displayRunError && (status === "failed" || status === "cancelled")) {
13053
13106
  lines.push(` error: ${truncateErrorForDisplay(displayRunError, runId)}`);
@@ -13058,11 +13111,11 @@ function buildRunPackageTextLines(packaged) {
13058
13111
  }
13059
13112
  }
13060
13113
  const failedLogs = readRecord(packaged.failedLogs);
13061
- const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _413 => _413.entries])) ? failedLogs.entries.filter(
13114
+ const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _416 => _416.entries])) ? failedLogs.entries.filter(
13062
13115
  (entry) => typeof entry === "string"
13063
13116
  ) : [];
13064
- const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _414 => _414.association]) === "string" ? failedLogs.association : null;
13065
- const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _415 => _415.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
13117
+ const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _417 => _417.association]) === "string" ? failedLogs.association : null;
13118
+ const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _418 => _418.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
13066
13119
  if (failedLogEntries.length > 0) {
13067
13120
  lines.push(" failed logs:");
13068
13121
  lines.push(...failedLogEntries.map((entry) => ` ${entry}`));
@@ -13081,8 +13134,8 @@ function buildRunPackageTextLines(packaged) {
13081
13134
  )
13082
13135
  ).slice(0, 16) : [];
13083
13136
  lines.push(...packageWarnings.map((warning) => ` warning: ${warning}`));
13084
- const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _416 => _416.next]));
13085
- if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _417 => _417.logs]) === "string") {
13137
+ const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _419 => _419.next]));
13138
+ if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _420 => _420.logs]) === "string") {
13086
13139
  lines.push(
13087
13140
  failedLogAssociation === "retained_before_truncation" ? ` retained logs: ${failedLogNext.logs}` : ` retry failed logs: ${failedLogNext.logs}`
13088
13141
  );
@@ -13110,20 +13163,20 @@ function buildRunPackageTextLines(packaged) {
13110
13163
  const stepStatus = typeof step.status === "string" ? step.status : status;
13111
13164
  const output = step.output && typeof step.output === "object" && !Array.isArray(step.output) ? step.output : null;
13112
13165
  const rowCount = output && typeof output.rowCount === "number" ? ` rows=${formatInteger(output.rowCount)}` : "";
13113
- const preview = _optionalChain([output, 'optionalAccess', _418 => _418.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
13114
- const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _419 => _419.rows])) ? preview.rows.length : null;
13166
+ const preview = _optionalChain([output, 'optionalAccess', _421 => _421.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
13167
+ const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _422 => _422.rows])) ? preview.rows.length : null;
13115
13168
  lines.push(` ${kind} ${id}: ${stepStatus}${rowCount}`);
13116
- lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _420 => _420.summary])));
13169
+ lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _423 => _423.summary])));
13117
13170
  if (previewRows !== null) {
13118
13171
  lines.push(
13119
- ` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _421 => _421.truncated]) ? " truncated" : ""}`
13172
+ ` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _424 => _424.truncated]) ? " truncated" : ""}`
13120
13173
  );
13121
13174
  }
13122
13175
  }
13123
13176
  const inspectCommand = actionToCommand(next.inspect);
13124
13177
  const fullResultCommand = actionToCommand(next.full);
13125
13178
  const hasCatalogExportAction = packageDatasetRecords(packaged).some(
13126
- (dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _422 => _422(dataset.actions), 'optionalAccess', _423 => _423.exportCsv])))
13179
+ (dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _425 => _425(dataset.actions), 'optionalAccess', _426 => _426.exportCsv])))
13127
13180
  );
13128
13181
  const legacyExportCommand = hasCatalogExportAction ? null : actionToCommand(next.export);
13129
13182
  const runAgainCommand = typeof next.run === "string" && next.run.trim() ? next.run.trim() : null;
@@ -13185,7 +13238,7 @@ function withOrdinaryRunAgainCommand(status, options, resolvedRevisionId) {
13185
13238
  }
13186
13239
  function buildBillingRollupTextLines(status) {
13187
13240
  const billing = status.billing;
13188
- const rollup = _optionalChain([billing, 'optionalAccess', _424 => _424.rollup]);
13241
+ const rollup = _optionalChain([billing, 'optionalAccess', _427 => _427.rollup]);
13189
13242
  if (!rollup) return [];
13190
13243
  const total = formatCreditAmount2(rollup.totalCreditsRollup);
13191
13244
  if (rollup.childCredits > 0 && rollup.descendantRunCount > 0) {
@@ -13230,7 +13283,7 @@ function buildPlayCompletionTextLines(status) {
13230
13283
  const overview = buildRunOverview(status);
13231
13284
  const { run } = overview;
13232
13285
  const failed = run.status === "failed";
13233
- const label = run.status === "completed" ? _optionalChain([overview, 'access', _425 => _425.rowOutcomes, 'optionalAccess', _426 => _426.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
13286
+ const label = run.status === "completed" ? _optionalChain([overview, 'access', _428 => _428.rowOutcomes, 'optionalAccess', _429 => _429.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
13234
13287
  const lines = [
13235
13288
  `${label} ${_nullishCoalesce(_nullishCoalesce(run.playName, () => ( status.playName)), () => ( "Play"))}`,
13236
13289
  `Run: ${run.id}`
@@ -13250,7 +13303,7 @@ function buildPlayCompletionTextLines(status) {
13250
13303
  ...formatJsonPreview(compactReturnValue(overview.result))
13251
13304
  );
13252
13305
  }
13253
- if (_optionalChain([overview, 'access', _427 => _427.rowOutcomes, 'optionalAccess', _428 => _428.hasRowFailures])) {
13306
+ if (_optionalChain([overview, 'access', _430 => _430.rowOutcomes, 'optionalAccess', _431 => _431.hasRowFailures])) {
13254
13307
  lines.push(
13255
13308
  `Rows: ${overview.rowOutcomes.completedRows} completed, ${overview.rowOutcomes.failedRows} failed`
13256
13309
  );
@@ -13279,16 +13332,16 @@ function buildPlayCompletionTextLines(status) {
13279
13332
  }
13280
13333
  function writePlayResult(status, jsonOutput, options) {
13281
13334
  const packaged = getPlayRunPackage(status);
13282
- const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _429 => _429.hits]), () => ( null));
13335
+ const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _432 => _432.hits]), () => ( null));
13283
13336
  if (jsonOutput) {
13284
- const payload2 = _optionalChain([options, 'optionalAccess', _430 => _430.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
13285
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
13337
+ const payload2 = _optionalChain([options, 'optionalAccess', _433 => _433.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
13338
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
13286
13339
  hits ? { ...payload2, hits } : payload2,
13287
- { json: true, fields: _optionalChain([options, 'optionalAccess', _431 => _431.jsonFields]) }
13340
+ { json: true, fields: _optionalChain([options, 'optionalAccess', _434 => _434.jsonFields]) }
13288
13341
  );
13289
13342
  return;
13290
13343
  }
13291
- if (packaged && !_optionalChain([options, 'optionalAccess', _432 => _432.fullJson])) {
13344
+ if (packaged && !_optionalChain([options, 'optionalAccess', _435 => _435.fullJson])) {
13292
13345
  const {
13293
13346
  logs: _logs,
13294
13347
  failedLogs: _failedLogs,
@@ -13298,7 +13351,7 @@ function writePlayResult(status, jsonOutput, options) {
13298
13351
  ...buildPlayCompletionTextLines(status),
13299
13352
  ...formatRunHitsLines(hits)
13300
13353
  ];
13301
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0, displayPackage, {
13354
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, displayPackage, {
13302
13355
  json: false,
13303
13356
  text: `${lines2.join("\n")}
13304
13357
  `
@@ -13348,8 +13401,8 @@ function writePlayResult(status, jsonOutput, options) {
13348
13401
  lines.push(...renderedServerView.actions);
13349
13402
  lines.push(...buildBillingRollupTextLines(status));
13350
13403
  const compact = compactPlayStatus(status);
13351
- const payload = _optionalChain([options, 'optionalAccess', _433 => _433.fullJson]) ? status : compact;
13352
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
13404
+ const payload = _optionalChain([options, 'optionalAccess', _436 => _436.fullJson]) ? status : compact;
13405
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
13353
13406
  {
13354
13407
  ...payload,
13355
13408
  render: {
@@ -13502,14 +13555,14 @@ function mergeExportColumns(preferredColumns, rows) {
13502
13555
  return columns;
13503
13556
  }
13504
13557
  function sqlSafeExportColumnName(id) {
13505
- const prefix = _nullishCoalesce(_optionalChain([id, 'access', _434 => _434.trim, 'call', _435 => _435(), 'access', _436 => _436.match, 'call', _437 => _437(/^_+/), 'optionalAccess', _438 => _438[0]]), () => ( ""));
13558
+ const prefix = _nullishCoalesce(_optionalChain([id, 'access', _437 => _437.trim, 'call', _438 => _438(), 'access', _439 => _439.match, 'call', _440 => _440(/^_+/), 'optionalAccess', _441 => _441[0]]), () => ( ""));
13506
13559
  const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
13507
13560
  const safe = `${prefix}${normalized || "column"}`;
13508
13561
  return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
13509
13562
  }
13510
13563
  async function fetchBackingDatasetRows(input) {
13511
13564
  const playName = extractRunPlayName(input.status);
13512
- const tableNamespace = _optionalChain([input, 'access', _439 => _439.rowsInfo, 'access', _440 => _440.tableNamespace, 'optionalAccess', _441 => _441.trim, 'call', _442 => _442()]);
13565
+ const tableNamespace = _optionalChain([input, 'access', _442 => _442.rowsInfo, 'access', _443 => _443.tableNamespace, 'optionalAccess', _444 => _444.trim, 'call', _445 => _445()]);
13513
13566
  if (!playName || !tableNamespace) {
13514
13567
  return null;
13515
13568
  }
@@ -13548,7 +13601,7 @@ async function fetchBackingDatasetRows(input) {
13548
13601
  seenEnvelopeKeys.add(key);
13549
13602
  }
13550
13603
  sheetRows.push(...page.rows);
13551
- const summaryTotal = _optionalChain([page, 'access', _443 => _443.summary, 'optionalAccess', _444 => _444.stats, 'optionalAccess', _445 => _445.total]);
13604
+ const summaryTotal = _optionalChain([page, 'access', _446 => _446.summary, 'optionalAccess', _447 => _447.stats, 'optionalAccess', _448 => _448.total]);
13552
13605
  if (typeof summaryTotal === "number" && Number.isFinite(summaryTotal)) {
13553
13606
  settledTotal = Math.max(_nullishCoalesce(settledTotal, () => ( 0)), Math.trunc(summaryTotal));
13554
13607
  }
@@ -13708,8 +13761,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
13708
13761
  path: dataset.exportFile(outPath, options),
13709
13762
  rowsInfo: dataset.info(),
13710
13763
  currentTable: false,
13711
- datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _446 => _446.source]), () => ( null)),
13712
- datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _447 => _447.info, 'call', _448 => _448()]), () => ( null))
13764
+ datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _449 => _449.source]), () => ( null)),
13765
+ datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _450 => _450.info, 'call', _451 => _451()]), () => ( null))
13713
13766
  };
13714
13767
  };
13715
13768
  const run = Run.open({
@@ -13721,7 +13774,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
13721
13774
  const returnedRows = datasets.returned().map((dataset) => dataset.info());
13722
13775
  const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
13723
13776
  const selectedDataset = run.dataset(options.datasetPath);
13724
- const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _449 => _449.info, 'call', _450 => _450()]), () => ( null));
13777
+ const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _452 => _452.info, 'call', _453 => _453()]), () => ( null));
13725
13778
  if (!selectedDataset && options.datasetPath) {
13726
13779
  const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
13727
13780
  const commands = datasetChoiceLines({
@@ -13833,7 +13886,7 @@ ${commands.join("\n")}`,
13833
13886
  throw error;
13834
13887
  }
13835
13888
  }
13836
- if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _451 => _451.complete])) {
13889
+ if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _454 => _454.complete])) {
13837
13890
  const guarded2 = assertDatasetHasExportableRows({
13838
13891
  rowsInfo: fetchedRowsInfo,
13839
13892
  status,
@@ -13892,7 +13945,7 @@ function extractActiveRunsFromError(error) {
13892
13945
  if (!(error instanceof _chunk7P5AA3SNjs.DeeplineError)) {
13893
13946
  return [];
13894
13947
  }
13895
- const response = _optionalChain([error, 'access', _452 => _452.details, 'optionalAccess', _453 => _453.response]);
13948
+ const response = _optionalChain([error, 'access', _455 => _455.details, 'optionalAccess', _456 => _456.response]);
13896
13949
  if (!response || typeof response !== "object" || Array.isArray(response)) {
13897
13950
  return [];
13898
13951
  }
@@ -14013,8 +14066,8 @@ function renderServerResultView(value) {
14013
14066
  return { lines: [], actions: [] };
14014
14067
  }
14015
14068
  const view = value;
14016
- const renderedSections = Array.isArray(_optionalChain([view, 'access', _454 => _454.render, 'optionalAccess', _455 => _455.sections])) ? view.render.sections : [];
14017
- const renderedActions = Array.isArray(_optionalChain([view, 'access', _456 => _456.render, 'optionalAccess', _457 => _457.actions])) ? view.render.actions : [];
14069
+ const renderedSections = Array.isArray(_optionalChain([view, 'access', _457 => _457.render, 'optionalAccess', _458 => _458.sections])) ? view.render.sections : [];
14070
+ const renderedActions = Array.isArray(_optionalChain([view, 'access', _459 => _459.render, 'optionalAccess', _460 => _460.actions])) ? view.render.actions : [];
14018
14071
  if (renderedSections.length > 0 || renderedActions.length > 0) {
14019
14072
  const lines2 = [];
14020
14073
  for (const section of renderedSections) {
@@ -14052,7 +14105,7 @@ function renderServerResultView(value) {
14052
14105
  }
14053
14106
  const tables = Array.isArray(view.tables) ? view.tables : [];
14054
14107
  const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
14055
- if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _458 => _458.queryCommand]) === "string") {
14108
+ if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _461 => _461.queryCommand]) === "string") {
14056
14109
  lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
14057
14110
  }
14058
14111
  if (tables.length > 0) {
@@ -14106,7 +14159,7 @@ function writeStartedPlayRun(input) {
14106
14159
  dashboardUrl: input.dashboardUrl,
14107
14160
  package: input.package
14108
14161
  };
14109
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
14162
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
14110
14163
  json: true,
14111
14164
  fields: input.jsonFields
14112
14165
  });
@@ -14128,7 +14181,7 @@ function writeStartedPlayRun(input) {
14128
14181
  input.progress.writeLine(output2, process.stdout);
14129
14182
  return;
14130
14183
  }
14131
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0, input.package, {
14184
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, input.package, {
14132
14185
  json: false,
14133
14186
  text: `${output2}
14134
14187
  `
@@ -14157,7 +14210,7 @@ function writeStartedPlayRun(input) {
14157
14210
  ) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)} --json`] : []
14158
14211
  ];
14159
14212
  if (input.jsonOutput) {
14160
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
14213
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
14161
14214
  return;
14162
14215
  }
14163
14216
  if (input.dashboardUrl) {
@@ -14168,7 +14221,7 @@ function writeStartedPlayRun(input) {
14168
14221
  input.progress.writeLine(output, process.stdout);
14169
14222
  return;
14170
14223
  }
14171
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
14224
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
14172
14225
  {
14173
14226
  ...payload,
14174
14227
  render: { sections: [{ title: "play run", lines }] }
@@ -14178,7 +14231,7 @@ function writeStartedPlayRun(input) {
14178
14231
  );
14179
14232
  }
14180
14233
  function parsePlayCheckOptions(args) {
14181
- const selection = _chunkDNMV2L7Qjs.parseJsonFields.call(void 0, args, "check");
14234
+ const selection = _chunkWHKTRZ3Jjs.parseJsonFields.call(void 0, args, "check");
14182
14235
  args = selection.args;
14183
14236
  const target = args[0];
14184
14237
  if (!target || target.startsWith("-")) {
@@ -14190,7 +14243,7 @@ function parsePlayCheckOptions(args) {
14190
14243
  if (arg !== "--json" && arg !== "--full")
14191
14244
  throw new Error(`Unknown plays check option: ${arg}`);
14192
14245
  }
14193
- const jsonOutput = _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args);
14246
+ const jsonOutput = _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args);
14194
14247
  return {
14195
14248
  target,
14196
14249
  jsonOutput,
@@ -14266,7 +14319,7 @@ ${PLAY_PUBLISH_USAGE}`
14266
14319
  useLatest,
14267
14320
  expectedArtifactHash,
14268
14321
  dryRun,
14269
- jsonOutput: _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)
14322
+ jsonOutput: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)
14270
14323
  };
14271
14324
  }
14272
14325
  var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
@@ -14307,7 +14360,7 @@ ${PLAY_SAVE_USAGE}`);
14307
14360
  target,
14308
14361
  expectedArtifactHash,
14309
14362
  dryRun,
14310
- jsonOutput: _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)
14363
+ jsonOutput: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)
14311
14364
  };
14312
14365
  }
14313
14366
  function printScheduledPlayCapacity(capacity) {
@@ -14360,7 +14413,7 @@ function checkHintExpression(value) {
14360
14413
  return stringValue3(value).replace(/^toolExecutionResult\./, "result.");
14361
14414
  }
14362
14415
  function checkHintRawPath(value) {
14363
- return _optionalChain([value, 'optionalAccess', _459 => _459.startsWith, 'call', _460 => _460("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
14416
+ return _optionalChain([value, 'optionalAccess', _462 => _462.startsWith, 'call', _463 => _463("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
14364
14417
  }
14365
14418
  function collectStaticPipelineToolIds(staticPipeline) {
14366
14419
  const seen = /* @__PURE__ */ new Set();
@@ -14435,30 +14488,30 @@ function cronExecutionLabel(status) {
14435
14488
  }
14436
14489
  function readLiveCronMetadata(play) {
14437
14490
  const record3 = readRecord(play);
14438
- const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _461 => _461.triggerMetadata]));
14491
+ const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _464 => _464.triggerMetadata]));
14439
14492
  return {
14440
- schedule: typeof _optionalChain([metadata, 'optionalAccess', _462 => _462.cronSchedule]) === "string" ? metadata.cronSchedule : null,
14441
- timezone: typeof _optionalChain([metadata, 'optionalAccess', _463 => _463.cronTimezone]) === "string" ? metadata.cronTimezone : null,
14442
- nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _464 => _464.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
14443
- blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _465 => _465.blockedAt]) === "number" ? metadata.blockedAt : null,
14444
- blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _466 => _466.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
14493
+ schedule: typeof _optionalChain([metadata, 'optionalAccess', _465 => _465.cronSchedule]) === "string" ? metadata.cronSchedule : null,
14494
+ timezone: typeof _optionalChain([metadata, 'optionalAccess', _466 => _466.cronTimezone]) === "string" ? metadata.cronTimezone : null,
14495
+ nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _467 => _467.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
14496
+ blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _468 => _468.blockedAt]) === "number" ? metadata.blockedAt : null,
14497
+ blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _469 => _469.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
14445
14498
  };
14446
14499
  }
14447
14500
  function liveTriggerStatusLines(status, play) {
14448
14501
  const cron = readLiveCronMetadata(play);
14449
- if (!_optionalChain([status, 'optionalAccess', _467 => _467.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _468 => _468.webhook])) return [];
14502
+ if (!_optionalChain([status, 'optionalAccess', _470 => _470.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _471 => _471.webhook])) return [];
14450
14503
  const lines = [];
14451
- if (_optionalChain([status, 'optionalAccess', _469 => _469.cron]) || cron.schedule) {
14504
+ if (_optionalChain([status, 'optionalAccess', _472 => _472.cron]) || cron.schedule) {
14452
14505
  const timezone = cron.timezone ? ` (${cron.timezone})` : "";
14453
14506
  lines.push(
14454
- ` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _470 => _470.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
14507
+ ` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _473 => _473.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
14455
14508
  );
14456
- if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _471 => _471.cron]) === "active") {
14509
+ if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _474 => _474.cron]) === "active") {
14457
14510
  lines.push(
14458
14511
  ` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
14459
14512
  );
14460
14513
  }
14461
- if (_optionalChain([status, 'optionalAccess', _472 => _472.blockedReason])) {
14514
+ if (_optionalChain([status, 'optionalAccess', _475 => _475.blockedReason])) {
14462
14515
  lines.push(` Schedule issue: ${status.blockedReason}`);
14463
14516
  if (status.blockedReasonCode || cron.blockedReasonCode) {
14464
14517
  lines.push(
@@ -14474,7 +14527,7 @@ function liveTriggerStatusLines(status, play) {
14474
14527
  );
14475
14528
  }
14476
14529
  }
14477
- if (_optionalChain([status, 'optionalAccess', _473 => _473.webhook])) {
14530
+ if (_optionalChain([status, 'optionalAccess', _476 => _476.webhook])) {
14478
14531
  lines.push(` Webhook: ${status.webhook}`);
14479
14532
  }
14480
14533
  return lines;
@@ -14482,11 +14535,11 @@ function liveTriggerStatusLines(status, play) {
14482
14535
  function triggerStatusFromMetadata(value) {
14483
14536
  const metadata = readRecord(value);
14484
14537
  return {
14485
- cron: typeof _optionalChain([metadata, 'optionalAccess', _474 => _474.cronStatus]) === "string" ? metadata.cronStatus : null,
14486
- webhook: typeof _optionalChain([metadata, 'optionalAccess', _475 => _475.webhookStatus]) === "string" ? metadata.webhookStatus : null,
14487
- blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _476 => _476.blockedReason]) === "string" ? metadata.blockedReason : null,
14488
- blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _477 => _477.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
14489
- blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _478 => _478.blockedAt]) === "number" ? metadata.blockedAt : null
14538
+ cron: typeof _optionalChain([metadata, 'optionalAccess', _477 => _477.cronStatus]) === "string" ? metadata.cronStatus : null,
14539
+ webhook: typeof _optionalChain([metadata, 'optionalAccess', _478 => _478.webhookStatus]) === "string" ? metadata.webhookStatus : null,
14540
+ blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _479 => _479.blockedReason]) === "string" ? metadata.blockedReason : null,
14541
+ blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _480 => _480.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
14542
+ blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _481 => _481.blockedAt]) === "number" ? metadata.blockedAt : null
14490
14543
  };
14491
14544
  }
14492
14545
  function printPublishReceipt(input) {
@@ -14518,7 +14571,7 @@ function printBundledRuntimeWarning(bundle) {
14518
14571
  async function handlePlayCheck(args) {
14519
14572
  const options = parsePlayCheckOptions(args);
14520
14573
  if (!isFileTarget2(options.target)) {
14521
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
14574
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
14522
14575
  try {
14523
14576
  await assertCanonicalNamedPlayReference(client, options.target, {
14524
14577
  command: "check"
@@ -14547,7 +14600,7 @@ async function handlePlayCheck(args) {
14547
14600
  },
14548
14601
  ...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
14549
14602
  };
14550
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0, result, {
14603
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, result, {
14551
14604
  json: options.jsonOutput,
14552
14605
  fields: options.jsonFields,
14553
14606
  text: renderPlayCheckOutput(result) + "\n"
@@ -14557,7 +14610,7 @@ async function handlePlayCheck(args) {
14557
14610
  const resolved = _path.resolve.call(void 0, options.target);
14558
14611
  const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
14559
14612
  if (options.jsonOutput) {
14560
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
14613
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
14561
14614
  {
14562
14615
  kind: "play_check",
14563
14616
  checked: "named_contract",
@@ -14590,16 +14643,16 @@ async function handlePlayCheck(args) {
14590
14643
  );
14591
14644
  }
14592
14645
  const primary = outcomes.find(
14593
- (outcome) => outcome.exportName === _chunkAGH6YP2Tjs.PLAY_DEFAULT_EXPORT
14646
+ (outcome) => outcome.exportName === _chunkUQV5M6HNjs.PLAY_DEFAULT_EXPORT
14594
14647
  );
14595
14648
  const output = buildPlayCheckOutput({
14596
14649
  outcomes,
14597
14650
  target: options.target,
14598
14651
  full: options.full,
14599
14652
  detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full --json`,
14600
- publishCommand: _optionalChain([primary, 'optionalAccess', _479 => _479.result, 'access', _480 => _480.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
14653
+ publishCommand: _optionalChain([primary, 'optionalAccess', _482 => _482.result, 'access', _483 => _483.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
14601
14654
  });
14602
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0, output, {
14655
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, output, {
14603
14656
  json: options.jsonOutput,
14604
14657
  fields: options.jsonFields,
14605
14658
  text: renderPlayCheckOutput(output) + "\n"
@@ -14607,12 +14660,12 @@ async function handlePlayCheck(args) {
14607
14660
  return output.valid ? 0 : 1;
14608
14661
  }
14609
14662
  function resolvePlayCheckExportNames(sourceCode) {
14610
- const exports = _chunkAGH6YP2Tjs.listPlayFileExports.call(void 0, sourceCode);
14611
- if (!exports || exports.length === 0) return [_chunkAGH6YP2Tjs.PLAY_DEFAULT_EXPORT];
14663
+ const exports = _chunkUQV5M6HNjs.listPlayFileExports.call(void 0, sourceCode);
14664
+ if (!exports || exports.length === 0) return [_chunkUQV5M6HNjs.PLAY_DEFAULT_EXPORT];
14612
14665
  return exports.map((entry) => entry.name);
14613
14666
  }
14614
14667
  function artifactForProductionCompatibilityCheck(artifact) {
14615
- const rawEdition = _optionalChain([process, 'access', _481 => _481.env, 'access', _482 => _482.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _483 => _483.trim, 'call', _484 => _484()]);
14668
+ const rawEdition = _optionalChain([process, 'access', _484 => _484.env, 'access', _485 => _485.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _486 => _486.trim, 'call', _487 => _487()]);
14616
14669
  if (!rawEdition) return artifact;
14617
14670
  if (!/^\d+$/.test(rawEdition)) {
14618
14671
  throw new Error(
@@ -14661,7 +14714,7 @@ async function checkOneExportedPlay(input) {
14661
14714
  result: { valid: false, errors: descriptionErrors }
14662
14715
  };
14663
14716
  }
14664
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
14717
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
14665
14718
  const integrationMode = resolveEvalIntegrationMode();
14666
14719
  const importedPlays = [...graph.nodes.values()].filter((node) => node.filePath !== graph.root.filePath).map((node) => ({
14667
14720
  playName: node.playName,
@@ -14674,7 +14727,7 @@ async function checkOneExportedPlay(input) {
14674
14727
  sourceFiles: graph.root.sourceFiles,
14675
14728
  description: _nullishCoalesce(graph.root.playDescription, () => ( void 0)),
14676
14729
  artifact: artifactForProductionCompatibilityCheck(graph.root.artifact),
14677
- ...exportName === _chunkAGH6YP2Tjs.PLAY_DEFAULT_EXPORT ? {} : { exportName },
14730
+ ...exportName === _chunkUQV5M6HNjs.PLAY_DEFAULT_EXPORT ? {} : { exportName },
14678
14731
  ...importedPlays.length > 0 ? { importedPlays } : {},
14679
14732
  ...integrationMode ? { integrationMode } : {}
14680
14733
  });
@@ -14722,7 +14775,7 @@ async function handleFileBackedRun(options, hooks) {
14722
14775
  () => collectBundledPlayGraph(
14723
14776
  absolutePlayPath,
14724
14777
  options.profile,
14725
- _chunkAGH6YP2Tjs.PLAY_DEFAULT_EXPORT,
14778
+ _chunkUQV5M6HNjs.PLAY_DEFAULT_EXPORT,
14726
14779
  { cache: !options.dryRun }
14727
14780
  )
14728
14781
  );
@@ -14735,7 +14788,7 @@ async function handleFileBackedRun(options, hooks) {
14735
14788
  );
14736
14789
  return 0;
14737
14790
  }
14738
- client = new (0, _chunkITFUZEHEjs.DeeplineClient)(playRunClientOptions(options));
14791
+ client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)(playRunClientOptions(options));
14739
14792
  const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
14740
14793
  if (canDeferCompilerManifest) {
14741
14794
  _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
@@ -14788,7 +14841,7 @@ async function handleFileBackedRun(options, hooks) {
14788
14841
  );
14789
14842
  const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
14790
14843
  const fileInputBindings = _chunkLA46MMTLjs.fileInputBindingsFromStaticPipeline.call(void 0,
14791
- _optionalChain([compilerManifest, 'optionalAccess', _485 => _485.staticPipeline])
14844
+ _optionalChain([compilerManifest, 'optionalAccess', _488 => _488.staticPipeline])
14792
14845
  );
14793
14846
  const stagedFileInputs = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
14794
14847
  "cli.play_stage_inputs",
@@ -14848,8 +14901,8 @@ async function handleFileBackedRun(options, hooks) {
14848
14901
  waitTimeoutMs: options.waitTimeoutMs,
14849
14902
  open: options.open,
14850
14903
  progress,
14851
- onRunStarted: _optionalChain([hooks, 'optionalAccess', _486 => _486.onRunStarted]),
14852
- onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _487 => _487.onRunAdmitted])
14904
+ onRunStarted: _optionalChain([hooks, 'optionalAccess', _489 => _489.onRunStarted]),
14905
+ onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _490 => _490.onRunAdmitted])
14853
14906
  }).catch(async (error) => {
14854
14907
  throw await normalizePlayStartError(client, error, playName);
14855
14908
  })
@@ -14871,7 +14924,7 @@ async function handleFileBackedRun(options, hooks) {
14871
14924
  ),
14872
14925
  options
14873
14926
  );
14874
- _optionalChain([hooks, 'optionalAccess', _488 => _488.onTerminalStatus, 'optionalCall', _489 => _489(outputStatus)]);
14927
+ _optionalChain([hooks, 'optionalAccess', _491 => _491.onTerminalStatus, 'optionalCall', _492 => _492(outputStatus)]);
14875
14928
  traceCliSync(
14876
14929
  "cli.play_write_result",
14877
14930
  { targetKind: "file", playName },
@@ -14890,8 +14943,8 @@ async function handleFileBackedRun(options, hooks) {
14890
14943
  throw await normalizePlayStartError(client, error, playName);
14891
14944
  })
14892
14945
  );
14893
- await _optionalChain([hooks, 'optionalAccess', _490 => _490.onRunStarted, 'optionalCall', _491 => _491(started.workflowId)]);
14894
- await _optionalChain([hooks, 'optionalAccess', _492 => _492.onRunAdmitted, 'optionalCall', _493 => _493(started.workflowId)]);
14946
+ await _optionalChain([hooks, 'optionalAccess', _493 => _493.onRunStarted, 'optionalCall', _494 => _494(started.workflowId)]);
14947
+ await _optionalChain([hooks, 'optionalAccess', _495 => _495.onRunAdmitted, 'optionalCall', _496 => _496(started.workflowId)]);
14895
14948
  const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
14896
14949
  openPlayDashboard(resolvedDashboardUrl, options.open);
14897
14950
  progress.phase("started run");
@@ -14919,7 +14972,7 @@ async function resolveNamedRunRevisionId(input) {
14919
14972
  if (input.selector === "latest") {
14920
14973
  const versions = await input.client.listPlayVersions(input.playName);
14921
14974
  const latest = versions[0];
14922
- if (!_optionalChain([latest, 'optionalAccess', _494 => _494._id])) {
14975
+ if (!_optionalChain([latest, 'optionalAccess', _497 => _497._id])) {
14923
14976
  throw new Error(`No saved revisions found for ${input.playName}.`);
14924
14977
  }
14925
14978
  return latest._id;
@@ -14930,7 +14983,7 @@ async function handleNamedRun(options, hooks) {
14930
14983
  if (options.target.kind !== "name") {
14931
14984
  throw new Error("Expected a named play run target.");
14932
14985
  }
14933
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)(playRunClientOptions(options));
14986
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)(playRunClientOptions(options));
14934
14987
  const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
14935
14988
  const playName = options.target.name;
14936
14989
  const runtimeInput = options.input ? { ...options.input } : {};
@@ -15036,8 +15089,8 @@ async function handleNamedRun(options, hooks) {
15036
15089
  waitTimeoutMs: options.waitTimeoutMs,
15037
15090
  open: options.open,
15038
15091
  progress,
15039
- onRunStarted: _optionalChain([hooks, 'optionalAccess', _495 => _495.onRunStarted]),
15040
- onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _496 => _496.onRunAdmitted])
15092
+ onRunStarted: _optionalChain([hooks, 'optionalAccess', _498 => _498.onRunStarted]),
15093
+ onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _499 => _499.onRunAdmitted])
15041
15094
  }).catch(async (error) => {
15042
15095
  throw await normalizePlayStartError(client, error, playName, {
15043
15096
  suggestMissingPlay: true
@@ -15062,7 +15115,7 @@ async function handleNamedRun(options, hooks) {
15062
15115
  options,
15063
15116
  _nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
15064
15117
  );
15065
- _optionalChain([hooks, 'optionalAccess', _497 => _497.onTerminalStatus, 'optionalCall', _498 => _498(outputStatus)]);
15118
+ _optionalChain([hooks, 'optionalAccess', _500 => _500.onTerminalStatus, 'optionalCall', _501 => _501(outputStatus)]);
15066
15119
  traceCliSync(
15067
15120
  "cli.play_write_result",
15068
15121
  { targetKind: "name", playName },
@@ -15083,8 +15136,8 @@ async function handleNamedRun(options, hooks) {
15083
15136
  });
15084
15137
  })
15085
15138
  );
15086
- await _optionalChain([hooks, 'optionalAccess', _499 => _499.onRunStarted, 'optionalCall', _500 => _500(started.workflowId)]);
15087
- await _optionalChain([hooks, 'optionalAccess', _501 => _501.onRunAdmitted, 'optionalCall', _502 => _502(started.workflowId)]);
15139
+ await _optionalChain([hooks, 'optionalAccess', _502 => _502.onRunStarted, 'optionalCall', _503 => _503(started.workflowId)]);
15140
+ await _optionalChain([hooks, 'optionalAccess', _504 => _504.onRunAdmitted, 'optionalCall', _505 => _505(started.workflowId)]);
15088
15141
  const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
15089
15142
  openPlayDashboard(resolvedDashboardUrl, options.open);
15090
15143
  progress.phase("started run");
@@ -15122,7 +15175,7 @@ async function handlePlayRun(args, hooks) {
15122
15175
  { cause: error }
15123
15176
  );
15124
15177
  }
15125
- await _optionalChain([hooks, 'optionalAccess', _503 => _503.onRunStarted, 'optionalCall', _504 => _504(runId)]);
15178
+ await _optionalChain([hooks, 'optionalAccess', _506 => _506.onRunStarted, 'optionalCall', _507 => _507(runId)]);
15126
15179
  },
15127
15180
  onRunAdmitted: async (runId) => {
15128
15181
  try {
@@ -15135,7 +15188,7 @@ async function handlePlayRun(args, hooks) {
15135
15188
  { cause: error }
15136
15189
  );
15137
15190
  }
15138
- await _optionalChain([hooks, 'optionalAccess', _505 => _505.onRunAdmitted, 'optionalCall', _506 => _506(runId)]);
15191
+ await _optionalChain([hooks, 'optionalAccess', _508 => _508.onRunAdmitted, 'optionalCall', _509 => _509(runId)]);
15139
15192
  }
15140
15193
  } : hooks;
15141
15194
  if (options.target.kind === "file") {
@@ -15157,7 +15210,7 @@ async function handlePlayRun(args, hooks) {
15157
15210
  console.error(` ${_path.join.call(void 0, dir, s)}`);
15158
15211
  }
15159
15212
  }
15160
- } catch (e16) {
15213
+ } catch (e17) {
15161
15214
  }
15162
15215
  }
15163
15216
  return 1;
@@ -15213,10 +15266,10 @@ function renderRunOverviewText(overview, extras = {}) {
15213
15266
  ...buildRunActivityTextLines(run),
15214
15267
  ...buildRunStatusEvidenceTextLines(overview)
15215
15268
  ];
15216
- if (_optionalChain([overview, 'access', _507 => _507.runStatus, 'optionalAccess', _508 => _508.available]) === false)
15269
+ if (_optionalChain([overview, 'access', _510 => _510.runStatus, 'optionalAccess', _511 => _511.available]) === false)
15217
15270
  lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
15218
- const work = readRecord(_optionalChain([readRecord, 'call', _509 => _509(run), 'optionalAccess', _510 => _510.work]));
15219
- if (work && !_optionalChain([overview, 'access', _511 => _511.runStatus, 'optionalAccess', _512 => _512.available]))
15271
+ const work = readRecord(_optionalChain([readRecord, 'call', _512 => _512(run), 'optionalAccess', _513 => _513.work]));
15272
+ if (work && !_optionalChain([overview, 'access', _514 => _514.runStatus, 'optionalAccess', _515 => _515.available]))
15220
15273
  lines.push(
15221
15274
  ` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
15222
15275
  );
@@ -15267,7 +15320,7 @@ function renderRunOverviewText(overview, extras = {}) {
15267
15320
  ...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
15268
15321
  ...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
15269
15322
  ...overview.failedLogs.entries,
15270
- ..._optionalChain([overview, 'access', _513 => _513.failedLogs, 'access', _514 => _514.next, 'optionalAccess', _515 => _515.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
15323
+ ..._optionalChain([overview, 'access', _516 => _516.failedLogs, 'access', _517 => _517.next, 'optionalAccess', _518 => _518.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
15271
15324
  ]
15272
15325
  });
15273
15326
  sections.push({
@@ -15327,10 +15380,10 @@ function renderRunOverviewText(overview, extras = {}) {
15327
15380
  );
15328
15381
  return `${lines.join("\n")}
15329
15382
 
15330
- ${_chunkDNMV2L7Qjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
15383
+ ${_chunkWHKTRZ3Jjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
15331
15384
  }
15332
15385
  async function handleRunGet(args) {
15333
- const selection = _chunkDNMV2L7Qjs.parseJsonFields.call(void 0,
15386
+ const selection = _chunkWHKTRZ3Jjs.parseJsonFields.call(void 0,
15334
15387
  args,
15335
15388
  args.includes("--config") ? "config" : "get"
15336
15389
  );
@@ -15343,7 +15396,7 @@ async function handleRunGet(args) {
15343
15396
  console.error(error instanceof Error ? error.message : usage2);
15344
15397
  return 1;
15345
15398
  }
15346
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
15399
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
15347
15400
  if (args.includes("--config")) {
15348
15401
  if (args.some((arg) => ["--input", "--full", "--log-failed"].includes(arg))) {
15349
15402
  console.error(
@@ -15357,7 +15410,7 @@ async function handleRunGet(args) {
15357
15410
  "This server does not support recorded configuration reads."
15358
15411
  );
15359
15412
  }
15360
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
15413
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
15361
15414
  { runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
15362
15415
  { json: true, fields: selection.fields }
15363
15416
  );
@@ -15365,7 +15418,7 @@ async function handleRunGet(args) {
15365
15418
  }
15366
15419
  if (args.includes("--input")) {
15367
15420
  const input = await client.getRunInput(runId);
15368
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0, input, { json: true });
15421
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, input, { json: true });
15369
15422
  return 0;
15370
15423
  }
15371
15424
  const full = args.includes("--full");
@@ -15378,8 +15431,8 @@ async function handleRunGet(args) {
15378
15431
  full: true,
15379
15432
  failedLogs: args.includes("--log-failed")
15380
15433
  }) : status;
15381
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
15382
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
15434
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
15435
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
15383
15436
  full ? legacyStatus : compactPlayStatus(legacyStatus),
15384
15437
  { json: true, fields: selection.fields }
15385
15438
  );
@@ -15395,8 +15448,8 @@ async function handleRunGet(args) {
15395
15448
  readRunCredits(client, runId, !TERMINAL_PLAY_STATUSES.has(status.status))
15396
15449
  ]);
15397
15450
  const hitLines = formatRunHitsLines(hits);
15398
- const json = _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args);
15399
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
15451
+ const json = _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args);
15452
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
15400
15453
  {
15401
15454
  ...overview,
15402
15455
  credits,
@@ -15499,9 +15552,9 @@ async function handleRunLifecycleStatus(args) {
15499
15552
  console.error(error instanceof Error ? error.message : usage2);
15500
15553
  return 1;
15501
15554
  }
15502
- const status = await new (0, _chunkITFUZEHEjs.DeeplineClient)().runs.status(runId);
15503
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
15504
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0, status, { json: true });
15555
+ const status = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().runs.status(runId);
15556
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
15557
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, status, { json: true });
15505
15558
  return 0;
15506
15559
  }
15507
15560
  if (!status.available) {
@@ -15541,59 +15594,15 @@ async function handleRunsRerun(args) {
15541
15594
  console.error(error instanceof Error ? error.message : usage2);
15542
15595
  return 1;
15543
15596
  }
15544
- let idempotencyKey;
15545
- let inputOverrides;
15597
+ const options = { json: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args) };
15546
15598
  for (let index = 0; index < args.length; index += 1) {
15547
15599
  if (args[index] === "--idempotency-key") {
15548
- const value = args[index + 1];
15549
- if (!value || value.startsWith("--") || !value.trim()) {
15550
- console.error("--idempotency-key requires a non-empty value.");
15551
- return 1;
15552
- }
15553
- idempotencyKey = value.trim();
15554
- index += 1;
15600
+ options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
15555
15601
  } else if (args[index] === "--input-overrides") {
15556
- const value = args[index + 1];
15557
- if (!value || value.startsWith("--")) {
15558
- console.error("--input-overrides requires a JSON object.");
15559
- return 1;
15560
- }
15561
- try {
15562
- const parsed = JSON.parse(value);
15563
- if (!parsed || typeof parsed !== "object" || Array.isArray(parsed) || Object.values(parsed).some(
15564
- (entry) => entry !== null && !["string", "number", "boolean"].includes(typeof entry) || typeof entry === "number" && !Number.isFinite(entry)
15565
- )) {
15566
- throw new Error("expected scalar values");
15567
- }
15568
- inputOverrides = parsed;
15569
- } catch (e17) {
15570
- console.error(
15571
- "--input-overrides must be a JSON object of scalar values."
15572
- );
15573
- return 1;
15574
- }
15575
- index += 1;
15602
+ options.inputOverrides = _nullishCoalesce(args[++index], () => ( ""));
15576
15603
  }
15577
15604
  }
15578
- const result = await new (0, _chunkITFUZEHEjs.DeeplineClient)().runs.rerun(runId, {
15579
- ...idempotencyKey ? { idempotencyKey } : {},
15580
- ...inputOverrides ? { inputOverrides } : {}
15581
- });
15582
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
15583
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0, result, { json: true });
15584
- } else {
15585
- console.log(
15586
- result.deduplicated === true ? `
15587
- Rerun already exists for ${runId} (matched by idempotency key): ${result.runId}` : `
15588
- Rerun started from ${runId}${inputOverrides ? " with input overrides" : ""}.`
15589
- );
15590
- console.log(` inspect: deepline runs get ${result.runId} --json`);
15591
- console.log(` original input: deepline runs get ${result.runId} --input`);
15592
- console.log(
15593
- result.deduplicated === true ? " No new run was started. Use a different --idempotency-key to start another rerun." : ` This is a fresh run using the original input${inputOverrides ? " with the supplied field overrides" : ""} and pinned revision. Normal tool receipt reuse still applies.`
15594
- );
15595
- }
15596
- return 0;
15605
+ return runRunsRerunCommand(runId, options);
15597
15606
  }
15598
15607
  async function handleRunsList(args) {
15599
15608
  const usage2 = "Usage: deepline runs list [--play <play-name>] [--node <mermaid-node-id>] [--status <status>] [--limit <count>] [--offset <count>] [--json]";
@@ -15650,8 +15659,8 @@ ${usage2}
15650
15659
  Discover Plays: ${next.discover}
15651
15660
  Active runs: ${next.running}`
15652
15661
  );
15653
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
15654
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
15662
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
15663
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
15655
15664
  { ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
15656
15665
  { json: true }
15657
15666
  );
@@ -15666,7 +15675,7 @@ Active runs: ${next.running}`
15666
15675
  console.error("--offset requires --play.");
15667
15676
  return 1;
15668
15677
  }
15669
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
15678
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
15670
15679
  const page = await client.runs.listPage({
15671
15680
  ...playName ? { play: playName } : {},
15672
15681
  ...statusFilter ? { status: statusFilter } : {},
@@ -15675,13 +15684,14 @@ Active runs: ${next.running}`
15675
15684
  ...offset !== void 0 ? { offset } : {}
15676
15685
  });
15677
15686
  const runs = page.runs.map((run) => ({
15687
+ id: run.workflowId,
15678
15688
  runId: run.workflowId,
15679
15689
  // `workflowId` is the legacy SDK name for the same public Deepline run
15680
15690
  // identity. Keep it during the compatibility window, but never label the
15681
15691
  // duplicate as a Temporal/runtime id.
15682
15692
  workflowId: run.workflowId,
15683
15693
  // Retain the runtime identifier for existing JSON consumers. It is not a
15684
- // stable Deepline run id; `runId` above is the canonical public id.
15694
+ // stable Deepline run id; `id` above is the canonical public id.
15685
15695
  temporalRunId: _nullishCoalesce(run.runId, () => ( null)),
15686
15696
  parentRunId: _nullishCoalesce(run.parentRunId, () => ( null)),
15687
15697
  rootRunId: _nullishCoalesce(run.rootRunId, () => ( null)),
@@ -15695,19 +15705,19 @@ Active runs: ${next.running}`
15695
15705
  executionTime: run.executionTime,
15696
15706
  billingTotalCredits: run.billingTotalCredits,
15697
15707
  billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
15698
- playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _516 => _516.memo, 'optionalAccess', _517 => _517.playName]))), () => ( playName)), () => ( null)),
15708
+ playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _519 => _519.memo, 'optionalAccess', _520 => _520.playName]))), () => ( playName)), () => ( null)),
15699
15709
  ...nodeId ? { nodeObservation: _nullishCoalesce(run.nodeObservation, () => ( null)) } : {}
15700
15710
  }));
15701
15711
  const lines = runs.length === 0 ? [
15702
15712
  playName ? `No runs found for ${playName}.` : `No runs found for status ${statusFilter}.`
15703
15713
  ] : runs.map((run) => {
15704
15714
  const lines2 = [
15705
- `${run.runId} ${run.status}`,
15715
+ `${run.id} ${run.status}`,
15706
15716
  ` created: ${formatTimestamp(run.createdAt)}`,
15707
15717
  ` started: ${formatTimestamp(run.startedAt)}`,
15708
15718
  ` finished: ${formatTimestamp(run.finishedAt)}`,
15709
15719
  ` credits: ${typeof run.billingTotalCredits === "number" && Number.isFinite(run.billingTotalCredits) ? formatCreditAmount2(run.billingTotalCredits) : "\u2014"}`,
15710
- ` inspect: deepline runs get ${run.runId} --json`
15720
+ ` inspect: deepline runs get ${run.id} --json`
15711
15721
  ];
15712
15722
  if (run.parentRunId) lines2.push(` parent: ${run.parentRunId}`);
15713
15723
  if (run.rootRunId) lines2.push(` root: ${run.rootRunId}`);
@@ -15734,7 +15744,7 @@ Active runs: ${next.running}`
15734
15744
  nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
15735
15745
  );
15736
15746
  }
15737
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
15747
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
15738
15748
  {
15739
15749
  runs,
15740
15750
  count: runs.length,
@@ -15744,11 +15754,11 @@ Active runs: ${next.running}`
15744
15754
  ...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
15745
15755
  next: {
15746
15756
  page: nextPage,
15747
- get: _optionalChain([runs, 'access', _518 => _518[0], 'optionalAccess', _519 => _519.runId]) ? `deepline runs get ${runs[0].runId} --json` : null
15757
+ get: _optionalChain([runs, 'access', _521 => _521[0], 'optionalAccess', _522 => _522.id]) ? `deepline runs get ${runs[0].id} --json` : null
15748
15758
  },
15749
15759
  render: { sections: [{ title: "runs", lines }] }
15750
15760
  },
15751
- { json: _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args) }
15761
+ { json: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args) }
15752
15762
  );
15753
15763
  return 0;
15754
15764
  }
@@ -15778,7 +15788,7 @@ async function handleRunTail(args) {
15778
15788
  console.error("--log-level requires one of: debug, info, warn, error.");
15779
15789
  return 1;
15780
15790
  }
15781
- const parsed = _chunkITFUZEHEjs.parseLogLevel.call(void 0, value);
15791
+ const parsed = _chunkYGFQ7YSMjs.parseLogLevel.call(void 0, value);
15782
15792
  if (!parsed) {
15783
15793
  console.error(
15784
15794
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -15816,9 +15826,9 @@ async function handleRunTail(args) {
15816
15826
  );
15817
15827
  return 1;
15818
15828
  }
15819
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
15829
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
15820
15830
  const jsonLines = args.includes("--jsonl");
15821
- const jsonOutput = !jsonLines && _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args);
15831
+ const jsonOutput = !jsonLines && _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args);
15822
15832
  const compact = args.includes("--compact");
15823
15833
  const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
15824
15834
  const compactState = {
@@ -15899,7 +15909,7 @@ async function handleRunLogs(args) {
15899
15909
  ]);
15900
15910
  const cursorIndex = args.indexOf("--cursor");
15901
15911
  const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
15902
- const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkITFUZEHEjs.isRunLogsCursor.call(void 0, cursorValue));
15912
+ const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkYGFQ7YSMjs.isRunLogsCursor.call(void 0, cursorValue));
15903
15913
  if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
15904
15914
  return handleRunEventSearch(args);
15905
15915
  }
@@ -15933,7 +15943,7 @@ async function handleRunLogs(args) {
15933
15943
  console.error("--log-level requires one of: debug, info, warn, error.");
15934
15944
  return 1;
15935
15945
  }
15936
- const parsed = _chunkITFUZEHEjs.parseLogLevel.call(void 0, value);
15946
+ const parsed = _chunkYGFQ7YSMjs.parseLogLevel.call(void 0, value);
15937
15947
  if (!parsed) {
15938
15948
  console.error(
15939
15949
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -15980,12 +15990,12 @@ async function handleRunLogs(args) {
15980
15990
  );
15981
15991
  return 1;
15982
15992
  }
15983
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
15993
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
15984
15994
  if (outPath) {
15985
15995
  const result2 = await client.runs.logs(runId, { all: true });
15986
- const logs = result2.entries.filter((line) => _chunkITFUZEHEjs.logLevelReaches.call(void 0, _chunkITFUZEHEjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkITFUZEHEjs.classifyLogLine.call(void 0, line).line);
15996
+ const logs = result2.entries.filter((line) => _chunkYGFQ7YSMjs.logLevelReaches.call(void 0, _chunkYGFQ7YSMjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkYGFQ7YSMjs.classifyLogLine.call(void 0, line).line);
15987
15997
  _fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
15988
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
15998
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
15989
15999
  {
15990
16000
  runId: result2.runId,
15991
16001
  log_path: outPath,
@@ -16008,7 +16018,7 @@ async function handleRunLogs(args) {
16008
16018
  ]
16009
16019
  }
16010
16020
  },
16011
- { json: _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args) }
16021
+ { json: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args) }
16012
16022
  );
16013
16023
  return 0;
16014
16024
  }
@@ -16039,7 +16049,7 @@ async function handleRunLogs(args) {
16039
16049
  }
16040
16050
  };
16041
16051
  const text = buildRunLogsText(filteredResult);
16042
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
16052
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
16043
16053
  {
16044
16054
  runId: result.runId,
16045
16055
  totalCount: result.totalCount,
@@ -16063,7 +16073,7 @@ async function handleRunLogs(args) {
16063
16073
  render: { sections: [{ title: "run logs", lines: entries }] }
16064
16074
  },
16065
16075
  {
16066
- json: _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args),
16076
+ json: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args),
16067
16077
  text
16068
16078
  }
16069
16079
  );
@@ -16087,17 +16097,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
16087
16097
  );
16088
16098
  }
16089
16099
  const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
16090
- (entry) => _chunkITFUZEHEjs.logLevelReaches.call(void 0, _chunkITFUZEHEjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
16100
+ (entry) => _chunkYGFQ7YSMjs.logLevelReaches.call(void 0, _chunkYGFQ7YSMjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
16091
16101
  );
16092
16102
  const selected = matching.slice(-limit);
16093
16103
  const olderMatchesExist = matching.length > selected.length;
16094
16104
  return {
16095
16105
  entries: selected.map((entry) => entry.line),
16096
- firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _520 => _520[0], 'optionalAccess', _521 => _521.seq]), () => ( null)),
16097
- lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _522 => _522.at, 'call', _523 => _523(-1), 'optionalAccess', _524 => _524.seq]), () => ( null)),
16106
+ firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _523 => _523[0], 'optionalAccess', _524 => _524.seq]), () => ( null)),
16107
+ lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _525 => _525.at, 'call', _526 => _526(-1), 'optionalAccess', _527 => _527.seq]), () => ( null)),
16098
16108
  truncated: result.truncated || olderMatchesExist,
16099
16109
  hasMore: olderMatchesExist,
16100
- nextCursor: olderMatchesExist ? _chunkITFUZEHEjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
16110
+ nextCursor: olderMatchesExist ? _chunkYGFQ7YSMjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
16101
16111
  };
16102
16112
  }
16103
16113
  async function handleRunEventSearch(args) {
@@ -16164,7 +16174,7 @@ ${usage2}`);
16164
16174
  namespace,
16165
16175
  ...backend ? { backend } : {}
16166
16176
  } : void 0;
16167
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
16177
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
16168
16178
  const result = await client.runs.searchEvents({
16169
16179
  ...runId ? { runId } : {},
16170
16180
  ...values["--since"] ? { since: values["--since"] } : {},
@@ -16237,7 +16247,7 @@ ${renderedDetails}` : ""}`;
16237
16247
  String(limit),
16238
16248
  "--json"
16239
16249
  ].join(" ") : null;
16240
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
16250
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
16241
16251
  {
16242
16252
  events,
16243
16253
  nextCursor: result.nextCursor,
@@ -16248,19 +16258,19 @@ ${renderedDetails}` : ""}`;
16248
16258
  render: { sections: [{ title: "runtime events", lines }] }
16249
16259
  },
16250
16260
  {
16251
- json: _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args),
16261
+ json: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args),
16252
16262
  text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
16253
16263
  }
16254
16264
  );
16255
16265
  return 0;
16256
16266
  }
16257
16267
  function buildRunLogsText(result) {
16258
- const lines = result.entries.map((line) => _chunkITFUZEHEjs.classifyLogLine.call(void 0, line).line);
16268
+ const lines = result.entries.map((line) => _chunkYGFQ7YSMjs.classifyLogLine.call(void 0, line).line);
16259
16269
  if (result.warning) {
16260
16270
  if (lines.length > 0) lines.push("");
16261
16271
  lines.push(`warning: ${result.warning}`);
16262
16272
  lines.push(
16263
- `retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _525 => _525.next, 'optionalAccess', _526 => _526.logs]), () => ( `deepline runs logs ${result.runId} --out run.log --json`))}`
16273
+ `retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _528 => _528.next, 'optionalAccess', _529 => _529.logs]), () => ( `deepline runs logs ${result.runId} --out run.log --json`))}`
16264
16274
  );
16265
16275
  }
16266
16276
  return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
@@ -16289,7 +16299,7 @@ async function handleRunStop(args) {
16289
16299
  reason = args[++index];
16290
16300
  }
16291
16301
  }
16292
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
16302
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
16293
16303
  const result = await client.runs.stop(runId, { reason });
16294
16304
  const state = resolveRunStopState(result);
16295
16305
  const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
@@ -16304,7 +16314,7 @@ async function handleRunStop(args) {
16304
16314
  ...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
16305
16315
  `inspect: deepline runs get ${runId} --full --json`
16306
16316
  ];
16307
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
16317
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
16308
16318
  {
16309
16319
  ...cancelling,
16310
16320
  state,
@@ -16319,7 +16329,7 @@ async function handleRunStop(args) {
16319
16329
  ]
16320
16330
  }
16321
16331
  },
16322
- { json: _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args) }
16332
+ { json: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args) }
16323
16333
  );
16324
16334
  return 0;
16325
16335
  }
@@ -16336,7 +16346,7 @@ async function handleRunStop(args) {
16336
16346
  ];
16337
16347
  process.stderr.write(`${lines2.join("\n")}
16338
16348
  `);
16339
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
16349
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
16340
16350
  {
16341
16351
  ...result,
16342
16352
  render: {
@@ -16351,7 +16361,7 @@ async function handleRunStop(args) {
16351
16361
  ]
16352
16362
  }
16353
16363
  },
16354
- { json: _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args) }
16364
+ { json: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args) }
16355
16365
  );
16356
16366
  return 1;
16357
16367
  }
@@ -16362,12 +16372,12 @@ async function handleRunStop(args) {
16362
16372
  `warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
16363
16373
  ] : []
16364
16374
  ];
16365
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
16375
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
16366
16376
  {
16367
16377
  ...result,
16368
16378
  render: { sections: [{ title: "run stop", lines }] }
16369
16379
  },
16370
- { json: _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args) }
16380
+ { json: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args) }
16371
16381
  );
16372
16382
  return 0;
16373
16383
  }
@@ -16417,18 +16427,18 @@ async function handleRunStopAll(args) {
16417
16427
  reason = args[++index];
16418
16428
  }
16419
16429
  }
16420
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
16430
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
16421
16431
  if (dryRun) {
16422
16432
  const result2 = await client.runs.stopAll({ dryRun: true, reason });
16423
16433
  const lines2 = buildStopAllDryRunTextLines(result2);
16424
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
16434
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
16425
16435
  {
16426
16436
  ...result2,
16427
16437
  render: {
16428
16438
  sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
16429
16439
  }
16430
16440
  },
16431
- { json: _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
16441
+ { json: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
16432
16442
  ` }
16433
16443
  );
16434
16444
  return 0;
@@ -16441,17 +16451,17 @@ async function handleRunStopAll(args) {
16441
16451
  ...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
16442
16452
  ...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
16443
16453
  ];
16444
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
16454
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
16445
16455
  {
16446
16456
  ...result,
16447
16457
  render: { sections: [{ title: "workspace stop-all", lines }] }
16448
16458
  },
16449
- { json: _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args) }
16459
+ { json: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args) }
16450
16460
  );
16451
16461
  return result.failed > 0 || result.partial ? 1 : 0;
16452
16462
  }
16453
16463
  async function handleRunExport(args) {
16454
- const selection = _chunkDNMV2L7Qjs.parseJsonFields.call(void 0, args, "export");
16464
+ const selection = _chunkWHKTRZ3Jjs.parseJsonFields.call(void 0, args, "export");
16455
16465
  args = selection.args;
16456
16466
  const usage2 = "Usage: deepline runs export <run-id> [--dataset result.rows] --out <path> [--format csv|json] [--wait] [--timeout-ms 300000] [--metadata-out export.json] [--json]";
16457
16467
  let runId;
@@ -16510,16 +16520,16 @@ async function handleRunExport(args) {
16510
16520
  "INVALID_ARGUMENT"
16511
16521
  );
16512
16522
  }
16513
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
16523
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
16514
16524
  let status = await client.getPlayStatus(runId, { full: true });
16515
16525
  if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
16516
- const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args));
16526
+ const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args));
16517
16527
  try {
16518
16528
  await waitForPlayCompletionByWatch({
16519
16529
  client,
16520
16530
  playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
16521
16531
  workflowId: runId,
16522
- jsonOutput: _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args),
16532
+ jsonOutput: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args),
16523
16533
  emitLogs: false,
16524
16534
  waitTimeoutMs,
16525
16535
  startedAt: Date.now(),
@@ -16542,26 +16552,26 @@ async function handleRunExport(args) {
16542
16552
  datasetPath,
16543
16553
  format
16544
16554
  });
16545
- const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _527 => _527.rowsInfo, 'access', _528 => _528.source]), () => ( datasetPath)), () => ( null));
16546
- const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _529 => _529.currentTable]) ? {
16555
+ const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _530 => _530.rowsInfo, 'access', _531 => _531.source]), () => ( datasetPath)), () => ( null));
16556
+ const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _532 => _532.currentTable]) ? {
16547
16557
  code: "CURRENT_SHARED_DATASET",
16548
16558
  message: "This export is the current shared dataset and may include writes from another run.",
16549
16559
  full_run_output_command: `deepline runs get ${status.runId} --full --json`
16550
16560
  } : null;
16551
16561
  const navigation = buildRunNavigation(status);
16552
- const resolved = _optionalChain([exportResult, 'optionalAccess', _530 => _530.datasetInfo]);
16562
+ const resolved = _optionalChain([exportResult, 'optionalAccess', _533 => _533.datasetInfo]);
16553
16563
  const identity = navigation.datasets.find(
16554
- (dataset) => _optionalChain([resolved, 'optionalAccess', _531 => _531.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _532 => _532.tableNamespace])
16564
+ (dataset) => _optionalChain([resolved, 'optionalAccess', _534 => _534.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _535 => _535.tableNamespace])
16555
16565
  );
16556
16566
  const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
16557
16567
  const exportCommand = runExportRetryCommand(
16558
16568
  status.runId,
16559
16569
  outPath,
16560
- _nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _533 => _533.datasetPath]))),
16570
+ _nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _536 => _536.datasetPath]))),
16561
16571
  { format }
16562
16572
  );
16563
- const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _534 => _534.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _535 => _535.path]), () => ( null)) };
16564
- const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _536 => _536.rowsInfo, 'access', _537 => _537.exportedRowOutcomes]);
16573
+ const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _537 => _537.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _538 => _538.path]), () => ( null)) };
16574
+ const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _539 => _539.rowsInfo, 'access', _540 => _540.exportedRowOutcomes]);
16565
16575
  const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
16566
16576
  count: exportedRowOutcomes.failed,
16567
16577
  message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
@@ -16581,17 +16591,17 @@ async function handleRunExport(args) {
16581
16591
  ...fileLocation,
16582
16592
  format,
16583
16593
  source,
16584
- rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _538 => _538.rowsInfo, 'access', _539 => _539.totalRows]), () => ( null)),
16594
+ rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _541 => _541.rowsInfo, 'access', _542 => _542.totalRows]), () => ( null)),
16585
16595
  ...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
16586
16596
  ...rowFailures ? { rowFailures } : {},
16587
- columns: underscoreKeysLast(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _540 => _540.rowsInfo, 'access', _541 => _541.columns]), () => ( []))),
16597
+ columns: underscoreKeysLast(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _543 => _543.rowsInfo, 'access', _544 => _544.columns]), () => ( []))),
16588
16598
  ...currentTableNotice ? { notice: currentTableNotice } : {},
16589
16599
  ...metadataOutPath ? { metadata_path: metadataOutPath } : {},
16590
16600
  ...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
16591
16601
  };
16592
16602
  const lines = withRunNavigationLines(
16593
16603
  [
16594
- `Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _542 => _542.path]), () => ( outPath))}`,
16604
+ `Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _545 => _545.path]), () => ( outPath))}`,
16595
16605
  ...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
16596
16606
  `Partial export: run is ${status.status}; more rows may be saved.`,
16597
16607
  `Export after completion: ${exportCommand} --wait`
@@ -16618,8 +16628,8 @@ async function handleRunExport(args) {
16618
16628
  "utf-8"
16619
16629
  );
16620
16630
  }
16621
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0, payload, {
16622
- json: _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args),
16631
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, payload, {
16632
+ json: _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args),
16623
16633
  fields: selection.fields,
16624
16634
  text: `${lines.join("\n")}
16625
16635
  `
@@ -16640,10 +16650,10 @@ async function handlePlayGet(args) {
16640
16650
  );
16641
16651
  return 2;
16642
16652
  }
16643
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
16653
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
16644
16654
  const explicitJson = args.includes("--json");
16645
16655
  const sourceOutput = args.includes("--source");
16646
- const jsonOutput = sourceOutput ? explicitJson : _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args);
16656
+ const jsonOutput = sourceOutput ? explicitJson : _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args);
16647
16657
  const requestedRevisionFlags = [
16648
16658
  args.includes("--working"),
16649
16659
  args.includes("--live"),
@@ -16693,7 +16703,7 @@ async function handlePlayGet(args) {
16693
16703
  ...includeSource ? { source: sourceSelector } : {}
16694
16704
  });
16695
16705
  const source = detail.source;
16696
- const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _543 => _543.files, 'access', _544 => _544[source.entryFile]]), () => ( ""));
16706
+ const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _546 => _546.files, 'access', _547 => _547[source.entryFile]]), () => ( ""));
16697
16707
  let materializedFile = null;
16698
16708
  try {
16699
16709
  materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
@@ -16703,7 +16713,7 @@ async function handlePlayGet(args) {
16703
16713
  }
16704
16714
  const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
16705
16715
  if (jsonOutput) {
16706
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, {
16716
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, {
16707
16717
  ...detail,
16708
16718
  ...materializedFile ? {
16709
16719
  message: loadedMessage,
@@ -16744,11 +16754,11 @@ async function handlePlayGet(args) {
16744
16754
  }
16745
16755
  console.log(`Play: ${formatPlayReference(detail.play)}`);
16746
16756
  console.log(
16747
- `Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _545 => _545.play, 'access', _546 => _546.workingRevision, 'optionalAccess', _547 => _547.version]), () => ( "\u2014"))}`
16757
+ `Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _548 => _548.play, 'access', _549 => _549.workingRevision, 'optionalAccess', _550 => _550.version]), () => ( "\u2014"))}`
16748
16758
  );
16749
- console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _548 => _548.play, 'access', _549 => _549.liveRevision, 'optionalAccess', _550 => _550.version]), () => ( "\u2014"))}`);
16759
+ console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _551 => _551.play, 'access', _552 => _552.liveRevision, 'optionalAccess', _553 => _553.version]), () => ( "\u2014"))}`);
16750
16760
  console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
16751
- if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _551 => _551.play, 'access', _552 => _552.liveRevision, 'optionalAccess', _553 => _553.version])) {
16761
+ if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _554 => _554.play, 'access', _555 => _555.liveRevision, 'optionalAccess', _556 => _556.version])) {
16752
16762
  console.log(
16753
16763
  ` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
16754
16764
  );
@@ -16760,7 +16770,7 @@ async function handlePlayGet(args) {
16760
16770
  console.log(line);
16761
16771
  }
16762
16772
  console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
16763
- console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _554 => _554.sheetSummary, 'optionalAccess', _555 => _555.stats, 'optionalAccess', _556 => _556.total]), () => ( 0))}`);
16773
+ console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _557 => _557.sheetSummary, 'optionalAccess', _558 => _558.stats, 'optionalAccess', _559 => _559.total]), () => ( 0))}`);
16764
16774
  if (detail.customerDbUrl) {
16765
16775
  console.log(`Customer DB: ${detail.customerDbUrl}`);
16766
16776
  }
@@ -16776,7 +16786,7 @@ async function handlePlayGet(args) {
16776
16786
  return 0;
16777
16787
  }
16778
16788
  function formatVersionLine(version) {
16779
- const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _557 => _557.artifactHash, 'optionalAccess', _558 => _558.slice, 'call', _559 => _559(0, 12)]), () => ( "unknown-revision"));
16789
+ const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _560 => _560.artifactHash, 'optionalAccess', _561 => _561.slice, 'call', _562 => _562(0, 12)]), () => ( "unknown-revision"));
16780
16790
  const state = [
16781
16791
  version.isLive ? "live" : null,
16782
16792
  version.isWorking ? "working" : null
@@ -16790,8 +16800,8 @@ async function handlePlayVersions(args) {
16790
16800
  console.error("Usage: deepline plays versions --name <name> [--json]");
16791
16801
  return 1;
16792
16802
  }
16793
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
16794
- const jsonOutput = _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args);
16803
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
16804
+ const jsonOutput = _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args);
16795
16805
  await assertCanonicalNamedPlayReference(client, playName, {
16796
16806
  command: "versions"
16797
16807
  });
@@ -16799,7 +16809,7 @@ async function handlePlayVersions(args) {
16799
16809
  parseReferencedPlayTarget3(playName).playName
16800
16810
  );
16801
16811
  if (jsonOutput) {
16802
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, { versions });
16812
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, { versions });
16803
16813
  return 0;
16804
16814
  }
16805
16815
  if (versions.length === 0) {
@@ -16831,11 +16841,11 @@ var PREBUILT_PLAY_TAG_KEYS = [
16831
16841
  "signals"
16832
16842
  ];
16833
16843
  async function handlePlayList(args) {
16834
- const jsonOutput = _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args);
16844
+ const jsonOutput = _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args);
16835
16845
  const showCost = args.includes("--show-cost");
16836
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
16846
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
16837
16847
  const categoriesIndex = args.indexOf("--categories");
16838
- const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _560 => _560[categoriesIndex + 1], 'optionalAccess', _561 => _561.trim, 'call', _562 => _562()]) : void 0;
16848
+ const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _563 => _563[categoriesIndex + 1], 'optionalAccess', _564 => _564.trim, 'call', _565 => _565()]) : void 0;
16839
16849
  const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
16840
16850
  if (args.includes("--tag") && tags.length === 0) {
16841
16851
  console.error(
@@ -16856,7 +16866,7 @@ async function handlePlayList(args) {
16856
16866
  const cursorIndex = args.indexOf("--cursor");
16857
16867
  const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
16858
16868
  const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
16859
- if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _563 => _563.trim, 'call', _564 => _564()])) {
16869
+ if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _566 => _566.trim, 'call', _567 => _567()])) {
16860
16870
  console.error("Pass a positive --limit and a non-empty --cursor.");
16861
16871
  return 2;
16862
16872
  }
@@ -16896,7 +16906,7 @@ async function handlePlayList(args) {
16896
16906
  if (play.inputSchema || play.hasInputSchema) {
16897
16907
  lines.push(" inputSchema: yes");
16898
16908
  }
16899
- if (_optionalChain([play, 'access', _565 => _565.triggerStatus, 'optionalAccess', _566 => _566.cron])) {
16909
+ if (_optionalChain([play, 'access', _568 => _568.triggerStatus, 'optionalAccess', _569 => _569.cron])) {
16900
16910
  lines.push(
16901
16911
  ` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
16902
16912
  );
@@ -16916,7 +16926,7 @@ async function handlePlayList(args) {
16916
16926
  } else {
16917
16927
  lines.push(" scheduled execution: not configured");
16918
16928
  }
16919
- if (_optionalChain([play, 'access', _567 => _567.triggerStatus, 'optionalAccess', _568 => _568.webhook])) {
16929
+ if (_optionalChain([play, 'access', _570 => _570.triggerStatus, 'optionalAccess', _571 => _571.webhook])) {
16920
16930
  lines.push(` webhook: ${play.triggerStatus.webhook}`);
16921
16931
  }
16922
16932
  if (showCost) {
@@ -16930,7 +16940,7 @@ async function handlePlayList(args) {
16930
16940
  lines.push("List truncated \u2014 more plays are available.");
16931
16941
  lines.push(`Next page: ${nextPage}`);
16932
16942
  }
16933
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
16943
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
16934
16944
  {
16935
16945
  plays,
16936
16946
  count: plays.length,
@@ -16947,8 +16957,8 @@ async function handlePlayList(args) {
16947
16957
  return 0;
16948
16958
  }
16949
16959
  async function handlePlayPin(args, pinned) {
16950
- const target = _optionalChain([args, 'access', _569 => _569.find, 'call', _570 => _570((arg) => !arg.startsWith("-")), 'optionalAccess', _571 => _571.trim, 'call', _572 => _572()]);
16951
- const jsonOutput = _chunkDNMV2L7Qjs.argsWantJson.call(void 0, args);
16960
+ const target = _optionalChain([args, 'access', _572 => _572.find, 'call', _573 => _573((arg) => !arg.startsWith("-")), 'optionalAccess', _574 => _574.trim, 'call', _575 => _575()]);
16961
+ const jsonOutput = _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args);
16952
16962
  const dryRun = args.includes("--dry-run");
16953
16963
  if (!target) {
16954
16964
  console.error(
@@ -16966,11 +16976,11 @@ async function handlePlayPin(args, pinned) {
16966
16976
  const name = parsedTarget.playName;
16967
16977
  const plan = { name, pinned, dryRun };
16968
16978
  if (dryRun) {
16969
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, plan);
16979
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, plan);
16970
16980
  return 0;
16971
16981
  }
16972
- const result = await new (0, _chunkITFUZEHEjs.DeeplineClient)().setPlayPinned(name, pinned);
16973
- if (jsonOutput) _chunkDNMV2L7Qjs.printCompactJson.call(void 0, result);
16982
+ const result = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().setPlayPinned(name, pinned);
16983
+ if (jsonOutput) _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, result);
16974
16984
  else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
16975
16985
  return 0;
16976
16986
  }
@@ -16986,7 +16996,7 @@ function csvColumnLines(csvInput) {
16986
16996
  const headers = [defaults[column]].flat().filter((header) => header && header !== column);
16987
16997
  return `${column}${required.has(column) ? " (required)" : ""}${headers.length > 0 ? `, default header: ${headers.join(" or ")}` : ""}`;
16988
16998
  }),
16989
- _chunkITFUZEHEjs.CSV_HEADER_MATCHING_NOTE
16999
+ _chunkYGFQ7YSMjs.CSV_HEADER_MATCHING_NOTE
16990
17000
  ];
16991
17001
  }
16992
17002
  function describedPlay(play) {
@@ -17054,7 +17064,7 @@ function printPlayDescription(play) {
17054
17064
  console.log(` ${line}`);
17055
17065
  }
17056
17066
  }
17057
- if (_optionalChain([play, 'access', _573 => _573.toolCategories, 'optionalAccess', _574 => _574.length])) {
17067
+ if (_optionalChain([play, 'access', _576 => _576.toolCategories, 'optionalAccess', _577 => _577.length])) {
17058
17068
  console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
17059
17069
  }
17060
17070
  if (play.aliases.length > 0) {
@@ -17099,7 +17109,7 @@ function printPlayDescription(play) {
17099
17109
  const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
17100
17110
  if (runtimeLimit) {
17101
17111
  console.log(
17102
- ` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _575 => _575.runtimeLimit, 'optionalAccess', _576 => _576.source]), () => ( "live"))})`
17112
+ ` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _578 => _578.runtimeLimit, 'optionalAccess', _579 => _579.source]), () => ( "live"))})`
17103
17113
  );
17104
17114
  }
17105
17115
  printScheduledPlayCapacity(play.activeScheduledPlays);
@@ -17125,17 +17135,17 @@ function formatPlayGrepMatches(matches) {
17125
17135
  return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
17126
17136
  }
17127
17137
  async function handlePlayGrep(args) {
17128
- const query = _optionalChain([args, 'access', _577 => _577[0], 'optionalAccess', _578 => _578.trim, 'call', _579 => _579()]);
17138
+ const query = _optionalChain([args, 'access', _580 => _580[0], 'optionalAccess', _581 => _581.trim, 'call', _582 => _582()]);
17129
17139
  if (!query) {
17130
17140
  console.error("Usage: deepline plays grep <query> [--json]");
17131
17141
  return 1;
17132
17142
  }
17133
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
17143
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
17134
17144
  const results = (await client.listPlays({ grep: query })).map(
17135
17145
  summarizePlayGrepResult
17136
17146
  );
17137
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
17138
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, {
17147
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
17148
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, {
17139
17149
  plays: results,
17140
17150
  count: results.length,
17141
17151
  query,
@@ -17149,7 +17159,7 @@ async function handlePlayGrep(args) {
17149
17159
  `
17150
17160
  );
17151
17161
  for (const result of results) {
17152
- console.log(_optionalChain([result, 'access', _580 => _580.displayName, 'optionalAccess', _581 => _581.trim, 'call', _582 => _582()]) || result.name);
17162
+ console.log(_optionalChain([result, 'access', _583 => _583.displayName, 'optionalAccess', _584 => _584.trim, 'call', _585 => _585()]) || result.name);
17153
17163
  const matches = formatPlayGrepMatches(result.matches);
17154
17164
  if (matches) console.log(` Matched: ${matches}`);
17155
17165
  console.log(` Describe: ${result.describe}`);
@@ -17158,7 +17168,7 @@ async function handlePlayGrep(args) {
17158
17168
  return 0;
17159
17169
  }
17160
17170
  async function handlePlayDescribe(args) {
17161
- const selection = _chunkDNMV2L7Qjs.parseJsonFields.call(void 0, args, "describe");
17171
+ const selection = _chunkWHKTRZ3Jjs.parseJsonFields.call(void 0, args, "describe");
17162
17172
  args = selection.args;
17163
17173
  const playName = args[0];
17164
17174
  if (!playName) {
@@ -17192,8 +17202,8 @@ async function handlePlayDescribe(args) {
17192
17202
  `deepline plays check ${playName}`,
17193
17203
  ...definedName ? [`deepline describe <workspace>/${definedName}`] : []
17194
17204
  ];
17195
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
17196
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, {
17205
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
17206
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, {
17197
17207
  ok: false,
17198
17208
  error: { message },
17199
17209
  next
@@ -17207,7 +17217,7 @@ async function handlePlayDescribe(args) {
17207
17217
  }
17208
17218
  return 2;
17209
17219
  }
17210
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
17220
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
17211
17221
  await assertCanonicalNamedPlayReference(client, playName, {
17212
17222
  command: "describe"
17213
17223
  });
@@ -17217,9 +17227,9 @@ async function handlePlayDescribe(args) {
17217
17227
  compact: args.includes("--compact")
17218
17228
  }
17219
17229
  );
17220
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
17221
- if (selection.fields) _chunkDNMV2L7Qjs.printJson.call(void 0, play, selection.fields);
17222
- else _chunkDNMV2L7Qjs.printCompactJson.call(void 0, play);
17230
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
17231
+ if (selection.fields) _chunkWHKTRZ3Jjs.printJson.call(void 0, play, selection.fields);
17232
+ else _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, play);
17223
17233
  return 0;
17224
17234
  }
17225
17235
  printPlayDescription(play);
@@ -17263,7 +17273,7 @@ async function handlePlaySave(args) {
17263
17273
  next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
17264
17274
  };
17265
17275
  if (options.jsonOutput) {
17266
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, result);
17276
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, result);
17267
17277
  } else {
17268
17278
  console.error(result.message);
17269
17279
  console.error(` checked artifact: ${result.expectedArtifactHash}`);
@@ -17285,7 +17295,7 @@ async function handlePlaySave(args) {
17285
17295
  };
17286
17296
  if (options.dryRun) {
17287
17297
  if (options.jsonOutput) {
17288
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, dryRun);
17298
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, dryRun);
17289
17299
  } else {
17290
17300
  console.log(`Dry run: ${playName}`);
17291
17301
  console.log(` source: ${dryRun.sourceHash}`);
@@ -17294,7 +17304,7 @@ async function handlePlaySave(args) {
17294
17304
  }
17295
17305
  return 0;
17296
17306
  }
17297
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
17307
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
17298
17308
  try {
17299
17309
  await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
17300
17310
  "cli.play_save_compile_manifests",
@@ -17330,7 +17340,7 @@ async function handlePlaySave(args) {
17330
17340
  }
17331
17341
  };
17332
17342
  if (options.jsonOutput) {
17333
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, result);
17343
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, result);
17334
17344
  } else {
17335
17345
  console.log(
17336
17346
  `\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
@@ -17356,7 +17366,7 @@ async function handlePlayPublish(args) {
17356
17366
  }
17357
17367
  const { target: playName, useLatest } = options;
17358
17368
  let revisionId = options.revisionId;
17359
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
17369
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
17360
17370
  if (isFileTarget2(playName)) {
17361
17371
  if (revisionId || useLatest) {
17362
17372
  console.error(
@@ -17388,7 +17398,7 @@ async function handlePlayPublish(args) {
17388
17398
  next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
17389
17399
  };
17390
17400
  if (options.jsonOutput) {
17391
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, result3);
17401
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, result3);
17392
17402
  } else {
17393
17403
  console.error(result3.message);
17394
17404
  console.error(` checked artifact: ${result3.expectedArtifactHash}`);
@@ -17411,7 +17421,7 @@ async function handlePlayPublish(args) {
17411
17421
  };
17412
17422
  if (options.dryRun) {
17413
17423
  if (options.jsonOutput) {
17414
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, dryRun);
17424
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, dryRun);
17415
17425
  } else {
17416
17426
  console.log(`Dry run: ${rootPlayName}`);
17417
17427
  console.log(` source: ${dryRun.sourceHash}`);
@@ -17469,17 +17479,17 @@ async function handlePlayPublish(args) {
17469
17479
  artifactHash,
17470
17480
  liveVersion: _nullishCoalesce(published.version, () => ( null)),
17471
17481
  revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
17472
- previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _583 => _583.version]), () => ( null)),
17473
- previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _584 => _584.artifactHash]), () => ( null)),
17482
+ previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _586 => _586.version]), () => ( null)),
17483
+ previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _587 => _587.artifactHash]), () => ( null)),
17474
17484
  sourceBytes: {
17475
- before: _optionalChain([previousLive, 'optionalAccess', _585 => _585.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
17485
+ before: _optionalChain([previousLive, 'optionalAccess', _588 => _588.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
17476
17486
  after: Buffer.byteLength(graph.root.sourceCode, "utf8")
17477
17487
  },
17478
17488
  triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
17479
17489
  triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
17480
17490
  };
17481
17491
  if (options.jsonOutput) {
17482
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, result2);
17492
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, result2);
17483
17493
  } else {
17484
17494
  printPublishReceipt({
17485
17495
  name: rootPlayName,
@@ -17510,14 +17520,14 @@ async function handlePlayPublish(args) {
17510
17520
  revisionId: _nullishCoalesce(revisionId, () => ( null)),
17511
17521
  latest: useLatest
17512
17522
  };
17513
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, result2);
17523
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, result2);
17514
17524
  return 0;
17515
17525
  }
17516
17526
  const resolvedName = parseReferencedPlayTarget3(playName).playName;
17517
17527
  if (useLatest) {
17518
17528
  const versions = await client.listPlayVersions(resolvedName);
17519
17529
  const latest = versions[0];
17520
- if (!_optionalChain([latest, 'optionalAccess', _586 => _586._id])) {
17530
+ if (!_optionalChain([latest, 'optionalAccess', _589 => _589._id])) {
17521
17531
  console.error(`No saved revisions found for ${resolvedName}.`);
17522
17532
  return 1;
17523
17533
  }
@@ -17534,7 +17544,7 @@ async function handlePlayPublish(args) {
17534
17544
  revisionId ? { revisionId } : {}
17535
17545
  );
17536
17546
  if (options.jsonOutput) {
17537
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, result);
17547
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, result);
17538
17548
  } else {
17539
17549
  printPublishReceipt({
17540
17550
  name: result.name,
@@ -17574,7 +17584,7 @@ async function handlePlayDelete(args) {
17574
17584
  );
17575
17585
  return 2;
17576
17586
  }
17577
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
17587
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
17578
17588
  let detail;
17579
17589
  try {
17580
17590
  detail = await client.getPlay(parseReferencedPlayTarget3(playName).playName);
@@ -17598,8 +17608,8 @@ async function handlePlayDelete(args) {
17598
17608
  name: resolvedName,
17599
17609
  plannedMutation: "move saved org-owned play to Trash and stop triggers"
17600
17610
  };
17601
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
17602
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, result2);
17611
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
17612
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, result2);
17603
17613
  } else {
17604
17614
  process.stdout.write(
17605
17615
  `Dry run: would move ${result2.name} to Trash and stop its active triggers.
@@ -17609,8 +17619,8 @@ async function handlePlayDelete(args) {
17609
17619
  return 0;
17610
17620
  }
17611
17621
  const result = await client.deletePlay(resolvedName);
17612
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
17613
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, result);
17622
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
17623
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, result);
17614
17624
  return result.archived || result.alreadyArchived ? 0 : 4;
17615
17625
  }
17616
17626
  if (result.alreadyArchived) {
@@ -17649,13 +17659,13 @@ async function handlePlayRestore(args) {
17649
17659
  );
17650
17660
  return 2;
17651
17661
  }
17652
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
17662
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
17653
17663
  try {
17654
17664
  const result = await client.restorePlay(
17655
17665
  parseReferencedPlayTarget3(playName).playName
17656
17666
  );
17657
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
17658
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, result);
17667
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
17668
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, result);
17659
17669
  return result.restored || result.alreadyActive ? 0 : 4;
17660
17670
  }
17661
17671
  if (result.alreadyActive) {
@@ -17762,7 +17772,7 @@ Examples:
17762
17772
  ).action(async (target, options) => {
17763
17773
  process.exitCode = await handlePlayCheck([
17764
17774
  target,
17765
- ..._chunkDNMV2L7Qjs.jsonFieldArgs.call(void 0, options.json),
17775
+ ..._chunkWHKTRZ3Jjs.jsonFieldArgs.call(void 0, options.json),
17766
17776
  ...options.full ? ["--full"] : []
17767
17777
  ]);
17768
17778
  });
@@ -17991,9 +18001,9 @@ Examples:
17991
18001
  const limit = Number(options.historyLimit);
17992
18002
  if (!Number.isInteger(limit) || limit < 1 || limit > 30)
17993
18003
  throw new Error("--history-limit must be an integer from 1 to 30.");
17994
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
18004
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
17995
18005
  if (options.binding) {
17996
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0,
18006
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0,
17997
18007
  await client.getPlayTriggerHistory(options.binding, { limit })
17998
18008
  );
17999
18009
  return;
@@ -18001,7 +18011,7 @@ Examples:
18001
18011
  const result = await client.listPlayTriggerInventory({
18002
18012
  cursor: options.cursor
18003
18013
  });
18004
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, {
18014
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, {
18005
18015
  ...result,
18006
18016
  next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)} --json`
18007
18017
  });
@@ -18048,7 +18058,7 @@ Examples:
18048
18058
  if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
18049
18059
  throw new Error("--group-by must be kind or trigger_source.");
18050
18060
  }
18051
- const result = await new (0, _chunkITFUZEHEjs.DeeplineClient)().getPlaysActivity({
18061
+ const result = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().getPlaysActivity({
18052
18062
  timeZone: options.timeZone,
18053
18063
  days,
18054
18064
  ...options.endDate ? { endDate: options.endDate } : {},
@@ -18062,7 +18072,7 @@ Examples:
18062
18072
  `${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
18063
18073
  );
18064
18074
  }
18065
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
18075
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
18066
18076
  { ...result },
18067
18077
  {
18068
18078
  json: options.json || !process.stdout.isTTY,
@@ -18091,7 +18101,7 @@ Examples:
18091
18101
  false
18092
18102
  );
18093
18103
  });
18094
- _chunkUDIPEHNJjs.registerDeprecatedSearchCommand.call(void 0,
18104
+ _chunk46IVSO6Ojs.registerDeprecatedSearchCommand.call(void 0,
18095
18105
  play,
18096
18106
  (options) => options.all ? ["plays"] : ["prebuilts"]
18097
18107
  );
@@ -18135,7 +18145,7 @@ Examples:
18135
18145
  );
18136
18146
  _chunkAFNEQ43Jjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
18137
18147
  async (target, options) => {
18138
- const ownView = () => handlePlayDescribe(_chunkDNMV2L7Qjs.describeArgs.call(void 0, target, options));
18148
+ const ownView = () => handlePlayDescribe(_chunkWHKTRZ3Jjs.describeArgs.call(void 0, target, options));
18139
18149
  const [flagText] = [options.json].filter(
18140
18150
  (value) => typeof value === "string"
18141
18151
  );
@@ -18146,7 +18156,7 @@ Examples:
18146
18156
  process.exitCode = await ownView();
18147
18157
  return;
18148
18158
  }
18149
- const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-CFUZZ326.js")));
18159
+ const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-F4G5H3SC.js")));
18150
18160
  process.exitCode = await describeAnything(
18151
18161
  name,
18152
18162
  {
@@ -18263,7 +18273,7 @@ Examples:
18263
18273
  deepline plays deployments <deployment-id>
18264
18274
  `
18265
18275
  ).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(
18266
- async (id, options) => id ? _chunk7DDNACAQjs.handleDeploymentGet.call(void 0, id, options) : _chunk7DDNACAQjs.handleDeploymentsList.call(void 0, options)
18276
+ async (id, options) => id ? _chunk7FWHOKNSjs.handleDeploymentGet.call(void 0, id, options) : _chunk7FWHOKNSjs.handleDeploymentsList.call(void 0, options)
18267
18277
  );
18268
18278
  addPublishHelp(
18269
18279
  play.command("publish <target>").description(
@@ -18443,7 +18453,7 @@ Examples:
18443
18453
  ).action(async (runId, options) => {
18444
18454
  process.exitCode = await handleRunGet([
18445
18455
  runId,
18446
- ..._chunkDNMV2L7Qjs.jsonFieldArgs.call(void 0, options.json),
18456
+ ..._chunkWHKTRZ3Jjs.jsonFieldArgs.call(void 0, options.json),
18447
18457
  ...options.full ? ["--full"] : [],
18448
18458
  ...options.input ? ["--input"] : [],
18449
18459
  ...options.config ? ["--config"] : [],
@@ -18478,12 +18488,7 @@ Examples:
18478
18488
  "--input-overrides <json>",
18479
18489
  "Override existing scalar fields in the retained input for this rerun"
18480
18490
  ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (runId, options) => {
18481
- process.exitCode = await handleRunsRerun([
18482
- runId,
18483
- ...options.idempotencyKey ? ["--idempotency-key", options.idempotencyKey] : [],
18484
- ...options.inputOverrides ? ["--input-overrides", options.inputOverrides] : [],
18485
- ...options.json ? ["--json"] : []
18486
- ]);
18491
+ process.exitCode = await runRunsRerunCommand(runId, options);
18487
18492
  });
18488
18493
  runs.command("list").description("List play runs.").addHelpText(
18489
18494
  "after",
@@ -18494,6 +18499,9 @@ Notes:
18494
18499
  Use the exact qualified Play reference, such as workspace/my-play or prebuilt/my-play.
18495
18500
  --offset requires --play; narrow status-only lists with a Play reference to paginate.
18496
18501
  Common statuses include running, completed, failed, and stopped.
18502
+ JSON runs[].id is the public ID accepted by runs get, watch, export, and stop.
18503
+ runId and workflowId are compatibility aliases; temporalRunId is not the public ID.
18504
+ Use the ID returned by plays run for your execution, not the latest inventory entry.
18497
18505
 
18498
18506
  Examples:
18499
18507
  deepline runs list --play my-play
@@ -18718,7 +18726,7 @@ Examples:
18718
18726
  ...options.metadataOut ? ["--metadata-out", options.metadataOut] : [],
18719
18727
  ...options.wait ? ["--wait"] : [],
18720
18728
  ...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
18721
- ..._chunkDNMV2L7Qjs.jsonFieldArgs.call(void 0, options.json)
18729
+ ..._chunkWHKTRZ3Jjs.jsonFieldArgs.call(void 0, options.json)
18722
18730
  ]);
18723
18731
  });
18724
18732
  const share = play.command("share").description(
@@ -18859,8 +18867,8 @@ function absolutePublicPlayUrl(path) {
18859
18867
  }
18860
18868
  function shareUrlFields(status) {
18861
18869
  return {
18862
- publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _587 => _587.share, 'optionalAccess', _588 => _588.publicPath])),
18863
- canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _589 => _589.share, 'optionalAccess', _590 => _590.canonicalPath]))
18870
+ publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _590 => _590.share, 'optionalAccess', _591 => _591.publicPath])),
18871
+ canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _592 => _592.share, 'optionalAccess', _593 => _593.canonicalPath]))
18864
18872
  };
18865
18873
  }
18866
18874
  function shareStatusForOutput(status) {
@@ -18884,10 +18892,10 @@ async function handlePlayShareStatus(args) {
18884
18892
  return 2;
18885
18893
  }
18886
18894
  const name = parseReferencedPlayTarget3(target).playName;
18887
- const status = await new (0, _chunkITFUZEHEjs.DeeplineClient)().getSharePage(name);
18895
+ const status = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().getSharePage(name);
18888
18896
  const outputStatus = shareStatusForOutput(status);
18889
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
18890
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, outputStatus);
18897
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
18898
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, outputStatus);
18891
18899
  return 0;
18892
18900
  }
18893
18901
  if (!outputStatus.share) {
@@ -18926,7 +18934,7 @@ async function handlePlaySharePublish(args) {
18926
18934
  return 2;
18927
18935
  }
18928
18936
  const name = parseReferencedPlayTarget3(target).playName;
18929
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
18937
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
18930
18938
  let revisionId = shareFlagValue(args, "--revision-id");
18931
18939
  let resolvedVersion;
18932
18940
  if (!revisionId) {
@@ -18957,8 +18965,8 @@ async function handlePlaySharePublish(args) {
18957
18965
  );
18958
18966
  if (!hasCompleted) {
18959
18967
  const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
18960
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
18961
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, {
18968
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
18969
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, {
18962
18970
  ok: false,
18963
18971
  code: "NO_SUCCESSFUL_RUN",
18964
18972
  message,
@@ -18982,8 +18990,8 @@ async function handlePlaySharePublish(args) {
18982
18990
  };
18983
18991
  if (args.includes("--dry-run")) {
18984
18992
  const plan = { dryRun: true, name, version: resolvedVersion, ...request };
18985
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
18986
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, plan);
18993
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
18994
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, plan);
18987
18995
  } else {
18988
18996
  console.log(
18989
18997
  `Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
@@ -18993,13 +19001,13 @@ async function handlePlaySharePublish(args) {
18993
19001
  }
18994
19002
  const status = await client.publishSharePage(name, request);
18995
19003
  const outputStatus = shareStatusForOutput(status);
18996
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
18997
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, outputStatus);
19004
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
19005
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, outputStatus);
18998
19006
  return 0;
18999
19007
  }
19000
19008
  const urls = shareUrlFields(outputStatus);
19001
19009
  console.log(
19002
- `Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _591 => _591.share, 'optionalAccess', _592 => _592.publicPath]))), () => ( ""))}`
19010
+ `Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _594 => _594.share, 'optionalAccess', _595 => _595.publicPath]))), () => ( ""))}`
19003
19011
  );
19004
19012
  if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
19005
19013
  console.log(`Version URL: ${urls.canonicalUrl}`);
@@ -19025,9 +19033,9 @@ async function handlePlayShareUpdate(args) {
19025
19033
  ...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
19026
19034
  ...seoIndexing ? { seoIndexing } : {}
19027
19035
  };
19028
- const status = await new (0, _chunkITFUZEHEjs.DeeplineClient)().updateSharePage(name, request);
19029
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
19030
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, status);
19036
+ const status = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().updateSharePage(name, request);
19037
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
19038
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, status);
19031
19039
  return 0;
19032
19040
  }
19033
19041
  console.log(`Updated ${name} share settings.`);
@@ -19042,13 +19050,13 @@ async function handlePlayShareRegenerate(args) {
19042
19050
  return 2;
19043
19051
  }
19044
19052
  const name = parseReferencedPlayTarget3(target).playName;
19045
- const client = new (0, _chunkITFUZEHEjs.DeeplineClient)();
19053
+ const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
19046
19054
  let revisionId = shareFlagValue(args, "--revision-id");
19047
19055
  const versionFlag = shareFlagValue(args, "--version");
19048
19056
  if (!revisionId && versionFlag) {
19049
19057
  const versions = await client.listPlayVersions(name);
19050
19058
  const chosen = versions.find((r) => r.version === Number(versionFlag));
19051
- if (!_optionalChain([chosen, 'optionalAccess', _593 => _593._id])) {
19059
+ if (!_optionalChain([chosen, 'optionalAccess', _596 => _596._id])) {
19052
19060
  console.error(`Version ${versionFlag} not found for ${name}.`);
19053
19061
  return 4;
19054
19062
  }
@@ -19059,12 +19067,12 @@ async function handlePlayShareRegenerate(args) {
19059
19067
  revisionId ? { revisionId } : {}
19060
19068
  );
19061
19069
  const outputStatus = shareStatusForOutput(status);
19062
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
19063
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, outputStatus);
19070
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
19071
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, outputStatus);
19064
19072
  return 0;
19065
19073
  }
19066
19074
  const urls = shareUrlFields(outputStatus);
19067
- const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _594 => _594.share, 'optionalAccess', _595 => _595.publishedRevisionId]) === revisionId;
19075
+ const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _597 => _597.share, 'optionalAccess', _598 => _598.publishedRevisionId]) === revisionId;
19068
19076
  console.log(
19069
19077
  `Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
19070
19078
  );
@@ -19085,9 +19093,9 @@ async function handlePlayShareUnpublish(args) {
19085
19093
  return 2;
19086
19094
  }
19087
19095
  const name = parseReferencedPlayTarget3(target).playName;
19088
- const status = await new (0, _chunkITFUZEHEjs.DeeplineClient)().unpublishSharePage(name);
19089
- if (_chunkDNMV2L7Qjs.argsWantJson.call(void 0, args)) {
19090
- _chunkDNMV2L7Qjs.printCompactJson.call(void 0, status);
19096
+ const status = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().unpublishSharePage(name);
19097
+ if (_chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args)) {
19098
+ _chunkWHKTRZ3Jjs.printCompactJson.call(void 0, status);
19091
19099
  return 0;
19092
19100
  }
19093
19101
  console.log(`Unpublished ${name}; the public page has been removed.`);