deepline 0.3.334 → 0.3.336

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 (104) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +53 -41
  3. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +14 -0
  4. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +81 -0
  5. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +53 -0
  6. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +48 -4
  7. package/dist/cli/auth-6RQLNYNF.js +31 -0
  8. package/dist/cli/{auth-PAEBUPRS.mjs → auth-M45QKCUL.mjs} +4 -4
  9. package/dist/cli/{billing-QGQJUM5G.mjs → billing-E7ADEFLX.mjs} +4 -4
  10. package/dist/cli/{billing-V746QMQC.js → billing-XCJVALTC.js} +71 -71
  11. package/dist/cli/{chunk-XXZSLV7B.js → chunk-2CJUQWW2.js} +6 -6
  12. package/dist/cli/{chunk-SBEWKGUA.mjs → chunk-4NJCGGHK.mjs} +1 -1
  13. package/dist/cli/{chunk-U724V33M.mjs → chunk-4S3G43M3.mjs} +2 -2
  14. package/dist/cli/{chunk-Z6VHC643.js → chunk-4WHJDGBC.js} +9 -9
  15. package/dist/cli/{chunk-R6O3YVIG.js → chunk-5S4FMN6T.js} +8 -8
  16. package/dist/cli/{chunk-P3ZX3NSE.mjs → chunk-B53RXFGP.mjs} +1 -1
  17. package/dist/cli/{chunk-NLHRXDIT.js → chunk-EBIISKOH.js} +2 -2
  18. package/dist/cli/{chunk-JNNOCMQY.js → chunk-EBU7LQ64.js} +18 -6
  19. package/dist/cli/{chunk-O564PHDU.mjs → chunk-GATWDGMB.mjs} +1 -1
  20. package/dist/cli/{chunk-UUB3FTKZ.js → chunk-I5XF4PWD.js} +6 -6
  21. package/dist/cli/{chunk-TVIWEQ4V.mjs → chunk-IT3AQZDG.mjs} +3 -3
  22. package/dist/cli/{chunk-VB7TNIUB.mjs → chunk-IU3TFWPR.mjs} +1 -1
  23. package/dist/cli/{chunk-6466HVYR.js → chunk-JEE7AKWP.js} +26 -26
  24. package/dist/cli/{chunk-GUMAWNWZ.mjs → chunk-JULF4SPK.mjs} +5 -5
  25. package/dist/cli/{chunk-GX2YGFQV.js → chunk-KZT7YX7R.js} +1 -1
  26. package/dist/cli/{chunk-GNHI4WZC.js → chunk-LDMQDERZ.js} +15 -15
  27. package/dist/cli/{chunk-7XXNMV6G.js → chunk-LOD6RKCD.js} +45 -45
  28. package/dist/cli/{chunk-FLMBKUHB.js → chunk-NCPAHNXJ.js} +60 -60
  29. package/dist/cli/{chunk-EJLUQARV.mjs → chunk-PWY5DNNP.mjs} +4 -4
  30. package/dist/cli/{chunk-SABEM6FL.js → chunk-Q2HYQOID.js} +48 -48
  31. package/dist/cli/{chunk-A7S4PRK2.mjs → chunk-TGMDQIYJ.mjs} +1 -1
  32. package/dist/cli/{chunk-Y2VN54ME.mjs → chunk-TV6BWFGU.mjs} +2 -2
  33. package/dist/cli/{chunk-EJVAWHQ7.mjs → chunk-VD45LDLL.mjs} +23 -10
  34. package/dist/cli/{chunk-TT2CLWMK.mjs → chunk-VOD4V4G4.mjs} +1 -1
  35. package/dist/cli/{chunk-SFLARO4Y.mjs → chunk-WIYWSYDS.mjs} +18 -6
  36. package/dist/cli/{chunk-O64RSXDZ.mjs → chunk-WWZJ6P22.mjs} +2 -2
  37. package/dist/cli/{chunk-6MVMTDL7.js → chunk-ZPLBQ24U.js} +4 -4
  38. package/dist/cli/{chunk-HIPRSI5H.js → chunk-ZXBVQAQW.js} +327 -314
  39. package/dist/cli/client-LNCVWDUS.js +20 -0
  40. package/dist/cli/{client-JIZWAGVW.mjs → client-MUO4FRKO.mjs} +3 -3
  41. package/dist/cli/{csv-7DCY7Z6R.mjs → csv-2RT3FVOD.mjs} +3 -3
  42. package/dist/cli/{csv-KAFKXAFU.js → csv-NGNI7CWG.js} +12 -12
  43. package/dist/cli/{db-5LJPO2VA.js → db-7GKM6IUK.js} +29 -29
  44. package/dist/cli/{db-KJBWUFPL.mjs → db-KUKHLFYS.mjs} +4 -4
  45. package/dist/cli/{describe-CPF4KDKZ.mjs → describe-6MJ4B7NU.mjs} +8 -8
  46. package/dist/cli/{describe-VJEEVOH6.js → describe-RDSWCQCO.js} +15 -15
  47. package/dist/cli/{executions-LJN5QOK7.mjs → executions-C7NXL7QR.mjs} +4 -4
  48. package/dist/cli/{executions-LPVCV5SC.js → executions-E6NAUIUO.js} +6 -6
  49. package/dist/cli/{feedback-3HYS6ECC.mjs → feedback-D52ZWOTA.mjs} +3 -3
  50. package/dist/cli/{feedback-K26WP7HJ.js → feedback-K5MAECHI.js} +6 -6
  51. package/dist/cli/getting-started.d.mts +47 -9
  52. package/dist/cli/getting-started.d.ts +47 -9
  53. package/dist/cli/getting-started.js +2 -2
  54. package/dist/cli/getting-started.mjs +1 -1
  55. package/dist/cli/git-E62XZHQW.js +23 -0
  56. package/dist/cli/{git-U4VBLXSS.mjs → git-YJLIAQJW.mjs} +4 -4
  57. package/dist/cli/index.js +79 -79
  58. package/dist/cli/index.mjs +31 -31
  59. package/dist/cli/{legacy-noops-ORHX2FMA.mjs → legacy-noops-PK6JF4Y5.mjs} +4 -4
  60. package/dist/cli/{legacy-noops-32YL3VF4.js → legacy-noops-V3BNZ4BV.js} +7 -7
  61. package/dist/cli/{monitors-5JJBEJS7.mjs → monitors-ABKZDCOX.mjs} +4 -4
  62. package/dist/cli/{monitors-NFE4ICED.js → monitors-ZC6CFUHS.js} +85 -85
  63. package/dist/cli/{org-RJYSDJ3W.mjs → org-JB46ECLU.mjs} +4 -4
  64. package/dist/cli/{org-7CJS35TF.js → org-RQGEMXS6.js} +60 -60
  65. package/dist/cli/play-TRKFECQV.js +153 -0
  66. package/dist/cli/{play-H2QUTJR2.mjs → play-WANQPXLR.mjs} +7 -7
  67. package/dist/cli/{providers-VUKRZWZY.js → providers-JRRQEOUN.js} +7 -7
  68. package/dist/cli/{providers-TEVRE4Q6.mjs → providers-T4FBXHMX.mjs} +4 -4
  69. package/dist/cli/{quickstart-36OGYQ2P.js → quickstart-35VIDBJK.js} +12 -12
  70. package/dist/cli/{quickstart-2MIHVSZO.mjs → quickstart-KTT4JBZY.mjs} +4 -4
  71. package/dist/cli/{search-IRRQSN6R.mjs → search-DZ5I6Q5Z.mjs} +5 -5
  72. package/dist/cli/search-KMMM4BRX.js +26 -0
  73. package/dist/cli/{secrets-K67ZKZZM.js → secrets-4FZIXXPT.js} +13 -13
  74. package/dist/cli/{secrets-3W6OVDVE.mjs → secrets-H6UBIMY7.mjs} +4 -4
  75. package/dist/cli/{sessions-AOMOV4HG.mjs → sessions-63S3OOVP.mjs} +4 -4
  76. package/dist/cli/{sessions-SLQ2QFLK.js → sessions-RDM6DBHZ.js} +5 -5
  77. package/dist/cli/{settings-L4IFYF5D.mjs → settings-JQQVY5I5.mjs} +7 -7
  78. package/dist/cli/{settings-2X7H6O4I.js → settings-S4AHAT3J.js} +74 -74
  79. package/dist/cli/{setup-2RY5APQS.js → setup-76X6E2IB.js} +49 -49
  80. package/dist/cli/{setup-CZYQTZ2K.mjs → setup-W6U2T7HU.mjs} +7 -7
  81. package/dist/cli/skills-HLLZUL4W.js +28 -0
  82. package/dist/cli/{skills-D2QQH5S7.mjs → skills-ONHUMRAF.mjs} +4 -4
  83. package/dist/cli/{tools-TYIEROJJ.mjs → tools-JEC63YLX.mjs} +6 -6
  84. package/dist/cli/tools-YSUGUPYH.js +40 -0
  85. package/dist/cli/{update-7YCSUWFP.mjs → update-3M5CUY4U.mjs} +6 -6
  86. package/dist/cli/update-ASHUXHC5.js +28 -0
  87. package/dist/cli/{workflow-42IFLYPN.js → workflow-PEU7CC4I.js} +15 -15
  88. package/dist/cli/{workflow-GGRUCLCI.mjs → workflow-SDT7YIQ7.mjs} +5 -5
  89. package/dist/index.js +6 -6
  90. package/dist/index.mjs +3 -3
  91. package/dist/install-integrity.json +76 -76
  92. package/dist/release.d.mts +1 -1
  93. package/dist/release.d.ts +1 -1
  94. package/dist/release.js +2 -2
  95. package/dist/release.mjs +1 -1
  96. package/package.json +1 -1
  97. package/dist/cli/auth-WR3XFOHN.js +0 -31
  98. package/dist/cli/client-6OBIO6GC.js +0 -20
  99. package/dist/cli/git-VMQTXKJQ.js +0 -23
  100. package/dist/cli/play-FUZYMPHF.js +0 -153
  101. package/dist/cli/search-DFSHYVZ5.js +0 -26
  102. package/dist/cli/skills-RIFYRYWL.js +0 -28
  103. package/dist/cli/tools-M7LTH6ZT.js +0 -40
  104. package/dist/cli/update-HC62SVSQ.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 _chunkR6O3YVIGjs = require('./chunk-R6O3YVIG.js');
13
+ var _chunk5S4FMN6Tjs = require('./chunk-5S4FMN6T.js');
14
14
 
15
15
 
16
16
 
