deepline 0.3.521 → 0.3.523
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/client-core.ts +118 -0
- package/dist/bundling-sources/sdk/src/index.ts +3 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +47 -18
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/db-session-renewal.ts +209 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +24 -7
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-modal-fallback.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +38 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +92 -10
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-deadline-reconciliation.ts +96 -25
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +29 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +139 -17
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-sql.ts +26 -3
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +145 -5
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +190 -10
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +85 -5
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +21 -11
- package/dist/cli/{artifacts-TYPU37IU.mjs → artifacts-RBHR2DG4.mjs} +6 -6
- package/dist/cli/{artifacts-JGH464N2.js → artifacts-RZTS2JHZ.js} +18 -18
- package/dist/cli/auth-DPWYFQR5.js +43 -0
- package/dist/cli/{auth-XPQT6NUB.mjs → auth-ENQUQS56.mjs} +5 -5
- package/dist/cli/{billing-47AMHOMP.mjs → billing-6A27ULCX.mjs} +7 -7
- package/dist/cli/{billing-6D4KXBFJ.js → billing-6HONTJOY.js} +82 -82
- package/dist/cli/{chunk-DY6634MN.js → chunk-2BRDHM4S.js} +9 -9
- package/dist/cli/{chunk-LGU2NIOT.js → chunk-326WVSWS.js} +108 -96
- package/dist/cli/{chunk-UAZKOH3J.js → chunk-36LQQL5C.js} +5 -5
- package/dist/cli/{chunk-VYY5V4M5.js → chunk-4NWY7JBB.js} +11 -11
- package/dist/cli/{chunk-2DQPB5HT.mjs → chunk-4V63IJCL.mjs} +5 -5
- package/dist/cli/{chunk-4MONKWYE.mjs → chunk-5WFQXAD4.mjs} +5 -5
- package/dist/cli/{chunk-A6USUS4L.mjs → chunk-6DBRBWHC.mjs} +2 -2
- package/dist/cli/{chunk-4I7I5CGB.mjs → chunk-6OZ2WSHD.mjs} +1 -1
- package/dist/cli/{chunk-MD43YAL6.js → chunk-7GNKAACY.js} +6 -6
- package/dist/cli/{chunk-7IYDCHTG.mjs → chunk-7M5FRSFP.mjs} +2 -2
- package/dist/cli/{chunk-HHBJJYKL.mjs → chunk-DNXP3D5H.mjs} +5 -5
- package/dist/cli/{chunk-4DB6JV7X.mjs → chunk-F3WRLFFM.mjs} +2 -2
- package/dist/cli/{chunk-AMVKLEPH.js → chunk-FBMOBNJY.js} +2 -2
- package/dist/cli/{chunk-EZNZDOAG.mjs → chunk-H7275EZU.mjs} +5 -5
- package/dist/cli/{chunk-CBBCUYIN.mjs → chunk-HSVGP4CI.mjs} +2 -2
- package/dist/cli/{chunk-FTZX4QZN.js → chunk-HUC5SGJQ.js} +2 -2
- package/dist/cli/{chunk-4MN65FRF.js → chunk-HUIFUE4L.js} +53 -53
- package/dist/cli/{chunk-5T7QKHQL.mjs → chunk-I62LJ7NU.mjs} +1 -1
- package/dist/cli/{chunk-EW3EAEWZ.js → chunk-IEVXYHGJ.js} +5 -5
- package/dist/cli/{chunk-E4ZS2B2J.mjs → chunk-JCTTXLAZ.mjs} +1 -1
- package/dist/cli/{chunk-LNBMEFOI.mjs → chunk-JGZQBDYG.mjs} +4 -4
- package/dist/cli/{chunk-GNYSODBR.js → chunk-JMMNCJ7Z.js} +1 -1
- package/dist/cli/{chunk-7AUXX6M5.mjs → chunk-JVEFMOY2.mjs} +1 -1
- package/dist/cli/{chunk-3Q7HEEH2.js → chunk-K326BEVR.js} +10 -10
- package/dist/cli/{chunk-TBIWR7M2.mjs → chunk-KILRUAXF.mjs} +1 -1
- package/dist/cli/{chunk-6UHYXNCP.mjs → chunk-LZL6V5M5.mjs} +2 -2
- package/dist/cli/{chunk-EILHJRPW.js → chunk-MCXPJYBN.js} +3 -3
- package/dist/cli/{chunk-VE6FHVXZ.mjs → chunk-MHTRYBXY.mjs} +78 -1
- package/dist/cli/{chunk-VSH3AE5E.js → chunk-MT3WG3KR.js} +16 -16
- package/dist/cli/{chunk-PUKWFJXW.js → chunk-MZROKQV3.js} +44 -44
- package/dist/cli/{chunk-QGTWGHYD.js → chunk-N5MLEXZ7.js} +50 -8
- package/dist/cli/{chunk-ZO2XJVFH.mjs → chunk-NWTMQGPP.mjs} +6 -6
- package/dist/cli/{chunk-6V2RI3AL.mjs → chunk-PCORO245.mjs} +2 -2
- package/dist/cli/{chunk-MRU4N33M.js → chunk-PESMXAUG.js} +6 -6
- package/dist/cli/{chunk-4GGXAYKI.mjs → chunk-QMBL5ZIQ.mjs} +3 -3
- package/dist/cli/{chunk-A2B5AAU3.mjs → chunk-QOO5W5XS.mjs} +22 -10
- package/dist/cli/{chunk-HRWVEIAX.mjs → chunk-QSAC3IVI.mjs} +1 -1
- package/dist/cli/{chunk-HYR34KFA.js → chunk-QYXIODWH.js} +78 -1
- package/dist/cli/{chunk-Y7IR4LBU.mjs → chunk-RKREB7MU.mjs} +3 -3
- package/dist/cli/{chunk-JFQJNYTB.js → chunk-RQN4PHRE.js} +16 -16
- package/dist/cli/{chunk-6DCBTJZP.js → chunk-S4YKRH3W.js} +3 -3
- package/dist/cli/{chunk-ULW2KBKL.js → chunk-SBGKKOCC.js} +26 -26
- package/dist/cli/{chunk-DQURY3WH.mjs → chunk-SXTVJIGB.mjs} +1 -1
- package/dist/cli/{chunk-7LRALARF.mjs → chunk-U6DLLV3S.mjs} +1 -1
- package/dist/cli/{chunk-NNDAVVBG.mjs → chunk-UH3EAFFN.mjs} +2 -2
- package/dist/cli/{chunk-HSFLMTED.js → chunk-UQN4VTZL.js} +4 -4
- package/dist/cli/{chunk-HD3KYCDC.js → chunk-V46J3UTM.js} +7 -7
- package/dist/cli/{chunk-WL6WPW6X.js → chunk-WGVJA4I5.js} +14 -14
- package/dist/cli/{chunk-FQJFONFT.mjs → chunk-WVQOXYTQ.mjs} +44 -2
- package/dist/cli/{chunk-Y23TOHNV.js → chunk-XVXEARHC.js} +41 -41
- package/dist/cli/{chunk-6N72GHAV.js → chunk-XYL26236.js} +2 -2
- package/dist/cli/{chunk-YROP3H6T.js → chunk-ZWN4RXC2.js} +22 -22
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-5TM2OSYP.js → csv-UBACJK75.js} +13 -13
- package/dist/cli/{csv-PM3WDXDF.mjs → csv-YFJ2JLUP.mjs} +4 -4
- package/dist/cli/{db-3LJ32FZM.js → db-2ZPA2LZ7.js} +27 -27
- package/dist/cli/{db-5P72NPRL.mjs → db-NKGYTAQO.mjs} +6 -6
- package/dist/cli/{describe-ZLCMBGHG.mjs → describe-GX7DRKWZ.mjs} +18 -18
- package/dist/cli/describe-WQZF7MEG.js +50 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-JMFL6AV7.mjs → executions-HTHQ7KKD.mjs} +6 -6
- package/dist/cli/{executions-4AJ5TQVY.js → executions-NXMRGPIL.js} +8 -8
- package/dist/cli/{feedback-I2BLXMGH.js → feedback-TGVQACRO.js} +10 -10
- package/dist/cli/{feedback-DKMG2QB7.mjs → feedback-USP4T34P.mjs} +5 -5
- package/dist/cli/{git-ARG223MY.mjs → git-KUONEHCD.mjs} +5 -5
- package/dist/cli/git-X3SCQREB.js +25 -0
- package/dist/cli/index.js +145 -145
- package/dist/cli/index.mjs +44 -44
- package/dist/cli/{legacy-noops-N7SVA7PL.js → legacy-noops-2JY3CQ24.js} +9 -9
- package/dist/cli/{legacy-noops-24LOAOZN.mjs → legacy-noops-B2GMHU42.mjs} +6 -6
- package/dist/cli/{monitors-RYQFWM2T.mjs → monitors-2OVBZJ6Z.mjs} +7 -7
- package/dist/cli/{monitors-XNCYLOJM.js → monitors-XI6I52AX.js} +100 -100
- package/dist/cli/{org-I33TKZXF.js → org-5TUQ2H6Y.js} +235 -72
- package/dist/cli/{org-ORIH56E5.mjs → org-BNJW764Y.mjs} +169 -6
- package/dist/cli/{pages-ME43HSBL.mjs → pages-QC3TQIPW.mjs} +6 -6
- package/dist/cli/{pages-2UXXGIMF.js → pages-UXCLX53Y.js} +18 -18
- package/dist/cli/{play-XEKNY46M.mjs → play-45PPG5SZ.mjs} +18 -18
- package/dist/cli/{play-F4QOFU37.js → play-KRWMZ7FG.js} +317 -317
- package/dist/cli/{providers-XKU44G74.mjs → providers-JDT35MRL.mjs} +6 -6
- package/dist/cli/{providers-E7DPCBNX.js → providers-RBUJ72Y3.js} +9 -9
- package/dist/cli/{quickstart-J7NVEXV5.mjs → quickstart-GD2SWGAC.mjs} +4 -4
- package/dist/cli/{quickstart-ICLF2F6A.js → quickstart-JZ4Q3HFT.js} +6 -6
- package/dist/cli/{run-HJMHUQBN.js → run-JEAHA367.js} +41 -41
- package/dist/cli/{run-MQ5ZONGL.mjs → run-KIZ3HBI2.mjs} +23 -23
- package/dist/cli/{search-GGRC77CV.mjs → search-5UFNXHFK.mjs} +8 -8
- package/dist/cli/search-6JULJMD7.js +33 -0
- package/dist/cli/{search-output-NY4GDBRU.mjs → search-output-HAXPKQO6.mjs} +4 -4
- package/dist/cli/{search-output-MXZTZI2P.js → search-output-W3RDSVLE.js} +6 -6
- package/dist/cli/{secrets-FA37G4Q2.mjs → secrets-JAWT66B2.mjs} +6 -6
- package/dist/cli/{secrets-PFESG72B.js → secrets-PC7C2Q32.js} +15 -15
- package/dist/cli/{sessions-BLLXPETU.mjs → sessions-325V7G35.mjs} +6 -6
- package/dist/cli/sessions-WFUCOJHZ.js +18 -0
- package/dist/cli/{settings-U26S7MPH.mjs → settings-FKHTA65P.mjs} +13 -13
- package/dist/cli/{settings-32VPG4Z2.js → settings-RGU6Y2QR.js} +86 -86
- package/dist/cli/{setup-4AXBCX7C.mjs → setup-43GOYTFC.mjs} +10 -10
- package/dist/cli/{setup-R6NSENH7.js → setup-ZMZ7HU2I.js} +50 -50
- package/dist/cli/skills-3XTQ6FFM.js +37 -0
- package/dist/cli/{skills-JUH7AVUL.mjs → skills-Q2VAHSXM.mjs} +8 -8
- package/dist/cli/{tools-FOYLU3FH.mjs → tools-BUH7ZWDS.mjs} +17 -17
- package/dist/cli/tools-UK2R4YXQ.js +57 -0
- package/dist/cli/{update-FUVX22VM.mjs → update-JFALWOHD.mjs} +10 -10
- package/dist/cli/update-LNKPHS54.js +35 -0
- package/dist/cli/{workflow-QLT22BLT.mjs → workflow-ISJKLY6X.mjs} +7 -7
- package/dist/cli/{workflow-JACZW4GJ.js → workflow-YELST32A.js} +17 -17
- package/dist/{client-DA71-2_u.d.mts → client-C2N7MofG.d.mts} +1 -1
- package/dist/{client-B-2Am2y6.d.ts → client-C7lTRJjw.d.ts} +1 -1
- package/dist/{client-core-BXbds1cb.d.mts → client-core-BTkDSKGn.d.mts} +79 -2
- package/dist/{client-core-C0IzDKMJ.d.ts → client-core-hmhBi7Ib.d.ts} +79 -2
- package/dist/{compiler-manifest-B4mIIbw7.d.ts → compiler-manifest-DsxsQP-T.d.mts} +14 -7
- package/dist/{compiler-manifest-B4mIIbw7.d.mts → compiler-manifest-DsxsQP-T.d.ts} +14 -7
- package/dist/{errors-Gj9i5Rkd.d.ts → errors-Bk5h1D-C.d.ts} +1 -1
- package/dist/{errors-C2F4qzAq.d.mts → errors-qdJUVQ3g.d.mts} +1 -1
- package/dist/{index-5JZBufdF.d.mts → index-PaupwX1B.d.mts} +1 -1
- package/dist/{index-BXtSj8bv.d.ts → index-bL66eHYz.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +117 -116
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +7 -5
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +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/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-JWR3VSNT.js +0 -43
- package/dist/cli/describe-GRS3IRSX.js +0 -50
- package/dist/cli/git-2LNT43A2.js +0 -25
- package/dist/cli/search-V6IBJ4TX.js +0 -33
- package/dist/cli/sessions-DNFTQOQH.js +0 -18
- package/dist/cli/skills-G4ZE3OS5.js +0 -37
- package/dist/cli/tools-27LHZFJD.js +0 -57
- package/dist/cli/update-KNZ7N242.js +0 -35
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk7GNKAACYjs = require('./chunk-7GNKAACY.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk4NWY7JBBjs = require('./chunk-4NWY7JBB.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -46,10 +46,10 @@ var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
|
|
|
46
46
|
var _chunkHGFFYVXNjs = require('./chunk-HGFFYVXN.js');
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
var
|
|
49
|
+
var _chunk36LQQL5Cjs = require('./chunk-36LQQL5C.js');
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
var
|
|
52
|
+
var _chunkN5MLEXZ7js = require('./chunk-N5MLEXZ7.js');
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
|
|
@@ -59,18 +59,18 @@ var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunkZWN4RXC2js = require('./chunk-ZWN4RXC2.js');
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
var
|
|
67
|
+
var _chunkHUC5SGJQjs = require('./chunk-HUC5SGJQ.js');
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
var
|
|
73
|
+
var _chunkMZROKQV3js = require('./chunk-MZROKQV3.js');
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
|
|
@@ -78,12 +78,12 @@ var _chunkPUKWFJXWjs = require('./chunk-PUKWFJXW.js');
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
var
|
|
81
|
+
var _chunkV46J3UTMjs = require('./chunk-V46J3UTM.js');
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
var
|
|
86
|
+
var _chunkMCXPJYBNjs = require('./chunk-MCXPJYBN.js');
|
|
87
87
|
|
|
88
88
|
|
|
89
89
|
var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
|
|
@@ -189,10 +189,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
191
|
function pendingToolExecutionPath(input) {
|
|
192
|
-
const config =
|
|
192
|
+
const config = _chunkMCXPJYBNjs.resolveConfig.call(void 0, );
|
|
193
193
|
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");
|
|
194
194
|
return _path.join.call(void 0,
|
|
195
|
-
|
|
195
|
+
_chunkMCXPJYBNjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
196
196
|
`${PENDING_PREFIX}${fingerprint}.json`
|
|
197
197
|
);
|
|
198
198
|
}
|
|
@@ -506,13 +506,13 @@ function categoryEnumerationRender(summaries) {
|
|
|
506
506
|
};
|
|
507
507
|
}
|
|
508
508
|
async function listToolCategories(emitJson, compact) {
|
|
509
|
-
const client = new (0,
|
|
509
|
+
const client = new (0, _chunk36LQQL5Cjs.DeeplineClient)();
|
|
510
510
|
if (!emitJson) {
|
|
511
511
|
const summaries2 = (await client.listToolCategories()).map((category) => ({
|
|
512
512
|
...category,
|
|
513
513
|
description: describeToolCategory(category.name)
|
|
514
514
|
}));
|
|
515
|
-
|
|
515
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
516
516
|
{ categories: summaries2, render: categoryEnumerationRender(summaries2) },
|
|
517
517
|
{ json: false }
|
|
518
518
|
);
|
|
@@ -522,7 +522,7 @@ async function listToolCategories(emitJson, 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
|
+
_chunkV46J3UTMjs.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
|
+
_chunkV46J3UTMjs.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(_chunkV46J3UTMjs.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, _chunk36LQQL5Cjs.DeeplineClient)();
|
|
565
565
|
const { tools: rawTools, categories } = await client.listToolsInCategory(category);
|
|
566
566
|
const summaries = categories.map((item) => ({
|
|
567
567
|
...item,
|
|
@@ -597,7 +597,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
597
597
|
}
|
|
598
598
|
]
|
|
599
599
|
};
|
|
600
|
-
|
|
600
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
601
601
|
{
|
|
602
602
|
category,
|
|
603
603
|
total: rows.length,
|
|
@@ -610,7 +610,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
610
610
|
return 0;
|
|
611
611
|
}
|
|
612
612
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
613
|
-
const client = new (0,
|
|
613
|
+
const client = new (0, _chunk36LQQL5Cjs.DeeplineClient)();
|
|
614
614
|
const items = (await client.listTools({
|
|
615
615
|
categories: requestedCategories.join(","),
|
|
616
616
|
compact
|
|
@@ -639,7 +639,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
639
639
|
]
|
|
640
640
|
};
|
|
641
641
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
642
|
-
|
|
642
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
643
643
|
{
|
|
644
644
|
tools: outputItems,
|
|
645
645
|
count: outputItems.length,
|
|
@@ -658,13 +658,13 @@ async function listTools(category, options = {}) {
|
|
|
658
658
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]), () => ( ""));
|
|
659
659
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
660
660
|
const compact = options.compact !== false;
|
|
661
|
-
const emitJson = options.json === true ||
|
|
661
|
+
const emitJson = options.json === true || _chunkV46J3UTMjs.shouldEmitJson.call(void 0, );
|
|
662
662
|
if (positional && flagCategories.length > 0) {
|
|
663
663
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
664
664
|
if (!flagIsSameSingle) {
|
|
665
665
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
666
666
|
if (emitJson) {
|
|
667
|
-
|
|
667
|
+
_chunkV46J3UTMjs.printJson.call(void 0, {
|
|
668
668
|
ok: false,
|
|
669
669
|
exitCode: 2,
|
|
670
670
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -691,7 +691,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
691
691
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
692
692
|
return 1;
|
|
693
693
|
}
|
|
694
|
-
const client = new (0,
|
|
694
|
+
const client = new (0, _chunk36LQQL5Cjs.DeeplineClient)();
|
|
695
695
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
696
696
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
697
697
|
const jsonOutput = options.json === true;
|
|
@@ -715,7 +715,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
715
715
|
query,
|
|
716
716
|
mode
|
|
717
717
|
}) : null;
|
|
718
|
-
|
|
718
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
719
719
|
{
|
|
720
720
|
tools: outputTools,
|
|
721
721
|
count: outputTools.length,
|
|
@@ -733,7 +733,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
733
733
|
} : {},
|
|
734
734
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
735
735
|
},
|
|
736
|
-
{ json: options.json ||
|
|
736
|
+
{ json: options.json || _chunkV46J3UTMjs.shouldEmitJson.call(void 0, ) }
|
|
737
737
|
);
|
|
738
738
|
return 0;
|
|
739
739
|
}
|
|
@@ -829,6 +829,18 @@ Output:
|
|
|
829
829
|
activity.
|
|
830
830
|
`
|
|
831
831
|
);
|
|
832
|
+
tools.command("balance <provider>").description(
|
|
833
|
+
"Read a fresh balance using this workspace\u2019s own provider connection (LeadMagic)."
|
|
834
|
+
).option("--json", "Print the balance and observation timestamp as JSON").action(async (provider, options) => {
|
|
835
|
+
const balance = await new (0, _chunk36LQQL5Cjs.DeeplineClient)().getIntegrationBalance(
|
|
836
|
+
provider
|
|
837
|
+
);
|
|
838
|
+
if (_chunkV46J3UTMjs.shouldEmitJson.call(void 0, options.json)) console.log(JSON.stringify(balance));
|
|
839
|
+
else
|
|
840
|
+
console.log(
|
|
841
|
+
`${balance.provider}: ${balance.balance.value} ${balance.unit} (observed ${balance.observedAt})`
|
|
842
|
+
);
|
|
843
|
+
});
|
|
832
844
|
tools.command("connect <provider>").description(
|
|
833
845
|
"Get a dashboard connection link or connect a provider with credentials or OAuth."
|
|
834
846
|
).addOption(
|
|
@@ -848,10 +860,10 @@ Output:
|
|
|
848
860
|
).option("--json", "Print JSON without credential values").action(
|
|
849
861
|
async (provider, options) => {
|
|
850
862
|
if (options.link) {
|
|
851
|
-
const link = await new (0,
|
|
863
|
+
const link = await new (0, _chunk36LQQL5Cjs.DeeplineClient)().getIntegrationConnectLink(
|
|
852
864
|
provider
|
|
853
865
|
);
|
|
854
|
-
if (
|
|
866
|
+
if (_chunkV46J3UTMjs.shouldEmitJson.call(void 0, options.json)) console.log(JSON.stringify(link));
|
|
855
867
|
else console.log(link.connect_url);
|
|
856
868
|
return;
|
|
857
869
|
}
|
|
@@ -861,7 +873,7 @@ Output:
|
|
|
861
873
|
if (options.preset !== void 0 && (options.scopes !== void 0 || options.optionalScopes !== void 0))
|
|
862
874
|
throw new Error("Use --preset or individual scopes, not both.");
|
|
863
875
|
const splitScopes = (value) => value.split(",").map((scope) => scope.trim()).filter(Boolean);
|
|
864
|
-
const result2 = await new (0,
|
|
876
|
+
const result2 = await new (0, _chunk36LQQL5Cjs.DeeplineClient)().startIntegrationOAuth(
|
|
865
877
|
provider,
|
|
866
878
|
{
|
|
867
879
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
@@ -873,7 +885,7 @@ Output:
|
|
|
873
885
|
throw new Error(
|
|
874
886
|
"The API did not return an OAuth authorization URL."
|
|
875
887
|
);
|
|
876
|
-
if (
|
|
888
|
+
if (_chunkV46J3UTMjs.shouldEmitJson.call(void 0, options.json))
|
|
877
889
|
console.log(
|
|
878
890
|
JSON.stringify({ provider, redirect_url: result2.redirect_url })
|
|
879
891
|
);
|
|
@@ -899,7 +911,7 @@ Output:
|
|
|
899
911
|
"--credentials-file must contain a nonempty JSON object of string credential values."
|
|
900
912
|
);
|
|
901
913
|
}
|
|
902
|
-
const result = await new (0,
|
|
914
|
+
const result = await new (0, _chunk36LQQL5Cjs.DeeplineClient)().setIntegrationCredentials(
|
|
903
915
|
provider,
|
|
904
916
|
credentials
|
|
905
917
|
);
|
|
@@ -909,7 +921,7 @@ Output:
|
|
|
909
921
|
);
|
|
910
922
|
}
|
|
911
923
|
const confirmation = { provider, credential_saved: true };
|
|
912
|
-
if (
|
|
924
|
+
if (_chunkV46J3UTMjs.shouldEmitJson.call(void 0, options.json))
|
|
913
925
|
console.log(JSON.stringify(confirmation));
|
|
914
926
|
else
|
|
915
927
|
console.log(
|
|
@@ -949,7 +961,7 @@ Examples:
|
|
|
949
961
|
json: Boolean(options.json)
|
|
950
962
|
});
|
|
951
963
|
});
|
|
952
|
-
|
|
964
|
+
_chunk4NWY7JBBjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
953
965
|
tools.command("grep <query>").description(
|
|
954
966
|
"Regex grep over tool ids, descriptions, categories, and input fields."
|
|
955
967
|
).addHelpText(
|
|
@@ -984,7 +996,7 @@ Examples:
|
|
|
984
996
|
});
|
|
985
997
|
const addToolMetadataCommand = (command) => {
|
|
986
998
|
let compatibilityMetadata;
|
|
987
|
-
|
|
999
|
+
_chunkZWN4RXC2js.registerCompatibilityCatalog.call(void 0, command, () => ({
|
|
988
1000
|
toolId: command.args[0],
|
|
989
1001
|
acceptMetadata: (metadata) => {
|
|
990
1002
|
compatibilityMetadata = metadata;
|
|
@@ -1054,7 +1066,7 @@ Examples:
|
|
|
1054
1066
|
process.exitCode = await narrowView();
|
|
1055
1067
|
return;
|
|
1056
1068
|
}
|
|
1057
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
1069
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-WQZF7MEG.js")));
|
|
1058
1070
|
process.exitCode = await describeAnything(
|
|
1059
1071
|
toolId,
|
|
1060
1072
|
{
|
|
@@ -1069,7 +1081,7 @@ Examples:
|
|
|
1069
1081
|
});
|
|
1070
1082
|
};
|
|
1071
1083
|
addToolMetadataCommand(
|
|
1072
|
-
|
|
1084
|
+
_chunk7GNKAACYjs.addDescribeOptions.call(void 0,
|
|
1073
1085
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
1074
1086
|
{ json: false }
|
|
1075
1087
|
)
|
|
@@ -1138,7 +1150,7 @@ Examples:
|
|
|
1138
1150
|
options,
|
|
1139
1151
|
void 0,
|
|
1140
1152
|
true,
|
|
1141
|
-
|
|
1153
|
+
_chunkHUC5SGJQjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
1142
1154
|
);
|
|
1143
1155
|
}
|
|
1144
1156
|
);
|
|
@@ -1146,13 +1158,13 @@ Examples:
|
|
|
1146
1158
|
function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
1147
1159
|
let metadata;
|
|
1148
1160
|
const startedAt = performance.now();
|
|
1149
|
-
const baseUrl =
|
|
1150
|
-
|
|
1151
|
-
const result =
|
|
1161
|
+
const baseUrl = _chunkMCXPJYBNjs.resolveConfig.call(void 0, ).baseUrl;
|
|
1162
|
+
_chunkHUC5SGJQjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1163
|
+
const result = _chunkZWN4RXC2js.runToolExecuteStage.call(void 0,
|
|
1152
1164
|
"SDK compatibility",
|
|
1153
|
-
() =>
|
|
1165
|
+
() => _chunkMZROKQV3js.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1154
1166
|
command: "tools execute",
|
|
1155
|
-
skillsVersion:
|
|
1167
|
+
skillsVersion: _chunkMCXPJYBNjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
1156
1168
|
persistCache: false,
|
|
1157
1169
|
timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
|
|
1158
1170
|
catalog: {
|
|
@@ -1166,7 +1178,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1166
1178
|
})
|
|
1167
1179
|
).then(
|
|
1168
1180
|
(compatibility) => {
|
|
1169
|
-
|
|
1181
|
+
_chunkHUC5SGJQjs.recordCliTrace.call(void 0, {
|
|
1170
1182
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1171
1183
|
ms: performance.now() - startedAt,
|
|
1172
1184
|
ok: compatibility.error === null,
|
|
@@ -1175,7 +1187,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1175
1187
|
return compatibility;
|
|
1176
1188
|
},
|
|
1177
1189
|
(error) => {
|
|
1178
|
-
|
|
1190
|
+
_chunkHUC5SGJQjs.recordCliTrace.call(void 0, {
|
|
1179
1191
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1180
1192
|
ms: performance.now() - startedAt,
|
|
1181
1193
|
ok: false
|
|
@@ -1190,7 +1202,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1190
1202
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1191
1203
|
return 1;
|
|
1192
1204
|
}
|
|
1193
|
-
const client = new (0,
|
|
1205
|
+
const client = new (0, _chunk36LQQL5Cjs.DeeplineClient)();
|
|
1194
1206
|
let tool;
|
|
1195
1207
|
try {
|
|
1196
1208
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1244,7 +1256,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1244
1256
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1245
1257
|
if (inferenceQuote)
|
|
1246
1258
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1247
|
-
|
|
1259
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
1248
1260
|
{
|
|
1249
1261
|
toolId: String(tool.toolId || toolId),
|
|
1250
1262
|
cost: _chunkBN5VKY4Xjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
@@ -1267,7 +1279,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1267
1279
|
void 0,
|
|
1268
1280
|
seedToolListScript
|
|
1269
1281
|
);
|
|
1270
|
-
|
|
1282
|
+
_chunkV46J3UTMjs.printCompactJson.call(void 0, {
|
|
1271
1283
|
toolId: contract.toolId,
|
|
1272
1284
|
...options.schemaOnly ? {
|
|
1273
1285
|
inputSchema: contract.inputSchema,
|
|
@@ -1290,7 +1302,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1290
1302
|
return 0;
|
|
1291
1303
|
}
|
|
1292
1304
|
if (options.contractJson) {
|
|
1293
|
-
|
|
1305
|
+
_chunkV46J3UTMjs.printCompactJson.call(void 0, {
|
|
1294
1306
|
..._chunkBN5VKY4Xjs.toolContractJsonForDescribe.call(void 0,
|
|
1295
1307
|
tool,
|
|
1296
1308
|
toolId,
|
|
@@ -1304,7 +1316,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1304
1316
|
}
|
|
1305
1317
|
const emitJson = options.json === true;
|
|
1306
1318
|
if (emitJson) {
|
|
1307
|
-
|
|
1319
|
+
_chunkV46J3UTMjs.printCompactJson.call(void 0, {
|
|
1308
1320
|
..._chunkBN5VKY4Xjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
|
|
1309
1321
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1310
1322
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -2167,7 +2179,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2167
2179
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2168
2180
|
}
|
|
2169
2181
|
if (options.idempotencyKey !== void 0) {
|
|
2170
|
-
|
|
2182
|
+
_chunkN5MLEXZ7js.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2171
2183
|
}
|
|
2172
2184
|
if (options.recoveryTimeoutMs !== void 0) {
|
|
2173
2185
|
const parsed = Number(options.recoveryTimeoutMs);
|
|
@@ -2546,7 +2558,7 @@ function writeToolReceipt(input) {
|
|
|
2546
2558
|
const data = Object.hasOwn(toolResponse, "rawV2") ? toolResponse.rawV2 : Object.hasOwn(toolResponse, "raw") ? toolResponse.raw : Object.hasOwn(envelope, "output") ? envelope.output : Object.hasOwn(envelope, "result") ? envelope.result : response;
|
|
2547
2559
|
const status = typeof envelope.status === "string" ? envelope.status : "completed";
|
|
2548
2560
|
const charged = _chunkBN5VKY4Xjs.recordField.call(void 0, envelope, "billing").credits_charged;
|
|
2549
|
-
|
|
2561
|
+
_chunk7GNKAACYjs.writeExecutionOutput.call(void 0,
|
|
2550
2562
|
{
|
|
2551
2563
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2552
2564
|
status,
|
|
@@ -2577,8 +2589,8 @@ async function executeToolForReceipt(input) {
|
|
|
2577
2589
|
let retryKey = null;
|
|
2578
2590
|
let received = false;
|
|
2579
2591
|
try {
|
|
2580
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2581
|
-
const client = new (0,
|
|
2592
|
+
const cliInvocationId = _nullishCoalesce(_chunkZWN4RXC2js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkZWN4RXC2js.beginToolExecuteCommand.call(void 0, )));
|
|
2593
|
+
const client = new (0, _chunk36LQQL5Cjs.DeeplineClient)();
|
|
2582
2594
|
const metadata = assertExecutableToolMetadata(
|
|
2583
2595
|
toolId,
|
|
2584
2596
|
await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
|
|
@@ -2599,9 +2611,9 @@ async function executeToolForReceipt(input) {
|
|
|
2599
2611
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2600
2612
|
..._optionalChain([metadata, 'access', _35 => _35.executionMetadata, 'optionalAccess', _36 => _36.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2601
2613
|
...key ? { idempotencyKey: key } : {},
|
|
2602
|
-
searchRef:
|
|
2614
|
+
searchRef: _chunk4NWY7JBBjs.recentSearchRef.call(void 0, toolId),
|
|
2603
2615
|
cliInvocationId,
|
|
2604
|
-
onResponseReceived:
|
|
2616
|
+
onResponseReceived: _chunk7GNKAACYjs.recordApiResponse
|
|
2605
2617
|
}).catch((error) => {
|
|
2606
2618
|
const guidance = toolGuidanceLines(metadata.guidance);
|
|
2607
2619
|
if (guidance.length)
|
|
@@ -2624,7 +2636,7 @@ async function executeToolForReceipt(input) {
|
|
|
2624
2636
|
if (received) throw error;
|
|
2625
2637
|
const outcomeKnown = answeredWithFailure(error);
|
|
2626
2638
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _37 => _37.discard, 'call', _38 => _38()]);
|
|
2627
|
-
|
|
2639
|
+
_chunk7GNKAACYjs.writeExecutionOutput.call(void 0,
|
|
2628
2640
|
{
|
|
2629
2641
|
id: outcomeKnown ? null : key,
|
|
2630
2642
|
status: "failed",
|
|
@@ -2648,11 +2660,11 @@ function answeredWithFailure(error) {
|
|
|
2648
2660
|
error.statusCode !== 408 && error.code !== "EXECUTION_OUTCOME_UNKNOWN";
|
|
2649
2661
|
}
|
|
2650
2662
|
async function getToolExecutionReceipt(key, output) {
|
|
2651
|
-
const client = new (0,
|
|
2663
|
+
const client = new (0, _chunk36LQQL5Cjs.DeeplineClient)();
|
|
2652
2664
|
const execution = await client.executions.getByKey(key);
|
|
2653
2665
|
output.label = `${execution.toolId} (tool)`;
|
|
2654
2666
|
if (execution.response === void 0) {
|
|
2655
|
-
|
|
2667
|
+
_chunk7GNKAACYjs.writeExecutionOutput.call(void 0,
|
|
2656
2668
|
{
|
|
2657
2669
|
id: key,
|
|
2658
2670
|
status: execution.executionRecovery.state,
|
|
@@ -2681,19 +2693,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2681
2693
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2682
2694
|
} catch (error) {
|
|
2683
2695
|
if (wantsJson) {
|
|
2684
|
-
|
|
2696
|
+
_chunkV46J3UTMjs.printJsonError.call(void 0, error);
|
|
2685
2697
|
} else {
|
|
2686
2698
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2687
2699
|
}
|
|
2688
2700
|
return error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2689
2701
|
}
|
|
2690
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2702
|
+
const cliInvocationId = _nullishCoalesce(_chunkZWN4RXC2js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkZWN4RXC2js.beginToolExecuteCommand.call(void 0, )));
|
|
2691
2703
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2692
|
-
const tracing =
|
|
2704
|
+
const tracing = _chunkHUC5SGJQjs.isCliTraceEnabled.call(void 0, );
|
|
2693
2705
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2694
|
-
const client = new (0,
|
|
2706
|
+
const client = new (0, _chunk36LQQL5Cjs.DeeplineClient)();
|
|
2695
2707
|
if (clientStartedAt !== void 0) {
|
|
2696
|
-
|
|
2708
|
+
_chunkHUC5SGJQjs.recordCliTrace.call(void 0, {
|
|
2697
2709
|
phase: "cli.tool_execute_client_setup",
|
|
2698
2710
|
ms: performance.now() - clientStartedAt
|
|
2699
2711
|
});
|
|
@@ -2702,13 +2714,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2702
2714
|
const readMetadata = async () => {
|
|
2703
2715
|
if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2704
2716
|
try {
|
|
2705
|
-
metadata = await
|
|
2717
|
+
metadata = await _chunkZWN4RXC2js.runToolExecuteStage.call(void 0,
|
|
2706
2718
|
"tool metadata lookup",
|
|
2707
2719
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2708
2720
|
);
|
|
2709
2721
|
} catch (error) {
|
|
2710
2722
|
if (isMissingToolMetadataError(error)) {
|
|
2711
|
-
const play = await
|
|
2723
|
+
const play = await _chunkZWN4RXC2js.runToolExecuteStage.call(void 0,
|
|
2712
2724
|
"play alias lookup",
|
|
2713
2725
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2714
2726
|
);
|
|
@@ -2737,7 +2749,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2737
2749
|
assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2738
2750
|
} catch (error) {
|
|
2739
2751
|
if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2740
|
-
if (wantsJson)
|
|
2752
|
+
if (wantsJson) _chunkV46J3UTMjs.printJsonError.call(void 0, error);
|
|
2741
2753
|
else console.error(error.message);
|
|
2742
2754
|
return 2;
|
|
2743
2755
|
}
|
|
@@ -2749,7 +2761,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2749
2761
|
metadata = await readMetadata();
|
|
2750
2762
|
} catch (error) {
|
|
2751
2763
|
if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2752
|
-
if (wantsJson)
|
|
2764
|
+
if (wantsJson) _chunkV46J3UTMjs.printJsonError.call(void 0, error);
|
|
2753
2765
|
else console.error(error.message);
|
|
2754
2766
|
return 2;
|
|
2755
2767
|
}
|
|
@@ -2765,7 +2777,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2765
2777
|
metadata = await readMetadata();
|
|
2766
2778
|
} catch (error) {
|
|
2767
2779
|
if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2768
|
-
if (wantsJson)
|
|
2780
|
+
if (wantsJson) _chunkV46J3UTMjs.printJsonError.call(void 0, error);
|
|
2769
2781
|
else console.error(error.message);
|
|
2770
2782
|
return 2;
|
|
2771
2783
|
}
|
|
@@ -2791,11 +2803,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2791
2803
|
responseIntent,
|
|
2792
2804
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2793
2805
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2794
|
-
searchRef:
|
|
2806
|
+
searchRef: _chunk4NWY7JBBjs.recentSearchRef.call(void 0, parsed.toolId),
|
|
2795
2807
|
cliInvocationId,
|
|
2796
|
-
onResponseReceived:
|
|
2808
|
+
onResponseReceived: _chunk7GNKAACYjs.recordApiResponse,
|
|
2797
2809
|
...tracing ? {
|
|
2798
|
-
onServerTiming: (serverTiming) =>
|
|
2810
|
+
onServerTiming: (serverTiming) => _chunkHUC5SGJQjs.recordCliTrace.call(void 0, {
|
|
2799
2811
|
phase: "tool_execute_server_timing",
|
|
2800
2812
|
cliInvocationId,
|
|
2801
2813
|
serverTiming,
|
|
@@ -2806,13 +2818,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2806
2818
|
let rawResponse;
|
|
2807
2819
|
let successfulCompatibilityResponse;
|
|
2808
2820
|
try {
|
|
2809
|
-
const executeResult = await
|
|
2821
|
+
const executeResult = await _chunkZWN4RXC2js.runToolExecuteStage.call(void 0,
|
|
2810
2822
|
"execute request",
|
|
2811
2823
|
async () => {
|
|
2812
2824
|
try {
|
|
2813
2825
|
if (tracing) {
|
|
2814
2826
|
submissionStartedAt = performance.now();
|
|
2815
|
-
|
|
2827
|
+
_chunkHUC5SGJQjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2816
2828
|
}
|
|
2817
2829
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2818
2830
|
...executeOptions,
|
|
@@ -2822,34 +2834,34 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2822
2834
|
} catch (error) {
|
|
2823
2835
|
if (!(error instanceof _chunkSQWET4SLjs.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2824
2836
|
throw error;
|
|
2825
|
-
const baseUrl =
|
|
2837
|
+
const baseUrl = _chunkMCXPJYBNjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2826
2838
|
if (maintenancePolicy !== "off") {
|
|
2827
|
-
|
|
2839
|
+
_chunkMZROKQV3js.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2828
2840
|
}
|
|
2829
|
-
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await
|
|
2841
|
+
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await _chunkZWN4RXC2js.runToolExecuteStage.call(void 0,
|
|
2830
2842
|
"SDK compatibility",
|
|
2831
|
-
() =>
|
|
2843
|
+
() => _chunkMZROKQV3js.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
2832
2844
|
command: "tools execute",
|
|
2833
|
-
skillsVersion:
|
|
2845
|
+
skillsVersion: _chunkMCXPJYBNjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2834
2846
|
persistCache: maintenancePolicy !== "off"
|
|
2835
2847
|
})
|
|
2836
2848
|
);
|
|
2837
2849
|
if (compatibility.error) throw compatibility.error;
|
|
2838
2850
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _44 => _44.readMetadata, 'call', _45 => _45()]), () => ( metadata));
|
|
2839
|
-
if (maintenancePolicy !== "off" && await
|
|
2851
|
+
if (maintenancePolicy !== "off" && await _chunkZWN4RXC2js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2840
2852
|
compatibility.response,
|
|
2841
2853
|
baseUrl,
|
|
2842
2854
|
maintenancePolicy
|
|
2843
2855
|
)) {
|
|
2844
2856
|
return void 0;
|
|
2845
2857
|
}
|
|
2846
|
-
|
|
2858
|
+
_chunkMZROKQV3js.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
2847
2859
|
quietAdvisory: wantsJson
|
|
2848
2860
|
});
|
|
2849
2861
|
if (maintenancePolicy !== "off") {
|
|
2850
|
-
await
|
|
2862
|
+
await _chunkZWN4RXC2js.runToolExecuteStage.call(void 0,
|
|
2851
2863
|
"agent skills sync",
|
|
2852
|
-
() =>
|
|
2864
|
+
() => _chunkMZROKQV3js.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2853
2865
|
update: _optionalChain([compatibility, 'access', _46 => _46.response, 'optionalAccess', _47 => _47.skills]),
|
|
2854
2866
|
mode: "detached"
|
|
2855
2867
|
})
|
|
@@ -2858,7 +2870,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2858
2870
|
const legacyMetadata = await readMetadata();
|
|
2859
2871
|
if (tracing) {
|
|
2860
2872
|
submissionStartedAt = performance.now();
|
|
2861
|
-
|
|
2873
|
+
_chunkHUC5SGJQjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2862
2874
|
}
|
|
2863
2875
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2864
2876
|
...executeOptions,
|
|
@@ -2881,8 +2893,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2881
2893
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2882
2894
|
const updateRequiredBeforeExecution = error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2883
2895
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2884
|
-
const baseUrl =
|
|
2885
|
-
if (await
|
|
2896
|
+
const baseUrl = _chunkMCXPJYBNjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2897
|
+
if (await _chunkZWN4RXC2js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2886
2898
|
compatibility.response,
|
|
2887
2899
|
baseUrl,
|
|
2888
2900
|
maintenancePolicy
|
|
@@ -2906,7 +2918,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2906
2918
|
}
|
|
2907
2919
|
}
|
|
2908
2920
|
if (failure instanceof _chunkSQWET4SLjs.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2909
|
-
if (wantsJson)
|
|
2921
|
+
if (wantsJson) _chunkV46J3UTMjs.printJsonError.call(void 0, failure);
|
|
2910
2922
|
else console.error(failure.message);
|
|
2911
2923
|
return 2;
|
|
2912
2924
|
}
|
|
@@ -2933,9 +2945,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2933
2945
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
2934
2946
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _54 => _54.auto_update]);
|
|
2935
2947
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _55 => _55.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
2936
|
-
await
|
|
2948
|
+
await _chunkZWN4RXC2js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2937
2949
|
compatibilityResponse,
|
|
2938
|
-
|
|
2950
|
+
_chunkMCXPJYBNjs.resolveConfig.call(void 0, ).baseUrl,
|
|
2939
2951
|
maintenancePolicy
|
|
2940
2952
|
);
|
|
2941
2953
|
}
|
|
@@ -2970,7 +2982,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2970
2982
|
const { _metadata, ...execution } = rawResponse;
|
|
2971
2983
|
rawResponse = execution;
|
|
2972
2984
|
}
|
|
2973
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
2985
|
+
const { listConversion, summary, baseEnvelope } = await _chunkZWN4RXC2js.runToolExecuteStage.call(void 0,
|
|
2974
2986
|
"result formatting",
|
|
2975
2987
|
async () => {
|
|
2976
2988
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -3005,9 +3017,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3005
3017
|
}
|
|
3006
3018
|
skillsSyncAttempted = true;
|
|
3007
3019
|
try {
|
|
3008
|
-
await
|
|
3020
|
+
await _chunkZWN4RXC2js.runToolExecuteStage.call(void 0,
|
|
3009
3021
|
"agent skills sync",
|
|
3010
|
-
() =>
|
|
3022
|
+
() => _chunkMZROKQV3js.syncSdkSkillsIfNeeded.call(void 0, _chunkMCXPJYBNjs.resolveConfig.call(void 0, ).baseUrl, {
|
|
3011
3023
|
update: deliveredCompatibilityResponse.skills,
|
|
3012
3024
|
mode: "detached"
|
|
3013
3025
|
})
|
|
@@ -3018,15 +3030,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3018
3030
|
);
|
|
3019
3031
|
}
|
|
3020
3032
|
};
|
|
3021
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
3033
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkV46J3UTMjs.printCommandEnvelope.call(void 0, envelope, {
|
|
3022
3034
|
...options2,
|
|
3023
3035
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
3024
3036
|
});
|
|
3025
3037
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
3026
3038
|
await syncSkillsForDeliveredOutput();
|
|
3027
|
-
|
|
3039
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
3028
3040
|
};
|
|
3029
|
-
const delivered = await
|
|
3041
|
+
const delivered = await _chunkZWN4RXC2js.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
3030
3042
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
3031
3043
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
3032
3044
|
return true;
|
|
@@ -3055,7 +3067,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3055
3067
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3056
3068
|
);
|
|
3057
3069
|
if (wantsJson) {
|
|
3058
|
-
|
|
3070
|
+
_chunkV46J3UTMjs.printJsonError.call(void 0, error);
|
|
3059
3071
|
} else {
|
|
3060
3072
|
console.error(error.message);
|
|
3061
3073
|
}
|
|
@@ -3150,13 +3162,13 @@ inspect: ${inspection.inspect}
|
|
|
3150
3162
|
return true;
|
|
3151
3163
|
});
|
|
3152
3164
|
if (delivered) {
|
|
3153
|
-
await
|
|
3165
|
+
await _chunkZWN4RXC2js.runToolExecuteStage.call(void 0,
|
|
3154
3166
|
"acknowledge delivery",
|
|
3155
3167
|
() => recovery.acknowledgeDelivery()
|
|
3156
3168
|
);
|
|
3157
3169
|
}
|
|
3158
3170
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3159
|
-
|
|
3171
|
+
_chunkMZROKQV3js.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3160
3172
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _58 => _58.auto_update, 'optionalAccess', _59 => _59.should_auto_update]) === true
|
|
3161
3173
|
});
|
|
3162
3174
|
}
|