deepline 0.3.573 → 0.3.575

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 (178) hide show
  1. package/dist/bundling-sources/sdk/src/config.ts +19 -0
  2. package/dist/bundling-sources/sdk/src/play.ts +7 -4
  3. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  4. package/dist/bundling-sources/sdk/src/types.ts +8 -0
  5. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +0 -18
  6. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +8 -0
  7. package/dist/bundling-sources/shared_libs/play-runtime/builtin-pacing.ts +18 -0
  8. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +4 -1
  9. package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-receipt-gateway.ts +1 -1
  10. package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-fly-rollback-alignment.ts +0 -14
  11. package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +4 -0
  12. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +43 -7
  13. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +56 -20
  14. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +45 -7
  15. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +6 -66
  16. package/dist/cli/agents-BCLO3KQJ.js +996 -0
  17. package/dist/cli/agents-ULGDKUTM.mjs +996 -0
  18. package/dist/cli/{auth-XX3HLRQ2.mjs → auth-4WCL7A6W.mjs} +5 -5
  19. package/dist/cli/auth-DXUHEL5I.js +44 -0
  20. package/dist/cli/{billing-QASEPOBL.mjs → billing-7JQ6EUQU.mjs} +10 -10
  21. package/dist/cli/{billing-6TY2HMC6.js → billing-BF5LVXOM.js} +106 -106
  22. package/dist/cli/{chunk-NUH56LTU.mjs → chunk-2T7XOKVL.mjs} +5 -5
  23. package/dist/cli/{chunk-KQZBN7TB.js → chunk-2UM3I2MY.js} +1 -1
  24. package/dist/cli/{chunk-MQOJ7SP4.mjs → chunk-3PVKXUSJ.mjs} +9 -1
  25. package/dist/cli/{chunk-6JTJP3WO.mjs → chunk-56N3XAT6.mjs} +5 -5
  26. package/dist/cli/{chunk-T2QI52F2.mjs → chunk-5D7OJY4W.mjs} +1 -1
  27. package/dist/cli/{chunk-JAW75RAO.js → chunk-5H6254MJ.js} +27 -20
  28. package/dist/cli/{chunk-N3VZTISZ.js → chunk-5VSHQG5E.js} +8 -8
  29. package/dist/cli/{chunk-KART6FR6.js → chunk-636GD4IR.js} +2 -2
  30. package/dist/cli/{chunk-XWO4J34B.js → chunk-6IKLITVH.js} +6 -6
  31. package/dist/cli/{chunk-Z6KWSBOX.js → chunk-737Y7QGT.js} +41 -41
  32. package/dist/cli/{chunk-XVFRNNL2.js → chunk-7DLAJ6JJ.js} +53 -53
  33. package/dist/cli/{chunk-GWPXWKQR.js → chunk-AO56MZ7D.js} +15 -7
  34. package/dist/cli/{chunk-DIZI5YGW.js → chunk-AS5XGOZY.js} +2 -2
  35. package/dist/cli/{chunk-ESKNCTFI.mjs → chunk-BM536WWR.mjs} +1 -1
  36. package/dist/cli/{chunk-LPYUGPTF.mjs → chunk-BONMEBWZ.mjs} +4 -4
  37. package/dist/cli/{chunk-4LWBURSS.mjs → chunk-BQUAE6LQ.mjs} +1 -1
  38. package/dist/cli/{chunk-QDQOXHXQ.mjs → chunk-CVY4MBXH.mjs} +5 -5
  39. package/dist/cli/{chunk-N6KF6X3D.js → chunk-DMPGJCNZ.js} +177 -6
  40. package/dist/cli/{chunk-ENHQBPR5.mjs → chunk-DWUESXDD.mjs} +4 -3
  41. package/dist/cli/{chunk-5NEJOCOK.mjs → chunk-E4RYSSXX.mjs} +2 -2
  42. package/dist/cli/{chunk-IZK2BLBW.js → chunk-EV3OPDHF.js} +20 -20
  43. package/dist/cli/{chunk-YKHXWO7N.js → chunk-EZIXKNKM.js} +3 -3
  44. package/dist/cli/{chunk-64MOX3SN.mjs → chunk-FDCU3VAJ.mjs} +174 -3
  45. package/dist/cli/{chunk-X3BGF6UU.js → chunk-FXXERR52.js} +10 -10
  46. package/dist/cli/{chunk-BM4GE67C.mjs → chunk-FYKHAT2F.mjs} +81 -7
  47. package/dist/cli/{chunk-UNTBQY64.js → chunk-G2H6SQQY.js} +11 -11
  48. package/dist/cli/{chunk-WQEGXOUT.js → chunk-G4WPDCXA.js} +48 -48
  49. package/dist/cli/{chunk-OG3YWDYA.js → chunk-GB4IZ5TV.js} +13 -13
  50. package/dist/cli/{chunk-N5VL6BHF.mjs → chunk-GQZFZG6R.mjs} +2 -2
  51. package/dist/cli/{chunk-JCVAVHDP.mjs → chunk-H3CG72RZ.mjs} +21 -16
  52. package/dist/cli/{chunk-FXLVMWWA.js → chunk-H6JMRLAZ.js} +280 -275
  53. package/dist/cli/{chunk-UBTEDSIK.js → chunk-HEOM3FAC.js} +20 -20
  54. package/dist/cli/{chunk-CY3BUFMG.js → chunk-HO76C7AE.js} +2 -2
  55. package/dist/cli/{chunk-XAIXTB74.mjs → chunk-IAJ65IDZ.mjs} +4 -4
  56. package/dist/cli/{chunk-ENLJ67CZ.mjs → chunk-IBYMGR5Y.mjs} +1 -1
  57. package/dist/cli/{chunk-4K6UVILG.mjs → chunk-IOWLFWWG.mjs} +2 -2
  58. package/dist/cli/{chunk-NJTTRJ32.mjs → chunk-JGLCK2XF.mjs} +2 -2
  59. package/dist/cli/{chunk-DLWVJ66I.js → chunk-KNCNFL76.js} +4 -4
  60. package/dist/cli/{chunk-XLN4Z654.mjs → chunk-MN7JLH2T.mjs} +2 -2
  61. package/dist/cli/{chunk-IXCGWJJZ.mjs → chunk-MWLOBURN.mjs} +2 -2
  62. package/dist/cli/{chunk-6ASDTHEN.js → chunk-MXK4M7HP.js} +21 -17
  63. package/dist/cli/{chunk-C52RRBYB.mjs → chunk-NF722E6C.mjs} +1 -1
  64. package/dist/cli/{chunk-TNCJ2J76.js → chunk-PQYDO72W.js} +26 -26
  65. package/dist/cli/{chunk-PW3PADXI.mjs → chunk-QEDRUURT.mjs} +1 -1
  66. package/dist/cli/{chunk-QFDT35HF.mjs → chunk-QKP3WYSZ.mjs} +3 -3
  67. package/dist/cli/{chunk-M2UJWUWX.mjs → chunk-RHRRY2BX.mjs} +3 -3
  68. package/dist/cli/{chunk-HUJMFETO.mjs → chunk-RW3URFZK.mjs} +7 -3
  69. package/dist/cli/{chunk-TBLP7HDL.js → chunk-SKHUWQZE.js} +10 -9
  70. package/dist/cli/{chunk-WSXRJ2RZ.mjs → chunk-SYQTBHRX.mjs} +3 -3
  71. package/dist/cli/{chunk-ANSHNREL.mjs → chunk-TMFR2B45.mjs} +3 -3
  72. package/dist/cli/{chunk-5MCC4D25.mjs → chunk-TTBZ7QXX.mjs} +1 -1
  73. package/dist/cli/{chunk-ROSPYLDN.mjs → chunk-UQZP7XBQ.mjs} +17 -10
  74. package/dist/cli/{chunk-TJSKDOXN.js → chunk-V5XLENWK.js} +7 -7
  75. package/dist/cli/{chunk-DSE45YP4.mjs → chunk-X47J55ZJ.mjs} +2 -2
  76. package/dist/cli/{chunk-FUVVTHXE.js → chunk-XFV353R2.js} +23 -23
  77. package/dist/cli/{chunk-OPD6XUIG.js → chunk-YNAXKA23.js} +5 -5
  78. package/dist/cli/{chunk-LHPYCJNL.js → chunk-ZO65VJRJ.js} +87 -13
  79. package/dist/cli/{chunk-2USXCXPZ.js → chunk-ZQXJYO5P.js} +5 -5
  80. package/dist/cli/{chunk-UZLTBBAG.js → chunk-ZS6DT4LD.js} +15 -15
  81. package/dist/cli/{chunk-KQLIG4YR.js → chunk-ZYSJND73.js} +9 -9
  82. package/dist/cli/command-docs.js +3 -3
  83. package/dist/cli/command-docs.mjs +2 -2
  84. package/dist/cli/{concurrent-runs-help-IILHMHBX.mjs → concurrent-runs-help-HITK6EOO.mjs} +7 -7
  85. package/dist/cli/concurrent-runs-help-JLWY54WL.js +22 -0
  86. package/dist/cli/{csv-OSJQVDAS.js → csv-RS7XHQ4P.js} +13 -13
  87. package/dist/cli/{csv-VGYW2PQZ.mjs → csv-V2T23MXT.mjs} +4 -4
  88. package/dist/cli/{db-3IQYT3WD.mjs → db-OQ4RNTGE.mjs} +6 -6
  89. package/dist/cli/{db-2IMS6K2F.js → db-WFIVRPKY.js} +27 -27
  90. package/dist/cli/describe-33PBWO5O.js +50 -0
  91. package/dist/cli/{describe-IGJ4CHUC.mjs → describe-AXV2EEX3.mjs} +21 -21
  92. package/dist/cli/describe-core.d.mts +13 -2
  93. package/dist/cli/describe-core.d.ts +13 -2
  94. package/dist/cli/describe-core.js +4 -4
  95. package/dist/cli/describe-core.mjs +3 -3
  96. package/dist/cli/{executions-VOJN4NPF.js → executions-5H2RIWZ3.js} +8 -8
  97. package/dist/cli/{executions-6F3PLVCR.mjs → executions-THP5ZDBQ.mjs} +6 -6
  98. package/dist/cli/{feedback-BP5G27DT.mjs → feedback-2EJPILGE.mjs} +6 -6
  99. package/dist/cli/{feedback-5N7GKSMC.js → feedback-UOI6UEGA.js} +14 -14
  100. package/dist/cli/git-2OPYEPYW.js +26 -0
  101. package/dist/cli/{git-FHNCP7QA.mjs → git-DI3LJIAT.mjs} +5 -5
  102. package/dist/cli/index.js +152 -148
  103. package/dist/cli/index.mjs +51 -47
  104. package/dist/cli/{integrations-KKCEEWDU.mjs → integrations-DJYS5VRK.mjs} +7 -7
  105. package/dist/cli/{integrations-JZV55BZT.js → integrations-TYN2BSQ6.js} +29 -29
  106. package/dist/cli/{legacy-noops-OVOHF47E.js → legacy-noops-GXQHNLGJ.js} +9 -9
  107. package/dist/cli/{legacy-noops-YOPWDLRG.mjs → legacy-noops-Z457BB6O.mjs} +6 -6
  108. package/dist/cli/{mcp-SJAXFYTI.mjs → mcp-NAW3GFNN.mjs} +4 -4
  109. package/dist/cli/{mcp-F2XGBA6W.js → mcp-WMBOOTQL.js} +24 -24
  110. package/dist/cli/{monitors-PFH3FQLD.mjs → monitors-A7NYAXSJ.mjs} +7 -7
  111. package/dist/cli/{monitors-RQRNQRYB.js → monitors-OOQVE7XR.js} +100 -100
  112. package/dist/cli/{org-PZC6SUZD.mjs → org-7YCDUSZE.mjs} +6 -6
  113. package/dist/cli/{org-WPOEKMTG.js → org-D2AMIVBS.js} +121 -121
  114. package/dist/cli/{outcomes-EXOCNHOC.js → outcomes-2FKZDJSQ.js} +17 -15
  115. package/dist/cli/{outcomes-ZS7XD3KQ.mjs → outcomes-TNTKCUEO.mjs} +9 -7
  116. package/dist/cli/{play-UKSRFVIU.mjs → play-L6CVHSN4.mjs} +88 -33
  117. package/dist/cli/{play-JS2TEEE7.js → play-NWKHCHVZ.js} +393 -338
  118. package/dist/cli/{providers-U6IODPMJ.mjs → providers-22LO747B.mjs} +6 -6
  119. package/dist/cli/{providers-3U4MWBLU.js → providers-PZGOI5CN.js} +9 -9
  120. package/dist/cli/{quickstart-G5QN5CUE.mjs → quickstart-3ZRVKGMH.mjs} +4 -4
  121. package/dist/cli/{quickstart-SHBAEDX6.js → quickstart-LLWOC2GR.js} +6 -6
  122. package/dist/cli/{run-3ZOJ6V7C.mjs → run-D46W2GUA.mjs} +48 -27
  123. package/dist/cli/{run-SZRKNLUT.js → run-SNF23STR.js} +70 -49
  124. package/dist/cli/search-H57MZPLF.js +32 -0
  125. package/dist/cli/{search-2VX5WNMJ.mjs → search-XWVCICIX.mjs} +7 -7
  126. package/dist/cli/{search-output-WGDHYYHX.js → search-output-36GHD67U.js} +12 -9
  127. package/dist/cli/{search-output-U5N2O6IA.mjs → search-output-YM5QXFQQ.mjs} +9 -6
  128. package/dist/cli/{secrets-SQKP5ILO.mjs → secrets-7PTZEFRC.mjs} +6 -6
  129. package/dist/cli/{secrets-UITJOGVQ.js → secrets-UXCIHG5I.js} +15 -15
  130. package/dist/cli/{sessions-LSXO2OKX.mjs → sessions-DTXJKRP4.mjs} +6 -6
  131. package/dist/cli/sessions-JJZMQSH4.js +23 -0
  132. package/dist/cli/{settings-YGYRDPOK.mjs → settings-74B6UOS4.mjs} +12 -12
  133. package/dist/cli/{settings-VZI675JG.js → settings-EYSDZE37.js} +85 -85
  134. package/dist/cli/{setup-GXGXRWKN.mjs → setup-2QRZ36CH.mjs} +9 -9
  135. package/dist/cli/{setup-OJ33NOWK.js → setup-E7PVXBPL.js} +49 -49
  136. package/dist/cli/{skills-3VDYIFAX.mjs → skills-2WZ7N3UW.mjs} +7 -7
  137. package/dist/cli/skills-RIF2DCZI.js +37 -0
  138. package/dist/cli/tools-7VRQ4GSI.js +57 -0
  139. package/dist/cli/{tools-3TKEGDBP.mjs → tools-YK5SCUZD.mjs} +19 -19
  140. package/dist/cli/{update-K6A4QXTC.mjs → update-563YQK53.mjs} +9 -9
  141. package/dist/cli/update-CMZAIAES.js +37 -0
  142. package/dist/cli/{views-2PPIVWDK.mjs → views-ISNCRZUP.mjs} +6 -6
  143. package/dist/cli/{views-SGGO77XS.js → views-OLPS6TPG.js} +21 -21
  144. package/dist/cli/{workflow-JTG6QEFO.mjs → workflow-B3ZKU3OR.mjs} +7 -7
  145. package/dist/cli/{workflow-YSFOOTPB.js → workflow-CUSCTYMW.js} +17 -17
  146. package/dist/{client-DCnExziW.d.ts → client-BrdMPFCM.d.ts} +1 -1
  147. package/dist/{client-ClJlqkKt.d.mts → client-CF-bsrtI.d.mts} +1 -1
  148. package/dist/{client-core-DAOPQnGD.d.mts → client-core-DM1ZedOG.d.mts} +8 -0
  149. package/dist/{client-core-BKq5ZNAl.d.ts → client-core-rMoUWSYM.d.ts} +8 -0
  150. package/dist/index.d.mts +3 -3
  151. package/dist/index.d.ts +3 -3
  152. package/dist/index.js +9 -9
  153. package/dist/index.mjs +6 -6
  154. package/dist/install-integrity.json +128 -126
  155. package/dist/plays/play-description.d.mts +1 -1
  156. package/dist/plays/play-description.d.ts +1 -1
  157. package/dist/plays/run-request.d.mts +1 -1
  158. package/dist/plays/run-request.d.ts +1 -1
  159. package/dist/release.d.mts +1 -1
  160. package/dist/release.d.ts +1 -1
  161. package/dist/release.js +2 -2
  162. package/dist/release.mjs +1 -1
  163. package/dist/server.d.mts +2 -2
  164. package/dist/server.d.ts +2 -2
  165. package/dist/server.js +5 -5
  166. package/dist/server.mjs +3 -3
  167. package/package.json +1 -1
  168. package/dist/cli/auth-DGR7ZQJL.js +0 -44
  169. package/dist/cli/concurrent-runs-help-HEIDXAM2.js +0 -22
  170. package/dist/cli/describe-LBU4I6SU.js +0 -50
  171. package/dist/cli/git-JUSPUUOH.js +0 -26
  172. package/dist/cli/search-TAFMLK4K.js +0 -32
  173. package/dist/cli/sessions-RA6FBIHJ.js +0 -23
  174. package/dist/cli/skills-J5QVWKLQ.js +0 -37
  175. package/dist/cli/tools-3PQXQGXL.js +0 -57
  176. package/dist/cli/update-CA3DZ75E.js +0 -37
  177. /package/dist/cli/{chunk-2RIKOPIM.mjs → chunk-HECXJBED.mjs} +0 -0
  178. /package/dist/cli/{chunk-H4ALLC2X.js → chunk-TJCENACZ.js} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  formatModelDescription,
