deepline 0.3.392 → 0.3.394

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 (153) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +156 -24
  2. package/dist/bundling-sources/sdk/src/compat.ts +9 -0
  3. package/dist/bundling-sources/sdk/src/http.ts +5 -1
  4. package/dist/bundling-sources/sdk/src/index.ts +5 -0
  5. package/dist/bundling-sources/sdk/src/plays/run-request.ts +182 -6
  6. package/dist/bundling-sources/sdk/src/release.ts +4 -1
  7. package/dist/bundling-sources/sdk/src/types.ts +13 -0
  8. package/dist/bundling-sources/shared_libs/integration-contracts/request-warnings.ts +64 -0
  9. package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +315 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +41 -8
  11. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +895 -54
  12. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +41 -4
  13. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-policy.ts +28 -0
  14. package/dist/bundling-sources/shared_libs/play-runtime/durable-invocation-fence.ts +36 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +251 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +11 -3
  17. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/gateway-adapter.ts +1 -0
  18. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +30 -1
  19. package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +26 -0
  20. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +168 -10
  21. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +252 -10
  22. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +92 -58
  23. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +7 -1
  24. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +30 -7
  25. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +1161 -316
  26. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +28 -15
  27. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +24 -3
  28. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +32 -0
  29. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +103 -23
  30. package/dist/bundling-sources/shared_libs/plays/core.ts +1 -1
  31. package/dist/bundling-sources/shared_libs/plays/dataset.ts +172 -79
  32. package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +173 -1
  33. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +18 -0
  34. package/dist/cli/auth-IHKISLJQ.js +39 -0
  35. package/dist/cli/{auth-6JSA2ZCW.mjs → auth-OSXDAVCF.mjs} +4 -4
  36. package/dist/cli/{billing-Q5BLQHIU.js → billing-EKLYOXUY.js} +101 -74
  37. package/dist/cli/{billing-MRRO643H.mjs → billing-ZNNKX3UR.mjs} +32 -5
  38. package/dist/cli/{chunk-4SFPVW7A.js → chunk-2MDDA7A4.js} +26 -26
  39. package/dist/cli/{chunk-JOFPQGXW.js → chunk-354JCXA2.js} +50 -50
  40. package/dist/cli/{chunk-7E66A24V.mjs → chunk-3HU47EGZ.mjs} +71 -9
  41. package/dist/cli/{chunk-DSWSEHRX.mjs → chunk-3HWALOL2.mjs} +1 -1
  42. package/dist/cli/{chunk-T7OKJ2T6.js → chunk-4P27AXEA.js} +73 -63
  43. package/dist/cli/{chunk-24VEN5PQ.mjs → chunk-5BB2RGAX.mjs} +190 -18
  44. package/dist/cli/{chunk-JSLPHFP7.js → chunk-6YAUMG27.js} +3 -2
  45. package/dist/cli/{chunk-MU6M3URX.mjs → chunk-BP33SIZF.mjs} +1 -1
  46. package/dist/cli/{chunk-WMS5U6YB.js → chunk-CS6RAIVY.js} +20 -19
  47. package/dist/cli/{chunk-CVLM3WMJ.js → chunk-E23BQ5SC.js} +242 -183
  48. package/dist/cli/{chunk-2GAHHSLB.mjs → chunk-FJGW5GXU.mjs} +3 -2
  49. package/dist/cli/{chunk-YN6YA7ZZ.mjs → chunk-JHIJIHFB.mjs} +79 -20
  50. package/dist/cli/{chunk-Q6EOHNRH.mjs → chunk-JI2B4RZP.mjs} +119 -6
  51. package/dist/cli/{chunk-5O4B6AUN.js → chunk-KB4SDX5S.js} +71 -9
  52. package/dist/cli/{chunk-RV6ALZIX.js → chunk-KGNTKMRG.js} +32 -7
  53. package/dist/cli/{chunk-6DBOU7UH.js → chunk-KI635JN4.js} +176 -87
  54. package/dist/cli/{chunk-2FQG2HU4.js → chunk-KIUMEOM5.js} +8 -8
  55. package/dist/cli/{chunk-Y6VOGHF2.mjs → chunk-KZZC33PY.mjs} +0 -181
  56. package/dist/cli/{chunk-2Q3GEFL4.mjs → chunk-M57J2SK4.mjs} +2 -2
  57. package/dist/cli/{chunk-R3O2CZ4H.mjs → chunk-MFB2VKBO.mjs} +2 -2
  58. package/dist/cli/{chunk-QGKPTBRR.js → chunk-MH73HMPV.js} +3 -3
  59. package/dist/cli/{chunk-BB3FNYFY.js → chunk-MLPU5SMZ.js} +2 -2
  60. package/dist/cli/{chunk-2G7DXFHI.mjs → chunk-NR3DFKNF.mjs} +27 -2
  61. package/dist/cli/{chunk-EY7RFC6A.js → chunk-QIQBYKLB.js} +15 -15
  62. package/dist/cli/{chunk-RIV2GS5E.js → chunk-RBJYWRCF.js} +638 -466
  63. package/dist/cli/{chunk-3VN4FTE3.js → chunk-RDXFGPJU.js} +1 -182
  64. package/dist/cli/{chunk-YAZCDBXX.mjs → chunk-TJI2EN6K.mjs} +3 -2
  65. package/dist/cli/chunk-UBKA33KY.mjs +310 -0
  66. package/dist/cli/{chunk-PAIMOGCM.js → chunk-UHNDVD3P.js} +125 -12
  67. package/dist/cli/{chunk-4TCT77UF.js → chunk-URWF7NGQ.js} +6 -1
  68. package/dist/cli/{chunk-2QLML6G4.mjs → chunk-UXFSWG3Q.mjs} +4 -4
  69. package/dist/cli/{chunk-UCKJQG25.js → chunk-VK6FYZLP.js} +8 -8
  70. package/dist/cli/{chunk-ZTACINO5.mjs → chunk-X63FDZJZ.mjs} +13 -3
  71. package/dist/cli/chunk-XDVT3GOM.js +310 -0
  72. package/dist/cli/{chunk-A3APGZFP.mjs → chunk-XRQ2AQL7.mjs} +2 -2
  73. package/dist/cli/{chunk-3FV4GBRK.mjs → chunk-XXUDVEXK.mjs} +97 -8
  74. package/dist/cli/{chunk-PQSA443V.mjs → chunk-ZI2ZNDJK.mjs} +6 -1
  75. package/dist/cli/{chunk-HGYBEAQP.mjs → chunk-ZYBGA4AR.mjs} +3 -3
  76. package/dist/cli/command-docs.js +2 -2
  77. package/dist/cli/command-docs.mjs +1 -1
  78. package/dist/cli/{csv-E4QGUIGI.mjs → csv-5AXRB35H.mjs} +3 -3
  79. package/dist/cli/{csv-26U5T24Z.js → csv-LU7O75WE.js} +12 -12
  80. package/dist/cli/{db-JTRJIAQW.mjs → db-7XP5UWEW.mjs} +6 -5
  81. package/dist/cli/{db-QHBFLMVL.js → db-F7YTFKVM.js} +31 -30
  82. package/dist/cli/{describe-FDV2V74F.js → describe-FRH32RDV.js} +24 -23
  83. package/dist/cli/{describe-E3DE3ZK3.mjs → describe-K4ES5LIL.mjs} +17 -16
  84. package/dist/cli/{executions-B3GTNPRE.mjs → executions-IEHEHJUO.mjs} +6 -5
  85. package/dist/cli/{executions-VZYOGVQY.js → executions-RZV5XPT2.js} +8 -7
  86. package/dist/cli/{feedback-CR55FJA2.js → feedback-3P65QTX3.js} +7 -7
  87. package/dist/cli/{feedback-4CEBR3OV.mjs → feedback-FPUVZBAN.mjs} +3 -3
  88. package/dist/cli/{git-NM2PHHZ4.mjs → git-GLVVP7TY.mjs} +4 -4
  89. package/dist/cli/git-MFFAWVVX.js +23 -0
  90. package/dist/cli/index.js +100 -96
  91. package/dist/cli/index.mjs +47 -43
  92. package/dist/cli/{legacy-noops-A7MSW5ND.mjs → legacy-noops-3MOI6NBM.mjs} +4 -4
  93. package/dist/cli/{legacy-noops-ZUA4YFIH.js → legacy-noops-XKSGZR7Q.js} +7 -7
  94. package/dist/cli/{monitors-NVPRQYP3.mjs → monitors-FTBGNEFG.mjs} +6 -5
  95. package/dist/cli/{monitors-ZE3TLZ4H.js → monitors-NZ2DYNST.js} +87 -86
  96. package/dist/cli/{org-U7A6DV5D.js → org-MCKDQXIV.js} +66 -65
  97. package/dist/cli/{org-KUBILNQV.mjs → org-V2J5RBCN.mjs} +6 -5
  98. package/dist/cli/{play-HRDXQ4QE.mjs → play-AJFGME3B.mjs} +11 -10
  99. package/dist/cli/play-WLSN2EO2.js +158 -0
  100. package/dist/cli/{providers-VD6YTVQZ.js → providers-2JEZ2264.js} +9 -8
  101. package/dist/cli/{providers-OHIWI453.mjs → providers-I6RQJZFZ.mjs} +6 -5
  102. package/dist/cli/{quickstart-UBV2FONF.mjs → quickstart-BIDQDMO4.mjs} +3 -3
  103. package/dist/cli/{quickstart-ETTCWPA4.js → quickstart-GJ2RPDU3.js} +5 -5
  104. package/dist/cli/run-identity-G257GQED.js +25 -0
  105. package/dist/cli/run-identity-MRNCEGV2.mjs +25 -0
  106. package/dist/cli/search-5VN4YD4I.js +27 -0
  107. package/dist/cli/{search-F44IZRT7.mjs → search-ELRXFWG5.mjs} +7 -6
  108. package/dist/cli/{secrets-CAEMRORF.js → secrets-53IT6VXD.js} +15 -14
  109. package/dist/cli/{secrets-R6XOJZKU.mjs → secrets-SQXGZXIC.mjs} +6 -5
  110. package/dist/cli/{sessions-RLN6UQS3.mjs → sessions-2X5QF7SL.mjs} +4 -4
  111. package/dist/cli/{sessions-6GC7OFTT.js → sessions-CAV5M77Y.js} +5 -5
  112. package/dist/cli/{settings-DPNVUAV2.js → settings-532WNAZO.js} +76 -75
  113. package/dist/cli/{settings-KIPAMRPP.mjs → settings-7P67VGCJ.mjs} +9 -8
  114. package/dist/cli/{setup-DTL3L5SG.js → setup-6L2VSUWJ.js} +41 -41
  115. package/dist/cli/{setup-TU2F7PU5.mjs → setup-QGGBV2LE.mjs} +6 -6
  116. package/dist/cli/{skills-UV5MYJ46.mjs → skills-3FE62WBG.mjs} +4 -4
  117. package/dist/cli/skills-S6NPZAN7.js +28 -0
  118. package/dist/cli/tools-647RLXQS.js +41 -0
  119. package/dist/cli/{tools-QRRNDCQ7.mjs → tools-DMR25DEF.mjs} +10 -9
  120. package/dist/cli/{update-4426TF35.mjs → update-6RZMHJZP.mjs} +6 -6
  121. package/dist/cli/update-WVTSC3EM.js +28 -0
  122. package/dist/cli/{workflow-N4U5VLZ3.mjs → workflow-L2DQRE6R.mjs} +7 -6
  123. package/dist/cli/{workflow-HNLOVISB.js → workflow-TX4F2PIX.js} +17 -16
  124. package/dist/{client-e6Qh5ZIg.d.mts → client-BktIPdIj.d.mts} +153 -4
  125. package/dist/{client-Uxuy-xQ2.d.ts → client-C3O1Ipf3.d.ts} +153 -4
  126. package/dist/{compiler-manifest-CY2v8ab0.d.ts → compiler-manifest-DLxUY5kI.d.mts} +124 -10
  127. package/dist/{compiler-manifest-CY2v8ab0.d.mts → compiler-manifest-DLxUY5kI.d.ts} +124 -10
  128. package/dist/{index-BZ6uzZJl.d.ts → index-B_GM9E3q.d.ts} +1 -1
  129. package/dist/{index-B9fBZH1g.d.mts → index-SCb0NvDb.d.mts} +1 -1
  130. package/dist/index.d.mts +5 -5
  131. package/dist/index.d.ts +5 -5
  132. package/dist/index.js +120 -29
  133. package/dist/index.mjs +111 -20
  134. package/dist/install-integrity.json +94 -88
  135. package/dist/plays/bundle-play-file.d.mts +3 -3
  136. package/dist/plays/bundle-play-file.d.ts +3 -3
  137. package/dist/plays/bundle-play-file.mjs +2 -2
  138. package/dist/plays/run-request.d.mts +2 -2
  139. package/dist/plays/run-request.d.ts +2 -2
  140. package/dist/plays/run-request.js +5 -2
  141. package/dist/plays/run-request.mjs +4 -1
  142. package/dist/release.d.mts +4 -1
  143. package/dist/release.d.ts +4 -1
  144. package/dist/release.js +2 -2
  145. package/dist/release.mjs +1 -1
  146. package/package.json +1 -1
  147. package/dist/cli/auth-67TAELQL.js +0 -39
  148. package/dist/cli/git-I5JTK6YU.js +0 -23
  149. package/dist/cli/play-A2V7YDU7.js +0 -157
  150. package/dist/cli/search-WWXMBVPH.js +0 -26
  151. package/dist/cli/skills-SWOSEZLB.js +0 -28
  152. package/dist/cli/tools-IL2YCDQ6.js +0 -40
  153. package/dist/cli/update-BERDPEYR.js +0 -28
