deepline 0.3.346 → 0.3.347

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 (103) hide show
  1. package/dist/bundling-sources/sdk/src/http.ts +14 -0
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/sdk/src/tool-calls.ts +78 -17
  4. package/dist/cli/auth-PSMCNXBC.js +31 -0
  5. package/dist/cli/{auth-HTWHQNMY.mjs → auth-RWP45MJX.mjs} +4 -4
  6. package/dist/cli/{billing-4DCHVGO5.js → billing-F6RNSQWW.js} +71 -71
  7. package/dist/cli/{billing-X56CVZWC.mjs → billing-XPKHI4LF.mjs} +4 -4
  8. package/dist/cli/{chunk-NVNHV73C.mjs → chunk-3JJLQQLW.mjs} +2 -2
  9. package/dist/cli/{chunk-ZEUFYRUR.js → chunk-3PRBUTJK.js} +240 -231
  10. package/dist/cli/{chunk-22GXXUTB.js → chunk-5UJOJKPW.js} +33 -27
  11. package/dist/cli/{chunk-5NNSJTJ3.js → chunk-723POEH5.js} +279 -244
  12. package/dist/cli/{chunk-SGBSQHXS.js → chunk-AGV2VS4U.js} +55 -53
  13. package/dist/cli/{chunk-MOVEHSNM.mjs → chunk-AOKWJJLP.mjs} +1 -1
  14. package/dist/cli/{chunk-KQCTQGUU.mjs → chunk-AYR45POY.mjs} +51 -16
  15. package/dist/cli/{chunk-YUKZHAFW.js → chunk-BUXJSW26.js} +26 -26
  16. package/dist/cli/{chunk-L2R72RQJ.js → chunk-EOS73ZCP.js} +8 -8
  17. package/dist/cli/{chunk-5QG2UAYH.js → chunk-GS2ZSOAQ.js} +2 -2
  18. package/dist/cli/{chunk-EJ2NVO5K.js → chunk-GT7OCAWV.js} +48 -48
  19. package/dist/cli/{chunk-4Q572AVS.js → chunk-JB4UKD3B.js} +6 -6
  20. package/dist/cli/{chunk-GGSLHWTB.js → chunk-L4TXOCCC.js} +1 -1
  21. package/dist/cli/{chunk-WKZTHHJI.mjs → chunk-LH4VHCN5.mjs} +9 -7
  22. package/dist/cli/{chunk-2RJ7RMRM.js → chunk-LPKV6IBM.js} +8 -8
  23. package/dist/cli/{chunk-GCBLVWDQ.mjs → chunk-LTJOC47W.mjs} +16 -7
  24. package/dist/cli/{chunk-AFNEQ43J.js → chunk-MX53GIOB.js} +40 -1
  25. package/dist/cli/{chunk-P4IKGWYF.mjs → chunk-NU5EU2SH.mjs} +4 -4
  26. package/dist/cli/{chunk-62TKYGY6.mjs → chunk-OS6CZRJE.mjs} +3 -3
  27. package/dist/cli/{chunk-VC7M2QR7.mjs → chunk-PQGDU7B5.mjs} +7 -1
  28. package/dist/cli/{chunk-YEKAGC52.js → chunk-ROEN4NXY.js} +60 -60
  29. package/dist/cli/{chunk-2GRMXCLZ.mjs → chunk-SFJEAK54.mjs} +1 -1
  30. package/dist/cli/{chunk-3GLIYDIF.mjs → chunk-U2GPF4SB.mjs} +2 -2
  31. package/dist/cli/{chunk-O4SXVVNQ.mjs → chunk-VRYRVD3F.mjs} +1 -1
  32. package/dist/cli/{chunk-T7EVEXHS.js → chunk-WX7W76U7.js} +15 -15
  33. package/dist/cli/{chunk-ZR4EHO62.mjs → chunk-X32ZLEUU.mjs} +2 -2
  34. package/dist/cli/{chunk-XAM3XOUA.mjs → chunk-Y6D2JYBR.mjs} +2 -2
  35. package/dist/cli/{chunk-JOA6IKDE.mjs → chunk-Z6B4UPM4.mjs} +39 -0
  36. package/dist/cli/{client-C2KUT452.mjs → client-FZJ3RSO3.mjs} +3 -3
  37. package/dist/cli/client-J4QGSQ6Y.js +20 -0
  38. package/dist/cli/{csv-SLACAH4F.mjs → csv-HPBPBU3I.mjs} +3 -3
  39. package/dist/cli/{csv-3TAA2MTR.js → csv-QSMT5HZS.js} +12 -12
  40. package/dist/cli/{db-IN4I6KJ5.mjs → db-2KAUAVVC.mjs} +4 -4
  41. package/dist/cli/{db-BT6Q3FE6.js → db-IKZKICP3.js} +29 -29
  42. package/dist/cli/{describe-EDXTYMOF.mjs → describe-EW4GZMUK.mjs} +9 -9
  43. package/dist/cli/{describe-FJZXYKFH.js → describe-QM7Q5Y2H.js} +25 -25
  44. package/dist/cli/{executions-YYQC2TVR.js → executions-5ICONLFX.js} +6 -6
  45. package/dist/cli/{executions-X36QA5NY.mjs → executions-U5WWUFEZ.mjs} +4 -4
  46. package/dist/cli/{feedback-BS3S46O3.js → feedback-N2KGAK4V.js} +7 -7
  47. package/dist/cli/{feedback-KTEPHZ4S.mjs → feedback-ZBQPQPFG.mjs} +3 -3
  48. package/dist/cli/git-2N5LS25H.js +23 -0
  49. package/dist/cli/{git-3ZVYB63W.mjs → git-M5YEP57H.mjs} +4 -4
  50. package/dist/cli/index.js +79 -79
  51. package/dist/cli/index.mjs +31 -31
  52. package/dist/cli/{legacy-noops-VVBJXM2K.mjs → legacy-noops-GJUYBH2F.mjs} +4 -4
  53. package/dist/cli/{legacy-noops-V5R7ITER.js → legacy-noops-IQIPPJF7.js} +7 -7
  54. package/dist/cli/{monitors-J6XDE76B.js → monitors-DQUCHISX.js} +85 -85
  55. package/dist/cli/{monitors-KYTMBNUQ.mjs → monitors-XJAJNMG4.mjs} +4 -4
  56. package/dist/cli/{org-RGABGQKP.mjs → org-DFWDN4EJ.mjs} +4 -4
  57. package/dist/cli/{org-MHF2NGDV.js → org-G45CXUJV.js} +60 -60
  58. package/dist/cli/{play-UII4SSA7.mjs → play-URTZW2Q4.mjs} +8 -8
  59. package/dist/cli/play-WWMUYKWS.js +153 -0
  60. package/dist/cli/{providers-LQOSKPUH.mjs → providers-CCKMRCXU.mjs} +4 -4
  61. package/dist/cli/{providers-3GDMD7T6.js → providers-IVUWWGFP.js} +7 -7
  62. package/dist/cli/{quickstart-GAMYLCLJ.mjs → quickstart-CRHIA3PZ.mjs} +3 -3
  63. package/dist/cli/{quickstart-R34Z7EMU.js → quickstart-MMIVNRV4.js} +5 -5
  64. package/dist/cli/{search-AOOMDVF5.mjs → search-NDRDOINX.mjs} +5 -5
  65. package/dist/cli/search-YZL2QRIF.js +26 -0
  66. package/dist/cli/{secrets-T4XXIASK.js → secrets-GQUBMJGM.js} +13 -13
  67. package/dist/cli/{secrets-U7YGLUSX.mjs → secrets-SUC3KLLH.mjs} +4 -4
  68. package/dist/cli/{sessions-VPXR4DSZ.mjs → sessions-7CAU6JL5.mjs} +4 -4
  69. package/dist/cli/{sessions-JQGKWKJS.js → sessions-AQCRVLHW.js} +5 -5
  70. package/dist/cli/{settings-LXF45R7X.js → settings-4SDI73XW.js} +74 -74
  71. package/dist/cli/{settings-LP55G43L.mjs → settings-LFFOFAU6.mjs} +7 -7
  72. package/dist/cli/{setup-36QA4JI3.mjs → setup-BKCQOJBD.mjs} +6 -6
  73. package/dist/cli/{setup-MA2GLU4N.js → setup-FQ3E7U7G.js} +41 -41
  74. package/dist/cli/skills-7BPEGDIA.js +28 -0
  75. package/dist/cli/{skills-HB6PARLZ.mjs → skills-USGJ5MF7.mjs} +4 -4
  76. package/dist/cli/{tools-E7K7R4AO.mjs → tools-5HTXLDZ4.mjs} +7 -7
  77. package/dist/cli/tools-5VEZ4QR4.js +40 -0
  78. package/dist/cli/{update-IT63P3NV.mjs → update-F7TIJEIV.mjs} +6 -6
  79. package/dist/cli/update-YFPMWKI4.js +28 -0
  80. package/dist/cli/{workflow-UO3PMX7R.mjs → workflow-FXJ2D2MG.mjs} +5 -5
  81. package/dist/cli/{workflow-SJHASZ5C.js → workflow-J5JVOUIL.js} +15 -15
  82. package/dist/{client-BHReRdWK.d.mts → client-D20uyRYB.d.mts} +6 -0
  83. package/dist/{client-DW3zASj8.d.ts → client-rHyf5s_Y.d.ts} +6 -0
  84. package/dist/index.d.mts +2 -2
  85. package/dist/index.d.ts +2 -2
  86. package/dist/index.js +6 -6
  87. package/dist/index.mjs +3 -3
  88. package/dist/install-integrity.json +78 -78
  89. package/dist/plays/run-request.d.mts +1 -1
  90. package/dist/plays/run-request.d.ts +1 -1
  91. package/dist/release.d.mts +1 -1
  92. package/dist/release.d.ts +1 -1
  93. package/dist/release.js +2 -2
  94. package/dist/release.mjs +1 -1
  95. package/package.json +1 -1
  96. package/dist/cli/auth-5YTC2XH2.js +0 -31
  97. package/dist/cli/client-4RKYHB7Z.js +0 -20
  98. package/dist/cli/git-ZHAD5TJN.js +0 -23
  99. package/dist/cli/play-ZWAH3U44.js +0 -153
  100. package/dist/cli/search-FVB7ZNCO.js +0 -26
  101. package/dist/cli/skills-GUWC4FV7.js +0 -28
  102. package/dist/cli/tools-T5WIAD5Z.js +0 -40
  103. package/dist/cli/update-QY6RY3A6.js +0 -28