17
- var _chunk6466HVYRjs = require('./chunk-6466HVYR.js');
17
+ var _chunkJEE7AKWPjs = require('./chunk-JEE7AKWP.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 _chunkZ6VHC643js = require('./chunk-Z6VHC643.js');
42
+ var _chunk4WHJDGBCjs = require('./chunk-4WHJDGBC.js');
43
43
 
44
44
 
45
45
 
@@ -72,10 +72,10 @@ var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
72
72
 
73
73
 
74
74
 
75
- var _chunkUUB3FTKZjs = require('./chunk-UUB3FTKZ.js');
75
+ var _chunkI5XF4PWDjs = require('./chunk-I5XF4PWD.js');
76
76
 
77
77
 
78
- var _chunk6MVMTDL7js = require('./chunk-6MVMTDL7.js');
78
+ var _chunkZPLBQ24Ujs = require('./chunk-ZPLBQ24U.js');
79
79
 
80
80
 
81
81
 
@@ -2067,7 +2067,7 @@ function resolveField(key, command) {
2067
2067
  function printSettings(result, json, name) {
2068
2068
  result = { ...result, settings: parsePlaySettings(result.settings) };
2069
2069
  const selected = fields.filter(([key]) => !name || key === name);
2070
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
2070
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
2071
2071
  {
2072
2072
  ...result,
2073
2073
  settings: Object.fromEntries(
@@ -2111,7 +2111,7 @@ function registerPlaySettingsCommands(plays) {
2111
2111
  valueSyntax: field.cli.valueSyntax,
2112
2112
  examples: field.cli.examples
2113
2113
  }));
2114
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
2114
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
2115
2115
  {
2116
2116
  fields: descriptions,
2117
2117
  render: {
@@ -2136,7 +2136,7 @@ function registerPlaySettingsCommands(plays) {
2136
2136
  async (options, command) => {
2137
2137
  if (options.name !== void 0) resolveField(options.name, command);
2138
2138
  printSettings(
2139
- await new (0, _chunkZ6VHC643js.DeeplineClient)().getPlaySettings(options.play),
2139
+ await new (0, _chunk4WHJDGBCjs.DeeplineClient)().getPlaySettings(options.play),
2140
2140
  options.json,
2141
2141
  options.name
2142
2142
  );
@@ -2167,7 +2167,7 @@ function registerPlaySettingsCommands(plays) {
2167
2167
  );
2168
2168
  }
2169
2169
  if (options.dryRun) {
2170
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
2170
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
2171
2171
  {
2172
2172
  dryRun: true,
2173
2173
  play,
@@ -2188,7 +2188,7 @@ function registerPlaySettingsCommands(plays) {
2188
2188
  return;
2189
2189
  }
2190
2190
  printSettings(
2191
- await new (0, _chunkZ6VHC643js.DeeplineClient)().updatePlaySettings(play, patch),
2191
+ await new (0, _chunk4WHJDGBCjs.DeeplineClient)().updatePlaySettings(play, patch),
2192
2192
  options.json
2193
2193
  );
2194
2194
  };
@@ -2214,13 +2214,13 @@ function registerPlaySettingsCommands(plays) {
2214
2214
  "--root must be person or team; --limit must be 1\u2013100.",
2215
2215
  { exitCode: 2 }
2216
2216
  );
2217
- const page = await new (0, _chunkZ6VHC643js.DeeplineClient)().listPlaySettingsPaths({
2217
+ const page = await new (0, _chunk4WHJDGBCjs.DeeplineClient)().listPlaySettingsPaths({
2218
2218
  root: options.root,
2219
2219
  limit,
2220
2220
  cursor: options.cursor
2221
2221
  });
2222
2222
  const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""} --json` : null;
2223
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
2223
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
2224
2224
  {
2225
2225
  ...page,
2226
2226
  nextCommand,
@@ -2271,7 +2271,7 @@ function registerPlaySettingsCommands(plays) {
2271
2271
  root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.root]), () => ( "person")),
2272
2272
  folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _14 => _14.folders]), () => ( []))
2273
2273
  };
2274
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
2274
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
2275
2275
  const paths = [];
2276
2276
  let cursor;
2277
2277
  do {
@@ -2333,7 +2333,7 @@ function registerPlaySettingsCommands(plays) {
2333
2333
  moved.push(move.playName);
2334
2334
  }
2335
2335
  }
2336
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
2336
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
2337
2337
  {
2338
2338
  dryRun: Boolean(options.dryRun),
2339
2339
  from: options.from,
@@ -2461,7 +2461,7 @@ function triggerLines(view) {
2461
2461
  return lines;
2462
2462
  }
2463
2463
  function printView(view, json) {
2464
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
2464
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
2465
2465
  {
2466
2466
  ...view,
2467
2467
  render: {
@@ -2474,7 +2474,7 @@ function printView(view, json) {
2474
2474
  );
2475
2475
  }
2476
2476
  function printResult(result, json) {
2477
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
2477
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
2478
2478
  {
2479
2479
  ...result,
2480
2480
  render: {
@@ -2504,7 +2504,7 @@ async function mutate(command, options, build) {
2504
2504
  usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
2505
2505
  }
2506
2506
  if (options.dryRun) {
2507
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
2507
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
2508
2508
  {
2509
2509
  dryRun: true,
2510
2510
  play: options.play,
@@ -2523,7 +2523,7 @@ async function mutate(command, options, build) {
2523
2523
  return;
2524
2524
  }
2525
2525
  printResult(
2526
- await new (0, _chunkZ6VHC643js.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
2526
+ await new (0, _chunk4WHJDGBCjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
2527
2527
  options.json
2528
2528
  );
2529
2529
  }
@@ -2556,7 +2556,7 @@ function registerPlayTriggerConfigCommands(plays) {
2556
2556
  }).addHelpText("after", help2);
2557
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) => {
2558
2558
  printView(
2559
- await new (0, _chunkZ6VHC643js.DeeplineClient)().getPlayTriggerConfig(options.play),
2559
+ await new (0, _chunk4WHJDGBCjs.DeeplineClient)().getPlayTriggerConfig(options.play),
2560
2560
  options.json
2561
2561
  );
2562
2562
  });
@@ -2600,7 +2600,7 @@ function registerPlayTriggerConfigCommands(plays) {
2600
2600
  if (options.auth === void 0) {
2601
2601
  if (secrets.length || options.header || options.signaturePrefix)
2602
2602
  usage(setWebhook, "--secret/--header need --auth.");
2603
- const current = await new (0, _chunkZ6VHC643js.DeeplineClient)().getPlayTriggerConfig(
2603
+ const current = await new (0, _chunk4WHJDGBCjs.DeeplineClient)().getPlayTriggerConfig(
2604
2604
  options.play
2605
2605
  );
2606
2606
  return {
@@ -2677,7 +2677,7 @@ var KIND_DESCRIPTIONS = {
2677
2677
  "receipt.skipped": "Saved work result: skipped.",
2678
2678
  "runtime.event": "Other event."
2679
2679
  };
2680
- var RUN_LOGS_KIND_HELP = _chunkZ6VHC643js.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
2680
+ var RUN_LOGS_KIND_HELP = _chunk4WHJDGBCjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
2681
2681
  kind,
2682
2682
  description: KIND_DESCRIPTIONS[kind]
2683
2683
  }));
@@ -2814,9 +2814,9 @@ function configureRunQueryCommandErrors(command, resource) {
2814
2814
  const args = program.args;
2815
2815
  if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
2816
2816
  error.exitCode = 2;
2817
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
2818
- _chunkUUB3FTKZjs.printJsonError.call(void 0,
2819
- Object.assign(new (0, _chunkZ6VHC643js.RunEventQueryInputError)(error.message), {
2817
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
2818
+ _chunkI5XF4PWDjs.printJsonError.call(void 0,
2819
+ Object.assign(new (0, _chunk4WHJDGBCjs.RunEventQueryInputError)(error.message), {
2820
2820
  exitCode: 2,
2821
2821
  retryable: false
2822
2822
  })
@@ -2860,14 +2860,14 @@ function parseQuery(args, resource) {
2860
2860
  if (VALUE_FLAGS.has(flag)) {
2861
2861
  const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
2862
2862
  if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
2863
- throw new (0, _chunkZ6VHC643js.RunEventQueryInputError)(
2863
+ throw new (0, _chunk4WHJDGBCjs.RunEventQueryInputError)(
2864
2864
  `${flag} requires a value. Use ${flag} <value>.`
2865
2865
  );
2866
2866
  }
2867
2867
  if (flag === "--sum") sums.push(value);
2868
2868
  else {
2869
2869
  if (values[flag] !== void 0) {
2870
- throw new (0, _chunkZ6VHC643js.RunEventQueryInputError)(
2870
+ throw new (0, _chunk4WHJDGBCjs.RunEventQueryInputError)(
2871
2871
  `${flag} may only be supplied once.`
2872
2872
  );
2873
2873
  }
@@ -2881,12 +2881,12 @@ function parseQuery(args, resource) {
2881
2881
  }
2882
2882
  if (arg.startsWith("-")) {
2883
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.";
2884
- throw new (0, _chunkZ6VHC643js.RunEventQueryInputError)(
2884
+ throw new (0, _chunk4WHJDGBCjs.RunEventQueryInputError)(
2885
2885
  `Unsupported query flag ${flag}. ${correction}`
2886
2886
  );
2887
2887
  }
2888
2888
  if (runId !== void 0) {
2889
- throw new (0, _chunkZ6VHC643js.RunEventQueryInputError)(
2889
+ throw new (0, _chunk4WHJDGBCjs.RunEventQueryInputError)(
2890
2890
  `Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
2891
2891
  );
2892
2892
  }
@@ -2894,7 +2894,7 @@ function parseQuery(args, resource) {
2894
2894
  }
2895
2895
  if (switches.has("--fields")) {
2896
2896
  if (runId !== void 0) {
2897
- throw new (0, _chunkZ6VHC643js.RunEventQueryInputError)(
2897
+ throw new (0, _chunk4WHJDGBCjs.RunEventQueryInputError)(
2898
2898
  "--fields does not use a run ID. Omit the positional run ID."
2899
2899
  );
2900
2900
  }
@@ -2907,18 +2907,18 @@ function parseQuery(args, resource) {
2907
2907
  )
2908
2908
  ];
2909
2909
  if (incompatible.length) {
2910
- throw new (0, _chunkZ6VHC643js.RunEventQueryInputError)(
2910
+ throw new (0, _chunk4WHJDGBCjs.RunEventQueryInputError)(
2911
2911
  `--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
2912
2912
  );
2913
2913
  }
2914
2914
  }
2915
2915
  if (switches.has("--count") && values["--group-by"] !== void 0) {
2916
- throw new (0, _chunkZ6VHC643js.RunEventQueryInputError)(
2916
+ throw new (0, _chunk4WHJDGBCjs.RunEventQueryInputError)(
2917
2917
  "--count cannot be combined with --group-by. Use --group-by for counts per group."
2918
2918
  );
2919
2919
  }
2920
2920
  if (sums.length && switches.has("--count")) {
2921
- throw new (0, _chunkZ6VHC643js.RunEventQueryInputError)(
2921
+ throw new (0, _chunk4WHJDGBCjs.RunEventQueryInputError)(
2922
2922
  "--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
2923
2923
  );
2924
2924
  }
@@ -2926,7 +2926,7 @@ function parseQuery(args, resource) {
2926
2926
  if (operation === "count") {
2927
2927
  for (const flag of ["--limit", "--cursor", "--payloads"]) {
2928
2928
  if (values[flag] !== void 0 || switches.has(flag)) {
2929
- throw new (0, _chunkZ6VHC643js.RunEventQueryInputError)(
2929
+ throw new (0, _chunk4WHJDGBCjs.RunEventQueryInputError)(
2930
2930
  `--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
2931
2931
  );
2932
2932
  }
@@ -2961,16 +2961,16 @@ function parseQuery(args, resource) {
2961
2961
  ];
2962
2962
  }
2963
2963
  }
2964
- const request = _chunkZ6VHC643js.normalizeRunEventOperationRequest.call(void 0, body);
2964
+ const request = _chunk4WHJDGBCjs.normalizeRunEventOperationRequest.call(void 0, body);
2965
2965
  const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
2966
2966
  const backend = values["--runtime-backend"];
2967
2967
  if (backend && backend !== "daytona" && backend !== "modal") {
2968
- throw new (0, _chunkZ6VHC643js.RunEventQueryInputError)(
2968
+ throw new (0, _chunk4WHJDGBCjs.RunEventQueryInputError)(
2969
2969
  "--runtime-backend must be daytona or modal."
2970
2970
  );
2971
2971
  }
2972
2972
  if (backend && !namespace) {
2973
- throw new (0, _chunkZ6VHC643js.RunEventQueryInputError)(
2973
+ throw new (0, _chunk4WHJDGBCjs.RunEventQueryInputError)(
2974
2974
  "--runtime-backend requires --runtime-namespace."
2975
2975
  );
2976
2976
  }
@@ -3018,12 +3018,12 @@ async function handleRunEventQuery(args, resource = "logs") {
3018
3018
  const failure = error instanceof Error ? error : new Error(String(error));
3019
3019
  const record3 = failure;
3020
3020
  const status = record3.statusCode;
3021
- const exitCode = error instanceof _chunkZ6VHC643js.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 _chunk4WHJDGBCjs.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;
3022
3022
  const diagnostic = Object.assign(failure, {
3023
3023
  exitCode,
3024
3024
  retryable: exitCode === 5
3025
3025
  });
3026
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) _chunkUUB3FTKZjs.printJsonError.call(void 0, diagnostic);
3026
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) _chunkI5XF4PWDjs.printJsonError.call(void 0, diagnostic);
3027
3027
  else console.error(`Error: ${diagnostic.message}`);
3028
3028
  return exitCode;
3029
3029
  }
@@ -3038,7 +3038,7 @@ async function executeRunEventQuery(args, resource) {
3038
3038
  ...criteria
3039
3039
  } = request;
3040
3040
  const options = { ...criteria, ...runtime ? { runtime } : {} };
3041
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
3041
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
3042
3042
  let result;
3043
3043
  if (request.operation === "fields") {
3044
3044
  result = await client.runs[resource].fields(runtime ? { runtime } : {});
@@ -3104,13 +3104,13 @@ async function executeRunEventQuery(args, resource) {
3104
3104
  lines.push(`Next page: ${nextPage}`);
3105
3105
  }
3106
3106
  }
3107
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
3107
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
3108
3108
  {
3109
3109
  ...result,
3110
3110
  ...nextPage ? { next: { page: nextPage } } : {},
3111
3111
  render: { sections: [{ title: `run ${resource}`, lines }] }
3112
3112
  },
3113
- { json: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
3113
+ { json: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
3114
3114
  ` }
3115
3115
  );
3116
3116
  return 0;
@@ -3930,7 +3930,7 @@ function checkedRunExample(plays, target) {
3930
3930
  const quote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
3931
3931
  const base = `deepline plays run --file ${quote(target)}`;
3932
3932
  return {
3933
- command: `${base}${_chunkZ6VHC643js.playInputExampleArgs.call(void 0, schema)} --json`,
3933
+ command: `${base}${_chunk4WHJDGBCjs.playInputExampleArgs.call(void 0, schema)} --json`,
3934
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."
3935
3935
  };
3936
3936
  }
@@ -5553,7 +5553,7 @@ async function runPlayBootstrap(args) {
5553
5553
  return runMonitorBootstrap(args);
5554
5554
  }
5555
5555
  const options = parsePlayBootstrapOptions(args);
5556
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
5556
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
5557
5557
  const contracts = await loadBootstrapContracts(client, options);
5558
5558
  const csvContext = loadCsvContext(options.from);
5559
5559
  const source = generateBootstrapPlaySource({
@@ -5708,7 +5708,7 @@ Existing credential redactions and referenced-list previews remain as stored.
5708
5708
  ...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
5709
5709
  );
5710
5710
  }
5711
- const response = await new (0, _chunkZ6VHC643js.DeeplineClient)().runs.getReceipts(runId, {
5711
+ const response = await new (0, _chunk4WHJDGBCjs.DeeplineClient)().runs.getReceipts(runId, {
5712
5712
  keys
5713
5713
  });
5714
5714
  const failed = response.receipts.filter(
@@ -5720,7 +5720,7 @@ Existing credential redactions and referenced-list previews remain as stored.
5720
5720
  JSON.stringify(response, null, 2) + "\n",
5721
5721
  { flag: "wx", mode: 384 }
5722
5722
  );
5723
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
5723
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
5724
5724
  {
5725
5725
  runId,
5726
5726
  out: options.out,
@@ -5730,7 +5730,7 @@ Existing credential redactions and referenced-list previews remain as stored.
5730
5730
  { json: true }
5731
5731
  );
5732
5732
  } else {
5733
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
5733
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
5734
5734
  }
5735
5735
  if (failed)
5736
5736
  process.exitCode = response.receipts.some(
@@ -5769,7 +5769,7 @@ includes nextCommand when another page is available.
5769
5769
  { exitCode: 2 }
5770
5770
  );
5771
5771
  }
5772
- const page = await new (0, _chunkZ6VHC643js.DeeplineClient)().runs.children(parentRunId, {
5772
+ const page = await new (0, _chunk4WHJDGBCjs.DeeplineClient)().runs.children(parentRunId, {
5773
5773
  launchKey: options.launchKey,
5774
5774
  ...options.cursor !== void 0 ? { cursor: options.cursor } : {},
5775
5775
  limit
@@ -5785,7 +5785,7 @@ includes nextCommand when another page is available.
5785
5785
  String(limit),
5786
5786
  "--json"
5787
5787
  ].join(" ") : null;
5788
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
5788
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
5789
5789
  {
5790
5790
  parentRunId,
5791
5791
  launchKey: options.launchKey,
@@ -5821,7 +5821,7 @@ async function handleRunsHistory(options) {
5821
5821
  throw new Error("--limit must be a positive integer.");
5822
5822
  }
5823
5823
  }
5824
- const page = await new (0, _chunkZ6VHC643js.DeeplineClient)().runs.history({
5824
+ const page = await new (0, _chunk4WHJDGBCjs.DeeplineClient)().runs.history({
5825
5825
  cursor: options.cursor,
5826
5826
  orgId: options.org,
5827
5827
  search: options.search,
@@ -5837,7 +5837,7 @@ async function handleRunsHistory(options) {
5837
5837
  );
5838
5838
  }
5839
5839
  if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
5840
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
5840
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
5841
5841
  { ...page, render: { sections: [{ title: "Run history", lines }] } },
5842
5842
  options.json ? { json: true } : {}
5843
5843
  );
@@ -5889,12 +5889,12 @@ async function runRunsRerunCommand(runId, options) {
5889
5889
  return 1;
5890
5890
  }
5891
5891
  }
5892
- const result = await new (0, _chunkZ6VHC643js.DeeplineClient)().runs.rerun(runId, {
5892
+ const result = await new (0, _chunk4WHJDGBCjs.DeeplineClient)().runs.rerun(runId, {
5893
5893
  ...idempotencyKey === void 0 ? {} : { idempotencyKey },
5894
5894
  ...inputOverrides === void 0 ? {} : { inputOverrides }
5895
5895
  });
5896
- if (_chunkUUB3FTKZjs.shouldEmitJson.call(void 0, options.json)) {
5897
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0, result, { json: true });
5896
+ if (_chunkI5XF4PWDjs.shouldEmitJson.call(void 0, options.json)) {
5897
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0, result, { json: true });
5898
5898
  } else {
5899
5899
  console.log(
5900
5900
  result.deduplicated === true ? `
@@ -6162,7 +6162,7 @@ function projectRunDatasetCell(value) {
6162
6162
  const logicalValue = parseSerializedDatasetValue(value);
6163
6163
  if (logicalValue === null || logicalValue === void 0) return logicalValue;
6164
6164
  if (typeof logicalValue === "object") {
6165
- return _chunkUUB3FTKZjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
6165
+ return _chunkI5XF4PWDjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
6166
6166
  }
6167
6167
  return logicalValue;
6168
6168
  }
@@ -8579,7 +8579,7 @@ function renderOutcome(outcome) {
8579
8579
  function printResult2(input) {
8580
8580
  const failed = input.status === "failed" || input.status === "cancelled";
8581
8581
  if (failed) process.exitCode = 1;
8582
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
8582
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
8583
8583
  {
8584
8584
  deployment: { ...input.deployment, status: input.status },
8585
8585
  plays: input.outcomes,
@@ -8604,7 +8604,7 @@ async function handlePlaysDeploy(directory, options) {
8604
8604
  const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
8605
8605
  throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
8606
8606
  });
8607
- const { http, config } = _chunkUUB3FTKZjs.getAuthedHttpClient.call(void 0, );
8607
+ const { http, config } = _chunkI5XF4PWDjs.getAuthedHttpClient.call(void 0, );
8608
8608
  const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
8609
8609
  const startDeployment = () => http.post("/api/v2/deployments", {
8610
8610
  deliveryId,
@@ -8631,7 +8631,7 @@ async function handlePlaysDeploy(directory, options) {
8631
8631
  },
8632
8632
  {
8633
8633
  bundle: bundleDeployPlayFile,
8634
- fetchImpl: _chunk6MVMTDL7js.fetchWithDeploymentProtection,
8634
+ fetchImpl: _chunkZPLBQ24Ujs.fetchWithDeploymentProtection,
8635
8635
  // The plays are already here: "opening" the source is naming it.
8636
8636
  openSource: async () => ({
8637
8637
  open: async () => ({ repoRoot: root })
@@ -9199,7 +9199,7 @@ function parseInputFlagValue(raw) {
9199
9199
  return raw;
9200
9200
  }
9201
9201
  function parsePlayRunOptions(args, initialInput = null) {
9202
- const selection = _chunkUUB3FTKZjs.parseJsonFields.call(void 0, args, "run");
9202
+ const selection = _chunkI5XF4PWDjs.parseJsonFields.call(void 0, args, "run");
9203
9203
  args = selection.args;
9204
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.";
9205
9205
  let filePath = null;
@@ -9209,7 +9209,7 @@ function parsePlayRunOptions(args, initialInput = null) {
9209
9209
  let revisionSelector = null;
9210
9210
  const watch = !args.includes("--no-wait");
9211
9211
  const dryRun = args.includes("--dry-run");
9212
- let jsonOutput = dryRun ? _chunkUUB3FTKZjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkUUB3FTKZjs.argsWantJson.call(void 0, args);
9212
+ let jsonOutput = dryRun ? _chunkI5XF4PWDjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkI5XF4PWDjs.argsWantJson.call(void 0, args);
9213
9213
  const fullJson = args.includes("--full");
9214
9214
  const force = args.includes("--force");
9215
9215
  const forceToolRefresh = args.includes("--force-tool-refresh");
@@ -9256,7 +9256,7 @@ function parsePlayRunOptions(args, initialInput = null) {
9256
9256
  "--log-level requires one of: debug, info, warn, error."
9257
9257
  );
9258
9258
  }
9259
- const parsed = _chunkZ6VHC643js.parseLogLevel.call(void 0, value);
9259
+ const parsed = _chunk4WHJDGBCjs.parseLogLevel.call(void 0, value);
9260
9260
  if (!parsed) {
9261
9261
  throw new Error(
9262
9262
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -9563,7 +9563,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
9563
9563
  const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
9564
9564
  (arg) => arg === "--log-level" || arg.startsWith("--log-level=")
9565
9565
  );
9566
- let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkZ6VHC643js.parseLogLevel.call(void 0, options.logLevel);
9566
+ let logLevel = options.logLevel === void 0 ? base.logLevel : _chunk4WHJDGBCjs.parseLogLevel.call(void 0, options.logLevel);
9567
9567
  if (!logLevel)
9568
9568
  throw new Error("--log-level requires one of: debug, info, warn, error.");
9569
9569
  const debugAlias = options.logs || options.debug === true || inputArgs.some(
@@ -9577,13 +9577,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
9577
9577
  if (debugAlias || debugMapLatency && logLevel === "info")
9578
9578
  logLevel = "debug";
9579
9579
  const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
9580
- const jsonFields = options.json === void 0 ? base.jsonFields : _chunkUUB3FTKZjs.parseJsonFields.call(void 0,
9581
- [...fullJson ? ["--full"] : [], ..._chunkUUB3FTKZjs.jsonFieldArgs.call(void 0, options.json)],
9580
+ const jsonFields = options.json === void 0 ? base.jsonFields : _chunkI5XF4PWDjs.parseJsonFields.call(void 0,
9581
+ [...fullJson ? ["--full"] : [], ..._chunkI5XF4PWDjs.jsonFieldArgs.call(void 0, options.json)],
9582
9582
  "run"
9583
9583
  ).fields;
9584
9584
  const watch = options.wait === false ? false : base.watch;
9585
9585
  const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
9586
- const jsonOutput = dryRun || !watch ? explicitJson || _chunkUUB3FTKZjs.argsWantJson.call(void 0, []) : explicitJson;
9586
+ const jsonOutput = dryRun || !watch ? explicitJson || _chunkI5XF4PWDjs.argsWantJson.call(void 0, []) : explicitJson;
9587
9587
  const verboseLogs = Boolean(
9588
9588
  debugAlias || logLevel === "debug" || debugMapLatency
9589
9589
  );
@@ -9627,7 +9627,7 @@ function playAuthoringGraphPath(parent, filePath) {
9627
9627
  // src/cli/renderers/local-play-execution.ts
9628
9628
  function renderLocalPlayExecutionPlan(plan, options = {}) {
9629
9629
  if (options.dryRun) {
9630
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
9630
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
9631
9631
  return;
9632
9632
  }
9633
9633
  process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
@@ -10593,7 +10593,7 @@ function playStatusErrorText(status) {
10593
10593
  function isRetryablePendingStartFailure(status) {
10594
10594
  if (status.status !== "failed") return false;
10595
10595
  if (status.runId && status.runId !== "pending") return false;
10596
- return _chunkZ6VHC643js.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
10596
+ return _chunk4WHJDGBCjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
10597
10597
  }
10598
10598
  function pendingStartFailureStatus(input) {
10599
10599
  const message = input.error instanceof Error ? input.error.message : String(input.error);
@@ -10620,13 +10620,13 @@ var PLAY_PROGRESS_HEARTBEAT_INTERVAL_MS = 15e3;
10620
10620
  var PLAY_STATUS_HEARTBEAT_INTERVAL_MS = 15e3;
10621
10621
  function watchSurfaceReaches(state, provenance, level) {
10622
10622
  const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
10623
- if (!_chunkZ6VHC643js.logLevelReaches.call(void 0, level, minimumLevel)) {
10623
+ if (!_chunk4WHJDGBCjs.logLevelReaches.call(void 0, level, minimumLevel)) {
10624
10624
  return false;
10625
10625
  }
10626
- if (_chunkZ6VHC643js.logProvenanceReaches.call(void 0, provenance, "watch")) {
10626
+ if (_chunk4WHJDGBCjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
10627
10627
  return true;
10628
10628
  }
10629
- return state.verbose === true && _chunkZ6VHC643js.logProvenanceReaches.call(void 0, provenance, "debug");
10629
+ return state.verbose === true && _chunk4WHJDGBCjs.logProvenanceReaches.call(void 0, provenance, "debug");
10630
10630
  }
10631
10631
  function getEventPayload(event) {
10632
10632
  return event.payload && typeof event.payload === "object" ? event.payload : {};
@@ -11128,7 +11128,7 @@ function buildPlayDashboardUrl(baseUrl, playName) {
11128
11128
  }
11129
11129
  function openPlayDashboard(dashboardUrl, open2) {
11130
11130
  if (open2 && dashboardUrl) {
11131
- _chunkUUB3FTKZjs.openInBrowser.call(void 0, dashboardUrl);
11131
+ _chunkI5XF4PWDjs.openInBrowser.call(void 0, dashboardUrl);
11132
11132
  }
11133
11133
  }
11134
11134
  function printPlayLogLines(input) {
@@ -11190,7 +11190,7 @@ async function waitForPlayCompletionByWatch(input) {
11190
11190
  billing: false
11191
11191
  });
11192
11192
  } catch (error) {
11193
- if (_chunkZ6VHC643js.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
11193
+ if (_chunk4WHJDGBCjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
11194
11194
  return null;
11195
11195
  }
11196
11196
  throw error;
@@ -11379,7 +11379,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
11379
11379
  billing: false
11380
11380
  });
11381
11381
  } catch (error) {
11382
- if (_chunkZ6VHC643js.isTransientPlayRunReadError.call(void 0, error)) {
11382
+ if (_chunk4WHJDGBCjs.isTransientPlayRunReadError.call(void 0, error)) {
11383
11383
  return null;
11384
11384
  }
11385
11385
  throw error;
@@ -11587,7 +11587,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
11587
11587
  lastPhase
11588
11588
  });
11589
11589
  }
11590
- if (lastKnownWorkflowId && _chunkZ6VHC643js.isTransientPlayRunReadError.call(void 0, error)) {
11590
+ if (lastKnownWorkflowId && _chunk4WHJDGBCjs.isTransientPlayRunReadError.call(void 0, error)) {
11591
11591
  if (timeout) {
11592
11592
  clearTimeout(timeout);
11593
11593
  }
@@ -11623,7 +11623,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
11623
11623
  onRunAdmitted: confirmAdmission
11624
11624
  });
11625
11625
  }
11626
- if (!lastKnownWorkflowId && _chunkZ6VHC643js.isTransientPlayRunReadError.call(void 0, error)) {
11626
+ if (!lastKnownWorkflowId && _chunk4WHJDGBCjs.isTransientPlayRunReadError.call(void 0, error)) {
11627
11627
  _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
11628
11628
  phase: "cli.play_start_stream_transient_failure",
11629
11629
  ms: Date.now() - startedAt,
@@ -11722,7 +11722,7 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
11722
11722
  "logs"
11723
11723
  ]);
11724
11724
  function formatPlayLogLine(rawLine, state) {
11725
- const classified = _chunkZ6VHC643js.classifyLogLine.call(void 0, rawLine);
11725
+ const classified = _chunk4WHJDGBCjs.classifyLogLine.call(void 0, rawLine);
11726
11726
  const line = classified.line;
11727
11727
  const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
11728
11728
  const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _351 => _351[1]]) ? new Date(timestampMatch[1]) : null;
@@ -11737,14 +11737,14 @@ function formatPlayLogLine(rawLine, state) {
11737
11737
  if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
11738
11738
  const providerWait = formatProviderCapacityWaitLogLine(line);
11739
11739
  if (providerWait && !state.verbose) {
11740
- return _chunkZ6VHC643js.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
11740
+ return _chunk4WHJDGBCjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
11741
11741
  }
11742
11742
  const mapProgress = formatMapProgressDiagnosticLogLine(line);
11743
11743
  if (mapProgress && !state.verbose) {
11744
- return _chunkZ6VHC643js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
11744
+ return _chunk4WHJDGBCjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
11745
11745
  }
11746
11746
  if (/\[worker\] picked up run\b/.test(message)) {
11747
- if (!_chunkZ6VHC643js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11747
+ if (!_chunk4WHJDGBCjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11748
11748
  return null;
11749
11749
  }
11750
11750
  if (state.emittedRunnerStarted) {
@@ -11757,7 +11757,7 @@ function formatPlayLogLine(rawLine, state) {
11757
11757
  /^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
11758
11758
  );
11759
11759
  if (mapStart) {
11760
- if (!_chunkZ6VHC643js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11760
+ if (!_chunk4WHJDGBCjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11761
11761
  return null;
11762
11762
  }
11763
11763
  const [, rows, fields2, namespace, cached, pending] = mapStart;
@@ -11767,7 +11767,7 @@ function formatPlayLogLine(rawLine, state) {
11767
11767
  /^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
11768
11768
  );
11769
11769
  if (mapDone) {
11770
- if (!_chunkZ6VHC643js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11770
+ if (!_chunk4WHJDGBCjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
11771
11771
  return null;
11772
11772
  }
11773
11773
  const [, results, executed, cached] = mapDone;
@@ -13056,7 +13056,7 @@ function formatRecentRunLogLines(value) {
13056
13056
  (line) => typeof line === "string"
13057
13057
  );
13058
13058
  if (tail.length === 0) return [];
13059
- const shown = tail.map((line) => _chunkZ6VHC643js.classifyLogLine.call(void 0, line)).filter(
13059
+ const shown = tail.map((line) => _chunk4WHJDGBCjs.classifyLogLine.call(void 0, line)).filter(
13060
13060
  (entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
13061
13061
  ).slice(-8);
13062
13062
  const total = readNonNegativeInteger(logs.totalCount);
@@ -13335,7 +13335,7 @@ function writePlayResult(status, jsonOutput, options) {
13335
13335
  const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _432 => _432.hits]), () => ( null));
13336
13336
  if (jsonOutput) {
13337
13337
  const payload2 = _optionalChain([options, 'optionalAccess', _433 => _433.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
13338
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
13338
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
13339
13339
  hits ? { ...payload2, hits } : payload2,
13340
13340
  { json: true, fields: _optionalChain([options, 'optionalAccess', _434 => _434.jsonFields]) }
13341
13341
  );
@@ -13351,7 +13351,7 @@ function writePlayResult(status, jsonOutput, options) {
13351
13351
  ...buildPlayCompletionTextLines(status),
13352
13352
  ...formatRunHitsLines(hits)
13353
13353
  ];
13354
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0, displayPackage, {
13354
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0, displayPackage, {
13355
13355
  json: false,
13356
13356
  text: `${lines2.join("\n")}
13357
13357
  `
@@ -13402,7 +13402,7 @@ function writePlayResult(status, jsonOutput, options) {
13402
13402
  lines.push(...buildBillingRollupTextLines(status));
13403
13403
  const compact = compactPlayStatus(status);
13404
13404
  const payload = _optionalChain([options, 'optionalAccess', _436 => _436.fullJson]) ? status : compact;
13405
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
13405
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
13406
13406
  {
13407
13407
  ...payload,
13408
13408
  render: {
@@ -13692,6 +13692,12 @@ function assertDatasetHasExportableRows(input) {
13692
13692
  if (input.rowsInfo.rows.length > 0) {
13693
13693
  return input.rowsInfo;
13694
13694
  }
13695
+ const rowOutcomes = _nullishCoalesce(readRowOutcomeSummary(input.status), () => ( readRowOutcomeSummary(
13696
+ getRecordField(getRecordField(input.status, "result"), "_metadata")
13697
+ )));
13698
+ if (input.allowEmpty === true && input.status.status === "completed" && !getRecordField(input.status, "error") && !getRecordField(input.status.progress, "error") && structuredErrorsForStatus(input.status).length === 0 && input.rowsInfo.complete && input.rowsInfo.totalRows === 0 && _optionalChain([rowOutcomes, 'optionalAccess', _449 => _449.failedRows]) === 0 && !rowOutcomes.hasRowFailures) {
13699
+ return input.rowsInfo;
13700
+ }
13695
13701
  const datasetLabel = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(input.datasetPath, () => ( input.rowsInfo.tableNamespace)), () => ( input.rowsInfo.source)), () => ( "result.rows"));
13696
13702
  const available = input.availableRows.map((info) => _nullishCoalesce(info.tableNamespace, () => ( info.source))).filter((name) => typeof name === "string");
13697
13703
  const runStatus = String(_nullishCoalesce(input.status.status, () => ( ""))).toLowerCase();
@@ -13711,7 +13717,7 @@ function assertDatasetHasExportableRows(input) {
13711
13717
  if (!TERMINAL_PLAY_STATUSES.has(input.status.status)) {
13712
13718
  const waitCommand = `${retryCommand} --wait`;
13713
13719
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
13714
- `Run ${input.status.runId} is ${runStatus}; this dataset has no accepted rows to export yet. Wait for this same run: ${waitCommand}. Do not start another run to retrieve results.`,
13720
+ `Run ${input.status.runId} is ${runStatus}; this dataset has zero rows to export yet. Wait for this same run: ${waitCommand}. Do not start another run to retrieve results.`,
13715
13721
  void 0,
13716
13722
  "RUN_EXPORT_EMPTY",
13717
13723
  {
@@ -13761,8 +13767,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
13761
13767
  path: dataset.exportFile(outPath, options),
13762
13768
  rowsInfo: dataset.info(),
13763
13769
  currentTable: false,
13764
- datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _449 => _449.source]), () => ( null)),
13765
- datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _450 => _450.info, 'call', _451 => _451()]), () => ( null))
13770
+ datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _450 => _450.source]), () => ( null)),
13771
+ datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _451 => _451.info, 'call', _452 => _452()]), () => ( null))
13766
13772
  };
13767
13773
  };
13768
13774
  const run = Run.open({
@@ -13774,7 +13780,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
13774
13780
  const returnedRows = datasets.returned().map((dataset) => dataset.info());
13775
13781
  const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
13776
13782
  const selectedDataset = run.dataset(options.datasetPath);
13777
- const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _452 => _452.info, 'call', _453 => _453()]), () => ( null));
13783
+ const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _453 => _453.info, 'call', _454 => _454()]), () => ( null));
13778
13784
  if (!selectedDataset && options.datasetPath) {
13779
13785
  const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
13780
13786
  const commands = datasetChoiceLines({
@@ -13886,12 +13892,13 @@ ${commands.join("\n")}`,
13886
13892
  throw error;
13887
13893
  }
13888
13894
  }
13889
- if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _454 => _454.complete])) {
13895
+ if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _455 => _455.complete])) {
13890
13896
  const guarded2 = assertDatasetHasExportableRows({
13891
13897
  rowsInfo: fetchedRowsInfo,
13892
13898
  status,
13893
13899
  availableRows,
13894
13900
  datasetPath: options.datasetPath,
13901
+ allowEmpty: options.allowEmpty,
13895
13902
  outPath,
13896
13903
  format: options.format
13897
13904
  });
@@ -13903,6 +13910,7 @@ ${commands.join("\n")}`,
13903
13910
  status,
13904
13911
  availableRows,
13905
13912
  datasetPath: options.datasetPath,
13913
+ allowEmpty: options.allowEmpty,
13906
13914
  outPath,
13907
13915
  format: options.format
13908
13916
  });
@@ -13936,6 +13944,7 @@ ${commands.join("\n")}`,
13936
13944
  status,
13937
13945
  availableRows,
13938
13946
  datasetPath: options.datasetPath,
13947
+ allowEmpty: options.allowEmpty,
13939
13948
  outPath,
13940
13949
  format: options.format
13941
13950
  });
@@ -13945,7 +13954,7 @@ function extractActiveRunsFromError(error) {
13945
13954
  if (!(error instanceof _chunk7P5AA3SNjs.DeeplineError)) {
13946
13955
  return [];
13947
13956
  }
13948
- const response = _optionalChain([error, 'access', _455 => _455.details, 'optionalAccess', _456 => _456.response]);
13957
+ const response = _optionalChain([error, 'access', _456 => _456.details, 'optionalAccess', _457 => _457.response]);
13949
13958
  if (!response || typeof response !== "object" || Array.isArray(response)) {
13950
13959
  return [];
13951
13960
  }
@@ -14066,8 +14075,8 @@ function renderServerResultView(value) {
14066
14075
  return { lines: [], actions: [] };
14067
14076
  }
14068
14077
  const view = value;
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 : [];
14078
+ const renderedSections = Array.isArray(_optionalChain([view, 'access', _458 => _458.render, 'optionalAccess', _459 => _459.sections])) ? view.render.sections : [];
14079
+ const renderedActions = Array.isArray(_optionalChain([view, 'access', _460 => _460.render, 'optionalAccess', _461 => _461.actions])) ? view.render.actions : [];
14071
14080
  if (renderedSections.length > 0 || renderedActions.length > 0) {
14072
14081
  const lines2 = [];
14073
14082
  for (const section of renderedSections) {
@@ -14105,7 +14114,7 @@ function renderServerResultView(value) {
14105
14114
  }
14106
14115
  const tables = Array.isArray(view.tables) ? view.tables : [];
14107
14116
  const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
14108
- if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _461 => _461.queryCommand]) === "string") {
14117
+ if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _462 => _462.queryCommand]) === "string") {
14109
14118
  lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
14110
14119
  }
14111
14120
  if (tables.length > 0) {
@@ -14159,7 +14168,7 @@ function writeStartedPlayRun(input) {
14159
14168
  dashboardUrl: input.dashboardUrl,
14160
14169
  package: input.package
14161
14170
  };
14162
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
14171
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
14163
14172
  json: true,
14164
14173
  fields: input.jsonFields
14165
14174
  });
@@ -14181,7 +14190,7 @@ function writeStartedPlayRun(input) {
14181
14190
  input.progress.writeLine(output2, process.stdout);
14182
14191
  return;
14183
14192
  }
14184
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0, input.package, {
14193
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0, input.package, {
14185
14194
  json: false,
14186
14195
  text: `${output2}
14187
14196
  `
@@ -14210,7 +14219,7 @@ function writeStartedPlayRun(input) {
14210
14219
  ) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)} --json`] : []
14211
14220
  ];
14212
14221
  if (input.jsonOutput) {
14213
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
14222
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
14214
14223
  return;
14215
14224
  }
14216
14225
  if (input.dashboardUrl) {
@@ -14221,7 +14230,7 @@ function writeStartedPlayRun(input) {
14221
14230
  input.progress.writeLine(output, process.stdout);
14222
14231
  return;
14223
14232
  }
14224
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
14233
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
14225
14234
  {
14226
14235
  ...payload,
14227
14236
  render: { sections: [{ title: "play run", lines }] }
@@ -14231,7 +14240,7 @@ function writeStartedPlayRun(input) {
14231
14240
  );
14232
14241
  }
14233
14242
  function parsePlayCheckOptions(args) {
14234
- const selection = _chunkUUB3FTKZjs.parseJsonFields.call(void 0, args, "check");
14243
+ const selection = _chunkI5XF4PWDjs.parseJsonFields.call(void 0, args, "check");
14235
14244
  args = selection.args;
14236
14245
  const target = args[0];
14237
14246
  if (!target || target.startsWith("-")) {
@@ -14243,7 +14252,7 @@ function parsePlayCheckOptions(args) {
14243
14252
  if (arg !== "--json" && arg !== "--full")
14244
14253
  throw new Error(`Unknown plays check option: ${arg}`);
14245
14254
  }
14246
- const jsonOutput = _chunkUUB3FTKZjs.argsWantJson.call(void 0, args);
14255
+ const jsonOutput = _chunkI5XF4PWDjs.argsWantJson.call(void 0, args);
14247
14256
  return {
14248
14257
  target,
14249
14258
  jsonOutput,
@@ -14319,7 +14328,7 @@ ${PLAY_PUBLISH_USAGE}`
14319
14328
  useLatest,
14320
14329
  expectedArtifactHash,
14321
14330
  dryRun,
14322
- jsonOutput: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args)
14331
+ jsonOutput: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args)
14323
14332
  };
14324
14333
  }
14325
14334
  var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
@@ -14360,7 +14369,7 @@ ${PLAY_SAVE_USAGE}`);
14360
14369
  target,
14361
14370
  expectedArtifactHash,
14362
14371
  dryRun,
14363
- jsonOutput: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args)
14372
+ jsonOutput: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args)
14364
14373
  };
14365
14374
  }
14366
14375
  function printScheduledPlayCapacity(capacity) {
@@ -14413,7 +14422,7 @@ function checkHintExpression(value) {
14413
14422
  return stringValue3(value).replace(/^toolExecutionResult\./, "result.");
14414
14423
  }
14415
14424
  function checkHintRawPath(value) {
14416
- return _optionalChain([value, 'optionalAccess', _462 => _462.startsWith, 'call', _463 => _463("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
14425
+ return _optionalChain([value, 'optionalAccess', _463 => _463.startsWith, 'call', _464 => _464("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
14417
14426
  }
14418
14427
  function collectStaticPipelineToolIds(staticPipeline) {
14419
14428
  const seen = /* @__PURE__ */ new Set();
@@ -14488,30 +14497,30 @@ function cronExecutionLabel(status) {
14488
14497
  }
14489
14498
  function readLiveCronMetadata(play) {
14490
14499
  const record3 = readRecord(play);
14491
- const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _464 => _464.triggerMetadata]));
14500
+ const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _465 => _465.triggerMetadata]));
14492
14501
  return {
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
14502
+ schedule: typeof _optionalChain([metadata, 'optionalAccess', _466 => _466.cronSchedule]) === "string" ? metadata.cronSchedule : null,
14503
+ timezone: typeof _optionalChain([metadata, 'optionalAccess', _467 => _467.cronTimezone]) === "string" ? metadata.cronTimezone : null,
14504
+ nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _468 => _468.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
14505
+ blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _469 => _469.blockedAt]) === "number" ? metadata.blockedAt : null,
14506
+ blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _470 => _470.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
14498
14507
  };
14499
14508
  }
14500
14509
  function liveTriggerStatusLines(status, play) {
14501
14510
  const cron = readLiveCronMetadata(play);
14502
- if (!_optionalChain([status, 'optionalAccess', _470 => _470.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _471 => _471.webhook])) return [];
14511
+ if (!_optionalChain([status, 'optionalAccess', _471 => _471.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _472 => _472.webhook])) return [];
14503
14512
  const lines = [];
14504
- if (_optionalChain([status, 'optionalAccess', _472 => _472.cron]) || cron.schedule) {
14513
+ if (_optionalChain([status, 'optionalAccess', _473 => _473.cron]) || cron.schedule) {
14505
14514
  const timezone = cron.timezone ? ` (${cron.timezone})` : "";
14506
14515
  lines.push(
14507
- ` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _473 => _473.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
14516
+ ` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _474 => _474.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
14508
14517
  );
14509
- if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _474 => _474.cron]) === "active") {
14518
+ if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _475 => _475.cron]) === "active") {
14510
14519
  lines.push(
14511
14520
  ` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
14512
14521
  );
14513
14522
  }
14514
- if (_optionalChain([status, 'optionalAccess', _475 => _475.blockedReason])) {
14523
+ if (_optionalChain([status, 'optionalAccess', _476 => _476.blockedReason])) {
14515
14524
  lines.push(` Schedule issue: ${status.blockedReason}`);
14516
14525
  if (status.blockedReasonCode || cron.blockedReasonCode) {
14517
14526
  lines.push(
@@ -14527,7 +14536,7 @@ function liveTriggerStatusLines(status, play) {
14527
14536
  );
14528
14537
  }
14529
14538
  }
14530
- if (_optionalChain([status, 'optionalAccess', _476 => _476.webhook])) {
14539
+ if (_optionalChain([status, 'optionalAccess', _477 => _477.webhook])) {
14531
14540
  lines.push(` Webhook: ${status.webhook}`);
14532
14541
  }
14533
14542
  return lines;
@@ -14535,11 +14544,11 @@ function liveTriggerStatusLines(status, play) {
14535
14544
  function triggerStatusFromMetadata(value) {
14536
14545
  const metadata = readRecord(value);
14537
14546
  return {
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
14547
+ cron: typeof _optionalChain([metadata, 'optionalAccess', _478 => _478.cronStatus]) === "string" ? metadata.cronStatus : null,
14548
+ webhook: typeof _optionalChain([metadata, 'optionalAccess', _479 => _479.webhookStatus]) === "string" ? metadata.webhookStatus : null,
14549
+ blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _480 => _480.blockedReason]) === "string" ? metadata.blockedReason : null,
14550
+ blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _481 => _481.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
14551
+ blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _482 => _482.blockedAt]) === "number" ? metadata.blockedAt : null
14543
14552
  };
14544
14553
  }
14545
14554
  function printPublishReceipt(input) {
@@ -14571,7 +14580,7 @@ function printBundledRuntimeWarning(bundle) {
14571
14580
  async function handlePlayCheck(args) {
14572
14581
  const options = parsePlayCheckOptions(args);
14573
14582
  if (!isFileTarget2(options.target)) {
14574
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
14583
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
14575
14584
  try {
14576
14585
  await assertCanonicalNamedPlayReference(client, options.target, {
14577
14586
  command: "check"
@@ -14600,7 +14609,7 @@ async function handlePlayCheck(args) {
14600
14609
  },
14601
14610
  ...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
14602
14611
  };
14603
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0, result, {
14612
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0, result, {
14604
14613
  json: options.jsonOutput,
14605
14614
  fields: options.jsonFields,
14606
14615
  text: renderPlayCheckOutput(result) + "\n"
@@ -14610,7 +14619,7 @@ async function handlePlayCheck(args) {
14610
14619
  const resolved = _path.resolve.call(void 0, options.target);
14611
14620
  const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
14612
14621
  if (options.jsonOutput) {
14613
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
14622
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
14614
14623
  {
14615
14624
  kind: "play_check",
14616
14625
  checked: "named_contract",
@@ -14650,9 +14659,9 @@ async function handlePlayCheck(args) {
14650
14659
  target: options.target,
14651
14660
  full: options.full,
14652
14661
  detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full --json`,
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
14662
+ publishCommand: _optionalChain([primary, 'optionalAccess', _483 => _483.result, 'access', _484 => _484.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
14654
14663
  });
14655
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0, output, {
14664
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0, output, {
14656
14665
  json: options.jsonOutput,
14657
14666
  fields: options.jsonFields,
14658
14667
  text: renderPlayCheckOutput(output) + "\n"
@@ -14665,7 +14674,7 @@ function resolvePlayCheckExportNames(sourceCode) {
14665
14674
  return exports.map((entry) => entry.name);
14666
14675
  }
14667
14676
  function artifactForProductionCompatibilityCheck(artifact) {
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()]);
14677
+ const rawEdition = _optionalChain([process, 'access', _485 => _485.env, 'access', _486 => _486.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _487 => _487.trim, 'call', _488 => _488()]);
14669
14678
  if (!rawEdition) return artifact;
14670
14679
  if (!/^\d+$/.test(rawEdition)) {
14671
14680
  throw new Error(
@@ -14714,7 +14723,7 @@ async function checkOneExportedPlay(input) {
14714
14723
  result: { valid: false, errors: descriptionErrors }
14715
14724
  };
14716
14725
  }
14717
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
14726
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
14718
14727
  const integrationMode = resolveEvalIntegrationMode();
14719
14728
  const importedPlays = [...graph.nodes.values()].filter((node) => node.filePath !== graph.root.filePath).map((node) => ({
14720
14729
  playName: node.playName,
@@ -14788,7 +14797,7 @@ async function handleFileBackedRun(options, hooks) {
14788
14797
  );
14789
14798
  return 0;
14790
14799
  }
14791
- client = new (0, _chunkZ6VHC643js.DeeplineClient)(playRunClientOptions(options));
14800
+ client = new (0, _chunk4WHJDGBCjs.DeeplineClient)(playRunClientOptions(options));
14792
14801
  const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
14793
14802
  if (canDeferCompilerManifest) {
14794
14803
  _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
@@ -14841,7 +14850,7 @@ async function handleFileBackedRun(options, hooks) {
14841
14850
  );
14842
14851
  const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
14843
14852
  const fileInputBindings = _chunkLA46MMTLjs.fileInputBindingsFromStaticPipeline.call(void 0,
14844
- _optionalChain([compilerManifest, 'optionalAccess', _488 => _488.staticPipeline])
14853
+ _optionalChain([compilerManifest, 'optionalAccess', _489 => _489.staticPipeline])
14845
14854
  );
14846
14855
  const stagedFileInputs = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
14847
14856
  "cli.play_stage_inputs",
@@ -14901,8 +14910,8 @@ async function handleFileBackedRun(options, hooks) {
14901
14910
  waitTimeoutMs: options.waitTimeoutMs,
14902
14911
  open: options.open,
14903
14912
  progress,
14904
- onRunStarted: _optionalChain([hooks, 'optionalAccess', _489 => _489.onRunStarted]),
14905
- onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _490 => _490.onRunAdmitted])
14913
+ onRunStarted: _optionalChain([hooks, 'optionalAccess', _490 => _490.onRunStarted]),
14914
+ onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _491 => _491.onRunAdmitted])
14906
14915
  }).catch(async (error) => {
14907
14916
  throw await normalizePlayStartError(client, error, playName);
14908
14917
  })
@@ -14924,7 +14933,7 @@ async function handleFileBackedRun(options, hooks) {
14924
14933
  ),
14925
14934
  options
14926
14935
  );
14927
- _optionalChain([hooks, 'optionalAccess', _491 => _491.onTerminalStatus, 'optionalCall', _492 => _492(outputStatus)]);
14936
+ _optionalChain([hooks, 'optionalAccess', _492 => _492.onTerminalStatus, 'optionalCall', _493 => _493(outputStatus)]);
14928
14937
  traceCliSync(
14929
14938
  "cli.play_write_result",
14930
14939
  { targetKind: "file", playName },
@@ -14943,8 +14952,8 @@ async function handleFileBackedRun(options, hooks) {
14943
14952
  throw await normalizePlayStartError(client, error, playName);
14944
14953
  })
14945
14954
  );
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)]);
14955
+ await _optionalChain([hooks, 'optionalAccess', _494 => _494.onRunStarted, 'optionalCall', _495 => _495(started.workflowId)]);
14956
+ await _optionalChain([hooks, 'optionalAccess', _496 => _496.onRunAdmitted, 'optionalCall', _497 => _497(started.workflowId)]);
14948
14957
  const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
14949
14958
  openPlayDashboard(resolvedDashboardUrl, options.open);
14950
14959
  progress.phase("started run");
@@ -14972,7 +14981,7 @@ async function resolveNamedRunRevisionId(input) {
14972
14981
  if (input.selector === "latest") {
14973
14982
  const versions = await input.client.listPlayVersions(input.playName);
14974
14983
  const latest = versions[0];
14975
- if (!_optionalChain([latest, 'optionalAccess', _497 => _497._id])) {
14984
+ if (!_optionalChain([latest, 'optionalAccess', _498 => _498._id])) {
14976
14985
  throw new Error(`No saved revisions found for ${input.playName}.`);
14977
14986
  }
14978
14987
  return latest._id;
@@ -14983,7 +14992,7 @@ async function handleNamedRun(options, hooks) {
14983
14992
  if (options.target.kind !== "name") {
14984
14993
  throw new Error("Expected a named play run target.");
14985
14994
  }
14986
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)(playRunClientOptions(options));
14995
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)(playRunClientOptions(options));
14987
14996
  const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
14988
14997
  const playName = options.target.name;
14989
14998
  const runtimeInput = options.input ? { ...options.input } : {};
@@ -15089,8 +15098,8 @@ async function handleNamedRun(options, hooks) {
15089
15098
  waitTimeoutMs: options.waitTimeoutMs,
15090
15099
  open: options.open,
15091
15100
  progress,
15092
- onRunStarted: _optionalChain([hooks, 'optionalAccess', _498 => _498.onRunStarted]),
15093
- onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _499 => _499.onRunAdmitted])
15101
+ onRunStarted: _optionalChain([hooks, 'optionalAccess', _499 => _499.onRunStarted]),
15102
+ onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _500 => _500.onRunAdmitted])
15094
15103
  }).catch(async (error) => {
15095
15104
  throw await normalizePlayStartError(client, error, playName, {
15096
15105
  suggestMissingPlay: true
@@ -15115,7 +15124,7 @@ async function handleNamedRun(options, hooks) {
15115
15124
  options,
15116
15125
  _nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
15117
15126
  );
15118
- _optionalChain([hooks, 'optionalAccess', _500 => _500.onTerminalStatus, 'optionalCall', _501 => _501(outputStatus)]);
15127
+ _optionalChain([hooks, 'optionalAccess', _501 => _501.onTerminalStatus, 'optionalCall', _502 => _502(outputStatus)]);
15119
15128
  traceCliSync(
15120
15129
  "cli.play_write_result",
15121
15130
  { targetKind: "name", playName },
@@ -15136,8 +15145,8 @@ async function handleNamedRun(options, hooks) {
15136
15145
  });
15137
15146
  })
15138
15147
  );
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)]);
15148
+ await _optionalChain([hooks, 'optionalAccess', _503 => _503.onRunStarted, 'optionalCall', _504 => _504(started.workflowId)]);
15149
+ await _optionalChain([hooks, 'optionalAccess', _505 => _505.onRunAdmitted, 'optionalCall', _506 => _506(started.workflowId)]);
15141
15150
  const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
15142
15151
  openPlayDashboard(resolvedDashboardUrl, options.open);
15143
15152
  progress.phase("started run");
@@ -15175,7 +15184,7 @@ async function handlePlayRun(args, hooks) {
15175
15184
  { cause: error }
15176
15185
  );
15177
15186
  }
15178
- await _optionalChain([hooks, 'optionalAccess', _506 => _506.onRunStarted, 'optionalCall', _507 => _507(runId)]);
15187
+ await _optionalChain([hooks, 'optionalAccess', _507 => _507.onRunStarted, 'optionalCall', _508 => _508(runId)]);
15179
15188
  },
15180
15189
  onRunAdmitted: async (runId) => {
15181
15190
  try {
@@ -15188,7 +15197,7 @@ async function handlePlayRun(args, hooks) {
15188
15197
  { cause: error }
15189
15198
  );
15190
15199
  }
15191
- await _optionalChain([hooks, 'optionalAccess', _508 => _508.onRunAdmitted, 'optionalCall', _509 => _509(runId)]);
15200
+ await _optionalChain([hooks, 'optionalAccess', _509 => _509.onRunAdmitted, 'optionalCall', _510 => _510(runId)]);
15192
15201
  }
15193
15202
  } : hooks;
15194
15203
  if (options.target.kind === "file") {
@@ -15266,10 +15275,10 @@ function renderRunOverviewText(overview, extras = {}) {
15266
15275
  ...buildRunActivityTextLines(run),
15267
15276
  ...buildRunStatusEvidenceTextLines(overview)
15268
15277
  ];
15269
- if (_optionalChain([overview, 'access', _510 => _510.runStatus, 'optionalAccess', _511 => _511.available]) === false)
15278
+ if (_optionalChain([overview, 'access', _511 => _511.runStatus, 'optionalAccess', _512 => _512.available]) === false)
15270
15279
  lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
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]))
15280
+ const work = readRecord(_optionalChain([readRecord, 'call', _513 => _513(run), 'optionalAccess', _514 => _514.work]));
15281
+ if (work && !_optionalChain([overview, 'access', _515 => _515.runStatus, 'optionalAccess', _516 => _516.available]))
15273
15282
  lines.push(
15274
15283
  ` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
15275
15284
  );
@@ -15320,7 +15329,7 @@ function renderRunOverviewText(overview, extras = {}) {
15320
15329
  ...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
15321
15330
  ...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
15322
15331
  ...overview.failedLogs.entries,
15323
- ..._optionalChain([overview, 'access', _516 => _516.failedLogs, 'access', _517 => _517.next, 'optionalAccess', _518 => _518.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
15332
+ ..._optionalChain([overview, 'access', _517 => _517.failedLogs, 'access', _518 => _518.next, 'optionalAccess', _519 => _519.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
15324
15333
  ]
15325
15334
  });
15326
15335
  sections.push({
@@ -15380,10 +15389,10 @@ function renderRunOverviewText(overview, extras = {}) {
15380
15389
  );
15381
15390
  return `${lines.join("\n")}
15382
15391
 
15383
- ${_chunkUUB3FTKZjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
15392
+ ${_chunkI5XF4PWDjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
15384
15393
  }
15385
15394
  async function handleRunGet(args) {
15386
- const selection = _chunkUUB3FTKZjs.parseJsonFields.call(void 0,
15395
+ const selection = _chunkI5XF4PWDjs.parseJsonFields.call(void 0,
15387
15396
  args,
15388
15397
  args.includes("--config") ? "config" : "get"
15389
15398
  );
@@ -15396,7 +15405,7 @@ async function handleRunGet(args) {
15396
15405
  console.error(error instanceof Error ? error.message : usage2);
15397
15406
  return 1;
15398
15407
  }
15399
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
15408
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
15400
15409
  if (args.includes("--config")) {
15401
15410
  if (args.some((arg) => ["--input", "--full", "--log-failed"].includes(arg))) {
15402
15411
  console.error(
@@ -15410,7 +15419,7 @@ async function handleRunGet(args) {
15410
15419
  "This server does not support recorded configuration reads."
15411
15420
  );
15412
15421
  }
15413
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
15422
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
15414
15423
  { runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
15415
15424
  { json: true, fields: selection.fields }
15416
15425
  );
@@ -15418,7 +15427,7 @@ async function handleRunGet(args) {
15418
15427
  }
15419
15428
  if (args.includes("--input")) {
15420
15429
  const input = await client.getRunInput(runId);
15421
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0, input, { json: true });
15430
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0, input, { json: true });
15422
15431
  return 0;
15423
15432
  }
15424
15433
  const full = args.includes("--full");
@@ -15431,8 +15440,8 @@ async function handleRunGet(args) {
15431
15440
  full: true,
15432
15441
  failedLogs: args.includes("--log-failed")
15433
15442
  }) : status;
15434
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
15435
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
15443
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
15444
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
15436
15445
  full ? legacyStatus : compactPlayStatus(legacyStatus),
15437
15446
  { json: true, fields: selection.fields }
15438
15447
  );
@@ -15448,8 +15457,8 @@ async function handleRunGet(args) {
15448
15457
  readRunCredits(client, runId, !TERMINAL_PLAY_STATUSES.has(status.status))
15449
15458
  ]);
15450
15459
  const hitLines = formatRunHitsLines(hits);
15451
- const json = _chunkUUB3FTKZjs.argsWantJson.call(void 0, args);
15452
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
15460
+ const json = _chunkI5XF4PWDjs.argsWantJson.call(void 0, args);
15461
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
15453
15462
  {
15454
15463
  ...overview,
15455
15464
  credits,
@@ -15552,9 +15561,9 @@ async function handleRunLifecycleStatus(args) {
15552
15561
  console.error(error instanceof Error ? error.message : usage2);
15553
15562
  return 1;
15554
15563
  }
15555
- const status = await new (0, _chunkZ6VHC643js.DeeplineClient)().runs.status(runId);
15556
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
15557
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0, status, { json: true });
15564
+ const status = await new (0, _chunk4WHJDGBCjs.DeeplineClient)().runs.status(runId);
15565
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
15566
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0, status, { json: true });
15558
15567
  return 0;
15559
15568
  }
15560
15569
  if (!status.available) {
@@ -15594,7 +15603,7 @@ async function handleRunsRerun(args) {
15594
15603
  console.error(error instanceof Error ? error.message : usage2);
15595
15604
  return 1;
15596
15605
  }
15597
- const options = { json: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args) };
15606
+ const options = { json: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args) };
15598
15607
  for (let index = 0; index < args.length; index += 1) {
15599
15608
  if (args[index] === "--idempotency-key") {
15600
15609
  options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
@@ -15659,8 +15668,8 @@ ${usage2}
15659
15668
  Discover Plays: ${next.discover}
15660
15669
  Active runs: ${next.running}`
15661
15670
  );
15662
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
15663
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
15671
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
15672
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
15664
15673
  { ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
15665
15674
  { json: true }
15666
15675
  );
@@ -15675,7 +15684,7 @@ Active runs: ${next.running}`
15675
15684
  console.error("--offset requires --play.");
15676
15685
  return 1;
15677
15686
  }
15678
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
15687
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
15679
15688
  const page = await client.runs.listPage({
15680
15689
  ...playName ? { play: playName } : {},
15681
15690
  ...statusFilter ? { status: statusFilter } : {},
@@ -15705,7 +15714,7 @@ Active runs: ${next.running}`
15705
15714
  executionTime: run.executionTime,
15706
15715
  billingTotalCredits: run.billingTotalCredits,
15707
15716
  billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
15708
- playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _519 => _519.memo, 'optionalAccess', _520 => _520.playName]))), () => ( playName)), () => ( null)),
15717
+ playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _520 => _520.memo, 'optionalAccess', _521 => _521.playName]))), () => ( playName)), () => ( null)),
15709
15718
  ...nodeId ? { nodeObservation: _nullishCoalesce(run.nodeObservation, () => ( null)) } : {}
15710
15719
  }));
15711
15720
  const lines = runs.length === 0 ? [
@@ -15744,7 +15753,7 @@ Active runs: ${next.running}`
15744
15753
  nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
15745
15754
  );
15746
15755
  }
15747
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
15756
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
15748
15757
  {
15749
15758
  runs,
15750
15759
  count: runs.length,
@@ -15754,11 +15763,11 @@ Active runs: ${next.running}`
15754
15763
  ...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
15755
15764
  next: {
15756
15765
  page: nextPage,
15757
- get: _optionalChain([runs, 'access', _521 => _521[0], 'optionalAccess', _522 => _522.id]) ? `deepline runs get ${runs[0].id} --json` : null
15766
+ get: _optionalChain([runs, 'access', _522 => _522[0], 'optionalAccess', _523 => _523.id]) ? `deepline runs get ${runs[0].id} --json` : null
15758
15767
  },
15759
15768
  render: { sections: [{ title: "runs", lines }] }
15760
15769
  },
15761
- { json: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args) }
15770
+ { json: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args) }
15762
15771
  );
15763
15772
  return 0;
15764
15773
  }
@@ -15788,7 +15797,7 @@ async function handleRunTail(args) {
15788
15797
  console.error("--log-level requires one of: debug, info, warn, error.");
15789
15798
  return 1;
15790
15799
  }
15791
- const parsed = _chunkZ6VHC643js.parseLogLevel.call(void 0, value);
15800
+ const parsed = _chunk4WHJDGBCjs.parseLogLevel.call(void 0, value);
15792
15801
  if (!parsed) {
15793
15802
  console.error(
15794
15803
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -15826,9 +15835,9 @@ async function handleRunTail(args) {
15826
15835
  );
15827
15836
  return 1;
15828
15837
  }
15829
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
15838
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
15830
15839
  const jsonLines = args.includes("--jsonl");
15831
- const jsonOutput = !jsonLines && _chunkUUB3FTKZjs.argsWantJson.call(void 0, args);
15840
+ const jsonOutput = !jsonLines && _chunkI5XF4PWDjs.argsWantJson.call(void 0, args);
15832
15841
  const compact = args.includes("--compact");
15833
15842
  const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
15834
15843
  const compactState = {
@@ -15909,7 +15918,7 @@ async function handleRunLogs(args) {
15909
15918
  ]);
15910
15919
  const cursorIndex = args.indexOf("--cursor");
15911
15920
  const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
15912
- const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkZ6VHC643js.isRunLogsCursor.call(void 0, cursorValue));
15921
+ const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunk4WHJDGBCjs.isRunLogsCursor.call(void 0, cursorValue));
15913
15922
  if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
15914
15923
  return handleRunEventSearch(args);
15915
15924
  }
@@ -15943,7 +15952,7 @@ async function handleRunLogs(args) {
15943
15952
  console.error("--log-level requires one of: debug, info, warn, error.");
15944
15953
  return 1;
15945
15954
  }
15946
- const parsed = _chunkZ6VHC643js.parseLogLevel.call(void 0, value);
15955
+ const parsed = _chunk4WHJDGBCjs.parseLogLevel.call(void 0, value);
15947
15956
  if (!parsed) {
15948
15957
  console.error(
15949
15958
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -15990,12 +15999,12 @@ async function handleRunLogs(args) {
15990
15999
  );
15991
16000
  return 1;
15992
16001
  }
15993
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
16002
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
15994
16003
  if (outPath) {
15995
16004
  const result2 = await client.runs.logs(runId, { all: true });
15996
- const logs = result2.entries.filter((line) => _chunkZ6VHC643js.logLevelReaches.call(void 0, _chunkZ6VHC643js.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkZ6VHC643js.classifyLogLine.call(void 0, line).line);
16005
+ const logs = result2.entries.filter((line) => _chunk4WHJDGBCjs.logLevelReaches.call(void 0, _chunk4WHJDGBCjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunk4WHJDGBCjs.classifyLogLine.call(void 0, line).line);
15997
16006
  _fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
15998
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
16007
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
15999
16008
  {
16000
16009
  runId: result2.runId,
16001
16010
  log_path: outPath,
@@ -16018,7 +16027,7 @@ async function handleRunLogs(args) {
16018
16027
  ]
16019
16028
  }
16020
16029
  },
16021
- { json: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args) }
16030
+ { json: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args) }
16022
16031
  );
16023
16032
  return 0;
16024
16033
  }
@@ -16049,7 +16058,7 @@ async function handleRunLogs(args) {
16049
16058
  }
16050
16059
  };
16051
16060
  const text = buildRunLogsText(filteredResult);
16052
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
16061
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
16053
16062
  {
16054
16063
  runId: result.runId,
16055
16064
  totalCount: result.totalCount,
@@ -16073,7 +16082,7 @@ async function handleRunLogs(args) {
16073
16082
  render: { sections: [{ title: "run logs", lines: entries }] }
16074
16083
  },
16075
16084
  {
16076
- json: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args),
16085
+ json: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args),
16077
16086
  text
16078
16087
  }
16079
16088
  );
@@ -16097,17 +16106,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
16097
16106
  );
16098
16107
  }
16099
16108
  const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
16100
- (entry) => _chunkZ6VHC643js.logLevelReaches.call(void 0, _chunkZ6VHC643js.classifyLogLine.call(void 0, entry.line).level, logLevel)
16109
+ (entry) => _chunk4WHJDGBCjs.logLevelReaches.call(void 0, _chunk4WHJDGBCjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
16101
16110
  );
16102
16111
  const selected = matching.slice(-limit);
16103
16112
  const olderMatchesExist = matching.length > selected.length;
16104
16113
  return {
16105
16114
  entries: selected.map((entry) => entry.line),
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)),
16115
+ firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _524 => _524[0], 'optionalAccess', _525 => _525.seq]), () => ( null)),
16116
+ lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _526 => _526.at, 'call', _527 => _527(-1), 'optionalAccess', _528 => _528.seq]), () => ( null)),
16108
16117
  truncated: result.truncated || olderMatchesExist,
16109
16118
  hasMore: olderMatchesExist,
16110
- nextCursor: olderMatchesExist ? _chunkZ6VHC643js.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
16119
+ nextCursor: olderMatchesExist ? _chunk4WHJDGBCjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
16111
16120
  };
16112
16121
  }
16113
16122
  async function handleRunEventSearch(args) {
@@ -16174,7 +16183,7 @@ ${usage2}`);
16174
16183
  namespace,
16175
16184
  ...backend ? { backend } : {}
16176
16185
  } : void 0;
16177
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
16186
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
16178
16187
  const result = await client.runs.searchEvents({
16179
16188
  ...runId ? { runId } : {},
16180
16189
  ...values["--since"] ? { since: values["--since"] } : {},
@@ -16247,7 +16256,7 @@ ${renderedDetails}` : ""}`;
16247
16256
  String(limit),
16248
16257
  "--json"
16249
16258
  ].join(" ") : null;
16250
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
16259
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
16251
16260
  {
16252
16261
  events,
16253
16262
  nextCursor: result.nextCursor,
@@ -16258,19 +16267,19 @@ ${renderedDetails}` : ""}`;
16258
16267
  render: { sections: [{ title: "runtime events", lines }] }
16259
16268
  },
16260
16269
  {
16261
- json: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args),
16270
+ json: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args),
16262
16271
  text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
16263
16272
  }
