deepline 0.3.406 → 0.3.408

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 (130) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +56 -57
  2. package/dist/bundling-sources/sdk/src/play.ts +21 -5
  3. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  4. package/dist/bundling-sources/sdk/src/types.ts +27 -3
  5. package/dist/bundling-sources/shared_libs/play-runtime/admission-timings.ts +64 -0
  6. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +11 -1
  7. package/dist/bundling-sources/shared_libs/play-runtime/modal-runtime-config.ts +1 -4
  8. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/gateway-adapter.ts +4 -0
  9. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +2 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/local-process.ts +15 -6
  11. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +1 -0
  12. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +275 -73
  13. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +22 -4
  14. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +10 -4
  15. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +72 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/webhook-receipt-source-commit-retry.ts +90 -0
  17. package/dist/bundling-sources/shared_libs/play-runtime/worker-api-types.ts +5 -0
  18. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +6 -1
  19. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +6 -0
  20. package/dist/cli/auth-3GB2K636.js +40 -0
  21. package/dist/cli/{auth-U7LIMXIS.mjs → auth-UVD3CUBB.mjs} +4 -4
  22. package/dist/cli/{billing-KGGS3444.mjs → billing-BZVTXXLM.mjs} +23 -16
  23. package/dist/cli/{billing-5ABVIJFU.js → billing-BZVYAF6T.js} +92 -85
  24. package/dist/cli/{chunk-KPU53YBB.js → chunk-2XXXFPTD.js} +67 -67
  25. package/dist/cli/{chunk-FQBKK5DG.js → chunk-3ZB6IIA7.js} +26 -26
  26. package/dist/cli/{chunk-5IGBBYXH.mjs → chunk-4CFULMRB.mjs} +73 -4
  27. package/dist/cli/{chunk-OPHLT4TM.mjs → chunk-4QFT5LGV.mjs} +2 -2
  28. package/dist/cli/{chunk-W2BAO4OR.js → chunk-4RNDKFNQ.js} +2 -2
  29. package/dist/cli/{chunk-GAMFK2ZP.mjs → chunk-67RWR34T.mjs} +10 -3
  30. package/dist/cli/{chunk-APLRSERF.js → chunk-AUMD2VXP.js} +60 -63
  31. package/dist/cli/{chunk-N6DJQQ2S.js → chunk-BRJUESQV.js} +50 -50
  32. package/dist/cli/{chunk-W3ZNQE5Y.js → chunk-D6FFBSM5.js} +1 -1
  33. package/dist/cli/{chunk-AYHLUHE5.js → chunk-E3PJF6YP.js} +6 -2
  34. package/dist/cli/{chunk-IE6IKRQA.js → chunk-ECVLPS67.js} +15 -15
  35. package/dist/cli/{chunk-QJBJZVG6.js → chunk-HQY2SG3K.js} +15 -8
  36. package/dist/cli/{chunk-2OFPPAUY.mjs → chunk-I3DHIXVJ.mjs} +4 -4
  37. package/dist/cli/{chunk-RXDJKAM2.mjs → chunk-IOHRWLQE.mjs} +6 -6
  38. package/dist/cli/{chunk-2MLY2ZBT.mjs → chunk-IWBXJDZA.mjs} +2 -2
  39. package/dist/cli/{chunk-URWF7NGQ.js → chunk-J5PTX66Y.js} +28 -14
  40. package/dist/cli/{chunk-7ZMVAV2B.mjs → chunk-LOYISF7S.mjs} +55 -58
  41. package/dist/cli/{chunk-T7YF4MQH.mjs → chunk-MJELBQBU.mjs} +4 -4
  42. package/dist/cli/{chunk-WJYPBHTE.js → chunk-OSFWFV72.js} +11 -4
  43. package/dist/cli/{chunk-ZI2ZNDJK.mjs → chunk-PYZZMAJQ.mjs} +28 -14
  44. package/dist/cli/{chunk-N43PX2CA.js → chunk-Q3LFI3VH.js} +8 -8
  45. package/dist/cli/{chunk-NYDRX6JJ.js → chunk-Q3PUHXOY.js} +99 -30
  46. package/dist/cli/{chunk-YSAZVLJD.js → chunk-QUAQX3FQ.js} +4 -4
  47. package/dist/cli/{chunk-4REBZQNK.js → chunk-RWCY6YI2.js} +53 -53
  48. package/dist/cli/{chunk-CGX4NSS3.mjs → chunk-SD7MXAJA.mjs} +1 -1
  49. package/dist/cli/{chunk-UFS752TU.mjs → chunk-SJVVBWRL.mjs} +5 -1
  50. package/dist/cli/{chunk-V3OTRWVK.mjs → chunk-URACNNLO.mjs} +2 -2
  51. package/dist/cli/{chunk-WXLOW623.mjs → chunk-WPAB4DCU.mjs} +14 -7
  52. package/dist/cli/{chunk-42RUJLQI.mjs → chunk-WTT6CLED.mjs} +1 -1
  53. package/dist/cli/{chunk-YLV6PT6B.mjs → chunk-XXLXOUUU.mjs} +1 -1
  54. package/dist/cli/{chunk-77UGRG6X.mjs → chunk-YMOFWHGO.mjs} +3 -3
  55. package/dist/cli/{chunk-EKS2FXL5.js → chunk-ZBABPK6Y.js} +8 -8
  56. package/dist/cli/command-docs.js +2 -2
  57. package/dist/cli/command-docs.mjs +1 -1
  58. package/dist/cli/{csv-HXJAAW3H.mjs → csv-WPSXG6ZZ.mjs} +3 -3
  59. package/dist/cli/{csv-U36TIOKU.js → csv-XLGLHJ6P.js} +12 -12
  60. package/dist/cli/{db-T5MLQQWJ.js → db-5PTNJG4X.js} +25 -25
  61. package/dist/cli/{db-GRWD3JAC.mjs → db-ABS57ABJ.mjs} +4 -4
  62. package/dist/cli/{describe-NFX6THJE.js → describe-EZS6PQXA.js} +11 -11
  63. package/dist/cli/{describe-HXFEIZFO.mjs → describe-PVWQJ2PB.mjs} +7 -7
  64. package/dist/cli/describe-core.d.mts +2 -2
  65. package/dist/cli/describe-core.d.ts +2 -2
  66. package/dist/cli/{executions-KBHTDL3A.js → executions-FNTAFQ7Y.js} +6 -6
  67. package/dist/cli/{executions-YGOS5E44.mjs → executions-OKJGATQZ.mjs} +4 -4
  68. package/dist/cli/{feedback-VP3GWJIH.js → feedback-6YBOMSUA.js} +7 -7
  69. package/dist/cli/{feedback-NEQGCSHB.mjs → feedback-W27HDMRR.mjs} +3 -3
  70. package/dist/cli/git-YKUXXJOR.js +24 -0
  71. package/dist/cli/{git-JJ3CHOTL.mjs → git-YOOUEL6M.mjs} +4 -4
  72. package/dist/cli/index.js +204 -127
  73. package/dist/cli/index.mjs +124 -47
  74. package/dist/cli/{legacy-noops-ITTD33ZN.js → legacy-noops-2VZ7XT6C.js} +7 -7
  75. package/dist/cli/{legacy-noops-A6KGBODU.mjs → legacy-noops-V6OKW7VR.mjs} +4 -4
  76. package/dist/cli/{monitors-DXVP5YFC.js → monitors-FBWGVIUS.js} +84 -84
  77. package/dist/cli/{monitors-NGEXCUEY.mjs → monitors-P2YYWTWT.mjs} +4 -4
  78. package/dist/cli/{org-C4ZTOSQC.js → org-3XUSVX5T.js} +64 -64
  79. package/dist/cli/{org-34DBJSFP.mjs → org-DVMG6H3C.mjs} +4 -4
  80. package/dist/cli/{play-SVLQKZBG.mjs → play-GNC5CQAS.mjs} +70 -18
  81. package/dist/cli/{play-5FWTZCHN.js → play-YG5L4BWQ.js} +345 -293
  82. package/dist/cli/{providers-QWR2HRNY.js → providers-7PSWG2OV.js} +7 -7
  83. package/dist/cli/{providers-RQTSGYE4.mjs → providers-JR33SLWL.mjs} +4 -4
  84. package/dist/cli/{quickstart-DHFNEMGY.js → quickstart-FDVZ5BL3.js} +5 -5
  85. package/dist/cli/{quickstart-W5UHZAEU.mjs → quickstart-VUOBQYIQ.mjs} +3 -3
  86. package/dist/cli/{search-U4AJC3FH.mjs → search-JZYLO33K.mjs} +5 -5
  87. package/dist/cli/search-PPPYC5OZ.js +30 -0
  88. package/dist/cli/{secrets-YSMQ7CVZ.mjs → secrets-3MCYBT4I.mjs} +4 -4
  89. package/dist/cli/{secrets-HH4H7BLE.js → secrets-VS266FVA.js} +13 -13
  90. package/dist/cli/{sessions-URONRCTV.mjs → sessions-ELLLT23E.mjs} +4 -4
  91. package/dist/cli/{sessions-AJZXYUCJ.js → sessions-TEHEWW7O.js} +5 -5
  92. package/dist/cli/{settings-QAW62BH4.js → settings-7364NMMA.js} +75 -75
  93. package/dist/cli/{settings-KGAMW4MN.mjs → settings-PZCKAFII.mjs} +8 -8
  94. package/dist/cli/{setup-P54DPBFO.mjs → setup-A7GQ4KIA.mjs} +7 -7
  95. package/dist/cli/{setup-KAMFU5VE.js → setup-PMWYLCT6.js} +42 -42
  96. package/dist/cli/skills-SYS7VRRK.js +29 -0
  97. package/dist/cli/{skills-UMWRJ6TL.mjs → skills-WS6BIFPQ.mjs} +5 -5
  98. package/dist/cli/{tools-HN4EFVY7.mjs → tools-BR4DOZA2.mjs} +7 -7
  99. package/dist/cli/{tools-HX3BHT55.js → tools-KK4BKVQR.js} +8 -8
  100. package/dist/cli/update-2IV5JTX2.js +29 -0
  101. package/dist/cli/{update-7AFQCJ75.mjs → update-D2B7UNFT.mjs} +7 -7
  102. package/dist/cli/{workflow-7EHU5ZPX.js → workflow-6ODTCYXU.js} +15 -15
  103. package/dist/cli/{workflow-ARDO4VHU.mjs → workflow-PQXC2R47.mjs} +5 -5
  104. package/dist/{client-Db1jFLpF.d.ts → client-BcvhDfJJ.d.ts} +80 -58
  105. package/dist/{client-Buv1_ktG.d.mts → client-Z9Pye1Wm.d.mts} +80 -58
  106. package/dist/{compiler-manifest-N77W75Py.d.ts → compiler-manifest-Ycx-hoAr.d.mts} +8 -1
  107. package/dist/{compiler-manifest-N77W75Py.d.mts → compiler-manifest-Ycx-hoAr.d.ts} +8 -1
  108. package/dist/{index-3WOfyVhW.d.mts → index-CZXgiN3E.d.mts} +1 -1
  109. package/dist/{index-CtIJFTCl.d.ts → index-NPG5pqxQ.d.ts} +1 -1
  110. package/dist/index.d.mts +13 -10
  111. package/dist/index.d.ts +13 -10
  112. package/dist/index.js +28 -11
  113. package/dist/index.mjs +25 -8
  114. package/dist/install-integrity.json +86 -84
  115. package/dist/plays/bundle-play-file.d.mts +3 -3
  116. package/dist/plays/bundle-play-file.d.ts +3 -3
  117. package/dist/plays/play-description.d.mts +2 -2
  118. package/dist/plays/play-description.d.ts +2 -2
  119. package/dist/plays/run-request.d.mts +2 -2
  120. package/dist/plays/run-request.d.ts +2 -2
  121. package/dist/release.d.mts +1 -1
  122. package/dist/release.d.ts +1 -1
  123. package/dist/release.js +2 -2
  124. package/dist/release.mjs +1 -1
  125. package/package.json +1 -1
  126. package/dist/cli/auth-K5QAZH42.js +0 -40
  127. package/dist/cli/git-63RYCZSI.js +0 -24
  128. package/dist/cli/search-YAYYU3WD.js +0 -30
  129. package/dist/cli/skills-M2GGHYJU.js +0 -29
  130. package/dist/cli/update-I23NN5QI.js +0 -29
@@ -4,11 +4,11 @@
4
4
  var _chunkZAAKSJASjs = require('./chunk-ZAAKSJAS.js');
5
5
 
6
6
 
7
- var _chunkN43PX2CAjs = require('./chunk-N43PX2CA.js');
7
+ var _chunkQ3LFI3VHjs = require('./chunk-Q3LFI3VH.js');
8
8
 
9
9
 
10
10
 
11
- var _chunkFQBKK5DGjs = require('./chunk-FQBKK5DG.js');
11
+ var _chunk3ZB6IIA7js = require('./chunk-3ZB6IIA7.js');
12
12
 
13
13
 
14
14
  var _chunkBQR6UN3Cjs = require('./chunk-BQR6UN3C.js');
@@ -45,7 +45,7 @@ require('./chunk-Z4VNJOF7.js');
45
45
 
46
46
 
47
47
 
48
- var _chunkAPLRSERFjs = require('./chunk-APLRSERF.js');
48
+ var _chunkAUMD2VXPjs = require('./chunk-AUMD2VXP.js');
49
49
  require('./chunk-S6R3OX7B.js');
50
50
 
51
51
 
@@ -65,11 +65,11 @@ require('./chunk-XDVT3GOM.js');
65
65
 
66
66
 
67
67
 
68
- var _chunkAYHLUHE5js = require('./chunk-AYHLUHE5.js');
68
+ var _chunkE3PJF6YPjs = require('./chunk-E3PJF6YP.js');
69
69
 
70
70
 
71
71
 
72
- var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
72
+ var _chunkOSFWFV72js = require('./chunk-OSFWFV72.js');
73
73
 
74
74
 
75
75
 
@@ -84,16 +84,16 @@ var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
84
84
 
85
85
 
86
86
 
87
- var _chunkNYDRX6JJjs = require('./chunk-NYDRX6JJ.js');
87
+ var _chunkQ3PUHXOYjs = require('./chunk-Q3PUHXOY.js');
88
88
 
89
89
 
90
- var _chunkYSAZVLJDjs = require('./chunk-YSAZVLJD.js');
90
+ var _chunkQUAQX3FQjs = require('./chunk-QUAQX3FQ.js');
91
91
  require('./chunk-Q2E4E4FJ.js');
92
92
  require('./chunk-XNYIZMNQ.js');
93
93
 
94
94
 
95
95
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
96
- require('./chunk-W3ZNQE5Y.js');
96
+ require('./chunk-D6FFBSM5.js');
97
97
  require('./chunk-OG64RBAC.js');
98
98
 
99
99
 
