deepline 0.3.329 → 0.3.331

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 (96) 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/release.ts +1 -1
  4. package/dist/bundling-sources/shared_libs/security/safe-outbound-fetch.ts +10 -1
  5. package/dist/cli/{auth-MFFVOITR.mjs → auth-TVTO43JD.mjs} +4 -4
  6. package/dist/cli/auth-YYTF3NO4.js +31 -0
  7. package/dist/cli/{billing-LRBHWLIQ.mjs → billing-FBZ5CCU7.mjs} +36 -14
  8. package/dist/cli/{billing-V4Y4OVQ7.js → billing-Y4EX5FFA.js} +101 -79
  9. package/dist/cli/{chunk-VDIHLKGG.js → chunk-3AQ3L2NX.js} +4 -4
  10. package/dist/cli/{chunk-HVPRQGF4.mjs → chunk-4JYLNJMD.mjs} +1 -1
  11. package/dist/cli/{chunk-SJV5MTOJ.mjs → chunk-BXZN544J.mjs} +1 -1
  12. package/dist/cli/{chunk-MFQQINUY.mjs → chunk-CKAZY2JT.mjs} +2 -2
  13. package/dist/cli/{chunk-EROOAI5G.mjs → chunk-DU72PAVF.mjs} +1 -1
  14. package/dist/cli/{chunk-3RZJ3GEG.mjs → chunk-EGRTGSNS.mjs} +3 -3
  15. package/dist/cli/{chunk-XRYKLK56.js → chunk-ELDOV5XG.js} +45 -45
  16. package/dist/cli/{chunk-7T6DX5RK.mjs → chunk-HG5NWSN2.mjs} +62 -61
  17. package/dist/cli/{chunk-J2E5R2VH.js → chunk-KGZPY524.js} +60 -60
  18. package/dist/cli/{chunk-OUTIWGKY.js → chunk-KXWOO3GI.js} +26 -26
  19. package/dist/cli/{chunk-4FLEXYUC.js → chunk-L4CJXV7D.js} +8 -8
  20. package/dist/cli/{chunk-AD23W4S5.js → chunk-LFV2A7GB.js} +1 -1
  21. package/dist/cli/{chunk-U4CTHVN7.js → chunk-MDQOGPQY.js} +533 -532
  22. package/dist/cli/{chunk-75ZOTF3K.js → chunk-NHR3O4OV.js} +15 -15
  23. package/dist/cli/{chunk-MO2XSC5I.mjs → chunk-O52SKQQT.mjs} +4 -4
  24. package/dist/cli/{chunk-HI7TAWFS.mjs → chunk-PS5BFY2W.mjs} +5 -5
  25. package/dist/cli/{chunk-OZGU7P2S.mjs → chunk-QEI6SNAT.mjs} +38 -22
  26. package/dist/cli/{chunk-GCNER3HV.mjs → chunk-RI57LHLC.mjs} +1 -1
  27. package/dist/cli/{chunk-YNSCELIJ.mjs → chunk-RRJ6AA5L.mjs} +2 -2
  28. package/dist/cli/{chunk-ZXGUYTIT.js → chunk-RX2WWVZ7.js} +6 -6
  29. package/dist/cli/{chunk-VLDLJZ75.js → chunk-T7E5KIPE.js} +48 -48
  30. package/dist/cli/{chunk-FK7PW6BP.mjs → chunk-VEP3POWB.mjs} +1 -1
  31. package/dist/cli/{chunk-U2N4CYT7.js → chunk-XZG75ELG.js} +6 -6
  32. package/dist/cli/{chunk-KHZQFFOQ.js → chunk-YCYWPBRV.js} +2 -2
  33. package/dist/cli/{chunk-ERU2OR6F.mjs → chunk-YIYK57LW.mjs} +2 -2
  34. package/dist/cli/{chunk-GY2EEO2Y.js → chunk-ZGWURYZK.js} +51 -35
  35. package/dist/cli/client-46KHPTTQ.js +20 -0
  36. package/dist/cli/{client-BNLD775D.mjs → client-Q7J5R5PT.mjs} +3 -3
  37. package/dist/cli/{csv-7MVQECWG.mjs → csv-RVG3V4YX.mjs} +3 -3
  38. package/dist/cli/{csv-ZT6ZRQ3Z.js → csv-WBEF4KIZ.js} +12 -12
  39. package/dist/cli/{db-C4BMZXJK.js → db-4SPPGSEV.js} +29 -29
  40. package/dist/cli/{db-ABLWLMX5.mjs → db-AVIQ5WHJ.mjs} +4 -4
  41. package/dist/cli/{describe-XWOWAR32.mjs → describe-4UA6N4YX.mjs} +8 -8
  42. package/dist/cli/{describe-YALVN4WH.js → describe-IQ3FOLGV.js} +15 -15
  43. package/dist/cli/{executions-U4TNRP26.js → executions-3ZUK3YJB.js} +6 -6
  44. package/dist/cli/{executions-7IZVKQ3O.mjs → executions-VCULCPYR.mjs} +4 -4
  45. package/dist/cli/{feedback-NWMRT5W4.js → feedback-7YKDOMWW.js} +6 -6
  46. package/dist/cli/{feedback-GO5XPEKY.mjs → feedback-SZLTZXWC.mjs} +3 -3
  47. package/dist/cli/git-DCZP3E3P.js +23 -0
  48. package/dist/cli/{git-R53WS4WA.mjs → git-H4YS7TQW.mjs} +4 -4
  49. package/dist/cli/index.js +79 -79
  50. package/dist/cli/index.mjs +31 -31
  51. package/dist/cli/{legacy-noops-NJWM53DE.js → legacy-noops-GU7X3U2Y.js} +7 -7
  52. package/dist/cli/{legacy-noops-6QAZW7WJ.mjs → legacy-noops-K6U4YL3K.mjs} +4 -4
  53. package/dist/cli/{monitors-2N4BRU5M.mjs → monitors-2HHSSSDD.mjs} +4 -4
  54. package/dist/cli/{monitors-2I2MYAPS.js → monitors-IUEWN2VX.js} +85 -85
  55. package/dist/cli/{org-D3RHK2Q7.mjs → org-6NBBO7G3.mjs} +4 -4
  56. package/dist/cli/{org-XVNAE2JV.js → org-E5TYEFPX.js} +60 -60
  57. package/dist/cli/{play-L7MYJZ65.mjs → play-C2BQ4MJG.mjs} +7 -7
  58. package/dist/cli/play-MPDZPEYN.js +153 -0
  59. package/dist/cli/{providers-5BTDAZHN.js → providers-FM6LWHA4.js} +7 -7
  60. package/dist/cli/{providers-YM4E7WZD.mjs → providers-N2LG7Y3E.mjs} +4 -4
  61. package/dist/cli/{quickstart-ARPLJOLH.mjs → quickstart-GQQ6ODNU.mjs} +3 -3
  62. package/dist/cli/{quickstart-5A3FHAH3.js → quickstart-I4K6ZDU6.js} +5 -5
  63. package/dist/cli/search-6G6FUVTJ.js +26 -0
  64. package/dist/cli/{search-KKJEVV27.mjs → search-NKDQSOQ5.mjs} +5 -5
  65. package/dist/cli/{secrets-DVPVCSZD.js → secrets-BBI5NYLT.js} +13 -13
  66. package/dist/cli/{secrets-DGRJ4DO5.mjs → secrets-FGKGASDL.mjs} +4 -4
  67. package/dist/cli/{sessions-56EHXLZD.mjs → sessions-7MWWKIUT.mjs} +4 -4
  68. package/dist/cli/{sessions-VG4ATQ5Y.js → sessions-YUTDWUVR.js} +5 -5
  69. package/dist/cli/{settings-4U5XG7QI.mjs → settings-JGJWBESE.mjs} +7 -7
  70. package/dist/cli/{settings-BLOTIW2G.js → settings-U55P74SS.js} +74 -74
  71. package/dist/cli/{setup-RHJAHPOR.mjs → setup-7D577YQO.mjs} +6 -6
  72. package/dist/cli/{setup-L7AMAXCH.js → setup-XYIDQ46U.js} +41 -41
  73. package/dist/cli/skills-PXHET5MG.js +28 -0
  74. package/dist/cli/{skills-VU55YFCI.mjs → skills-Y6WBNBPF.mjs} +4 -4
  75. package/dist/cli/tools-BCSXPN5X.js +40 -0
  76. package/dist/cli/{tools-JS3YIDOH.mjs → tools-OPTIBRZP.mjs} +6 -6
  77. package/dist/cli/update-2NXG3NKT.js +28 -0
  78. package/dist/cli/{update-EHI5QUXM.mjs → update-HKJQ762M.mjs} +6 -6
  79. package/dist/cli/{workflow-BITLTLRF.mjs → workflow-2ZOG35IA.mjs} +5 -5
  80. package/dist/cli/{workflow-NE4SYRAT.js → workflow-EBIKBXXC.js} +15 -15
  81. package/dist/index.js +6 -6
  82. package/dist/index.mjs +3 -3
  83. package/dist/install-integrity.json +75 -74
  84. package/dist/release.d.mts +1 -1
  85. package/dist/release.d.ts +1 -1
  86. package/dist/release.js +2 -2
  87. package/dist/release.mjs +1 -1
  88. package/package.json +1 -1
  89. package/dist/cli/auth-W2MQM6GQ.js +0 -31
  90. package/dist/cli/client-5AIFBLKQ.js +0 -20
  91. package/dist/cli/git-YWRLAOBY.js +0 -23
  92. package/dist/cli/play-OYRHI7G3.js +0 -153
  93. package/dist/cli/search-VE3O3ZEM.js +0 -26
  94. package/dist/cli/skills-QB4OQGGP.js +0 -28
  95. package/dist/cli/tools-2CPFYNK7.js +0 -40
  96. package/dist/cli/update-WXP24GU5.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 _chunk4FLEXYUCjs = require('./chunk-4FLEXYUC.js');
13
+ var _chunkL4CJXV7Djs = require('./chunk-L4CJXV7D.js');
14
14
 
15
15
 
16
16
 