16264
16273
  );
16265
16274
  return 0;
16266
16275
  }
16267
16276
  function buildRunLogsText(result) {
16268
- const lines = result.entries.map((line) => _chunkZ6VHC643js.classifyLogLine.call(void 0, line).line);
16277
+ const lines = result.entries.map((line) => _chunk4WHJDGBCjs.classifyLogLine.call(void 0, line).line);
16269
16278
  if (result.warning) {
16270
16279
  if (lines.length > 0) lines.push("");
16271
16280
  lines.push(`warning: ${result.warning}`);
16272
16281
  lines.push(
16273
- `retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _528 => _528.next, 'optionalAccess', _529 => _529.logs]), () => ( `deepline runs logs ${result.runId} --out run.log --json`))}`
16282
+ `retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _529 => _529.next, 'optionalAccess', _530 => _530.logs]), () => ( `deepline runs logs ${result.runId} --out run.log --json`))}`
16274
16283
  );
16275
16284
  }
16276
16285
  return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
@@ -16299,7 +16308,7 @@ async function handleRunStop(args) {
16299
16308
  reason = args[++index];
16300
16309
  }
16301
16310
  }
16302
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
16311
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
16303
16312
  const result = await client.runs.stop(runId, { reason });
16304
16313
  const state = resolveRunStopState(result);