@@ -1,14 +1,14 @@
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 _chunk5NNSJTJ3js = require('./chunk-5NNSJTJ3.js');
3
+ var _chunk723POEH5js = require('./chunk-723POEH5.js');
4
4
 
5
5
 
6
6
 
7
- var _chunk4Q572AVSjs = require('./chunk-4Q572AVS.js');
7
+ var _chunkJB4UKD3Bjs = require('./chunk-JB4UKD3B.js');
8
8
 
9
9
 
10
10
 
11
- var _chunk22GXXUTBjs = require('./chunk-22GXXUTB.js');
11
+ var _chunk5UJOJKPWjs = require('./chunk-5UJOJKPW.js');
12
12
 
13
13
  // src/cli/commands/search.ts
14
14
  var _commander = require('commander');
@@ -18,7 +18,7 @@ var _fs = require('fs');
18
18
  var _path = require('path');
19
19
  var SEARCH_REF_TTL_MS = 15 * 6e4;
20
20
  function lastSearchPath() {
21
- return _path.join.call(void 0, _chunk22GXXUTBjs.sdkCliStateDirPath.call(void 0, _chunk22GXXUTBjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
21
+ return _path.join.call(void 0, _chunk5UJOJKPWjs.sdkCliStateDirPath.call(void 0, _chunk5UJOJKPWjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
22
22
  }
23
23
  function rememberSearchRef(searchRef) {
24
24
  try {
@@ -130,7 +130,7 @@ function searchRow(item) {
130
130
  }
131
131
  function renderSearchResults(result) {
132
132
  if (result.results.length === 0)
133
- return _chunk4Q572AVSjs.renderCommandEnvelopeText.call(void 0, result);
133
+ return _chunkJB4UKD3Bjs.renderCommandEnvelopeText.call(void 0, result);
134
134
  const rows = result.results.map(searchRow);
135
135
  const kinds = new Set(rows.map((row) => row.kind));
136
136
  const onlyTools = kinds.size === 1 && kinds.has("tool");
@@ -147,7 +147,7 @@ function renderSearchResults(result) {
147
147
  actions: _optionalChain([render, 'optionalAccess', _9 => _9.actions])
148
148
  };
149
149
  const followUps = _optionalChain([remaining, 'access', _10 => _10.sections, 'optionalAccess', _11 => _11.length]) || _optionalChain([remaining, 'access', _12 => _12.actions, 'optionalAccess', _13 => _13.length]) ? `
150
- ${_chunk4Q572AVSjs.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
150
+ ${_chunkJB4UKD3Bjs.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
151
151
  const notes = rows.flatMap(
152
152
  (row) => row.notes.map((note) => ` ${row.id}: ${note}`)
153
153
  );
@@ -224,7 +224,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
224
224
  console.error(USAGE);
225
225
  return 1;
226
226
  }
227
- const { search_ref: searchRef, ...result } = await new (0, _chunk5NNSJTJ3js.DeeplineClient)().search({
227
+ const { search_ref: searchRef, ...result } = await new (0, _chunk723POEH5js.DeeplineClient)().search({
228
228
  query,
229
229
  types,
230
230
  exclude,
@@ -238,7 +238,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
238
238
  });
239
239
  if (searchRef) rememberSearchRef(searchRef);
240
240
  pointAtDescribe(result);
241
- _chunk4Q572AVSjs.printCommandEnvelope.call(void 0, result, {
241
+ _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0, result, {
242
242
  json: options.json === true,
243
243
  text: renderSearchResults(result)
244
244
  });
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  addDescribeOptions,
3
+ recordPlayTermination,
3
4
  schemaFields
4
- } from "./chunk-JOA6IKDE.mjs";
5
+ } from "./chunk-Z6B4UPM4.mjs";
5
6
  import {
6
7
  shellQuote
7
8
  } from "./chunk-OVDNJAJN.mjs";
@@ -10,11 +11,11 @@ import {
10
11
  } from "./chunk-EDWJY6T4.mjs";
11
12
  import {
12
13
  registerDeprecatedSearchCommand
13
- } from "./chunk-62TKYGY6.mjs";
14
+ } from "./chunk-OS6CZRJE.mjs";
14
15
  import {
15
16
  handleDeploymentGet,
16
17
  handleDeploymentsList
17
- } from "./chunk-ZR4EHO62.mjs";
18
+ } from "./chunk-X32ZLEUU.mjs";
18
19
  import {
19
20
  PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY,
20
21
  PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER,
@@ -39,7 +40,7 @@ import {
39
40
  normalizeRunEventOperationRequest,
40
41
  parseLogLevel,
41
42
  playInputExampleArgs
42
- } from "./chunk-KQCTQGUU.mjs";
43
+ } from "./chunk-AYR45POY.mjs";
43
44
  import {
44
45
  CSV_DATA_INPUT_KEY,
45
46
  buildNamedPlayRunRequest,
@@ -72,10 +73,10 @@ import {
72
73
  printJsonError,
73
74
  renderCommandEnvelopeText,
74
75
  shouldEmitJson
75
- } from "./chunk-2GRMXCLZ.mjs";
76
+ } from "./chunk-SFJEAK54.mjs";
76
77
  import {
77
78
  fetchWithDeploymentProtection
78
- } from "./chunk-VC7M2QR7.mjs";
79
+ } from "./chunk-PQGDU7B5.mjs";
79
80
  import {
80
81
  PLAY_DEFAULT_EXPORT,
81
82
  extractDefinedPlayName,
@@ -13322,6 +13323,7 @@ function buildPlayCompletionTextLines(status) {
13322
13323
  }
13323
13324
  function writePlayResult(status, jsonOutput, options) {
13324
13325
  const packaged = getPlayRunPackage(status);
13326
+ if (status.package) recordPlayTermination(buildRunOverview(status).run);
13325
13327
  const hits = options?.hits ?? null;
13326
13328
  if (jsonOutput) {
13327
13329
  const payload2 = options?.fullJson ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
@@ -14150,6 +14152,12 @@ function renderServerResultView(value) {
14150
14152
  }
14151
14153
  function writeStartedPlayRun(input) {
14152
14154
  if (input.package && isPlayRunPackageValue(input.package)) {
14155
+ const run = input.package.run;
14156
+ recordPlayTermination({
14157
+ id: run.id,
14158
+ status: run.status,
14159
+ finishedAt: run.finishedAt
14160
+ });
14153
14161
  if (input.jsonOutput) {
14154
14162
  const status = {
14155
14163
  runId: input.runId,
@@ -15420,6 +15428,7 @@ async function handleRunGet(args) {
15420
15428
  full: false,
15421
15429
  failedLogs: args.includes("--log-failed")
15422
15430
  });
15431
+ if (status.package) recordPlayTermination(buildRunOverview(status).run);
15423
15432
  if (!status.package) {
15424
15433
  const legacyStatus = full ? await client.runs.get(runId, {
15425
15434
  full: true,
@@ -18151,7 +18160,7 @@ Examples:
18151
18160
  process.exitCode = await ownView();
18152
18161
  return;
18153
18162
  }
18154
- const { describeAnything } = await import("./describe-EDXTYMOF.mjs");
18163
+ const { describeAnything } = await import("./describe-EW4GZMUK.mjs");
18155
18164
  process.exitCode = await describeAnything(
18156
18165
  name,
18157
18166
  {
@@ -362,6 +362,43 @@ function topLevelField({ fields: _fields, ...field }) {
362
362
  return { ...field, type: field.type.replace(SHAPE, "object") };
363
363
  }
364
364
 
365
+ // src/cli/execution-observation.ts
366
+ var _fs = require('fs');
367
+ function writeObservation(observation) {
368
+ const path = process.env.DEEPLINE_EXECUTION_OBSERVATION_PATH;
369
+ const invocationId = process.env.DEEPLINE_EXECUTION_OBSERVATION_ID;
370
+ if (!path || !invocationId) return;
371
+ const pending = `${path}.pending`;
372
+ _fs.writeFileSync.call(void 0,
373
+ pending,
374
+ JSON.stringify({
375
+ schema_version: 1,
376
+ invocation_id: invocationId,
377
+ ...observation
378
+ }),
379
+ { mode: 384 }
380
+ );
381
+ _fs.renameSync.call(void 0, pending, path);
382
+ }
383
+ function recordApiResponse(observation) {
384
+ writeObservation({
385
+ kind: "api_response",
386
+ received_at_ms: observation.receivedAtMs,
387
+ state: observation.state,
388
+ http_status: observation.httpStatus
389
+ });
390
+ }
391
+ function recordPlayTermination(run) {
392
+ if (typeof run.id !== "string" || !["completed", "failed", "cancelled", "canceled"].includes(
393
+ String(run.status)
394
+ ) || typeof run.finishedAt !== "number" || !Number.isSafeInteger(run.finishedAt) || run.finishedAt <= 0)
395
+ return;
396
+ writeObservation({
397
+ kind: "play_terminal",
398
+ run: { id: run.id, status: run.status, finishedAt: run.finishedAt }
399
+ });
400
+ }
401
+
365
402
  // src/cli/describe-options.ts
366
403
  function addDescribeOptions(command, options = {}) {
367
404
  command.option(
@@ -408,4 +445,6 @@ function addDescribeOptions(command, options = {}) {
408
445
 
409
446
 
410
447
 
411
- exports.SCHEMA_LINE_LIMIT = SCHEMA_LINE_LIMIT; exports.schemaField = schemaField; exports.schemaFields = schemaFields; exports.rateLimitSummary = rateLimitSummary; exports.schemaLines = schemaLines; exports.examples = examples; exports.describedLines = describedLines; exports.topLevelField = topLevelField; exports.addDescribeOptions = addDescribeOptions;
448
+
449
+
450
+ exports.SCHEMA_LINE_LIMIT = SCHEMA_LINE_LIMIT; exports.schemaField = schemaField; exports.schemaFields = schemaFields; exports.rateLimitSummary = rateLimitSummary; exports.schemaLines = schemaLines; exports.examples = examples; exports.describedLines = describedLines; exports.topLevelField = topLevelField; exports.recordApiResponse = recordApiResponse; exports.recordPlayTermination = recordPlayTermination; exports.addDescribeOptions = addDescribeOptions;
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  npmSupportsAllowScripts,
3
3
  readNpmVersion
4
- } from "./chunk-O4SXVVNQ.mjs";
4
+ } from "./chunk-VRYRVD3F.mjs";
5
5
  import {
6
6
  resolveShellSpawn,
7
7
  runSkillsCommand
8
- } from "./chunk-3GLIYDIF.mjs";
8
+ } from "./chunk-U2GPF4SB.mjs";
9
9
  import {
10
10
  printCommandEnvelope
11
- } from "./chunk-2GRMXCLZ.mjs";
11
+ } from "./chunk-SFJEAK54.mjs";
12
12
  import {
13
13
  autoDetectBaseUrl
14
- } from "./chunk-VC7M2QR7.mjs";
14
+ } from "./chunk-PQGDU7B5.mjs";
15
15
 
16
16
  // src/cli/commands/update.ts
17
17
  import { spawn, spawnSync } from "child_process";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  DeeplineClient
3
- } from "./chunk-KQCTQGUU.mjs";
3
+ } from "./chunk-AYR45POY.mjs";
4
4
  import {
5
5
  printCommandEnvelope,
6
6
  renderCommandEnvelopeText
7
- } from "./chunk-2GRMXCLZ.mjs";
7
+ } from "./chunk-SFJEAK54.mjs";
8
8
  import {
9
9
  resolveConfig,
10
10
  sdkCliStateDirPath
11
- } from "./chunk-VC7M2QR7.mjs";
11
+ } from "./chunk-PQGDU7B5.mjs";
12
12
 
13
13
  // src/cli/commands/search.ts
14
14
  import { Option } from "commander";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-DLIRSHV6.mjs";
5
5
  import {
6
6
  SDK_RELEASE
7
- } from "./chunk-MOVEHSNM.mjs";
7
+ } from "./chunk-AOKWJJLP.mjs";
8
8
  import {
9
9
  DeeplineError,
10
10
  TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
@@ -1524,8 +1524,14 @@ var HttpClient = class {
1524
1524
  return null;
1525
1525
  }
1526
1526
  const body = await response.text();
1527
+ const receivedAtMs = Date.now();
1527
1528
  clearTimeout(timeoutId);
1528
1529
  const parsed = parseResponseBody(body);
1530
+ options?.onResponseBody?.({
1531
+ receivedAtMs,
1532
+ httpStatus: response.status,
1533
+ body: parsed
1534
+ });
1529
1535
  const structuredToolError = options?.toolId && !response.ok ? deserializeToolExecutionFailure(
1530
1536
  apiErrorMessage(parsed, response.status),
1531
1537
  isRecord(parsed) ? parsed.tool_error : null,