deepline 0.3.534 → 0.3.535
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 +22 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/call-requeue-state-machine.ts +420 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +658 -25
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +26 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-retry-policy.ts +624 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +51 -1
- package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +245 -1
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-no-progress.ts +6 -2
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +55 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +6 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +101 -0
- package/dist/bundling-sources/shared_libs/plays/share/static-pipeline-summary.ts +63 -13
- package/dist/cli/auth-VDCU3T6A.js +43 -0
- package/dist/cli/{auth-MHQYIMVX.mjs → auth-ZCTMB5RA.mjs} +5 -5
- package/dist/cli/{billing-YQLNP4S5.js → billing-GVFKZQH3.js} +82 -82
- package/dist/cli/{billing-LX2PSBJ4.mjs → billing-OU2ZHL72.mjs} +7 -7
- package/dist/cli/{chunk-MQX363YF.js → chunk-243O3FH5.js} +5 -5
- package/dist/cli/{chunk-MYSKWJMA.js → chunk-2D6SWQTK.js} +13 -13
- package/dist/cli/{chunk-NDFNBJGL.js → chunk-4NLRWKZB.js} +26 -26
- package/dist/cli/{chunk-5LZ5VSOK.mjs → chunk-4QELPWUW.mjs} +2 -2
- package/dist/cli/{chunk-GTXSUPCJ.js → chunk-5EKNDNFQ.js} +2 -2
- package/dist/cli/{chunk-V7SCRUFQ.js → chunk-6LHX33VN.js} +6 -6
- package/dist/cli/{chunk-ENCA6O2D.mjs → chunk-6TYRRNXY.mjs} +2 -2
- package/dist/cli/{chunk-AK622KIG.mjs → chunk-7CWSAEYS.mjs} +1 -1
- package/dist/cli/{chunk-DZS4JC7I.js → chunk-7PXP2FQK.js} +2 -2
- package/dist/cli/{chunk-KJVY7V2X.mjs → chunk-7R5DAANG.mjs} +1 -1
- package/dist/cli/{chunk-6IFZPEJE.mjs → chunk-AUEUAPVS.mjs} +1 -1
- package/dist/cli/{chunk-XRZJKHUA.mjs → chunk-BF65LB7X.mjs} +3 -3
- package/dist/cli/{chunk-B2AS3R5W.js → chunk-CIDATNTY.js} +16 -16
- package/dist/cli/{chunk-UWNVFAFN.js → chunk-D4MHCCIR.js} +4 -4
- package/dist/cli/{chunk-GVGQ6NZW.js → chunk-DAPKLYST.js} +41 -41
- package/dist/cli/{chunk-BDWZBMGV.mjs → chunk-DFJODFMC.mjs} +5 -5
- package/dist/cli/{chunk-7GFR5Y4J.mjs → chunk-DWPY6ZID.mjs} +1 -1
- package/dist/cli/{chunk-KSA2XE4T.js → chunk-DYIWDUY4.js} +104 -104
- package/dist/cli/{chunk-5FXMEEF4.mjs → chunk-E3CLOVG5.mjs} +17 -5
- package/dist/cli/{chunk-DGKTHWWH.js → chunk-FGN75ZN6.js} +23 -7
- package/dist/cli/{chunk-MG6YL4M7.mjs → chunk-FZKPPB5P.mjs} +17 -1
- package/dist/cli/{chunk-2P3NVX65.mjs → chunk-G2DLG32W.mjs} +10 -10
- package/dist/cli/{chunk-O53LHONF.mjs → chunk-H6SWS5CG.mjs} +2 -2
- package/dist/cli/{chunk-XBK6WCVA.js → chunk-HWPOXCCK.js} +3 -3
- package/dist/cli/{chunk-HCD36BP6.js → chunk-HYBZWSSH.js} +44 -44
- package/dist/cli/{chunk-BXIUZM5N.mjs → chunk-J75DANZY.mjs} +2 -2
- package/dist/cli/{chunk-KXQCUX3X.mjs → chunk-JQQG4QL4.mjs} +3 -3
- package/dist/cli/{chunk-62SOZ67Y.mjs → chunk-JWWYLGUT.mjs} +2 -2
- package/dist/cli/{chunk-IX45S5VC.js → chunk-K3IPGMGP.js} +11 -11
- package/dist/cli/{chunk-OMVVHX4U.mjs → chunk-K53NKWZO.mjs} +5 -5
- package/dist/cli/{chunk-WR4WETRU.mjs → chunk-K76AEBFY.mjs} +4 -4
- package/dist/cli/{chunk-HPJAE6PP.js → chunk-KA6ZERJL.js} +6 -6
- package/dist/cli/{chunk-MQORQ7WL.js → chunk-KOZBZPRM.js} +53 -53
- package/dist/cli/{chunk-EGTUOYYG.js → chunk-KWGXHPHL.js} +7 -7
- package/dist/cli/{chunk-WDNRPZED.mjs → chunk-LVISZFYO.mjs} +2 -2
- package/dist/cli/{chunk-TVINIDHB.js → chunk-OM732MGV.js} +9 -9
- package/dist/cli/{chunk-JBBJDFUJ.js → chunk-PHLNYBAA.js} +5 -5
- package/dist/cli/{chunk-RH3YRMUY.js → chunk-PI5R65OQ.js} +1 -1
- package/dist/cli/{chunk-NNAE7E23.mjs → chunk-QYBAHYP4.mjs} +6 -6
- package/dist/cli/{chunk-TQH3533L.mjs → chunk-R2KKEHJN.mjs} +5 -5
- package/dist/cli/{chunk-6CEUQYMB.js → chunk-RFQWSH6I.js} +3 -3
- package/dist/cli/{chunk-TG2UB3A5.mjs → chunk-RKY4LBX3.mjs} +1 -1
- package/dist/cli/{chunk-D3J2Y2BP.js → chunk-T7RBM2WX.js} +14 -14
- package/dist/cli/{chunk-DQ5ADV2J.mjs → chunk-TCVCFZP6.mjs} +1 -1
- package/dist/cli/{chunk-LGRZCHKC.js → chunk-UUQ2OXMH.js} +16 -16
- package/dist/cli/{chunk-E7TP25I2.mjs → chunk-W5YJYU4G.mjs} +1 -1
- package/dist/cli/{chunk-VAG5YKP6.mjs → chunk-W6T23EUC.mjs} +1 -1
- package/dist/cli/{chunk-EYXUAJAU.mjs → chunk-WAIBM6KX.mjs} +5 -5
- package/dist/cli/{chunk-VE7ZPLN2.js → chunk-WNNA4L6Z.js} +22 -22
- package/dist/cli/{chunk-SUWTLXCV.js → chunk-XSOTEVOB.js} +17 -5
- package/dist/cli/{chunk-6GTGWZJG.mjs → chunk-YFZLZNTH.mjs} +2 -2
- package/dist/cli/{chunk-A6HNT4EE.js → chunk-ZUVE63Y7.js} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-U3M2G76R.js → csv-CD55KEIO.js} +13 -13
- package/dist/cli/{csv-4ID4E5W3.mjs → csv-CLPVMIRF.mjs} +4 -4
- package/dist/cli/{db-LHX5BBCZ.mjs → db-AU4SMWUN.mjs} +6 -6
- package/dist/cli/{db-IHAQIKEQ.js → db-MQKLDAEO.js} +27 -27
- package/dist/cli/describe-5BFNHT5V.js +50 -0
- package/dist/cli/{describe-CI4MREFF.mjs → describe-AWJUXE2U.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-CJ5LV23G.js → executions-77GOLWRM.js} +8 -8
- package/dist/cli/{executions-UJ6JZUL5.mjs → executions-TFIJPUX7.mjs} +6 -6
- package/dist/cli/{feedback-YGTPJBRJ.mjs → feedback-2WRSZ5WL.mjs} +6 -6
- package/dist/cli/{feedback-TGUBVGRP.js → feedback-OV5YAL3A.js} +14 -14
- package/dist/cli/git-HGMX52XU.js +25 -0
- package/dist/cli/{git-3DOTQHJO.mjs → git-VNS4ATLZ.mjs} +5 -5
- package/dist/cli/index.js +145 -145
- package/dist/cli/index.mjs +44 -44
- package/dist/cli/{legacy-noops-RBBYRVLG.mjs → legacy-noops-C732QDCY.mjs} +6 -6
- package/dist/cli/{legacy-noops-BHEHVFHI.js → legacy-noops-HDOB5C6F.js} +9 -9
- package/dist/cli/{monitors-5AJCG6IV.mjs → monitors-2LYEFXOU.mjs} +7 -7
- package/dist/cli/{monitors-XECKLAXA.js → monitors-5IUMHH3E.js} +100 -100
- package/dist/cli/{org-DOBAIYWG.js → org-ADW2EVAC.js} +86 -86
- package/dist/cli/{org-ZAAIEZKB.mjs → org-G4YGZPHS.mjs} +6 -6
- package/dist/cli/{pages-FUOSF6BE.mjs → pages-KXKWSCEV.mjs} +6 -6
- package/dist/cli/{pages-TLC2N6L7.js → pages-VTJGAI2D.js} +18 -18
- package/dist/cli/{play-KLYRMQPF.mjs → play-7GQ56C2D.mjs} +69 -22
- package/dist/cli/{play-E74VN6B7.js → play-EHSOSSHT.js} +367 -320
- package/dist/cli/{providers-APZ6SOSK.js → providers-PWCF6OOO.js} +9 -9
- package/dist/cli/{providers-XTQXV5LB.mjs → providers-WL3YTCSV.mjs} +6 -6
- package/dist/cli/{quickstart-X7RHHQCH.mjs → quickstart-323XOPGI.mjs} +4 -4
- package/dist/cli/{quickstart-S6WN6NWW.js → quickstart-ZKI5MURA.js} +6 -6
- package/dist/cli/{run-3YLIJJ57.js → run-XZPWA6JS.js} +41 -41
- package/dist/cli/{run-TZPBBSPX.mjs → run-ZCNZU3K2.mjs} +23 -23
- package/dist/cli/{search-VLHE2CMZ.mjs → search-CVLVSFMJ.mjs} +8 -8
- package/dist/cli/search-J6EY7DQN.js +33 -0
- package/dist/cli/{search-output-73BYB7UE.mjs → search-output-6PY6RN2R.mjs} +4 -4
- package/dist/cli/{search-output-GCT7PQIT.js → search-output-7HRSSRBS.js} +6 -6
- package/dist/cli/{secrets-RLOTGKQZ.mjs → secrets-6S2ZWDIM.mjs} +6 -6
- package/dist/cli/{secrets-J6CEKXKQ.js → secrets-IYD5VKY4.js} +15 -15
- package/dist/cli/sessions-7HPIVSQ4.js +22 -0
- package/dist/cli/{sessions-7HZ7OZ62.mjs → sessions-GVEX5TUJ.mjs} +6 -6
- package/dist/cli/{settings-72K5YCIS.mjs → settings-BN5MJZ3C.mjs} +13 -13
- package/dist/cli/{settings-WRV5XEZC.js → settings-CANK4HJQ.js} +86 -86
- package/dist/cli/{setup-KQFY6WT4.mjs → setup-JNMSCCU4.mjs} +10 -10
- package/dist/cli/{setup-QVXWT2EQ.js → setup-YSGKGLSJ.js} +50 -50
- package/dist/cli/{skills-C3K3E473.mjs → skills-QCQN2UM2.mjs} +8 -8
- package/dist/cli/skills-WDGSSKJZ.js +37 -0
- package/dist/cli/{tools-4A2OH6MB.mjs → tools-CDPOID7V.mjs} +17 -17
- package/dist/cli/tools-URNVXSTZ.js +57 -0
- package/dist/cli/{update-BS6USKPR.mjs → update-D3ZERUQ3.mjs} +10 -10
- package/dist/cli/update-Q6JW32IA.js +35 -0
- package/dist/cli/{views-4NZGAXHL.js → views-4NV2KQKA.js} +18 -18
- package/dist/cli/{views-WB6GFTRX.mjs → views-RDZRWQBQ.mjs} +6 -6
- package/dist/cli/{workflow-2D4WX55R.mjs → workflow-2CG3TVCG.mjs} +7 -7
- package/dist/cli/{workflow-L2QTQZYV.js → workflow-RABJCAZC.js} +17 -17
- package/dist/{client-DoUVSkqC.d.mts → client-DhSvMO3A.d.mts} +1 -1
- package/dist/{client-core-CPlwsC1Q.d.mts → client-core-CVG1Et-4.d.mts} +9 -1
- package/dist/{client-core-C7KkUIE_.d.ts → client-core-CdWH6Sii.d.ts} +9 -1
- package/dist/{client-DQm56zMs.d.ts → client-oGNJMQFd.d.ts} +1 -1
- package/dist/{compiler-manifest-DsxsQP-T.d.mts → compiler-manifest-D2ZlBGxj.d.mts} +44 -0
- package/dist/{compiler-manifest-DsxsQP-T.d.ts → compiler-manifest-D2ZlBGxj.d.ts} +44 -0
- package/dist/{errors-qdJUVQ3g.d.mts → errors-B-gOQdj-.d.mts} +1 -1
- package/dist/{errors-Bk5h1D-C.d.ts → errors-CB0KAmmV.d.ts} +1 -1
- package/dist/{index-PaupwX1B.d.mts → index-BbJADro4.d.mts} +1 -1
- package/dist/{index-bL66eHYz.d.ts → index-c3nvUGCS.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 +118 -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 +52 -0
- 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-UP2RGPI6.js +0 -43
- package/dist/cli/describe-IVTSD7ST.js +0 -50
- package/dist/cli/git-R3W25XIF.js +0 -25
- package/dist/cli/search-NB5CBALV.js +0 -33
- package/dist/cli/sessions-SFCZSB77.js +0 -22
- package/dist/cli/skills-WIJEHVLA.js +0 -37
- package/dist/cli/tools-VMMERMLO.js +0 -57
- package/dist/cli/update-54WZQDTS.js +0 -35
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk6LHX33VNjs = require('./chunk-6LHX33VN.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkK3IPGMGPjs = require('./chunk-K3IPGMGP.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 _chunk243O3FH5js = require('./chunk-243O3FH5.js');
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
var
|
|
52
|
+
var _chunkFGN75ZN6js = require('./chunk-FGN75ZN6.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 _chunkWNNA4L6Zjs = require('./chunk-WNNA4L6Z.js');
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
var
|
|
67
|
+
var _chunk7PXP2FQKjs = require('./chunk-7PXP2FQK.js');
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
var
|
|
73
|
+
var _chunkHYBZWSSHjs = require('./chunk-HYBZWSSH.js');
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
|
|
@@ -78,12 +78,12 @@ var _chunkHCD36BP6js = require('./chunk-HCD36BP6.js');
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
var
|
|
81
|
+
var _chunkKWGXHPHLjs = require('./chunk-KWGXHPHL.js');
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
var
|
|
86
|
+
var _chunkHWPOXCCKjs = require('./chunk-HWPOXCCK.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 = _chunkHWPOXCCKjs.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
|
+
_chunkHWPOXCCKjs.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, _chunk243O3FH5js.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
|
+
_chunkKWGXHPHLjs.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
|
+
_chunkKWGXHPHLjs.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
|
+
_chunkKWGXHPHLjs.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(_chunkKWGXHPHLjs.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, _chunk243O3FH5js.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
|
+
_chunkKWGXHPHLjs.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, _chunk243O3FH5js.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
|
+
_chunkKWGXHPHLjs.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 || _chunkKWGXHPHLjs.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
|
+
_chunkKWGXHPHLjs.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, _chunk243O3FH5js.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
|
+
_chunkKWGXHPHLjs.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 || _chunkKWGXHPHLjs.shouldEmitJson.call(void 0, ) }
|
|
737
737
|
);
|
|
738
738
|
return 0;
|
|
739
739
|
}
|
|
@@ -832,10 +832,10 @@ Output:
|
|
|
832
832
|
tools.command("balance <provider>").description(
|
|
833
833
|
"Read a fresh balance using this workspace\u2019s own provider connection (LeadMagic)."
|
|
834
834
|
).option("--json", "Print the balance and observation timestamp as JSON").action(async (provider, options) => {
|
|
835
|
-
const balance = await new (0,
|
|
835
|
+
const balance = await new (0, _chunk243O3FH5js.DeeplineClient)().getIntegrationBalance(
|
|
836
836
|
provider
|
|
837
837
|
);
|
|
838
|
-
if (
|
|
838
|
+
if (_chunkKWGXHPHLjs.shouldEmitJson.call(void 0, options.json)) console.log(JSON.stringify(balance));
|
|
839
839
|
else
|
|
840
840
|
console.log(
|
|
841
841
|
`${balance.provider}: ${balance.balance.value} ${balance.unit} (observed ${balance.observedAt})`
|
|
@@ -844,8 +844,8 @@ Output:
|
|
|
844
844
|
tools.command("workspace-connections").description(
|
|
845
845
|
"List shared OAuth connections in a workspace enrolled in the pilot."
|
|
846
846
|
).option("--json", "Print connection summaries as JSON").action(async (options) => {
|
|
847
|
-
const { connections } = await new (0,
|
|
848
|
-
if (
|
|
847
|
+
const { connections } = await new (0, _chunk243O3FH5js.DeeplineClient)().listWorkspaceIntegrationConnections();
|
|
848
|
+
if (_chunkKWGXHPHLjs.shouldEmitJson.call(void 0, options.json))
|
|
849
849
|
console.log(JSON.stringify(connections));
|
|
850
850
|
else if (connections.length === 0)
|
|
851
851
|
console.log("No workspace connections.");
|
|
@@ -861,7 +861,7 @@ Output:
|
|
|
861
861
|
throw new Error("Choose hubspot or google_calendar_availability.");
|
|
862
862
|
if (action !== "connect" && action !== "reconnect" && action !== "replace" && action !== "disconnect")
|
|
863
863
|
throw new Error("Choose connect, reconnect, replace, or disconnect.");
|
|
864
|
-
const client = new (0,
|
|
864
|
+
const client = new (0, _chunk243O3FH5js.DeeplineClient)();
|
|
865
865
|
const { connections } = await client.listWorkspaceIntegrationConnections();
|
|
866
866
|
const row = connections.find(
|
|
867
867
|
(connection) => connection.provider === provider
|
|
@@ -872,15 +872,15 @@ Output:
|
|
|
872
872
|
connectionId: _optionalChain([row, 'optionalAccess', _14 => _14.id]),
|
|
873
873
|
authorizationVersion: _optionalChain([row, 'optionalAccess', _15 => _15.authorizationVersion])
|
|
874
874
|
});
|
|
875
|
-
if (
|
|
875
|
+
if (_chunkKWGXHPHLjs.shouldEmitJson.call(void 0, options.json)) console.log(JSON.stringify(result));
|
|
876
876
|
else console.log(_nullishCoalesce(result.url, () => ( "Workspace connection disconnected.")));
|
|
877
877
|
}
|
|
878
878
|
);
|
|
879
879
|
tools.command("availability-calendars").description("Calendar discovery compatibility command for the pilot.").option("--cursor <cursor>", "Legacy calendar page cursor").option("--json", "Print the response as JSON").action(async (options) => {
|
|
880
|
-
const page = await new (0,
|
|
880
|
+
const page = await new (0, _chunk243O3FH5js.DeeplineClient)().listAvailabilityCalendars(
|
|
881
881
|
options.cursor
|
|
882
882
|
);
|
|
883
|
-
if (
|
|
883
|
+
if (_chunkKWGXHPHLjs.shouldEmitJson.call(void 0, options.json)) {
|
|
884
884
|
console.log(JSON.stringify(page));
|
|
885
885
|
return;
|
|
886
886
|
}
|
|
@@ -914,10 +914,10 @@ Output:
|
|
|
914
914
|
);
|
|
915
915
|
}
|
|
916
916
|
if (options.link) {
|
|
917
|
-
const link = await new (0,
|
|
917
|
+
const link = await new (0, _chunk243O3FH5js.DeeplineClient)().getIntegrationConnectLink(
|
|
918
918
|
provider
|
|
919
919
|
);
|
|
920
|
-
if (
|
|
920
|
+
if (_chunkKWGXHPHLjs.shouldEmitJson.call(void 0, options.json)) console.log(JSON.stringify(link));
|
|
921
921
|
else console.log(link.connect_url);
|
|
922
922
|
return;
|
|
923
923
|
}
|
|
@@ -927,7 +927,7 @@ Output:
|
|
|
927
927
|
if (options.preset !== void 0 && (options.scopes !== void 0 || options.optionalScopes !== void 0))
|
|
928
928
|
throw new Error("Use --preset or individual scopes, not both.");
|
|
929
929
|
const splitScopes = (value) => value.split(",").map((scope) => scope.trim()).filter(Boolean);
|
|
930
|
-
const result2 = await new (0,
|
|
930
|
+
const result2 = await new (0, _chunk243O3FH5js.DeeplineClient)().startIntegrationOAuth(
|
|
931
931
|
provider,
|
|
932
932
|
{
|
|
933
933
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
@@ -939,7 +939,7 @@ Output:
|
|
|
939
939
|
throw new Error(
|
|
940
940
|
"The API did not return an OAuth authorization URL."
|
|
941
941
|
);
|
|
942
|
-
if (
|
|
942
|
+
if (_chunkKWGXHPHLjs.shouldEmitJson.call(void 0, options.json))
|
|
943
943
|
console.log(
|
|
944
944
|
JSON.stringify({ provider, redirect_url: result2.redirect_url })
|
|
945
945
|
);
|
|
@@ -965,7 +965,7 @@ Output:
|
|
|
965
965
|
"--credentials-file must contain a nonempty JSON object of string credential values."
|
|
966
966
|
);
|
|
967
967
|
}
|
|
968
|
-
const result = await new (0,
|
|
968
|
+
const result = await new (0, _chunk243O3FH5js.DeeplineClient)().setIntegrationCredentials(
|
|
969
969
|
provider,
|
|
970
970
|
credentials,
|
|
971
971
|
{ expectedConnectionId: options.expectedConnectionId }
|
|
@@ -976,7 +976,7 @@ Output:
|
|
|
976
976
|
);
|
|
977
977
|
}
|
|
978
978
|
const confirmation = { provider, credential_saved: true };
|
|
979
|
-
if (
|
|
979
|
+
if (_chunkKWGXHPHLjs.shouldEmitJson.call(void 0, options.json))
|
|
980
980
|
console.log(JSON.stringify(confirmation));
|
|
981
981
|
else
|
|
982
982
|
console.log(
|
|
@@ -1016,7 +1016,7 @@ Examples:
|
|
|
1016
1016
|
json: Boolean(options.json)
|
|
1017
1017
|
});
|
|
1018
1018
|
});
|
|
1019
|
-
|
|
1019
|
+
_chunkK3IPGMGPjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
1020
1020
|
tools.command("grep <query>").description(
|
|
1021
1021
|
"Regex grep over tool ids, descriptions, categories, and input fields."
|
|
1022
1022
|
).addHelpText(
|
|
@@ -1051,7 +1051,7 @@ Examples:
|
|
|
1051
1051
|
});
|
|
1052
1052
|
const addToolMetadataCommand = (command) => {
|
|
1053
1053
|
let compatibilityMetadata;
|
|
1054
|
-
|
|
1054
|
+
_chunkWNNA4L6Zjs.registerCompatibilityCatalog.call(void 0, command, () => ({
|
|
1055
1055
|
toolId: command.args[0],
|
|
1056
1056
|
acceptMetadata: (metadata) => {
|
|
1057
1057
|
compatibilityMetadata = metadata;
|
|
@@ -1121,7 +1121,7 @@ Examples:
|
|
|
1121
1121
|
process.exitCode = await narrowView();
|
|
1122
1122
|
return;
|
|
1123
1123
|
}
|
|
1124
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
1124
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-5BFNHT5V.js")));
|
|
1125
1125
|
process.exitCode = await describeAnything(
|
|
1126
1126
|
toolId,
|
|
1127
1127
|
{
|
|
@@ -1136,7 +1136,7 @@ Examples:
|
|
|
1136
1136
|
});
|
|
1137
1137
|
};
|
|
1138
1138
|
addToolMetadataCommand(
|
|
1139
|
-
|
|
1139
|
+
_chunk6LHX33VNjs.addDescribeOptions.call(void 0,
|
|
1140
1140
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
1141
1141
|
{ json: false }
|
|
1142
1142
|
)
|
|
@@ -1205,7 +1205,7 @@ Examples:
|
|
|
1205
1205
|
options,
|
|
1206
1206
|
void 0,
|
|
1207
1207
|
true,
|
|
1208
|
-
|
|
1208
|
+
_chunk7PXP2FQKjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
1209
1209
|
);
|
|
1210
1210
|
}
|
|
1211
1211
|
);
|
|
@@ -1213,13 +1213,13 @@ Examples:
|
|
|
1213
1213
|
function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
1214
1214
|
let metadata;
|
|
1215
1215
|
const startedAt = performance.now();
|
|
1216
|
-
const baseUrl =
|
|
1217
|
-
|
|
1218
|
-
const result =
|
|
1216
|
+
const baseUrl = _chunkHWPOXCCKjs.resolveConfig.call(void 0, ).baseUrl;
|
|
1217
|
+
_chunk7PXP2FQKjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1218
|
+
const result = _chunkWNNA4L6Zjs.runToolExecuteStage.call(void 0,
|
|
1219
1219
|
"SDK compatibility",
|
|
1220
|
-
() =>
|
|
1220
|
+
() => _chunkHYBZWSSHjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1221
1221
|
command: "tools execute",
|
|
1222
|
-
skillsVersion:
|
|
1222
|
+
skillsVersion: _chunkHWPOXCCKjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
1223
1223
|
persistCache: false,
|
|
1224
1224
|
timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
|
|
1225
1225
|
catalog: {
|
|
@@ -1233,7 +1233,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1233
1233
|
})
|
|
1234
1234
|
).then(
|
|
1235
1235
|
(compatibility) => {
|
|
1236
|
-
|
|
1236
|
+
_chunk7PXP2FQKjs.recordCliTrace.call(void 0, {
|
|
1237
1237
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1238
1238
|
ms: performance.now() - startedAt,
|
|
1239
1239
|
ok: compatibility.error === null,
|
|
@@ -1242,7 +1242,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1242
1242
|
return compatibility;
|
|
1243
1243
|
},
|
|
1244
1244
|
(error) => {
|
|
1245
|
-
|
|
1245
|
+
_chunk7PXP2FQKjs.recordCliTrace.call(void 0, {
|
|
1246
1246
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1247
1247
|
ms: performance.now() - startedAt,
|
|
1248
1248
|
ok: false
|
|
@@ -1257,7 +1257,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1257
1257
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1258
1258
|
return 1;
|
|
1259
1259
|
}
|
|
1260
|
-
const client = new (0,
|
|
1260
|
+
const client = new (0, _chunk243O3FH5js.DeeplineClient)();
|
|
1261
1261
|
let tool;
|
|
1262
1262
|
try {
|
|
1263
1263
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1311,7 +1311,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1311
1311
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1312
1312
|
if (inferenceQuote)
|
|
1313
1313
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1314
|
-
|
|
1314
|
+
_chunkKWGXHPHLjs.printCommandEnvelope.call(void 0,
|
|
1315
1315
|
{
|
|
1316
1316
|
toolId: String(tool.toolId || toolId),
|
|
1317
1317
|
cost: _chunkZS2WHWWLjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
@@ -1334,7 +1334,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1334
1334
|
void 0,
|
|
1335
1335
|
seedToolListScript
|
|
1336
1336
|
);
|
|
1337
|
-
|
|
1337
|
+
_chunkKWGXHPHLjs.printCompactJson.call(void 0, {
|
|
1338
1338
|
toolId: contract.toolId,
|
|
1339
1339
|
...options.schemaOnly ? {
|
|
1340
1340
|
inputSchema: contract.inputSchema,
|
|
@@ -1357,7 +1357,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1357
1357
|
return 0;
|
|
1358
1358
|
}
|
|
1359
1359
|
if (options.contractJson) {
|
|
1360
|
-
|
|
1360
|
+
_chunkKWGXHPHLjs.printCompactJson.call(void 0, {
|
|
1361
1361
|
..._chunkZS2WHWWLjs.toolContractJsonForDescribe.call(void 0,
|
|
1362
1362
|
tool,
|
|
1363
1363
|
toolId,
|
|
@@ -1371,7 +1371,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1371
1371
|
}
|
|
1372
1372
|
const emitJson = options.json === true;
|
|
1373
1373
|
if (emitJson) {
|
|
1374
|
-
|
|
1374
|
+
_chunkKWGXHPHLjs.printCompactJson.call(void 0, {
|
|
1375
1375
|
..._chunkZS2WHWWLjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
|
|
1376
1376
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1377
1377
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -2234,7 +2234,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2234
2234
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2235
2235
|
}
|
|
2236
2236
|
if (options.idempotencyKey !== void 0) {
|
|
2237
|
-
|
|
2237
|
+
_chunkFGN75ZN6js.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2238
2238
|
}
|
|
2239
2239
|
if (options.recoveryTimeoutMs !== void 0) {
|
|
2240
2240
|
const parsed = Number(options.recoveryTimeoutMs);
|
|
@@ -2613,7 +2613,7 @@ function writeToolReceipt(input) {
|
|
|
2613
2613
|
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;
|
|
2614
2614
|
const status = typeof envelope.status === "string" ? envelope.status : "completed";
|
|
2615
2615
|
const charged = _chunkZS2WHWWLjs.recordField.call(void 0, envelope, "billing").credits_charged;
|
|
2616
|
-
|
|
2616
|
+
_chunk6LHX33VNjs.writeExecutionOutput.call(void 0,
|
|
2617
2617
|
{
|
|
2618
2618
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2619
2619
|
status,
|
|
@@ -2644,8 +2644,8 @@ async function executeToolForReceipt(input) {
|
|
|
2644
2644
|
let retryKey = null;
|
|
2645
2645
|
let received = false;
|
|
2646
2646
|
try {
|
|
2647
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2648
|
-
const client = new (0,
|
|
2647
|
+
const cliInvocationId = _nullishCoalesce(_chunkWNNA4L6Zjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkWNNA4L6Zjs.beginToolExecuteCommand.call(void 0, )));
|
|
2648
|
+
const client = new (0, _chunk243O3FH5js.DeeplineClient)();
|
|
2649
2649
|
const metadata = assertExecutableToolMetadata(
|
|
2650
2650
|
toolId,
|
|
2651
2651
|
await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
|
|
@@ -2666,9 +2666,9 @@ async function executeToolForReceipt(input) {
|
|
|
2666
2666
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2667
2667
|
..._optionalChain([metadata, 'access', _37 => _37.executionMetadata, 'optionalAccess', _38 => _38.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2668
2668
|
...key ? { idempotencyKey: key } : {},
|
|
2669
|
-
searchRef:
|
|
2669
|
+
searchRef: _chunkK3IPGMGPjs.recentSearchRef.call(void 0, toolId),
|
|
2670
2670
|
cliInvocationId,
|
|
2671
|
-
onResponseReceived:
|
|
2671
|
+
onResponseReceived: _chunk6LHX33VNjs.recordApiResponse
|
|
2672
2672
|
}).catch((error) => {
|
|
2673
2673
|
const guidance = toolGuidanceLines(metadata.guidance);
|
|
2674
2674
|
if (guidance.length)
|
|
@@ -2691,7 +2691,7 @@ async function executeToolForReceipt(input) {
|
|
|
2691
2691
|
if (received) throw error;
|
|
2692
2692
|
const outcomeKnown = answeredWithFailure(error);
|
|
2693
2693
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _39 => _39.discard, 'call', _40 => _40()]);
|
|
2694
|
-
|
|
2694
|
+
_chunk6LHX33VNjs.writeExecutionOutput.call(void 0,
|
|
2695
2695
|
{
|
|
2696
2696
|
id: outcomeKnown ? null : key,
|
|
2697
2697
|
status: "failed",
|
|
@@ -2715,11 +2715,11 @@ function answeredWithFailure(error) {
|
|
|
2715
2715
|
error.statusCode !== 408 && error.code !== "EXECUTION_OUTCOME_UNKNOWN";
|
|
2716
2716
|
}
|
|
2717
2717
|
async function getToolExecutionReceipt(key, output) {
|
|
2718
|
-
const client = new (0,
|
|
2718
|
+
const client = new (0, _chunk243O3FH5js.DeeplineClient)();
|
|
2719
2719
|
const execution = await client.executions.getByKey(key);
|
|
2720
2720
|
output.label = `${execution.toolId} (tool)`;
|
|
2721
2721
|
if (execution.response === void 0) {
|
|
2722
|
-
|
|
2722
|
+
_chunk6LHX33VNjs.writeExecutionOutput.call(void 0,
|
|
2723
2723
|
{
|
|
2724
2724
|
id: key,
|
|
2725
2725
|
status: execution.executionRecovery.state,
|
|
@@ -2748,19 +2748,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2748
2748
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2749
2749
|
} catch (error) {
|
|
2750
2750
|
if (wantsJson) {
|
|
2751
|
-
|
|
2751
|
+
_chunkKWGXHPHLjs.printJsonError.call(void 0, error);
|
|
2752
2752
|
} else {
|
|
2753
2753
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2754
2754
|
}
|
|
2755
2755
|
return error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2756
2756
|
}
|
|
2757
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2757
|
+
const cliInvocationId = _nullishCoalesce(_chunkWNNA4L6Zjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkWNNA4L6Zjs.beginToolExecuteCommand.call(void 0, )));
|
|
2758
2758
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2759
|
-
const tracing =
|
|
2759
|
+
const tracing = _chunk7PXP2FQKjs.isCliTraceEnabled.call(void 0, );
|
|
2760
2760
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2761
|
-
const client = new (0,
|
|
2761
|
+
const client = new (0, _chunk243O3FH5js.DeeplineClient)();
|
|
2762
2762
|
if (clientStartedAt !== void 0) {
|
|
2763
|
-
|
|
2763
|
+
_chunk7PXP2FQKjs.recordCliTrace.call(void 0, {
|
|
2764
2764
|
phase: "cli.tool_execute_client_setup",
|
|
2765
2765
|
ms: performance.now() - clientStartedAt
|
|
2766
2766
|
});
|
|
@@ -2769,13 +2769,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2769
2769
|
const readMetadata = async () => {
|
|
2770
2770
|
if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2771
2771
|
try {
|
|
2772
|
-
metadata = await
|
|
2772
|
+
metadata = await _chunkWNNA4L6Zjs.runToolExecuteStage.call(void 0,
|
|
2773
2773
|
"tool metadata lookup",
|
|
2774
2774
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2775
2775
|
);
|
|
2776
2776
|
} catch (error) {
|
|
2777
2777
|
if (isMissingToolMetadataError(error)) {
|
|
2778
|
-
const play = await
|
|
2778
|
+
const play = await _chunkWNNA4L6Zjs.runToolExecuteStage.call(void 0,
|
|
2779
2779
|
"play alias lookup",
|
|
2780
2780
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2781
2781
|
);
|
|
@@ -2804,7 +2804,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2804
2804
|
assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2805
2805
|
} catch (error) {
|
|
2806
2806
|
if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2807
|
-
if (wantsJson)
|
|
2807
|
+
if (wantsJson) _chunkKWGXHPHLjs.printJsonError.call(void 0, error);
|
|
2808
2808
|
else console.error(error.message);
|
|
2809
2809
|
return 2;
|
|
2810
2810
|
}
|
|
@@ -2816,7 +2816,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2816
2816
|
metadata = await readMetadata();
|
|
2817
2817
|
} catch (error) {
|
|
2818
2818
|
if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2819
|
-
if (wantsJson)
|
|
2819
|
+
if (wantsJson) _chunkKWGXHPHLjs.printJsonError.call(void 0, error);
|
|
2820
2820
|
else console.error(error.message);
|
|
2821
2821
|
return 2;
|
|
2822
2822
|
}
|
|
@@ -2832,7 +2832,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2832
2832
|
metadata = await readMetadata();
|
|
2833
2833
|
} catch (error) {
|
|
2834
2834
|
if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2835
|
-
if (wantsJson)
|
|
2835
|
+
if (wantsJson) _chunkKWGXHPHLjs.printJsonError.call(void 0, error);
|
|
2836
2836
|
else console.error(error.message);
|
|
2837
2837
|
return 2;
|
|
2838
2838
|
}
|
|
@@ -2858,11 +2858,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2858
2858
|
responseIntent,
|
|
2859
2859
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2860
2860
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2861
|
-
searchRef:
|
|
2861
|
+
searchRef: _chunkK3IPGMGPjs.recentSearchRef.call(void 0, parsed.toolId),
|
|
2862
2862
|
cliInvocationId,
|
|
2863
|
-
onResponseReceived:
|
|
2863
|
+
onResponseReceived: _chunk6LHX33VNjs.recordApiResponse,
|
|
2864
2864
|
...tracing ? {
|
|
2865
|
-
onServerTiming: (serverTiming) =>
|
|
2865
|
+
onServerTiming: (serverTiming) => _chunk7PXP2FQKjs.recordCliTrace.call(void 0, {
|
|
2866
2866
|
phase: "tool_execute_server_timing",
|
|
2867
2867
|
cliInvocationId,
|
|
2868
2868
|
serverTiming,
|
|
@@ -2873,13 +2873,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2873
2873
|
let rawResponse;
|
|
2874
2874
|
let successfulCompatibilityResponse;
|
|
2875
2875
|
try {
|
|
2876
|
-
const executeResult = await
|
|
2876
|
+
const executeResult = await _chunkWNNA4L6Zjs.runToolExecuteStage.call(void 0,
|
|
2877
2877
|
"execute request",
|
|
2878
2878
|
async () => {
|
|
2879
2879
|
try {
|
|
2880
2880
|
if (tracing) {
|
|
2881
2881
|
submissionStartedAt = performance.now();
|
|
2882
|
-
|
|
2882
|
+
_chunk7PXP2FQKjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2883
2883
|
}
|
|
2884
2884
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2885
2885
|
...executeOptions,
|
|
@@ -2889,34 +2889,34 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2889
2889
|
} catch (error) {
|
|
2890
2890
|
if (!(error instanceof _chunkSQWET4SLjs.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2891
2891
|
throw error;
|
|
2892
|
-
const baseUrl =
|
|
2892
|
+
const baseUrl = _chunkHWPOXCCKjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2893
2893
|
if (maintenancePolicy !== "off") {
|
|
2894
|
-
|
|
2894
|
+
_chunkHYBZWSSHjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2895
2895
|
}
|
|
2896
|
-
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await
|
|
2896
|
+
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await _chunkWNNA4L6Zjs.runToolExecuteStage.call(void 0,
|
|
2897
2897
|
"SDK compatibility",
|
|
2898
|
-
() =>
|
|
2898
|
+
() => _chunkHYBZWSSHjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
2899
2899
|
command: "tools execute",
|
|
2900
|
-
skillsVersion:
|
|
2900
|
+
skillsVersion: _chunkHWPOXCCKjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2901
2901
|
persistCache: maintenancePolicy !== "off"
|
|
2902
2902
|
})
|
|
2903
2903
|
);
|
|
2904
2904
|
if (compatibility.error) throw compatibility.error;
|
|
2905
2905
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _46 => _46.readMetadata, 'call', _47 => _47()]), () => ( metadata));
|
|
2906
|
-
if (maintenancePolicy !== "off" && await
|
|
2906
|
+
if (maintenancePolicy !== "off" && await _chunkWNNA4L6Zjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2907
2907
|
compatibility.response,
|
|
2908
2908
|
baseUrl,
|
|
2909
2909
|
maintenancePolicy
|
|
2910
2910
|
)) {
|
|
2911
2911
|
return void 0;
|
|
2912
2912
|
}
|
|
2913
|
-
|
|
2913
|
+
_chunkHYBZWSSHjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
2914
2914
|
quietAdvisory: wantsJson
|
|
2915
2915
|
});
|
|
2916
2916
|
if (maintenancePolicy !== "off") {
|
|
2917
|
-
await
|
|
2917
|
+
await _chunkWNNA4L6Zjs.runToolExecuteStage.call(void 0,
|
|
2918
2918
|
"agent skills sync",
|
|
2919
|
-
() =>
|
|
2919
|
+
() => _chunkHYBZWSSHjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2920
2920
|
update: _optionalChain([compatibility, 'access', _48 => _48.response, 'optionalAccess', _49 => _49.skills]),
|
|
2921
2921
|
mode: "detached"
|
|
2922
2922
|
})
|
|
@@ -2925,7 +2925,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2925
2925
|
const legacyMetadata = await readMetadata();
|
|
2926
2926
|
if (tracing) {
|
|
2927
2927
|
submissionStartedAt = performance.now();
|
|
2928
|
-
|
|
2928
|
+
_chunk7PXP2FQKjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2929
2929
|
}
|
|
2930
2930
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2931
2931
|
...executeOptions,
|
|
@@ -2948,8 +2948,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2948
2948
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2949
2949
|
const updateRequiredBeforeExecution = error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2950
2950
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2951
|
-
const baseUrl =
|
|
2952
|
-
if (await
|
|
2951
|
+
const baseUrl = _chunkHWPOXCCKjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2952
|
+
if (await _chunkWNNA4L6Zjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2953
2953
|
compatibility.response,
|
|
2954
2954
|
baseUrl,
|
|
2955
2955
|
maintenancePolicy
|
|
@@ -2973,7 +2973,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2973
2973
|
}
|
|
2974
2974
|
}
|
|
2975
2975
|
if (failure instanceof _chunkSQWET4SLjs.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2976
|
-
if (wantsJson)
|
|
2976
|
+
if (wantsJson) _chunkKWGXHPHLjs.printJsonError.call(void 0, failure);
|
|
2977
2977
|
else console.error(failure.message);
|
|
2978
2978
|
return 2;
|
|
2979
2979
|
}
|
|
@@ -3000,9 +3000,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3000
3000
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
3001
3001
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _56 => _56.auto_update]);
|
|
3002
3002
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _57 => _57.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
3003
|
-
await
|
|
3003
|
+
await _chunkWNNA4L6Zjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
3004
3004
|
compatibilityResponse,
|
|
3005
|
-
|
|
3005
|
+
_chunkHWPOXCCKjs.resolveConfig.call(void 0, ).baseUrl,
|
|
3006
3006
|
maintenancePolicy
|
|
3007
3007
|
);
|
|
3008
3008
|
}
|
|
@@ -3037,7 +3037,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3037
3037
|
const { _metadata, ...execution } = rawResponse;
|
|
3038
3038
|
rawResponse = execution;
|
|
3039
3039
|
}
|
|
3040
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
3040
|
+
const { listConversion, summary, baseEnvelope } = await _chunkWNNA4L6Zjs.runToolExecuteStage.call(void 0,
|
|
3041
3041
|
"result formatting",
|
|
3042
3042
|
async () => {
|
|
3043
3043
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -3072,9 +3072,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3072
3072
|
}
|
|
3073
3073
|
skillsSyncAttempted = true;
|
|
3074
3074
|
try {
|
|
3075
|
-
await
|
|
3075
|
+
await _chunkWNNA4L6Zjs.runToolExecuteStage.call(void 0,
|
|
3076
3076
|
"agent skills sync",
|
|
3077
|
-
() =>
|
|
3077
|
+
() => _chunkHYBZWSSHjs.syncSdkSkillsIfNeeded.call(void 0, _chunkHWPOXCCKjs.resolveConfig.call(void 0, ).baseUrl, {
|
|
3078
3078
|
update: deliveredCompatibilityResponse.skills,
|
|
3079
3079
|
mode: "detached"
|
|
3080
3080
|
})
|
|
@@ -3085,15 +3085,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3085
3085
|
);
|
|
3086
3086
|
}
|
|
3087
3087
|
};
|
|
3088
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
3088
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkKWGXHPHLjs.printCommandEnvelope.call(void 0, envelope, {
|
|
3089
3089
|
...options2,
|
|
3090
3090
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
3091
3091
|
});
|
|
3092
3092
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
3093
3093
|
await syncSkillsForDeliveredOutput();
|
|
3094
|
-
|
|
3094
|
+
_chunkKWGXHPHLjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
3095
3095
|
};
|
|
3096
|
-
const delivered = await
|
|
3096
|
+
const delivered = await _chunkWNNA4L6Zjs.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
3097
3097
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
3098
3098
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
3099
3099
|
return true;
|
|
@@ -3122,7 +3122,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3122
3122
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3123
3123
|
);
|
|
3124
3124
|
if (wantsJson) {
|
|
3125
|
-
|
|
3125
|
+
_chunkKWGXHPHLjs.printJsonError.call(void 0, error);
|
|
3126
3126
|
} else {
|
|
3127
3127
|
console.error(error.message);
|
|
3128
3128
|
}
|
|
@@ -3217,13 +3217,13 @@ inspect: ${inspection.inspect}
|
|
|
3217
3217
|
return true;
|
|
3218
3218
|
});
|
|
3219
3219
|
if (delivered) {
|
|
3220
|
-
await
|
|
3220
|
+
await _chunkWNNA4L6Zjs.runToolExecuteStage.call(void 0,
|
|
3221
3221
|
"acknowledge delivery",
|
|
3222
3222
|
() => recovery.acknowledgeDelivery()
|
|
3223
3223
|
);
|
|
3224
3224
|
}
|
|
3225
3225
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3226
|
-
|
|
3226
|
+
_chunkHYBZWSSHjs.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3227
3227
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _60 => _60.auto_update, 'optionalAccess', _61 => _61.should_auto_update]) === true
|
|
3228
3228
|
});
|
|
3229
3229
|
}
|