16305
16314
  const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
@@ -16314,7 +16323,7 @@ async function handleRunStop(args) {
16314
16323
  ...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
16315
16324
  `inspect: deepline runs get ${runId} --full --json`
16316
16325
  ];
16317
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
16326
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
16318
16327
  {
16319
16328
  ...cancelling,
16320
16329
  state,
@@ -16329,7 +16338,7 @@ async function handleRunStop(args) {
16329
16338
  ]
16330
16339
  }
16331
16340
  },
16332
- { json: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args) }
16341
+ { json: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args) }
16333
16342
  );
16334
16343
  return 0;
16335
16344
  }
@@ -16346,7 +16355,7 @@ async function handleRunStop(args) {
16346
16355
  ];
16347
16356
  process.stderr.write(`${lines2.join("\n")}
16348
16357
  `);
16349
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
16358
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
16350
16359
  {
16351
16360
  ...result,
16352
16361
  render: {
@@ -16361,7 +16370,7 @@ async function handleRunStop(args) {
16361
16370
  ]
16362
16371
  }
16363
16372
  },
16364
- { json: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args) }
16373
+ { json: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args) }
16365
16374
  );
16366
16375
  return 1;
16367
16376
  }
@@ -16372,12 +16381,12 @@ async function handleRunStop(args) {
16372
16381
  `warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
16373
16382
  ] : []
16374
16383
  ];
16375
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
16384
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
16376
16385
  {
16377
16386
  ...result,
16378
16387
  render: { sections: [{ title: "run stop", lines }] }
16379
16388
  },
16380
- { json: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args) }
16389
+ { json: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args) }
16381
16390
  );
16382
16391
  return 0;
16383
16392
  }
@@ -16427,18 +16436,18 @@ async function handleRunStopAll(args) {
16427
16436
  reason = args[++index];
16428
16437
  }
16429
16438
  }
16430
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
16439
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
16431
16440
  if (dryRun) {
16432
16441
  const result2 = await client.runs.stopAll({ dryRun: true, reason });
16433
16442
  const lines2 = buildStopAllDryRunTextLines(result2);
16434
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
16443
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
16435
16444
  {
16436
16445
  ...result2,
16437
16446
  render: {
16438
16447
  sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
16439
16448
  }
16440
16449
  },
16441
- { json: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
16450
+ { json: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
16442
16451
  ` }
