deepline 0.3.367 → 0.3.368

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 (100) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/sdk/src/types.ts +5 -0
  3. package/dist/cli/auth-NJ6RE6XQ.js +33 -0
  4. package/dist/cli/{auth-2DHYG3WZ.mjs → auth-RUWM7VTH.mjs} +4 -4
  5. package/dist/cli/{billing-YBTOTHXM.js → billing-PLBQKLDK.js} +73 -73
  6. package/dist/cli/{billing-VFBFBOO5.mjs → billing-WSS57VQY.mjs} +4 -4
  7. package/dist/cli/{chunk-MXJEKMHU.js → chunk-27QA6Q4G.js} +224 -224
  8. package/dist/cli/{chunk-MKRADCZK.js → chunk-2YOKZW46.js} +26 -26
  9. package/dist/cli/{chunk-CRRVBNZD.js → chunk-7AWSYT7H.js} +117 -9
  10. package/dist/cli/{chunk-HEWGTHI2.mjs → chunk-7PQTQSJY.mjs} +111 -3
  11. package/dist/cli/{chunk-LDSBBKSM.mjs → chunk-A2OLR6DK.mjs} +2 -2
  12. package/dist/cli/{chunk-LJIWLZHS.js → chunk-AUWKAVXB.js} +54 -146
  13. package/dist/cli/{chunk-XPIZKTYZ.js → chunk-BKEYQHJ2.js} +50 -50
  14. package/dist/cli/{chunk-KJFND3YT.js → chunk-DZOEDNSU.js} +9 -9
  15. package/dist/cli/{chunk-GXRUBTXZ.mjs → chunk-ENGMDXHN.mjs} +2 -2
  16. package/dist/cli/{chunk-OCX5D2WI.mjs → chunk-EZUGGC5A.mjs} +1 -1
  17. package/dist/cli/{chunk-GD2VVYGB.mjs → chunk-GHZUH33K.mjs} +1 -1
  18. package/dist/cli/{chunk-3BZR22CZ.js → chunk-GJO4H3NN.js} +60 -60
  19. package/dist/cli/{chunk-R2HHZLOP.js → chunk-GTC2KAZQ.js} +4 -4
  20. package/dist/cli/{chunk-5NVMNFCG.js → chunk-HZT2Y7WB.js} +15 -15
  21. package/dist/cli/{chunk-6DRGO4CB.mjs → chunk-IG7OYVS7.mjs} +6 -6
  22. package/dist/cli/{chunk-3Y3N7WQO.mjs → chunk-LEZWRLB3.mjs} +1 -1
  23. package/dist/cli/{chunk-Z35CB3I5.js → chunk-NZHVJB2W.js} +2 -2
  24. package/dist/cli/{chunk-BBQ5IWRX.mjs → chunk-OTI7CDLE.mjs} +10 -102
  25. package/dist/cli/{chunk-3ZO2O2LE.mjs → chunk-PU53IS6H.mjs} +2 -2
  26. package/dist/cli/{chunk-K4V4FX76.mjs → chunk-S3MDB6SI.mjs} +1 -1
  27. package/dist/cli/{chunk-B7JTGFDS.js → chunk-S4Y7B2O3.js} +1 -1
  28. package/dist/cli/{chunk-D7SELX66.js → chunk-SNENR3BL.js} +6 -6
  29. package/dist/cli/{chunk-JNQECSK5.mjs → chunk-THO6F53F.mjs} +1 -1
  30. package/dist/cli/{chunk-W2LUUB3U.mjs → chunk-XUMWO4ST.mjs} +4 -4
  31. package/dist/cli/{chunk-AVSPBILZ.js → chunk-YCJMDCTH.js} +8 -8
  32. package/dist/cli/{chunk-DIDYT2TH.mjs → chunk-ZS2YQ4YK.mjs} +2 -2
  33. package/dist/cli/{client-F6SEXBBG.mjs → client-JJEEIOIL.mjs} +3 -3
  34. package/dist/cli/client-UPKWYV32.js +20 -0
  35. package/dist/cli/{csv-DC3MLBOC.mjs → csv-75D36YRA.mjs} +3 -3
  36. package/dist/cli/{csv-4AB42QFI.js → csv-EPNNU27J.js} +12 -12
  37. package/dist/cli/{db-JAQHMLUY.mjs → db-6HYSGMLN.mjs} +4 -4
  38. package/dist/cli/{db-M3URDTLR.js → db-SWNKJUU5.js} +29 -29
  39. package/dist/cli/{describe-RYXCBLJG.mjs → describe-N2KSBPOR.mjs} +8 -8
  40. package/dist/cli/{describe-AVXUIRDK.js → describe-XMUHTICA.js} +15 -15
  41. package/dist/cli/{executions-DYDW4WY3.js → executions-3ESWUDHH.js} +6 -6
  42. package/dist/cli/{executions-XPY5FKOS.mjs → executions-WHSG2JGN.mjs} +4 -4
  43. package/dist/cli/{feedback-ZOI3GFAC.mjs → feedback-2VHTJXU7.mjs} +3 -3
  44. package/dist/cli/{feedback-HMP2ZYNW.js → feedback-CGZE7L7A.js} +7 -7
  45. package/dist/cli/{git-K35PB25D.mjs → git-IG4J5OUT.mjs} +4 -4
  46. package/dist/cli/git-WPEOAE72.js +23 -0
  47. package/dist/cli/index.js +82 -82
  48. package/dist/cli/index.mjs +32 -32
  49. package/dist/cli/{legacy-noops-PKGJRS75.mjs → legacy-noops-7WXL7PB3.mjs} +4 -4
  50. package/dist/cli/{legacy-noops-QNNMKQDW.js → legacy-noops-QF7S6JJB.js} +7 -7
  51. package/dist/cli/{monitors-MUMWTBID.js → monitors-6XYT53X6.js} +85 -85
  52. package/dist/cli/{monitors-JMNBMRSQ.mjs → monitors-QS4QFORU.mjs} +4 -4
  53. package/dist/cli/{org-AQPMMPQE.mjs → org-5IGU7FES.mjs} +4 -4
  54. package/dist/cli/{org-2QL6AY6G.js → org-NLR3D3M7.js} +64 -64
  55. package/dist/cli/play-3ECRZYD5.js +153 -0
  56. package/dist/cli/{play-AITTTWYK.mjs → play-JVENSY4T.mjs} +7 -7
  57. package/dist/cli/{providers-LRCYLIQA.mjs → providers-RSVO5U4E.mjs} +4 -4
  58. package/dist/cli/{providers-BGTPNAOA.js → providers-T4GCIOTW.js} +7 -7
  59. package/dist/cli/{quickstart-WMAUXWKW.js → quickstart-IHAG5QZ6.js} +5 -5
  60. package/dist/cli/{quickstart-3II563Z7.mjs → quickstart-ZDFOKNYW.mjs} +3 -3
  61. package/dist/cli/search-RYLADJUK.js +26 -0
  62. package/dist/cli/{search-J6ELRZNH.mjs → search-ZGEYJSMF.mjs} +5 -5
  63. package/dist/cli/{secrets-HDBB2647.js → secrets-DVTEZCPE.js} +13 -13
  64. package/dist/cli/{secrets-L7LOTLZB.mjs → secrets-OQZRZBP6.mjs} +4 -4
  65. package/dist/cli/{sessions-7DMN24LF.mjs → sessions-XM7PFJL2.mjs} +4 -4
  66. package/dist/cli/{sessions-ZO3WB3EF.js → sessions-XYEG53JJ.js} +5 -5
  67. package/dist/cli/{settings-OVUM5BLZ.js → settings-NWEBQOX4.js} +74 -74
  68. package/dist/cli/{settings-USHCF4YD.mjs → settings-TKXYRYYH.mjs} +7 -7
  69. package/dist/cli/{setup-FZQ7HDL4.mjs → setup-3UD5TDRJ.mjs} +6 -6
  70. package/dist/cli/{setup-W77Y5ALX.js → setup-JRU6VGFQ.js} +41 -41
  71. package/dist/cli/{skills-A2LR3RAP.mjs → skills-GLLMNOCY.mjs} +4 -4
  72. package/dist/cli/skills-PZQDJJWN.js +28 -0
  73. package/dist/cli/{tools-FX7G7KX5.mjs → tools-VXXAMH2X.mjs} +6 -6
  74. package/dist/cli/tools-WYXBAUMT.js +40 -0
  75. package/dist/cli/{update-EODE5FHU.mjs → update-UCGMUUDQ.mjs} +6 -6
  76. package/dist/cli/update-WM6SOME3.js +28 -0
  77. package/dist/cli/{workflow-7352UH6L.mjs → workflow-BGGKNZTG.mjs} +5 -5
  78. package/dist/cli/{workflow-JEY4ESZA.js → workflow-G2UU7WTU.js} +15 -15
  79. package/dist/{client-BmKft6Pr.d.mts → client-CjHv4K6D.d.mts} +8 -0
  80. package/dist/{client-Bra0Nc2D.d.ts → client-rTuhNN-x.d.ts} +8 -0
  81. package/dist/index.d.mts +2 -2
  82. package/dist/index.d.ts +2 -2
  83. package/dist/index.js +6 -6
  84. package/dist/index.mjs +3 -3
  85. package/dist/install-integrity.json +76 -76
  86. package/dist/plays/run-request.d.mts +1 -1
  87. package/dist/plays/run-request.d.ts +1 -1
  88. package/dist/release.d.mts +1 -1
  89. package/dist/release.d.ts +1 -1
  90. package/dist/release.js +2 -2
  91. package/dist/release.mjs +1 -1
  92. package/package.json +1 -1
  93. package/dist/cli/auth-I2E45QZK.js +0 -33
  94. package/dist/cli/client-VWGJIUGH.js +0 -20
  95. package/dist/cli/git-TJEM2U4K.js +0 -23
  96. package/dist/cli/play-YO52D4YP.js +0 -153
  97. package/dist/cli/search-FQ5NSE7R.js +0 -26
  98. package/dist/cli/skills-GLKEZPFV.js +0 -28
  99. package/dist/cli/tools-HBNJ3WP3.js +0 -40
  100. package/dist/cli/update-A2TZZO2S.js +0 -28
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkD7SELX66js = require('./chunk-D7SELX66.js');
5
+ var _chunkSNENR3BLjs = require('./chunk-SNENR3BL.js');
6
6
 
