deepline 0.3.376 → 0.3.378

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 (108) hide show
  1. package/dist/bundling-sources/sdk/src/plays/run-request.ts +3 -0
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/sdk/src/types.ts +5 -0
  4. package/dist/cli/auth-GC4ZJ6HO.js +39 -0
  5. package/dist/cli/{auth-MLCDUTJY.mjs → auth-Z4TP4SLF.mjs} +10 -6
  6. package/dist/cli/{billing-IONI4V7P.js → billing-2LO7C4OI.js} +74 -74
  7. package/dist/cli/{billing-OUGNDBL4.mjs → billing-JR4QD4UG.mjs} +5 -5
  8. package/dist/cli/{chunk-V7ZREPSD.mjs → chunk-2TEN5IOR.mjs} +4 -4
  9. package/dist/cli/{chunk-L6OSOKS6.mjs → chunk-3H2Q377V.mjs} +27 -10
  10. package/dist/cli/{chunk-GMRWUGXB.mjs → chunk-3OPJYNS2.mjs} +3 -3
  11. package/dist/cli/{chunk-KHZ6WEVF.js → chunk-4DAUDGO2.js} +26 -26
  12. package/dist/cli/{chunk-H7SLESX6.mjs → chunk-4YJHPJKQ.mjs} +2 -2
  13. package/dist/cli/{chunk-34KUUN3Z.js → chunk-A7VUVXW6.js} +65 -54
  14. package/dist/cli/{chunk-ETUV6RRK.js → chunk-AIRU4XTZ.js} +25 -25
  15. package/dist/cli/{chunk-ZXFGA2VK.js → chunk-BUHZUAEB.js} +8 -8
  16. package/dist/cli/{chunk-SPZNLE2D.mjs → chunk-C47TYIAO.mjs} +2 -2
  17. package/dist/cli/{chunk-UABI2T3Z.mjs → chunk-DNORWBSX.mjs} +2 -2
  18. package/dist/cli/{chunk-VL5ERG22.mjs → chunk-EEXP6W4X.mjs} +2 -2
  19. package/dist/cli/{chunk-VNBAOWN3.mjs → chunk-F2RPSYZC.mjs} +6 -6
  20. package/dist/cli/{chunk-Y5W5IIA4.js → chunk-F7MGUP72.js} +57 -57
  21. package/dist/cli/{chunk-6EYTKUDI.js → chunk-FH3WJOCD.js} +2 -2
  22. package/dist/cli/{chunk-7LX2G2PU.mjs → chunk-FJ3JEYFJ.mjs} +1 -1
  23. package/dist/cli/{chunk-FWF24ULX.mjs → chunk-HVDBGPDP.mjs} +5 -4
  24. package/dist/cli/{chunk-4WINCNNH.js → chunk-HXENYWVS.js} +5 -4
  25. package/dist/cli/{chunk-QSH5CHRI.js → chunk-ISVKLCGQ.js} +6 -6
  26. package/dist/cli/{chunk-5HJHTZI6.mjs → chunk-JORLGBPA.mjs} +1 -1
  27. package/dist/cli/{chunk-MHRDXS7J.mjs → chunk-KTZFOS57.mjs} +1 -1
  28. package/dist/cli/{chunk-7ZZSGV4A.js → chunk-LHBPC7PZ.js} +1 -1
  29. package/dist/cli/{chunk-HDB4GAWY.mjs → chunk-M5HYHFIV.mjs} +1 -1
  30. package/dist/cli/{chunk-47X6MQ7J.js → chunk-NGYNHAAC.js} +60 -60
  31. package/dist/cli/{chunk-LA46MMTL.js → chunk-PAIMOGCM.js} +1 -0
  32. package/dist/cli/{chunk-CBVIJSHF.mjs → chunk-Q6EOHNRH.mjs} +1 -0
  33. package/dist/cli/{chunk-5HDB7XXT.js → chunk-UCDAF3TI.js} +271 -254
  34. package/dist/cli/{chunk-YXQ7SRL3.mjs → chunk-V4TN5MXK.mjs} +15 -4
  35. package/dist/cli/{chunk-UE2UHYT3.mjs → chunk-VB6KECLU.mjs} +57 -6
  36. package/dist/cli/{chunk-4V2Q3JO6.js → chunk-WHEDPNPN.js} +15 -15
  37. package/dist/cli/{chunk-Y4MXBE3V.js → chunk-YSX6SSGW.js} +8 -8
  38. package/dist/cli/{chunk-A6ZTYKYF.js → chunk-ZMVJSS6N.js} +63 -12
  39. package/dist/cli/{chunk-N6KIEYZV.js → chunk-ZNGZPKXT.js} +4 -4
  40. package/dist/cli/command-docs.js +2 -2
  41. package/dist/cli/command-docs.mjs +1 -1
  42. package/dist/cli/{csv-NITSP7QJ.mjs → csv-EQV4HK57.mjs} +3 -3
  43. package/dist/cli/{csv-LPC7BGZ2.js → csv-KEA6YLCU.js} +12 -12
  44. package/dist/cli/{db-WGD54UKM.js → db-BSD7XVVZ.js} +30 -30
  45. package/dist/cli/{db-JVDYEXNC.mjs → db-CXWVEYF5.mjs} +5 -5
  46. package/dist/cli/{describe-SVMLA6SN.mjs → describe-5PIG7QJH.mjs} +12 -10
  47. package/dist/cli/{describe-GA7LSJRY.js → describe-FG5JQWSB.js} +31 -29
  48. package/dist/cli/{executions-P47HEI4N.js → executions-HLJQEBSX.js} +7 -7
  49. package/dist/cli/{executions-CXBJDGMU.mjs → executions-IPUW4YTD.mjs} +5 -5
  50. package/dist/cli/{feedback-GWKWE5CU.js → feedback-6QQVVCSY.js} +7 -7
  51. package/dist/cli/{feedback-34OSXUQ2.mjs → feedback-P2IEMRL7.mjs} +3 -3
  52. package/dist/cli/git-24TVX47T.js +23 -0
  53. package/dist/cli/{git-YAROF6D3.mjs → git-JD6UFEWE.mjs} +4 -4
  54. package/dist/cli/index.js +108 -103
  55. package/dist/cli/index.mjs +58 -53
  56. package/dist/cli/{legacy-noops-MDZQL3QH.js → legacy-noops-JZAEUIHY.js} +7 -7
  57. package/dist/cli/{legacy-noops-2G55OKIU.mjs → legacy-noops-R6FG44MY.mjs} +4 -4
  58. package/dist/cli/{monitors-KUGKMABN.mjs → monitors-7YTG6MUN.mjs} +5 -5
  59. package/dist/cli/{monitors-X7QYWFSP.js → monitors-AEDYTXDI.js} +86 -86
  60. package/dist/cli/{org-6XL3IBT2.js → org-CXXZEKOE.js} +65 -65
  61. package/dist/cli/{org-CNBBAN4W.mjs → org-HFFNL6B2.mjs} +5 -5
  62. package/dist/cli/{play-33ZMPAR5.mjs → play-2LBL27HQ.mjs} +9 -9
  63. package/dist/cli/play-BTDMU7WD.js +155 -0
  64. package/dist/cli/{providers-5POAURDT.js → providers-FYPDMYJD.js} +8 -8
  65. package/dist/cli/{providers-3OSQNFPE.mjs → providers-TSQ4IKGL.mjs} +5 -5
  66. package/dist/cli/{quickstart-LQGPDJTS.js → quickstart-OLB32KQD.js} +5 -5
  67. package/dist/cli/{quickstart-QICTOOW6.mjs → quickstart-X4EK2VUO.mjs} +3 -3
  68. package/dist/cli/{search-HBIX4SF4.mjs → search-DC3MH3SK.mjs} +6 -6
  69. package/dist/cli/search-MHDPSHQG.js +26 -0
  70. package/dist/cli/{secrets-QKPBNQ3E.js → secrets-ND2ZJBTH.js} +14 -14
  71. package/dist/cli/{secrets-6MRGZPHT.mjs → secrets-YS5G7TKA.mjs} +5 -5
  72. package/dist/cli/{sessions-NODY2OW4.mjs → sessions-FJYWJT4E.mjs} +4 -4
  73. package/dist/cli/{sessions-NP7BLZD2.js → sessions-ZAWZ23R4.js} +5 -5
  74. package/dist/cli/{settings-JCEIOTNL.mjs → settings-2PBXGFTK.mjs} +8 -8
  75. package/dist/cli/{settings-42QHXUB2.js → settings-VGSUOAPQ.js} +75 -75
  76. package/dist/cli/{setup-3QR4RGMG.mjs → setup-5EGLDCAF.mjs} +6 -6
  77. package/dist/cli/{setup-5XXWP54Y.js → setup-SBBMRM7G.js} +41 -41
  78. package/dist/cli/{skills-U4OMXLNS.mjs → skills-HGC3BDBU.mjs} +4 -4
  79. package/dist/cli/skills-OSEKG6FD.js +28 -0
  80. package/dist/cli/tools-57UDLV2I.js +40 -0
  81. package/dist/cli/{tools-45OROEZQ.mjs → tools-UTLVTTWW.mjs} +8 -8
  82. package/dist/cli/update-5YD7PJFE.js +28 -0
  83. package/dist/cli/{update-2XCRMJ4R.mjs → update-IFOQMPAX.mjs} +6 -6
  84. package/dist/cli/{workflow-7X3GCOPY.mjs → workflow-JYUD2UHZ.mjs} +6 -6
  85. package/dist/cli/{workflow-47P4LQNC.js → workflow-PAM64TA4.js} +16 -16
  86. package/dist/{client-Cn-txrXv.d.mts → client-0avPvYBP.d.mts} +5 -0
  87. package/dist/{client-fPoIN-3V.d.ts → client-DEKvymBI.d.ts} +5 -0
  88. package/dist/index.d.mts +2 -2
  89. package/dist/index.d.ts +2 -2
  90. package/dist/index.js +7 -7
  91. package/dist/index.mjs +4 -4
  92. package/dist/install-integrity.json +80 -80
  93. package/dist/plays/run-request.d.mts +1 -1
  94. package/dist/plays/run-request.d.ts +1 -1
  95. package/dist/plays/run-request.js +2 -2
  96. package/dist/plays/run-request.mjs +1 -1
  97. package/dist/release.d.mts +1 -1
  98. package/dist/release.d.ts +1 -1
  99. package/dist/release.js +2 -2
  100. package/dist/release.mjs +1 -1
  101. package/package.json +1 -1
  102. package/dist/cli/auth-BTFXJQLT.js +0 -35
  103. package/dist/cli/git-MIPISCON.js +0 -23
  104. package/dist/cli/play-3CM3P2DS.js +0 -155
  105. package/dist/cli/search-A2YLJ4I5.js +0 -26
  106. package/dist/cli/skills-4JJEAA66.js +0 -28
  107. package/dist/cli/tools-FDCFSA7W.js +0 -40
  108. package/dist/cli/update-VYL4TXIE.js +0 -28
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkA6ZTYKYFjs = require('./chunk-A6ZTYKYF.js');
5
+ var _chunkZMVJSS6Njs = require('./chunk-ZMVJSS6N.js');
6
6
 
7
7
 
8
8
  var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
@@ -19,11 +19,11 @@ var _chunkQGKPTBRRjs = require('./chunk-QGKPTBRR.js');
19
19
  var _chunk5JLQPVNXjs = require('./chunk-5JLQPVNX.js');
20
20
 
21
21
 
22
- var _chunkZXFGA2VKjs = require('./chunk-ZXFGA2VK.js');
22
+ var _chunkBUHZUAEBjs = require('./chunk-BUHZUAEB.js');
23
23
 
24
24
 
25
25
 
26
- var _chunkKHZ6WEVFjs = require('./chunk-KHZ6WEVF.js');
26
+ var _chunk4DAUDGO2js = require('./chunk-4DAUDGO2.js');
27
27
 
28
28
 
29
29
 
@@ -42,7 +42,7 @@ var _chunkGEJDBXXMjs = require('./chunk-GEJDBXXM.js');
42
42
 
43
43
 
44
44
 
45
- var _chunkETUV6RRKjs = require('./chunk-ETUV6RRK.js');
45
+ var _chunkAIRU4XTZjs = require('./chunk-AIRU4XTZ.js');
46
46
 
47
47
 
48
48
 
@@ -52,7 +52,7 @@ var _chunkETUV6RRKjs = require('./chunk-ETUV6RRK.js');
52
52
 
53
53
 
54
54
 
55
- var _chunkLA46MMTLjs = require('./chunk-LA46MMTL.js');
55
+ var _chunkPAIMOGCMjs = require('./chunk-PAIMOGCM.js');
56
56
 
57
57
 
58
58
 
@@ -75,10 +75,10 @@ var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
75
75
 
76
76
 
77
77
 
78
- var _chunkQSH5CHRIjs = require('./chunk-QSH5CHRI.js');
78
+ var _chunkISVKLCGQjs = require('./chunk-ISVKLCGQ.js');
79
79
 
80
80
 
81
- var _chunkN6KIEYZVjs = require('./chunk-N6KIEYZV.js');
81
+ var _chunkZNGZPKXTjs = require('./chunk-ZNGZPKXT.js');
82
82
 
83
83
 
