deepline 0.3.311 → 0.3.313
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/play.ts +7 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +159 -61
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +11 -6
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +23 -1
- package/dist/bundling-sources/shared_libs/plays/core.ts +7 -1
- package/dist/bundling-sources/shared_libs/plays/settings-contract.ts +29 -3
- package/dist/cli/auth-56NYRTQK.js +31 -0
- package/dist/cli/{auth-2A7OYHFJ.mjs → auth-LNA6WCQA.mjs} +4 -4
- package/dist/cli/{billing-P7GIAP3U.mjs → billing-D37QNIE3.mjs} +5 -5
- package/dist/cli/{billing-2PQ4VDRR.js → billing-GJJUUCOZ.js} +71 -71
- package/dist/cli/{chunk-DUEHAEPM.mjs → chunk-3ZC4PHJ6.mjs} +1 -1
- package/dist/cli/{chunk-LRI2FQF2.js → chunk-4UXNEC5C.js} +26 -26
- package/dist/cli/{tools-WN7T25LW.js → chunk-6G7ZYA6E.js} +231 -87
- package/dist/cli/chunk-76VKBPOC.mjs +406 -0
- package/dist/cli/{chunk-HOCPOTDX.mjs → chunk-BLMO3JMZ.mjs} +2 -2
- package/dist/cli/{play-SOG5Q2GE.mjs → chunk-BS4GAUMH.mjs} +166 -90
- package/dist/cli/{chunk-SPUTBCUR.mjs → chunk-CSH4PKPJ.mjs} +1 -1
- package/dist/cli/{chunk-Q3LYQTSO.mjs → chunk-DOI3UBGV.mjs} +1 -1
- package/dist/cli/{chunk-GCX3343L.js → chunk-FJUIXWZF.js} +48 -48
- package/dist/cli/{chunk-RNJ74JDH.js → chunk-FSZTWQFK.js} +4 -4
- package/dist/cli/{chunk-XDUQQTIS.js → chunk-GQXEHX5X.js} +6 -6
- package/dist/cli/{chunk-SGTSJCOA.mjs → chunk-HM2TSTCT.mjs} +1 -1
- package/dist/cli/{chunk-FYPZ43Y4.js → chunk-HY2SSFRI.js} +1 -1
- package/dist/cli/{chunk-7TT4LZIR.js → chunk-I4FHFGMA.js} +60 -60
- package/dist/cli/{chunk-W7INSYJS.js → chunk-IALPYID6.js} +3 -3
- package/dist/cli/{chunk-VODJJUKE.js → chunk-JG2ZTDZV.js} +15 -15
- package/dist/cli/{chunk-5IBHISKA.js → chunk-KNGTN7NE.js} +6 -6
- package/dist/cli/{chunk-QO3GH6UP.js → chunk-MHETTUWR.js} +2 -2
- package/dist/cli/{chunk-TBX7AA7Y.mjs → chunk-N2DXWS6W.mjs} +2 -2
- package/dist/cli/{chunk-WB6Z2Q44.mjs → chunk-N5V2SBB2.mjs} +19 -1
- package/dist/cli/{chunk-ZDO3TO3M.js → chunk-OJ243ZA5.js} +19 -1
- package/dist/cli/{chunk-QJA6SJHA.mjs → chunk-OTA5C7DD.mjs} +1 -1
- package/dist/cli/{play-BCMGFYTF.js → chunk-P4N7233B.js} +342 -266
- package/dist/cli/{chunk-4WFNAWVO.mjs → chunk-QCXDLOGA.mjs} +2 -2
- package/dist/cli/{chunk-IB7OGQGH.js → chunk-QQMKX7JW.js} +29 -9
- package/dist/cli/{chunk-ICZB4GTY.mjs → chunk-RDUS2EDE.mjs} +23 -3
- package/dist/cli/{tools-G4HGCHNQ.mjs → chunk-UQBMMN4U.mjs} +180 -36
- package/dist/cli/{chunk-4NIQA6S7.mjs → chunk-US4S3E4Y.mjs} +1 -1
- package/dist/cli/{chunk-QYL5ZV4U.js → chunk-VSAYSOVC.js} +6 -6
- package/dist/cli/{chunk-G3QP2WYR.mjs → chunk-XFEPRIW7.mjs} +4 -4
- package/dist/cli/chunk-XNL3SEMC.js +406 -0
- package/dist/cli/{chunk-5OVNL6LS.mjs → chunk-YZ5PP6TX.mjs} +1 -1
- package/dist/cli/{client-PNLDT2M3.mjs → client-6RVRZ4OY.mjs} +3 -3
- package/dist/cli/client-XUTMYJDL.js +20 -0
- package/dist/cli/{csv-L5DN7F45.js → csv-2UHRG67O.js} +12 -12
- package/dist/cli/{csv-KUAATBZQ.mjs → csv-SBOHBKEG.mjs} +3 -3
- package/dist/cli/{db-WZOD6NP5.mjs → db-TUFTPYEA.mjs} +4 -4
- package/dist/cli/{db-6NIH4KTZ.js → db-VRE7CLIQ.js} +20 -20
- package/dist/cli/describe-GS5A2XH4.js +236 -0
- package/dist/cli/describe-WCBZTSOF.mjs +236 -0
- package/dist/cli/{executions-TQ5WRHDS.js → executions-ENMOOKWH.js} +6 -6
- package/dist/cli/{executions-RDDXGT2Y.mjs → executions-UTN3O372.mjs} +4 -4
- package/dist/cli/{feedback-NYKLEQB6.js → feedback-BLN6SIRG.js} +6 -6
- package/dist/cli/{feedback-ZB4WKBSS.mjs → feedback-PXBA3AG7.mjs} +3 -3
- package/dist/cli/git-26D3VD2I.js +23 -0
- package/dist/cli/{git-E6DKAX3X.mjs → git-YDMIRW3Q.mjs} +4 -4
- package/dist/cli/index.js +82 -78
- package/dist/cli/index.mjs +45 -41
- package/dist/cli/{legacy-noops-26Y5NSU6.js → legacy-noops-CWTUWTDB.js} +7 -7
- package/dist/cli/{legacy-noops-25B7JCOZ.mjs → legacy-noops-OVG2SICQ.mjs} +4 -4
- package/dist/cli/{monitors-WRTHO7DT.mjs → monitors-ATIDXJA4.mjs} +7 -7
- package/dist/cli/{monitors-L3GFT4MG.js → monitors-T63OPBTY.js} +88 -88
- package/dist/cli/{org-BNCTGPWF.js → org-7RVAPMRN.js} +60 -60
- package/dist/cli/{org-ZTHOFVEO.mjs → org-NXKNIM3H.mjs} +4 -4
- package/dist/cli/play-B62OVHD4.mjs +152 -0
- package/dist/cli/play-WM3NZVE7.js +152 -0
- package/dist/cli/{providers-MLOKTD6O.js → providers-EITVEGXD.js} +7 -7
- package/dist/cli/{providers-SLAPPVMU.mjs → providers-U7B7JEYY.mjs} +4 -4
- package/dist/cli/{quickstart-IWJLGET3.js → quickstart-G64F2XRU.js} +5 -5
- package/dist/cli/{quickstart-LZRKZLNQ.mjs → quickstart-VSWTYNJM.mjs} +3 -3
- package/dist/cli/{search-RCDGSNWW.mjs → search-SKYTFKKF.mjs} +13 -5
- package/dist/cli/search-TXQJJQWY.js +26 -0
- package/dist/cli/{secrets-GDPYV6OC.mjs → secrets-4DNS7KWS.mjs} +4 -4
- package/dist/cli/{secrets-24KEMSCU.js → secrets-JSFHSCGM.js} +13 -13
- package/dist/cli/{sessions-ST5XQQZN.mjs → sessions-HB7RQ4XN.mjs} +4 -4
- package/dist/cli/{sessions-QOUUGVP3.js → sessions-MLTYPPCG.js} +5 -5
- package/dist/cli/{settings-4XWDMAA2.js → settings-3PCKNBPU.js} +74 -74
- package/dist/cli/{settings-V6Z775TO.mjs → settings-BT5WCU65.mjs} +7 -7
- package/dist/cli/{setup-QPZLP25U.mjs → setup-EIWDTMCK.mjs} +6 -6
- package/dist/cli/{setup-W7SPZTUL.js → setup-EYZWTDJI.js} +41 -41
- package/dist/cli/skills-73T4BSDE.js +28 -0
- package/dist/cli/{skills-QG22R2EI.mjs → skills-AQ3ORN2C.mjs} +4 -4
- package/dist/cli/tools-OFTB2BGP.mjs +38 -0
- package/dist/cli/tools-ZGSOHWBY.js +38 -0
- package/dist/cli/{update-5PSYBGVU.mjs → update-ERQTFSAR.mjs} +6 -6
- package/dist/cli/update-L4V5TF7I.js +28 -0
- package/dist/cli/{workflow-ZEQ46MGG.js → workflow-6D6NHUH4.js} +16 -16
- package/dist/cli/{workflow-EK7DV4AQ.mjs → workflow-SRLWGGBM.mjs} +6 -6
- package/dist/{client-DpnkGBn-.d.mts → client-CtVdLZux.d.mts} +21 -4
- package/dist/{client-ypdBvf1o.d.ts → client-OBwghxPC.d.ts} +21 -4
- package/dist/{compiler-manifest-qtTNYvBl.d.ts → compiler-manifest-wOKNiXpa.d.mts} +21 -0
- package/dist/{compiler-manifest-qtTNYvBl.d.mts → compiler-manifest-wOKNiXpa.d.ts} +21 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +13 -10
- package/dist/index.mjs +16 -13
- package/dist/install-integrity.json +84 -76
- package/dist/plays/bundle-play-file.d.mts +2 -2
- package/dist/plays/bundle-play-file.d.ts +2 -2
- package/dist/plays/bundle-play-file.mjs +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- 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-66JFXP6C.js +0 -31
- package/dist/cli/client-ADWRS22F.js +0 -20
- package/dist/cli/git-E56KOYJR.js +0 -23
- package/dist/cli/search-6FBDSA3K.js +0 -18
- package/dist/cli/skills-WKOQBJY7.js +0 -28
- package/dist/cli/update-WKVCWGYY.js +0 -28
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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; }
|
|
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
|
-
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkXNL3SEMCjs = require('./chunk-XNL3SEMC.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkQQMKX7JWjs = require('./chunk-QQMKX7JW.js');
|
|
5
11
|
|
|
6
12
|
|
|
7
13
|
|
|
@@ -12,8 +18,7 @@ var _chunkIB7OGQGHjs = require('./chunk-IB7OGQGH.js');
|
|
|
12
18
|
var _chunkNXDRDJ4Kjs = require('./chunk-NXDRDJ4K.js');
|
|
13
19
|
|
|
14
20
|
|
|
15
|
-
var
|
|
16
|
-
require('./chunk-LA46MMTL.js');
|
|
21
|
+
var _chunkVSAYSOVCjs = require('./chunk-VSAYSOVC.js');
|
|
17
22
|
|
|
18
23
|
|
|
19
24
|
|
|
@@ -28,19 +33,14 @@ var _chunkQJBJZVG6js = require('./chunk-QJBJZVG6.js');
|
|
|
28
33
|
|
|
29
34
|
|
|
30
35
|
|
|
31
|
-
var
|
|
36
|
+
var _chunkGQXEHX5Xjs = require('./chunk-GQXEHX5X.js');
|
|
32
37
|
|
|
33
38
|
|
|
34
39
|
|
|
35
|
-
var
|
|
36
|
-
require('./chunk-XNYIZMNQ.js');
|
|
37
|
-
require('./chunk-FYPZ43Y4.js');
|
|
38
|
-
require('./chunk-S6R3OX7B.js');
|
|
40
|
+
var _chunkFSZTWQFKjs = require('./chunk-FSZTWQFK.js');
|
|
39
41
|
|
|
40
42
|
|
|
41
43
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
42
|
-
require('./chunk-OG64RBAC.js');
|
|
43
|
-
require('./chunk-COGTRVWW.js');
|
|
44
44
|
|
|
45
45
|
// src/cli/commands/tools.ts
|
|
46
46
|
var _commander = require('commander');
|
|
@@ -82,10 +82,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
function pendingToolExecutionPath(input) {
|
|
85
|
-
const config =
|
|
85
|
+
const config = _chunkFSZTWQFKjs.resolveConfig.call(void 0, );
|
|
86
86
|
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");
|
|
87
87
|
return _path.join.call(void 0,
|
|
88
|
-
|
|
88
|
+
_chunkFSZTWQFKjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
89
89
|
`pending-tool-execution-${fingerprint}.json`
|
|
90
90
|
);
|
|
91
91
|
}
|
|
@@ -333,7 +333,7 @@ function toolConnectionStatusMessage(input) {
|
|
|
333
333
|
|
|
334
334
|
// src/cli/commands/tools.ts
|
|
335
335
|
var TOOL_COMMAND_TEMPLATES = {
|
|
336
|
-
describe: "deepline
|
|
336
|
+
describe: "deepline describe <toolId>",
|
|
337
337
|
execute: "deepline tools execute <toolId> --input '{...}'"
|
|
338
338
|
};
|
|
339
339
|
function toListedTool(tool) {
|
|
@@ -517,12 +517,12 @@ function categoryEnumerationRender(summaries) {
|
|
|
517
517
|
};
|
|
518
518
|
}
|
|
519
519
|
async function listToolCategories(emitJson, compact) {
|
|
520
|
-
const client = new (0,
|
|
520
|
+
const client = new (0, _chunkVSAYSOVCjs.DeeplineClient)();
|
|
521
521
|
const rawTools = await client.listTools({ compact });
|
|
522
522
|
const items = rawTools.map(toListedTool);
|
|
523
523
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
524
524
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
525
|
-
|
|
525
|
+
_chunkGQXEHX5Xjs.printCommandEnvelope.call(void 0,
|
|
526
526
|
{
|
|
527
527
|
tools: outputItems,
|
|
528
528
|
count: outputItems.length,
|
|
@@ -541,7 +541,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
541
541
|
const known = summaries.map((item) => item.name);
|
|
542
542
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
543
543
|
if (emitJson) {
|
|
544
|
-
|
|
544
|
+
_chunkGQXEHX5Xjs.printJson.call(void 0, {
|
|
545
545
|
ok: false,
|
|
546
546
|
exitCode: 4,
|
|
547
547
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -555,13 +555,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
555
555
|
const render = categoryEnumerationRender(summaries);
|
|
556
556
|
console.error(message);
|
|
557
557
|
console.error("");
|
|
558
|
-
console.error(
|
|
558
|
+
console.error(_chunkGQXEHX5Xjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
559
559
|
console.error("");
|
|
560
560
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
561
561
|
return 4;
|
|
562
562
|
}
|
|
563
563
|
async function listToolsInCategory(category, emitJson) {
|
|
564
|
-
const client = new (0,
|
|
564
|
+
const client = new (0, _chunkVSAYSOVCjs.DeeplineClient)();
|
|
565
565
|
const rawTools = await client.listTools({
|
|
566
566
|
categories: category,
|
|
567
567
|
compact: false
|
|
@@ -594,13 +594,11 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
594
594
|
},
|
|
595
595
|
{
|
|
596
596
|
title: "next",
|
|
597
|
-
lines: [
|
|
598
|
-
"Run `deepline tools describe <toolId>` for the full contract."
|
|
599
|
-
]
|
|
597
|
+
lines: ["Run `deepline describe <toolId>` for the full contract."]
|
|
600
598
|
}
|
|
601
599
|
]
|
|
602
600
|
};
|
|
603
|
-
|
|
601
|
+
_chunkGQXEHX5Xjs.printCommandEnvelope.call(void 0,
|
|
604
602
|
{
|
|
605
603
|
category,
|
|
606
604
|
total: rows.length,
|
|
@@ -613,7 +611,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
613
611
|
return 0;
|
|
614
612
|
}
|
|
615
613
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
616
|
-
const client = new (0,
|
|
614
|
+
const client = new (0, _chunkVSAYSOVCjs.DeeplineClient)();
|
|
617
615
|
const items = (await client.listTools({
|
|
618
616
|
categories: requestedCategories.join(","),
|
|
619
617
|
compact
|
|
@@ -636,13 +634,13 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
636
634
|
{
|
|
637
635
|
title: "next",
|
|
638
636
|
lines: [
|
|
639
|
-
"Run `deepline
|
|
637
|
+
"Run `deepline describe <toolId>` before executing a tool."
|
|
640
638
|
]
|
|
641
639
|
}
|
|
642
640
|
]
|
|
643
641
|
};
|
|
644
642
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
645
|
-
|
|
643
|
+
_chunkGQXEHX5Xjs.printCommandEnvelope.call(void 0,
|
|
646
644
|
{
|
|
647
645
|
tools: outputItems,
|
|
648
646
|
count: outputItems.length,
|
|
@@ -661,13 +659,13 @@ async function listTools(category, options = {}) {
|
|
|
661
659
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]), () => ( ""));
|
|
662
660
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
663
661
|
const compact = options.compact !== false;
|
|
664
|
-
const emitJson = options.json === true ||
|
|
662
|
+
const emitJson = options.json === true || _chunkGQXEHX5Xjs.shouldEmitJson.call(void 0, );
|
|
665
663
|
if (positional && flagCategories.length > 0) {
|
|
666
664
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
667
665
|
if (!flagIsSameSingle) {
|
|
668
666
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
669
667
|
if (emitJson) {
|
|
670
|
-
|
|
668
|
+
_chunkGQXEHX5Xjs.printJson.call(void 0, {
|
|
671
669
|
ok: false,
|
|
672
670
|
exitCode: 2,
|
|
673
671
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -694,7 +692,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
694
692
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
695
693
|
return 1;
|
|
696
694
|
}
|
|
697
|
-
const client = new (0,
|
|
695
|
+
const client = new (0, _chunkVSAYSOVCjs.DeeplineClient)();
|
|
698
696
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
699
697
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
700
698
|
const jsonOutput = options.json === true;
|
|
@@ -737,7 +735,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
737
735
|
query,
|
|
738
736
|
mode
|
|
739
737
|
}) : null;
|
|
740
|
-
|
|
738
|
+
_chunkGQXEHX5Xjs.printCommandEnvelope.call(void 0,
|
|
741
739
|
{
|
|
742
740
|
tools: outputTools,
|
|
743
741
|
count: outputTools.length,
|
|
@@ -755,7 +753,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
755
753
|
} : {},
|
|
756
754
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
757
755
|
},
|
|
758
|
-
{ json: options.json ||
|
|
756
|
+
{ json: options.json || _chunkGQXEHX5Xjs.shouldEmitJson.call(void 0, ) }
|
|
759
757
|
);
|
|
760
758
|
return 0;
|
|
761
759
|
}
|
|
@@ -802,7 +800,7 @@ function playAliasToolErrorMessage(toolId, play) {
|
|
|
802
800
|
const playName = _nullishCoalesce(play.reference, () => ( play.name));
|
|
803
801
|
return `${toolId} is a play, not a tool.
|
|
804
802
|
Use: deepline plays run ${playName} --input '{...}'
|
|
805
|
-
Inspect its schema with: deepline
|
|
803
|
+
Inspect its schema with: deepline describe ${playName}`;
|
|
806
804
|
}
|
|
807
805
|
function printPlayAliasToolError(toolId, play) {
|
|
808
806
|
console.error(playAliasToolErrorMessage(toolId, play));
|
|
@@ -847,6 +845,15 @@ function playLikeToolExecuteErrorMessage(toolId, tool) {
|
|
|
847
845
|
function printPlayLikeToolExecuteError(toolId, tool) {
|
|
848
846
|
console.error(playLikeToolExecuteErrorMessage(toolId, tool));
|
|
849
847
|
}
|
|
848
|
+
var TOOL_ONLY_VIEWS = [
|
|
849
|
+
"compact",
|
|
850
|
+
"contractJson",
|
|
851
|
+
"pricingOnly",
|
|
852
|
+
"examplesOnly",
|
|
853
|
+
"gettersOnly",
|
|
854
|
+
"model",
|
|
855
|
+
"estimatePayload"
|
|
856
|
+
];
|
|
850
857
|
function registerToolsCommands(program) {
|
|
851
858
|
const tools = program.command("tools").description(
|
|
852
859
|
"Search by intent or structured filters, describe, and execute atomic provider tools."
|
|
@@ -859,13 +866,12 @@ Concepts:
|
|
|
859
866
|
|
|
860
867
|
Common commands:
|
|
861
868
|
deepline search --type tools email --json
|
|
862
|
-
deepline
|
|
863
|
-
deepline tools describe hunter_email_verifier --pricing-only --json
|
|
869
|
+
deepline describe hunter_email_verifier
|
|
864
870
|
deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
|
|
865
871
|
deepline billing usage --request-id <job_id> --json
|
|
866
872
|
|
|
867
873
|
Output:
|
|
868
|
-
Use describe for tool contracts.
|
|
874
|
+
Use deepline describe for tool contracts.
|
|
869
875
|
Use execute to run a tool.
|
|
870
876
|
Read pricing before execution; use the returned next.billing command for its
|
|
871
877
|
exact charge. Workspace balance changes also include other callers' activity.
|
|
@@ -903,7 +909,7 @@ Examples:
|
|
|
903
909
|
json: Boolean(options.json)
|
|
904
910
|
});
|
|
905
911
|
});
|
|
906
|
-
|
|
912
|
+
_chunkQQMKX7JWjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
907
913
|
tools.command("grep <query>").description(
|
|
908
914
|
"Literal grep over tool ids, descriptions, categories, and input fields."
|
|
909
915
|
).addHelpText(
|
|
@@ -955,7 +961,6 @@ Examples:
|
|
|
955
961
|
deepline tools describe hunter_email_verifier
|
|
956
962
|
deepline tools describe hunter_email_verifier --pricing-only
|
|
957
963
|
deepline tools describe hunter_email_verifier --pricing-only --json
|
|
958
|
-
deepline tools describe hunter_email_verifier --schema-only
|
|
959
964
|
deepline tools describe hunter_email_verifier --examples-only
|
|
960
965
|
deepline tools describe hunter_email_verifier --json
|
|
961
966
|
deepline tools describe deeplineagent --model openai/gpt-5.6-luna --json
|
|
@@ -969,7 +974,7 @@ Examples:
|
|
|
969
974
|
).option(
|
|
970
975
|
"--estimate-payload <payload>",
|
|
971
976
|
"Quote an ai_evaluate, ai_inference, or deeplineagent JSON payload (inline or @file)"
|
|
972
|
-
).option("--pricing-only", "Only print pricing and billing semantics").option(
|
|
977
|
+
).option("--pricing-only", "Only print pricing and billing semantics").option(
|
|
973
978
|
"--examples-only",
|
|
974
979
|
"Only print input payload and full Deepline execution response examples"
|
|
975
980
|
).option("--getters-only", "Only print extracted list/value getters").addOption(
|
|
@@ -985,7 +990,7 @@ Examples:
|
|
|
985
990
|
).action(async (toolId, options) => {
|
|
986
991
|
const metadata = compatibilityMetadata;
|
|
987
992
|
compatibilityMetadata = void 0;
|
|
988
|
-
|
|
993
|
+
const narrowView = () => getTool(
|
|
989
994
|
toolId,
|
|
990
995
|
{
|
|
991
996
|
json: Boolean(options.json),
|
|
@@ -1000,9 +1005,26 @@ Examples:
|
|
|
1000
1005
|
},
|
|
1001
1006
|
metadata
|
|
1002
1007
|
);
|
|
1008
|
+
const narrow = !toolId || TOOL_ONLY_VIEWS.some((view) => options[view] !== void 0);
|
|
1009
|
+
if (narrow) {
|
|
1010
|
+
process.exitCode = await narrowView();
|
|
1011
|
+
return;
|
|
1012
|
+
}
|
|
1013
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-GS5A2XH4.js")));
|
|
1014
|
+
process.exitCode = await describeAnything(
|
|
1015
|
+
toolId,
|
|
1016
|
+
{ ...options, kinds: ["tools", "monitors"], fetchedTool: metadata },
|
|
1017
|
+
// An unknown id keeps this command's own error and play hint.
|
|
1018
|
+
narrowView
|
|
1019
|
+
);
|
|
1003
1020
|
});
|
|
1004
1021
|
};
|
|
1005
|
-
addToolMetadataCommand(
|
|
1022
|
+
addToolMetadataCommand(
|
|
1023
|
+
_chunkXNL3SEMCjs.addDescribeOptions.call(void 0,
|
|
1024
|
+
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
1025
|
+
{ json: false }
|
|
1026
|
+
)
|
|
1027
|
+
);
|
|
1006
1028
|
tools.command("execute <toolId>").description("Execute a tool by id.").addHelpText(
|
|
1007
1029
|
"after",
|
|
1008
1030
|
`
|
|
@@ -1011,14 +1033,14 @@ Notes:
|
|
|
1011
1033
|
waterfalls, row maps, checkpoints, and retries.
|
|
1012
1034
|
Calling a provider-backed tool can spend Deepline credits. Use --json for the
|
|
1013
1035
|
stable result payload plus output preview and debugging helpers.
|
|
1014
|
-
Read pricing first with
|
|
1036
|
+
Read pricing first with deepline describe <toolId>.
|
|
1015
1037
|
Use the returned next.billing command to look up this execution's exact charge;
|
|
1016
1038
|
workspace balance changes also include other callers' activity.
|
|
1017
1039
|
--timeout sets this CLI request's HTTP deadline; it does not cancel provider work.
|
|
1018
1040
|
|
|
1019
1041
|
Examples:
|
|
1020
1042
|
deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
|
|
1021
|
-
deepline
|
|
1043
|
+
deepline describe hunter_email_verifier
|
|
1022
1044
|
deepline billing usage --request-id <job_id> --json
|
|
1023
1045
|
deepline tools execute bounceban_verify_bulk --input @batch.json --timeout 10m --json
|
|
1024
1046
|
deepline tools execute hunter_email_verifier -p email=a@b.com
|
|
@@ -1085,7 +1107,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1085
1107
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1086
1108
|
return 1;
|
|
1087
1109
|
}
|
|
1088
|
-
const client = new (0,
|
|
1110
|
+
const client = new (0, _chunkVSAYSOVCjs.DeeplineClient)();
|
|
1089
1111
|
let tool;
|
|
1090
1112
|
try {
|
|
1091
1113
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1139,7 +1161,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1139
1161
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1140
1162
|
if (inferenceQuote)
|
|
1141
1163
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1142
|
-
|
|
1164
|
+
_chunkGQXEHX5Xjs.printCommandEnvelope.call(void 0,
|
|
1143
1165
|
{
|
|
1144
1166
|
toolId: String(tool.toolId || toolId),
|
|
1145
1167
|
cost: Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
@@ -1157,7 +1179,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1157
1179
|
}
|
|
1158
1180
|
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !isMonitorTypeTool(tool) && !isPlayLikeTool(tool) && (options.json || options.contractJson)) {
|
|
1159
1181
|
const contract = toolContractJsonForDescribe(tool, toolId);
|
|
1160
|
-
|
|
1182
|
+
_chunkGQXEHX5Xjs.printCompactJson.call(void 0, {
|
|
1161
1183
|
toolId: contract.toolId,
|
|
1162
1184
|
...options.schemaOnly ? {
|
|
1163
1185
|
inputSchema: contract.inputSchema,
|
|
@@ -1180,7 +1202,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1180
1202
|
return 0;
|
|
1181
1203
|
}
|
|
1182
1204
|
if (options.contractJson) {
|
|
1183
|
-
|
|
1205
|
+
_chunkGQXEHX5Xjs.printCompactJson.call(void 0, {
|
|
1184
1206
|
...toolContractJsonForDescribe(tool, toolId),
|
|
1185
1207
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1186
1208
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -1189,7 +1211,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1189
1211
|
}
|
|
1190
1212
|
const emitJson = options.json === true;
|
|
1191
1213
|
if (emitJson) {
|
|
1192
|
-
|
|
1214
|
+
_chunkGQXEHX5Xjs.printCompactJson.call(void 0, {
|
|
1193
1215
|
...toolMetadataJsonForDescribe(tool, toolId),
|
|
1194
1216
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1195
1217
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -1220,8 +1242,8 @@ ${formatModelDescription(modelDescription)}`);
|
|
|
1220
1242
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1221
1243
|
return 0;
|
|
1222
1244
|
}
|
|
1223
|
-
if (
|
|
1224
|
-
|
|
1245
|
+
if (_chunkGQXEHX5Xjs.shouldEmitJson.call(void 0, )) {
|
|
1246
|
+
_chunkGQXEHX5Xjs.printCompactJson.call(void 0, {
|
|
1225
1247
|
...toolContractJsonForDescribe(tool, toolId),
|
|
1226
1248
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1227
1249
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -1459,7 +1481,127 @@ function printMonitorTypeContract(tool, requestedToolId) {
|
|
|
1459
1481
|
console.log("");
|
|
1460
1482
|
printMonitorTypeDeploy(tool);
|
|
1461
1483
|
console.log("");
|
|
1462
|
-
console.log(`More: deepline
|
|
1484
|
+
console.log(`More: deepline describe ${toolId}`);
|
|
1485
|
+
}
|
|
1486
|
+
function schemaNodeAt(schema, path) {
|
|
1487
|
+
let node = schema;
|
|
1488
|
+
for (const part of path.split(".").filter(Boolean)) {
|
|
1489
|
+
const [key, ...indexes] = part.split("[");
|
|
1490
|
+
node = recordField(isRecord(node) ? node : {}, "properties")[key];
|
|
1491
|
+
for (const _index of indexes)
|
|
1492
|
+
node = isRecord(node) ? node.items : void 0;
|
|
1493
|
+
}
|
|
1494
|
+
return node;
|
|
1495
|
+
}
|
|
1496
|
+
function jsonSchemaOf(wrapper) {
|
|
1497
|
+
return isRecord(wrapper.jsonSchema) ? wrapper.jsonSchema : wrapper;
|
|
1498
|
+
}
|
|
1499
|
+
function publicToolSchemas(tool) {
|
|
1500
|
+
const scrubbed = (...keys) => {
|
|
1501
|
+
const schema = recordField(tool, ...keys);
|
|
1502
|
+
if (Object.keys(schema).length === 0) return null;
|
|
1503
|
+
const cleaned = publicToolInputSchemaForDescribe(schema);
|
|
1504
|
+
return isRecord(cleaned.jsonSchema) ? cleaned.jsonSchema : cleaned;
|
|
1505
|
+
};
|
|
1506
|
+
const responseSchema = scrubbed("responseSchema", "response_schema");
|
|
1507
|
+
return {
|
|
1508
|
+
inputSchema: scrubbed(
|
|
1509
|
+
"inputSchema",
|
|
1510
|
+
"input_schema",
|
|
1511
|
+
"payload_schema",
|
|
1512
|
+
"payloadSchema"
|
|
1513
|
+
),
|
|
1514
|
+
outputSchema: scrubbed("outputSchema", "output_schema"),
|
|
1515
|
+
...responseSchema ? { responseSchema } : {}
|
|
1516
|
+
};
|
|
1517
|
+
}
|
|
1518
|
+
function describedTool(tool, requestedToolId) {
|
|
1519
|
+
const id = stringField2(tool, "toolId") || requestedToolId;
|
|
1520
|
+
const displayName = stringField2(tool, "displayName") || void 0;
|
|
1521
|
+
const description = stringField2(tool, "description") || void 0;
|
|
1522
|
+
if (isMonitorTypeTool(tool)) {
|
|
1523
|
+
return {
|
|
1524
|
+
kind: "monitor_type",
|
|
1525
|
+
id,
|
|
1526
|
+
displayName,
|
|
1527
|
+
description,
|
|
1528
|
+
cost: stringField2(recordField(tool, "pricing"), "displayText") || void 0,
|
|
1529
|
+
guidance: [],
|
|
1530
|
+
inputs: _chunkXNL3SEMCjs.schemaFields.call(void 0,
|
|
1531
|
+
recordField(tool, "payload_schema", "payloadSchema")
|
|
1532
|
+
),
|
|
1533
|
+
outputs: [],
|
|
1534
|
+
runner: {
|
|
1535
|
+
via: "monitor",
|
|
1536
|
+
deploy: stringField2(recordField(tool, "deploy"), "example") || `deepline monitors deploy '{"key":"...","tool":"${id}","payload":{...}}'`
|
|
1537
|
+
}
|
|
1538
|
+
};
|
|
1539
|
+
}
|
|
1540
|
+
const contract = toolContractJsonForDescribe(tool, requestedToolId);
|
|
1541
|
+
const cost = recordField(contract, "cost");
|
|
1542
|
+
const billing = stringField2(cost, "billingSourceLabel");
|
|
1543
|
+
const deprecation = recordField(contract, "deprecation");
|
|
1544
|
+
const getters = recordField(contract, "getters");
|
|
1545
|
+
const outputSchema = jsonSchemaOf(recordField(contract, "outputSchema"));
|
|
1546
|
+
const toolResult = recordField(tool, "toolResult", "tool_result");
|
|
1547
|
+
const getterDetails = (kind) => new Map(
|
|
1548
|
+
arrayField2(toolResult, kind).filter(isRecord).map((item) => [
|
|
1549
|
+
stringField2(item, "name"),
|
|
1550
|
+
recordField(item, "details")
|
|
1551
|
+
])
|
|
1552
|
+
);
|
|
1553
|
+
const getterOutputs = (kind, roots) => {
|
|
1554
|
+
const details = getterDetails(kind);
|
|
1555
|
+
return arrayField2(getters, kind).filter(isRecord).map((entry) => {
|
|
1556
|
+
const name = stringField2(entry, "name");
|
|
1557
|
+
const paths = arrayField2(
|
|
1558
|
+
_nullishCoalesce(details.get(name), () => ( {})),
|
|
1559
|
+
"rawToolOutputPaths"
|
|
1560
|
+
).map((path) => String(path).replace(/^toolResponse\.raw\./, ""));
|
|
1561
|
+
const node = roots.flatMap((root) => paths.map((path) => schemaNodeAt(root, path))).find(isRecord);
|
|
1562
|
+
const { fields, ...typed } = _chunkXNL3SEMCjs.schemaField.call(void 0, name, node, true);
|
|
1563
|
+
const valueType = stringField2(_nullishCoalesce(details.get(name), () => ( {})), "valueType");
|
|
1564
|
+
const field = {
|
|
1565
|
+
...typed,
|
|
1566
|
+
// A normalized value has a named type instead of the response's shape.
|
|
1567
|
+
...valueType ? { type: valueType } : fields ? { fields } : {},
|
|
1568
|
+
// A list's row columns that matter are value getters of their own.
|
|
1569
|
+
...kind === "extractedLists" && fields ? { summarized: true } : {},
|
|
1570
|
+
read: playResultExpression(entry)
|
|
1571
|
+
};
|
|
1572
|
+
return { field, node };
|
|
1573
|
+
});
|
|
1574
|
+
};
|
|
1575
|
+
const lists = getterOutputs("extractedLists", [outputSchema]);
|
|
1576
|
+
const values = getterOutputs("extractedValues", [
|
|
1577
|
+
outputSchema,
|
|
1578
|
+
...lists.map(({ node }) => _optionalChain([node, 'optionalAccess', _13 => _13.items]))
|
|
1579
|
+
]);
|
|
1580
|
+
const playReference = isPlayLikeTool(tool) ? playReferenceForTool(tool) : null;
|
|
1581
|
+
return {
|
|
1582
|
+
kind: "tool",
|
|
1583
|
+
id: String(contract.toolId),
|
|
1584
|
+
displayName,
|
|
1585
|
+
description,
|
|
1586
|
+
cost: [
|
|
1587
|
+
stringField2(cost, "displayText"),
|
|
1588
|
+
// "Free (free)" says the same thing twice.
|
|
1589
|
+
billing.toLowerCase() === stringField2(cost, "displayText").toLowerCase() ? "" : billing && `(${billing})`
|
|
1590
|
+
].filter(Boolean).join(" ") || void 0,
|
|
1591
|
+
guidance: [
|
|
1592
|
+
...contract.deprecated === true ? [`Deprecated. ${stringField2(deprecation, "message")}`.trim()] : [],
|
|
1593
|
+
...Object.values(recordField(contract, "guidance")).filter(
|
|
1594
|
+
(line) => typeof line === "string" && /[a-z0-9]/i.test(line)
|
|
1595
|
+
)
|
|
1596
|
+
],
|
|
1597
|
+
rateLimit: _chunkXNL3SEMCjs.rateLimitSummary.call(void 0,
|
|
1598
|
+
recordField(contract, "executionMetadata").configuredRateLimits
|
|
1599
|
+
),
|
|
1600
|
+
inputs: _chunkXNL3SEMCjs.schemaFields.call(void 0, jsonSchemaOf(recordField(contract, "inputSchema"))),
|
|
1601
|
+
outputs: [...lists, ...values].map(({ field }) => field),
|
|
1602
|
+
rawResponse: _chunkXNL3SEMCjs.schemaFields.call(void 0, outputSchema),
|
|
1603
|
+
runner: playReference ? { via: "play", reference: playReference } : { via: "tool", toolId: String(contract.toolId) }
|
|
1604
|
+
};
|
|
1463
1605
|
}
|
|
1464
1606
|
function toolGuidanceLines(guidance) {
|
|
1465
1607
|
const record = isRecord(guidance) ? guidance : {};
|
|
@@ -1516,7 +1658,7 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1516
1658
|
}
|
|
1517
1659
|
console.log("");
|
|
1518
1660
|
console.log(
|
|
1519
|
-
`More: deepline
|
|
1661
|
+
`More: deepline describe ${replacementToolId || contract.toolId} --json`
|
|
1520
1662
|
);
|
|
1521
1663
|
return;
|
|
1522
1664
|
}
|
|
@@ -1574,9 +1716,7 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1574
1716
|
console.log(
|
|
1575
1717
|
"Provider-specific fields: inspect result.toolResponse.rawV2 and its observed envelope. Prefer the declared getters above."
|
|
1576
1718
|
);
|
|
1577
|
-
console.log(
|
|
1578
|
-
`More: deepline tools describe ${contract.toolId} --pricing-only | --schema-only | --examples-only | --getters-only | --json`
|
|
1579
|
-
);
|
|
1719
|
+
console.log(`More: deepline describe ${contract.toolId} --json`);
|
|
1580
1720
|
}
|
|
1581
1721
|
function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
1582
1722
|
if (isMonitorTypeTool(tool)) {
|
|
@@ -1718,7 +1858,7 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
|
1718
1858
|
)
|
|
1719
1859
|
);
|
|
1720
1860
|
if (playReference) {
|
|
1721
|
-
console.log(`deepline
|
|
1861
|
+
console.log(`deepline describe ${playReference}`);
|
|
1722
1862
|
}
|
|
1723
1863
|
}
|
|
1724
1864
|
function printToolGettersOnly(tool, requestedToolId) {
|
|
@@ -1934,9 +2074,9 @@ function toolInputFieldsForDisplay(inputSchema) {
|
|
|
1934
2074
|
);
|
|
1935
2075
|
return fields.map((field) => {
|
|
1936
2076
|
const jsonSchemaField = typeof field.name === "string" ? jsonSchemaFields.get(field.name) : void 0;
|
|
1937
|
-
const minItems = typeof field.minItems === "number" ? field.minItems : _optionalChain([jsonSchemaField, 'optionalAccess',
|
|
1938
|
-
const maxItems = typeof field.maxItems === "number" ? field.maxItems : _optionalChain([jsonSchemaField, 'optionalAccess',
|
|
1939
|
-
const items = isRecord(field.items) ? field.items : _optionalChain([jsonSchemaField, 'optionalAccess',
|
|
2077
|
+
const minItems = typeof field.minItems === "number" ? field.minItems : _optionalChain([jsonSchemaField, 'optionalAccess', _14 => _14.minItems]);
|
|
2078
|
+
const maxItems = typeof field.maxItems === "number" ? field.maxItems : _optionalChain([jsonSchemaField, 'optionalAccess', _15 => _15.maxItems]);
|
|
2079
|
+
const items = isRecord(field.items) ? field.items : _optionalChain([jsonSchemaField, 'optionalAccess', _16 => _16.items]);
|
|
1940
2080
|
return {
|
|
1941
2081
|
...field,
|
|
1942
2082
|
...isRecord(items) ? { items } : {},
|
|
@@ -2125,7 +2265,7 @@ function inputFieldJsonForDescribe(field) {
|
|
|
2125
2265
|
function arrayItemBoundsSuffix(field) {
|
|
2126
2266
|
const itemSchema = isRecord(field.items) ? field.items : null;
|
|
2127
2267
|
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : isRecord(itemSchema.properties) ? "object" : "unknown" : null;
|
|
2128
|
-
const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess',
|
|
2268
|
+
const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _17 => _17.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
|
|
2129
2269
|
const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
|
|
2130
2270
|
const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
|
|
2131
2271
|
const maxItems = typeof field.maxItems === "number" && Number.isFinite(field.maxItems) ? field.maxItems : null;
|
|
@@ -2254,7 +2394,7 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
2254
2394
|
];
|
|
2255
2395
|
const messages = [];
|
|
2256
2396
|
for (const candidate of candidates) {
|
|
2257
|
-
const warnings = _optionalChain([candidate, 'optionalAccess',
|
|
2397
|
+
const warnings = _optionalChain([candidate, 'optionalAccess', _18 => _18.warnings]);
|
|
2258
2398
|
if (!Array.isArray(warnings)) continue;
|
|
2259
2399
|
for (const warning of warnings) {
|
|
2260
2400
|
if (typeof warning === "string" && warning.trim()) {
|
|
@@ -2290,10 +2430,10 @@ function apifySyncRecoveryNext(rawResponse) {
|
|
|
2290
2430
|
};
|
|
2291
2431
|
}
|
|
2292
2432
|
function listExtractorPathsFromUsageGuidance(tool) {
|
|
2293
|
-
const toolExecutionResult = _optionalChain([tool, 'access',
|
|
2294
|
-
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess',
|
|
2433
|
+
const toolExecutionResult = _optionalChain([tool, 'access', _19 => _19.usageGuidance, 'optionalAccess', _20 => _20.toolExecutionResult]);
|
|
2434
|
+
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _21 => _21.extractedLists])) ? toolExecutionResult.extractedLists : isRecord(_optionalChain([toolExecutionResult, 'optionalAccess', _22 => _22.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
|
|
2295
2435
|
return extractedLists.flatMap((entry) => {
|
|
2296
|
-
const paths = _nullishCoalesce(_optionalChain([entry, 'access',
|
|
2436
|
+
const paths = _nullishCoalesce(_optionalChain([entry, 'access', _23 => _23.details, 'optionalAccess', _24 => _24.candidatePaths]), () => ( _optionalChain([entry, 'access', _25 => _25.details, 'optionalAccess', _26 => _26.rawToolOutputPaths])));
|
|
2297
2437
|
if (!Array.isArray(paths)) return [];
|
|
2298
2438
|
return paths.map(
|
|
2299
2439
|
(path) => path.trim().replace(/^toolExecutionResult\.toolResponse\.raw\.?/, "").replace(/^toolExecutionResult\.toolOutput\.raw\.?/, "").replace(/^\./, "")
|
|
@@ -2775,15 +2915,15 @@ async function executeTool(args) {
|
|
|
2775
2915
|
try {
|
|
2776
2916
|
parsed = parseExecuteOptions(args);
|
|
2777
2917
|
} catch (error) {
|
|
2778
|
-
if (
|
|
2779
|
-
|
|
2918
|
+
if (_chunkGQXEHX5Xjs.argsWantJson.call(void 0, args)) {
|
|
2919
|
+
_chunkGQXEHX5Xjs.printJsonError.call(void 0, error);
|
|
2780
2920
|
} else {
|
|
2781
2921
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2782
2922
|
}
|
|
2783
2923
|
return 1;
|
|
2784
2924
|
}
|
|
2785
2925
|
const cliInvocationId = _nullishCoalesce(_chunkQJBJZVG6js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkQJBJZVG6js.beginToolExecuteCommand.call(void 0, )));
|
|
2786
|
-
const client = new (0,
|
|
2926
|
+
const client = new (0, _chunkVSAYSOVCjs.DeeplineClient)();
|
|
2787
2927
|
let metadata;
|
|
2788
2928
|
try {
|
|
2789
2929
|
metadata = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0,
|
|
@@ -2797,8 +2937,8 @@ async function executeTool(args) {
|
|
|
2797
2937
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2798
2938
|
);
|
|
2799
2939
|
if (play) {
|
|
2800
|
-
if (
|
|
2801
|
-
|
|
2940
|
+
if (_chunkGQXEHX5Xjs.argsWantJson.call(void 0, args)) {
|
|
2941
|
+
_chunkGQXEHX5Xjs.printJsonError.call(void 0,
|
|
2802
2942
|
new Error(playAliasToolErrorMessage(parsed.toolId, play))
|
|
2803
2943
|
);
|
|
2804
2944
|
} else {
|
|
@@ -2810,8 +2950,8 @@ async function executeTool(args) {
|
|
|
2810
2950
|
throw error;
|
|
2811
2951
|
}
|
|
2812
2952
|
if (isPlayLikeTool(metadata)) {
|
|
2813
|
-
if (
|
|
2814
|
-
|
|
2953
|
+
if (_chunkGQXEHX5Xjs.argsWantJson.call(void 0, args)) {
|
|
2954
|
+
_chunkGQXEHX5Xjs.printJsonError.call(void 0,
|
|
2815
2955
|
new Error(
|
|
2816
2956
|
playLikeToolExecuteErrorMessage(
|
|
2817
2957
|
parsed.toolId,
|
|
@@ -2843,11 +2983,11 @@ async function executeTool(args) {
|
|
|
2843
2983
|
"execute request",
|
|
2844
2984
|
() => client.executeTool(parsed.toolId, parsed.params, {
|
|
2845
2985
|
...parsed.timeoutMs !== void 0 ? { timeout: parsed.timeoutMs } : {},
|
|
2846
|
-
..._optionalChain([metadata, 'access',
|
|
2986
|
+
..._optionalChain([metadata, 'access', _27 => _27.executionMetadata, 'optionalAccess', _28 => _28.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2847
2987
|
responseIntent,
|
|
2848
2988
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2849
2989
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2850
|
-
searchRef:
|
|
2990
|
+
searchRef: _chunkQQMKX7JWjs.recentSearchRef.call(void 0, ),
|
|
2851
2991
|
cliInvocationId
|
|
2852
2992
|
}).catch((error) => {
|
|
2853
2993
|
const guidanceLines = toolGuidanceLines(metadata.guidance);
|
|
@@ -2886,8 +3026,8 @@ async function executeTool(args) {
|
|
|
2886
3026
|
);
|
|
2887
3027
|
const executeExitCode = toolExecuteExitCode(baseEnvelope);
|
|
2888
3028
|
const delivered = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0, "output delivery", () => {
|
|
2889
|
-
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" &&
|
|
2890
|
-
|
|
3029
|
+
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && _chunkGQXEHX5Xjs.shouldEmitJson.call(void 0, ))) {
|
|
3030
|
+
_chunkGQXEHX5Xjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: true });
|
|
2891
3031
|
return true;
|
|
2892
3032
|
}
|
|
2893
3033
|
if (parsed.outputFormat === "json_file") {
|
|
@@ -2895,7 +3035,7 @@ async function executeTool(args) {
|
|
|
2895
3035
|
rawResponse,
|
|
2896
3036
|
`payload_${parsed.toolId}`
|
|
2897
3037
|
);
|
|
2898
|
-
|
|
3038
|
+
_chunkGQXEHX5Xjs.printCommandEnvelope.call(void 0,
|
|
2899
3039
|
{
|
|
2900
3040
|
...baseEnvelope,
|
|
2901
3041
|
local: {
|
|
@@ -2912,8 +3052,8 @@ async function executeTool(args) {
|
|
|
2912
3052
|
const error = new Error(
|
|
2913
3053
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. Re-run with --json to inspect the raw tool response.`
|
|
2914
3054
|
);
|
|
2915
|
-
if (
|
|
2916
|
-
|
|
3055
|
+
if (_chunkGQXEHX5Xjs.argsWantJson.call(void 0, args)) {
|
|
3056
|
+
_chunkGQXEHX5Xjs.printJsonError.call(void 0, error);
|
|
2917
3057
|
} else {
|
|
2918
3058
|
console.error(error.message);
|
|
2919
3059
|
}
|
|
@@ -2924,18 +3064,18 @@ async function executeTool(args) {
|
|
|
2924
3064
|
rawResponse,
|
|
2925
3065
|
`payload_${parsed.toolId}`
|
|
2926
3066
|
);
|
|
2927
|
-
|
|
3067
|
+
_chunkGQXEHX5Xjs.printCommandEnvelope.call(void 0,
|
|
2928
3068
|
{
|
|
2929
3069
|
...baseEnvelope,
|
|
2930
3070
|
local: {
|
|
2931
3071
|
payload_file: jsonPath
|
|
2932
3072
|
}
|
|
2933
3073
|
},
|
|
2934
|
-
{ json: parsed.outputFormat === "csv_file" ||
|
|
3074
|
+
{ json: parsed.outputFormat === "csv_file" || _chunkGQXEHX5Xjs.shouldEmitJson.call(void 0, ) }
|
|
2935
3075
|
);
|
|
2936
3076
|
return true;
|
|
2937
3077
|
}
|
|
2938
|
-
|
|
3078
|
+
_chunkGQXEHX5Xjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: false });
|
|
2939
3079
|
return true;
|
|
2940
3080
|
}
|
|
2941
3081
|
const rowOutput = _chunkNXDRDJ4Kjs.projectRowOutput.call(void 0, listConversion);
|
|
@@ -2957,19 +3097,19 @@ async function executeTool(args) {
|
|
|
2957
3097
|
seededScript
|
|
2958
3098
|
});
|
|
2959
3099
|
if (parsed.outputFormat === "csv_file") {
|
|
2960
|
-
|
|
3100
|
+
_chunkGQXEHX5Xjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: true });
|
|
2961
3101
|
return true;
|
|
2962
3102
|
}
|
|
2963
3103
|
if (parsed.outPath) {
|
|
2964
|
-
|
|
2965
|
-
json:
|
|
3104
|
+
_chunkGQXEHX5Xjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
|
|
3105
|
+
json: _chunkGQXEHX5Xjs.argsWantJson.call(void 0, args) || _chunkGQXEHX5Xjs.shouldEmitJson.call(void 0, ),
|
|
2966
3106
|
text: `Wrote ${csv.rowCount} row(s) to ${csv.path}
|
|
2967
3107
|
`
|
|
2968
3108
|
});
|
|
2969
3109
|
return true;
|
|
2970
3110
|
}
|
|
2971
3111
|
if (parsed.noPreview) {
|
|
2972
|
-
|
|
3112
|
+
_chunkGQXEHX5Xjs.printCommandEnvelope.call(void 0,
|
|
2973
3113
|
{
|
|
2974
3114
|
...materializedEnvelope,
|
|
2975
3115
|
local: {
|
|
@@ -2977,12 +3117,12 @@ async function executeTool(args) {
|
|
|
2977
3117
|
output_path: csv.path
|
|
2978
3118
|
}
|
|
2979
3119
|
},
|
|
2980
|
-
{ json:
|
|
3120
|
+
{ json: _chunkGQXEHX5Xjs.shouldEmitJson.call(void 0, ), text: `${csv.path}
|
|
2981
3121
|
` }
|
|
2982
3122
|
);
|
|
2983
3123
|
return true;
|
|
2984
3124
|
}
|
|
2985
|
-
|
|
3125
|
+
_chunkGQXEHX5Xjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: false });
|
|
2986
3126
|
return true;
|
|
2987
3127
|
});
|
|
2988
3128
|
if (delivered) {
|
|
@@ -3001,4 +3141,8 @@ async function executeTool(args) {
|
|
|
3001
3141
|
|
|
3002
3142
|
|
|
3003
3143
|
|
|
3004
|
-
|
|
3144
|
+
|
|
3145
|
+
|
|
3146
|
+
|
|
3147
|
+
|
|
3148
|
+
exports.isMonitorTypeTool = isMonitorTypeTool; exports.registerToolsCommands = registerToolsCommands; exports.toolContractJsonForDescribe = toolContractJsonForDescribe; exports.printMonitorTypeContract = printMonitorTypeContract; exports.publicToolSchemas = publicToolSchemas; exports.describedTool = describedTool; exports.printCompactToolContract = printCompactToolContract; exports.toolMetadataJsonForDescribe = toolMetadataJsonForDescribe; exports.extractToolExecutionWarningMessages = extractToolExecutionWarningMessages; exports.buildToolExecuteBaseEnvelope = buildToolExecuteBaseEnvelope;
|