@@ -13,7 +13,7 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
13
13
 
14
14
 
15
15
 
16
- var _chunkUCKJQG25js = require('./chunk-UCKJQG25.js');
16
+ var _chunkVK6FYZLPjs = require('./chunk-VK6FYZLP.js');
17
17
 
18
18
 
19
19
 
@@ -24,15 +24,17 @@ var _chunkUCKJQG25js = require('./chunk-UCKJQG25.js');
24
24
 
25
25
 
26
26
 
27
+ var _chunkRDXFGPJUjs = require('./chunk-RDXFGPJU.js');
27
28
 
28
- var _chunk3VN4FTE3js = require('./chunk-3VN4FTE3.js');
29
29
 
30
+ var _chunkKB4SDX5Sjs = require('./chunk-KB4SDX5S.js');
30
31
 
31
- var _chunk5O4B6AUNjs = require('./chunk-5O4B6AUN.js');
32
32
 
33
33
 
34
+ var _chunkE23BQ5SCjs = require('./chunk-E23BQ5SC.js');
34
35
 
35
- var _chunkCVLM3WMJjs = require('./chunk-CVLM3WMJ.js');
36
+
37
+ var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
36
38
 
37
39
 
38
40
 
@@ -46,11 +48,11 @@ var _chunkQJBJZVG6js = require('./chunk-QJBJZVG6.js');
46
48
 
