deepline 0.3.475 → 0.3.477
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/play.ts +2 -2
- package/dist/bundling-sources/sdk/src/release.ts +3 -3
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +19 -6
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +4 -4
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +33 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +90 -1
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +21 -4
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-capacity-policy.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-compute-usage.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +8 -6
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +167 -7
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +104 -6
- package/dist/bundling-sources/shared_libs/play-runtime/worker-api-types.ts +42 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +1 -1
- package/dist/cli/auth-QITP34OX.js +41 -0
- package/dist/cli/{auth-CFDYJ7FZ.mjs → auth-XVXRRWIQ.mjs} +5 -5
- package/dist/cli/{billing-XLIL3FLK.js → billing-2H7GFJDT.js} +79 -79
- package/dist/cli/{billing-PEXWWLRT.mjs → billing-EOPUJ4JI.mjs} +6 -6
- package/dist/cli/{chunk-TLPW2SHS.js → chunk-23EEVP5W.js} +6 -6
- package/dist/cli/{chunk-ZQYBKDPA.js → chunk-255O6APS.js} +2 -2
- package/dist/cli/{chunk-D6SXN34W.mjs → chunk-2GZFIWSA.mjs} +4 -4
- package/dist/cli/{chunk-M7K5BCWP.js → chunk-2QT6KN54.js} +10 -10
- package/dist/cli/{chunk-MUDOASYL.mjs → chunk-2YNLW43I.mjs} +2 -2
- package/dist/cli/{chunk-BSK2TGB4.js → chunk-347EE4YE.js} +8 -8
- package/dist/cli/{chunk-V4ILQ2DS.mjs → chunk-3A7TDUZV.mjs} +1 -1
- package/dist/cli/{chunk-G4SGYWKV.js → chunk-3UKKM6OS.js} +6 -6
- package/dist/cli/{chunk-NBVYS6VG.js → chunk-3W6E3WVU.js} +9 -9
- package/dist/cli/{chunk-F4FNMXI3.js → chunk-4RAENEAX.js} +53 -53
- package/dist/cli/{chunk-42F6LTBJ.mjs → chunk-6IJJCRE5.mjs} +3 -3
- package/dist/cli/{chunk-CKSRTD45.js → chunk-6KKDIISC.js} +3 -3
- package/dist/cli/{chunk-7SWRXZ4A.js → chunk-75NLWBYQ.js} +93 -93
- package/dist/cli/{chunk-KTWXY73Q.js → chunk-7CILZKLE.js} +5 -5
- package/dist/cli/{chunk-B7NJ5JQ2.js → chunk-ACDXGOXE.js} +4 -4
- package/dist/cli/{chunk-FC4C7MZM.mjs → chunk-C2AN2HTB.mjs} +4 -4
- package/dist/cli/{chunk-EA45HSEC.mjs → chunk-C2V2HQDW.mjs} +2 -2
- package/dist/cli/{chunk-YMS7VYFA.mjs → chunk-C46DWB56.mjs} +1 -1
- package/dist/cli/{chunk-3MQJJ6YX.js → chunk-CH4VMDB5.js} +51 -51
- package/dist/cli/{chunk-7U3L2S7X.mjs → chunk-DFKHXZQ7.mjs} +10 -10
- package/dist/cli/{chunk-VBGPRRJ6.js → chunk-DMWHEYZM.js} +2 -2
- package/dist/cli/{chunk-3WVA7E7O.mjs → chunk-DS3DZUES.mjs} +2 -2
- package/dist/cli/{chunk-Z5VSBCFV.js → chunk-E2CUSH56.js} +16 -16
- package/dist/cli/{chunk-AD7KL6AI.mjs → chunk-ISEUOYCB.mjs} +97 -12
- package/dist/cli/{chunk-VFP3MFLD.mjs → chunk-JS4UO6G4.mjs} +1 -1
- package/dist/cli/{chunk-HMHH7JQD.mjs → chunk-KMXBZIKO.mjs} +2 -2
- package/dist/cli/{chunk-M4QO3GRD.js → chunk-KWQNNPMH.js} +3 -3
- package/dist/cli/{chunk-3QSFSHCJ.mjs → chunk-LJYTYNQZ.mjs} +1 -1
- package/dist/cli/{chunk-TZRTT7EI.js → chunk-LXKGZKTL.js} +26 -26
- package/dist/cli/{chunk-U3F63UWD.js → chunk-M2UL4ZS5.js} +7 -7
- package/dist/cli/{chunk-DKR7QPEO.js → chunk-MZSLFWOT.js} +1 -1
- package/dist/cli/{chunk-BLW2K6YH.js → chunk-NC52JG66.js} +3 -3
- package/dist/cli/{chunk-HALAYT3Y.mjs → chunk-NJMYX2TP.mjs} +3 -3
- package/dist/cli/{chunk-NHQP4UPJ.mjs → chunk-NO7ZC2GV.mjs} +5 -5
- package/dist/cli/{chunk-YAAQNDP6.mjs → chunk-PQQNMMWM.mjs} +3 -3
- package/dist/cli/{chunk-BVAYLXMH.mjs → chunk-QODW5ILA.mjs} +2 -2
- package/dist/cli/{chunk-QKMWQTMI.js → chunk-R5FNCFEK.js} +3 -3
- package/dist/cli/{chunk-7XTBEYLS.js → chunk-RGNMMDSJ.js} +131 -46
- package/dist/cli/{chunk-6PRYHABU.mjs → chunk-RHIFH3GD.mjs} +1 -1
- package/dist/cli/{chunk-4QHAP3MR.mjs → chunk-RLCAECZH.mjs} +5 -5
- package/dist/cli/{chunk-DIMKSDF6.mjs → chunk-SG2SZQ4K.mjs} +2 -2
- package/dist/cli/{chunk-VTCXSICG.mjs → chunk-SVU2VR6Q.mjs} +2 -2
- package/dist/cli/{chunk-D3Q4FUFS.js → chunk-THMGJOR4.js} +8 -8
- package/dist/cli/{chunk-4QHQ3WYW.js → chunk-UBNS6GSV.js} +21 -21
- package/dist/cli/{chunk-DUGZKPRK.mjs → chunk-UYA7LJGC.mjs} +2 -2
- package/dist/cli/{chunk-5QS4T4KR.js → chunk-WFVEMDQL.js} +2 -2
- package/dist/cli/{chunk-M27SSAQ7.mjs → chunk-WRHLAAGN.mjs} +1 -1
- package/dist/cli/{chunk-VD3E3QMI.mjs → chunk-XQLYPHYW.mjs} +1 -1
- package/dist/cli/{chunk-NGOKBSBH.mjs → chunk-YZA5UJXM.mjs} +1 -1
- package/dist/cli/{chunk-ZANUM4XV.js → chunk-ZDPL5AIK.js} +5 -5
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-4YHSYV2C.js → csv-ECB7TYR2.js} +13 -13
- package/dist/cli/{csv-WC7ILC7P.mjs → csv-IDRPTSSC.mjs} +4 -4
- package/dist/cli/{db-I5PV6NTC.mjs → db-FOBZD44N.mjs} +6 -6
- package/dist/cli/{db-APZNM2GI.js → db-S74XZZ77.js} +27 -27
- package/dist/cli/{describe-XH5F3X5W.mjs → describe-KMTPPI2J.mjs} +17 -17
- package/dist/cli/describe-PI7HCT7K.js +48 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-PIY4XM7T.mjs → executions-4JAIVE2E.mjs} +6 -6
- package/dist/cli/{executions-VIXFKZYU.js → executions-ZE3JMNA4.js} +8 -8
- package/dist/cli/{feedback-IGDHBWGT.mjs → feedback-EUX5PDBA.mjs} +4 -4
- package/dist/cli/{feedback-WCLIFQTR.js → feedback-W6VA47A3.js} +8 -8
- package/dist/cli/git-NDOGCQZY.js +25 -0
- package/dist/cli/{git-FRICPPTA.mjs → git-UOVG4PLH.mjs} +5 -5
- package/dist/cli/index.js +139 -139
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-DSFOPYDY.js → legacy-noops-3H35EH5Y.js} +8 -8
- package/dist/cli/{legacy-noops-ROAXEG6D.mjs → legacy-noops-ZBWUNFWV.mjs} +5 -5
- package/dist/cli/{monitors-FZ5PRLW6.mjs → monitors-AYSGSUAK.mjs} +7 -7
- package/dist/cli/{monitors-KUCYQLU5.js → monitors-PI3KPLR2.js} +91 -91
- package/dist/cli/{org-DRNND5XU.mjs → org-2BIG7U4V.mjs} +6 -6
- package/dist/cli/{org-SRHMWKQR.js → org-MVS3Y6BK.js} +72 -72
- package/dist/cli/{pages-XNGA356T.mjs → pages-4TRRL24G.mjs} +6 -6
- package/dist/cli/{pages-TEJQIHTU.js → pages-VB6FOVDE.js} +17 -17
- package/dist/cli/{play-GCGFQSFP.js → play-BLT6IT2O.js} +340 -323
- package/dist/cli/{play-NE45ROIZ.mjs → play-JR3VUOZM.mjs} +37 -20
- package/dist/cli/{providers-57TJOSMV.mjs → providers-547DPK4S.mjs} +6 -6
- package/dist/cli/{providers-VHMUR63R.js → providers-BBXIAGW4.js} +9 -9
- package/dist/cli/{quickstart-K3SH4NXP.mjs → quickstart-NTLXD7HS.mjs} +4 -4
- package/dist/cli/{quickstart-BPXWO4UD.js → quickstart-RNPI5B6J.js} +6 -6
- package/dist/cli/{run-553AAXDU.js → run-BCCEXBOG.js} +36 -36
- package/dist/cli/{run-ZRWJUEN2.mjs → run-QZ4SFECD.mjs} +22 -22
- package/dist/cli/{search-BW6XRS4I.mjs → search-PYNELH4C.mjs} +7 -7
- package/dist/cli/search-YHEICYQL.js +32 -0
- package/dist/cli/{secrets-OYYCFGZE.mjs → secrets-O5WGREQ7.mjs} +6 -6
- package/dist/cli/{secrets-AMYQYUL5.js → secrets-VD35LMYJ.js} +15 -15
- package/dist/cli/{sessions-O4SVVOMO.mjs → sessions-2TL6Z5J5.mjs} +5 -5
- package/dist/cli/{sessions-RYCJUMJ2.js → sessions-NGGIBYXF.js} +6 -6
- package/dist/cli/{settings-QK7DHDU7.mjs → settings-6KM74AJT.mjs} +11 -11
- package/dist/cli/{settings-7R5FQKII.js → settings-ERFNZRHO.js} +78 -78
- package/dist/cli/{setup-OTQDQHDN.js → setup-6X7EJ6RG.js} +44 -44
- package/dist/cli/{setup-VDAAVCKK.mjs → setup-Y3BN6XRS.mjs} +9 -9
- package/dist/cli/skills-F7MPYC4P.js +33 -0
- package/dist/cli/{skills-HRK5O5JO.mjs → skills-OUBQASHI.mjs} +9 -7
- package/dist/cli/{tools-O7BM62QV.mjs → tools-EELZ5FF5.mjs} +16 -16
- package/dist/cli/tools-MCWDAK53.js +55 -0
- package/dist/cli/update-G5BRJOVT.js +33 -0
- package/dist/cli/{update-UHKHCSTY.mjs → update-TX7SW32Y.mjs} +9 -9
- package/dist/cli/{workflow-7Z5NCTGG.js → workflow-5AI2BJA7.js} +17 -17
- package/dist/cli/{workflow-T2EDR7L4.mjs → workflow-PUNQG7LG.mjs} +7 -7
- package/dist/{client-Bgl0_zXi.d.mts → client-AjmfA5nR.d.mts} +1 -1
- package/dist/{client-_ah6IuhK.d.ts → client-DMyY-QL8.d.ts} +1 -1
- package/dist/{client-core-C-ZF5vh9.d.ts → client-core-C705vFyV.d.ts} +1 -1
- package/dist/{client-core-Bfsedm0_.d.mts → client-core-CpBbvLEX.d.mts} +1 -1
- package/dist/{compiler-manifest-CCOqDGjU.d.mts → compiler-manifest-hqIAukR0.d.mts} +1 -1
- package/dist/{compiler-manifest-CCOqDGjU.d.ts → compiler-manifest-hqIAukR0.d.ts} +1 -1
- package/dist/{errors-Cy3kPnsi.d.ts → errors-CRO2qQ6k.d.ts} +1 -1
- package/dist/{errors-BLccD7tG.d.mts → errors-DIHVetNY.d.mts} +1 -1
- package/dist/{index-D5e4h1-H.d.ts → index-B8DVoeYt.d.ts} +1 -1
- package/dist/{index-4-j44HuT.d.mts → index-DVZ_X4Gb.d.mts} +1 -1
- package/dist/index.d.mts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +110 -110
- 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 +1 -1
- 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 +3 -3
- package/dist/release.d.ts +3 -3
- 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-7GVCW24N.js +0 -41
- package/dist/cli/describe-OR7FZBCD.js +0 -48
- package/dist/cli/git-CKN2F32Y.js +0 -25
- package/dist/cli/search-WF26AUDJ.js +0 -32
- package/dist/cli/skills-VNLMEOXW.js +0 -31
- package/dist/cli/tools-C3MUHL7G.js +0 -55
- package/dist/cli/update-TCKTU6QJ.js +0 -33
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkR5FNCFEKjs = require('./chunk-R5FNCFEK.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkTHMGJOR4js = require('./chunk-THMGJOR4.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -48,10 +48,10 @@ var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
|
|
|
48
48
|
var _chunkHGFFYVXNjs = require('./chunk-HGFFYVXN.js');
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
var
|
|
51
|
+
var _chunk7CILZKLEjs = require('./chunk-7CILZKLE.js');
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
var
|
|
54
|
+
var _chunk3UKKM6OSjs = require('./chunk-3UKKM6OS.js');
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
|
|
@@ -61,18 +61,18 @@ var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
var
|
|
64
|
+
var _chunkUBNS6GSVjs = require('./chunk-UBNS6GSV.js');
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
var
|
|
69
|
+
var _chunkDMWHEYZMjs = require('./chunk-DMWHEYZM.js');
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
var
|
|
75
|
+
var _chunk4RAENEAXjs = require('./chunk-4RAENEAX.js');
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
@@ -80,12 +80,12 @@ var _chunkF4FNMXI3js = require('./chunk-F4FNMXI3.js');
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
var
|
|
83
|
+
var _chunkM2UL4ZS5js = require('./chunk-M2UL4ZS5.js');
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
var
|
|
88
|
+
var _chunkNC52JG66js = require('./chunk-NC52JG66.js');
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
@@ -191,10 +191,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
191
191
|
}
|
|
192
192
|
};
|
|
193
193
|
function pendingToolExecutionPath(input) {
|
|
194
|
-
const config =
|
|
194
|
+
const config = _chunkNC52JG66js.resolveConfig.call(void 0, );
|
|
195
195
|
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");
|
|
196
196
|
return _path.join.call(void 0,
|
|
197
|
-
|
|
197
|
+
_chunkNC52JG66js.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
198
198
|
`${PENDING_PREFIX}${fingerprint}.json`
|
|
199
199
|
);
|
|
200
200
|
}
|
|
@@ -507,13 +507,13 @@ function categoryEnumerationRender(summaries) {
|
|
|
507
507
|
};
|
|
508
508
|
}
|
|
509
509
|
async function listToolCategories(emitJson, compact) {
|
|
510
|
-
const client = new (0,
|
|
510
|
+
const client = new (0, _chunk7CILZKLEjs.DeeplineClient)();
|
|
511
511
|
if (!emitJson) {
|
|
512
512
|
const summaries2 = (await client.listToolCategories()).map((category) => ({
|
|
513
513
|
...category,
|
|
514
514
|
description: describeToolCategory(category.name)
|
|
515
515
|
}));
|
|
516
|
-
|
|
516
|
+
_chunkM2UL4ZS5js.printCommandEnvelope.call(void 0,
|
|
517
517
|
{ categories: summaries2, render: categoryEnumerationRender(summaries2) },
|
|
518
518
|
{ json: false }
|
|
519
519
|
);
|
|
@@ -523,7 +523,7 @@ async function listToolCategories(emitJson, compact) {
|
|
|
523
523
|
const items = rawTools.map(toListedTool);
|
|
524
524
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
525
525
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
526
|
-
|
|
526
|
+
_chunkM2UL4ZS5js.printCommandEnvelope.call(void 0,
|
|
527
527
|
{
|
|
528
528
|
tools: outputItems,
|
|
529
529
|
count: outputItems.length,
|
|
@@ -542,7 +542,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
542
542
|
const known = summaries.map((item) => item.name);
|
|
543
543
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
544
544
|
if (emitJson) {
|
|
545
|
-
|
|
545
|
+
_chunkM2UL4ZS5js.printJson.call(void 0, {
|
|
546
546
|
ok: false,
|
|
547
547
|
exitCode: 4,
|
|
548
548
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -556,13 +556,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
556
556
|
const render = categoryEnumerationRender(summaries);
|
|
557
557
|
console.error(message);
|
|
558
558
|
console.error("");
|
|
559
|
-
console.error(
|
|
559
|
+
console.error(_chunkM2UL4ZS5js.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
560
560
|
console.error("");
|
|
561
561
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
562
562
|
return 4;
|
|
563
563
|
}
|
|
564
564
|
async function listToolsInCategory(category, emitJson) {
|
|
565
|
-
const client = new (0,
|
|
565
|
+
const client = new (0, _chunk7CILZKLEjs.DeeplineClient)();
|
|
566
566
|
const { tools: rawTools, categories } = await client.listToolsInCategory(category);
|
|
567
567
|
const summaries = categories.map((item) => ({
|
|
568
568
|
...item,
|
|
@@ -598,7 +598,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
598
598
|
}
|
|
599
599
|
]
|
|
600
600
|
};
|
|
601
|
-
|
|
601
|
+
_chunkM2UL4ZS5js.printCommandEnvelope.call(void 0,
|
|
602
602
|
{
|
|
603
603
|
category,
|
|
604
604
|
total: rows.length,
|
|
@@ -611,7 +611,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
611
611
|
return 0;
|
|
612
612
|
}
|
|
613
613
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
614
|
-
const client = new (0,
|
|
614
|
+
const client = new (0, _chunk7CILZKLEjs.DeeplineClient)();
|
|
615
615
|
const items = (await client.listTools({
|
|
616
616
|
categories: requestedCategories.join(","),
|
|
617
617
|
compact
|
|
@@ -640,7 +640,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
640
640
|
]
|
|
641
641
|
};
|
|
642
642
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
643
|
-
|
|
643
|
+
_chunkM2UL4ZS5js.printCommandEnvelope.call(void 0,
|
|
644
644
|
{
|
|
645
645
|
tools: outputItems,
|
|
646
646
|
count: outputItems.length,
|
|
@@ -659,13 +659,13 @@ async function listTools(category, options = {}) {
|
|
|
659
659
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]), () => ( ""));
|
|
660
660
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
661
661
|
const compact = options.compact !== false;
|
|
662
|
-
const emitJson = options.json === true ||
|
|
662
|
+
const emitJson = options.json === true || _chunkM2UL4ZS5js.shouldEmitJson.call(void 0, );
|
|
663
663
|
if (positional && flagCategories.length > 0) {
|
|
664
664
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
665
665
|
if (!flagIsSameSingle) {
|
|
666
666
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
667
667
|
if (emitJson) {
|
|
668
|
-
|
|
668
|
+
_chunkM2UL4ZS5js.printJson.call(void 0, {
|
|
669
669
|
ok: false,
|
|
670
670
|
exitCode: 2,
|
|
671
671
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -692,7 +692,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
692
692
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
693
693
|
return 1;
|
|
694
694
|
}
|
|
695
|
-
const client = new (0,
|
|
695
|
+
const client = new (0, _chunk7CILZKLEjs.DeeplineClient)();
|
|
696
696
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
697
697
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
698
698
|
const jsonOutput = options.json === true;
|
|
@@ -716,7 +716,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
716
716
|
query,
|
|
717
717
|
mode
|
|
718
718
|
}) : null;
|
|
719
|
-
|
|
719
|
+
_chunkM2UL4ZS5js.printCommandEnvelope.call(void 0,
|
|
720
720
|
{
|
|
721
721
|
tools: outputTools,
|
|
722
722
|
count: outputTools.length,
|
|
@@ -734,7 +734,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
734
734
|
} : {},
|
|
735
735
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
736
736
|
},
|
|
737
|
-
{ json: options.json ||
|
|
737
|
+
{ json: options.json || _chunkM2UL4ZS5js.shouldEmitJson.call(void 0, ) }
|
|
738
738
|
);
|
|
739
739
|
return 0;
|
|
740
740
|
}
|
|
@@ -845,7 +845,7 @@ Output:
|
|
|
845
845
|
if (options.preset !== void 0 && (options.scopes !== void 0 || options.optionalScopes !== void 0))
|
|
846
846
|
throw new Error("Use --preset or individual scopes, not both.");
|
|
847
847
|
const splitScopes = (value) => value.split(",").map((scope) => scope.trim()).filter(Boolean);
|
|
848
|
-
const result2 = await new (0,
|
|
848
|
+
const result2 = await new (0, _chunk7CILZKLEjs.DeeplineClient)().startIntegrationOAuth(
|
|
849
849
|
provider,
|
|
850
850
|
{
|
|
851
851
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
@@ -857,7 +857,7 @@ Output:
|
|
|
857
857
|
throw new Error(
|
|
858
858
|
"The API did not return an OAuth authorization URL."
|
|
859
859
|
);
|
|
860
|
-
if (
|
|
860
|
+
if (_chunkM2UL4ZS5js.shouldEmitJson.call(void 0, options.json))
|
|
861
861
|
console.log(
|
|
862
862
|
JSON.stringify({ provider, redirect_url: result2.redirect_url })
|
|
863
863
|
);
|
|
@@ -883,7 +883,7 @@ Output:
|
|
|
883
883
|
"--credentials-file must contain a nonempty JSON object of string credential values."
|
|
884
884
|
);
|
|
885
885
|
}
|
|
886
|
-
const result = await new (0,
|
|
886
|
+
const result = await new (0, _chunk7CILZKLEjs.DeeplineClient)().setIntegrationCredentials(
|
|
887
887
|
provider,
|
|
888
888
|
credentials
|
|
889
889
|
);
|
|
@@ -893,7 +893,7 @@ Output:
|
|
|
893
893
|
);
|
|
894
894
|
}
|
|
895
895
|
const confirmation = { provider, credential_saved: true };
|
|
896
|
-
if (
|
|
896
|
+
if (_chunkM2UL4ZS5js.shouldEmitJson.call(void 0, options.json))
|
|
897
897
|
console.log(JSON.stringify(confirmation));
|
|
898
898
|
else
|
|
899
899
|
console.log(
|
|
@@ -933,7 +933,7 @@ Examples:
|
|
|
933
933
|
json: Boolean(options.json)
|
|
934
934
|
});
|
|
935
935
|
});
|
|
936
|
-
|
|
936
|
+
_chunkTHMGJOR4js.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
937
937
|
tools.command("grep <query>").description(
|
|
938
938
|
"Regex grep over tool ids, descriptions, categories, and input fields."
|
|
939
939
|
).addHelpText(
|
|
@@ -968,7 +968,7 @@ Examples:
|
|
|
968
968
|
});
|
|
969
969
|
const addToolMetadataCommand = (command) => {
|
|
970
970
|
let compatibilityMetadata;
|
|
971
|
-
|
|
971
|
+
_chunkUBNS6GSVjs.registerCompatibilityCatalog.call(void 0, command, () => ({
|
|
972
972
|
toolId: command.args[0],
|
|
973
973
|
acceptMetadata: (metadata) => {
|
|
974
974
|
compatibilityMetadata = metadata;
|
|
@@ -1038,7 +1038,7 @@ Examples:
|
|
|
1038
1038
|
process.exitCode = await narrowView();
|
|
1039
1039
|
return;
|
|
1040
1040
|
}
|
|
1041
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
1041
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-PI7HCT7K.js")));
|
|
1042
1042
|
process.exitCode = await describeAnything(
|
|
1043
1043
|
toolId,
|
|
1044
1044
|
{
|
|
@@ -1053,7 +1053,7 @@ Examples:
|
|
|
1053
1053
|
});
|
|
1054
1054
|
};
|
|
1055
1055
|
addToolMetadataCommand(
|
|
1056
|
-
|
|
1056
|
+
_chunkR5FNCFEKjs.addDescribeOptions.call(void 0,
|
|
1057
1057
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
1058
1058
|
{ json: false }
|
|
1059
1059
|
)
|
|
@@ -1122,7 +1122,7 @@ Examples:
|
|
|
1122
1122
|
options,
|
|
1123
1123
|
void 0,
|
|
1124
1124
|
true,
|
|
1125
|
-
|
|
1125
|
+
_chunkDMWHEYZMjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
1126
1126
|
);
|
|
1127
1127
|
}
|
|
1128
1128
|
);
|
|
@@ -1130,13 +1130,13 @@ Examples:
|
|
|
1130
1130
|
function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
1131
1131
|
let metadata;
|
|
1132
1132
|
const startedAt = performance.now();
|
|
1133
|
-
const baseUrl =
|
|
1134
|
-
|
|
1135
|
-
const result =
|
|
1133
|
+
const baseUrl = _chunkNC52JG66js.resolveConfig.call(void 0, ).baseUrl;
|
|
1134
|
+
_chunkDMWHEYZMjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1135
|
+
const result = _chunkUBNS6GSVjs.runToolExecuteStage.call(void 0,
|
|
1136
1136
|
"SDK compatibility",
|
|
1137
|
-
() =>
|
|
1137
|
+
() => _chunk4RAENEAXjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1138
1138
|
command: "tools execute",
|
|
1139
|
-
skillsVersion:
|
|
1139
|
+
skillsVersion: _chunkNC52JG66js.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
1140
1140
|
persistCache: false,
|
|
1141
1141
|
timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
|
|
1142
1142
|
catalog: {
|
|
@@ -1150,7 +1150,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1150
1150
|
})
|
|
1151
1151
|
).then(
|
|
1152
1152
|
(compatibility) => {
|
|
1153
|
-
|
|
1153
|
+
_chunkDMWHEYZMjs.recordCliTrace.call(void 0, {
|
|
1154
1154
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1155
1155
|
ms: performance.now() - startedAt,
|
|
1156
1156
|
ok: compatibility.error === null,
|
|
@@ -1159,7 +1159,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1159
1159
|
return compatibility;
|
|
1160
1160
|
},
|
|
1161
1161
|
(error) => {
|
|
1162
|
-
|
|
1162
|
+
_chunkDMWHEYZMjs.recordCliTrace.call(void 0, {
|
|
1163
1163
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1164
1164
|
ms: performance.now() - startedAt,
|
|
1165
1165
|
ok: false
|
|
@@ -1174,7 +1174,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1174
1174
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1175
1175
|
return 1;
|
|
1176
1176
|
}
|
|
1177
|
-
const client = new (0,
|
|
1177
|
+
const client = new (0, _chunk7CILZKLEjs.DeeplineClient)();
|
|
1178
1178
|
let tool;
|
|
1179
1179
|
try {
|
|
1180
1180
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1228,7 +1228,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1228
1228
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1229
1229
|
if (inferenceQuote)
|
|
1230
1230
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1231
|
-
|
|
1231
|
+
_chunkM2UL4ZS5js.printCommandEnvelope.call(void 0,
|
|
1232
1232
|
{
|
|
1233
1233
|
toolId: String(tool.toolId || toolId),
|
|
1234
1234
|
cost: _chunkZM2YPJQJjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
@@ -1251,7 +1251,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1251
1251
|
void 0,
|
|
1252
1252
|
seedToolListScript
|
|
1253
1253
|
);
|
|
1254
|
-
|
|
1254
|
+
_chunkM2UL4ZS5js.printCompactJson.call(void 0, {
|
|
1255
1255
|
toolId: contract.toolId,
|
|
1256
1256
|
...options.schemaOnly ? {
|
|
1257
1257
|
inputSchema: contract.inputSchema,
|
|
@@ -1274,7 +1274,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1274
1274
|
return 0;
|
|
1275
1275
|
}
|
|
1276
1276
|
if (options.contractJson) {
|
|
1277
|
-
|
|
1277
|
+
_chunkM2UL4ZS5js.printCompactJson.call(void 0, {
|
|
1278
1278
|
..._chunk4IOY2SCQjs.toolContractJsonForDescribe.call(void 0,
|
|
1279
1279
|
tool,
|
|
1280
1280
|
toolId,
|
|
@@ -1288,7 +1288,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
const emitJson = options.json === true;
|
|
1290
1290
|
if (emitJson) {
|
|
1291
|
-
|
|
1291
|
+
_chunkM2UL4ZS5js.printCompactJson.call(void 0, {
|
|
1292
1292
|
..._chunk4IOY2SCQjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
|
|
1293
1293
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1294
1294
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -2148,7 +2148,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2148
2148
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2149
2149
|
}
|
|
2150
2150
|
if (options.idempotencyKey !== void 0) {
|
|
2151
|
-
|
|
2151
|
+
_chunk3UKKM6OSjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2152
2152
|
}
|
|
2153
2153
|
if (options.recoveryTimeoutMs !== void 0) {
|
|
2154
2154
|
const parsed = Number(options.recoveryTimeoutMs);
|
|
@@ -2514,7 +2514,7 @@ function writeToolReceipt(input) {
|
|
|
2514
2514
|
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;
|
|
2515
2515
|
const status = typeof envelope.status === "string" ? envelope.status : "completed";
|
|
2516
2516
|
const charged = _chunk4IOY2SCQjs.recordField.call(void 0, envelope, "billing").credits_charged;
|
|
2517
|
-
|
|
2517
|
+
_chunkR5FNCFEKjs.writeExecutionOutput.call(void 0,
|
|
2518
2518
|
{
|
|
2519
2519
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2520
2520
|
status,
|
|
@@ -2545,8 +2545,8 @@ async function executeToolForReceipt(input) {
|
|
|
2545
2545
|
let retryKey = null;
|
|
2546
2546
|
let received = false;
|
|
2547
2547
|
try {
|
|
2548
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2549
|
-
const client = new (0,
|
|
2548
|
+
const cliInvocationId = _nullishCoalesce(_chunkUBNS6GSVjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkUBNS6GSVjs.beginToolExecuteCommand.call(void 0, )));
|
|
2549
|
+
const client = new (0, _chunk7CILZKLEjs.DeeplineClient)();
|
|
2550
2550
|
const metadata = await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })));
|
|
2551
2551
|
printToolExecutionWarnings(toolId, params, metadata);
|
|
2552
2552
|
const responseIntent = _optionalChain([output, 'access', _33 => _33.csvOut, 'optionalAccess', _34 => _34.length]) ? "row_artifact" : "raw";
|
|
@@ -2564,9 +2564,9 @@ async function executeToolForReceipt(input) {
|
|
|
2564
2564
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2565
2565
|
..._optionalChain([metadata, 'access', _35 => _35.executionMetadata, 'optionalAccess', _36 => _36.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2566
2566
|
...key ? { idempotencyKey: key } : {},
|
|
2567
|
-
searchRef:
|
|
2567
|
+
searchRef: _chunkTHMGJOR4js.recentSearchRef.call(void 0, ),
|
|
2568
2568
|
cliInvocationId,
|
|
2569
|
-
onResponseReceived:
|
|
2569
|
+
onResponseReceived: _chunkR5FNCFEKjs.recordApiResponse
|
|
2570
2570
|
}).catch((error) => {
|
|
2571
2571
|
const guidance = toolGuidanceLines(metadata.guidance);
|
|
2572
2572
|
if (guidance.length)
|
|
@@ -2589,7 +2589,7 @@ async function executeToolForReceipt(input) {
|
|
|
2589
2589
|
if (received) throw error;
|
|
2590
2590
|
const outcomeKnown = answeredWithFailure(error);
|
|
2591
2591
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _37 => _37.discard, 'call', _38 => _38()]);
|
|
2592
|
-
|
|
2592
|
+
_chunkR5FNCFEKjs.writeExecutionOutput.call(void 0,
|
|
2593
2593
|
{
|
|
2594
2594
|
id: outcomeKnown ? null : key,
|
|
2595
2595
|
status: "failed",
|
|
@@ -2613,11 +2613,11 @@ function answeredWithFailure(error) {
|
|
|
2613
2613
|
error.statusCode !== 408 && error.code !== "EXECUTION_OUTCOME_UNKNOWN";
|
|
2614
2614
|
}
|
|
2615
2615
|
async function getToolExecutionReceipt(key, output) {
|
|
2616
|
-
const client = new (0,
|
|
2616
|
+
const client = new (0, _chunk7CILZKLEjs.DeeplineClient)();
|
|
2617
2617
|
const execution = await client.executions.getByKey(key);
|
|
2618
2618
|
output.label = `${execution.toolId} (tool)`;
|
|
2619
2619
|
if (execution.response === void 0) {
|
|
2620
|
-
|
|
2620
|
+
_chunkR5FNCFEKjs.writeExecutionOutput.call(void 0,
|
|
2621
2621
|
{
|
|
2622
2622
|
id: key,
|
|
2623
2623
|
status: execution.executionRecovery.state,
|
|
@@ -2643,19 +2643,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2643
2643
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2644
2644
|
} catch (error) {
|
|
2645
2645
|
if (wantsJson) {
|
|
2646
|
-
|
|
2646
|
+
_chunkM2UL4ZS5js.printJsonError.call(void 0, error);
|
|
2647
2647
|
} else {
|
|
2648
2648
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2649
2649
|
}
|
|
2650
2650
|
return error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2651
2651
|
}
|
|
2652
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2652
|
+
const cliInvocationId = _nullishCoalesce(_chunkUBNS6GSVjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkUBNS6GSVjs.beginToolExecuteCommand.call(void 0, )));
|
|
2653
2653
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2654
|
-
const tracing =
|
|
2654
|
+
const tracing = _chunkDMWHEYZMjs.isCliTraceEnabled.call(void 0, );
|
|
2655
2655
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2656
|
-
const client = new (0,
|
|
2656
|
+
const client = new (0, _chunk7CILZKLEjs.DeeplineClient)();
|
|
2657
2657
|
if (clientStartedAt !== void 0) {
|
|
2658
|
-
|
|
2658
|
+
_chunkDMWHEYZMjs.recordCliTrace.call(void 0, {
|
|
2659
2659
|
phase: "cli.tool_execute_client_setup",
|
|
2660
2660
|
ms: performance.now() - clientStartedAt
|
|
2661
2661
|
});
|
|
@@ -2664,13 +2664,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2664
2664
|
const readMetadata = async () => {
|
|
2665
2665
|
if (metadata) return metadata;
|
|
2666
2666
|
try {
|
|
2667
|
-
metadata = await
|
|
2667
|
+
metadata = await _chunkUBNS6GSVjs.runToolExecuteStage.call(void 0,
|
|
2668
2668
|
"tool metadata lookup",
|
|
2669
2669
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2670
2670
|
);
|
|
2671
2671
|
} catch (error) {
|
|
2672
2672
|
if (isMissingToolMetadataError(error)) {
|
|
2673
|
-
const play = await
|
|
2673
|
+
const play = await _chunkUBNS6GSVjs.runToolExecuteStage.call(void 0,
|
|
2674
2674
|
"play alias lookup",
|
|
2675
2675
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2676
2676
|
);
|
|
@@ -2709,7 +2709,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2709
2709
|
metadata = await readMetadata();
|
|
2710
2710
|
} catch (error) {
|
|
2711
2711
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2712
|
-
if (wantsJson)
|
|
2712
|
+
if (wantsJson) _chunkM2UL4ZS5js.printJsonError.call(void 0, error);
|
|
2713
2713
|
else console.error(error.message);
|
|
2714
2714
|
return 2;
|
|
2715
2715
|
}
|
|
@@ -2725,7 +2725,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2725
2725
|
metadata = await readMetadata();
|
|
2726
2726
|
} catch (error) {
|
|
2727
2727
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2728
|
-
if (wantsJson)
|
|
2728
|
+
if (wantsJson) _chunkM2UL4ZS5js.printJsonError.call(void 0, error);
|
|
2729
2729
|
else console.error(error.message);
|
|
2730
2730
|
return 2;
|
|
2731
2731
|
}
|
|
@@ -2751,11 +2751,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2751
2751
|
responseIntent,
|
|
2752
2752
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2753
2753
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2754
|
-
searchRef:
|
|
2754
|
+
searchRef: _chunkTHMGJOR4js.recentSearchRef.call(void 0, ),
|
|
2755
2755
|
cliInvocationId,
|
|
2756
|
-
onResponseReceived:
|
|
2756
|
+
onResponseReceived: _chunkR5FNCFEKjs.recordApiResponse,
|
|
2757
2757
|
...tracing ? {
|
|
2758
|
-
onServerTiming: (serverTiming) =>
|
|
2758
|
+
onServerTiming: (serverTiming) => _chunkDMWHEYZMjs.recordCliTrace.call(void 0, {
|
|
2759
2759
|
phase: "tool_execute_server_timing",
|
|
2760
2760
|
cliInvocationId,
|
|
2761
2761
|
serverTiming,
|
|
@@ -2766,13 +2766,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2766
2766
|
let rawResponse;
|
|
2767
2767
|
let successfulCompatibilityResponse;
|
|
2768
2768
|
try {
|
|
2769
|
-
const executeResult = await
|
|
2769
|
+
const executeResult = await _chunkUBNS6GSVjs.runToolExecuteStage.call(void 0,
|
|
2770
2770
|
"execute request",
|
|
2771
2771
|
async () => {
|
|
2772
2772
|
try {
|
|
2773
2773
|
if (tracing) {
|
|
2774
2774
|
submissionStartedAt = performance.now();
|
|
2775
|
-
|
|
2775
|
+
_chunkDMWHEYZMjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2776
2776
|
}
|
|
2777
2777
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2778
2778
|
...executeOptions,
|
|
@@ -2782,34 +2782,34 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2782
2782
|
} catch (error) {
|
|
2783
2783
|
if (!(error instanceof _chunkDIAWYWT5js.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2784
2784
|
throw error;
|
|
2785
|
-
const baseUrl =
|
|
2785
|
+
const baseUrl = _chunkNC52JG66js.resolveConfig.call(void 0, ).baseUrl;
|
|
2786
2786
|
if (maintenancePolicy !== "off") {
|
|
2787
|
-
|
|
2787
|
+
_chunk4RAENEAXjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2788
2788
|
}
|
|
2789
|
-
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await
|
|
2789
|
+
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await _chunkUBNS6GSVjs.runToolExecuteStage.call(void 0,
|
|
2790
2790
|
"SDK compatibility",
|
|
2791
|
-
() =>
|
|
2791
|
+
() => _chunk4RAENEAXjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
2792
2792
|
command: "tools execute",
|
|
2793
|
-
skillsVersion:
|
|
2793
|
+
skillsVersion: _chunkNC52JG66js.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2794
2794
|
persistCache: maintenancePolicy !== "off"
|
|
2795
2795
|
})
|
|
2796
2796
|
);
|
|
2797
2797
|
if (compatibility.error) throw compatibility.error;
|
|
2798
2798
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _43 => _43.readMetadata, 'call', _44 => _44()]), () => ( metadata));
|
|
2799
|
-
if (maintenancePolicy !== "off" && await
|
|
2799
|
+
if (maintenancePolicy !== "off" && await _chunkUBNS6GSVjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2800
2800
|
compatibility.response,
|
|
2801
2801
|
baseUrl,
|
|
2802
2802
|
maintenancePolicy
|
|
2803
2803
|
)) {
|
|
2804
2804
|
return void 0;
|
|
2805
2805
|
}
|
|
2806
|
-
|
|
2806
|
+
_chunk4RAENEAXjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
2807
2807
|
quietAdvisory: wantsJson
|
|
2808
2808
|
});
|
|
2809
2809
|
if (maintenancePolicy !== "off") {
|
|
2810
|
-
await
|
|
2810
|
+
await _chunkUBNS6GSVjs.runToolExecuteStage.call(void 0,
|
|
2811
2811
|
"agent skills sync",
|
|
2812
|
-
() =>
|
|
2812
|
+
() => _chunk4RAENEAXjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2813
2813
|
update: _optionalChain([compatibility, 'access', _45 => _45.response, 'optionalAccess', _46 => _46.skills]),
|
|
2814
2814
|
mode: "detached"
|
|
2815
2815
|
})
|
|
@@ -2818,7 +2818,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2818
2818
|
const legacyMetadata = await readMetadata();
|
|
2819
2819
|
if (tracing) {
|
|
2820
2820
|
submissionStartedAt = performance.now();
|
|
2821
|
-
|
|
2821
|
+
_chunkDMWHEYZMjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2822
2822
|
}
|
|
2823
2823
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2824
2824
|
...executeOptions,
|
|
@@ -2839,8 +2839,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2839
2839
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2840
2840
|
const updateRequiredBeforeExecution = error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2841
2841
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2842
|
-
const baseUrl =
|
|
2843
|
-
if (await
|
|
2842
|
+
const baseUrl = _chunkNC52JG66js.resolveConfig.call(void 0, ).baseUrl;
|
|
2843
|
+
if (await _chunkUBNS6GSVjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2844
2844
|
compatibility.response,
|
|
2845
2845
|
baseUrl,
|
|
2846
2846
|
maintenancePolicy
|
|
@@ -2859,7 +2859,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2859
2859
|
failure = diagnosticError;
|
|
2860
2860
|
}
|
|
2861
2861
|
if (failure instanceof _chunkDIAWYWT5js.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2862
|
-
if (wantsJson)
|
|
2862
|
+
if (wantsJson) _chunkM2UL4ZS5js.printJsonError.call(void 0, failure);
|
|
2863
2863
|
else console.error(failure.message);
|
|
2864
2864
|
return 2;
|
|
2865
2865
|
}
|
|
@@ -2886,9 +2886,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2886
2886
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
2887
2887
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _52 => _52.auto_update]);
|
|
2888
2888
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _53 => _53.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
2889
|
-
await
|
|
2889
|
+
await _chunkUBNS6GSVjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2890
2890
|
compatibilityResponse,
|
|
2891
|
-
|
|
2891
|
+
_chunkNC52JG66js.resolveConfig.call(void 0, ).baseUrl,
|
|
2892
2892
|
maintenancePolicy
|
|
2893
2893
|
);
|
|
2894
2894
|
}
|
|
@@ -2923,7 +2923,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2923
2923
|
const { _metadata, ...execution } = rawResponse;
|
|
2924
2924
|
rawResponse = execution;
|
|
2925
2925
|
}
|
|
2926
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
2926
|
+
const { listConversion, summary, baseEnvelope } = await _chunkUBNS6GSVjs.runToolExecuteStage.call(void 0,
|
|
2927
2927
|
"result formatting",
|
|
2928
2928
|
async () => {
|
|
2929
2929
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -2958,9 +2958,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2958
2958
|
}
|
|
2959
2959
|
skillsSyncAttempted = true;
|
|
2960
2960
|
try {
|
|
2961
|
-
await
|
|
2961
|
+
await _chunkUBNS6GSVjs.runToolExecuteStage.call(void 0,
|
|
2962
2962
|
"agent skills sync",
|
|
2963
|
-
() =>
|
|
2963
|
+
() => _chunk4RAENEAXjs.syncSdkSkillsIfNeeded.call(void 0, _chunkNC52JG66js.resolveConfig.call(void 0, ).baseUrl, {
|
|
2964
2964
|
update: deliveredCompatibilityResponse.skills,
|
|
2965
2965
|
mode: "detached"
|
|
2966
2966
|
})
|
|
@@ -2971,15 +2971,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2971
2971
|
);
|
|
2972
2972
|
}
|
|
2973
2973
|
};
|
|
2974
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
2974
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkM2UL4ZS5js.printCommandEnvelope.call(void 0, envelope, {
|
|
2975
2975
|
...options2,
|
|
2976
2976
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
2977
2977
|
});
|
|
2978
2978
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
2979
2979
|
await syncSkillsForDeliveredOutput();
|
|
2980
|
-
|
|
2980
|
+
_chunkM2UL4ZS5js.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
2981
2981
|
};
|
|
2982
|
-
const delivered = await
|
|
2982
|
+
const delivered = await _chunkUBNS6GSVjs.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
2983
2983
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
2984
2984
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
2985
2985
|
return true;
|
|
@@ -3008,7 +3008,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3008
3008
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3009
3009
|
);
|
|
3010
3010
|
if (wantsJson) {
|
|
3011
|
-
|
|
3011
|
+
_chunkM2UL4ZS5js.printJsonError.call(void 0, error);
|
|
3012
3012
|
} else {
|
|
3013
3013
|
console.error(error.message);
|
|
3014
3014
|
}
|
|
@@ -3103,13 +3103,13 @@ inspect: ${inspection.inspect}
|
|
|
3103
3103
|
return true;
|
|
3104
3104
|
});
|
|
3105
3105
|
if (delivered) {
|
|
3106
|
-
await
|
|
3106
|
+
await _chunkUBNS6GSVjs.runToolExecuteStage.call(void 0,
|
|
3107
3107
|
"acknowledge delivery",
|
|
3108
3108
|
() => recovery.acknowledgeDelivery()
|
|
3109
3109
|
);
|
|
3110
3110
|
}
|
|
3111
3111
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3112
|
-
|
|
3112
|
+
_chunk4RAENEAXjs.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3113
3113
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _55 => _55.auto_update, 'optionalAccess', _56 => _56.should_auto_update]) === true
|
|
3114
3114
|
});
|
|
3115
3115
|
}
|