deepline 0.3.305 → 0.3.306
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/cli-invocation-id.ts +14 -0
- package/dist/bundling-sources/sdk/src/client.ts +24 -1
- package/dist/bundling-sources/sdk/src/http.ts +11 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +19 -1
- package/dist/cli/{auth-XMYFUM5L.mjs → auth-WTC7LCQ6.mjs} +4 -4
- package/dist/cli/auth-ZT3UF33R.js +31 -0
- package/dist/cli/{billing-NDUDRJ7T.js → billing-3DYTHO32.js} +70 -70
- package/dist/cli/{billing-RXT6NYAU.mjs → billing-VQM65LVP.mjs} +4 -4
- package/dist/cli/chunk-2IKIG333.js +65 -0
- package/dist/cli/{chunk-E4YSOJ2H.js → chunk-2KR56MPF.js} +2 -2
- package/dist/cli/{chunk-6C4SD4U3.mjs → chunk-4PSSDZQB.mjs} +7 -1
- package/dist/cli/{chunk-TGOAQTY3.mjs → chunk-5HS5EEFE.mjs} +3 -3
- package/dist/cli/{chunk-QFSISXKO.mjs → chunk-5V56XCQN.mjs} +1 -1
- package/dist/cli/{chunk-AEMR2R5H.mjs → chunk-6CRUYVU7.mjs} +4 -4
- package/dist/cli/{chunk-SCX2AZFY.mjs → chunk-7XORS6WQ.mjs} +2 -2
- package/dist/cli/{chunk-44GHROVJ.mjs → chunk-FJ3DANI4.mjs} +1 -1
- package/dist/cli/{chunk-ZQOFBLJN.js → chunk-FZNO6B4W.js} +6 -6
- package/dist/cli/{chunk-S3HPQWZ3.mjs → chunk-LLGF6V6I.mjs} +44 -8
- package/dist/cli/{chunk-B7PAZBJX.js → chunk-M6HCRRV2.js} +10 -4
- package/dist/cli/{chunk-COMHSM6F.js → chunk-MMNZ6GBT.js} +6 -6
- package/dist/cli/{chunk-LUBEGHJC.js → chunk-OF7QP2XX.js} +15 -15
- package/dist/cli/{chunk-DNSTXIU4.js → chunk-OZIFVQRY.js} +1 -1
- package/dist/cli/{chunk-KNHD6J3X.js → chunk-PHNAFCSB.js} +275 -239
- package/dist/cli/{chunk-HELHRPU6.mjs → chunk-QDC4XTO3.mjs} +2 -2
- package/dist/cli/{chunk-5UZQ75HD.js → chunk-RODIZCGU.js} +60 -60
- package/dist/cli/{chunk-DY72E7K2.js → chunk-SZQPJW2L.js} +6 -6
- package/dist/cli/{chunk-XZD3NYOL.js → chunk-U37SW6IK.js} +48 -48
- package/dist/cli/chunk-UABLQKTZ.mjs +65 -0
- package/dist/cli/{chunk-445RPDOQ.mjs → chunk-UT3VLSLM.mjs} +5 -5
- package/dist/cli/{chunk-UWDFJXBQ.js → chunk-W7ELTWDM.js} +26 -26
- package/dist/cli/{chunk-LYPASDJJ.mjs → chunk-WV64SNDV.mjs} +1 -1
- package/dist/cli/{chunk-KNK42P4M.mjs → chunk-WWPI4GJI.mjs} +1 -1
- package/dist/cli/{client-WOHHEX5X.mjs → client-DCEK34D5.mjs} +3 -3
- package/dist/cli/client-UQXVU2T6.js +20 -0
- package/dist/cli/{csv-WZ5BOOT7.js → csv-H42JDJ6G.js} +12 -12
- package/dist/cli/{csv-WNPLDGFR.mjs → csv-LXBF5UIV.mjs} +3 -3
- package/dist/cli/{db-GCQJHGME.mjs → db-3O5CFLNP.mjs} +4 -4
- package/dist/cli/{db-GBK4QSIU.js → db-DP5GU4MU.js} +20 -20
- package/dist/cli/{executions-BAS6T2BN.js → executions-5FFTPHEX.js} +6 -6
- package/dist/cli/{executions-MSB6FRNL.mjs → executions-QC2UZKIP.mjs} +4 -4
- package/dist/cli/{feedback-VREMIXAX.mjs → feedback-JCGE6JFW.mjs} +3 -3
- package/dist/cli/{feedback-UHOHIOPV.js → feedback-XAU3FI5S.js} +6 -6
- package/dist/cli/git-CNO2UFZE.js +23 -0
- package/dist/cli/{git-GQKD556H.mjs → git-S3Y3E2NL.mjs} +4 -4
- package/dist/cli/index.js +155 -121
- package/dist/cli/index.mjs +121 -87
- package/dist/cli/{legacy-noops-RI2ROZ6U.mjs → legacy-noops-FQF2IRVS.mjs} +4 -4
- package/dist/cli/{legacy-noops-PIL4KNVA.js → legacy-noops-TXOUX4FX.js} +7 -7
- package/dist/cli/{monitors-UVQLZDIO.js → monitors-4BQCO6B7.js} +85 -85
- package/dist/cli/{monitors-QHLEULAZ.mjs → monitors-F3PELPSH.mjs} +4 -4
- package/dist/cli/{org-BYWI4VI3.mjs → org-ER5J3ATG.mjs} +4 -4
- package/dist/cli/{org-KXJJZOSK.js → org-VQM6OOLK.js} +60 -60
- package/dist/cli/{play-WF7AJJ7J.mjs → play-B5H2RN4N.mjs} +6 -6
- package/dist/cli/{play-3XR54PQY.js → play-WKZPAOW3.js} +200 -200
- package/dist/cli/{providers-4FYRPS4E.js → providers-5TEA2FJG.js} +7 -7
- package/dist/cli/{providers-FG67H5N5.mjs → providers-6ODEAYC2.mjs} +4 -4
- package/dist/cli/{quickstart-IBWIR4LX.mjs → quickstart-BCYT7BCY.mjs} +3 -3
- package/dist/cli/{quickstart-3YCFHVKY.js → quickstart-GJYCNMFC.js} +5 -5
- package/dist/cli/{search-6PQ4QBMC.js → search-KKJ535OX.js} +6 -6
- package/dist/cli/{search-OZRXENTS.mjs → search-RY547KOT.mjs} +5 -5
- package/dist/cli/{secrets-2JW5HCHH.js → secrets-RFGDXSEW.js} +13 -13
- package/dist/cli/{secrets-S3GIROJA.mjs → secrets-U42ZEYIU.mjs} +4 -4
- package/dist/cli/{sessions-6HNVWH3C.mjs → sessions-YWEFB62D.mjs} +4 -4
- package/dist/cli/{sessions-AQQ6WHMK.js → sessions-ZRTWHMIH.js} +5 -5
- package/dist/cli/{settings-6FINI54L.mjs → settings-AS4U6NVP.mjs} +7 -7
- package/dist/cli/{settings-HSHA2FO5.js → settings-XUWFXIL7.js} +74 -74
- package/dist/cli/{setup-XHIBSXCC.mjs → setup-2GUIV2EW.mjs} +6 -6
- package/dist/cli/{setup-O7FZ5EUD.js → setup-2QPWP2FI.js} +41 -41
- package/dist/cli/skills-4E5KYW2Y.js +28 -0
- package/dist/cli/{skills-ZFIIWR5G.mjs → skills-5QS7ERVF.mjs} +4 -4
- package/dist/cli/{tools-4B4NLVOJ.js → tools-J47LIO2H.js} +120 -87
- package/dist/cli/{tools-WURPIECI.mjs → tools-PVWSGCZD.mjs} +76 -43
- package/dist/cli/update-GZKGOMKD.js +28 -0
- package/dist/cli/{update-2THOPAUS.mjs → update-KS4TRSZI.mjs} +6 -6
- package/dist/cli/{workflow-XS5JSKED.js → workflow-HQRUUTTL.js} +15 -15
- package/dist/cli/{workflow-S2G453ZX.mjs → workflow-QCLR7GVC.mjs} +5 -5
- package/dist/{client-BT11xxG8.d.mts → client-Dj8MAkDc.d.mts} +6 -1
- package/dist/{client-5Nsl0O0v.d.ts → client-DsrFGXJf.d.ts} +6 -1
- 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 +73 -70
- 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-WRUUITRZ.js +0 -31
- package/dist/cli/client-KBAPBERE.js +0 -20
- package/dist/cli/git-6QYO4FQH.js +0 -23
- package/dist/cli/skills-3ASRSEF2.js +0 -28
- package/dist/cli/update-7ZPTMO6H.js +0 -28
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkSZQPJW2Ljs = require('./chunk-SZQPJW2L.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -12,23 +12,28 @@ var _chunkDY72E7K2js = require('./chunk-DY72E7K2.js');
|
|
|
12
12
|
var _chunkNXDRDJ4Kjs = require('./chunk-NXDRDJ4K.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkPHNAFCSBjs = require('./chunk-PHNAFCSB.js');
|
|
16
16
|
require('./chunk-LA46MMTL.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
var _chunk2IKIG333js = require('./chunk-2IKIG333.js');
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
|
|
25
|
-
var _chunkCOMHSM6Fjs = require('./chunk-COMHSM6F.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
var _chunkMMNZ6GBTjs = require('./chunk-MMNZ6GBT.js');
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
var _chunkM6HCRRV2js = require('./chunk-M6HCRRV2.js');
|
|
30
35
|
require('./chunk-XNYIZMNQ.js');
|
|
31
|
-
require('./chunk-
|
|
36
|
+
require('./chunk-OZIFVQRY.js');
|
|
32
37
|
require('./chunk-S6R3OX7B.js');
|
|
33
38
|
|
|
34
39
|
|
|
@@ -76,10 +81,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
76
81
|
}
|
|
77
82
|
};
|
|
78
83
|
function pendingToolExecutionPath(input) {
|
|
79
|
-
const config =
|
|
84
|
+
const config = _chunkM6HCRRV2js.resolveConfig.call(void 0, );
|
|
80
85
|
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");
|
|
81
86
|
return _path.join.call(void 0,
|
|
82
|
-
|
|
87
|
+
_chunkM6HCRRV2js.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
83
88
|
`pending-tool-execution-${fingerprint}.json`
|
|
84
89
|
);
|
|
85
90
|
}
|
|
@@ -511,12 +516,12 @@ function categoryEnumerationRender(summaries) {
|
|
|
511
516
|
};
|
|
512
517
|
}
|
|
513
518
|
async function listToolCategories(emitJson, compact) {
|
|
514
|
-
const client = new (0,
|
|
519
|
+
const client = new (0, _chunkPHNAFCSBjs.DeeplineClient)();
|
|
515
520
|
const rawTools = await client.listTools({ compact });
|
|
516
521
|
const items = rawTools.map(toListedTool);
|
|
517
522
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
518
523
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
519
|
-
|
|
524
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0,
|
|
520
525
|
{
|
|
521
526
|
tools: outputItems,
|
|
522
527
|
count: outputItems.length,
|
|
@@ -535,7 +540,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
535
540
|
const known = summaries.map((item) => item.name);
|
|
536
541
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
537
542
|
if (emitJson) {
|
|
538
|
-
|
|
543
|
+
_chunkMMNZ6GBTjs.printJson.call(void 0, {
|
|
539
544
|
ok: false,
|
|
540
545
|
exitCode: 4,
|
|
541
546
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -549,13 +554,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
549
554
|
const render = categoryEnumerationRender(summaries);
|
|
550
555
|
console.error(message);
|
|
551
556
|
console.error("");
|
|
552
|
-
console.error(
|
|
557
|
+
console.error(_chunkMMNZ6GBTjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
553
558
|
console.error("");
|
|
554
559
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
555
560
|
return 4;
|
|
556
561
|
}
|
|
557
562
|
async function listToolsInCategory(category, emitJson) {
|
|
558
|
-
const client = new (0,
|
|
563
|
+
const client = new (0, _chunkPHNAFCSBjs.DeeplineClient)();
|
|
559
564
|
const rawTools = await client.listTools({
|
|
560
565
|
categories: category,
|
|
561
566
|
compact: false
|
|
@@ -594,7 +599,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
594
599
|
}
|
|
595
600
|
]
|
|
596
601
|
};
|
|
597
|
-
|
|
602
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0,
|
|
598
603
|
{
|
|
599
604
|
category,
|
|
600
605
|
total: rows.length,
|
|
@@ -607,7 +612,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
607
612
|
return 0;
|
|
608
613
|
}
|
|
609
614
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
610
|
-
const client = new (0,
|
|
615
|
+
const client = new (0, _chunkPHNAFCSBjs.DeeplineClient)();
|
|
611
616
|
const items = (await client.listTools({
|
|
612
617
|
categories: requestedCategories.join(","),
|
|
613
618
|
compact
|
|
@@ -636,7 +641,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
636
641
|
]
|
|
637
642
|
};
|
|
638
643
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
639
|
-
|
|
644
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0,
|
|
640
645
|
{
|
|
641
646
|
tools: outputItems,
|
|
642
647
|
count: outputItems.length,
|
|
@@ -655,13 +660,13 @@ async function listTools(category, options = {}) {
|
|
|
655
660
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]), () => ( ""));
|
|
656
661
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
657
662
|
const compact = options.compact !== false;
|
|
658
|
-
const emitJson = options.json === true ||
|
|
663
|
+
const emitJson = options.json === true || _chunkMMNZ6GBTjs.shouldEmitJson.call(void 0, );
|
|
659
664
|
if (positional && flagCategories.length > 0) {
|
|
660
665
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
661
666
|
if (!flagIsSameSingle) {
|
|
662
667
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
663
668
|
if (emitJson) {
|
|
664
|
-
|
|
669
|
+
_chunkMMNZ6GBTjs.printJson.call(void 0, {
|
|
665
670
|
ok: false,
|
|
666
671
|
exitCode: 2,
|
|
667
672
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -688,7 +693,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
688
693
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
689
694
|
return 1;
|
|
690
695
|
}
|
|
691
|
-
const client = new (0,
|
|
696
|
+
const client = new (0, _chunkPHNAFCSBjs.DeeplineClient)();
|
|
692
697
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
693
698
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
694
699
|
const jsonOutput = options.json === true;
|
|
@@ -731,7 +736,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
731
736
|
query,
|
|
732
737
|
mode
|
|
733
738
|
}) : null;
|
|
734
|
-
|
|
739
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0,
|
|
735
740
|
{
|
|
736
741
|
tools: outputTools,
|
|
737
742
|
count: outputTools.length,
|
|
@@ -749,7 +754,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
749
754
|
} : {},
|
|
750
755
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
751
756
|
},
|
|
752
|
-
{ json: options.json ||
|
|
757
|
+
{ json: options.json || _chunkMMNZ6GBTjs.shouldEmitJson.call(void 0, ) }
|
|
753
758
|
);
|
|
754
759
|
return 0;
|
|
755
760
|
}
|
|
@@ -777,12 +782,16 @@ function compactTool(tool) {
|
|
|
777
782
|
function playIdentifiers(play) {
|
|
778
783
|
return [play.name, play.reference, ..._nullishCoalesce(play.aliases, () => ( []))].filter((value) => Boolean(_optionalChain([value, 'optionalAccess', _11 => _11.trim, 'call', _12 => _12()]))).map((value) => value.trim());
|
|
779
784
|
}
|
|
780
|
-
async function findPlayForToolId(client, toolId) {
|
|
785
|
+
async function findPlayForToolId(client, toolId, cliInvocationId) {
|
|
781
786
|
const requested = toolId.trim();
|
|
782
787
|
if (!requested) {
|
|
783
788
|
return null;
|
|
784
789
|
}
|
|
785
|
-
const plays = await client.searchPlays({
|
|
790
|
+
const plays = await client.searchPlays({
|
|
791
|
+
query: requested,
|
|
792
|
+
compact: true,
|
|
793
|
+
...cliInvocationId ? { cliInvocationId } : {}
|
|
794
|
+
});
|
|
786
795
|
return _nullishCoalesce(plays.find((play) => playIdentifiers(play).includes(requested)), () => ( null));
|
|
787
796
|
}
|
|
788
797
|
function isMissingToolMetadataError(error) {
|
|
@@ -893,7 +902,7 @@ Examples:
|
|
|
893
902
|
json: Boolean(options.json)
|
|
894
903
|
});
|
|
895
904
|
});
|
|
896
|
-
|
|
905
|
+
_chunkSZQPJW2Ljs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
897
906
|
tools.command("grep <query>").description(
|
|
898
907
|
"Literal grep over tool ids, descriptions, categories, and input fields."
|
|
899
908
|
).addHelpText(
|
|
@@ -1060,7 +1069,7 @@ async function getTool(toolId, options = {}) {
|
|
|
1060
1069
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1061
1070
|
return 1;
|
|
1062
1071
|
}
|
|
1063
|
-
const client = new (0,
|
|
1072
|
+
const client = new (0, _chunkPHNAFCSBjs.DeeplineClient)();
|
|
1064
1073
|
let tool;
|
|
1065
1074
|
try {
|
|
1066
1075
|
tool = await client.getTool(toolId);
|
|
@@ -1114,7 +1123,7 @@ async function getTool(toolId, options = {}) {
|
|
|
1114
1123
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1115
1124
|
if (inferenceQuote)
|
|
1116
1125
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1117
|
-
|
|
1126
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0,
|
|
1118
1127
|
{
|
|
1119
1128
|
toolId: String(tool.toolId || toolId),
|
|
1120
1129
|
cost: Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
@@ -1132,7 +1141,7 @@ async function getTool(toolId, options = {}) {
|
|
|
1132
1141
|
}
|
|
1133
1142
|
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !isMonitorTypeTool(tool) && !isPlayLikeTool(tool) && (options.json || options.contractJson)) {
|
|
1134
1143
|
const contract = toolContractJsonForDescribe(tool, toolId);
|
|
1135
|
-
|
|
1144
|
+
_chunkMMNZ6GBTjs.printCompactJson.call(void 0, {
|
|
1136
1145
|
toolId: contract.toolId,
|
|
1137
1146
|
...options.schemaOnly ? {
|
|
1138
1147
|
inputSchema: contract.inputSchema,
|
|
@@ -1155,7 +1164,7 @@ async function getTool(toolId, options = {}) {
|
|
|
1155
1164
|
return 0;
|
|
1156
1165
|
}
|
|
1157
1166
|
if (options.contractJson) {
|
|
1158
|
-
|
|
1167
|
+
_chunkMMNZ6GBTjs.printCompactJson.call(void 0, {
|
|
1159
1168
|
...toolContractJsonForDescribe(tool, toolId),
|
|
1160
1169
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1161
1170
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -1164,7 +1173,7 @@ async function getTool(toolId, options = {}) {
|
|
|
1164
1173
|
}
|
|
1165
1174
|
const emitJson = options.json === true;
|
|
1166
1175
|
if (emitJson) {
|
|
1167
|
-
|
|
1176
|
+
_chunkMMNZ6GBTjs.printCompactJson.call(void 0, {
|
|
1168
1177
|
...toolMetadataJsonForDescribe(tool, toolId),
|
|
1169
1178
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1170
1179
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -1195,8 +1204,8 @@ ${formatModelDescription(modelDescription)}`);
|
|
|
1195
1204
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1196
1205
|
return 0;
|
|
1197
1206
|
}
|
|
1198
|
-
if (
|
|
1199
|
-
|
|
1207
|
+
if (_chunkMMNZ6GBTjs.shouldEmitJson.call(void 0, )) {
|
|
1208
|
+
_chunkMMNZ6GBTjs.printCompactJson.call(void 0, {
|
|
1200
1209
|
...toolContractJsonForDescribe(tool, toolId),
|
|
1201
1210
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1202
1211
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -2750,23 +2759,30 @@ async function executeTool(args) {
|
|
|
2750
2759
|
try {
|
|
2751
2760
|
parsed = parseExecuteOptions(args);
|
|
2752
2761
|
} catch (error) {
|
|
2753
|
-
if (
|
|
2754
|
-
|
|
2762
|
+
if (_chunkMMNZ6GBTjs.argsWantJson.call(void 0, args)) {
|
|
2763
|
+
_chunkMMNZ6GBTjs.printJsonError.call(void 0, error);
|
|
2755
2764
|
} else {
|
|
2756
2765
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2757
2766
|
}
|
|
2758
2767
|
return 1;
|
|
2759
2768
|
}
|
|
2760
|
-
const
|
|
2769
|
+
const cliInvocationId = _nullishCoalesce(_chunk2IKIG333js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunk2IKIG333js.beginToolExecuteCommand.call(void 0, )));
|
|
2770
|
+
const client = new (0, _chunkPHNAFCSBjs.DeeplineClient)();
|
|
2761
2771
|
let metadata;
|
|
2762
2772
|
try {
|
|
2763
|
-
metadata = await
|
|
2773
|
+
metadata = await _chunk2IKIG333js.runToolExecuteStage.call(void 0,
|
|
2774
|
+
"tool metadata lookup",
|
|
2775
|
+
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2776
|
+
);
|
|
2764
2777
|
} catch (error) {
|
|
2765
2778
|
if (isMissingToolMetadataError(error)) {
|
|
2766
|
-
const play = await
|
|
2779
|
+
const play = await _chunk2IKIG333js.runToolExecuteStage.call(void 0,
|
|
2780
|
+
"play alias lookup",
|
|
2781
|
+
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2782
|
+
);
|
|
2767
2783
|
if (play) {
|
|
2768
|
-
if (
|
|
2769
|
-
|
|
2784
|
+
if (_chunkMMNZ6GBTjs.argsWantJson.call(void 0, args)) {
|
|
2785
|
+
_chunkMMNZ6GBTjs.printJsonError.call(void 0,
|
|
2770
2786
|
new Error(playAliasToolErrorMessage(parsed.toolId, play))
|
|
2771
2787
|
);
|
|
2772
2788
|
} else {
|
|
@@ -2778,8 +2794,8 @@ async function executeTool(args) {
|
|
|
2778
2794
|
throw error;
|
|
2779
2795
|
}
|
|
2780
2796
|
if (isPlayLikeTool(metadata)) {
|
|
2781
|
-
if (
|
|
2782
|
-
|
|
2797
|
+
if (_chunkMMNZ6GBTjs.argsWantJson.call(void 0, args)) {
|
|
2798
|
+
_chunkMMNZ6GBTjs.printJsonError.call(void 0,
|
|
2783
2799
|
new Error(
|
|
2784
2800
|
playLikeToolExecuteErrorMessage(
|
|
2785
2801
|
parsed.toolId,
|
|
@@ -2807,43 +2823,55 @@ async function executeTool(args) {
|
|
|
2807
2823
|
if (idempotencyKey) {
|
|
2808
2824
|
console.error(`Tool execution recovery key: ${idempotencyKey}`);
|
|
2809
2825
|
}
|
|
2810
|
-
const rawResponse = await
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
+
const rawResponse = await _chunk2IKIG333js.runToolExecuteStage.call(void 0,
|
|
2827
|
+
"execute request",
|
|
2828
|
+
() => client.executeTool(parsed.toolId, parsed.params, {
|
|
2829
|
+
...parsed.timeoutMs !== void 0 ? { timeout: parsed.timeoutMs } : {},
|
|
2830
|
+
..._optionalChain([metadata, 'access', _26 => _26.executionMetadata, 'optionalAccess', _27 => _27.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2831
|
+
responseIntent,
|
|
2832
|
+
...idempotencyKey ? { idempotencyKey } : {},
|
|
2833
|
+
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2834
|
+
searchRef: _chunkSZQPJW2Ljs.recentSearchRef.call(void 0, ),
|
|
2835
|
+
cliInvocationId
|
|
2836
|
+
}).catch((error) => {
|
|
2837
|
+
const guidanceLines = toolGuidanceLines(metadata.guidance);
|
|
2838
|
+
if (guidanceLines.length > 0) {
|
|
2839
|
+
if (args.includes("--json") && error instanceof Error) {
|
|
2840
|
+
Object.assign(error, { guidance: metadata.guidance });
|
|
2841
|
+
} else {
|
|
2842
|
+
console.error(
|
|
2843
|
+
[`Guidance for ${parsed.toolId}:`, ...guidanceLines].join("\n")
|
|
2844
|
+
);
|
|
2845
|
+
}
|
|
2826
2846
|
}
|
|
2847
|
+
throw error;
|
|
2848
|
+
})
|
|
2849
|
+
);
|
|
2850
|
+
const { listConversion, summary, baseEnvelope } = await _chunk2IKIG333js.runToolExecuteStage.call(void 0,
|
|
2851
|
+
"result formatting",
|
|
2852
|
+
() => {
|
|
2853
|
+
const listExtractorPaths = listExtractorPathsFromUsageGuidance(metadata);
|
|
2854
|
+
const listConversion2 = _chunkNXDRDJ4Kjs.tryConvertToList.call(void 0, rawResponse, {
|
|
2855
|
+
listExtractorPaths
|
|
2856
|
+
});
|
|
2857
|
+
const summary2 = _chunkNXDRDJ4Kjs.extractSummaryFields.call(void 0, rawResponse);
|
|
2858
|
+
const baseEnvelope2 = buildToolExecuteBaseEnvelope({
|
|
2859
|
+
toolId: parsed.toolId,
|
|
2860
|
+
params: parsed.params,
|
|
2861
|
+
...idempotencyKey ? { idempotencyKey } : {},
|
|
2862
|
+
rawResponse,
|
|
2863
|
+
listConversion: listConversion2,
|
|
2864
|
+
summary: summary2,
|
|
2865
|
+
guidance: metadata.guidance,
|
|
2866
|
+
listExpected: listExtractorPaths.length > 0
|
|
2867
|
+
});
|
|
2868
|
+
return { listConversion: listConversion2, summary: summary2, baseEnvelope: baseEnvelope2 };
|
|
2827
2869
|
}
|
|
2828
|
-
|
|
2829
|
-
});
|
|
2830
|
-
const listExtractorPaths = listExtractorPathsFromUsageGuidance(metadata);
|
|
2831
|
-
const listConversion = _chunkNXDRDJ4Kjs.tryConvertToList.call(void 0, rawResponse, { listExtractorPaths });
|
|
2832
|
-
const summary = _chunkNXDRDJ4Kjs.extractSummaryFields.call(void 0, rawResponse);
|
|
2833
|
-
const baseEnvelope = buildToolExecuteBaseEnvelope({
|
|
2834
|
-
toolId: parsed.toolId,
|
|
2835
|
-
params: parsed.params,
|
|
2836
|
-
...idempotencyKey ? { idempotencyKey } : {},
|
|
2837
|
-
rawResponse,
|
|
2838
|
-
listConversion,
|
|
2839
|
-
summary,
|
|
2840
|
-
guidance: metadata.guidance,
|
|
2841
|
-
listExpected: listExtractorPaths.length > 0
|
|
2842
|
-
});
|
|
2870
|
+
);
|
|
2843
2871
|
const executeExitCode = toolExecuteExitCode(baseEnvelope);
|
|
2844
|
-
const delivered = (() => {
|
|
2845
|
-
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" &&
|
|
2846
|
-
|
|
2872
|
+
const delivered = await _chunk2IKIG333js.runToolExecuteStage.call(void 0, "output delivery", () => {
|
|
2873
|
+
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && _chunkMMNZ6GBTjs.shouldEmitJson.call(void 0, ))) {
|
|
2874
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: true });
|
|
2847
2875
|
return true;
|
|
2848
2876
|
}
|
|
2849
2877
|
if (parsed.outputFormat === "json_file") {
|
|
@@ -2851,7 +2879,7 @@ async function executeTool(args) {
|
|
|
2851
2879
|
rawResponse,
|
|
2852
2880
|
`payload_${parsed.toolId}`
|
|
2853
2881
|
);
|
|
2854
|
-
|
|
2882
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0,
|
|
2855
2883
|
{
|
|
2856
2884
|
...baseEnvelope,
|
|
2857
2885
|
local: {
|
|
@@ -2868,8 +2896,8 @@ async function executeTool(args) {
|
|
|
2868
2896
|
const error = new Error(
|
|
2869
2897
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. Re-run with --json to inspect the raw tool response.`
|
|
2870
2898
|
);
|
|
2871
|
-
if (
|
|
2872
|
-
|
|
2899
|
+
if (_chunkMMNZ6GBTjs.argsWantJson.call(void 0, args)) {
|
|
2900
|
+
_chunkMMNZ6GBTjs.printJsonError.call(void 0, error);
|
|
2873
2901
|
} else {
|
|
2874
2902
|
console.error(error.message);
|
|
2875
2903
|
}
|
|
@@ -2880,18 +2908,18 @@ async function executeTool(args) {
|
|
|
2880
2908
|
rawResponse,
|
|
2881
2909
|
`payload_${parsed.toolId}`
|
|
2882
2910
|
);
|
|
2883
|
-
|
|
2911
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0,
|
|
2884
2912
|
{
|
|
2885
2913
|
...baseEnvelope,
|
|
2886
2914
|
local: {
|
|
2887
2915
|
payload_file: jsonPath
|
|
2888
2916
|
}
|
|
2889
2917
|
},
|
|
2890
|
-
{ json: parsed.outputFormat === "csv_file" ||
|
|
2918
|
+
{ json: parsed.outputFormat === "csv_file" || _chunkMMNZ6GBTjs.shouldEmitJson.call(void 0, ) }
|
|
2891
2919
|
);
|
|
2892
2920
|
return true;
|
|
2893
2921
|
}
|
|
2894
|
-
|
|
2922
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: false });
|
|
2895
2923
|
return true;
|
|
2896
2924
|
}
|
|
2897
2925
|
const rowOutput = _chunkNXDRDJ4Kjs.projectRowOutput.call(void 0, listConversion);
|
|
@@ -2913,19 +2941,19 @@ async function executeTool(args) {
|
|
|
2913
2941
|
seededScript
|
|
2914
2942
|
});
|
|
2915
2943
|
if (parsed.outputFormat === "csv_file") {
|
|
2916
|
-
|
|
2944
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: true });
|
|
2917
2945
|
return true;
|
|
2918
2946
|
}
|
|
2919
2947
|
if (parsed.outPath) {
|
|
2920
|
-
|
|
2921
|
-
json:
|
|
2948
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
|
|
2949
|
+
json: _chunkMMNZ6GBTjs.argsWantJson.call(void 0, args) || _chunkMMNZ6GBTjs.shouldEmitJson.call(void 0, ),
|
|
2922
2950
|
text: `Wrote ${csv.rowCount} row(s) to ${csv.path}
|
|
2923
2951
|
`
|
|
2924
2952
|
});
|
|
2925
2953
|
return true;
|
|
2926
2954
|
}
|
|
2927
2955
|
if (parsed.noPreview) {
|
|
2928
|
-
|
|
2956
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0,
|
|
2929
2957
|
{
|
|
2930
2958
|
...materializedEnvelope,
|
|
2931
2959
|
local: {
|
|
@@ -2933,15 +2961,20 @@ async function executeTool(args) {
|
|
|
2933
2961
|
output_path: csv.path
|
|
2934
2962
|
}
|
|
2935
2963
|
},
|
|
2936
|
-
{ json:
|
|
2964
|
+
{ json: _chunkMMNZ6GBTjs.shouldEmitJson.call(void 0, ), text: `${csv.path}
|
|
2937
2965
|
` }
|
|
2938
2966
|
);
|
|
2939
2967
|
return true;
|
|
2940
2968
|
}
|
|
2941
|
-
|
|
2969
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: false });
|
|
2942
2970
|
return true;
|
|
2943
|
-
})
|
|
2944
|
-
if (delivered)
|
|
2971
|
+
});
|
|
2972
|
+
if (delivered) {
|
|
2973
|
+
await _chunk2IKIG333js.runToolExecuteStage.call(void 0,
|
|
2974
|
+
"acknowledge delivery",
|
|
2975
|
+
() => recovery.acknowledgeDelivery()
|
|
2976
|
+
);
|
|
2977
|
+
}
|
|
2945
2978
|
return delivered ? executeExitCode : 1;
|
|
2946
2979
|
}
|
|
2947
2980
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
recentSearchRef,
|
|
3
3
|
registerDeprecatedSearchCommand
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5HS5EEFE.mjs";
|
|
5
5
|
import {
|
|
6
6
|
extractSummaryFields,
|
|
7
7
|
projectRowOutput,
|
|
@@ -12,8 +12,13 @@ import {
|
|
|
12
12
|
} from "./chunk-MIMASXO4.mjs";
|
|
13
13
|
import {
|
|
14
14
|
DeeplineClient
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LLGF6V6I.mjs";
|
|
16
16
|
import "./chunk-CBVIJSHF.mjs";
|
|
17
|
+
import {
|
|
18
|
+
beginToolExecuteCommand,
|
|
19
|
+
getToolExecuteInvocationId,
|
|
20
|
+
runToolExecuteStage
|
|
21
|
+
} from "./chunk-UABLQKTZ.mjs";
|
|
17
22
|
import {
|
|
18
23
|
argsWantJson,
|
|
19
24
|
printCommandEnvelope,
|
|
@@ -22,13 +27,13 @@ import {
|
|
|
22
27
|
printJsonError,
|
|
23
28
|
renderCommandEnvelopeText,
|
|
24
29
|
shouldEmitJson
|
|
25
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-5V56XCQN.mjs";
|
|
26
31
|
import {
|
|
27
32
|
resolveConfig,
|
|
28
33
|
sdkCliStateDirPath
|
|
29
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-4PSSDZQB.mjs";
|
|
30
35
|
import "./chunk-DLIRSHV6.mjs";
|
|
31
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-WWPI4GJI.mjs";
|
|
32
37
|
import "./chunk-6IKARAYD.mjs";
|
|
33
38
|
import {
|
|
34
39
|
DeeplineError
|
|
@@ -777,12 +782,16 @@ function compactTool(tool) {
|
|
|
777
782
|
function playIdentifiers(play) {
|
|
778
783
|
return [play.name, play.reference, ...play.aliases ?? []].filter((value) => Boolean(value?.trim())).map((value) => value.trim());
|
|
779
784
|
}
|
|
780
|
-
async function findPlayForToolId(client, toolId) {
|
|
785
|
+
async function findPlayForToolId(client, toolId, cliInvocationId) {
|
|
781
786
|
const requested = toolId.trim();
|
|
782
787
|
if (!requested) {
|
|
783
788
|
return null;
|
|
784
789
|
}
|
|
785
|
-
const plays = await client.searchPlays({
|
|
790
|
+
const plays = await client.searchPlays({
|
|
791
|
+
query: requested,
|
|
792
|
+
compact: true,
|
|
793
|
+
...cliInvocationId ? { cliInvocationId } : {}
|
|
794
|
+
});
|
|
786
795
|
return plays.find((play) => playIdentifiers(play).includes(requested)) ?? null;
|
|
787
796
|
}
|
|
788
797
|
function isMissingToolMetadataError(error) {
|
|
@@ -2757,13 +2766,20 @@ async function executeTool(args) {
|
|
|
2757
2766
|
}
|
|
2758
2767
|
return 1;
|
|
2759
2768
|
}
|
|
2769
|
+
const cliInvocationId = getToolExecuteInvocationId() ?? beginToolExecuteCommand();
|
|
2760
2770
|
const client = new DeeplineClient();
|
|
2761
2771
|
let metadata;
|
|
2762
2772
|
try {
|
|
2763
|
-
metadata = await
|
|
2773
|
+
metadata = await runToolExecuteStage(
|
|
2774
|
+
"tool metadata lookup",
|
|
2775
|
+
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2776
|
+
);
|
|
2764
2777
|
} catch (error) {
|
|
2765
2778
|
if (isMissingToolMetadataError(error)) {
|
|
2766
|
-
const play = await
|
|
2779
|
+
const play = await runToolExecuteStage(
|
|
2780
|
+
"play alias lookup",
|
|
2781
|
+
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2782
|
+
);
|
|
2767
2783
|
if (play) {
|
|
2768
2784
|
if (argsWantJson(args)) {
|
|
2769
2785
|
printJsonError(
|
|
@@ -2807,41 +2823,53 @@ async function executeTool(args) {
|
|
|
2807
2823
|
if (idempotencyKey) {
|
|
2808
2824
|
console.error(`Tool execution recovery key: ${idempotencyKey}`);
|
|
2809
2825
|
}
|
|
2810
|
-
const rawResponse = await
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
+
const rawResponse = await runToolExecuteStage(
|
|
2827
|
+
"execute request",
|
|
2828
|
+
() => client.executeTool(parsed.toolId, parsed.params, {
|
|
2829
|
+
...parsed.timeoutMs !== void 0 ? { timeout: parsed.timeoutMs } : {},
|
|
2830
|
+
...metadata.executionMetadata?.retrySafeTransientHttp === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2831
|
+
responseIntent,
|
|
2832
|
+
...idempotencyKey ? { idempotencyKey } : {},
|
|
2833
|
+
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2834
|
+
searchRef: recentSearchRef(),
|
|
2835
|
+
cliInvocationId
|
|
2836
|
+
}).catch((error) => {
|
|
2837
|
+
const guidanceLines = toolGuidanceLines(metadata.guidance);
|
|
2838
|
+
if (guidanceLines.length > 0) {
|
|
2839
|
+
if (args.includes("--json") && error instanceof Error) {
|
|
2840
|
+
Object.assign(error, { guidance: metadata.guidance });
|
|
2841
|
+
} else {
|
|
2842
|
+
console.error(
|
|
2843
|
+
[`Guidance for ${parsed.toolId}:`, ...guidanceLines].join("\n")
|
|
2844
|
+
);
|
|
2845
|
+
}
|
|
2826
2846
|
}
|
|
2847
|
+
throw error;
|
|
2848
|
+
})
|
|
2849
|
+
);
|
|
2850
|
+
const { listConversion, summary, baseEnvelope } = await runToolExecuteStage(
|
|
2851
|
+
"result formatting",
|
|
2852
|
+
() => {
|
|
2853
|
+
const listExtractorPaths = listExtractorPathsFromUsageGuidance(metadata);
|
|
2854
|
+
const listConversion2 = tryConvertToList(rawResponse, {
|
|
2855
|
+
listExtractorPaths
|
|
2856
|
+
});
|
|
2857
|
+
const summary2 = extractSummaryFields(rawResponse);
|
|
2858
|
+
const baseEnvelope2 = buildToolExecuteBaseEnvelope({
|
|
2859
|
+
toolId: parsed.toolId,
|
|
2860
|
+
params: parsed.params,
|
|
2861
|
+
...idempotencyKey ? { idempotencyKey } : {},
|
|
2862
|
+
rawResponse,
|
|
2863
|
+
listConversion: listConversion2,
|
|
2864
|
+
summary: summary2,
|
|
2865
|
+
guidance: metadata.guidance,
|
|
2866
|
+
listExpected: listExtractorPaths.length > 0
|
|
2867
|
+
});
|
|
2868
|
+
return { listConversion: listConversion2, summary: summary2, baseEnvelope: baseEnvelope2 };
|
|
2827
2869
|
}
|
|
2828
|
-
|
|
2829
|
-
});
|
|
2830
|
-
const listExtractorPaths = listExtractorPathsFromUsageGuidance(metadata);
|
|
2831
|
-
const listConversion = tryConvertToList(rawResponse, { listExtractorPaths });
|
|
2832
|
-
const summary = extractSummaryFields(rawResponse);
|
|
2833
|
-
const baseEnvelope = buildToolExecuteBaseEnvelope({
|
|
2834
|
-
toolId: parsed.toolId,
|
|
2835
|
-
params: parsed.params,
|
|
2836
|
-
...idempotencyKey ? { idempotencyKey } : {},
|
|
2837
|
-
rawResponse,
|
|
2838
|
-
listConversion,
|
|
2839
|
-
summary,
|
|
2840
|
-
guidance: metadata.guidance,
|
|
2841
|
-
listExpected: listExtractorPaths.length > 0
|
|
2842
|
-
});
|
|
2870
|
+
);
|
|
2843
2871
|
const executeExitCode = toolExecuteExitCode(baseEnvelope);
|
|
2844
|
-
const delivered = (() => {
|
|
2872
|
+
const delivered = await runToolExecuteStage("output delivery", () => {
|
|
2845
2873
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && shouldEmitJson())) {
|
|
2846
2874
|
printCommandEnvelope(baseEnvelope, { json: true });
|
|
2847
2875
|
return true;
|
|
@@ -2940,8 +2968,13 @@ async function executeTool(args) {
|
|
|
2940
2968
|
}
|
|
2941
2969
|
printCommandEnvelope(materializedEnvelope, { json: false });
|
|
2942
2970
|
return true;
|
|
2943
|
-
})
|
|
2944
|
-
if (delivered)
|
|
2971
|
+
});
|
|
2972
|
+
if (delivered) {
|
|
2973
|
+
await runToolExecuteStage(
|
|
2974
|
+
"acknowledge delivery",
|
|
2975
|
+
() => recovery.acknowledgeDelivery()
|
|
2976
|
+
);
|
|
2977
|
+
}
|
|
2945
2978
|
return delivered ? executeExitCode : 1;
|
|
2946
2979
|
}
|
|
2947
2980
|
export {
|