@@ -2075,7 +2075,7 @@ function resolveField(key, command) {
2075
2075
  function printSettings(result, json, name) {
2076
2076
  result = { ...result, settings: parsePlaySettings(result.settings) };
2077
2077
  const selected = fields.filter(([key]) => !name || key === name);
2078
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
2078
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
2079
2079
  {
2080
2080
  ...result,
2081
2081
  settings: Object.fromEntries(
@@ -2119,7 +2119,7 @@ function registerPlaySettingsCommands(plays) {
2119
2119
  valueSyntax: field.cli.valueSyntax,
2120
2120
  examples: field.cli.examples
2121
2121
  }));
2122
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
2122
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
2123
2123
  {
2124
2124
  fields: descriptions,
2125
2125
  render: {
@@ -2144,7 +2144,7 @@ function registerPlaySettingsCommands(plays) {
2144
2144
  async (options, command) => {
2145
2145
  if (options.name !== void 0) resolveField(options.name, command);
2146
2146
  printSettings(
2147
- await new (0, _chunkAPLRSERFjs.DeeplineClient)().getPlaySettings(options.play),
2147
+ await new (0, _chunkAUMD2VXPjs.DeeplineClient)().getPlaySettings(options.play),
2148
2148
  options.json,
2149
2149
  options.name
2150
2150
  );
@@ -2175,7 +2175,7 @@ function registerPlaySettingsCommands(plays) {
2175
2175
  );
2176
2176
  }
2177
2177
  if (options.dryRun) {
2178
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
2178
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
2179
2179
  {
2180
2180
  dryRun: true,
2181
2181
  play,
@@ -2196,7 +2196,7 @@ function registerPlaySettingsCommands(plays) {
2196
2196
  return;
2197
2197
  }
2198
2198
  printSettings(
2199
- await new (0, _chunkAPLRSERFjs.DeeplineClient)().updatePlaySettings(play, patch),
2199
+ await new (0, _chunkAUMD2VXPjs.DeeplineClient)().updatePlaySettings(play, patch),
2200
2200
  options.json
2201
2201
  );
2202
2202
  };
@@ -2222,13 +2222,13 @@ function registerPlaySettingsCommands(plays) {
2222
2222
  "--root must be person or team; --limit must be 1\u2013100.",
2223
2223
  { exitCode: 2 }
2224
2224
  );
2225
- const page = await new (0, _chunkAPLRSERFjs.DeeplineClient)().listPlaySettingsPaths({
2225
+ const page = await new (0, _chunkAUMD2VXPjs.DeeplineClient)().listPlaySettingsPaths({
2226
2226
  root: options.root,
2227
2227
  limit,
2228
2228
  cursor: options.cursor
2229
2229
  });
2230
2230
  const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""}` : null;
2231
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
2231
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
2232
2232
  {
2233
2233
  ...page,
2234
2234
  nextCommand,
@@ -2279,7 +2279,7 @@ function registerPlaySettingsCommands(plays) {
2279
2279
  root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.root]), () => ( "person")),
2280
2280
  folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _14 => _14.folders]), () => ( []))
2281
2281
  };
2282
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
2282
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
2283
2283
  const paths = [];
2284
2284
  let cursor;
2285
2285
  do {
@@ -2341,7 +2341,7 @@ function registerPlaySettingsCommands(plays) {
2341
2341
  moved.push(move.playName);
2342
2342
  }
2343
2343
  }
2344
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
2344
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
2345
2345
  {
2346
2346
  dryRun: Boolean(options.dryRun),
2347
2347
  from: options.from,
@@ -2469,7 +2469,7 @@ function triggerLines(view) {
2469
2469
  return lines;
2470
2470
  }
2471
2471
  function printView(view, json) {
2472
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
2472
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
2473
2473
  {
2474
2474
  ...view,
2475
2475
  render: {
@@ -2482,7 +2482,7 @@ function printView(view, json) {
2482
2482
  );
2483
2483
  }
2484
2484
  function printResult(result, json) {
2485
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
2485
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
2486
2486
  {
2487
2487
  ...result,
2488
2488
  render: {
@@ -2512,7 +2512,7 @@ async function mutate(command, options, build) {
2512
2512
  usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
2513
2513
  }
2514
2514
  if (options.dryRun) {
2515
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
2515
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
2516
2516
  {
2517
2517
  dryRun: true,
2518
2518
  play: options.play,
@@ -2531,7 +2531,7 @@ async function mutate(command, options, build) {
2531
2531
  return;
2532
2532
  }
2533
2533
  printResult(
2534
- await new (0, _chunkAPLRSERFjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
2534
+ await new (0, _chunkAUMD2VXPjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
2535
2535
  options.json
2536
2536
  );
2537
2537
  }
@@ -2564,7 +2564,7 @@ function registerPlayTriggerConfigCommands(plays) {
2564
2564
  }).addHelpText("after", help2);
2565
2565
  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) => {
2566
2566
  printView(
2567
- await new (0, _chunkAPLRSERFjs.DeeplineClient)().getPlayTriggerConfig(options.play),
2567
+ await new (0, _chunkAUMD2VXPjs.DeeplineClient)().getPlayTriggerConfig(options.play),
2568
2568
  options.json
2569
2569
  );
2570
2570
  });
@@ -2608,7 +2608,7 @@ function registerPlayTriggerConfigCommands(plays) {
2608
2608
  if (options.auth === void 0) {
2609
2609
  if (secrets.length || options.header || options.signaturePrefix)
2610
2610
  usage(setWebhook, "--secret/--header need --auth.");
2611
- const current = await new (0, _chunkAPLRSERFjs.DeeplineClient)().getPlayTriggerConfig(
2611
+ const current = await new (0, _chunkAUMD2VXPjs.DeeplineClient)().getPlayTriggerConfig(
2612
2612
  options.play
2613
2613
  );
2614
2614
  return {
@@ -2685,7 +2685,7 @@ var KIND_DESCRIPTIONS = {
2685
2685
  "receipt.skipped": "Saved work result: skipped.",
2686
2686
  "runtime.event": "Other event."
2687
2687
  };
2688
- var RUN_LOGS_KIND_HELP = _chunkAPLRSERFjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
2688
+ var RUN_LOGS_KIND_HELP = _chunkAUMD2VXPjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
2689
2689
  kind,
2690
2690
  description: KIND_DESCRIPTIONS[kind]
2691
2691
  }));
@@ -2822,9 +2822,9 @@ function configureRunQueryCommandErrors(command, resource) {
2822
2822
  const args = program.args;
2823
2823
  if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
2824
2824
  error.exitCode = 2;
2825
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
2826
- _chunkNYDRX6JJjs.printJsonError.call(void 0,
2827
- Object.assign(new (0, _chunkAPLRSERFjs.RunEventQueryInputError)(error.message), {
2825
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
2826
+ _chunkQ3PUHXOYjs.printJsonError.call(void 0,
2827
+ Object.assign(new (0, _chunkAUMD2VXPjs.RunEventQueryInputError)(error.message), {
2828
2828
  exitCode: 2,
2829
2829
  retryable: false
2830
2830
  })
@@ -2868,14 +2868,14 @@ function parseQuery(args, resource) {
2868
2868
  if (VALUE_FLAGS.has(flag)) {
2869
2869
  const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
2870
2870
  if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
2871
- throw new (0, _chunkAPLRSERFjs.RunEventQueryInputError)(
2871
+ throw new (0, _chunkAUMD2VXPjs.RunEventQueryInputError)(
2872
2872
  `${flag} requires a value. Use ${flag} <value>.`
2873
2873
  );
2874
2874
  }
2875
2875
  if (flag === "--sum") sums.push(value);
2876
2876
  else {
2877
2877
  if (values[flag] !== void 0) {
2878
- throw new (0, _chunkAPLRSERFjs.RunEventQueryInputError)(
2878
+ throw new (0, _chunkAUMD2VXPjs.RunEventQueryInputError)(
2879
2879
  `${flag} may only be supplied once.`
2880
2880
  );
2881
2881
  }
@@ -2889,12 +2889,12 @@ function parseQuery(args, resource) {
2889
2889
  }
2890
2890
  if (arg.startsWith("-")) {
2891
2891
  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.";
2892
- throw new (0, _chunkAPLRSERFjs.RunEventQueryInputError)(
2892
+ throw new (0, _chunkAUMD2VXPjs.RunEventQueryInputError)(
2893
2893
  `Unsupported query flag ${flag}. ${correction}`
2894
2894
  );
2895
2895
  }
2896
2896
  if (runId !== void 0) {
2897
- throw new (0, _chunkAPLRSERFjs.RunEventQueryInputError)(
2897
+ throw new (0, _chunkAUMD2VXPjs.RunEventQueryInputError)(
2898
2898
  `Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
2899
2899
  );
2900
2900
  }
@@ -2902,7 +2902,7 @@ function parseQuery(args, resource) {
2902
2902
  }
2903
2903
  if (switches.has("--fields")) {
2904
2904
  if (runId !== void 0) {
2905
- throw new (0, _chunkAPLRSERFjs.RunEventQueryInputError)(
2905
+ throw new (0, _chunkAUMD2VXPjs.RunEventQueryInputError)(
2906
2906
  "--fields does not use a run ID. Omit the positional run ID."
2907
2907
  );
2908
2908
  }
@@ -2915,18 +2915,18 @@ function parseQuery(args, resource) {
2915
2915
  )
2916
2916
  ];
2917
2917
  if (incompatible.length) {
2918
- throw new (0, _chunkAPLRSERFjs.RunEventQueryInputError)(
2918
+ throw new (0, _chunkAUMD2VXPjs.RunEventQueryInputError)(
2919
2919
  `--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
2920
2920
  );
2921
2921
  }
2922
2922
  }
2923
2923
  if (switches.has("--count") && values["--group-by"] !== void 0) {
2924
- throw new (0, _chunkAPLRSERFjs.RunEventQueryInputError)(
2924
+ throw new (0, _chunkAUMD2VXPjs.RunEventQueryInputError)(
2925
2925
  "--count cannot be combined with --group-by. Use --group-by for counts per group."
2926
2926
  );
2927
2927
  }
2928
2928
  if (sums.length && switches.has("--count")) {
2929
- throw new (0, _chunkAPLRSERFjs.RunEventQueryInputError)(
2929
+ throw new (0, _chunkAUMD2VXPjs.RunEventQueryInputError)(
2930
2930
  "--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
2931
2931
  );
2932
2932
  }
@@ -2934,7 +2934,7 @@ function parseQuery(args, resource) {
2934
2934
  if (operation === "count") {
2935
2935
  for (const flag of ["--limit", "--cursor", "--payloads"]) {
2936
2936
  if (values[flag] !== void 0 || switches.has(flag)) {
2937
- throw new (0, _chunkAPLRSERFjs.RunEventQueryInputError)(
2937
+ throw new (0, _chunkAUMD2VXPjs.RunEventQueryInputError)(
2938
2938
  `--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
2939
2939
  );
2940
2940
  }
@@ -2969,16 +2969,16 @@ function parseQuery(args, resource) {
2969
2969
  ];
2970
2970
  }
2971
2971
  }
2972
- const request = _chunkAPLRSERFjs.normalizeRunEventOperationRequest.call(void 0, body);
2972
+ const request = _chunkAUMD2VXPjs.normalizeRunEventOperationRequest.call(void 0, body);
2973
2973
  const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
2974
2974
  const backend = values["--runtime-backend"];
2975
2975
  if (backend && backend !== "daytona" && backend !== "modal") {
2976
- throw new (0, _chunkAPLRSERFjs.RunEventQueryInputError)(
2976
+ throw new (0, _chunkAUMD2VXPjs.RunEventQueryInputError)(
2977
2977
  "--runtime-backend must be daytona or modal."
2978
2978
  );
2979
2979
  }
2980
2980
  if (backend && !namespace) {
2981
- throw new (0, _chunkAPLRSERFjs.RunEventQueryInputError)(
2981
+ throw new (0, _chunkAUMD2VXPjs.RunEventQueryInputError)(
2982
2982
  "--runtime-backend requires --runtime-namespace."
2983
2983
  );
2984
2984
  }
@@ -3025,12 +3025,12 @@ async function handleRunEventQuery(args, resource = "logs") {
3025
3025
  const failure = error instanceof Error ? error : new Error(String(error));
3026
3026
  const record3 = failure;
3027
3027
  const status = record3.statusCode;
3028
- const exitCode = error instanceof _chunkAPLRSERFjs.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;
3028
+ const exitCode = error instanceof _chunkAUMD2VXPjs.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;
3029
3029
  const diagnostic = Object.assign(failure, {
3030
3030
  exitCode,
3031
3031
  retryable: exitCode === 5
3032
3032
  });
3033
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) _chunkNYDRX6JJjs.printJsonError.call(void 0, diagnostic);
3033
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) _chunkQ3PUHXOYjs.printJsonError.call(void 0, diagnostic);
3034
3034
  else console.error(`Error: ${diagnostic.message}`);
3035
3035
  return exitCode;
3036
3036
  }
@@ -3045,7 +3045,7 @@ async function executeRunEventQuery(args, resource) {
3045
3045
  ...criteria
3046
3046
  } = request;
3047
3047
  const options = { ...criteria, ...runtime ? { runtime } : {} };
3048
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
3048
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
3049
3049
  let result;
3050
3050
  if (request.operation === "fields") {
3051
3051
  result = await client.runs[resource].fields(runtime ? { runtime } : {});
@@ -3111,13 +3111,13 @@ async function executeRunEventQuery(args, resource) {
3111
3111
  lines.push(`Next page: ${nextPage}`);
3112
3112
  }
3113
3113
  }
3114
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
3114
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
3115
3115
  {
3116
3116
  ...result,
3117
3117
  ...nextPage ? { next: { page: nextPage } } : {},
3118
3118
  render: { sections: [{ title: `run ${resource}`, lines }] }
3119
3119
  },
3120
- { json: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
3120
+ { json: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
3121
3121
  ` }
3122
3122
  );
3123
3123
  return 0;
@@ -4035,7 +4035,7 @@ Existing credential redactions and referenced-list previews remain as stored.
4035
4035
  ...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
4036
4036
  );
4037
4037
  }
4038
- const response = await new (0, _chunkAPLRSERFjs.DeeplineClient)().runs.getReceipts(runId, {
4038
+ const response = await new (0, _chunkAUMD2VXPjs.DeeplineClient)().runs.getReceipts(runId, {
4039
4039
  keys
4040
4040
  });
4041
4041
  const failed = response.receipts.filter(
@@ -4047,7 +4047,7 @@ Existing credential redactions and referenced-list previews remain as stored.
4047
4047
  JSON.stringify(response, null, 2) + "\n",
4048
4048
  { flag: "wx", mode: 384 }
4049
4049
  );
4050
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
4050
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
4051
4051
  {
4052
4052
  runId,
4053
4053
  out: options.out,
@@ -4057,7 +4057,7 @@ Existing credential redactions and referenced-list previews remain as stored.
4057
4057
  { json: true }
4058
4058
  );
4059
4059
  } else {
4060
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
4060
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
4061
4061
  }
4062
4062
  if (failed)
4063
4063
  process.exitCode = response.receipts.some(
@@ -4096,7 +4096,7 @@ includes nextCommand when another page is available.
4096
4096
  { exitCode: 2 }
4097
4097
  );
4098
4098
  }
4099
- const page = await new (0, _chunkAPLRSERFjs.DeeplineClient)().runs.children(parentRunId, {
4099
+ const page = await new (0, _chunkAUMD2VXPjs.DeeplineClient)().runs.children(parentRunId, {
4100
4100
  launchKey: options.launchKey,
4101
4101
  ...options.cursor !== void 0 ? { cursor: options.cursor } : {},
4102
4102
  limit
@@ -4111,7 +4111,7 @@ includes nextCommand when another page is available.
4111
4111
  "--limit",
4112
4112
  String(limit)
4113
4113
  ].join(" ") : null;
4114
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
4114
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
4115
4115
  {
4116
4116
  parentRunId,
4117
4117
  launchKey: options.launchKey,
@@ -4147,7 +4147,7 @@ async function handleRunsHistory(options) {
4147
4147
  throw new Error("--limit must be a positive integer.");
4148
4148
  }
4149
4149
  }
4150
- const page = await new (0, _chunkAPLRSERFjs.DeeplineClient)().runs.history({
4150
+ const page = await new (0, _chunkAUMD2VXPjs.DeeplineClient)().runs.history({
4151
4151
  cursor: options.cursor,
4152
4152
  orgId: options.org,
4153
4153
  search: options.search,
@@ -4163,7 +4163,7 @@ async function handleRunsHistory(options) {
4163
4163
  );
4164
4164
  }
4165
4165
  if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
4166
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
4166
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
4167
4167
  { ...page, render: { sections: [{ title: "Run history", lines }] } },
4168
4168
  options.json ? { json: true } : {}
4169
4169
  );
@@ -4215,12 +4215,12 @@ async function runRunsRerunCommand(runId, options) {
4215
4215
  return 1;
4216
4216
  }
4217
4217
  }
4218
- const result = await new (0, _chunkAPLRSERFjs.DeeplineClient)().runs.rerun(runId, {
4218
+ const result = await new (0, _chunkAUMD2VXPjs.DeeplineClient)().runs.rerun(runId, {
4219
4219
  ...idempotencyKey === void 0 ? {} : { idempotencyKey },
4220
4220
  ...inputOverrides === void 0 ? {} : { inputOverrides }
4221
4221
  });
4222
- if (_chunkNYDRX6JJjs.shouldEmitJson.call(void 0, options.json)) {
4223
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0, result, { json: true });
4222
+ if (_chunkQ3PUHXOYjs.shouldEmitJson.call(void 0, options.json)) {
4223
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0, result, { json: true });
4224
4224
  } else {
4225
4225
  console.log(
4226
4226
  result.deduplicated === true ? `
@@ -4488,7 +4488,7 @@ function projectRunDatasetCell(value) {
4488
4488
  const logicalValue = parseSerializedDatasetValue(value);
4489
4489
  if (logicalValue === null || logicalValue === void 0) return logicalValue;
4490
4490
  if (typeof logicalValue === "object") {
4491
- return _chunkNYDRX6JJjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
4491
+ return _chunkQ3PUHXOYjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
4492
4492
  }
4493
4493
  return logicalValue;
4494
4494
  }
@@ -5543,6 +5543,11 @@ var DAYTONA_COMPUTE_PRICING_USD = {
5543
5543
  storageGiBSecond: 3e-8,
5544
5544
  includedStorageGiB: 5
5545
5545
  };
5546
+ var MODAL_SANDBOX_COMPUTE_PRICING_USD = {
5547
+ physicalCoreSecond: 3942e-8,
5548
+ memoryGiBSecond: 667e-8
5549
+ };
5550
+ var MODAL_SANDBOX_CPU_CORES = 0.5;
5546
5551
  function roundUsd(amount) {
5547
5552
  return Number(Math.max(0, amount).toFixed(12));
5548
5553
  }
@@ -5574,6 +5579,28 @@ function resolveDaytonaSandboxComputeItem(input) {
5574
5579
  }
5575
5580
  };
5576
5581
  }
5582
+ function resolveModalSandboxComputeItem(input) {
5583
+ const billableSeconds = Math.max(1, Math.ceil(input.wallTimeSeconds));
5584
+ const physicalCpuCores = Math.max(0, input.physicalCpuCores);
5585
+ const memoryGiB = Math.max(0, input.memoryGiB);
5586
+ const providerCostUsd = roundUsd(
5587
+ billableSeconds * (physicalCpuCores * MODAL_SANDBOX_COMPUTE_PRICING_USD.physicalCoreSecond + memoryGiB * MODAL_SANDBOX_COMPUTE_PRICING_USD.memoryGiBSecond)
5588
+ );
5589
+ return {
5590
+ itemId: input.itemId,
5591
+ source: "modal",
5592
+ unit: "sandbox_second",
5593
+ units: billableSeconds,
5594
+ providerCostUsd,
5595
+ metadata: {
5596
+ sandboxId: _nullishCoalesce(input.sandboxId, () => ( null)),
5597
+ physicalCpuCores,
5598
+ memoryGiB,
5599
+ startedAt: input.startedAt,
5600
+ endedAt: input.endedAt
5601
+ }
5602
+ };
5603
+ }
5577
5604
 
5578
5605
  // ../play-runtime/runtime-constants.ts
5579
5606
  var STANDARD_PLAY_RUNTIME_LIMIT_SECONDS = 30 * 60;
@@ -5605,12 +5632,29 @@ function estimateDaytonaMaximumComputeCredits(limits) {
5605
5632
  item.providerCostUsd * COMPUTE_BILLING_MARKUP_MULTIPLIER * DEFAULT_PROVIDER_MARKUP_MULTIPLIER / DEFAULT_USD_PER_CUSTOMER_CREDIT
5606
5633
  );
5607
5634
  }
5635
+ function estimateModalMaximumComputeCredits(limits) {
5636
+ const item = resolveModalSandboxComputeItem({
5637
+ itemId: "estimate",
5638
+ wallTimeSeconds: maximumPlaySandboxBillingSeconds(limits),
5639
+ physicalCpuCores: MODAL_SANDBOX_CPU_CORES,
5640
+ memoryGiB: limits.memoryGiB
5641
+ });
5642
+ return roundUpCredits(
5643
+ item.providerCostUsd * COMPUTE_BILLING_MARKUP_MULTIPLIER * DEFAULT_PROVIDER_MARKUP_MULTIPLIER / DEFAULT_USD_PER_CUSTOMER_CREDIT
5644
+ );
5645
+ }
5646
+ function estimateMaximumSandboxComputeCredits(limits) {
5647
+ return Math.max(
5648
+ estimateDaytonaMaximumComputeCredits(limits),
5649
+ estimateModalMaximumComputeCredits(limits)
5650
+ );
5651
+ }
5608
5652
  function formatNonStandardSandboxRuntimeWarning(limits) {
5609
5653
  if (limits.timeoutSeconds <= STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS.timeoutSeconds) {
5610
5654
  return null;
5611
5655
  }
5612
- const maximumComputeCredits = estimateDaytonaMaximumComputeCredits(limits);
5613
- return `This Play requests the standard sandbox for up to ${limits.timeoutSeconds}s (${limits.memoryGiB}GiB memory, ${limits.cpu} CPU, ${limits.diskGiB}GiB disk). Maximum compute estimate: ${maximumComputeCredits.toFixed(2)} Deepline credits. Longer runtimes are risky.`;
5656
+ const maximumComputeCredits = estimateMaximumSandboxComputeCredits(limits);
5657
+ return `This Play requests the standard sandbox for up to ${limits.timeoutSeconds}s (${limits.memoryGiB}GiB memory, ${limits.cpu} CPU, ${limits.diskGiB}GiB disk). Maximum compute estimate across Daytona and Modal: ${maximumComputeCredits.toFixed(2)} Deepline credits. Longer runtimes are risky.`;
5614
5658
  }
5615
5659
 
5616
5660
  // ../play-runtime/internal-step-ids.ts
@@ -6915,7 +6959,7 @@ function renderOutcome(outcome) {
6915
6959
  function printResult2(input) {
6916
6960
  const failed = input.status === "failed" || input.status === "cancelled";
6917
6961
  if (failed) process.exitCode = 1;
6918
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
6962
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
6919
6963
  {
6920
6964
  deployment: { ...input.deployment, status: input.status },
6921
6965
  plays: input.outcomes,
@@ -6940,7 +6984,7 @@ async function handlePlaysDeploy(directory, options) {
6940
6984
  const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
6941
6985
  throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
6942
6986
  });
6943
- const { http, config } = _chunkNYDRX6JJjs.getAuthedHttpClient.call(void 0, );
6987
+ const { http, config } = _chunkQ3PUHXOYjs.getAuthedHttpClient.call(void 0, );
6944
6988
  const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
6945
6989
  const startDeployment = () => http.post("/api/v2/deployments", {
6946
6990
  deliveryId,
@@ -6967,7 +7011,7 @@ async function handlePlaysDeploy(directory, options) {
6967
7011
  },
6968
7012
  {
6969
7013
  bundle: bundleDeployPlayFile,
6970
- fetchImpl: _chunkYSAZVLJDjs.fetchWithDeploymentProtection,
7014
+ fetchImpl: _chunkQUAQX3FQjs.fetchWithDeploymentProtection,
6971
7015
  // The plays are already here: "opening" the source is naming it.
6972
7016
  openSource: async () => ({
6973
7017
  open: async () => ({ repoRoot: root })
@@ -7535,7 +7579,7 @@ function parseInputFlagValue(raw) {
7535
7579
  return raw;
7536
7580
  }
7537
7581
  function parsePlayRunOptions(args, initialInput = null) {
7538
- const selection = _chunkNYDRX6JJjs.parseJsonFields.call(void 0, args, "run");
7582
+ const selection = _chunkQ3PUHXOYjs.parseJsonFields.call(void 0, args, "run");
7539
7583
  args = selection.args;
7540
7584
  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.";
7541
7585
  let filePath = null;
@@ -7547,7 +7591,7 @@ function parsePlayRunOptions(args, initialInput = null) {
7547
7591
  let revisionSelector = null;
7548
7592
  const watch = !args.includes("--no-wait");
7549
7593
  const dryRun = args.includes("--dry-run");
7550
- let jsonOutput = dryRun ? _chunkNYDRX6JJjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkNYDRX6JJjs.argsWantJson.call(void 0, args);
7594
+ let jsonOutput = dryRun ? _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args);
7551
7595
  const fullJson = args.includes("--full");
7552
7596
  const force = args.includes("--force");
7553
7597
  const forceToolRefresh = args.includes("--force-tool-refresh");
@@ -7610,7 +7654,7 @@ function parsePlayRunOptions(args, initialInput = null) {
7610
7654
  "--log-level requires one of: debug, info, warn, error."
7611
7655
  );
7612
7656
  }
7613
- const parsed = _chunkAPLRSERFjs.parseLogLevel.call(void 0, value);
7657
+ const parsed = _chunkAUMD2VXPjs.parseLogLevel.call(void 0, value);
7614
7658
  if (!parsed) {
7615
7659
  throw new Error(
7616
7660
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -7928,7 +7972,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
7928
7972
  const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
7929
7973
  (arg) => arg === "--log-level" || arg.startsWith("--log-level=")
7930
7974
  );
7931
- let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkAPLRSERFjs.parseLogLevel.call(void 0, options.logLevel);
7975
+ let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkAUMD2VXPjs.parseLogLevel.call(void 0, options.logLevel);
7932
7976
  if (!logLevel)
7933
7977
  throw new Error("--log-level requires one of: debug, info, warn, error.");
7934
7978
  const debugAlias = options.logs || options.debug === true || inputArgs.some(
@@ -7942,13 +7986,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
7942
7986
  if (debugAlias || debugMapLatency && logLevel === "info")
7943
7987
  logLevel = "debug";
7944
7988
  const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
7945
- const jsonFields = options.json === void 0 ? base.jsonFields : _chunkNYDRX6JJjs.parseJsonFields.call(void 0,
7946
- [...fullJson ? ["--full"] : [], ..._chunkNYDRX6JJjs.jsonFieldArgs.call(void 0, options.json)],
7989
+ const jsonFields = options.json === void 0 ? base.jsonFields : _chunkQ3PUHXOYjs.parseJsonFields.call(void 0,
7990
+ [...fullJson ? ["--full"] : [], ..._chunkQ3PUHXOYjs.jsonFieldArgs.call(void 0, options.json)],
7947
7991
  "run"
7948
7992
  ).fields;
7949
7993
  const watch = options.wait === false ? false : base.watch;
7950
7994
  const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
7951
- const jsonOutput = dryRun || !watch ? explicitJson || _chunkNYDRX6JJjs.argsWantJson.call(void 0, []) : explicitJson;
7995
+ const jsonOutput = dryRun || !watch ? explicitJson || _chunkQ3PUHXOYjs.argsWantJson.call(void 0, []) : explicitJson;
7952
7996
  const verboseLogs = Boolean(
7953
7997
  debugAlias || logLevel === "debug" || debugMapLatency
7954
7998
  );
@@ -7995,7 +8039,7 @@ function playAuthoringGraphPath(parent, filePath) {
7995
8039
  // src/cli/renderers/local-play-execution.ts
7996
8040
  function renderLocalPlayExecutionPlan(plan, options = {}) {
7997
8041
  if (options.dryRun) {
7998
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
8042
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
7999
8043
  return;
8000
8044
  }
8001
8045
  process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
@@ -8167,7 +8211,7 @@ function traceCliSync(phase, fields2, run) {
8167
8211
  const startedAt = Date.now();
8168
8212
  try {
8169
8213
  const result = run();
8170
- _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
8214
+ _chunkE3PJF6YPjs.recordCliTrace.call(void 0, {
8171
8215
  phase,
8172
8216
  ms: Date.now() - startedAt,
8173
8217
  ok: true,
@@ -8175,7 +8219,7 @@ function traceCliSync(phase, fields2, run) {
8175
8219
  });
8176
8220
  return result;
8177
8221
  } catch (error) {
8178
- _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
8222
+ _chunkE3PJF6YPjs.recordCliTrace.call(void 0, {
8179
8223
  phase,
8180
8224
  ms: Date.now() - startedAt,
8181
8225
  ok: false,
@@ -8959,7 +9003,7 @@ function playStatusErrorText(status) {
8959
9003
  function isRetryablePendingStartFailure(status) {
8960
9004
  if (status.status !== "failed") return false;
8961
9005
  if (status.runId && status.runId !== "pending") return false;
8962
- return _chunkAPLRSERFjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
9006
+ return _chunkAUMD2VXPjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
8963
9007
  }
8964
9008
  function pendingStartFailureStatus(input) {
8965
9009
  const message = input.error instanceof Error ? input.error.message : String(input.error);
@@ -8986,13 +9030,13 @@ var PLAY_PROGRESS_HEARTBEAT_INTERVAL_MS = 15e3;
8986
9030
  var PLAY_STATUS_HEARTBEAT_INTERVAL_MS = 15e3;
8987
9031
  function watchSurfaceReaches(state, provenance, level) {
8988
9032
  const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
8989
- if (!_chunkAPLRSERFjs.logLevelReaches.call(void 0, level, minimumLevel)) {
9033
+ if (!_chunkAUMD2VXPjs.logLevelReaches.call(void 0, level, minimumLevel)) {
8990
9034
  return false;
8991
9035
  }
8992
- if (_chunkAPLRSERFjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
9036
+ if (_chunkAUMD2VXPjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
8993
9037
  return true;
8994
9038
  }
8995
- return state.verbose === true && _chunkAPLRSERFjs.logProvenanceReaches.call(void 0, provenance, "debug");
9039
+ return state.verbose === true && _chunkAUMD2VXPjs.logProvenanceReaches.call(void 0, provenance, "debug");
8996
9040
  }
8997
9041
  function getEventPayload(event) {
8998
9042
  return event.payload && typeof event.payload === "object" ? event.payload : {};
@@ -9494,7 +9538,7 @@ function resolveRunPlayName(status, runId) {
9494
9538
  }
9495
9539
  function openPlayDashboard(dashboardUrl, open2) {
9496
9540
  if (open2 && dashboardUrl) {
9497
- _chunkNYDRX6JJjs.openInBrowser.call(void 0, dashboardUrl);
9541
+ _chunkQ3PUHXOYjs.openInBrowser.call(void 0, dashboardUrl);
9498
9542
  }
9499
9543
  }
9500
9544
  function printPlayLogLines(input) {
@@ -9556,7 +9600,7 @@ async function waitForPlayCompletionByWatch(input) {
9556
9600
  billing: false
9557
9601
  });
9558
9602
  } catch (error) {
9559
- if (_chunkAPLRSERFjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
9603
+ if (_chunkAUMD2VXPjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
9560
9604
  return null;
9561
9605
  }
9562
9606
  throw error;
@@ -9693,7 +9737,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
9693
9737
  `[play watch] start failed before run id with a transient error; retrying (${playStatusErrorText(status)})`
9694
9738
  );
9695
9739
  }
9696
- _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
9740
+ _chunkE3PJF6YPjs.recordCliTrace.call(void 0, {
9697
9741
  phase: "cli.play_start_stream_retry",
9698
9742
  ms: 0,
9699
9743
  ok: true,
@@ -9754,7 +9798,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9754
9798
  billing: false
9755
9799
  });
9756
9800
  } catch (error) {
9757
- if (_chunkAPLRSERFjs.isTransientPlayRunReadError.call(void 0, error)) {
9801
+ if (_chunkAUMD2VXPjs.isTransientPlayRunReadError.call(void 0, error)) {
9758
9802
  return null;
9759
9803
  }
9760
9804
  throw error;
@@ -9880,7 +9924,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9880
9924
  ...launchedRevisionId ? { revisionId: launchedRevisionId } : {}
9881
9925
  };
9882
9926
  if (!canonicalTerminal) {
9883
- _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
9927
+ _chunkE3PJF6YPjs.recordCliTrace.call(void 0, {
9884
9928
  phase: "cli.play_start_stream_stale_terminal_ignored",
9885
9929
  ms: Date.now() - startedAt,
9886
9930
  ok: true,
@@ -9893,7 +9937,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9893
9937
  });
9894
9938
  continue;
9895
9939
  }
9896
- _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
9940
+ _chunkE3PJF6YPjs.recordCliTrace.call(void 0, {
9897
9941
  phase: "cli.play_start_stream_terminal",
9898
9942
  ms: Date.now() - startedAt,
9899
9943
  ok: true,
@@ -9913,7 +9957,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9913
9957
  clearTimeout(timeout);
9914
9958
  }
9915
9959
  controller.abort();
9916
- _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
9960
+ _chunkE3PJF6YPjs.recordCliTrace.call(void 0, {
9917
9961
  phase: "cli.play_start_stream_handoff_to_tail",
9918
9962
  ms: Date.now() - startedAt,
9919
9963
  ok: true,
@@ -9942,7 +9986,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9942
9986
  if (timedOut) {
9943
9987
  const terminal = await fetchKnownTerminalStatus();
9944
9988
  if (terminal) {
9945
- _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
9989
+ _chunkE3PJF6YPjs.recordCliTrace.call(void 0, {
9946
9990
  phase: "cli.play_start_stream_timeout_status_reconcile",
9947
9991
  ms: Date.now() - startedAt,
9948
9992
  ok: true,
@@ -9962,7 +10006,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9962
10006
  lastPhase
9963
10007
  });
9964
10008
  }
9965
- if (lastKnownWorkflowId && _chunkAPLRSERFjs.isTransientPlayRunReadError.call(void 0, error)) {
10009
+ if (lastKnownWorkflowId && _chunkAUMD2VXPjs.isTransientPlayRunReadError.call(void 0, error)) {
9966
10010
  if (timeout) {
9967
10011
  clearTimeout(timeout);
9968
10012
  }
@@ -9973,7 +10017,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9973
10017
  `
9974
10018
  );
9975
10019
  }
9976
- _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
10020
+ _chunkE3PJF6YPjs.recordCliTrace.call(void 0, {
9977
10021
  phase: "cli.play_start_stream_reconnect",
9978
10022
  ms: Date.now() - startedAt,
9979
10023
  ok: true,
@@ -9998,8 +10042,8 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9998
10042
  onRunAdmitted: confirmAdmission
9999
10043
  });
10000
10044
  }
10001
- if (!lastKnownWorkflowId && _chunkAPLRSERFjs.isTransientPlayRunReadError.call(void 0, error)) {
10002
- _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
10045
+ if (!lastKnownWorkflowId && _chunkAUMD2VXPjs.isTransientPlayRunReadError.call(void 0, error)) {
10046
+ _chunkE3PJF6YPjs.recordCliTrace.call(void 0, {
10003
10047
  phase: "cli.play_start_stream_transient_failure",
10004
10048
  ms: Date.now() - startedAt,
10005
10049
  ok: false,
@@ -10027,7 +10071,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10027
10071
  `[play watch] start stream ended after run ${lastKnownWorkflowId}; reconnecting to canonical run stream`
10028
10072
  );
10029
10073
  }
10030
- _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
10074
+ _chunkE3PJF6YPjs.recordCliTrace.call(void 0, {
10031
10075
  phase: "cli.play_start_stream_reconnect",
10032
10076
  ms: Date.now() - startedAt,
10033
10077
  ok: true,
@@ -10097,7 +10141,7 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
10097
10141
  "logs"
10098
10142
  ]);
10099
10143
  function formatPlayLogLine(rawLine, state) {
10100
- const classified = _chunkAPLRSERFjs.classifyLogLine.call(void 0, rawLine);
10144
+ const classified = _chunkAUMD2VXPjs.classifyLogLine.call(void 0, rawLine);
10101
10145
  const line = classified.line;
10102
10146
  const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
10103
10147
  const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _317 => _317[1]]) ? new Date(timestampMatch[1]) : null;
@@ -10112,14 +10156,14 @@ function formatPlayLogLine(rawLine, state) {
10112
10156
  if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
10113
10157
  const providerWait = formatProviderCapacityWaitLogLine(line);
10114
10158
  if (providerWait && !state.verbose) {
10115
- return _chunkAPLRSERFjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
10159
+ return _chunkAUMD2VXPjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
10116
10160
  }
10117
10161
  const mapProgress = formatMapProgressDiagnosticLogLine(line);
10118
10162
  if (mapProgress && !state.verbose) {
10119
- return _chunkAPLRSERFjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
10163
+ return _chunkAUMD2VXPjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
10120
10164
  }
10121
10165
  if (/\[worker\] picked up run\b/.test(message)) {
10122
- if (!_chunkAPLRSERFjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10166
+ if (!_chunkAUMD2VXPjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10123
10167
  return null;
10124
10168
  }
10125
10169
  if (state.emittedRunnerStarted) {
@@ -10132,7 +10176,7 @@ function formatPlayLogLine(rawLine, state) {
10132
10176
  /^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
10133
10177
  );
10134
10178
  if (mapStart) {
10135
- if (!_chunkAPLRSERFjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10179
+ if (!_chunkAUMD2VXPjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10136
10180
  return null;
10137
10181
  }
10138
10182
  const [, rows, fields2, namespace, cached, pending] = mapStart;
@@ -10142,7 +10186,7 @@ function formatPlayLogLine(rawLine, state) {
10142
10186
  /^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
10143
10187
  );
10144
10188
  if (mapDone) {
10145
- if (!_chunkAPLRSERFjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10189
+ if (!_chunkAUMD2VXPjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
10146
10190
  return null;
10147
10191
  }
10148
10192
  const [, results, executed, cached] = mapDone;
@@ -10535,7 +10579,8 @@ function extractBillingForStatus(status, error) {
10535
10579
  }
10536
10580
  function formatInsufficientCreditsMessage(input) {
10537
10581
  const operation = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getStringField(input.billing, "operation_id"), () => ( getStringField(input.billing, "operation"))), () => ( extractToolIdFromErrorText(input.error))), () => ( getStringField(input.billing, "provider"))), () => ( "tool call"));
10538
- const balance = formatCreditAmount2(input.billing.balance_credits);
10582
+ const spendableBalance = input.billing.spendable_balance_credits !== void 0 ? input.billing.spendable_balance_credits : input.billing.balance_credits;
10583
+ const balance = formatCreditAmount2(spendableBalance);
10539
10584
  const required = formatCreditAmount2(input.billing.required_credits);
10540
10585
  const recommended = formatCreditAmount2(
10541
10586
  _nullishCoalesce(input.billing.recommended_add_credits, () => ( input.billing.needed_credits))
@@ -10548,7 +10593,8 @@ function formatInsufficientCreditsMessage(input) {
10548
10593
  const minimum = input.billing.minimum_balance_credits;
10549
10594
  const estimate = input.billing.estimated_credits;
10550
10595
  const estimatedPrice = typeof estimate === "number" ? ` Estimated price: ${formatCreditAmount2(estimate)}.` : "";
10551
- const shortfall = typeof minimum === "number" && input.billing.required_credits === minimum ? `Workspace balance ${balance} is below the ${formatCreditAmount2(minimum)}-credit workspace minimum for starting a billable call (${operation}${workspaceSuffix}); this is a workspace-wide minimum, separate from the tool's own price.${estimatedPrice}` : typeof estimate === "number" && typeof input.billing.required_credits === "number" && input.billing.required_credits > estimate ? `Workspace balance ${balance} is below the ${required}-credit balance required to start ${operation}${workspaceSuffix}; this is a required balance, not the price.${estimatedPrice}` : `Workspace balance ${balance} < required ${required} for ${operation}${workspaceSuffix}.`;
10596
+ const spendableNote = " Spendable credits exclude pending spending and can be lower than the posted balance shown by billing balance.";
10597
+ const shortfall = typeof minimum === "number" && input.billing.required_credits === minimum ? `Spendable workspace balance ${balance} credits is below the ${formatCreditAmount2(minimum)}-credit workspace minimum for starting a billable call (${operation}${workspaceSuffix}); this is a workspace-wide minimum, separate from the tool's own price.${estimatedPrice}${spendableNote}` : typeof estimate === "number" && typeof input.billing.required_credits === "number" && input.billing.required_credits > estimate ? `Spendable workspace balance ${balance} credits is below the ${required}-credit balance required to start ${operation}${workspaceSuffix}; this is a required balance, not the price.${estimatedPrice}${spendableNote}` : `Spendable workspace balance ${balance} credits < required ${required} for ${operation}${workspaceSuffix}.${spendableNote}`;
10552
10598
  return `${shortfall}${addSuffix} Ask the user if they want to add Deepline credits. If they approve, run: ${recovery.topUp}. If checkout is required, run: ${recovery.checkout}.`;
10553
10599
  }
10554
10600
  function buildInsufficientCreditsSummaryLines(input) {
@@ -11429,7 +11475,7 @@ function formatRecentRunLogLines(value) {
11429
11475
  (line) => typeof line === "string"
11430
11476
  );
11431
11477
  if (tail.length === 0) return [];
11432
- const shown = tail.map((line) => _chunkAPLRSERFjs.classifyLogLine.call(void 0, line)).filter(
11478
+ const shown = tail.map((line) => _chunkAUMD2VXPjs.classifyLogLine.call(void 0, line)).filter(
11433
11479
  (entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
11434
11480
  ).slice(-8);
11435
11481
  const total = readNonNegativeInteger(logs.totalCount);
@@ -11712,7 +11758,7 @@ function writePlayResult(status, jsonOutput, options) {
11712
11758
  const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _398 => _398.hits]), () => ( null));
11713
11759
  if (jsonOutput) {
11714
11760
  const payload2 = _optionalChain([options, 'optionalAccess', _399 => _399.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
11715
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
11761
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
11716
11762
  hits ? { ...payload2, hits } : payload2,
11717
11763
  { json: true, fields: _optionalChain([options, 'optionalAccess', _400 => _400.jsonFields]) }
11718
11764
  );
@@ -11728,7 +11774,7 @@ function writePlayResult(status, jsonOutput, options) {
11728
11774
  ...buildPlayCompletionTextLines(status),
11729
11775
  ...formatRunHitsLines(hits)
11730
11776
  ];
11731
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0, displayPackage, {
11777
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0, displayPackage, {
11732
11778
  json: false,
11733
11779
  text: `${lines2.join("\n")}
11734
11780
  `
@@ -11779,7 +11825,7 @@ function writePlayResult(status, jsonOutput, options) {
11779
11825
  lines.push(...buildBillingRollupTextLines(status));
11780
11826
  const compact = compactPlayStatus(status);
11781
11827
  const payload = _optionalChain([options, 'optionalAccess', _402 => _402.fullJson]) ? status : compact;
11782
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
11828
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
11783
11829
  {
11784
11830
  ...payload,
11785
11831
  render: {
@@ -12549,7 +12595,7 @@ function writeStartedPlayRun(input) {
12549
12595
  dashboardUrl: input.dashboardUrl,
12550
12596
  package: input.package
12551
12597
  };
12552
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
12598
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
12553
12599
  json: true,
12554
12600
  fields: input.jsonFields
12555
12601
  });
@@ -12571,7 +12617,7 @@ function writeStartedPlayRun(input) {
12571
12617
  input.progress.writeLine(output2, process.stdout);
12572
12618
  return;
12573
12619
  }
12574
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0, input.package, {
12620
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0, input.package, {
12575
12621
  json: false,
12576
12622
  text: `${output2}
12577
12623
  `
@@ -12600,7 +12646,7 @@ function writeStartedPlayRun(input) {
12600
12646
  ) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)}`] : []
12601
12647
  ];
12602
12648
  if (input.jsonOutput) {
12603
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
12649
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
12604
12650
  return;
12605
12651
  }
12606
12652
  if (input.dashboardUrl) {
@@ -12611,7 +12657,7 @@ function writeStartedPlayRun(input) {
12611
12657
  input.progress.writeLine(output, process.stdout);
12612
12658
  return;
12613
12659
  }
12614
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
12660
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
12615
12661
  {
12616
12662
  ...payload,
12617
12663
  render: { sections: [{ title: "play run", lines }] }
@@ -12621,7 +12667,7 @@ function writeStartedPlayRun(input) {
12621
12667
  );
12622
12668
  }
12623
12669
  function parsePlayCheckOptions(args) {
12624
- const selection = _chunkNYDRX6JJjs.parseJsonFields.call(void 0, args, "check");
12670
+ const selection = _chunkQ3PUHXOYjs.parseJsonFields.call(void 0, args, "check");
12625
12671
  args = selection.args;
12626
12672
  const target = args[0];
12627
12673
  if (!target || target.startsWith("-")) {
@@ -12633,7 +12679,7 @@ function parsePlayCheckOptions(args) {
12633
12679
  if (arg !== "--json" && arg !== "--full")
12634
12680
  throw new Error(`Unknown plays check option: ${arg}`);
12635
12681
  }
12636
- const jsonOutput = _chunkNYDRX6JJjs.argsWantJson.call(void 0, args);
12682
+ const jsonOutput = _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args);
12637
12683
  return {
12638
12684
  target,
12639
12685
  jsonOutput,
@@ -12709,7 +12755,7 @@ ${PLAY_PUBLISH_USAGE}`
12709
12755
  useLatest,
12710
12756
  expectedArtifactHash,
12711
12757
  dryRun,
12712
- jsonOutput: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args)
12758
+ jsonOutput: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)
12713
12759
  };
12714
12760
  }
12715
12761
  var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
@@ -12750,7 +12796,7 @@ ${PLAY_SAVE_USAGE}`);
12750
12796
  target,
12751
12797
  expectedArtifactHash,
12752
12798
  dryRun,
12753
- jsonOutput: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args)
12799
+ jsonOutput: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)
12754
12800
  };
12755
12801
  }
12756
12802
  function printScheduledPlayCapacity(capacity) {
@@ -12961,7 +13007,7 @@ function printBundledRuntimeWarning(bundle) {
12961
13007
  async function handlePlayCheck(args) {
12962
13008
  const options = parsePlayCheckOptions(args);
12963
13009
  if (!isFileTarget2(options.target)) {
12964
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
13010
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
12965
13011
  try {
12966
13012
  await assertCanonicalNamedPlayReference(client, options.target, {
12967
13013
  command: "check"
@@ -12990,7 +13036,7 @@ async function handlePlayCheck(args) {
12990
13036
  },
12991
13037
  ...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
12992
13038
  };
12993
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0, result, {
13039
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0, result, {
12994
13040
  json: options.jsonOutput,
12995
13041
  fields: options.jsonFields,
12996
13042
  text: renderPlayCheckOutput(result) + "\n"
@@ -13000,7 +13046,7 @@ async function handlePlayCheck(args) {
13000
13046
  const resolved = _path.resolve.call(void 0, options.target);
13001
13047
  const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
13002
13048
  if (options.jsonOutput) {
13003
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
13049
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
13004
13050
  {
13005
13051
  kind: "play_check",
13006
13052
  checked: "named_contract",
@@ -13042,7 +13088,7 @@ async function handlePlayCheck(args) {
13042
13088
  detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full`,
13043
13089
  publishCommand: _optionalChain([primary, 'optionalAccess', _449 => _449.result, 'access', _450 => _450.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
13044
13090
  });
13045
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0, output, {
13091
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0, output, {
13046
13092
  json: options.jsonOutput,
13047
13093
  fields: options.jsonFields,
13048
13094
  text: renderPlayCheckOutput(output) + "\n"
@@ -13096,7 +13142,7 @@ async function checkOneExportedPlay(input) {
13096
13142
  }
13097
13143
  const playName = _nullishCoalesce(graph.root.playName, () => ( fallbackName));
13098
13144
  const authoringErrors = collectPlayGraphAuthoringErrors(graph);
13099
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
13145
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
13100
13146
  const integrationMode = resolveEvalIntegrationMode();
13101
13147
  const importedPlays = [...graph.nodes.values()].filter((node) => node.filePath !== graph.root.filePath).map((node) => ({
13102
13148
  playName: node.playName,
@@ -13137,7 +13183,7 @@ async function handleFileBackedRun(options, hooks) {
13137
13183
  throw new Error("Expected a file-backed play run target.");
13138
13184
  }
13139
13185
  let client;
13140
- const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
13186
+ const progress = _nullishCoalesce(_chunkOSFWFV72js.getActiveCliProgress.call(void 0, ), () => ( _chunkOSFWFV72js.createCliProgress.call(void 0, !options.jsonOutput)));
13141
13187
  const absolutePlayPath = _path.resolve.call(void 0, options.target.path);
13142
13188
  progress.phase("compiling play");
13143
13189
  const sourceCode = traceCliSync(
@@ -13154,7 +13200,7 @@ async function handleFileBackedRun(options, hooks) {
13154
13200
  }
13155
13201
  let graph;
13156
13202
  try {
13157
- graph = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
13203
+ graph = await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
13158
13204
  "cli.play_file_bundle_graph",
13159
13205
  { targetKind: "file" },
13160
13206
  () => collectBundledPlayGraph(
@@ -13173,10 +13219,10 @@ async function handleFileBackedRun(options, hooks) {
13173
13219
  );
13174
13220
  return 0;
13175
13221
  }
13176
- client = new (0, _chunkAPLRSERFjs.DeeplineClient)(playRunClientOptions(options));
13222
+ client = new (0, _chunkAUMD2VXPjs.DeeplineClient)(playRunClientOptions(options));
13177
13223
  const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
13178
13224
  if (canDeferCompilerManifest) {
13179
- _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
13225
+ _chunkE3PJF6YPjs.recordCliTrace.call(void 0, {
13180
13226
  phase: "cli.play_file_compile_manifests",
13181
13227
  ms: 0,
13182
13228
  ok: true,
@@ -13185,7 +13231,7 @@ async function handleFileBackedRun(options, hooks) {
13185
13231
  reason: "validated_by_run_route"
13186
13232
  });
13187
13233
  } else {
13188
- await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
13234
+ await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
13189
13235
  "cli.play_file_compile_manifests",
13190
13236
  { targetKind: "file", skipped: false },
13191
13237
  () => compileBundledPlayGraphManifests(client, graph)
@@ -13209,7 +13255,7 @@ async function handleFileBackedRun(options, hooks) {
13209
13255
  _chunkGEJDBXXMjs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile })
13210
13256
  );
13211
13257
  progress.phase("pinning imported plays");
13212
- graph = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
13258
+ graph = await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
13213
13259
  "cli.play_file_pin_imports",
13214
13260
  { targetKind: "file" },
13215
13261
  () => _chunkGEJDBXXMjs.pinLocalPlayImports.call(void 0, client, graph)
@@ -13228,7 +13274,7 @@ async function handleFileBackedRun(options, hooks) {
13228
13274
  const fileInputBindings = _chunkUHNDVD3Pjs.fileInputBindingsFromStaticPipeline.call(void 0,
13229
13275
  _optionalChain([compilerManifest, 'optionalAccess', _455 => _455.staticPipeline])
13230
13276
  );
13231
- const stagedFileInputs = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
13277
+ const stagedFileInputs = await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
13232
13278
  "cli.play_stage_inputs",
13233
13279
  {
13234
13280
  targetKind: "file",
@@ -13275,7 +13321,7 @@ async function handleFileBackedRun(options, hooks) {
13275
13321
  };
13276
13322
  if (options.watch) {
13277
13323
  progress.phase("starting run");
13278
- const finalStatus = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
13324
+ const finalStatus = await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
13279
13325
  "cli.play_start_watch",
13280
13326
  { targetKind: "file", playName },
13281
13327
  () => startAndWaitForPlayCompletionByStream({
@@ -13325,7 +13371,7 @@ async function handleFileBackedRun(options, hooks) {
13325
13371
  return outputStatus.status === "completed" ? 0 : 1;
13326
13372
  }
13327
13373
  progress.phase("starting run");
13328
- const started = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
13374
+ const started = await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
13329
13375
  "cli.play_start_unwatched",
13330
13376
  { targetKind: "file", playName },
13331
13377
  () => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _461 => _461.onSubmission]) }).catch(async (error) => {
@@ -13372,8 +13418,8 @@ async function handleNamedRun(options, hooks) {
13372
13418
  if (options.target.kind !== "name") {
13373
13419
  throw new Error("Expected a named play run target.");
13374
13420
  }
13375
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)(playRunClientOptions(options));
13376
- const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
13421
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)(playRunClientOptions(options));
13422
+ const progress = _nullishCoalesce(_chunkOSFWFV72js.getActiveCliProgress.call(void 0, ), () => ( _chunkOSFWFV72js.createCliProgress.call(void 0, !options.jsonOutput)));
13377
13423
  const playName = options.target.name;
13378
13424
  const runtimeInput = options.input ? { ...options.input } : {};
13379
13425
  try {
@@ -13388,14 +13434,14 @@ async function handleNamedRun(options, hooks) {
13388
13434
  });
13389
13435
  const playDetail = needsPlayDefinition ? await (async () => {
13390
13436
  progress.phase("loading play definition");
13391
- return _chunkAYHLUHE5js.traceCliSpan.call(void 0,
13437
+ return _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
13392
13438
  "cli.play_load_definition",
13393
13439
  { targetKind: "name", playName, skipped: false },
13394
13440
  () => assertCanonicalNamedPlayReference(client, playName, {
13395
13441
  command: "run"
13396
13442
  })
13397
13443
  );
13398
- })() : (_chunkAYHLUHE5js.recordCliTrace.call(void 0, {
13444
+ })() : (_chunkE3PJF6YPjs.recordCliTrace.call(void 0, {
13399
13445
  phase: "cli.play_load_definition",
13400
13446
  ms: 0,
13401
13447
  ok: true,
@@ -13404,7 +13450,7 @@ async function handleNamedRun(options, hooks) {
13404
13450
  skipped: true
13405
13451
  }), null);
13406
13452
  progress.phase("selecting revision");
13407
- const selectedRevisionId = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
13453
+ const selectedRevisionId = await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
13408
13454
  "cli.play_select_revision",
13409
13455
  {
13410
13456
  targetKind: "name",
@@ -13423,7 +13469,7 @@ async function handleNamedRun(options, hooks) {
13423
13469
  ..._chunkUHNDVD3Pjs.fileInputBindingsFromPlaySchema.call(void 0, playDetail.play.inputSchema),
13424
13470
  ..._chunkUHNDVD3Pjs.fileInputBindingsFromStaticPipeline.call(void 0, playDetail.play.staticPipeline)
13425
13471
  ] : [];
13426
- const stagedFileInputs = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
13472
+ const stagedFileInputs = await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
13427
13473
  "cli.play_stage_inputs",
13428
13474
  {
13429
13475
  targetKind: "name",
@@ -13467,7 +13513,7 @@ async function handleNamedRun(options, hooks) {
13467
13513
  });
13468
13514
  if (options.watch) {
13469
13515
  progress.phase("starting run");
13470
- const finalStatus = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
13516
+ const finalStatus = await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
13471
13517
  "cli.play_start_watch",
13472
13518
  { targetKind: "name", playName },
13473
13519
  () => startAndWaitForPlayCompletionByStream({
@@ -13520,7 +13566,7 @@ async function handleNamedRun(options, hooks) {
13520
13566
  return outputStatus.status === "completed" ? 0 : 1;
13521
13567
  }
13522
13568
  progress.phase("starting run");
13523
- const started = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
13569
+ const started = await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
13524
13570
  "cli.play_start_unwatched",
13525
13571
  { targetKind: "name", playName },
13526
13572
  () => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _472 => _472.onSubmission]) }).catch(async (error) => {
@@ -13569,7 +13615,7 @@ async function handlePlayRun(args, hooks) {
13569
13615
  JSON.stringify({
13570
13616
  version: 1,
13571
13617
  admissionState: "submitted_unknown",
13572
- baseUrl: new (0, _chunkAPLRSERFjs.DeeplineClient)().baseUrl,
13618
+ baseUrl: new (0, _chunkAUMD2VXPjs.DeeplineClient)().baseUrl,
13573
13619
  ...intent
13574
13620
  })
13575
13621
  );
@@ -13798,7 +13844,7 @@ function renderRunOverviewText(overview, extras = {}) {
13798
13844
  );
13799
13845
  return `${lines.join("\n")}
13800
13846
 
13801
- ${_chunkNYDRX6JJjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
13847
+ ${_chunkQ3PUHXOYjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
13802
13848
  }
13803
13849
  var RUN_READ_TIMING_PROGRESS_INTERVAL_MS = 15e3;
13804
13850
  async function withRunReadTiming(command, stage, enabled, action) {
@@ -13822,7 +13868,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
13822
13868
  }
13823
13869
  }
13824
13870
  async function handleRunGet(args) {
13825
- const selection = _chunkNYDRX6JJjs.parseJsonFields.call(void 0,
13871
+ const selection = _chunkQ3PUHXOYjs.parseJsonFields.call(void 0,
13826
13872
  args,
13827
13873
  args.includes("--config") ? "config" : "get"
13828
13874
  );
@@ -13835,7 +13881,7 @@ async function handleRunGet(args) {
13835
13881
  console.error(error instanceof Error ? error.message : usage2);
13836
13882
  return 1;
13837
13883
  }
13838
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
13884
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
13839
13885
  const timing = args.includes("--timing");
13840
13886
  if (args.includes("--web-url")) {
13841
13887
  const status2 = await withRunReadTiming(
@@ -13850,7 +13896,7 @@ async function handleRunGet(args) {
13850
13896
  return 1;
13851
13897
  }
13852
13898
  const dashboardUrl2 = _chunkBQR6UN3Cjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName2);
13853
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
13899
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
13854
13900
  { dashboardUrl: dashboardUrl2 },
13855
13901
  { json: args.includes("--json"), text: `${dashboardUrl2}
13856
13902
  ` }
@@ -13875,7 +13921,7 @@ async function handleRunGet(args) {
13875
13921
  "This server does not support recorded configuration reads."
13876
13922
  );
13877
13923
  }
13878
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
13924
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
13879
13925
  { runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
13880
13926
  { json: true, fields: selection.fields }
13881
13927
  );
@@ -13888,7 +13934,7 @@ async function handleRunGet(args) {
13888
13934
  timing,
13889
13935
  () => client.getRunInput(runId)
13890
13936
  );
13891
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0, input, { json: true });
13937
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0, input, { json: true });
13892
13938
  return 0;
13893
13939
  }
13894
13940
  const full = args.includes("--full");
@@ -13914,8 +13960,8 @@ async function handleRunGet(args) {
13914
13960
  ) : status;
13915
13961
  const legacyPlayName = resolveRunPlayName(legacyStatus, runId);
13916
13962
  const legacyDashboardUrl = legacyPlayName ? _chunkBQR6UN3Cjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, legacyPlayName) : null;
13917
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
13918
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
13963
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
13964
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
13919
13965
  {
13920
13966
  ...full ? legacyStatus : compactPlayStatus(legacyStatus),
13921
13967
  ...legacyDashboardUrl ? { dashboardUrl: legacyDashboardUrl } : {}
@@ -13925,7 +13971,7 @@ async function handleRunGet(args) {
13925
13971
  } else {
13926
13972
  writePlayResult(legacyStatus, false, { fullJson: full });
13927
13973
  if (legacyDashboardUrl)
13928
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
13974
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
13929
13975
  { dashboardUrl: legacyDashboardUrl },
13930
13976
  { json: false, text: `play page: ${legacyDashboardUrl}
13931
13977
  ` }
@@ -13955,10 +14001,10 @@ async function handleRunGet(args) {
13955
14001
  )
13956
14002
  ]);
13957
14003
  const hitLines = formatRunHitsLines(hits);
13958
- const json = _chunkNYDRX6JJjs.argsWantJson.call(void 0, args);
14004
+ const json = _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args);
13959
14005
  const playName = resolveRunPlayName(status, runId);
13960
14006
  const dashboardUrl = playName ? _chunkBQR6UN3Cjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) : void 0;
13961
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
14007
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
13962
14008
  {
13963
14009
  ...overview,
13964
14010
  ...dashboardUrl ? { dashboardUrl } : {},
@@ -14062,9 +14108,9 @@ async function handleRunLifecycleStatus(args) {
14062
14108
  console.error(error instanceof Error ? error.message : usage2);
14063
14109
  return 1;
14064
14110
  }
14065
- const status = await new (0, _chunkAPLRSERFjs.DeeplineClient)().runs.status(runId);
14066
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
14067
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0, status, { json: true });
14111
+ const status = await new (0, _chunkAUMD2VXPjs.DeeplineClient)().runs.status(runId);
14112
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
14113
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0, status, { json: true });
14068
14114
  return 0;
14069
14115
  }
14070
14116
  if (!status.available) {
@@ -14104,7 +14150,7 @@ async function handleRunsRerun(args) {
14104
14150
  console.error(error instanceof Error ? error.message : usage2);
14105
14151
  return 1;
14106
14152
  }
14107
- const options = { json: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args) };
14153
+ const options = { json: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args) };
14108
14154
  for (let index = 0; index < args.length; index += 1) {
14109
14155
  if (args[index] === "--idempotency-key") {
14110
14156
  options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
@@ -14170,8 +14216,8 @@ ${usage2}
14170
14216
  Discover Plays: ${next.discover}
14171
14217
  Active runs: ${next.running}`
14172
14218
  );
14173
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
14174
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
14219
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
14220
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
14175
14221
  { ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
14176
14222
  { json: true }
14177
14223
  );
@@ -14186,7 +14232,7 @@ Active runs: ${next.running}`
14186
14232
  console.error("--offset requires --play.");
14187
14233
  return 1;
14188
14234
  }
14189
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
14235
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
14190
14236
  const page = await withRunReadTiming(
14191
14237
  "runs list",
14192
14238
  "run inventory",
@@ -14260,7 +14306,7 @@ Active runs: ${next.running}`
14260
14306
  nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
14261
14307
  );
14262
14308
  }
14263
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
14309
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
14264
14310
  {
14265
14311
  runs,
14266
14312
  count: runs.length,
@@ -14274,7 +14320,7 @@ Active runs: ${next.running}`
14274
14320
  },
14275
14321
  render: { sections: [{ title: "runs", lines }] }
14276
14322
  },
14277
- { json: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args) }
14323
+ { json: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args) }
14278
14324
  );
14279
14325
  return 0;
14280
14326
  }
@@ -14304,7 +14350,7 @@ async function handleRunTail(args) {
14304
14350
  console.error("--log-level requires one of: debug, info, warn, error.");
14305
14351
  return 1;
14306
14352
  }
14307
- const parsed = _chunkAPLRSERFjs.parseLogLevel.call(void 0, value);
14353
+ const parsed = _chunkAUMD2VXPjs.parseLogLevel.call(void 0, value);
14308
14354
  if (!parsed) {
14309
14355
  console.error(
14310
14356
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -14342,9 +14388,9 @@ async function handleRunTail(args) {
14342
14388
  );
14343
14389
  return 1;
14344
14390
  }
14345
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
14391
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
14346
14392
  const jsonLines = args.includes("--jsonl");
14347
- const jsonOutput = !jsonLines && _chunkNYDRX6JJjs.argsWantJson.call(void 0, args);
14393
+ const jsonOutput = !jsonLines && _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args);
14348
14394
  const compact = args.includes("--compact");
14349
14395
  const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
14350
14396
  const compactState = {
@@ -14425,7 +14471,7 @@ async function handleRunLogs(args) {
14425
14471
  ]);
14426
14472
  const cursorIndex = args.indexOf("--cursor");
14427
14473
  const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
14428
- const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkAPLRSERFjs.isRunLogsCursor.call(void 0, cursorValue));
14474
+ const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkAUMD2VXPjs.isRunLogsCursor.call(void 0, cursorValue));
14429
14475
  if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
14430
14476
  return handleRunEventSearch(args);
14431
14477
  }
@@ -14459,7 +14505,7 @@ async function handleRunLogs(args) {
14459
14505
  console.error("--log-level requires one of: debug, info, warn, error.");
14460
14506
  return 1;
14461
14507
  }
14462
- const parsed = _chunkAPLRSERFjs.parseLogLevel.call(void 0, value);
14508
+ const parsed = _chunkAUMD2VXPjs.parseLogLevel.call(void 0, value);
14463
14509
  if (!parsed) {
14464
14510
  console.error(
14465
14511
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -14506,12 +14552,12 @@ async function handleRunLogs(args) {
14506
14552
  );
14507
14553
  return 1;
14508
14554
  }
14509
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
14555
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
14510
14556
  if (outPath) {
14511
14557
  const result2 = await client.runs.logs(runId, { all: true });
14512
- const logs = result2.entries.filter((line) => _chunkAPLRSERFjs.logLevelReaches.call(void 0, _chunkAPLRSERFjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkAPLRSERFjs.classifyLogLine.call(void 0, line).line);
14558
+ const logs = result2.entries.filter((line) => _chunkAUMD2VXPjs.logLevelReaches.call(void 0, _chunkAUMD2VXPjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkAUMD2VXPjs.classifyLogLine.call(void 0, line).line);
14513
14559
  _fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
14514
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
14560
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
14515
14561
  {
14516
14562
  runId: result2.runId,
14517
14563
  log_path: outPath,
@@ -14534,7 +14580,7 @@ async function handleRunLogs(args) {
14534
14580
  ]
14535
14581
  }
14536
14582
  },
14537
- { json: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args) }
14583
+ { json: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args) }
14538
14584
  );
14539
14585
  return 0;
14540
14586
  }
@@ -14565,7 +14611,7 @@ async function handleRunLogs(args) {
14565
14611
  }
14566
14612
  };
14567
14613
  const text = buildRunLogsText(filteredResult);
14568
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
14614
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
14569
14615
  {
14570
14616
  runId: result.runId,
14571
14617
  totalCount: result.totalCount,
@@ -14589,7 +14635,7 @@ async function handleRunLogs(args) {
14589
14635
  render: { sections: [{ title: "run logs", lines: entries }] }
14590
14636
  },
14591
14637
  {
14592
- json: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args),
14638
+ json: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args),
14593
14639
  text
14594
14640
  }
14595
14641
  );
@@ -14613,7 +14659,7 @@ function selectRunLogTailPage(result, logLevel, limit) {
14613
14659
  );
14614
14660
  }
14615
14661
  const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
14616
- (entry) => _chunkAPLRSERFjs.logLevelReaches.call(void 0, _chunkAPLRSERFjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
14662
+ (entry) => _chunkAUMD2VXPjs.logLevelReaches.call(void 0, _chunkAUMD2VXPjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
14617
14663
  );
14618
14664
  const selected = matching.slice(-limit);
14619
14665
  const olderMatchesExist = matching.length > selected.length;
@@ -14623,7 +14669,7 @@ function selectRunLogTailPage(result, logLevel, limit) {
14623
14669
  lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _500 => _500.at, 'call', _501 => _501(-1), 'optionalAccess', _502 => _502.seq]), () => ( null)),
14624
14670
  truncated: result.truncated || olderMatchesExist,
14625
14671
  hasMore: olderMatchesExist,
14626
- nextCursor: olderMatchesExist ? _chunkAPLRSERFjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
14672
+ nextCursor: olderMatchesExist ? _chunkAUMD2VXPjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
14627
14673
  };
14628
14674
  }
14629
14675
  async function handleRunEventSearch(args) {
@@ -14690,7 +14736,7 @@ ${usage2}`);
14690
14736
  namespace,
14691
14737
  ...backend ? { backend } : {}
14692
14738
  } : void 0;
14693
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
14739
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
14694
14740
  const result = await client.runs.searchEvents({
14695
14741
  ...runId ? { runId } : {},
14696
14742
  ...values["--since"] ? { since: values["--since"] } : {},
@@ -14762,7 +14808,7 @@ ${renderedDetails}` : ""}`;
14762
14808
  "--limit",
14763
14809
  String(limit)
14764
14810
  ].join(" ") : null;
14765
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
14811
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
14766
14812
  {
14767
14813
  events,
14768
14814
  nextCursor: result.nextCursor,
@@ -14773,14 +14819,14 @@ ${renderedDetails}` : ""}`;
14773
14819
  render: { sections: [{ title: "runtime events", lines }] }
14774
14820
  },
14775
14821
  {
14776
- json: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args),
14822
+ json: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args),
14777
14823
  text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
14778
14824
  }
14779
14825
  );
14780
14826
  return 0;
14781
14827
  }
14782
14828
  function buildRunLogsText(result) {
14783
- const lines = result.entries.map((line) => _chunkAPLRSERFjs.classifyLogLine.call(void 0, line).line);
14829
+ const lines = result.entries.map((line) => _chunkAUMD2VXPjs.classifyLogLine.call(void 0, line).line);
14784
14830
  if (result.warning) {
14785
14831
  if (lines.length > 0) lines.push("");
14786
14832
  lines.push(`warning: ${result.warning}`);
@@ -14814,7 +14860,7 @@ async function handleRunStop(args) {
14814
14860
  reason = args[++index];
14815
14861
  }
14816
14862
  }
14817
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
14863
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
14818
14864
  const result = await client.runs.stop(runId, { reason });
14819
14865
  const state = resolveRunStopState(result);
14820
14866
  const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
@@ -14829,7 +14875,7 @@ async function handleRunStop(args) {
14829
14875
  ...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
14830
14876
  `inspect: deepline runs get ${runId} --full`
14831
14877
  ];
14832
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
14878
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
14833
14879
  {
14834
14880
  ...cancelling,
14835
14881
  state,
@@ -14844,7 +14890,7 @@ async function handleRunStop(args) {
14844
14890
  ]
14845
14891
  }
14846
14892
  },
14847
- { json: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args) }
14893
+ { json: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args) }
14848
14894
  );
14849
14895
  return 0;
14850
14896
  }
@@ -14861,7 +14907,7 @@ async function handleRunStop(args) {
14861
14907
  ];
14862
14908
  process.stderr.write(`${lines2.join("\n")}
14863
14909
  `);
14864
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
14910
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
14865
14911
  {
14866
14912
  ...result,
14867
14913
  render: {
@@ -14876,7 +14922,7 @@ async function handleRunStop(args) {
14876
14922
  ]
14877
14923
  }
14878
14924
  },
14879
- { json: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args) }
14925
+ { json: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args) }
14880
14926
  );
14881
14927
  return 1;
14882
14928
  }
@@ -14887,12 +14933,12 @@ async function handleRunStop(args) {
14887
14933
  `warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
14888
14934
  ] : []
14889
14935
  ];
14890
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
14936
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
14891
14937
  {
14892
14938
  ...result,
14893
14939
  render: { sections: [{ title: "run stop", lines }] }
14894
14940
  },
14895
- { json: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args) }
14941
+ { json: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args) }
14896
14942
  );
14897
14943
  return 0;
14898
14944
  }
@@ -14942,18 +14988,18 @@ async function handleRunStopAll(args) {
14942
14988
  reason = args[++index];
14943
14989
  }
14944
14990
  }
14945
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
14991
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
14946
14992
  if (dryRun) {
14947
14993
  const result2 = await client.runs.stopAll({ dryRun: true, reason });
14948
14994
  const lines2 = buildStopAllDryRunTextLines(result2);
14949
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
14995
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
14950
14996
  {
14951
14997
  ...result2,
14952
14998
  render: {
14953
14999
  sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
14954
15000
  }
14955
15001
  },
14956
- { json: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
15002
+ { json: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
14957
15003
  ` }
14958
15004
  );
14959
15005
  return 0;
@@ -14966,17 +15012,17 @@ async function handleRunStopAll(args) {
14966
15012
  ...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
14967
15013
  ...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
14968
15014
  ];
14969
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
15015
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
14970
15016
  {
14971
15017
  ...result,
14972
15018
  render: { sections: [{ title: "workspace stop-all", lines }] }
14973
15019
  },
14974
- { json: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args) }
15020
+ { json: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args) }
14975
15021
  );
14976
15022
  return result.failed > 0 || result.partial ? 1 : 0;
14977
15023
  }
14978
15024
  async function handleRunExport(args) {
14979
- const selection = _chunkNYDRX6JJjs.parseJsonFields.call(void 0, args, "export");
15025
+ const selection = _chunkQ3PUHXOYjs.parseJsonFields.call(void 0, args, "export");
14980
15026
  args = selection.args;
14981
15027
  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]";
14982
15028
  let runId;
@@ -15035,16 +15081,16 @@ async function handleRunExport(args) {
15035
15081
  "INVALID_ARGUMENT"
15036
15082
  );
15037
15083
  }
15038
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
15084
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
15039
15085
  let status = await client.getPlayStatus(runId, { full: true });
15040
15086
  if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
15041
- const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkNYDRX6JJjs.argsWantJson.call(void 0, args));
15087
+ const progress = _chunkOSFWFV72js.createCliProgress.call(void 0, !_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args));
15042
15088
  try {
15043
15089
  await waitForPlayCompletionByWatch({
15044
15090
  client,
15045
15091
  playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
15046
15092
  workflowId: runId,
15047
- jsonOutput: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args),
15093
+ jsonOutput: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args),
15048
15094
  emitLogs: false,
15049
15095
  waitTimeoutMs,
15050
15096
  startedAt: Date.now(),
@@ -15144,8 +15190,8 @@ async function handleRunExport(args) {
15144
15190
  "utf-8"
15145
15191
  );
15146
15192
  }
15147
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0, payload, {
15148
- json: _chunkNYDRX6JJjs.argsWantJson.call(void 0, args),
15193
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0, payload, {
15194
+ json: _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args),
15149
15195
  fields: selection.fields,
15150
15196
  text: `${lines.join("\n")}
15151
15197
  `
@@ -15166,10 +15212,10 @@ async function handlePlayGet(args) {
15166
15212
  );
15167
15213
  return 2;
15168
15214
  }
15169
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
15215
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
15170
15216
  const explicitJson = args.includes("--json");
15171
15217
  const sourceOutput = args.includes("--source");
15172
- const jsonOutput = sourceOutput ? explicitJson : _chunkNYDRX6JJjs.argsWantJson.call(void 0, args);
15218
+ const jsonOutput = sourceOutput ? explicitJson : _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args);
15173
15219
  const requestedRevisionFlags = [
15174
15220
  args.includes("--working"),
15175
15221
  args.includes("--live"),
@@ -15229,7 +15275,7 @@ async function handlePlayGet(args) {
15229
15275
  }
15230
15276
  const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
15231
15277
  if (jsonOutput) {
15232
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, {
15278
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, {
15233
15279
  ...detail,
15234
15280
  ...materializedFile ? {
15235
15281
  message: loadedMessage,
@@ -15321,8 +15367,8 @@ async function handlePlayVersions(args) {
15321
15367
  console.error("Usage: deepline plays versions --name <name> [--json]");
15322
15368
  return 1;
15323
15369
  }
15324
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
15325
- const jsonOutput = _chunkNYDRX6JJjs.argsWantJson.call(void 0, args);
15370
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
15371
+ const jsonOutput = _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args);
15326
15372
  await assertCanonicalNamedPlayReference(client, playName, {
15327
15373
  command: "versions"
15328
15374
  });
@@ -15330,7 +15376,7 @@ async function handlePlayVersions(args) {
15330
15376
  parseReferencedPlayTarget2(playName).playName
15331
15377
  );
15332
15378
  if (jsonOutput) {
15333
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, { versions });
15379
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, { versions });
15334
15380
  return 0;
15335
15381
  }
15336
15382
  if (versions.length === 0) {
@@ -15343,16 +15389,22 @@ async function handlePlayVersions(args) {
15343
15389
  return 0;
15344
15390
  }
15345
15391
  function formatPlayCostEstimate(estimate) {
15392
+ const computeSummary = _optionalChain([estimate, 'optionalAccess', _538 => _538.compute]) ? `; ${estimate.status === "available" && estimate.source === "observed" ? "observed Deepline total includes usage-based compute; per-session ceiling" : "separate Deepline compute is usage-based; per-session ceiling"} across ${estimate.compute.pricedBackends.map(formatSandboxBackend).join(" and ")}: ${formatCredits(estimate.compute.maximumCredits)} credits (${formatSandboxBackend(estimate.compute.maximumBackend)} is highest; ${formatCredits(estimate.compute.maximumBillingSeconds)}s; total session count unbounded)` : "";
15346
15393
  if (!estimate || estimate.status === "unavailable") {
15347
- return `unavailable${estimate ? `: ${estimate.message}` : ""}`;
15394
+ return `unavailable${estimate ? `: ${estimate.message}${computeSummary}` : ""}`;
15348
15395
  }
15349
- const formatCredits = (value) => value.toLocaleString("en-US", {
15350
- maximumFractionDigits: value < 1 ? 4 : 2
15351
- });
15352
15396
  const credits = estimate.lowCredits === estimate.highCredits ? `${estimate.source === "observed" ? "~" : ""}${formatCredits(estimate.lowCredits)}` : `${formatCredits(estimate.lowCredits)}\u2013${formatCredits(estimate.highCredits)}`;
15353
15397
  const unit = estimate.unit === "row" ? "output row" : "run";
15354
15398
  const source = estimate.source === "observed" ? `observed from ${estimate.sampleRunCount} ${estimate.sampleRunCount === 1 ? "run" : "runs"}` : "static estimate";
15355
- return `${credits} Deepline credits per ${unit} (${source})`;
15399
+ return `${credits} Deepline credits per ${unit} (${source})${computeSummary}`;
15400
+ }
15401
+ function formatCredits(value) {
15402
+ return value.toLocaleString("en-US", {
15403
+ maximumFractionDigits: value < 1 ? 4 : 2
15404
+ });
15405
+ }
15406
+ function formatSandboxBackend(backend) {
15407
+ return backend === "daytona" ? "Daytona" : "Modal";
15356
15408
  }
15357
15409
  var PREBUILT_PLAY_TAG_KEYS = [
15358
15410
  "smb",
@@ -15362,11 +15414,11 @@ var PREBUILT_PLAY_TAG_KEYS = [
15362
15414
  "signals"
15363
15415
  ];
15364
15416
  async function handlePlayList(args) {
15365
- const jsonOutput = _chunkNYDRX6JJjs.argsWantJson.call(void 0, args);
15417
+ const jsonOutput = _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args);
15366
15418
  const showCost = args.includes("--show-cost");
15367
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
15419
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
15368
15420
  const categoriesIndex = args.indexOf("--categories");
15369
- const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _538 => _538[categoriesIndex + 1], 'optionalAccess', _539 => _539.trim, 'call', _540 => _540()]) : void 0;
15421
+ const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _539 => _539[categoriesIndex + 1], 'optionalAccess', _540 => _540.trim, 'call', _541 => _541()]) : void 0;
15370
15422
  const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
15371
15423
  if (args.includes("--tag") && tags.length === 0) {
15372
15424
  console.error(
@@ -15387,7 +15439,7 @@ async function handlePlayList(args) {
15387
15439
  const cursorIndex = args.indexOf("--cursor");
15388
15440
  const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
15389
15441
  const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
15390
- if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _541 => _541.trim, 'call', _542 => _542()])) {
15442
+ if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _542 => _542.trim, 'call', _543 => _543()])) {
15391
15443
  console.error("Pass a positive --limit and a non-empty --cursor.");
15392
15444
  return 2;
15393
15445
  }
@@ -15427,7 +15479,7 @@ async function handlePlayList(args) {
15427
15479
  if (play.inputSchema || play.hasInputSchema) {
15428
15480
  lines.push(" inputSchema: yes");
15429
15481
  }
15430
- if (_optionalChain([play, 'access', _543 => _543.triggerStatus, 'optionalAccess', _544 => _544.cron])) {
15482
+ if (_optionalChain([play, 'access', _544 => _544.triggerStatus, 'optionalAccess', _545 => _545.cron])) {
15431
15483
  lines.push(
15432
15484
  ` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
15433
15485
  );
@@ -15447,7 +15499,7 @@ async function handlePlayList(args) {
15447
15499
  } else {
15448
15500
  lines.push(" scheduled execution: not configured");
15449
15501
  }
15450
- if (_optionalChain([play, 'access', _545 => _545.triggerStatus, 'optionalAccess', _546 => _546.webhook])) {
15502
+ if (_optionalChain([play, 'access', _546 => _546.triggerStatus, 'optionalAccess', _547 => _547.webhook])) {
15451
15503
  lines.push(` webhook: ${play.triggerStatus.webhook}`);
15452
15504
  }
15453
15505
  if (showCost) {
@@ -15461,7 +15513,7 @@ async function handlePlayList(args) {
15461
15513
  lines.push("List truncated \u2014 more plays are available.");
15462
15514
  lines.push(`Next page: ${nextPage}`);
15463
15515
  }
15464
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
15516
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
15465
15517
  {
15466
15518
  plays,
15467
15519
  count: plays.length,
@@ -15478,8 +15530,8 @@ async function handlePlayList(args) {
15478
15530
  return 0;
15479
15531
  }
15480
15532
  async function handlePlayPin(args, pinned) {
15481
- const target = _optionalChain([args, 'access', _547 => _547.find, 'call', _548 => _548((arg) => !arg.startsWith("-")), 'optionalAccess', _549 => _549.trim, 'call', _550 => _550()]);
15482
- const jsonOutput = _chunkNYDRX6JJjs.argsWantJson.call(void 0, args);
15533
+ const target = _optionalChain([args, 'access', _548 => _548.find, 'call', _549 => _549((arg) => !arg.startsWith("-")), 'optionalAccess', _550 => _550.trim, 'call', _551 => _551()]);
15534
+ const jsonOutput = _chunkQ3PUHXOYjs.argsWantJson.call(void 0, args);
15483
15535
  const dryRun = args.includes("--dry-run");
15484
15536
  if (!target) {
15485
15537
  console.error(
@@ -15497,11 +15549,11 @@ async function handlePlayPin(args, pinned) {
15497
15549
  const name = parsedTarget.playName;
15498
15550
  const plan = { name, pinned, dryRun };
15499
15551
  if (dryRun) {
15500
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, plan);
15552
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, plan);
15501
15553
  return 0;
15502
15554
  }
15503
- const result = await new (0, _chunkAPLRSERFjs.DeeplineClient)().setPlayPinned(name, pinned);
15504
- if (jsonOutput) _chunkNYDRX6JJjs.printCompactJson.call(void 0, result);
15555
+ const result = await new (0, _chunkAUMD2VXPjs.DeeplineClient)().setPlayPinned(name, pinned);
15556
+ if (jsonOutput) _chunkQ3PUHXOYjs.printCompactJson.call(void 0, result);
15505
15557
  else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
15506
15558
  return 0;
15507
15559
  }
@@ -15549,7 +15601,7 @@ function printPlayDescription(play) {
15549
15601
  console.log(` ${line}`);
15550
15602
  }
15551
15603
  }
15552
- if (_optionalChain([play, 'access', _551 => _551.toolCategories, 'optionalAccess', _552 => _552.length])) {
15604
+ if (_optionalChain([play, 'access', _552 => _552.toolCategories, 'optionalAccess', _553 => _553.length])) {
15553
15605
  console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
15554
15606
  }
15555
15607
  if (play.aliases.length > 0) {
@@ -15594,7 +15646,7 @@ function printPlayDescription(play) {
15594
15646
  const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
15595
15647
  if (runtimeLimit) {
15596
15648
  console.log(
15597
- ` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _553 => _553.runtimeLimit, 'optionalAccess', _554 => _554.source]), () => ( "live"))})`
15649
+ ` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _554 => _554.runtimeLimit, 'optionalAccess', _555 => _555.source]), () => ( "live"))})`
15598
15650
  );
15599
15651
  }
15600
15652
  printScheduledPlayCapacity(play.activeScheduledPlays);
@@ -15622,17 +15674,17 @@ function formatPlayGrepMatches(matches) {
15622
15674
  return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
15623
15675
  }
15624
15676
  async function handlePlayGrep(args) {
15625
- const query = _optionalChain([args, 'access', _555 => _555[0], 'optionalAccess', _556 => _556.trim, 'call', _557 => _557()]);
15677
+ const query = _optionalChain([args, 'access', _556 => _556[0], 'optionalAccess', _557 => _557.trim, 'call', _558 => _558()]);
15626
15678
  if (!query) {
15627
15679
  console.error("Usage: deepline plays grep <query> [--json]");
15628
15680
  return 1;
15629
15681
  }
15630
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
15682
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
15631
15683
  const results = (await client.listPlays({ grep: query })).map(
15632
15684
  summarizePlayGrepResult
15633
15685
  );
15634
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
15635
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, {
15686
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
15687
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, {
15636
15688
  plays: results,
15637
15689
  count: results.length,
15638
15690
  query,
@@ -15646,7 +15698,7 @@ async function handlePlayGrep(args) {
15646
15698
  `
15647
15699
  );
15648
15700
  for (const result of results) {
15649
- console.log(_optionalChain([result, 'access', _558 => _558.displayName, 'optionalAccess', _559 => _559.trim, 'call', _560 => _560()]) || result.name);
15701
+ console.log(_optionalChain([result, 'access', _559 => _559.displayName, 'optionalAccess', _560 => _560.trim, 'call', _561 => _561()]) || result.name);
15650
15702
  const matches = formatPlayGrepMatches(result.matches);
15651
15703
  if (matches) console.log(` Matched: ${matches}`);
15652
15704
  console.log(` Describe: ${result.describe}`);
@@ -15655,7 +15707,7 @@ async function handlePlayGrep(args) {
15655
15707
  return 0;
15656
15708
  }
15657
15709
  async function handlePlayDescribe(args) {
15658
- const selection = _chunkNYDRX6JJjs.parseJsonFields.call(void 0, args, "describe");
15710
+ const selection = _chunkQ3PUHXOYjs.parseJsonFields.call(void 0, args, "describe");
15659
15711
  args = selection.args;
15660
15712
  const playName = args[0];
15661
15713
  if (!playName) {
@@ -15689,8 +15741,8 @@ async function handlePlayDescribe(args) {
15689
15741
  `deepline plays check ${playName}`,
15690
15742
  ...definedName ? [`deepline describe <workspace>/${definedName}`] : []
15691
15743
  ];
15692
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
15693
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, {
15744
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
15745
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, {
15694
15746
  ok: false,
15695
15747
  error: { message },
15696
15748
  next
@@ -15704,7 +15756,7 @@ async function handlePlayDescribe(args) {
15704
15756
  }
15705
15757
  return 2;
15706
15758
  }
15707
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
15759
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
15708
15760
  await assertCanonicalNamedPlayReference(client, playName, {
15709
15761
  command: "describe"
15710
15762
  });
@@ -15714,9 +15766,9 @@ async function handlePlayDescribe(args) {
15714
15766
  compact: args.includes("--compact")
15715
15767
  }
15716
15768
  );
15717
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
15718
- if (selection.fields) _chunkNYDRX6JJjs.printJson.call(void 0, play, selection.fields);
15719
- else _chunkNYDRX6JJjs.printCompactJson.call(void 0, play);
15769
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
15770
+ if (selection.fields) _chunkQ3PUHXOYjs.printJson.call(void 0, play, selection.fields);
15771
+ else _chunkQ3PUHXOYjs.printCompactJson.call(void 0, play);
15720
15772
  return 0;
15721
15773
  }
15722
15774
  printPlayDescription(play);
@@ -15738,7 +15790,7 @@ async function handlePlaySave(args) {
15738
15790
  }
15739
15791
  let graph;
15740
15792
  try {
15741
- graph = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
15793
+ graph = await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
15742
15794
  "cli.play_save_bundle_graph",
15743
15795
  { targetKind: "file" },
15744
15796
  () => collectBundledPlayGraph(_path.resolve.call(void 0, options.target))
@@ -15760,7 +15812,7 @@ async function handlePlaySave(args) {
15760
15812
  next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
15761
15813
  };
15762
15814
  if (options.jsonOutput) {
15763
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, result);
15815
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, result);
15764
15816
  } else {
15765
15817
  console.error(result.message);
15766
15818
  console.error(` checked artifact: ${result.expectedArtifactHash}`);
@@ -15782,7 +15834,7 @@ async function handlePlaySave(args) {
15782
15834
  };
15783
15835
  if (options.dryRun) {
15784
15836
  if (options.jsonOutput) {
15785
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, dryRun);
15837
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, dryRun);
15786
15838
  } else {
15787
15839
  console.log(`Dry run: ${playName}`);
15788
15840
  console.log(` source: ${dryRun.sourceHash}`);
@@ -15791,14 +15843,14 @@ async function handlePlaySave(args) {
15791
15843
  }
15792
15844
  return 0;
15793
15845
  }
15794
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
15846
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
15795
15847
  try {
15796
- await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
15848
+ await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
15797
15849
  "cli.play_save_compile_manifests",
15798
15850
  { targetKind: "file", nodeCount: graph.nodes.size },
15799
15851
  () => compileBundledPlayGraphManifests(client, graph)
15800
15852
  );
15801
- const saved = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
15853
+ const saved = await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
15802
15854
  "cli.play_save_register_draft",
15803
15855
  { targetKind: "file", playName, artifactHash },
15804
15856
  () => client.registerPlayArtifact({
@@ -15827,7 +15879,7 @@ async function handlePlaySave(args) {
15827
15879
  }
15828
15880
  };
15829
15881
  if (options.jsonOutput) {
15830
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, result);
15882
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, result);
15831
15883
  } else {
15832
15884
  console.log(
15833
15885
  `\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
@@ -15853,7 +15905,7 @@ async function handlePlayPublish(args) {
15853
15905
  }
15854
15906
  const { target: playName, useLatest } = options;
15855
15907
  let revisionId = options.revisionId;
15856
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
15908
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
15857
15909
  if (isFileTarget2(playName)) {
15858
15910
  if (revisionId || useLatest) {
15859
15911
  console.error(
@@ -15863,7 +15915,7 @@ async function handlePlayPublish(args) {
15863
15915
  }
15864
15916
  let graph;
15865
15917
  try {
15866
- graph = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
15918
+ graph = await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
15867
15919
  "cli.play_publish_bundle_graph",
15868
15920
  { targetKind: "file" },
15869
15921
  () => collectBundledPlayGraph(_path.resolve.call(void 0, playName))
@@ -15885,7 +15937,7 @@ async function handlePlayPublish(args) {
15885
15937
  next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
15886
15938
  };
15887
15939
  if (options.jsonOutput) {
15888
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, result3);
15940
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, result3);
15889
15941
  } else {
15890
15942
  console.error(result3.message);
15891
15943
  console.error(` checked artifact: ${result3.expectedArtifactHash}`);
@@ -15908,7 +15960,7 @@ async function handlePlayPublish(args) {
15908
15960
  };
15909
15961
  if (options.dryRun) {
15910
15962
  if (options.jsonOutput) {
15911
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, dryRun);
15963
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, dryRun);
15912
15964
  } else {
15913
15965
  console.log(`Dry run: ${rootPlayName}`);
15914
15966
  console.log(` source: ${dryRun.sourceHash}`);
@@ -15927,12 +15979,12 @@ async function handlePlayPublish(args) {
15927
15979
  }
15928
15980
  }
15929
15981
  try {
15930
- await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
15982
+ await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
15931
15983
  "cli.play_publish_compile_manifests",
15932
15984
  { targetKind: "file", nodeCount: graph.nodes.size },
15933
15985
  () => compileBundledPlayGraphManifests(client, graph)
15934
15986
  );
15935
- await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
15987
+ await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
15936
15988
  "cli.play_publish_imports",
15937
15989
  { targetKind: "file", nodeCount: graph.nodes.size },
15938
15990
  () => publishImportedPlayDependencies(client, graph)
@@ -15941,7 +15993,7 @@ async function handlePlayPublish(args) {
15941
15993
  console.error(error instanceof Error ? error.message : String(error));
15942
15994
  return 1;
15943
15995
  }
15944
- const published = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
15996
+ const published = await _chunkE3PJF6YPjs.traceCliSpan.call(void 0,
15945
15997
  "cli.play_publish_register_root",
15946
15998
  {
15947
15999
  targetKind: "file",
@@ -15966,17 +16018,17 @@ async function handlePlayPublish(args) {
15966
16018
  artifactHash,
15967
16019
  liveVersion: _nullishCoalesce(published.version, () => ( null)),
15968
16020
  revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
15969
- previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _561 => _561.version]), () => ( null)),
15970
- previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _562 => _562.artifactHash]), () => ( null)),
16021
+ previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _562 => _562.version]), () => ( null)),
16022
+ previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _563 => _563.artifactHash]), () => ( null)),
15971
16023
  sourceBytes: {
15972
- before: _optionalChain([previousLive, 'optionalAccess', _563 => _563.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
16024
+ before: _optionalChain([previousLive, 'optionalAccess', _564 => _564.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
15973
16025
  after: Buffer.byteLength(graph.root.sourceCode, "utf8")
15974
16026
  },
15975
16027
  triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
15976
16028
  triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
15977
16029
  };
15978
16030
  if (options.jsonOutput) {
15979
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, result2);
16031
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, result2);
15980
16032
  } else {
15981
16033
  printPublishReceipt({
15982
16034
  name: rootPlayName,
@@ -16007,14 +16059,14 @@ async function handlePlayPublish(args) {
16007
16059
  revisionId: _nullishCoalesce(revisionId, () => ( null)),
16008
16060
  latest: useLatest
16009
16061
  };
16010
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, result2);
16062
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, result2);
16011
16063
  return 0;
16012
16064
  }
16013
16065
  const resolvedName = parseReferencedPlayTarget2(playName).playName;
16014
16066
  if (useLatest) {
16015
16067
  const versions = await client.listPlayVersions(resolvedName);
16016
16068
  const latest = versions[0];
16017
- if (!_optionalChain([latest, 'optionalAccess', _564 => _564._id])) {
16069
+ if (!_optionalChain([latest, 'optionalAccess', _565 => _565._id])) {
16018
16070
  console.error(`No saved revisions found for ${resolvedName}.`);
16019
16071
  return 1;
16020
16072
  }
@@ -16031,7 +16083,7 @@ async function handlePlayPublish(args) {
16031
16083
  revisionId ? { revisionId } : {}
16032
16084
  );
16033
16085
  if (options.jsonOutput) {
16034
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, result);
16086
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, result);
16035
16087
  } else {
16036
16088
  printPublishReceipt({
16037
16089
  name: result.name,
@@ -16071,7 +16123,7 @@ async function handlePlayDelete(args) {
16071
16123
  );
16072
16124
  return 2;
16073
16125
  }
16074
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
16126
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
16075
16127
  let detail;
16076
16128
  try {
16077
16129
  detail = await client.getPlay(parseReferencedPlayTarget2(playName).playName);
@@ -16095,8 +16147,8 @@ async function handlePlayDelete(args) {
16095
16147
  name: resolvedName,
16096
16148
  plannedMutation: "move saved org-owned play to Trash and stop triggers"
16097
16149
  };
16098
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
16099
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, result2);
16150
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
16151
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, result2);
16100
16152
  } else {
16101
16153
  process.stdout.write(
16102
16154
  `Dry run: would move ${result2.name} to Trash and stop its active triggers.
@@ -16106,8 +16158,8 @@ async function handlePlayDelete(args) {
16106
16158
  return 0;
16107
16159
  }
16108
16160
  const result = await client.deletePlay(resolvedName);
16109
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
16110
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, result);
16161
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
16162
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, result);
16111
16163
  return result.archived || result.alreadyArchived ? 0 : 4;
16112
16164
  }
16113
16165
  if (result.alreadyArchived) {
@@ -16146,13 +16198,13 @@ async function handlePlayRestore(args) {
16146
16198
  );
16147
16199
  return 2;
16148
16200
  }
16149
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
16201
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
16150
16202
  try {
16151
16203
  const result = await client.restorePlay(
16152
16204
  parseReferencedPlayTarget2(playName).playName
16153
16205
  );
16154
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
16155
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, result);
16206
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
16207
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, result);
16156
16208
  return result.restored || result.alreadyActive ? 0 : 4;
16157
16209
  }
16158
16210
  if (result.alreadyActive) {
@@ -16265,21 +16317,21 @@ Common commands:
16265
16317
  resume: `deepline plays resume-submission ${_chunkAID3OYVJjs.shellQuote.call(void 0, path)} --json`
16266
16318
  }
16267
16319
  };
16268
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0, result2, {
16320
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0, result2, {
16269
16321
  json: options.json,
16270
16322
  text: `Submission ${saved.workflowId}: admission is unknown. ${result2.next.inspect}
16271
16323
  `
16272
16324
  });
16273
16325
  return;
16274
16326
  }
16275
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
16327
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
16276
16328
  if (new URL(saved.baseUrl).origin !== new URL(client.baseUrl).origin) {
16277
16329
  throw new Error(
16278
16330
  "The submission belongs to a different API origin. Select its original host before recovery."
16279
16331
  );
16280
16332
  }
16281
16333
  const result = await client.startPlayRun(saved.request);
16282
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
16334
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
16283
16335
  { ...result },
16284
16336
  {
16285
16337
  json: options.json,
@@ -16315,7 +16367,7 @@ Examples:
16315
16367
  ).action(async (target, options) => {
16316
16368
  process.exitCode = await handlePlayCheck([
16317
16369
  target,
16318
- ..._chunkNYDRX6JJjs.jsonFieldArgs.call(void 0, options.json),
16370
+ ..._chunkQ3PUHXOYjs.jsonFieldArgs.call(void 0, options.json),
16319
16371
  ...options.full ? ["--full"] : []
16320
16372
  ]);
16321
16373
  });
@@ -16506,7 +16558,7 @@ JSON field selection:
16506
16558
  passthroughArgs
16507
16559
  )
16508
16560
  );
16509
- _chunkAYHLUHE5js.recordCliTrace.call(void 0, {
16561
+ _chunkE3PJF6YPjs.recordCliTrace.call(void 0, {
16510
16562
  phase: "cli.play_command_exit",
16511
16563
  exitCode
16512
16564
  });
@@ -16556,9 +16608,9 @@ Examples:
16556
16608
  const limit = Number(options.historyLimit);
16557
16609
  if (!Number.isInteger(limit) || limit < 1 || limit > 30)
16558
16610
  throw new Error("--history-limit must be an integer from 1 to 30.");
16559
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
16611
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
16560
16612
  if (options.binding) {
16561
- _chunkNYDRX6JJjs.printCompactJson.call(void 0,
16613
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0,
16562
16614
  await client.getPlayTriggerHistory(options.binding, { limit })
16563
16615
  );
16564
16616
  return;
@@ -16566,7 +16618,7 @@ Examples:
16566
16618
  const result = await client.listPlayTriggerInventory({
16567
16619
  cursor: options.cursor
16568
16620
  });
16569
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, {
16621
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, {
16570
16622
  ...result,
16571
16623
  next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)}`
16572
16624
  });
@@ -16613,7 +16665,7 @@ Examples:
16613
16665
  if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
16614
16666
  throw new Error("--group-by must be kind or trigger_source.");
16615
16667
  }
16616
- const result = await new (0, _chunkAPLRSERFjs.DeeplineClient)().getPlaysActivity({
16668
+ const result = await new (0, _chunkAUMD2VXPjs.DeeplineClient)().getPlaysActivity({
16617
16669
  timeZone: options.timeZone,
16618
16670
  days,
16619
16671
  ...options.endDate ? { endDate: options.endDate } : {},
@@ -16627,7 +16679,7 @@ Examples:
16627
16679
  `${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
16628
16680
  );
16629
16681
  }
16630
- _chunkNYDRX6JJjs.printCommandEnvelope.call(void 0,
16682
+ _chunkQ3PUHXOYjs.printCommandEnvelope.call(void 0,
16631
16683
  { ...result },
16632
16684
  {
16633
16685
  json: Boolean(options.json),
@@ -16656,7 +16708,7 @@ Examples:
16656
16708
  false
16657
16709
  );
16658
16710
  });
16659
- _chunkN43PX2CAjs.registerDeprecatedSearchCommand.call(void 0,
16711
+ _chunkQ3LFI3VHjs.registerDeprecatedSearchCommand.call(void 0,
16660
16712
  play,
16661
16713
  (options) => options.all ? ["plays"] : ["prebuilts"]
16662
16714
  );
@@ -16699,7 +16751,7 @@ Examples:
16699
16751
  );
16700
16752
  _chunkZAAKSJASjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
16701
16753
  async (target, options) => {
16702
- const ownView = () => handlePlayDescribe(_chunkNYDRX6JJjs.describeArgs.call(void 0, target, options));
16754
+ const ownView = () => handlePlayDescribe(_chunkQ3PUHXOYjs.describeArgs.call(void 0, target, options));
16703
16755
  const [flagText] = [options.json].filter(
16704
16756
  (value) => typeof value === "string"
16705
16757
  );
@@ -16710,7 +16762,7 @@ Examples:
16710
16762
  process.exitCode = await ownView();
16711
16763
  return;
16712
16764
  }
16713
- const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-NFX6THJE.js")));
16765
+ const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-EZS6PQXA.js")));
16714
16766
  process.exitCode = await describeAnything(
16715
16767
  name,
16716
16768
  {
@@ -16828,7 +16880,7 @@ Examples:
16828
16880
  deepline plays deployments <deployment-id>
16829
16881
  `
16830
16882
  ).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output").action(
16831
- async (id, options) => id ? _chunkFQBKK5DGjs.handleDeploymentGet.call(void 0, id, options) : _chunkFQBKK5DGjs.handleDeploymentsList.call(void 0, options)
16883
+ async (id, options) => id ? _chunk3ZB6IIA7js.handleDeploymentGet.call(void 0, id, options) : _chunk3ZB6IIA7js.handleDeploymentsList.call(void 0, options)
16832
16884
  );
16833
16885
  addPublishHelp(
16834
16886
  play.command("publish <target>").description(
@@ -16963,14 +17015,14 @@ Examples:
16963
17015
  const limit = Number(options.limit);
16964
17016
  if (!Number.isSafeInteger(limit) || limit < 1 || limit > 1e3)
16965
17017
  throw new Error("--limit must be an integer from 1 to 1000.");
16966
- const result = await new (0, _chunkAPLRSERFjs.DeeplineClient)().runs.rowHistory({
17018
+ const result = await new (0, _chunkAUMD2VXPjs.DeeplineClient)().runs.rowHistory({
16967
17019
  playName: options.play,
16968
17020
  runId,
16969
17021
  tableNamespace: options.dataset,
16970
17022
  limit,
16971
17023
  cursor: options.cursor
16972
17024
  });
16973
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, {
17025
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, {
16974
17026
  ...result,
16975
17027
  ...result.nextCursor ? {
16976
17028
  next: `deepline runs rows-history ${_chunkAID3OYVJjs.shellQuote.call(void 0, runId)} --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.play)} --dataset ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.dataset)} --limit ${limit} --cursor ${_chunkAID3OYVJjs.shellQuote.call(void 0, result.nextCursor)} --json`
@@ -17040,7 +17092,7 @@ Examples:
17040
17092
  ).action(async (runId, options) => {
17041
17093
  process.exitCode = await handleRunGet([
17042
17094
  runId,
17043
- ..._chunkNYDRX6JJjs.jsonFieldArgs.call(void 0, options.json),
17095
+ ..._chunkQ3PUHXOYjs.jsonFieldArgs.call(void 0, options.json),
17044
17096
  ...options.webUrl ? ["--web-url"] : [],
17045
17097
  ...options.full ? ["--full"] : [],
17046
17098
  ...options.input ? ["--input"] : [],
@@ -17325,7 +17377,7 @@ Examples:
17325
17377
  ...options.allowEmpty ? ["--allow-empty"] : [],
17326
17378
  ...options.wait ? ["--wait"] : [],
17327
17379
  ...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
17328
- ..._chunkNYDRX6JJjs.jsonFieldArgs.call(void 0, options.json)
17380
+ ..._chunkQ3PUHXOYjs.jsonFieldArgs.call(void 0, options.json)
17329
17381
  ]);
17330
17382
  });
17331
17383
  const share = play.command("share").description(
@@ -17466,8 +17518,8 @@ function absolutePublicPlayUrl(path) {
17466
17518
  }
17467
17519
  function shareUrlFields(status) {
17468
17520
  return {
17469
- publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _565 => _565.share, 'optionalAccess', _566 => _566.publicPath])),
17470
- canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _567 => _567.share, 'optionalAccess', _568 => _568.canonicalPath]))
17521
+ publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _566 => _566.share, 'optionalAccess', _567 => _567.publicPath])),
17522
+ canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _568 => _568.share, 'optionalAccess', _569 => _569.canonicalPath]))
17471
17523
  };
17472
17524
  }
17473
17525
  function shareStatusForOutput(status) {
@@ -17491,10 +17543,10 @@ async function handlePlayShareStatus(args) {
17491
17543
  return 2;
17492
17544
  }
17493
17545
  const name = parseReferencedPlayTarget2(target).playName;
17494
- const status = await new (0, _chunkAPLRSERFjs.DeeplineClient)().getSharePage(name);
17546
+ const status = await new (0, _chunkAUMD2VXPjs.DeeplineClient)().getSharePage(name);
17495
17547
  const outputStatus = shareStatusForOutput(status);
17496
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
17497
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, outputStatus);
17548
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
17549
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, outputStatus);
17498
17550
  return 0;
17499
17551
  }
17500
17552
  if (!outputStatus.share) {
@@ -17533,7 +17585,7 @@ async function handlePlaySharePublish(args) {
17533
17585
  return 2;
17534
17586
  }
17535
17587
  const name = parseReferencedPlayTarget2(target).playName;
17536
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
17588
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
17537
17589
  let revisionId = shareFlagValue(args, "--revision-id");
17538
17590
  let resolvedVersion;
17539
17591
  if (!revisionId) {
@@ -17564,8 +17616,8 @@ async function handlePlaySharePublish(args) {
17564
17616
  );
17565
17617
  if (!hasCompleted) {
17566
17618
  const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
17567
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
17568
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, {
17619
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
17620
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, {
17569
17621
  ok: false,
17570
17622
  code: "NO_SUCCESSFUL_RUN",
17571
17623
  message,
@@ -17589,8 +17641,8 @@ async function handlePlaySharePublish(args) {
17589
17641
  };
17590
17642
  if (args.includes("--dry-run")) {
17591
17643
  const plan = { dryRun: true, name, version: resolvedVersion, ...request };
17592
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
17593
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, plan);
17644
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
17645
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, plan);
17594
17646
  } else {
17595
17647
  console.log(
17596
17648
  `Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
@@ -17600,13 +17652,13 @@ async function handlePlaySharePublish(args) {
17600
17652
  }
17601
17653
  const status = await client.publishSharePage(name, request);
17602
17654
  const outputStatus = shareStatusForOutput(status);
17603
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
17604
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, outputStatus);
17655
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
17656
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, outputStatus);
17605
17657
  return 0;
17606
17658
  }
17607
17659
  const urls = shareUrlFields(outputStatus);
17608
17660
  console.log(
17609
- `Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _569 => _569.share, 'optionalAccess', _570 => _570.publicPath]))), () => ( ""))}`
17661
+ `Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _570 => _570.share, 'optionalAccess', _571 => _571.publicPath]))), () => ( ""))}`
17610
17662
  );
17611
17663
  if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
17612
17664
  console.log(`Version URL: ${urls.canonicalUrl}`);
@@ -17632,9 +17684,9 @@ async function handlePlayShareUpdate(args) {
17632
17684
  ...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
17633
17685
  ...seoIndexing ? { seoIndexing } : {}
17634
17686
  };
17635
- const status = await new (0, _chunkAPLRSERFjs.DeeplineClient)().updateSharePage(name, request);
17636
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
17637
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, status);
17687
+ const status = await new (0, _chunkAUMD2VXPjs.DeeplineClient)().updateSharePage(name, request);
17688
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
17689
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, status);
17638
17690
  return 0;