17
- var _chunkOUTIWGKYjs = require('./chunk-OUTIWGKY.js');
17
+ var _chunkKXWOO3GIjs = require('./chunk-KXWOO3GI.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 _chunkGY2EEO2Yjs = require('./chunk-GY2EEO2Y.js');
42
+ var _chunkZGWURYZKjs = require('./chunk-ZGWURYZK.js');
43
43
 
44
44
 
45
45
 
@@ -71,10 +71,11 @@ var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
71
71
 
72
72
 
73
73
 
74
- var _chunkU2N4CYT7js = require('./chunk-U2N4CYT7.js');
75
74
 
75
+ var _chunkXZG75ELGjs = require('./chunk-XZG75ELG.js');
76
76
 
77
- var _chunkVDIHLKGGjs = require('./chunk-VDIHLKGG.js');
77
+
78
+ var _chunk3AQ3L2NXjs = require('./chunk-3AQ3L2NX.js');
78
79
 
79
80
 
80
81
 
@@ -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
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
2070
+ _chunkXZG75ELGjs.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
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
2114
+ _chunkXZG75ELGjs.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, _chunkGY2EEO2Yjs.DeeplineClient)().getPlaySettings(options.play),
2139
+ await new (0, _chunkZGWURYZKjs.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
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
2170
+ _chunkXZG75ELGjs.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, _chunkGY2EEO2Yjs.DeeplineClient)().updatePlaySettings(play, patch),
2191
+ await new (0, _chunkZGWURYZKjs.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, _chunkGY2EEO2Yjs.DeeplineClient)().listPlaySettingsPaths({
2217
+ const page = await new (0, _chunkZGWURYZKjs.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
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
2223
+ _chunkXZG75ELGjs.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, _chunkGY2EEO2Yjs.DeeplineClient)();
2274
+ const client = new (0, _chunkZGWURYZKjs.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
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
2336
+ _chunkXZG75ELGjs.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
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
2464
+ _chunkXZG75ELGjs.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
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
2477
+ _chunkXZG75ELGjs.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
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
2507
+ _chunkXZG75ELGjs.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, _chunkGY2EEO2Yjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
2526
+ await new (0, _chunkZGWURYZKjs.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, _chunkGY2EEO2Yjs.DeeplineClient)().getPlayTriggerConfig(options.play),
2559
+ await new (0, _chunkZGWURYZKjs.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, _chunkGY2EEO2Yjs.DeeplineClient)().getPlayTriggerConfig(
2603
+ const current = await new (0, _chunkZGWURYZKjs.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 = _chunkGY2EEO2Yjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
2680
+ var RUN_LOGS_KIND_HELP = _chunkZGWURYZKjs.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 (_chunkU2N4CYT7js.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
2817
- _chunkU2N4CYT7js.printJsonError.call(void 0,
2818
- Object.assign(new (0, _chunkGY2EEO2Yjs.RunEventQueryInputError)(error.message), {
2817
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
2818
+ _chunkXZG75ELGjs.printJsonError.call(void 0,
2819
+ Object.assign(new (0, _chunkZGWURYZKjs.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, _chunkGY2EEO2Yjs.RunEventQueryInputError)(
2863
+ throw new (0, _chunkZGWURYZKjs.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, _chunkGY2EEO2Yjs.RunEventQueryInputError)(
2870
+ throw new (0, _chunkZGWURYZKjs.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, _chunkGY2EEO2Yjs.RunEventQueryInputError)(
2884
+ throw new (0, _chunkZGWURYZKjs.RunEventQueryInputError)(
2884
2885
  `Unsupported query flag ${flag}. ${correction}`
2885
2886
  );
2886
2887
  }
2887
2888
  if (runId !== void 0) {
2888
- throw new (0, _chunkGY2EEO2Yjs.RunEventQueryInputError)(
2889
+ throw new (0, _chunkZGWURYZKjs.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, _chunkGY2EEO2Yjs.RunEventQueryInputError)(
2897
+ throw new (0, _chunkZGWURYZKjs.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, _chunkGY2EEO2Yjs.RunEventQueryInputError)(
2910
+ throw new (0, _chunkZGWURYZKjs.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, _chunkGY2EEO2Yjs.RunEventQueryInputError)(
2916
+ throw new (0, _chunkZGWURYZKjs.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, _chunkGY2EEO2Yjs.RunEventQueryInputError)(
2921
+ throw new (0, _chunkZGWURYZKjs.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, _chunkGY2EEO2Yjs.RunEventQueryInputError)(
2929
+ throw new (0, _chunkZGWURYZKjs.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 = _chunkGY2EEO2Yjs.normalizeRunEventOperationRequest.call(void 0, body);
2964
+ const request = _chunkZGWURYZKjs.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, _chunkGY2EEO2Yjs.RunEventQueryInputError)(
2968
+ throw new (0, _chunkZGWURYZKjs.RunEventQueryInputError)(
2968
2969
  "--runtime-backend must be daytona or modal."
2969
2970
  );
2970
2971
  }
2971
2972
  if (backend && !namespace) {
2972
- throw new (0, _chunkGY2EEO2Yjs.RunEventQueryInputError)(
2973
+ throw new (0, _chunkZGWURYZKjs.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 _chunkGY2EEO2Yjs.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 _chunkZGWURYZKjs.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 (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) _chunkU2N4CYT7js.printJsonError.call(void 0, diagnostic);
3026
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) _chunkXZG75ELGjs.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, _chunkGY2EEO2Yjs.DeeplineClient)();
3041
+ const client = new (0, _chunkZGWURYZKjs.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
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
3107
+ _chunkXZG75ELGjs.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: _chunkU2N4CYT7js.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
3113
+ { json: _chunkXZG75ELGjs.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}${_chunkGY2EEO2Yjs.playInputExampleArgs.call(void 0, schema)} --json`,
3933
+ command: `${base}${_chunkZGWURYZKjs.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
  }
@@ -5552,7 +5553,7 @@ async function runPlayBootstrap(args) {
5552
5553
  return runMonitorBootstrap(args);
5553
5554
  }
5554
5555
  const options = parsePlayBootstrapOptions(args);
5555
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
5556
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
5556
5557
  const contracts = await loadBootstrapContracts(client, options);
5557
5558
  const csvContext = loadCsvContext(options.from);
5558
5559
  const source = generateBootstrapPlaySource({
@@ -5707,7 +5708,7 @@ Existing credential redactions and referenced-list previews remain as stored.
5707
5708
  ...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
5708
5709
  );
5709
5710
  }
5710
- const response = await new (0, _chunkGY2EEO2Yjs.DeeplineClient)().runs.getReceipts(runId, {
5711
+ const response = await new (0, _chunkZGWURYZKjs.DeeplineClient)().runs.getReceipts(runId, {
5711
5712
  keys
5712
5713
  });
5713
5714
  const failed = response.receipts.filter(
@@ -5719,7 +5720,7 @@ Existing credential redactions and referenced-list previews remain as stored.
5719
5720
  JSON.stringify(response, null, 2) + "\n",
5720
5721
  { flag: "wx", mode: 384 }
5721
5722
  );
5722
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
5723
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
5723
5724
  {
5724
5725
  runId,
5725
5726
  out: options.out,
@@ -5729,7 +5730,7 @@ Existing credential redactions and referenced-list previews remain as stored.
5729
5730
  { json: true }
5730
5731
  );
5731
5732
  } else {
5732
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0, { ...response }, { json: true });
5733
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
5733
5734
  }
5734
5735
  if (failed)
5735
5736
  process.exitCode = response.receipts.some(
@@ -5768,7 +5769,7 @@ includes nextCommand when another page is available.
5768
5769
  { exitCode: 2 }
5769
5770
  );
5770
5771
  }
5771
- const page = await new (0, _chunkGY2EEO2Yjs.DeeplineClient)().runs.children(parentRunId, {
5772
+ const page = await new (0, _chunkZGWURYZKjs.DeeplineClient)().runs.children(parentRunId, {
5772
5773
  launchKey: options.launchKey,
5773
5774
  ...options.cursor !== void 0 ? { cursor: options.cursor } : {},
5774
5775
  limit
@@ -5784,7 +5785,7 @@ includes nextCommand when another page is available.
5784
5785
  String(limit),
5785
5786
  "--json"
5786
5787
  ].join(" ") : null;
5787
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
5788
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
5788
5789
  {
5789
5790
  parentRunId,
5790
5791
  launchKey: options.launchKey,
@@ -5820,7 +5821,7 @@ async function handleRunsHistory(options) {
5820
5821
  throw new Error("--limit must be a positive integer.");
5821
5822
  }
5822
5823
  }
5823
- const page = await new (0, _chunkGY2EEO2Yjs.DeeplineClient)().runs.history({
5824
+ const page = await new (0, _chunkZGWURYZKjs.DeeplineClient)().runs.history({
5824
5825
  cursor: options.cursor,
5825
5826
  orgId: options.org,
5826
5827
  search: options.search,
@@ -5836,7 +5837,7 @@ async function handleRunsHistory(options) {
5836
5837
  );
5837
5838
  }
5838
5839
  if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
5839
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
5840
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
5840
5841
  { ...page, render: { sections: [{ title: "Run history", lines }] } },
5841
5842
  options.json ? { json: true } : {}
5842
5843
  );
@@ -5860,11 +5861,60 @@ function registerRunHistoryCommand(runs) {
5860
5861
  ).action(handleRunsHistory);
5861
5862
  }
5862
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, _chunkZGWURYZKjs.DeeplineClient)().runs.rerun(runId, {
5893
+ ...idempotencyKey === void 0 ? {} : { idempotencyKey },
5894
+ ...inputOverrides === void 0 ? {} : { inputOverrides }
5895
+ });
5896
+ if (_chunkXZG75ELGjs.shouldEmitJson.call(void 0, options.json)) {
5897
+ _chunkXZG75ELGjs.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
+
5863
5913
  // ../play-data-plane/column-names.ts
5864
5914
  var POSTGRES_IDENTIFIER_MAX_BYTES = 63;
5865
5915
  var HASH_SUFFIX_LENGTH = 10;
5866
5916
  function normalizePlayColumnName(id, preserveAuthoredPrefix = true) {
5867
- 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]]), () => ( "")) : "";
5868
5918
  const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
5869
5919
  const safe = `${prefix}${normalized || "column"}`;
5870
5920
  return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
@@ -5926,8 +5976,8 @@ function formatHitShare(count2, total) {
5926
5976
 
5927
5977
  // src/cli/run-hit-counts.ts
5928
5978
  function runTableHitCounts(tableNamespace, summary) {
5929
- const rows = _nullishCoalesce(_optionalChain([summary, 'optionalAccess', _154 => _154.stats, 'optionalAccess', _155 => _155.total]), () => ( 0));
5930
- 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]);
5931
5981
  if (!filled || rows <= 0) return null;
5932
5982
  const legColumns = new Set(
5933
5983
  Object.values(_nullishCoalesce(summary.cascades, () => ( {}))).flatMap((cascade) => cascade.legs)
@@ -5995,7 +6045,7 @@ function tableCellText(value) {
5995
6045
  value,
5996
6046
  (_key, nested) => typeof nested === "bigint" ? nested.toString() : nested
5997
6047
  ), () => ( ""));
5998
- } catch (e3) {
6048
+ } catch (e4) {
5999
6049
  return String(value);
6000
6050
  }
6001
6051
  }
@@ -6112,7 +6162,7 @@ function projectRunDatasetCell(value) {
6112
6162
  const logicalValue = parseSerializedDatasetValue(value);
6113
6163
  if (logicalValue === null || logicalValue === void 0) return logicalValue;
6114
6164
  if (typeof logicalValue === "object") {
6115
- return _chunkU2N4CYT7js.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
6165
+ return _chunkXZG75ELGjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
6116
6166
  }
6117
6167
  return logicalValue;
6118
6168
  }
@@ -6149,7 +6199,7 @@ function parseSerializedDatasetValue(value) {
6149
6199
  if (!text || !["{", "["].includes(_nullishCoalesce(text[0], () => ( "")))) return value;
6150
6200
  try {
6151
6201
  return JSON.parse(text);
6152
- } catch (e4) {
6202
+ } catch (e5) {
6153
6203
  return value;
6154
6204
  }
6155
6205
  }
@@ -6213,7 +6263,7 @@ function mergeCanonicalRowsInfo(left, right) {
6213
6263
  ...currentTable ? { currentTable: true } : {},
6214
6264
  ...exportUnavailableReason ? {
6215
6265
  exportUnavailableReason,
6216
- ..._optionalChain([unavailableSource, 'optionalAccess', _157 => _157.exportUnavailableMessage]) ? {
6266
+ ..._optionalChain([unavailableSource, 'optionalAccess', _160 => _160.exportUnavailableMessage]) ? {
6217
6267
  exportUnavailableMessage: unavailableSource.exportUnavailableMessage
6218
6268
  } : {}
6219
6269
  } : {}
@@ -6385,7 +6435,7 @@ function totalRowsForDataset(result, datasetPath) {
6385
6435
  const metadata = isRecord2(result._metadata) ? result._metadata : null;
6386
6436
  const parentPath = datasetPath.split(".").slice(0, -1).join(".");
6387
6437
  const parent = parentPath ? valueAtPath({ result }, parentPath) : result;
6388
- 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));
6389
6439
  }
6390
6440
  function rowArray(value) {
6391
6441
  if (!Array.isArray(value)) {
@@ -6447,8 +6497,8 @@ function canonicalRowsInfoFromCandidate(input) {
6447
6497
  };
6448
6498
  }
6449
6499
  if (isPackagedDatasetOutput(candidate.value)) {
6450
- const rawRows = _nullishCoalesce(rowArray(_optionalChain([candidate, 'access', _161 => _161.value, 'access', _162 => _162.preview, 'optionalAccess', _163 => _163.rows])), () => ( []));
6451
- 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));
6452
6502
  const explicitColumns = Array.isArray(candidate.value.columns) ? candidate.value.columns.filter(
6453
6503
  (column) => typeof column === "string"
6454
6504
  ) : [];
@@ -6544,12 +6594,12 @@ function collectDatasetCandidates(input) {
6544
6594
  }
6545
6595
  function collectCanonicalRowsInfos(statusOrResult) {
6546
6596
  const root = isRecord2(statusOrResult) ? statusOrResult : null;
6547
- 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;
6548
6598
  if (!result) {
6549
6599
  return [];
6550
6600
  }
6551
6601
  const metadata = isRecord2(result._metadata) ? result._metadata : null;
6552
- 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])));
6553
6603
  const candidates = [
6554
6604
  {
6555
6605
  source: "result.contacts",
@@ -6574,7 +6624,7 @@ function collectCanonicalRowsInfos(statusOrResult) {
6574
6624
  ];
6575
6625
  if (isRecord2(result.output)) {
6576
6626
  const outputMetadata = isRecord2(result.output._metadata) ? result.output._metadata : null;
6577
- 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])));
6578
6628
  candidates.push(
6579
6629
  {
6580
6630
  source: "result.output.contacts",
@@ -6663,14 +6713,14 @@ function collectPackagedStepDatasetCandidates(statusOrResult) {
6663
6713
  {
6664
6714
  source,
6665
6715
  value: step.output,
6666
- 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))
6667
6717
  }
6668
6718
  ] : [];
6669
6719
  });
6670
6720
  }
6671
6721
  function collectSerializedDatasetRowsInfos(statusOrResult) {
6672
6722
  const root = isRecord2(statusOrResult) ? statusOrResult : null;
6673
- 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;
6674
6724
  const candidates = [];
6675
6725
  if (result) {
6676
6726
  collectDatasetCandidates({
@@ -6783,7 +6833,7 @@ var RunDatasetCatalog = class _RunDatasetCatalog {
6783
6833
  * a Run returns its sole returned Dataset, or its sole recovered Dataset.
6784
6834
  */
6785
6835
  choose(path) {
6786
- const requested = _optionalChain([path, 'optionalAccess', _179 => _179.trim, 'call', _180 => _180()]);
6836
+ const requested = _optionalChain([path, 'optionalAccess', _182 => _182.trim, 'call', _183 => _183()]);
6787
6837
  if (requested) {
6788
6838
  const info = uniqueDatasetMatch(
6789
6839
  this.#available.filter((dataset) => dataset.matches(requested)).map((dataset) => dataset.info()),
@@ -6791,7 +6841,7 @@ var RunDatasetCatalog = class _RunDatasetCatalog {
6791
6841
  );
6792
6842
  return info ? RunDataset.from({
6793
6843
  ...info,
6794
- 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
6795
6845
  }) : null;
6796
6846
  }
6797
6847
  if (this.#returned.length === 1) return this.#returned[0];
@@ -6834,7 +6884,7 @@ var RunDataset = class _RunDataset {
6834
6884
  return this.#info.exportUnavailableMessage;
6835
6885
  }
6836
6886
  matches(path) {
6837
- 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;
6838
6888
  }
6839
6889
  /** Return a new Handle when its preview has been replaced by fetched rows. */
6840
6890
  withRows(info) {
@@ -6873,7 +6923,7 @@ var RunDataset = class _RunDataset {
6873
6923
  }
6874
6924
  };
6875
6925
  function resolveDatasetByName(available, datasetPath) {
6876
- 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));
6877
6927
  }
6878
6928
  function uniqueDatasetMatch(infos, selector) {
6879
6929
  const matches = distinctCanonicalRowsInfos(infos);
@@ -6897,11 +6947,11 @@ function uniqueDatasetMatch(infos, selector) {
6897
6947
  function packageForDatasetSelection(runPackage) {
6898
6948
  const root = recordValue(runPackage);
6899
6949
  const nested = recordValue(root.package);
6900
- if (_optionalChain([nested, 'optionalAccess', _198 => _198.kind]) === "play_run") return nested;
6950
+ if (_optionalChain([nested, 'optionalAccess', _201 => _201.kind]) === "play_run") return nested;
6901
6951
  return root.kind === "play_run" ? root : null;
6902
6952
  }
6903
6953
  function withReturnedDatasetAliases(runPackage, available) {
6904
- 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]));
6905
6955
  if (Object.keys(outputs).length === 0) return available;
6906
6956
  const expanded = [...available];
6907
6957
  for (const outputValue of Object.values(outputs)) {
@@ -6915,7 +6965,7 @@ function withReturnedDatasetAliases(runPackage, available) {
6915
6965
  return expanded;
6916
6966
  }
6917
6967
  function returnedRunDatasets(runPackage, available) {
6918
- 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]);
6919
6969
  const outputs = recordValue(rawOutputs);
6920
6970
  if (rawOutputs && typeof rawOutputs === "object" && !Array.isArray(rawOutputs)) {
6921
6971
  const selected = [];
@@ -6934,7 +6984,7 @@ function returnedRunDatasets(runPackage, available) {
6934
6984
  return distinctCanonicalRowsInfos(
6935
6985
  available.filter(
6936
6986
  (info) => info.returned || [info.source, ..._nullishCoalesce(info.sourceAliases, () => ( []))].some(
6937
- (path) => _optionalChain([path, 'optionalAccess', _203 => _203.startsWith, 'call', _204 => _204("result.")])
6987
+ (path) => _optionalChain([path, 'optionalAccess', _206 => _206.startsWith, 'call', _207 => _207("result.")])
6938
6988
  ) && !info.recovered
6939
6989
  )
6940
6990
  );
@@ -6964,7 +7014,7 @@ function resolveReturnedDataset(output, available) {
6964
7014
  }
6965
7015
  const legacy = path ? uniqueDatasetMatch(
6966
7016
  available.filter(
6967
- (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)])
6968
7018
  ),
6969
7019
  path
6970
7020
  ) : null;
@@ -6994,7 +7044,7 @@ var RUN_PLAY_SIGNATURE_HINT = "Deepline hint: ctx.runPlay uses a stable key plus
6994
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.";
6995
7045
  function sourceLineForError(sourceCode, error) {
6996
7046
  const match = error.match(/:(\d+):(\d+)\s/);
6997
- 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;
6998
7048
  if (!Number.isInteger(lineNumber) || lineNumber < 1) return "";
6999
7049
  return _nullishCoalesce(sourceCode.split(/\r?\n/)[lineNumber - 1], () => ( ""));
7000
7050
  }
@@ -7291,7 +7341,7 @@ var DeployApiClient = class {
7291
7341
  let parsed = null;
7292
7342
  try {
7293
7343
  parsed = text ? JSON.parse(text) : null;
7294
- } catch (e5) {
7344
+ } catch (e6) {
7295
7345
  parsed = text;
7296
7346
  }
7297
7347
  if (!response.ok) {
@@ -7527,7 +7577,7 @@ async function discoverDeploymentFiles(input) {
7527
7577
  }
7528
7578
  }
7529
7579
  const rootStat = await _promises.stat.call(void 0, input.projectRoot).catch(() => null);
7530
- if (!_optionalChain([rootStat, 'optionalAccess', _209 => _209.isDirectory, 'call', _210 => _210()])) {
7580
+ if (!_optionalChain([rootStat, 'optionalAccess', _212 => _212.isDirectory, 'call', _213 => _213()])) {
7531
7581
  throw new DeeplineManifestError(
7532
7582
  `Project root directory does not exist in the repo: ${input.projectRoot}`
7533
7583
  );
@@ -7553,7 +7603,7 @@ async function readMonitorFiles(input) {
7553
7603
  const raw = await _promises.readFile.call(void 0, _path.join.call(void 0, input.projectRoot, file), "utf8");
7554
7604
  try {
7555
7605
  return { file: sourcePath, definition: JSON.parse(raw) };
7556
- } catch (e6) {
7606
+ } catch (e7) {
7557
7607
  throw new DeeplineManifestError(
7558
7608
  `${sourcePath} must contain a monitor definition as valid JSON.`
7559
7609
  );
@@ -7629,7 +7679,7 @@ function resolveOwnedPlayReferenceName(reference, ownerSlug) {
7629
7679
  if (parsed.kind !== "org") {
7630
7680
  return null;
7631
7681
  }
7632
- 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()]), () => ( ""));
7633
7683
  return normalizedOwnerSlug && parsed.ownerSlug.trim().toLowerCase() === normalizedOwnerSlug ? parsed.name : null;
7634
7684
  }
7635
7685
 
@@ -7644,7 +7694,7 @@ function stringLiteralValue(node) {
7644
7694
  return node.value;
7645
7695
  }
7646
7696
  if (node.type === "TemplateLiteral" && Array.isArray(node.expressions) && node.expressions.length === 0 && Array.isArray(node.quasis) && node.quasis.length === 1) {
7647
- 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]);
7648
7698
  return typeof cooked === "string" ? cooked : null;
7649
7699
  }
7650
7700
  return null;
@@ -7675,7 +7725,7 @@ async function extractWithCompiler(sourceCode) {
7675
7725
  try {
7676
7726
  const loaded = await Promise.resolve().then(() => _interopRequireWildcard(require("typescript")));
7677
7727
  ts = _nullishCoalesce(loaded.default, () => ( loaded));
7678
- } catch (e7) {
7728
+ } catch (e8) {
7679
7729
  return null;
7680
7730
  }
7681
7731
  const sourceFile = ts.createSourceFile(
@@ -7768,7 +7818,7 @@ async function runDeployment(params, hooks) {
7768
7818
  `Deployment ${params.deploymentId} has no linked repository and no target directory was given.`
7769
7819
  );
7770
7820
  }
7771
- 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;
7772
7822
  let mergedPullRequestNumber = null;
7773
7823
  let promoted = false;
7774
7824
  const setStatus = (input) => client.setStatus({
@@ -7839,7 +7889,7 @@ async function runDeployment(params, hooks) {
7839
7889
  finalStatus,
7840
7890
  outcomes,
7841
7891
  ...monitorRunResult(),
7842
- checkRunId: _optionalChain([checkRun, 'optionalAccess', _222 => _222.checkRunId])
7892
+ checkRunId: _optionalChain([checkRun, 'optionalAccess', _225 => _225.checkRunId])
7843
7893
  };
7844
7894
  };
7845
7895
  await _promises.mkdir.call(void 0, hooks.workRoot, { recursive: true });
@@ -7865,7 +7915,7 @@ async function runDeployment(params, hooks) {
7865
7915
  const source = await hooks.openSource({ client, deployment });
7866
7916
  if (deployment.isProduction) {
7867
7917
  try {
7868
- 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));
7869
7919
  } catch (error) {
7870
7920
  console.warn("[deploy-worker] merged PR lookup failed", {
7871
7921
  deploymentId: params.deploymentId,
@@ -7935,15 +7985,15 @@ async function runDeployment(params, hooks) {
7935
7985
  return finishFailed({
7936
7986
  error: input.error,
7937
7987
  outcomes: input.outcomes,
7938
- checkRunId: _optionalChain([checkRun2, 'optionalAccess', _225 => _225.checkRunId])
7988
+ checkRunId: _optionalChain([checkRun2, 'optionalAccess', _228 => _228.checkRunId])
7939
7989
  });
7940
7990
  };
7941
7991
  postFailureCheck = async (summary) => await _asyncOptionalChain([(await postCheckOrNull({
7942
7992
  conclusion: "failure",
7943
7993
  title: "Deploy failed",
7944
7994
  summary
7945
- })), 'optionalAccess', async _226 => _226.checkRunId]);
7946
- 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));
7947
7997
  const supersedeIfHeadMoved = async () => {
7948
7998
  if (!deployment.isProduction || !source.branchHead || !deploymentBranch) {
7949
7999
  return null;
@@ -7957,7 +8007,7 @@ async function runDeployment(params, hooks) {
7957
8007
  });
7958
8008
  await setStatus({
7959
8009
  status: "superseded",
7960
- 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.`,
7961
8011
  buildSeconds: buildSeconds(),
7962
8012
  ...monitorOutcomes.length > 0 ? { results: monitorResults() } : {},
7963
8013
  ...head ? { observedHeadSha: head } : {}
@@ -8073,7 +8123,7 @@ async function runDeployment(params, hooks) {
8073
8123
  failPlay(file, repoRelativeFile, message);
8074
8124
  continue;
8075
8125
  }
8076
- 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()]), () => ( ""));
8077
8127
  if (!name) {
8078
8128
  failPlay(
8079
8129
  file,
@@ -8092,7 +8142,7 @@ async function runDeployment(params, hooks) {
8092
8142
  continue;
8093
8143
  }
8094
8144
  seenNames.set(name, file);
8095
- 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(
8096
8146
  (pkg) => typeof pkg === "string" ? pkg : _nullishCoalesce(pkg.name, () => ( ""))
8097
8147
  ).filter((pkgName) => pkgName && pkgName !== "deepline");
8098
8148
  if (disallowed.length > 0) {
@@ -8176,7 +8226,7 @@ async function runDeployment(params, hooks) {
8176
8226
  const conflicts = [];
8177
8227
  for (const play of ordered) {
8178
8228
  const owner = stateByName.get(play.name);
8179
- 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) {
8180
8230
  continue;
8181
8231
  }
8182
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.`;
@@ -8199,16 +8249,16 @@ async function runDeployment(params, hooks) {
8199
8249
  }
8200
8250
  const playByName = new Map(ordered.map((play) => [play.name, play]));
8201
8251
  const sdkUpdated = (name) => {
8202
- const artifact = _optionalChain([playByName, 'access', _241 => _241.get, 'call', _242 => _242(name), 'optionalAccess', _243 => _243.result, 'access', _244 => _244.artifact]);
8203
- 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));
8204
8254
  return artifact && isSdkUpdated(live, artifact) ? { sdkUpdated: true } : {};
8205
8255
  };
8206
8256
  const outcomes = [];
8207
8257
  const toRegister = [];
8208
8258
  const toPromote = [];
8209
8259
  const takeoverWarning = (state2) => {
8210
- const owner = _optionalChain([state2, 'optionalAccess', _248 => _248.playProjectRepo]);
8211
- 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;
8212
8262
  if (!project) {
8213
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.`;
8214
8264
  }
@@ -8220,8 +8270,8 @@ async function runDeployment(params, hooks) {
8220
8270
  const artifact = play.result.artifact;
8221
8271
  const importsOtherPlays = (_nullishCoalesce(play.result.importedPlayDependencies, () => ( []))).length > 0;
8222
8272
  const matches = (revision) => !importsOtherPlays && carriesArtifact(revision, artifact);
8223
- if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _250 => _250.liveRevision]), () => ( null)))) {
8224
- 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]))) {
8225
8275
  toPromote.push({
8226
8276
  name: play.name,
8227
8277
  revisionId: playState.liveRevision.revisionId
@@ -8232,12 +8282,12 @@ async function runDeployment(params, hooks) {
8232
8282
  name: play.name,
8233
8283
  file: play.file,
8234
8284
  status: "unchanged",
8235
- 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)),
8236
8286
  ...warning ? { warning } : {}
8237
8287
  });
8238
8288
  continue;
8239
8289
  }
8240
- if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _255 => _255.workingRevision]), () => ( null)))) {
8290
+ if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _258 => _258.workingRevision]), () => ( null)))) {
8241
8291
  if (deployment.isProduction) {
8242
8292
  toPromote.push({
8243
8293
  name: play.name,
@@ -8248,7 +8298,7 @@ async function runDeployment(params, hooks) {
8248
8298
  name: play.name,
8249
8299
  file: play.file,
8250
8300
  status: "registered",
8251
- 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)),
8252
8302
  ...sdkUpdated(play.name),
8253
8303
  ...warning ? { warning } : {}
8254
8304
  });
@@ -8375,11 +8425,11 @@ async function runDeployment(params, hooks) {
8375
8425
  const promotion = await client.promote(toPromote);
8376
8426
  promoted = true;
8377
8427
  for (const outcome of promotion.outcomes) {
8378
- 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));
8379
8429
  const warning = takeoverWarning(stateByName.get(outcome.name));
8380
8430
  outcomes.push({
8381
8431
  name: outcome.name,
8382
- 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)),
8383
8433
  status: outcome.status === "promoted" ? "promoted" : "failed",
8384
8434
  version: outcome.version,
8385
8435
  ...outcome.status === "promoted" && typeof previousVersion === "number" && previousVersion !== outcome.version ? { previousVersion } : {},
@@ -8391,7 +8441,7 @@ async function runDeployment(params, hooks) {
8391
8441
  } catch (error) {
8392
8442
  if (revokedFinalStatus(error)) throw error;
8393
8443
  const body = error instanceof DeployApiError ? error.body : null;
8394
- 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))));
8395
8445
  if (/PLAY_DEPLOYMENT_NOT_ACTIVE/.test(errorText)) {
8396
8446
  console.info("[deploy-worker] cancelled at promote", {
8397
8447
  deploymentId: params.deploymentId
@@ -8415,9 +8465,9 @@ async function runDeployment(params, hooks) {
8415
8465
  error: errorText,
8416
8466
  outcomes: [
8417
8467
  ...outcomes,
8418
- ...(_nullishCoalesce(_optionalChain([body, 'optionalAccess', _266 => _266.outcomes]), () => ( toPromote))).map((entry) => ({
8468
+ ...(_nullishCoalesce(_optionalChain([body, 'optionalAccess', _269 => _269.outcomes]), () => ( toPromote))).map((entry) => ({
8419
8469
  name: entry.name,
8420
- 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)),
8421
8471
  status: "failed",
8422
8472
  error: _nullishCoalesce(("error" in entry ? entry.error : void 0), () => ( errorText))
8423
8473
  }))
@@ -8461,7 +8511,7 @@ async function runDeployment(params, hooks) {
8461
8511
  });
8462
8512
  let checkRunId;
8463
8513
  try {
8464
- checkRunId = await _optionalChain([postFailureCheck, 'optionalCall', _270 => _270(message.slice(0, 2e3))]);
8514
+ checkRunId = await _optionalChain([postFailureCheck, 'optionalCall', _273 => _273(message.slice(0, 2e3))]);
8465
8515
  } catch (checkError) {
8466
8516
  const revokedAtCheck = revokedFinalStatus(checkError);
8467
8517
  if (revokedAtCheck) {
@@ -8529,7 +8579,7 @@ function renderOutcome(outcome) {
8529
8579
  function printResult2(input) {
8530
8580
  const failed = input.status === "failed" || input.status === "cancelled";
8531
8581
  if (failed) process.exitCode = 1;
8532
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
8582
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
8533
8583
  {
8534
8584
  deployment: { ...input.deployment, status: input.status },
8535
8585
  plays: input.outcomes,
@@ -8554,7 +8604,7 @@ async function handlePlaysDeploy(directory, options) {
8554
8604
  const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
8555
8605
  throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
8556
8606
  });
8557
- const { http, config } = _chunkU2N4CYT7js.getAuthedHttpClient.call(void 0, );
8607
+ const { http, config } = _chunkXZG75ELGjs.getAuthedHttpClient.call(void 0, );
8558
8608
  const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
8559
8609
  const startDeployment = () => http.post("/api/v2/deployments", {
8560
8610
  deliveryId,
@@ -8581,14 +8631,14 @@ async function handlePlaysDeploy(directory, options) {
8581
8631
  },
8582
8632
  {
8583
8633
  bundle: bundleDeployPlayFile,
8584
- fetchImpl: _chunkVDIHLKGGjs.fetchWithDeploymentProtection,
8634
+ fetchImpl: _chunk3AQ3L2NXjs.fetchWithDeploymentProtection,
8585
8635
  // The plays are already here: "opening" the source is naming it.
8586
8636
  openSource: async () => ({
8587
8637
  open: async () => ({ repoRoot: root })
8588
8638
  }),
8589
8639
  target: {
8590
8640
  rootDirectory: "",
8591
- 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()]), () => ( ""))
8592
8642
  },
8593
8643
  workRoot
8594
8644
  }
@@ -9104,7 +9154,7 @@ function parseJsonInput(raw, flag = "--input") {
9104
9154
  let parsed;
9105
9155
  try {
9106
9156
  parsed = JSON.parse(source);
9107
- } catch (e8) {
9157
+ } catch (e9) {
9108
9158
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
9109
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." : ""}`,
9110
9160
  void 0,
@@ -9142,14 +9192,14 @@ function parseInputFlagValue(raw) {
9142
9192
  if (trimmed === "true" || trimmed === "false" || trimmed === "null" || trimmed.startsWith("{") || trimmed.startsWith("[") || /^-?\d+(\.\d+)?$/.test(trimmed)) {
9143
9193
  try {
9144
9194
  return JSON.parse(trimmed);
9145
- } catch (e9) {
9195
+ } catch (e10) {
9146
9196
  return raw;
9147
9197
  }
9148
9198
  }
9149
9199
  return raw;
9150
9200
  }
9151
9201
  function parsePlayRunOptions(args, initialInput = null) {
9152
- const selection = _chunkU2N4CYT7js.parseJsonFields.call(void 0, args, "run");
9202
+ const selection = _chunkXZG75ELGjs.parseJsonFields.call(void 0, args, "run");
9153
9203
  args = selection.args;
9154
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.";
9155
9205
  let filePath = null;
@@ -9159,7 +9209,7 @@ function parsePlayRunOptions(args, initialInput = null) {
9159
9209
  let revisionSelector = null;
9160
9210
  const watch = !args.includes("--no-wait");
9161
9211
  const dryRun = args.includes("--dry-run");
9162
- let jsonOutput = dryRun ? _chunkU2N4CYT7js.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkU2N4CYT7js.argsWantJson.call(void 0, args);
9212
+ let jsonOutput = dryRun ? _chunkXZG75ELGjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkXZG75ELGjs.argsWantJson.call(void 0, args);
9163
9213
  const fullJson = args.includes("--full");
9164
9214
  const force = args.includes("--force");
9165
9215
  const forceToolRefresh = args.includes("--force-tool-refresh");
@@ -9206,7 +9256,7 @@ function parsePlayRunOptions(args, initialInput = null) {
9206
9256
  "--log-level requires one of: debug, info, warn, error."
9207
9257
  );
9208
9258
  }
9209
- const parsed = _chunkGY2EEO2Yjs.parseLogLevel.call(void 0, value);
9259
+ const parsed = _chunkZGWURYZKjs.parseLogLevel.call(void 0, value);
9210
9260
  if (!parsed) {
9211
9261
  throw new Error(
9212
9262
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -9480,7 +9530,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
9480
9530
  const dryRun = _nullishCoalesce(options.dryRun, () => ( base.dryRun));
9481
9531
  if (dryRun && resolvedTarget.kind !== "file")
9482
9532
  throw new Error("--dry-run currently requires a local Play file.");
9483
- const profile = _nullishCoalesce(_optionalChain([stringOption, 'call', _274 => _274(options.profile, "--profile"), 'optionalAccess', _275 => _275.trim, 'call', _276 => _276()]), () => ( base.profile));
9533
+ const profile = _nullishCoalesce(_optionalChain([stringOption, 'call', _277 => _277(options.profile, "--profile"), 'optionalAccess', _278 => _278.trim, 'call', _279 => _279()]), () => ( base.profile));
9484
9534
  if (profile !== null) _chunkUQV5M6HNjs.resolveEnabledExecutionProfile.call(void 0, profile);
9485
9535
  const countOption = (value, flag) => {
9486
9536
  if (value === void 0) return void 0;
@@ -9513,7 +9563,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
9513
9563
  const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
9514
9564
  (arg) => arg === "--log-level" || arg.startsWith("--log-level=")
9515
9565
  );
9516
- let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkGY2EEO2Yjs.parseLogLevel.call(void 0, options.logLevel);
9566
+ let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkZGWURYZKjs.parseLogLevel.call(void 0, options.logLevel);
9517
9567
  if (!logLevel)
9518
9568
  throw new Error("--log-level requires one of: debug, info, warn, error.");
9519
9569
  const debugAlias = options.logs || options.debug === true || inputArgs.some(
@@ -9527,13 +9577,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
9527
9577
  if (debugAlias || debugMapLatency && logLevel === "info")
9528
9578
  logLevel = "debug";
9529
9579
  const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
9530
- const jsonFields = options.json === void 0 ? base.jsonFields : _chunkU2N4CYT7js.parseJsonFields.call(void 0,
9531
- [...fullJson ? ["--full"] : [], ..._chunkU2N4CYT7js.jsonFieldArgs.call(void 0, options.json)],
9580
+ const jsonFields = options.json === void 0 ? base.jsonFields : _chunkXZG75ELGjs.parseJsonFields.call(void 0,
9581
+ [...fullJson ? ["--full"] : [], ..._chunkXZG75ELGjs.jsonFieldArgs.call(void 0, options.json)],
9532
9582
  "run"
9533
9583
  ).fields;
9534
9584
  const watch = options.wait === false ? false : base.watch;
9535
9585
  const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
9536
- const jsonOutput = dryRun || !watch ? explicitJson || _chunkU2N4CYT7js.argsWantJson.call(void 0, []) : explicitJson;
9586
+ const jsonOutput = dryRun || !watch ? explicitJson || _chunkXZG75ELGjs.argsWantJson.call(void 0, []) : explicitJson;
9537
9587
  const verboseLogs = Boolean(
9538
9588
  debugAlias || logLevel === "debug" || debugMapLatency
9539
9589
  );
@@ -9577,7 +9627,7 @@ function playAuthoringGraphPath(parent, filePath) {
9577
9627
  // src/cli/renderers/local-play-execution.ts
9578
9628
  function renderLocalPlayExecutionPlan(plan, options = {}) {
9579
9629
  if (options.dryRun) {
9580
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
9630
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
9581
9631
  return;
9582
9632
  }
9583
9633
  process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
@@ -9661,7 +9711,7 @@ async function preflightRunIdFile(path) {
9661
9711
  `Cannot write --run-id-file destination ${destination}: ${error instanceof Error ? error.message : String(error)}`
9662
9712
  );
9663
9713
  } finally {
9664
- await _optionalChain([handle, 'optionalAccess', _277 => _277.close, 'call', _278 => _278()]);
9714
+ await _optionalChain([handle, 'optionalAccess', _280 => _280.close, 'call', _281 => _281()]);
9665
9715
  await removeRunIdTempFile(tempPath);
9666
9716
  }
9667
9717
  return destination;
@@ -9715,9 +9765,9 @@ async function writePlayRunIdFile(destination, runId, options = {}) {
9715
9765
  } catch (error) {
9716
9766
  if (error.code !== "EEXIST") throw error;
9717
9767
  const raced = await readRunIdFile(destination);
9718
- if (_optionalChain([raced, 'optionalAccess', _279 => _279.runId]) !== runId) {
9768
+ if (_optionalChain([raced, 'optionalAccess', _282 => _282.runId]) !== runId) {
9719
9769
  throw new Error(
9720
- `--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}`
9721
9771
  );
9722
9772
  }
9723
9773
  if (!options.launchConfirmed || raced.launchConfirmed) return;
@@ -9733,7 +9783,7 @@ async function writePlayRunIdFile(destination, runId, options = {}) {
9733
9783
  }
9734
9784
  }
9735
9785
  } finally {
9736
- await _optionalChain([handle, 'optionalAccess', _281 => _281.close, 'call', _282 => _282()]);
9786
+ await _optionalChain([handle, 'optionalAccess', _284 => _284.close, 'call', _285 => _285()]);
9737
9787
  await removeRunIdTempFile(tempPath);
9738
9788
  }
9739
9789
  }
@@ -9802,10 +9852,10 @@ function playReferenceMatchTokens(value) {
9802
9852
  return normalizePlayReferenceForMatch(value).split("-").filter((token) => token.length > 1 && token !== "to" && token !== "and");
9803
9853
  }
9804
9854
  function playSuggestionReference(play) {
9805
- 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()])) {
9806
9856
  return play.reference.trim();
9807
9857
  }
9808
- 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()]);
9809
9859
  return ownerSlug ? `${ownerSlug}/${play.name}` : play.name;
9810
9860
  }
9811
9861
  function scorePlayReferenceSuggestion(requested, play) {
@@ -9821,8 +9871,8 @@ function scorePlayReferenceSuggestion(requested, play) {
9821
9871
  const reference = playSuggestionReference(play);
9822
9872
  const referenceNorm = normalizePlayReferenceForMatch(reference);
9823
9873
  const nameNorm = normalizePlayReferenceForMatch(play.name);
9824
- 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;
9825
- 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));
9826
9876
  const aliases = (_nullishCoalesce(play.aliases, () => ( []))).map(normalizePlayReferenceForMatch);
9827
9877
  const searchable = [referenceNorm, nameNorm, ...aliases].filter(Boolean);
9828
9878
  const requestedTokens = playReferenceMatchTokens(requestedName);
@@ -9937,20 +9987,20 @@ async function buildPlayReferenceNotFoundError(input) {
9937
9987
  plays,
9938
9988
  limit: 5
9939
9989
  });
9940
- } catch (e10) {
9990
+ } catch (e11) {
9941
9991
  suggestions = [];
9942
9992
  }
9943
9993
  const sourceError = input.sourceError instanceof _chunk7P5AA3SNjs.DeeplineError ? input.sourceError : null;
9944
- 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";
9945
9995
  return new (0, _chunk7P5AA3SNjs.DeeplineError)(
9946
9996
  buildPlayReferenceNotFoundMessage({
9947
9997
  requested: input.target,
9948
9998
  command: input.command,
9949
9999
  suggestions
9950
10000
  }),
9951
- _nullishCoalesce(_optionalChain([sourceError, 'optionalAccess', _298 => _298.statusCode]), () => ( 404)),
10001
+ _nullishCoalesce(_optionalChain([sourceError, 'optionalAccess', _301 => _301.statusCode]), () => ( 404)),
9952
10002
  code,
9953
- _optionalChain([sourceError, 'optionalAccess', _299 => _299.details])
10003
+ _optionalChain([sourceError, 'optionalAccess', _302 => _302.details])
9954
10004
  );
9955
10005
  }
9956
10006
  async function isMissingRunPlayReferenceError(input) {
@@ -10002,7 +10052,7 @@ function formatPlayReference(play) {
10002
10052
  if (play.reference) {
10003
10053
  return play.reference;
10004
10054
  }
10005
- 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";
10006
10056
  return `${ownerSlug}/${play.name}`;
10007
10057
  }
10008
10058
  function formatPlayListReference(play) {
@@ -10032,7 +10082,7 @@ function materializeRemotePlaySource(input) {
10032
10082
  return null;
10033
10083
  }
10034
10084
  const entrySource = input.source.files[input.source.entryFile];
10035
- if (!_optionalChain([entrySource, 'optionalAccess', _303 => _303.trim, 'call', _304 => _304()])) {
10085
+ if (!_optionalChain([entrySource, 'optionalAccess', _306 => _306.trim, 'call', _307 => _307()])) {
10036
10086
  return null;
10037
10087
  }
10038
10088
  const files = Object.entries(input.source.files);
@@ -10331,7 +10381,7 @@ function stageFile(logicalPath, absolutePath) {
10331
10381
  function normalizePlayPath(filePath) {
10332
10382
  try {
10333
10383
  return _fs.realpathSync.native(_path.resolve.call(void 0, filePath));
10334
- } catch (e11) {
10384
+ } catch (e12) {
10335
10385
  return _path.resolve.call(void 0, filePath);
10336
10386
  }
10337
10387
  }
@@ -10423,7 +10473,7 @@ async function compileBundledPlayGraphManifests(client, graph) {
10423
10473
  const child = graph.nodes.get(
10424
10474
  normalizePlayPath(dependency.filePath)
10425
10475
  );
10426
- if (!_optionalChain([child, 'optionalAccess', _305 => _305.compilerManifest])) {
10476
+ if (!_optionalChain([child, 'optionalAccess', _308 => _308.compilerManifest])) {
10427
10477
  throw new Error(
10428
10478
  `Missing compiler manifest for imported dependency ${dependency.filePath}.`
10429
10479
  );
@@ -10457,7 +10507,7 @@ function missingPlayDescriptionMessage(node) {
10457
10507
  ].join(" ");
10458
10508
  }
10459
10509
  function collectMissingPlayDescriptionErrors(graph) {
10460
- 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);
10461
10511
  }
10462
10512
  function assertBundledPlayGraphDescriptions(graph) {
10463
10513
  const errors = collectMissingPlayDescriptionErrors(graph);
@@ -10509,7 +10559,7 @@ function formatTimestamp(value) {
10509
10559
  return date.toISOString();
10510
10560
  }
10511
10561
  function isoTimestamp(value) {
10512
- 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));
10513
10563
  }
10514
10564
  function formatRunLine(run) {
10515
10565
  const credits = typeof run.billingTotalCredits === "number" && Number.isFinite(run.billingTotalCredits) ? `${formatCreditAmount2(run.billingTotalCredits)} credits` : "\u2014";
@@ -10517,7 +10567,7 @@ function formatRunLine(run) {
10517
10567
  }
10518
10568
  function playStatusErrorText(status) {
10519
10569
  const chunks = [];
10520
- 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]);
10521
10571
  if (typeof progressError === "string" && progressError.trim()) {
10522
10572
  chunks.push(progressError.trim());
10523
10573
  }
@@ -10543,7 +10593,7 @@ function playStatusErrorText(status) {
10543
10593
  function isRetryablePendingStartFailure(status) {
10544
10594
  if (status.status !== "failed") return false;
10545
10595
  if (status.runId && status.runId !== "pending") return false;
10546
- return _chunkGY2EEO2Yjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
10596
+ return _chunkZGWURYZKjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
10547
10597
  }
10548
10598
  function pendingStartFailureStatus(input) {
10549
10599
  const message = input.error instanceof Error ? input.error.message : String(input.error);
@@ -10570,13 +10620,13 @@ var PLAY_PROGRESS_HEARTBEAT_INTERVAL_MS = 15e3;
10570
10620
  var PLAY_STATUS_HEARTBEAT_INTERVAL_MS = 15e3;
10571
10621
  function watchSurfaceReaches(state, provenance, level) {
10572
10622
  const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
10573
- if (!_chunkGY2EEO2Yjs.logLevelReaches.call(void 0, level, minimumLevel)) {
10623
+ if (!_chunkZGWURYZKjs.logLevelReaches.call(void 0, level, minimumLevel)) {
10574
10624
  return false;
10575
10625
  }
10576
- if (_chunkGY2EEO2Yjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
10626
+ if (_chunkZGWURYZKjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
10577
10627
  return true;
10578
10628
  }
10579
- return state.verbose === true && _chunkGY2EEO2Yjs.logProvenanceReaches.call(void 0, provenance, "debug");
10629
+ return state.verbose === true && _chunkZGWURYZKjs.logProvenanceReaches.call(void 0, provenance, "debug");
10580
10630
  }
10581
10631
  function getEventPayload(event) {
10582
10632
  return event.payload && typeof event.payload === "object" ? event.payload : {};
@@ -10599,7 +10649,7 @@ function getRunIdFromLiveEvent(event) {
10599
10649
  if (typeof directRunId === "string" && directRunId.trim()) {
10600
10650
  return directRunId;
10601
10651
  }
10602
- 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]);
10603
10653
  return typeof packageRunId === "string" && packageRunId.trim() ? packageRunId : null;
10604
10654
  }
10605
10655
  function eventConfirmsPlayRunLaunch(event) {
@@ -10620,19 +10670,19 @@ function getStatusFromLiveEvent(event) {
10620
10670
  return null;
10621
10671
  }
10622
10672
  const payload = getEventPayload(event);
10623
- 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]))));
10624
10674
  }
10625
10675
  function readLiveRunField(event, field) {
10626
10676
  const payload = getEventPayload(event);
10627
10677
  if (field === "waitKind") {
10628
- 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])));
10629
10679
  if (wait && typeof wait === "object" && !Array.isArray(wait)) {
10630
10680
  const kind = wait.kind;
10631
10681
  if (typeof kind === "string" && kind.trim()) return kind.trim();
10632
10682
  }
10633
10683
  }
10634
10684
  const run = getRunRecordFromPackage(payload);
10635
- 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(
10636
10686
  (value) => Boolean(value && typeof value === "object" && !Array.isArray(value))
10637
10687
  );
10638
10688
  for (const record3 of records) {
@@ -10647,7 +10697,7 @@ function getLiveRunStringField(event, field) {
10647
10697
  function getLiveRunActivity(event) {
10648
10698
  const payload = getEventPayload(event);
10649
10699
  const run = getRunRecordFromPackage(payload);
10650
- const candidates = [payload.activity, _optionalChain([run, 'optionalAccess', _321 => _321.activity])];
10700
+ const candidates = [payload.activity, _optionalChain([run, 'optionalAccess', _324 => _324.activity])];
10651
10701
  for (const candidate of candidates) {
10652
10702
  if (candidate && typeof candidate === "object" && !Array.isArray(candidate) && typeof candidate.summary === "string" && candidate.observation && typeof candidate.observation === "object") {
10653
10703
  return candidate;
@@ -10662,9 +10712,9 @@ function getRunLifecycleHint(input) {
10662
10712
  return null;
10663
10713
  }
10664
10714
  const activity = getLiveRunActivity(input.event);
10665
- 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";
10666
10716
  const inspect = `'deepline runs get ${runId} --full --json'`;
10667
- 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;
10668
10718
  if (status === "waiting" && (sleepState !== null || getLiveRunStringField(input.event, "waitKind") === "sleep")) {
10669
10719
  const recordedWake = readLiveRunField(input.event, "waitUntil");
10670
10720
  const projectedWake = sleepState && sleepState.resumeAt > activity.observation.observedAt ? sleepState.resumeAt : null;
@@ -10675,7 +10725,7 @@ function getRunLifecycleHint(input) {
10675
10725
  };
10676
10726
  }
10677
10727
  const typedEventWaitKind = getLiveRunStringField(input.event, "waitKind");
10678
- 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";
10679
10729
  if (status === "waiting" && (typedEventWaitKind === "integration_event" || typedEventWaitKind === "integration_event_batch" || activityEventWait)) {
10680
10730
  return {
10681
10731
  signature: [
@@ -10748,12 +10798,12 @@ function getFinalStatusFromLiveEvent(event) {
10748
10798
  }
10749
10799
  const payload = getEventPayload(event);
10750
10800
  const packageRun = getRunRecordFromPackage(payload);
10751
- 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]))));
10752
10802
  if (status !== "completed" && status !== "failed" && status !== "cancelled") {
10753
10803
  return null;
10754
10804
  }
10755
- const runId = typeof payload.runId === "string" ? payload.runId : typeof _optionalChain([packageRun, 'optionalAccess', _332 => _332.id]) === "string" ? packageRun.id : "";
10756
- 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;
10757
10807
  return {
10758
10808
  ...payload,
10759
10809
  runId,
@@ -10988,7 +11038,7 @@ function getProgressLinesFromLiveEvent(event) {
10988
11038
  (count2) => typeof count2 === "number" && Number.isSafeInteger(count2) && count2 >= 0
10989
11039
  )) {
10990
11040
  lines.push(
10991
- `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)"}`
10992
11042
  );
10993
11043
  }
10994
11044
  const rowOutcomes = readRowOutcomeSummary({
@@ -11039,7 +11089,7 @@ function getRunningHeartbeatLine(input) {
11039
11089
  return null;
11040
11090
  }
11041
11091
  const activity = getLiveRunActivity(input.event);
11042
- 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";
11043
11093
  if (activity && activity.classified !== false && !activityConflictsWithDurableWait) {
11044
11094
  return `activity ${input.playName}: ${activity.summary}`;
11045
11095
  }
@@ -11078,7 +11128,7 @@ function buildPlayDashboardUrl(baseUrl, playName) {
11078
11128
  }
11079
11129
  function openPlayDashboard(dashboardUrl, open2) {
11080
11130
  if (open2 && dashboardUrl) {
11081
- _chunkU2N4CYT7js.openInBrowser.call(void 0, dashboardUrl);
11131
+ _chunkXZG75ELGjs.openInBrowser.call(void 0, dashboardUrl);
11082
11132
  }
11083
11133
  }
11084
11134
  function printPlayLogLines(input) {
@@ -11130,7 +11180,7 @@ async function waitForPlayCompletionByWatch(input) {
11130
11180
  const confirmAdmission = async () => {
11131
11181
  if (admissionConfirmed) return;
11132
11182
  admissionConfirmed = true;
11133
- 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)]);
11134
11184
  };
11135
11185
  const withDashboardUrl = (status) => input.dashboardUrl ? { ...status, dashboardUrl: input.dashboardUrl } : status;
11136
11186
  const fetchTerminalStatus = async () => {
@@ -11140,7 +11190,7 @@ async function waitForPlayCompletionByWatch(input) {
11140
11190
  billing: false
11141
11191
  });
11142
11192
  } catch (error) {
11143
- if (_chunkGY2EEO2Yjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
11193
+ if (_chunkZGWURYZKjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
11144
11194
  return null;
11145
11195
  }
11146
11196
  throw error;
@@ -11302,14 +11352,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
11302
11352
  let timedOut = false;
11303
11353
  let emittedDashboardUrl = false;
11304
11354
  let lastKnownWorkflowId = "";
11305
- 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;
11306
11356
  let eventCount = 0;
11307
11357
  let firstRunIdMs = null;
11308
11358
  let launchConfirmed = false;
11309
11359
  const confirmAdmission = async (runId) => {
11310
11360
  if (launchConfirmed || !runId || runId === "pending") return;
11311
11361
  launchConfirmed = true;
11312
- await _optionalChain([input, 'access', _344 => _344.onRunAdmitted, 'optionalCall', _345 => _345(runId)]);
11362
+ await _optionalChain([input, 'access', _347 => _347.onRunAdmitted, 'optionalCall', _348 => _348(runId)]);
11313
11363
  };
11314
11364
  let lastPhase = null;
11315
11365
  const timeout = input.waitTimeoutMs === null ? null : setTimeout(
@@ -11329,7 +11379,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
11329
11379
  billing: false
11330
11380
  });
11331
11381
  } catch (error) {
11332
- if (_chunkGY2EEO2Yjs.isTransientPlayRunReadError.call(void 0, error)) {
11382
+ if (_chunkZGWURYZKjs.isTransientPlayRunReadError.call(void 0, error)) {
11333
11383
  return null;
11334
11384
  }
11335
11385
  throw error;
@@ -11361,7 +11411,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
11361
11411
  lastKnownWorkflowId = eventRunId;
11362
11412
  firstRunIdMs ??= Date.now() - startedAt;
11363
11413
  if (runStartedNow) {
11364
- await _optionalChain([input, 'access', _346 => _346.onRunStarted, 'optionalCall', _347 => _347(eventRunId)]);
11414
+ await _optionalChain([input, 'access', _349 => _349.onRunStarted, 'optionalCall', _350 => _350(eventRunId)]);
11365
11415
  }
11366
11416
  }
11367
11417
  if (!launchConfirmed && eventConfirmsPlayRunLaunch(event) && eventRunId === lastKnownWorkflowId) {
@@ -11537,7 +11587,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
11537
11587
  lastPhase
11538
11588
  });
11539
11589
  }
11540
- if (lastKnownWorkflowId && _chunkGY2EEO2Yjs.isTransientPlayRunReadError.call(void 0, error)) {
11590
+ if (lastKnownWorkflowId && _chunkZGWURYZKjs.isTransientPlayRunReadError.call(void 0, error)) {
11541
11591
  if (timeout) {
11542
11592
  clearTimeout(timeout);
11543
11593
  }
@@ -11573,7 +11623,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
11573
11623
  onRunAdmitted: confirmAdmission
11574
11624
  });
11575
11625
  }
11576
- if (!lastKnownWorkflowId && _chunkGY2EEO2Yjs.isTransientPlayRunReadError.call(void 0, error)) {
11626
+ if (!lastKnownWorkflowId && _chunkZGWURYZKjs.isTransientPlayRunReadError.call(void 0, error)) {
11577
11627
  _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
11578
11628
  phase: "cli.play_start_stream_transient_failure",
11579
11629
  ms: Date.now() - startedAt,
@@ -11672,29 +11722,29 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
11672
11722
  "logs"
11673
11723
  ]);
11674
11724
  function formatPlayLogLine(rawLine, state) {
11675
- const classified = _chunkGY2EEO2Yjs.classifyLogLine.call(void 0, rawLine);
11725
+ const classified = _chunkZGWURYZKjs.classifyLogLine.call(void 0, rawLine);
11676
11726
  const line = classified.line;
11677
11727
  const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
11678
- 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;
11679
11729
  const timestamp = parsedTimestamp && !Number.isNaN(parsedTimestamp.getTime()) ? parsedTimestamp.toLocaleTimeString("en-US", {
11680
11730
  hour12: false,
11681
11731
  hour: "2-digit",
11682
11732
  minute: "2-digit",
11683
11733
  second: "2-digit"
11684
11734
  }) : null;
11685
- const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _349 => _349[2]]), () => ( line));
11735
+ const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _352 => _352[2]]), () => ( line));
11686
11736
  const prefix = timestamp ? `${timestamp} ` : "";
11687
11737
  if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
11688
11738
  const providerWait = formatProviderCapacityWaitLogLine(line);
11689
11739
  if (providerWait && !state.verbose) {
11690
- return _chunkGY2EEO2Yjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
11740
+ return _chunkZGWURYZKjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
11691
11741
  }
11692
11742
  const mapProgress = formatMapProgressDiagnosticLogLine(line);
11693
11743
  if (mapProgress && !state.verbose) {
11694
- return _chunkGY2EEO2Yjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
11744
+ return _chunkZGWURYZKjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
11695
11745
  }
11696
11746
  if (/\[worker\] picked up run\b/.test(message)) {
11697
- if (!_chunkGY2EEO2Yjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11747
+ if (!_chunkZGWURYZKjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11698
11748
  return null;
11699
11749
  }
11700
11750
  if (state.emittedRunnerStarted) {
@@ -11707,7 +11757,7 @@ function formatPlayLogLine(rawLine, state) {
11707
11757
  /^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
11708
11758
  );
11709
11759
  if (mapStart) {
11710
- if (!_chunkGY2EEO2Yjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11760
+ if (!_chunkZGWURYZKjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11711
11761
  return null;
11712
11762
  }
11713
11763
  const [, rows, fields2, namespace, cached, pending] = mapStart;
@@ -11717,7 +11767,7 @@ function formatPlayLogLine(rawLine, state) {
11717
11767
  /^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
11718
11768
  );
11719
11769
  if (mapDone) {
11720
- if (!_chunkGY2EEO2Yjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11770
+ if (!_chunkZGWURYZKjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11721
11771
  return null;
11722
11772
  }
11723
11773
  const [, results, executed, cached] = mapDone;
@@ -11747,7 +11797,7 @@ function formatProviderCapacityWaitLogLine(line) {
11747
11797
  const record3 = readRecord(parsed);
11748
11798
  if (!record3) return null;
11749
11799
  details = record3;
11750
- } catch (e12) {
11800
+ } catch (e13) {
11751
11801
  return null;
11752
11802
  }
11753
11803
  const provider = typeof details.provider === "string" ? details.provider.trim() : "";
@@ -11767,7 +11817,7 @@ function formatMapProgressDiagnosticLogLine(line) {
11767
11817
  const record3 = readRecord(parsed);
11768
11818
  if (!record3) return null;
11769
11819
  details = record3;
11770
- } catch (e13) {
11820
+ } catch (e14) {
11771
11821
  return null;
11772
11822
  }
11773
11823
  const map = typeof details.map === "string" ? details.map.trim() : "";
@@ -11899,20 +11949,20 @@ function collectDatasetHandleLines(value, path = "result") {
11899
11949
  function buildRunWarnings(status, rowsInfo) {
11900
11950
  const rowOutcomes = readRowOutcomeSummary(status);
11901
11951
  const result = readRecord(status.result);
11902
- const metadata = readRecord(_optionalChain([result, 'optionalAccess', _350 => _350._metadata]));
11903
- 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) => {
11904
11954
  if (!warning) return false;
11905
11955
  return !(rowsInfo && !rowsInfo.complete && warning.reason === "array_preview_limit" && warning.originalItems === rowsInfo.totalRows && warning.retainedItems === rowsInfo.rows.length);
11906
- }).map((warning) => _optionalChain([warning, 'optionalAccess', _352 => _352.message])).filter(
11956
+ }).map((warning) => _optionalChain([warning, 'optionalAccess', _355 => _355.message])).filter(
11907
11957
  (message) => typeof message === "string" && message.trim().length > 0
11908
11958
  ).slice(0, 16) : [];
11909
- const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _353 => _353.hasRowFailures]) ? [
11959
+ const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _356 => _356.hasRowFailures]) ? [
11910
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.`
11911
11961
  ] : [];
11912
- const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _354 => _354.supersededRows]), () => ( 0))) > 0 ? [
11962
+ const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _357 => _357.supersededRows]), () => ( 0))) > 0 ? [
11913
11963
  `Latest-write-wins: ${formatSupersededRowsNotice(_nullishCoalesce(rowOutcomes.supersededRows, () => ( 0)))}; the newer write still owns that Runtime Sheet row.`
11914
11964
  ] : [];
11915
- if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _355 => _355.totalRows]) === 0) {
11965
+ if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _358 => _358.totalRows]) === 0) {
11916
11966
  return [
11917
11967
  ...rowOutcomeWarnings,
11918
11968
  ...supersededRowNotices,
@@ -11931,7 +11981,7 @@ function buildRunWarnings(status, rowsInfo) {
11931
11981
  return [...rowOutcomeWarnings, ...supersededRowNotices, ...outputWarnings];
11932
11982
  }
11933
11983
  function buildRunNextCommands(status) {
11934
- 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()]);
11935
11985
  if (!runId) {
11936
11986
  const playName = extractRunPlayName(status);
11937
11987
  return playName ? {
@@ -12037,7 +12087,7 @@ function extractJsonObjectFromText(text) {
12037
12087
  try {
12038
12088
  const parsed = JSON.parse(suffix);
12039
12089
  return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null;
12040
- } catch (e14) {
12090
+ } catch (e15) {
12041
12091
  let depth = 0;
12042
12092
  let inString = false;
12043
12093
  let escaped = false;
@@ -12063,7 +12113,7 @@ function extractJsonObjectFromText(text) {
12063
12113
  try {
12064
12114
  const parsed = JSON.parse(text.slice(start, index + 1));
12065
12115
  return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null;
12066
- } catch (e15) {
12116
+ } catch (e16) {
12067
12117
  return null;
12068
12118
  }
12069
12119
  }
@@ -12084,14 +12134,14 @@ function extractToolIdFromErrorText(text) {
12084
12134
  return null;
12085
12135
  }
12086
12136
  const lowerToolMatch = /\btool\s+([A-Za-z0-9_.:-]+)\s+\d{3}\b/.exec(text);
12087
- if (_optionalChain([lowerToolMatch, 'optionalAccess', _359 => _359[1]])) {
12137
+ if (_optionalChain([lowerToolMatch, 'optionalAccess', _362 => _362[1]])) {
12088
12138
  return lowerToolMatch[1];
12089
12139
  }
12090
12140
  const upperToolMatch = /\bTool\s+([A-Za-z0-9_.:-]+)\s+failed\b/.exec(text);
12091
- return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _360 => _360[1]]), () => ( null));
12141
+ return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _363 => _363[1]]), () => ( null));
12092
12142
  }
12093
12143
  function isInsufficientCreditsBilling(billing) {
12094
- return _optionalChain([billing, 'optionalAccess', _361 => _361.kind]) === "insufficient_credits";
12144
+ return _optionalChain([billing, 'optionalAccess', _364 => _364.kind]) === "insufficient_credits";
12095
12145
  }
12096
12146
  function extractBillingForStatus(status, error) {
12097
12147
  const errorBilling = getObjectField(status, "errorBilling");
@@ -12131,8 +12181,8 @@ function formatInsufficientCreditsMessage(input) {
12131
12181
  function buildInsufficientCreditsSummaryLines(input) {
12132
12182
  const progress = input.status.progress;
12133
12183
  const rowsInfo = extractCanonicalRowsInfo(input.status);
12134
- const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _362 => _362.rows, 'access', _363 => _363.length]))), () => ( null));
12135
- 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));
12136
12186
  const lines = [
12137
12187
  " status: stopped_insufficient_credits",
12138
12188
  completed === null ? " completed rows: unknown" : ` completed rows: ${formatInteger(completed)}${total !== null ? ` of ${formatInteger(total)}` : ""}`,
@@ -12151,7 +12201,7 @@ function buildInsufficientCreditsSummaryLines(input) {
12151
12201
  lines.push(" ask user: ask whether they want to add Deepline credits");
12152
12202
  lines.push(` top up after approval: ${recovery.topUp}`);
12153
12203
  lines.push(` checkout fallback: ${recovery.checkout}`);
12154
- 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()]);
12155
12205
  if (runId) {
12156
12206
  lines.push(` inspect: deepline runs get ${runId} --json`);
12157
12207
  lines.push(
@@ -12233,10 +12283,10 @@ function normalizeRunStatusForEnvelope(status) {
12233
12283
  function normalizeProgressForEnvelope(status, rowsInfo) {
12234
12284
  const progress = status.progress;
12235
12285
  const rowOutcomes = readRowOutcomeSummary(status);
12236
- 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));
12237
- const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _371 => _371.failedRows]), () => ( getNumericField(progress, "failed"))), () => ( getNumericField(progress, "failedRows"))), () => ( null));
12238
- const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _372 => _372.completedRows]), () => ( getNumericField(progress, "completed"))), () => ( getNumericField(progress, "completedRows"))), () => ( (status.status === "completed" ? total : null)));
12239
- 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")));
12240
12290
  const supersededOffset = _nullishCoalesce(supersededRows, () => ( 0));
12241
12291
  const progressPending = getNumericField(progress, "pending");
12242
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)));
@@ -12306,7 +12356,7 @@ function normalizeErrorsForEnvelope(status, error) {
12306
12356
  ];
12307
12357
  }
12308
12358
  function normalizeLogsForEnvelope(status) {
12309
- 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 : [];
12310
12360
  const totalCount = logs.length;
12311
12361
  const entries = logs.slice(Math.max(0, logs.length - RUN_LOG_PREVIEW_LIMIT));
12312
12362
  const firstSequence = entries.length === 0 ? null : logs.length - entries.length + 1;
@@ -12363,7 +12413,7 @@ function compactPlayStatus(status) {
12363
12413
  const packaged = getPlayRunPackage(status);
12364
12414
  if (packaged) {
12365
12415
  const packagedRun = readRecord(packaged.run);
12366
- 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;
12367
12417
  const error2 = _nullishCoalesce(selectRunErrorForDisplay(status), () => ( (typeof status.error === "string" ? String(status.error) : packagedError)));
12368
12418
  const compactError = error2 ? compactRunErrorForEnvelope(error2, status.runId) : null;
12369
12419
  const rowOutcomes2 = readRowOutcomeSummary(status);
@@ -12514,7 +12564,7 @@ function formatTopValuesPart(value) {
12514
12564
  }
12515
12565
  function formatPackageDatasetSummaryLines(summary, indent = " ") {
12516
12566
  const record3 = readRecord(summary);
12517
- const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _377 => _377.columnStats]));
12567
+ const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _380 => _380.columnStats]));
12518
12568
  if (!record3 || !columnStats) {
12519
12569
  return [];
12520
12570
  }
@@ -12602,7 +12652,7 @@ function packageDatasetRecords(packaged) {
12602
12652
  if (catalog.length > 0) return catalog;
12603
12653
  return readRecordArray(packaged.steps).flatMap((step) => {
12604
12654
  const output = readRecord(step.output);
12605
- return _optionalChain([output, 'optionalAccess', _378 => _378.kind]) === "dataset" ? [output] : [];
12655
+ return _optionalChain([output, 'optionalAccess', _381 => _381.kind]) === "dataset" ? [output] : [];
12606
12656
  });
12607
12657
  }
12608
12658
  function packageReturnedDatasetIdentity(packaged) {
@@ -12611,7 +12661,7 @@ function packageReturnedDatasetIdentity(packaged) {
12611
12661
  const outputs = _nullishCoalesce(readRecord(packaged.outputs), () => ( {}));
12612
12662
  for (const outputValue of Object.values(outputs)) {
12613
12663
  const output = readRecord(outputValue);
12614
- if (_optionalChain([output, 'optionalAccess', _379 => _379.kind]) !== "dataset") continue;
12664
+ if (_optionalChain([output, 'optionalAccess', _382 => _382.kind]) !== "dataset") continue;
12615
12665
  if (typeof output.datasetId === "string" && output.datasetId.trim()) {
12616
12666
  datasetIds.add(output.datasetId.trim());
12617
12667
  }
@@ -12647,7 +12697,7 @@ function formatRunStepProgress(progress, includeRowOutcomes = false) {
12647
12697
  }
12648
12698
  function formatPackageDatasetActionLines(packaged, options) {
12649
12699
  const returned = packageReturnedDatasetIdentity(packaged);
12650
- const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _380 => _380.includeSummary]), () => ( true));
12700
+ const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _383 => _383.includeSummary]), () => ( true));
12651
12701
  const lines = [];
12652
12702
  const steps = readRecordArray(packaged.steps);
12653
12703
  const stepsByDatasetId = /* @__PURE__ */ new Map();
@@ -12656,10 +12706,10 @@ function formatPackageDatasetActionLines(packaged, options) {
12656
12706
  for (const step of steps) {
12657
12707
  if (step.kind !== "dataset") continue;
12658
12708
  const output = readRecord(step.output);
12659
- if (typeof _optionalChain([output, 'optionalAccess', _381 => _381.datasetId]) === "string") {
12709
+ if (typeof _optionalChain([output, 'optionalAccess', _384 => _384.datasetId]) === "string") {
12660
12710
  stepsByDatasetId.set(output.datasetId, step);
12661
12711
  }
12662
- if (typeof _optionalChain([output, 'optionalAccess', _382 => _382.path]) === "string") {
12712
+ if (typeof _optionalChain([output, 'optionalAccess', _385 => _385.path]) === "string") {
12663
12713
  stepsByPath.set(output.path, step);
12664
12714
  }
12665
12715
  if (typeof step.id === "string") {
@@ -12673,8 +12723,8 @@ function formatPackageDatasetActionLines(packaged, options) {
12673
12723
  const category = isReturned ? "returned" : dataset.recovered === true ? "recovered" : "persisted";
12674
12724
  const rowCount = typeof dataset.rowCount === "number" && Number.isFinite(dataset.rowCount) ? Math.max(0, Math.trunc(dataset.rowCount)) : null;
12675
12725
  const lifecycle = readRecord(dataset.lifecycle);
12676
- const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess', _383 => _383.complete]) === false;
12677
- 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;
12678
12728
  const actions2 = _nullishCoalesce(readRecord(dataset.actions), () => ( {}));
12679
12729
  if (countUnconfirmed) {
12680
12730
  lines.push(
@@ -12692,7 +12742,7 @@ function formatPackageDatasetActionLines(packaged, options) {
12692
12742
  }
12693
12743
  }
12694
12744
  const step = _nullishCoalesce(_nullishCoalesce((datasetId ? stepsByDatasetId.get(datasetId) : void 0), () => ( stepsByPath.get(path))), () => ( (typeof dataset.tableNamespace === "string" ? stepsByNamespace.get(dataset.tableNamespace) : void 0)));
12695
- const progress = readRecord(_optionalChain([step, 'optionalAccess', _385 => _385.progress]));
12745
+ const progress = readRecord(_optionalChain([step, 'optionalAccess', _388 => _388.progress]));
12696
12746
  if (progress) {
12697
12747
  lines.push(` progress: ${formatRunStepProgress(progress)}`);
12698
12748
  }
@@ -12706,10 +12756,10 @@ function formatPackageDatasetActionLines(packaged, options) {
12706
12756
  }
12707
12757
  const exportAction = readRecord(actions2.exportCsv);
12708
12758
  const exportCommand = actionToCommand(exportAction);
12709
- const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _386 => _386.scope]));
12759
+ const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _389 => _389.scope]));
12710
12760
  const queryAction = readRecord(actions2.query);
12711
- const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess', _387 => _387.scope]));
12712
- 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;
12713
12763
  const currentQueryCommand = actionToCommand(actions2.queryCurrentTable);
12714
12764
  const legacyQueryCommand = actionToCommand(actions2.query);
12715
12765
  if (runQueryCommand) {
@@ -12721,11 +12771,11 @@ function formatPackageDatasetActionLines(packaged, options) {
12721
12771
  }
12722
12772
  if (exportCommand) {
12723
12773
  lines.push(
12724
- _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}`
12725
12775
  );
12726
12776
  }
12727
12777
  const unavailable = readRecord(dataset.exportUnavailable);
12728
- 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") {
12729
12779
  lines.push(
12730
12780
  ` export unavailable (${unavailable.reason}): ${unavailable.message}`
12731
12781
  );
@@ -12742,7 +12792,7 @@ function packageSavedRowCount(packaged) {
12742
12792
  }
12743
12793
  function runtimeLimitWindowLabel(runtimeLimitFailure) {
12744
12794
  const message = _nullishCoalesce(getStringField(runtimeLimitFailure, "message"), () => ( ""));
12745
- 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]]);
12746
12796
  if (configuredSeconds) {
12747
12797
  const seconds = Number(configuredSeconds);
12748
12798
  if (Number.isSafeInteger(seconds) && seconds > 0) {
@@ -12789,7 +12839,7 @@ function formatPackageValueOutputLines(packaged) {
12789
12839
  if (!outputs) return [];
12790
12840
  const returned = Object.entries(outputs).filter(([, output]) => {
12791
12841
  const record3 = readRecord(output);
12792
- 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");
12793
12843
  });
12794
12844
  if (returned.length === 0) return [];
12795
12845
  const datasets = packageDatasetRecords(packaged);
@@ -12809,10 +12859,10 @@ function formatPackageValueOutputLines(packaged) {
12809
12859
  (candidate) => typeof output.datasetId === "string" && candidate.datasetId === output.datasetId || candidate.path === path
12810
12860
  );
12811
12861
  const stepOutput = datasetSteps.map((step) => readRecord(step.output)).find(
12812
- (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
12813
12863
  );
12814
- const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _398 => _398.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _399 => _399.preview]))));
12815
- 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) : [];
12816
12866
  if (rows.length > 0) {
12817
12867
  lines.push(` sample rows (${rows.length}):`);
12818
12868
  lines.push(
@@ -12838,7 +12888,7 @@ function formatPackageValueOutputLines(packaged) {
12838
12888
  return lines;
12839
12889
  }
12840
12890
  function authoredPackageStackFrames(packaged) {
12841
- 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()])));
12842
12892
  if (!stack) return [];
12843
12893
  return stack.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).filter(
12844
12894
  (line) => !line.includes("/virtual/deepline-plays/") && !line.includes("/apps/play-runner/") && !line.includes("/shared_libs/play-runtime/") && !line.includes("node:internal")
@@ -12870,9 +12920,9 @@ function activityIsoTimestamp(value) {
12870
12920
  }
12871
12921
  function buildRunActivityTextLines(run) {
12872
12922
  const activity = readRecord(run.activity);
12873
- const observation = readRecord(_optionalChain([activity, 'optionalAccess', _403 => _403.observation]));
12874
- const state = readRecord(_optionalChain([observation, 'optionalAccess', _404 => _404.state]));
12875
- 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]));
12876
12926
  if (!activity || !observation || !state) return [];
12877
12927
  const kind = typeof state.kind === "string" ? state.kind : "unknown";
12878
12928
  if (kind === "completed") return [];
@@ -12917,11 +12967,11 @@ function buildRunActivityTextLines(run) {
12917
12967
  }
12918
12968
  function formatObservedRunCounter(value) {
12919
12969
  const counter = readRecord(value);
12920
- const count2 = _optionalChain([counter, 'optionalAccess', _406 => _406.value]);
12970
+ const count2 = _optionalChain([counter, 'optionalAccess', _409 => _409.value]);
12921
12971
  if (typeof count2 !== "number" || !Number.isSafeInteger(count2) || count2 < 0) {
12922
12972
  return "unknown";
12923
12973
  }
12924
- 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`;
12925
12975
  }
12926
12976
  function buildRunStatusEvidenceTextLines(packaged) {
12927
12977
  const evidence = readRecord(packaged.runStatus);
@@ -12934,13 +12984,13 @@ function buildRunStatusEvidenceTextLines(packaged) {
12934
12984
  );
12935
12985
  }
12936
12986
  const source = readRecord(evidence.source);
12937
- if (_optionalChain([source, 'optionalAccess', _408 => _408.aligned]) === false) {
12987
+ if (_optionalChain([source, 'optionalAccess', _411 => _411.aligned]) === false) {
12938
12988
  lines.push(
12939
12989
  ` consistency: run snapshot event ${String(source.runSnapshotLedgerNextSeq)} and progress event ${String(source.ledgerNextSeq)} differ; retry this read to align them`
12940
12990
  );
12941
12991
  }
12942
12992
  const focus = readRecord(evidence.focusStep);
12943
- const rows = readRecord(_optionalChain([focus, 'optionalAccess', _409 => _409.rows]));
12993
+ const rows = readRecord(_optionalChain([focus, 'optionalAccess', _412 => _412.rows]));
12944
12994
  if (focus) {
12945
12995
  const id = typeof focus.id === "string" && focus.id.trim() ? focus.id.trim() : "unknown step";
12946
12996
  const label = typeof focus.label === "string" && focus.label.trim() ? ` (${focus.label.trim()})` : "";
@@ -12948,7 +12998,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
12948
12998
  const known = readRecordArray(packaged.steps).find(
12949
12999
  (step) => typeof step.id === "string" && (id === step.id || id.endsWith(`:${step.id}`)) && typeof step.label === "string"
12950
13000
  );
12951
- 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(
12952
13002
  deriveNodeExecutionState({
12953
13003
  reported: {
12954
13004
  status: focus.status.trim(),
@@ -12958,7 +13008,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
12958
13008
  total: rows.total
12959
13009
  } : null
12960
13010
  },
12961
- runStatus: _optionalChain([run, 'optionalAccess', _411 => _411.status])
13011
+ runStatus: _optionalChain([run, 'optionalAccess', _414 => _414.status])
12962
13012
  })
12963
13013
  ) : null;
12964
13014
  lines.push(` current step: ${id}${label}${state ? `: ${state}` : ""}`);
@@ -13006,7 +13056,7 @@ function formatRecentRunLogLines(value) {
13006
13056
  (line) => typeof line === "string"
13007
13057
  );
13008
13058
  if (tail.length === 0) return [];
13009
- const shown = tail.map((line) => _chunkGY2EEO2Yjs.classifyLogLine.call(void 0, line)).filter(
13059
+ const shown = tail.map((line) => _chunkZGWURYZKjs.classifyLogLine.call(void 0, line)).filter(
13010
13060
  (entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
13011
13061
  ).slice(-8);
13012
13062
  const total = readNonNegativeInteger(logs.totalCount);
@@ -13050,7 +13100,7 @@ function buildRunPackageTextLines(packaged) {
13050
13100
  lines.push(` recovery: ${mode}${sourceRunId}`);
13051
13101
  }
13052
13102
  const runError = typeof run.error === "string" && run.error.trim() ? run.error.trim() : null;
13053
- 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;
13054
13104
  const displayRunError = _nullishCoalesce(structuredRuntimeLimitMessage, () => ( runError));
13055
13105
  if (!isRuntimeLimitCheckpoint && displayRunError && (status === "failed" || status === "cancelled")) {
13056
13106
  lines.push(` error: ${truncateErrorForDisplay(displayRunError, runId)}`);
@@ -13061,11 +13111,11 @@ function buildRunPackageTextLines(packaged) {
13061
13111
  }
13062
13112
  }
13063
13113
  const failedLogs = readRecord(packaged.failedLogs);
13064
- 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(
13065
13115
  (entry) => typeof entry === "string"
13066
13116
  ) : [];
13067
- const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _414 => _414.association]) === "string" ? failedLogs.association : null;
13068
- 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;
13069
13119
  if (failedLogEntries.length > 0) {
13070
13120
  lines.push(" failed logs:");
13071
13121
  lines.push(...failedLogEntries.map((entry) => ` ${entry}`));
@@ -13084,8 +13134,8 @@ function buildRunPackageTextLines(packaged) {
13084
13134
  )
13085
13135
  ).slice(0, 16) : [];
13086
13136
  lines.push(...packageWarnings.map((warning) => ` warning: ${warning}`));
13087
- const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _416 => _416.next]));
13088
- 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") {
13089
13139
  lines.push(
13090
13140
  failedLogAssociation === "retained_before_truncation" ? ` retained logs: ${failedLogNext.logs}` : ` retry failed logs: ${failedLogNext.logs}`
13091
13141
  );
@@ -13113,20 +13163,20 @@ function buildRunPackageTextLines(packaged) {
13113
13163
  const stepStatus = typeof step.status === "string" ? step.status : status;
13114
13164
  const output = step.output && typeof step.output === "object" && !Array.isArray(step.output) ? step.output : null;
13115
13165
  const rowCount = output && typeof output.rowCount === "number" ? ` rows=${formatInteger(output.rowCount)}` : "";
13116
- const preview = _optionalChain([output, 'optionalAccess', _418 => _418.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
13117
- 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;
13118
13168
  lines.push(` ${kind} ${id}: ${stepStatus}${rowCount}`);
13119
- lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _420 => _420.summary])));
13169
+ lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _423 => _423.summary])));
13120
13170
  if (previewRows !== null) {
13121
13171
  lines.push(
13122
- ` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _421 => _421.truncated]) ? " truncated" : ""}`
13172
+ ` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _424 => _424.truncated]) ? " truncated" : ""}`
13123
13173
  );
13124
13174
  }
13125
13175
  }
13126
13176
  const inspectCommand = actionToCommand(next.inspect);
13127
13177
  const fullResultCommand = actionToCommand(next.full);
13128
13178
  const hasCatalogExportAction = packageDatasetRecords(packaged).some(
13129
- (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])))
13130
13180
  );
13131
13181
  const legacyExportCommand = hasCatalogExportAction ? null : actionToCommand(next.export);
13132
13182
  const runAgainCommand = typeof next.run === "string" && next.run.trim() ? next.run.trim() : null;
@@ -13188,7 +13238,7 @@ function withOrdinaryRunAgainCommand(status, options, resolvedRevisionId) {
13188
13238
  }
13189
13239
  function buildBillingRollupTextLines(status) {
13190
13240
  const billing = status.billing;
13191
- const rollup = _optionalChain([billing, 'optionalAccess', _424 => _424.rollup]);
13241
+ const rollup = _optionalChain([billing, 'optionalAccess', _427 => _427.rollup]);
13192
13242
  if (!rollup) return [];
13193
13243
  const total = formatCreditAmount2(rollup.totalCreditsRollup);
13194
13244
  if (rollup.childCredits > 0 && rollup.descendantRunCount > 0) {
@@ -13233,7 +13283,7 @@ function buildPlayCompletionTextLines(status) {
13233
13283
  const overview = buildRunOverview(status);
13234
13284
  const { run } = overview;
13235
13285
  const failed = run.status === "failed";
13236
- 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;
13237
13287
  const lines = [
13238
13288
  `${label} ${_nullishCoalesce(_nullishCoalesce(run.playName, () => ( status.playName)), () => ( "Play"))}`,
13239
13289
  `Run: ${run.id}`
@@ -13253,7 +13303,7 @@ function buildPlayCompletionTextLines(status) {
13253
13303
  ...formatJsonPreview(compactReturnValue(overview.result))
13254
13304
  );
13255
13305
  }
13256
- if (_optionalChain([overview, 'access', _427 => _427.rowOutcomes, 'optionalAccess', _428 => _428.hasRowFailures])) {
13306
+ if (_optionalChain([overview, 'access', _430 => _430.rowOutcomes, 'optionalAccess', _431 => _431.hasRowFailures])) {
13257
13307
  lines.push(
13258
13308
  `Rows: ${overview.rowOutcomes.completedRows} completed, ${overview.rowOutcomes.failedRows} failed`
13259
13309
  );
@@ -13282,16 +13332,16 @@ function buildPlayCompletionTextLines(status) {
13282
13332
  }
13283
13333
  function writePlayResult(status, jsonOutput, options) {
13284
13334
  const packaged = getPlayRunPackage(status);
13285
- const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _429 => _429.hits]), () => ( null));
13335
+ const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _432 => _432.hits]), () => ( null));
13286
13336
  if (jsonOutput) {
13287
- const payload2 = _optionalChain([options, 'optionalAccess', _430 => _430.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
13288
- _chunkU2N4CYT7js.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
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
13289
13339
  hits ? { ...payload2, hits } : payload2,
13290
- { json: true, fields: _optionalChain([options, 'optionalAccess', _431 => _431.jsonFields]) }
13340
+ { json: true, fields: _optionalChain([options, 'optionalAccess', _434 => _434.jsonFields]) }
13291
13341
  );
13292
13342
  return;
13293
13343
  }
13294
- if (packaged && !_optionalChain([options, 'optionalAccess', _432 => _432.fullJson])) {
13344
+ if (packaged && !_optionalChain([options, 'optionalAccess', _435 => _435.fullJson])) {
13295
13345
  const {
13296
13346
  logs: _logs,
13297
13347
  failedLogs: _failedLogs,
@@ -13301,7 +13351,7 @@ function writePlayResult(status, jsonOutput, options) {
13301
13351
  ...buildPlayCompletionTextLines(status),
13302
13352
  ...formatRunHitsLines(hits)
13303
13353
  ];
13304
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0, displayPackage, {
13354
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0, displayPackage, {
13305
13355
  json: false,
13306
13356
  text: `${lines2.join("\n")}
13307
13357
  `
@@ -13351,8 +13401,8 @@ function writePlayResult(status, jsonOutput, options) {
13351
13401
  lines.push(...renderedServerView.actions);
13352
13402
  lines.push(...buildBillingRollupTextLines(status));
13353
13403
  const compact = compactPlayStatus(status);
13354
- const payload = _optionalChain([options, 'optionalAccess', _433 => _433.fullJson]) ? status : compact;
13355
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
13404
+ const payload = _optionalChain([options, 'optionalAccess', _436 => _436.fullJson]) ? status : compact;
13405
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
13356
13406
  {
13357
13407
  ...payload,
13358
13408
  render: {
@@ -13505,14 +13555,14 @@ function mergeExportColumns(preferredColumns, rows) {
13505
13555
  return columns;
13506
13556
  }
13507
13557
  function sqlSafeExportColumnName(id) {
13508
- 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]]), () => ( ""));
13509
13559
  const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
13510
13560
  const safe = `${prefix}${normalized || "column"}`;
13511
13561
  return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
13512
13562
  }
13513
13563
  async function fetchBackingDatasetRows(input) {
13514
13564
  const playName = extractRunPlayName(input.status);
13515
- 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()]);
13516
13566
  if (!playName || !tableNamespace) {
13517
13567
  return null;
13518
13568
  }
@@ -13551,7 +13601,7 @@ async function fetchBackingDatasetRows(input) {
13551
13601
  seenEnvelopeKeys.add(key);
13552
13602
  }
13553
13603
  sheetRows.push(...page.rows);
13554
- 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]);
13555
13605
  if (typeof summaryTotal === "number" && Number.isFinite(summaryTotal)) {
13556
13606
  settledTotal = Math.max(_nullishCoalesce(settledTotal, () => ( 0)), Math.trunc(summaryTotal));
13557
13607
  }
@@ -13711,8 +13761,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
13711
13761
  path: dataset.exportFile(outPath, options),
13712
13762
  rowsInfo: dataset.info(),
13713
13763
  currentTable: false,
13714
- datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _446 => _446.source]), () => ( null)),
13715
- 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))
13716
13766
  };
13717
13767
  };
13718
13768
  const run = Run.open({
@@ -13724,7 +13774,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
13724
13774
  const returnedRows = datasets.returned().map((dataset) => dataset.info());
13725
13775
  const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
13726
13776
  const selectedDataset = run.dataset(options.datasetPath);
13727
- 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));
13728
13778
  if (!selectedDataset && options.datasetPath) {
13729
13779
  const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
13730
13780
  const commands = datasetChoiceLines({
@@ -13836,7 +13886,7 @@ ${commands.join("\n")}`,
13836
13886
  throw error;
13837
13887
  }
13838
13888
  }
13839
- if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _451 => _451.complete])) {
13889
+ if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _454 => _454.complete])) {
13840
13890
  const guarded2 = assertDatasetHasExportableRows({
13841
13891
  rowsInfo: fetchedRowsInfo,
13842
13892
  status,
@@ -13895,7 +13945,7 @@ function extractActiveRunsFromError(error) {
13895
13945
  if (!(error instanceof _chunk7P5AA3SNjs.DeeplineError)) {
13896
13946
  return [];
13897
13947
  }
13898
- 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]);
13899
13949
  if (!response || typeof response !== "object" || Array.isArray(response)) {
13900
13950
  return [];
13901
13951
  }
@@ -14016,8 +14066,8 @@ function renderServerResultView(value) {
14016
14066
  return { lines: [], actions: [] };
14017
14067
  }
14018
14068
  const view = value;
14019
- const renderedSections = Array.isArray(_optionalChain([view, 'access', _454 => _454.render, 'optionalAccess', _455 => _455.sections])) ? view.render.sections : [];
14020
- 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 : [];
14021
14071
  if (renderedSections.length > 0 || renderedActions.length > 0) {
14022
14072
  const lines2 = [];
14023
14073
  for (const section of renderedSections) {
@@ -14055,7 +14105,7 @@ function renderServerResultView(value) {
14055
14105
  }
14056
14106
  const tables = Array.isArray(view.tables) ? view.tables : [];
14057
14107
  const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
14058
- if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _458 => _458.queryCommand]) === "string") {
14108
+ if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _461 => _461.queryCommand]) === "string") {
14059
14109
  lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
14060
14110
  }