16443
16452
  );
16444
16453
  return 0;
@@ -16451,19 +16460,19 @@ async function handleRunStopAll(args) {
16451
16460
  ...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
16452
16461
  ...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
16453
16462
  ];
16454
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
16463
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
16455
16464
  {
16456
16465
  ...result,
16457
16466
  render: { sections: [{ title: "workspace stop-all", lines }] }
16458
16467
  },
16459
- { json: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args) }
16468
+ { json: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args) }
16460
16469
  );
16461
16470
  return result.failed > 0 || result.partial ? 1 : 0;
16462
16471
  }
16463
16472
  async function handleRunExport(args) {
16464
- const selection = _chunkUUB3FTKZjs.parseJsonFields.call(void 0, args, "export");
16473
+ const selection = _chunkI5XF4PWDjs.parseJsonFields.call(void 0, args, "export");
16465
16474
  args = selection.args;
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]";
16475
+ const usage2 = "Usage: deepline runs export <run-id> [--dataset result.rows] --out <path> [--format csv|json] [--wait] [--timeout-ms 300000] [--metadata-out export.json] [--allow-empty] [--json]";
16467
16476
  let runId;
16468
16477
  try {
16469
16478
  runId = parseRunIdPositional(args, usage2);
@@ -16520,16 +16529,16 @@ async function handleRunExport(args) {
16520
16529
  "INVALID_ARGUMENT"
16521
16530
  );
16522
16531
  }