84
84
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
@@ -2062,7 +2062,7 @@ function resolveField(key, command) {
2062
2062
  function printSettings(result, json, name) {
2063
2063
  result = { ...result, settings: parsePlaySettings(result.settings) };
2064
2064
  const selected = fields.filter(([key]) => !name || key === name);
2065
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
2065
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
2066
2066
  {
2067
2067
  ...result,
2068
2068
  settings: Object.fromEntries(
@@ -2106,7 +2106,7 @@ function registerPlaySettingsCommands(plays) {
2106
2106
  valueSyntax: field.cli.valueSyntax,
2107
2107
  examples: field.cli.examples
2108
2108
  }));
2109
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
2109
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
2110
2110
  {
2111
2111
  fields: descriptions,
2112
2112
  render: {
@@ -2131,7 +2131,7 @@ function registerPlaySettingsCommands(plays) {
2131
2131
  async (options, command) => {
2132
2132
  if (options.name !== void 0) resolveField(options.name, command);
2133
2133
  printSettings(
2134
- await new (0, _chunkETUV6RRKjs.DeeplineClient)().getPlaySettings(options.play),
2134
+ await new (0, _chunkAIRU4XTZjs.DeeplineClient)().getPlaySettings(options.play),
2135
2135
  options.json,
2136
2136
  options.name
2137
2137
  );
@@ -2162,7 +2162,7 @@ function registerPlaySettingsCommands(plays) {
2162
2162
  );
2163
2163
  }
2164
2164
  if (options.dryRun) {
2165
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
2165
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
2166
2166
  {
2167
2167
  dryRun: true,
2168
2168
  play,
@@ -2183,7 +2183,7 @@ function registerPlaySettingsCommands(plays) {
2183
2183
  return;
2184
2184
  }
2185
2185
  printSettings(
2186
- await new (0, _chunkETUV6RRKjs.DeeplineClient)().updatePlaySettings(play, patch),
2186
+ await new (0, _chunkAIRU4XTZjs.DeeplineClient)().updatePlaySettings(play, patch),
2187
2187
  options.json
2188
2188
  );
2189
2189
  };
@@ -2209,13 +2209,13 @@ function registerPlaySettingsCommands(plays) {
2209
2209
  "--root must be person or team; --limit must be 1\u2013100.",
2210
2210
  { exitCode: 2 }
2211
2211
  );
2212
- const page = await new (0, _chunkETUV6RRKjs.DeeplineClient)().listPlaySettingsPaths({
2212
+ const page = await new (0, _chunkAIRU4XTZjs.DeeplineClient)().listPlaySettingsPaths({
2213
2213
  root: options.root,
2214
2214
  limit,
2215
2215
  cursor: options.cursor
2216
2216
  });
2217
2217
  const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""}` : null;
2218
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
2218
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
2219
2219
  {
2220
2220
  ...page,
2221
2221
  nextCommand,
@@ -2266,7 +2266,7 @@ function registerPlaySettingsCommands(plays) {
2266
2266
  root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.root]), () => ( "person")),
2267
2267
  folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _14 => _14.folders]), () => ( []))
2268
2268
  };
2269
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
2269
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
2270
2270
  const paths = [];
2271
2271
  let cursor;
2272
2272
  do {
@@ -2328,7 +2328,7 @@ function registerPlaySettingsCommands(plays) {
2328
2328
  moved.push(move.playName);
2329
2329
  }
2330
2330
  }
2331
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
2331
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
2332
2332
  {
2333
2333
  dryRun: Boolean(options.dryRun),
2334
2334
  from: options.from,
@@ -2456,7 +2456,7 @@ function triggerLines(view) {
2456
2456
  return lines;
2457
2457
  }
2458
2458
  function printView(view, json) {
2459
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
2459
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
2460
2460
  {
2461
2461
  ...view,
2462
2462
  render: {
@@ -2469,7 +2469,7 @@ function printView(view, json) {
2469
2469
  );
2470
2470
  }
2471
2471
  function printResult(result, json) {
2472
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
2472
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
2473
2473
  {
2474
2474
  ...result,
2475
2475
  render: {
@@ -2499,7 +2499,7 @@ async function mutate(command, options, build) {
2499
2499
  usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
2500
2500
  }
2501
2501
  if (options.dryRun) {
2502
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
2502
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
2503
2503
  {
2504
2504
  dryRun: true,
2505
2505
  play: options.play,
@@ -2518,7 +2518,7 @@ async function mutate(command, options, build) {
2518
2518
  return;
2519
2519
  }
2520
2520
  printResult(
2521
- await new (0, _chunkETUV6RRKjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
2521
+ await new (0, _chunkAIRU4XTZjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
2522
2522
  options.json
2523
2523
  );
2524
2524
  }
@@ -2551,7 +2551,7 @@ function registerPlayTriggerConfigCommands(plays) {
2551
2551
  }).addHelpText("after", help2);
2552
2552
  trigger.command("get").description("Show the cron and webhook triggers of a Play.").requiredOption("--play <play>", "Play to read").option("--json", "Emit JSON").addHelpText("after", help2).action(async (options) => {
2553
2553
  printView(
2554
- await new (0, _chunkETUV6RRKjs.DeeplineClient)().getPlayTriggerConfig(options.play),
2554
+ await new (0, _chunkAIRU4XTZjs.DeeplineClient)().getPlayTriggerConfig(options.play),
2555
2555
  options.json
2556
2556
  );
2557
2557
  });
@@ -2595,7 +2595,7 @@ function registerPlayTriggerConfigCommands(plays) {
2595
2595
  if (options.auth === void 0) {
2596
2596
  if (secrets.length || options.header || options.signaturePrefix)
2597
2597
  usage(setWebhook, "--secret/--header need --auth.");
2598
- const current = await new (0, _chunkETUV6RRKjs.DeeplineClient)().getPlayTriggerConfig(
2598
+ const current = await new (0, _chunkAIRU4XTZjs.DeeplineClient)().getPlayTriggerConfig(
2599
2599
  options.play
2600
2600
  );
2601
2601
  return {
@@ -2672,7 +2672,7 @@ var KIND_DESCRIPTIONS = {
2672
2672
  "receipt.skipped": "Saved work result: skipped.",
2673
2673
  "runtime.event": "Other event."
2674
2674
  };
2675
- var RUN_LOGS_KIND_HELP = _chunkETUV6RRKjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
2675
+ var RUN_LOGS_KIND_HELP = _chunkAIRU4XTZjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
2676
2676
  kind,
2677
2677
  description: KIND_DESCRIPTIONS[kind]
2678
2678
  }));
@@ -2809,9 +2809,9 @@ function configureRunQueryCommandErrors(command, resource) {
2809
2809
  const args = program.args;
2810
2810
  if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
2811
2811
  error.exitCode = 2;
2812
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
2813
- _chunkQSH5CHRIjs.printJsonError.call(void 0,
2814
- Object.assign(new (0, _chunkETUV6RRKjs.RunEventQueryInputError)(error.message), {
2812
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
2813
+ _chunkISVKLCGQjs.printJsonError.call(void 0,
2814
+ Object.assign(new (0, _chunkAIRU4XTZjs.RunEventQueryInputError)(error.message), {
2815
2815
  exitCode: 2,
2816
2816
  retryable: false
2817
2817
  })
@@ -2855,14 +2855,14 @@ function parseQuery(args, resource) {
2855
2855
  if (VALUE_FLAGS.has(flag)) {
2856
2856
  const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
2857
2857
  if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
2858
- throw new (0, _chunkETUV6RRKjs.RunEventQueryInputError)(
2858
+ throw new (0, _chunkAIRU4XTZjs.RunEventQueryInputError)(
2859
2859
  `${flag} requires a value. Use ${flag} <value>.`
2860
2860
  );
2861
2861
  }
2862
2862
  if (flag === "--sum") sums.push(value);
2863
2863
  else {
2864
2864
  if (values[flag] !== void 0) {
2865
- throw new (0, _chunkETUV6RRKjs.RunEventQueryInputError)(
2865
+ throw new (0, _chunkAIRU4XTZjs.RunEventQueryInputError)(
2866
2866
  `${flag} may only be supplied once.`
2867
2867
  );
2868
2868
  }
@@ -2876,12 +2876,12 @@ function parseQuery(args, resource) {
2876
2876
  }
2877
2877
  if (arg.startsWith("-")) {
2878
2878
  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.";
2879
- throw new (0, _chunkETUV6RRKjs.RunEventQueryInputError)(
2879
+ throw new (0, _chunkAIRU4XTZjs.RunEventQueryInputError)(
2880
2880
  `Unsupported query flag ${flag}. ${correction}`
2881
2881
  );
2882
2882
  }
2883
2883
  if (runId !== void 0) {
2884
- throw new (0, _chunkETUV6RRKjs.RunEventQueryInputError)(
2884
+ throw new (0, _chunkAIRU4XTZjs.RunEventQueryInputError)(
2885
2885
  `Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
2886
2886
  );
2887
2887
  }
@@ -2889,7 +2889,7 @@ function parseQuery(args, resource) {
2889
2889
  }
2890
2890
  if (switches.has("--fields")) {
2891
2891
  if (runId !== void 0) {
2892
- throw new (0, _chunkETUV6RRKjs.RunEventQueryInputError)(
2892
+ throw new (0, _chunkAIRU4XTZjs.RunEventQueryInputError)(
2893
2893
  "--fields does not use a run ID. Omit the positional run ID."
2894
2894
  );
2895
2895
  }
@@ -2902,18 +2902,18 @@ function parseQuery(args, resource) {
2902
2902
  )
2903
2903
  ];
2904
2904
  if (incompatible.length) {
2905
- throw new (0, _chunkETUV6RRKjs.RunEventQueryInputError)(
2905
+ throw new (0, _chunkAIRU4XTZjs.RunEventQueryInputError)(
2906
2906
  `--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
2907
2907
  );
2908
2908
  }
2909
2909
  }
2910
2910
  if (switches.has("--count") && values["--group-by"] !== void 0) {
2911
- throw new (0, _chunkETUV6RRKjs.RunEventQueryInputError)(
2911
+ throw new (0, _chunkAIRU4XTZjs.RunEventQueryInputError)(
2912
2912
  "--count cannot be combined with --group-by. Use --group-by for counts per group."
2913
2913
  );
2914
2914
  }
2915
2915
  if (sums.length && switches.has("--count")) {
2916
- throw new (0, _chunkETUV6RRKjs.RunEventQueryInputError)(
2916
+ throw new (0, _chunkAIRU4XTZjs.RunEventQueryInputError)(
2917
2917
  "--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
2918
2918
  );
2919
2919
  }
@@ -2921,7 +2921,7 @@ function parseQuery(args, resource) {
2921
2921
  if (operation === "count") {
2922
2922
  for (const flag of ["--limit", "--cursor", "--payloads"]) {
2923
2923
  if (values[flag] !== void 0 || switches.has(flag)) {
2924
- throw new (0, _chunkETUV6RRKjs.RunEventQueryInputError)(
2924
+ throw new (0, _chunkAIRU4XTZjs.RunEventQueryInputError)(
2925
2925
  `--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
2926
2926
  );
2927
2927
  }
@@ -2956,16 +2956,16 @@ function parseQuery(args, resource) {
2956
2956
  ];
2957
2957
  }
2958
2958
  }
2959
- const request = _chunkETUV6RRKjs.normalizeRunEventOperationRequest.call(void 0, body);
2959
+ const request = _chunkAIRU4XTZjs.normalizeRunEventOperationRequest.call(void 0, body);
2960
2960
  const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
2961
2961
  const backend = values["--runtime-backend"];
2962
2962
  if (backend && backend !== "daytona" && backend !== "modal") {
2963
- throw new (0, _chunkETUV6RRKjs.RunEventQueryInputError)(
2963
+ throw new (0, _chunkAIRU4XTZjs.RunEventQueryInputError)(
2964
2964
  "--runtime-backend must be daytona or modal."
2965
2965
  );
2966
2966
  }
2967
2967
  if (backend && !namespace) {
2968
- throw new (0, _chunkETUV6RRKjs.RunEventQueryInputError)(
2968
+ throw new (0, _chunkAIRU4XTZjs.RunEventQueryInputError)(
2969
2969
  "--runtime-backend requires --runtime-namespace."
2970
2970
  );
2971
2971
  }
@@ -3012,12 +3012,12 @@ async function handleRunEventQuery(args, resource = "logs") {
3012
3012
  const failure = error instanceof Error ? error : new Error(String(error));
3013
3013
  const record3 = failure;
3014
3014
  const status = record3.statusCode;
3015
- const exitCode = error instanceof _chunkETUV6RRKjs.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;
3015
+ const exitCode = error instanceof _chunkAIRU4XTZjs.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;
3016
3016
  const diagnostic = Object.assign(failure, {
3017
3017
  exitCode,
3018
3018
  retryable: exitCode === 5
3019
3019
  });
3020
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) _chunkQSH5CHRIjs.printJsonError.call(void 0, diagnostic);
3020
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) _chunkISVKLCGQjs.printJsonError.call(void 0, diagnostic);
3021
3021
  else console.error(`Error: ${diagnostic.message}`);
3022
3022
  return exitCode;
3023
3023
  }
@@ -3032,7 +3032,7 @@ async function executeRunEventQuery(args, resource) {
3032
3032
  ...criteria
3033
3033
  } = request;
3034
3034
  const options = { ...criteria, ...runtime ? { runtime } : {} };
3035
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
3035
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
3036
3036
  let result;
3037
3037
  if (request.operation === "fields") {
3038
3038
  result = await client.runs[resource].fields(runtime ? { runtime } : {});
@@ -3098,13 +3098,13 @@ async function executeRunEventQuery(args, resource) {
3098
3098
  lines.push(`Next page: ${nextPage}`);
3099
3099
  }
3100
3100
  }
3101
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
3101
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
3102
3102
  {
3103
3103
  ...result,
3104
3104
  ...nextPage ? { next: { page: nextPage } } : {},
3105
3105
  render: { sections: [{ title: `run ${resource}`, lines }] }
3106
3106
  },
3107
- { json: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
3107
+ { json: _chunkISVKLCGQjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
3108
3108
  ` }
3109
3109
  );
3110
3110
  return 0;
@@ -3175,7 +3175,7 @@ function rowCountsFrom(input) {
3175
3175
  return { completed: c, failed: f, total: known };
3176
3176
  }
3177
3177
  function decodeRunStatus(status) {
3178
- return _chunkLA46MMTLjs.decodePlayRunPublicStatus.call(void 0, status);
3178
+ return _chunkPAIMOGCMjs.decodePlayRunPublicStatus.call(void 0, status);
3179
3179
  }
3180
3180
  function deriveRunExecutionState(input) {
3181
3181
  const status = decodeRunStatus(input.status);
@@ -3924,7 +3924,7 @@ function checkedRunExample(plays, target) {
3924
3924
  const quote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
3925
3925
  const base = `deepline plays run --file ${quote(target)}`;
3926
3926
  return {
3927
- command: `${base}${_chunkETUV6RRKjs.playInputExampleArgs.call(void 0, schema)}`,
3927
+ command: `${base}${_chunkAIRU4XTZjs.playInputExampleArgs.call(void 0, schema)}`,
3928
3928
  note: "Runs the local file without publishing and may spend credits. Supply the indicated file; JSON input must match inputSchema."
3929
3929
  };
3930
3930
  }
@@ -4022,7 +4022,7 @@ Existing credential redactions and referenced-list previews remain as stored.
4022
4022
  ...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
4023
4023
  );
4024
4024
  }
4025
- const response = await new (0, _chunkETUV6RRKjs.DeeplineClient)().runs.getReceipts(runId, {
4025
+ const response = await new (0, _chunkAIRU4XTZjs.DeeplineClient)().runs.getReceipts(runId, {
4026
4026
  keys
4027
4027
  });
4028
4028
  const failed = response.receipts.filter(
@@ -4034,7 +4034,7 @@ Existing credential redactions and referenced-list previews remain as stored.
4034
4034
  JSON.stringify(response, null, 2) + "\n",
4035
4035
  { flag: "wx", mode: 384 }
4036
4036
  );
4037
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
4037
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
4038
4038
  {
4039
4039
  runId,
4040
4040
  out: options.out,
@@ -4044,7 +4044,7 @@ Existing credential redactions and referenced-list previews remain as stored.
4044
4044
  { json: true }
4045
4045
  );
4046
4046
  } else {
4047
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
4047
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
4048
4048
  }
4049
4049
  if (failed)
4050
4050
  process.exitCode = response.receipts.some(
@@ -4083,7 +4083,7 @@ includes nextCommand when another page is available.
4083
4083
  { exitCode: 2 }
4084
4084
  );
4085
4085
  }
4086
- const page = await new (0, _chunkETUV6RRKjs.DeeplineClient)().runs.children(parentRunId, {
4086
+ const page = await new (0, _chunkAIRU4XTZjs.DeeplineClient)().runs.children(parentRunId, {
4087
4087
  launchKey: options.launchKey,
4088
4088
  ...options.cursor !== void 0 ? { cursor: options.cursor } : {},
4089
4089
  limit
@@ -4098,7 +4098,7 @@ includes nextCommand when another page is available.
4098
4098
  "--limit",
4099
4099
  String(limit)
4100
4100
  ].join(" ") : null;
4101
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
4101
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
4102
4102
  {
4103
4103
  parentRunId,
4104
4104
  launchKey: options.launchKey,
@@ -4134,7 +4134,7 @@ async function handleRunsHistory(options) {
4134
4134
  throw new Error("--limit must be a positive integer.");
4135
4135
  }
4136
4136
  }
4137
- const page = await new (0, _chunkETUV6RRKjs.DeeplineClient)().runs.history({
4137
+ const page = await new (0, _chunkAIRU4XTZjs.DeeplineClient)().runs.history({
4138
4138
  cursor: options.cursor,
4139
4139
  orgId: options.org,
4140
4140
  search: options.search,
@@ -4150,7 +4150,7 @@ async function handleRunsHistory(options) {
4150
4150
  );
4151
4151
  }
4152
4152
  if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
4153
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
4153
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
4154
4154
  { ...page, render: { sections: [{ title: "Run history", lines }] } },
4155
4155
  options.json ? { json: true } : {}
4156
4156
  );
@@ -4202,12 +4202,12 @@ async function runRunsRerunCommand(runId, options) {
4202
4202
  return 1;
4203
4203
  }
4204
4204
  }
4205
- const result = await new (0, _chunkETUV6RRKjs.DeeplineClient)().runs.rerun(runId, {
4205
+ const result = await new (0, _chunkAIRU4XTZjs.DeeplineClient)().runs.rerun(runId, {
4206
4206
  ...idempotencyKey === void 0 ? {} : { idempotencyKey },
4207
4207
  ...inputOverrides === void 0 ? {} : { inputOverrides }
4208
4208
  });
4209
- if (_chunkQSH5CHRIjs.shouldEmitJson.call(void 0, options.json)) {
4210
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0, result, { json: true });
4209
+ if (_chunkISVKLCGQjs.shouldEmitJson.call(void 0, options.json)) {
4210
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0, result, { json: true });
4211
4211
  } else {
4212
4212
  console.log(
4213
4213
  result.deduplicated === true ? `
@@ -4475,7 +4475,7 @@ function projectRunDatasetCell(value) {
4475
4475
  const logicalValue = parseSerializedDatasetValue(value);
4476
4476
  if (logicalValue === null || logicalValue === void 0) return logicalValue;
4477
4477
  if (typeof logicalValue === "object") {
4478
- return _chunkQSH5CHRIjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
4478
+ return _chunkISVKLCGQjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
4479
4479
  }
4480
4480
  return logicalValue;
4481
4481
  }
@@ -6892,7 +6892,7 @@ function renderOutcome(outcome) {
6892
6892
  function printResult2(input) {
6893
6893
  const failed = input.status === "failed" || input.status === "cancelled";
6894
6894
  if (failed) process.exitCode = 1;
6895
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
6895
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
6896
6896
  {
6897
6897
  deployment: { ...input.deployment, status: input.status },
6898
6898
  plays: input.outcomes,
@@ -6917,7 +6917,7 @@ async function handlePlaysDeploy(directory, options) {
6917
6917
  const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
6918
6918
  throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
6919
6919
  });
6920
- const { http, config } = _chunkQSH5CHRIjs.getAuthedHttpClient.call(void 0, );
6920
+ const { http, config } = _chunkISVKLCGQjs.getAuthedHttpClient.call(void 0, );
6921
6921
  const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
6922
6922
  const startDeployment = () => http.post("/api/v2/deployments", {
6923
6923
  deliveryId,
@@ -6944,7 +6944,7 @@ async function handlePlaysDeploy(directory, options) {
6944
6944
  },
6945
6945
  {
6946
6946
  bundle: bundleDeployPlayFile,
6947
- fetchImpl: _chunkN6KIEYZVjs.fetchWithDeploymentProtection,
6947
+ fetchImpl: _chunkZNGZPKXTjs.fetchWithDeploymentProtection,
6948
6948
  // The plays are already here: "opening" the source is naming it.
6949
6949
  openSource: async () => ({
6950
6950
  open: async () => ({ repoRoot: root })
@@ -7512,7 +7512,7 @@ function parseInputFlagValue(raw) {
7512
7512
  return raw;
7513
7513
  }
7514
7514
  function parsePlayRunOptions(args, initialInput = null) {
7515
- const selection = _chunkQSH5CHRIjs.parseJsonFields.call(void 0, args, "run");
7515
+ const selection = _chunkISVKLCGQjs.parseJsonFields.call(void 0, args, "run");
7516
7516
  args = selection.args;
7517
7517
  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.";
7518
7518
  let filePath = null;
@@ -7522,7 +7522,7 @@ function parsePlayRunOptions(args, initialInput = null) {
7522
7522
  let revisionSelector = null;
7523
7523
  const watch = !args.includes("--no-wait");
7524
7524
  const dryRun = args.includes("--dry-run");
7525
- let jsonOutput = dryRun ? _chunkQSH5CHRIjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkQSH5CHRIjs.argsWantJson.call(void 0, args);
7525
+ let jsonOutput = dryRun ? _chunkISVKLCGQjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkISVKLCGQjs.argsWantJson.call(void 0, args);
7526
7526
  const fullJson = args.includes("--full");
7527
7527
  const force = args.includes("--force");
7528
7528
  const forceToolRefresh = args.includes("--force-tool-refresh");
@@ -7569,7 +7569,7 @@ function parsePlayRunOptions(args, initialInput = null) {
7569
7569
  "--log-level requires one of: debug, info, warn, error."
7570
7570
  );
7571
7571
  }
7572
- const parsed = _chunkETUV6RRKjs.parseLogLevel.call(void 0, value);
7572
+ const parsed = _chunkAIRU4XTZjs.parseLogLevel.call(void 0, value);
7573
7573
  if (!parsed) {
7574
7574
  throw new Error(
7575
7575
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -7693,12 +7693,12 @@ function parsePlayRunOptions(args, initialInput = null) {
7693
7693
  }
7694
7694
  if (arg === "--debug" && args[index + 1] && !args[index + 1].startsWith("--")) {
7695
7695
  input ??= {};
7696
- _chunkLA46MMTLjs.setDottedInputValue.call(void 0, input, "debug", parseInputFlagValue(args[++index]));
7696
+ _chunkPAIMOGCMjs.setDottedInputValue.call(void 0, input, "debug", parseInputFlagValue(args[++index]));
7697
7697
  continue;
7698
7698
  }
7699
7699
  if (arg.startsWith("--debug=")) {
7700
7700
  input ??= {};
7701
- _chunkLA46MMTLjs.setDottedInputValue.call(void 0,
7701
+ _chunkPAIMOGCMjs.setDottedInputValue.call(void 0,
7702
7702
  input,
7703
7703
  "debug",
7704
7704
  parseInputFlagValue(arg.slice("--debug=".length))
@@ -7726,7 +7726,7 @@ function parsePlayRunOptions(args, initialInput = null) {
7726
7726
  if (arg.startsWith("--")) {
7727
7727
  const { path, value } = parseInputFieldFlag(arg, args[index + 1]);
7728
7728
  input ??= {};
7729
- _chunkLA46MMTLjs.setDottedInputValue.call(void 0, input, path, parseInputFlagValue(value));
7729
+ _chunkPAIMOGCMjs.setDottedInputValue.call(void 0, input, path, parseInputFlagValue(value));
7730
7730
  if (!arg.includes("=")) {
7731
7731
  index += 1;
7732
7732
  }
@@ -7790,6 +7790,7 @@ function parsePlayRunOptions(args, initialInput = null) {
7790
7790
  forceToolRefresh,
7791
7791
  maxConcurrentExternalCalls,
7792
7792
  maxConcurrentRows,
7793
+ maxCredits: null,
7793
7794
  open: open2,
7794
7795
  profile,
7795
7796
  debugMapLatency,
@@ -7812,7 +7813,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
7812
7813
  let initialInput = options.input === void 0 ? null : parseJsonInput(options.input);
7813
7814
  if (typeof options.debug === "string") {
7814
7815
  initialInput ??= {};
7815
- _chunkLA46MMTLjs.setDottedInputValue.call(void 0,
7816
+ _chunkPAIMOGCMjs.setDottedInputValue.call(void 0,
7816
7817
  initialInput,
7817
7818
  "debug",
7818
7819
  parseInputFlagValue(options.debug)
@@ -7861,6 +7862,9 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
7861
7862
  if (externalCalls !== null) resolveMaxConcurrentExternalCalls(externalCalls);
7862
7863
  const rows = _nullishCoalesce(countOption(options.maxConcurrentRows, "--max-concurrent-rows"), () => ( base.maxConcurrentRows));
7863
7864
  if (rows !== null) resolveMaxConcurrentRows(rows);
7865
+ const maxCredits = options.maxCredits === void 0 ? null : Number(options.maxCredits);
7866
+ if (maxCredits !== null && !(maxCredits > 0 && isFinite(maxCredits)))
7867
+ throw new Error("--max-credits must be a number greater than 0.");
7864
7868
  const waitTimeoutMs = _nullishCoalesce(countOption(options.tailTimeoutMs, "--tail-timeout-ms"), () => ( base.waitTimeoutMs));
7865
7869
  let fixtureBehavior = base.fixtureBehavior;
7866
7870
  if (options.fixtureBehavior !== void 0) {
@@ -7876,7 +7880,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
7876
7880
  const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
7877
7881
  (arg) => arg === "--log-level" || arg.startsWith("--log-level=")
7878
7882
  );
7879
- let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkETUV6RRKjs.parseLogLevel.call(void 0, options.logLevel);
7883
+ let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkAIRU4XTZjs.parseLogLevel.call(void 0, options.logLevel);
7880
7884
  if (!logLevel)
7881
7885
  throw new Error("--log-level requires one of: debug, info, warn, error.");
7882
7886
  const debugAlias = options.logs || options.debug === true || inputArgs.some(
@@ -7890,13 +7894,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
7890
7894
  if (debugAlias || debugMapLatency && logLevel === "info")
7891
7895
  logLevel = "debug";
7892
7896
  const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
7893
- const jsonFields = options.json === void 0 ? base.jsonFields : _chunkQSH5CHRIjs.parseJsonFields.call(void 0,
7894
- [...fullJson ? ["--full"] : [], ..._chunkQSH5CHRIjs.jsonFieldArgs.call(void 0, options.json)],
7897
+ const jsonFields = options.json === void 0 ? base.jsonFields : _chunkISVKLCGQjs.parseJsonFields.call(void 0,
7898
+ [...fullJson ? ["--full"] : [], ..._chunkISVKLCGQjs.jsonFieldArgs.call(void 0, options.json)],
7895
7899
  "run"
7896
7900
  ).fields;
7897
7901
  const watch = options.wait === false ? false : base.watch;
7898
7902
  const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
7899
- const jsonOutput = dryRun || !watch ? explicitJson || _chunkQSH5CHRIjs.argsWantJson.call(void 0, []) : explicitJson;
7903
+ const jsonOutput = dryRun || !watch ? explicitJson || _chunkISVKLCGQjs.argsWantJson.call(void 0, []) : explicitJson;
7900
7904
  const verboseLogs = Boolean(
7901
7905
  debugAlias || logLevel === "debug" || debugMapLatency
7902
7906
  );
@@ -7922,6 +7926,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
7922
7926
  forceToolRefresh: _nullishCoalesce(options.forceToolRefresh, () => ( base.forceToolRefresh)),
7923
7927
  maxConcurrentExternalCalls: externalCalls,
7924
7928
  maxConcurrentRows: rows,
7929
+ maxCredits,
7925
7930
  open: _nullishCoalesce(options.open, () => ( base.open)),
7926
7931
  debugMapLatency
7927
7932
  };
@@ -7940,7 +7945,7 @@ function playAuthoringGraphPath(parent, filePath) {
7940
7945
  // src/cli/renderers/local-play-execution.ts
7941
7946
  function renderLocalPlayExecutionPlan(plan, options = {}) {
7942
7947
  if (options.dryRun) {
7943
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
7948
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
7944
7949
  return;
7945
7950
  }
7946
7951
  process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
@@ -8566,7 +8571,7 @@ function collectLocalFileInputRefs(value, inputPath, key, out) {
8566
8571
  if (!trimmed || isUrlValue(trimmed)) {
8567
8572
  return;
8568
8573
  }
8569
- const keyIsCsvData = key === _chunkLA46MMTLjs.CSV_DATA_INPUT_KEY;
8574
+ const keyIsCsvData = key === _chunkPAIMOGCMjs.CSV_DATA_INPUT_KEY;
8570
8575
  const endsWithCsv = /\.csv$/i.test(trimmed);
8571
8576
  const looksLikeFile = /\.[a-z0-9]{1,8}$/i.test(trimmed);
8572
8577
  if (keyIsCsvData) {
@@ -8597,14 +8602,14 @@ function collectLocalFileInputRefs(value, inputPath, key, out) {
8597
8602
  }
8598
8603
  }
8599
8604
  function preflightLocalFileInputs(runtimeInput) {
8600
- if (_chunkLA46MMTLjs.CSV_DATA_INPUT_KEY in runtimeInput) {
8601
- const csvValue = runtimeInput[_chunkLA46MMTLjs.CSV_DATA_INPUT_KEY];
8605
+ if (_chunkPAIMOGCMjs.CSV_DATA_INPUT_KEY in runtimeInput) {
8606
+ const csvValue = runtimeInput[_chunkPAIMOGCMjs.CSV_DATA_INPUT_KEY];
8602
8607
  if (typeof csvValue === "string" && csvValue.trim().length === 0) {
8603
8608
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
8604
- `Input ${_chunkLA46MMTLjs.CSV_DATA_INPUT_KEY} is an empty string. Provide a path to a CSV file (or a CSV URL). No run was created.`,
8609
+ `Input ${_chunkPAIMOGCMjs.CSV_DATA_INPUT_KEY} is an empty string. Provide a path to a CSV file (or a CSV URL). No run was created.`,
8605
8610
  void 0,
8606
8611
  "PLAY_INPUT_FILE_PREFLIGHT",
8607
- { inputPath: _chunkLA46MMTLjs.CSV_DATA_INPUT_KEY, reason: "csv_empty_string" }
8612
+ { inputPath: _chunkPAIMOGCMjs.CSV_DATA_INPUT_KEY, reason: "csv_empty_string" }
8608
8613
  );
8609
8614
  }
8610
8615
  }
@@ -8671,7 +8676,7 @@ var NODE_STAGED_FILE_CODEC = {
8671
8676
  )
8672
8677
  };
8673
8678
  async function stageFileInputArgs(input) {
8674
- return _chunkLA46MMTLjs.stageFileInputs.call(void 0, {
8679
+ return _chunkPAIMOGCMjs.stageFileInputs.call(void 0, {
8675
8680
  stage: (files) => input.client.stagePlayFiles(files),
8676
8681
  runtimeInput: input.runtimeInput,
8677
8682
  bindings: input.bindings,
@@ -8695,7 +8700,7 @@ function stageFile(logicalPath, absolutePath) {
8695
8700
  logicalPath,
8696
8701
  contentBase64: buffer.toString("base64"),
8697
8702
  contentHash: _crypto.createHash.call(void 0, "sha256").update(buffer).digest("hex"),
8698
- contentType: _chunkLA46MMTLjs.stagedFileContentType.call(void 0, absolutePath),
8703
+ contentType: _chunkPAIMOGCMjs.stagedFileContentType.call(void 0, absolutePath),
8699
8704
  bytes: buffer.byteLength
8700
8705
  };
8701
8706
  }
@@ -8904,7 +8909,7 @@ function playStatusErrorText(status) {
8904
8909
  function isRetryablePendingStartFailure(status) {
8905
8910
  if (status.status !== "failed") return false;
8906
8911
  if (status.runId && status.runId !== "pending") return false;
8907
- return _chunkETUV6RRKjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
8912
+ return _chunkAIRU4XTZjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
8908
8913
  }
8909
8914
  function pendingStartFailureStatus(input) {
8910
8915
  const message = input.error instanceof Error ? input.error.message : String(input.error);
@@ -8931,13 +8936,13 @@ var PLAY_PROGRESS_HEARTBEAT_INTERVAL_MS = 15e3;
8931
8936
  var PLAY_STATUS_HEARTBEAT_INTERVAL_MS = 15e3;
8932
8937
  function watchSurfaceReaches(state, provenance, level) {
8933
8938
  const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
8934
- if (!_chunkETUV6RRKjs.logLevelReaches.call(void 0, level, minimumLevel)) {
8939
+ if (!_chunkAIRU4XTZjs.logLevelReaches.call(void 0, level, minimumLevel)) {
8935
8940
  return false;
8936
8941
  }
8937
- if (_chunkETUV6RRKjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
8942
+ if (_chunkAIRU4XTZjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
8938
8943
  return true;
8939
8944
  }
8940
- return state.verbose === true && _chunkETUV6RRKjs.logProvenanceReaches.call(void 0, provenance, "debug");
8945
+ return state.verbose === true && _chunkAIRU4XTZjs.logProvenanceReaches.call(void 0, provenance, "debug");
8941
8946
  }
8942
8947
  function getEventPayload(event) {
8943
8948
  return event.payload && typeof event.payload === "object" ? event.payload : {};
@@ -9439,7 +9444,7 @@ function buildPlayDashboardUrl(baseUrl, playName) {
9439
9444
  }
9440
9445
  function openPlayDashboard(dashboardUrl, open2) {
9441
9446
  if (open2 && dashboardUrl) {
9442
- _chunkQSH5CHRIjs.openInBrowser.call(void 0, dashboardUrl);
9447
+ _chunkISVKLCGQjs.openInBrowser.call(void 0, dashboardUrl);
9443
9448
  }
9444
9449
  }
9445
9450
  function printPlayLogLines(input) {
@@ -9501,7 +9506,7 @@ async function waitForPlayCompletionByWatch(input) {
9501
9506
  billing: false
9502
9507
  });
9503
9508
  } catch (error) {
9504
- if (_chunkETUV6RRKjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
9509
+ if (_chunkAIRU4XTZjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
9505
9510
  return null;
9506
9511
  }
9507
9512
  throw error;
@@ -9690,7 +9695,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9690
9695
  billing: false
9691
9696
  });
9692
9697
  } catch (error) {
9693
- if (_chunkETUV6RRKjs.isTransientPlayRunReadError.call(void 0, error)) {
9698
+ if (_chunkAIRU4XTZjs.isTransientPlayRunReadError.call(void 0, error)) {
9694
9699
  return null;
9695
9700
  }
9696
9701
  throw error;
@@ -9898,7 +9903,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9898
9903
  lastPhase
9899
9904
  });
9900
9905
  }
9901
- if (lastKnownWorkflowId && _chunkETUV6RRKjs.isTransientPlayRunReadError.call(void 0, error)) {
9906
+ if (lastKnownWorkflowId && _chunkAIRU4XTZjs.isTransientPlayRunReadError.call(void 0, error)) {
9902
9907
  if (timeout) {
9903
9908
  clearTimeout(timeout);
9904
9909
  }
@@ -9934,7 +9939,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9934
9939
  onRunAdmitted: confirmAdmission
9935
9940
  });
9936
9941
  }
9937
- if (!lastKnownWorkflowId && _chunkETUV6RRKjs.isTransientPlayRunReadError.call(void 0, error)) {
9942
+ if (!lastKnownWorkflowId && _chunkAIRU4XTZjs.isTransientPlayRunReadError.call(void 0, error)) {
9938
9943
  _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
9939
9944
  phase: "cli.play_start_stream_transient_failure",
9940
9945
  ms: Date.now() - startedAt,
@@ -10033,7 +10038,7 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
10033
10038
  "logs"
10034
10039
  ]);
10035
10040
  function formatPlayLogLine(rawLine, state) {
10036
- const classified = _chunkETUV6RRKjs.classifyLogLine.call(void 0, rawLine);
10041
+ const classified = _chunkAIRU4XTZjs.classifyLogLine.call(void 0, rawLine);
10037
10042
  const line = classified.line;
10038
10043
  const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
10039
10044
  const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _308 => _308[1]]) ? new Date(timestampMatch[1]) : null;
@@ -10048,14 +10053,14 @@ function formatPlayLogLine(rawLine, state) {
10048
10053
  if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
10049
10054
  const providerWait = formatProviderCapacityWaitLogLine(line);
10050
10055
  if (providerWait && !state.verbose) {
10051
- return _chunkETUV6RRKjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
10056
+ return _chunkAIRU4XTZjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
10052
10057
  }
10053
10058
  const mapProgress = formatMapProgressDiagnosticLogLine(line);
10054
10059
  if (mapProgress && !state.verbose) {
10055
- return _chunkETUV6RRKjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
10060
+ return _chunkAIRU4XTZjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
10056
10061
  }
10057
10062
  if (/\[worker\] picked up run\b/.test(message)) {
10058
- if (!_chunkETUV6RRKjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10063
+ if (!_chunkAIRU4XTZjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10059
10064
  return null;
10060
10065
  }
10061
10066
  if (state.emittedRunnerStarted) {
@@ -10068,7 +10073,7 @@ function formatPlayLogLine(rawLine, state) {
10068
10073
  /^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
10069
10074
  );
10070
10075
  if (mapStart) {
10071
- if (!_chunkETUV6RRKjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10076
+ if (!_chunkAIRU4XTZjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10072
10077
  return null;
10073
10078
  }
10074
10079
  const [, rows, fields2, namespace, cached, pending] = mapStart;
@@ -10078,7 +10083,7 @@ function formatPlayLogLine(rawLine, state) {
10078
10083
  /^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
10079
10084
  );
10080
10085
  if (mapDone) {
10081
- if (!_chunkETUV6RRKjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10086
+ if (!_chunkAIRU4XTZjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10082
10087
  return null;
10083
10088
  }
10084
10089
  const [, results, executed, cached] = mapDone;
@@ -11365,7 +11370,7 @@ function formatRecentRunLogLines(value) {
11365
11370
  (line) => typeof line === "string"
11366
11371
  );
11367
11372
  if (tail.length === 0) return [];
11368
- const shown = tail.map((line) => _chunkETUV6RRKjs.classifyLogLine.call(void 0, line)).filter(
11373
+ const shown = tail.map((line) => _chunkAIRU4XTZjs.classifyLogLine.call(void 0, line)).filter(
11369
11374
  (entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
11370
11375
  ).slice(-8);
11371
11376
  const total = readNonNegativeInteger(logs.totalCount);
@@ -11520,6 +11525,9 @@ function buildOrdinaryPlayRunCommand(options, resolvedRevisionId) {
11520
11525
  if (options.maxConcurrentRows !== null) {
11521
11526
  parts.push("--max-concurrent-rows", String(options.maxConcurrentRows));
11522
11527
  }
11528
+ if (options.maxCredits !== null) {
11529
+ parts.push("--max-credits", String(options.maxCredits));
11530
+ }
11523
11531
  const pinnedRevisionId = options.target.kind === "name" ? _nullishCoalesce(resolvedRevisionId, () => ( options.revisionId)) : null;
11524
11532
  if (pinnedRevisionId) {
11525
11533
  parts.push("--revision-id", _chunkAID3OYVJjs.shellQuote.call(void 0, pinnedRevisionId));
@@ -11641,11 +11649,11 @@ function buildPlayCompletionTextLines(status) {
11641
11649
  }
11642
11650
  function writePlayResult(status, jsonOutput, options) {
11643
11651
  const packaged = getPlayRunPackage(status);
11644
- if (status.package) _chunkA6ZTYKYFjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
11652
+ if (status.package) _chunkZMVJSS6Njs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
11645
11653
  const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _389 => _389.hits]), () => ( null));
11646
11654
  if (jsonOutput) {
11647
11655
  const payload2 = _optionalChain([options, 'optionalAccess', _390 => _390.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
11648
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
11656
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
11649
11657
  hits ? { ...payload2, hits } : payload2,
11650
11658
  { json: true, fields: _optionalChain([options, 'optionalAccess', _391 => _391.jsonFields]) }
11651
11659
  );
@@ -11661,7 +11669,7 @@ function writePlayResult(status, jsonOutput, options) {
11661
11669
  ...buildPlayCompletionTextLines(status),
11662
11670
  ...formatRunHitsLines(hits)
11663
11671
  ];
11664
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0, displayPackage, {
11672
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0, displayPackage, {
11665
11673
  json: false,
11666
11674
  text: `${lines2.join("\n")}
11667
11675
  `
@@ -11712,7 +11720,7 @@ function writePlayResult(status, jsonOutput, options) {
11712
11720
  lines.push(...buildBillingRollupTextLines(status));
11713
11721
  const compact = compactPlayStatus(status);
11714
11722
  const payload = _optionalChain([options, 'optionalAccess', _393 => _393.fullJson]) ? status : compact;
11715
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
11723
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
11716
11724
  {
11717
11725
  ...payload,
11718
11726
  render: {
@@ -12469,7 +12477,7 @@ function renderServerResultView(value) {
12469
12477
  function writeStartedPlayRun(input) {
12470
12478
  if (input.package && isPlayRunPackageValue(input.package)) {
12471
12479
  const run = input.package.run;
12472
- _chunkA6ZTYKYFjs.recordPlayTermination.call(void 0, {
12480
+ _chunkZMVJSS6Njs.recordPlayTermination.call(void 0, {
12473
12481
  id: run.id,
12474
12482
  status: run.status,
12475
12483
  finishedAt: run.finishedAt
@@ -12482,7 +12490,7 @@ function writeStartedPlayRun(input) {
12482
12490
  dashboardUrl: input.dashboardUrl,
12483
12491
  package: input.package
12484
12492
  };
12485
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
12493
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
12486
12494
  json: true,
12487
12495
  fields: input.jsonFields
12488
12496
  });
@@ -12504,7 +12512,7 @@ function writeStartedPlayRun(input) {
12504
12512
  input.progress.writeLine(output2, process.stdout);
12505
12513
  return;
12506
12514
  }
12507
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0, input.package, {
12515
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0, input.package, {
12508
12516
  json: false,
12509
12517
  text: `${output2}
12510
12518
  `
@@ -12533,7 +12541,7 @@ function writeStartedPlayRun(input) {
12533
12541
  ) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)}`] : []
12534
12542
  ];
12535
12543
  if (input.jsonOutput) {
12536
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
12544
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
12537
12545
  return;
12538
12546
  }
12539
12547
  if (input.dashboardUrl) {
@@ -12544,7 +12552,7 @@ function writeStartedPlayRun(input) {
12544
12552
  input.progress.writeLine(output, process.stdout);
12545
12553
  return;
12546
12554
  }
12547
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
12555
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
12548
12556
  {
12549
12557
  ...payload,
12550
12558
  render: { sections: [{ title: "play run", lines }] }
@@ -12554,7 +12562,7 @@ function writeStartedPlayRun(input) {
12554
12562
  );
12555
12563
  }
12556
12564
  function parsePlayCheckOptions(args) {
12557
- const selection = _chunkQSH5CHRIjs.parseJsonFields.call(void 0, args, "check");
12565
+ const selection = _chunkISVKLCGQjs.parseJsonFields.call(void 0, args, "check");
12558
12566
  args = selection.args;
12559
12567
  const target = args[0];
12560
12568
  if (!target || target.startsWith("-")) {
@@ -12566,7 +12574,7 @@ function parsePlayCheckOptions(args) {
12566
12574
  if (arg !== "--json" && arg !== "--full")
12567
12575
  throw new Error(`Unknown plays check option: ${arg}`);
12568
12576
  }
12569
- const jsonOutput = _chunkQSH5CHRIjs.argsWantJson.call(void 0, args);
12577
+ const jsonOutput = _chunkISVKLCGQjs.argsWantJson.call(void 0, args);
12570
12578
  return {
12571
12579
  target,
12572
12580
  jsonOutput,
@@ -12642,7 +12650,7 @@ ${PLAY_PUBLISH_USAGE}`
12642
12650
  useLatest,
12643
12651
  expectedArtifactHash,
12644
12652
  dryRun,
12645
- jsonOutput: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args)
12653
+ jsonOutput: _chunkISVKLCGQjs.argsWantJson.call(void 0, args)
12646
12654
  };
12647
12655
  }
12648
12656
  var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
@@ -12683,7 +12691,7 @@ ${PLAY_SAVE_USAGE}`);
12683
12691
  target,
12684
12692
  expectedArtifactHash,
12685
12693
  dryRun,
12686
- jsonOutput: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args)
12694
+ jsonOutput: _chunkISVKLCGQjs.argsWantJson.call(void 0, args)
12687
12695
  };
12688
12696
  }
12689
12697
  function printScheduledPlayCapacity(capacity) {
@@ -12894,7 +12902,7 @@ function printBundledRuntimeWarning(bundle) {
12894
12902
  async function handlePlayCheck(args) {
12895
12903
  const options = parsePlayCheckOptions(args);
12896
12904
  if (!isFileTarget2(options.target)) {
12897
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
12905
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
12898
12906
  try {
12899
12907
  await assertCanonicalNamedPlayReference(client, options.target, {
12900
12908
  command: "check"
@@ -12923,7 +12931,7 @@ async function handlePlayCheck(args) {
12923
12931
  },
12924
12932
  ...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
12925
12933
  };
12926
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0, result, {
12934
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0, result, {
12927
12935
  json: options.jsonOutput,
12928
12936
  fields: options.jsonFields,
12929
12937
  text: renderPlayCheckOutput(result) + "\n"
@@ -12933,7 +12941,7 @@ async function handlePlayCheck(args) {
12933
12941
  const resolved = _path.resolve.call(void 0, options.target);
12934
12942
  const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
12935
12943
  if (options.jsonOutput) {
12936
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
12944
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
12937
12945
  {
12938
12946
  kind: "play_check",
12939
12947
  checked: "named_contract",
@@ -12975,7 +12983,7 @@ async function handlePlayCheck(args) {
12975
12983
  detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full`,
12976
12984
  publishCommand: _optionalChain([primary, 'optionalAccess', _440 => _440.result, 'access', _441 => _441.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
12977
12985
  });
12978
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0, output, {
12986
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0, output, {
12979
12987
  json: options.jsonOutput,
12980
12988
  fields: options.jsonFields,
12981
12989
  text: renderPlayCheckOutput(output) + "\n"
@@ -13029,7 +13037,7 @@ async function checkOneExportedPlay(input) {
13029
13037
  }
13030
13038
  const playName = _nullishCoalesce(graph.root.playName, () => ( fallbackName));
13031
13039
  const authoringErrors = collectPlayGraphAuthoringErrors(graph);
13032
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
13040
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
13033
13041
  const integrationMode = resolveEvalIntegrationMode();
13034
13042
  const importedPlays = [...graph.nodes.values()].filter((node) => node.filePath !== graph.root.filePath).map((node) => ({
13035
13043
  playName: node.playName,
@@ -13106,7 +13114,7 @@ async function handleFileBackedRun(options, hooks) {
13106
13114
  );
13107
13115
  return 0;
13108
13116
  }
13109
- client = new (0, _chunkETUV6RRKjs.DeeplineClient)(playRunClientOptions(options));
13117
+ client = new (0, _chunkAIRU4XTZjs.DeeplineClient)(playRunClientOptions(options));
13110
13118
  const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
13111
13119
  if (canDeferCompilerManifest) {
13112
13120
  _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
@@ -13158,7 +13166,7 @@ async function handleFileBackedRun(options, hooks) {
13158
13166
  (file) => stageFile(file.logicalPath, file.absolutePath)
13159
13167
  );
13160
13168
  const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
13161
- const fileInputBindings = _chunkLA46MMTLjs.fileInputBindingsFromStaticPipeline.call(void 0,
13169
+ const fileInputBindings = _chunkPAIMOGCMjs.fileInputBindingsFromStaticPipeline.call(void 0,
13162
13170
  _optionalChain([compilerManifest, 'optionalAccess', _446 => _446.staticPipeline])
13163
13171
  );
13164
13172
  const stagedFileInputs = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
@@ -13198,6 +13206,7 @@ async function handleFileBackedRun(options, hooks) {
13198
13206
  ...options.forceToolRefresh ? { forceToolRefresh: true } : {},
13199
13207
  ...options.maxConcurrentExternalCalls !== null ? { maxConcurrentExternalCalls: options.maxConcurrentExternalCalls } : {},
13200
13208
  ...options.maxConcurrentRows !== null ? { maxConcurrentRows: options.maxConcurrentRows } : {},
13209
+ ...options.maxCredits !== null ? { maxCredits: options.maxCredits } : {},
13201
13210
  ...options.profile ? { profile: options.profile } : {},
13202
13211
  ...Object.keys(testPolicyOverrides).length > 0 ? { testPolicyOverrides } : {},
13203
13212
  ...integrationMode ? { integrationMode } : {},
@@ -13301,7 +13310,7 @@ async function handleNamedRun(options, hooks) {
13301
13310
  if (options.target.kind !== "name") {
13302
13311
  throw new Error("Expected a named play run target.");
13303
13312
  }
13304
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)(playRunClientOptions(options));
13313
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)(playRunClientOptions(options));
13305
13314
  const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
13306
13315
  const playName = options.target.name;
13307
13316
  const runtimeInput = options.input ? { ...options.input } : {};
@@ -13349,8 +13358,8 @@ async function handleNamedRun(options, hooks) {
13349
13358
  })
13350
13359
  );
13351
13360
  const fileInputBindings = playDetail ? [
13352
- ..._chunkLA46MMTLjs.fileInputBindingsFromPlaySchema.call(void 0, playDetail.play.inputSchema),
13353
- ..._chunkLA46MMTLjs.fileInputBindingsFromStaticPipeline.call(void 0, playDetail.play.staticPipeline)
13361
+ ..._chunkPAIMOGCMjs.fileInputBindingsFromPlaySchema.call(void 0, playDetail.play.inputSchema),
13362
+ ..._chunkPAIMOGCMjs.fileInputBindingsFromStaticPipeline.call(void 0, playDetail.play.staticPipeline)
13354
13363
  ] : [];
13355
13364
  const stagedFileInputs = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
13356
13365
  "cli.play_stage_inputs",
@@ -13375,7 +13384,7 @@ async function handleNamedRun(options, hooks) {
13375
13384
  const testPolicyOverrides = {
13376
13385
  ...options.debugMapLatency ? { mapLatencyProfile: true } : {}
13377
13386
  };
13378
- const startRequest = _chunkLA46MMTLjs.buildNamedPlayRunRequest.call(void 0, {
13387
+ const startRequest = _chunkPAIMOGCMjs.buildNamedPlayRunRequest.call(void 0, {
13379
13388
  name: playName,
13380
13389
  revisionId: selectedRevisionId,
13381
13390
  runtimeInput,
@@ -13385,6 +13394,7 @@ async function handleNamedRun(options, hooks) {
13385
13394
  ...options.forceToolRefresh ? { forceToolRefresh: true } : {},
13386
13395
  ...options.maxConcurrentExternalCalls !== null ? { maxConcurrentExternalCalls: options.maxConcurrentExternalCalls } : {},
13387
13396
  ...options.maxConcurrentRows !== null ? { maxConcurrentRows: options.maxConcurrentRows } : {},
13397
+ ...options.maxCredits !== null ? { maxCredits: options.maxCredits } : {},
13388
13398
  ...options.profile ? { profile: options.profile } : {},
13389
13399
  ...Object.keys(testPolicyOverrides).length > 0 ? { testPolicyOverrides } : {},
13390
13400
  ...integrationMode ? { integrationMode } : {},
@@ -13698,10 +13708,10 @@ function renderRunOverviewText(overview, extras = {}) {
13698
13708
  );
13699
13709
  return `${lines.join("\n")}
13700
13710
 
13701
- ${_chunkQSH5CHRIjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
13711
+ ${_chunkISVKLCGQjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
13702
13712
  }
13703
13713
  async function handleRunGet(args) {
13704
- const selection = _chunkQSH5CHRIjs.parseJsonFields.call(void 0,
13714
+ const selection = _chunkISVKLCGQjs.parseJsonFields.call(void 0,
13705
13715
  args,
13706
13716
  args.includes("--config") ? "config" : "get"
13707
13717
  );
@@ -13714,7 +13724,7 @@ async function handleRunGet(args) {
13714
13724
  console.error(error instanceof Error ? error.message : usage2);
13715
13725
  return 1;
13716
13726
  }
13717
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
13727
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
13718
13728
  if (args.includes("--config")) {
13719
13729
  if (args.some((arg) => ["--input", "--full", "--log-failed"].includes(arg))) {
13720
13730
  console.error(
@@ -13728,7 +13738,7 @@ async function handleRunGet(args) {
13728
13738
  "This server does not support recorded configuration reads."
13729
13739
  );
13730
13740
  }
13731
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
13741
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
13732
13742
  { runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
13733
13743
  { json: true, fields: selection.fields }
13734
13744
  );
@@ -13736,7 +13746,7 @@ async function handleRunGet(args) {
13736
13746
  }
13737
13747
  if (args.includes("--input")) {
13738
13748
  const input = await client.getRunInput(runId);
13739
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0, input, { json: true });
13749
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0, input, { json: true });
13740
13750
  return 0;
13741
13751
  }
13742
13752
  const full = args.includes("--full");
@@ -13744,14 +13754,14 @@ async function handleRunGet(args) {
13744
13754
  full: false,
13745
13755
  failedLogs: args.includes("--log-failed")
13746
13756
  });
13747
- if (status.package) _chunkA6ZTYKYFjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
13757
+ if (status.package) _chunkZMVJSS6Njs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
13748
13758
  if (!status.package) {
13749
13759
  const legacyStatus = full ? await client.runs.get(runId, {
13750
13760
  full: true,
13751
13761
  failedLogs: args.includes("--log-failed")
13752
13762
  }) : status;
13753
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
13754
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
13763
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
13764
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
13755
13765
  full ? legacyStatus : compactPlayStatus(legacyStatus),
13756
13766
  { json: true, fields: selection.fields }
13757
13767
  );
@@ -13767,8 +13777,8 @@ async function handleRunGet(args) {
13767
13777
  readRunCredits(client, runId, !TERMINAL_PLAY_STATUSES.has(status.status))
13768
13778
  ]);
13769
13779
  const hitLines = formatRunHitsLines(hits);
13770
- const json = _chunkQSH5CHRIjs.argsWantJson.call(void 0, args);
13771
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
13780
+ const json = _chunkISVKLCGQjs.argsWantJson.call(void 0, args);
13781
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
13772
13782
  {
13773
13783
  ...overview,
13774
13784
  credits,
@@ -13871,9 +13881,9 @@ async function handleRunLifecycleStatus(args) {
13871
13881
  console.error(error instanceof Error ? error.message : usage2);
13872
13882
  return 1;
13873
13883
  }
13874
- const status = await new (0, _chunkETUV6RRKjs.DeeplineClient)().runs.status(runId);
13875
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
13876
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0, status, { json: true });
13884
+ const status = await new (0, _chunkAIRU4XTZjs.DeeplineClient)().runs.status(runId);
13885
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
13886
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0, status, { json: true });
13877
13887
  return 0;
13878
13888
  }
13879
13889
  if (!status.available) {
@@ -13913,7 +13923,7 @@ async function handleRunsRerun(args) {
13913
13923
  console.error(error instanceof Error ? error.message : usage2);
13914
13924
  return 1;
13915
13925
  }
13916
- const options = { json: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args) };
13926
+ const options = { json: _chunkISVKLCGQjs.argsWantJson.call(void 0, args) };
13917
13927
  for (let index = 0; index < args.length; index += 1) {
13918
13928
  if (args[index] === "--idempotency-key") {
13919
13929
  options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
@@ -13978,8 +13988,8 @@ ${usage2}
13978
13988
  Discover Plays: ${next.discover}
13979
13989
  Active runs: ${next.running}`
13980
13990
  );
13981
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
13982
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
13991
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
13992
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
13983
13993
  { ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
13984
13994
  { json: true }
13985
13995
  );
@@ -13994,7 +14004,7 @@ Active runs: ${next.running}`
13994
14004
  console.error("--offset requires --play.");
13995
14005
  return 1;
13996
14006
  }
13997
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
14007
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
13998
14008
  const page = await client.runs.listPage({
13999
14009
  ...playName ? { play: playName } : {},
14000
14010
  ...statusFilter ? { status: statusFilter } : {},
@@ -14063,7 +14073,7 @@ Active runs: ${next.running}`
14063
14073
  nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
14064
14074
  );
14065
14075
  }
14066
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
14076
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
14067
14077
  {
14068
14078
  runs,
14069
14079
  count: runs.length,
@@ -14077,7 +14087,7 @@ Active runs: ${next.running}`
14077
14087
  },
14078
14088
  render: { sections: [{ title: "runs", lines }] }
14079
14089
  },
14080
- { json: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args) }
14090
+ { json: _chunkISVKLCGQjs.argsWantJson.call(void 0, args) }
14081
14091
  );
14082
14092
  return 0;
14083
14093
  }
@@ -14107,7 +14117,7 @@ async function handleRunTail(args) {
14107
14117
  console.error("--log-level requires one of: debug, info, warn, error.");
14108
14118
  return 1;
14109
14119
  }
14110
- const parsed = _chunkETUV6RRKjs.parseLogLevel.call(void 0, value);
14120
+ const parsed = _chunkAIRU4XTZjs.parseLogLevel.call(void 0, value);
14111
14121
  if (!parsed) {
14112
14122
  console.error(
14113
14123
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -14145,9 +14155,9 @@ async function handleRunTail(args) {
14145
14155
  );
14146
14156
  return 1;
14147
14157
  }
14148
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
14158
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
14149
14159
  const jsonLines = args.includes("--jsonl");
14150
- const jsonOutput = !jsonLines && _chunkQSH5CHRIjs.argsWantJson.call(void 0, args);
14160
+ const jsonOutput = !jsonLines && _chunkISVKLCGQjs.argsWantJson.call(void 0, args);
14151
14161
  const compact = args.includes("--compact");
14152
14162
  const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
14153
14163
  const compactState = {
@@ -14228,7 +14238,7 @@ async function handleRunLogs(args) {
14228
14238
  ]);
14229
14239
  const cursorIndex = args.indexOf("--cursor");
14230
14240
  const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
14231
- const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkETUV6RRKjs.isRunLogsCursor.call(void 0, cursorValue));
14241
+ const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkAIRU4XTZjs.isRunLogsCursor.call(void 0, cursorValue));
14232
14242
  if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
14233
14243
  return handleRunEventSearch(args);
14234
14244
  }
@@ -14262,7 +14272,7 @@ async function handleRunLogs(args) {
14262
14272
  console.error("--log-level requires one of: debug, info, warn, error.");
14263
14273
  return 1;
14264
14274
  }
14265
- const parsed = _chunkETUV6RRKjs.parseLogLevel.call(void 0, value);
14275
+ const parsed = _chunkAIRU4XTZjs.parseLogLevel.call(void 0, value);
14266
14276
  if (!parsed) {
14267
14277
  console.error(
14268
14278
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -14309,12 +14319,12 @@ async function handleRunLogs(args) {
14309
14319
  );
14310
14320
  return 1;
14311
14321
  }
14312
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
14322
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
14313
14323
  if (outPath) {
14314
14324
  const result2 = await client.runs.logs(runId, { all: true });
14315
- const logs = result2.entries.filter((line) => _chunkETUV6RRKjs.logLevelReaches.call(void 0, _chunkETUV6RRKjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkETUV6RRKjs.classifyLogLine.call(void 0, line).line);
14325
+ const logs = result2.entries.filter((line) => _chunkAIRU4XTZjs.logLevelReaches.call(void 0, _chunkAIRU4XTZjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkAIRU4XTZjs.classifyLogLine.call(void 0, line).line);
14316
14326
  _fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
14317
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
14327
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
14318
14328
  {
14319
14329
  runId: result2.runId,
14320
14330
  log_path: outPath,
@@ -14337,7 +14347,7 @@ async function handleRunLogs(args) {
14337
14347
  ]
14338
14348
  }
14339
14349
  },
14340
- { json: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args) }
14350
+ { json: _chunkISVKLCGQjs.argsWantJson.call(void 0, args) }
14341
14351
  );
14342
14352
  return 0;
14343
14353
  }
@@ -14368,7 +14378,7 @@ async function handleRunLogs(args) {
14368
14378
  }
14369
14379
  };
14370
14380
  const text = buildRunLogsText(filteredResult);
14371
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
14381
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
14372
14382
  {
14373
14383
  runId: result.runId,
14374
14384
  totalCount: result.totalCount,
@@ -14392,7 +14402,7 @@ async function handleRunLogs(args) {
14392
14402
  render: { sections: [{ title: "run logs", lines: entries }] }
14393
14403
  },
14394
14404
  {
14395
- json: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args),
14405
+ json: _chunkISVKLCGQjs.argsWantJson.call(void 0, args),
14396
14406
  text
14397
14407
  }
14398
14408
  );
@@ -14416,7 +14426,7 @@ function selectRunLogTailPage(result, logLevel, limit) {
14416
14426
  );
14417
14427
  }
14418
14428
  const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
14419
- (entry) => _chunkETUV6RRKjs.logLevelReaches.call(void 0, _chunkETUV6RRKjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
14429
+ (entry) => _chunkAIRU4XTZjs.logLevelReaches.call(void 0, _chunkAIRU4XTZjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
14420
14430
  );
14421
14431
  const selected = matching.slice(-limit);
14422
14432
  const olderMatchesExist = matching.length > selected.length;
@@ -14426,7 +14436,7 @@ function selectRunLogTailPage(result, logLevel, limit) {
14426
14436
  lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _483 => _483.at, 'call', _484 => _484(-1), 'optionalAccess', _485 => _485.seq]), () => ( null)),
14427
14437
  truncated: result.truncated || olderMatchesExist,
14428
14438
  hasMore: olderMatchesExist,
14429
- nextCursor: olderMatchesExist ? _chunkETUV6RRKjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
14439
+ nextCursor: olderMatchesExist ? _chunkAIRU4XTZjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
14430
14440
  };
14431
14441
  }
14432
14442
  async function handleRunEventSearch(args) {
@@ -14493,7 +14503,7 @@ ${usage2}`);
14493
14503
  namespace,
14494
14504
  ...backend ? { backend } : {}
14495
14505
  } : void 0;
14496
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
14506
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
14497
14507
  const result = await client.runs.searchEvents({
14498
14508
  ...runId ? { runId } : {},
14499
14509
  ...values["--since"] ? { since: values["--since"] } : {},
@@ -14565,7 +14575,7 @@ ${renderedDetails}` : ""}`;
14565
14575
  "--limit",
14566
14576
  String(limit)
14567
14577
  ].join(" ") : null;
14568
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
14578
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
14569
14579
  {
14570
14580
  events,
14571
14581
  nextCursor: result.nextCursor,
@@ -14576,14 +14586,14 @@ ${renderedDetails}` : ""}`;
14576
14586
  render: { sections: [{ title: "runtime events", lines }] }
14577
14587
  },
14578
14588
  {
14579
- json: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args),
14589
+ json: _chunkISVKLCGQjs.argsWantJson.call(void 0, args),
14580
14590
  text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
14581
14591
  }
14582
14592
  );
14583
14593
  return 0;
14584
14594
  }
14585
14595
  function buildRunLogsText(result) {
14586
- const lines = result.entries.map((line) => _chunkETUV6RRKjs.classifyLogLine.call(void 0, line).line);
14596
+ const lines = result.entries.map((line) => _chunkAIRU4XTZjs.classifyLogLine.call(void 0, line).line);
14587
14597
  if (result.warning) {
14588
14598
  if (lines.length > 0) lines.push("");
14589
14599
  lines.push(`warning: ${result.warning}`);
@@ -14617,7 +14627,7 @@ async function handleRunStop(args) {
14617
14627
  reason = args[++index];
14618
14628
  }
14619
14629
  }
14620
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
14630
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
14621
14631
  const result = await client.runs.stop(runId, { reason });
14622
14632
  const state = resolveRunStopState(result);
14623
14633
  const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
@@ -14632,7 +14642,7 @@ async function handleRunStop(args) {
14632
14642
  ...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
14633
14643
  `inspect: deepline runs get ${runId} --full`
14634
14644
  ];
14635
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
14645
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
14636
14646
  {
14637
14647
  ...cancelling,
14638
14648
  state,
@@ -14647,7 +14657,7 @@ async function handleRunStop(args) {
14647
14657
  ]
14648
14658
  }
14649
14659
  },
14650
- { json: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args) }
14660
+ { json: _chunkISVKLCGQjs.argsWantJson.call(void 0, args) }
14651
14661
  );
14652
14662
  return 0;
14653
14663
  }
@@ -14664,7 +14674,7 @@ async function handleRunStop(args) {
14664
14674
  ];
14665
14675
  process.stderr.write(`${lines2.join("\n")}
14666
14676
  `);
14667
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
14677
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
14668
14678
  {
14669
14679
  ...result,
14670
14680
  render: {
@@ -14679,7 +14689,7 @@ async function handleRunStop(args) {
14679
14689
  ]
14680
14690
  }
14681
14691
  },
14682
- { json: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args) }
14692
+ { json: _chunkISVKLCGQjs.argsWantJson.call(void 0, args) }
14683
14693
  );
14684
14694
  return 1;
14685
14695
  }
@@ -14690,12 +14700,12 @@ async function handleRunStop(args) {
14690
14700
  `warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
14691
14701
  ] : []
14692
14702
  ];
14693
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
14703
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
14694
14704
  {
14695
14705
  ...result,
14696
14706
  render: { sections: [{ title: "run stop", lines }] }
14697
14707
  },
14698
- { json: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args) }
14708
+ { json: _chunkISVKLCGQjs.argsWantJson.call(void 0, args) }
14699
14709
  );
14700
14710
  return 0;
14701
14711
  }
@@ -14745,18 +14755,18 @@ async function handleRunStopAll(args) {
14745
14755
  reason = args[++index];
14746
14756
  }
14747
14757
  }
14748
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
14758
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
14749
14759
  if (dryRun) {
14750
14760
  const result2 = await client.runs.stopAll({ dryRun: true, reason });
14751
14761
  const lines2 = buildStopAllDryRunTextLines(result2);
14752
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
14762
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
14753
14763
  {
14754
14764
  ...result2,
14755
14765
  render: {
14756
14766
  sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
14757
14767
  }
14758
14768
  },
14759
- { json: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
14769
+ { json: _chunkISVKLCGQjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
14760
14770
  ` }
14761
14771
  );
14762
14772
  return 0;
@@ -14769,17 +14779,17 @@ async function handleRunStopAll(args) {
14769
14779
  ...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
14770
14780
  ...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
14771
14781
  ];
14772
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
14782
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
14773
14783
  {
14774
14784
  ...result,
14775
14785
  render: { sections: [{ title: "workspace stop-all", lines }] }
14776
14786
  },
14777
- { json: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args) }
14787
+ { json: _chunkISVKLCGQjs.argsWantJson.call(void 0, args) }
14778
14788
  );
14779
14789
  return result.failed > 0 || result.partial ? 1 : 0;
14780
14790
  }
14781
14791
  async function handleRunExport(args) {
14782
- const selection = _chunkQSH5CHRIjs.parseJsonFields.call(void 0, args, "export");
14792
+ const selection = _chunkISVKLCGQjs.parseJsonFields.call(void 0, args, "export");
14783
14793
  args = selection.args;
14784
14794
  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]";
14785
14795
  let runId;
@@ -14838,16 +14848,16 @@ async function handleRunExport(args) {
14838
14848
  "INVALID_ARGUMENT"
14839
14849
  );
14840
14850
  }
14841
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
14851
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
14842
14852
  let status = await client.getPlayStatus(runId, { full: true });
14843
14853
  if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
14844
- const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkQSH5CHRIjs.argsWantJson.call(void 0, args));
14854
+ const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkISVKLCGQjs.argsWantJson.call(void 0, args));
14845
14855
  try {
14846
14856
  await waitForPlayCompletionByWatch({
14847
14857
  client,
14848
14858
  playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
14849
14859
  workflowId: runId,
14850
- jsonOutput: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args),
14860
+ jsonOutput: _chunkISVKLCGQjs.argsWantJson.call(void 0, args),
14851
14861
  emitLogs: false,
14852
14862
  waitTimeoutMs,
14853
14863
  startedAt: Date.now(),
@@ -14947,8 +14957,8 @@ async function handleRunExport(args) {
14947
14957
  "utf-8"
14948
14958
  );
14949
14959
  }
14950
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0, payload, {
14951
- json: _chunkQSH5CHRIjs.argsWantJson.call(void 0, args),
14960
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0, payload, {
14961
+ json: _chunkISVKLCGQjs.argsWantJson.call(void 0, args),
14952
14962
  fields: selection.fields,
14953
14963
  text: `${lines.join("\n")}
14954
14964
  `
@@ -14969,10 +14979,10 @@ async function handlePlayGet(args) {
14969
14979
  );
14970
14980
  return 2;
14971
14981
  }
14972
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
14982
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
14973
14983
  const explicitJson = args.includes("--json");
14974
14984
  const sourceOutput = args.includes("--source");
14975
- const jsonOutput = sourceOutput ? explicitJson : _chunkQSH5CHRIjs.argsWantJson.call(void 0, args);
14985
+ const jsonOutput = sourceOutput ? explicitJson : _chunkISVKLCGQjs.argsWantJson.call(void 0, args);
14976
14986
  const requestedRevisionFlags = [
14977
14987
  args.includes("--working"),
14978
14988
  args.includes("--live"),
@@ -15032,7 +15042,7 @@ async function handlePlayGet(args) {
15032
15042
  }
15033
15043
  const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
15034
15044
  if (jsonOutput) {
15035
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, {
15045
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, {
15036
15046
  ...detail,
15037
15047
  ...materializedFile ? {
15038
15048
  message: loadedMessage,
@@ -15124,8 +15134,8 @@ async function handlePlayVersions(args) {
15124
15134
  console.error("Usage: deepline plays versions --name <name> [--json]");
15125
15135
  return 1;
15126
15136
  }
15127
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
15128
- const jsonOutput = _chunkQSH5CHRIjs.argsWantJson.call(void 0, args);
15137
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
15138
+ const jsonOutput = _chunkISVKLCGQjs.argsWantJson.call(void 0, args);
15129
15139
  await assertCanonicalNamedPlayReference(client, playName, {
15130
15140
  command: "versions"
15131
15141
  });
@@ -15133,7 +15143,7 @@ async function handlePlayVersions(args) {
15133
15143
  parseReferencedPlayTarget2(playName).playName
15134
15144
  );
15135
15145
  if (jsonOutput) {
15136
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, { versions });
15146
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, { versions });
15137
15147
  return 0;
15138
15148
  }
15139
15149
  if (versions.length === 0) {
@@ -15165,9 +15175,9 @@ var PREBUILT_PLAY_TAG_KEYS = [
15165
15175
  "signals"
15166
15176
  ];
15167
15177
  async function handlePlayList(args) {
15168
- const jsonOutput = _chunkQSH5CHRIjs.argsWantJson.call(void 0, args);
15178
+ const jsonOutput = _chunkISVKLCGQjs.argsWantJson.call(void 0, args);
15169
15179
  const showCost = args.includes("--show-cost");
15170
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
15180
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
15171
15181
  const categoriesIndex = args.indexOf("--categories");
15172
15182
  const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _521 => _521[categoriesIndex + 1], 'optionalAccess', _522 => _522.trim, 'call', _523 => _523()]) : void 0;
15173
15183
  const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
@@ -15264,7 +15274,7 @@ async function handlePlayList(args) {
15264
15274
  lines.push("List truncated \u2014 more plays are available.");
15265
15275
  lines.push(`Next page: ${nextPage}`);
15266
15276
  }
15267
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
15277
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
15268
15278
  {
15269
15279
  plays,
15270
15280
  count: plays.length,
@@ -15282,7 +15292,7 @@ async function handlePlayList(args) {
15282
15292
  }
15283
15293
  async function handlePlayPin(args, pinned) {
15284
15294
  const target = _optionalChain([args, 'access', _530 => _530.find, 'call', _531 => _531((arg) => !arg.startsWith("-")), 'optionalAccess', _532 => _532.trim, 'call', _533 => _533()]);
15285
- const jsonOutput = _chunkQSH5CHRIjs.argsWantJson.call(void 0, args);
15295
+ const jsonOutput = _chunkISVKLCGQjs.argsWantJson.call(void 0, args);
15286
15296
  const dryRun = args.includes("--dry-run");
15287
15297
  if (!target) {
15288
15298
  console.error(
@@ -15300,11 +15310,11 @@ async function handlePlayPin(args, pinned) {
15300
15310
  const name = parsedTarget.playName;
15301
15311
  const plan = { name, pinned, dryRun };
15302
15312
  if (dryRun) {
15303
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, plan);
15313
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, plan);
15304
15314
  return 0;
15305
15315
  }
15306
- const result = await new (0, _chunkETUV6RRKjs.DeeplineClient)().setPlayPinned(name, pinned);
15307
- if (jsonOutput) _chunkQSH5CHRIjs.printCompactJson.call(void 0, result);
15316
+ const result = await new (0, _chunkAIRU4XTZjs.DeeplineClient)().setPlayPinned(name, pinned);
15317
+ if (jsonOutput) _chunkISVKLCGQjs.printCompactJson.call(void 0, result);
15308
15318
  else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
15309
15319
  return 0;
15310
15320
  }
@@ -15320,7 +15330,7 @@ function csvColumnLines(csvInput) {
15320
15330
  const headers = [defaults[column]].flat().filter((header) => header && header !== column);
15321
15331
  return `${column}${required.has(column) ? " (required)" : ""}${headers.length > 0 ? `, default header: ${headers.join(" or ")}` : ""}`;
15322
15332
  }),
15323
- _chunkETUV6RRKjs.CSV_HEADER_MATCHING_NOTE
15333
+ _chunkAIRU4XTZjs.CSV_HEADER_MATCHING_NOTE
15324
15334
  ];
15325
15335
  }
15326
15336
  function describedPlay(play) {
@@ -15333,14 +15343,14 @@ function describedPlay(play) {
15333
15343
  "columns",
15334
15344
  ...Array.isArray(csv.runLevelControlFields) ? csv.runLevelControlFields.map(String) : []
15335
15345
  ]);
15336
- const declared = _chunkA6ZTYKYFjs.schemaFields.call(void 0, play.inputSchema).map((field) => field.name);
15337
- const rowNames = _chunkA6ZTYKYFjs.schemaFields.call(void 0, csv.rowInputSchema).map((field) => field.name);
15346
+ const declared = _chunkZMVJSS6Njs.schemaFields.call(void 0, play.inputSchema).map((field) => field.name);
15347
+ const rowNames = _chunkZMVJSS6Njs.schemaFields.call(void 0, csv.rowInputSchema).map((field) => field.name);
15338
15348
  const replaced = play.csvInput ? (rowNames.length > 0 ? rowNames : declared).filter(
15339
15349
  (name) => declared.includes(name) && !alongside.has(name)
15340
15350
  ) : [];
15341
15351
  const exclusive = replaced.length ? { field: csvField2, with: replaced } : void 0;
15342
15352
  const headers = isRecord2(csv.defaultColumns) ? csv.defaultColumns : {};
15343
- const rowInputs = _chunkA6ZTYKYFjs.schemaFields.call(void 0, csv.rowInputSchema).map((field) => {
15353
+ const rowInputs = _chunkZMVJSS6Njs.schemaFields.call(void 0, csv.rowInputSchema).map((field) => {
15344
15354
  const header = [headers[field.name]].flat().filter((name) => name && name !== field.name).join(" or ");
15345
15355
  return header ? {
15346
15356
  ...field,
@@ -15349,7 +15359,7 @@ function describedPlay(play) {
15349
15359
  });
15350
15360
  const rowOutput = _nullishCoalesce(play.rowOutputSchema, () => ( {}));
15351
15361
  const added = isRecord2(rowOutput.addedColumns) ? rowOutput.addedColumns : {};
15352
- const rowOutputs = _chunkA6ZTYKYFjs.schemaFields.call(void 0,
15362
+ const rowOutputs = _chunkZMVJSS6Njs.schemaFields.call(void 0,
15353
15363
  Object.keys(added).length ? { properties: added } : rowOutput
15354
15364
  ).map((field) => ({ ...field, required: true }));
15355
15365
  return {
@@ -15359,10 +15369,14 @@ function describedPlay(play) {
15359
15369
  ...play.description ? { description: play.description } : {},
15360
15370
  ...play.observedCost ? { cost: play.observedCost.displayText } : {},
15361
15371
  guidance: [],
15362
- inputs: _chunkA6ZTYKYFjs.schemaFields.call(void 0, play.inputSchema),
15363
- outputs: _chunkA6ZTYKYFjs.schemaFields.call(void 0, play.outputSchema),
15372
+ inputs: _chunkZMVJSS6Njs.schemaFields.call(void 0, play.inputSchema),
15373
+ outputs: _chunkZMVJSS6Njs.schemaFields.call(void 0, play.outputSchema),
15364
15374
  ...rowInputs.length ? { rowInputs } : {},
15365
- ...rowOutputs.length ? { rowOutputs } : {},
15375
+ ...typeof csv.inputField === "string" ? { csvInput: csv.inputField } : {},
15376
+ ...rowOutputs.length ? {
15377
+ rowOutputs,
15378
+ rowOutputsAddToSource: Object.keys(added).length > 0 || rowOutput.preservesSourceColumns === true
15379
+ } : {},
15366
15380
  runner: {
15367
15381
  via: "play",
15368
15382
  reference,
@@ -15482,12 +15496,12 @@ async function handlePlayGrep(args) {
15482
15496
  console.error("Usage: deepline plays grep <query> [--json]");
15483
15497
  return 1;
15484
15498
  }
15485
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
15499
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
15486
15500
  const results = (await client.listPlays({ grep: query })).map(
15487
15501
  summarizePlayGrepResult
15488
15502
  );
15489
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
15490
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, {
15503
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
15504
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, {
15491
15505
  plays: results,
15492
15506
  count: results.length,
15493
15507
  query,
@@ -15510,7 +15524,7 @@ async function handlePlayGrep(args) {
15510
15524
  return 0;
15511
15525
  }
15512
15526
  async function handlePlayDescribe(args) {
15513
- const selection = _chunkQSH5CHRIjs.parseJsonFields.call(void 0, args, "describe");
15527
+ const selection = _chunkISVKLCGQjs.parseJsonFields.call(void 0, args, "describe");
15514
15528
  args = selection.args;
15515
15529
  const playName = args[0];
15516
15530
  if (!playName) {
@@ -15544,8 +15558,8 @@ async function handlePlayDescribe(args) {
15544
15558
  `deepline plays check ${playName}`,
15545
15559
  ...definedName ? [`deepline describe <workspace>/${definedName}`] : []
15546
15560
  ];
15547
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
15548
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, {
15561
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
15562
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, {
15549
15563
  ok: false,
15550
15564
  error: { message },
15551
15565
  next
@@ -15559,7 +15573,7 @@ async function handlePlayDescribe(args) {
15559
15573
  }
15560
15574
  return 2;
15561
15575
  }
15562
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
15576
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
15563
15577
  await assertCanonicalNamedPlayReference(client, playName, {
15564
15578
  command: "describe"
15565
15579
  });
@@ -15569,9 +15583,9 @@ async function handlePlayDescribe(args) {
15569
15583
  compact: args.includes("--compact")
15570
15584
  }
15571
15585
  );
15572
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
15573
- if (selection.fields) _chunkQSH5CHRIjs.printJson.call(void 0, play, selection.fields);
15574
- else _chunkQSH5CHRIjs.printCompactJson.call(void 0, play);
15586
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
15587
+ if (selection.fields) _chunkISVKLCGQjs.printJson.call(void 0, play, selection.fields);
15588
+ else _chunkISVKLCGQjs.printCompactJson.call(void 0, play);
15575
15589
  return 0;
15576
15590
  }
15577
15591
  printPlayDescription(play);
@@ -15615,7 +15629,7 @@ async function handlePlaySave(args) {
15615
15629
  next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
15616
15630
  };
15617
15631
  if (options.jsonOutput) {
15618
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, result);
15632
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, result);
15619
15633
  } else {
15620
15634
  console.error(result.message);
15621
15635
  console.error(` checked artifact: ${result.expectedArtifactHash}`);
@@ -15637,7 +15651,7 @@ async function handlePlaySave(args) {
15637
15651
  };
15638
15652
  if (options.dryRun) {
15639
15653
  if (options.jsonOutput) {
15640
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, dryRun);
15654
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, dryRun);
15641
15655
  } else {
15642
15656
  console.log(`Dry run: ${playName}`);
15643
15657
  console.log(` source: ${dryRun.sourceHash}`);
@@ -15646,7 +15660,7 @@ async function handlePlaySave(args) {
15646
15660
  }
15647
15661
  return 0;
15648
15662
  }
15649
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
15663
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
15650
15664
  try {
15651
15665
  await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
15652
15666
  "cli.play_save_compile_manifests",
@@ -15682,7 +15696,7 @@ async function handlePlaySave(args) {
15682
15696
  }
15683
15697
  };
15684
15698
  if (options.jsonOutput) {
15685
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, result);
15699
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, result);
15686
15700
  } else {
15687
15701
  console.log(
15688
15702
  `\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
@@ -15708,7 +15722,7 @@ async function handlePlayPublish(args) {
15708
15722
  }
15709
15723
  const { target: playName, useLatest } = options;
15710
15724
  let revisionId = options.revisionId;
15711
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
15725
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
15712
15726
  if (isFileTarget2(playName)) {
15713
15727
  if (revisionId || useLatest) {
15714
15728
  console.error(
@@ -15740,7 +15754,7 @@ async function handlePlayPublish(args) {
15740
15754
  next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
15741
15755
  };
15742
15756
  if (options.jsonOutput) {
15743
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, result3);
15757
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, result3);
15744
15758
  } else {
15745
15759
  console.error(result3.message);
15746
15760
  console.error(` checked artifact: ${result3.expectedArtifactHash}`);
@@ -15763,7 +15777,7 @@ async function handlePlayPublish(args) {
15763
15777
  };
15764
15778
  if (options.dryRun) {
15765
15779
  if (options.jsonOutput) {
15766
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, dryRun);
15780
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, dryRun);
15767
15781
  } else {
15768
15782
  console.log(`Dry run: ${rootPlayName}`);
15769
15783
  console.log(` source: ${dryRun.sourceHash}`);
@@ -15831,7 +15845,7 @@ async function handlePlayPublish(args) {
15831
15845
  triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
15832
15846
  };
15833
15847
  if (options.jsonOutput) {
15834
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, result2);
15848
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, result2);
15835
15849
  } else {
15836
15850
  printPublishReceipt({
15837
15851
  name: rootPlayName,
@@ -15862,7 +15876,7 @@ async function handlePlayPublish(args) {
15862
15876
  revisionId: _nullishCoalesce(revisionId, () => ( null)),
15863
15877
  latest: useLatest
15864
15878
  };
15865
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, result2);
15879
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, result2);
15866
15880
  return 0;
15867
15881
  }
15868
15882
  const resolvedName = parseReferencedPlayTarget2(playName).playName;
@@ -15886,7 +15900,7 @@ async function handlePlayPublish(args) {
15886
15900
  revisionId ? { revisionId } : {}
15887
15901
  );
15888
15902
  if (options.jsonOutput) {
15889
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, result);
15903
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, result);
15890
15904
  } else {
15891
15905
  printPublishReceipt({
15892
15906
  name: result.name,
@@ -15926,7 +15940,7 @@ async function handlePlayDelete(args) {
15926
15940
  );
15927
15941
  return 2;
15928
15942
  }
15929
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
15943
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
15930
15944
  let detail;
15931
15945
  try {
15932
15946
  detail = await client.getPlay(parseReferencedPlayTarget2(playName).playName);
@@ -15950,8 +15964,8 @@ async function handlePlayDelete(args) {
15950
15964
  name: resolvedName,
15951
15965
  plannedMutation: "move saved org-owned play to Trash and stop triggers"
15952
15966
  };
15953
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
15954
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, result2);
15967
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
15968
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, result2);
15955
15969
  } else {
15956
15970
  process.stdout.write(
15957
15971
  `Dry run: would move ${result2.name} to Trash and stop its active triggers.
@@ -15961,8 +15975,8 @@ async function handlePlayDelete(args) {
15961
15975
  return 0;
15962
15976
  }
15963
15977
  const result = await client.deletePlay(resolvedName);
15964
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
15965
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, result);
15978
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
15979
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, result);
15966
15980
  return result.archived || result.alreadyArchived ? 0 : 4;
15967
15981
  }
15968
15982
  if (result.alreadyArchived) {
@@ -16001,13 +16015,13 @@ async function handlePlayRestore(args) {
16001
16015
  );
16002
16016
  return 2;
16003
16017
  }
16004
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
16018
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
16005
16019
  try {
16006
16020
  const result = await client.restorePlay(
16007
16021
  parseReferencedPlayTarget2(playName).playName
16008
16022
  );
16009
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
16010
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, result);
16023
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
16024
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, result);
16011
16025
  return result.restored || result.alreadyActive ? 0 : 4;
16012
16026
  }
16013
16027
  if (result.alreadyActive) {
@@ -16113,7 +16127,7 @@ Examples:
16113
16127
  ).action(async (target, options) => {
16114
16128
  process.exitCode = await handlePlayCheck([
16115
16129
  target,
16116
- ..._chunkQSH5CHRIjs.jsonFieldArgs.call(void 0, options.json),
16130
+ ..._chunkISVKLCGQjs.jsonFieldArgs.call(void 0, options.json),
16117
16131
  ...options.full ? ["--full"] : []
16118
16132
  ]);
16119
16133
  });
@@ -16157,6 +16171,8 @@ Notes:
16157
16171
  --max-concurrent-rows sets the run-wide default and ceiling for live map row
16158
16172
  resolvers. Accepted range: 1-${MAX_CONFIGURABLE_CONCURRENT_ROWS}. The runtime
16159
16173
  may lower it when source-row size exceeds the active-row memory budget.
16174
+ --max-credits replaces the play's billing.maxCreditsPerRun for this run.
16175
+ Tool calls that would exceed it are denied.
16160
16176
  This command starts cloud work and may spend Deepline credits through tool calls.
16161
16177
 
16162
16178
  Idempotent execution:
@@ -16198,6 +16214,7 @@ Examples:
16198
16214
  deepline plays run my.play.ts --input '{"domain":"stripe.com"}' --log-level debug
16199
16215
  deepline plays run my.play.ts --profile absurd
16200
16216
  deepline plays run my.play.ts --max-concurrent-external-calls 20
16217
+ deepline plays run my.play.ts --max-credits 50
16201
16218
  deepline plays run my.play.ts --input @input.json
16202
16219
  deepline plays run cto-search.play.ts --limit 5
16203
16220
  deepline runs export <run-id> --out output.csv
@@ -16253,7 +16270,7 @@ Examples:
16253
16270
  ).option(
16254
16271
  "--max-concurrent-rows <count>",
16255
16272
  `Run-wide dataset map row resolver ceiling (max ${MAX_CONFIGURABLE_CONCURRENT_ROWS})`
16256
- ).option("--open", "Open the play page in a browser after the run starts").option(
16273
+ ).option("--max-credits <credits>", "Deepline-credit cap for this run").option("--open", "Open the play page in a browser after the run starts").option(
16257
16274
  "--debug-map-latency",
16258
16275
  "Internal diagnostics: emit one aggregate latency profile per dataset map"
16259
16276
  ).option(
@@ -16340,9 +16357,9 @@ Examples:
16340
16357
  const limit = Number(options.historyLimit);
16341
16358
  if (!Number.isInteger(limit) || limit < 1 || limit > 30)
16342
16359
  throw new Error("--history-limit must be an integer from 1 to 30.");
16343
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
16360
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
16344
16361
  if (options.binding) {
16345
- _chunkQSH5CHRIjs.printCompactJson.call(void 0,
16362
+ _chunkISVKLCGQjs.printCompactJson.call(void 0,
16346
16363
  await client.getPlayTriggerHistory(options.binding, { limit })
16347
16364
  );
16348
16365
  return;
@@ -16350,7 +16367,7 @@ Examples:
16350
16367
  const result = await client.listPlayTriggerInventory({
16351
16368
  cursor: options.cursor
16352
16369
  });
16353
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, {
16370
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, {
16354
16371
  ...result,
16355
16372
  next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)}`
16356
16373
  });
@@ -16397,7 +16414,7 @@ Examples:
16397
16414
  if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
16398
16415
  throw new Error("--group-by must be kind or trigger_source.");
16399
16416
  }
16400
- const result = await new (0, _chunkETUV6RRKjs.DeeplineClient)().getPlaysActivity({
16417
+ const result = await new (0, _chunkAIRU4XTZjs.DeeplineClient)().getPlaysActivity({
16401
16418
  timeZone: options.timeZone,
16402
16419
  days,
16403
16420
  ...options.endDate ? { endDate: options.endDate } : {},
@@ -16411,7 +16428,7 @@ Examples:
16411
16428
  `${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
16412
16429
  );
16413
16430
  }
16414
- _chunkQSH5CHRIjs.printCommandEnvelope.call(void 0,
16431
+ _chunkISVKLCGQjs.printCommandEnvelope.call(void 0,
16415
16432
  { ...result },
16416
16433
  {
16417
16434
  json: Boolean(options.json),
@@ -16440,7 +16457,7 @@ Examples:
16440
16457
  false
16441
16458
  );
16442
16459
  });
16443
- _chunkZXFGA2VKjs.registerDeprecatedSearchCommand.call(void 0,
16460
+ _chunkBUHZUAEBjs.registerDeprecatedSearchCommand.call(void 0,
16444
16461
  play,
16445
16462
  (options) => options.all ? ["plays"] : ["prebuilts"]
16446
16463
  );
@@ -16481,9 +16498,9 @@ Examples:
16481
16498
  "--json [fields]",
16482
16499
  "JSON output; optionally select comma-separated dotted paths"
16483
16500
  );
16484
- _chunkA6ZTYKYFjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
16501
+ _chunkZMVJSS6Njs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
16485
16502
  async (target, options) => {
16486
- const ownView = () => handlePlayDescribe(_chunkQSH5CHRIjs.describeArgs.call(void 0, target, options));
16503
+ const ownView = () => handlePlayDescribe(_chunkISVKLCGQjs.describeArgs.call(void 0, target, options));
16487
16504
  const [flagText] = [options.json].filter(
16488
16505
  (value) => typeof value === "string"
16489
16506
  );
@@ -16494,7 +16511,7 @@ Examples:
16494
16511
  process.exitCode = await ownView();
16495
16512
  return;
16496
16513
  }
16497
- const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-GA7LSJRY.js")));
16514
+ const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-FG5JQWSB.js")));
16498
16515
  process.exitCode = await describeAnything(
16499
16516
  name,
16500
16517
  {
@@ -16612,7 +16629,7 @@ Examples:
16612
16629
  deepline plays deployments <deployment-id>
16613
16630
  `
16614
16631
  ).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output").action(
16615
- async (id, options) => id ? _chunkKHZ6WEVFjs.handleDeploymentGet.call(void 0, id, options) : _chunkKHZ6WEVFjs.handleDeploymentsList.call(void 0, options)
16632
+ async (id, options) => id ? _chunk4DAUDGO2js.handleDeploymentGet.call(void 0, id, options) : _chunk4DAUDGO2js.handleDeploymentsList.call(void 0, options)
16616
16633
  );
16617
16634
  addPublishHelp(
16618
16635
  play.command("publish <target>").description(
@@ -16791,7 +16808,7 @@ Examples:
16791
16808
  ).action(async (runId, options) => {
16792
16809
  process.exitCode = await handleRunGet([
16793
16810
  runId,
16794
- ..._chunkQSH5CHRIjs.jsonFieldArgs.call(void 0, options.json),
16811
+ ..._chunkISVKLCGQjs.jsonFieldArgs.call(void 0, options.json),
16795
16812
  ...options.full ? ["--full"] : [],
16796
16813
  ...options.input ? ["--input"] : [],
16797
16814
  ...options.config ? ["--config"] : [],
@@ -17066,7 +17083,7 @@ Examples:
17066
17083
  ...options.allowEmpty ? ["--allow-empty"] : [],
17067
17084
  ...options.wait ? ["--wait"] : [],
17068
17085
  ...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
17069
- ..._chunkQSH5CHRIjs.jsonFieldArgs.call(void 0, options.json)
17086
+ ..._chunkISVKLCGQjs.jsonFieldArgs.call(void 0, options.json)
17070
17087
  ]);
17071
17088
  });
17072
17089
  const share = play.command("share").description(
@@ -17232,10 +17249,10 @@ async function handlePlayShareStatus(args) {
17232
17249
  return 2;
17233
17250
  }
17234
17251
  const name = parseReferencedPlayTarget2(target).playName;
17235
- const status = await new (0, _chunkETUV6RRKjs.DeeplineClient)().getSharePage(name);
17252
+ const status = await new (0, _chunkAIRU4XTZjs.DeeplineClient)().getSharePage(name);
17236
17253
  const outputStatus = shareStatusForOutput(status);
17237
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
17238
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, outputStatus);
17254
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
17255
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, outputStatus);
17239
17256
  return 0;
17240
17257
  }
17241
17258
  if (!outputStatus.share) {
@@ -17274,7 +17291,7 @@ async function handlePlaySharePublish(args) {
17274
17291
  return 2;
17275
17292
  }
17276
17293
  const name = parseReferencedPlayTarget2(target).playName;
17277
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
17294
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
17278
17295
  let revisionId = shareFlagValue(args, "--revision-id");
17279
17296
  let resolvedVersion;
17280
17297
  if (!revisionId) {
@@ -17305,8 +17322,8 @@ async function handlePlaySharePublish(args) {
17305
17322
  );
17306
17323
  if (!hasCompleted) {
17307
17324
  const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
17308
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
17309
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, {
17325
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
17326
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, {
17310
17327
  ok: false,
17311
17328
  code: "NO_SUCCESSFUL_RUN",
17312
17329
  message,
@@ -17330,8 +17347,8 @@ async function handlePlaySharePublish(args) {
17330
17347
  };
17331
17348
  if (args.includes("--dry-run")) {
17332
17349
  const plan = { dryRun: true, name, version: resolvedVersion, ...request };
17333
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
17334
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, plan);
17350
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
17351
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, plan);
17335
17352
  } else {
17336
17353
  console.log(
17337
17354
  `Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
@@ -17341,8 +17358,8 @@ async function handlePlaySharePublish(args) {
17341
17358
  }
17342
17359
  const status = await client.publishSharePage(name, request);
17343
17360
  const outputStatus = shareStatusForOutput(status);
17344
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
17345
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, outputStatus);
17361
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
17362
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, outputStatus);
17346
17363
  return 0;
17347
17364
  }
17348
17365
  const urls = shareUrlFields(outputStatus);
@@ -17373,9 +17390,9 @@ async function handlePlayShareUpdate(args) {
17373
17390
  ...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
17374
17391
  ...seoIndexing ? { seoIndexing } : {}
17375
17392
  };
17376
- const status = await new (0, _chunkETUV6RRKjs.DeeplineClient)().updateSharePage(name, request);
17377
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
17378
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, status);
17393
+ const status = await new (0, _chunkAIRU4XTZjs.DeeplineClient)().updateSharePage(name, request);
17394
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
17395
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, status);
17379
17396
  return 0;
17380
17397
  }
17381
17398
  console.log(`Updated ${name} share settings.`);
@@ -17390,7 +17407,7 @@ async function handlePlayShareRegenerate(args) {
17390
17407
  return 2;
17391
17408
  }
17392
17409
  const name = parseReferencedPlayTarget2(target).playName;
17393
- const client = new (0, _chunkETUV6RRKjs.DeeplineClient)();
17410
+ const client = new (0, _chunkAIRU4XTZjs.DeeplineClient)();
17394
17411
  let revisionId = shareFlagValue(args, "--revision-id");
17395
17412
  const versionFlag = shareFlagValue(args, "--version");
17396
17413
  if (!revisionId && versionFlag) {
@@ -17407,8 +17424,8 @@ async function handlePlayShareRegenerate(args) {
17407
17424
  revisionId ? { revisionId } : {}
17408
17425
  );
17409
17426
  const outputStatus = shareStatusForOutput(status);
17410
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
17411
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, outputStatus);
17427
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
17428
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, outputStatus);
17412
17429
  return 0;
17413
17430
  }
17414
17431
  const urls = shareUrlFields(outputStatus);
@@ -17433,9 +17450,9 @@ async function handlePlayShareUnpublish(args) {
17433
17450
  return 2;
17434
17451
  }
17435
17452
  const name = parseReferencedPlayTarget2(target).playName;
17436
- const status = await new (0, _chunkETUV6RRKjs.DeeplineClient)().unpublishSharePage(name);
17437
- if (_chunkQSH5CHRIjs.argsWantJson.call(void 0, args)) {
17438
- _chunkQSH5CHRIjs.printCompactJson.call(void 0, status);
17453
+ const status = await new (0, _chunkAIRU4XTZjs.DeeplineClient)().unpublishSharePage(name);
17454
+ if (_chunkISVKLCGQjs.argsWantJson.call(void 0, args)) {
17455
+ _chunkISVKLCGQjs.printCompactJson.call(void 0, status);
17439
17456
  return 0;
17440
17457
  }
17441
17458
  console.log(`Unpublished ${name}; the public page has been removed.`);