47
49
 
48
50
 
49
- var _chunkRV6ALZIXjs = require('./chunk-RV6ALZIX.js');
51
+ var _chunkKGNTKMRGjs = require('./chunk-KGNTKMRG.js');
50
52
 
51
53
 
52
54
 
53
- var _chunkWMS5U6YBjs = require('./chunk-WMS5U6YB.js');
55
+ var _chunkCS6RAIVYjs = require('./chunk-CS6RAIVY.js');
54
56
 
55
57
 
56
58
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
@@ -58,6 +60,40 @@ var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
58
60
  // src/cli/commands/tools.ts
59
61
  var _commander = require('commander');
60
62
 
63
+ // ../integration-contracts/request-warnings.ts
64
+ function matchesToolRequestCondition(condition, payload) {
65
+ if ("all" in condition) {
66
+ return condition.all.every(
67
+ (entry) => matchesToolRequestCondition(entry, payload)
68
+ );
69
+ }
70
+ if ("any" in condition) {
71
+ return condition.any.some(
72
+ (entry) => matchesToolRequestCondition(entry, payload)
73
+ );
74
+ }
75
+ const value2 = _optionalChain([payload, 'optionalAccess', _ => _[condition.field]]);
76
+ switch (condition.operator) {
77
+ case "equals":
78
+ return value2 === condition.value;
79
+ case "number_equals":
80
+ try {
81
+ return Number(value2) === condition.value;
82
+ } catch (e) {
83
+ return false;
84
+ }
85
+ case "present_nonblank":
86
+ return typeof value2 === "string" ? value2.trim().length > 0 : value2 !== void 0 && value2 !== null;
87
+ default:
88
+ throw new Error("Unsupported tool request warning condition.");
89
+ }
90
+ }
91
+ function firstMatchingToolRequestWarning(rules, payload) {
92
+ return _optionalChain([rules, 'optionalAccess', _2 => _2.find, 'call', _3 => _3((rule) => matchesToolRequestCondition(rule.when, payload))]);
93
+ }
94
+
95
+ // src/cli/commands/tools.ts
96
+
61
97
 
62
98
 
63
99
 
@@ -95,10 +131,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
95
131
  }
96
132
  };