4
4
  publicToolSchemas,
5
5
  toolMetadataJsonForDescribe
6
- } from "./chunk-ENHQBPR5.mjs";
6
+ } from "./chunk-DWUESXDD.mjs";
7
7
  import {
8
8
  buildPlayDashboardUrl,
9
9
  byokLines,
@@ -13,7 +13,7 @@ import {
13
13
  examples,
14
14
  schemaLines,
15
15
  topLevelField
16
- } from "./chunk-BM4GE67C.mjs";
16
+ } from "./chunk-FYKHAT2F.mjs";
17
17
  import {
18
18
  DeeplineError
19
19
  } from "./chunk-Z3A2S3QM.mjs";
@@ -208,7 +208,11 @@ async function describeName(name, options, lookups) {
208
208
  const note = shadows ? `Showing your org play "${name}". It has the same name as a Deepline ${shadows.kind.replace("_", " ")}; see that one with: ${shadows.describeCommand}` : null;
209
209
  const verbose = options.verbose === true;
210
210
  const isPlay = described.kind === "prebuilt_play" || described.kind === "custom_play";
211
- const dashboardUrl = isPlay ? buildPlayDashboardUrl(lookups.baseUrl, described.id) : null;
211
+ const dashboardUrl = isPlay ? buildPlayDashboardUrl(
212
+ lookups.baseUrl,
213
+ described.id,
214
+ lookups.dashboardOrgId
215
+ ) : null;
212
216
  if (options.webUrl) {
213
217
  if (!dashboardUrl) {
214
218
  return {
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkLHPYCJNLjs = require('./chunk-LHPYCJNL.js');
5
+ var _chunkZO65VJRJjs = require('./chunk-ZO65VJRJ.js');
6
6
 
7
7
 
8
8
 
@@ -314,7 +314,7 @@ function extractorValueType(name) {
314
314
  }
315
315
  const named = NAMED_VALUE_SHAPES[definition.valueKind];
316
316
  if (!named) return { type: "string" };
317
- const { type, fields } = _chunkLHPYCJNLjs.schemaField.call(void 0, name, named.schema, true);
317
+ const { type, fields } = _chunkZO65VJRJjs.schemaField.call(void 0, name, named.schema, true);
318
318
  return { type, ...fields ? { fields } : {}, shape: named.shape };
319
319
  }
320
320
  function jsonSchemaOf(wrapper) {
@@ -374,7 +374,7 @@ function describedTool(tool, requestedToolId) {
374
374
  // The server's public monitor pricing sends `display`.
375
375
  cost: stringField(pricing, "display", "displayText") || void 0,
376
376
  guidance: [],
377
- inputs: _chunkLHPYCJNLjs.schemaFields.call(void 0,
377
+ inputs: _chunkZO65VJRJjs.schemaFields.call(void 0,
378
378
  recordField(tool, "payload_schema", "payloadSchema")
379
379
  ),
380
380
  outputs: [],
@@ -411,7 +411,7 @@ function describedTool(tool, requestedToolId) {
411
411
  (path) => path.replace(/^toolResponse\.raw\./, "")
412
412
  );
413
413
  const node = roots.flatMap((root) => paths.map((path) => schemaNodeAt(root, path))).find(isRecord);
414
- const { fields, ...typed } = _chunkLHPYCJNLjs.schemaField.call(void 0, name, node, true);
414
+ const { fields, ...typed } = _chunkZO65VJRJjs.schemaField.call(void 0, name, node, true);
415
415
  const valueType = stringField(_nullishCoalesce(details.get(name), () => ( {})), "valueType");
416
416
  const deepline = kind === "extractedValues" ? extractorValueType(name) : void 0;
417
417
  const known = typed.type !== "unknown" ? void 0 : kind === "extractedLists" ? { type: "object[]" } : deepline;
@@ -468,8 +468,9 @@ function describedTool(tool, requestedToolId) {
468
468
  description,
469
469
  cost: [
470
470
  stringField(cost, "displayText"),
471
- // "Free (free)" says the same thing twice.
472
- billing.toLowerCase() === stringField(cost, "displayText").toLowerCase() ? "" : billing && `(${billing})`,
471
+ // "Free (free)" says the same thing twice, as does "Uses your provided
472
+ // key. No Deepline charge. (your key)".
473
+ stringField(cost, "billingSource") === "own_provider_credentials" || billing.toLowerCase() === stringField(cost, "displayText").toLowerCase() || billing === "your key" ? "" : billing && `(${billing})`,
473
474
  observedMaxText(cost) && `\u2014 ${observedMaxText(cost)}`
474
475
  ].filter(Boolean).join(" ") || void 0,
475
476
  guidance: [
@@ -480,7 +481,7 @@ function describedTool(tool, requestedToolId) {
480
481
  ],
481
482
  rateLimit: withPlanRateLimit(
482
483
  recordField(recordField(tool, "pricing"), "benefit").requestsPerMinute,
483
- _chunkLHPYCJNLjs.rateLimitSummary.call(void 0,
484
+ _chunkZO65VJRJjs.rateLimitSummary.call(void 0,
484
485
  recordField(contract, "executionMetadata").configuredRateLimits
485
486
  )
486
487
  ),
@@ -490,9 +491,9 @@ function describedTool(tool, requestedToolId) {
490
491
  ...connectCommand && !_optionalChain([tool, 'access', _5 => _5.auth, 'optionalAccess', _6 => _6.connectionRequired]) ? { connectCommand } : {},
491
492
  ...tool.auth ? { auth: tool.auth } : {},
492
493
  ...tool.toolUsage ? { toolUsage: tool.toolUsage } : {},
493
- inputs: _chunkLHPYCJNLjs.schemaFields.call(void 0, inputSchema),
494
+ inputs: _chunkZO65VJRJjs.schemaFields.call(void 0, inputSchema),
494
495
  outputs: [...lists, ...values].map(({ field }) => field),
495
- rawResponse: _chunkLHPYCJNLjs.schemaFields.call(void 0, outputSchema),
496
+ rawResponse: _chunkZO65VJRJjs.schemaFields.call(void 0, outputSchema),
496
497
  runner: playReference ? { via: "play", reference: playReference } : { via: "tool", toolId: String(contract.toolId), inputSchema }
497
498
  };
498
499
  }
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  rejectRestrictedFeedback
3
- } from "./chunk-T2QI52F2.mjs";
3
+ } from "./chunk-5D7OJY4W.mjs";
4
4
  import {
5
5
  getAuthedHttpClient,
6
6
  printCommandEnvelope
7
- } from "./chunk-DSE45YP4.mjs";
7
+ } from "./chunk-X47J55ZJ.mjs";
8
8
  import {
9
9
  agentSessionIdFromEnvironment,
10
10
  claudeProjectsRoots,
11
11
  coworkTranscriptFromEnvironment
12
- } from "./chunk-ENLJ67CZ.mjs";
12
+ } from "./chunk-IBYMGR5Y.mjs";
13
13
 
14
14
  // src/cli/commands/sessions.ts
15
15
  import {
@@ -2,7 +2,7 @@ import {
2
2
  argsWantJson,
3
3
  openInBrowser,
4
4
  printCommandEnvelope
5
- } from "./chunk-DSE45YP4.mjs";
5
+ } from "./chunk-X47J55ZJ.mjs";
6
6
  import {
7
7
  ACTIVE_ORG_ID_ENV,
8
8
  ACTIVE_ORG_NAME_ENV,
@@ -22,14 +22,14 @@ import {
22
22
  saveHostEnvValues,
23
23
  saveProjectDeeplineEnvValues,
24
24
  storedHostApiKey
25
- } from "./chunk-MQOJ7SP4.mjs";
25
+ } from "./chunk-3PVKXUSJ.mjs";
26
26
  import {
27
27
  SDK_API_CONTRACT,
28
28
  SDK_VERSION,
29
29
  connectionFailureMessage,
30
30
  detectAgentRuntime,
31
31
  networkCauseCode
32
- } from "./chunk-ENLJ67CZ.mjs";
32
+ } from "./chunk-IBYMGR5Y.mjs";
33
33
  import {
34
34
  DeeplineError
35
35
  } from "./chunk-Z3A2S3QM.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isJsonOutputMode
3
- } from "./chunk-DSE45YP4.mjs";
3
+ } from "./chunk-X47J55ZJ.mjs";
4
4
 
5
5
  // src/cli/progress.ts
6
6
  import { Worker } from "worker_threads";
@@ -1,29 +1,30 @@
1
1
  import {
2
2
  seedToolListScript
3
- } from "./chunk-JCVAVHDP.mjs";
3
+ } from "./chunk-H3CG72RZ.mjs";
4
4
  import {
5
5
  addDescribeOptions
6
- } from "./chunk-5NEJOCOK.mjs";
6
+ } from "./chunk-E4RYSSXX.mjs";
7
7
  import {
8
8
  describeLookupsFor,
9
9
  describeName,
10
10
  findNamed
11
- } from "./chunk-HUJMFETO.mjs";
11
+ } from "./chunk-RW3URFZK.mjs";
12
12
  import {
13
13
  SCHEMA_LINE_LIMIT
14
- } from "./chunk-BM4GE67C.mjs";
14
+ } from "./chunk-FYKHAT2F.mjs";
15
15
  import {
16
16
  DeeplineClient
17
- } from "./chunk-4K6UVILG.mjs";
17
+ } from "./chunk-IOWLFWWG.mjs";
18
18
  import {
19
19
  failureReportHeaders,
20
20
  isFailureReportingDisabled,
21
21
  printCommandEnvelope
22
- } from "./chunk-DSE45YP4.mjs";
22
+ } from "./chunk-X47J55ZJ.mjs";
23
23
  import {
24
24
  autoDetectBaseUrl,
25
- resolveApiKeyForBaseUrl
26
- } from "./chunk-MQOJ7SP4.mjs";
25
+ resolveApiKeyForBaseUrl,
26
+ resolveCliDashboardOrgId
27
+ } from "./chunk-3PVKXUSJ.mjs";
27
28
 