17639
17691
  }
17640
17692
  console.log(`Updated ${name} share settings.`);
@@ -17649,13 +17701,13 @@ async function handlePlayShareRegenerate(args) {
17649
17701
  return 2;
17650
17702
  }
17651
17703
  const name = parseReferencedPlayTarget2(target).playName;
17652
- const client = new (0, _chunkAPLRSERFjs.DeeplineClient)();
17704
+ const client = new (0, _chunkAUMD2VXPjs.DeeplineClient)();
17653
17705
  let revisionId = shareFlagValue(args, "--revision-id");
17654
17706
  const versionFlag = shareFlagValue(args, "--version");
17655
17707
  if (!revisionId && versionFlag) {
17656
17708
  const versions = await client.listPlayVersions(name);
17657
17709
  const chosen = versions.find((r) => r.version === Number(versionFlag));
17658
- if (!_optionalChain([chosen, 'optionalAccess', _571 => _571._id])) {
17710
+ if (!_optionalChain([chosen, 'optionalAccess', _572 => _572._id])) {
17659
17711
  console.error(`Version ${versionFlag} not found for ${name}.`);
17660
17712
  return 4;
17661
17713
  }
@@ -17666,12 +17718,12 @@ async function handlePlayShareRegenerate(args) {
17666
17718
  revisionId ? { revisionId } : {}
17667
17719
  );
17668
17720
  const outputStatus = shareStatusForOutput(status);
17669
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
17670
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, outputStatus);
17721
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
17722
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, outputStatus);
17671
17723
  return 0;