16523
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
16532
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
16524
16533
  let status = await client.getPlayStatus(runId, { full: true });
16525
16534
  if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
16526
- const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkUUB3FTKZjs.argsWantJson.call(void 0, args));
16535
+ const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkI5XF4PWDjs.argsWantJson.call(void 0, args));
16527
16536
  try {
16528
16537
  await waitForPlayCompletionByWatch({
16529
16538
  client,
16530
16539
  playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
16531
16540
  workflowId: runId,
16532
- jsonOutput: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args),
16541
+ jsonOutput: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args),
16533
16542
  emitLogs: false,
16534
16543
  waitTimeoutMs,
16535
16544
  startedAt: Date.now(),
@@ -16550,28 +16559,29 @@ async function handleRunExport(args) {
16550
16559
  }
16551
16560
  const exportResult = await exportPlayStatusRows(client, status, outPath, {
16552
16561
  datasetPath,
16562
+ allowEmpty: args.includes("--allow-empty"),
16553
16563
  format
16554
16564
  });
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]) ? {
16565
+ const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _531 => _531.rowsInfo, 'access', _532 => _532.source]), () => ( datasetPath)), () => ( null));
16566
+ const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _533 => _533.currentTable]) ? {
16557
16567
  code: "CURRENT_SHARED_DATASET",
16558
16568
  message: "This export is the current shared dataset and may include writes from another run.",
16559
16569
  full_run_output_command: `deepline runs get ${status.runId} --full --json`
16560
16570
  } : null;
16561
16571
  const navigation = buildRunNavigation(status);
16562
- const resolved = _optionalChain([exportResult, 'optionalAccess', _533 => _533.datasetInfo]);
16572
+ const resolved = _optionalChain([exportResult, 'optionalAccess', _534 => _534.datasetInfo]);
16563
16573
  const identity = navigation.datasets.find(
16564
- (dataset) => _optionalChain([resolved, 'optionalAccess', _534 => _534.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _535 => _535.tableNamespace])
16574
+ (dataset) => _optionalChain([resolved, 'optionalAccess', _535 => _535.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _536 => _536.tableNamespace])
16565
16575
  );
16566
16576
  const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
16567
16577
  const exportCommand = runExportRetryCommand(
16568
16578
  status.runId,
16569
16579
  outPath,
16570
- _nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _536 => _536.datasetPath]))),
16580
+ _nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _537 => _537.datasetPath]))),
16571
16581
  { format }
16572
- );
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]);
16582
+ ) + (args.includes("--allow-empty") ? " --allow-empty" : "");
16583
+ const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _538 => _538.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _539 => _539.path]), () => ( null)) };
16584
+ const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _540 => _540.rowsInfo, 'access', _541 => _541.exportedRowOutcomes]);
16575
16585
  const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
16576
16586
  count: exportedRowOutcomes.failed,
16577
16587
  message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
@@ -16591,17 +16601,17 @@ async function handleRunExport(args) {
16591
16601
  ...fileLocation,
16592
16602
  format,
16593
16603
  source,
16594
- rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _541 => _541.rowsInfo, 'access', _542 => _542.totalRows]), () => ( null)),
16604
+ rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _542 => _542.rowsInfo, 'access', _543 => _543.totalRows]), () => ( null)),
16595
16605
  ...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
16596
16606
  ...rowFailures ? { rowFailures } : {},
16597
- columns: underscoreKeysLast(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _543 => _543.rowsInfo, 'access', _544 => _544.columns]), () => ( []))),
16607
+ columns: underscoreKeysLast(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _544 => _544.rowsInfo, 'access', _545 => _545.columns]), () => ( []))),
16598
16608
  ...currentTableNotice ? { notice: currentTableNotice } : {},
16599
16609
  ...metadataOutPath ? { metadata_path: metadataOutPath } : {},
16600
16610
  ...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
16601
16611
  };
16602
16612
  const lines = withRunNavigationLines(
16603
16613
  [
16604
- `Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _545 => _545.path]), () => ( outPath))}`,
16614
+ `Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _546 => _546.path]), () => ( outPath))}`,
16605
16615
  ...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
16606
16616
  `Partial export: run is ${status.status}; more rows may be saved.`,
16607
16617
  `Export after completion: ${exportCommand} --wait`
@@ -16628,8 +16638,8 @@ async function handleRunExport(args) {
16628
16638
  "utf-8"
16629
16639
  );
16630
16640
  }
16631
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0, payload, {
16632
- json: _chunkUUB3FTKZjs.argsWantJson.call(void 0, args),
16641
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0, payload, {
16642
+ json: _chunkI5XF4PWDjs.argsWantJson.call(void 0, args),
16633
16643
  fields: selection.fields,
16634
16644
  text: `${lines.join("\n")}
16635
16645
  `
@@ -16650,10 +16660,10 @@ async function handlePlayGet(args) {
16650
16660
  );
16651
16661
  return 2;
16652
16662
  }
16653
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
16663
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
16654
16664
  const explicitJson = args.includes("--json");
16655
16665
  const sourceOutput = args.includes("--source");
16656
- const jsonOutput = sourceOutput ? explicitJson : _chunkUUB3FTKZjs.argsWantJson.call(void 0, args);
16666
+ const jsonOutput = sourceOutput ? explicitJson : _chunkI5XF4PWDjs.argsWantJson.call(void 0, args);
16657
16667
  const requestedRevisionFlags = [
16658
16668
  args.includes("--working"),
16659
16669
  args.includes("--live"),
@@ -16703,7 +16713,7 @@ async function handlePlayGet(args) {
16703
16713
  ...includeSource ? { source: sourceSelector } : {}
16704
16714
  });
16705
16715
  const source = detail.source;
16706
- const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _546 => _546.files, 'access', _547 => _547[source.entryFile]]), () => ( ""));
16716
+ const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _547 => _547.files, 'access', _548 => _548[source.entryFile]]), () => ( ""));
16707
16717
  let materializedFile = null;
16708
16718
  try {
16709
16719
  materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
@@ -16713,7 +16723,7 @@ async function handlePlayGet(args) {
16713
16723
  }
16714
16724
  const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
16715
16725
  if (jsonOutput) {
16716
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, {
16726
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, {
16717
16727
  ...detail,
16718
16728
  ...materializedFile ? {
16719
16729
  message: loadedMessage,
@@ -16754,11 +16764,11 @@ async function handlePlayGet(args) {
16754
16764
  }
16755
16765
  console.log(`Play: ${formatPlayReference(detail.play)}`);
16756
16766
  console.log(
16757
- `Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _548 => _548.play, 'access', _549 => _549.workingRevision, 'optionalAccess', _550 => _550.version]), () => ( "\u2014"))}`
16767
+ `Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _549 => _549.play, 'access', _550 => _550.workingRevision, 'optionalAccess', _551 => _551.version]), () => ( "\u2014"))}`
16758
16768
  );
16759
- console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _551 => _551.play, 'access', _552 => _552.liveRevision, 'optionalAccess', _553 => _553.version]), () => ( "\u2014"))}`);
16769
+ console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _552 => _552.play, 'access', _553 => _553.liveRevision, 'optionalAccess', _554 => _554.version]), () => ( "\u2014"))}`);
16760
16770
  console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
