deepline 0.3.441 → 0.3.443
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 +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +37 -15
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +34 -21
- package/dist/bundling-sources/shared_libs/product-notifications/default-policy.ts +1 -1
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +11 -0
- package/dist/cli/auth-AZVWLMZN.js +40 -0
- package/dist/cli/{auth-D2ZF664Y.mjs → auth-CP2CAI7J.mjs} +4 -4
- package/dist/cli/{billing-5OLSZRHE.js → billing-JYSP3C76.js} +73 -73
- package/dist/cli/{billing-4MIYCPSV.mjs → billing-N36FL3GI.mjs} +4 -4
- package/dist/cli/{chunk-PPJ4PF6F.mjs → chunk-4A45A2MH.mjs} +1 -1
- package/dist/cli/{chunk-FOLT3LUQ.mjs → chunk-6NUGMJQA.mjs} +4 -1
- package/dist/cli/{chunk-GAGGHXYN.js → chunk-6RKZVPFA.js} +2 -2
- package/dist/cli/{chunk-DE354WOP.js → chunk-757V3FDW.js} +2 -2
- package/dist/cli/{chunk-AG5SQSH5.js → chunk-75VUSWF3.js} +6 -6
- package/dist/cli/{chunk-2LVCAPN7.mjs → chunk-B6AWQQK6.mjs} +3 -3
- package/dist/cli/{chunk-OWXLYPMV.js → chunk-BE2GX674.js} +20 -20
- package/dist/cli/{chunk-XM5Z53VA.js → chunk-CGZ2KKPM.js} +10 -10
- package/dist/cli/{chunk-2GNX6SCO.mjs → chunk-CO3S56DX.mjs} +7 -2
- package/dist/cli/{chunk-LB5TQPKK.mjs → chunk-DOKTNYMQ.mjs} +1 -1
- package/dist/cli/{chunk-M65GHY4K.mjs → chunk-DPEPHLAF.mjs} +1 -1
- package/dist/cli/{chunk-3IRJIEIE.js → chunk-EWXXWSQM.js} +11 -8
- package/dist/cli/{chunk-KPKU53YO.mjs → chunk-FKAHVFPJ.mjs} +1 -1
- package/dist/cli/{chunk-PUWMWNBM.mjs → chunk-FRZLWUM6.mjs} +3 -3
- package/dist/cli/{chunk-DIDMHGVH.mjs → chunk-FU7ELMKS.mjs} +1 -1
- package/dist/cli/{chunk-POSRLOHP.mjs → chunk-GVPHPLAX.mjs} +3 -3
- package/dist/cli/{chunk-4N3ZT6OJ.mjs → chunk-HHOJXBQQ.mjs} +2 -2
- package/dist/cli/{chunk-DM6Q634K.js → chunk-HTAXXY66.js} +7 -2
- package/dist/cli/{chunk-SKXQZUMX.mjs → chunk-HU6PIQDF.mjs} +2 -2
- package/dist/cli/{chunk-3XPO3MWC.js → chunk-K4ELTQAT.js} +8 -8
- package/dist/cli/{chunk-AVQ4V6Y7.js → chunk-KJH4C2IJ.js} +249 -245
- package/dist/cli/{chunk-GEQOPXOS.js → chunk-KNAKCMGJ.js} +17 -17
- package/dist/cli/{chunk-27LQEDGO.js → chunk-KZ2VAXB6.js} +16 -16
- package/dist/cli/{chunk-NYLJMRYD.mjs → chunk-L3CW2G7L.mjs} +2 -2
- package/dist/cli/{chunk-VUYUI35Q.js → chunk-LRNYRGCN.js} +20 -11
- package/dist/cli/{chunk-DV4G676C.js → chunk-LVM7CSAH.js} +8 -8
- package/dist/cli/{chunk-KSWTIOZT.mjs → chunk-MQYBXB2J.mjs} +15 -11
- package/dist/cli/{chunk-55GDG7QJ.mjs → chunk-MRW6XPDH.mjs} +1 -1
- package/dist/cli/{chunk-UJLPE55B.js → chunk-MWUTMJCU.js} +1 -1
- package/dist/cli/{chunk-HS6ASYW5.mjs → chunk-MZLZNISS.mjs} +2 -2
- package/dist/cli/{chunk-F2EMJUDJ.js → chunk-OSYT3QQD.js} +26 -26
- package/dist/cli/{chunk-GXOQRZXG.js → chunk-PP66EATA.js} +2 -2
- package/dist/cli/{chunk-HUH6EA5B.js → chunk-PXXIBSBG.js} +4 -4
- package/dist/cli/{chunk-R2QWSSAG.js → chunk-QFXPA2E4.js} +7 -7
- package/dist/cli/{chunk-ARVYJDPQ.mjs → chunk-VXGLDGOF.mjs} +4 -4
- package/dist/cli/{chunk-MLJBCS3E.mjs → chunk-W25OALCJ.mjs} +10 -1
- package/dist/cli/{chunk-XUART5TY.mjs → chunk-WOUFCLTM.mjs} +5 -5
- package/dist/cli/{chunk-LXTSVUZN.mjs → chunk-WQPJQEDE.mjs} +1 -1
- package/dist/cli/{chunk-2VZKT2PE.js → chunk-XIJL6UMV.js} +35 -35
- package/dist/cli/{chunk-AZZCCHOL.mjs → chunk-Y45RAHEA.mjs} +2 -2
- package/dist/cli/{chunk-2MMUUSBN.js → chunk-YV6N4BF2.js} +52 -52
- package/dist/cli/{chunk-PNS3K6A2.js → chunk-ZXJQ26QG.js} +50 -50
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-ZWRKX6NU.mjs → csv-Z53PJEPZ.mjs} +3 -3
- package/dist/cli/{csv-PWSQ7DBG.js → csv-ZQFVZ4R3.js} +12 -12
- package/dist/cli/{db-AYIEGUOY.mjs → db-4CNIBR5P.mjs} +4 -4
- package/dist/cli/{db-M24C22YN.js → db-OHBRQL2N.js} +25 -25
- package/dist/cli/{describe-F34NXGCE.js → describe-AEM7SYXF.js} +24 -24
- package/dist/cli/{describe-K2CCAFJO.mjs → describe-GAR4MEGX.mjs} +16 -16
- package/dist/cli/describe-core.d.mts +1 -1
- package/dist/cli/describe-core.d.ts +1 -1
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-UHHRRBBT.js → executions-CST4IDL3.js} +6 -6
- package/dist/cli/{executions-TMH5FSYX.mjs → executions-YBZPFAD6.mjs} +4 -4
- package/dist/cli/{feedback-GCTX3HJS.mjs → feedback-FHJE6YDU.mjs} +3 -3
- package/dist/cli/{feedback-Z7C47J2X.js → feedback-MEJZGB4C.js} +7 -7
- package/dist/cli/{git-RDHXJML2.mjs → git-FIGXIUM5.mjs} +4 -4
- package/dist/cli/git-PANOVLJC.js +24 -0
- package/dist/cli/index.js +135 -135
- package/dist/cli/index.mjs +37 -37
- package/dist/cli/{legacy-noops-3E75KHWC.mjs → legacy-noops-AXHAIAMH.mjs} +4 -4
- package/dist/cli/{legacy-noops-X6QQUMNF.js → legacy-noops-BE3VVOYG.js} +7 -7
- package/dist/cli/{monitors-AVTVW5L2.js → monitors-5OTJUY43.js} +84 -84
- package/dist/cli/{monitors-HCNIDGV2.mjs → monitors-YTWELXP7.mjs} +4 -4
- package/dist/cli/{org-ILD73S74.mjs → org-WCKS4ZDK.mjs} +4 -4
- package/dist/cli/{org-QUJYCJJE.js → org-Y5DMTECB.js} +66 -66
- package/dist/cli/{play-7M53PMCN.js → play-B6Y6ZCPV.js} +296 -296
- package/dist/cli/{play-DQJ7LGQG.mjs → play-UYAZYXHV.mjs} +12 -12
- package/dist/cli/{providers-WV35XXID.mjs → providers-IZVVGFAO.mjs} +4 -4
- package/dist/cli/{providers-3HC5S52G.js → providers-U7BLFNT4.js} +7 -7
- package/dist/cli/{quickstart-UESOANHH.mjs → quickstart-BY7N6GXZ.mjs} +3 -3
- package/dist/cli/{quickstart-KJZOURAH.js → quickstart-MTNOTGIH.js} +5 -5
- package/dist/cli/{search-V3ZQE4UU.mjs → search-SJXJKATQ.mjs} +5 -5
- package/dist/cli/search-W7VXB4YP.js +30 -0
- package/dist/cli/{secrets-IU2FWIQI.js → secrets-C2FN2YMO.js} +13 -13
- package/dist/cli/{secrets-ILDTXJ3L.mjs → secrets-IA6JBZEF.mjs} +4 -4
- package/dist/cli/{sessions-Y25VJZSV.js → sessions-HGJQTLZP.js} +5 -5
- package/dist/cli/{sessions-4M6WBATB.mjs → sessions-MNK7ZR2Y.mjs} +4 -4
- package/dist/cli/{settings-Z4R5U5OZ.mjs → settings-7UBMCVFK.mjs} +8 -8
- package/dist/cli/{settings-5BMSV6EL.js → settings-MRMSITAL.js} +75 -75
- package/dist/cli/{setup-FWSJMJWR.mjs → setup-MD4F55X4.mjs} +7 -7
- package/dist/cli/{setup-QZ3ZN4RI.js → setup-UX7KNUOW.js} +42 -42
- package/dist/cli/{skills-RA7HJTXG.mjs → skills-W7SAJDG6.mjs} +5 -5
- package/dist/cli/skills-ZY4KFM33.js +29 -0
- package/dist/cli/tools-6G4PXAZ3.js +44 -0
- package/dist/cli/{tools-5VI3FPWV.mjs → tools-VAWJLJAK.mjs} +15 -15
- package/dist/cli/update-3D4R5FW6.js +31 -0
- package/dist/cli/{update-O7B44SN5.mjs → update-B2UOERFE.mjs} +7 -7
- package/dist/cli/{workflow-3MOKM4IM.mjs → workflow-3BYE3YFQ.mjs} +5 -5
- package/dist/cli/{workflow-7W3BTJPH.js → workflow-K2YJNF64.js} +15 -15
- package/dist/{client-BqQ7Rb11.d.ts → client-CBitBZpr.d.ts} +15 -3
- package/dist/{client-BCmnJaL9.d.mts → client-CTUbBRgg.d.mts} +15 -3
- 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 +90 -90
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- 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-XTW4JZT4.js +0 -40
- package/dist/cli/git-MCFHPAML.js +0 -24
- package/dist/cli/search-255SE477.js +0 -30
- package/dist/cli/skills-4JXC4C57.js +0 -29
- package/dist/cli/tools-BGVCWIZ5.js +0 -44
- package/dist/cli/update-GPXJHQXJ.js +0 -31
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkPP66EATAjs = require('./chunk-PP66EATA.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkLVM7CSAHjs = require('./chunk-LVM7CSAH.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -24,7 +24,10 @@ var _chunkDV4G676Cjs = require('./chunk-DV4G676C.js');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkQFXPA2E4js = require('./chunk-QFXPA2E4.js');
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
var _chunkLRNYRGCNjs = require('./chunk-LRNYRGCN.js');
|
|
28
31
|
|
|
29
32
|
|
|
30
33
|
var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
@@ -45,7 +48,7 @@ var _chunkHGFFYVXNjs = require('./chunk-HGFFYVXN.js');
|
|
|
45
48
|
|
|
46
49
|
|
|
47
50
|
|
|
48
|
-
var
|
|
51
|
+
var _chunkCGZ2KKPMjs = require('./chunk-CGZ2KKPM.js');
|
|
49
52
|
|
|
50
53
|
|
|
51
54
|
var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
|
|
@@ -55,18 +58,18 @@ var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
|
|
|
55
58
|
|
|
56
59
|
|
|
57
60
|
|
|
58
|
-
var
|
|
61
|
+
var _chunkBE2GX674js = require('./chunk-BE2GX674.js');
|
|
59
62
|
|
|
60
63
|
|
|
61
64
|
|
|
62
65
|
|
|
63
|
-
var
|
|
66
|
+
var _chunk757V3FDWjs = require('./chunk-757V3FDW.js');
|
|
64
67
|
|
|
65
68
|
|
|
66
69
|
|
|
67
70
|
|
|
68
71
|
|
|
69
|
-
var
|
|
72
|
+
var _chunkYV6N4BF2js = require('./chunk-YV6N4BF2.js');
|
|
70
73
|
|
|
71
74
|
|
|
72
75
|
|
|
@@ -74,12 +77,12 @@ var _chunk2MMUUSBNjs = require('./chunk-2MMUUSBN.js');
|
|
|
74
77
|
|
|
75
78
|
|
|
76
79
|
|
|
77
|
-
var
|
|
80
|
+
var _chunkEWXXWSQMjs = require('./chunk-EWXXWSQM.js');
|
|
78
81
|
|
|
79
82
|
|
|
80
83
|
|
|
81
84
|
|
|
82
|
-
var
|
|
85
|
+
var _chunkPXXIBSBGjs = require('./chunk-PXXIBSBG.js');
|
|
83
86
|
|
|
84
87
|
|
|
85
88
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
@@ -158,10 +161,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
158
161
|
}
|
|
159
162
|
};
|
|
160
163
|
function pendingToolExecutionPath(input) {
|
|
161
|
-
const config =
|
|
164
|
+
const config = _chunkPXXIBSBGjs.resolveConfig.call(void 0, );
|
|
162
165
|
const fingerprint = _crypto.createHash.call(void 0, "sha256").update(config.baseUrl).update("\0").update(_crypto.createHash.call(void 0, "sha256").update(config.apiKey).digest("hex")).update("\0").update(input.toolId).update("\0").update(_chunkXDVT3GOMjs.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
|
|
163
166
|
return _path.join.call(void 0,
|
|
164
|
-
|
|
167
|
+
_chunkPXXIBSBGjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
165
168
|
`pending-tool-execution-${fingerprint}.json`
|
|
166
169
|
);
|
|
167
170
|
}
|
|
@@ -276,13 +279,13 @@ var TOOL_COMMAND_TEMPLATES = {
|
|
|
276
279
|
execute: "deepline tools execute <toolId> --input '{...}'"
|
|
277
280
|
};
|
|
278
281
|
function toListedTool(tool) {
|
|
279
|
-
if (
|
|
282
|
+
if (_chunkQFXPA2E4js.isPlayLikeTool.call(void 0, tool)) {
|
|
280
283
|
return {
|
|
281
284
|
...tool,
|
|
282
285
|
description: listedToolDescription(tool),
|
|
283
286
|
id: tool.toolId,
|
|
284
287
|
type: "play",
|
|
285
|
-
executeCommand:
|
|
288
|
+
executeCommand: _chunkQFXPA2E4js.playRunCommandForTool.call(void 0, tool, tool.toolId)
|
|
286
289
|
};
|
|
287
290
|
}
|
|
288
291
|
return {
|
|
@@ -364,16 +367,16 @@ function firstSentence(text) {
|
|
|
364
367
|
return (match ? match[0] : clean).trim();
|
|
365
368
|
}
|
|
366
369
|
function requiredInputIds(tool) {
|
|
367
|
-
const inputSchema =
|
|
370
|
+
const inputSchema = _chunkQFXPA2E4js.recordField.call(void 0,
|
|
368
371
|
tool,
|
|
369
372
|
"inputSchema",
|
|
370
373
|
"input_schema"
|
|
371
374
|
);
|
|
372
|
-
return
|
|
375
|
+
return _chunkQFXPA2E4js.toolInputFieldsForDisplay.call(void 0, inputSchema).filter((field) => field.required === true).map((field) => String(_nullishCoalesce(field.name, () => ( "")))).filter(Boolean);
|
|
373
376
|
}
|
|
374
377
|
function notConnectedSuffix(tool) {
|
|
375
378
|
const record = tool;
|
|
376
|
-
const status =
|
|
379
|
+
const status = _chunkQFXPA2E4js.stringField.call(void 0, record, "credentialStatus", "credential_status");
|
|
377
380
|
const connected = record.connected;
|
|
378
381
|
const message = toolConnectionStatusMessage({
|
|
379
382
|
connected: connected === false ? false : void 0,
|
|
@@ -382,18 +385,18 @@ function notConnectedSuffix(tool) {
|
|
|
382
385
|
return message ? ` - \u26A0 ${message}` : "";
|
|
383
386
|
}
|
|
384
387
|
function shortPricingHint(tool) {
|
|
385
|
-
const pricing =
|
|
388
|
+
const pricing = _chunkQFXPA2E4js.recordField.call(void 0,
|
|
386
389
|
tool,
|
|
387
390
|
"pricing"
|
|
388
391
|
);
|
|
389
392
|
const credits = numberField(pricing, "creditsPerUnit", "credits_per_unit");
|
|
390
|
-
const unit =
|
|
393
|
+
const unit = _chunkQFXPA2E4js.stringField.call(void 0, pricing, "unit");
|
|
391
394
|
if (credits !== null) {
|
|
392
395
|
return `${formatDecimal(credits)} cr/${unit || "unit"}`;
|
|
393
396
|
}
|
|
394
|
-
const summary =
|
|
397
|
+
const summary = _chunkQFXPA2E4js.stringField.call(void 0, pricing, "summary");
|
|
395
398
|
if (summary) return summary;
|
|
396
|
-
const displayText =
|
|
399
|
+
const displayText = _chunkQFXPA2E4js.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
397
400
|
return displayText || null;
|
|
398
401
|
}
|
|
399
402
|
function aggregateCategorySummaries(tools) {
|
|
@@ -437,13 +440,13 @@ function categoryEnumerationRender(summaries) {
|
|
|
437
440
|
};
|
|
438
441
|
}
|
|
439
442
|
async function listToolCategories(emitJson, compact) {
|
|
440
|
-
const client = new (0,
|
|
443
|
+
const client = new (0, _chunkCGZ2KKPMjs.DeeplineClient)();
|
|
441
444
|
if (!emitJson) {
|
|
442
445
|
const summaries2 = (await client.listToolCategories()).map((category) => ({
|
|
443
446
|
...category,
|
|
444
447
|
description: describeToolCategory(category.name)
|
|
445
448
|
}));
|
|
446
|
-
|
|
449
|
+
_chunkEWXXWSQMjs.printCommandEnvelope.call(void 0,
|
|
447
450
|
{ categories: summaries2, render: categoryEnumerationRender(summaries2) },
|
|
448
451
|
{ json: false }
|
|
449
452
|
);
|
|
@@ -453,7 +456,7 @@ async function listToolCategories(emitJson, compact) {
|
|
|
453
456
|
const items = rawTools.map(toListedTool);
|
|
454
457
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
455
458
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
456
|
-
|
|
459
|
+
_chunkEWXXWSQMjs.printCommandEnvelope.call(void 0,
|
|
457
460
|
{
|
|
458
461
|
tools: outputItems,
|
|
459
462
|
count: outputItems.length,
|
|
@@ -472,7 +475,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
472
475
|
const known = summaries.map((item) => item.name);
|
|
473
476
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
474
477
|
if (emitJson) {
|
|
475
|
-
|
|
478
|
+
_chunkEWXXWSQMjs.printJson.call(void 0, {
|
|
476
479
|
ok: false,
|
|
477
480
|
exitCode: 4,
|
|
478
481
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -486,13 +489,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
486
489
|
const render = categoryEnumerationRender(summaries);
|
|
487
490
|
console.error(message);
|
|
488
491
|
console.error("");
|
|
489
|
-
console.error(
|
|
492
|
+
console.error(_chunkEWXXWSQMjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
490
493
|
console.error("");
|
|
491
494
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
492
495
|
return 4;
|
|
493
496
|
}
|
|
494
497
|
async function listToolsInCategory(category, emitJson) {
|
|
495
|
-
const client = new (0,
|
|
498
|
+
const client = new (0, _chunkCGZ2KKPMjs.DeeplineClient)();
|
|
496
499
|
const { tools: rawTools, categories } = await client.listToolsInCategory(category);
|
|
497
500
|
const summaries = categories.map((item) => ({
|
|
498
501
|
...item,
|
|
@@ -528,7 +531,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
528
531
|
}
|
|
529
532
|
]
|
|
530
533
|
};
|
|
531
|
-
|
|
534
|
+
_chunkEWXXWSQMjs.printCommandEnvelope.call(void 0,
|
|
532
535
|
{
|
|
533
536
|
category,
|
|
534
537
|
total: rows.length,
|
|
@@ -541,7 +544,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
541
544
|
return 0;
|
|
542
545
|
}
|
|
543
546
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
544
|
-
const client = new (0,
|
|
547
|
+
const client = new (0, _chunkCGZ2KKPMjs.DeeplineClient)();
|
|
545
548
|
const items = (await client.listTools({
|
|
546
549
|
categories: requestedCategories.join(","),
|
|
547
550
|
compact
|
|
@@ -570,7 +573,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
570
573
|
]
|
|
571
574
|
};
|
|
572
575
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
573
|
-
|
|
576
|
+
_chunkEWXXWSQMjs.printCommandEnvelope.call(void 0,
|
|
574
577
|
{
|
|
575
578
|
tools: outputItems,
|
|
576
579
|
count: outputItems.length,
|
|
@@ -589,13 +592,13 @@ async function listTools(category, options = {}) {
|
|
|
589
592
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]), () => ( ""));
|
|
590
593
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
591
594
|
const compact = options.compact !== false;
|
|
592
|
-
const emitJson = options.json === true ||
|
|
595
|
+
const emitJson = options.json === true || _chunkEWXXWSQMjs.shouldEmitJson.call(void 0, );
|
|
593
596
|
if (positional && flagCategories.length > 0) {
|
|
594
597
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
595
598
|
if (!flagIsSameSingle) {
|
|
596
599
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
597
600
|
if (emitJson) {
|
|
598
|
-
|
|
601
|
+
_chunkEWXXWSQMjs.printJson.call(void 0, {
|
|
599
602
|
ok: false,
|
|
600
603
|
exitCode: 2,
|
|
601
604
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -622,7 +625,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
622
625
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
623
626
|
return 1;
|
|
624
627
|
}
|
|
625
|
-
const client = new (0,
|
|
628
|
+
const client = new (0, _chunkCGZ2KKPMjs.DeeplineClient)();
|
|
626
629
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
627
630
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
628
631
|
const jsonOutput = options.json === true;
|
|
@@ -646,7 +649,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
646
649
|
query,
|
|
647
650
|
mode
|
|
648
651
|
}) : null;
|
|
649
|
-
|
|
652
|
+
_chunkEWXXWSQMjs.printCommandEnvelope.call(void 0,
|
|
650
653
|
{
|
|
651
654
|
tools: outputTools,
|
|
652
655
|
count: outputTools.length,
|
|
@@ -664,7 +667,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
664
667
|
} : {},
|
|
665
668
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
666
669
|
},
|
|
667
|
-
{ json: options.json ||
|
|
670
|
+
{ json: options.json || _chunkEWXXWSQMjs.shouldEmitJson.call(void 0, ) }
|
|
668
671
|
);
|
|
669
672
|
return 0;
|
|
670
673
|
}
|
|
@@ -719,8 +722,8 @@ function printPlayAliasToolError(toolId, play) {
|
|
|
719
722
|
console.error(playAliasToolErrorMessage(toolId, play));
|
|
720
723
|
}
|
|
721
724
|
function playLikeToolExecuteErrorMessage(toolId, tool) {
|
|
722
|
-
const playReference = tool ?
|
|
723
|
-
const nextStep = playReference ? `Use: deepline plays run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${
|
|
725
|
+
const playReference = tool ? _chunkQFXPA2E4js.playReferenceForTool.call(void 0, tool) : null;
|
|
726
|
+
const nextStep = playReference ? `Use: deepline plays run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunkQFXPA2E4js.playSearchCommandForToolId.call(void 0, toolId)}`;
|
|
724
727
|
return [
|
|
725
728
|
`${toolId} is a workflow/play entry, not an atomic provider tool.`,
|
|
726
729
|
nextStep,
|
|
@@ -775,7 +778,7 @@ Output:
|
|
|
775
778
|
if (options.preset !== void 0 && (options.scopes !== void 0 || options.optionalScopes !== void 0))
|
|
776
779
|
throw new Error("Use --preset or individual scopes, not both.");
|
|
777
780
|
const splitScopes = (value) => value.split(",").map((scope) => scope.trim()).filter(Boolean);
|
|
778
|
-
const result2 = await new (0,
|
|
781
|
+
const result2 = await new (0, _chunkCGZ2KKPMjs.DeeplineClient)().startIntegrationOAuth(
|
|
779
782
|
provider,
|
|
780
783
|
{
|
|
781
784
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
@@ -787,7 +790,7 @@ Output:
|
|
|
787
790
|
throw new Error(
|
|
788
791
|
"The API did not return an OAuth authorization URL."
|
|
789
792
|
);
|
|
790
|
-
if (
|
|
793
|
+
if (_chunkEWXXWSQMjs.shouldEmitJson.call(void 0, options.json))
|
|
791
794
|
console.log(
|
|
792
795
|
JSON.stringify({ provider, redirect_url: result2.redirect_url })
|
|
793
796
|
);
|
|
@@ -813,7 +816,7 @@ Output:
|
|
|
813
816
|
"--credentials-file must contain a nonempty JSON object of string credential values."
|
|
814
817
|
);
|
|
815
818
|
}
|
|
816
|
-
const result = await new (0,
|
|
819
|
+
const result = await new (0, _chunkCGZ2KKPMjs.DeeplineClient)().setIntegrationCredentials(
|
|
817
820
|
provider,
|
|
818
821
|
credentials
|
|
819
822
|
);
|
|
@@ -823,7 +826,7 @@ Output:
|
|
|
823
826
|
);
|
|
824
827
|
}
|
|
825
828
|
const confirmation = { provider, credential_saved: true };
|
|
826
|
-
if (
|
|
829
|
+
if (_chunkEWXXWSQMjs.shouldEmitJson.call(void 0, options.json))
|
|
827
830
|
console.log(JSON.stringify(confirmation));
|
|
828
831
|
else
|
|
829
832
|
console.log(
|
|
@@ -863,7 +866,7 @@ Examples:
|
|
|
863
866
|
json: Boolean(options.json)
|
|
864
867
|
});
|
|
865
868
|
});
|
|
866
|
-
|
|
869
|
+
_chunkLVM7CSAHjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
867
870
|
tools.command("grep <query>").description(
|
|
868
871
|
"Regex grep over tool ids, descriptions, categories, and input fields."
|
|
869
872
|
).addHelpText(
|
|
@@ -898,7 +901,7 @@ Examples:
|
|
|
898
901
|
});
|
|
899
902
|
const addToolMetadataCommand = (command) => {
|
|
900
903
|
let compatibilityMetadata;
|
|
901
|
-
|
|
904
|
+
_chunkBE2GX674js.registerCompatibilityCatalog.call(void 0, command, () => ({
|
|
902
905
|
toolId: command.args[0],
|
|
903
906
|
acceptMetadata: (metadata) => {
|
|
904
907
|
compatibilityMetadata = metadata;
|
|
@@ -968,7 +971,7 @@ Examples:
|
|
|
968
971
|
process.exitCode = await narrowView();
|
|
969
972
|
return;
|
|
970
973
|
}
|
|
971
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
974
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-AEM7SYXF.js")));
|
|
972
975
|
process.exitCode = await describeAnything(
|
|
973
976
|
toolId,
|
|
974
977
|
{
|
|
@@ -983,7 +986,7 @@ Examples:
|
|
|
983
986
|
});
|
|
984
987
|
};
|
|
985
988
|
addToolMetadataCommand(
|
|
986
|
-
|
|
989
|
+
_chunkPP66EATAjs.addDescribeOptions.call(void 0,
|
|
987
990
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
988
991
|
{ json: false }
|
|
989
992
|
)
|
|
@@ -1052,7 +1055,7 @@ Examples:
|
|
|
1052
1055
|
options,
|
|
1053
1056
|
void 0,
|
|
1054
1057
|
true,
|
|
1055
|
-
|
|
1058
|
+
_chunk757V3FDWjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
1056
1059
|
);
|
|
1057
1060
|
}
|
|
1058
1061
|
);
|
|
@@ -1060,13 +1063,13 @@ Examples:
|
|
|
1060
1063
|
function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
1061
1064
|
let metadata;
|
|
1062
1065
|
const startedAt = performance.now();
|
|
1063
|
-
const baseUrl =
|
|
1064
|
-
|
|
1065
|
-
const result =
|
|
1066
|
+
const baseUrl = _chunkPXXIBSBGjs.resolveConfig.call(void 0, ).baseUrl;
|
|
1067
|
+
_chunk757V3FDWjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1068
|
+
const result = _chunkBE2GX674js.runToolExecuteStage.call(void 0,
|
|
1066
1069
|
"SDK compatibility",
|
|
1067
|
-
() =>
|
|
1070
|
+
() => _chunkYV6N4BF2js.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1068
1071
|
command: "tools execute",
|
|
1069
|
-
skillsVersion:
|
|
1072
|
+
skillsVersion: _chunkPXXIBSBGjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
1070
1073
|
persistCache: false,
|
|
1071
1074
|
timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
|
|
1072
1075
|
catalog: {
|
|
@@ -1080,7 +1083,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1080
1083
|
})
|
|
1081
1084
|
).then(
|
|
1082
1085
|
(compatibility) => {
|
|
1083
|
-
|
|
1086
|
+
_chunk757V3FDWjs.recordCliTrace.call(void 0, {
|
|
1084
1087
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1085
1088
|
ms: performance.now() - startedAt,
|
|
1086
1089
|
ok: compatibility.error === null,
|
|
@@ -1089,7 +1092,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1089
1092
|
return compatibility;
|
|
1090
1093
|
},
|
|
1091
1094
|
(error) => {
|
|
1092
|
-
|
|
1095
|
+
_chunk757V3FDWjs.recordCliTrace.call(void 0, {
|
|
1093
1096
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1094
1097
|
ms: performance.now() - startedAt,
|
|
1095
1098
|
ok: false
|
|
@@ -1104,7 +1107,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1104
1107
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1105
1108
|
return 1;
|
|
1106
1109
|
}
|
|
1107
|
-
const client = new (0,
|
|
1110
|
+
const client = new (0, _chunkCGZ2KKPMjs.DeeplineClient)();
|
|
1108
1111
|
let tool;
|
|
1109
1112
|
try {
|
|
1110
1113
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1158,12 +1161,12 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1158
1161
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1159
1162
|
if (inferenceQuote)
|
|
1160
1163
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1161
|
-
|
|
1164
|
+
_chunkEWXXWSQMjs.printCommandEnvelope.call(void 0,
|
|
1162
1165
|
{
|
|
1163
1166
|
toolId: String(tool.toolId || toolId),
|
|
1164
1167
|
cost: _chunkZM2YPJQJjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1165
1168
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1166
|
-
...
|
|
1169
|
+
..._chunkQFXPA2E4js.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunkQFXPA2E4js.recordField.call(void 0, tool, "pricing") } : {},
|
|
1167
1170
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1168
1171
|
},
|
|
1169
1172
|
{
|
|
@@ -1174,14 +1177,14 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1174
1177
|
);
|
|
1175
1178
|
return 0;
|
|
1176
1179
|
}
|
|
1177
|
-
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !
|
|
1178
|
-
const contract =
|
|
1180
|
+
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunkQFXPA2E4js.isMonitorTypeTool.call(void 0, tool) && !_chunkQFXPA2E4js.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
|
|
1181
|
+
const contract = _chunkQFXPA2E4js.toolContractJsonForDescribe.call(void 0,
|
|
1179
1182
|
tool,
|
|
1180
1183
|
toolId,
|
|
1181
1184
|
void 0,
|
|
1182
1185
|
seedToolListScript
|
|
1183
1186
|
);
|
|
1184
|
-
|
|
1187
|
+
_chunkEWXXWSQMjs.printCompactJson.call(void 0, {
|
|
1185
1188
|
toolId: contract.toolId,
|
|
1186
1189
|
...options.schemaOnly ? {
|
|
1187
1190
|
inputSchema: contract.inputSchema,
|
|
@@ -1204,8 +1207,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1204
1207
|
return 0;
|
|
1205
1208
|
}
|
|
1206
1209
|
if (options.contractJson) {
|
|
1207
|
-
|
|
1208
|
-
...
|
|
1210
|
+
_chunkEWXXWSQMjs.printCompactJson.call(void 0, {
|
|
1211
|
+
..._chunkQFXPA2E4js.toolContractJsonForDescribe.call(void 0,
|
|
1209
1212
|
tool,
|
|
1210
1213
|
toolId,
|
|
1211
1214
|
void 0,
|
|
@@ -1218,8 +1221,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1218
1221
|
}
|
|
1219
1222
|
const emitJson = options.json === true;
|
|
1220
1223
|
if (emitJson) {
|
|
1221
|
-
|
|
1222
|
-
...
|
|
1224
|
+
_chunkEWXXWSQMjs.printCompactJson.call(void 0, {
|
|
1225
|
+
..._chunkQFXPA2E4js.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
|
|
1223
1226
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1224
1227
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1225
1228
|
});
|
|
@@ -1244,7 +1247,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1244
1247
|
printCompactToolContract(tool, toolId);
|
|
1245
1248
|
if (modelDescription) {
|
|
1246
1249
|
process.stdout.write(`
|
|
1247
|
-
${
|
|
1250
|
+
${_chunkQFXPA2E4js.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1248
1251
|
}
|
|
1249
1252
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1250
1253
|
return 0;
|
|
@@ -1252,7 +1255,7 @@ ${_chunkR2QWSSAGjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
|
1252
1255
|
printCompactToolContract(tool, toolId);
|
|
1253
1256
|
if (modelDescription) {
|
|
1254
1257
|
process.stdout.write(`
|
|
1255
|
-
${
|
|
1258
|
+
${_chunkQFXPA2E4js.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1256
1259
|
}
|
|
1257
1260
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1258
1261
|
return 0;
|
|
@@ -1269,10 +1272,10 @@ function printInferenceQuoteSummary(quote) {
|
|
|
1269
1272
|
for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
|
|
1270
1273
|
}
|
|
1271
1274
|
function printMonitorTypeFilters(tool) {
|
|
1272
|
-
const schema =
|
|
1273
|
-
const properties =
|
|
1275
|
+
const schema = _chunkQFXPA2E4js.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
|
|
1276
|
+
const properties = _chunkQFXPA2E4js.recordField.call(void 0, schema, "properties");
|
|
1274
1277
|
const required = new Set(
|
|
1275
|
-
|
|
1278
|
+
_chunkQFXPA2E4js.arrayField.call(void 0, schema, "required").filter(
|
|
1276
1279
|
(v) => typeof v === "string"
|
|
1277
1280
|
)
|
|
1278
1281
|
);
|
|
@@ -1283,24 +1286,24 @@ function printMonitorTypeFilters(tool) {
|
|
|
1283
1286
|
}
|
|
1284
1287
|
console.log("Deploy filters (set in the monitor payload):");
|
|
1285
1288
|
for (const name of names) {
|
|
1286
|
-
const field =
|
|
1289
|
+
const field = _chunkQFXPA2E4js.isRecord.call(void 0, properties[name]) ? properties[name] : {};
|
|
1287
1290
|
const star = required.has(name) ? "*" : "";
|
|
1288
|
-
const enumVals =
|
|
1291
|
+
const enumVals = _chunkQFXPA2E4js.arrayField.call(void 0, field, "enum").filter(
|
|
1289
1292
|
(v) => typeof v === "string"
|
|
1290
1293
|
);
|
|
1291
|
-
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` :
|
|
1292
|
-
const desc =
|
|
1294
|
+
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunkQFXPA2E4js.stringField.call(void 0, field, "type") || "string";
|
|
1295
|
+
const desc = _chunkQFXPA2E4js.stringField.call(void 0, field, "description");
|
|
1293
1296
|
console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
|
|
1294
1297
|
}
|
|
1295
1298
|
}
|
|
1296
1299
|
function printMonitorTypeFilterExamples(tool) {
|
|
1297
|
-
const documentation =
|
|
1298
|
-
const fields =
|
|
1300
|
+
const documentation = _chunkQFXPA2E4js.recordField.call(void 0, tool, "documentation");
|
|
1301
|
+
const fields = _chunkQFXPA2E4js.recordField.call(void 0, documentation, "fields");
|
|
1299
1302
|
const examples = Object.entries(fields).flatMap(([name, rawField]) => {
|
|
1300
|
-
const grammar =
|
|
1301
|
-
const example =
|
|
1303
|
+
const grammar = _chunkQFXPA2E4js.recordField.call(void 0, _chunkQFXPA2E4js.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
|
|
1304
|
+
const example = _chunkQFXPA2E4js.stringField.call(void 0, grammar, "example");
|
|
1302
1305
|
const values = [
|
|
1303
|
-
...
|
|
1306
|
+
..._chunkQFXPA2E4js.arrayField.call(void 0, grammar, "examples").filter(
|
|
1304
1307
|
(value) => typeof value === "string" && Boolean(value)
|
|
1305
1308
|
),
|
|
1306
1309
|
...example ? [example] : []
|
|
@@ -1315,21 +1318,21 @@ function printMonitorTypeFilterExamples(tool) {
|
|
|
1315
1318
|
}
|
|
1316
1319
|
}
|
|
1317
1320
|
function printMonitorTypeStreams(tool) {
|
|
1318
|
-
const streams =
|
|
1319
|
-
|
|
1321
|
+
const streams = _chunkQFXPA2E4js.arrayField.call(void 0, tool, "streams", "output_streams").filter(
|
|
1322
|
+
_chunkQFXPA2E4js.isRecord
|
|
1320
1323
|
);
|
|
1321
1324
|
if (!streams.length) return;
|
|
1322
1325
|
console.log("");
|
|
1323
1326
|
console.log("Filter columns (a play's sqlListeners.where, per stream):");
|
|
1324
1327
|
for (const stream of streams) {
|
|
1325
|
-
const name =
|
|
1326
|
-
const cols =
|
|
1328
|
+
const name = _chunkQFXPA2E4js.stringField.call(void 0, stream, "stream");
|
|
1329
|
+
const cols = _chunkQFXPA2E4js.arrayField.call(void 0, stream, "columns").filter(_chunkQFXPA2E4js.isRecord).map((col) => _chunkQFXPA2E4js.stringField.call(void 0, col, "name")).filter(Boolean);
|
|
1327
1330
|
console.log(`- ${name}: ${cols.join(", ")}`);
|
|
1328
1331
|
}
|
|
1329
1332
|
}
|
|
1330
1333
|
function monitorTypePricingLines(tool) {
|
|
1331
|
-
const pricing =
|
|
1332
|
-
const byType =
|
|
1334
|
+
const pricing = _chunkQFXPA2E4js.recordField.call(void 0, tool, "pricing");
|
|
1335
|
+
const byType = _chunkQFXPA2E4js.recordField.call(void 0,
|
|
1333
1336
|
pricing,
|
|
1334
1337
|
"pricing_by_radar_type",
|
|
1335
1338
|
"pricingByRadarType"
|
|
@@ -1340,9 +1343,9 @@ function monitorTypePricingLines(tool) {
|
|
|
1340
1343
|
}
|
|
1341
1344
|
const lines = ["Pricing (Deepline credits per accepted event):"];
|
|
1342
1345
|
for (const key of keys) {
|
|
1343
|
-
const entry =
|
|
1346
|
+
const entry = _chunkQFXPA2E4js.isRecord.call(void 0, byType[key]) ? byType[key] : {};
|
|
1344
1347
|
const credits = numberField(entry, "deepline_credits", "deeplineCredits");
|
|
1345
|
-
const display =
|
|
1348
|
+
const display = _chunkQFXPA2E4js.stringField.call(void 0, entry, "display");
|
|
1346
1349
|
const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "not listed");
|
|
1347
1350
|
lines.push(`- ${key}: ${shown}`);
|
|
1348
1351
|
}
|
|
@@ -1352,20 +1355,20 @@ function printMonitorTypePricing(tool) {
|
|
|
1352
1355
|
for (const line of monitorTypePricingLines(tool)) console.log(line);
|
|
1353
1356
|
}
|
|
1354
1357
|
function printMonitorTypeDeploy(tool) {
|
|
1355
|
-
const deploy =
|
|
1356
|
-
const toolId =
|
|
1357
|
-
const example =
|
|
1358
|
+
const deploy = _chunkQFXPA2E4js.recordField.call(void 0, tool, "deploy");
|
|
1359
|
+
const toolId = _chunkQFXPA2E4js.stringField.call(void 0, tool, "toolId");
|
|
1360
|
+
const example = _chunkQFXPA2E4js.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
|
|
1358
1361
|
console.log("Deploy (a monitor type is deployed, not executed):");
|
|
1359
1362
|
console.log(` ${example}`);
|
|
1360
1363
|
}
|
|
1361
1364
|
function printMonitorTypeContract(tool, requestedToolId) {
|
|
1362
|
-
const toolId =
|
|
1365
|
+
const toolId = _chunkQFXPA2E4js.stringField.call(void 0, tool, "toolId") || requestedToolId;
|
|
1363
1366
|
console.log(toolId);
|
|
1364
|
-
const displayName =
|
|
1367
|
+
const displayName = _chunkQFXPA2E4js.stringField.call(void 0, tool, "displayName");
|
|
1365
1368
|
if (displayName) console.log(`Best for: ${displayName}`);
|
|
1366
|
-
const description =
|
|
1369
|
+
const description = _chunkQFXPA2E4js.stringField.call(void 0, tool, "description");
|
|
1367
1370
|
if (description) console.log(`Description: ${description}`);
|
|
1368
|
-
const categories =
|
|
1371
|
+
const categories = _chunkQFXPA2E4js.arrayField.call(void 0, tool, "categories").filter(
|
|
1369
1372
|
(v) => typeof v === "string"
|
|
1370
1373
|
);
|
|
1371
1374
|
if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
|
|
@@ -1385,31 +1388,31 @@ function printMonitorTypeContract(tool, requestedToolId) {
|
|
|
1385
1388
|
console.log(`More: deepline describe ${toolId}`);
|
|
1386
1389
|
}
|
|
1387
1390
|
function toolGuidanceLines(guidance) {
|
|
1388
|
-
const record =
|
|
1389
|
-
const toolGuidance =
|
|
1390
|
-
const providerGuidance =
|
|
1391
|
+
const record = _chunkQFXPA2E4js.isRecord.call(void 0, guidance) ? guidance : {};
|
|
1392
|
+
const toolGuidance = _chunkQFXPA2E4js.stringField.call(void 0, record, "tool");
|
|
1393
|
+
const providerGuidance = _chunkQFXPA2E4js.stringField.call(void 0, record, "provider");
|
|
1391
1394
|
return [
|
|
1392
1395
|
...toolGuidance ? [`- This tool: ${toolGuidance}`] : [],
|
|
1393
1396
|
...providerGuidance ? [`- Provider: ${providerGuidance}`] : []
|
|
1394
1397
|
];
|
|
1395
1398
|
}
|
|
1396
1399
|
function printCompactToolContract(tool, requestedToolId) {
|
|
1397
|
-
if (
|
|
1400
|
+
if (_chunkQFXPA2E4js.isMonitorTypeTool.call(void 0, tool)) {
|
|
1398
1401
|
printMonitorTypeContract(tool, requestedToolId);
|
|
1399
1402
|
return;
|
|
1400
1403
|
}
|
|
1401
|
-
const contract =
|
|
1404
|
+
const contract = _chunkQFXPA2E4js.toolContractJsonForDescribe.call(void 0,
|
|
1402
1405
|
tool,
|
|
1403
1406
|
requestedToolId,
|
|
1404
1407
|
void 0,
|
|
1405
1408
|
seedToolListScript
|
|
1406
1409
|
);
|
|
1407
|
-
const cost =
|
|
1408
|
-
const getters =
|
|
1410
|
+
const cost = _chunkQFXPA2E4js.isRecord.call(void 0, contract.cost) ? contract.cost : {};
|
|
1411
|
+
const getters = _chunkQFXPA2E4js.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1409
1412
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1410
1413
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1411
|
-
const inputFields =
|
|
1412
|
-
|
|
1414
|
+
const inputFields = _chunkQFXPA2E4js.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1415
|
+
_chunkQFXPA2E4js.recordField.call(void 0, contract, "inputSchema")
|
|
1413
1416
|
);
|
|
1414
1417
|
console.log(String(contract.toolId));
|
|
1415
1418
|
if (contract.displayName) console.log(`Best for: ${contract.displayName}`);
|
|
@@ -1426,9 +1429,9 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1426
1429
|
printToolOutputArrayShape(contract);
|
|
1427
1430
|
printToolExecutionHints(contract);
|
|
1428
1431
|
if (contract.deprecated === true) {
|
|
1429
|
-
const deprecation =
|
|
1430
|
-
const message =
|
|
1431
|
-
const replacementToolId =
|
|
1432
|
+
const deprecation = _chunkQFXPA2E4js.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
|
|
1433
|
+
const message = _chunkQFXPA2E4js.stringField.call(void 0, deprecation, "message");
|
|
1434
|
+
const replacementToolId = _chunkQFXPA2E4js.stringField.call(void 0,
|
|
1432
1435
|
deprecation,
|
|
1433
1436
|
"replacementToolId",
|
|
1434
1437
|
"replacement_tool_id"
|
|
@@ -1453,12 +1456,12 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1453
1456
|
console.log("");
|
|
1454
1457
|
console.log("Inputs:");
|
|
1455
1458
|
for (const field of inputFields) {
|
|
1456
|
-
if (!
|
|
1457
|
-
const name =
|
|
1459
|
+
if (!_chunkQFXPA2E4js.isRecord.call(void 0, field)) continue;
|
|
1460
|
+
const name = _chunkQFXPA2E4js.stringField.call(void 0, field, "name");
|
|
1458
1461
|
if (!name) continue;
|
|
1459
1462
|
const required = field.required ? "*" : "";
|
|
1460
|
-
const type =
|
|
1461
|
-
const description =
|
|
1463
|
+
const type = _chunkQFXPA2E4js.stringField.call(void 0, field, "type") || "unknown";
|
|
1464
|
+
const description = _chunkQFXPA2E4js.stringField.call(void 0, field, "description");
|
|
1462
1465
|
const enumValues = Array.isArray(field.enum) ? field.enum : [];
|
|
1463
1466
|
const enumSuffix = enumValues.length ? ` enum=${enumValues.map(String).join("|")}` : "";
|
|
1464
1467
|
const itemBoundsSuffix = arrayItemBoundsSuffix(field);
|
|
@@ -1473,8 +1476,8 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1473
1476
|
}
|
|
1474
1477
|
console.log("");
|
|
1475
1478
|
printToolExamplesOnly(tool, requestedToolId);
|
|
1476
|
-
const starterScript =
|
|
1477
|
-
const starterPath =
|
|
1479
|
+
const starterScript = _chunkQFXPA2E4js.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
|
|
1480
|
+
const starterPath = _chunkQFXPA2E4js.stringField.call(void 0, starterScript, "path");
|
|
1478
1481
|
if (starterPath) {
|
|
1479
1482
|
console.log("");
|
|
1480
1483
|
console.log(`Starter script: ${starterPath}`);
|
|
@@ -1485,16 +1488,16 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1485
1488
|
console.log("Getters:");
|
|
1486
1489
|
if (listGetters.length) console.log(listGetterHeading());
|
|
1487
1490
|
for (const entry of listGetters) {
|
|
1488
|
-
if (
|
|
1491
|
+
if (_chunkQFXPA2E4js.isRecord.call(void 0, entry))
|
|
1489
1492
|
console.log(
|
|
1490
|
-
`- ${
|
|
1493
|
+
`- ${_chunkQFXPA2E4js.stringField.call(void 0, entry, "name")}: ${_chunkQFXPA2E4js.playResultExpression.call(void 0, entry)}`
|
|
1491
1494
|
);
|
|
1492
1495
|
}
|
|
1493
1496
|
if (valueGetters.length) console.log("Values:");
|
|
1494
1497
|
for (const entry of valueGetters) {
|
|
1495
|
-
if (
|
|
1498
|
+
if (_chunkQFXPA2E4js.isRecord.call(void 0, entry))
|
|
1496
1499
|
console.log(
|
|
1497
|
-
`- ${
|
|
1500
|
+
`- ${_chunkQFXPA2E4js.stringField.call(void 0, entry, "name")}: ${_chunkQFXPA2E4js.playResultExpression.call(void 0, entry)}`
|
|
1498
1501
|
);
|
|
1499
1502
|
}
|
|
1500
1503
|
}
|
|
@@ -1505,19 +1508,19 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1505
1508
|
console.log(`More: deepline describe ${contract.toolId}`);
|
|
1506
1509
|
}
|
|
1507
1510
|
function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
1508
|
-
if (
|
|
1511
|
+
if (_chunkQFXPA2E4js.isMonitorTypeTool.call(void 0, tool)) {
|
|
1509
1512
|
return monitorTypePricingLines(tool);
|
|
1510
1513
|
}
|
|
1511
1514
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1512
1515
|
const cost = _chunkZM2YPJQJjs.Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1513
|
-
const pricingModel =
|
|
1514
|
-
const billing =
|
|
1515
|
-
const explicitUnit =
|
|
1516
|
+
const pricingModel = _chunkQFXPA2E4js.stringField.call(void 0, cost, "pricingModel") || "unknown";
|
|
1517
|
+
const billing = _chunkQFXPA2E4js.stringField.call(void 0, cost, "billingSourceLabel") || _chunkQFXPA2E4js.stringField.call(void 0, cost, "billingSource") || _chunkQFXPA2E4js.stringField.call(void 0, cost, "billingMode") || "unknown";
|
|
1518
|
+
const explicitUnit = _chunkQFXPA2E4js.stringField.call(void 0, cost, "unit");
|
|
1516
1519
|
const unit = explicitUnit || (pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit");
|
|
1517
1520
|
const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
|
|
1518
1521
|
const usd = numberField(cost, "deeplineUsdPerPricingUnit");
|
|
1519
|
-
const displayText =
|
|
1520
|
-
const summary =
|
|
1522
|
+
const displayText = _chunkQFXPA2E4js.stringField.call(void 0, cost, "displayText");
|
|
1523
|
+
const summary = _chunkQFXPA2E4js.stringField.call(void 0, cost, "summary");
|
|
1521
1524
|
const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
|
|
1522
1525
|
return [
|
|
1523
1526
|
`${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
|
|
@@ -1534,19 +1537,19 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
|
1534
1537
|
console.log(line);
|
|
1535
1538
|
}
|
|
1536
1539
|
function printToolSchemaOnly(tool, requestedToolId) {
|
|
1537
|
-
if (
|
|
1540
|
+
if (_chunkQFXPA2E4js.isMonitorTypeTool.call(void 0, tool)) {
|
|
1538
1541
|
printMonitorTypeFilters(tool);
|
|
1539
1542
|
printMonitorTypeStreams(tool);
|
|
1540
1543
|
return;
|
|
1541
1544
|
}
|
|
1542
|
-
const contract =
|
|
1545
|
+
const contract = _chunkQFXPA2E4js.toolContractJsonForDescribe.call(void 0,
|
|
1543
1546
|
tool,
|
|
1544
1547
|
requestedToolId,
|
|
1545
1548
|
void 0,
|
|
1546
1549
|
seedToolListScript
|
|
1547
1550
|
);
|
|
1548
|
-
const inputFields =
|
|
1549
|
-
|
|
1551
|
+
const inputFields = _chunkQFXPA2E4js.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1552
|
+
_chunkQFXPA2E4js.recordField.call(void 0, contract, "inputSchema")
|
|
1550
1553
|
);
|
|
1551
1554
|
console.log(`Schema: ${contract.toolId}`);
|
|
1552
1555
|
if (!inputFields.length) {
|
|
@@ -1573,27 +1576,27 @@ function printToolSchemaOnly(tool, requestedToolId) {
|
|
|
1573
1576
|
}
|
|
1574
1577
|
printToolOutputArrayShape(contract);
|
|
1575
1578
|
const declaredSchema = declaredToolJsonSchema(
|
|
1576
|
-
|
|
1579
|
+
_chunkQFXPA2E4js.recordField.call(void 0, contract, "inputSchema")
|
|
1577
1580
|
);
|
|
1578
1581
|
if (declaredSchema) {
|
|
1579
1582
|
console.log("Declared input JSON Schema:");
|
|
1580
1583
|
console.log(JSON.stringify(declaredSchema, null, 2));
|
|
1581
1584
|
}
|
|
1582
|
-
if (
|
|
1585
|
+
if (_chunkQFXPA2E4js.isRecord.call(void 0, contract.responseSchema)) {
|
|
1583
1586
|
console.log("Deepline execution response JSON Schema:");
|
|
1584
1587
|
console.log(JSON.stringify(contract.responseSchema, null, 2));
|
|
1585
1588
|
}
|
|
1586
1589
|
}
|
|
1587
1590
|
function printToolExamplesOnly(tool, requestedToolId) {
|
|
1588
|
-
if (
|
|
1591
|
+
if (_chunkQFXPA2E4js.isMonitorTypeTool.call(void 0, tool)) {
|
|
1589
1592
|
printMonitorTypeDeploy(tool);
|
|
1590
1593
|
return;
|
|
1591
1594
|
}
|
|
1592
|
-
if (
|
|
1595
|
+
if (_chunkQFXPA2E4js.isPlayLikeTool.call(void 0, tool)) {
|
|
1593
1596
|
printPlayLikeToolUsage(tool, requestedToolId);
|
|
1594
1597
|
return;
|
|
1595
1598
|
}
|
|
1596
|
-
const contract =
|
|
1599
|
+
const contract = _chunkQFXPA2E4js.toolContractJsonForDescribe.call(void 0,
|
|
1597
1600
|
tool,
|
|
1598
1601
|
requestedToolId,
|
|
1599
1602
|
void 0,
|
|
@@ -1601,9 +1604,9 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1601
1604
|
);
|
|
1602
1605
|
const toolId = String(contract.toolId);
|
|
1603
1606
|
const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
|
|
1604
|
-
const examples =
|
|
1607
|
+
const examples = _chunkQFXPA2E4js.arrayField.call(void 0, tool, "examples").filter(_chunkQFXPA2E4js.isRecord);
|
|
1605
1608
|
const firstExample = examples[0];
|
|
1606
|
-
const sampleInput = firstExample &&
|
|
1609
|
+
const sampleInput = firstExample && _chunkQFXPA2E4js.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunkQFXPA2E4js.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunkQFXPA2E4js.samplePayloadForInputFields.call(void 0, inputFields)));
|
|
1607
1610
|
console.log("Example input payload:");
|
|
1608
1611
|
console.log(JSON.stringify(sampleInput, null, 2));
|
|
1609
1612
|
console.log(`Use in a play:`);
|
|
@@ -1617,32 +1620,32 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1617
1620
|
);
|
|
1618
1621
|
console.log("});");
|
|
1619
1622
|
console.log("const response = result.toolResponse.rawV2;");
|
|
1620
|
-
const getters =
|
|
1623
|
+
const getters = _chunkQFXPA2E4js.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1621
1624
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1622
1625
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1623
|
-
const firstGetter = valueGetters.find(
|
|
1626
|
+
const firstGetter = valueGetters.find(_chunkQFXPA2E4js.isRecord);
|
|
1624
1627
|
if (firstGetter) {
|
|
1625
|
-
const name =
|
|
1626
|
-
const expression =
|
|
1628
|
+
const name = _chunkQFXPA2E4js.stringField.call(void 0, firstGetter, "name") || "value";
|
|
1629
|
+
const expression = _chunkQFXPA2E4js.stringField.call(void 0, firstGetter, "expression");
|
|
1627
1630
|
if (expression)
|
|
1628
1631
|
console.log(
|
|
1629
1632
|
`const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
|
|
1630
1633
|
);
|
|
1631
1634
|
}
|
|
1632
1635
|
const arrayNames = new Set(
|
|
1633
|
-
|
|
1634
|
-
|
|
1636
|
+
_chunkQFXPA2E4js.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1637
|
+
_chunkQFXPA2E4js.recordField.call(void 0, tool, "outputSchema", "output_schema")
|
|
1635
1638
|
).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
|
|
1636
1639
|
);
|
|
1637
1640
|
const firstList = _nullishCoalesce(listGetters.find(
|
|
1638
|
-
(entry) =>
|
|
1639
|
-
), () => ( listGetters.find(
|
|
1640
|
-
if (
|
|
1641
|
-
const name = safeIdentifier(
|
|
1641
|
+
(entry) => _chunkQFXPA2E4js.isRecord.call(void 0, entry) && arrayNames.has(_chunkQFXPA2E4js.stringField.call(void 0, entry, "name"))
|
|
1642
|
+
), () => ( listGetters.find(_chunkQFXPA2E4js.isRecord)));
|
|
1643
|
+
if (_chunkQFXPA2E4js.isRecord.call(void 0, firstList)) {
|
|
1644
|
+
const name = safeIdentifier(_chunkQFXPA2E4js.stringField.call(void 0, firstList, "name") || "list");
|
|
1642
1645
|
if (_chunkJ33TSWO5js.playToolListGetterMode.call(void 0, ) === "array") {
|
|
1643
|
-
console.log(`const ${name}_rows = ${
|
|
1646
|
+
console.log(`const ${name}_rows = ${_chunkQFXPA2E4js.playResultExpression.call(void 0, firstList)};`);
|
|
1644
1647
|
} else {
|
|
1645
|
-
console.log(`const ${name}_ds = ${
|
|
1648
|
+
console.log(`const ${name}_ds = ${_chunkQFXPA2E4js.playResultExpression.call(void 0, firstList)};`);
|
|
1646
1649
|
console.log(
|
|
1647
1650
|
"// Complete small list from this response; throws above the memory cap."
|
|
1648
1651
|
);
|
|
@@ -1652,7 +1655,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1652
1655
|
console.log("```");
|
|
1653
1656
|
if (firstList) printListGetterConsumption();
|
|
1654
1657
|
for (const example of examples) {
|
|
1655
|
-
const description =
|
|
1658
|
+
const description = _chunkQFXPA2E4js.stringField.call(void 0, example, "description");
|
|
1656
1659
|
if (description) console.log(description);
|
|
1657
1660
|
console.log("Example Deepline execution response:");
|
|
1658
1661
|
console.log(JSON.stringify(example.response, null, 2));
|
|
@@ -1667,14 +1670,14 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1667
1670
|
}
|
|
1668
1671
|
function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
1669
1672
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1670
|
-
const inputFields =
|
|
1671
|
-
|
|
1673
|
+
const inputFields = _chunkQFXPA2E4js.toolInputFieldsForDisplay.call(void 0,
|
|
1674
|
+
_chunkQFXPA2E4js.recordField.call(void 0, tool, "inputSchema", "input_schema")
|
|
1672
1675
|
);
|
|
1673
|
-
const sampleInput =
|
|
1674
|
-
const playReference =
|
|
1676
|
+
const sampleInput = _chunkQFXPA2E4js.samplePayloadForInputFields.call(void 0, inputFields);
|
|
1677
|
+
const playReference = _chunkQFXPA2E4js.playReferenceForTool.call(void 0, tool);
|
|
1675
1678
|
console.log("Run as a play:");
|
|
1676
1679
|
console.log(
|
|
1677
|
-
|
|
1680
|
+
_chunkQFXPA2E4js.playRunCommandForTool.call(void 0,
|
|
1678
1681
|
tool,
|
|
1679
1682
|
toolId,
|
|
1680
1683
|
Object.keys(sampleInput).length ? sampleInput : void 0
|
|
@@ -1685,13 +1688,13 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
|
1685
1688
|
}
|
|
1686
1689
|
}
|
|
1687
1690
|
function printToolGettersOnly(tool, requestedToolId) {
|
|
1688
|
-
const contract =
|
|
1691
|
+
const contract = _chunkQFXPA2E4js.toolContractJsonForDescribe.call(void 0,
|
|
1689
1692
|
tool,
|
|
1690
1693
|
requestedToolId,
|
|
1691
1694
|
void 0,
|
|
1692
1695
|
seedToolListScript
|
|
1693
1696
|
);
|
|
1694
|
-
const getters =
|
|
1697
|
+
const getters = _chunkQFXPA2E4js.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1695
1698
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1696
1699
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1697
1700
|
console.log(`Getters: ${contract.toolId}`);
|
|
@@ -1702,9 +1705,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1702
1705
|
if (listGetters.length) {
|
|
1703
1706
|
console.log(listGetterHeading());
|
|
1704
1707
|
for (const entry of listGetters) {
|
|
1705
|
-
if (
|
|
1708
|
+
if (_chunkQFXPA2E4js.isRecord.call(void 0, entry))
|
|
1706
1709
|
console.log(
|
|
1707
|
-
`- ${
|
|
1710
|
+
`- ${_chunkQFXPA2E4js.stringField.call(void 0, entry, "name")}: ${_chunkQFXPA2E4js.playResultExpression.call(void 0, entry)}`
|
|
1708
1711
|
);
|
|
1709
1712
|
}
|
|
1710
1713
|
printListGetterConsumption();
|
|
@@ -1712,9 +1715,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1712
1715
|
if (valueGetters.length) {
|
|
1713
1716
|
console.log("Values:");
|
|
1714
1717
|
for (const entry of valueGetters) {
|
|
1715
|
-
if (
|
|
1718
|
+
if (_chunkQFXPA2E4js.isRecord.call(void 0, entry))
|
|
1716
1719
|
console.log(
|
|
1717
|
-
`- ${
|
|
1720
|
+
`- ${_chunkQFXPA2E4js.stringField.call(void 0, entry, "name")}: ${_chunkQFXPA2E4js.playResultExpression.call(void 0, entry)}`
|
|
1718
1721
|
);
|
|
1719
1722
|
}
|
|
1720
1723
|
}
|
|
@@ -1752,22 +1755,22 @@ function listedToolDescription(tool) {
|
|
|
1752
1755
|
}
|
|
1753
1756
|
function formatListedToolCost(tool) {
|
|
1754
1757
|
const record = tool;
|
|
1755
|
-
if (
|
|
1758
|
+
if (_chunkQFXPA2E4js.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
|
|
1756
1759
|
return "Cost: Free";
|
|
1757
1760
|
}
|
|
1758
|
-
const pricing =
|
|
1759
|
-
const displayText =
|
|
1761
|
+
const pricing = _chunkQFXPA2E4js.recordField.call(void 0, record, "pricing");
|
|
1762
|
+
const displayText = _chunkQFXPA2E4js.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
1760
1763
|
return displayText ? `Cost: ${displayText}` : "";
|
|
1761
1764
|
}
|
|
1762
1765
|
function printToolOutputArrayShape(tool) {
|
|
1763
|
-
const outputFields =
|
|
1764
|
-
|
|
1766
|
+
const outputFields = _chunkQFXPA2E4js.toolOutputFieldsForDisplay.call(void 0,
|
|
1767
|
+
_chunkQFXPA2E4js.recordField.call(void 0, _chunkQFXPA2E4js.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
|
|
1765
1768
|
);
|
|
1766
1769
|
if (outputFields.length === 0) return;
|
|
1767
1770
|
console.log(" Output array shape (declared schema):");
|
|
1768
1771
|
for (const field of outputFields.slice(0, 60)) {
|
|
1769
1772
|
const name = String(field.name);
|
|
1770
|
-
const type =
|
|
1773
|
+
const type = _chunkQFXPA2E4js.stringField.call(void 0, field, "type") || "unknown";
|
|
1771
1774
|
const itemBounds = arrayItemBoundsSuffix(field);
|
|
1772
1775
|
console.log(` - ${name}: ${type}${itemBounds}`);
|
|
1773
1776
|
}
|
|
@@ -1776,14 +1779,14 @@ function printToolOutputArrayShape(tool) {
|
|
|
1776
1779
|
}
|
|
1777
1780
|
}
|
|
1778
1781
|
function declaredToolJsonSchema(inputSchema) {
|
|
1779
|
-
if (
|
|
1782
|
+
if (_chunkQFXPA2E4js.isRecord.call(void 0, inputSchema.jsonSchema)) {
|
|
1780
1783
|
return inputSchema.jsonSchema;
|
|
1781
1784
|
}
|
|
1782
1785
|
return Array.isArray(inputSchema.fields) ? null : inputSchema;
|
|
1783
1786
|
}
|
|
1784
1787
|
function arrayItemBoundsSuffix(field) {
|
|
1785
|
-
const itemSchema =
|
|
1786
|
-
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type :
|
|
1788
|
+
const itemSchema = _chunkQFXPA2E4js.isRecord.call(void 0, field.items) ? field.items : null;
|
|
1789
|
+
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunkQFXPA2E4js.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
|
|
1787
1790
|
const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _14 => _14.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
|
|
1788
1791
|
const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
|
|
1789
1792
|
const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
|
|
@@ -1796,21 +1799,21 @@ function arrayItemBoundsSuffix(field) {
|
|
|
1796
1799
|
return itemTypeSuffix;
|
|
1797
1800
|
}
|
|
1798
1801
|
function printToolExecutionHints(value) {
|
|
1799
|
-
const batchCapabilityRecord =
|
|
1800
|
-
|
|
1802
|
+
const batchCapabilityRecord = _chunkQFXPA2E4js.recordField.call(void 0,
|
|
1803
|
+
_chunkQFXPA2E4js.isRecord.call(void 0, value) ? value : {},
|
|
1801
1804
|
"batchCapability",
|
|
1802
1805
|
"batch_capability"
|
|
1803
1806
|
);
|
|
1804
1807
|
const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
|
|
1805
|
-
const executionMetadata =
|
|
1806
|
-
|
|
1808
|
+
const executionMetadata = _chunkQFXPA2E4js.recordField.call(void 0,
|
|
1809
|
+
_chunkQFXPA2E4js.isRecord.call(void 0, value) ? value : {},
|
|
1807
1810
|
"executionMetadata",
|
|
1808
1811
|
"execution_metadata"
|
|
1809
1812
|
);
|
|
1810
1813
|
if (batchCapability) {
|
|
1811
|
-
const status =
|
|
1812
|
-
const surface =
|
|
1813
|
-
const operation =
|
|
1814
|
+
const status = _chunkQFXPA2E4js.stringField.call(void 0, batchCapability, "status") || "unknown";
|
|
1815
|
+
const surface = _chunkQFXPA2E4js.stringField.call(void 0, batchCapability, "surface");
|
|
1816
|
+
const operation = _chunkQFXPA2E4js.stringField.call(void 0,
|
|
1814
1817
|
batchCapability,
|
|
1815
1818
|
"batchOperation",
|
|
1816
1819
|
"batch_operation"
|
|
@@ -1820,7 +1823,7 @@ function printToolExecutionHints(value) {
|
|
|
1820
1823
|
"maxBatchSize",
|
|
1821
1824
|
"max_batch_size"
|
|
1822
1825
|
);
|
|
1823
|
-
const notes =
|
|
1826
|
+
const notes = _chunkQFXPA2E4js.stringField.call(void 0, batchCapability, "notes");
|
|
1824
1827
|
console.log("");
|
|
1825
1828
|
console.log("Batching:");
|
|
1826
1829
|
console.log(`- Catalog status: ${status}${surface ? ` (${surface})` : ""}`);
|
|
@@ -1839,11 +1842,11 @@ function printToolExecutionHints(value) {
|
|
|
1839
1842
|
}
|
|
1840
1843
|
if (notes) console.log(`- Details: ${notes}`);
|
|
1841
1844
|
}
|
|
1842
|
-
const configuredRateLimits =
|
|
1845
|
+
const configuredRateLimits = _chunkQFXPA2E4js.arrayField.call(void 0,
|
|
1843
1846
|
executionMetadata,
|
|
1844
1847
|
"configuredRateLimits",
|
|
1845
1848
|
"configured_rate_limits"
|
|
1846
|
-
).filter(
|
|
1849
|
+
).filter(_chunkQFXPA2E4js.isRecord);
|
|
1847
1850
|
if (configuredRateLimits.length > 0) {
|
|
1848
1851
|
console.log("");
|
|
1849
1852
|
console.log(
|
|
@@ -1853,7 +1856,7 @@ function printToolExecutionHints(value) {
|
|
|
1853
1856
|
const requests = numberField(limit, "requestsPerWindow");
|
|
1854
1857
|
const windowMs = numberField(limit, "windowMs");
|
|
1855
1858
|
if (requests === null || windowMs === null) continue;
|
|
1856
|
-
const usage =
|
|
1859
|
+
const usage = _chunkQFXPA2E4js.stringField.call(void 0, limit, "usage") || "unknown";
|
|
1857
1860
|
const usageText = usage === "queue_hint" ? "queue hint" : usage === "enforced" ? "Deepline enforced" : usage === "queue_hint_and_enforced" ? "queue hint and Deepline enforced" : usage === "disabled" ? "disabled" : usage;
|
|
1858
1861
|
const explicitMaxConcurrency = numberField(
|
|
1859
1862
|
limit,
|
|
@@ -1862,11 +1865,11 @@ function printToolExecutionHints(value) {
|
|
|
1862
1865
|
);
|
|
1863
1866
|
const concurrencyText = explicitMaxConcurrency === null ? "no explicit concurrency limit" : `explicit concurrency limit ${explicitMaxConcurrency}`;
|
|
1864
1867
|
console.log(
|
|
1865
|
-
`- ${requests} requests per ${formatRateWindow(windowMs)} (${usageText}; ${concurrencyText})`
|
|
1868
|
+
`- ${requests} requests per ${formatRateWindow(windowMs)}${_chunkLRNYRGCNjs.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
|
|
1866
1869
|
);
|
|
1867
1870
|
}
|
|
1868
1871
|
}
|
|
1869
|
-
const queueHint =
|
|
1872
|
+
const queueHint = _chunkQFXPA2E4js.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
|
|
1870
1873
|
const requestsPerSecondHint = numberField(
|
|
1871
1874
|
queueHint,
|
|
1872
1875
|
"requestsPerSecondHint",
|
|
@@ -1887,29 +1890,30 @@ function formatRateWindow(windowMs) {
|
|
|
1887
1890
|
if (windowMs === 1e3) return "second";
|
|
1888
1891
|
if (windowMs === 6e4) return "minute";
|
|
1889
1892
|
if (windowMs === 36e5) return "hour";
|
|
1893
|
+
if (windowMs === 864e5) return "day";
|
|
1890
1894
|
return `${windowMs}ms`;
|
|
1891
1895
|
}
|
|
1892
1896
|
function samplePayload(samples, key) {
|
|
1893
1897
|
const entry = samples[key];
|
|
1894
|
-
if (!
|
|
1898
|
+
if (!_chunkQFXPA2E4js.isRecord.call(void 0, entry)) return void 0;
|
|
1895
1899
|
return Object.prototype.hasOwnProperty.call(entry, "payload") ? entry.payload : entry;
|
|
1896
1900
|
}
|
|
1897
1901
|
function commandEnvelopeFromRawResponse(rawResponse) {
|
|
1898
|
-
return
|
|
1902
|
+
return _chunkQFXPA2E4js.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
|
|
1899
1903
|
}
|
|
1900
1904
|
function toolExecuteExitCode(envelope) {
|
|
1901
1905
|
return envelope.status === "failed" || envelope.ok === false ? 1 : 0;
|
|
1902
1906
|
}
|
|
1903
1907
|
function extractToolExecutionWarningMessages(rawResponse) {
|
|
1904
|
-
if (!
|
|
1908
|
+
if (!_chunkQFXPA2E4js.isRecord.call(void 0, rawResponse)) return [];
|
|
1905
1909
|
const candidates = [
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1910
|
+
_chunkQFXPA2E4js.recordField.call(void 0, _chunkQFXPA2E4js.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
|
|
1911
|
+
_chunkQFXPA2E4js.recordField.call(void 0,
|
|
1912
|
+
_chunkQFXPA2E4js.recordField.call(void 0, _chunkQFXPA2E4js.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
|
|
1909
1913
|
"meta"
|
|
1910
1914
|
),
|
|
1911
|
-
|
|
1912
|
-
|
|
1915
|
+
_chunkQFXPA2E4js.recordField.call(void 0, rawResponse, "meta"),
|
|
1916
|
+
_chunkQFXPA2E4js.recordField.call(void 0, _chunkQFXPA2E4js.recordField.call(void 0, rawResponse, "result"), "meta")
|
|
1913
1917
|
];
|
|
1914
1918
|
const messages = [];
|
|
1915
1919
|
for (const candidate of candidates) {
|
|
@@ -1918,8 +1922,8 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
1918
1922
|
for (const warning of warnings) {
|
|
1919
1923
|
if (typeof warning === "string" && warning.trim()) {
|
|
1920
1924
|
messages.push(warning.trim());
|
|
1921
|
-
} else if (
|
|
1922
|
-
const message =
|
|
1925
|
+
} else if (_chunkQFXPA2E4js.isRecord.call(void 0, warning)) {
|
|
1926
|
+
const message = _chunkQFXPA2E4js.stringField.call(void 0, warning, "message");
|
|
1923
1927
|
if (message) messages.push(message);
|
|
1924
1928
|
}
|
|
1925
1929
|
}
|
|
@@ -1927,20 +1931,20 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
1927
1931
|
return [...new Set(messages)];
|
|
1928
1932
|
}
|
|
1929
1933
|
function apifySyncRecoveryNext(rawResponse) {
|
|
1930
|
-
if (!
|
|
1931
|
-
const toolResponse =
|
|
1932
|
-
const raw =
|
|
1934
|
+
if (!_chunkQFXPA2E4js.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
|
|
1935
|
+
const toolResponse = _chunkQFXPA2E4js.recordField.call(void 0, rawResponse, "toolResponse");
|
|
1936
|
+
const raw = _chunkQFXPA2E4js.recordField.call(void 0, toolResponse, "raw");
|
|
1933
1937
|
if (raw.state !== "awaiting_apify") return null;
|
|
1934
|
-
const next =
|
|
1935
|
-
const getActorRun =
|
|
1936
|
-
const getActorRunTool =
|
|
1937
|
-
const getActorRunPayload =
|
|
1938
|
+
const next = _chunkQFXPA2E4js.recordField.call(void 0, raw, "next");
|
|
1939
|
+
const getActorRun = _chunkQFXPA2E4js.recordField.call(void 0, next, "getActorRun");
|
|
1940
|
+
const getActorRunTool = _chunkQFXPA2E4js.stringField.call(void 0, getActorRun, "tool");
|
|
1941
|
+
const getActorRunPayload = _chunkQFXPA2E4js.recordField.call(void 0, getActorRun, "payload");
|
|
1938
1942
|
if (!getActorRunTool || Object.keys(getActorRunPayload).length === 0) {
|
|
1939
1943
|
return null;
|
|
1940
1944
|
}
|
|
1941
|
-
const getDatasetItems =
|
|
1942
|
-
const getDatasetItemsTool =
|
|
1943
|
-
const getDatasetItemsPayload =
|
|
1945
|
+
const getDatasetItems = _chunkQFXPA2E4js.recordField.call(void 0, next, "getDatasetItems");
|
|
1946
|
+
const getDatasetItemsTool = _chunkQFXPA2E4js.stringField.call(void 0, getDatasetItems, "tool");
|
|
1947
|
+
const getDatasetItemsPayload = _chunkQFXPA2E4js.recordField.call(void 0, getDatasetItems, "payload");
|
|
1944
1948
|
return {
|
|
1945
1949
|
getActorRun: `deepline tools execute ${getActorRunTool} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
|
|
1946
1950
|
...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
|
|
@@ -1950,7 +1954,7 @@ function apifySyncRecoveryNext(rawResponse) {
|
|
|
1950
1954
|
}
|
|
1951
1955
|
function listExtractorPathsFromUsageGuidance(tool) {
|
|
1952
1956
|
const toolExecutionResult = _optionalChain([tool, 'access', _16 => _16.usageGuidance, 'optionalAccess', _17 => _17.toolExecutionResult]);
|
|
1953
|
-
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists :
|
|
1957
|
+
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists : _chunkQFXPA2E4js.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _19 => _19.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
|
|
1954
1958
|
return extractedLists.flatMap((entry) => {
|
|
1955
1959
|
const paths = _nullishCoalesce(_optionalChain([entry, 'access', _20 => _20.details, 'optionalAccess', _21 => _21.candidatePaths]), () => ( _optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.rawToolOutputPaths])));
|
|
1956
1960
|
if (!Array.isArray(paths)) return [];
|
|
@@ -2035,7 +2039,7 @@ function parseJsonObjectArgument(raw, flagName) {
|
|
|
2035
2039
|
}
|
|
2036
2040
|
throw invalidJsonError(flagName, message);
|
|
2037
2041
|
}
|
|
2038
|
-
if (!
|
|
2042
|
+
if (!_chunkQFXPA2E4js.isRecord.call(void 0, parsed)) {
|
|
2039
2043
|
throw invalidJsonError(flagName, "expected an object.");
|
|
2040
2044
|
}
|
|
2041
2045
|
return parsed;
|
|
@@ -2079,7 +2083,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2079
2083
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2080
2084
|
}
|
|
2081
2085
|
if (options.idempotencyKey !== void 0) {
|
|
2082
|
-
|
|
2086
|
+
_chunkCGZ2KKPMjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2083
2087
|
}
|
|
2084
2088
|
if (options.recoveryTimeoutMs !== void 0) {
|
|
2085
2089
|
const parsed = Number(options.recoveryTimeoutMs);
|
|
@@ -2208,7 +2212,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2208
2212
|
kind: summaryEntries.length > 0 ? "object" : "raw",
|
|
2209
2213
|
summary: input.summary
|
|
2210
2214
|
};
|
|
2211
|
-
const envelopeHasCanonicalOutput =
|
|
2215
|
+
const envelopeHasCanonicalOutput = _chunkQFXPA2E4js.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
|
|
2212
2216
|
const envelopeHasDeclaredOutput = Object.prototype.hasOwnProperty.call(
|
|
2213
2217
|
envelope,
|
|
2214
2218
|
"output"
|
|
@@ -2236,7 +2240,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2236
2240
|
return {
|
|
2237
2241
|
...envelope,
|
|
2238
2242
|
...input.idempotencyKey ? { idempotency_key: input.idempotencyKey } : {},
|
|
2239
|
-
...
|
|
2243
|
+
..._chunkQFXPA2E4js.isRecord.call(void 0, input.rawResponse) && _chunkQFXPA2E4js.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
|
|
2240
2244
|
...envelopeHasCanonicalOutput || envelopeHasDeclaredOutput ? { output_preview: outputPreview } : { output: outputPreview },
|
|
2241
2245
|
...summaryEntries.length > 0 ? { summary: input.summary } : {},
|
|
2242
2246
|
...warningMessages.length > 0 ? { warnings: warningMessages } : {},
|
|
@@ -2297,7 +2301,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
|
|
|
2297
2301
|
void _render;
|
|
2298
2302
|
void _next;
|
|
2299
2303
|
void _local;
|
|
2300
|
-
const billingLookup =
|
|
2304
|
+
const billingLookup = _chunkQFXPA2E4js.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
|
|
2301
2305
|
const inspection = toolExecutionInspection(input);
|
|
2302
2306
|
return {
|
|
2303
2307
|
...base,
|
|
@@ -2400,19 +2404,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2400
2404
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2401
2405
|
} catch (error) {
|
|
2402
2406
|
if (wantsJson) {
|
|
2403
|
-
|
|
2407
|
+
_chunkEWXXWSQMjs.printJsonError.call(void 0, error);
|
|
2404
2408
|
} else {
|
|
2405
2409
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2406
2410
|
}
|
|
2407
2411
|
return error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2408
2412
|
}
|
|
2409
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2413
|
+
const cliInvocationId = _nullishCoalesce(_chunkBE2GX674js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkBE2GX674js.beginToolExecuteCommand.call(void 0, )));
|
|
2410
2414
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2411
|
-
const tracing =
|
|
2415
|
+
const tracing = _chunk757V3FDWjs.isCliTraceEnabled.call(void 0, );
|
|
2412
2416
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2413
|
-
const client = new (0,
|
|
2417
|
+
const client = new (0, _chunkCGZ2KKPMjs.DeeplineClient)();
|
|
2414
2418
|
if (clientStartedAt !== void 0) {
|
|
2415
|
-
|
|
2419
|
+
_chunk757V3FDWjs.recordCliTrace.call(void 0, {
|
|
2416
2420
|
phase: "cli.tool_execute_client_setup",
|
|
2417
2421
|
ms: performance.now() - clientStartedAt
|
|
2418
2422
|
});
|
|
@@ -2421,13 +2425,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2421
2425
|
const readMetadata = async () => {
|
|
2422
2426
|
if (metadata) return metadata;
|
|
2423
2427
|
try {
|
|
2424
|
-
metadata = await
|
|
2428
|
+
metadata = await _chunkBE2GX674js.runToolExecuteStage.call(void 0,
|
|
2425
2429
|
"tool metadata lookup",
|
|
2426
2430
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2427
2431
|
);
|
|
2428
2432
|
} catch (error) {
|
|
2429
2433
|
if (isMissingToolMetadataError(error)) {
|
|
2430
|
-
const play = await
|
|
2434
|
+
const play = await _chunkBE2GX674js.runToolExecuteStage.call(void 0,
|
|
2431
2435
|
"play alias lookup",
|
|
2432
2436
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2433
2437
|
);
|
|
@@ -2441,7 +2445,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2441
2445
|
}
|
|
2442
2446
|
throw error;
|
|
2443
2447
|
}
|
|
2444
|
-
if (
|
|
2448
|
+
if (_chunkQFXPA2E4js.isPlayLikeTool.call(void 0, metadata)) {
|
|
2445
2449
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
2446
2450
|
playLikeToolExecuteErrorMessage(
|
|
2447
2451
|
parsed.toolId,
|
|
@@ -2466,7 +2470,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2466
2470
|
metadata = await readMetadata();
|
|
2467
2471
|
} catch (error) {
|
|
2468
2472
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2469
|
-
if (wantsJson)
|
|
2473
|
+
if (wantsJson) _chunkEWXXWSQMjs.printJsonError.call(void 0, error);
|
|
2470
2474
|
else console.error(error.message);
|
|
2471
2475
|
return 2;
|
|
2472
2476
|
}
|
|
@@ -2482,7 +2486,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2482
2486
|
metadata = await readMetadata();
|
|
2483
2487
|
} catch (error) {
|
|
2484
2488
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2485
|
-
if (wantsJson)
|
|
2489
|
+
if (wantsJson) _chunkEWXXWSQMjs.printJsonError.call(void 0, error);
|
|
2486
2490
|
else console.error(error.message);
|
|
2487
2491
|
return 2;
|
|
2488
2492
|
}
|
|
@@ -2508,11 +2512,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2508
2512
|
responseIntent,
|
|
2509
2513
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2510
2514
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2511
|
-
searchRef:
|
|
2515
|
+
searchRef: _chunkLVM7CSAHjs.recentSearchRef.call(void 0, ),
|
|
2512
2516
|
cliInvocationId,
|
|
2513
|
-
onResponseReceived:
|
|
2517
|
+
onResponseReceived: _chunkPP66EATAjs.recordApiResponse,
|
|
2514
2518
|
...tracing ? {
|
|
2515
|
-
onServerTiming: (serverTiming) =>
|
|
2519
|
+
onServerTiming: (serverTiming) => _chunk757V3FDWjs.recordCliTrace.call(void 0, {
|
|
2516
2520
|
phase: "tool_execute_server_timing",
|
|
2517
2521
|
cliInvocationId,
|
|
2518
2522
|
serverTiming,
|
|
@@ -2523,13 +2527,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2523
2527
|
let rawResponse;
|
|
2524
2528
|
let successfulCompatibilityResponse;
|
|
2525
2529
|
try {
|
|
2526
|
-
const executeResult = await
|
|
2530
|
+
const executeResult = await _chunkBE2GX674js.runToolExecuteStage.call(void 0,
|
|
2527
2531
|
"execute request",
|
|
2528
2532
|
async () => {
|
|
2529
2533
|
try {
|
|
2530
2534
|
if (tracing) {
|
|
2531
2535
|
submissionStartedAt = performance.now();
|
|
2532
|
-
|
|
2536
|
+
_chunk757V3FDWjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2533
2537
|
}
|
|
2534
2538
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2535
2539
|
...executeOptions,
|
|
@@ -2538,34 +2542,34 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2538
2542
|
} catch (error) {
|
|
2539
2543
|
if (!(error instanceof _chunkDIAWYWT5js.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2540
2544
|
throw error;
|
|
2541
|
-
const baseUrl =
|
|
2545
|
+
const baseUrl = _chunkPXXIBSBGjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2542
2546
|
if (maintenancePolicy !== "off") {
|
|
2543
|
-
|
|
2547
|
+
_chunkYV6N4BF2js.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2544
2548
|
}
|
|
2545
|
-
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await
|
|
2549
|
+
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await _chunkBE2GX674js.runToolExecuteStage.call(void 0,
|
|
2546
2550
|
"SDK compatibility",
|
|
2547
|
-
() =>
|
|
2551
|
+
() => _chunkYV6N4BF2js.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
2548
2552
|
command: "tools execute",
|
|
2549
|
-
skillsVersion:
|
|
2553
|
+
skillsVersion: _chunkPXXIBSBGjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2550
2554
|
persistCache: maintenancePolicy !== "off"
|
|
2551
2555
|
})
|
|
2552
2556
|
);
|
|
2553
2557
|
if (compatibility.error) throw compatibility.error;
|
|
2554
2558
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _28 => _28.readMetadata, 'call', _29 => _29()]), () => ( metadata));
|
|
2555
|
-
if (maintenancePolicy !== "off" && await
|
|
2559
|
+
if (maintenancePolicy !== "off" && await _chunkBE2GX674js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2556
2560
|
compatibility.response,
|
|
2557
2561
|
baseUrl,
|
|
2558
2562
|
maintenancePolicy
|
|
2559
2563
|
)) {
|
|
2560
2564
|
return void 0;
|
|
2561
2565
|
}
|
|
2562
|
-
|
|
2566
|
+
_chunkYV6N4BF2js.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
2563
2567
|
quietAdvisory: wantsJson
|
|
2564
2568
|
});
|
|
2565
2569
|
if (maintenancePolicy !== "off") {
|
|
2566
|
-
await
|
|
2570
|
+
await _chunkBE2GX674js.runToolExecuteStage.call(void 0,
|
|
2567
2571
|
"agent skills sync",
|
|
2568
|
-
() =>
|
|
2572
|
+
() => _chunkYV6N4BF2js.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2569
2573
|
update: _optionalChain([compatibility, 'access', _30 => _30.response, 'optionalAccess', _31 => _31.skills]),
|
|
2570
2574
|
mode: "detached"
|
|
2571
2575
|
})
|
|
@@ -2574,7 +2578,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2574
2578
|
const legacyMetadata = await readMetadata();
|
|
2575
2579
|
if (tracing) {
|
|
2576
2580
|
submissionStartedAt = performance.now();
|
|
2577
|
-
|
|
2581
|
+
_chunk757V3FDWjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2578
2582
|
}
|
|
2579
2583
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2580
2584
|
...executeOptions,
|
|
@@ -2595,8 +2599,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2595
2599
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2596
2600
|
const updateRequiredBeforeExecution = error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2597
2601
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2598
|
-
const baseUrl =
|
|
2599
|
-
if (await
|
|
2602
|
+
const baseUrl = _chunkPXXIBSBGjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2603
|
+
if (await _chunkBE2GX674js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2600
2604
|
compatibility.response,
|
|
2601
2605
|
baseUrl,
|
|
2602
2606
|
maintenancePolicy
|
|
@@ -2615,7 +2619,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2615
2619
|
failure = diagnosticError;
|
|
2616
2620
|
}
|
|
2617
2621
|
if (failure instanceof _chunkDIAWYWT5js.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2618
|
-
if (wantsJson)
|
|
2622
|
+
if (wantsJson) _chunkEWXXWSQMjs.printJsonError.call(void 0, failure);
|
|
2619
2623
|
else console.error(failure.message);
|
|
2620
2624
|
return 2;
|
|
2621
2625
|
}
|
|
@@ -2642,9 +2646,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2642
2646
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
2643
2647
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _37 => _37.auto_update]);
|
|
2644
2648
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _38 => _38.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
2645
|
-
await
|
|
2649
|
+
await _chunkBE2GX674js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2646
2650
|
compatibilityResponse,
|
|
2647
|
-
|
|
2651
|
+
_chunkPXXIBSBGjs.resolveConfig.call(void 0, ).baseUrl,
|
|
2648
2652
|
maintenancePolicy
|
|
2649
2653
|
);
|
|
2650
2654
|
}
|
|
@@ -2662,8 +2666,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2662
2666
|
);
|
|
2663
2667
|
}
|
|
2664
2668
|
}
|
|
2665
|
-
const responseMetadata =
|
|
2666
|
-
|
|
2669
|
+
const responseMetadata = _chunkQFXPA2E4js.recordField.call(void 0,
|
|
2670
|
+
_chunkQFXPA2E4js.recordField.call(void 0, rawResponse, "_metadata"),
|
|
2667
2671
|
"tool"
|
|
2668
2672
|
);
|
|
2669
2673
|
const listOutputPaths = responseMetadata.listOutputPaths;
|
|
@@ -2675,11 +2679,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2675
2679
|
await readMetadata()
|
|
2676
2680
|
);
|
|
2677
2681
|
}
|
|
2678
|
-
if (
|
|
2682
|
+
if (_chunkQFXPA2E4js.isRecord.call(void 0, rawResponse)) {
|
|
2679
2683
|
const { _metadata, ...execution } = rawResponse;
|
|
2680
2684
|
rawResponse = execution;
|
|
2681
2685
|
}
|
|
2682
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
2686
|
+
const { listConversion, summary, baseEnvelope } = await _chunkBE2GX674js.runToolExecuteStage.call(void 0,
|
|
2683
2687
|
"result formatting",
|
|
2684
2688
|
async () => {
|
|
2685
2689
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -2714,9 +2718,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2714
2718
|
}
|
|
2715
2719
|
skillsSyncAttempted = true;
|
|
2716
2720
|
try {
|
|
2717
|
-
await
|
|
2721
|
+
await _chunkBE2GX674js.runToolExecuteStage.call(void 0,
|
|
2718
2722
|
"agent skills sync",
|
|
2719
|
-
() =>
|
|
2723
|
+
() => _chunkYV6N4BF2js.syncSdkSkillsIfNeeded.call(void 0, _chunkPXXIBSBGjs.resolveConfig.call(void 0, ).baseUrl, {
|
|
2720
2724
|
update: deliveredCompatibilityResponse.skills,
|
|
2721
2725
|
mode: "detached"
|
|
2722
2726
|
})
|
|
@@ -2727,15 +2731,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2727
2731
|
);
|
|
2728
2732
|
}
|
|
2729
2733
|
};
|
|
2730
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
2734
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkEWXXWSQMjs.printCommandEnvelope.call(void 0, envelope, {
|
|
2731
2735
|
...options2,
|
|
2732
2736
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
2733
2737
|
});
|
|
2734
2738
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
2735
2739
|
await syncSkillsForDeliveredOutput();
|
|
2736
|
-
|
|
2740
|
+
_chunkEWXXWSQMjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
2737
2741
|
};
|
|
2738
|
-
const delivered = await
|
|
2742
|
+
const delivered = await _chunkBE2GX674js.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
2739
2743
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
2740
2744
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
2741
2745
|
return true;
|
|
@@ -2748,7 +2752,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2748
2752
|
await printDeliveredJsonEnvelope({
|
|
2749
2753
|
...baseEnvelope,
|
|
2750
2754
|
local: {
|
|
2751
|
-
...
|
|
2755
|
+
..._chunkQFXPA2E4js.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
|
|
2752
2756
|
payload_file: jsonPath
|
|
2753
2757
|
}
|
|
2754
2758
|
});
|
|
@@ -2764,7 +2768,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2764
2768
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
2765
2769
|
);
|
|
2766
2770
|
if (wantsJson) {
|
|
2767
|
-
|
|
2771
|
+
_chunkEWXXWSQMjs.printJsonError.call(void 0, error);
|
|
2768
2772
|
} else {
|
|
2769
2773
|
console.error(error.message);
|
|
2770
2774
|
}
|
|
@@ -2859,13 +2863,13 @@ inspect: ${inspection.inspect}
|
|
|
2859
2863
|
return true;
|
|
2860
2864
|
});
|
|
2861
2865
|
if (delivered) {
|
|
2862
|
-
await
|
|
2866
|
+
await _chunkBE2GX674js.runToolExecuteStage.call(void 0,
|
|
2863
2867
|
"acknowledge delivery",
|
|
2864
2868
|
() => recovery.acknowledgeDelivery()
|
|
2865
2869
|
);
|
|
2866
2870
|
}
|
|
2867
2871
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
2868
|
-
|
|
2872
|
+
_chunkYV6N4BF2js.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
2869
2873
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _40 => _40.auto_update, 'optionalAccess', _41 => _41.should_auto_update]) === true
|
|
2870
2874
|
});
|
|
2871
2875
|
}
|