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.
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +5 -0
- package/dist/cli/auth-NJ6RE6XQ.js +33 -0
- package/dist/cli/{auth-2DHYG3WZ.mjs → auth-RUWM7VTH.mjs} +4 -4
- package/dist/cli/{billing-YBTOTHXM.js → billing-PLBQKLDK.js} +73 -73
- package/dist/cli/{billing-VFBFBOO5.mjs → billing-WSS57VQY.mjs} +4 -4
- package/dist/cli/{chunk-MXJEKMHU.js → chunk-27QA6Q4G.js} +224 -224
- package/dist/cli/{chunk-MKRADCZK.js → chunk-2YOKZW46.js} +26 -26
- package/dist/cli/{chunk-CRRVBNZD.js → chunk-7AWSYT7H.js} +117 -9
- package/dist/cli/{chunk-HEWGTHI2.mjs → chunk-7PQTQSJY.mjs} +111 -3
- package/dist/cli/{chunk-LDSBBKSM.mjs → chunk-A2OLR6DK.mjs} +2 -2
- package/dist/cli/{chunk-LJIWLZHS.js → chunk-AUWKAVXB.js} +54 -146
- package/dist/cli/{chunk-XPIZKTYZ.js → chunk-BKEYQHJ2.js} +50 -50
- package/dist/cli/{chunk-KJFND3YT.js → chunk-DZOEDNSU.js} +9 -9
- package/dist/cli/{chunk-GXRUBTXZ.mjs → chunk-ENGMDXHN.mjs} +2 -2
- package/dist/cli/{chunk-OCX5D2WI.mjs → chunk-EZUGGC5A.mjs} +1 -1
- package/dist/cli/{chunk-GD2VVYGB.mjs → chunk-GHZUH33K.mjs} +1 -1
- package/dist/cli/{chunk-3BZR22CZ.js → chunk-GJO4H3NN.js} +60 -60
- package/dist/cli/{chunk-R2HHZLOP.js → chunk-GTC2KAZQ.js} +4 -4
- package/dist/cli/{chunk-5NVMNFCG.js → chunk-HZT2Y7WB.js} +15 -15
- package/dist/cli/{chunk-6DRGO4CB.mjs → chunk-IG7OYVS7.mjs} +6 -6
- package/dist/cli/{chunk-3Y3N7WQO.mjs → chunk-LEZWRLB3.mjs} +1 -1
- package/dist/cli/{chunk-Z35CB3I5.js → chunk-NZHVJB2W.js} +2 -2
- package/dist/cli/{chunk-BBQ5IWRX.mjs → chunk-OTI7CDLE.mjs} +10 -102
- package/dist/cli/{chunk-3ZO2O2LE.mjs → chunk-PU53IS6H.mjs} +2 -2
- package/dist/cli/{chunk-K4V4FX76.mjs → chunk-S3MDB6SI.mjs} +1 -1
- package/dist/cli/{chunk-B7JTGFDS.js → chunk-S4Y7B2O3.js} +1 -1
- package/dist/cli/{chunk-D7SELX66.js → chunk-SNENR3BL.js} +6 -6
- package/dist/cli/{chunk-JNQECSK5.mjs → chunk-THO6F53F.mjs} +1 -1
- package/dist/cli/{chunk-W2LUUB3U.mjs → chunk-XUMWO4ST.mjs} +4 -4
- package/dist/cli/{chunk-AVSPBILZ.js → chunk-YCJMDCTH.js} +8 -8
- package/dist/cli/{chunk-DIDYT2TH.mjs → chunk-ZS2YQ4YK.mjs} +2 -2
- package/dist/cli/{client-F6SEXBBG.mjs → client-JJEEIOIL.mjs} +3 -3
- package/dist/cli/client-UPKWYV32.js +20 -0
- package/dist/cli/{csv-DC3MLBOC.mjs → csv-75D36YRA.mjs} +3 -3
- package/dist/cli/{csv-4AB42QFI.js → csv-EPNNU27J.js} +12 -12
- package/dist/cli/{db-JAQHMLUY.mjs → db-6HYSGMLN.mjs} +4 -4
- package/dist/cli/{db-M3URDTLR.js → db-SWNKJUU5.js} +29 -29
- package/dist/cli/{describe-RYXCBLJG.mjs → describe-N2KSBPOR.mjs} +8 -8
- package/dist/cli/{describe-AVXUIRDK.js → describe-XMUHTICA.js} +15 -15
- package/dist/cli/{executions-DYDW4WY3.js → executions-3ESWUDHH.js} +6 -6
- package/dist/cli/{executions-XPY5FKOS.mjs → executions-WHSG2JGN.mjs} +4 -4
- package/dist/cli/{feedback-ZOI3GFAC.mjs → feedback-2VHTJXU7.mjs} +3 -3
- package/dist/cli/{feedback-HMP2ZYNW.js → feedback-CGZE7L7A.js} +7 -7
- package/dist/cli/{git-K35PB25D.mjs → git-IG4J5OUT.mjs} +4 -4
- package/dist/cli/git-WPEOAE72.js +23 -0
- package/dist/cli/index.js +82 -82
- package/dist/cli/index.mjs +32 -32
- package/dist/cli/{legacy-noops-PKGJRS75.mjs → legacy-noops-7WXL7PB3.mjs} +4 -4
- package/dist/cli/{legacy-noops-QNNMKQDW.js → legacy-noops-QF7S6JJB.js} +7 -7
- package/dist/cli/{monitors-MUMWTBID.js → monitors-6XYT53X6.js} +85 -85
- package/dist/cli/{monitors-JMNBMRSQ.mjs → monitors-QS4QFORU.mjs} +4 -4
- package/dist/cli/{org-AQPMMPQE.mjs → org-5IGU7FES.mjs} +4 -4
- package/dist/cli/{org-2QL6AY6G.js → org-NLR3D3M7.js} +64 -64
- package/dist/cli/play-3ECRZYD5.js +153 -0
- package/dist/cli/{play-AITTTWYK.mjs → play-JVENSY4T.mjs} +7 -7
- package/dist/cli/{providers-LRCYLIQA.mjs → providers-RSVO5U4E.mjs} +4 -4
- package/dist/cli/{providers-BGTPNAOA.js → providers-T4GCIOTW.js} +7 -7
- package/dist/cli/{quickstart-WMAUXWKW.js → quickstart-IHAG5QZ6.js} +5 -5
- package/dist/cli/{quickstart-3II563Z7.mjs → quickstart-ZDFOKNYW.mjs} +3 -3
- package/dist/cli/search-RYLADJUK.js +26 -0
- package/dist/cli/{search-J6ELRZNH.mjs → search-ZGEYJSMF.mjs} +5 -5
- package/dist/cli/{secrets-HDBB2647.js → secrets-DVTEZCPE.js} +13 -13
- package/dist/cli/{secrets-L7LOTLZB.mjs → secrets-OQZRZBP6.mjs} +4 -4
- package/dist/cli/{sessions-7DMN24LF.mjs → sessions-XM7PFJL2.mjs} +4 -4
- package/dist/cli/{sessions-ZO3WB3EF.js → sessions-XYEG53JJ.js} +5 -5
- package/dist/cli/{settings-OVUM5BLZ.js → settings-NWEBQOX4.js} +74 -74
- package/dist/cli/{settings-USHCF4YD.mjs → settings-TKXYRYYH.mjs} +7 -7
- package/dist/cli/{setup-FZQ7HDL4.mjs → setup-3UD5TDRJ.mjs} +6 -6
- package/dist/cli/{setup-W77Y5ALX.js → setup-JRU6VGFQ.js} +41 -41
- package/dist/cli/{skills-A2LR3RAP.mjs → skills-GLLMNOCY.mjs} +4 -4
- package/dist/cli/skills-PZQDJJWN.js +28 -0
- package/dist/cli/{tools-FX7G7KX5.mjs → tools-VXXAMH2X.mjs} +6 -6
- package/dist/cli/tools-WYXBAUMT.js +40 -0
- package/dist/cli/{update-EODE5FHU.mjs → update-UCGMUUDQ.mjs} +6 -6
- package/dist/cli/update-WM6SOME3.js +28 -0
- package/dist/cli/{workflow-7352UH6L.mjs → workflow-BGGKNZTG.mjs} +5 -5
- package/dist/cli/{workflow-JEY4ESZA.js → workflow-G2UU7WTU.js} +15 -15
- package/dist/{client-BmKft6Pr.d.mts → client-CjHv4K6D.d.mts} +8 -0
- package/dist/{client-Bra0Nc2D.d.ts → client-rTuhNN-x.d.ts} +8 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +76 -76
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-I2E45QZK.js +0 -33
- package/dist/cli/client-VWGJIUGH.js +0 -20
- package/dist/cli/git-TJEM2U4K.js +0 -23
- package/dist/cli/play-YO52D4YP.js +0 -153
- package/dist/cli/search-FQ5NSE7R.js +0 -26
- package/dist/cli/skills-GLKEZPFV.js +0 -28
- package/dist/cli/tools-HBNJ3WP3.js +0 -40
- package/dist/cli/update-A2TZZO2S.js +0 -28
|
@@ -11,7 +11,9 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _chunk7AWSYT7Hjs = require('./chunk-7AWSYT7H.js');
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
|
|
@@ -26,7 +28,7 @@ var _chunk5O4B6AUNjs = require('./chunk-5O4B6AUN.js');
|
|
|
26
28
|
|
|
27
29
|
|
|
28
30
|
|
|
29
|
-
var
|
|
31
|
+
var _chunkDZOEDNSUjs = require('./chunk-DZOEDNSU.js');
|
|
30
32
|
|
|
31
33
|
|
|
32
34
|
|
|
@@ -40,11 +42,11 @@ var _chunkQJBJZVG6js = require('./chunk-QJBJZVG6.js');
|
|
|
40
42
|
|
|
41
43
|
|
|
42
44
|
|
|
43
|
-
var
|
|
45
|
+
var _chunkSNENR3BLjs = require('./chunk-SNENR3BL.js');
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
|
|
47
|
-
var
|
|
49
|
+
var _chunkGTC2KAZQjs = require('./chunk-GTC2KAZQ.js');
|
|
48
50
|
|
|
49
51
|
|
|
50
52
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
@@ -89,10 +91,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
89
91
|
}
|
|
90
92
|
};
|
|
91
93
|
function pendingToolExecutionPath(input) {
|
|
92
|
-
const config =
|
|
94
|
+
const config = _chunkGTC2KAZQjs.resolveConfig.call(void 0, );
|
|
93
95
|
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(_chunkNXDRDJ4Kjs.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
|
|
94
96
|
return _path.join.call(void 0,
|
|
95
|
-
|
|
97
|
+
_chunkGTC2KAZQjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
96
98
|
`pending-tool-execution-${fingerprint}.json`
|
|
97
99
|
);
|
|
98
100
|
}
|
|
@@ -243,102 +245,6 @@ function arrayField(value, key) {
|
|
|
243
245
|
return Array.isArray(candidate) ? candidate : [];
|
|
244
246
|
}
|
|
245
247
|
|
|
246
|
-
// src/cli/tool-description.ts
|
|
247
|
-
var Capability = class _Capability {
|
|
248
|
-
#catalogEntry;
|
|
249
|
-
constructor(catalogEntry) {
|
|
250
|
-
this.#catalogEntry = catalogEntry;
|
|
251
|
-
}
|
|
252
|
-
static fromCatalogEntry(catalogEntry) {
|
|
253
|
-
return new _Capability(catalogEntry);
|
|
254
|
-
}
|
|
255
|
-
describe() {
|
|
256
|
-
return CapabilityDescription.fromCatalogEntry(this.#catalogEntry);
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
var CapabilityDescription = class _CapabilityDescription {
|
|
260
|
-
#catalogEntry;
|
|
261
|
-
constructor(catalogEntry) {
|
|
262
|
-
this.#catalogEntry = catalogEntry;
|
|
263
|
-
}
|
|
264
|
-
static fromCatalogEntry(catalogEntry) {
|
|
265
|
-
return new _CapabilityDescription(catalogEntry);
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* The customer price already resolved by the catalog. This intentionally
|
|
269
|
-
* omits provider-price fields, even when a catalog Adapter carried them.
|
|
270
|
-
*/
|
|
271
|
-
customerCost() {
|
|
272
|
-
const legacyCost = recordValue(this.#catalogEntry.cost);
|
|
273
|
-
const pricing = recordValue(this.#catalogEntry.pricing);
|
|
274
|
-
const unit = stringValue(pricing.unit);
|
|
275
|
-
const legacyPricingModel = stringValue(
|
|
276
|
-
_nullishCoalesce(legacyCost.pricingModel, () => ( legacyCost.pricing_model))
|
|
277
|
-
);
|
|
278
|
-
const pricingModel = unit === "call" ? "fixed" : unit === "result" || unit === "page" ? `per_${unit}` : unit === "usage" ? "provider_usage" : legacyPricingModel;
|
|
279
|
-
const canonicalCredits = pricingNumber(
|
|
280
|
-
pricing,
|
|
281
|
-
"creditsPerUnit",
|
|
282
|
-
"credits_per_unit",
|
|
283
|
-
_nullishCoalesce(this.#catalogEntry.deeplineCreditsPerPricingUnit, () => ( this.#catalogEntry.deepline_credits_per_pricing_unit))
|
|
284
|
-
);
|
|
285
|
-
const canonicalUsd = pricingNumber(
|
|
286
|
-
pricing,
|
|
287
|
-
"usdPerUnit",
|
|
288
|
-
"usd_per_unit",
|
|
289
|
-
_nullishCoalesce(this.#catalogEntry.deeplineUsdPerPricingUnit, () => ( this.#catalogEntry.deepline_usd_per_pricing_unit))
|
|
290
|
-
);
|
|
291
|
-
const billingSource = stringValue(
|
|
292
|
-
_nullishCoalesce(this.#catalogEntry.billingSource, () => ( this.#catalogEntry.billing_source))
|
|
293
|
-
);
|
|
294
|
-
const billingSourceLabel = stringValue(
|
|
295
|
-
_nullishCoalesce(this.#catalogEntry.billingSourceLabel, () => ( this.#catalogEntry.billing_source_label))
|
|
296
|
-
);
|
|
297
|
-
const isFree = billingSource === "free";
|
|
298
|
-
return {
|
|
299
|
-
pricingModel: pricingModel || null,
|
|
300
|
-
unit: unit || null,
|
|
301
|
-
displayText: isFree ? "Free" : stringValue(_nullishCoalesce(pricing.displayText, () => ( pricing.display_text))),
|
|
302
|
-
summary: isFree ? null : stringValue(pricing.summary),
|
|
303
|
-
billingMode: stringValue(
|
|
304
|
-
_nullishCoalesce(legacyCost.billingMode, () => ( legacyCost.billing_mode))
|
|
305
|
-
),
|
|
306
|
-
billingSource,
|
|
307
|
-
billingSourceLabel,
|
|
308
|
-
deeplineCreditsPerPricingUnit: isFree ? 0 : canonicalCredits,
|
|
309
|
-
deeplineUsdPerPricingUnit: isFree ? 0 : canonicalUsd,
|
|
310
|
-
...pricing.estimatedRange && !isFree && billingSource !== "own_provider_credentials" ? {
|
|
311
|
-
estimatedRange: pricing.estimatedRange,
|
|
312
|
-
details: Array.isArray(pricing.details) ? pricing.details.filter(
|
|
313
|
-
(value) => typeof value === "string"
|
|
314
|
-
) : []
|
|
315
|
-
} : {},
|
|
316
|
-
...pricing.observedReference && !isFree && billingSource !== "own_provider_credentials" ? {
|
|
317
|
-
observedReference: pricing.observedReference,
|
|
318
|
-
details: Array.isArray(pricing.details) ? pricing.details.filter(
|
|
319
|
-
(value) => typeof value === "string"
|
|
320
|
-
) : []
|
|
321
|
-
} : {}
|
|
322
|
-
};
|
|
323
|
-
}
|
|
324
|
-
};
|
|
325
|
-
function recordValue(value) {
|
|
326
|
-
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
327
|
-
}
|
|
328
|
-
function stringValue(value) {
|
|
329
|
-
return typeof value === "string" && value.trim() ? value : null;
|
|
330
|
-
}
|
|
331
|
-
function numberValue(value) {
|
|
332
|
-
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
333
|
-
}
|
|
334
|
-
function pricingNumber(pricing, canonicalKey, aliasKey, legacyValue) {
|
|
335
|
-
for (const key of [canonicalKey, aliasKey]) {
|
|
336
|
-
if (Object.prototype.hasOwnProperty.call(pricing, key))
|
|
337
|
-
return numberValue(pricing[key]);
|
|
338
|
-
}
|
|
339
|
-
return numberValue(legacyValue);
|
|
340
|
-
}
|
|
341
|
-
|
|
342
248
|
// src/cli/tool-connection-status.ts
|
|
343
249
|
function toolConnectionStatusMessage(input) {
|
|
344
250
|
if (input.credentialStatus === "requires_connection") {
|
|
@@ -536,12 +442,12 @@ function categoryEnumerationRender(summaries) {
|
|
|
536
442
|
};
|
|
537
443
|
}
|
|
538
444
|
async function listToolCategories(emitJson, compact) {
|
|
539
|
-
const client = new (0,
|
|
445
|
+
const client = new (0, _chunkDZOEDNSUjs.DeeplineClient)();
|
|
540
446
|
const rawTools = await client.listTools({ compact });
|
|
541
447
|
const items = rawTools.map(toListedTool);
|
|
542
448
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
543
449
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
544
|
-
|
|
450
|
+
_chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
|
|
545
451
|
{
|
|
546
452
|
tools: outputItems,
|
|
547
453
|
count: outputItems.length,
|
|
@@ -560,7 +466,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
560
466
|
const known = summaries.map((item) => item.name);
|
|
561
467
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
562
468
|
if (emitJson) {
|
|
563
|
-
|
|
469
|
+
_chunkSNENR3BLjs.printJson.call(void 0, {
|
|
564
470
|
ok: false,
|
|
565
471
|
exitCode: 4,
|
|
566
472
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -574,13 +480,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
574
480
|
const render = categoryEnumerationRender(summaries);
|
|
575
481
|
console.error(message);
|
|
576
482
|
console.error("");
|
|
577
|
-
console.error(
|
|
483
|
+
console.error(_chunkSNENR3BLjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
578
484
|
console.error("");
|
|
579
485
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
580
486
|
return 4;
|
|
581
487
|
}
|
|
582
488
|
async function listToolsInCategory(category, emitJson) {
|
|
583
|
-
const client = new (0,
|
|
489
|
+
const client = new (0, _chunkDZOEDNSUjs.DeeplineClient)();
|
|
584
490
|
const rawTools = await client.listTools({
|
|
585
491
|
categories: category,
|
|
586
492
|
compact: false
|
|
@@ -617,7 +523,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
617
523
|
}
|
|
618
524
|
]
|
|
619
525
|
};
|
|
620
|
-
|
|
526
|
+
_chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
|
|
621
527
|
{
|
|
622
528
|
category,
|
|
623
529
|
total: rows.length,
|
|
@@ -630,7 +536,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
630
536
|
return 0;
|
|
631
537
|
}
|
|
632
538
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
633
|
-
const client = new (0,
|
|
539
|
+
const client = new (0, _chunkDZOEDNSUjs.DeeplineClient)();
|
|
634
540
|
const items = (await client.listTools({
|
|
635
541
|
categories: requestedCategories.join(","),
|
|
636
542
|
compact
|
|
@@ -659,7 +565,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
659
565
|
]
|
|
660
566
|
};
|
|
661
567
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
662
|
-
|
|
568
|
+
_chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
|
|
663
569
|
{
|
|
664
570
|
tools: outputItems,
|
|
665
571
|
count: outputItems.length,
|
|
@@ -678,13 +584,13 @@ async function listTools(category, options = {}) {
|
|
|
678
584
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]), () => ( ""));
|
|
679
585
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
680
586
|
const compact = options.compact !== false;
|
|
681
|
-
const emitJson = options.json === true ||
|
|
587
|
+
const emitJson = options.json === true || _chunkSNENR3BLjs.shouldEmitJson.call(void 0, );
|
|
682
588
|
if (positional && flagCategories.length > 0) {
|
|
683
589
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
684
590
|
if (!flagIsSameSingle) {
|
|
685
591
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
686
592
|
if (emitJson) {
|
|
687
|
-
|
|
593
|
+
_chunkSNENR3BLjs.printJson.call(void 0, {
|
|
688
594
|
ok: false,
|
|
689
595
|
exitCode: 2,
|
|
690
596
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -711,7 +617,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
711
617
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
712
618
|
return 1;
|
|
713
619
|
}
|
|
714
|
-
const client = new (0,
|
|
620
|
+
const client = new (0, _chunkDZOEDNSUjs.DeeplineClient)();
|
|
715
621
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
716
622
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
717
623
|
const jsonOutput = options.json === true;
|
|
@@ -754,7 +660,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
754
660
|
query,
|
|
755
661
|
mode
|
|
756
662
|
}) : null;
|
|
757
|
-
|
|
663
|
+
_chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
|
|
758
664
|
{
|
|
759
665
|
tools: outputTools,
|
|
760
666
|
count: outputTools.length,
|
|
@@ -772,7 +678,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
772
678
|
} : {},
|
|
773
679
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
774
680
|
},
|
|
775
|
-
{ json: options.json ||
|
|
681
|
+
{ json: options.json || _chunkSNENR3BLjs.shouldEmitJson.call(void 0, ) }
|
|
776
682
|
);
|
|
777
683
|
return 0;
|
|
778
684
|
}
|
|
@@ -928,7 +834,7 @@ Examples:
|
|
|
928
834
|
json: Boolean(options.json)
|
|
929
835
|
});
|
|
930
836
|
});
|
|
931
|
-
|
|
837
|
+
_chunk7AWSYT7Hjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
932
838
|
tools.command("grep <query>").description(
|
|
933
839
|
"Literal grep over tool ids, descriptions, categories, and input fields."
|
|
934
840
|
).addHelpText(
|
|
@@ -1030,7 +936,7 @@ Examples:
|
|
|
1030
936
|
process.exitCode = await narrowView();
|
|
1031
937
|
return;
|
|
1032
938
|
}
|
|
1033
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
939
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-XMUHTICA.js")));
|
|
1034
940
|
process.exitCode = await describeAnything(
|
|
1035
941
|
toolId,
|
|
1036
942
|
{ ...options, kinds: ["tools", "monitors"], fetchedTool: metadata },
|
|
@@ -1112,7 +1018,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1112
1018
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1113
1019
|
return 1;
|
|
1114
1020
|
}
|
|
1115
|
-
const client = new (0,
|
|
1021
|
+
const client = new (0, _chunkDZOEDNSUjs.DeeplineClient)();
|
|
1116
1022
|
let tool;
|
|
1117
1023
|
try {
|
|
1118
1024
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1166,10 +1072,10 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1166
1072
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1167
1073
|
if (inferenceQuote)
|
|
1168
1074
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1169
|
-
|
|
1075
|
+
_chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
|
|
1170
1076
|
{
|
|
1171
1077
|
toolId: String(tool.toolId || toolId),
|
|
1172
|
-
cost: Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1078
|
+
cost: _chunk7AWSYT7Hjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1173
1079
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1174
1080
|
...isMonitorTypeTool(tool) ? { pricing: recordField(tool, "pricing") } : {},
|
|
1175
1081
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -1184,7 +1090,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1184
1090
|
}
|
|
1185
1091
|
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !isMonitorTypeTool(tool) && !isPlayLikeTool(tool) && (options.json || options.contractJson)) {
|
|
1186
1092
|
const contract = toolContractJsonForDescribe(tool, toolId);
|
|
1187
|
-
|
|
1093
|
+
_chunkSNENR3BLjs.printCompactJson.call(void 0, {
|
|
1188
1094
|
toolId: contract.toolId,
|
|
1189
1095
|
...options.schemaOnly ? {
|
|
1190
1096
|
inputSchema: contract.inputSchema,
|
|
@@ -1207,7 +1113,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1207
1113
|
return 0;
|
|
1208
1114
|
}
|
|
1209
1115
|
if (options.contractJson) {
|
|
1210
|
-
|
|
1116
|
+
_chunkSNENR3BLjs.printCompactJson.call(void 0, {
|
|
1211
1117
|
...toolContractJsonForDescribe(tool, toolId),
|
|
1212
1118
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1213
1119
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -1216,7 +1122,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1216
1122
|
}
|
|
1217
1123
|
const emitJson = options.json === true;
|
|
1218
1124
|
if (emitJson) {
|
|
1219
|
-
|
|
1125
|
+
_chunkSNENR3BLjs.printCompactJson.call(void 0, {
|
|
1220
1126
|
...toolMetadataJsonForDescribe(tool, toolId),
|
|
1221
1127
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1222
1128
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -1293,7 +1199,7 @@ function toolContractJsonForDescribe(tool, requestedToolId, authoringContractEdi
|
|
|
1293
1199
|
const extractedValues = extractionContractEntries(
|
|
1294
1200
|
arrayField2(toolExecutionResult, "extractedValues", "extracted_values")
|
|
1295
1201
|
);
|
|
1296
|
-
const pricing = Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1202
|
+
const pricing = _chunk7AWSYT7Hjs.Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1297
1203
|
const executionMetadataRecord = recordField(
|
|
1298
1204
|
tool,
|
|
1299
1205
|
"executionMetadata",
|
|
@@ -1587,7 +1493,8 @@ function describedTool(tool, requestedToolId) {
|
|
|
1587
1493
|
cost: [
|
|
1588
1494
|
stringField2(cost, "displayText"),
|
|
1589
1495
|
// "Free (free)" says the same thing twice.
|
|
1590
|
-
billing.toLowerCase() === stringField2(cost, "displayText").toLowerCase() ? "" : billing && `(${billing})
|
|
1496
|
+
billing.toLowerCase() === stringField2(cost, "displayText").toLowerCase() ? "" : billing && `(${billing})`,
|
|
1497
|
+
_chunk7AWSYT7Hjs.observedMaxText.call(void 0, cost) && `\u2014 ${_chunk7AWSYT7Hjs.observedMaxText.call(void 0, cost)}`
|
|
1591
1498
|
].filter(Boolean).join(" ") || void 0,
|
|
1592
1499
|
guidance: [
|
|
1593
1500
|
...contract.deprecated === true ? [`Deprecated. ${stringField2(deprecation, "message")}`.trim()] : [],
|
|
@@ -1724,7 +1631,7 @@ function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
|
1724
1631
|
return monitorTypePricingLines(tool);
|
|
1725
1632
|
}
|
|
1726
1633
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1727
|
-
const cost = Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1634
|
+
const cost = _chunk7AWSYT7Hjs.Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1728
1635
|
const pricingModel = stringField2(cost, "pricingModel") || "unknown";
|
|
1729
1636
|
const billing = stringField2(cost, "billingSourceLabel") || stringField2(cost, "billingSource") || stringField2(cost, "billingMode") || "unknown";
|
|
1730
1637
|
const explicitUnit = stringField2(cost, "unit");
|
|
@@ -1736,6 +1643,7 @@ function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
|
1736
1643
|
const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
|
|
1737
1644
|
return [
|
|
1738
1645
|
`${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
|
|
1646
|
+
..._chunk7AWSYT7Hjs.observedMaxText.call(void 0, cost) ? [` ${_chunk7AWSYT7Hjs.observedMaxText.call(void 0, cost)}`] : [],
|
|
1739
1647
|
...cost.observedReference || cost.estimatedRange ? [
|
|
1740
1648
|
...summary ? [` ${summary}`] : [],
|
|
1741
1649
|
...(_nullishCoalesce(cost.details, () => ( []))).map((detail) => ` ${detail}`)
|
|
@@ -2013,7 +1921,7 @@ function toolMetadataJsonForDescribe(tool, requestedToolId) {
|
|
|
2013
1921
|
} = tool;
|
|
2014
1922
|
const outputSchemaRecord = recordField(tool, "outputSchema", "output_schema");
|
|
2015
1923
|
return {
|
|
2016
|
-
cost: Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1924
|
+
cost: _chunk7AWSYT7Hjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
2017
1925
|
...publicTool,
|
|
2018
1926
|
toolId,
|
|
2019
1927
|
provider: tool.provider,
|
|
@@ -2627,7 +2535,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2627
2535
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2628
2536
|
}
|
|
2629
2537
|
if (options.idempotencyKey !== void 0) {
|
|
2630
|
-
|
|
2538
|
+
_chunkDZOEDNSUjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2631
2539
|
}
|
|
2632
2540
|
if (options.recoveryTimeoutMs !== void 0) {
|
|
2633
2541
|
const parsed = Number(options.recoveryTimeoutMs);
|
|
@@ -2938,20 +2846,20 @@ function buildToolExecuteRowArtifactEnvelope(input) {
|
|
|
2938
2846
|
}
|
|
2939
2847
|
async function executeTool(toolId, options) {
|
|
2940
2848
|
const output = toolExecuteJsonOption(options.json);
|
|
2941
|
-
const wantsJson =
|
|
2849
|
+
const wantsJson = _chunkSNENR3BLjs.shouldEmitJson.call(void 0, output.requested);
|
|
2942
2850
|
let parsed;
|
|
2943
2851
|
try {
|
|
2944
2852
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2945
2853
|
} catch (error) {
|
|
2946
2854
|
if (wantsJson) {
|
|
2947
|
-
|
|
2855
|
+
_chunkSNENR3BLjs.printJsonError.call(void 0, error);
|
|
2948
2856
|
} else {
|
|
2949
2857
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2950
2858
|
}
|
|
2951
2859
|
return error instanceof _chunk7P5AA3SNjs.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2952
2860
|
}
|
|
2953
2861
|
const cliInvocationId = _nullishCoalesce(_chunkQJBJZVG6js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkQJBJZVG6js.beginToolExecuteCommand.call(void 0, )));
|
|
2954
|
-
const client = new (0,
|
|
2862
|
+
const client = new (0, _chunkDZOEDNSUjs.DeeplineClient)();
|
|
2955
2863
|
let metadata;
|
|
2956
2864
|
try {
|
|
2957
2865
|
metadata = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0,
|
|
@@ -2966,7 +2874,7 @@ async function executeTool(toolId, options) {
|
|
|
2966
2874
|
);
|
|
2967
2875
|
if (play) {
|
|
2968
2876
|
if (wantsJson) {
|
|
2969
|
-
|
|
2877
|
+
_chunkSNENR3BLjs.printJsonError.call(void 0,
|
|
2970
2878
|
new Error(playAliasToolErrorMessage(parsed.toolId, play))
|
|
2971
2879
|
);
|
|
2972
2880
|
} else {
|
|
@@ -2979,7 +2887,7 @@ async function executeTool(toolId, options) {
|
|
|
2979
2887
|
}
|
|
2980
2888
|
if (isPlayLikeTool(metadata)) {
|
|
2981
2889
|
if (wantsJson) {
|
|
2982
|
-
|
|
2890
|
+
_chunkSNENR3BLjs.printJsonError.call(void 0,
|
|
2983
2891
|
new Error(
|
|
2984
2892
|
playLikeToolExecuteErrorMessage(
|
|
2985
2893
|
parsed.toolId,
|
|
@@ -3015,7 +2923,7 @@ async function executeTool(toolId, options) {
|
|
|
3015
2923
|
responseIntent,
|
|
3016
2924
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
3017
2925
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
3018
|
-
searchRef:
|
|
2926
|
+
searchRef: _chunk7AWSYT7Hjs.recentSearchRef.call(void 0, ),
|
|
3019
2927
|
cliInvocationId,
|
|
3020
2928
|
onResponseReceived: _chunkMX53GIOBjs.recordApiResponse
|
|
3021
2929
|
}).catch((error) => {
|
|
@@ -3055,8 +2963,8 @@ async function executeTool(toolId, options) {
|
|
|
3055
2963
|
);
|
|
3056
2964
|
const executeExitCode = toolExecuteExitCode(baseEnvelope);
|
|
3057
2965
|
const delivered = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0, "output delivery", () => {
|
|
3058
|
-
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" &&
|
|
3059
|
-
|
|
2966
|
+
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && _chunkSNENR3BLjs.shouldEmitJson.call(void 0, ))) {
|
|
2967
|
+
_chunkSNENR3BLjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: true });
|
|
3060
2968
|
return true;
|
|
3061
2969
|
}
|
|
3062
2970
|
if (parsed.outputFormat === "json_file") {
|
|
@@ -3064,7 +2972,7 @@ async function executeTool(toolId, options) {
|
|
|
3064
2972
|
rawResponse,
|
|
3065
2973
|
`payload_${parsed.toolId}`
|
|
3066
2974
|
);
|
|
3067
|
-
|
|
2975
|
+
_chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
|
|
3068
2976
|
{
|
|
3069
2977
|
...baseEnvelope,
|
|
3070
2978
|
local: {
|
|
@@ -3086,7 +2994,7 @@ async function executeTool(toolId, options) {
|
|
|
3086
2994
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3087
2995
|
);
|
|
3088
2996
|
if (wantsJson) {
|
|
3089
|
-
|
|
2997
|
+
_chunkSNENR3BLjs.printJsonError.call(void 0, error);
|
|
3090
2998
|
} else {
|
|
3091
2999
|
console.error(error.message);
|
|
3092
3000
|
}
|
|
@@ -3097,18 +3005,18 @@ async function executeTool(toolId, options) {
|
|
|
3097
3005
|
rawResponse,
|
|
3098
3006
|
`payload_${parsed.toolId}`
|
|
3099
3007
|
);
|
|
3100
|
-
|
|
3008
|
+
_chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
|
|
3101
3009
|
{
|
|
3102
3010
|
...baseEnvelope,
|
|
3103
3011
|
local: {
|
|
3104
3012
|
payload_file: jsonPath
|
|
3105
3013
|
}
|
|
3106
3014
|
},
|
|
3107
|
-
{ json: parsed.outputFormat === "csv_file" ||
|
|
3015
|
+
{ json: parsed.outputFormat === "csv_file" || _chunkSNENR3BLjs.shouldEmitJson.call(void 0, ) }
|
|
3108
3016
|
);
|
|
3109
3017
|
return true;
|
|
3110
3018
|
}
|
|
3111
|
-
|
|
3019
|
+
_chunkSNENR3BLjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: false });
|
|
3112
3020
|
return true;
|
|
3113
3021
|
}
|
|
3114
3022
|
const rowOutput = _chunkNXDRDJ4Kjs.projectRowOutput.call(void 0, listConversion);
|
|
@@ -3132,7 +3040,7 @@ async function executeTool(toolId, options) {
|
|
|
3132
3040
|
seededScript
|
|
3133
3041
|
});
|
|
3134
3042
|
if (parsed.outputFormat === "csv_file") {
|
|
3135
|
-
|
|
3043
|
+
_chunkSNENR3BLjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: true });
|
|
3136
3044
|
return true;
|
|
3137
3045
|
}
|
|
3138
3046
|
if (parsed.outPath) {
|
|
@@ -3140,7 +3048,7 @@ async function executeTool(toolId, options) {
|
|
|
3140
3048
|
toolId: parsed.toolId,
|
|
3141
3049
|
idempotencyKey
|
|
3142
3050
|
});
|
|
3143
|
-
|
|
3051
|
+
_chunkSNENR3BLjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
|
|
3144
3052
|
json: wantsJson,
|
|
3145
3053
|
text: `Wrote ${csv.rowCount} row(s) to ${csv.path}
|
|
3146
3054
|
inspect: ${inspection.inspect}
|
|
@@ -3149,7 +3057,7 @@ inspect: ${inspection.inspect}
|
|
|
3149
3057
|
return true;
|
|
3150
3058
|
}
|
|
3151
3059
|
if (parsed.noPreview) {
|
|
3152
|
-
|
|
3060
|
+
_chunkSNENR3BLjs.printCommandEnvelope.call(void 0,
|
|
3153
3061
|
{
|
|
3154
3062
|
...materializedEnvelope,
|
|
3155
3063
|
local: {
|
|
@@ -3157,12 +3065,12 @@ inspect: ${inspection.inspect}
|
|
|
3157
3065
|
output_path: csv.path
|
|
3158
3066
|
}
|
|
3159
3067
|
},
|
|
3160
|
-
{ json:
|
|
3068
|
+
{ json: _chunkSNENR3BLjs.shouldEmitJson.call(void 0, ), text: `${csv.path}
|
|
3161
3069
|
` }
|
|
3162
3070
|
);
|
|
3163
3071
|
return true;
|
|
3164
3072
|
}
|
|
3165
|
-
|
|
3073
|
+
_chunkSNENR3BLjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: false });
|
|
3166
3074
|
return true;
|
|
3167
3075
|
});
|
|
3168
3076
|
if (delivered) {
|