16761
- if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _554 => _554.play, 'access', _555 => _555.liveRevision, 'optionalAccess', _556 => _556.version])) {
16771
+ if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _555 => _555.play, 'access', _556 => _556.liveRevision, 'optionalAccess', _557 => _557.version])) {
16762
16772
  console.log(
16763
16773
  ` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
16764
16774
  );
@@ -16770,7 +16780,7 @@ async function handlePlayGet(args) {
16770
16780
  console.log(line);
16771
16781
  }
16772
16782
  console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
16773
- console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _557 => _557.sheetSummary, 'optionalAccess', _558 => _558.stats, 'optionalAccess', _559 => _559.total]), () => ( 0))}`);
16783
+ console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _558 => _558.sheetSummary, 'optionalAccess', _559 => _559.stats, 'optionalAccess', _560 => _560.total]), () => ( 0))}`);
16774
16784
  if (detail.customerDbUrl) {
16775
16785
  console.log(`Customer DB: ${detail.customerDbUrl}`);
16776
16786
  }
@@ -16786,7 +16796,7 @@ async function handlePlayGet(args) {
16786
16796
  return 0;
16787
16797
  }
16788
16798
  function formatVersionLine(version) {
16789
- const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _560 => _560.artifactHash, 'optionalAccess', _561 => _561.slice, 'call', _562 => _562(0, 12)]), () => ( "unknown-revision"));
16799
+ const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _561 => _561.artifactHash, 'optionalAccess', _562 => _562.slice, 'call', _563 => _563(0, 12)]), () => ( "unknown-revision"));
16790
16800
  const state = [
16791
16801
  version.isLive ? "live" : null,
16792
16802
  version.isWorking ? "working" : null
@@ -16800,8 +16810,8 @@ async function handlePlayVersions(args) {
16800
16810
  console.error("Usage: deepline plays versions --name <name> [--json]");
16801
16811
  return 1;
16802
16812
  }
16803
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
16804
- const jsonOutput = _chunkUUB3FTKZjs.argsWantJson.call(void 0, args);
16813
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
16814
+ const jsonOutput = _chunkI5XF4PWDjs.argsWantJson.call(void 0, args);
16805
16815
  await assertCanonicalNamedPlayReference(client, playName, {
16806
16816
  command: "versions"
16807
16817
  });
@@ -16809,7 +16819,7 @@ async function handlePlayVersions(args) {
16809
16819
  parseReferencedPlayTarget3(playName).playName
16810
16820
  );
16811
16821
  if (jsonOutput) {
16812
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, { versions });
16822
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, { versions });
16813
16823
  return 0;
16814
16824
  }
16815
16825
  if (versions.length === 0) {
@@ -16841,11 +16851,11 @@ var PREBUILT_PLAY_TAG_KEYS = [
16841
16851
  "signals"
16842
16852
  ];
16843
16853
  async function handlePlayList(args) {
16844
- const jsonOutput = _chunkUUB3FTKZjs.argsWantJson.call(void 0, args);
16854
+ const jsonOutput = _chunkI5XF4PWDjs.argsWantJson.call(void 0, args);
16845
16855
  const showCost = args.includes("--show-cost");
16846
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
16856
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
16847
16857
  const categoriesIndex = args.indexOf("--categories");
16848
- const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _563 => _563[categoriesIndex + 1], 'optionalAccess', _564 => _564.trim, 'call', _565 => _565()]) : void 0;
16858
+ const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _564 => _564[categoriesIndex + 1], 'optionalAccess', _565 => _565.trim, 'call', _566 => _566()]) : void 0;
16849
16859
  const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
16850
16860
  if (args.includes("--tag") && tags.length === 0) {
16851
16861
  console.error(
@@ -16866,7 +16876,7 @@ async function handlePlayList(args) {
16866
16876
  const cursorIndex = args.indexOf("--cursor");
16867
16877
  const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
16868
16878
  const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
16869
- if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _566 => _566.trim, 'call', _567 => _567()])) {
16879
+ if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _567 => _567.trim, 'call', _568 => _568()])) {
16870
16880
  console.error("Pass a positive --limit and a non-empty --cursor.");
16871
16881
  return 2;
16872
16882
  }
@@ -16906,7 +16916,7 @@ async function handlePlayList(args) {
16906
16916
  if (play.inputSchema || play.hasInputSchema) {
16907
16917
  lines.push(" inputSchema: yes");
16908
16918
  }
16909
- if (_optionalChain([play, 'access', _568 => _568.triggerStatus, 'optionalAccess', _569 => _569.cron])) {
16919
+ if (_optionalChain([play, 'access', _569 => _569.triggerStatus, 'optionalAccess', _570 => _570.cron])) {
16910
16920
  lines.push(
16911
16921
  ` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
16912
16922
  );
@@ -16926,7 +16936,7 @@ async function handlePlayList(args) {
16926
16936
  } else {
16927
16937
  lines.push(" scheduled execution: not configured");
16928
16938
  }
16929
- if (_optionalChain([play, 'access', _570 => _570.triggerStatus, 'optionalAccess', _571 => _571.webhook])) {
16939
+ if (_optionalChain([play, 'access', _571 => _571.triggerStatus, 'optionalAccess', _572 => _572.webhook])) {
16930
16940
  lines.push(` webhook: ${play.triggerStatus.webhook}`);
16931
16941
  }
16932
16942
  if (showCost) {
@@ -16940,7 +16950,7 @@ async function handlePlayList(args) {
16940
16950
  lines.push("List truncated \u2014 more plays are available.");
16941
16951
  lines.push(`Next page: ${nextPage}`);
16942
16952
  }
16943
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
16953
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
16944
16954
  {
16945
16955
  plays,
16946
16956
  count: plays.length,
@@ -16957,8 +16967,8 @@ async function handlePlayList(args) {
16957
16967
  return 0;
16958
16968
  }
16959
16969
  async function handlePlayPin(args, pinned) {
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 = _chunkUUB3FTKZjs.argsWantJson.call(void 0, args);
16970
+ const target = _optionalChain([args, 'access', _573 => _573.find, 'call', _574 => _574((arg) => !arg.startsWith("-")), 'optionalAccess', _575 => _575.trim, 'call', _576 => _576()]);
16971
+ const jsonOutput = _chunkI5XF4PWDjs.argsWantJson.call(void 0, args);
16962
16972
  const dryRun = args.includes("--dry-run");
16963
16973
  if (!target) {
16964
16974
  console.error(
@@ -16976,11 +16986,11 @@ async function handlePlayPin(args, pinned) {
16976
16986
  const name = parsedTarget.playName;
16977
16987
  const plan = { name, pinned, dryRun };
16978
16988
  if (dryRun) {
16979
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, plan);
16989
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, plan);
16980
16990
  return 0;
16981
16991
  }
16982
- const result = await new (0, _chunkZ6VHC643js.DeeplineClient)().setPlayPinned(name, pinned);
16983
- if (jsonOutput) _chunkUUB3FTKZjs.printCompactJson.call(void 0, result);
16992
+ const result = await new (0, _chunk4WHJDGBCjs.DeeplineClient)().setPlayPinned(name, pinned);
16993
+ if (jsonOutput) _chunkI5XF4PWDjs.printCompactJson.call(void 0, result);
16984
16994
  else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
16985
16995
  return 0;
16986
16996
  }
@@ -16996,7 +17006,7 @@ function csvColumnLines(csvInput) {
16996
17006
  const headers = [defaults[column]].flat().filter((header) => header && header !== column);
16997
17007
  return `${column}${required.has(column) ? " (required)" : ""}${headers.length > 0 ? `, default header: ${headers.join(" or ")}` : ""}`;
16998
17008
  }),
16999
- _chunkZ6VHC643js.CSV_HEADER_MATCHING_NOTE
17009
+ _chunk4WHJDGBCjs.CSV_HEADER_MATCHING_NOTE
17000
17010
  ];
17001
17011
  }
17002
17012
  function describedPlay(play) {
@@ -17064,7 +17074,7 @@ function printPlayDescription(play) {
17064
17074
  console.log(` ${line}`);
17065
17075
  }
17066
17076
  }
17067
- if (_optionalChain([play, 'access', _576 => _576.toolCategories, 'optionalAccess', _577 => _577.length])) {
17077
+ if (_optionalChain([play, 'access', _577 => _577.toolCategories, 'optionalAccess', _578 => _578.length])) {
17068
17078
  console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
17069
17079
  }
17070
17080
  if (play.aliases.length > 0) {
@@ -17109,7 +17119,7 @@ function printPlayDescription(play) {
17109
17119
  const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
17110
17120
  if (runtimeLimit) {
17111
17121
  console.log(
17112
- ` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _578 => _578.runtimeLimit, 'optionalAccess', _579 => _579.source]), () => ( "live"))})`
17122
+ ` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _579 => _579.runtimeLimit, 'optionalAccess', _580 => _580.source]), () => ( "live"))})`
17113
17123
  );
17114
17124
  }
17115
17125
  printScheduledPlayCapacity(play.activeScheduledPlays);
@@ -17135,17 +17145,17 @@ function formatPlayGrepMatches(matches) {
17135
17145
  return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
17136
17146
  }
17137
17147
  async function handlePlayGrep(args) {
17138
- const query = _optionalChain([args, 'access', _580 => _580[0], 'optionalAccess', _581 => _581.trim, 'call', _582 => _582()]);
17148
+ const query = _optionalChain([args, 'access', _581 => _581[0], 'optionalAccess', _582 => _582.trim, 'call', _583 => _583()]);
17139
17149
  if (!query) {
17140
17150
  console.error("Usage: deepline plays grep <query> [--json]");
17141
17151
  return 1;
17142
17152
  }
17143
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
17153
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
17144
17154
  const results = (await client.listPlays({ grep: query })).map(
17145
17155
  summarizePlayGrepResult
17146
17156
  );
17147
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
17148
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, {
17157
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
17158
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, {
17149
17159
  plays: results,
17150
17160
  count: results.length,
17151
17161
  query,
@@ -17159,7 +17169,7 @@ async function handlePlayGrep(args) {
17159
17169
  `
17160
17170
  );
17161
17171
  for (const result of results) {
17162
- console.log(_optionalChain([result, 'access', _583 => _583.displayName, 'optionalAccess', _584 => _584.trim, 'call', _585 => _585()]) || result.name);
17172
+ console.log(_optionalChain([result, 'access', _584 => _584.displayName, 'optionalAccess', _585 => _585.trim, 'call', _586 => _586()]) || result.name);
17163
17173
  const matches = formatPlayGrepMatches(result.matches);
17164
17174
  if (matches) console.log(` Matched: ${matches}`);
17165
17175
  console.log(` Describe: ${result.describe}`);
@@ -17168,7 +17178,7 @@ async function handlePlayGrep(args) {
17168
17178
  return 0;
17169
17179
  }
17170
17180
  async function handlePlayDescribe(args) {
17171
- const selection = _chunkUUB3FTKZjs.parseJsonFields.call(void 0, args, "describe");
17181
+ const selection = _chunkI5XF4PWDjs.parseJsonFields.call(void 0, args, "describe");
17172
17182
  args = selection.args;
17173
17183
  const playName = args[0];
17174
17184
  if (!playName) {
@@ -17202,8 +17212,8 @@ async function handlePlayDescribe(args) {
17202
17212
  `deepline plays check ${playName}`,
17203
17213
  ...definedName ? [`deepline describe <workspace>/${definedName}`] : []
17204
17214
  ];
17205
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
17206
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, {
17215
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
17216
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, {
17207
17217
  ok: false,
17208
17218
  error: { message },
17209
17219
  next
@@ -17217,7 +17227,7 @@ async function handlePlayDescribe(args) {
17217
17227
  }
17218
17228
  return 2;
17219
17229
  }
17220
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
17230
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
17221
17231
  await assertCanonicalNamedPlayReference(client, playName, {
17222
17232
  command: "describe"
17223
17233
  });
@@ -17227,9 +17237,9 @@ async function handlePlayDescribe(args) {
17227
17237
  compact: args.includes("--compact")
17228
17238
  }
17229
17239
  );
17230
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
17231
- if (selection.fields) _chunkUUB3FTKZjs.printJson.call(void 0, play, selection.fields);
17232
- else _chunkUUB3FTKZjs.printCompactJson.call(void 0, play);
17240
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
17241
+ if (selection.fields) _chunkI5XF4PWDjs.printJson.call(void 0, play, selection.fields);
17242
+ else _chunkI5XF4PWDjs.printCompactJson.call(void 0, play);
17233
17243
  return 0;
17234
17244
  }
17235
17245
  printPlayDescription(play);
@@ -17273,7 +17283,7 @@ async function handlePlaySave(args) {
17273
17283
  next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
17274
17284
  };
17275
17285
  if (options.jsonOutput) {
17276
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, result);
17286
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, result);
17277
17287
  } else {
17278
17288
  console.error(result.message);
17279
17289
  console.error(` checked artifact: ${result.expectedArtifactHash}`);
@@ -17295,7 +17305,7 @@ async function handlePlaySave(args) {
17295
17305
  };
17296
17306
  if (options.dryRun) {
17297
17307
  if (options.jsonOutput) {
17298
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, dryRun);
17308
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, dryRun);
17299
17309
  } else {
17300
17310
  console.log(`Dry run: ${playName}`);
17301
17311
  console.log(` source: ${dryRun.sourceHash}`);
@@ -17304,7 +17314,7 @@ async function handlePlaySave(args) {
17304
17314
  }
17305
17315
  return 0;
17306
17316
  }
17307
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
17317
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
17308
17318
  try {
17309
17319
  await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
17310
17320
  "cli.play_save_compile_manifests",
@@ -17340,7 +17350,7 @@ async function handlePlaySave(args) {
17340
17350
  }
17341
17351
  };
17342
17352
  if (options.jsonOutput) {
17343
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, result);
17353
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, result);
17344
17354
  } else {
17345
17355
  console.log(
17346
17356
  `\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
@@ -17366,7 +17376,7 @@ async function handlePlayPublish(args) {
17366
17376
  }
17367
17377
  const { target: playName, useLatest } = options;
17368
17378
  let revisionId = options.revisionId;
17369
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
17379
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
17370
17380
  if (isFileTarget2(playName)) {
17371
17381
  if (revisionId || useLatest) {
17372
17382
  console.error(
@@ -17398,7 +17408,7 @@ async function handlePlayPublish(args) {
17398
17408
  next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
17399
17409
  };
17400
17410
  if (options.jsonOutput) {
17401
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, result3);
17411
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, result3);
17402
17412
  } else {
17403
17413
  console.error(result3.message);
17404
17414
  console.error(` checked artifact: ${result3.expectedArtifactHash}`);
@@ -17421,7 +17431,7 @@ async function handlePlayPublish(args) {
17421
17431
  };
17422
17432
  if (options.dryRun) {
17423
17433
  if (options.jsonOutput) {
17424
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, dryRun);
17434
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, dryRun);
17425
17435
  } else {
17426
17436
  console.log(`Dry run: ${rootPlayName}`);
17427
17437
  console.log(` source: ${dryRun.sourceHash}`);
@@ -17479,17 +17489,17 @@ async function handlePlayPublish(args) {
17479
17489
  artifactHash,
17480
17490
  liveVersion: _nullishCoalesce(published.version, () => ( null)),
17481
17491
  revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
17482
- previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _586 => _586.version]), () => ( null)),
17483
- previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _587 => _587.artifactHash]), () => ( null)),
17492
+ previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _587 => _587.version]), () => ( null)),
17493
+ previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _588 => _588.artifactHash]), () => ( null)),
17484
17494
  sourceBytes: {
17485
- before: _optionalChain([previousLive, 'optionalAccess', _588 => _588.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
17495
+ before: _optionalChain([previousLive, 'optionalAccess', _589 => _589.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
17486
17496
  after: Buffer.byteLength(graph.root.sourceCode, "utf8")
17487
17497
  },
17488
17498
  triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
17489
17499
  triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
17490
17500
  };
17491
17501
  if (options.jsonOutput) {
17492
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, result2);
17502
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, result2);
17493
17503
  } else {
17494
17504
  printPublishReceipt({
17495
17505
  name: rootPlayName,
@@ -17520,14 +17530,14 @@ async function handlePlayPublish(args) {
17520
17530
  revisionId: _nullishCoalesce(revisionId, () => ( null)),
17521
17531
  latest: useLatest
17522
17532
  };
17523
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, result2);
17533
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, result2);
17524
17534
  return 0;
17525
17535
  }
17526
17536
  const resolvedName = parseReferencedPlayTarget3(playName).playName;
17527
17537
  if (useLatest) {
17528
17538
  const versions = await client.listPlayVersions(resolvedName);
17529
17539
  const latest = versions[0];
17530
- if (!_optionalChain([latest, 'optionalAccess', _589 => _589._id])) {
17540
+ if (!_optionalChain([latest, 'optionalAccess', _590 => _590._id])) {
17531
17541
  console.error(`No saved revisions found for ${resolvedName}.`);
17532
17542
  return 1;
17533
17543
  }
@@ -17544,7 +17554,7 @@ async function handlePlayPublish(args) {
17544
17554
  revisionId ? { revisionId } : {}
17545
17555
  );
17546
17556
  if (options.jsonOutput) {
17547
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, result);
17557
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, result);
17548
17558
  } else {
17549
17559
  printPublishReceipt({
17550
17560
  name: result.name,
@@ -17584,7 +17594,7 @@ async function handlePlayDelete(args) {
17584
17594
  );
17585
17595
  return 2;
17586
17596
  }
17587
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
17597
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
17588
17598
  let detail;
17589
17599
  try {
17590
17600
  detail = await client.getPlay(parseReferencedPlayTarget3(playName).playName);
@@ -17608,8 +17618,8 @@ async function handlePlayDelete(args) {
17608
17618
  name: resolvedName,
17609
17619
  plannedMutation: "move saved org-owned play to Trash and stop triggers"
17610
17620
  };
17611
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
17612
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, result2);
17621
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
17622
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, result2);
17613
17623
  } else {
17614
17624
  process.stdout.write(
17615
17625
  `Dry run: would move ${result2.name} to Trash and stop its active triggers.
@@ -17619,8 +17629,8 @@ async function handlePlayDelete(args) {
17619
17629
  return 0;
17620
17630
  }
17621
17631
  const result = await client.deletePlay(resolvedName);
17622
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
17623
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, result);
17632
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
17633
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, result);
17624
17634
  return result.archived || result.alreadyArchived ? 0 : 4;
17625
17635
  }
17626
17636
  if (result.alreadyArchived) {
@@ -17659,13 +17669,13 @@ async function handlePlayRestore(args) {
17659
17669
  );
17660
17670
  return 2;
17661
17671
  }
17662
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
17672
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
17663
17673
  try {
17664
17674
  const result = await client.restorePlay(
17665
17675
  parseReferencedPlayTarget3(playName).playName
17666
17676
  );
17667
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
17668
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, result);
17677
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
17678
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, result);
17669
17679
  return result.restored || result.alreadyActive ? 0 : 4;
17670
17680
  }
17671
17681
  if (result.alreadyActive) {
@@ -17772,7 +17782,7 @@ Examples:
17772
17782
  ).action(async (target, options) => {
17773
17783
  process.exitCode = await handlePlayCheck([
17774
17784
  target,
17775
- ..._chunkUUB3FTKZjs.jsonFieldArgs.call(void 0, options.json),
17785
+ ..._chunkI5XF4PWDjs.jsonFieldArgs.call(void 0, options.json),
17776
17786
  ...options.full ? ["--full"] : []
17777
17787
  ]);
17778
17788
  });
@@ -18001,9 +18011,9 @@ Examples:
18001
18011
  const limit = Number(options.historyLimit);
18002
18012
  if (!Number.isInteger(limit) || limit < 1 || limit > 30)
18003
18013
  throw new Error("--history-limit must be an integer from 1 to 30.");
18004
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
18014
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
18005
18015
  if (options.binding) {
18006
- _chunkUUB3FTKZjs.printCompactJson.call(void 0,
18016
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0,
18007
18017
  await client.getPlayTriggerHistory(options.binding, { limit })
18008
18018
  );
18009
18019
  return;
@@ -18011,7 +18021,7 @@ Examples:
18011
18021
  const result = await client.listPlayTriggerInventory({
18012
18022
  cursor: options.cursor
18013
18023
  });
18014
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, {
18024
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, {
18015
18025
  ...result,
18016
18026
  next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)} --json`
18017
18027
  });
@@ -18058,7 +18068,7 @@ Examples:
18058
18068
  if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
18059
18069
  throw new Error("--group-by must be kind or trigger_source.");
18060
18070
  }
