deepline 0.3.395 → 0.3.397

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 (126) hide show
  1. package/dist/bundling-sources/sdk/src/plays/play-description.ts +1 -1
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
  4. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +2 -2
  5. package/dist/cli/{auth-NMQXZRS7.mjs → auth-AZJFXGKP.mjs} +5 -4
  6. package/dist/cli/auth-CZJQU7B5.js +40 -0
  7. package/dist/cli/{billing-Z4JTGUU3.js → billing-MQV5AGDJ.js} +77 -76
  8. package/dist/cli/{billing-5MVXZRS6.mjs → billing-MZAAUHGH.mjs} +6 -5
  9. package/dist/cli/{chunk-6D7A2FSL.mjs → chunk-2LDADJNO.mjs} +7 -107
  10. package/dist/cli/{chunk-UKU6JM3S.js → chunk-3VP34TAU.js} +8 -8
  11. package/dist/cli/{chunk-7XAM7KDW.mjs → chunk-4D745XZO.mjs} +21 -108
  12. package/dist/cli/chunk-7DRPTGCK.js +930 -0
  13. package/dist/cli/{chunk-ZMVJSS6N.js → chunk-BQR6UN3C.js} +62 -78
  14. package/dist/cli/{chunk-HRWUQJ4K.js → chunk-DQ65ZVHN.js} +6 -6
  15. package/dist/cli/{chunk-5VCZ3WRH.mjs → chunk-EIMG75BT.mjs} +1 -0
  16. package/dist/cli/{chunk-EFLQHJZ6.mjs → chunk-F3BUFYKE.mjs} +182 -1031
  17. package/dist/cli/chunk-FIVKWNMT.mjs +210 -0
  18. package/dist/cli/{describe-DBRY5BNK.mjs → chunk-HFYQBC2D.mjs} +51 -171
  19. package/dist/cli/chunk-HGFFYVXN.js +210 -0
  20. package/dist/cli/{chunk-VB6KECLU.mjs → chunk-IHG7UAHD.mjs} +63 -79
  21. package/dist/cli/{chunk-TO2MWPGR.js → chunk-IZ74ABSX.js} +1 -1
  22. package/dist/cli/{chunk-G4IWGRMK.mjs → chunk-J7ABTQQ7.mjs} +5 -3
  23. package/dist/cli/{chunk-LZLBR2SF.js → chunk-K33MXVXQ.js} +323 -1172
  24. package/dist/cli/{chunk-DRM3CMHL.js → chunk-KXMNM4AQ.js} +2 -1
  25. package/dist/cli/chunk-LJ5747UC.mjs +107 -0
  26. package/dist/cli/{chunk-BON3DRC6.mjs → chunk-MRXMMERY.mjs} +1 -1
  27. package/dist/cli/{chunk-7MVWUXOD.mjs → chunk-MV7QRALK.mjs} +3 -3
  28. package/dist/cli/{chunk-WCCKMLHL.mjs → chunk-MYPH2LUU.mjs} +2 -2
  29. package/dist/cli/{chunk-RDXFGPJU.js → chunk-NA4T3B62.js} +64 -272
  30. package/dist/cli/{chunk-BLYL3KOC.mjs → chunk-NOX2TCBP.mjs} +1 -1
  31. package/dist/cli/chunk-OSDXE27V.mjs +88 -0
  32. package/dist/cli/{chunk-R4XZO6Z5.js → chunk-PSGEDGLT.js} +28 -115
  33. package/dist/cli/chunk-Q2E4E4FJ.js +112 -0
  34. package/dist/cli/chunk-RFG3MRAC.js +286 -0
  35. package/dist/cli/{chunk-47M6HPGP.mjs → chunk-RNSWDKBM.mjs} +1 -1
  36. package/dist/cli/{chunk-56IFFVIB.js → chunk-RYW4HPSM.js} +21 -121
  37. package/dist/cli/{chunk-K5T3EN6D.js → chunk-SO7RUVTY.js} +26 -26
  38. package/dist/cli/{chunk-KZZC33PY.mjs → chunk-TXZVVBQZ.mjs} +63 -271
  39. package/dist/cli/{chunk-36ML3YKA.js → chunk-UVXBVUZQ.js} +15 -13
  40. package/dist/cli/{chunk-PZ5BZ76S.js → chunk-VTF4RRWJ.js} +50 -50
  41. package/dist/cli/{chunk-3TRY7KAC.mjs → chunk-W3HMGKMI.mjs} +2 -2
  42. package/dist/cli/{chunk-ZWH2TFA7.mjs → chunk-WM2QEHZL.mjs} +2 -2
  43. package/dist/cli/chunk-YHPYUZZX.mjs +112 -0
  44. package/dist/cli/chunk-YHZUZO3U.mjs +930 -0
  45. package/dist/cli/{chunk-UCXK2DS4.js → chunk-YLRME7MK.js} +15 -15
  46. package/dist/cli/{chunk-MYIBHORT.js → chunk-YSVORIEW.js} +2 -2
  47. package/dist/cli/{chunk-OCSG6X67.mjs → chunk-YUDKBQUD.mjs} +4 -4
  48. package/dist/cli/chunk-ZAAKSJAS.js +88 -0
  49. package/dist/cli/{chunk-VYLJJQ7Y.js → chunk-ZHUMDMOS.js} +65 -65
  50. package/dist/cli/chunk-ZM2YPJQJ.js +107 -0
  51. package/dist/cli/{csv-HTS5ZYQ4.js → csv-AQBQ5O3I.js} +13 -12
  52. package/dist/cli/{csv-SVOD5UBH.mjs → csv-MB7PJMYQ.mjs} +4 -3
  53. package/dist/cli/{db-7AP4P52N.js → db-JPUYC5RB.js} +31 -30
  54. package/dist/cli/{db-7QLNI3Q4.mjs → db-L5IEI2AU.mjs} +6 -5
  55. package/dist/cli/describe-6WT74AOR.js +164 -0
  56. package/dist/cli/describe-S6BFANVI.mjs +164 -0
  57. package/dist/cli/describe-core.d.mts +100 -0
  58. package/dist/cli/describe-core.d.ts +100 -0
  59. package/dist/cli/describe-core.js +18 -0
  60. package/dist/cli/describe-core.mjs +18 -0
  61. package/dist/cli/{executions-GRQXTB2P.js → executions-6TMQTFP4.js} +8 -7
  62. package/dist/cli/{executions-QNZTPNG4.mjs → executions-L7I2ZW4Z.mjs} +6 -5
  63. package/dist/cli/{feedback-JMCSR624.mjs → feedback-DSJ63HK6.mjs} +4 -3
  64. package/dist/cli/{feedback-ZOLA2KY7.js → feedback-XF7CQGMD.js} +8 -7
  65. package/dist/cli/{git-LJGL2IHS.mjs → git-C3ENM67D.mjs} +5 -4
  66. package/dist/cli/git-HYDZK2QR.js +24 -0
  67. package/dist/cli/index.js +96 -94
  68. package/dist/cli/index.mjs +41 -39
  69. package/dist/cli/{legacy-noops-YSCIR2SD.js → legacy-noops-B2NHWIVD.js} +8 -7
  70. package/dist/cli/{legacy-noops-F23PKVBN.mjs → legacy-noops-VFG2K6HK.mjs} +5 -4
  71. package/dist/cli/{monitors-WMZ6HJZX.js → monitors-ORFWOVZB.js} +87 -86
  72. package/dist/cli/{monitors-S4LOEL7W.mjs → monitors-TCEDBDGY.mjs} +6 -5
  73. package/dist/cli/{org-U3WA2NQM.mjs → org-45KREIKZ.mjs} +6 -5
  74. package/dist/cli/{org-PFHM5ZLY.js → org-T74CJESN.js} +66 -65
  75. package/dist/cli/{chunk-XMAPE2KH.mjs → play-MU7MYBIM.mjs} +78 -131
  76. package/dist/cli/{chunk-4KLCLLTO.js → play-XHK2LPON.js} +273 -326
  77. package/dist/cli/{providers-XYMHLKCA.js → providers-4MGQKYFD.js} +9 -8
  78. package/dist/cli/{providers-QBBRFBOH.mjs → providers-VYCXIJT5.mjs} +6 -5
  79. package/dist/cli/{quickstart-IYGD6ZY3.js → quickstart-47G3VEOT.js} +6 -5
  80. package/dist/cli/{quickstart-5JTDGISY.mjs → quickstart-H724EFM2.mjs} +4 -3
  81. package/dist/cli/search-3356ENLD.js +30 -0
  82. package/dist/cli/{search-X6W6GRHS.mjs → search-VQHXEFQ4.mjs} +8 -6
  83. package/dist/cli/{secrets-UHG6OQFD.js → secrets-ALLKCU35.js} +15 -14
  84. package/dist/cli/{secrets-N55B67H6.mjs → secrets-CPBNGA44.mjs} +6 -5
  85. package/dist/cli/{sessions-JTRSTDSS.mjs → sessions-7RSQB7IX.mjs} +5 -4
  86. package/dist/cli/sessions-FKGAY7WQ.js +16 -0
  87. package/dist/cli/{settings-Q24HRAQI.mjs → settings-UYSGV4IC.mjs} +9 -8
  88. package/dist/cli/{settings-ATX4U5AS.js → settings-Y5BI42P7.js} +76 -75
  89. package/dist/cli/{setup-77ZWLVHT.mjs → setup-L3ZBBTS4.mjs} +7 -6
  90. package/dist/cli/{setup-EJCNOUCE.js → setup-VXQPEU3E.js} +42 -41
  91. package/dist/cli/skills-DUZQTDTE.js +29 -0
  92. package/dist/cli/{skills-XIS5AWQI.mjs → skills-QHVDLSFE.mjs} +5 -4
  93. package/dist/cli/{tools-WCKLYEGQ.mjs → tools-LSCEK4K2.mjs} +16 -19
  94. package/dist/cli/tools-YWU5QOQ5.js +39 -0
  95. package/dist/cli/update-5LYQAI55.js +29 -0
  96. package/dist/cli/{update-UT5WANMV.mjs → update-CU22OTBM.mjs} +7 -6
  97. package/dist/cli/{workflow-226QYUN2.js → workflow-ERFLTRNX.js} +17 -16
  98. package/dist/cli/{workflow-ZMX3L4ML.mjs → workflow-KQARK5BZ.mjs} +7 -6
  99. package/dist/{client-hdFtwhTm.d.mts → client-D0j-_aaa.d.mts} +2 -1
  100. package/dist/{client-CivP-PAI.d.ts → client-DflfVyj6.d.ts} +2 -1
  101. package/dist/index.d.mts +2 -2
  102. package/dist/index.d.ts +2 -2
  103. package/dist/index.js +15 -11
  104. package/dist/index.mjs +19 -15
  105. package/dist/install-integrity.json +94 -80
  106. package/dist/plays/play-description.d.mts +1 -1
  107. package/dist/plays/play-description.d.ts +1 -1
  108. package/dist/plays/play-description.js +4 -2
  109. package/dist/plays/play-description.mjs +3 -1
  110. package/dist/plays/run-request.d.mts +1 -1
  111. package/dist/plays/run-request.d.ts +1 -1
  112. package/dist/release.d.mts +1 -1
  113. package/dist/release.d.ts +1 -1
  114. package/dist/release.js +2 -2
  115. package/dist/release.mjs +1 -1
  116. package/package.json +6 -1
  117. package/dist/cli/auth-UYCOBAL5.js +0 -39
  118. package/dist/cli/describe-YKOE54ZO.js +0 -406
  119. package/dist/cli/git-EJQLRK27.js +0 -23
  120. package/dist/cli/play-AGSECQFN.mjs +0 -159
  121. package/dist/cli/play-BR2LWGXK.js +0 -159
  122. package/dist/cli/search-ZVSYH5GY.js +0 -28
  123. package/dist/cli/sessions-57L5MGHN.js +0 -15
  124. package/dist/cli/skills-SPXUBLII.js +0 -28
  125. package/dist/cli/tools-DBHUUZJX.js +0 -42
  126. package/dist/cli/update-VSNFXRHJ.js +0 -28
@@ -1,37 +1,51 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await 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
3
 
4
+ var _chunkZAAKSJASjs = require('./chunk-ZAAKSJAS.js');
5
+
6
+
7
+
8
+ var _chunkPSGEDGLTjs = require('./chunk-PSGEDGLT.js');
9
+
10
+
11
+
4
12
 
5
13
 
6
14
 
7
- var _chunkZMVJSS6Njs = require('./chunk-ZMVJSS6N.js');
8
15
 
9
16
 
10
- var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
11
17
 
12
18
 
13
19
 
14
20
 
15
21
 
16
- var _chunkR4XZO6Z5js = require('./chunk-R4XZO6Z5.js');
17
22
 
18
23
 
19
24
 
20
25
 
21
26
 
27
+ var _chunk7DRPTGCKjs = require('./chunk-7DRPTGCK.js');
28
+
29
+
30
+ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
31
+
32
+
33
+
34
+ var _chunkZM2YPJQJjs = require('./chunk-ZM2YPJQJ.js');
35
+
22
36
 
23
37
 
24
38
 
25
39
 
26
40
 
27
- var _chunkRDXFGPJUjs = require('./chunk-RDXFGPJU.js');
41
+ var _chunkHGFFYVXNjs = require('./chunk-HGFFYVXN.js');
28
42
 
29
43
 
30
44
  var _chunkKB4SDX5Sjs = require('./chunk-KB4SDX5S.js');
31
45
 
32
46
 
33
47
 
34
- var _chunk36ML3YKAjs = require('./chunk-36ML3YKA.js');
48
+ var _chunkUVXBVUZQjs = require('./chunk-UVXBVUZQ.js');
35
49
 
36
50
 
37
51
  var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
@@ -48,11 +62,11 @@ var _chunkQJBJZVG6js = require('./chunk-QJBJZVG6.js');
48
62
 
49
63
 
50
64
 
51
- var _chunkHRWUQJ4Kjs = require('./chunk-HRWUQJ4K.js');
65
+ var _chunkDQ65ZVHNjs = require('./chunk-DQ65ZVHN.js');
52
66
 
53
67
 
54
68
 
55
- var _chunk56IFFVIBjs = require('./chunk-56IFFVIB.js');
69
+ var _chunkRYW4HPSMjs = require('./chunk-RYW4HPSM.js');
56
70
 
57
71
 
58
72
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
@@ -72,18 +86,18 @@ function matchesToolRequestCondition(condition, payload) {
72
86
  (entry) => matchesToolRequestCondition(entry, payload)
73
87
  );
74
88
  }
75
- const value2 = _optionalChain([payload, 'optionalAccess', _ => _[condition.field]]);
89
+ const value = _optionalChain([payload, 'optionalAccess', _ => _[condition.field]]);
76
90
  switch (condition.operator) {
77
91
  case "equals":
78
- return value2 === condition.value;
92
+ return value === condition.value;
79
93
  case "number_equals":
80
94
  try {
81
- return Number(value2) === condition.value;
95
+ return Number(value) === condition.value;
82
96
  } catch (e) {
83
97
  return false;
84
98
  }
85
99
  case "present_nonblank":
86
- return typeof value2 === "string" ? value2.trim().length > 0 : value2 !== void 0 && value2 !== null;
100
+ return typeof value === "string" ? value.trim().length > 0 : value !== void 0 && value !== null;
87
101
  default:
88
102
  throw new Error("Unsupported tool request warning condition.");
89
103
  }
@@ -131,10 +145,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
131
145
  }
132
146
  };