14061
14111
  if (tables.length > 0) {
@@ -14109,7 +14159,7 @@ function writeStartedPlayRun(input) {
14109
14159
  dashboardUrl: input.dashboardUrl,
14110
14160
  package: input.package
14111
14161
  };
14112
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
14162
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
14113
14163
  json: true,
14114
14164
  fields: input.jsonFields
14115
14165
  });
@@ -14131,7 +14181,7 @@ function writeStartedPlayRun(input) {
14131
14181
  input.progress.writeLine(output2, process.stdout);
14132
14182
  return;
14133
14183
  }
14134
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0, input.package, {
14184
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0, input.package, {
14135
14185
  json: false,
14136
14186
  text: `${output2}
14137
14187
  `
@@ -14160,7 +14210,7 @@ function writeStartedPlayRun(input) {
14160
14210
  ) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)} --json`] : []
14161
14211
  ];
14162
14212
  if (input.jsonOutput) {
14163
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
14213
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
14164
14214
  return;
14165
14215
  }
14166
14216
  if (input.dashboardUrl) {
@@ -14171,7 +14221,7 @@ function writeStartedPlayRun(input) {
14171
14221
  input.progress.writeLine(output, process.stdout);
14172
14222
  return;
14173
14223
  }
14174
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
14224
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
14175
14225
  {
14176
14226
  ...payload,
14177
14227
  render: { sections: [{ title: "play run", lines }] }
@@ -14181,7 +14231,7 @@ function writeStartedPlayRun(input) {
14181
14231
  );
14182
14232
  }
14183
14233
  function parsePlayCheckOptions(args) {
14184
- const selection = _chunkU2N4CYT7js.parseJsonFields.call(void 0, args, "check");
14234
+ const selection = _chunkXZG75ELGjs.parseJsonFields.call(void 0, args, "check");
14185
14235
  args = selection.args;
14186
14236
  const target = args[0];
14187
14237
  if (!target || target.startsWith("-")) {
@@ -14193,7 +14243,7 @@ function parsePlayCheckOptions(args) {
14193
14243
  if (arg !== "--json" && arg !== "--full")
14194
14244
  throw new Error(`Unknown plays check option: ${arg}`);
14195
14245
  }
14196
- const jsonOutput = _chunkU2N4CYT7js.argsWantJson.call(void 0, args);
14246
+ const jsonOutput = _chunkXZG75ELGjs.argsWantJson.call(void 0, args);
14197
14247
  return {
14198
14248
  target,
14199
14249
  jsonOutput,
@@ -14269,7 +14319,7 @@ ${PLAY_PUBLISH_USAGE}`
14269
14319
  useLatest,