17672
17724
  }
17673
17725
  const urls = shareUrlFields(outputStatus);
17674
- const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _572 => _572.share, 'optionalAccess', _573 => _573.publishedRevisionId]) === revisionId;
17726
+ const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _573 => _573.share, 'optionalAccess', _574 => _574.publishedRevisionId]) === revisionId;
17675
17727
  console.log(
17676
17728
  `Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
17677
17729
  );
@@ -17692,9 +17744,9 @@ async function handlePlayShareUnpublish(args) {
17692
17744
  return 2;
17693
17745
  }
17694
17746
  const name = parseReferencedPlayTarget2(target).playName;
17695
- const status = await new (0, _chunkAPLRSERFjs.DeeplineClient)().unpublishSharePage(name);
17696
- if (_chunkNYDRX6JJjs.argsWantJson.call(void 0, args)) {
17697
- _chunkNYDRX6JJjs.printCompactJson.call(void 0, status);
17747
+ const status = await new (0, _chunkAUMD2VXPjs.DeeplineClient)().unpublishSharePage(name);
17748
+ if (_chunkQ3PUHXOYjs.argsWantJson.call(void 0, args)) {
17749
+ _chunkQ3PUHXOYjs.printCompactJson.call(void 0, status);
17698
17750
  return 0;
17699
17751
  }
17700
17752
  console.log(`Unpublished ${name}; the public page has been removed.`);