133
147
  function pendingToolExecutionPath(input) {
134
- const config = _chunk56IFFVIBjs.resolveConfig.call(void 0, );
148
+ const config = _chunkRYW4HPSMjs.resolveConfig.call(void 0, );
135
149
  const fingerprint = _crypto.createHash.call(void 0, "sha256").update(config.baseUrl).update("\0").update(_crypto.createHash.call(void 0, "sha256").update(config.apiKey).digest("hex")).update("\0").update(input.toolId).update("\0").update(_chunkXDVT3GOMjs.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
136
150
  return _path.join.call(void 0,
137
- _chunk56IFFVIBjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
151
+ _chunkRYW4HPSMjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
138
152
  `pending-tool-execution-${fingerprint}.json`
139
153
  );
140
154
  }
@@ -225,239 +239,6 @@ function describeToolCategory(category) {
225
239
  return _nullishCoalesce(TOOL_CATEGORY_DESCRIPTIONS[category], () => ( null));
226
240
  }
227
241
 
228
- // ../plays/field-catalog.ts
229
- var value = (description) => ({ type: "string", description });
230
- var SOURCE = {
231
- type: "string",
232
- description: "The provider or step that found it."
233
- };
234
- var FIELD_CATALOG = {
235
- person: {
236
- name: {
237
- description: "The person's name.",
238
- leaves: {
239
- value: value("Full name."),
240
- first: value("First (given) name."),
241
- last: value("Last (family) name.")
242
- }
243
- },
244
- email: {
245
- description: "An email address for the person.",
246
- leaves: {
247
- value: value("The address."),
248
- validated: {
249
- type: "boolean",
250
- description: "Whether the address passed validation."
251
- },
252
- status: {
253
- type: "EmailStatus",
254
- description: "The validation verdict and its signals."
255
- },
256
- source: SOURCE
257
- },
258
- kinds: {
259
- work: "At their employer.",
260
- personal: "Their own, not tied to an employer."
261
- }
262
- },
263
- phone: {
264
- description: "A phone number for the person.",
265
- leaves: {
266
- value: value("The number."),
267
- validated: {
268
- type: "boolean",
269
- description: "Whether the number passed validation."
270
- },
271
- status: {
272
- type: '"valid" | "invalid" | "unknown"',
273
- description: "The validation verdict."
274
- },
275
- line_type: value("Mobile, landline, VoIP and so on."),
276
- carrier: value("The carrier serving the number."),
277
- source: SOURCE
278
- },
279
- kinds: {
280
- mobile: "Their mobile.",
281
- work: "A direct line at their employer."
282
- }
283
- },
284
- linkedin: {
285
- description: "The person's LinkedIn profile.",
286
- leaves: { url: value("The profile URL.") }
287
- },
288
- job: {
289
- description: "The person's current role.",
290
- leaves: {
291
- title: value("Job title."),
292
- change: {
293
- type: "JobChange",
294
- description: "Whether they changed jobs, and to what."
295
- },
296
- change_status: {
297
- type: "JobChangeStatus",
298
- description: "The job-change verdict alone."
299
- }
300
- }
301
- },
302
- record: {
303
- description: "A provider's own record of the person.",
304
- leaves: { id: value("The provider's id for the person.") }
305
- }
306
- },
307
- company: {
308
- name: {
309
- description: "The company's name.",
310
- leaves: { value: value("The name.") },
311
- kinds: { legal: "As registered with a government." }
312
- },
313
- domain: {
314
- description: "The company's web domain.",
315
- leaves: { value: value("The bare domain, such as example.com.") }
316
- },
317
- website: {
318
- description: "The company's website.",
319
- leaves: { url: value("The site URL.") }
320
- },
321
- linkedin: {
322
- description: "The company's LinkedIn page.",
323
- leaves: { url: value("The page URL.") }
324
- },
325
- phone: {
326
- description: "A phone number for the company.",
327
- leaves: { value: value("The number.") }
328
- },
329
- industry: {
330
- description: "The industry the company is in.",
331
- leaves: { value: value("The industry.") }
332
- },
333
- record: {
334
- description: "A provider's own record of the company.",
335
- leaves: { id: value("The provider's id for the company.") }
336
- }
337
- }
338
- };
339
- function catalogFields() {
340
- return Object.entries(FIELD_CATALOG).flatMap(
341
- ([entity, groups]) => Object.entries(groups).flatMap(
342
- ([group, definition]) => [void 0, ...Object.keys(_nullishCoalesce(definition.kinds, () => ( {})))].flatMap(
343
- (kind) => Object.entries(definition.leaves).map(([leaf, described]) => ({
344
- ...described,
345
- id: [entity, group, kind, leaf].filter(Boolean).join("."),
346
- entity,
347
- group,
348
- ...kind ? { kind } : {},
349
- leaf
350
- }))
351
- )
352
- )
353
- );
354
- }
355
- var FIELDS_BY_ID = new Map(catalogFields().map((field) => [field.id, field]));
356
- function generalField(id) {
357
- const field = FIELDS_BY_ID.get(id);
358
- return _optionalChain([field, 'optionalAccess', _4 => _4.kind]) ? [field.entity, field.group, field.leaf].join(".") : null;
359
- }
360
- function fieldSatisfies(offered, wanted) {
361
- return offered === wanted || generalField(offered) === wanted;
362
- }
363
- var EXTRACTOR_TARGET_FIELDS = {
364
- email: ["person.email.value"],
365
- personal_email: ["person.email.personal.value"],
366
- email_status: ["person.email.status"],
367
- phone: ["person.phone.value", "company.phone.value"],
368
- phone_status: ["person.phone.status"],
369
- first_name: ["person.name.first"],
370
- last_name: ["person.name.last"],
371
- full_name: ["person.name.value"],
372
- // Also used for a list name, a channel title and a search suggestion.
373
- name: ["person.name.value", "company.name.value"],
374
- linkedin: ["person.linkedin.url", "company.linkedin.url"],
375
- linkedin_url: ["person.linkedin.url"],
376
- title: ["person.job.title"],
377
- job_change: ["person.job.change"],
378
- job_change_status: ["person.job.change_status"],
379
- company: ["company.name.value"],
380
- company_name: ["company.name.value"],
381
- organization_name: ["company.name.value"],
382
- company_domain: ["company.domain.value"],
383
- domain: ["company.domain.value"],
384
- company_website: ["company.website.url"],
385
- // Also used for a podcast URL.
386
- website: ["company.website.url"],
387
- company_linkedin_url: ["company.linkedin.url"],
388
- industry: ["company.industry.value"],
389
- id: ["person.record.id", "company.record.id"],
390
- // Used for unrelated provider statuses; none is a catalog field.
391
- status: []
392
- };
393
- function fieldOfName(name, declared) {
394
- const meanings = _nullishCoalesce(EXTRACTOR_TARGET_FIELDS[name], () => ( []));
395
- if (declared === void 0) {
396
- return meanings.length === 1 ? meanings[0] : void 0;
397
- }
398
- return meanings.some((meaning) => fieldSatisfies(declared, meaning)) ? declared : void 0;
399
- }
400
-
401
- // src/cli/commands/model-description.ts
402
- function formatModelDescription(description) {
403
- const lines = [];
404
- lines.push(description.model);
405
- lines.push(`Provider: ${description.provider}`);
406
- const name = stringField(description.modelMetadata, "name");
407
- if (name) lines.push(`Name: ${name}`);
408
- const contextWindow = numberField(
409
- description.modelMetadata,
410
- "context_window"
411
- );
412
- if (contextWindow !== null) lines.push(`Context: ${contextWindow}`);
413
- const tags = arrayField(description.modelMetadata, "tags").filter(
414
- (value2) => typeof value2 === "string"
415
- );
416
- if (tags.length) lines.push(`Tags: ${tags.join(", ")}`);
417
- lines.push("");
418
- lines.push("Provider options:");
419
- appendNamespace(lines, description.providerOptions.gateway);
420
- if (description.providerOptions.selectedProvider) {
421
- appendNamespace(lines, description.providerOptions.selectedProvider);
422
- }
423
- lines.push("");
424
- lines.push("Example input:");
425
- lines.push(JSON.stringify(description.exampleInput, null, 2));
426
- if (description.caveats.length) {
427
- lines.push("");
428
- lines.push("Caveats:");
429
- for (const caveat of description.caveats) {
430
- lines.push(`- ${caveat}`);
431
- }
432
- }
433
- return `${lines.join("\n")}
434
- `;
435
- }
436
- function appendNamespace(lines, namespace) {
437
- lines.push(`- ${namespace.provider} (${namespace.sourceSymbol})`);
438
- for (const field of namespace.fields) {
439
- const values = _optionalChain([field, 'access', _5 => _5.enumValues, 'optionalAccess', _6 => _6.length]) ? ` (${field.enumValues.map((value2) => JSON.stringify(value2)).join(" | ")})` : "";
440
- lines.push(
441
- ` - ${field.name}: ${field.type}${values} - ${field.description}`
442
- );
443
- }
444
- }
445
- function stringField(value2, key) {
446
- if (!value2 || typeof value2 !== "object" || Array.isArray(value2)) return null;
447
- const candidate = value2[key];
448
- return typeof candidate === "string" && candidate.trim() ? candidate.trim() : null;
449
- }
450
- function numberField(value2, key) {
451
- if (!value2 || typeof value2 !== "object" || Array.isArray(value2)) return null;
452
- const candidate = value2[key];
453
- return typeof candidate === "number" ? candidate : null;
454
- }
455
- function arrayField(value2, key) {
456
- if (!value2 || typeof value2 !== "object" || Array.isArray(value2)) return [];
457
- const candidate = value2[key];
458
- return Array.isArray(candidate) ? candidate : [];
459
- }
460
-
461
242
  // src/cli/tool-connection-status.ts
462
243
  function toolConnectionStatusMessage(input) {
463
244
  if (input.credentialStatus === "requires_connection") {
@@ -475,13 +256,13 @@ var TOOL_COMMAND_TEMPLATES = {
475
256
  execute: "deepline tools execute <toolId> --input '{...}'"
476
257
  };
477
258
  function toListedTool(tool) {
478
- if (isPlayLikeTool(tool)) {
259
+ if (_chunk7DRPTGCKjs.isPlayLikeTool.call(void 0, tool)) {
479
260
  return {
480
261
  ...tool,
481
262
  description: listedToolDescription(tool),
482
263
  id: tool.toolId,
483
264
  type: "play",
484
- executeCommand: playRunCommandForTool(tool, tool.toolId)
265
+ executeCommand: _chunk7DRPTGCKjs.playRunCommandForTool.call(void 0, tool, tool.toolId)
485
266
  };
486
267
  }
487
268
  return {
@@ -492,15 +273,15 @@ function toListedTool(tool) {
492
273
  executeCommand: `deepline tools execute ${tool.toolId}`
493
274
  };
494
275
  }
495
- function normalizeGrepText(value2) {
496
- if (value2 === null || value2 === void 0) return "";
497
- if (typeof value2 === "string") return value2.toLowerCase();
498
- if (typeof value2 === "number" || typeof value2 === "boolean") {
499
- return String(value2).toLowerCase();
276
+ function normalizeGrepText(value) {
277
+ if (value === null || value === void 0) return "";
278
+ if (typeof value === "string") return value.toLowerCase();
279
+ if (typeof value === "number" || typeof value === "boolean") {
280
+ return String(value).toLowerCase();
500
281
  }
501
- if (Array.isArray(value2)) return value2.map(normalizeGrepText).join(" ");
502
- if (typeof value2 === "object") {
503
- return Object.values(value2).map(normalizeGrepText).join(" ");
282
+ if (Array.isArray(value)) return value.map(normalizeGrepText).join(" ");
283
+ if (typeof value === "object") {
284
+ return Object.values(value).map(normalizeGrepText).join(" ");
504
285
  }
505
286
  return "";
506
287
  }
@@ -511,19 +292,19 @@ function parseGrepTerms(query, mode) {
511
292
  const matches = _nullishCoalesce(trimmed.match(/"([^"]+)"|'([^']+)'|\S+/g), () => ( []));
512
293
  return matches.map((term) => term.replace(/^["']|["']$/g, "").trim()).filter(Boolean);
513
294
  }
514
- function matchesGrepQuery(value2, query, mode) {
295
+ function matchesGrepQuery(value, query, mode) {
515
296
  const terms = parseGrepTerms(query, mode);
516
297
  if (terms.length === 0) return true;
517
- const haystack = normalizeGrepText(value2);
298
+ const haystack = normalizeGrepText(value);
518
299
  if (mode === "any") return terms.some((term) => haystack.includes(term));
519
300
  return terms.every((term) => haystack.includes(term));
520
301
  }
521
- function shellCommandArg(value2) {
522
- return `'${value2.replace(/'/g, `'\\''`)}'`;
302
+ function shellCommandArg(value) {
303
+ return `'${value.replace(/'/g, `'\\''`)}'`;
523
304
  }
524
305
  function zeroMatchToolGuidance(options) {
525
306
  const categories = _nullishCoalesce(options.categories, () => ( []));
526
- const query = _nullishCoalesce(_optionalChain([options, 'access', _7 => _7.query, 'optionalAccess', _8 => _8.trim, 'call', _9 => _9()]), () => ( ""));
307
+ const query = _nullishCoalesce(_optionalChain([options, 'access', _4 => _4.query, 'optionalAccess', _5 => _5.trim, 'call', _6 => _6()]), () => ( ""));
527
308
  const filterText = [
528
309
  categories.length ? `categories=${categories.join(",")}` : null,
529
310
  query ? `grep=${query}` : null,
@@ -582,16 +363,16 @@ function firstSentence(text) {
582
363
  return (match ? match[0] : clean).trim();
583
364
  }
584
365
  function requiredInputIds(tool) {
585
- const inputSchema = recordField(
366
+ const inputSchema = _chunk7DRPTGCKjs.recordField.call(void 0,
586
367
  tool,
587
368
  "inputSchema",
588
369
  "input_schema"
589
370
  );
590
- return toolInputFieldsForDisplay(inputSchema).filter((field) => field.required === true).map((field) => String(_nullishCoalesce(field.name, () => ( "")))).filter(Boolean);
371
+ return _chunk7DRPTGCKjs.toolInputFieldsForDisplay.call(void 0, inputSchema).filter((field) => field.required === true).map((field) => String(_nullishCoalesce(field.name, () => ( "")))).filter(Boolean);
591
372
  }
592
373
  function notConnectedSuffix(tool) {
593
374
  const record = tool;
594
- const status = stringField2(record, "credentialStatus", "credential_status");
375
+ const status = _chunk7DRPTGCKjs.stringField.call(void 0, record, "credentialStatus", "credential_status");
595
376
  const connected = record.connected;
596
377
  const message = toolConnectionStatusMessage({
597
378
  connected: connected === false ? false : void 0,
@@ -600,18 +381,18 @@ function notConnectedSuffix(tool) {
600
381
  return message ? ` - \u26A0 ${message}` : "";
601
382
  }
602
383
  function shortPricingHint(tool) {
603
- const pricing = recordField(
384
+ const pricing = _chunk7DRPTGCKjs.recordField.call(void 0,
604
385
  tool,
605
386
  "pricing"
606
387
  );
607
- const credits = numberField2(pricing, "creditsPerUnit", "credits_per_unit");
608
- const unit = stringField2(pricing, "unit");
388
+ const credits = numberField(pricing, "creditsPerUnit", "credits_per_unit");
389
+ const unit = _chunk7DRPTGCKjs.stringField.call(void 0, pricing, "unit");
609
390
  if (credits !== null) {
610
391
  return `${formatDecimal(credits)} cr/${unit || "unit"}`;
611
392
  }
612
- const summary = stringField2(pricing, "summary");
393
+ const summary = _chunk7DRPTGCKjs.stringField.call(void 0, pricing, "summary");
613
394
  if (summary) return summary;
614
- const displayText = stringField2(pricing, "displayText", "display_text");
395
+ const displayText = _chunk7DRPTGCKjs.stringField.call(void 0, pricing, "displayText", "display_text");
615
396
  return displayText || null;
616
397
  }
617
398
  function aggregateCategorySummaries(tools) {
@@ -655,12 +436,12 @@ function categoryEnumerationRender(summaries) {
655
436
  };
656
437
  }
657
438
  async function listToolCategories(emitJson, compact) {
658
- const client = new (0, _chunk36ML3YKAjs.DeeplineClient)();
439
+ const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
659
440
  const rawTools = await client.listTools({ compact });
660
441
  const items = rawTools.map(toListedTool);
661
442
  const summaries = aggregateCategorySummaries(rawTools);
662
443
  const outputItems = compact ? items.map(compactTool) : items;
663
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
444
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
664
445
  {
665
446
  tools: outputItems,
666
447
  count: outputItems.length,
@@ -679,7 +460,7 @@ function unknownCategoryError(category, summaries, emitJson) {
679
460
  const known = summaries.map((item) => item.name);
680
461
  const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
681
462
  if (emitJson) {
682
- _chunkHRWUQJ4Kjs.printJson.call(void 0, {
463
+ _chunkDQ65ZVHNjs.printJson.call(void 0, {
683
464
  ok: false,
684
465
  exitCode: 4,
685
466
  code: "TOOL_CATEGORY_NOT_FOUND",
@@ -693,13 +474,13 @@ function unknownCategoryError(category, summaries, emitJson) {
693
474
  const render = categoryEnumerationRender(summaries);
694
475
  console.error(message);
695
476
  console.error("");
696
- console.error(_chunkHRWUQJ4Kjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
477
+ console.error(_chunkDQ65ZVHNjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
697
478
  console.error("");
698
479
  console.error(`Valid categories: ${known.join(", ")}`);
699
480
  return 4;
700
481
  }
701
482
  async function listToolsInCategory(category, emitJson) {
702
- const client = new (0, _chunk36ML3YKAjs.DeeplineClient)();
483
+ const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
703
484
  const rawTools = await client.listTools({
704
485
  categories: category,
705
486
  compact: false
@@ -709,7 +490,7 @@ async function listToolsInCategory(category, emitJson) {
709
490
  if (!summaries.some((item) => item.name === category)) {
710
491
  return unknownCategoryError(category, summaries, emitJson);
711
492
  }
712
- const rows = rawTools.filter((tool) => _optionalChain([tool, 'access', _10 => _10.categories, 'optionalAccess', _11 => _11.includes, 'call', _12 => _12(category)])).map((tool) => ({
493
+ const rows = rawTools.filter((tool) => _optionalChain([tool, 'access', _7 => _7.categories, 'optionalAccess', _8 => _8.includes, 'call', _9 => _9(category)])).map((tool) => ({
713
494
  id: tool.toolId,
714
495
  provider: tool.provider,
715
496
  required: requiredInputIds(tool),
@@ -736,7 +517,7 @@ async function listToolsInCategory(category, emitJson) {
736
517
  }
737
518
  ]
738
519
  };
739
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
520
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
740
521
  {
741
522
  category,
742
523
  total: rows.length,
@@ -749,7 +530,7 @@ async function listToolsInCategory(category, emitJson) {
749
530
  return 0;
750
531
  }
751
532
  async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
752
- const client = new (0, _chunk36ML3YKAjs.DeeplineClient)();
533
+ const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
753
534
  const items = (await client.listTools({
754
535
  categories: requestedCategories.join(","),
755
536
  compact
@@ -778,7 +559,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
778
559
  ]
779
560
  };
780
561
  const outputItems = compact ? items.map(compactTool) : items;
781
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
562
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
782
563
  {
783
564
  tools: outputItems,
784
565
  count: outputItems.length,
@@ -794,16 +575,16 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
794
575
  return 0;
795
576
  }
796
577
  async function listTools(category, options = {}) {
797
- const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _13 => _13.trim, 'call', _14 => _14()]), () => ( ""));
578
+ const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]), () => ( ""));
798
579
  const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
799
580
  const compact = options.compact !== false;
800
- const emitJson = options.json === true || _chunkHRWUQJ4Kjs.shouldEmitJson.call(void 0, );
581
+ const emitJson = options.json === true || _chunkDQ65ZVHNjs.shouldEmitJson.call(void 0, );
801
582
  if (positional && flagCategories.length > 0) {
802
583
  const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
803
584
  if (!flagIsSameSingle) {
804
585
  const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
805
586
  if (emitJson) {
806
- _chunkHRWUQJ4Kjs.printJson.call(void 0, {
587
+ _chunkDQ65ZVHNjs.printJson.call(void 0, {
807
588
  ok: false,
808
589
  exitCode: 2,
809
590
  code: "TOOL_LIST_CATEGORY_CONFLICT",
@@ -830,7 +611,7 @@ async function grepTools(queryInput, options = {}) {
830
611
  console.error("Usage: deepline tools grep <query> [--json]");
831
612
  return 1;
832
613
  }
833
- const client = new (0, _chunk36ML3YKAjs.DeeplineClient)();
614
+ const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
834
615
  const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
835
616
  const mode = _nullishCoalesce(options.mode, () => ( "all"));
836
617
  const jsonOutput = options.json === true;
@@ -873,7 +654,7 @@ async function grepTools(queryInput, options = {}) {
873
654
  query,
874
655
  mode
875
656
  }) : null;
876
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
657
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
877
658
  {
878
659
  tools: outputTools,
879
660
  count: outputTools.length,
@@ -891,13 +672,13 @@ async function grepTools(queryInput, options = {}) {
891
672
  } : {},
892
673
  commandTemplates: TOOL_COMMAND_TEMPLATES
893
674
  },
894
- { json: options.json || _chunkHRWUQJ4Kjs.shouldEmitJson.call(void 0, ) }
675
+ { json: options.json || _chunkDQ65ZVHNjs.shouldEmitJson.call(void 0, ) }
895
676
  );
896
677
  return 0;
897
678
  }
898
679
  function numericToolField(tool, field) {
899
- const value2 = tool[field];
900
- return typeof value2 === "number" ? value2 : void 0;
680
+ const value = tool[field];
681
+ return typeof value === "number" ? value : void 0;
901
682
  }
902
683
  function compactTool(tool) {
903
684
  const listed = toListedTool(tool);
@@ -917,7 +698,7 @@ function compactTool(tool) {
917
698
  };
918
699
  }
919
700
  function playIdentifiers(play) {
920
- return [play.name, play.reference, ..._nullishCoalesce(play.aliases, () => ( []))].filter((value2) => Boolean(_optionalChain([value2, 'optionalAccess', _15 => _15.trim, 'call', _16 => _16()]))).map((value2) => value2.trim());
701
+ return [play.name, play.reference, ..._nullishCoalesce(play.aliases, () => ( []))].filter((value) => Boolean(_optionalChain([value, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()]))).map((value) => value.trim());
921
702
  }
922
703
  async function findPlayForToolId(client, toolId, cliInvocationId) {
923
704
  const requested = toolId.trim();
@@ -943,37 +724,9 @@ Inspect its schema with: deepline describe ${playName}`;
943
724
  function printPlayAliasToolError(toolId, play) {
944
725
  console.error(playAliasToolErrorMessage(toolId, play));
945
726
  }
946
- function isPlayLikeTool(tool) {
947
- const record = tool;
948
- if (record.isPlay === true || record.is_play === true) return true;
949
- const playExpansion = recordField(record, "playExpansion", "play_expansion");
950
- if (Object.keys(playExpansion).length > 0) return true;
951
- const toolId = typeof record.toolId === "string" ? record.toolId : "";
952
- return toolId.endsWith("_waterfall");
953
- }
954
- function isMonitorTypeTool(tool) {
955
- return stringField2(tool, "kind") === "monitor_type";
956
- }
957
- function playReferenceForTool(tool) {
958
- const record = tool;
959
- const declared = stringField2(record, "playReference", "play_reference");
960
- if (declared.startsWith("prebuilt/")) {
961
- return declared;
962
- }
963
- return null;
964
- }
965
- function playSearchCommandForToolId(toolId) {
966
- return `deepline search --type prebuilts ${JSON.stringify(toolId.replace(/_/g, " "))}`;
967
- }
968
- function playRunCommandForTool(tool, toolId, input) {
969
- const playReference = playReferenceForTool(tool);
970
- if (!playReference) return playSearchCommandForToolId(toolId);
971
- const inputArg = input === void 0 ? "'{...}'" : `'${JSON.stringify(input)}'`;
972
- return `deepline plays run ${playReference} --input ${inputArg}`;
973
- }
974
727
  function playLikeToolExecuteErrorMessage(toolId, tool) {
975
- const playReference = tool ? playReferenceForTool(tool) : null;
976
- const nextStep = playReference ? `Use: deepline plays run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${playSearchCommandForToolId(toolId)}`;
728
+ const playReference = tool ? _chunk7DRPTGCKjs.playReferenceForTool.call(void 0, tool) : null;
729
+ const nextStep = playReference ? `Use: deepline plays run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunk7DRPTGCKjs.playSearchCommandForToolId.call(void 0, toolId)}`;
977
730
  return [
978
731
  `${toolId} is a workflow/play entry, not an atomic provider tool.`,
979
732
  nextStep,
@@ -1032,12 +785,12 @@ Output:
1032
785
  "Unable to read --credentials-file as a JSON object."
1033
786
  );
1034
787
  }
1035
- if (!credentials || typeof credentials !== "object" || Array.isArray(credentials) || Object.keys(credentials).length === 0 || Object.values(credentials).some((value2) => typeof value2 !== "string")) {
788
+ if (!credentials || typeof credentials !== "object" || Array.isArray(credentials) || Object.keys(credentials).length === 0 || Object.values(credentials).some((value) => typeof value !== "string")) {
1036
789
  throw new Error(
1037
790
  "--credentials-file must contain a nonempty JSON object of string credential values."
1038
791
  );
1039
792
  }
1040
- const result = await new (0, _chunk36ML3YKAjs.DeeplineClient)().setIntegrationCredentials(
793
+ const result = await new (0, _chunkUVXBVUZQjs.DeeplineClient)().setIntegrationCredentials(
1041
794
  provider,
1042
795
  credentials
1043
796
  );
@@ -1047,7 +800,7 @@ Output:
1047
800
  );
1048
801
  }
1049
802
  const confirmation = { provider, credential_saved: true };
1050
- if (_chunkHRWUQJ4Kjs.shouldEmitJson.call(void 0, options.json))
803
+ if (_chunkDQ65ZVHNjs.shouldEmitJson.call(void 0, options.json))
1051
804
  console.log(JSON.stringify(confirmation));
1052
805
  else
1053
806
  console.log(
@@ -1087,7 +840,7 @@ Examples:
1087
840
  json: Boolean(options.json)
1088
841
  });
1089
842
  });
1090
- _chunkR4XZO6Z5js.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
843
+ _chunkPSGEDGLTjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
1091
844
  tools.command("grep <query>").description(
1092
845
  "Literal grep over tool ids, descriptions, categories, and input fields."
1093
846
  ).addHelpText(
@@ -1188,7 +941,7 @@ Examples:
1188
941
  process.exitCode = await narrowView();
1189
942
  return;
1190
943
  }
1191
- const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-YKOE54ZO.js")));
944
+ const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-6WT74AOR.js")));
1192
945
  process.exitCode = await describeAnything(
1193
946
  toolId,
1194
947
  {
@@ -1203,7 +956,7 @@ Examples:
1203
956
  });
1204
957
  };
1205
958
  addToolMetadataCommand(
1206
- _chunkZMVJSS6Njs.addDescribeOptions.call(void 0,
959
+ _chunkZAAKSJASjs.addDescribeOptions.call(void 0,
1207
960
  tools.command("describe <toolId>", { hidden: true }).alias("get"),
1208
961
  { json: false }
1209
962
  )
@@ -1233,8 +986,8 @@ Examples:
1233
986
  ).option(
1234
987
  "-p, --param <key=value>",
1235
988
  "Pass one parameter. Repeat for multiple values.",
1236
- (value2, acc) => {
1237
- acc.push(value2);
989
+ (value, acc) => {
990
+ acc.push(value);
1238
991
  return acc;
1239
992
  },
1240
993
  []
@@ -1274,7 +1027,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1274
1027
  console.error("Usage: deepline tools describe <toolId> [--json]");
1275
1028
  return 1;
1276
1029
  }
1277
- const client = new (0, _chunk36ML3YKAjs.DeeplineClient)();
1030
+ const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
1278
1031
  let tool;
1279
1032
  try {
1280
1033
  tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
@@ -1328,12 +1081,12 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1328
1081
  const lines = toolPricingOnlyLines(tool, toolId);
1329
1082
  if (inferenceQuote)
1330
1083
  lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
1331
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1084
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
1332
1085
  {
1333
1086
  toolId: String(tool.toolId || toolId),
1334
- cost: _chunkR4XZO6Z5js.Capability.fromCatalogEntry(tool).describe().customerCost(),
1087
+ cost: _chunkZM2YPJQJjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
1335
1088
  ...modelDescription ? { modelOptions: modelDescription } : {},
1336
- ...isMonitorTypeTool(tool) ? { pricing: recordField(tool, "pricing") } : {},
1089
+ ..._chunk7DRPTGCKjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunk7DRPTGCKjs.recordField.call(void 0, tool, "pricing") } : {},
1337
1090
  ...inferenceQuote ? { inferenceQuote } : {}
1338
1091
  },
1339
1092
  {
@@ -1344,9 +1097,14 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1344
1097
  );
1345
1098
  return 0;
1346
1099
  }
1347
- if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !isMonitorTypeTool(tool) && !isPlayLikeTool(tool) && (options.json || options.contractJson)) {
1348
- const contract = toolContractJsonForDescribe(tool, toolId);
1349
- _chunkHRWUQJ4Kjs.printCompactJson.call(void 0, {
1100
+ if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunk7DRPTGCKjs.isMonitorTypeTool.call(void 0, tool) && !_chunk7DRPTGCKjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
1101
+ const contract = _chunk7DRPTGCKjs.toolContractJsonForDescribe.call(void 0,
1102
+ tool,
1103
+ toolId,
1104
+ void 0,
1105
+ seedToolListScript
1106
+ );
1107
+ _chunkDQ65ZVHNjs.printCompactJson.call(void 0, {
1350
1108
  toolId: contract.toolId,
1351
1109
  ...options.schemaOnly ? {
1352
1110
  inputSchema: contract.inputSchema,
@@ -1369,8 +1127,13 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1369
1127
  return 0;
1370
1128
  }
1371
1129
  if (options.contractJson) {
1372
- _chunkHRWUQJ4Kjs.printCompactJson.call(void 0, {
1373
- ...toolContractJsonForDescribe(tool, toolId),
1130
+ _chunkDQ65ZVHNjs.printCompactJson.call(void 0, {
1131
+ ..._chunk7DRPTGCKjs.toolContractJsonForDescribe.call(void 0,
1132
+ tool,
1133
+ toolId,
1134
+ void 0,
1135
+ seedToolListScript
1136
+ ),
1374
1137
  ...modelDescription ? { modelOptions: modelDescription } : {},
1375
1138
  ...inferenceQuote ? { inferenceQuote } : {}
1376
1139
  });
@@ -1378,8 +1141,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1378
1141
  }
1379
1142
  const emitJson = options.json === true;
1380
1143
  if (emitJson) {
1381
- _chunkHRWUQJ4Kjs.printCompactJson.call(void 0, {
1382
- ...toolMetadataJsonForDescribe(tool, toolId),
1144
+ _chunkDQ65ZVHNjs.printCompactJson.call(void 0, {
1145
+ ..._chunk7DRPTGCKjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
1383
1146
  ...modelDescription ? { modelOptions: modelDescription } : {},
1384
1147
  ...inferenceQuote ? { inferenceQuote } : {}
1385
1148
  });
@@ -1404,7 +1167,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1404
1167
  printCompactToolContract(tool, toolId);
1405
1168
  if (modelDescription) {
1406
1169
  process.stdout.write(`
1407
- ${formatModelDescription(modelDescription)}`);
1170
+ ${_chunk7DRPTGCKjs.formatModelDescription.call(void 0, modelDescription)}`);
1408
1171
  }
1409
1172
  if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
1410
1173
  return 0;
@@ -1412,7 +1175,7 @@ ${formatModelDescription(modelDescription)}`);
1412
1175
  printCompactToolContract(tool, toolId);
1413
1176
  if (modelDescription) {
1414
1177
  process.stdout.write(`
1415
- ${formatModelDescription(modelDescription)}`);
1178
+ ${_chunk7DRPTGCKjs.formatModelDescription.call(void 0, modelDescription)}`);
1416
1179
  }
1417
1180
  if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
1418
1181
  return 0;
@@ -1428,114 +1191,11 @@ function inferenceQuoteSummaryLines(_quote) {
1428
1191
  function printInferenceQuoteSummary(quote) {
1429
1192
  for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
1430
1193
  }
1431
- function toolContractJsonForDescribe(tool, requestedToolId, authoringContractEdition) {
1432
- const toolId = String(tool.toolId || requestedToolId);
1433
- const inputFields = toolInputFieldsForDisplay(
1434
- recordField(tool, "inputSchema", "input_schema")
1435
- );
1436
- const inputSchema = publicToolInputSchemaForDescribe(
1437
- recordField(tool, "inputSchema", "input_schema")
1438
- );
1439
- const outputSchemaRecord = recordField(tool, "outputSchema", "output_schema");
1440
- const outputFields = toolOutputFieldsForDisplay(outputSchemaRecord);
1441
- const usageGuidance = recordField(tool, "usageGuidance", "usage_guidance");
1442
- const guidance = recordField(tool, "guidance");
1443
- const toolExecutionResult = recordField(
1444
- usageGuidance,
1445
- "toolExecutionResult",
1446
- "tool_execution_result"
1447
- );
1448
- const extractedLists = extractionContractEntries(
1449
- arrayField2(toolExecutionResult, "extractedLists", "extracted_lists")
1450
- ).map((entry) => ({
1451
- ...entry,
1452
- returnType: _chunkKB4SDX5Sjs.playToolListGetterMode.call(void 0, authoringContractEdition) === "array" ? "Array" : "PlayDataset",
1453
- rowsExpression: _chunkKB4SDX5Sjs.playToolListGetterMode.call(void 0, authoringContractEdition) === "array" ? entry.expression : `await ${entry.expression}.materialize()`
1454
- }));
1455
- const extractedValues = extractionContractEntries(
1456
- arrayField2(toolExecutionResult, "extractedValues", "extracted_values")
1457
- );
1458
- const pricing = _chunkR4XZO6Z5js.Capability.fromCatalogEntry(tool).describe().customerCost();
1459
- const executionMetadataRecord = recordField(
1460
- tool,
1461
- "executionMetadata",
1462
- "execution_metadata"
1463
- );
1464
- const executionMetadata = Object.keys(executionMetadataRecord).length > 0 ? executionMetadataRecord : null;
1465
- const batchCapabilityRecord = recordField(
1466
- tool,
1467
- "batchCapability",
1468
- "batch_capability"
1469
- );
1470
- const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
1471
- const deprecation = recordField(tool, "deprecation");
1472
- const replacementToolId = stringField2(
1473
- deprecation,
1474
- "replacementToolId",
1475
- "replacement_tool_id"
1476
- );
1477
- const deprecationMessage = stringField2(deprecation, "message");
1478
- const deprecationExecution = stringField2(deprecation, "execution");
1479
- const deprecated = tool.deprecated === true || stringField2(tool, "credentialStatus", "credential_status") === "deprecated";
1480
- const starterScript = !deprecated && !isPlayLikeTool(tool) && extractedLists.length > 0 ? starterScriptJson(
1481
- seedToolListScript({
1482
- toolId,
1483
- payload: samplePayloadForInputFields(inputFields),
1484
- rows: []
1485
- })
1486
- ) : null;
1487
- const executeCommand = deprecated && replacementToolId ? `deepline tools execute ${replacementToolId} --input '{...}'` : isPlayLikeTool(tool) ? playRunCommandForTool(tool, toolId) : `deepline tools execute ${toolId} --input '{...}'`;
1488
- return {
1489
- schemaVersion: 1,
1490
- toolId,
1491
- provider: tool.provider,
1492
- displayName: tool.displayName,
1493
- cost: pricing,
1494
- description: tool.description,
1495
- ...Object.keys(guidance).length > 0 ? { guidance } : {},
1496
- categories: tool.categories,
1497
- ...Array.isArray(tool.requestWarnings) ? { requestWarnings: tool.requestWarnings } : {},
1498
- ...deprecated ? {
1499
- deprecated: true,
1500
- callable: tool.callable !== false,
1501
- deprecation: {
1502
- replacementToolId,
1503
- message: deprecationMessage,
1504
- ...deprecationExecution ? { execution: deprecationExecution } : {}
1505
- }
1506
- } : {},
1507
- inputFields: inputFields.map(inputFieldJsonForDescribe),
1508
- inputSchema,
1509
- ...isRecord(tool.responseSchema) ? { responseSchema: tool.responseSchema } : {},
1510
- ...Array.isArray(tool.examples) ? { examples: tool.examples } : {},
1511
- responseAccess: "result.toolResponse.rawV2",
1512
- ...Object.keys(outputSchemaRecord).length > 0 ? {
1513
- outputSchema: publicToolInputSchemaForDescribe(outputSchemaRecord),
1514
- outputFields: outputFields.map(inputFieldJsonForDescribe)
1515
- } : {},
1516
- ...executionMetadata ? { executionMetadata } : {},
1517
- ...batchCapability ? { batchCapability } : {},
1518
- getters: {
1519
- extractedLists,
1520
- extractedValues
1521
- },
1522
- executeCommand,
1523
- ...starterScript ? { starterScript } : {}
1524
- };
1525
- }
1526
- function extractionContractEntries(entries) {
1527
- return entries.flatMap((entry) => {
1528
- if (!isRecord(entry)) return [];
1529
- const name = stringField2(entry, "name");
1530
- const expression = stringField2(entry, "expression");
1531
- return name && expression ? [{ name, expression }] : [];
1532
- });
1533
- }
1534
1194
  function printMonitorTypeFilters(tool) {
1535
- const schema = recordField(tool, "payload_schema", "payloadSchema");
1536
- const properties = recordField(schema, "properties");
1195
+ const schema = _chunk7DRPTGCKjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
1196
+ const properties = _chunk7DRPTGCKjs.recordField.call(void 0, schema, "properties");
1537
1197
  const required = new Set(
1538
- arrayField2(schema, "required").filter(
1198
+ _chunk7DRPTGCKjs.arrayField.call(void 0, schema, "required").filter(
1539
1199
  (v) => typeof v === "string"
1540
1200
  )
1541
1201
  );
@@ -1546,25 +1206,25 @@ function printMonitorTypeFilters(tool) {
1546
1206
  }
1547
1207
  console.log("Deploy filters (set in the monitor payload):");
1548
1208
  for (const name of names) {
1549
- const field = isRecord(properties[name]) ? properties[name] : {};
1209
+ const field = _chunk7DRPTGCKjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
1550
1210
  const star = required.has(name) ? "*" : "";
1551
- const enumVals = arrayField2(field, "enum").filter(
1211
+ const enumVals = _chunk7DRPTGCKjs.arrayField.call(void 0, field, "enum").filter(
1552
1212
  (v) => typeof v === "string"
1553
1213
  );
1554
- const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : stringField2(field, "type") || "string";
1555
- const desc = stringField2(field, "description");
1214
+ const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunk7DRPTGCKjs.stringField.call(void 0, field, "type") || "string";
1215
+ const desc = _chunk7DRPTGCKjs.stringField.call(void 0, field, "description");
1556
1216
  console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
1557
1217
  }
1558
1218
  }
1559
1219
  function printMonitorTypeFilterExamples(tool) {
1560
- const documentation = recordField(tool, "documentation");
1561
- const fields = recordField(documentation, "fields");
1220
+ const documentation = _chunk7DRPTGCKjs.recordField.call(void 0, tool, "documentation");
1221
+ const fields = _chunk7DRPTGCKjs.recordField.call(void 0, documentation, "fields");
1562
1222
  const examples = Object.entries(fields).flatMap(([name, rawField]) => {
1563
- const grammar = recordField(isRecord(rawField) ? rawField : {}, "grammar");
1564
- const example = stringField2(grammar, "example");
1223
+ const grammar = _chunk7DRPTGCKjs.recordField.call(void 0, _chunk7DRPTGCKjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
1224
+ const example = _chunk7DRPTGCKjs.stringField.call(void 0, grammar, "example");
1565
1225
  const values = [
1566
- ...arrayField2(grammar, "examples").filter(
1567
- (value2) => typeof value2 === "string" && Boolean(value2)
1226
+ ..._chunk7DRPTGCKjs.arrayField.call(void 0, grammar, "examples").filter(
1227
+ (value) => typeof value === "string" && Boolean(value)
1568
1228
  ),
1569
1229
  ...example ? [example] : []
1570
1230
  ];
@@ -1578,21 +1238,21 @@ function printMonitorTypeFilterExamples(tool) {
1578
1238
  }
1579
1239
  }
1580
1240
  function printMonitorTypeStreams(tool) {
1581
- const streams = arrayField2(tool, "streams", "output_streams").filter(
1582
- isRecord
1241
+ const streams = _chunk7DRPTGCKjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
1242
+ _chunk7DRPTGCKjs.isRecord
1583
1243
  );
1584
1244
  if (!streams.length) return;
1585
1245
  console.log("");
1586
1246
  console.log("Filter columns (a play's sqlListeners.where, per stream):");
1587
1247
  for (const stream of streams) {
1588
- const name = stringField2(stream, "stream");
1589
- const cols = arrayField2(stream, "columns").filter(isRecord).map((col) => stringField2(col, "name")).filter(Boolean);
1248
+ const name = _chunk7DRPTGCKjs.stringField.call(void 0, stream, "stream");
1249
+ const cols = _chunk7DRPTGCKjs.arrayField.call(void 0, stream, "columns").filter(_chunk7DRPTGCKjs.isRecord).map((col) => _chunk7DRPTGCKjs.stringField.call(void 0, col, "name")).filter(Boolean);
1590
1250
  console.log(`- ${name}: ${cols.join(", ")}`);
1591
1251
  }
1592
1252
  }
1593
1253
  function monitorTypePricingLines(tool) {
1594
- const pricing = recordField(tool, "pricing");
1595
- const byType = recordField(
1254
+ const pricing = _chunk7DRPTGCKjs.recordField.call(void 0, tool, "pricing");
1255
+ const byType = _chunk7DRPTGCKjs.recordField.call(void 0,
1596
1256
  pricing,
1597
1257
  "pricing_by_radar_type",
1598
1258
  "pricingByRadarType"
@@ -1603,9 +1263,9 @@ function monitorTypePricingLines(tool) {
1603
1263
  }
1604
1264
  const lines = ["Pricing (Deepline credits per accepted event):"];
1605
1265
  for (const key of keys) {
1606
- const entry = isRecord(byType[key]) ? byType[key] : {};
1607
- const credits = numberField2(entry, "deepline_credits", "deeplineCredits");
1608
- const display = stringField2(entry, "display");
1266
+ const entry = _chunk7DRPTGCKjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
1267
+ const credits = numberField(entry, "deepline_credits", "deeplineCredits");
1268
+ const display = _chunk7DRPTGCKjs.stringField.call(void 0, entry, "display");
1609
1269
  const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "not listed");
1610
1270
  lines.push(`- ${key}: ${shown}`);
1611
1271
  }
@@ -1615,20 +1275,20 @@ function printMonitorTypePricing(tool) {
1615
1275
  for (const line of monitorTypePricingLines(tool)) console.log(line);
1616
1276
  }
1617
1277
  function printMonitorTypeDeploy(tool) {
1618
- const deploy = recordField(tool, "deploy");
1619
- const toolId = stringField2(tool, "toolId");
1620
- const example = stringField2(deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
1278
+ const deploy = _chunk7DRPTGCKjs.recordField.call(void 0, tool, "deploy");
1279
+ const toolId = _chunk7DRPTGCKjs.stringField.call(void 0, tool, "toolId");
1280
+ const example = _chunk7DRPTGCKjs.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
1621
1281
  console.log("Deploy (a monitor type is deployed, not executed):");
1622
1282
  console.log(` ${example}`);
1623
1283
  }
1624
1284
  function printMonitorTypeContract(tool, requestedToolId) {
1625
- const toolId = stringField2(tool, "toolId") || requestedToolId;
1285
+ const toolId = _chunk7DRPTGCKjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
1626
1286
  console.log(toolId);
1627
- const displayName = stringField2(tool, "displayName");
1287
+ const displayName = _chunk7DRPTGCKjs.stringField.call(void 0, tool, "displayName");
1628
1288
  if (displayName) console.log(`Best for: ${displayName}`);
1629
- const description = stringField2(tool, "description");
1289
+ const description = _chunk7DRPTGCKjs.stringField.call(void 0, tool, "description");
1630
1290
  if (description) console.log(`Description: ${description}`);
1631
- const categories = arrayField2(tool, "categories").filter(
1291
+ const categories = _chunk7DRPTGCKjs.arrayField.call(void 0, tool, "categories").filter(
1632
1292
  (v) => typeof v === "string"
1633
1293
  );
1634
1294
  if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
@@ -1647,191 +1307,32 @@ function printMonitorTypeContract(tool, requestedToolId) {
1647
1307
  console.log("");
1648
1308
  console.log(`More: deepline describe ${toolId}`);
1649
1309
  }
1650
- function schemaNodeAt(schema, path) {
1651
- let node = schema;
1652
- for (const part of path.split(".").filter(Boolean)) {
1653
- const [key, ...indexes] = part.split("[");
1654
- node = recordField(isRecord(node) ? node : {}, "properties")[key];
1655
- for (const _index of indexes)
1656
- node = isRecord(node) ? node.items : void 0;
1657
- }
1658
- return node;
1659
- }
1660
- var NAMED_VALUE_SHAPES = {
1661
- email_status: { shape: "EmailStatus", schema: _chunkRDXFGPJUjs.EMAIL_STATUS_JSON_SCHEMA },
1662
- job_change: { shape: "JobChange", schema: _chunkRDXFGPJUjs.JOB_CHANGE_JSON_SCHEMA }
1663
- };
1664
- function extractorValueType(name) {
1665
- if (!_chunkRDXFGPJUjs.isDeeplineExtractorTarget.call(void 0, name)) return void 0;
1666
- const definition = _chunkRDXFGPJUjs.DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS[name];
1667
- if (definition.enum) {
1668
- return {
1669
- type: definition.enum.map((value2) => JSON.stringify(value2)).join(" | ")
1670
- };
1671
- }
1672
- const named = NAMED_VALUE_SHAPES[definition.valueKind];
1673
- if (!named) return { type: "string" };
1674
- const { type, fields } = _chunkZMVJSS6Njs.schemaField.call(void 0, name, named.schema, true);
1675
- return { type, ...fields ? { fields } : {}, shape: named.shape };
1676
- }
1677
- function jsonSchemaOf(wrapper) {
1678
- return isRecord(wrapper.jsonSchema) ? wrapper.jsonSchema : wrapper;
1679
- }
1680
- function publicToolSchemas(tool) {
1681
- const scrubbed = (...keys) => {
1682
- const schema = recordField(tool, ...keys);
1683
- if (Object.keys(schema).length === 0) return null;
1684
- const cleaned = publicToolInputSchemaForDescribe(schema);
1685
- return isRecord(cleaned.jsonSchema) ? cleaned.jsonSchema : cleaned;
1686
- };
1687
- const responseSchema = scrubbed("responseSchema", "response_schema");
1688
- return {
1689
- inputSchema: scrubbed(
1690
- "inputSchema",
1691
- "input_schema",
1692
- "payload_schema",
1693
- "payloadSchema"
1694
- ),
1695
- outputSchema: scrubbed("outputSchema", "output_schema"),
1696
- ...responseSchema ? { responseSchema } : {}
1697
- };
1698
- }
1699
- function describedTool(tool, requestedToolId) {
1700
- const id = stringField2(tool, "toolId") || requestedToolId;
1701
- const displayName = stringField2(tool, "displayName") || void 0;
1702
- const description = stringField2(tool, "bestFor", "best_for") || stringField2(tool, "description") || void 0;
1703
- if (isMonitorTypeTool(tool)) {
1704
- return {
1705
- kind: "monitor_type",
1706
- id,
1707
- displayName,
1708
- description,
1709
- cost: stringField2(recordField(tool, "pricing"), "displayText") || void 0,
1710
- guidance: [],
1711
- inputs: _chunkZMVJSS6Njs.schemaFields.call(void 0,
1712
- recordField(tool, "payload_schema", "payloadSchema")
1713
- ),
1714
- outputs: [],
1715
- runner: {
1716
- via: "monitor",
1717
- deploy: stringField2(recordField(tool, "deploy"), "example") || `deepline monitors deploy '{"key":"...","tool":"${id}","payload":{...}}'`
1718
- }
1719
- };
1720
- }
1721
- const contract = toolContractJsonForDescribe(tool, requestedToolId);
1722
- const cost = recordField(contract, "cost");
1723
- const billing = stringField2(cost, "billingSourceLabel");
1724
- const deprecation = recordField(contract, "deprecation");
1725
- const getters = recordField(contract, "getters");
1726
- const outputSchema = jsonSchemaOf(recordField(contract, "outputSchema"));
1727
- const toolResult = recordField(tool, "toolResult", "tool_result");
1728
- const getterDetails = (kind) => new Map(
1729
- arrayField2(toolResult, kind).filter(isRecord).map((item) => [
1730
- stringField2(item, "name"),
1731
- recordField(item, "details")
1732
- ])
1733
- );
1734
- const declared = recordField(tool, "extractors");
1735
- const getterOutputs = (kind, roots) => {
1736
- const details = getterDetails(kind);
1737
- return arrayField2(getters, kind).filter(isRecord).map((entry) => {
1738
- const name = stringField2(entry, "name");
1739
- const rawPaths = arrayField2(
1740
- _nullishCoalesce(details.get(name), () => ( {})),
1741
- "rawToolOutputPaths"
1742
- ).map(String);
1743
- const paths = rawPaths.map(
1744
- (path) => path.replace(/^toolResponse\.raw\./, "")
1745
- );
1746
- const node = roots.flatMap((root) => paths.map((path) => schemaNodeAt(root, path))).find(isRecord);
1747
- const { fields, ...typed } = _chunkZMVJSS6Njs.schemaField.call(void 0, name, node, true);
1748
- const valueType = stringField2(_nullishCoalesce(details.get(name), () => ( {})), "valueType");
1749
- const deepline = kind === "extractedValues" ? extractorValueType(name) : void 0;
1750
- const known = typed.type !== "unknown" ? void 0 : kind === "extractedLists" ? { type: "object[]" } : deepline;
1751
- const means = kind === "extractedValues" ? fieldOfName(
1752
- name,
1753
- stringField2(_nullishCoalesce(declared[name], () => ( {})), "means") || void 0
1754
- ) : void 0;
1755
- const field = {
1756
- ...typed,
1757
- ...means ? { means } : {},
1758
- // A normalized value has a named type instead of the response's
1759
- // shape; a normalized object is spelled out once under Types.
1760
- ..._optionalChain([deepline, 'optionalAccess', _17 => _17.shape]) ? deepline : valueType ? { type: valueType } : known ? known : fields ? { fields } : {},
1761
- // A list's row columns that matter are value getters of their own.
1762
- ...kind === "extractedLists" && fields ? { summarized: true } : {},
1763
- read: playResultExpression(entry),
1764
- ...rawPaths.length ? { paths: rawPaths } : {}
1765
- };
1766
- return { field, node };
1767
- });
1768
- };
1769
- const declaredLists = getterOutputs("extractedLists", [outputSchema]);
1770
- const lists = declaredLists.some(({ node }) => node) ? declaredLists.filter(({ node }) => node) : declaredLists;
1771
- const values = getterOutputs("extractedValues", [
1772
- outputSchema,
1773
- ...lists.map(({ node }) => _optionalChain([node, 'optionalAccess', _18 => _18.items]))
1774
- ]).map((value2) => {
1775
- if (!lists.length || !value2.field.paths) return value2;
1776
- const within = value2.field.paths.map(
1777
- (path) => path.replace(/^toolResponse\.raw\./, "")
1778
- );
1779
- const list = _nullishCoalesce(lists.find(
1780
- ({ node }) => within.some((path) => isRecord(schemaNodeAt(_optionalChain([node, 'optionalAccess', _19 => _19.items]), path)))
1781
- ), () => ( lists[0]));
1782
- return {
1783
- ...value2,
1784
- field: { ...value2.field, in: list.field.name, paths: within }
1785
- };
1786
- });
1787
- const playReference = isPlayLikeTool(tool) ? playReferenceForTool(tool) : null;
1788
- return {
1789
- kind: "tool",
1790
- id: String(contract.toolId),
1791
- displayName,
1792
- description,
1793
- cost: [
1794
- stringField2(cost, "displayText"),
1795
- // "Free (free)" says the same thing twice.
1796
- billing.toLowerCase() === stringField2(cost, "displayText").toLowerCase() ? "" : billing && `(${billing})`,
1797
- _chunkR4XZO6Z5js.observedMaxText.call(void 0, cost) && `\u2014 ${_chunkR4XZO6Z5js.observedMaxText.call(void 0, cost)}`
1798
- ].filter(Boolean).join(" ") || void 0,
1799
- guidance: [
1800
- ...contract.deprecated === true ? [`Deprecated. ${stringField2(deprecation, "message")}`.trim()] : [],
1801
- ...Object.values(recordField(contract, "guidance")).filter(
1802
- (line) => typeof line === "string" && /[a-z0-9]/i.test(line)
1803
- )
1804
- ],
1805
- rateLimit: _chunkZMVJSS6Njs.rateLimitSummary.call(void 0,
1806
- recordField(contract, "executionMetadata").configuredRateLimits
1807
- ),
1808
- inputs: _chunkZMVJSS6Njs.schemaFields.call(void 0, jsonSchemaOf(recordField(contract, "inputSchema"))),
1809
- outputs: [...lists, ...values].map(({ field }) => field),
1810
- rawResponse: _chunkZMVJSS6Njs.schemaFields.call(void 0, outputSchema),
1811
- runner: playReference ? { via: "play", reference: playReference } : { via: "tool", toolId: String(contract.toolId) }
1812
- };
1813
- }
1814
1310
  function toolGuidanceLines(guidance) {
1815
- const record = isRecord(guidance) ? guidance : {};
1816
- const toolGuidance = stringField2(record, "tool");
1817
- const providerGuidance = stringField2(record, "provider");
1311
+ const record = _chunk7DRPTGCKjs.isRecord.call(void 0, guidance) ? guidance : {};
1312
+ const toolGuidance = _chunk7DRPTGCKjs.stringField.call(void 0, record, "tool");
1313
+ const providerGuidance = _chunk7DRPTGCKjs.stringField.call(void 0, record, "provider");
1818
1314
  return [
1819
1315
  ...toolGuidance ? [`- This tool: ${toolGuidance}`] : [],
1820
1316
  ...providerGuidance ? [`- Provider: ${providerGuidance}`] : []
1821
1317
  ];
1822
1318
  }
1823
1319
  function printCompactToolContract(tool, requestedToolId) {
1824
- if (isMonitorTypeTool(tool)) {
1320
+ if (_chunk7DRPTGCKjs.isMonitorTypeTool.call(void 0, tool)) {
1825
1321
  printMonitorTypeContract(tool, requestedToolId);
1826
1322
  return;
1827
1323
  }
1828
- const contract = toolContractJsonForDescribe(tool, requestedToolId);
1829
- const cost = isRecord(contract.cost) ? contract.cost : {};
1830
- const getters = isRecord(contract.getters) ? contract.getters : {};
1324
+ const contract = _chunk7DRPTGCKjs.toolContractJsonForDescribe.call(void 0,
1325
+ tool,
1326
+ requestedToolId,
1327
+ void 0,
1328
+ seedToolListScript
1329
+ );
1330
+ const cost = _chunk7DRPTGCKjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
1331
+ const getters = _chunk7DRPTGCKjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
1831
1332
  const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
1832
1333
  const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
1833
- const inputFields = recursiveToolInputFieldsForDisplay(
1834
- recordField(contract, "inputSchema")
1334
+ const inputFields = _chunk7DRPTGCKjs.recursiveToolInputFieldsForDisplay.call(void 0,
1335
+ _chunk7DRPTGCKjs.recordField.call(void 0, contract, "inputSchema")
1835
1336
  );
1836
1337
  console.log(String(contract.toolId));
1837
1338
  if (contract.displayName) console.log(`Best for: ${contract.displayName}`);
@@ -1848,9 +1349,9 @@ function printCompactToolContract(tool, requestedToolId) {
1848
1349
  printToolOutputArrayShape(contract);
1849
1350
  printToolExecutionHints(contract);
1850
1351
  if (contract.deprecated === true) {
1851
- const deprecation = isRecord(contract.deprecation) ? contract.deprecation : {};
1852
- const message = stringField2(deprecation, "message");
1853
- const replacementToolId = stringField2(
1352
+ const deprecation = _chunk7DRPTGCKjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
1353
+ const message = _chunk7DRPTGCKjs.stringField.call(void 0, deprecation, "message");
1354
+ const replacementToolId = _chunk7DRPTGCKjs.stringField.call(void 0,
1854
1355
  deprecation,
1855
1356
  "replacementToolId",
1856
1357
  "replacement_tool_id"
@@ -1875,12 +1376,12 @@ function printCompactToolContract(tool, requestedToolId) {
1875
1376
  console.log("");
1876
1377
  console.log("Inputs:");
1877
1378
  for (const field of inputFields) {
1878
- if (!isRecord(field)) continue;
1879
- const name = stringField2(field, "name");
1379
+ if (!_chunk7DRPTGCKjs.isRecord.call(void 0, field)) continue;
1380
+ const name = _chunk7DRPTGCKjs.stringField.call(void 0, field, "name");
1880
1381
  if (!name) continue;
1881
1382
  const required = field.required ? "*" : "";
1882
- const type = stringField2(field, "type") || "unknown";
1883
- const description = stringField2(field, "description");
1383
+ const type = _chunk7DRPTGCKjs.stringField.call(void 0, field, "type") || "unknown";
1384
+ const description = _chunk7DRPTGCKjs.stringField.call(void 0, field, "description");
1884
1385
  const enumValues = Array.isArray(field.enum) ? field.enum : [];
1885
1386
  const enumSuffix = enumValues.length ? ` enum=${enumValues.map(String).join("|")}` : "";
1886
1387
  const itemBoundsSuffix = arrayItemBoundsSuffix(field);
@@ -1895,8 +1396,8 @@ function printCompactToolContract(tool, requestedToolId) {
1895
1396
  }
1896
1397
  console.log("");
1897
1398
  printToolExamplesOnly(tool, requestedToolId);
1898
- const starterScript = isRecord(contract.starterScript) ? contract.starterScript : {};
1899
- const starterPath = stringField2(starterScript, "path");
1399
+ const starterScript = _chunk7DRPTGCKjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
1400
+ const starterPath = _chunk7DRPTGCKjs.stringField.call(void 0, starterScript, "path");
1900
1401
  if (starterPath) {
1901
1402
  console.log("");
1902
1403
  console.log(`Starter script: ${starterPath}`);
@@ -1907,16 +1408,16 @@ function printCompactToolContract(tool, requestedToolId) {
1907
1408
  console.log("Getters:");
1908
1409
  if (listGetters.length) console.log(listGetterHeading());
1909
1410
  for (const entry of listGetters) {
1910
- if (isRecord(entry))
1411
+ if (_chunk7DRPTGCKjs.isRecord.call(void 0, entry))
1911
1412
  console.log(
1912
- `- ${stringField2(entry, "name")}: ${playResultExpression(entry)}`
1413
+ `- ${_chunk7DRPTGCKjs.stringField.call(void 0, entry, "name")}: ${_chunk7DRPTGCKjs.playResultExpression.call(void 0, entry)}`
1913
1414
  );
1914
1415
  }
1915
1416
  if (valueGetters.length) console.log("Values:");
1916
1417
  for (const entry of valueGetters) {
1917
- if (isRecord(entry))
1418
+ if (_chunk7DRPTGCKjs.isRecord.call(void 0, entry))
1918
1419
  console.log(
1919
- `- ${stringField2(entry, "name")}: ${playResultExpression(entry)}`
1420
+ `- ${_chunk7DRPTGCKjs.stringField.call(void 0, entry, "name")}: ${_chunk7DRPTGCKjs.playResultExpression.call(void 0, entry)}`
1920
1421
  );
1921
1422
  }
1922
1423
  }
@@ -1927,23 +1428,23 @@ function printCompactToolContract(tool, requestedToolId) {
1927
1428
  console.log(`More: deepline describe ${contract.toolId}`);
1928
1429
  }
1929
1430
  function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
1930
- if (isMonitorTypeTool(tool)) {
1431
+ if (_chunk7DRPTGCKjs.isMonitorTypeTool.call(void 0, tool)) {
1931
1432
  return monitorTypePricingLines(tool);
1932
1433
  }
1933
1434
  const toolId = String(tool.toolId || requestedToolId);
1934
- const cost = _chunkR4XZO6Z5js.Capability.fromCatalogEntry(tool).describe().customerCost();
1935
- const pricingModel = stringField2(cost, "pricingModel") || "unknown";
1936
- const billing = stringField2(cost, "billingSourceLabel") || stringField2(cost, "billingSource") || stringField2(cost, "billingMode") || "unknown";
1937
- const explicitUnit = stringField2(cost, "unit");
1435
+ const cost = _chunkZM2YPJQJjs.Capability.fromCatalogEntry(tool).describe().customerCost();
1436
+ const pricingModel = _chunk7DRPTGCKjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
1437
+ const billing = _chunk7DRPTGCKjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunk7DRPTGCKjs.stringField.call(void 0, cost, "billingSource") || _chunk7DRPTGCKjs.stringField.call(void 0, cost, "billingMode") || "unknown";
1438
+ const explicitUnit = _chunk7DRPTGCKjs.stringField.call(void 0, cost, "unit");
1938
1439
  const unit = explicitUnit || (pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit");
1939
- const credits = numberField2(cost, "deeplineCreditsPerPricingUnit");
1940
- const usd = numberField2(cost, "deeplineUsdPerPricingUnit");
1941
- const displayText = stringField2(cost, "displayText");
1942
- const summary = stringField2(cost, "summary");
1440
+ const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
1441
+ const usd = numberField(cost, "deeplineUsdPerPricingUnit");
1442
+ const displayText = _chunk7DRPTGCKjs.stringField.call(void 0, cost, "displayText");
1443
+ const summary = _chunk7DRPTGCKjs.stringField.call(void 0, cost, "summary");
1943
1444
  const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
1944
1445
  return [
1945
1446
  `${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
1946
- ..._chunkR4XZO6Z5js.observedMaxText.call(void 0, cost) ? [` ${_chunkR4XZO6Z5js.observedMaxText.call(void 0, cost)}`] : [],
1447
+ ..._chunkZM2YPJQJjs.observedMaxText.call(void 0, cost) ? [` ${_chunkZM2YPJQJjs.observedMaxText.call(void 0, cost)}`] : [],
1947
1448
  ...cost.observedReference || cost.estimatedRange ? [
1948
1449
  ...summary ? [` ${summary}`] : [],
1949
1450
  ...(_nullishCoalesce(cost.details, () => ( []))).map((detail) => ` ${detail}`)
@@ -1956,14 +1457,19 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
1956
1457
  console.log(line);
1957
1458
  }
1958
1459
  function printToolSchemaOnly(tool, requestedToolId) {
1959
- if (isMonitorTypeTool(tool)) {
1460
+ if (_chunk7DRPTGCKjs.isMonitorTypeTool.call(void 0, tool)) {
1960
1461
  printMonitorTypeFilters(tool);
1961
1462
  printMonitorTypeStreams(tool);
1962
1463
  return;
1963
1464
  }
1964
- const contract = toolContractJsonForDescribe(tool, requestedToolId);
1965
- const inputFields = recursiveToolInputFieldsForDisplay(
1966
- recordField(contract, "inputSchema")
1465
+ const contract = _chunk7DRPTGCKjs.toolContractJsonForDescribe.call(void 0,
1466
+ tool,
1467
+ requestedToolId,
1468
+ void 0,
1469
+ seedToolListScript
1470
+ );
1471
+ const inputFields = _chunk7DRPTGCKjs.recursiveToolInputFieldsForDisplay.call(void 0,
1472
+ _chunk7DRPTGCKjs.recordField.call(void 0, contract, "inputSchema")
1967
1473
  );
1968
1474
  console.log(`Schema: ${contract.toolId}`);
1969
1475
  if (!inputFields.length) {
@@ -1990,32 +1496,37 @@ function printToolSchemaOnly(tool, requestedToolId) {
1990
1496
  }
1991
1497
  printToolOutputArrayShape(contract);
1992
1498
  const declaredSchema = declaredToolJsonSchema(
1993
- recordField(contract, "inputSchema")
1499
+ _chunk7DRPTGCKjs.recordField.call(void 0, contract, "inputSchema")
1994
1500
  );
1995
1501
  if (declaredSchema) {
1996
1502
  console.log("Declared input JSON Schema:");
1997
1503
  console.log(JSON.stringify(declaredSchema, null, 2));
1998
1504
  }
1999
- if (isRecord(contract.responseSchema)) {
1505
+ if (_chunk7DRPTGCKjs.isRecord.call(void 0, contract.responseSchema)) {
2000
1506
  console.log("Deepline execution response JSON Schema:");
2001
1507
  console.log(JSON.stringify(contract.responseSchema, null, 2));
2002
1508
  }
2003
1509
  }
2004
1510
  function printToolExamplesOnly(tool, requestedToolId) {
2005
- if (isMonitorTypeTool(tool)) {
1511
+ if (_chunk7DRPTGCKjs.isMonitorTypeTool.call(void 0, tool)) {
2006
1512
  printMonitorTypeDeploy(tool);
2007
1513
  return;
2008
1514
  }
2009
- if (isPlayLikeTool(tool)) {
1515
+ if (_chunk7DRPTGCKjs.isPlayLikeTool.call(void 0, tool)) {
2010
1516
  printPlayLikeToolUsage(tool, requestedToolId);
2011
1517
  return;
2012
1518
  }
2013
- const contract = toolContractJsonForDescribe(tool, requestedToolId);
1519
+ const contract = _chunk7DRPTGCKjs.toolContractJsonForDescribe.call(void 0,
1520
+ tool,
1521
+ requestedToolId,
1522
+ void 0,
1523
+ seedToolListScript
1524
+ );
2014
1525
  const toolId = String(contract.toolId);
2015
1526
  const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
2016
- const examples = arrayField2(tool, "examples").filter(isRecord);
1527
+ const examples = _chunk7DRPTGCKjs.arrayField.call(void 0, tool, "examples").filter(_chunk7DRPTGCKjs.isRecord);
2017
1528
  const firstExample = examples[0];
2018
- const sampleInput = firstExample && isRecord(firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(recordField(tool, "samples"), "request"), () => ( samplePayloadForInputFields(inputFields)));
1529
+ const sampleInput = firstExample && _chunk7DRPTGCKjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunk7DRPTGCKjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunk7DRPTGCKjs.samplePayloadForInputFields.call(void 0, inputFields)));
2019
1530
  console.log("Example input payload:");
2020
1531
  console.log(JSON.stringify(sampleInput, null, 2));
2021
1532
  console.log(`Use in a play:`);
@@ -2029,32 +1540,32 @@ function printToolExamplesOnly(tool, requestedToolId) {
2029
1540
  );
2030
1541
  console.log("});");
2031
1542
  console.log("const response = result.toolResponse.rawV2;");
2032
- const getters = isRecord(contract.getters) ? contract.getters : {};
1543
+ const getters = _chunk7DRPTGCKjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
2033
1544
  const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
2034
1545
  const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
2035
- const firstGetter = valueGetters.find(isRecord);
1546
+ const firstGetter = valueGetters.find(_chunk7DRPTGCKjs.isRecord);
2036
1547
  if (firstGetter) {
2037
- const name = stringField2(firstGetter, "name") || "value";
2038
- const expression = stringField2(firstGetter, "expression");
1548
+ const name = _chunk7DRPTGCKjs.stringField.call(void 0, firstGetter, "name") || "value";
1549
+ const expression = _chunk7DRPTGCKjs.stringField.call(void 0, firstGetter, "expression");
2039
1550
  if (expression)
2040
1551
  console.log(
2041
1552
  `const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
2042
1553
  );
2043
1554
  }
2044
1555
  const arrayNames = new Set(
2045
- recursiveToolInputFieldsForDisplay(
2046
- recordField(tool, "outputSchema", "output_schema")
1556
+ _chunk7DRPTGCKjs.recursiveToolInputFieldsForDisplay.call(void 0,
1557
+ _chunk7DRPTGCKjs.recordField.call(void 0, tool, "outputSchema", "output_schema")
2047
1558
  ).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
2048
1559
  );
2049
1560
  const firstList = _nullishCoalesce(listGetters.find(
2050
- (entry) => isRecord(entry) && arrayNames.has(stringField2(entry, "name"))
2051
- ), () => ( listGetters.find(isRecord)));
2052
- if (isRecord(firstList)) {
2053
- const name = safeIdentifier(stringField2(firstList, "name") || "list");
1561
+ (entry) => _chunk7DRPTGCKjs.isRecord.call(void 0, entry) && arrayNames.has(_chunk7DRPTGCKjs.stringField.call(void 0, entry, "name"))
1562
+ ), () => ( listGetters.find(_chunk7DRPTGCKjs.isRecord)));
1563
+ if (_chunk7DRPTGCKjs.isRecord.call(void 0, firstList)) {
1564
+ const name = safeIdentifier(_chunk7DRPTGCKjs.stringField.call(void 0, firstList, "name") || "list");
2054
1565
  if (_chunkKB4SDX5Sjs.playToolListGetterMode.call(void 0, ) === "array") {
2055
- console.log(`const ${name}_rows = ${playResultExpression(firstList)};`);
1566
+ console.log(`const ${name}_rows = ${_chunk7DRPTGCKjs.playResultExpression.call(void 0, firstList)};`);
2056
1567
  } else {
2057
- console.log(`const ${name}_ds = ${playResultExpression(firstList)};`);
1568
+ console.log(`const ${name}_ds = ${_chunk7DRPTGCKjs.playResultExpression.call(void 0, firstList)};`);
2058
1569
  console.log(
2059
1570
  "// Complete small list from this response; throws above the memory cap."
2060
1571
  );
@@ -2064,7 +1575,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
2064
1575
  console.log("```");
2065
1576
  if (firstList) printListGetterConsumption();
2066
1577
  for (const example of examples) {
2067
- const description = stringField2(example, "description");
1578
+ const description = _chunk7DRPTGCKjs.stringField.call(void 0, example, "description");
2068
1579
  if (description) console.log(description);
2069
1580
  console.log("Example Deepline execution response:");
2070
1581
  console.log(JSON.stringify(example.response, null, 2));
@@ -2079,14 +1590,14 @@ function printToolExamplesOnly(tool, requestedToolId) {
2079
1590
  }
2080
1591
  function printPlayLikeToolUsage(tool, requestedToolId) {
2081
1592
  const toolId = String(tool.toolId || requestedToolId);
2082
- const inputFields = toolInputFieldsForDisplay(
2083
- recordField(tool, "inputSchema", "input_schema")
1593
+ const inputFields = _chunk7DRPTGCKjs.toolInputFieldsForDisplay.call(void 0,
1594
+ _chunk7DRPTGCKjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
2084
1595
  );
2085
- const sampleInput = samplePayloadForInputFields(inputFields);
2086
- const playReference = playReferenceForTool(tool);
1596
+ const sampleInput = _chunk7DRPTGCKjs.samplePayloadForInputFields.call(void 0, inputFields);
1597
+ const playReference = _chunk7DRPTGCKjs.playReferenceForTool.call(void 0, tool);
2087
1598
  console.log("Run as a play:");
2088
1599
  console.log(
2089
- playRunCommandForTool(
1600
+ _chunk7DRPTGCKjs.playRunCommandForTool.call(void 0,
2090
1601
  tool,
2091
1602
  toolId,
2092
1603
  Object.keys(sampleInput).length ? sampleInput : void 0
@@ -2097,8 +1608,13 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
2097
1608
  }
2098
1609
  }
2099
1610
  function printToolGettersOnly(tool, requestedToolId) {
2100
- const contract = toolContractJsonForDescribe(tool, requestedToolId);
2101
- const getters = isRecord(contract.getters) ? contract.getters : {};
1611
+ const contract = _chunk7DRPTGCKjs.toolContractJsonForDescribe.call(void 0,
1612
+ tool,
1613
+ requestedToolId,
1614
+ void 0,
1615
+ seedToolListScript
1616
+ );
1617
+ const getters = _chunk7DRPTGCKjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
2102
1618
  const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
2103
1619
  const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
2104
1620
  console.log(`Getters: ${contract.toolId}`);
@@ -2109,9 +1625,9 @@ function printToolGettersOnly(tool, requestedToolId) {
2109
1625
  if (listGetters.length) {
2110
1626
  console.log(listGetterHeading());
2111
1627
  for (const entry of listGetters) {
2112
- if (isRecord(entry))
1628
+ if (_chunk7DRPTGCKjs.isRecord.call(void 0, entry))
2113
1629
  console.log(
2114
- `- ${stringField2(entry, "name")}: ${playResultExpression(entry)}`
1630
+ `- ${_chunk7DRPTGCKjs.stringField.call(void 0, entry, "name")}: ${_chunk7DRPTGCKjs.playResultExpression.call(void 0, entry)}`
2115
1631
  );
2116
1632
  }
2117
1633
  printListGetterConsumption();
@@ -2119,9 +1635,9 @@ function printToolGettersOnly(tool, requestedToolId) {
2119
1635
  if (valueGetters.length) {
2120
1636
  console.log("Values:");
2121
1637
  for (const entry of valueGetters) {
2122
- if (isRecord(entry))
1638
+ if (_chunk7DRPTGCKjs.isRecord.call(void 0, entry))
2123
1639
  console.log(
2124
- `- ${stringField2(entry, "name")}: ${playResultExpression(entry)}`
1640
+ `- ${_chunk7DRPTGCKjs.stringField.call(void 0, entry, "name")}: ${_chunk7DRPTGCKjs.playResultExpression.call(void 0, entry)}`
2125
1641
  );
2126
1642
  }
2127
1643
  }
@@ -2140,32 +1656,6 @@ function printListGetterConsumption() {
2140
1656
  function listGetterHeading() {
2141
1657
  return _chunkKB4SDX5Sjs.playToolListGetterMode.call(void 0, ) === "array" ? "Lists (ordinary JavaScript arrays):" : "Lists (PlayDataset, not a JavaScript array):";
2142
1658
  }
2143
- function sampleValueForField(field) {
2144
- const name = stringField2(field, "name").toLowerCase();
2145
- const type = stringField2(field, "type").toLowerCase();
2146
- if (Object.prototype.hasOwnProperty.call(field, "default"))
2147
- return field.default;
2148
- if (name.includes("email")) return "ada@example.com";
2149
- if (name.includes("domain") || name.includes("website")) return "example.com";
2150
- if (name.includes("first")) return "Ada";
2151
- if (name.includes("last")) return "Lovelace";
2152
- if (name.includes("name")) return "Ada Lovelace";
2153
- if (type === "integer" || type === "number") return 1;
2154
- if (type === "boolean") return true;
2155
- if (type === "array") return [];
2156
- if (type === "object") return {};
2157
- return "...";
2158
- }
2159
- function samplePayloadForInputFields(fields) {
2160
- return Object.fromEntries(
2161
- fields.slice(0, 4).flatMap((field) => {
2162
- if (!isRecord(field)) return [];
2163
- const name = stringField2(field, "name");
2164
- if (!name) return [];
2165
- return [[name, sampleValueForField(field)]];
2166
- })
2167
- );
2168
- }
2169
1659
  function stableStepIdForTool(toolId) {
2170
1660
  return toolId.replace(/^[a-z0-9]+_/, "").replace(/[^a-z0-9_]+/gi, "_") || "tool_call";
2171
1661
  }
@@ -2173,129 +1663,9 @@ function safeIdentifier(name) {
2173
1663
  const cleaned = name.replace(/[^a-zA-Z0-9_$]+/g, "_").replace(/^[^a-zA-Z_$]+/, "");
2174
1664
  return cleaned || "value";
2175
1665
  }
2176
- function playResultExpression(entry) {
2177
- return stringField2(entry, "expression").replace(
2178
- /^toolExecutionResult\./,
2179
- "result."
2180
- );
2181
- }
2182
- function toolMetadataJsonForDescribe(tool, requestedToolId) {
2183
- const toolId = String(tool.toolId || requestedToolId);
2184
- const inputFields = toolInputFieldsForDisplay(
2185
- recordField(tool, "inputSchema", "input_schema")
2186
- );
2187
- const usageGuidance = usageGuidanceWithAccessDefaults(
2188
- recordField(tool, "usageGuidance", "usage_guidance")
2189
- );
2190
- const toolExecutionResult = recordField(
2191
- usageGuidance,
2192
- "toolExecutionResult",
2193
- "tool_execution_result"
2194
- );
2195
- const extractedLists = extractionContractEntries(
2196
- arrayField2(toolExecutionResult, "extractedLists", "extracted_lists")
2197
- );
2198
- const starterScript = !isPlayLikeTool(tool) && extractedLists.length > 0 ? starterScriptJson(
2199
- seedToolListScript({
2200
- toolId,
2201
- payload: samplePayloadForInputFields(inputFields),
2202
- rows: []
2203
- })
2204
- ) : null;
2205
- const observedOutputCommand = isPlayLikeTool(tool) ? playRunCommandForTool(tool, toolId) : `deepline tools execute ${toolId} --input '{...}'`;
2206
- const {
2207
- cost: _cost,
2208
- deeplineCreditsPerPricingUnit: _deeplineCreditsPerPricingUnit,
2209
- deeplineUsdPerPricingUnit: _deeplineUsdPerPricingUnit,
2210
- deeplineUsdPerCredit: _deeplineUsdPerCredit,
2211
- deeplinePricingSummary: _deeplinePricingSummary,
2212
- deeplinePricingDetails: _deeplinePricingDetails,
2213
- deepline_credits_per_pricing_unit: _snakeDeeplineCreditsPerPricingUnit,
2214
- deepline_usd_per_pricing_unit: _snakeDeeplineUsdPerPricingUnit,
2215
- deepline_usd_per_credit: _snakeDeeplineUsdPerCredit,
2216
- deepline_pricing_summary: _snakeDeeplinePricingSummary,
2217
- deepline_pricing_details: _snakeDeeplinePricingDetails,
2218
- // BYOK is shown only on request, via describe --feature byok.
2219
- byok: _byok,
2220
- ...publicTool
2221
- } = tool;
2222
- const outputSchemaRecord = recordField(tool, "outputSchema", "output_schema");
2223
- return {
2224
- cost: _chunkR4XZO6Z5js.Capability.fromCatalogEntry(tool).describe().customerCost(),
2225
- ...publicTool,
2226
- toolId,
2227
- provider: tool.provider,
2228
- displayName: tool.displayName,
2229
- ...Object.keys(outputSchemaRecord).length > 0 ? {
2230
- outputSchema: publicToolInputSchemaForDescribe(outputSchemaRecord),
2231
- outputFields: toolOutputFieldsForDisplay(outputSchemaRecord).map(
2232
- inputFieldJsonForDescribe
2233
- )
2234
- } : {},
2235
- inputFields: inputFields.map(inputFieldJsonForDescribe),
2236
- usageGuidance,
2237
- runtimeOutputHelp: {
2238
- contract: "Schemas declare field shapes. Examples illustrate input payloads and full Deepline execution responses; they are not observed responses from this call.",
2239
- getterScope: "extractedValues/extractedLists .get() only works for declared Deepline getters listed in usageGuidance.toolExecutionResult.",
2240
- rawToolResponse: "Use toolExecutionResult.toolResponse.rawV2 for the complete tool response. Preserve its nesting and sibling fields as shown in examples; use declared getters for extracted values and lists.",
2241
- invalidGetterHint: "If TypeScript says an extractedValues/extractedLists property does not exist, that field is not a declared Deepline getter.",
2242
- observeActualShape: observedOutputCommand,
2243
- observedOutput: observedOutputCommand,
2244
- forPlayGetterBugs: "Run a tiny play, inspect returned handles with `deepline runs get <run-id> --full`, then export row datasets with `deepline runs export`.",
2245
- executeOutputFields: "tools execute JSON may include output_preview for this direct probe only; play debugging uses run output and returned dataset handles."
2246
- },
2247
- ...starterScript ? { starterScript } : {}
2248
- };
2249
- }
2250
- function usageGuidanceWithAccessDefaults(usageGuidance) {
2251
- if (Object.keys(usageGuidance).length === 0) return usageGuidance;
2252
- const existingAccess = recordField(usageGuidance, "access");
2253
- return {
2254
- ...usageGuidance,
2255
- prefer: [
2256
- "Use only the declared extractedLists and extractedValues getters listed below.",
2257
- "Use toolExecutionResult.toolResponse.rawV2 for the complete tool response, preserving the nesting shown in the response example.",
2258
- "Schemas declare field shapes; examples illustrate input values and full Deepline execution responses."
2259
- ],
2260
- toolExecutionResult: {
2261
- ...recordField(
2262
- usageGuidance,
2263
- "toolExecutionResult",
2264
- "tool_execution_result"
2265
- ),
2266
- toolResponse: {
2267
- rawV2: "toolResponse.rawV2",
2268
- view: "toolResponse.view",
2269
- responseMeta: "toolResponse.responseMeta"
2270
- }
2271
- },
2272
- access: {
2273
- ...existingAccess,
2274
- extractedValues: {
2275
- expression: "toolExecutionResult.extractedValues.<name>.get()",
2276
- meaning: "Declared Deepline scalar or normalized object extractors only."
2277
- },
2278
- ...existingAccess,
2279
- extractedLists: {
2280
- ...recordField(existingAccess, "extractedLists"),
2281
- expression: "toolExecutionResult.extractedLists.<name>.get()",
2282
- meaning: _chunkKB4SDX5Sjs.playToolListGetterMode.call(void 0, ) === "array" ? "Returns an ordinary array from this response. Use array methods directly or pass it to ctx.dataset to persist row work. Lazy or incomplete lists throw; use readList for an explicit dataset read. It does not fetch provider pages." : "Returns a PlayDataset, not a JavaScript array. Pass the handle to ctx.dataset, use first(), async iteration, or await handle.materialize() for the complete current list within the memory cap. materialize(n) and peek(n) return a prefix; none fetch additional provider pages. A missing getter is not an empty list."
2283
- },
2284
- rawToolResponse: {
2285
- expression: "toolExecutionResult.toolResponse.rawV2",
2286
- meaning: "Complete tool response with its original nesting. Read tool-specific fields here; use declared getters for extracted values and lists."
2287
- },
2288
- canonicalToolResponse: {
2289
- expression: "toolExecutionResult.toolResponse.rawV2",
2290
- meaning: "Complete tool response with its original nesting and sibling fields."
2291
- },
2292
- invalidGetterHint: "If TypeScript says an extractedValues/extractedLists property does not exist, that field is not a declared Deepline getter; read it from toolResponse.rawV2 using the nesting shown in the response example."
2293
- }
2294
- };
2295
- }
2296
- function singleLineText(value2, maxLength = 260) {
2297
- if (typeof value2 !== "string") return "";
2298
- const text = value2.replace(/\s+/g, " ").trim();
1666
+ function singleLineText(value, maxLength = 260) {
1667
+ if (typeof value !== "string") return "";
1668
+ const text = value.replace(/\s+/g, " ").trim();
2299
1669
  if (text.length <= maxLength) return text;
2300
1670
  return `${text.slice(0, maxLength - 3).trimEnd()}...`;
2301
1671
  }
@@ -2305,71 +1675,22 @@ function listedToolDescription(tool) {
2305
1675
  }
2306
1676
  function formatListedToolCost(tool) {
2307
1677
  const record = tool;
2308
- if (stringField2(record, "billingSource", "billing_source") === "free") {
1678
+ if (_chunk7DRPTGCKjs.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
2309
1679
  return "Cost: Free";
2310
1680
  }
2311
- const pricing = recordField(record, "pricing");
2312
- const displayText = stringField2(pricing, "displayText", "display_text");
1681
+ const pricing = _chunk7DRPTGCKjs.recordField.call(void 0, record, "pricing");
1682
+ const displayText = _chunk7DRPTGCKjs.stringField.call(void 0, pricing, "displayText", "display_text");
2313
1683
  return displayText ? `Cost: ${displayText}` : "";
2314
1684
  }
2315
- function toolInputFieldsForDisplay(inputSchema) {
2316
- if (Array.isArray(inputSchema.fields)) {
2317
- const fields = inputSchema.fields.filter(isRecord);
2318
- if (!isRecord(inputSchema.jsonSchema)) return fields;
2319
- const jsonSchemaFields = new Map(
2320
- recursiveToolInputFieldsForDisplay({
2321
- jsonSchema: inputSchema.jsonSchema
2322
- }).flatMap(
2323
- (field) => typeof field.name === "string" ? [[field.name, field]] : []
2324
- )
2325
- );
2326
- return fields.map((field) => {
2327
- const jsonSchemaField = typeof field.name === "string" ? jsonSchemaFields.get(field.name) : void 0;
2328
- const minItems = typeof field.minItems === "number" ? field.minItems : _optionalChain([jsonSchemaField, 'optionalAccess', _20 => _20.minItems]);
2329
- const maxItems = typeof field.maxItems === "number" ? field.maxItems : _optionalChain([jsonSchemaField, 'optionalAccess', _21 => _21.maxItems]);
2330
- const items = isRecord(field.items) ? field.items : _optionalChain([jsonSchemaField, 'optionalAccess', _22 => _22.items]);
2331
- return {
2332
- ...field,
2333
- ...isRecord(items) ? { items } : {},
2334
- ...typeof minItems === "number" ? { minItems } : {},
2335
- ...typeof maxItems === "number" ? { maxItems } : {}
2336
- };
2337
- });
2338
- }
2339
- const jsonSchema = isRecord(inputSchema.jsonSchema) ? inputSchema.jsonSchema : inputSchema;
2340
- const properties = isRecord(jsonSchema.properties) ? jsonSchema.properties : {};
2341
- const required = Array.isArray(jsonSchema.required) ? new Set(jsonSchema.required.map(String)) : /* @__PURE__ */ new Set();
2342
- return Object.entries(properties).map(([name, value2]) => {
2343
- const property = isRecord(value2) ? value2 : {};
2344
- return {
2345
- name,
2346
- type: typeof property.type === "string" ? property.type : "unknown",
2347
- required: required.has(name),
2348
- description: property.description,
2349
- ...isRecord(property.items) ? { items: property.items } : {},
2350
- ...typeof property.minItems === "number" ? { minItems: property.minItems } : {},
2351
- ...typeof property.maxItems === "number" ? { maxItems: property.maxItems } : {},
2352
- ...Object.prototype.hasOwnProperty.call(property, "default") ? { default: property.default } : {}
2353
- };
2354
- });
2355
- }
2356
- function toolOutputFieldsForDisplay(outputSchema) {
2357
- if (Object.keys(outputSchema).length === 0) return [];
2358
- return recursiveToolInputFieldsForDisplay({
2359
- jsonSchema: outputSchema
2360
- }).filter(
2361
- (field) => typeof field.name === "string" && field.name.includes("[]")
2362
- );
2363
- }
2364
1685
  function printToolOutputArrayShape(tool) {
2365
- const outputFields = toolOutputFieldsForDisplay(
2366
- recordField(isRecord(tool) ? tool : {}, "outputSchema", "output_schema")
1686
+ const outputFields = _chunk7DRPTGCKjs.toolOutputFieldsForDisplay.call(void 0,
1687
+ _chunk7DRPTGCKjs.recordField.call(void 0, _chunk7DRPTGCKjs.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
2367
1688
  );
2368
1689
  if (outputFields.length === 0) return;
2369
1690
  console.log(" Output array shape (declared schema):");
2370
1691
  for (const field of outputFields.slice(0, 60)) {
2371
1692
  const name = String(field.name);
2372
- const type = stringField2(field, "type") || "unknown";
1693
+ const type = _chunk7DRPTGCKjs.stringField.call(void 0, field, "type") || "unknown";
2373
1694
  const itemBounds = arrayItemBoundsSuffix(field);
2374
1695
  console.log(` - ${name}: ${type}${itemBounds}`);
2375
1696
  }
@@ -2377,146 +1698,16 @@ function printToolOutputArrayShape(tool) {
2377
1698
  console.log(` - \u2026 ${outputFields.length - 60} more schema fields`);
2378
1699
  }
2379
1700
  }
2380
- function canonicalToolJsonSchema(inputSchema) {
2381
- return isRecord(inputSchema.jsonSchema) ? inputSchema.jsonSchema : inputSchema;
2382
- }
2383
1701
  function declaredToolJsonSchema(inputSchema) {
2384
- if (isRecord(inputSchema.jsonSchema)) {
1702
+ if (_chunk7DRPTGCKjs.isRecord.call(void 0, inputSchema.jsonSchema)) {
2385
1703
  return inputSchema.jsonSchema;
2386
1704
  }
2387
1705
  return Array.isArray(inputSchema.fields) ? null : inputSchema;
2388
1706
  }
2389
- function publicToolInputSchemaForDescribe(inputSchema) {
2390
- const exposesProviderSpend = (description) => {
2391
- const withoutDeeplineCredits = description.replace(
2392
- /\bdeepline(?:-facing)?\s+credits?\b/gi,
2393
- ""
2394
- );
2395
- return /\bcredits?\b/i.test(withoutDeeplineCredits) || /\bprovider\s+(?:cost|spend|price|pricing|usage)\b/i.test(
2396
- withoutDeeplineCredits
2397
- ) || /\b(?:costs?|charges?|priced at)\s+[$€£]\s*\d/i.test(
2398
- withoutDeeplineCredits
2399
- ) || /\b(?:costs?|charges?|priced at)\s+\d+(?:\.\d+)?\s*(?:usd|eur|gbp)\b/i.test(
2400
- withoutDeeplineCredits
2401
- ) || /\battribute-priced\b/i.test(withoutDeeplineCredits) || /\b(?:cost|price|pricing)\s+(?:grows?|increases?|scales?|varies?)\b/i.test(
2402
- withoutDeeplineCredits
2403
- ) || /\b(?:will be|are|is|be)\s+(?:billed|charged)\b/i.test(
2404
- withoutDeeplineCredits
2405
- ) || /\b(?:additional|extra)\s+charges?\b/i.test(withoutDeeplineCredits) || /\bcharg(?:e|ed)\s+(?:double|per)\b/i.test(withoutDeeplineCredits) || /\bpricing page\b/i.test(withoutDeeplineCredits);
2406
- };
2407
- const stripDescriptions = (value2) => {
2408
- if (Array.isArray(value2)) return value2.map(stripDescriptions);
2409
- if (!isRecord(value2)) return value2;
2410
- return Object.fromEntries(
2411
- Object.entries(value2).flatMap(([key, nested]) => {
2412
- if (key === "description" && typeof nested === "string" && exposesProviderSpend(nested)) {
2413
- return [];
2414
- }
2415
- return [[key, stripDescriptions(nested)]];
2416
- })
2417
- );
2418
- };
2419
- return stripDescriptions(inputSchema);
2420
- }
2421
- function recursiveToolInputFieldsForDisplay(inputSchema) {
2422
- const root = canonicalToolJsonSchema(inputSchema);
2423
- const fields = /* @__PURE__ */ new Map();
2424
- const schemasById = /* @__PURE__ */ new Map();
2425
- const collectSchemaIds = (value2) => {
2426
- if (Array.isArray(value2)) {
2427
- for (const item of value2) collectSchemaIds(item);
2428
- return;
2429
- }
2430
- if (!isRecord(value2)) return;
2431
- if (typeof value2.$id === "string" && value2.$id.trim()) {
2432
- schemasById.set(value2.$id.trim(), value2);
2433
- }
2434
- for (const nested of Object.values(value2)) collectSchemaIds(nested);
2435
- };
2436
- collectSchemaIds(root);
2437
- const resolveRef = (schema) => {
2438
- const ref = typeof schema.$ref === "string" ? schema.$ref : "";
2439
- if (!ref.startsWith("#/")) return _nullishCoalesce(schemasById.get(ref), () => ( schema));
2440
- let current = root;
2441
- for (const rawSegment of ref.slice(2).split("/")) {
2442
- const segment = rawSegment.replace(/~1/g, "/").replace(/~0/g, "~");
2443
- if (!isRecord(current)) return schema;
2444
- current = current[segment];
2445
- }
2446
- return isRecord(current) ? current : schema;
2447
- };
2448
- const addField = (field) => {
2449
- const name = typeof field.name === "string" ? field.name : "";
2450
- if (!name) return;
2451
- const existing = fields.get(name);
2452
- if (!existing || existing.type === "unknown") {
2453
- fields.set(name, field);
2454
- }
2455
- };
2456
- const visit = (unresolvedSchema, path, required, activeRefs = /* @__PURE__ */ new Set()) => {
2457
- const ref = typeof unresolvedSchema.$ref === "string" ? unresolvedSchema.$ref : "";
2458
- if (ref && activeRefs.has(ref)) return;
2459
- const schema = resolveRef(unresolvedSchema);
2460
- const nextActiveRefs = ref ? /* @__PURE__ */ new Set([...activeRefs, ref]) : activeRefs;
2461
- const type = Array.isArray(schema.type) ? schema.type.map(String).join("|") : typeof schema.type === "string" ? schema.type : isRecord(schema.properties) ? "object" : schema.items ? "array" : "unknown";
2462
- if (path) {
2463
- addField({
2464
- name: path,
2465
- type,
2466
- required,
2467
- description: schema.description,
2468
- ...Array.isArray(schema.enum) ? { enum: schema.enum } : {},
2469
- ...isRecord(schema.items) ? { items: schema.items } : {},
2470
- ...typeof schema.minItems === "number" ? { minItems: schema.minItems } : {},
2471
- ...typeof schema.maxItems === "number" ? { maxItems: schema.maxItems } : {},
2472
- ...Object.prototype.hasOwnProperty.call(schema, "default") ? { default: schema.default } : {}
2473
- });
2474
- }
2475
- const properties = isRecord(schema.properties) ? schema.properties : {};
2476
- const requiredNames = new Set(
2477
- Array.isArray(schema.required) ? schema.required.map(String) : []
2478
- );
2479
- for (const [name, value2] of Object.entries(properties)) {
2480
- if (!isRecord(value2)) continue;
2481
- visit(
2482
- value2,
2483
- path ? `${path}.${name}` : name,
2484
- requiredNames.has(name),
2485
- nextActiveRefs
2486
- );
2487
- }
2488
- if (isRecord(schema.items)) {
2489
- visit(schema.items, `${path}[]`, false, nextActiveRefs);
2490
- }
2491
- for (const keyword of ["anyOf", "oneOf", "allOf"]) {
2492
- const branches = Array.isArray(schema[keyword]) ? schema[keyword] : [];
2493
- for (const branch of branches) {
2494
- if (isRecord(branch)) {
2495
- visit(branch, path, required, nextActiveRefs);
2496
- }
2497
- }
2498
- }
2499
- };
2500
- visit(root, "", false);
2501
- return fields.size ? [...fields.values()] : toolInputFieldsForDisplay(inputSchema);
2502
- }
2503
- function inputFieldJsonForDescribe(field) {
2504
- const publicItems = isRecord(field.items) ? publicToolInputSchemaForDescribe({ items: field.items }).items : void 0;
2505
- return {
2506
- name: field.name,
2507
- type: _nullishCoalesce(field.type, () => ( "unknown")),
2508
- required: Boolean(field.required),
2509
- ...field.description ? { description: field.description } : {},
2510
- ...isRecord(publicItems) ? { items: publicItems } : {},
2511
- ...typeof field.minItems === "number" ? { minItems: field.minItems } : {},
2512
- ...typeof field.maxItems === "number" ? { maxItems: field.maxItems } : {},
2513
- ...Object.prototype.hasOwnProperty.call(field, "default") ? { default: field.default } : {}
2514
- };
2515
- }
2516
1707
  function arrayItemBoundsSuffix(field) {
2517
- const itemSchema = isRecord(field.items) ? field.items : null;
2518
- const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : isRecord(itemSchema.properties) ? "object" : "unknown" : null;
2519
- const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _23 => _23.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
1708
+ const itemSchema = _chunk7DRPTGCKjs.isRecord.call(void 0, field.items) ? field.items : null;
1709
+ const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunk7DRPTGCKjs.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
1710
+ const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _14 => _14.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
2520
1711
  const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
2521
1712
  const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
2522
1713
  const maxItems = typeof field.maxItems === "number" && Number.isFinite(field.maxItems) ? field.maxItems : null;
@@ -2527,32 +1718,32 @@ function arrayItemBoundsSuffix(field) {
2527
1718
  if (maxItems !== null) return `${itemTypeSuffix} maxItems=${maxItems}`;
2528
1719
  return itemTypeSuffix;
2529
1720
  }
2530
- function printToolExecutionHints(value2) {
2531
- const batchCapabilityRecord = recordField(
2532
- isRecord(value2) ? value2 : {},
1721
+ function printToolExecutionHints(value) {
1722
+ const batchCapabilityRecord = _chunk7DRPTGCKjs.recordField.call(void 0,
1723
+ _chunk7DRPTGCKjs.isRecord.call(void 0, value) ? value : {},
2533
1724
  "batchCapability",
2534
1725
  "batch_capability"
2535
1726
  );
2536
1727
  const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
2537
- const executionMetadata = recordField(
2538
- isRecord(value2) ? value2 : {},
1728
+ const executionMetadata = _chunk7DRPTGCKjs.recordField.call(void 0,
1729
+ _chunk7DRPTGCKjs.isRecord.call(void 0, value) ? value : {},
2539
1730
  "executionMetadata",
2540
1731
  "execution_metadata"
2541
1732
  );
2542
1733
  if (batchCapability) {
2543
- const status = stringField2(batchCapability, "status") || "unknown";
2544
- const surface = stringField2(batchCapability, "surface");
2545
- const operation = stringField2(
1734
+ const status = _chunk7DRPTGCKjs.stringField.call(void 0, batchCapability, "status") || "unknown";
1735
+ const surface = _chunk7DRPTGCKjs.stringField.call(void 0, batchCapability, "surface");
1736
+ const operation = _chunk7DRPTGCKjs.stringField.call(void 0,
2546
1737
  batchCapability,
2547
1738
  "batchOperation",
2548
1739
  "batch_operation"
2549
1740
  );
2550
- const maxBatchSize = numberField2(
1741
+ const maxBatchSize = numberField(
2551
1742
  batchCapability,
2552
1743
  "maxBatchSize",
2553
1744
  "max_batch_size"
2554
1745
  );
2555
- const notes = stringField2(batchCapability, "notes");
1746
+ const notes = _chunk7DRPTGCKjs.stringField.call(void 0, batchCapability, "notes");
2556
1747
  console.log("");
2557
1748
  console.log("Batching:");
2558
1749
  console.log(`- Catalog status: ${status}${surface ? ` (${surface})` : ""}`);
@@ -2571,23 +1762,23 @@ function printToolExecutionHints(value2) {
2571
1762
  }
2572
1763
  if (notes) console.log(`- Details: ${notes}`);
2573
1764
  }
2574
- const configuredRateLimits = arrayField2(
1765
+ const configuredRateLimits = _chunk7DRPTGCKjs.arrayField.call(void 0,
2575
1766
  executionMetadata,
2576
1767
  "configuredRateLimits",
2577
1768
  "configured_rate_limits"
2578
- ).filter(isRecord);
1769
+ ).filter(_chunk7DRPTGCKjs.isRecord);
2579
1770
  if (configuredRateLimits.length > 0) {
2580
1771
  console.log("");
2581
1772
  console.log(
2582
1773
  "Configured Deepline pacing (guidance, not a guaranteed provider quota):"
2583
1774
  );
2584
1775
  for (const limit of configuredRateLimits) {
2585
- const requests = numberField2(limit, "requestsPerWindow");
2586
- const windowMs = numberField2(limit, "windowMs");
1776
+ const requests = numberField(limit, "requestsPerWindow");
1777
+ const windowMs = numberField(limit, "windowMs");
2587
1778
  if (requests === null || windowMs === null) continue;
2588
- const usage = stringField2(limit, "usage") || "unknown";
1779
+ const usage = _chunk7DRPTGCKjs.stringField.call(void 0, limit, "usage") || "unknown";
2589
1780
  const usageText = usage === "queue_hint" ? "queue hint" : usage === "enforced" ? "Deepline enforced" : usage === "queue_hint_and_enforced" ? "queue hint and Deepline enforced" : usage === "disabled" ? "disabled" : usage;
2590
- const explicitMaxConcurrency = numberField2(
1781
+ const explicitMaxConcurrency = numberField(
2591
1782
  limit,
2592
1783
  "explicitMaxConcurrency",
2593
1784
  "explicit_max_concurrency"
@@ -2598,13 +1789,13 @@ function printToolExecutionHints(value2) {
2598
1789
  );
2599
1790
  }
2600
1791
  }
2601
- const queueHint = recordField(executionMetadata, "queueHint", "queue_hint");
2602
- const requestsPerSecondHint = numberField2(
1792
+ const queueHint = _chunk7DRPTGCKjs.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
1793
+ const requestsPerSecondHint = numberField(
2603
1794
  queueHint,
2604
1795
  "requestsPerSecondHint",
2605
1796
  "requests_per_second_hint"
2606
1797
  );
2607
- const derivedConcurrency = numberField2(
1798
+ const derivedConcurrency = numberField(
2608
1799
  queueHint,
2609
1800
  "derivedConcurrency",
2610
1801
  "derived_concurrency"
@@ -2623,35 +1814,35 @@ function formatRateWindow(windowMs) {
2623
1814
  }
2624
1815
  function samplePayload(samples, key) {
2625
1816
  const entry = samples[key];
2626
- if (!isRecord(entry)) return void 0;
1817
+ if (!_chunk7DRPTGCKjs.isRecord.call(void 0, entry)) return void 0;
2627
1818
  return Object.prototype.hasOwnProperty.call(entry, "payload") ? entry.payload : entry;
2628
1819
  }
2629
1820
  function commandEnvelopeFromRawResponse(rawResponse) {
2630
- return isRecord(rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
1821
+ return _chunk7DRPTGCKjs.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
2631
1822
  }
2632
1823
  function toolExecuteExitCode(envelope) {
2633
1824
  return envelope.status === "failed" || envelope.ok === false ? 1 : 0;
2634
1825
  }
2635
1826
  function extractToolExecutionWarningMessages(rawResponse) {
2636
- if (!isRecord(rawResponse)) return [];
1827
+ if (!_chunk7DRPTGCKjs.isRecord.call(void 0, rawResponse)) return [];
2637
1828
  const candidates = [
2638
- recordField(recordField(rawResponse, "toolResponse"), "meta"),
2639
- recordField(
2640
- recordField(recordField(rawResponse, "toolResponse"), "raw"),
1829
+ _chunk7DRPTGCKjs.recordField.call(void 0, _chunk7DRPTGCKjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
1830
+ _chunk7DRPTGCKjs.recordField.call(void 0,
1831
+ _chunk7DRPTGCKjs.recordField.call(void 0, _chunk7DRPTGCKjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
2641
1832
  "meta"
2642
1833
  ),
2643
- recordField(rawResponse, "meta"),
2644
- recordField(recordField(rawResponse, "result"), "meta")
1834
+ _chunk7DRPTGCKjs.recordField.call(void 0, rawResponse, "meta"),
1835
+ _chunk7DRPTGCKjs.recordField.call(void 0, _chunk7DRPTGCKjs.recordField.call(void 0, rawResponse, "result"), "meta")
2645
1836
  ];
2646
1837
  const messages = [];
2647
1838
  for (const candidate of candidates) {
2648
- const warnings = _optionalChain([candidate, 'optionalAccess', _24 => _24.warnings]);
1839
+ const warnings = _optionalChain([candidate, 'optionalAccess', _15 => _15.warnings]);
2649
1840
  if (!Array.isArray(warnings)) continue;
2650
1841
  for (const warning of warnings) {
2651
1842
  if (typeof warning === "string" && warning.trim()) {
2652
1843
  messages.push(warning.trim());
2653
- } else if (isRecord(warning)) {
2654
- const message = stringField2(warning, "message");
1844
+ } else if (_chunk7DRPTGCKjs.isRecord.call(void 0, warning)) {
1845
+ const message = _chunk7DRPTGCKjs.stringField.call(void 0, warning, "message");
2655
1846
  if (message) messages.push(message);
2656
1847
  }
2657
1848
  }
@@ -2659,20 +1850,20 @@ function extractToolExecutionWarningMessages(rawResponse) {
2659
1850
  return [...new Set(messages)];
2660
1851
  }
2661
1852
  function apifySyncRecoveryNext(rawResponse) {
2662
- if (!isRecord(rawResponse) || rawResponse.status !== "running") return null;
2663
- const toolResponse = recordField(rawResponse, "toolResponse");
2664
- const raw = recordField(toolResponse, "raw");
1853
+ if (!_chunk7DRPTGCKjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
1854
+ const toolResponse = _chunk7DRPTGCKjs.recordField.call(void 0, rawResponse, "toolResponse");
1855
+ const raw = _chunk7DRPTGCKjs.recordField.call(void 0, toolResponse, "raw");
2665
1856
  if (raw.state !== "awaiting_apify") return null;
2666
- const next = recordField(raw, "next");
2667
- const getActorRun = recordField(next, "getActorRun");
2668
- const getActorRunTool = stringField2(getActorRun, "tool");
2669
- const getActorRunPayload = recordField(getActorRun, "payload");
1857
+ const next = _chunk7DRPTGCKjs.recordField.call(void 0, raw, "next");
1858
+ const getActorRun = _chunk7DRPTGCKjs.recordField.call(void 0, next, "getActorRun");
1859
+ const getActorRunTool = _chunk7DRPTGCKjs.stringField.call(void 0, getActorRun, "tool");
1860
+ const getActorRunPayload = _chunk7DRPTGCKjs.recordField.call(void 0, getActorRun, "payload");
2670
1861
  if (!getActorRunTool || Object.keys(getActorRunPayload).length === 0) {
2671
1862
  return null;
2672
1863
  }
2673
- const getDatasetItems = recordField(next, "getDatasetItems");
2674
- const getDatasetItemsTool = stringField2(getDatasetItems, "tool");
2675
- const getDatasetItemsPayload = recordField(getDatasetItems, "payload");
1864
+ const getDatasetItems = _chunk7DRPTGCKjs.recordField.call(void 0, next, "getDatasetItems");
1865
+ const getDatasetItemsTool = _chunk7DRPTGCKjs.stringField.call(void 0, getDatasetItems, "tool");
1866
+ const getDatasetItemsPayload = _chunk7DRPTGCKjs.recordField.call(void 0, getDatasetItems, "payload");
2676
1867
  return {
2677
1868
  getActorRun: `deepline tools execute ${getActorRunTool} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
2678
1869
  ...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
@@ -2681,54 +1872,30 @@ function apifySyncRecoveryNext(rawResponse) {
2681
1872
  };
2682
1873
  }
2683
1874
  function listExtractorPathsFromUsageGuidance(tool) {
2684
- const toolExecutionResult = _optionalChain([tool, 'access', _25 => _25.usageGuidance, 'optionalAccess', _26 => _26.toolExecutionResult]);
2685
- const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _27 => _27.extractedLists])) ? toolExecutionResult.extractedLists : isRecord(_optionalChain([toolExecutionResult, 'optionalAccess', _28 => _28.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
1875
+ const toolExecutionResult = _optionalChain([tool, 'access', _16 => _16.usageGuidance, 'optionalAccess', _17 => _17.toolExecutionResult]);
1876
+ const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists : _chunk7DRPTGCKjs.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _19 => _19.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
2686
1877
  return extractedLists.flatMap((entry) => {
2687
- const paths = _nullishCoalesce(_optionalChain([entry, 'access', _29 => _29.details, 'optionalAccess', _30 => _30.candidatePaths]), () => ( _optionalChain([entry, 'access', _31 => _31.details, 'optionalAccess', _32 => _32.rawToolOutputPaths])));
1878
+ const paths = _nullishCoalesce(_optionalChain([entry, 'access', _20 => _20.details, 'optionalAccess', _21 => _21.candidatePaths]), () => ( _optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.rawToolOutputPaths])));
2688
1879
  if (!Array.isArray(paths)) return [];
2689
1880
  return paths.map(
2690
1881
  (path) => path.trim().replace(/^toolExecutionResult\.toolResponse\.raw\.?/, "").replace(/^toolExecutionResult\.toolOutput\.raw\.?/, "").replace(/^\./, "")
2691
1882
  ).filter(Boolean);
2692
1883
  });
2693
1884
  }
2694
- function formatDecimal(value2) {
2695
- const text = value2.toFixed(12).replace(/0+$/, "").replace(/\.$/, "");
1885
+ function formatDecimal(value) {
1886
+ const text = value.toFixed(12).replace(/0+$/, "").replace(/\.$/, "");
2696
1887
  return text || "0";
2697
1888
  }
2698
- function formatUsd(value2) {
2699
- return `$${formatDecimal(value2)}`;
2700
- }
2701
- function isRecord(value2) {
2702
- return Boolean(value2 && typeof value2 === "object" && !Array.isArray(value2));
1889
+ function formatUsd(value) {
1890
+ return `$${formatDecimal(value)}`;
2703
1891
  }
2704
- function stringField2(source, ...keys) {
1892
+ function numberField(source, ...keys) {
2705
1893
  for (const key of keys) {
2706
- const value2 = source[key];
2707
- if (typeof value2 === "string" && value2.trim()) return value2.trim();
2708
- }
2709
- return "";
2710
- }
2711
- function numberField2(source, ...keys) {
2712
- for (const key of keys) {
2713
- const value2 = source[key];
2714
- if (typeof value2 === "number" && Number.isFinite(value2)) return value2;
1894
+ const value = source[key];
1895
+ if (typeof value === "number" && Number.isFinite(value)) return value;
2715
1896
  }
2716
1897
  return null;
2717
1898
  }
2718
- function arrayField2(source, ...keys) {
2719
- for (const key of keys) {
2720
- const value2 = source[key];
2721
- if (Array.isArray(value2)) return value2;
2722
- }
2723
- return [];
2724
- }
2725
- function recordField(source, ...keys) {
2726
- for (const key of keys) {
2727
- const value2 = source[key];
2728
- if (isRecord(value2)) return value2;
2729
- }
2730
- return {};
2731
- }
2732
1899
  function normalizeOutputFormat(raw) {
2733
1900
  switch ((raw || "auto").trim().toLowerCase()) {
2734
1901
  case "auto":
@@ -2791,15 +1958,15 @@ function parseJsonObjectArgument(raw, flagName) {
2791
1958
  }
2792
1959
  throw invalidJsonError(flagName, message);
2793
1960
  }
2794
- if (!isRecord(parsed)) {
1961
+ if (!_chunk7DRPTGCKjs.isRecord.call(void 0, parsed)) {
2795
1962
  throw invalidJsonError(flagName, "expected an object.");
2796
1963
  }
2797
1964
  return parsed;
2798
1965
  }
2799
- function toolExecuteJsonOption(value2) {
2800
- const legacyInput = typeof value2 === "string" ? value2 : void 0;
1966
+ function toolExecuteJsonOption(value) {
1967
+ const legacyInput = typeof value === "string" ? value : void 0;
2801
1968
  return {
2802
- requested: value2 === true || legacyInput !== void 0,
1969
+ requested: value === true || legacyInput !== void 0,
2803
1970
  legacyInput
2804
1971
  };
2805
1972
  }
@@ -2835,7 +2002,7 @@ function parseExecuteOptions(toolId, options, output) {
2835
2002
  outputFormat = normalizeOutputFormat(options.outputFormat);
2836
2003
  }
2837
2004
  if (options.idempotencyKey !== void 0) {
2838
- _chunk36ML3YKAjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
2005
+ _chunkUVXBVUZQjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
2839
2006
  }
2840
2007
  if (options.recoveryTimeoutMs !== void 0) {
2841
2008
  const parsed = Number(options.recoveryTimeoutMs);
@@ -2863,10 +2030,10 @@ function parseToolExecuteTimeout(raw) {
2863
2030
  "--timeout must be a duration like 500ms, 90s, 10m, or 1h (a bare number is seconds)."
2864
2031
  );
2865
2032
  }
2866
- const value2 = Number(match[1]);
2033
+ const value = Number(match[1]);
2867
2034
  const unit = (_nullishCoalesce(match[2], () => ( "s"))).toLowerCase();
2868
2035
  const factor = unit === "ms" ? 1 : unit === "s" ? 1e3 : unit === "m" ? 6e4 : 36e5;
2869
- const timeoutMs = value2 * factor;
2036
+ const timeoutMs = value * factor;
2870
2037
  if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1 || timeoutMs > 2147483647) {
2871
2038
  throw new Error(
2872
2039
  "--timeout must be between 1ms and 2147483647ms (24d 20h 31m 23s)."
@@ -2874,22 +2041,11 @@ function parseToolExecuteTimeout(raw) {
2874
2041
  }
2875
2042
  return timeoutMs;
2876
2043
  }
2877
- function safeFileStem(value2) {
2878
- return value2.trim().replace(/[^a-zA-Z0-9_-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 64) || "tool";
2879
- }
2880
- function powerShellQuote(value2) {
2881
- return `'${value2.replace(/'/g, "''")}'`;
2044
+ function safeFileStem(value) {
2045
+ return value.trim().replace(/[^a-zA-Z0-9_-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 64) || "tool";
2882
2046
  }
2883
- function starterScriptJson(script) {
2884
- return {
2885
- path: script.path,
2886
- sourceCode: script.sourceCode,
2887
- projectDir: script.projectDir,
2888
- copyToProject: {
2889
- macosLinux: script.macCopyCommand,
2890
- windowsPowerShell: script.windowsCopyCommand
2891
- }
2892
- };
2047
+ function powerShellQuote(value) {
2048
+ return `'${value.replace(/'/g, "''")}'`;
2893
2049
  }
2894
2050
  function seedToolListScript(input) {
2895
2051
  const stem = safeFileStem(input.toolId);
@@ -2974,7 +2130,7 @@ function buildToolExecuteBaseEnvelope(input) {
2974
2130
  kind: summaryEntries.length > 0 ? "object" : "raw",
2975
2131
  summary: input.summary
2976
2132
  };
2977
- const envelopeHasCanonicalOutput = isRecord(envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
2133
+ const envelopeHasCanonicalOutput = _chunk7DRPTGCKjs.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
2978
2134
  const envelopeHasDeclaredOutput = Object.prototype.hasOwnProperty.call(
2979
2135
  envelope,
2980
2136
  "output"
@@ -3002,7 +2158,7 @@ function buildToolExecuteBaseEnvelope(input) {
3002
2158
  return {
3003
2159
  ...envelope,
3004
2160
  ...input.idempotencyKey ? { idempotency_key: input.idempotencyKey } : {},
3005
- ...isRecord(input.rawResponse) && isRecord(input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
2161
+ ..._chunk7DRPTGCKjs.isRecord.call(void 0, input.rawResponse) && _chunk7DRPTGCKjs.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
3006
2162
  ...envelopeHasCanonicalOutput || envelopeHasDeclaredOutput ? { output_preview: outputPreview } : { output: outputPreview },
3007
2163
  ...summaryEntries.length > 0 ? { summary: input.summary } : {},
3008
2164
  ...warningMessages.length > 0 ? { warnings: warningMessages } : {},
@@ -3036,7 +2192,7 @@ function buildToolExecuteBaseEnvelope(input) {
3036
2192
  lines: apifyRecovery ? [
3037
2193
  "Apify is still running. Run the follow-up command(s) below."
3038
2194
  ] : summaryEntries.length > 0 ? summaryEntries.map(
3039
- ([key, value2]) => `${key}=${String(value2)}`
2195
+ ([key, value]) => `${key}=${String(value)}`
3040
2196
  ) : [JSON.stringify(input.rawResponse, null, 2)]
3041
2197
  },
3042
2198
  ...guidanceLines.length > 0 ? [{ title: "guidance", lines: guidanceLines }] : []
@@ -3063,7 +2219,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
3063
2219
  void _render;
3064
2220
  void _next;
3065
2221
  void _local;
3066
- const billingLookup = isRecord(input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
2222
+ const billingLookup = _chunk7DRPTGCKjs.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
3067
2223
  const inspection = toolExecutionInspection(input);
3068
2224
  return {
3069
2225
  ...base,
@@ -3118,7 +2274,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
3118
2274
  lines: [
3119
2275
  ...input.csv.columns.length > 0 ? [`columns: ${JSON.stringify(input.csv.columns)}`] : [],
3120
2276
  ...Object.keys(input.summary).length > 0 ? [
3121
- `summary: ${Object.entries(input.summary).map(([key, value2]) => `${key}=${String(value2)}`).join(", ")}`
2277
+ `summary: ${Object.entries(input.summary).map(([key, value]) => `${key}=${String(value)}`).join(", ")}`
3122
2278
  ] : [],
3123
2279
  `preview: ${JSON.stringify(input.rowOutput.previewRows)}`,
3124
2280
  `starter script: ${input.seededScript.path}`
@@ -3146,20 +2302,20 @@ function buildToolExecuteRowArtifactEnvelope(input) {
3146
2302
  }
3147
2303
  async function executeTool(toolId, options) {
3148
2304
  const output = toolExecuteJsonOption(options.json);
3149
- const wantsJson = _chunkHRWUQJ4Kjs.shouldEmitJson.call(void 0, output.requested) || (_nullishCoalesce(options.outputFormat, () => ( "auto"))).trim().toLowerCase() !== "csv";
2305
+ const wantsJson = _chunkDQ65ZVHNjs.shouldEmitJson.call(void 0, output.requested) || (_nullishCoalesce(options.outputFormat, () => ( "auto"))).trim().toLowerCase() !== "csv";
3150
2306
  let parsed;
3151
2307
  try {
3152
2308
  parsed = parseExecuteOptions(toolId, options, output);
3153
2309
  } catch (error) {
3154
2310
  if (wantsJson) {
3155
- _chunkHRWUQJ4Kjs.printJsonError.call(void 0, error);
2311
+ _chunkDQ65ZVHNjs.printJsonError.call(void 0, error);
3156
2312
  } else {
3157
2313
  console.error(error instanceof Error ? error.message : String(error));
3158
2314
  }
3159
2315
  return error instanceof _chunk7P5AA3SNjs.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
3160
2316
  }
3161
2317
  const cliInvocationId = _nullishCoalesce(_chunkQJBJZVG6js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkQJBJZVG6js.beginToolExecuteCommand.call(void 0, )));
3162
- const client = new (0, _chunk36ML3YKAjs.DeeplineClient)();
2318
+ const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
3163
2319
  let metadata;
3164
2320
  try {
3165
2321
  metadata = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0,
@@ -3174,7 +2330,7 @@ async function executeTool(toolId, options) {
3174
2330
  );
3175
2331
  if (play) {
3176
2332
  if (wantsJson) {
3177
- _chunkHRWUQJ4Kjs.printJsonError.call(void 0,
2333
+ _chunkDQ65ZVHNjs.printJsonError.call(void 0,
3178
2334
  new Error(playAliasToolErrorMessage(parsed.toolId, play))
3179
2335
  );
3180
2336
  } else {
@@ -3185,9 +2341,9 @@ async function executeTool(toolId, options) {
3185
2341
  }
3186
2342
  throw error;
3187
2343
  }
3188
- if (isPlayLikeTool(metadata)) {
2344
+ if (_chunk7DRPTGCKjs.isPlayLikeTool.call(void 0, metadata)) {
3189
2345
  if (wantsJson) {
3190
- _chunkHRWUQJ4Kjs.printJsonError.call(void 0,
2346
+ _chunkDQ65ZVHNjs.printJsonError.call(void 0,
3191
2347
  new Error(
3192
2348
  playLikeToolExecuteErrorMessage(
3193
2349
  parsed.toolId,
@@ -3203,7 +2359,7 @@ async function executeTool(toolId, options) {
3203
2359
  }
3204
2360
  return 2;
3205
2361
  }
3206
- if (_optionalChain([metadata, 'access', _33 => _33.deprecation, 'optionalAccess', _34 => _34.message])) {
2362
+ if (_optionalChain([metadata, 'access', _24 => _24.deprecation, 'optionalAccess', _25 => _25.message])) {
3207
2363
  console.error(
3208
2364
  `Warning: ${parsed.toolId} is deprecated. ${metadata.deprecation.message}`
3209
2365
  );
@@ -3231,13 +2387,13 @@ async function executeTool(toolId, options) {
3231
2387
  "execute request",
3232
2388
  () => client.executeTool(parsed.toolId, parsed.params, {
3233
2389
  ...parsed.timeoutMs !== void 0 ? { timeout: parsed.timeoutMs } : {},
3234
- ..._optionalChain([metadata, 'access', _35 => _35.executionMetadata, 'optionalAccess', _36 => _36.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
2390
+ ..._optionalChain([metadata, 'access', _26 => _26.executionMetadata, 'optionalAccess', _27 => _27.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
3235
2391
  responseIntent,
3236
2392
  ...idempotencyKey ? { idempotencyKey } : {},
3237
2393
  ...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
3238
- searchRef: _chunkR4XZO6Z5js.recentSearchRef.call(void 0, ),
2394
+ searchRef: _chunkPSGEDGLTjs.recentSearchRef.call(void 0, ),
3239
2395
  cliInvocationId,
3240
- onResponseReceived: _chunkZMVJSS6Njs.recordApiResponse
2396
+ onResponseReceived: _chunkZAAKSJASjs.recordApiResponse
3241
2397
  }).catch((error) => {
3242
2398
  const guidanceLines = toolGuidanceLines(metadata.guidance);
3243
2399
  if (guidanceLines.length > 0) {
@@ -3256,10 +2412,10 @@ async function executeTool(toolId, options) {
3256
2412
  "result formatting",
3257
2413
  () => {
3258
2414
  const listExtractorPaths = listExtractorPathsFromUsageGuidance(metadata);
3259
- const listConversion2 = _chunkRDXFGPJUjs.tryConvertToList.call(void 0, rawResponse, {
2415
+ const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
3260
2416
  listExtractorPaths
3261
2417
  });
3262
- const summary2 = _chunkRDXFGPJUjs.extractSummaryFields.call(void 0, rawResponse);
2418
+ const summary2 = _chunkHGFFYVXNjs.extractSummaryFields.call(void 0, rawResponse);
3263
2419
  const baseEnvelope2 = buildToolExecuteBaseEnvelope({
3264
2420
  toolId: parsed.toolId,
3265
2421
  params: parsed.params,
@@ -3276,19 +2432,19 @@ async function executeTool(toolId, options) {
3276
2432
  const executeExitCode = toolExecuteExitCode(baseEnvelope);
3277
2433
  const delivered = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0, "output delivery", () => {
3278
2434
  if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
3279
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: true });
2435
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: true });
3280
2436
  return true;
3281
2437
  }
3282
2438
  if (parsed.outputFormat === "json_file") {
3283
- const jsonPath = _chunkRDXFGPJUjs.writeJsonOutputFile.call(void 0,
2439
+ const jsonPath = _chunkHGFFYVXNjs.writeJsonOutputFile.call(void 0,
3284
2440
  rawResponse,
3285
2441
  `payload_${parsed.toolId}`
3286
2442
  );
3287
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
2443
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
3288
2444
  {
3289
2445
  ...baseEnvelope,
3290
2446
  local: {
3291
- ...isRecord(baseEnvelope.local) ? baseEnvelope.local : {},
2447
+ ..._chunk7DRPTGCKjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
3292
2448
  payload_file: jsonPath
3293
2449
  }
3294
2450
  },
@@ -3306,18 +2462,18 @@ async function executeTool(toolId, options) {
3306
2462
  `${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
3307
2463
  );
3308
2464
  if (wantsJson) {
3309
- _chunkHRWUQJ4Kjs.printJsonError.call(void 0, error);
2465
+ _chunkDQ65ZVHNjs.printJsonError.call(void 0, error);
3310
2466
  } else {
3311
2467
  console.error(error.message);
3312
2468
  }
3313
2469
  return false;
3314
2470
  }
3315
2471
  if (parsed.outputFormat === "csv" || parsed.outputFormat === "csv_file") {
3316
- const jsonPath = _chunkRDXFGPJUjs.writeJsonOutputFile.call(void 0,
2472
+ const jsonPath = _chunkHGFFYVXNjs.writeJsonOutputFile.call(void 0,
3317
2473
  rawResponse,
3318
2474
  `payload_${parsed.toolId}`
3319
2475
  );
3320
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
2476
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
3321
2477
  {
3322
2478
  ...baseEnvelope,
3323
2479
  local: {
@@ -3328,11 +2484,11 @@ async function executeTool(toolId, options) {
3328
2484
  );
3329
2485
  return true;
3330
2486
  }
3331
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: false });
2487
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: false });
3332
2488
  return true;
3333
2489
  }
3334
- const rowOutput = _chunkRDXFGPJUjs.projectRowOutput.call(void 0, listConversion);
3335
- const csv = _chunkRDXFGPJUjs.writeCsvOutputFile.call(void 0,
2490
+ const rowOutput = _chunkHGFFYVXNjs.projectRowOutput.call(void 0, listConversion);
2491
+ const csv = _chunkHGFFYVXNjs.writeCsvOutputFile.call(void 0,
3336
2492
  listConversion.rows,
3337
2493
  `${parsed.toolId}_output`,
3338
2494
  parsed.outPath ? { outPath: parsed.outPath } : void 0
@@ -3352,7 +2508,7 @@ async function executeTool(toolId, options) {
3352
2508
  seededScript
3353
2509
  });
3354
2510
  if (parsed.outputFormat === "csv_file") {
3355
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: true });
2511
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: true });
3356
2512
  return true;
3357
2513
  }
3358
2514
  if (parsed.outPath) {
@@ -3360,7 +2516,7 @@ async function executeTool(toolId, options) {
3360
2516
  toolId: parsed.toolId,
3361
2517
  idempotencyKey
3362
2518
  });
3363
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
2519
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
3364
2520
  json: wantsJson,
3365
2521
  text: `Wrote ${csv.rowCount} row(s) to ${csv.path}
3366
2522
  inspect: ${inspection.inspect}
@@ -3369,7 +2525,7 @@ inspect: ${inspection.inspect}
3369
2525
  return true;
3370
2526
  }
3371
2527
  if (parsed.noPreview) {
3372
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
2528
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
3373
2529
  {
3374
2530
  ...materializedEnvelope,
3375
2531
  local: {
@@ -3382,7 +2538,7 @@ inspect: ${inspection.inspect}
3382
2538
  );
3383
2539
  return true;
3384
2540
  }
3385
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
2541
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
3386
2542
  json: wantsJson && parsed.outputFormat !== "csv"
3387
2543
  });
3388
2544
  return true;
@@ -3403,9 +2559,4 @@ inspect: ${inspection.inspect}
3403
2559
 
3404
2560
 
3405
2561
 
3406
-
3407
-
3408
-
3409
-
3410
-
3411
- exports.formatModelDescription = formatModelDescription; exports.isMonitorTypeTool = isMonitorTypeTool; exports.registerToolsCommands = registerToolsCommands; exports.toolContractJsonForDescribe = toolContractJsonForDescribe; exports.printMonitorTypeContract = printMonitorTypeContract; exports.publicToolSchemas = publicToolSchemas; exports.describedTool = describedTool; exports.printCompactToolContract = printCompactToolContract; exports.toolMetadataJsonForDescribe = toolMetadataJsonForDescribe; exports.extractToolExecutionWarningMessages = extractToolExecutionWarningMessages; exports.buildToolExecuteBaseEnvelope = buildToolExecuteBaseEnvelope;
2562
+ exports.registerToolsCommands = registerToolsCommands; exports.printMonitorTypeContract = printMonitorTypeContract; exports.printCompactToolContract = printCompactToolContract; exports.extractToolExecutionWarningMessages = extractToolExecutionWarningMessages; exports.seedToolListScript = seedToolListScript; exports.buildToolExecuteBaseEnvelope = buildToolExecuteBaseEnvelope;