14270
14320
  expectedArtifactHash,
14271
14321
  dryRun,
14272
- jsonOutput: _chunkU2N4CYT7js.argsWantJson.call(void 0, args)
14322
+ jsonOutput: _chunkXZG75ELGjs.argsWantJson.call(void 0, args)
14273
14323
  };
14274
14324
  }
14275
14325
  var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
@@ -14310,7 +14360,7 @@ ${PLAY_SAVE_USAGE}`);
14310
14360
  target,
14311
14361
  expectedArtifactHash,
14312
14362
  dryRun,
14313
- jsonOutput: _chunkU2N4CYT7js.argsWantJson.call(void 0, args)
14363
+ jsonOutput: _chunkXZG75ELGjs.argsWantJson.call(void 0, args)
14314
14364
  };
14315
14365
  }
14316
14366
  function printScheduledPlayCapacity(capacity) {
@@ -14363,7 +14413,7 @@ function checkHintExpression(value) {
14363
14413
  return stringValue3(value).replace(/^toolExecutionResult\./, "result.");
14364
14414
  }
14365
14415
  function checkHintRawPath(value) {
14366
- 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;
14367
14417
  }
14368
14418
  function collectStaticPipelineToolIds(staticPipeline) {
14369
14419
  const seen = /* @__PURE__ */ new Set();
@@ -14438,30 +14488,30 @@ function cronExecutionLabel(status) {
14438
14488
  }
14439
14489
  function readLiveCronMetadata(play) {
14440
14490
  const record3 = readRecord(play);
14441
- const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _461 => _461.triggerMetadata]));
14491
+ const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _464 => _464.triggerMetadata]));
14442
14492
  return {
14443
- schedule: typeof _optionalChain([metadata, 'optionalAccess', _462 => _462.cronSchedule]) === "string" ? metadata.cronSchedule : null,
14444
- timezone: typeof _optionalChain([metadata, 'optionalAccess', _463 => _463.cronTimezone]) === "string" ? metadata.cronTimezone : null,
14445
- nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _464 => _464.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
14446
- blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _465 => _465.blockedAt]) === "number" ? metadata.blockedAt : null,
14447
- 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
14448
14498
  };
14449
14499
  }
14450
14500
  function liveTriggerStatusLines(status, play) {
14451
14501
  const cron = readLiveCronMetadata(play);
14452
- 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 [];
14453
14503
  const lines = [];
14454
- if (_optionalChain([status, 'optionalAccess', _469 => _469.cron]) || cron.schedule) {
14504
+ if (_optionalChain([status, 'optionalAccess', _472 => _472.cron]) || cron.schedule) {
14455
14505
  const timezone = cron.timezone ? ` (${cron.timezone})` : "";
14456
14506
  lines.push(
14457
- ` 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}` : ""}`
14458
14508
  );
