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
@@ -3,7 +3,7 @@ import {
3
3
  detectAgentRuntime,
4
4
  resolveCliCommandContext,
5
5
  resolveConfig
6
- } from "./chunk-CGX4NSS3.mjs";
6
+ } from "./chunk-SD7MXAJA.mjs";
7
7
  import {
8
8
  DeeplineError,
9
9
  serializeToolExecutionFailure
@@ -118,6 +118,68 @@ function describeArgs(target, options) {
118
118
  ];
119
119
  }
120
120
 
121
+ // src/cli/json-mode.ts
122
+ var ANSI_PATTERN = /\x1b\[[0-9;?]*[A-Za-z]|\r/g;
123
+ var installed = false;
124
+ var pending = [];
125
+ var rawStderrWrite = null;
126
+ var stdoutWritten = false;
127
+ function isJsonOutputMode() {
128
+ return process.argv.includes("--json");
129
+ }
130
+ function installJsonStderrGuard() {
131
+ if (installed || !isJsonOutputMode()) return;
132
+ installed = true;
133
+ rawStderrWrite = process.stderr.write.bind(process.stderr);
134
+ const stdoutWrite = process.stdout.write.bind(process.stdout);
135
+ process.stdout.write = ((...args) => {
136
+ stdoutWritten = true;
137
+ return stdoutWrite(...args);
138
+ });
139
+ const capture = (chunk) => {
140
+ const text = (typeof chunk === "string" ? chunk : chunk instanceof Uint8Array ? Buffer.from(chunk).toString("utf8") : String(chunk)).replace(ANSI_PATTERN, "").trim();
141
+ if (text) pending.push(text);
142
+ };
143
+ process.stderr.write = ((chunk, ...rest) => {
144
+ capture(chunk);
145
+ const callback = rest.find((arg) => typeof arg === "function");
146
+ callback?.();
147
+ return true;
148
+ });
149
+ const toNotice = (...args) => capture(
150
+ args.map(
151
+ (arg) => typeof arg === "string" ? arg : arg instanceof Error ? arg.message : JSON.stringify(arg)
152
+ ).join(" ")
153
+ );
154
+ console.error = toNotice;
155
+ console.warn = toNotice;
156
+ }
157
+ function addJsonNotice(notice) {
158
+ if (installed) pending.push(notice);
159
+ }
160
+ function writeRawStderr(text) {
161
+ (rawStderrWrite ?? process.stderr.write.bind(process.stderr))(text);
162
+ }
163
+ function takeSilentJsonFailureMessage(exitCode) {
164
+ if (!installed || stdoutWritten || !exitCode || Number(exitCode) === 0) {
165
+ return null;
166
+ }
167
+ const index = pending.findIndex((notice) => typeof notice === "string");
168
+ if (index === -1) return "Command failed without an error message.";
169
+ const [message] = pending.splice(index, 1);
170
+ return message;
171
+ }
172
+ function withJsonNotices(value) {
173
+ if (pending.length === 0 || value === null || typeof value !== "object" || Array.isArray(value)) {
174
+ return value;
175
+ }
176
+ const record = value;
177
+ const existing = Array.isArray(record.notices) ? record.notices : [];
178
+ const notices = [...existing, ...pending];
179
+ pending = [];
180
+ return { ...record, notices };
181
+ }
182
+
121
183
  // src/cli/utils.ts
122
184
  import { createHash } from "crypto";
123
185
  import {
@@ -821,13 +883,15 @@ function withAgentCommandContext(value) {
821
883
  }
822
884
  function printJson(value, fields) {
823
885
  process.stdout.write(
824
- `${JSON.stringify(selectJsonFields(withAgentCommandContext(value), fields), null, 2)}
886
+ `${JSON.stringify(withJsonNotices(selectJsonFields(withAgentCommandContext(value), fields)), null, 2)}
825
887
  `
826
888
  );
827
889
  }
828
890
  function printCompactJson(value) {
829
- process.stdout.write(`${JSON.stringify(withAgentCommandContext(value))}
830
- `);
891
+ process.stdout.write(
892
+ `${JSON.stringify(withJsonNotices(withAgentCommandContext(value)))}
893
+ `
894
+ );
831
895
  }
832
896
  function cliToolExecutionFailure(error) {
833
897
  const failure = serializeToolExecutionFailure(error);
@@ -976,6 +1040,11 @@ export {
976
1040
  parseJsonFields,
977
1041
  jsonFieldArgs,
978
1042
  describeArgs,
1043
+ isJsonOutputMode,
1044
+ installJsonStderrGuard,
1045
+ addJsonNotice,
1046
+ writeRawStderr,
1047
+ takeSilentJsonFailureMessage,
979
1048
  getAuthedHttpClient,
980
1049
  openInBrowser,
981
1050
  sleep,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getAuthedHttpClient,
3
3
  printCommandEnvelope
4
- } from "./chunk-5IGBBYXH.mjs";
4
+ } from "./chunk-4CFULMRB.mjs";
5
5
  import {
6
6
  agentSessionIdFromEnvironment
7
- } from "./chunk-CGX4NSS3.mjs";
7
+ } from "./chunk-SD7MXAJA.mjs";
8
8
 
9
9
  // src/cli/commands/sessions.ts
10
10
  import {
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkKPU53YBBjs = require('./chunk-KPU53YBB.js');
3
+ var _chunk2XXXFPTDjs = require('./chunk-2XXXFPTD.js');
4
4
 
5
5
  // src/cli/npm-script-policy.ts
6
6
  var _child_process = require('child_process');
@@ -13,7 +13,7 @@ function npmSupportsAllowScripts(version) {
13
13
  }
14
14
  function readNpmVersion(env) {
15
15
  try {
16
- const plan = _chunkKPU53YBBjs.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
16
+ const plan = _chunk2XXXFPTDjs.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
17
17
  const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
18
18
  encoding: "utf8",
19
19
  env,
@@ -1,9 +1,10 @@
1
+ import {
2
+ isJsonOutputMode
3
+ } from "./chunk-4CFULMRB.mjs";
4
+
1
5
  // src/cli/progress.ts
2
6
  import { Worker } from "worker_threads";
3
7
  var CliProgress = class {
4
- constructor(enabled) {
5
- this.enabled = enabled;
6
- }
7
8
  lastMessage = null;
8
9
  interactive = Boolean(process.stderr.isTTY);
9
10
  grey = "\x1B[90m";
@@ -11,6 +12,11 @@ var CliProgress = class {
11
12
  dim = "\x1B[2m";
12
13
  reset = "\x1B[0m";
13
14
  worker = null;
15
+ enabled;
16
+ // --json output is one JSON document: progress never renders under it.
17
+ constructor(enabled) {
18
+ this.enabled = enabled && !isJsonOutputMode();
19
+ }
14
20
  phase(message) {
15
21
  if (!this.enabled || this.lastMessage === message) {
16
22
  return;
@@ -34,6 +40,7 @@ var CliProgress = class {
34
40
  this.settle("\u2717");
35
41
  }
36
42
  writeLogLine(line) {
43
+ if (isJsonOutputMode()) return;
37
44
  if (!this.enabled) {
38
45
  process.stderr.write(`${line}
39
46
  `);
@@ -24,7 +24,7 @@ var _chunkKXMNM4AQjs = require('./chunk-KXMNM4AQ.js');
24
24
 
25
25
 
26
26
 
27
- var _chunkYSAZVLJDjs = require('./chunk-YSAZVLJD.js');
27
+ var _chunkQUAQX3FQjs = require('./chunk-QUAQX3FQ.js');
28
28
 
29
29
 
30
30
  var _chunkQ2E4E4FJjs = require('./chunk-Q2E4E4FJ.js');
@@ -2889,8 +2889,8 @@ function runtimeSelectionHeaders(runtime, env) {
2889
2889
  }
2890
2890
  const receivers = _optionalChain([env, 'access', _97 => _97.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _98 => _98.trim, 'call', _99 => _99()]);
2891
2891
  return {
2892
- [_chunkYSAZVLJDjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
2893
- ...receivers ? { [_chunkYSAZVLJDjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
2892
+ [_chunkQUAQX3FQjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
2893
+ ...receivers ? { [_chunkQUAQX3FQjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
2894
2894
  };
2895
2895
  }
2896
2896
  function isolatedCiRuntimeEventReadHeaders(env) {
@@ -2906,7 +2906,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
2906
2906
  "RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
2907
2907
  );
2908
2908
  }
2909
- return { [_chunkYSAZVLJDjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
2909
+ return { [_chunkQUAQX3FQjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
2910
2910
  }
2911
2911
  function normalizeTestPolicyOverrides(value, source) {
2912
2912
  if (value && typeof value === "object" && !Array.isArray(value)) {
@@ -3197,9 +3197,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
3197
3197
  * @throws {@link ConfigError} if no API key can be resolved from any source.
3198
3198
  */
3199
3199
  constructor(options) {
3200
- this.config = _chunkYSAZVLJDjs.resolveConfig.call(void 0, options);
3200
+ this.config = _chunkQUAQX3FQjs.resolveConfig.call(void 0, options);
3201
3201
  this.environment = _nullishCoalesce(this.config.environment, () => ( process.env));
3202
- this.http = new (0, _chunkYSAZVLJDjs.HttpClient)(this.config);
3202
+ this.http = new (0, _chunkQUAQX3FQjs.HttpClient)(this.config);
3203
3203
  this.toolCalls = new ToolCalls(
3204
3204
  this.http,
3205
3205
  this.config.timeout,
@@ -3432,8 +3432,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
3432
3432
  /**
3433
3433
  * Search available tools using Deepline's ranked backend search.
3434
3434
  *
3435
- * This is the same discovery surface used by the CLI: it ranks across
3436
- * tool metadata, categories, agent guidance, and input schema fields.
3435
+ * The CLI uses the same search.
3436
+ * The search ranks tool metadata, categories, agent guidance, and input schema fields.
3437
3437
  */
3438
3438
  async searchTools(options = {}) {
3439
3439
  return this.http.get(
@@ -3498,13 +3498,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
3498
3498
  /**
3499
3499
  * Describe a Deepline Agent model and its provider-specific option surface.
3500
3500
  *
3501
- * Combines live AI Gateway model metadata with Deepline's generated AI SDK
3502
- * provider option registry so agents can construct `providerOptions`
3503
- * payloads before executing `deeplineagent`.
3501
+ * The method combines live AI Gateway model metadata with Deepline's generated registry of AI SDK provider options.
3502
+ * Agents can use this information to construct `providerOptions` payloads before they execute `deeplineagent`.
3504
3503
  *
3505
- * The returned option schemas describe accepted provider option shapes, not
3506
- * guaranteed support for every model. Runtime AI SDK/Gateway errors remain
3507
- * authoritative for model-gated values.
3504
+ * The returned schemas describe accepted shapes for provider options.
3505
+ * These schemas do not guarantee that every model supports each option.
3506
+ * Runtime AI SDK and Gateway errors determine support for model-specific values.
3508
3507
  *
3509
3508
  * @param model - Exact-case Gateway model id such as `"openai/gpt-5.6-luna"`
3510
3509
  * @returns Model metadata, provider option shapes, and runnable examples
@@ -3520,8 +3519,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
3520
3519
  /**
3521
3520
  * Quote dynamic AI inference pricing for a concrete payload.
3522
3521
  *
3523
- * The result separates a planning estimate from a proven authorization
3524
- * maximum and contains Deepline credits only.
3522
+ * The result contains a planning estimate and a separate, proven authorization maximum.
3523
+ * Both values use Deepline credits.
3525
3524
  */
3526
3525
  async quoteInferenceTool(toolId, payload) {
3527
3526
  return this.http.post(
@@ -3596,13 +3595,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
3596
3595
  * entrypoints: the CLI, {@link Deepline.connect}, {@link submitPlay},
3597
3596
  * or {@link runPlay}.
3598
3597
  *
3599
- * Supported invocation surfaces intentionally share this same run contract:
3600
- * `deepline plays run`, repo scripts such as `bun run deepline -- plays run`,
3601
- * SDK context calls like `Deepline.connect().play(name).run()`, and direct
3602
- * `POST /api/v2/plays/run` calls all return a workflow/run id. The completed
3603
- * output is always retrievable from `getPlayStatus(runId).result` (or from
3604
- * `PlayJob.get()` for SDK context calls). Execution logs live under
3605
- * `progress.logs`; they are not part of the user output object.
3598
+ * These interfaces share the run contract and return a workflow or run ID:
3599
+ *
3600
+ * - `deepline plays run`.
3601
+ * - Repository scripts such as `bun run deepline -- plays run`.
3602
+ * - SDK context calls such as `Deepline.connect().play(name).run()`.
3603
+ * - Direct `POST /api/v2/plays/run` calls.
3604
+ *
3605
+ * Read completed output from `getPlayStatus(runId).result`.
3606
+ * For SDK context calls, read output from `PlayJob.get()`.
3607
+ * Execution logs appear under `progress.logs`. The user output object does not contain these logs.
3606
3608
  *
3607
3609
  * @param request - Play run configuration (name, code, input, etc.)
3608
3610
  * @returns Run metadata including the public `workflowId`
@@ -3767,9 +3769,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
3767
3769
  /**
3768
3770
  * Compile a bundled play artifact into the server-side compiler manifest.
3769
3771
  *
3770
- * The manifest records imports, trigger bindings, static pipeline shape, and
3771
- * runtime metadata needed before a play artifact can be checked, registered,
3772
- * or run.
3772
+ * The manifest records imports, trigger bindings, static pipeline shape, and runtime metadata.
3773
+ * The compiler needs these records before it checks, registers, or runs a Play artifact.
3773
3774
  */
3774
3775
  async compilePlayManifest(input) {
3775
3776
  const retryDelays = COMPILE_MANIFEST_RETRY_DELAYS_MS.slice(
@@ -3816,8 +3817,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
3816
3817
  /**
3817
3818
  * Register an already-bundled play artifact and start a run from it.
3818
3819
  *
3819
- * This is the low-level file-backed run path used by SDK/CLI packaging
3820
- * wrappers after local bundling has produced the runtime artifact.
3820
+ * SDK and CLI packaging wrappers use this low-level run method for file-based Plays.
3821
+ * Local bundling must produce the runtime artifact first.
3821
3822
  */
3822
3823
  async startPlayRunFromBundle(input) {
3823
3824
  const compilerManifest = await _asyncNullishCoalesce(input.compilerManifest, async () => ( await this.compilePlayManifest({
@@ -3855,15 +3856,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
3855
3856
  /**
3856
3857
  * Register a bundled play artifact and start a run from the live revision.
3857
3858
  *
3858
- * Convenience wrapper around {@link registerPlayArtifact} plus
3859
- * {@link startPlayRun}. This is the canonical file-backed path used by wrappers.
3860
- * The returned id can be passed to {@link getPlayStatus} to retrieve the same
3861
- * durable `{ result }` object that the CLI prints after `plays run` completes.
3859
+ * This method wraps {@link registerPlayArtifact} and {@link startPlayRun}.
3860
+ * Packaging wrappers use this method for file-based Plays.
3861
+ * Pass the returned ID to {@link getPlayStatus}.
3862
+ * The method returns the same durable `{ result }` object that the CLI prints after `plays run` completes.
3862
3863
  *
3863
- * @param code - Source string fallback; the bundled artifact should be passed in `options.artifact`
3864
- * @param csvPath - Path to input CSV file, or `null`
3865
- * @param name - Play name (extracted from source if omitted)
3866
- * @param options - Additional submission options
3864
+ * @param code - Fallback source string. Pass the bundled artifact in `options.artifact`.
3865
+ * @param csvPath - Path to the input CSV file, or `null`.
3866
+ * @param name - Play name. The SDK derives it from the source when omitted.
3867
+ * @param options - Additional submission options.
3867
3868
  * @returns Workflow metadata with `workflowId`
3868
3869
  *
3869
3870
  * @example
@@ -3956,9 +3957,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
3956
3957
  /**
3957
3958
  * Mint short-lived presigned upload targets for staged play files.
3958
3959
  *
3959
- * Internal primitive used by {@link stagePlayFiles}. The server returns an
3960
- * already-staged ref (no upload needed) for content-addressed files it
3961
- * already holds, or a presigned PUT URL the caller uploads the body to.
3960
+ * Internal primitive used by {@link stagePlayFiles}. For a content-addressed file already in storage, the server returns a staged reference. That file needs no upload.
3961
+ * For other files, the server returns a presigned PUT URL. Upload the file body to that URL.
3962
3962
  */
3963
3963
  async mintStagedPlayFileUploads(files) {
3964
3964
  return _chunkUHNDVD3Pjs.mintStagedPlayFileUploads.call(void 0, this.http, files);
@@ -3966,8 +3966,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3966
3966
  /**
3967
3967
  * Resolve staged play files by content hash without uploading bytes.
3968
3968
  *
3969
- * Missing files are returned so callers can upload only the files the server
3970
- * does not already have.
3969
+ * The response identifies missing files. Callers need to upload only these files.
3971
3970
  */
3972
3971
  async resolveStagedPlayFiles(files) {
3973
3972
  return this.http.post("/api/v2/plays/files/stage", { files });
@@ -4451,11 +4450,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
4451
4450
  /**
4452
4451
  * Start a fresh run from a prior run's retained input and pinned revision.
4453
4452
  *
4454
- * Every invocation sends an `Idempotency-Key`. When the caller does not
4455
- * supply one, a fresh key is generated once per call so the transport's own
4456
- * network retries converge on a single rerun. Pass the same explicit key
4457
- * across separate invocations to repeat an ambiguous result safely; a
4458
- * different key intentionally starts another rerun.
4453
+ * Every invocation sends an `Idempotency-Key`.
4454
+ * When the caller supplies no key, the SDK creates a fresh key once per call.
4455
+ * The transport reuses that key for network retries, so those retries produce one rerun.
4456
+ * Reuse an explicit key across separate invocations when the previous result is uncertain.
4457
+ * A different key starts another rerun.
4459
4458
  */
4460
4459
  async rerun(runId, options) {
4461
4460
  const idempotencyKey = _optionalChain([options, 'optionalAccess', _214 => _214.idempotencyKey, 'optionalAccess', _215 => _215.trim, 'call', _216 => _216()]);
@@ -4795,8 +4794,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
4795
4794
  );
4796
4795
  }
4797
4796
  /**
4798
- * Stop every active run visible to the current workspace, or with
4799
- * `dryRun: true` enumerate the exact candidates without cancelling anything.
4797
+ * Stop every active run visible to the current workspace.
4798
+ * With `dryRun: true`, list the exact candidates without cancelling any run.
4800
4799
  *
4801
4800
  * This is the SDK equivalent of:
4802
4801
  *
@@ -4805,8 +4804,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
4805
4804
  * deepline runs stop-all --reason "stale lock"
4806
4805
  * ```
4807
4806
  *
4808
- * Use this when a failed parent run left child or waiting runs active and you
4809
- * need to clear the workspace run-slot state without knowing each run id.
4807
+ * Use this method when a failed parent leaves active child or waiting runs.
4808
+ * The method clears workspace run-slot state without requiring each run ID.
4810
4809
  */
4811
4810
  async stopAllRuns(options) {
4812
4811
  const dryRun = _optionalChain([options, 'optionalAccess', _241 => _241.dryRun]) === true;
@@ -4827,8 +4826,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
4827
4826
  return result;
4828
4827
  }
4829
4828
  /**
4830
- * List one page of callable plays; grep retains exhaustive matching results.
4831
- * Use listPlaysPage to retain pagination metadata.
4829
+ * List one page of callable Plays. With grep, the method retains all matching results.
4830
+ * Use listPlaysPage for pagination metadata.
4832
4831
  *
4833
4832
  * Pass `origin: "prebuilt"` for Deepline-managed prebuilts or
4834
4833
  * `origin: "owned"` for org-owned plays.
@@ -5265,8 +5264,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5265
5264
  /**
5266
5265
  * Get the full definition and state of a named play.
5267
5266
  *
5268
- * Returns the play's revision state (draft, live), recent runs,
5269
- * sheet processing summary, and database URL.
5267
+ * The response includes revision state (draft or live), recent runs, a summary of sheet processing, and the database URL.
5270
5268
  *
5271
5269
  * @param name - Play name
5272
5270
  * @returns Complete play detail
@@ -5303,10 +5301,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
5303
5301
  /**
5304
5302
  * Get a normalized play description suitable for agents and CLIs.
5305
5303
  *
5306
- * The description includes runnable examples, input/output summaries, clone
5307
- * guidance, revision state, and latest run metadata when available. Pass
5308
- * `{ pipeline: true }` to include the compiled pipeline, which can be
5309
- * hundreds of kilobytes and is otherwise left out.
5304
+ * The description includes runnable examples, input and output summaries, clone guidance, and revision state.
5305
+ * It also includes metadata for the latest run when available.
5306
+ * Set `{ pipeline: true }` to include the compiled pipeline.
5307
+ * The pipeline can be hundreds of kilobytes. The response omits it by default.
5310
5308
  */
5311
5309
  async describePlay(name, options = {}) {
5312
5310
  if (options.pipeline) {
@@ -5355,8 +5353,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5355
5353
  * Make a play revision live.
5356
5354
  *
5357
5355
  * When `revisionId` is omitted, the current working revision becomes live.
5358
- * The live version is what executes when the play is run by name without
5359
- * specifying an explicit revision.
5356
+ * A call by Play name executes the live revision unless the caller specifies another revision.
5360
5357
  *
5361
5358
  * @param name - Play name
5362
5359
  * @param request - Optional explicit revision to make live
@@ -5615,9 +5612,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
5615
5612
  return event;
5616
5613
  }
5617
5614
  /**
5618
- * What Deepline has billed each run so far (customer-visible credits, never
5619
- * provider spend) and whether any of its charges is still settling — the
5620
- * same read the dashboard's runs grid shows. `GET /api/v2/runs/billing`.
5615
+ * Read Deepline credits billed to each run and whether charges are still settling.
5616
+ * The response never shows provider spend. The dashboard runs grid uses the same read.
5617
+ * HTTP endpoint: `GET /api/v2/runs/billing`.
5621
5618
  */
5622
5619
  async getRunBilling(runIds) {
5623
5620
  const params = new URLSearchParams();