28
29
  // src/cli/commands/describe.ts
29
30
  import { writeFileSync } from "fs";
@@ -52,11 +53,17 @@ function nothingNamed(name) {
52
53
  return `Nothing named "${name}". Search for it: deepline search ${JSON.stringify(name.replace(/[-_./]+/g, " "))}`;
53
54
  }
54
55
  function findNamed2(name, options) {
55
- return findNamed(name, options, describeLookupsFor(new DeeplineClient()));
56
+ return findNamed(name, options, cliDescribeLookups(new DeeplineClient()));
57
+ }
58
+ function cliDescribeLookups(client) {
59
+ return {
60
+ ...describeLookupsFor(client),
61
+ dashboardOrgId: resolveCliDashboardOrgId(client.baseUrl)
62
+ };
56
63
  }
57
64
  async function describeAnything(name, options, onMissing) {
58
65
  const client = new DeeplineClient();
59
- const lookups = describeLookupsFor(client);
66
+ const lookups = cliDescribeLookups(client);
60
67
  const outcome = await describeName(name, options, {
61
68
  ...lookups,
62
69
  // `tools describe` has already fetched the tool for its compatibility check.
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkXVFRNNL2js = require('./chunk-XVFRNNL2.js');
3
+ var _chunk7DLAJ6JJjs = require('./chunk-7DLAJ6JJ.js');
4
4
 
5
5
 
6
- var _chunkH4ALLC2Xjs = require('./chunk-H4ALLC2X.js');
6
+ var _chunkTJCENACZjs = require('./chunk-TJCENACZ.js');
7
7
 
8
8
 
9
9
 
10
- var _chunkGWPXWKQRjs = require('./chunk-GWPXWKQR.js');
10
+ var _chunkAO56MZ7Djs = require('./chunk-AO56MZ7D.js');
11
11
 
12
12
  // src/cli/concurrent-runs-help.ts
13
13
  var CONCURRENT_RUNS_HELP_COMMANDS = /* @__PURE__ */ new Set([
@@ -24,11 +24,11 @@ function concurrentRunsLine(payload) {
24
24
  return plans ? `${here} Plan limits: ${plans}.` : here;
25
25
  }
26
26
  async function concurrentRunsHelpStatus(timeoutMs = 2e3) {
27
- const baseUrl = _chunkGWPXWKQRjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
28
- const apiKey = _chunkGWPXWKQRjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
27
+ const baseUrl = _chunkAO56MZ7Djs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
28
+ const apiKey = _chunkAO56MZ7Djs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
29
29
  if (!apiKey) return "";
30
30
  try {
31
- const { status, data } = await _chunkXVFRNNL2js.httpJson.call(void 0,
31
+ const { status, data } = await _chunk7DLAJ6JJjs.httpJson.call(void 0,
32
32
  "GET",
33
33
  `${baseUrl}/api/v2/billing/entitlements`,
34
34
  apiKey,
@@ -40,7 +40,7 @@ async function concurrentRunsHelpStatus(timeoutMs = 2e3) {
40
40
  return line ? `
41
41
  Your org:
42
42
  ${line}
43
- ${_chunkH4ALLC2Xjs.PRICING_PAGE_NOTE}
43
+ ${_chunkTJCENACZjs.PRICING_PAGE_NOTE}
44
44
  ` : "";
45
45
  } catch (e) {
46
46
  return "";
@@ -4,14 +4,14 @@ import {
4
4
  resolveApiKeyForBaseUrl,
5
5
  resolveCliCommandContext,
6
6
  resolveConfig
7
- } from "./chunk-MQOJ7SP4.mjs";
7
+ } from "./chunk-3PVKXUSJ.mjs";
8
8
  import {
9
9
  SDK_VERSION,
10
10
  agentSessionIdFromEnvironment,
11
11
  deploymentProtectionHeaders,
12
12
  detectAgentRuntime,
13
13
  readToolFailureHint
14
- } from "./chunk-ENLJ67CZ.mjs";
14
+ } from "./chunk-IBYMGR5Y.mjs";
15
15
  import {
16
16
  DeeplineError,
17
17
  normalizeToolExecutionFailure,
@@ -4,22 +4,22 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkUBTEDSIKjs = require('./chunk-UBTEDSIK.js');
7
+ var _chunkHEOM3FACjs = require('./chunk-HEOM3FAC.js');
8
8
 
9
9
 
10
10
 
11
11
 
12
- var _chunkWQEGXOUTjs = require('./chunk-WQEGXOUT.js');
12
+ var _chunkG4WPDCXAjs = require('./chunk-G4WPDCXA.js');
13
13
 
14
14
 
15
15
 
16
- var _chunkIZK2BLBWjs = require('./chunk-IZK2BLBW.js');
16
+ var _chunkEV3OPDHFjs = require('./chunk-EV3OPDHF.js');
17
17
 
18
18
 
19
- var _chunkGWPXWKQRjs = require('./chunk-GWPXWKQR.js');
19
+ var _chunkAO56MZ7Djs = require('./chunk-AO56MZ7D.js');
20
20
 
21
21
 
22
- var _chunkDLWVJ66Ijs = require('./chunk-DLWVJ66I.js');
22
+ var _chunkKNCNFL76js = require('./chunk-KNCNFL76.js');
23
23
 
24
24
  // src/cli/compatibility-catalog.ts
25
25
  var readers = /* @__PURE__ */ new WeakMap();
@@ -46,7 +46,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
46
46
  async function reportAutoUpdateEvent(input) {
47
47
  let apiKey = "";
48
48
  try {
49
- apiKey = _chunkGWPXWKQRjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
49
+ apiKey = _chunkAO56MZ7Djs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
50
50
  } catch (e2) {
51
51
  return;
52
52
  }
@@ -62,15 +62,15 @@ async function reportAutoUpdateEvent(input) {
62
62
  headers: {
63
63
  Authorization: `Bearer ${apiKey}`,
64
64
  "Content-Type": "application/json",
65
- "User-Agent": `deepline-ts-sdk/${_chunkDLWVJ66Ijs.SDK_VERSION}`,
65
+ "User-Agent": `deepline-ts-sdk/${_chunkKNCNFL76js.SDK_VERSION}`,
66
66
  "X-Deepline-Client-Family": "sdk",
67
67
  "X-Deepline-CLI-Family": "sdk",
68
- "X-Deepline-CLI-Version": _chunkDLWVJ66Ijs.SDK_VERSION,
69
- "X-Deepline-SDK-Version": _chunkDLWVJ66Ijs.SDK_VERSION
68
+ "X-Deepline-CLI-Version": _chunkKNCNFL76js.SDK_VERSION,
69
+ "X-Deepline-SDK-Version": _chunkKNCNFL76js.SDK_VERSION
70
70
  },
71
71
  body: JSON.stringify({
72
72
  event: input.event,
73
- current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkDLWVJ66Ijs.SDK_VERSION,
73
+ current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkKNCNFL76js.SDK_VERSION,
74
74
  target_version: input.response.latest,
75
75
  reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
76
76
  command: _nullishCoalesce(input.response.command, () => ( null)),
@@ -89,19 +89,19 @@ function envTruthy(name) {
89
89
  return value === "1" || value === "true" || value === "yes";
90
90
  }
91
91
  function shouldSkipSelfUpdate(policy) {
92
- return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkUBTEDSIKjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkWQEGXOUTjs.isCiEnvironment.call(void 0, );
92
+ return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkHEOM3FACjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkG4WPDCXAjs.isCiEnvironment.call(void 0, );
93
93
  }
94
94
  function isDowngradeAutoUpdateResponse(response) {
95
95
  const target = _optionalChain([response, 'optionalAccess', _17 => _17.latest, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]);
96
- const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunkDLWVJ66Ijs.SDK_VERSION;
96
+ const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunkKNCNFL76js.SDK_VERSION;
97
97
  if (!target) return false;
98
- return _chunkUBTEDSIKjs.compareUpdateVersions.call(void 0, target, current) < 0;
98
+ return _chunkHEOM3FACjs.compareUpdateVersions.call(void 0, target, current) < 0;
99
99
  }
100
100
  function relaunchCurrentCommand(plan, runtime = {}) {
101
101
  return new Promise((resolve) => {
102
102
  const argv = _nullishCoalesce(runtime.argv, () => ( process.argv));
103
103
  const platform = _nullishCoalesce(runtime.platform, () => ( process.platform));
104
- const launch = plan.kind === "python-sidecar" ? _chunkWQEGXOUTjs.resolveShellSpawn.call(void 0, plan.sidecarPath, argv.slice(2), platform) : {
104
+ const launch = plan.kind === "python-sidecar" ? _chunkG4WPDCXAjs.resolveShellSpawn.call(void 0, plan.sidecarPath, argv.slice(2), platform) : {
105
105
  command: _nullishCoalesce(runtime.execPath, () => ( process.execPath)),
106
106
  args: argv.slice(1),
107
107
  shell: false
@@ -148,7 +148,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
148
148
  }
149
149
  if (isDowngradeAutoUpdateResponse(response)) {
150
150
  const target = response.latest;
151
- const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunkDLWVJ66Ijs.SDK_VERSION;
151
+ const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunkKNCNFL76js.SDK_VERSION;
152
152
  process.stderr.write(
153
153
  `Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
154
154
  `
@@ -156,21 +156,21 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
156
156
  return false;
157
157
  }
158
158
  const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
159
- const plan = _chunkUBTEDSIKjs.resolveUpdatePlan.call(void 0, {
159
+ const plan = _chunkHEOM3FACjs.resolveUpdatePlan.call(void 0, {
160
160
  packageSpec,
161
161
  requireVerifiedNpmOwnership: true,
162
162
  npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
163
163
  });
164
- if (!_chunkUBTEDSIKjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
164
+ if (!_chunkHEOM3FACjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
165
165
  return false;
166
166
  }
167
167
  if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
168
168
  deferredAutoUpdate = async () => {
169
169
  await applyAutoUpdate(response, baseUrl, plan, "next_command");
170
170
  };
171
- if (_chunkIZK2BLBWjs.isJsonOutputMode.call(void 0, )) {
171
+ if (_chunkEV3OPDHFjs.isJsonOutputMode.call(void 0, )) {
172
172
  const target = _optionalChain([response, 'access', _29 => _29.latest, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]);
173
- _chunkIZK2BLBWjs.addJsonNotice.call(void 0, {
173
+ _chunkEV3OPDHFjs.addJsonNotice.call(void 0, {
174
174
  code: "sdk_update_queued",
175
175
  message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
176
176
  });
@@ -183,7 +183,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
183
183
  return true;
184
184
  }
185
185
  async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
186
- if (!_chunkUBTEDSIKjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
186
+ if (!_chunkHEOM3FACjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
187
187
  const autoUpdate = response.auto_update;
188
188
  const label = _optionalChain([autoUpdate, 'optionalAccess', _32 => _32.reason]) === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : _optionalChain([autoUpdate, 'optionalAccess', _33 => _33.reason]) === "deprecated" ? "is deprecated and will update automatically" : _optionalChain([autoUpdate, 'optionalAccess', _34 => _34.required]) ? "requires an update" : "has an update available and will update automatically";
189
189
  process.stderr.write(
@@ -196,7 +196,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
196
196
  event: "started",
197
197
  installKind: plan.kind
198
198
  });
199
- const updateResult = await _chunkUBTEDSIKjs.runAutomaticUpdatePlan.call(void 0, plan);
199
+ const updateResult = await _chunkHEOM3FACjs.runAutomaticUpdatePlan.call(void 0, plan);
200
200
  if (updateResult.status === "skipped_previous_failure") {
201
201
  void reportAutoUpdateEvent({
202
202
  baseUrl,
@@ -234,7 +234,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
234
234
  exitCode: 0
235
235
  });
236
236
  try {
237
- await _chunkWQEGXOUTjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
237
+ await _chunkG4WPDCXAjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
238
238
  mode: "detached",
239
239
  update: _optionalChain([response, 'access', _36 => _36.skills, 'optionalAccess', _37 => _37.requires_cli_update]) ? void 0 : response.skills,
240
240
  afterCliUpdate: {
@@ -261,7 +261,7 @@ var _crypto = require('crypto');
261
261
  var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
262
262
  var activeToolExecuteCommand = null;
263
263
  function progressLine(line) {
264
- if (!_chunkIZK2BLBWjs.isJsonOutputMode.call(void 0, )) console.error(line);
264
+ if (!_chunkEV3OPDHFjs.isJsonOutputMode.call(void 0, )) console.error(line);
265
265
  }
266
266
  function beginToolExecuteCommand() {
267
267
  if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkN3VZTISZjs = require('./chunk-N3VZTISZ.js');
3
+ var _chunk5VSHQG5Ejs = require('./chunk-5VSHQG5E.js');
4
4
 
5
5
 
6
6
 
7
- var _chunkGWPXWKQRjs = require('./chunk-GWPXWKQR.js');
7
+ var _chunkAO56MZ7Djs = require('./chunk-AO56MZ7D.js');
8
8
 
9
9
  // src/client.ts
10
- var DeeplineClient2 = class extends _chunkN3VZTISZjs.DeeplineClient {
10
+ var DeeplineClient2 = class extends _chunk5VSHQG5Ejs.DeeplineClient {
11
11
  constructor(options) {
12
- const config = _chunkGWPXWKQRjs.resolveConfig.call(void 0, options);
13
- super(config, new (0, _chunkGWPXWKQRjs.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
12
+ const config = _chunkAO56MZ7Djs.resolveConfig.call(void 0, options);
13
+ super(config, new (0, _chunkAO56MZ7Djs.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
14
14
  }
15
15
  };
16
16
 
@@ -118,7 +118,7 @@ function schemaField(name, node, required) {
118
118
  const { type, fields } = schemaType(schema);
119
119
  const example = [
120
120
  schema.example,
121
- schema.default,
121
+ schema.deprecatedDefault === true ? void 0 : schema.default,
122
122
  type === "string" ? NAMED_EXAMPLES[name.toLowerCase()] : void 0
123
123
  ].find((value) => value !== void 0);
124
124
  return {
@@ -709,6 +709,7 @@ function describedLines(described, view) {
709
709
  `${described.id} [${described.kind.replace("_", " ")}]`,
710
710
  ...described.displayName ? [described.displayName] : [],
711
711
  ...described.description ? [described.description] : [],
712
+ ...described.signature ? [`Signature: ${described.signature}`] : [],
712
713
  ...described.cost ? [`Cost: ${described.cost}`] : [],
713
714
  ...described.guidance.map((line) => `Guidance: ${line}`),
714
715
  ...described.rateLimit ? [`Rate limit: ${described.rateLimit}`] : [],
@@ -736,6 +737,16 @@ function describedLines(described, view) {
736
737
  ...view.explain ? indented(explanation.cli) : []
737
738
  ] : []
738
739
  ),
740
+ ...section(
741
+ view.cli && _optionalChain([described, 'access', _20 => _20.namedExamples, 'optionalAccess', _21 => _21.length]) ? [
742
+ "Run a named example:",
743
+ ...described.namedExamples.flatMap(
744
+ (example) => indented(
745
+ `deepline run ${described.id} --example ${example.name}${example.description ? ` # ${example.description}` : ""}`
746
+ )
747
+ )
748
+ ] : []
749
+ ),
739
750
  ...section(
740
751
  view.play && play ? [
741
752
  "Run in a play:",
@@ -761,16 +772,16 @@ function jsonFields(fields, options) {
761
772
  return [
762
773
  field.name,
763
774
  {
764
- type: field.type.replace(SHAPE, _nullishCoalesce(_optionalChain([shape, 'optionalAccess', _20 => _20.name]), () => ( "object"))),
775
+ type: field.type.replace(SHAPE, _nullishCoalesce(_optionalChain([shape, 'optionalAccess', _22 => _22.name]), () => ( "object"))),
765
776
  ...options.input ? { required: field.required } : {},
766
777
  ...field.means ? { means: field.means } : {},
767
778
  ...field.example !== void 0 ? { example: field.example } : {},
768
779
  ...field.pageSize ? { page_size: field.pageSize } : {},
769
- ...field.description && field.description !== _optionalChain([shape, 'optionalAccess', _21 => _21.description]) ? { description: field.description } : {},
780
+ ...field.description && field.description !== _optionalChain([shape, 'optionalAccess', _23 => _23.description]) ? { description: field.description } : {},
770
781
  ...field.secondary ? { secondary: true } : {},
771
782
  ...field.read ? { read: field.read } : {},
772
783
  ...field.in ? { in: field.in } : {},
773
- ..._optionalChain([field, 'access', _22 => _22.paths, 'optionalAccess', _23 => _23.length]) ? { paths: field.paths } : {},
784
+ ..._optionalChain([field, 'access', _24 => _24.paths, 'optionalAccess', _25 => _25.length]) ? { paths: field.paths } : {},
774
785
  ...field.fields && !shape ? { fields: jsonFields(field.fields, options) } : {}
775
786
  }
776
787
  ];
@@ -791,7 +802,7 @@ function describedJson(described, view) {
791
802
  const used = /* @__PURE__ */ new Set();
792
803
  const blocks = Object.fromEntries(
793
804
  sections.flatMap(
794
- ([key, fields, input2]) => _optionalChain([fields, 'optionalAccess', _24 => _24.length]) ? [
805
+ ([key, fields, input2]) => _optionalChain([fields, 'optionalAccess', _26 => _26.length]) ? [
795
806
  [
796
807
  key,
797
808
  jsonFields(fields, {
@@ -826,6 +837,7 @@ function describedJson(described, view) {
826
837
  ...described.provider ? { provider: described.provider } : {},
827
838
  ...described.displayName ? { displayName: described.displayName } : {},
828
839
  ...described.description ? { description: described.description } : {},
840
+ ...described.signature ? { signature: described.signature } : {},
829
841
  ...described.cost ? { cost: described.cost } : {},
830
842
  ...described.rateLimit ? { rateLimit: described.rateLimit } : {},
831
843
  ...described.byok ? { byok: described.byok } : {},
@@ -834,7 +846,7 @@ function describedJson(described, view) {
834
846
  ...described.connectCommand ? { connectCommand: described.connectCommand } : {},
835
847
  ...described.auth ? { auth: described.auth } : {},
836
848
  ...described.toolUsage ? { toolUsage: described.toolUsage } : {},
837
- ..._optionalChain([described, 'access', _25 => _25.features, 'optionalAccess', _26 => _26.length]) ? { features: described.features } : {},
849
+ ..._optionalChain([described, 'access', _27 => _27.features, 'optionalAccess', _28 => _28.length]) ? { features: described.features } : {},
838
850
  ...described.guidance.length ? { guidance: described.guidance } : {},
839
851
  ...blocks,
840
852
  // The input that takes the CSV whose columns are rowInputs.
@@ -848,18 +860,76 @@ function describedJson(described, view) {
848
860
  // On Windows `cli` reads `input` from this file instead of inline.
849
861
  ...inputFile ? { inputFile: inputFile.path } : {}
850
862
  },
863
+ ..._optionalChain([described, 'access', _29 => _29.namedExamples, 'optionalAccess', _30 => _30.length]) ? { namedExamples: described.namedExamples } : {},
851
864
  ...described.source ? { source: described.source } : {},
852
865
  ...hidden.length ? { hidden } : {}
853
866
  };
854
867
  }
855
- function buildPlayDashboardUrl(baseUrl, playName) {
856
- const trimmedBase = baseUrl.replace(/\/$/, "");
857
- const encodedPlayName = encodeURIComponent(playName);
858
- return `${trimmedBase}/dashboard/plays/${encodedPlayName}`;
868
+ function pythonValue(value) {
869
+ if (value === null || value === void 0) return "None";
870
+ if (value === true) return "True";
871
+ if (value === false) return "False";
872
+ if (typeof value === "string") return `'${value.replace(/'/g, "\\'")}'`;
873
+ if (Array.isArray(value)) return `[${value.map(pythonValue).join(", ")}]`;
874
+ if (isRecord(value)) {
875
+ return `{${Object.entries(value).map(([key, item]) => `'${key}': ${pythonValue(item)}`).join(", ")}}`;
876
+ }
877
+ return String(value);
859
878
  }
860
- function buildPlayRunUrl(baseUrl, playName, runId) {
879
+ function playSignature(reference, schema) {
880
+ if (!isRecord(schema) || !isRecord(schema.properties)) return null;
881
+ const required = new Set(
882
+ Array.isArray(schema.required) ? schema.required.map(String) : []
883
+ );
884
+ const entries = Object.entries(schema.properties);
885
+ const parameters = [
886
+ ...entries.filter(([name]) => required.has(name)).map(([name]) => name),
887
+ ...entries.filter(([name]) => !required.has(name)).map(([name, node]) => {
888
+ const property = isRecord(node) ? node : {};
889
+ if (!("default" in property)) return `${name}=None`;
890
+ const notes = [
891
+ property.deprecatedDefault === true ? "deprecated default" : null,
892
+ property.defaultWhen === "empty_request" ? "only when no search input is given" : null
893
+ ].filter(Boolean);
894
+ return `${name}=${pythonValue(property.default)}${notes.length ? ` (${notes.join(", ")})` : ""}`;
895
+ })
896
+ ];
897
+ return `${reference}(${parameters.join(", ")})`;
898
+ }
899
+ function playNamedExamples(schema) {
900
+ const declared = isRecord(schema) ? schema.namedExamples : null;
901
+ if (!isRecord(declared)) return [];
902
+ return Object.entries(declared).flatMap(
903
+ ([name, value]) => isRecord(value) && isRecord(value.input) ? [
904
+ {
905
+ name,
906
+ ...typeof value.description === "string" ? { description: value.description } : {},
907
+ input: value.input
908
+ }
909
+ ] : []
910
+ );
911
+ }
912
+ var DASHBOARD_ORG_PARAM = "org";
913
+ function buildDashboardUrl(baseUrl, path, orgId) {
914
+ const url = `${baseUrl.replace(/\/$/, "")}${path}`;
915
+ if (!orgId) return url;
916
+ const param = new URLSearchParams({ [DASHBOARD_ORG_PARAM]: orgId });
917
+ return `${url}${url.includes("?") ? "&" : "?"}${param.toString()}`;
918
+ }
919
+ function buildPlayDashboardUrl(baseUrl, playName, orgId) {
920
+ return buildDashboardUrl(
921
+ baseUrl,
922
+ `/dashboard/plays/${encodeURIComponent(playName)}`,
923
+ orgId
924
+ );
925
+ }
926
+ function buildPlayRunUrl(baseUrl, playName, runId, orgId) {
861
927
  const params = new URLSearchParams({ runId });
862
- return `${buildPlayDashboardUrl(baseUrl, playName)}?${params.toString()}`;
928
+ return buildDashboardUrl(
929
+ baseUrl,
930
+ `/dashboard/plays/${encodeURIComponent(playName)}?${params.toString()}`,
931
+ orgId
932
+ );
863
933
  }
864
934
  function describedPlay(play) {
865
935
  const reference = play.reference || play.name;
@@ -885,6 +955,8 @@ function describedPlay(play) {
885
955
  description: [field.description, `CSV header: ${header}`].filter(Boolean).join(" - ")
886
956
  } : field;
887
957
  });
958
+ const signature = playSignature(reference, play.inputSchema);
959
+ const namedExamples = playNamedExamples(play.inputSchema);
888
960
  const rowOutput = _nullishCoalesce(play.rowOutputSchema, () => ( {}));
889
961
  const added = isRecord(rowOutput.addedColumns) ? rowOutput.addedColumns : {};
890
962
  const rowOutputs = schemaFields(
@@ -907,10 +979,12 @@ function describedPlay(play) {
907
979
  rowOutputsAddToSource: Object.keys(added).length > 0 || rowOutput.preservesSourceColumns === true
908
980
  } : {},
909
981
  runner: { via: "play", reference, inputSchema: play.inputSchema },
982
+ ...signature ? { signature } : {},
983
+ ...namedExamples.length ? { namedExamples } : {},
910
984
  ...starter ? { source: starter.command } : {},
911
985
  ...exclusive ? { exclusive } : {},
912
986
  // A prebuilt's cost is what its recent runs were charged; there is no rate.
913
- ..._optionalChain([play, 'access', _27 => _27.observedCost, 'optionalAccess', _28 => _28.displayText]) ? { cost: play.observedCost.displayText } : {}
987
+ ..._optionalChain([play, 'access', _31 => _31.observedCost, 'optionalAccess', _32 => _32.displayText]) ? { cost: play.observedCost.displayText } : {}
914
988
  };
915
989
  }
916
990