14459
- if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _471 => _471.cron]) === "active") {
14509
+ if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _474 => _474.cron]) === "active") {
14460
14510
  lines.push(
14461
14511
  ` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
14462
14512
  );
14463
14513
  }
14464
- if (_optionalChain([status, 'optionalAccess', _472 => _472.blockedReason])) {
14514
+ if (_optionalChain([status, 'optionalAccess', _475 => _475.blockedReason])) {
14465
14515
  lines.push(` Schedule issue: ${status.blockedReason}`);
14466
14516
  if (status.blockedReasonCode || cron.blockedReasonCode) {
14467
14517
  lines.push(
@@ -14477,7 +14527,7 @@ function liveTriggerStatusLines(status, play) {
14477
14527
  );
14478
14528
  }
14479
14529
  }
14480
- if (_optionalChain([status, 'optionalAccess', _473 => _473.webhook])) {
14530
+ if (_optionalChain([status, 'optionalAccess', _476 => _476.webhook])) {
14481
14531
  lines.push(` Webhook: ${status.webhook}`);
14482
14532
  }
14483
14533
  return lines;
@@ -14485,11 +14535,11 @@ function liveTriggerStatusLines(status, play) {
14485
14535
  function triggerStatusFromMetadata(value) {
14486
14536
  const metadata = readRecord(value);
14487
14537
  return {
14488
- cron: typeof _optionalChain([metadata, 'optionalAccess', _474 => _474.cronStatus]) === "string" ? metadata.cronStatus : null,
14489
- webhook: typeof _optionalChain([metadata, 'optionalAccess', _475 => _475.webhookStatus]) === "string" ? metadata.webhookStatus : null,
14490
- blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _476 => _476.blockedReason]) === "string" ? metadata.blockedReason : null,
14491
- blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _477 => _477.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
14492
- 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
14493
14543
  };
14494
14544
  }
14495
14545
  function printPublishReceipt(input) {
@@ -14521,7 +14571,7 @@ function printBundledRuntimeWarning(bundle) {
14521
14571
  async function handlePlayCheck(args) {
14522
14572
  const options = parsePlayCheckOptions(args);
14523
14573
  if (!isFileTarget2(options.target)) {
14524
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
14574
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
14525
14575
  try {
14526
14576
  await assertCanonicalNamedPlayReference(client, options.target, {
14527
14577
  command: "check"
@@ -14550,7 +14600,7 @@ async function handlePlayCheck(args) {
14550
14600
  },
14551
14601
  ...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
14552
14602
  };
14553
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0, result, {
14603
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0, result, {
14554
14604
  json: options.jsonOutput,
14555
14605
  fields: options.jsonFields,
14556
14606
  text: renderPlayCheckOutput(result) + "\n"
@@ -14560,7 +14610,7 @@ async function handlePlayCheck(args) {
14560
14610
  const resolved = _path.resolve.call(void 0, options.target);
14561
14611
  const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
14562
14612
  if (options.jsonOutput) {
14563
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
14613
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
14564
14614
  {
14565
14615
  kind: "play_check",
14566
14616
  checked: "named_contract",
@@ -14600,9 +14650,9 @@ async function handlePlayCheck(args) {
14600
14650
  target: options.target,
14601
14651
  full: options.full,
14602
14652
  detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full --json`,
14603
- 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
14604
14654
  });