7
7
 
8
- var _chunkR2HHZLOPjs = require('./chunk-R2HHZLOP.js');
8
+ var _chunkGTC2KAZQjs = require('./chunk-GTC2KAZQ.js');
9
9
 
10
10
  // src/cli/commands/git.ts
11
11
  function shellQuote(value) {
@@ -32,11 +32,11 @@ function renderDeployment(deployment) {
32
32
  return `${deployment.id} ${source} (${kind}) - ${deployment.status}${suffix}`;
33
33
  }
34
34
  async function handleList(options) {
35
- const { http } = _chunkD7SELX66js.getAuthedHttpClient.call(void 0, );
35
+ const { http } = _chunkSNENR3BLjs.getAuthedHttpClient.call(void 0, );
36
36
  const payload = await http.get(
37
37
  `/api/v2/play-projects${options.all ? "?includeDisabled=1" : ""}`
38
38
  );
39
- _chunkD7SELX66js.printCommandEnvelope.call(void 0,
39
+ _chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
40
40
  {
41
41
  projects: payload.projects,
42
42
  count: payload.projects.length,
@@ -73,7 +73,7 @@ function describeInstallationStatus(installation) {
73
73
  }
74
74
  }
75
75
  async function handleStatus(options) {
76
- const { http } = _chunkD7SELX66js.getAuthedHttpClient.call(void 0, );
76
+ const { http } = _chunkSNENR3BLjs.getAuthedHttpClient.call(void 0, );
77
77
  const payload = await http.get("/api/v2/github/installation");
78
78
  const installation = payload.installation;
79
79
  const others = (_nullishCoalesce(payload.installations, () => ( []))).filter(
@@ -136,7 +136,7 @@ async function handleStatus(options) {
136
136
  )
137
137
  );
138
138
  }
139
- _chunkD7SELX66js.printCommandEnvelope.call(void 0,
139
+ _chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
140
140
  {
141
141
  installation,
142
142
  installations: _nullishCoalesce(payload.installations, () => ( [])),
@@ -147,10 +147,10 @@ async function handleStatus(options) {
147
147
  );
148
148
  }
149
149
  async function handleRepos(options) {
150
- const { http } = _chunkD7SELX66js.getAuthedHttpClient.call(void 0, );
150
+ const { http } = _chunkSNENR3BLjs.getAuthedHttpClient.call(void 0, );
151
151
  const query = options.installation ? `?installationId=${encodeURIComponent(options.installation)}` : "";
152
152
  const payload = await http.get(`/api/v2/github/repos${query}`);
153
- _chunkD7SELX66js.printCommandEnvelope.call(void 0,
153
+ _chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
154
154
  {
155
155
  installation: payload.installation,
156
156
  repositories: payload.repositories,
@@ -171,7 +171,7 @@ async function handleRepos(options) {
171
171
  }
172
172
  async function resolveRepoId(repo, installation) {
173
173
  if (/^\d+$/.test(repo)) return Number(repo);
174
- const { http } = _chunkD7SELX66js.getAuthedHttpClient.call(void 0, );
174
+ const { http } = _chunkSNENR3BLjs.getAuthedHttpClient.call(void 0, );
175
175
  const query = installation ? `?installationId=${encodeURIComponent(installation)}` : "";
176
176
  const payload = await http.get(
177
177
  `/api/v2/github/repos${query}`
@@ -188,7 +188,7 @@ async function resolveRepoId(repo, installation) {
188
188
  }
189
189
  async function handleLink(repo, options) {
190
190
  const repoId = await resolveRepoId(repo, options.installation);
191
- const { http } = _chunkD7SELX66js.getAuthedHttpClient.call(void 0, );
191
+ const { http } = _chunkSNENR3BLjs.getAuthedHttpClient.call(void 0, );
192
192
  const payload = await http.post("/api/v2/play-projects", {
193
193
  repoId,
194
194
  ...options.installation !== void 0 ? { installationId: options.installation } : {},
@@ -197,7 +197,7 @@ async function handleLink(repo, options) {
197
197
  ...options.branch !== void 0 ? { productionBranch: options.branch } : {},
198
198
  ...options.prChecks !== void 0 ? { checkOnPullRequest: options.prChecks } : {}
199
199
  });
200
- _chunkD7SELX66js.printCommandEnvelope.call(void 0,
200
+ _chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
201
201
  {
202
202
  project: payload.project,
203
203
  render: {
@@ -220,11 +220,11 @@ async function handleLink(repo, options) {
220
220
  );
221
221
  }
222
222
  async function handleGet(id, options) {
223
- const { http } = _chunkD7SELX66js.getAuthedHttpClient.call(void 0, );
223
+ const { http } = _chunkSNENR3BLjs.getAuthedHttpClient.call(void 0, );
224
224
  const payload = await http.get(
225
225
  `/api/v2/play-projects/${encodeURIComponent(id)}`
226
226
  );
227
- _chunkD7SELX66js.printCommandEnvelope.call(void 0,
227
+ _chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
228
228
  {
229
229
  project: payload.project,
230
230
  render: {
@@ -240,7 +240,7 @@ async function handleGet(id, options) {
240
240
  );
241
241
  }
242
242
  async function handleSet(id, options) {
243
- const { http } = _chunkD7SELX66js.getAuthedHttpClient.call(void 0, );
243
+ const { http } = _chunkSNENR3BLjs.getAuthedHttpClient.call(void 0, );
244
244
  const payload = await http.patch(
245
245
  `/api/v2/play-projects/${encodeURIComponent(id)}`,
246
246
  {
@@ -251,7 +251,7 @@ async function handleSet(id, options) {
251
251
  ...options.disabled !== void 0 ? { disabled: options.disabled } : {}
252
252
  }
253
253
  );
254
- _chunkD7SELX66js.printCommandEnvelope.call(void 0,
254
+ _chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
255
255
  {
256
256
  project: payload.project,
257
257
  render: {
@@ -264,9 +264,9 @@ async function handleSet(id, options) {
264
264
  );
265
265
  }
266
266
  async function handleUnlink(id, options) {
267
- const { http } = _chunkD7SELX66js.getAuthedHttpClient.call(void 0, );
267
+ const { http } = _chunkSNENR3BLjs.getAuthedHttpClient.call(void 0, );
268
268
  await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
269
- _chunkD7SELX66js.printCommandEnvelope.call(void 0,
269
+ _chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
270
270
  {
271
271
  ok: true,
272
272
  id,
@@ -286,10 +286,10 @@ async function handleUnlink(id, options) {
286
286
  );
287
287
  }
288
288
  async function handleConnect(options) {
289
- const baseUrl = _chunkR2HHZLOPjs.resolveBaseUrlOnly.call(void 0, );
289
+ const baseUrl = _chunkGTC2KAZQjs.resolveBaseUrlOnly.call(void 0, );
290
290
  const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
291
- const opened = _chunkD7SELX66js.openInBrowser.call(void 0, connectUrl);
292
- _chunkD7SELX66js.printCommandEnvelope.call(void 0,
291
+ const opened = _chunkSNENR3BLjs.openInBrowser.call(void 0, connectUrl);
292
+ _chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
293
293
  {
294
294
  connectUrl,
295
295
  browser: opened,
@@ -311,7 +311,7 @@ async function handleConnect(options) {
311
311
  );
312
312
  }
313
313
  async function handleDeploymentsList(options) {
314
- const { http } = _chunkD7SELX66js.getAuthedHttpClient.call(void 0, );
314
+ const { http } = _chunkSNENR3BLjs.getAuthedHttpClient.call(void 0, );
315
315
  const query = new URLSearchParams();
316
316
  if (options.repo) query.set("projectId", options.repo);
317
317
  if (options.limit) query.set("limit", options.limit);
@@ -319,7 +319,7 @@ async function handleDeploymentsList(options) {
319
319
  const payload = await http.get(
320
320
  `/api/v2/deployments${suffix}`
321
321
  );
322
- _chunkD7SELX66js.printCommandEnvelope.call(void 0,
322
+ _chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
323
323
  {
324
324
  deployments: payload.deployments,
325
325
  count: payload.deployments.length,
@@ -363,12 +363,12 @@ function renderDeploymentMonitorLines(results) {
363
363
  ]);
364
364
  }
365
365
  async function handleDeploymentGet(id, options) {
366
- const { http } = _chunkD7SELX66js.getAuthedHttpClient.call(void 0, );
366
+ const { http } = _chunkSNENR3BLjs.getAuthedHttpClient.call(void 0, );
367
367
  const payload = await http.get(`/api/v2/deployments/${encodeURIComponent(id)}`);
368
368
  const playLines = renderDeploymentPlayLines(payload.deployment.results);
369
369
  const monitorLines = renderDeploymentMonitorLines(payload.deployment.results);
370
370
  const repository = _nullishCoalesce(_optionalChain([payload, 'access', _10 => _10.project, 'optionalAccess', _11 => _11.repoFullName]), () => ( payload.deployment.repoFullName));
371
- _chunkD7SELX66js.printCommandEnvelope.call(void 0,
371
+ _chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
372
372
  {
373
373
  deployment: payload.deployment,
374
374
  project: payload.project,
@@ -387,9 +387,9 @@ async function handleDeploymentGet(id, options) {
387
387
  );
388
388
  }
389
389
  async function handleDeploymentCancel(id, options) {
390
- const { http } = _chunkD7SELX66js.getAuthedHttpClient.call(void 0, );
390
+ const { http } = _chunkSNENR3BLjs.getAuthedHttpClient.call(void 0, );
391
391
  const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
392
- _chunkD7SELX66js.printCommandEnvelope.call(void 0,
392
+ _chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
393
393
  {
394
394
  cancelled: payload.cancelled,
395
395
  deployment: payload.deployment,
@@ -1,14 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkKJFND3YTjs = require('./chunk-KJFND3YT.js');
3
+ var _chunkDZOEDNSUjs = require('./chunk-DZOEDNSU.js');
4
4
 
5
5
 
6
6
 
7
- var _chunkD7SELX66js = require('./chunk-D7SELX66.js');
7
+ var _chunkSNENR3BLjs = require('./chunk-SNENR3BL.js');
8
8
 
9
9
 
10
10
 
11
- var _chunkR2HHZLOPjs = require('./chunk-R2HHZLOP.js');
11
+ var _chunkGTC2KAZQjs = require('./chunk-GTC2KAZQ.js');
12
12
 
13
13
  // src/cli/commands/search.ts
14
14
  var _commander = require('commander');
@@ -18,7 +18,7 @@ var _fs = require('fs');
18
18
  var _path = require('path');
19
19
  var SEARCH_REF_TTL_MS = 15 * 6e4;
20
20
  function lastSearchPath() {
21
- return _path.join.call(void 0, _chunkR2HHZLOPjs.sdkCliStateDirPath.call(void 0, _chunkR2HHZLOPjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
21
+ return _path.join.call(void 0, _chunkGTC2KAZQjs.sdkCliStateDirPath.call(void 0, _chunkGTC2KAZQjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
22
22
  }
23
23
  function rememberSearchRef(searchRef) {
24
24
  try {
@@ -63,6 +63,109 @@ function formatTextTable(rows, columns) {
63
63
  }).split("\n").map((line) => line.trimEnd()).join("\n").trimEnd();
64
64
  }
65
65
 
66
+ // src/cli/tool-description.ts
67
+ function observedMaxText(pricing) {
68
+ const max = recordValue(recordValue(pricing).observedMax);
69
+ return typeof max.creditsPerCall === "number" && max.creditsPerCall > 0 ? `max observed ${max.creditsPerCall} credits/call (last ${String(max.windowDays)} days)` : "";
70
+ }
71
+ var Capability = class _Capability {
72
+ #catalogEntry;
73
+ constructor(catalogEntry) {
74
+ this.#catalogEntry = catalogEntry;
75
+ }
76
+ static fromCatalogEntry(catalogEntry) {
77
+ return new _Capability(catalogEntry);
78
+ }
79
+ describe() {
80
+ return CapabilityDescription.fromCatalogEntry(this.#catalogEntry);
81
+ }
82
+ };
83
+ var CapabilityDescription = class _CapabilityDescription {
84
+ #catalogEntry;
85
+ constructor(catalogEntry) {
86
+ this.#catalogEntry = catalogEntry;
87
+ }
88
+ static fromCatalogEntry(catalogEntry) {
89
+ return new _CapabilityDescription(catalogEntry);
90
+ }
91
+ /**
92
+ * The customer price already resolved by the catalog. This intentionally
93
+ * omits provider-price fields, even when a catalog Adapter carried them.
94
+ */
95
+ customerCost() {
96
+ const legacyCost = recordValue(this.#catalogEntry.cost);
97
+ const pricing = recordValue(this.#catalogEntry.pricing);
98
+ const unit = stringValue(pricing.unit);
99
+ const legacyPricingModel = stringValue(
100
+ _nullishCoalesce(legacyCost.pricingModel, () => ( legacyCost.pricing_model))
101
+ );
102
+ const pricingModel = unit === "call" ? "fixed" : unit === "result" || unit === "page" ? `per_${unit}` : unit === "usage" ? "provider_usage" : legacyPricingModel;
103
+ const canonicalCredits = pricingNumber(
104
+ pricing,
105
+ "creditsPerUnit",
106
+ "credits_per_unit",
107
+ _nullishCoalesce(this.#catalogEntry.deeplineCreditsPerPricingUnit, () => ( this.#catalogEntry.deepline_credits_per_pricing_unit))
108
+ );
109
+ const canonicalUsd = pricingNumber(
110
+ pricing,
111
+ "usdPerUnit",
112
+ "usd_per_unit",
113
+ _nullishCoalesce(this.#catalogEntry.deeplineUsdPerPricingUnit, () => ( this.#catalogEntry.deepline_usd_per_pricing_unit))
114
+ );
115
+ const billingSource = stringValue(
116
+ _nullishCoalesce(this.#catalogEntry.billingSource, () => ( this.#catalogEntry.billing_source))
117
+ );
118
+ const billingSourceLabel = stringValue(
119
+ _nullishCoalesce(this.#catalogEntry.billingSourceLabel, () => ( this.#catalogEntry.billing_source_label))
120
+ );
121
+ const isFree = billingSource === "free";
122
+ return {
123
+ pricingModel: pricingModel || null,
124
+ unit: unit || null,
125
+ displayText: isFree ? "Free" : stringValue(_nullishCoalesce(pricing.displayText, () => ( pricing.display_text))),
126
+ summary: isFree ? null : stringValue(pricing.summary),
127
+ billingMode: stringValue(
128
+ _nullishCoalesce(legacyCost.billingMode, () => ( legacyCost.billing_mode))
129
+ ),
130
+ billingSource,
131
+ billingSourceLabel,
132
+ deeplineCreditsPerPricingUnit: isFree ? 0 : canonicalCredits,
133
+ deeplineUsdPerPricingUnit: isFree ? 0 : canonicalUsd,
134
+ ...pricing.estimatedRange && !isFree && billingSource !== "own_provider_credentials" ? {
135
+ estimatedRange: pricing.estimatedRange,
136
+ details: Array.isArray(pricing.details) ? pricing.details.filter(
137
+ (value) => typeof value === "string"
138
+ ) : []
139
+ } : {},
140
+ ...pricing.observedReference && !isFree && billingSource !== "own_provider_credentials" ? {
141
+ observedReference: pricing.observedReference,
142
+ details: Array.isArray(pricing.details) ? pricing.details.filter(
143
+ (value) => typeof value === "string"
144
+ ) : []
145
+ } : {},
146
+ ...pricing.observedMax && !isFree && billingSource !== "own_provider_credentials" ? {
147
+ observedMax: pricing.observedMax
148
+ } : {}
149
+ };
150
+ }
151
+ };
152
+ function recordValue(value) {
153
+ return value && typeof value === "object" && !Array.isArray(value) ? value : {};
154
+ }
155
+ function stringValue(value) {
156
+ return typeof value === "string" && value.trim() ? value : null;
157
+ }
158
+ function numberValue(value) {
159
+ return typeof value === "number" && Number.isFinite(value) ? value : null;
160
+ }
161
+ function pricingNumber(pricing, canonicalKey, aliasKey, legacyValue) {
162
+ for (const key of [canonicalKey, aliasKey]) {
163
+ if (Object.prototype.hasOwnProperty.call(pricing, key))
164
+ return numberValue(pricing[key]);
165
+ }
166
+ return numberValue(legacyValue);
167
+ }
168
+
66
169
  // src/cli/search-output.ts
67
170
  function clipSummary(value) {
68
171
  const characters = Array.from(value.replace(/\s+/gu, " ").trim());
@@ -137,6 +240,9 @@ function rateLimitDisplay(item) {
137
240
  }
138
241
  function searchRow(item) {
139
242
  const { cost, notes } = pricingDisplay(item);
243
+ const observedMax = item.billingSource === "own_provider_credentials" ? "" : observedMaxText(item.pricing);
244
+ if (observedMax)
245
+ notes.push(`${observedMax[0].toUpperCase()}${observedMax.slice(1)}.`);
140
246
  if (item.credentialStatus === "requires_connection") {
141
247
  notes.push("Requires your credentials \u2014 not connected (connect to use).");
142
248
  } else if (item.connected === false && item.credentialStatus === "managed") {
@@ -153,7 +259,7 @@ function searchRow(item) {
153
259
  }
154
260
  function renderSearchResults(result) {
155
261
  if (result.results.length === 0)
156
- return _chunkD7SELX66js.renderCommandEnvelopeText.call(void 0, result);
262
+ return _chunkSNENR3BLjs.renderCommandEnvelopeText.call(void 0, result);
157
263
  const rows = result.results.map(searchRow);
158
264
  const kinds = new Set(rows.map((row) => row.kind));
159
265
  const onlyTools = kinds.size === 1 && kinds.has("tool");
@@ -177,7 +283,7 @@ function renderSearchResults(result) {
177
283
  actions: _optionalChain([render, 'optionalAccess', _11 => _11.actions])
178
284
  };
179
285
  const followUps = _optionalChain([remaining, 'access', _12 => _12.sections, 'optionalAccess', _13 => _13.length]) || _optionalChain([remaining, 'access', _14 => _14.actions, 'optionalAccess', _15 => _15.length]) ? `
180
- ${_chunkD7SELX66js.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
286
+ ${_chunkSNENR3BLjs.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
181
287
  const notes = rows.flatMap(
182
288
  (row) => row.notes.map((note) => ` ${row.id}: ${note}`)
183
289
  );
@@ -254,7 +360,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
254
360
  console.error(USAGE);
255
361
  return 1;
256
362
  }
257
- const { search_ref: searchRef, ...result } = await new (0, _chunkKJFND3YTjs.DeeplineClient)().search({
363
+ const { search_ref: searchRef, ...result } = await new (0, _chunkDZOEDNSUjs.DeeplineClient)().search({
258
364
  query,
259
365
  types,
260
366
  exclude,
@@ -268,7 +374,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
268
374
  });
269
375
  if (searchRef) rememberSearchRef(searchRef);
270
376
  pointAtDescribe(result);
271
- _chunkD7SELX66js.printCommandEnvelope.call(void 0, result, {
377
+ _chunkSNENR3BLjs.printCommandEnvelope.call(void 0, result, {
272
378
  json: options.json === true,
273
379
  text: renderSearchResults(result)
274
380
  });
@@ -368,4 +474,6 @@ Examples:
368
474
 
369
475
 
370
476
 
371
- exports.recentSearchRef = recentSearchRef; exports.SEARCH_TYPES = SEARCH_TYPES; exports.parseTypes = parseTypes; exports.appendCsv = appendCsv; exports.pointAtDescribe = pointAtDescribe; exports.registerDeprecatedSearchCommand = registerDeprecatedSearchCommand; exports.registerSearchCommand = registerSearchCommand;
477
+
478
+
479
+ exports.recentSearchRef = recentSearchRef; exports.observedMaxText = observedMaxText; exports.Capability = Capability; exports.SEARCH_TYPES = SEARCH_TYPES; exports.parseTypes = parseTypes; exports.appendCsv = appendCsv; exports.pointAtDescribe = pointAtDescribe; exports.registerDeprecatedSearchCommand = registerDeprecatedSearchCommand; exports.registerSearchCommand = registerSearchCommand;
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  DeeplineClient
3
- } from "./chunk-JNQECSK5.mjs";
3
+ } from "./chunk-THO6F53F.mjs";
4
4
  import {
5
5
  printCommandEnvelope,
6
6
  renderCommandEnvelopeText
7
- } from "./chunk-K4V4FX76.mjs";
7
+ } from "./chunk-S3MDB6SI.mjs";
8
8
  import {
9
9
  resolveConfig,
10
10
  sdkCliStateDirPath
11
- } from "./chunk-OCX5D2WI.mjs";
11
+ } from "./chunk-EZUGGC5A.mjs";
12
12
 
13
13
  // src/cli/commands/search.ts
14
14
  import { Option } from "commander";
@@ -63,6 +63,109 @@ function formatTextTable(rows, columns) {
63
63
  }).split("\n").map((line) => line.trimEnd()).join("\n").trimEnd();
64
64
  }
65
65
 
66
+ // src/cli/tool-description.ts
67
+ function observedMaxText(pricing) {
68
+ const max = recordValue(recordValue(pricing).observedMax);
69
+ return typeof max.creditsPerCall === "number" && max.creditsPerCall > 0 ? `max observed ${max.creditsPerCall} credits/call (last ${String(max.windowDays)} days)` : "";
70
+ }
71
+ var Capability = class _Capability {
72
+ #catalogEntry;
73
+ constructor(catalogEntry) {
74
+ this.#catalogEntry = catalogEntry;
75
+ }
76
+ static fromCatalogEntry(catalogEntry) {
77
+ return new _Capability(catalogEntry);
78
+ }
79
+ describe() {
80
+ return CapabilityDescription.fromCatalogEntry(this.#catalogEntry);
81
+ }
82
+ };
83
+ var CapabilityDescription = class _CapabilityDescription {
84
+ #catalogEntry;
85
+ constructor(catalogEntry) {
86
+ this.#catalogEntry = catalogEntry;
87
+ }
88
+ static fromCatalogEntry(catalogEntry) {
89
+ return new _CapabilityDescription(catalogEntry);
90
+ }
91
+ /**
92
+ * The customer price already resolved by the catalog. This intentionally
93
+ * omits provider-price fields, even when a catalog Adapter carried them.
94
+ */
95
+ customerCost() {
96
+ const legacyCost = recordValue(this.#catalogEntry.cost);
97
+ const pricing = recordValue(this.#catalogEntry.pricing);
98
+ const unit = stringValue(pricing.unit);
99
+ const legacyPricingModel = stringValue(
100
+ legacyCost.pricingModel ?? legacyCost.pricing_model
101
+ );
102
+ const pricingModel = unit === "call" ? "fixed" : unit === "result" || unit === "page" ? `per_${unit}` : unit === "usage" ? "provider_usage" : legacyPricingModel;
103
+ const canonicalCredits = pricingNumber(
104
+ pricing,
105
+ "creditsPerUnit",
106
+ "credits_per_unit",
107
+ this.#catalogEntry.deeplineCreditsPerPricingUnit ?? this.#catalogEntry.deepline_credits_per_pricing_unit
108
+ );
109
+ const canonicalUsd = pricingNumber(
110
+ pricing,
111
+ "usdPerUnit",
112
+ "usd_per_unit",
113
+ this.#catalogEntry.deeplineUsdPerPricingUnit ?? this.#catalogEntry.deepline_usd_per_pricing_unit
114
+ );
115
+ const billingSource = stringValue(
116
+ this.#catalogEntry.billingSource ?? this.#catalogEntry.billing_source
117
+ );
118
+ const billingSourceLabel = stringValue(
119
+ this.#catalogEntry.billingSourceLabel ?? this.#catalogEntry.billing_source_label
120
+ );
121
+ const isFree = billingSource === "free";
122
+ return {
123
+ pricingModel: pricingModel || null,
124
+ unit: unit || null,
125
+ displayText: isFree ? "Free" : stringValue(pricing.displayText ?? pricing.display_text),
126
+ summary: isFree ? null : stringValue(pricing.summary),
127
+ billingMode: stringValue(
128
+ legacyCost.billingMode ?? legacyCost.billing_mode
129
+ ),
130
+ billingSource,
131
+ billingSourceLabel,
132
+ deeplineCreditsPerPricingUnit: isFree ? 0 : canonicalCredits,
133
+ deeplineUsdPerPricingUnit: isFree ? 0 : canonicalUsd,
134
+ ...pricing.estimatedRange && !isFree && billingSource !== "own_provider_credentials" ? {
135
+ estimatedRange: pricing.estimatedRange,
136
+ details: Array.isArray(pricing.details) ? pricing.details.filter(
137
+ (value) => typeof value === "string"
138
+ ) : []
139
+ } : {},
140
+ ...pricing.observedReference && !isFree && billingSource !== "own_provider_credentials" ? {
141
+ observedReference: pricing.observedReference,
142
+ details: Array.isArray(pricing.details) ? pricing.details.filter(
143
+ (value) => typeof value === "string"
144
+ ) : []
145
+ } : {},
146
+ ...pricing.observedMax && !isFree && billingSource !== "own_provider_credentials" ? {
147
+ observedMax: pricing.observedMax
148
+ } : {}
149
+ };
150
+ }
151
+ };
152
+ function recordValue(value) {
153
+ return value && typeof value === "object" && !Array.isArray(value) ? value : {};
154
+ }
155
+ function stringValue(value) {
156
+ return typeof value === "string" && value.trim() ? value : null;
157
+ }
158
+ function numberValue(value) {
159
+ return typeof value === "number" && Number.isFinite(value) ? value : null;
160
+ }
161
+ function pricingNumber(pricing, canonicalKey, aliasKey, legacyValue) {
162
+ for (const key of [canonicalKey, aliasKey]) {
163
+ if (Object.prototype.hasOwnProperty.call(pricing, key))
164
+ return numberValue(pricing[key]);
165
+ }
166
+ return numberValue(legacyValue);
167
+ }
168
+
66
169
  // src/cli/search-output.ts
67
170
  function clipSummary(value) {
68
171
  const characters = Array.from(value.replace(/\s+/gu, " ").trim());
@@ -137,6 +240,9 @@ function rateLimitDisplay(item) {
137
240
  }
138
241
  function searchRow(item) {
139
242
  const { cost, notes } = pricingDisplay(item);
243
+ const observedMax = item.billingSource === "own_provider_credentials" ? "" : observedMaxText(item.pricing);
244
+ if (observedMax)
245
+ notes.push(`${observedMax[0].toUpperCase()}${observedMax.slice(1)}.`);
140
246
  if (item.credentialStatus === "requires_connection") {
141
247
  notes.push("Requires your credentials \u2014 not connected (connect to use).");
142
248
  } else if (item.connected === false && item.credentialStatus === "managed") {
@@ -362,6 +468,8 @@ Examples:
362
468
 
363
469
  export {
364
470
  recentSearchRef,
471
+ observedMaxText,
472
+ Capability,
365
473
  SEARCH_TYPES,
366
474
  parseTypes,
367
475
  appendCsv,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getAuthedHttpClient,
3
3
  printCommandEnvelope
4
- } from "./chunk-K4V4FX76.mjs";
4
+ } from "./chunk-S3MDB6SI.mjs";
5
5
  import {
6
6
  agentSessionIdFromEnvironment
7
- } from "./chunk-OCX5D2WI.mjs";
7
+ } from "./chunk-EZUGGC5A.mjs";
8
8
 
9
9
  // src/cli/commands/sessions.ts
10
10
  import {