18061
- const result = await new (0, _chunkZ6VHC643js.DeeplineClient)().getPlaysActivity({
18071
+ const result = await new (0, _chunk4WHJDGBCjs.DeeplineClient)().getPlaysActivity({
18062
18072
  timeZone: options.timeZone,
18063
18073
  days,
18064
18074
  ...options.endDate ? { endDate: options.endDate } : {},
@@ -18072,7 +18082,7 @@ Examples:
18072
18082
  `${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
18073
18083
  );
18074
18084
  }
18075
- _chunkUUB3FTKZjs.printCommandEnvelope.call(void 0,
18085
+ _chunkI5XF4PWDjs.printCommandEnvelope.call(void 0,
18076
18086
  { ...result },
18077
18087
  {
18078
18088
  json: options.json || !process.stdout.isTTY,
@@ -18101,7 +18111,7 @@ Examples:
18101
18111
  false
18102
18112
  );
18103
18113
  });
18104
- _chunkR6O3YVIGjs.registerDeprecatedSearchCommand.call(void 0,
18114
+ _chunk5S4FMN6Tjs.registerDeprecatedSearchCommand.call(void 0,
18105
18115
  play,
18106
18116
  (options) => options.all ? ["plays"] : ["prebuilts"]
18107
18117
  );
@@ -18145,7 +18155,7 @@ Examples:
18145
18155
  );
18146
18156
  _chunkAFNEQ43Jjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
18147
18157
  async (target, options) => {
18148
- const ownView = () => handlePlayDescribe(_chunkUUB3FTKZjs.describeArgs.call(void 0, target, options));
18158
+ const ownView = () => handlePlayDescribe(_chunkI5XF4PWDjs.describeArgs.call(void 0, target, options));
18149
18159
  const [flagText] = [options.json].filter(
18150
18160
  (value) => typeof value === "string"
18151
18161
  );
@@ -18156,7 +18166,7 @@ Examples:
18156
18166
  process.exitCode = await ownView();
18157
18167
  return;
18158
18168
  }
18159
- const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-VJEEVOH6.js")));
18169
+ const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-RDSWCQCO.js")));
18160
18170
  process.exitCode = await describeAnything(
18161
18171
  name,
18162
18172
  {
@@ -18273,7 +18283,7 @@ Examples:
18273
18283
  deepline plays deployments <deployment-id>
18274
18284
  `
18275
18285
  ).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(
18276
- async (id, options) => id ? _chunk6466HVYRjs.handleDeploymentGet.call(void 0, id, options) : _chunk6466HVYRjs.handleDeploymentsList.call(void 0, options)
18286
+ async (id, options) => id ? _chunkJEE7AKWPjs.handleDeploymentGet.call(void 0, id, options) : _chunkJEE7AKWPjs.handleDeploymentsList.call(void 0, options)
18277
18287
  );
18278
18288
  addPublishHelp(
18279
18289
  play.command("publish <target>").description(
@@ -18453,7 +18463,7 @@ Examples:
18453
18463
  ).action(async (runId, options) => {
18454
18464
  process.exitCode = await handleRunGet([
18455
18465
  runId,
18456
- ..._chunkUUB3FTKZjs.jsonFieldArgs.call(void 0, options.json),
18466
+ ..._chunkI5XF4PWDjs.jsonFieldArgs.call(void 0, options.json),
18457
18467
  ...options.full ? ["--full"] : [],
18458
18468
  ...options.input ? ["--input"] : [],
18459
18469
  ...options.config ? ["--config"] : [],
@@ -18693,6 +18703,8 @@ Notes:
18693
18703
  --json controls stdout metadata, not the file format.
18694
18704
  --metadata-out writes the same export metadata object returned by --json,
18695
18705
  including the source dataset path and row/column metadata.
18706
+ --allow-empty permits a completed dataset with a known zero count and no
18707
+ failed rows. Missing advertised rows and failed runs still fail loudly.
18696
18708
  An active run exports only the rows accepted so far; the receipt labels it
18697
18709
  partial. --wait observes the same run until it completes, fails, or is cancelled
18698
18710
  before exporting its saved rows. --timeout-ms bounds that wait (default 300000);
@@ -18709,7 +18721,7 @@ Examples:
18709
18721
  ).requiredOption("--out <path>", "Output file path").option("--format <format>", "File format: csv or json", "csv").option(
18710
18722
  "--dataset <path>",
18711
18723
  "Returned dataset handle path, such as result.rows"
18712
- ).option("--metadata-out <path>", "Write export metadata JSON to a file").option(
18724
+ ).option("--metadata-out <path>", "Write export metadata JSON to a file").option("--allow-empty", "Allow a completed, healthy zero-row dataset").option(
18713
18725
  "--wait",
18714
18726
  "Wait for this run to reach a terminal status before export"
18715
18727
  ).option("--timeout-ms <ms>", "Maximum wait with --wait (default: 300000)").option(
@@ -18724,9 +18736,10 @@ Examples:
18724
18736
  "--format",
18725
18737
  options.format,
18726
18738
  ...options.metadataOut ? ["--metadata-out", options.metadataOut] : [],
18739
+ ...options.allowEmpty ? ["--allow-empty"] : [],
18727
18740
  ...options.wait ? ["--wait"] : [],
18728
18741
  ...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
18729
- ..._chunkUUB3FTKZjs.jsonFieldArgs.call(void 0, options.json)
18742
+ ..._chunkI5XF4PWDjs.jsonFieldArgs.call(void 0, options.json)
18730
18743
  ]);
18731
18744
  });
18732
18745
  const share = play.command("share").description(
@@ -18867,8 +18880,8 @@ function absolutePublicPlayUrl(path) {
18867
18880
  }
18868
18881
  function shareUrlFields(status) {
18869
18882
  return {
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]))
18883
+ publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _591 => _591.share, 'optionalAccess', _592 => _592.publicPath])),
18884
+ canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _593 => _593.share, 'optionalAccess', _594 => _594.canonicalPath]))
18872
18885
  };
18873
18886
  }
18874
18887
  function shareStatusForOutput(status) {
@@ -18892,10 +18905,10 @@ async function handlePlayShareStatus(args) {
18892
18905
  return 2;
18893
18906
  }
18894
18907
  const name = parseReferencedPlayTarget3(target).playName;
18895
- const status = await new (0, _chunkZ6VHC643js.DeeplineClient)().getSharePage(name);
18908
+ const status = await new (0, _chunk4WHJDGBCjs.DeeplineClient)().getSharePage(name);
18896
18909
  const outputStatus = shareStatusForOutput(status);
18897
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
18898
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, outputStatus);
18910
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
18911
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, outputStatus);
18899
18912
  return 0;
18900
18913
  }
18901
18914
  if (!outputStatus.share) {
@@ -18934,7 +18947,7 @@ async function handlePlaySharePublish(args) {
18934
18947
  return 2;
18935
18948
  }
18936
18949
  const name = parseReferencedPlayTarget3(target).playName;
18937
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
18950
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
18938
18951
  let revisionId = shareFlagValue(args, "--revision-id");
18939
18952
  let resolvedVersion;
18940
18953
  if (!revisionId) {
@@ -18965,8 +18978,8 @@ async function handlePlaySharePublish(args) {
18965
18978
  );
18966
18979
  if (!hasCompleted) {
18967
18980
  const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
18968
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
18969
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, {
18981
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
18982
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, {
18970
18983
  ok: false,
18971
18984
  code: "NO_SUCCESSFUL_RUN",
18972
18985
  message,
@@ -18990,8 +19003,8 @@ async function handlePlaySharePublish(args) {
18990
19003
  };
18991
19004
  if (args.includes("--dry-run")) {
18992
19005
  const plan = { dryRun: true, name, version: resolvedVersion, ...request };
18993
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
18994
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, plan);
19006
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
19007
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, plan);
18995
19008
  } else {
18996
19009
  console.log(
18997
19010
  `Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
@@ -19001,13 +19014,13 @@ async function handlePlaySharePublish(args) {
19001
19014
  }
19002
19015
  const status = await client.publishSharePage(name, request);
19003
19016
  const outputStatus = shareStatusForOutput(status);
19004
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
19005
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, outputStatus);
19017
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
19018
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, outputStatus);
19006
19019
  return 0;
19007
19020
  }
19008
19021
  const urls = shareUrlFields(outputStatus);
19009
19022
  console.log(
19010
- `Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _594 => _594.share, 'optionalAccess', _595 => _595.publicPath]))), () => ( ""))}`
19023
+ `Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _595 => _595.share, 'optionalAccess', _596 => _596.publicPath]))), () => ( ""))}`
19011
19024
  );
19012
19025
  if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
19013
19026
  console.log(`Version URL: ${urls.canonicalUrl}`);
@@ -19033,9 +19046,9 @@ async function handlePlayShareUpdate(args) {
19033
19046
  ...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
19034
19047
  ...seoIndexing ? { seoIndexing } : {}
19035
19048
  };
19036
- const status = await new (0, _chunkZ6VHC643js.DeeplineClient)().updateSharePage(name, request);
19037
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
19038
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, status);
19049
+ const status = await new (0, _chunk4WHJDGBCjs.DeeplineClient)().updateSharePage(name, request);
19050
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
19051
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, status);
19039
19052
  return 0;
19040
19053
  }
19041
19054
  console.log(`Updated ${name} share settings.`);
@@ -19050,13 +19063,13 @@ async function handlePlayShareRegenerate(args) {
19050
19063
  return 2;
19051
19064
  }
19052
19065
  const name = parseReferencedPlayTarget3(target).playName;
19053
- const client = new (0, _chunkZ6VHC643js.DeeplineClient)();
19066
+ const client = new (0, _chunk4WHJDGBCjs.DeeplineClient)();
19054
19067
  let revisionId = shareFlagValue(args, "--revision-id");
19055
19068
  const versionFlag = shareFlagValue(args, "--version");
19056
19069
  if (!revisionId && versionFlag) {
19057
19070
  const versions = await client.listPlayVersions(name);
19058
19071
  const chosen = versions.find((r) => r.version === Number(versionFlag));
19059
- if (!_optionalChain([chosen, 'optionalAccess', _596 => _596._id])) {
19072
+ if (!_optionalChain([chosen, 'optionalAccess', _597 => _597._id])) {
19060
19073
  console.error(`Version ${versionFlag} not found for ${name}.`);
19061
19074
  return 4;
19062
19075
  }
@@ -19067,12 +19080,12 @@ async function handlePlayShareRegenerate(args) {
19067
19080
  revisionId ? { revisionId } : {}
19068
19081
  );
19069
19082
  const outputStatus = shareStatusForOutput(status);
19070
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
19071
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, outputStatus);
19083
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
19084
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, outputStatus);
19072
19085
  return 0;
19073
19086
  }
19074
19087
  const urls = shareUrlFields(outputStatus);
19075
- const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _597 => _597.share, 'optionalAccess', _598 => _598.publishedRevisionId]) === revisionId;
19088
+ const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _598 => _598.share, 'optionalAccess', _599 => _599.publishedRevisionId]) === revisionId;
19076
19089
  console.log(
19077
19090
  `Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
19078
19091
  );
@@ -19093,9 +19106,9 @@ async function handlePlayShareUnpublish(args) {
19093
19106
  return 2;
19094
19107
  }
19095
19108
  const name = parseReferencedPlayTarget3(target).playName;
19096
- const status = await new (0, _chunkZ6VHC643js.DeeplineClient)().unpublishSharePage(name);
19097
- if (_chunkUUB3FTKZjs.argsWantJson.call(void 0, args)) {
19098
- _chunkUUB3FTKZjs.printCompactJson.call(void 0, status);
19109
+ const status = await new (0, _chunk4WHJDGBCjs.DeeplineClient)().unpublishSharePage(name);
19110
+ if (_chunkI5XF4PWDjs.argsWantJson.call(void 0, args)) {
19111
+ _chunkI5XF4PWDjs.printCompactJson.call(void 0, status);
19099
19112
  return 0;
19100
19113
  }
19101
19114
  console.log(`Unpublished ${name}; the public page has been removed.`);