14605
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0, output, {
14655
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0, output, {
14606
14656
  json: options.jsonOutput,
14607
14657
  fields: options.jsonFields,
14608
14658
  text: renderPlayCheckOutput(output) + "\n"
@@ -14615,7 +14665,7 @@ function resolvePlayCheckExportNames(sourceCode) {
14615
14665
  return exports.map((entry) => entry.name);
14616
14666
  }
14617
14667
  function artifactForProductionCompatibilityCheck(artifact) {
14618
- 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()]);
14619
14669
  if (!rawEdition) return artifact;
14620
14670
  if (!/^\d+$/.test(rawEdition)) {
14621
14671
  throw new Error(
@@ -14664,7 +14714,7 @@ async function checkOneExportedPlay(input) {
14664
14714
  result: { valid: false, errors: descriptionErrors }
14665
14715
  };
14666
14716
  }
14667
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
14717
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
14668
14718
  const integrationMode = resolveEvalIntegrationMode();
14669
14719
  const importedPlays = [...graph.nodes.values()].filter((node) => node.filePath !== graph.root.filePath).map((node) => ({
14670
14720
  playName: node.playName,
@@ -14738,7 +14788,7 @@ async function handleFileBackedRun(options, hooks) {
14738
14788
  );
14739
14789
  return 0;
14740
14790
  }
14741
- client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)(playRunClientOptions(options));
14791
+ client = new (0, _chunkZGWURYZKjs.DeeplineClient)(playRunClientOptions(options));
14742
14792
  const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
14743
14793
  if (canDeferCompilerManifest) {
14744
14794
  _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
@@ -14791,7 +14841,7 @@ async function handleFileBackedRun(options, hooks) {
14791
14841
  );
14792
14842
  const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
14793
14843
  const fileInputBindings = _chunkLA46MMTLjs.fileInputBindingsFromStaticPipeline.call(void 0,
14794
- _optionalChain([compilerManifest, 'optionalAccess', _485 => _485.staticPipeline])
14844
+ _optionalChain([compilerManifest, 'optionalAccess', _488 => _488.staticPipeline])
14795
14845
  );
14796
14846
  const stagedFileInputs = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
14797
14847
  "cli.play_stage_inputs",
@@ -14851,8 +14901,8 @@ async function handleFileBackedRun(options, hooks) {
14851
14901
  waitTimeoutMs: options.waitTimeoutMs,
14852
14902
  open: options.open,
14853
14903
  progress,
14854
- onRunStarted: _optionalChain([hooks, 'optionalAccess', _486 => _486.onRunStarted]),
14855
- onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _487 => _487.onRunAdmitted])
14904
+ onRunStarted: _optionalChain([hooks, 'optionalAccess', _489 => _489.onRunStarted]),
14905
+ onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _490 => _490.onRunAdmitted])
14856
14906
  }).catch(async (error) => {
14857
14907
  throw await normalizePlayStartError(client, error, playName);
14858
14908
  })
@@ -14874,7 +14924,7 @@ async function handleFileBackedRun(options, hooks) {
14874
14924
  ),
14875
14925
  options
14876
14926
  );
14877
- _optionalChain([hooks, 'optionalAccess', _488 => _488.onTerminalStatus, 'optionalCall', _489 => _489(outputStatus)]);
14927
+ _optionalChain([hooks, 'optionalAccess', _491 => _491.onTerminalStatus, 'optionalCall', _492 => _492(outputStatus)]);
14878
14928
  traceCliSync(
14879
14929
  "cli.play_write_result",
14880
14930
  { targetKind: "file", playName },
@@ -14893,8 +14943,8 @@ async function handleFileBackedRun(options, hooks) {
14893
14943
  throw await normalizePlayStartError(client, error, playName);
14894
14944
  })
14895
14945
  );
14896
- await _optionalChain([hooks, 'optionalAccess', _490 => _490.onRunStarted, 'optionalCall', _491 => _491(started.workflowId)]);
14897
- 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)]);
14898
14948
  const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
14899
14949
  openPlayDashboard(resolvedDashboardUrl, options.open);
14900
14950
  progress.phase("started run");
@@ -14922,7 +14972,7 @@ async function resolveNamedRunRevisionId(input) {
14922
14972
  if (input.selector === "latest") {
14923
14973
  const versions = await input.client.listPlayVersions(input.playName);
14924
14974
  const latest = versions[0];
14925
- if (!_optionalChain([latest, 'optionalAccess', _494 => _494._id])) {
14975
+ if (!_optionalChain([latest, 'optionalAccess', _497 => _497._id])) {
14926
14976
  throw new Error(`No saved revisions found for ${input.playName}.`);
14927
14977
  }
14928
14978
  return latest._id;
@@ -14933,7 +14983,7 @@ async function handleNamedRun(options, hooks) {
14933
14983
  if (options.target.kind !== "name") {
14934
14984
  throw new Error("Expected a named play run target.");
14935
14985
  }
14936
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)(playRunClientOptions(options));
14986
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)(playRunClientOptions(options));
14937
14987
  const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
14938
14988
  const playName = options.target.name;
14939
14989
  const runtimeInput = options.input ? { ...options.input } : {};
@@ -15039,8 +15089,8 @@ async function handleNamedRun(options, hooks) {
15039
15089
  waitTimeoutMs: options.waitTimeoutMs,
15040
15090
  open: options.open,
15041
15091
  progress,
15042
- onRunStarted: _optionalChain([hooks, 'optionalAccess', _495 => _495.onRunStarted]),
15043
- onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _496 => _496.onRunAdmitted])
15092
+ onRunStarted: _optionalChain([hooks, 'optionalAccess', _498 => _498.onRunStarted]),
15093
+ onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _499 => _499.onRunAdmitted])
15044
15094
  }).catch(async (error) => {
15045
15095
  throw await normalizePlayStartError(client, error, playName, {
15046
15096
  suggestMissingPlay: true
@@ -15065,7 +15115,7 @@ async function handleNamedRun(options, hooks) {
15065
15115
  options,
15066
15116
  _nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
15067
15117
  );
15068
- _optionalChain([hooks, 'optionalAccess', _497 => _497.onTerminalStatus, 'optionalCall', _498 => _498(outputStatus)]);
15118
+ _optionalChain([hooks, 'optionalAccess', _500 => _500.onTerminalStatus, 'optionalCall', _501 => _501(outputStatus)]);
15069
15119
  traceCliSync(
15070
15120
  "cli.play_write_result",
15071
15121
  { targetKind: "name", playName },
@@ -15086,8 +15136,8 @@ async function handleNamedRun(options, hooks) {
15086
15136
  });
15087
15137
  })
15088
15138
  );
15089
- await _optionalChain([hooks, 'optionalAccess', _499 => _499.onRunStarted, 'optionalCall', _500 => _500(started.workflowId)]);
15090
- 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)]);
15091
15141
  const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
15092
15142
  openPlayDashboard(resolvedDashboardUrl, options.open);
15093
15143
  progress.phase("started run");
@@ -15125,7 +15175,7 @@ async function handlePlayRun(args, hooks) {
15125
15175
  { cause: error }
15126
15176
  );
15127
15177
  }
15128
- await _optionalChain([hooks, 'optionalAccess', _503 => _503.onRunStarted, 'optionalCall', _504 => _504(runId)]);
15178
+ await _optionalChain([hooks, 'optionalAccess', _506 => _506.onRunStarted, 'optionalCall', _507 => _507(runId)]);
15129
15179
  },
15130
15180
  onRunAdmitted: async (runId) => {
15131
15181
  try {
@@ -15138,7 +15188,7 @@ async function handlePlayRun(args, hooks) {
15138
15188
  { cause: error }
15139
15189
  );
15140
15190
  }
15141
- await _optionalChain([hooks, 'optionalAccess', _505 => _505.onRunAdmitted, 'optionalCall', _506 => _506(runId)]);
15191
+ await _optionalChain([hooks, 'optionalAccess', _508 => _508.onRunAdmitted, 'optionalCall', _509 => _509(runId)]);
15142
15192
  }
15143
15193
  } : hooks;
15144
15194
  if (options.target.kind === "file") {
@@ -15160,7 +15210,7 @@ async function handlePlayRun(args, hooks) {
15160
15210
  console.error(` ${_path.join.call(void 0, dir, s)}`);
15161
15211
  }
15162
15212
  }
15163
- } catch (e16) {
15213
+ } catch (e17) {
15164
15214
  }
15165
15215
  }
15166
15216
  return 1;
@@ -15216,10 +15266,10 @@ function renderRunOverviewText(overview, extras = {}) {
15216
15266
  ...buildRunActivityTextLines(run),
15217
15267
  ...buildRunStatusEvidenceTextLines(overview)
15218
15268
  ];
15219
- 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)
15220
15270
  lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
15221
- const work = readRecord(_optionalChain([readRecord, 'call', _509 => _509(run), 'optionalAccess', _510 => _510.work]));
15222
- 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]))
15223
15273
  lines.push(
15224
15274
  ` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
15225
15275
  );
@@ -15270,7 +15320,7 @@ function renderRunOverviewText(overview, extras = {}) {
15270
15320
  ...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
15271
15321
  ...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
15272
15322
  ...overview.failedLogs.entries,
15273
- ..._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}`] : []
15274
15324
  ]
15275
15325
  });
15276
15326
  sections.push({
@@ -15330,10 +15380,10 @@ function renderRunOverviewText(overview, extras = {}) {
15330
15380
  );
15331
15381
  return `${lines.join("\n")}
15332
15382
 
15333
- ${_chunkU2N4CYT7js.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
15383
+ ${_chunkXZG75ELGjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
15334
15384
  }
15335
15385
  async function handleRunGet(args) {
15336
- const selection = _chunkU2N4CYT7js.parseJsonFields.call(void 0,
15386
+ const selection = _chunkXZG75ELGjs.parseJsonFields.call(void 0,
15337
15387
  args,
15338
15388
  args.includes("--config") ? "config" : "get"
15339
15389
  );
@@ -15346,7 +15396,7 @@ async function handleRunGet(args) {
15346
15396
  console.error(error instanceof Error ? error.message : usage2);
15347
15397
  return 1;
15348
15398
  }
15349
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
15399
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
15350
15400
  if (args.includes("--config")) {
15351
15401
  if (args.some((arg) => ["--input", "--full", "--log-failed"].includes(arg))) {
15352
15402
  console.error(
@@ -15360,7 +15410,7 @@ async function handleRunGet(args) {
15360
15410
  "This server does not support recorded configuration reads."
15361
15411
  );
15362
15412
  }
15363
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
15413
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
15364
15414
  { runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
15365
15415
  { json: true, fields: selection.fields }
15366
15416
  );
@@ -15368,7 +15418,7 @@ async function handleRunGet(args) {
15368
15418
  }
15369
15419
  if (args.includes("--input")) {
15370
15420
  const input = await client.getRunInput(runId);
15371
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0, input, { json: true });
15421
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0, input, { json: true });
15372
15422
  return 0;
15373
15423
  }
15374
15424
  const full = args.includes("--full");
@@ -15381,8 +15431,8 @@ async function handleRunGet(args) {
15381
15431
  full: true,
15382
15432
  failedLogs: args.includes("--log-failed")
15383
15433
  }) : status;
15384
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
15385
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
15434
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
15435
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
15386
15436
  full ? legacyStatus : compactPlayStatus(legacyStatus),
15387
15437
  { json: true, fields: selection.fields }
15388
15438
  );
@@ -15398,8 +15448,8 @@ async function handleRunGet(args) {
15398
15448
  readRunCredits(client, runId, !TERMINAL_PLAY_STATUSES.has(status.status))
15399
15449
  ]);
15400
15450
  const hitLines = formatRunHitsLines(hits);
15401
- const json = _chunkU2N4CYT7js.argsWantJson.call(void 0, args);
15402
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
15451
+ const json = _chunkXZG75ELGjs.argsWantJson.call(void 0, args);
15452
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
15403
15453
  {
15404
15454
  ...overview,
15405
15455
  credits,
@@ -15502,9 +15552,9 @@ async function handleRunLifecycleStatus(args) {
15502
15552
  console.error(error instanceof Error ? error.message : usage2);
15503
15553
  return 1;
15504
15554
  }
15505
- const status = await new (0, _chunkGY2EEO2Yjs.DeeplineClient)().runs.status(runId);
15506
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
15507
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0, status, { json: true });
15555
+ const status = await new (0, _chunkZGWURYZKjs.DeeplineClient)().runs.status(runId);
15556
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
15557
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0, status, { json: true });
15508
15558
  return 0;
15509
15559
  }
15510
15560
  if (!status.available) {
@@ -15544,59 +15594,15 @@ async function handleRunsRerun(args) {
15544
15594
  console.error(error instanceof Error ? error.message : usage2);
15545
15595
  return 1;
15546
15596
  }
15547
- let idempotencyKey;
15548
- let inputOverrides;
15597
+ const options = { json: _chunkXZG75ELGjs.argsWantJson.call(void 0, args) };
15549
15598
  for (let index = 0; index < args.length; index += 1) {
15550
15599
  if (args[index] === "--idempotency-key") {
15551
- const value = args[index + 1];
15552
- if (!value || value.startsWith("--") || !value.trim()) {
15553
- console.error("--idempotency-key requires a non-empty value.");
15554
- return 1;
15555
- }
15556
- idempotencyKey = value.trim();
15557
- index += 1;
15600
+ options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
15558
15601
  } else if (args[index] === "--input-overrides") {
15559
- const value = args[index + 1];
15560
- if (!value || value.startsWith("--")) {
15561
- console.error("--input-overrides requires a JSON object.");
15562
- return 1;
15563
- }
15564
- try {
15565
- const parsed = JSON.parse(value);
15566
- if (!parsed || typeof parsed !== "object" || Array.isArray(parsed) || Object.values(parsed).some(
15567
- (entry) => entry !== null && !["string", "number", "boolean"].includes(typeof entry) || typeof entry === "number" && !Number.isFinite(entry)
15568
- )) {
15569
- throw new Error("expected scalar values");
15570
- }
15571
- inputOverrides = parsed;
15572
- } catch (e17) {
15573
- console.error(
15574
- "--input-overrides must be a JSON object of scalar values."
15575
- );
15576
- return 1;
15577
- }
15578
- index += 1;
15602
+ options.inputOverrides = _nullishCoalesce(args[++index], () => ( ""));
15579
15603
  }
15580
15604
  }
15581
- const result = await new (0, _chunkGY2EEO2Yjs.DeeplineClient)().runs.rerun(runId, {
15582
- ...idempotencyKey ? { idempotencyKey } : {},
15583
- ...inputOverrides ? { inputOverrides } : {}
15584
- });
15585
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
15586
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0, result, { json: true });
15587
- } else {
15588
- console.log(
15589
- result.deduplicated === true ? `
15590
- Rerun already exists for ${runId} (matched by idempotency key): ${result.runId}` : `
15591
- Rerun started from ${runId}${inputOverrides ? " with input overrides" : ""}.`
15592
- );
15593
- console.log(` inspect: deepline runs get ${result.runId} --json`);
15594
- console.log(` original input: deepline runs get ${result.runId} --input`);
15595
- console.log(
15596
- 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.`
15597
- );
15598
- }
15599
- return 0;
15605
+ return runRunsRerunCommand(runId, options);
15600
15606
  }
15601
15607
  async function handleRunsList(args) {
15602
15608
  const usage2 = "Usage: deepline runs list [--play <play-name>] [--node <mermaid-node-id>] [--status <status>] [--limit <count>] [--offset <count>] [--json]";
@@ -15653,8 +15659,8 @@ ${usage2}
15653
15659
  Discover Plays: ${next.discover}
15654
15660
  Active runs: ${next.running}`
15655
15661
  );
15656
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
15657
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
15662
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
15663
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
15658
15664
  { ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
15659
15665
  { json: true }
15660
15666
  );
@@ -15669,7 +15675,7 @@ Active runs: ${next.running}`
15669
15675
  console.error("--offset requires --play.");
15670
15676
  return 1;
15671
15677
  }
15672
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
15678
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
15673
15679
  const page = await client.runs.listPage({
15674
15680
  ...playName ? { play: playName } : {},
15675
15681
  ...statusFilter ? { status: statusFilter } : {},
@@ -15699,7 +15705,7 @@ Active runs: ${next.running}`
15699
15705
  executionTime: run.executionTime,
15700
15706
  billingTotalCredits: run.billingTotalCredits,
15701
15707
  billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
15702
- 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)),
15703
15709
  ...nodeId ? { nodeObservation: _nullishCoalesce(run.nodeObservation, () => ( null)) } : {}
15704
15710
  }));
15705
15711
  const lines = runs.length === 0 ? [
@@ -15738,7 +15744,7 @@ Active runs: ${next.running}`
15738
15744
  nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
15739
15745
  );
15740
15746
  }
15741
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
15747
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
15742
15748
  {
15743
15749
  runs,
15744
15750
  count: runs.length,
@@ -15748,11 +15754,11 @@ Active runs: ${next.running}`
15748
15754
  ...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
15749
15755
  next: {
15750
15756
  page: nextPage,
15751
- get: _optionalChain([runs, 'access', _518 => _518[0], 'optionalAccess', _519 => _519.id]) ? `deepline runs get ${runs[0].id} --json` : null
15757
+ get: _optionalChain([runs, 'access', _521 => _521[0], 'optionalAccess', _522 => _522.id]) ? `deepline runs get ${runs[0].id} --json` : null
15752
15758
  },
15753
15759
  render: { sections: [{ title: "runs", lines }] }
15754
15760
  },
15755
- { json: _chunkU2N4CYT7js.argsWantJson.call(void 0, args) }
15761
+ { json: _chunkXZG75ELGjs.argsWantJson.call(void 0, args) }
15756
15762
  );
15757
15763
  return 0;
15758
15764
  }
@@ -15782,7 +15788,7 @@ async function handleRunTail(args) {
15782
15788
  console.error("--log-level requires one of: debug, info, warn, error.");
15783
15789
  return 1;
15784
15790
  }
15785
- const parsed = _chunkGY2EEO2Yjs.parseLogLevel.call(void 0, value);
15791
+ const parsed = _chunkZGWURYZKjs.parseLogLevel.call(void 0, value);
15786
15792
  if (!parsed) {
15787
15793
  console.error(
15788
15794
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -15820,9 +15826,9 @@ async function handleRunTail(args) {
15820
15826
  );
15821
15827
  return 1;
15822
15828
  }
15823
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
15829
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
15824
15830
  const jsonLines = args.includes("--jsonl");
15825
- const jsonOutput = !jsonLines && _chunkU2N4CYT7js.argsWantJson.call(void 0, args);
15831
+ const jsonOutput = !jsonLines && _chunkXZG75ELGjs.argsWantJson.call(void 0, args);
15826
15832
  const compact = args.includes("--compact");
15827
15833
  const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
15828
15834
  const compactState = {
@@ -15903,7 +15909,7 @@ async function handleRunLogs(args) {
15903
15909
  ]);
15904
15910
  const cursorIndex = args.indexOf("--cursor");
15905
15911
  const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
15906
- const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkGY2EEO2Yjs.isRunLogsCursor.call(void 0, cursorValue));
15912
+ const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkZGWURYZKjs.isRunLogsCursor.call(void 0, cursorValue));
15907
15913
  if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
15908
15914
  return handleRunEventSearch(args);
15909
15915
  }
@@ -15937,7 +15943,7 @@ async function handleRunLogs(args) {
15937
15943
  console.error("--log-level requires one of: debug, info, warn, error.");
15938
15944
  return 1;
15939
15945
  }
15940
- const parsed = _chunkGY2EEO2Yjs.parseLogLevel.call(void 0, value);
15946
+ const parsed = _chunkZGWURYZKjs.parseLogLevel.call(void 0, value);
15941
15947
  if (!parsed) {
15942
15948
  console.error(
15943
15949
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -15984,12 +15990,12 @@ async function handleRunLogs(args) {
15984
15990
  );
15985
15991
  return 1;
15986
15992
  }
15987
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
15993
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
15988
15994
  if (outPath) {
15989
15995
  const result2 = await client.runs.logs(runId, { all: true });
15990
- const logs = result2.entries.filter((line) => _chunkGY2EEO2Yjs.logLevelReaches.call(void 0, _chunkGY2EEO2Yjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkGY2EEO2Yjs.classifyLogLine.call(void 0, line).line);
15996
+ const logs = result2.entries.filter((line) => _chunkZGWURYZKjs.logLevelReaches.call(void 0, _chunkZGWURYZKjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkZGWURYZKjs.classifyLogLine.call(void 0, line).line);
15991
15997
  _fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
15992
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
15998
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
15993
15999
  {
15994
16000
  runId: result2.runId,
15995
16001
  log_path: outPath,
@@ -16012,7 +16018,7 @@ async function handleRunLogs(args) {
16012
16018
  ]
16013
16019
  }
16014
16020
  },
16015
- { json: _chunkU2N4CYT7js.argsWantJson.call(void 0, args) }
16021
+ { json: _chunkXZG75ELGjs.argsWantJson.call(void 0, args) }
16016
16022
  );
16017
16023
  return 0;
16018
16024
  }
@@ -16043,7 +16049,7 @@ async function handleRunLogs(args) {
16043
16049
  }
16044
16050
  };
16045
16051
  const text = buildRunLogsText(filteredResult);
16046
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
16052
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
16047
16053
  {
16048
16054
  runId: result.runId,
16049
16055
  totalCount: result.totalCount,
@@ -16067,7 +16073,7 @@ async function handleRunLogs(args) {
16067
16073
  render: { sections: [{ title: "run logs", lines: entries }] }
16068
16074
  },
16069
16075
  {
16070
- json: _chunkU2N4CYT7js.argsWantJson.call(void 0, args),
16076
+ json: _chunkXZG75ELGjs.argsWantJson.call(void 0, args),
16071
16077
  text
16072
16078
  }
16073
16079
  );
@@ -16091,17 +16097,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
16091
16097
  );
16092
16098
  }
16093
16099
  const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
16094
- (entry) => _chunkGY2EEO2Yjs.logLevelReaches.call(void 0, _chunkGY2EEO2Yjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
16100
+ (entry) => _chunkZGWURYZKjs.logLevelReaches.call(void 0, _chunkZGWURYZKjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
16095
16101
  );
16096
16102
  const selected = matching.slice(-limit);
16097
16103
  const olderMatchesExist = matching.length > selected.length;
16098
16104
  return {
16099
16105
  entries: selected.map((entry) => entry.line),
16100
- firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _520 => _520[0], 'optionalAccess', _521 => _521.seq]), () => ( null)),
16101
- 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)),
16102
16108
  truncated: result.truncated || olderMatchesExist,
16103
16109
  hasMore: olderMatchesExist,
16104
- nextCursor: olderMatchesExist ? _chunkGY2EEO2Yjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
16110
+ nextCursor: olderMatchesExist ? _chunkZGWURYZKjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
16105
16111
  };
16106
16112
  }
16107
16113
  async function handleRunEventSearch(args) {
@@ -16168,7 +16174,7 @@ ${usage2}`);
16168
16174
  namespace,