97
133
  function pendingToolExecutionPath(input) {
98
- const config = _chunkWMS5U6YBjs.resolveConfig.call(void 0, );
99
- 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(_chunk3VN4FTE3js.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
134
+ const config = _chunkCS6RAIVYjs.resolveConfig.call(void 0, );
135
+ 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");
100
136
  return _path.join.call(void 0,
101
- _chunkWMS5U6YBjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
137
+ _chunkCS6RAIVYjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
102
138
  `pending-tool-execution-${fingerprint}.json`
103
139
  );
104
140
  }
@@ -319,7 +355,7 @@ function catalogFields() {
319
355
  var FIELDS_BY_ID = new Map(catalogFields().map((field) => [field.id, field]));
320
356
  function generalField(id) {
321
357
  const field = FIELDS_BY_ID.get(id);
322
- return _optionalChain([field, 'optionalAccess', _ => _.kind]) ? [field.entity, field.group, field.leaf].join(".") : null;
358
+ return _optionalChain([field, 'optionalAccess', _4 => _4.kind]) ? [field.entity, field.group, field.leaf].join(".") : null;
323
359
  }
324
360
  function fieldSatisfies(offered, wanted) {
325
361
  return offered === wanted || generalField(offered) === wanted;
@@ -400,7 +436,7 @@ function formatModelDescription(description) {
400
436
  function appendNamespace(lines, namespace) {
401
437
  lines.push(`- ${namespace.provider} (${namespace.sourceSymbol})`);
402
438
  for (const field of namespace.fields) {
403
- const values = _optionalChain([field, 'access', _2 => _2.enumValues, 'optionalAccess', _3 => _3.length]) ? ` (${field.enumValues.map((value2) => JSON.stringify(value2)).join(" | ")})` : "";
439
+ const values = _optionalChain([field, 'access', _5 => _5.enumValues, 'optionalAccess', _6 => _6.length]) ? ` (${field.enumValues.map((value2) => JSON.stringify(value2)).join(" | ")})` : "";
404
440
  lines.push(
405
441
  ` - ${field.name}: ${field.type}${values} - ${field.description}`
406
442
  );
@@ -487,7 +523,7 @@ function shellCommandArg(value2) {
487
523
  }
488
524
  function zeroMatchToolGuidance(options) {
489
525
  const categories = _nullishCoalesce(options.categories, () => ( []));
490
- const query = _nullishCoalesce(_optionalChain([options, 'access', _4 => _4.query, 'optionalAccess', _5 => _5.trim, 'call', _6 => _6()]), () => ( ""));
526
+ const query = _nullishCoalesce(_optionalChain([options, 'access', _7 => _7.query, 'optionalAccess', _8 => _8.trim, 'call', _9 => _9()]), () => ( ""));
491
527
  const filterText = [
492
528
  categories.length ? `categories=${categories.join(",")}` : null,
493
529
  query ? `grep=${query}` : null,
@@ -619,12 +655,12 @@ function categoryEnumerationRender(summaries) {
619
655
  };
620
656
  }
621
657
  async function listToolCategories(emitJson, compact) {
622
- const client = new (0, _chunkCVLM3WMJjs.DeeplineClient)();
658
+ const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
623
659
  const rawTools = await client.listTools({ compact });
624
660
  const items = rawTools.map(toListedTool);
625
661
  const summaries = aggregateCategorySummaries(rawTools);
626
662
  const outputItems = compact ? items.map(compactTool) : items;
627
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
663
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
628
664
  {
629
665
  tools: outputItems,
630
666
  count: outputItems.length,
@@ -643,7 +679,7 @@ function unknownCategoryError(category, summaries, emitJson) {
643
679
  const known = summaries.map((item) => item.name);
644
680
  const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
645
681
  if (emitJson) {
646
- _chunkRV6ALZIXjs.printJson.call(void 0, {
682
+ _chunkKGNTKMRGjs.printJson.call(void 0, {
647
683
  ok: false,
648
684
  exitCode: 4,
649
685
  code: "TOOL_CATEGORY_NOT_FOUND",
@@ -657,13 +693,13 @@ function unknownCategoryError(category, summaries, emitJson) {
657
693
  const render = categoryEnumerationRender(summaries);
658
694
  console.error(message);
659
695
  console.error("");
660
- console.error(_chunkRV6ALZIXjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
696
+ console.error(_chunkKGNTKMRGjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
661
697
  console.error("");
662
698
  console.error(`Valid categories: ${known.join(", ")}`);
663
699
  return 4;
664
700
  }
665
701
  async function listToolsInCategory(category, emitJson) {
666
- const client = new (0, _chunkCVLM3WMJjs.DeeplineClient)();
702
+ const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
667
703
  const rawTools = await client.listTools({
668
704
  categories: category,
669
705
  compact: false
@@ -673,7 +709,7 @@ async function listToolsInCategory(category, emitJson) {
673
709
  if (!summaries.some((item) => item.name === category)) {
674
710
  return unknownCategoryError(category, summaries, emitJson);
675
711
  }
676
- const rows = rawTools.filter((tool) => _optionalChain([tool, 'access', _7 => _7.categories, 'optionalAccess', _8 => _8.includes, 'call', _9 => _9(category)])).map((tool) => ({
712
+ const rows = rawTools.filter((tool) => _optionalChain([tool, 'access', _10 => _10.categories, 'optionalAccess', _11 => _11.includes, 'call', _12 => _12(category)])).map((tool) => ({
677
713
  id: tool.toolId,
678
714
  provider: tool.provider,
679
715
  required: requiredInputIds(tool),
@@ -700,7 +736,7 @@ async function listToolsInCategory(category, emitJson) {
700
736
  }
701
737
  ]
702
738
  };
703
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
739
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
704
740
  {
705
741
  category,
706
742
  total: rows.length,
@@ -713,7 +749,7 @@ async function listToolsInCategory(category, emitJson) {
713
749
  return 0;
714
750
  }
715
751
  async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
716
- const client = new (0, _chunkCVLM3WMJjs.DeeplineClient)();
752
+ const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
717
753
  const items = (await client.listTools({
718
754
  categories: requestedCategories.join(","),
719
755
  compact
@@ -742,7 +778,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
742
778
  ]
743
779
  };
744
780
  const outputItems = compact ? items.map(compactTool) : items;
745
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
781
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
746
782
  {
747
783
  tools: outputItems,
748
784
  count: outputItems.length,
@@ -758,16 +794,16 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
758
794
  return 0;
759
795
  }
760
796
  async function listTools(category, options = {}) {
761
- const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]), () => ( ""));
797
+ const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _13 => _13.trim, 'call', _14 => _14()]), () => ( ""));
762
798
  const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
763
799
  const compact = options.compact !== false;
764
- const emitJson = options.json === true || _chunkRV6ALZIXjs.shouldEmitJson.call(void 0, );
800
+ const emitJson = options.json === true || _chunkKGNTKMRGjs.shouldEmitJson.call(void 0, );
765
801
  if (positional && flagCategories.length > 0) {
766
802
  const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
767
803
  if (!flagIsSameSingle) {
768
804
  const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
769
805
  if (emitJson) {
770
- _chunkRV6ALZIXjs.printJson.call(void 0, {
806
+ _chunkKGNTKMRGjs.printJson.call(void 0, {
771
807
  ok: false,
772
808
  exitCode: 2,
773
809
  code: "TOOL_LIST_CATEGORY_CONFLICT",
@@ -794,7 +830,7 @@ async function grepTools(queryInput, options = {}) {
794
830
  console.error("Usage: deepline tools grep <query> [--json]");
795
831
  return 1;
796
832
  }
797
- const client = new (0, _chunkCVLM3WMJjs.DeeplineClient)();
833
+ const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
798
834
  const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
799
835
  const mode = _nullishCoalesce(options.mode, () => ( "all"));
800
836
  const jsonOutput = options.json === true;
@@ -837,7 +873,7 @@ async function grepTools(queryInput, options = {}) {
837
873
  query,
838
874
  mode
839
875
  }) : null;
840
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
876
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
841
877
  {
842
878
  tools: outputTools,
843
879
  count: outputTools.length,
@@ -855,7 +891,7 @@ async function grepTools(queryInput, options = {}) {
855
891
  } : {},
856
892
  commandTemplates: TOOL_COMMAND_TEMPLATES
857
893
  },
858
- { json: options.json || _chunkRV6ALZIXjs.shouldEmitJson.call(void 0, ) }
894
+ { json: options.json || _chunkKGNTKMRGjs.shouldEmitJson.call(void 0, ) }
859
895
  );
860
896
  return 0;
861
897
  }
@@ -881,7 +917,7 @@ function compactTool(tool) {
881
917
  };
882
918
  }
883
919
  function playIdentifiers(play) {
884
- return [play.name, play.reference, ..._nullishCoalesce(play.aliases, () => ( []))].filter((value2) => Boolean(_optionalChain([value2, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()]))).map((value2) => value2.trim());
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());
885
921
  }
886
922
  async function findPlayForToolId(client, toolId, cliInvocationId) {
887
923
  const requested = toolId.trim();
@@ -979,6 +1015,46 @@ Output:
979
1015
  exact charge. Workspace balance changes also include other callers' activity.
980
1016
  `
981
1017
  );
1018
+ tools.command("connect <provider>").description(
1019
+ "Save your provider credentials for the active workspace (owner/admin required)."
1020
+ ).requiredOption(
1021
+ "--credentials-file <path>",
1022
+ "JSON object of credential field names and string values; keep this file private"
1023
+ ).option("--json", "Emit a confirmation without credential values").action(
1024
+ async (provider, options) => {
1025
+ let credentials;
1026
+ try {
1027
+ credentials = JSON.parse(
1028
+ _fs.readFileSync.call(void 0, _path.resolve.call(void 0, options.credentialsFile), "utf8")
1029
+ );
1030
+ } catch (e2) {
1031
+ throw new Error(
1032
+ "Unable to read --credentials-file as a JSON object."
1033
+ );
1034
+ }
1035
+ if (!credentials || typeof credentials !== "object" || Array.isArray(credentials) || Object.keys(credentials).length === 0 || Object.values(credentials).some((value2) => typeof value2 !== "string")) {
1036
+ throw new Error(
1037
+ "--credentials-file must contain a nonempty JSON object of string credential values."
1038
+ );
1039
+ }
1040
+ const result = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().setIntegrationCredentials(
1041
+ provider,
1042
+ credentials
1043
+ );
1044
+ if (!result.ok || result.credential_saved !== true) {
1045
+ throw new Error(
1046
+ "The API did not confirm that provider credentials were saved. Inspect the integration before retrying."
1047
+ );
1048
+ }
1049
+ const confirmation = { provider, credential_saved: true };
1050
+ if (_chunkKGNTKMRGjs.shouldEmitJson.call(void 0, options.json))
1051
+ console.log(JSON.stringify(confirmation));
1052
+ else
1053
+ console.log(
1054
+ `Credentials saved for ${provider} in the active workspace.`
1055
+ );
1056
+ }
1057
+ );
982
1058
  tools.command("list [category]").description("Browse tool categories, or list every tool in a category.").addHelpText(
983
1059
  "after",
984
1060
  `
@@ -1011,7 +1087,7 @@ Examples:
1011
1087
  json: Boolean(options.json)
1012
1088
  });
1013
1089
  });
1014
- _chunkUCKJQG25js.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
1090
+ _chunkVK6FYZLPjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
1015
1091
  tools.command("grep <query>").description(
1016
1092
  "Literal grep over tool ids, descriptions, categories, and input fields."
1017
1093
  ).addHelpText(
@@ -1112,7 +1188,7 @@ Examples:
1112
1188
  process.exitCode = await narrowView();
1113
1189
  return;
1114
1190
  }
1115
- const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-FDV2V74F.js")));
1191
+ const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-FRH32RDV.js")));
1116
1192
  process.exitCode = await describeAnything(
1117
1193
  toolId,
1118
1194
  {
@@ -1198,7 +1274,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1198
1274
  console.error("Usage: deepline tools describe <toolId> [--json]");
1199
1275
  return 1;
1200
1276
  }
1201
- const client = new (0, _chunkCVLM3WMJjs.DeeplineClient)();
1277
+ const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
1202
1278
  let tool;
1203
1279
  try {
1204
1280
  tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
@@ -1252,10 +1328,10 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1252
1328
  const lines = toolPricingOnlyLines(tool, toolId);
1253
1329
  if (inferenceQuote)
1254
1330
  lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
1255
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1331
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1256
1332
  {
1257
1333
  toolId: String(tool.toolId || toolId),
1258
- cost: _chunkUCKJQG25js.Capability.fromCatalogEntry(tool).describe().customerCost(),
1334
+ cost: _chunkVK6FYZLPjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
1259
1335
  ...modelDescription ? { modelOptions: modelDescription } : {},
1260
1336
  ...isMonitorTypeTool(tool) ? { pricing: recordField(tool, "pricing") } : {},
1261
1337
  ...inferenceQuote ? { inferenceQuote } : {}
@@ -1270,7 +1346,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1270
1346
  }
1271
1347
  if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !isMonitorTypeTool(tool) && !isPlayLikeTool(tool) && (options.json || options.contractJson)) {
1272
1348
  const contract = toolContractJsonForDescribe(tool, toolId);
1273
- _chunkRV6ALZIXjs.printCompactJson.call(void 0, {
1349
+ _chunkKGNTKMRGjs.printCompactJson.call(void 0, {
1274
1350
  toolId: contract.toolId,
1275
1351
  ...options.schemaOnly ? {
1276
1352
  inputSchema: contract.inputSchema,
@@ -1293,7 +1369,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1293
1369
  return 0;
1294
1370
  }
1295
1371
  if (options.contractJson) {
1296
- _chunkRV6ALZIXjs.printCompactJson.call(void 0, {
1372
+ _chunkKGNTKMRGjs.printCompactJson.call(void 0, {
1297
1373
  ...toolContractJsonForDescribe(tool, toolId),
1298
1374
  ...modelDescription ? { modelOptions: modelDescription } : {},
1299
1375
  ...inferenceQuote ? { inferenceQuote } : {}
@@ -1302,7 +1378,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1302
1378
  }
1303
1379
  const emitJson = options.json === true;
1304
1380
  if (emitJson) {
1305
- _chunkRV6ALZIXjs.printCompactJson.call(void 0, {
1381
+ _chunkKGNTKMRGjs.printCompactJson.call(void 0, {
1306
1382
  ...toolMetadataJsonForDescribe(tool, toolId),
1307
1383
  ...modelDescription ? { modelOptions: modelDescription } : {},
1308
1384
  ...inferenceQuote ? { inferenceQuote } : {}
@@ -1373,13 +1449,13 @@ function toolContractJsonForDescribe(tool, requestedToolId, authoringContractEdi
1373
1449
  arrayField2(toolExecutionResult, "extractedLists", "extracted_lists")
1374
1450
  ).map((entry) => ({
1375
1451
  ...entry,
1376
- returnType: _chunk5O4B6AUNjs.playToolListGetterMode.call(void 0, authoringContractEdition) === "array" ? "Array" : "PlayDataset",
1377
- rowsExpression: _chunk5O4B6AUNjs.playToolListGetterMode.call(void 0, authoringContractEdition) === "array" ? entry.expression : `await ${entry.expression}.materialize()`
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()`
1378
1454
  }));
1379
1455
  const extractedValues = extractionContractEntries(
1380
1456
  arrayField2(toolExecutionResult, "extractedValues", "extracted_values")
1381
1457
  );
1382
- const pricing = _chunkUCKJQG25js.Capability.fromCatalogEntry(tool).describe().customerCost();
1458
+ const pricing = _chunkVK6FYZLPjs.Capability.fromCatalogEntry(tool).describe().customerCost();
1383
1459
  const executionMetadataRecord = recordField(
1384
1460
  tool,
1385
1461
  "executionMetadata",
@@ -1418,6 +1494,7 @@ function toolContractJsonForDescribe(tool, requestedToolId, authoringContractEdi
1418
1494
  description: tool.description,
1419
1495
  ...Object.keys(guidance).length > 0 ? { guidance } : {},
1420
1496
  categories: tool.categories,
1497
+ ...Array.isArray(tool.requestWarnings) ? { requestWarnings: tool.requestWarnings } : {},
1421
1498
  ...deprecated ? {
1422
1499
  deprecated: true,
1423
1500
  callable: tool.callable !== false,
@@ -1581,12 +1658,12 @@ function schemaNodeAt(schema, path) {
1581
1658
  return node;
1582
1659
  }
1583
1660
  var NAMED_VALUE_SHAPES = {
1584
- email_status: { shape: "EmailStatus", schema: _chunk3VN4FTE3js.EMAIL_STATUS_JSON_SCHEMA },
1585
- job_change: { shape: "JobChange", schema: _chunk3VN4FTE3js.JOB_CHANGE_JSON_SCHEMA }
1661
+ email_status: { shape: "EmailStatus", schema: _chunkRDXFGPJUjs.EMAIL_STATUS_JSON_SCHEMA },
1662
+ job_change: { shape: "JobChange", schema: _chunkRDXFGPJUjs.JOB_CHANGE_JSON_SCHEMA }
1586
1663
  };
1587
1664
  function extractorValueType(name) {
1588
- if (!_chunk3VN4FTE3js.isDeeplineExtractorTarget.call(void 0, name)) return void 0;
1589
- const definition = _chunk3VN4FTE3js.DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS[name];
1665
+ if (!_chunkRDXFGPJUjs.isDeeplineExtractorTarget.call(void 0, name)) return void 0;
1666
+ const definition = _chunkRDXFGPJUjs.DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS[name];
1590
1667
  if (definition.enum) {
1591
1668
  return {
1592
1669
  type: definition.enum.map((value2) => JSON.stringify(value2)).join(" | ")
@@ -1680,7 +1757,7 @@ function describedTool(tool, requestedToolId) {
1680
1757
  ...means ? { means } : {},
1681
1758
  // A normalized value has a named type instead of the response's
1682
1759
  // shape; a normalized object is spelled out once under Types.
1683
- ..._optionalChain([deepline, 'optionalAccess', _14 => _14.shape]) ? deepline : valueType ? { type: valueType } : known ? known : fields ? { fields } : {},
1760
+ ..._optionalChain([deepline, 'optionalAccess', _17 => _17.shape]) ? deepline : valueType ? { type: valueType } : known ? known : fields ? { fields } : {},
1684
1761
  // A list's row columns that matter are value getters of their own.
1685
1762
  ...kind === "extractedLists" && fields ? { summarized: true } : {},
1686
1763
  read: playResultExpression(entry),
@@ -1693,14 +1770,14 @@ function describedTool(tool, requestedToolId) {
1693
1770
  const lists = declaredLists.some(({ node }) => node) ? declaredLists.filter(({ node }) => node) : declaredLists;
1694
1771
  const values = getterOutputs("extractedValues", [
1695
1772
  outputSchema,
1696
- ...lists.map(({ node }) => _optionalChain([node, 'optionalAccess', _15 => _15.items]))
1773
+ ...lists.map(({ node }) => _optionalChain([node, 'optionalAccess', _18 => _18.items]))
1697
1774
  ]).map((value2) => {
1698
1775
  if (!lists.length || !value2.field.paths) return value2;
1699
1776
  const within = value2.field.paths.map(
1700
1777
  (path) => path.replace(/^toolResponse\.raw\./, "")
1701
1778
  );
1702
1779
  const list = _nullishCoalesce(lists.find(
1703
- ({ node }) => within.some((path) => isRecord(schemaNodeAt(_optionalChain([node, 'optionalAccess', _16 => _16.items]), path)))
1780
+ ({ node }) => within.some((path) => isRecord(schemaNodeAt(_optionalChain([node, 'optionalAccess', _19 => _19.items]), path)))
1704
1781
  ), () => ( lists[0]));
1705
1782
  return {
1706
1783
  ...value2,
@@ -1717,7 +1794,7 @@ function describedTool(tool, requestedToolId) {
1717
1794
  stringField2(cost, "displayText"),
1718
1795
  // "Free (free)" says the same thing twice.
1719
1796
  billing.toLowerCase() === stringField2(cost, "displayText").toLowerCase() ? "" : billing && `(${billing})`,
1720
- _chunkUCKJQG25js.observedMaxText.call(void 0, cost) && `\u2014 ${_chunkUCKJQG25js.observedMaxText.call(void 0, cost)}`
1797
+ _chunkVK6FYZLPjs.observedMaxText.call(void 0, cost) && `\u2014 ${_chunkVK6FYZLPjs.observedMaxText.call(void 0, cost)}`
1721
1798
  ].filter(Boolean).join(" ") || void 0,
1722
1799
  guidance: [
1723
1800
  ...contract.deprecated === true ? [`Deprecated. ${stringField2(deprecation, "message")}`.trim()] : [],
@@ -1854,7 +1931,7 @@ function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
1854
1931
  return monitorTypePricingLines(tool);
1855
1932
  }
1856
1933
  const toolId = String(tool.toolId || requestedToolId);
1857
- const cost = _chunkUCKJQG25js.Capability.fromCatalogEntry(tool).describe().customerCost();
1934
+ const cost = _chunkVK6FYZLPjs.Capability.fromCatalogEntry(tool).describe().customerCost();
1858
1935
  const pricingModel = stringField2(cost, "pricingModel") || "unknown";
1859
1936
  const billing = stringField2(cost, "billingSourceLabel") || stringField2(cost, "billingSource") || stringField2(cost, "billingMode") || "unknown";
1860
1937
  const explicitUnit = stringField2(cost, "unit");
@@ -1866,7 +1943,7 @@ function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
1866
1943
  const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
1867
1944
  return [
1868
1945
  `${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
1869
- ..._chunkUCKJQG25js.observedMaxText.call(void 0, cost) ? [` ${_chunkUCKJQG25js.observedMaxText.call(void 0, cost)}`] : [],
1946
+ ..._chunkVK6FYZLPjs.observedMaxText.call(void 0, cost) ? [` ${_chunkVK6FYZLPjs.observedMaxText.call(void 0, cost)}`] : [],
1870
1947
  ...cost.observedReference || cost.estimatedRange ? [
1871
1948
  ...summary ? [` ${summary}`] : [],
1872
1949
  ...(_nullishCoalesce(cost.details, () => ( []))).map((detail) => ` ${detail}`)
@@ -1974,7 +2051,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
1974
2051
  ), () => ( listGetters.find(isRecord)));
1975
2052
  if (isRecord(firstList)) {
1976
2053
  const name = safeIdentifier(stringField2(firstList, "name") || "list");
1977
- if (_chunk5O4B6AUNjs.playToolListGetterMode.call(void 0, ) === "array") {
2054
+ if (_chunkKB4SDX5Sjs.playToolListGetterMode.call(void 0, ) === "array") {
1978
2055
  console.log(`const ${name}_rows = ${playResultExpression(firstList)};`);
1979
2056
  } else {
1980
2057
  console.log(`const ${name}_ds = ${playResultExpression(firstList)};`);
@@ -2050,7 +2127,7 @@ function printToolGettersOnly(tool, requestedToolId) {
2050
2127
  }
2051
2128
  }
2052
2129
  function printListGetterConsumption() {
2053
- if (_chunk5O4B6AUNjs.playToolListGetterMode.call(void 0, ) === "array") {
2130
+ if (_chunkKB4SDX5Sjs.playToolListGetterMode.call(void 0, ) === "array") {
2054
2131
  console.log(
2055
2132
  "Use the ordinary array directly, or pass it to ctx.dataset to persist row work. No provider pagination is fetched. Lazy or incomplete lists throw; use readList for an explicit dataset read. A missing getter is not an empty list."
2056
2133
  );
@@ -2061,7 +2138,7 @@ function printListGetterConsumption() {
2061
2138
  );
2062
2139
  }
2063
2140
  function listGetterHeading() {
2064
- return _chunk5O4B6AUNjs.playToolListGetterMode.call(void 0, ) === "array" ? "Lists (ordinary JavaScript arrays):" : "Lists (PlayDataset, not a JavaScript array):";
2141
+ return _chunkKB4SDX5Sjs.playToolListGetterMode.call(void 0, ) === "array" ? "Lists (ordinary JavaScript arrays):" : "Lists (PlayDataset, not a JavaScript array):";
2065
2142
  }
2066
2143
  function sampleValueForField(field) {
2067
2144
  const name = stringField2(field, "name").toLowerCase();
@@ -2144,7 +2221,7 @@ function toolMetadataJsonForDescribe(tool, requestedToolId) {
2144
2221
  } = tool;
2145
2222
  const outputSchemaRecord = recordField(tool, "outputSchema", "output_schema");
2146
2223
  return {
2147
- cost: _chunkUCKJQG25js.Capability.fromCatalogEntry(tool).describe().customerCost(),
2224
+ cost: _chunkVK6FYZLPjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
2148
2225
  ...publicTool,
2149
2226
  toolId,
2150
2227
  provider: tool.provider,
@@ -2202,7 +2279,7 @@ function usageGuidanceWithAccessDefaults(usageGuidance) {
2202
2279
  extractedLists: {
2203
2280
  ...recordField(existingAccess, "extractedLists"),
2204
2281
  expression: "toolExecutionResult.extractedLists.<name>.get()",
2205
- meaning: _chunk5O4B6AUNjs.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."
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."
2206
2283
  },
2207
2284
  rawToolResponse: {
2208
2285
  expression: "toolExecutionResult.toolResponse.rawV2",
@@ -2248,9 +2325,9 @@ function toolInputFieldsForDisplay(inputSchema) {
2248
2325
  );
2249
2326
  return fields.map((field) => {
2250
2327
  const jsonSchemaField = typeof field.name === "string" ? jsonSchemaFields.get(field.name) : void 0;
2251
- const minItems = typeof field.minItems === "number" ? field.minItems : _optionalChain([jsonSchemaField, 'optionalAccess', _17 => _17.minItems]);
2252
- const maxItems = typeof field.maxItems === "number" ? field.maxItems : _optionalChain([jsonSchemaField, 'optionalAccess', _18 => _18.maxItems]);
2253
- const items = isRecord(field.items) ? field.items : _optionalChain([jsonSchemaField, 'optionalAccess', _19 => _19.items]);
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]);
2254
2331
  return {
2255
2332
  ...field,
2256
2333
  ...isRecord(items) ? { items } : {},
@@ -2439,7 +2516,7 @@ function inputFieldJsonForDescribe(field) {
2439
2516
  function arrayItemBoundsSuffix(field) {
2440
2517
  const itemSchema = isRecord(field.items) ? field.items : null;
2441
2518
  const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : isRecord(itemSchema.properties) ? "object" : "unknown" : null;
2442
- const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _20 => _20.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
2519
+ const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _23 => _23.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
2443
2520
  const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
2444
2521
  const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
2445
2522
  const maxItems = typeof field.maxItems === "number" && Number.isFinite(field.maxItems) ? field.maxItems : null;
@@ -2568,7 +2645,7 @@ function extractToolExecutionWarningMessages(rawResponse) {
2568
2645
  ];
2569
2646
  const messages = [];
2570
2647
  for (const candidate of candidates) {
2571
- const warnings = _optionalChain([candidate, 'optionalAccess', _21 => _21.warnings]);
2648
+ const warnings = _optionalChain([candidate, 'optionalAccess', _24 => _24.warnings]);
2572
2649
  if (!Array.isArray(warnings)) continue;
2573
2650
  for (const warning of warnings) {
2574
2651
  if (typeof warning === "string" && warning.trim()) {
@@ -2604,10 +2681,10 @@ function apifySyncRecoveryNext(rawResponse) {
2604
2681
  };
2605
2682
  }
2606
2683
  function listExtractorPathsFromUsageGuidance(tool) {
2607
- const toolExecutionResult = _optionalChain([tool, 'access', _22 => _22.usageGuidance, 'optionalAccess', _23 => _23.toolExecutionResult]);
2608
- const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _24 => _24.extractedLists])) ? toolExecutionResult.extractedLists : isRecord(_optionalChain([toolExecutionResult, 'optionalAccess', _25 => _25.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
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) : [];
2609
2686
  return extractedLists.flatMap((entry) => {
2610
- const paths = _nullishCoalesce(_optionalChain([entry, 'access', _26 => _26.details, 'optionalAccess', _27 => _27.candidatePaths]), () => ( _optionalChain([entry, 'access', _28 => _28.details, 'optionalAccess', _29 => _29.rawToolOutputPaths])));
2687
+ const paths = _nullishCoalesce(_optionalChain([entry, 'access', _29 => _29.details, 'optionalAccess', _30 => _30.candidatePaths]), () => ( _optionalChain([entry, 'access', _31 => _31.details, 'optionalAccess', _32 => _32.rawToolOutputPaths])));
2611
2688
  if (!Array.isArray(paths)) return [];
2612
2689
  return paths.map(
2613
2690
  (path) => path.trim().replace(/^toolExecutionResult\.toolResponse\.raw\.?/, "").replace(/^toolExecutionResult\.toolOutput\.raw\.?/, "").replace(/^\./, "")
@@ -2758,7 +2835,7 @@ function parseExecuteOptions(toolId, options, output) {
2758
2835
  outputFormat = normalizeOutputFormat(options.outputFormat);
2759
2836
  }
2760
2837
  if (options.idempotencyKey !== void 0) {
2761
- _chunkCVLM3WMJjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
2838
+ _chunkE23BQ5SCjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
2762
2839
  }
2763
2840
  if (options.recoveryTimeoutMs !== void 0) {
2764
2841
  const parsed = Number(options.recoveryTimeoutMs);
@@ -2843,8 +2920,8 @@ export default definePlay(${JSON.stringify(playName)}, async (ctx) => {
2843
2920
  const rows = list.get();
2844
2921
  // ${sampleRows}
2845
2922
  // columns: ${columns}
2846
- // ${_chunk5O4B6AUNjs.playToolListGetterMode.call(void 0, ) === "array" ? "extractedLists.<name>.get() returns an ordinary array from this response." : "extractedLists.<name>.get() returns a dataset handle for row-shaped list outputs."}
2847
- // ${_chunk5O4B6AUNjs.playToolListGetterMode.call(void 0, ) === "array" ? "Use array methods directly; pass rows to ctx.dataset to persist row work." : "Pass it to ctx.dataset; use rows.peek/count/materialize only for deliberate bounded inspection."}
2923
+ // ${_chunkKB4SDX5Sjs.playToolListGetterMode.call(void 0, ) === "array" ? "extractedLists.<name>.get() returns an ordinary array from this response." : "extractedLists.<name>.get() returns a dataset handle for row-shaped list outputs."}
2924
+ // ${_chunkKB4SDX5Sjs.playToolListGetterMode.call(void 0, ) === "array" ? "Use array methods directly; pass rows to ctx.dataset to persist row work." : "Pass it to ctx.dataset; use rows.peek/count/materialize only for deliberate bounded inspection."}
2848
2925
  // .withColumn('email_waterfall', (row, rowCtx) => rowCtx.runPlay('name_domain_email', 'name-and-domain-to-email', { first_name: String(row.first_name ?? ''), last_name: String(row.last_name ?? ''), domain: String(row.domain ?? '') }, { description: 'Resolve email.' }))
2849
2926
  // .withColumn('phone_waterfall', (row, rowCtx) => rowCtx.runPlay('contact_phone', 'contact-to-phone', { first_name: String(row.first_name ?? ''), last_name: String(row.last_name ?? ''), email: String(row.email ?? '') }, { description: 'Resolve phone.' }))
2850
2927
  // ctx.dataset is idempotent for completed rows during same-run recovery. New runs follow each call's freshness.
@@ -3069,20 +3146,20 @@ function buildToolExecuteRowArtifactEnvelope(input) {
3069
3146
  }
3070
3147
  async function executeTool(toolId, options) {
3071
3148
  const output = toolExecuteJsonOption(options.json);
3072
- const wantsJson = _chunkRV6ALZIXjs.shouldEmitJson.call(void 0, output.requested) || (_nullishCoalesce(options.outputFormat, () => ( "auto"))).trim().toLowerCase() !== "csv";
3149
+ const wantsJson = _chunkKGNTKMRGjs.shouldEmitJson.call(void 0, output.requested) || (_nullishCoalesce(options.outputFormat, () => ( "auto"))).trim().toLowerCase() !== "csv";
3073
3150
  let parsed;
3074
3151
  try {
3075
3152
  parsed = parseExecuteOptions(toolId, options, output);
3076
3153
  } catch (error) {
3077
3154
  if (wantsJson) {
3078
- _chunkRV6ALZIXjs.printJsonError.call(void 0, error);
3155
+ _chunkKGNTKMRGjs.printJsonError.call(void 0, error);
3079
3156
  } else {
3080
3157
  console.error(error instanceof Error ? error.message : String(error));
3081
3158
  }
3082
3159
  return error instanceof _chunk7P5AA3SNjs.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
3083
3160
  }
3084
3161
  const cliInvocationId = _nullishCoalesce(_chunkQJBJZVG6js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkQJBJZVG6js.beginToolExecuteCommand.call(void 0, )));
3085
- const client = new (0, _chunkCVLM3WMJjs.DeeplineClient)();
3162
+ const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
3086
3163
  let metadata;
3087
3164
  try {
3088
3165
  metadata = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0,
@@ -3097,7 +3174,7 @@ async function executeTool(toolId, options) {
3097
3174
  );
3098
3175
  if (play) {
3099
3176
  if (wantsJson) {
3100
- _chunkRV6ALZIXjs.printJsonError.call(void 0,
3177
+ _chunkKGNTKMRGjs.printJsonError.call(void 0,
3101
3178
  new Error(playAliasToolErrorMessage(parsed.toolId, play))
3102
3179
  );
3103
3180
  } else {
@@ -3110,7 +3187,7 @@ async function executeTool(toolId, options) {
3110
3187
  }
3111
3188
  if (isPlayLikeTool(metadata)) {
3112
3189
  if (wantsJson) {
3113
- _chunkRV6ALZIXjs.printJsonError.call(void 0,
3190
+ _chunkKGNTKMRGjs.printJsonError.call(void 0,
3114
3191
  new Error(
3115
3192
  playLikeToolExecuteErrorMessage(
3116
3193
  parsed.toolId,
@@ -3126,6 +3203,18 @@ async function executeTool(toolId, options) {
3126
3203
  }
3127
3204
  return 2;
3128
3205
  }
3206
+ if (_optionalChain([metadata, 'access', _33 => _33.deprecation, 'optionalAccess', _34 => _34.message])) {
3207
+ console.error(
3208
+ `Warning: ${parsed.toolId} is deprecated. ${metadata.deprecation.message}`
3209
+ );
3210
+ }
3211
+ const requestWarning = firstMatchingToolRequestWarning(
3212
+ metadata.requestWarnings,
3213
+ parsed.params
3214
+ );
3215
+ if (requestWarning) {
3216
+ console.error(`Warning: ${requestWarning.message}`);
3217
+ }
3129
3218
  const responseIntent = parsed.outPath || parsed.outputFormat === "csv" || parsed.outputFormat === "csv_file" ? "row_artifact" : "raw";
3130
3219
  const recovery = ToolCallRecovery.open({
3131
3220
  toolId: parsed.toolId,
@@ -3142,11 +3231,11 @@ async function executeTool(toolId, options) {
3142
3231
  "execute request",
3143
3232
  () => client.executeTool(parsed.toolId, parsed.params, {
3144
3233
  ...parsed.timeoutMs !== void 0 ? { timeout: parsed.timeoutMs } : {},
3145
- ..._optionalChain([metadata, 'access', _30 => _30.executionMetadata, 'optionalAccess', _31 => _31.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
3234
+ ..._optionalChain([metadata, 'access', _35 => _35.executionMetadata, 'optionalAccess', _36 => _36.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
3146
3235
  responseIntent,
3147
3236
  ...idempotencyKey ? { idempotencyKey } : {},
3148
3237
  ...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
3149
- searchRef: _chunkUCKJQG25js.recentSearchRef.call(void 0, ),
3238
+ searchRef: _chunkVK6FYZLPjs.recentSearchRef.call(void 0, ),
3150
3239
  cliInvocationId,
3151
3240
  onResponseReceived: _chunkZMVJSS6Njs.recordApiResponse
3152
3241
  }).catch((error) => {
@@ -3167,10 +3256,10 @@ async function executeTool(toolId, options) {
3167
3256
  "result formatting",
3168
3257
  () => {
3169
3258
  const listExtractorPaths = listExtractorPathsFromUsageGuidance(metadata);
3170
- const listConversion2 = _chunk3VN4FTE3js.tryConvertToList.call(void 0, rawResponse, {
3259
+ const listConversion2 = _chunkRDXFGPJUjs.tryConvertToList.call(void 0, rawResponse, {
3171
3260
  listExtractorPaths
3172
3261
  });
3173
- const summary2 = _chunk3VN4FTE3js.extractSummaryFields.call(void 0, rawResponse);
3262
+ const summary2 = _chunkRDXFGPJUjs.extractSummaryFields.call(void 0, rawResponse);
3174
3263
  const baseEnvelope2 = buildToolExecuteBaseEnvelope({
3175
3264
  toolId: parsed.toolId,
3176
3265
  params: parsed.params,
@@ -3187,15 +3276,15 @@ async function executeTool(toolId, options) {
3187
3276
  const executeExitCode = toolExecuteExitCode(baseEnvelope);
3188
3277
  const delivered = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0, "output delivery", () => {
3189
3278
  if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
3190
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: true });
3279
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: true });
3191
3280
  return true;
3192
3281
  }
3193
3282
  if (parsed.outputFormat === "json_file") {
3194
- const jsonPath = _chunk3VN4FTE3js.writeJsonOutputFile.call(void 0,
3283
+ const jsonPath = _chunkRDXFGPJUjs.writeJsonOutputFile.call(void 0,
3195
3284
  rawResponse,
3196
3285
  `payload_${parsed.toolId}`
3197
3286
  );
3198
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
3287
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
3199
3288
  {
3200
3289
  ...baseEnvelope,
3201
3290
  local: {
@@ -3217,18 +3306,18 @@ async function executeTool(toolId, options) {
3217
3306
  `${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
3218
3307
  );
3219
3308
  if (wantsJson) {
3220
- _chunkRV6ALZIXjs.printJsonError.call(void 0, error);
3309
+ _chunkKGNTKMRGjs.printJsonError.call(void 0, error);
3221
3310
  } else {
3222
3311
  console.error(error.message);
3223
3312
  }
3224
3313
  return false;
3225
3314
  }
3226
3315
  if (parsed.outputFormat === "csv" || parsed.outputFormat === "csv_file") {
3227
- const jsonPath = _chunk3VN4FTE3js.writeJsonOutputFile.call(void 0,
3316
+ const jsonPath = _chunkRDXFGPJUjs.writeJsonOutputFile.call(void 0,
3228
3317
  rawResponse,
3229
3318
  `payload_${parsed.toolId}`
3230
3319
  );
3231
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
3320
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
3232
3321
  {
3233
3322
  ...baseEnvelope,
3234
3323
  local: {
@@ -3239,11 +3328,11 @@ async function executeTool(toolId, options) {
3239
3328
  );
3240
3329
  return true;
3241
3330
  }
3242
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: false });
3331
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: false });
3243
3332
  return true;
3244
3333
  }
3245
- const rowOutput = _chunk3VN4FTE3js.projectRowOutput.call(void 0, listConversion);
3246
- const csv = _chunk3VN4FTE3js.writeCsvOutputFile.call(void 0,
3334
+ const rowOutput = _chunkRDXFGPJUjs.projectRowOutput.call(void 0, listConversion);
3335
+ const csv = _chunkRDXFGPJUjs.writeCsvOutputFile.call(void 0,
3247
3336
  listConversion.rows,
3248
3337
  `${parsed.toolId}_output`,
3249
3338
  parsed.outPath ? { outPath: parsed.outPath } : void 0
@@ -3263,7 +3352,7 @@ async function executeTool(toolId, options) {
3263
3352
  seededScript
3264
3353
  });
3265
3354
  if (parsed.outputFormat === "csv_file") {
3266
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: true });
3355
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: true });
3267
3356
  return true;
3268
3357
  }
3269
3358
  if (parsed.outPath) {
@@ -3271,7 +3360,7 @@ async function executeTool(toolId, options) {
3271
3360
  toolId: parsed.toolId,
3272
3361
  idempotencyKey
3273
3362
  });
3274
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
3363
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
3275
3364
  json: wantsJson,
3276
3365
  text: `Wrote ${csv.rowCount} row(s) to ${csv.path}
3277
3366
  inspect: ${inspection.inspect}
@@ -3280,7 +3369,7 @@ inspect: ${inspection.inspect}
3280
3369
  return true;
3281
3370
  }
3282
3371
  if (parsed.noPreview) {
3283
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
3372
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
3284
3373
  {
3285
3374
  ...materializedEnvelope,
3286
3375
  local: {
@@ -3293,7 +3382,7 @@ inspect: ${inspection.inspect}
3293
3382
  );
3294
3383
  return true;
3295
3384
  }
3296
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
3385
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
3297
3386
  json: wantsJson && parsed.outputFormat !== "csv"
3298
3387
  });
3299
3388
  return true;