16169
16175
  ...backend ? { backend } : {}
16170
16176
  } : void 0;
16171
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
16177
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
16172
16178
  const result = await client.runs.searchEvents({
16173
16179
  ...runId ? { runId } : {},
16174
16180
  ...values["--since"] ? { since: values["--since"] } : {},
@@ -16241,7 +16247,7 @@ ${renderedDetails}` : ""}`;
16241
16247
  String(limit),
16242
16248
  "--json"
16243
16249
  ].join(" ") : null;
16244
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
16250
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
16245
16251
  {
16246
16252
  events,
16247
16253
  nextCursor: result.nextCursor,
@@ -16252,19 +16258,19 @@ ${renderedDetails}` : ""}`;
16252
16258
  render: { sections: [{ title: "runtime events", lines }] }
16253
16259
  },
16254
16260
  {
16255
- json: _chunkU2N4CYT7js.argsWantJson.call(void 0, args),
16261
+ json: _chunkXZG75ELGjs.argsWantJson.call(void 0, args),
16256
16262
  text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
16257
16263
  }
16258
16264
  );
16259
16265
  return 0;
16260
16266
  }
16261
16267
  function buildRunLogsText(result) {
16262
- const lines = result.entries.map((line) => _chunkGY2EEO2Yjs.classifyLogLine.call(void 0, line).line);
16268
+ const lines = result.entries.map((line) => _chunkZGWURYZKjs.classifyLogLine.call(void 0, line).line);
16263
16269
  if (result.warning) {
16264
16270
  if (lines.length > 0) lines.push("");
16265
16271
  lines.push(`warning: ${result.warning}`);
16266
16272
  lines.push(
16267
- `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`))}`
16268
16274
  );
16269
16275
  }
16270
16276
  return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
@@ -16293,7 +16299,7 @@ async function handleRunStop(args) {
16293
16299
  reason = args[++index];
16294
16300
  }
16295
16301
  }
16296
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
16302
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
16297
16303
  const result = await client.runs.stop(runId, { reason });
16298
16304
  const state = resolveRunStopState(result);
16299
16305
  const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
@@ -16308,7 +16314,7 @@ async function handleRunStop(args) {
16308
16314
  ...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
16309
16315
  `inspect: deepline runs get ${runId} --full --json`
16310
16316
  ];
16311
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
16317
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
16312
16318
  {
16313
16319
  ...cancelling,
16314
16320
  state,
@@ -16323,7 +16329,7 @@ async function handleRunStop(args) {
16323
16329
  ]
16324
16330
  }
16325
16331
  },
16326
- { json: _chunkU2N4CYT7js.argsWantJson.call(void 0, args) }
16332
+ { json: _chunkXZG75ELGjs.argsWantJson.call(void 0, args) }
16327
16333
  );
16328
16334
  return 0;
16329
16335
  }
@@ -16340,7 +16346,7 @@ async function handleRunStop(args) {
16340
16346
  ];
16341
16347
  process.stderr.write(`${lines2.join("\n")}
16342
16348
  `);
16343
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
16349
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
16344
16350
  {
16345
16351
  ...result,
16346
16352
  render: {
@@ -16355,7 +16361,7 @@ async function handleRunStop(args) {
16355
16361
  ]
16356
16362
  }
16357
16363
  },
16358
- { json: _chunkU2N4CYT7js.argsWantJson.call(void 0, args) }
16364
+ { json: _chunkXZG75ELGjs.argsWantJson.call(void 0, args) }
16359
16365
  );
16360
16366
  return 1;
16361
16367
  }
@@ -16366,12 +16372,12 @@ async function handleRunStop(args) {
16366
16372
  `warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
16367
16373
  ] : []
16368
16374
  ];
16369
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
16375
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
16370
16376
  {
16371
16377
  ...result,
16372
16378
  render: { sections: [{ title: "run stop", lines }] }
16373
16379
  },
16374
- { json: _chunkU2N4CYT7js.argsWantJson.call(void 0, args) }
16380
+ { json: _chunkXZG75ELGjs.argsWantJson.call(void 0, args) }
16375
16381
  );
16376
16382
  return 0;
16377
16383
  }
@@ -16421,18 +16427,18 @@ async function handleRunStopAll(args) {
16421
16427
  reason = args[++index];
16422
16428
  }
16423
16429
  }
16424
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
16430
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
16425
16431
  if (dryRun) {
16426
16432
  const result2 = await client.runs.stopAll({ dryRun: true, reason });
16427
16433
  const lines2 = buildStopAllDryRunTextLines(result2);
16428
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
16434
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
16429
16435
  {
16430
16436
  ...result2,
16431
16437
  render: {
16432
16438
  sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
16433
16439
  }
16434
16440
  },
16435
- { json: _chunkU2N4CYT7js.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
16441
+ { json: _chunkXZG75ELGjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
16436
16442
  ` }
16437
16443
  );
16438
16444
  return 0;
@@ -16445,17 +16451,17 @@ async function handleRunStopAll(args) {
16445
16451
  ...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
16446
16452
  ...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
16447
16453
  ];
16448
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
16454
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
16449
16455
  {
16450
16456
  ...result,
16451
16457
  render: { sections: [{ title: "workspace stop-all", lines }] }
16452
16458
  },
16453
- { json: _chunkU2N4CYT7js.argsWantJson.call(void 0, args) }
16459
+ { json: _chunkXZG75ELGjs.argsWantJson.call(void 0, args) }
16454
16460
  );
16455
16461
  return result.failed > 0 || result.partial ? 1 : 0;
16456
16462
  }
16457
16463
  async function handleRunExport(args) {
16458
- const selection = _chunkU2N4CYT7js.parseJsonFields.call(void 0, args, "export");
16464
+ const selection = _chunkXZG75ELGjs.parseJsonFields.call(void 0, args, "export");
16459
16465
  args = selection.args;
16460
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]";
16461
16467
  let runId;
@@ -16514,16 +16520,16 @@ async function handleRunExport(args) {
16514
16520
  "INVALID_ARGUMENT"
16515
16521
  );
16516
16522
  }
16517
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
16523
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
16518
16524
  let status = await client.getPlayStatus(runId, { full: true });
16519
16525
  if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
16520
- const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkU2N4CYT7js.argsWantJson.call(void 0, args));
16526
+ const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkXZG75ELGjs.argsWantJson.call(void 0, args));
16521
16527
  try {
16522
16528
  await waitForPlayCompletionByWatch({
16523
16529
  client,
16524
16530
  playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
16525
16531
  workflowId: runId,
16526
- jsonOutput: _chunkU2N4CYT7js.argsWantJson.call(void 0, args),
16532
+ jsonOutput: _chunkXZG75ELGjs.argsWantJson.call(void 0, args),
16527
16533
  emitLogs: false,
16528
16534
  waitTimeoutMs,
16529
16535
  startedAt: Date.now(),
@@ -16546,26 +16552,26 @@ async function handleRunExport(args) {
16546
16552
  datasetPath,
16547
16553
  format
16548
16554
  });
16549
- const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _527 => _527.rowsInfo, 'access', _528 => _528.source]), () => ( datasetPath)), () => ( null));
16550
- 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]) ? {
16551
16557
  code: "CURRENT_SHARED_DATASET",
16552
16558
  message: "This export is the current shared dataset and may include writes from another run.",
16553
16559
  full_run_output_command: `deepline runs get ${status.runId} --full --json`
16554
16560
  } : null;
16555
16561
  const navigation = buildRunNavigation(status);
16556
- const resolved = _optionalChain([exportResult, 'optionalAccess', _530 => _530.datasetInfo]);
16562
+ const resolved = _optionalChain([exportResult, 'optionalAccess', _533 => _533.datasetInfo]);
16557
16563
  const identity = navigation.datasets.find(
16558
- (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])
16559
16565
  );
16560
16566
  const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
16561
16567
  const exportCommand = runExportRetryCommand(
16562
16568
  status.runId,
16563
16569
  outPath,
16564
- _nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _533 => _533.datasetPath]))),
16570
+ _nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _536 => _536.datasetPath]))),
16565
16571
  { format }
16566
16572
  );
16567
- const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _534 => _534.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _535 => _535.path]), () => ( null)) };
16568
- 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]);
16569
16575
  const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
16570
16576
  count: exportedRowOutcomes.failed,
16571
16577
  message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
@@ -16585,17 +16591,17 @@ async function handleRunExport(args) {
16585
16591
  ...fileLocation,
16586
16592
  format,
16587
16593
  source,
16588
- 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)),
16589
16595
  ...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
16590
16596
  ...rowFailures ? { rowFailures } : {},
16591
- 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]), () => ( []))),
16592
16598
  ...currentTableNotice ? { notice: currentTableNotice } : {},
16593
16599
  ...metadataOutPath ? { metadata_path: metadataOutPath } : {},
16594
16600
  ...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
16595
16601
  };
16596
16602
  const lines = withRunNavigationLines(
16597
16603
  [
16598
- `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))}`,
16599
16605
  ...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
16600
16606
  `Partial export: run is ${status.status}; more rows may be saved.`,
16601
16607
  `Export after completion: ${exportCommand} --wait`
@@ -16622,8 +16628,8 @@ async function handleRunExport(args) {
16622
16628
  "utf-8"
16623
16629
  );
16624
16630
  }
16625
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0, payload, {
16626
- json: _chunkU2N4CYT7js.argsWantJson.call(void 0, args),
16631
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0, payload, {
16632
+ json: _chunkXZG75ELGjs.argsWantJson.call(void 0, args),
16627
16633
  fields: selection.fields,
16628
16634
  text: `${lines.join("\n")}
16629
16635
  `
@@ -16644,10 +16650,10 @@ async function handlePlayGet(args) {
16644
16650
  );
16645
16651
  return 2;
16646
16652
  }
16647
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
16653
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
16648
16654
  const explicitJson = args.includes("--json");
16649
16655
  const sourceOutput = args.includes("--source");
16650
- const jsonOutput = sourceOutput ? explicitJson : _chunkU2N4CYT7js.argsWantJson.call(void 0, args);
16656
+ const jsonOutput = sourceOutput ? explicitJson : _chunkXZG75ELGjs.argsWantJson.call(void 0, args);
16651
16657
  const requestedRevisionFlags = [
16652
16658
  args.includes("--working"),
16653
16659
  args.includes("--live"),
@@ -16697,7 +16703,7 @@ async function handlePlayGet(args) {
16697
16703
  ...includeSource ? { source: sourceSelector } : {}
16698
16704
  });
16699
16705
  const source = detail.source;
16700
- 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]]), () => ( ""));
16701
16707
  let materializedFile = null;
16702
16708
  try {
16703
16709
  materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
@@ -16707,7 +16713,7 @@ async function handlePlayGet(args) {
16707
16713
  }
16708
16714
  const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
16709
16715
  if (jsonOutput) {
16710
- _chunkU2N4CYT7js.printCompactJson.call(void 0, {
16716
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, {
16711
16717
  ...detail,
16712
16718
  ...materializedFile ? {
16713
16719
  message: loadedMessage,
@@ -16748,11 +16754,11 @@ async function handlePlayGet(args) {
16748
16754
  }
16749
16755
  console.log(`Play: ${formatPlayReference(detail.play)}`);
16750
16756
  console.log(
16751
- `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"))}`
16752
16758
  );
16753
- 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"))}`);
16754
16760
  console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
16755
- 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])) {
16756
16762
  console.log(
16757
16763
  ` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
16758
16764
  );
@@ -16764,7 +16770,7 @@ async function handlePlayGet(args) {
16764
16770
  console.log(line);
16765
16771
  }
16766
16772
  console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
16767
- 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))}`);
16768
16774
  if (detail.customerDbUrl) {
16769
16775
  console.log(`Customer DB: ${detail.customerDbUrl}`);
16770
16776
  }
@@ -16780,7 +16786,7 @@ async function handlePlayGet(args) {
16780
16786
  return 0;
16781
16787
  }
16782
16788
  function formatVersionLine(version) {
16783
- 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"));
16784
16790
  const state = [
16785
16791
  version.isLive ? "live" : null,
16786
16792
  version.isWorking ? "working" : null
@@ -16794,8 +16800,8 @@ async function handlePlayVersions(args) {
16794
16800
  console.error("Usage: deepline plays versions --name <name> [--json]");
16795
16801
  return 1;
16796
16802
  }
16797
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
16798
- const jsonOutput = _chunkU2N4CYT7js.argsWantJson.call(void 0, args);
16803
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
16804
+ const jsonOutput = _chunkXZG75ELGjs.argsWantJson.call(void 0, args);
16799
16805
  await assertCanonicalNamedPlayReference(client, playName, {
16800
16806
  command: "versions"
16801
16807
  });
@@ -16803,7 +16809,7 @@ async function handlePlayVersions(args) {
16803
16809
  parseReferencedPlayTarget3(playName).playName
16804
16810
  );
16805
16811
  if (jsonOutput) {
16806
- _chunkU2N4CYT7js.printCompactJson.call(void 0, { versions });
16812
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, { versions });
16807
16813
  return 0;
16808
16814
  }
16809
16815
  if (versions.length === 0) {
@@ -16835,11 +16841,11 @@ var PREBUILT_PLAY_TAG_KEYS = [
16835
16841
  "signals"
16836
16842
  ];
16837
16843
  async function handlePlayList(args) {
16838
- const jsonOutput = _chunkU2N4CYT7js.argsWantJson.call(void 0, args);
16844
+ const jsonOutput = _chunkXZG75ELGjs.argsWantJson.call(void 0, args);
16839
16845
  const showCost = args.includes("--show-cost");
16840
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
16846
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
16841
16847
  const categoriesIndex = args.indexOf("--categories");
16842
- 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;
16843
16849
  const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
16844
16850
  if (args.includes("--tag") && tags.length === 0) {
16845
16851
  console.error(
@@ -16860,7 +16866,7 @@ async function handlePlayList(args) {
16860
16866
  const cursorIndex = args.indexOf("--cursor");
16861
16867
  const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
16862
16868
  const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
16863
- 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()])) {
16864
16870
  console.error("Pass a positive --limit and a non-empty --cursor.");
16865
16871
  return 2;
16866
16872
  }
@@ -16900,7 +16906,7 @@ async function handlePlayList(args) {
16900
16906
  if (play.inputSchema || play.hasInputSchema) {
16901
16907
  lines.push(" inputSchema: yes");
16902
16908
  }
16903
- if (_optionalChain([play, 'access', _565 => _565.triggerStatus, 'optionalAccess', _566 => _566.cron])) {
16909
+ if (_optionalChain([play, 'access', _568 => _568.triggerStatus, 'optionalAccess', _569 => _569.cron])) {
16904
16910
  lines.push(
16905
16911
  ` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
16906
16912
  );
@@ -16920,7 +16926,7 @@ async function handlePlayList(args) {
16920
16926
  } else {
16921
16927
  lines.push(" scheduled execution: not configured");
16922
16928
  }
16923
- if (_optionalChain([play, 'access', _567 => _567.triggerStatus, 'optionalAccess', _568 => _568.webhook])) {
16929
+ if (_optionalChain([play, 'access', _570 => _570.triggerStatus, 'optionalAccess', _571 => _571.webhook])) {
16924
16930
  lines.push(` webhook: ${play.triggerStatus.webhook}`);
16925
16931
  }
16926
16932
  if (showCost) {
@@ -16934,7 +16940,7 @@ async function handlePlayList(args) {
16934
16940
  lines.push("List truncated \u2014 more plays are available.");
16935
16941
  lines.push(`Next page: ${nextPage}`);
16936
16942
  }
16937
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
16943
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
16938
16944
  {
16939
16945
  plays,
16940
16946
  count: plays.length,
@@ -16951,8 +16957,8 @@ async function handlePlayList(args) {
16951
16957
  return 0;
16952
16958
  }
16953
16959
  async function handlePlayPin(args, pinned) {
16954
- const target = _optionalChain([args, 'access', _569 => _569.find, 'call', _570 => _570((arg) => !arg.startsWith("-")), 'optionalAccess', _571 => _571.trim, 'call', _572 => _572()]);
16955
- const jsonOutput = _chunkU2N4CYT7js.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 = _chunkXZG75ELGjs.argsWantJson.call(void 0, args);
16956
16962
  const dryRun = args.includes("--dry-run");
16957
16963
  if (!target) {
16958
16964
  console.error(
@@ -16970,11 +16976,11 @@ async function handlePlayPin(args, pinned) {
16970
16976
  const name = parsedTarget.playName;
16971
16977
  const plan = { name, pinned, dryRun };
16972
16978
  if (dryRun) {
16973
- _chunkU2N4CYT7js.printCompactJson.call(void 0, plan);
16979
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, plan);
16974
16980
  return 0;
16975
16981
  }
16976
- const result = await new (0, _chunkGY2EEO2Yjs.DeeplineClient)().setPlayPinned(name, pinned);
16977
- if (jsonOutput) _chunkU2N4CYT7js.printCompactJson.call(void 0, result);
16982
+ const result = await new (0, _chunkZGWURYZKjs.DeeplineClient)().setPlayPinned(name, pinned);
16983
+ if (jsonOutput) _chunkXZG75ELGjs.printCompactJson.call(void 0, result);
16978
16984
  else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
16979
16985
  return 0;
16980
16986
  }
@@ -16990,7 +16996,7 @@ function csvColumnLines(csvInput) {
16990
16996
  const headers = [defaults[column]].flat().filter((header) => header && header !== column);
16991
16997
  return `${column}${required.has(column) ? " (required)" : ""}${headers.length > 0 ? `, default header: ${headers.join(" or ")}` : ""}`;
16992
16998
  }),
16993
- _chunkGY2EEO2Yjs.CSV_HEADER_MATCHING_NOTE
16999
+ _chunkZGWURYZKjs.CSV_HEADER_MATCHING_NOTE
16994
17000
  ];
16995
17001
  }
16996
17002
  function describedPlay(play) {
@@ -17058,7 +17064,7 @@ function printPlayDescription(play) {
17058
17064
  console.log(` ${line}`);
17059
17065
  }
17060
17066
  }
17061
- if (_optionalChain([play, 'access', _573 => _573.toolCategories, 'optionalAccess', _574 => _574.length])) {
17067
+ if (_optionalChain([play, 'access', _576 => _576.toolCategories, 'optionalAccess', _577 => _577.length])) {
17062
17068
  console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
17063
17069
  }
17064
17070
  if (play.aliases.length > 0) {
@@ -17103,7 +17109,7 @@ function printPlayDescription(play) {
17103
17109
  const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
17104
17110
  if (runtimeLimit) {
17105
17111
  console.log(
17106
- ` 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"))})`
17107
17113
  );
17108
17114
  }
17109
17115
  printScheduledPlayCapacity(play.activeScheduledPlays);
@@ -17129,17 +17135,17 @@ function formatPlayGrepMatches(matches) {
17129
17135
  return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
17130
17136
  }
17131
17137
  async function handlePlayGrep(args) {
17132
- 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()]);
17133
17139
  if (!query) {
17134
17140
  console.error("Usage: deepline plays grep <query> [--json]");
17135
17141
  return 1;
17136
17142
  }
17137
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
17143
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
17138
17144
  const results = (await client.listPlays({ grep: query })).map(
17139
17145
  summarizePlayGrepResult
17140
17146
  );
17141
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
17142
- _chunkU2N4CYT7js.printCompactJson.call(void 0, {
17147
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
17148
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, {
17143
17149
  plays: results,
17144
17150
  count: results.length,
17145
17151
  query,
@@ -17153,7 +17159,7 @@ async function handlePlayGrep(args) {
17153
17159
  `
17154
17160
  );
17155
17161
  for (const result of results) {
17156
- 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);
17157
17163
  const matches = formatPlayGrepMatches(result.matches);
17158
17164
  if (matches) console.log(` Matched: ${matches}`);
17159
17165
  console.log(` Describe: ${result.describe}`);
@@ -17162,7 +17168,7 @@ async function handlePlayGrep(args) {
17162
17168
  return 0;
17163
17169
  }
17164
17170
  async function handlePlayDescribe(args) {
17165
- const selection = _chunkU2N4CYT7js.parseJsonFields.call(void 0, args, "describe");
17171
+ const selection = _chunkXZG75ELGjs.parseJsonFields.call(void 0, args, "describe");
17166
17172
  args = selection.args;
17167
17173
  const playName = args[0];
17168
17174
  if (!playName) {
@@ -17196,8 +17202,8 @@ async function handlePlayDescribe(args) {
17196
17202
  `deepline plays check ${playName}`,
17197
17203
  ...definedName ? [`deepline describe <workspace>/${definedName}`] : []
17198
17204
  ];
17199
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
17200
- _chunkU2N4CYT7js.printCompactJson.call(void 0, {
17205
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
17206
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, {
17201
17207
  ok: false,
17202
17208
  error: { message },
17203
17209
  next
@@ -17211,7 +17217,7 @@ async function handlePlayDescribe(args) {
17211
17217
  }
17212
17218
  return 2;
17213
17219
  }
17214
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
17220
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
17215
17221
  await assertCanonicalNamedPlayReference(client, playName, {
17216
17222
  command: "describe"
17217
17223
  });
@@ -17221,9 +17227,9 @@ async function handlePlayDescribe(args) {
17221
17227
  compact: args.includes("--compact")
17222
17228
  }
17223
17229
  );
17224
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
17225
- if (selection.fields) _chunkU2N4CYT7js.printJson.call(void 0, play, selection.fields);
17226
- else _chunkU2N4CYT7js.printCompactJson.call(void 0, play);
17230
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
17231
+ if (selection.fields) _chunkXZG75ELGjs.printJson.call(void 0, play, selection.fields);
17232
+ else _chunkXZG75ELGjs.printCompactJson.call(void 0, play);
17227
17233
  return 0;
17228
17234
  }
17229
17235
  printPlayDescription(play);
@@ -17267,7 +17273,7 @@ async function handlePlaySave(args) {
17267
17273
  next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
17268
17274
  };
17269
17275
  if (options.jsonOutput) {
17270
- _chunkU2N4CYT7js.printCompactJson.call(void 0, result);
17276
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, result);
17271
17277
  } else {
17272
17278
  console.error(result.message);
17273
17279
  console.error(` checked artifact: ${result.expectedArtifactHash}`);
@@ -17289,7 +17295,7 @@ async function handlePlaySave(args) {
17289
17295
  };
17290
17296
  if (options.dryRun) {
17291
17297
  if (options.jsonOutput) {
17292
- _chunkU2N4CYT7js.printCompactJson.call(void 0, dryRun);
17298
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, dryRun);
17293
17299
  } else {
17294
17300
  console.log(`Dry run: ${playName}`);
17295
17301
  console.log(` source: ${dryRun.sourceHash}`);
@@ -17298,7 +17304,7 @@ async function handlePlaySave(args) {
17298
17304
  }
17299
17305
  return 0;
17300
17306
  }
17301
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
17307
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
17302
17308
  try {
17303
17309
  await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
17304
17310
  "cli.play_save_compile_manifests",
@@ -17334,7 +17340,7 @@ async function handlePlaySave(args) {
17334
17340
  }
17335
17341
  };
17336
17342
  if (options.jsonOutput) {
17337
- _chunkU2N4CYT7js.printCompactJson.call(void 0, result);
17343
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, result);
17338
17344
  } else {
17339
17345
  console.log(
17340
17346
  `\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
@@ -17360,7 +17366,7 @@ async function handlePlayPublish(args) {
17360
17366
  }
17361
17367
  const { target: playName, useLatest } = options;
17362
17368
  let revisionId = options.revisionId;
17363
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
17369
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
17364
17370
  if (isFileTarget2(playName)) {
17365
17371
  if (revisionId || useLatest) {
17366
17372
  console.error(
@@ -17392,7 +17398,7 @@ async function handlePlayPublish(args) {
17392
17398
  next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
17393
17399
  };
17394
17400
  if (options.jsonOutput) {
17395
- _chunkU2N4CYT7js.printCompactJson.call(void 0, result3);
17401
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, result3);
17396
17402
  } else {
17397
17403
  console.error(result3.message);
17398
17404
  console.error(` checked artifact: ${result3.expectedArtifactHash}`);
@@ -17415,7 +17421,7 @@ async function handlePlayPublish(args) {
17415
17421
  };
17416
17422
  if (options.dryRun) {
17417
17423
  if (options.jsonOutput) {
17418
- _chunkU2N4CYT7js.printCompactJson.call(void 0, dryRun);
17424
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, dryRun);
17419
17425
  } else {
17420
17426
  console.log(`Dry run: ${rootPlayName}`);
17421
17427
  console.log(` source: ${dryRun.sourceHash}`);
@@ -17473,17 +17479,17 @@ async function handlePlayPublish(args) {
17473
17479
  artifactHash,
17474
17480
  liveVersion: _nullishCoalesce(published.version, () => ( null)),
17475
17481
  revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
17476
- previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _583 => _583.version]), () => ( null)),
17477
- 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)),
17478
17484
  sourceBytes: {
17479
- 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,
17480
17486
  after: Buffer.byteLength(graph.root.sourceCode, "utf8")
17481
17487
  },
17482
17488
  triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
17483
17489
  triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
17484
17490
  };
17485
17491
  if (options.jsonOutput) {
17486
- _chunkU2N4CYT7js.printCompactJson.call(void 0, result2);
17492
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, result2);
17487
17493
  } else {
17488
17494
  printPublishReceipt({
17489
17495
  name: rootPlayName,
@@ -17514,14 +17520,14 @@ async function handlePlayPublish(args) {
17514
17520
  revisionId: _nullishCoalesce(revisionId, () => ( null)),
17515
17521
  latest: useLatest
17516
17522
  };
17517
- _chunkU2N4CYT7js.printCompactJson.call(void 0, result2);
17523
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, result2);
17518
17524
  return 0;
17519
17525
  }
17520
17526
  const resolvedName = parseReferencedPlayTarget3(playName).playName;
17521
17527
  if (useLatest) {
17522
17528
  const versions = await client.listPlayVersions(resolvedName);
17523
17529
  const latest = versions[0];
17524
- if (!_optionalChain([latest, 'optionalAccess', _586 => _586._id])) {
17530
+ if (!_optionalChain([latest, 'optionalAccess', _589 => _589._id])) {
17525
17531
  console.error(`No saved revisions found for ${resolvedName}.`);
17526
17532
  return 1;
17527
17533
  }
@@ -17538,7 +17544,7 @@ async function handlePlayPublish(args) {
17538
17544
  revisionId ? { revisionId } : {}
17539
17545
  );
17540
17546
  if (options.jsonOutput) {
17541
- _chunkU2N4CYT7js.printCompactJson.call(void 0, result);
17547
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, result);
17542
17548
  } else {
17543
17549
  printPublishReceipt({
17544
17550
  name: result.name,
@@ -17578,7 +17584,7 @@ async function handlePlayDelete(args) {
17578
17584
  );
17579
17585
  return 2;
17580
17586
  }
17581
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
17587
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
17582
17588
  let detail;
17583
17589
  try {
17584
17590
  detail = await client.getPlay(parseReferencedPlayTarget3(playName).playName);
@@ -17602,8 +17608,8 @@ async function handlePlayDelete(args) {
17602
17608
  name: resolvedName,
17603
17609
  plannedMutation: "move saved org-owned play to Trash and stop triggers"
17604
17610
  };
17605
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
17606
- _chunkU2N4CYT7js.printCompactJson.call(void 0, result2);
17611
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
17612
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, result2);
17607
17613
  } else {
17608
17614
  process.stdout.write(
17609
17615
  `Dry run: would move ${result2.name} to Trash and stop its active triggers.
@@ -17613,8 +17619,8 @@ async function handlePlayDelete(args) {
17613
17619
  return 0;
17614
17620
  }
17615
17621
  const result = await client.deletePlay(resolvedName);
17616
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
17617
- _chunkU2N4CYT7js.printCompactJson.call(void 0, result);
17622
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
17623
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, result);
17618
17624
  return result.archived || result.alreadyArchived ? 0 : 4;
17619
17625
  }
17620
17626
  if (result.alreadyArchived) {
@@ -17653,13 +17659,13 @@ async function handlePlayRestore(args) {
17653
17659
  );
17654
17660
  return 2;
17655
17661
  }
17656
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
17662
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
17657
17663
  try {
17658
17664
  const result = await client.restorePlay(
17659
17665
  parseReferencedPlayTarget3(playName).playName
17660
17666
  );
17661
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
17662
- _chunkU2N4CYT7js.printCompactJson.call(void 0, result);
17667
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
17668
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, result);
17663
17669
  return result.restored || result.alreadyActive ? 0 : 4;
17664
17670
  }
17665
17671
  if (result.alreadyActive) {
@@ -17766,7 +17772,7 @@ Examples:
17766
17772
  ).action(async (target, options) => {
17767
17773
  process.exitCode = await handlePlayCheck([
17768
17774
  target,
17769
- ..._chunkU2N4CYT7js.jsonFieldArgs.call(void 0, options.json),
17775
+ ..._chunkXZG75ELGjs.jsonFieldArgs.call(void 0, options.json),
17770
17776
  ...options.full ? ["--full"] : []
17771
17777
  ]);
17772
17778
  });
@@ -17995,9 +18001,9 @@ Examples:
17995
18001
  const limit = Number(options.historyLimit);
17996
18002
  if (!Number.isInteger(limit) || limit < 1 || limit > 30)
17997
18003
  throw new Error("--history-limit must be an integer from 1 to 30.");
17998
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
18004
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
17999
18005
  if (options.binding) {
18000
- _chunkU2N4CYT7js.printCompactJson.call(void 0,
18006
+ _chunkXZG75ELGjs.printCompactJson.call(void 0,
18001
18007
  await client.getPlayTriggerHistory(options.binding, { limit })
18002
18008
  );
18003
18009
  return;
@@ -18005,7 +18011,7 @@ Examples:
18005
18011
  const result = await client.listPlayTriggerInventory({
18006
18012
  cursor: options.cursor
18007
18013
  });
18008
- _chunkU2N4CYT7js.printCompactJson.call(void 0, {
18014
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, {
18009
18015
  ...result,
18010
18016
  next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)} --json`
18011
18017
  });
@@ -18052,7 +18058,7 @@ Examples:
18052
18058
  if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
18053
18059
  throw new Error("--group-by must be kind or trigger_source.");
18054
18060
  }
18055
- const result = await new (0, _chunkGY2EEO2Yjs.DeeplineClient)().getPlaysActivity({
18061
+ const result = await new (0, _chunkZGWURYZKjs.DeeplineClient)().getPlaysActivity({
18056
18062
  timeZone: options.timeZone,
18057
18063
  days,
18058
18064
  ...options.endDate ? { endDate: options.endDate } : {},
@@ -18066,7 +18072,7 @@ Examples:
18066
18072
  `${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
18067
18073
  );
18068
18074
  }
18069
- _chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
18075
+ _chunkXZG75ELGjs.printCommandEnvelope.call(void 0,
18070
18076
  { ...result },
18071
18077
  {
18072
18078
  json: options.json || !process.stdout.isTTY,
@@ -18095,7 +18101,7 @@ Examples:
18095
18101
  false
18096
18102
  );
18097
18103
  });
18098
- _chunk4FLEXYUCjs.registerDeprecatedSearchCommand.call(void 0,
18104
+ _chunkL4CJXV7Djs.registerDeprecatedSearchCommand.call(void 0,
18099
18105
  play,
18100
18106
  (options) => options.all ? ["plays"] : ["prebuilts"]
18101
18107
  );
@@ -18139,7 +18145,7 @@ Examples:
18139
18145
  );
18140
18146
  _chunkAFNEQ43Jjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
18141
18147
  async (target, options) => {
18142
- const ownView = () => handlePlayDescribe(_chunkU2N4CYT7js.describeArgs.call(void 0, target, options));
18148
+ const ownView = () => handlePlayDescribe(_chunkXZG75ELGjs.describeArgs.call(void 0, target, options));
18143
18149
  const [flagText] = [options.json].filter(
18144
18150
  (value) => typeof value === "string"
18145
18151
  );
@@ -18150,7 +18156,7 @@ Examples:
18150
18156
  process.exitCode = await ownView();
18151
18157
  return;
18152
18158
  }
18153
- const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-YALVN4WH.js")));
18159
+ const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-IQ3FOLGV.js")));
18154
18160
  process.exitCode = await describeAnything(
18155
18161
  name,
18156
18162
  {
@@ -18267,7 +18273,7 @@ Examples:
18267
18273
  deepline plays deployments <deployment-id>
18268
18274
  `
18269
18275
  ).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(
18270
- async (id, options) => id ? _chunkOUTIWGKYjs.handleDeploymentGet.call(void 0, id, options) : _chunkOUTIWGKYjs.handleDeploymentsList.call(void 0, options)
18276
+ async (id, options) => id ? _chunkKXWOO3GIjs.handleDeploymentGet.call(void 0, id, options) : _chunkKXWOO3GIjs.handleDeploymentsList.call(void 0, options)
18271
18277
  );
18272
18278
  addPublishHelp(
18273
18279
  play.command("publish <target>").description(
@@ -18447,7 +18453,7 @@ Examples:
18447
18453
  ).action(async (runId, options) => {
18448
18454
  process.exitCode = await handleRunGet([
18449
18455
  runId,
18450
- ..._chunkU2N4CYT7js.jsonFieldArgs.call(void 0, options.json),
18456
+ ..._chunkXZG75ELGjs.jsonFieldArgs.call(void 0, options.json),
18451
18457
  ...options.full ? ["--full"] : [],
18452
18458
  ...options.input ? ["--input"] : [],
18453
18459
  ...options.config ? ["--config"] : [],
@@ -18482,12 +18488,7 @@ Examples:
18482
18488
  "--input-overrides <json>",
18483
18489
  "Override existing scalar fields in the retained input for this rerun"
18484
18490
  ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (runId, options) => {
18485
- process.exitCode = await handleRunsRerun([
18486
- runId,
18487
- ...options.idempotencyKey ? ["--idempotency-key", options.idempotencyKey] : [],
18488
- ...options.inputOverrides ? ["--input-overrides", options.inputOverrides] : [],
18489
- ...options.json ? ["--json"] : []
18490
- ]);
18491
+ process.exitCode = await runRunsRerunCommand(runId, options);
18491
18492
  });
18492
18493
  runs.command("list").description("List play runs.").addHelpText(
18493
18494
  "after",
@@ -18725,7 +18726,7 @@ Examples:
18725
18726
  ...options.metadataOut ? ["--metadata-out", options.metadataOut] : [],
18726
18727
  ...options.wait ? ["--wait"] : [],
18727
18728
  ...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
18728
- ..._chunkU2N4CYT7js.jsonFieldArgs.call(void 0, options.json)
18729
+ ..._chunkXZG75ELGjs.jsonFieldArgs.call(void 0, options.json)
18729
18730
  ]);
18730
18731
  });
18731
18732
  const share = play.command("share").description(
@@ -18866,8 +18867,8 @@ function absolutePublicPlayUrl(path) {
18866
18867
  }
18867
18868
  function shareUrlFields(status) {
18868
18869
  return {
18869
- publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _587 => _587.share, 'optionalAccess', _588 => _588.publicPath])),
18870
- 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]))
18871
18872
  };
18872
18873
  }
18873
18874
  function shareStatusForOutput(status) {
@@ -18891,10 +18892,10 @@ async function handlePlayShareStatus(args) {
18891
18892
  return 2;
18892
18893
  }
18893
18894
  const name = parseReferencedPlayTarget3(target).playName;
18894
- const status = await new (0, _chunkGY2EEO2Yjs.DeeplineClient)().getSharePage(name);
18895
+ const status = await new (0, _chunkZGWURYZKjs.DeeplineClient)().getSharePage(name);
18895
18896
  const outputStatus = shareStatusForOutput(status);
18896
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
18897
- _chunkU2N4CYT7js.printCompactJson.call(void 0, outputStatus);
18897
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
18898
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, outputStatus);
18898
18899
  return 0;
18899
18900
  }
18900
18901
  if (!outputStatus.share) {
@@ -18933,7 +18934,7 @@ async function handlePlaySharePublish(args) {
18933
18934
  return 2;
18934
18935
  }
18935
18936
  const name = parseReferencedPlayTarget3(target).playName;
18936
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
18937
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
18937
18938
  let revisionId = shareFlagValue(args, "--revision-id");
18938
18939
  let resolvedVersion;
18939
18940
  if (!revisionId) {
@@ -18964,8 +18965,8 @@ async function handlePlaySharePublish(args) {
18964
18965
  );
18965
18966
  if (!hasCompleted) {
18966
18967
  const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
18967
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
18968
- _chunkU2N4CYT7js.printCompactJson.call(void 0, {
18968
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
18969
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, {
18969
18970
  ok: false,
18970
18971
  code: "NO_SUCCESSFUL_RUN",
18971
18972
  message,
@@ -18989,8 +18990,8 @@ async function handlePlaySharePublish(args) {
18989
18990
  };
18990
18991
  if (args.includes("--dry-run")) {
18991
18992
  const plan = { dryRun: true, name, version: resolvedVersion, ...request };
18992
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
18993
- _chunkU2N4CYT7js.printCompactJson.call(void 0, plan);
18993
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
18994
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, plan);
18994
18995
  } else {
18995
18996
  console.log(
18996
18997
  `Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
@@ -19000,13 +19001,13 @@ async function handlePlaySharePublish(args) {
19000
19001
  }
19001
19002
  const status = await client.publishSharePage(name, request);
19002
19003
  const outputStatus = shareStatusForOutput(status);
19003
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
19004
- _chunkU2N4CYT7js.printCompactJson.call(void 0, outputStatus);
19004
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
19005
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, outputStatus);
19005
19006
  return 0;
19006
19007
  }
19007
19008
  const urls = shareUrlFields(outputStatus);
19008
19009
  console.log(
19009
- `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]))), () => ( ""))}`
19010
19011
  );
19011
19012
  if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
19012
19013
  console.log(`Version URL: ${urls.canonicalUrl}`);
@@ -19032,9 +19033,9 @@ async function handlePlayShareUpdate(args) {
19032
19033
  ...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
19033
19034
  ...seoIndexing ? { seoIndexing } : {}
19034
19035
  };
19035
- const status = await new (0, _chunkGY2EEO2Yjs.DeeplineClient)().updateSharePage(name, request);
19036
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
19037
- _chunkU2N4CYT7js.printCompactJson.call(void 0, status);
19036
+ const status = await new (0, _chunkZGWURYZKjs.DeeplineClient)().updateSharePage(name, request);
19037
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
19038
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, status);
19038
19039
  return 0;
19039
19040
  }
19040
19041
  console.log(`Updated ${name} share settings.`);
@@ -19049,13 +19050,13 @@ async function handlePlayShareRegenerate(args) {
19049
19050
  return 2;
19050
19051
  }
19051
19052
  const name = parseReferencedPlayTarget3(target).playName;
19052
- const client = new (0, _chunkGY2EEO2Yjs.DeeplineClient)();
19053
+ const client = new (0, _chunkZGWURYZKjs.DeeplineClient)();
19053
19054
  let revisionId = shareFlagValue(args, "--revision-id");
19054
19055
  const versionFlag = shareFlagValue(args, "--version");
19055
19056
  if (!revisionId && versionFlag) {
19056
19057
  const versions = await client.listPlayVersions(name);
19057
19058
  const chosen = versions.find((r) => r.version === Number(versionFlag));
19058
- if (!_optionalChain([chosen, 'optionalAccess', _593 => _593._id])) {
19059
+ if (!_optionalChain([chosen, 'optionalAccess', _596 => _596._id])) {
19059
19060
  console.error(`Version ${versionFlag} not found for ${name}.`);
19060
19061
  return 4;
19061
19062
  }
@@ -19066,12 +19067,12 @@ async function handlePlayShareRegenerate(args) {
19066
19067
  revisionId ? { revisionId } : {}
19067
19068
  );
19068
19069
  const outputStatus = shareStatusForOutput(status);
19069
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
19070
- _chunkU2N4CYT7js.printCompactJson.call(void 0, outputStatus);
19070
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
19071
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, outputStatus);
19071
19072
  return 0;
19072
19073
  }
19073
19074
  const urls = shareUrlFields(outputStatus);
19074
- 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;
19075
19076
  console.log(
19076
19077
  `Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
19077
19078
  );
@@ -19092,9 +19093,9 @@ async function handlePlayShareUnpublish(args) {
19092
19093
  return 2;
19093
19094
  }
19094
19095
  const name = parseReferencedPlayTarget3(target).playName;
19095
- const status = await new (0, _chunkGY2EEO2Yjs.DeeplineClient)().unpublishSharePage(name);
19096
- if (_chunkU2N4CYT7js.argsWantJson.call(void 0, args)) {
19097
- _chunkU2N4CYT7js.printCompactJson.call(void 0, status);
19096
+ const status = await new (0, _chunkZGWURYZKjs.DeeplineClient)().unpublishSharePage(name);
19097
+ if (_chunkXZG75ELGjs.argsWantJson.call(void 0, args)) {
19098
+ _chunkXZG75ELGjs.printCompactJson.call(void 0, status);
19098
19099
  return 0;
19099
19100
  }
19100
19101
  console.log(`Unpublished ${name}; the public page has been removed.`);