deepline 0.3.501 → 0.3.502
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/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-fly-rollback-alignment.ts +29 -14
- package/dist/bundling-sources/shared_libs/play-runtime/prebuilt-result-quality.ts +264 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +32 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-oidc.ts +30 -8
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +22 -4
- package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +2 -0
- package/dist/cli/{auth-6ECHXOI4.mjs → auth-EFHLOVG4.mjs} +5 -5
- package/dist/cli/auth-VM3IKP5F.js +43 -0
- package/dist/cli/{billing-75NZYRXA.mjs → billing-Q5XKEYPP.mjs} +6 -6
- package/dist/cli/{billing-QRR7O6BD.js → billing-SKT2VE34.js} +79 -79
- package/dist/cli/{chunk-RFV7PPLS.mjs → chunk-2JS3H6H6.mjs} +3 -3
- package/dist/cli/{chunk-66XDYH5T.mjs → chunk-2MVIS2UI.mjs} +2 -2
- package/dist/cli/{chunk-XEBFJ2PH.js → chunk-2S2F6YSI.js} +41 -41
- package/dist/cli/{chunk-463ZOO2L.js → chunk-32YQBJON.js} +7 -7
- package/dist/cli/{chunk-EOO7OSS4.mjs → chunk-3KEZVGGV.mjs} +4 -4
- package/dist/cli/{chunk-EHVFBD36.mjs → chunk-3MJSWVQ2.mjs} +1 -1
- package/dist/cli/{chunk-5S7MLAI7.mjs → chunk-4CCMD7QM.mjs} +20 -19
- package/dist/cli/{chunk-T7E3XEPG.mjs → chunk-4WTC5SSN.mjs} +7 -7
- package/dist/cli/{chunk-NA3J3F2Z.mjs → chunk-54QXWK3C.mjs} +1 -1
- package/dist/cli/{chunk-V5NHEYU7.mjs → chunk-7ZYSXSJJ.mjs} +5 -5
- package/dist/cli/{chunk-J6SVNKRP.js → chunk-AJL2Q6IQ.js} +2 -2
- package/dist/cli/{chunk-QQ3JJYE2.js → chunk-DKAMCJIT.js} +9 -9
- package/dist/cli/{chunk-C5R3UH5V.mjs → chunk-DRBD4IYQ.mjs} +1 -1
- package/dist/cli/{chunk-VVEMPC2I.js → chunk-DYHTXGLX.js} +2 -2
- package/dist/cli/{chunk-SV2TEZ2M.js → chunk-EUWRKWT4.js} +4 -4
- package/dist/cli/{chunk-GBICEYUA.js → chunk-FVM4PS5Q.js} +116 -8
- package/dist/cli/{chunk-I42EOZKQ.js → chunk-FWDAEWCD.js} +5 -5
- package/dist/cli/{chunk-FS7XYDOF.js → chunk-GINKIZ7S.js} +16 -16
- package/dist/cli/{chunk-VTDAJZIJ.mjs → chunk-HIVRCTDR.mjs} +1 -1
- package/dist/cli/{chunk-OKOXB3LY.mjs → chunk-HMZF2CSP.mjs} +2 -2
- package/dist/cli/{chunk-EKF4DKUA.js → chunk-IL666WJE.js} +5 -5
- package/dist/cli/{chunk-HDKXSHGA.js → chunk-JFBJLNBI.js} +53 -53
- package/dist/cli/{chunk-KSHAFYYG.mjs → chunk-JFUXUSKB.mjs} +112 -4
- package/dist/cli/{chunk-TOE7LHEA.js → chunk-JL6H4H3G.js} +6 -6
- package/dist/cli/{chunk-BOFCF4L7.js → chunk-JLYDLK6X.js} +3 -3
- package/dist/cli/{chunk-O3DDVP7Z.mjs → chunk-L5CTJY74.mjs} +1 -1
- package/dist/cli/{chunk-4OXHLTCP.js → chunk-LA3UYRVZ.js} +1 -1
- package/dist/cli/{chunk-Z6AUOV7D.mjs → chunk-MP5QY4A2.mjs} +2 -2
- package/dist/cli/{chunk-ZUQHQGC5.mjs → chunk-MYUISF3P.mjs} +5 -5
- package/dist/cli/{chunk-WJUDAHIQ.mjs → chunk-NKLM4J4X.mjs} +1 -1
- package/dist/cli/{chunk-UJRN6YP6.mjs → chunk-NXVYLX3F.mjs} +2 -2
- package/dist/cli/{chunk-J74N375S.mjs → chunk-NZXB27TP.mjs} +4 -4
- package/dist/cli/{chunk-VL72UKNW.js → chunk-OEUMXKR5.js} +26 -26
- package/dist/cli/{chunk-7L6QNHUL.mjs → chunk-OFBLT2LQ.mjs} +1 -1
- package/dist/cli/{chunk-PNF2ZU4R.js → chunk-OVZOMSH2.js} +8 -8
- package/dist/cli/{chunk-CJJ7JBM2.js → chunk-Q3NM6ZL3.js} +19 -19
- package/dist/cli/{chunk-APAHMCGR.js → chunk-QNELA7SX.js} +53 -53
- package/dist/cli/{chunk-EKZQ5LQO.js → chunk-QOJBRCAS.js} +3 -3
- package/dist/cli/{chunk-MSLXAVVK.mjs → chunk-R5F7JXT4.mjs} +2 -2
- package/dist/cli/{chunk-N2TJJNCW.js → chunk-TAK3MVXY.js} +270 -269
- package/dist/cli/{chunk-UR7JOSLT.js → chunk-UOANF3DR.js} +7 -7
- package/dist/cli/{chunk-MADTHS56.mjs → chunk-W5CHE5Q2.mjs} +1 -1
- package/dist/cli/{chunk-W6JTHVPF.js → chunk-WKFAX2K7.js} +21 -21
- package/dist/cli/{chunk-KTOAJP4N.js → chunk-X5MGQ7UT.js} +6 -6
- package/dist/cli/{chunk-RU5ROUFO.js → chunk-XMKUJ44Z.js} +5 -5
- package/dist/cli/{chunk-5X4AUFYW.js → chunk-YDXEXVBV.js} +7 -7
- package/dist/cli/{chunk-PXIF74UJ.mjs → chunk-YL2CCF6T.mjs} +4 -4
- package/dist/cli/{chunk-ZUOKIBLJ.mjs → chunk-YWOQYYYS.mjs} +2 -2
- package/dist/cli/{chunk-T4U245E4.mjs → chunk-Z2H7OQ6E.mjs} +2 -2
- package/dist/cli/{chunk-VD2374K7.mjs → chunk-ZNB6GR3P.mjs} +1 -1
- package/dist/cli/{csv-RZJ4SOIL.mjs → csv-6AEPKKCO.mjs} +4 -4
- package/dist/cli/{csv-JXX2LXK5.js → csv-OXGSCV75.js} +13 -13
- package/dist/cli/{db-T2KJNONM.js → db-6NVHDUZY.js} +27 -27
- package/dist/cli/{db-MUTT2NWI.mjs → db-K3KRK4CZ.mjs} +6 -6
- package/dist/cli/describe-JOUAXXPE.js +49 -0
- package/dist/cli/{describe-K3UMAAVO.mjs → describe-P3ZJS7TQ.mjs} +19 -20
- package/dist/cli/describe-core.js +3 -4
- package/dist/cli/describe-core.mjs +2 -3
- package/dist/cli/{executions-7HSLDRHR.js → executions-2C2FFG52.js} +8 -8
- package/dist/cli/{executions-PHS4R2OX.mjs → executions-I7XW6WWK.mjs} +6 -6
- package/dist/cli/{feedback-BJZRM637.js → feedback-47B57A5Y.js} +8 -8
- package/dist/cli/{feedback-RWMDCIDF.mjs → feedback-RSTNBJAI.mjs} +4 -4
- package/dist/cli/{git-YW6VHYZG.mjs → git-3G5AFKBT.mjs} +5 -5
- package/dist/cli/git-OPKIC6JQ.js +25 -0
- package/dist/cli/index.js +137 -137
- package/dist/cli/index.mjs +40 -40
- package/dist/cli/{legacy-noops-5UBSUPGG.mjs → legacy-noops-NQ262TKL.mjs} +5 -5
- package/dist/cli/{legacy-noops-2WUV2XD7.js → legacy-noops-P665PBG4.js} +8 -8
- package/dist/cli/{monitors-YZZRKSTG.js → monitors-IPWAD7LS.js} +95 -95
- package/dist/cli/{monitors-HWOQO3OK.mjs → monitors-KUPZODZS.mjs} +7 -7
- package/dist/cli/{org-JY7HLHBA.js → org-WFC3N672.js} +72 -72
- package/dist/cli/{org-NCXT6RB4.mjs → org-ZCQGEM3L.mjs} +6 -6
- package/dist/cli/{pages-6ZOHXL6X.js → pages-N5BNC67L.js} +18 -18
- package/dist/cli/{pages-QJO53QAT.mjs → pages-VE66IU7B.mjs} +6 -6
- package/dist/cli/{play-SQRS7JN3.mjs → play-EIMDIAJB.mjs} +17 -17
- package/dist/cli/{play-TAYGSR35.js → play-NKIRJSKX.js} +315 -315
- package/dist/cli/{providers-3IR3N5DT.mjs → providers-KDTJ63ED.mjs} +6 -6
- package/dist/cli/{providers-4Q5LOIQ5.js → providers-XU3AGY2F.js} +9 -9
- package/dist/cli/{quickstart-ITNUZENY.js → quickstart-OSCHOSXU.js} +6 -6
- package/dist/cli/{quickstart-KCZCYO6B.mjs → quickstart-TXFXUODF.mjs} +4 -4
- package/dist/cli/{run-YQ57LMKN.js → run-ET2KVTPK.js} +43 -44
- package/dist/cli/{run-JCWRWDSK.mjs → run-ODGML35U.mjs} +24 -25
- package/dist/cli/search-6U54Y3OK.js +32 -0
- package/dist/cli/{search-FUM27HQP.mjs → search-DK67K6PR.mjs} +7 -7
- package/dist/cli/{search-output-EWEYT34M.mjs → search-output-6SOKQTCW.mjs} +53 -75
- package/dist/cli/{search-output-XAMWKRJH.js → search-output-KXP4FA62.js} +58 -80
- package/dist/cli/{secrets-YTI4IAKR.mjs → secrets-C6SYTMU7.mjs} +6 -6
- package/dist/cli/{secrets-2IRRRZBL.js → secrets-WPS6NMNK.js} +15 -15
- package/dist/cli/{sessions-HWTRDXBQ.js → sessions-IP562J5Z.js} +6 -6
- package/dist/cli/{sessions-EFS4KUPF.mjs → sessions-PXVOH34X.mjs} +5 -5
- package/dist/cli/{settings-NTOO42DY.mjs → settings-FBUQGYVJ.mjs} +11 -11
- package/dist/cli/{settings-FRVEIOKR.js → settings-SUDUIVMY.js} +78 -78
- package/dist/cli/{setup-6ZIOAE2V.js → setup-I5H6IOEY.js} +49 -49
- package/dist/cli/{setup-PAVQPALX.mjs → setup-JSIMTR73.mjs} +9 -9
- package/dist/cli/{skills-3O3XTPUM.mjs → skills-FJQ3LX6N.mjs} +7 -7
- package/dist/cli/skills-VHININXC.js +36 -0
- package/dist/cli/{tools-7QSB65UL.mjs → tools-IGBK4BVE.mjs} +17 -18
- package/dist/cli/tools-XMBMHVKF.js +56 -0
- package/dist/cli/{update-T6CYS5ZT.mjs → update-7MTT6F5K.mjs} +9 -9
- package/dist/cli/update-H7JVW43I.js +34 -0
- package/dist/cli/{workflow-OMSXZ73T.mjs → workflow-PM2J2OU3.mjs} +7 -7
- package/dist/cli/{workflow-4KMJBMGX.js → workflow-UX3ZX6BQ.js} +17 -17
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +103 -104
- 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.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-VP7PMXKQ.js +0 -43
- package/dist/cli/chunk-XK5DMLZE.js +0 -111
- package/dist/cli/chunk-XRDXNAAY.mjs +0 -111
- package/dist/cli/describe-SEXUJLE4.js +0 -50
- package/dist/cli/git-VNS7UQWN.js +0 -25
- package/dist/cli/search-I425FRTK.js +0 -32
- package/dist/cli/skills-6ZNMO2PR.js +0 -36
- package/dist/cli/tools-DPV2JES6.js +0 -57
- package/dist/cli/update-Q5GUDEAW.js +0 -34
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkX5MGQ7UTjs = require('./chunk-X5MGQ7UT.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk32YQBJONjs = require('./chunk-32YQBJON.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -25,17 +25,15 @@ var _chunk463ZOO2Ljs = require('./chunk-463ZOO2L.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var _chunkGBICEYUAjs = require('./chunk-GBICEYUA.js');
|
|
29
28
|
|
|
30
29
|
|
|
31
|
-
var
|
|
32
|
-
|
|
30
|
+
var _chunkFVM4PS5Qjs = require('./chunk-FVM4PS5Q.js');
|
|
33
31
|
|
|
34
|
-
var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
35
32
|
|
|
33
|
+
var _chunkJO5FFSR7js = require('./chunk-JO5FFSR7.js');
|
|
36
34
|
|
|
37
35
|
|
|
38
|
-
var
|
|
36
|
+
var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
39
37
|
|
|
40
38
|
|
|
41
39
|
var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
|
|
@@ -48,10 +46,10 @@ var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
|
|
|
48
46
|
var _chunkHGFFYVXNjs = require('./chunk-HGFFYVXN.js');
|
|
49
47
|
|
|
50
48
|
|
|
51
|
-
var
|
|
49
|
+
var _chunkXMKUJ44Zjs = require('./chunk-XMKUJ44Z.js');
|
|
52
50
|
|
|
53
51
|
|
|
54
|
-
var
|
|
52
|
+
var _chunkUOANF3DRjs = require('./chunk-UOANF3DR.js');
|
|
55
53
|
|
|
56
54
|
|
|
57
55
|
var _chunkWSGXBROEjs = require('./chunk-WSGXBROE.js');
|
|
@@ -61,18 +59,18 @@ var _chunkWSGXBROEjs = require('./chunk-WSGXBROE.js');
|
|
|
61
59
|
|
|
62
60
|
|
|
63
61
|
|
|
64
|
-
var
|
|
62
|
+
var _chunkWKFAX2K7js = require('./chunk-WKFAX2K7.js');
|
|
65
63
|
|
|
66
64
|
|
|
67
65
|
|
|
68
66
|
|
|
69
|
-
var
|
|
67
|
+
var _chunkAJL2Q6IQjs = require('./chunk-AJL2Q6IQ.js');
|
|
70
68
|
|
|
71
69
|
|
|
72
70
|
|
|
73
71
|
|
|
74
72
|
|
|
75
|
-
var
|
|
73
|
+
var _chunkQNELA7SXjs = require('./chunk-QNELA7SX.js');
|
|
76
74
|
|
|
77
75
|
|
|
78
76
|
|
|
@@ -80,12 +78,12 @@ var _chunkAPAHMCGRjs = require('./chunk-APAHMCGR.js');
|
|
|
80
78
|
|
|
81
79
|
|
|
82
80
|
|
|
83
|
-
var
|
|
81
|
+
var _chunkYDXEXVBVjs = require('./chunk-YDXEXVBV.js');
|
|
84
82
|
|
|
85
83
|
|
|
86
84
|
|
|
87
85
|
|
|
88
|
-
var
|
|
86
|
+
var _chunkJLYDLK6Xjs = require('./chunk-JLYDLK6X.js');
|
|
89
87
|
|
|
90
88
|
|
|
91
89
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
@@ -191,10 +189,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
191
189
|
}
|
|
192
190
|
};
|
|
193
191
|
function pendingToolExecutionPath(input) {
|
|
194
|
-
const config =
|
|
192
|
+
const config = _chunkJLYDLK6Xjs.resolveConfig.call(void 0, );
|
|
195
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(_chunkWSGXBROEjs.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
|
|
196
194
|
return _path.join.call(void 0,
|
|
197
|
-
|
|
195
|
+
_chunkJLYDLK6Xjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
198
196
|
`${PENDING_PREFIX}${fingerprint}.json`
|
|
199
197
|
);
|
|
200
198
|
}
|
|
@@ -346,13 +344,13 @@ var TOOL_COMMAND_TEMPLATES = {
|
|
|
346
344
|
execute: "deepline run <toolId> --input '{...}'"
|
|
347
345
|
};
|
|
348
346
|
function toListedTool(tool) {
|
|
349
|
-
if (
|
|
347
|
+
if (_chunkFVM4PS5Qjs.isPlayLikeTool.call(void 0, tool)) {
|
|
350
348
|
return {
|
|
351
349
|
...tool,
|
|
352
350
|
description: listedToolDescription(tool),
|
|
353
351
|
id: tool.toolId,
|
|
354
352
|
type: "play",
|
|
355
|
-
executeCommand:
|
|
353
|
+
executeCommand: _chunkFVM4PS5Qjs.playRunCommandForTool.call(void 0, tool, tool.toolId)
|
|
356
354
|
};
|
|
357
355
|
}
|
|
358
356
|
return {
|
|
@@ -434,16 +432,16 @@ function firstSentence(text) {
|
|
|
434
432
|
return (match ? match[0] : clean).trim();
|
|
435
433
|
}
|
|
436
434
|
function requiredInputIds(tool) {
|
|
437
|
-
const inputSchema =
|
|
435
|
+
const inputSchema = _chunkFVM4PS5Qjs.recordField.call(void 0,
|
|
438
436
|
tool,
|
|
439
437
|
"inputSchema",
|
|
440
438
|
"input_schema"
|
|
441
439
|
);
|
|
442
|
-
return
|
|
440
|
+
return _chunkFVM4PS5Qjs.toolInputFieldsForDisplay.call(void 0, inputSchema).filter((field) => field.required === true).map((field) => String(_nullishCoalesce(field.name, () => ( "")))).filter(Boolean);
|
|
443
441
|
}
|
|
444
442
|
function notConnectedSuffix(tool) {
|
|
445
443
|
const record = tool;
|
|
446
|
-
const status =
|
|
444
|
+
const status = _chunkFVM4PS5Qjs.stringField.call(void 0, record, "credentialStatus", "credential_status");
|
|
447
445
|
const connected = record.connected;
|
|
448
446
|
const message = toolConnectionStatusMessage({
|
|
449
447
|
connected: connected === false ? false : void 0,
|
|
@@ -452,18 +450,18 @@ function notConnectedSuffix(tool) {
|
|
|
452
450
|
return message ? ` - \u26A0 ${message}` : "";
|
|
453
451
|
}
|
|
454
452
|
function shortPricingHint(tool) {
|
|
455
|
-
const pricing =
|
|
453
|
+
const pricing = _chunkFVM4PS5Qjs.recordField.call(void 0,
|
|
456
454
|
tool,
|
|
457
455
|
"pricing"
|
|
458
456
|
);
|
|
459
457
|
const credits = numberField(pricing, "creditsPerUnit", "credits_per_unit");
|
|
460
|
-
const unit =
|
|
458
|
+
const unit = _chunkFVM4PS5Qjs.stringField.call(void 0, pricing, "unit");
|
|
461
459
|
if (credits !== null) {
|
|
462
460
|
return `${formatDecimal(credits)} cr/${unit || "unit"}`;
|
|
463
461
|
}
|
|
464
|
-
const summary =
|
|
462
|
+
const summary = _chunkFVM4PS5Qjs.stringField.call(void 0, pricing, "summary");
|
|
465
463
|
if (summary) return summary;
|
|
466
|
-
const displayText =
|
|
464
|
+
const displayText = _chunkFVM4PS5Qjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
467
465
|
return displayText || null;
|
|
468
466
|
}
|
|
469
467
|
function aggregateCategorySummaries(tools) {
|
|
@@ -507,13 +505,13 @@ function categoryEnumerationRender(summaries) {
|
|
|
507
505
|
};
|
|
508
506
|
}
|
|
509
507
|
async function listToolCategories(emitJson, compact) {
|
|
510
|
-
const client = new (0,
|
|
508
|
+
const client = new (0, _chunkXMKUJ44Zjs.DeeplineClient)();
|
|
511
509
|
if (!emitJson) {
|
|
512
510
|
const summaries2 = (await client.listToolCategories()).map((category) => ({
|
|
513
511
|
...category,
|
|
514
512
|
description: describeToolCategory(category.name)
|
|
515
513
|
}));
|
|
516
|
-
|
|
514
|
+
_chunkYDXEXVBVjs.printCommandEnvelope.call(void 0,
|
|
517
515
|
{ categories: summaries2, render: categoryEnumerationRender(summaries2) },
|
|
518
516
|
{ json: false }
|
|
519
517
|
);
|
|
@@ -523,7 +521,7 @@ async function listToolCategories(emitJson, compact) {
|
|
|
523
521
|
const items = rawTools.map(toListedTool);
|
|
524
522
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
525
523
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
526
|
-
|
|
524
|
+
_chunkYDXEXVBVjs.printCommandEnvelope.call(void 0,
|
|
527
525
|
{
|
|
528
526
|
tools: outputItems,
|
|
529
527
|
count: outputItems.length,
|
|
@@ -542,7 +540,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
542
540
|
const known = summaries.map((item) => item.name);
|
|
543
541
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
544
542
|
if (emitJson) {
|
|
545
|
-
|
|
543
|
+
_chunkYDXEXVBVjs.printJson.call(void 0, {
|
|
546
544
|
ok: false,
|
|
547
545
|
exitCode: 4,
|
|
548
546
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -556,13 +554,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
556
554
|
const render = categoryEnumerationRender(summaries);
|
|
557
555
|
console.error(message);
|
|
558
556
|
console.error("");
|
|
559
|
-
console.error(
|
|
557
|
+
console.error(_chunkYDXEXVBVjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
560
558
|
console.error("");
|
|
561
559
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
562
560
|
return 4;
|
|
563
561
|
}
|
|
564
562
|
async function listToolsInCategory(category, emitJson) {
|
|
565
|
-
const client = new (0,
|
|
563
|
+
const client = new (0, _chunkXMKUJ44Zjs.DeeplineClient)();
|
|
566
564
|
const { tools: rawTools, categories } = await client.listToolsInCategory(category);
|
|
567
565
|
const summaries = categories.map((item) => ({
|
|
568
566
|
...item,
|
|
@@ -598,7 +596,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
598
596
|
}
|
|
599
597
|
]
|
|
600
598
|
};
|
|
601
|
-
|
|
599
|
+
_chunkYDXEXVBVjs.printCommandEnvelope.call(void 0,
|
|
602
600
|
{
|
|
603
601
|
category,
|
|
604
602
|
total: rows.length,
|
|
@@ -611,7 +609,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
611
609
|
return 0;
|
|
612
610
|
}
|
|
613
611
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
614
|
-
const client = new (0,
|
|
612
|
+
const client = new (0, _chunkXMKUJ44Zjs.DeeplineClient)();
|
|
615
613
|
const items = (await client.listTools({
|
|
616
614
|
categories: requestedCategories.join(","),
|
|
617
615
|
compact
|
|
@@ -640,7 +638,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
640
638
|
]
|
|
641
639
|
};
|
|
642
640
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
643
|
-
|
|
641
|
+
_chunkYDXEXVBVjs.printCommandEnvelope.call(void 0,
|
|
644
642
|
{
|
|
645
643
|
tools: outputItems,
|
|
646
644
|
count: outputItems.length,
|
|
@@ -659,13 +657,13 @@ async function listTools(category, options = {}) {
|
|
|
659
657
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]), () => ( ""));
|
|
660
658
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
661
659
|
const compact = options.compact !== false;
|
|
662
|
-
const emitJson = options.json === true ||
|
|
660
|
+
const emitJson = options.json === true || _chunkYDXEXVBVjs.shouldEmitJson.call(void 0, );
|
|
663
661
|
if (positional && flagCategories.length > 0) {
|
|
664
662
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
665
663
|
if (!flagIsSameSingle) {
|
|
666
664
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
667
665
|
if (emitJson) {
|
|
668
|
-
|
|
666
|
+
_chunkYDXEXVBVjs.printJson.call(void 0, {
|
|
669
667
|
ok: false,
|
|
670
668
|
exitCode: 2,
|
|
671
669
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -692,7 +690,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
692
690
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
693
691
|
return 1;
|
|
694
692
|
}
|
|
695
|
-
const client = new (0,
|
|
693
|
+
const client = new (0, _chunkXMKUJ44Zjs.DeeplineClient)();
|
|
696
694
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
697
695
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
698
696
|
const jsonOutput = options.json === true;
|
|
@@ -716,7 +714,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
716
714
|
query,
|
|
717
715
|
mode
|
|
718
716
|
}) : null;
|
|
719
|
-
|
|
717
|
+
_chunkYDXEXVBVjs.printCommandEnvelope.call(void 0,
|
|
720
718
|
{
|
|
721
719
|
tools: outputTools,
|
|
722
720
|
count: outputTools.length,
|
|
@@ -734,7 +732,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
734
732
|
} : {},
|
|
735
733
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
736
734
|
},
|
|
737
|
-
{ json: options.json ||
|
|
735
|
+
{ json: options.json || _chunkYDXEXVBVjs.shouldEmitJson.call(void 0, ) }
|
|
738
736
|
);
|
|
739
737
|
return 0;
|
|
740
738
|
}
|
|
@@ -789,8 +787,8 @@ function printPlayAliasToolError(toolId, play) {
|
|
|
789
787
|
console.error(playAliasToolErrorMessage(toolId, play));
|
|
790
788
|
}
|
|
791
789
|
function playLikeToolExecuteErrorMessage(toolId, tool) {
|
|
792
|
-
const playReference = tool ?
|
|
793
|
-
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${
|
|
790
|
+
const playReference = tool ? _chunkFVM4PS5Qjs.playReferenceForTool.call(void 0, tool) : null;
|
|
791
|
+
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunkFVM4PS5Qjs.playSearchCommandForToolId.call(void 0, toolId)}`;
|
|
794
792
|
return [
|
|
795
793
|
`${toolId} is a workflow/play entry, not an atomic provider tool.`,
|
|
796
794
|
nextStep,
|
|
@@ -845,7 +843,7 @@ Output:
|
|
|
845
843
|
if (options.preset !== void 0 && (options.scopes !== void 0 || options.optionalScopes !== void 0))
|
|
846
844
|
throw new Error("Use --preset or individual scopes, not both.");
|
|
847
845
|
const splitScopes = (value) => value.split(",").map((scope) => scope.trim()).filter(Boolean);
|
|
848
|
-
const result2 = await new (0,
|
|
846
|
+
const result2 = await new (0, _chunkXMKUJ44Zjs.DeeplineClient)().startIntegrationOAuth(
|
|
849
847
|
provider,
|
|
850
848
|
{
|
|
851
849
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
@@ -857,7 +855,7 @@ Output:
|
|
|
857
855
|
throw new Error(
|
|
858
856
|
"The API did not return an OAuth authorization URL."
|
|
859
857
|
);
|
|
860
|
-
if (
|
|
858
|
+
if (_chunkYDXEXVBVjs.shouldEmitJson.call(void 0, options.json))
|
|
861
859
|
console.log(
|
|
862
860
|
JSON.stringify({ provider, redirect_url: result2.redirect_url })
|
|
863
861
|
);
|
|
@@ -883,7 +881,7 @@ Output:
|
|
|
883
881
|
"--credentials-file must contain a nonempty JSON object of string credential values."
|
|
884
882
|
);
|
|
885
883
|
}
|
|
886
|
-
const result = await new (0,
|
|
884
|
+
const result = await new (0, _chunkXMKUJ44Zjs.DeeplineClient)().setIntegrationCredentials(
|
|
887
885
|
provider,
|
|
888
886
|
credentials
|
|
889
887
|
);
|
|
@@ -893,7 +891,7 @@ Output:
|
|
|
893
891
|
);
|
|
894
892
|
}
|
|
895
893
|
const confirmation = { provider, credential_saved: true };
|
|
896
|
-
if (
|
|
894
|
+
if (_chunkYDXEXVBVjs.shouldEmitJson.call(void 0, options.json))
|
|
897
895
|
console.log(JSON.stringify(confirmation));
|
|
898
896
|
else
|
|
899
897
|
console.log(
|
|
@@ -933,7 +931,7 @@ Examples:
|
|
|
933
931
|
json: Boolean(options.json)
|
|
934
932
|
});
|
|
935
933
|
});
|
|
936
|
-
|
|
934
|
+
_chunk32YQBJONjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
937
935
|
tools.command("grep <query>").description(
|
|
938
936
|
"Regex grep over tool ids, descriptions, categories, and input fields."
|
|
939
937
|
).addHelpText(
|
|
@@ -968,7 +966,7 @@ Examples:
|
|
|
968
966
|
});
|
|
969
967
|
const addToolMetadataCommand = (command) => {
|
|
970
968
|
let compatibilityMetadata;
|
|
971
|
-
|
|
969
|
+
_chunkWKFAX2K7js.registerCompatibilityCatalog.call(void 0, command, () => ({
|
|
972
970
|
toolId: command.args[0],
|
|
973
971
|
acceptMetadata: (metadata) => {
|
|
974
972
|
compatibilityMetadata = metadata;
|
|
@@ -1038,7 +1036,7 @@ Examples:
|
|
|
1038
1036
|
process.exitCode = await narrowView();
|
|
1039
1037
|
return;
|
|
1040
1038
|
}
|
|
1041
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
1039
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-JOUAXXPE.js")));
|
|
1042
1040
|
process.exitCode = await describeAnything(
|
|
1043
1041
|
toolId,
|
|
1044
1042
|
{
|
|
@@ -1053,7 +1051,7 @@ Examples:
|
|
|
1053
1051
|
});
|
|
1054
1052
|
};
|
|
1055
1053
|
addToolMetadataCommand(
|
|
1056
|
-
|
|
1054
|
+
_chunkX5MGQ7UTjs.addDescribeOptions.call(void 0,
|
|
1057
1055
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
1058
1056
|
{ json: false }
|
|
1059
1057
|
)
|
|
@@ -1122,7 +1120,7 @@ Examples:
|
|
|
1122
1120
|
options,
|
|
1123
1121
|
void 0,
|
|
1124
1122
|
true,
|
|
1125
|
-
|
|
1123
|
+
_chunkAJL2Q6IQjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
1126
1124
|
);
|
|
1127
1125
|
}
|
|
1128
1126
|
);
|
|
@@ -1130,13 +1128,13 @@ Examples:
|
|
|
1130
1128
|
function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
1131
1129
|
let metadata;
|
|
1132
1130
|
const startedAt = performance.now();
|
|
1133
|
-
const baseUrl =
|
|
1134
|
-
|
|
1135
|
-
const result =
|
|
1131
|
+
const baseUrl = _chunkJLYDLK6Xjs.resolveConfig.call(void 0, ).baseUrl;
|
|
1132
|
+
_chunkAJL2Q6IQjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1133
|
+
const result = _chunkWKFAX2K7js.runToolExecuteStage.call(void 0,
|
|
1136
1134
|
"SDK compatibility",
|
|
1137
|
-
() =>
|
|
1135
|
+
() => _chunkQNELA7SXjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1138
1136
|
command: "tools execute",
|
|
1139
|
-
skillsVersion:
|
|
1137
|
+
skillsVersion: _chunkJLYDLK6Xjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
1140
1138
|
persistCache: false,
|
|
1141
1139
|
timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
|
|
1142
1140
|
catalog: {
|
|
@@ -1150,7 +1148,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1150
1148
|
})
|
|
1151
1149
|
).then(
|
|
1152
1150
|
(compatibility) => {
|
|
1153
|
-
|
|
1151
|
+
_chunkAJL2Q6IQjs.recordCliTrace.call(void 0, {
|
|
1154
1152
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1155
1153
|
ms: performance.now() - startedAt,
|
|
1156
1154
|
ok: compatibility.error === null,
|
|
@@ -1159,7 +1157,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1159
1157
|
return compatibility;
|
|
1160
1158
|
},
|
|
1161
1159
|
(error) => {
|
|
1162
|
-
|
|
1160
|
+
_chunkAJL2Q6IQjs.recordCliTrace.call(void 0, {
|
|
1163
1161
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1164
1162
|
ms: performance.now() - startedAt,
|
|
1165
1163
|
ok: false
|
|
@@ -1174,7 +1172,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1174
1172
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1175
1173
|
return 1;
|
|
1176
1174
|
}
|
|
1177
|
-
const client = new (0,
|
|
1175
|
+
const client = new (0, _chunkXMKUJ44Zjs.DeeplineClient)();
|
|
1178
1176
|
let tool;
|
|
1179
1177
|
try {
|
|
1180
1178
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1228,12 +1226,12 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1228
1226
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1229
1227
|
if (inferenceQuote)
|
|
1230
1228
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1231
|
-
|
|
1229
|
+
_chunkYDXEXVBVjs.printCommandEnvelope.call(void 0,
|
|
1232
1230
|
{
|
|
1233
1231
|
toolId: String(tool.toolId || toolId),
|
|
1234
|
-
cost:
|
|
1232
|
+
cost: _chunkFVM4PS5Qjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1235
1233
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1236
|
-
...
|
|
1234
|
+
..._chunkFVM4PS5Qjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunkFVM4PS5Qjs.recordField.call(void 0, tool, "pricing") } : {},
|
|
1237
1235
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1238
1236
|
},
|
|
1239
1237
|
{
|
|
@@ -1244,14 +1242,14 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1244
1242
|
);
|
|
1245
1243
|
return 0;
|
|
1246
1244
|
}
|
|
1247
|
-
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !
|
|
1248
|
-
const contract =
|
|
1245
|
+
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunkFVM4PS5Qjs.isMonitorTypeTool.call(void 0, tool) && !_chunkFVM4PS5Qjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
|
|
1246
|
+
const contract = _chunkFVM4PS5Qjs.toolContractJsonForDescribe.call(void 0,
|
|
1249
1247
|
tool,
|
|
1250
1248
|
toolId,
|
|
1251
1249
|
void 0,
|
|
1252
1250
|
seedToolListScript
|
|
1253
1251
|
);
|
|
1254
|
-
|
|
1252
|
+
_chunkYDXEXVBVjs.printCompactJson.call(void 0, {
|
|
1255
1253
|
toolId: contract.toolId,
|
|
1256
1254
|
...options.schemaOnly ? {
|
|
1257
1255
|
inputSchema: contract.inputSchema,
|
|
@@ -1274,8 +1272,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1274
1272
|
return 0;
|
|
1275
1273
|
}
|
|
1276
1274
|
if (options.contractJson) {
|
|
1277
|
-
|
|
1278
|
-
...
|
|
1275
|
+
_chunkYDXEXVBVjs.printCompactJson.call(void 0, {
|
|
1276
|
+
..._chunkFVM4PS5Qjs.toolContractJsonForDescribe.call(void 0,
|
|
1279
1277
|
tool,
|
|
1280
1278
|
toolId,
|
|
1281
1279
|
void 0,
|
|
@@ -1288,8 +1286,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1288
1286
|
}
|
|
1289
1287
|
const emitJson = options.json === true;
|
|
1290
1288
|
if (emitJson) {
|
|
1291
|
-
|
|
1292
|
-
...
|
|
1289
|
+
_chunkYDXEXVBVjs.printCompactJson.call(void 0, {
|
|
1290
|
+
..._chunkFVM4PS5Qjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
|
|
1293
1291
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1294
1292
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1295
1293
|
});
|
|
@@ -1314,7 +1312,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1314
1312
|
printCompactToolContract(tool, toolId);
|
|
1315
1313
|
if (modelDescription) {
|
|
1316
1314
|
process.stdout.write(`
|
|
1317
|
-
${
|
|
1315
|
+
${_chunkFVM4PS5Qjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1318
1316
|
}
|
|
1319
1317
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1320
1318
|
return 0;
|
|
@@ -1322,7 +1320,7 @@ ${_chunkGBICEYUAjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
|
1322
1320
|
printCompactToolContract(tool, toolId);
|
|
1323
1321
|
if (modelDescription) {
|
|
1324
1322
|
process.stdout.write(`
|
|
1325
|
-
${
|
|
1323
|
+
${_chunkFVM4PS5Qjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1326
1324
|
}
|
|
1327
1325
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1328
1326
|
return 0;
|
|
@@ -1339,10 +1337,10 @@ function printInferenceQuoteSummary(quote) {
|
|
|
1339
1337
|
for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
|
|
1340
1338
|
}
|
|
1341
1339
|
function printMonitorTypeFilters(tool) {
|
|
1342
|
-
const schema =
|
|
1343
|
-
const properties =
|
|
1340
|
+
const schema = _chunkFVM4PS5Qjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
|
|
1341
|
+
const properties = _chunkFVM4PS5Qjs.recordField.call(void 0, schema, "properties");
|
|
1344
1342
|
const required = new Set(
|
|
1345
|
-
|
|
1343
|
+
_chunkFVM4PS5Qjs.arrayField.call(void 0, schema, "required").filter(
|
|
1346
1344
|
(v) => typeof v === "string"
|
|
1347
1345
|
)
|
|
1348
1346
|
);
|
|
@@ -1353,24 +1351,24 @@ function printMonitorTypeFilters(tool) {
|
|
|
1353
1351
|
}
|
|
1354
1352
|
console.log("Deploy filters (set in the monitor payload):");
|
|
1355
1353
|
for (const name of names) {
|
|
1356
|
-
const field =
|
|
1354
|
+
const field = _chunkFVM4PS5Qjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
|
|
1357
1355
|
const star = required.has(name) ? "*" : "";
|
|
1358
|
-
const enumVals =
|
|
1356
|
+
const enumVals = _chunkFVM4PS5Qjs.arrayField.call(void 0, field, "enum").filter(
|
|
1359
1357
|
(v) => typeof v === "string"
|
|
1360
1358
|
);
|
|
1361
|
-
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` :
|
|
1362
|
-
const desc =
|
|
1359
|
+
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunkFVM4PS5Qjs.stringField.call(void 0, field, "type") || "string";
|
|
1360
|
+
const desc = _chunkFVM4PS5Qjs.stringField.call(void 0, field, "description");
|
|
1363
1361
|
console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
|
|
1364
1362
|
}
|
|
1365
1363
|
}
|
|
1366
1364
|
function printMonitorTypeFilterExamples(tool) {
|
|
1367
|
-
const documentation =
|
|
1368
|
-
const fields =
|
|
1365
|
+
const documentation = _chunkFVM4PS5Qjs.recordField.call(void 0, tool, "documentation");
|
|
1366
|
+
const fields = _chunkFVM4PS5Qjs.recordField.call(void 0, documentation, "fields");
|
|
1369
1367
|
const examples = Object.entries(fields).flatMap(([name, rawField]) => {
|
|
1370
|
-
const grammar =
|
|
1371
|
-
const example =
|
|
1368
|
+
const grammar = _chunkFVM4PS5Qjs.recordField.call(void 0, _chunkFVM4PS5Qjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
|
|
1369
|
+
const example = _chunkFVM4PS5Qjs.stringField.call(void 0, grammar, "example");
|
|
1372
1370
|
const values = [
|
|
1373
|
-
...
|
|
1371
|
+
..._chunkFVM4PS5Qjs.arrayField.call(void 0, grammar, "examples").filter(
|
|
1374
1372
|
(value) => typeof value === "string" && Boolean(value)
|
|
1375
1373
|
),
|
|
1376
1374
|
...example ? [example] : []
|
|
@@ -1385,21 +1383,21 @@ function printMonitorTypeFilterExamples(tool) {
|
|
|
1385
1383
|
}
|
|
1386
1384
|
}
|
|
1387
1385
|
function printMonitorTypeStreams(tool) {
|
|
1388
|
-
const streams =
|
|
1389
|
-
|
|
1386
|
+
const streams = _chunkFVM4PS5Qjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
|
|
1387
|
+
_chunkFVM4PS5Qjs.isRecord
|
|
1390
1388
|
);
|
|
1391
1389
|
if (!streams.length) return;
|
|
1392
1390
|
console.log("");
|
|
1393
1391
|
console.log("Filter columns (a play's sqlListeners.where, per stream):");
|
|
1394
1392
|
for (const stream of streams) {
|
|
1395
|
-
const name =
|
|
1396
|
-
const cols =
|
|
1393
|
+
const name = _chunkFVM4PS5Qjs.stringField.call(void 0, stream, "stream");
|
|
1394
|
+
const cols = _chunkFVM4PS5Qjs.arrayField.call(void 0, stream, "columns").filter(_chunkFVM4PS5Qjs.isRecord).map((col) => _chunkFVM4PS5Qjs.stringField.call(void 0, col, "name")).filter(Boolean);
|
|
1397
1395
|
console.log(`- ${name}: ${cols.join(", ")}`);
|
|
1398
1396
|
}
|
|
1399
1397
|
}
|
|
1400
1398
|
function monitorTypePricingLines(tool) {
|
|
1401
|
-
const pricing =
|
|
1402
|
-
const byType =
|
|
1399
|
+
const pricing = _chunkFVM4PS5Qjs.recordField.call(void 0, tool, "pricing");
|
|
1400
|
+
const byType = _chunkFVM4PS5Qjs.recordField.call(void 0,
|
|
1403
1401
|
pricing,
|
|
1404
1402
|
"pricing_by_radar_type",
|
|
1405
1403
|
"pricingByRadarType"
|
|
@@ -1410,9 +1408,9 @@ function monitorTypePricingLines(tool) {
|
|
|
1410
1408
|
}
|
|
1411
1409
|
const lines = ["Pricing (Deepline credits per accepted event):"];
|
|
1412
1410
|
for (const key of keys) {
|
|
1413
|
-
const entry =
|
|
1411
|
+
const entry = _chunkFVM4PS5Qjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
|
|
1414
1412
|
const credits = numberField(entry, "deepline_credits", "deeplineCredits");
|
|
1415
|
-
const display =
|
|
1413
|
+
const display = _chunkFVM4PS5Qjs.stringField.call(void 0, entry, "display");
|
|
1416
1414
|
const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "not listed");
|
|
1417
1415
|
lines.push(`- ${key}: ${shown}`);
|
|
1418
1416
|
}
|
|
@@ -1422,20 +1420,20 @@ function printMonitorTypePricing(tool) {
|
|
|
1422
1420
|
for (const line of monitorTypePricingLines(tool)) console.log(line);
|
|
1423
1421
|
}
|
|
1424
1422
|
function printMonitorTypeDeploy(tool) {
|
|
1425
|
-
const deploy =
|
|
1426
|
-
const toolId =
|
|
1427
|
-
const example =
|
|
1423
|
+
const deploy = _chunkFVM4PS5Qjs.recordField.call(void 0, tool, "deploy");
|
|
1424
|
+
const toolId = _chunkFVM4PS5Qjs.stringField.call(void 0, tool, "toolId");
|
|
1425
|
+
const example = _chunkFVM4PS5Qjs.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
|
|
1428
1426
|
console.log("Deploy (a monitor type is deployed, not executed):");
|
|
1429
1427
|
console.log(` ${example}`);
|
|
1430
1428
|
}
|
|
1431
1429
|
function printMonitorTypeContract(tool, requestedToolId) {
|
|
1432
|
-
const toolId =
|
|
1430
|
+
const toolId = _chunkFVM4PS5Qjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
|
|
1433
1431
|
console.log(toolId);
|
|
1434
|
-
const displayName =
|
|
1432
|
+
const displayName = _chunkFVM4PS5Qjs.stringField.call(void 0, tool, "displayName");
|
|
1435
1433
|
if (displayName) console.log(`Best for: ${displayName}`);
|
|
1436
|
-
const description =
|
|
1434
|
+
const description = _chunkFVM4PS5Qjs.stringField.call(void 0, tool, "description");
|
|
1437
1435
|
if (description) console.log(`Description: ${description}`);
|
|
1438
|
-
const categories =
|
|
1436
|
+
const categories = _chunkFVM4PS5Qjs.arrayField.call(void 0, tool, "categories").filter(
|
|
1439
1437
|
(v) => typeof v === "string"
|
|
1440
1438
|
);
|
|
1441
1439
|
if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
|
|
@@ -1455,31 +1453,31 @@ function printMonitorTypeContract(tool, requestedToolId) {
|
|
|
1455
1453
|
console.log(`More: deepline describe ${toolId}`);
|
|
1456
1454
|
}
|
|
1457
1455
|
function toolGuidanceLines(guidance) {
|
|
1458
|
-
const record =
|
|
1459
|
-
const toolGuidance =
|
|
1460
|
-
const providerGuidance =
|
|
1456
|
+
const record = _chunkFVM4PS5Qjs.isRecord.call(void 0, guidance) ? guidance : {};
|
|
1457
|
+
const toolGuidance = _chunkFVM4PS5Qjs.stringField.call(void 0, record, "tool");
|
|
1458
|
+
const providerGuidance = _chunkFVM4PS5Qjs.stringField.call(void 0, record, "provider");
|
|
1461
1459
|
return [
|
|
1462
1460
|
...toolGuidance ? [`- This tool: ${toolGuidance}`] : [],
|
|
1463
1461
|
...providerGuidance ? [`- Provider: ${providerGuidance}`] : []
|
|
1464
1462
|
];
|
|
1465
1463
|
}
|
|
1466
1464
|
function printCompactToolContract(tool, requestedToolId) {
|
|
1467
|
-
if (
|
|
1465
|
+
if (_chunkFVM4PS5Qjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1468
1466
|
printMonitorTypeContract(tool, requestedToolId);
|
|
1469
1467
|
return;
|
|
1470
1468
|
}
|
|
1471
|
-
const contract =
|
|
1469
|
+
const contract = _chunkFVM4PS5Qjs.toolContractJsonForDescribe.call(void 0,
|
|
1472
1470
|
tool,
|
|
1473
1471
|
requestedToolId,
|
|
1474
1472
|
void 0,
|
|
1475
1473
|
seedToolListScript
|
|
1476
1474
|
);
|
|
1477
|
-
const cost =
|
|
1478
|
-
const getters =
|
|
1475
|
+
const cost = _chunkFVM4PS5Qjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
|
|
1476
|
+
const getters = _chunkFVM4PS5Qjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1479
1477
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1480
1478
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1481
|
-
const inputFields =
|
|
1482
|
-
|
|
1479
|
+
const inputFields = _chunkFVM4PS5Qjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1480
|
+
_chunkFVM4PS5Qjs.recordField.call(void 0, contract, "inputSchema")
|
|
1483
1481
|
);
|
|
1484
1482
|
console.log(String(contract.toolId));
|
|
1485
1483
|
if (contract.displayName) console.log(`Best for: ${contract.displayName}`);
|
|
@@ -1496,9 +1494,9 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1496
1494
|
printToolOutputArrayShape(contract);
|
|
1497
1495
|
printToolExecutionHints(contract);
|
|
1498
1496
|
if (contract.deprecated === true) {
|
|
1499
|
-
const deprecation =
|
|
1500
|
-
const message =
|
|
1501
|
-
const replacementToolId =
|
|
1497
|
+
const deprecation = _chunkFVM4PS5Qjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
|
|
1498
|
+
const message = _chunkFVM4PS5Qjs.stringField.call(void 0, deprecation, "message");
|
|
1499
|
+
const replacementToolId = _chunkFVM4PS5Qjs.stringField.call(void 0,
|
|
1502
1500
|
deprecation,
|
|
1503
1501
|
"replacementToolId",
|
|
1504
1502
|
"replacement_tool_id"
|
|
@@ -1521,12 +1519,12 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1521
1519
|
console.log("");
|
|
1522
1520
|
console.log("Inputs:");
|
|
1523
1521
|
for (const field of inputFields) {
|
|
1524
|
-
if (!
|
|
1525
|
-
const name =
|
|
1522
|
+
if (!_chunkFVM4PS5Qjs.isRecord.call(void 0, field)) continue;
|
|
1523
|
+
const name = _chunkFVM4PS5Qjs.stringField.call(void 0, field, "name");
|
|
1526
1524
|
if (!name) continue;
|
|
1527
1525
|
const required = field.required ? "*" : "";
|
|
1528
|
-
const type =
|
|
1529
|
-
const description =
|
|
1526
|
+
const type = _chunkFVM4PS5Qjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1527
|
+
const description = _chunkFVM4PS5Qjs.stringField.call(void 0, field, "description");
|
|
1530
1528
|
const enumValues = Array.isArray(field.enum) ? field.enum : [];
|
|
1531
1529
|
const enumSuffix = enumValues.length ? ` enum=${enumValues.map(String).join("|")}` : "";
|
|
1532
1530
|
const itemBoundsSuffix = arrayItemBoundsSuffix(field);
|
|
@@ -1541,8 +1539,8 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1541
1539
|
}
|
|
1542
1540
|
console.log("");
|
|
1543
1541
|
printToolExamplesOnly(tool, requestedToolId);
|
|
1544
|
-
const starterScript =
|
|
1545
|
-
const starterPath =
|
|
1542
|
+
const starterScript = _chunkFVM4PS5Qjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
|
|
1543
|
+
const starterPath = _chunkFVM4PS5Qjs.stringField.call(void 0, starterScript, "path");
|
|
1546
1544
|
if (starterPath) {
|
|
1547
1545
|
console.log("");
|
|
1548
1546
|
console.log(`Starter script: ${starterPath}`);
|
|
@@ -1553,16 +1551,16 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1553
1551
|
console.log("Getters:");
|
|
1554
1552
|
if (listGetters.length) console.log(listGetterHeading());
|
|
1555
1553
|
for (const entry of listGetters) {
|
|
1556
|
-
if (
|
|
1554
|
+
if (_chunkFVM4PS5Qjs.isRecord.call(void 0, entry))
|
|
1557
1555
|
console.log(
|
|
1558
|
-
`- ${
|
|
1556
|
+
`- ${_chunkFVM4PS5Qjs.stringField.call(void 0, entry, "name")}: ${_chunkFVM4PS5Qjs.playResultExpression.call(void 0, entry)}`
|
|
1559
1557
|
);
|
|
1560
1558
|
}
|
|
1561
1559
|
if (valueGetters.length) console.log("Values:");
|
|
1562
1560
|
for (const entry of valueGetters) {
|
|
1563
|
-
if (
|
|
1561
|
+
if (_chunkFVM4PS5Qjs.isRecord.call(void 0, entry))
|
|
1564
1562
|
console.log(
|
|
1565
|
-
`- ${
|
|
1563
|
+
`- ${_chunkFVM4PS5Qjs.stringField.call(void 0, entry, "name")}: ${_chunkFVM4PS5Qjs.playResultExpression.call(void 0, entry)}`
|
|
1566
1564
|
);
|
|
1567
1565
|
}
|
|
1568
1566
|
}
|
|
@@ -1573,27 +1571,30 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1573
1571
|
console.log(`More: deepline describe ${contract.toolId}`);
|
|
1574
1572
|
}
|
|
1575
1573
|
function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
1576
|
-
if (
|
|
1574
|
+
if (_chunkFVM4PS5Qjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1577
1575
|
return monitorTypePricingLines(tool);
|
|
1578
1576
|
}
|
|
1579
1577
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1580
|
-
const cost =
|
|
1581
|
-
const pricingModel =
|
|
1582
|
-
const billing =
|
|
1583
|
-
const explicitUnit =
|
|
1578
|
+
const cost = _chunkFVM4PS5Qjs.Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1579
|
+
const pricingModel = _chunkFVM4PS5Qjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
|
|
1580
|
+
const billing = _chunkFVM4PS5Qjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunkFVM4PS5Qjs.stringField.call(void 0, cost, "billingSource") || _chunkFVM4PS5Qjs.stringField.call(void 0, cost, "billingMode") || "unknown";
|
|
1581
|
+
const explicitUnit = _chunkFVM4PS5Qjs.stringField.call(void 0, cost, "unit");
|
|
1584
1582
|
const unit = explicitUnit || (pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit");
|
|
1585
1583
|
const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
|
|
1586
1584
|
const usd = numberField(cost, "deeplineUsdPerPricingUnit");
|
|
1587
|
-
const displayText =
|
|
1588
|
-
const summary =
|
|
1585
|
+
const displayText = _chunkFVM4PS5Qjs.stringField.call(void 0, cost, "displayText");
|
|
1586
|
+
const summary = _chunkFVM4PS5Qjs.stringField.call(void 0, cost, "summary");
|
|
1589
1587
|
const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
|
|
1588
|
+
const reference = cost.observedReference;
|
|
1589
|
+
const observedMax = _chunkFVM4PS5Qjs.observedMaxText.call(void 0, cost);
|
|
1590
1590
|
return [
|
|
1591
1591
|
`${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
|
|
1592
|
-
...
|
|
1593
|
-
...
|
|
1594
|
-
|
|
1595
|
-
...(_nullishCoalesce(cost.details, () => ( []))).map((detail) => ` ${detail}`)
|
|
1592
|
+
...observedMax ? [` ${observedMax}`] : [],
|
|
1593
|
+
...reference ? [
|
|
1594
|
+
` Observed reference from ${reference.sampleSize} call(s) on ${reference.observedAt}. ${reference.inputMode} Not a quote.`
|
|
1596
1595
|
] : [],
|
|
1596
|
+
...summary && summary !== price ? [` ${summary}`] : [],
|
|
1597
|
+
...(_nullishCoalesce(cost.details, () => ( []))).filter((detail) => detail !== price && detail !== summary).map((detail) => ` ${detail}`),
|
|
1597
1598
|
`Billing: ${billing}`
|
|
1598
1599
|
];
|
|
1599
1600
|
}
|
|
@@ -1602,19 +1603,19 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
|
1602
1603
|
console.log(line);
|
|
1603
1604
|
}
|
|
1604
1605
|
function printToolSchemaOnly(tool, requestedToolId) {
|
|
1605
|
-
if (
|
|
1606
|
+
if (_chunkFVM4PS5Qjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1606
1607
|
printMonitorTypeFilters(tool);
|
|
1607
1608
|
printMonitorTypeStreams(tool);
|
|
1608
1609
|
return;
|
|
1609
1610
|
}
|
|
1610
|
-
const contract =
|
|
1611
|
+
const contract = _chunkFVM4PS5Qjs.toolContractJsonForDescribe.call(void 0,
|
|
1611
1612
|
tool,
|
|
1612
1613
|
requestedToolId,
|
|
1613
1614
|
void 0,
|
|
1614
1615
|
seedToolListScript
|
|
1615
1616
|
);
|
|
1616
|
-
const inputFields =
|
|
1617
|
-
|
|
1617
|
+
const inputFields = _chunkFVM4PS5Qjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1618
|
+
_chunkFVM4PS5Qjs.recordField.call(void 0, contract, "inputSchema")
|
|
1618
1619
|
);
|
|
1619
1620
|
console.log(`Schema: ${contract.toolId}`);
|
|
1620
1621
|
if (!inputFields.length) {
|
|
@@ -1641,27 +1642,27 @@ function printToolSchemaOnly(tool, requestedToolId) {
|
|
|
1641
1642
|
}
|
|
1642
1643
|
printToolOutputArrayShape(contract);
|
|
1643
1644
|
const declaredSchema = declaredToolJsonSchema(
|
|
1644
|
-
|
|
1645
|
+
_chunkFVM4PS5Qjs.recordField.call(void 0, contract, "inputSchema")
|
|
1645
1646
|
);
|
|
1646
1647
|
if (declaredSchema) {
|
|
1647
1648
|
console.log("Declared input JSON Schema:");
|
|
1648
1649
|
console.log(JSON.stringify(declaredSchema, null, 2));
|
|
1649
1650
|
}
|
|
1650
|
-
if (
|
|
1651
|
+
if (_chunkFVM4PS5Qjs.isRecord.call(void 0, contract.responseSchema)) {
|
|
1651
1652
|
console.log("Deepline execution response JSON Schema:");
|
|
1652
1653
|
console.log(JSON.stringify(contract.responseSchema, null, 2));
|
|
1653
1654
|
}
|
|
1654
1655
|
}
|
|
1655
1656
|
function printToolExamplesOnly(tool, requestedToolId) {
|
|
1656
|
-
if (
|
|
1657
|
+
if (_chunkFVM4PS5Qjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1657
1658
|
printMonitorTypeDeploy(tool);
|
|
1658
1659
|
return;
|
|
1659
1660
|
}
|
|
1660
|
-
if (
|
|
1661
|
+
if (_chunkFVM4PS5Qjs.isPlayLikeTool.call(void 0, tool)) {
|
|
1661
1662
|
printPlayLikeToolUsage(tool, requestedToolId);
|
|
1662
1663
|
return;
|
|
1663
1664
|
}
|
|
1664
|
-
const contract =
|
|
1665
|
+
const contract = _chunkFVM4PS5Qjs.toolContractJsonForDescribe.call(void 0,
|
|
1665
1666
|
tool,
|
|
1666
1667
|
requestedToolId,
|
|
1667
1668
|
void 0,
|
|
@@ -1669,9 +1670,9 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1669
1670
|
);
|
|
1670
1671
|
const toolId = String(contract.toolId);
|
|
1671
1672
|
const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
|
|
1672
|
-
const examples =
|
|
1673
|
+
const examples = _chunkFVM4PS5Qjs.arrayField.call(void 0, tool, "examples").filter(_chunkFVM4PS5Qjs.isRecord);
|
|
1673
1674
|
const firstExample = examples[0];
|
|
1674
|
-
const sampleInput = firstExample &&
|
|
1675
|
+
const sampleInput = firstExample && _chunkFVM4PS5Qjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunkFVM4PS5Qjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunkFVM4PS5Qjs.samplePayloadForInputFields.call(void 0, inputFields)));
|
|
1675
1676
|
console.log("Example input payload:");
|
|
1676
1677
|
console.log(JSON.stringify(sampleInput, null, 2));
|
|
1677
1678
|
console.log(`Use in a play:`);
|
|
@@ -1685,32 +1686,32 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1685
1686
|
);
|
|
1686
1687
|
console.log("});");
|
|
1687
1688
|
console.log("const response = result.toolResponse.rawV2;");
|
|
1688
|
-
const getters =
|
|
1689
|
+
const getters = _chunkFVM4PS5Qjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1689
1690
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1690
1691
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1691
|
-
const firstGetter = valueGetters.find(
|
|
1692
|
+
const firstGetter = valueGetters.find(_chunkFVM4PS5Qjs.isRecord);
|
|
1692
1693
|
if (firstGetter) {
|
|
1693
|
-
const name =
|
|
1694
|
-
const expression =
|
|
1694
|
+
const name = _chunkFVM4PS5Qjs.stringField.call(void 0, firstGetter, "name") || "value";
|
|
1695
|
+
const expression = _chunkFVM4PS5Qjs.stringField.call(void 0, firstGetter, "expression");
|
|
1695
1696
|
if (expression)
|
|
1696
1697
|
console.log(
|
|
1697
1698
|
`const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
|
|
1698
1699
|
);
|
|
1699
1700
|
}
|
|
1700
1701
|
const arrayNames = new Set(
|
|
1701
|
-
|
|
1702
|
-
|
|
1702
|
+
_chunkFVM4PS5Qjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1703
|
+
_chunkFVM4PS5Qjs.recordField.call(void 0, tool, "outputSchema", "output_schema")
|
|
1703
1704
|
).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
|
|
1704
1705
|
);
|
|
1705
1706
|
const firstList = _nullishCoalesce(listGetters.find(
|
|
1706
|
-
(entry) =>
|
|
1707
|
-
), () => ( listGetters.find(
|
|
1708
|
-
if (
|
|
1709
|
-
const name = safeIdentifier(
|
|
1707
|
+
(entry) => _chunkFVM4PS5Qjs.isRecord.call(void 0, entry) && arrayNames.has(_chunkFVM4PS5Qjs.stringField.call(void 0, entry, "name"))
|
|
1708
|
+
), () => ( listGetters.find(_chunkFVM4PS5Qjs.isRecord)));
|
|
1709
|
+
if (_chunkFVM4PS5Qjs.isRecord.call(void 0, firstList)) {
|
|
1710
|
+
const name = safeIdentifier(_chunkFVM4PS5Qjs.stringField.call(void 0, firstList, "name") || "list");
|
|
1710
1711
|
if (_chunkJ33TSWO5js.playToolListGetterMode.call(void 0, ) === "array") {
|
|
1711
|
-
console.log(`const ${name}_rows = ${
|
|
1712
|
+
console.log(`const ${name}_rows = ${_chunkFVM4PS5Qjs.playResultExpression.call(void 0, firstList)};`);
|
|
1712
1713
|
} else {
|
|
1713
|
-
console.log(`const ${name}_ds = ${
|
|
1714
|
+
console.log(`const ${name}_ds = ${_chunkFVM4PS5Qjs.playResultExpression.call(void 0, firstList)};`);
|
|
1714
1715
|
console.log(
|
|
1715
1716
|
"// Complete small list from this response; throws above the memory cap."
|
|
1716
1717
|
);
|
|
@@ -1720,7 +1721,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1720
1721
|
console.log("```");
|
|
1721
1722
|
if (firstList) printListGetterConsumption();
|
|
1722
1723
|
for (const example of examples) {
|
|
1723
|
-
const description =
|
|
1724
|
+
const description = _chunkFVM4PS5Qjs.stringField.call(void 0, example, "description");
|
|
1724
1725
|
if (description) console.log(description);
|
|
1725
1726
|
console.log("Example Deepline execution response:");
|
|
1726
1727
|
console.log(JSON.stringify(example.response, null, 2));
|
|
@@ -1735,14 +1736,14 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1735
1736
|
}
|
|
1736
1737
|
function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
1737
1738
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1738
|
-
const inputFields =
|
|
1739
|
-
|
|
1739
|
+
const inputFields = _chunkFVM4PS5Qjs.toolInputFieldsForDisplay.call(void 0,
|
|
1740
|
+
_chunkFVM4PS5Qjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
|
|
1740
1741
|
);
|
|
1741
|
-
const sampleInput =
|
|
1742
|
-
const playReference =
|
|
1742
|
+
const sampleInput = _chunkFVM4PS5Qjs.samplePayloadForInputFields.call(void 0, inputFields);
|
|
1743
|
+
const playReference = _chunkFVM4PS5Qjs.playReferenceForTool.call(void 0, tool);
|
|
1743
1744
|
console.log("Run as a play:");
|
|
1744
1745
|
console.log(
|
|
1745
|
-
|
|
1746
|
+
_chunkFVM4PS5Qjs.playRunCommandForTool.call(void 0,
|
|
1746
1747
|
tool,
|
|
1747
1748
|
toolId,
|
|
1748
1749
|
Object.keys(sampleInput).length ? sampleInput : void 0
|
|
@@ -1753,13 +1754,13 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
|
1753
1754
|
}
|
|
1754
1755
|
}
|
|
1755
1756
|
function printToolGettersOnly(tool, requestedToolId) {
|
|
1756
|
-
const contract =
|
|
1757
|
+
const contract = _chunkFVM4PS5Qjs.toolContractJsonForDescribe.call(void 0,
|
|
1757
1758
|
tool,
|
|
1758
1759
|
requestedToolId,
|
|
1759
1760
|
void 0,
|
|
1760
1761
|
seedToolListScript
|
|
1761
1762
|
);
|
|
1762
|
-
const getters =
|
|
1763
|
+
const getters = _chunkFVM4PS5Qjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1763
1764
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1764
1765
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1765
1766
|
console.log(`Getters: ${contract.toolId}`);
|
|
@@ -1770,9 +1771,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1770
1771
|
if (listGetters.length) {
|
|
1771
1772
|
console.log(listGetterHeading());
|
|
1772
1773
|
for (const entry of listGetters) {
|
|
1773
|
-
if (
|
|
1774
|
+
if (_chunkFVM4PS5Qjs.isRecord.call(void 0, entry))
|
|
1774
1775
|
console.log(
|
|
1775
|
-
`- ${
|
|
1776
|
+
`- ${_chunkFVM4PS5Qjs.stringField.call(void 0, entry, "name")}: ${_chunkFVM4PS5Qjs.playResultExpression.call(void 0, entry)}`
|
|
1776
1777
|
);
|
|
1777
1778
|
}
|
|
1778
1779
|
printListGetterConsumption();
|
|
@@ -1780,9 +1781,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1780
1781
|
if (valueGetters.length) {
|
|
1781
1782
|
console.log("Values:");
|
|
1782
1783
|
for (const entry of valueGetters) {
|
|
1783
|
-
if (
|
|
1784
|
+
if (_chunkFVM4PS5Qjs.isRecord.call(void 0, entry))
|
|
1784
1785
|
console.log(
|
|
1785
|
-
`- ${
|
|
1786
|
+
`- ${_chunkFVM4PS5Qjs.stringField.call(void 0, entry, "name")}: ${_chunkFVM4PS5Qjs.playResultExpression.call(void 0, entry)}`
|
|
1786
1787
|
);
|
|
1787
1788
|
}
|
|
1788
1789
|
}
|
|
@@ -1820,22 +1821,22 @@ function listedToolDescription(tool) {
|
|
|
1820
1821
|
}
|
|
1821
1822
|
function formatListedToolCost(tool) {
|
|
1822
1823
|
const record = tool;
|
|
1823
|
-
if (
|
|
1824
|
+
if (_chunkFVM4PS5Qjs.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
|
|
1824
1825
|
return "Cost: Free";
|
|
1825
1826
|
}
|
|
1826
|
-
const pricing =
|
|
1827
|
-
const displayText =
|
|
1827
|
+
const pricing = _chunkFVM4PS5Qjs.recordField.call(void 0, record, "pricing");
|
|
1828
|
+
const displayText = _chunkFVM4PS5Qjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
1828
1829
|
return displayText ? `Cost: ${displayText}` : "";
|
|
1829
1830
|
}
|
|
1830
1831
|
function printToolOutputArrayShape(tool) {
|
|
1831
|
-
const outputFields =
|
|
1832
|
-
|
|
1832
|
+
const outputFields = _chunkFVM4PS5Qjs.toolOutputFieldsForDisplay.call(void 0,
|
|
1833
|
+
_chunkFVM4PS5Qjs.recordField.call(void 0, _chunkFVM4PS5Qjs.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
|
|
1833
1834
|
);
|
|
1834
1835
|
if (outputFields.length === 0) return;
|
|
1835
1836
|
console.log(" Output array shape (declared schema):");
|
|
1836
1837
|
for (const field of outputFields.slice(0, 60)) {
|
|
1837
1838
|
const name = String(field.name);
|
|
1838
|
-
const type =
|
|
1839
|
+
const type = _chunkFVM4PS5Qjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1839
1840
|
const itemBounds = arrayItemBoundsSuffix(field);
|
|
1840
1841
|
console.log(` - ${name}: ${type}${itemBounds}`);
|
|
1841
1842
|
}
|
|
@@ -1844,14 +1845,14 @@ function printToolOutputArrayShape(tool) {
|
|
|
1844
1845
|
}
|
|
1845
1846
|
}
|
|
1846
1847
|
function declaredToolJsonSchema(inputSchema) {
|
|
1847
|
-
if (
|
|
1848
|
+
if (_chunkFVM4PS5Qjs.isRecord.call(void 0, inputSchema.jsonSchema)) {
|
|
1848
1849
|
return inputSchema.jsonSchema;
|
|
1849
1850
|
}
|
|
1850
1851
|
return Array.isArray(inputSchema.fields) ? null : inputSchema;
|
|
1851
1852
|
}
|
|
1852
1853
|
function arrayItemBoundsSuffix(field) {
|
|
1853
|
-
const itemSchema =
|
|
1854
|
-
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type :
|
|
1854
|
+
const itemSchema = _chunkFVM4PS5Qjs.isRecord.call(void 0, field.items) ? field.items : null;
|
|
1855
|
+
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunkFVM4PS5Qjs.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
|
|
1855
1856
|
const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _14 => _14.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
|
|
1856
1857
|
const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
|
|
1857
1858
|
const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
|
|
@@ -1864,21 +1865,21 @@ function arrayItemBoundsSuffix(field) {
|
|
|
1864
1865
|
return itemTypeSuffix;
|
|
1865
1866
|
}
|
|
1866
1867
|
function printToolExecutionHints(value) {
|
|
1867
|
-
const batchCapabilityRecord =
|
|
1868
|
-
|
|
1868
|
+
const batchCapabilityRecord = _chunkFVM4PS5Qjs.recordField.call(void 0,
|
|
1869
|
+
_chunkFVM4PS5Qjs.isRecord.call(void 0, value) ? value : {},
|
|
1869
1870
|
"batchCapability",
|
|
1870
1871
|
"batch_capability"
|
|
1871
1872
|
);
|
|
1872
1873
|
const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
|
|
1873
|
-
const executionMetadata =
|
|
1874
|
-
|
|
1874
|
+
const executionMetadata = _chunkFVM4PS5Qjs.recordField.call(void 0,
|
|
1875
|
+
_chunkFVM4PS5Qjs.isRecord.call(void 0, value) ? value : {},
|
|
1875
1876
|
"executionMetadata",
|
|
1876
1877
|
"execution_metadata"
|
|
1877
1878
|
);
|
|
1878
1879
|
if (batchCapability) {
|
|
1879
|
-
const status =
|
|
1880
|
-
const surface =
|
|
1881
|
-
const operation =
|
|
1880
|
+
const status = _chunkFVM4PS5Qjs.stringField.call(void 0, batchCapability, "status") || "unknown";
|
|
1881
|
+
const surface = _chunkFVM4PS5Qjs.stringField.call(void 0, batchCapability, "surface");
|
|
1882
|
+
const operation = _chunkFVM4PS5Qjs.stringField.call(void 0,
|
|
1882
1883
|
batchCapability,
|
|
1883
1884
|
"batchOperation",
|
|
1884
1885
|
"batch_operation"
|
|
@@ -1888,7 +1889,7 @@ function printToolExecutionHints(value) {
|
|
|
1888
1889
|
"maxBatchSize",
|
|
1889
1890
|
"max_batch_size"
|
|
1890
1891
|
);
|
|
1891
|
-
const notes =
|
|
1892
|
+
const notes = _chunkFVM4PS5Qjs.stringField.call(void 0, batchCapability, "notes");
|
|
1892
1893
|
console.log("");
|
|
1893
1894
|
console.log("Batching:");
|
|
1894
1895
|
console.log(`- Catalog status: ${status}${surface ? ` (${surface})` : ""}`);
|
|
@@ -1907,11 +1908,11 @@ function printToolExecutionHints(value) {
|
|
|
1907
1908
|
}
|
|
1908
1909
|
if (notes) console.log(`- Details: ${notes}`);
|
|
1909
1910
|
}
|
|
1910
|
-
const configuredRateLimits =
|
|
1911
|
+
const configuredRateLimits = _chunkFVM4PS5Qjs.arrayField.call(void 0,
|
|
1911
1912
|
executionMetadata,
|
|
1912
1913
|
"configuredRateLimits",
|
|
1913
1914
|
"configured_rate_limits"
|
|
1914
|
-
).filter(
|
|
1915
|
+
).filter(_chunkFVM4PS5Qjs.isRecord);
|
|
1915
1916
|
if (configuredRateLimits.length > 0) {
|
|
1916
1917
|
console.log("");
|
|
1917
1918
|
console.log(
|
|
@@ -1921,7 +1922,7 @@ function printToolExecutionHints(value) {
|
|
|
1921
1922
|
const requests = numberField(limit, "requestsPerWindow");
|
|
1922
1923
|
const windowMs = numberField(limit, "windowMs");
|
|
1923
1924
|
if (requests === null || windowMs === null) continue;
|
|
1924
|
-
const usage =
|
|
1925
|
+
const usage = _chunkFVM4PS5Qjs.stringField.call(void 0, limit, "usage") || "unknown";
|
|
1925
1926
|
const usageText = usage === "queue_hint" ? "queue hint" : usage === "enforced" ? "Deepline enforced" : usage === "queue_hint_and_enforced" ? "queue hint and Deepline enforced" : usage === "disabled" ? "disabled" : usage;
|
|
1926
1927
|
const explicitMaxConcurrency = numberField(
|
|
1927
1928
|
limit,
|
|
@@ -1934,7 +1935,7 @@ function printToolExecutionHints(value) {
|
|
|
1934
1935
|
);
|
|
1935
1936
|
}
|
|
1936
1937
|
}
|
|
1937
|
-
const queueHint =
|
|
1938
|
+
const queueHint = _chunkFVM4PS5Qjs.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
|
|
1938
1939
|
const requestsPerSecondHint = numberField(
|
|
1939
1940
|
queueHint,
|
|
1940
1941
|
"requestsPerSecondHint",
|
|
@@ -1960,25 +1961,25 @@ function formatRateWindow(windowMs) {
|
|
|
1960
1961
|
}
|
|
1961
1962
|
function samplePayload(samples, key) {
|
|
1962
1963
|
const entry = samples[key];
|
|
1963
|
-
if (!
|
|
1964
|
+
if (!_chunkFVM4PS5Qjs.isRecord.call(void 0, entry)) return void 0;
|
|
1964
1965
|
return Object.prototype.hasOwnProperty.call(entry, "payload") ? entry.payload : entry;
|
|
1965
1966
|
}
|
|
1966
1967
|
function commandEnvelopeFromRawResponse(rawResponse) {
|
|
1967
|
-
return
|
|
1968
|
+
return _chunkFVM4PS5Qjs.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
|
|
1968
1969
|
}
|
|
1969
1970
|
function toolExecuteExitCode(envelope) {
|
|
1970
1971
|
return envelope.status === "failed" || envelope.ok === false ? 1 : 0;
|
|
1971
1972
|
}
|
|
1972
1973
|
function extractToolExecutionWarningMessages(rawResponse) {
|
|
1973
|
-
if (!
|
|
1974
|
+
if (!_chunkFVM4PS5Qjs.isRecord.call(void 0, rawResponse)) return [];
|
|
1974
1975
|
const candidates = [
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1976
|
+
_chunkFVM4PS5Qjs.recordField.call(void 0, _chunkFVM4PS5Qjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
|
|
1977
|
+
_chunkFVM4PS5Qjs.recordField.call(void 0,
|
|
1978
|
+
_chunkFVM4PS5Qjs.recordField.call(void 0, _chunkFVM4PS5Qjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
|
|
1978
1979
|
"meta"
|
|
1979
1980
|
),
|
|
1980
|
-
|
|
1981
|
-
|
|
1981
|
+
_chunkFVM4PS5Qjs.recordField.call(void 0, rawResponse, "meta"),
|
|
1982
|
+
_chunkFVM4PS5Qjs.recordField.call(void 0, _chunkFVM4PS5Qjs.recordField.call(void 0, rawResponse, "result"), "meta")
|
|
1982
1983
|
];
|
|
1983
1984
|
const messages = [];
|
|
1984
1985
|
for (const candidate of candidates) {
|
|
@@ -1987,8 +1988,8 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
1987
1988
|
for (const warning of warnings) {
|
|
1988
1989
|
if (typeof warning === "string" && warning.trim()) {
|
|
1989
1990
|
messages.push(warning.trim());
|
|
1990
|
-
} else if (
|
|
1991
|
-
const message =
|
|
1991
|
+
} else if (_chunkFVM4PS5Qjs.isRecord.call(void 0, warning)) {
|
|
1992
|
+
const message = _chunkFVM4PS5Qjs.stringField.call(void 0, warning, "message");
|
|
1992
1993
|
if (message) messages.push(message);
|
|
1993
1994
|
}
|
|
1994
1995
|
}
|
|
@@ -1996,20 +1997,20 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
1996
1997
|
return [...new Set(messages)];
|
|
1997
1998
|
}
|
|
1998
1999
|
function apifySyncRecoveryNext(rawResponse) {
|
|
1999
|
-
if (!
|
|
2000
|
-
const toolResponse =
|
|
2001
|
-
const raw =
|
|
2000
|
+
if (!_chunkFVM4PS5Qjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
|
|
2001
|
+
const toolResponse = _chunkFVM4PS5Qjs.recordField.call(void 0, rawResponse, "toolResponse");
|
|
2002
|
+
const raw = _chunkFVM4PS5Qjs.recordField.call(void 0, toolResponse, "raw");
|
|
2002
2003
|
if (raw.state !== "awaiting_apify") return null;
|
|
2003
|
-
const next =
|
|
2004
|
-
const getActorRun =
|
|
2005
|
-
const getActorRunTool =
|
|
2006
|
-
const getActorRunPayload =
|
|
2004
|
+
const next = _chunkFVM4PS5Qjs.recordField.call(void 0, raw, "next");
|
|
2005
|
+
const getActorRun = _chunkFVM4PS5Qjs.recordField.call(void 0, next, "getActorRun");
|
|
2006
|
+
const getActorRunTool = _chunkFVM4PS5Qjs.stringField.call(void 0, getActorRun, "tool");
|
|
2007
|
+
const getActorRunPayload = _chunkFVM4PS5Qjs.recordField.call(void 0, getActorRun, "payload");
|
|
2007
2008
|
if (!getActorRunTool || Object.keys(getActorRunPayload).length === 0) {
|
|
2008
2009
|
return null;
|
|
2009
2010
|
}
|
|
2010
|
-
const getDatasetItems =
|
|
2011
|
-
const getDatasetItemsTool =
|
|
2012
|
-
const getDatasetItemsPayload =
|
|
2011
|
+
const getDatasetItems = _chunkFVM4PS5Qjs.recordField.call(void 0, next, "getDatasetItems");
|
|
2012
|
+
const getDatasetItemsTool = _chunkFVM4PS5Qjs.stringField.call(void 0, getDatasetItems, "tool");
|
|
2013
|
+
const getDatasetItemsPayload = _chunkFVM4PS5Qjs.recordField.call(void 0, getDatasetItems, "payload");
|
|
2013
2014
|
return {
|
|
2014
2015
|
getActorRun: `deepline run ${getActorRunTool} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
|
|
2015
2016
|
...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
|
|
@@ -2019,7 +2020,7 @@ function apifySyncRecoveryNext(rawResponse) {
|
|
|
2019
2020
|
}
|
|
2020
2021
|
function listExtractorPathsFromUsageGuidance(tool) {
|
|
2021
2022
|
const toolExecutionResult = _optionalChain([tool, 'access', _16 => _16.usageGuidance, 'optionalAccess', _17 => _17.toolExecutionResult]);
|
|
2022
|
-
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists :
|
|
2023
|
+
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists : _chunkFVM4PS5Qjs.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _19 => _19.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
|
|
2023
2024
|
return extractedLists.flatMap((entry) => {
|
|
2024
2025
|
const paths = _nullishCoalesce(_optionalChain([entry, 'access', _20 => _20.details, 'optionalAccess', _21 => _21.candidatePaths]), () => ( _optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.rawToolOutputPaths])));
|
|
2025
2026
|
if (!Array.isArray(paths)) return [];
|
|
@@ -2104,7 +2105,7 @@ function parseJsonObjectArgument(raw, flagName) {
|
|
|
2104
2105
|
}
|
|
2105
2106
|
throw invalidJsonError(flagName, message);
|
|
2106
2107
|
}
|
|
2107
|
-
if (!
|
|
2108
|
+
if (!_chunkFVM4PS5Qjs.isRecord.call(void 0, parsed)) {
|
|
2108
2109
|
throw invalidJsonError(flagName, "expected an object.");
|
|
2109
2110
|
}
|
|
2110
2111
|
return parsed;
|
|
@@ -2148,7 +2149,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2148
2149
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2149
2150
|
}
|
|
2150
2151
|
if (options.idempotencyKey !== void 0) {
|
|
2151
|
-
|
|
2152
|
+
_chunkUOANF3DRjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2152
2153
|
}
|
|
2153
2154
|
if (options.recoveryTimeoutMs !== void 0) {
|
|
2154
2155
|
const parsed = Number(options.recoveryTimeoutMs);
|
|
@@ -2277,7 +2278,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2277
2278
|
kind: summaryEntries.length > 0 ? "object" : "raw",
|
|
2278
2279
|
summary: input.summary
|
|
2279
2280
|
};
|
|
2280
|
-
const envelopeHasCanonicalOutput =
|
|
2281
|
+
const envelopeHasCanonicalOutput = _chunkFVM4PS5Qjs.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
|
|
2281
2282
|
const envelopeHasDeclaredOutput = Object.prototype.hasOwnProperty.call(
|
|
2282
2283
|
envelope,
|
|
2283
2284
|
"output"
|
|
@@ -2305,7 +2306,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2305
2306
|
return {
|
|
2306
2307
|
...envelope,
|
|
2307
2308
|
...input.idempotencyKey ? { idempotency_key: input.idempotencyKey } : {},
|
|
2308
|
-
...
|
|
2309
|
+
..._chunkFVM4PS5Qjs.isRecord.call(void 0, input.rawResponse) && _chunkFVM4PS5Qjs.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
|
|
2309
2310
|
...envelopeHasCanonicalOutput || envelopeHasDeclaredOutput ? { output_preview: outputPreview } : { output: outputPreview },
|
|
2310
2311
|
...summaryEntries.length > 0 ? { summary: input.summary } : {},
|
|
2311
2312
|
...warningMessages.length > 0 ? { warnings: warningMessages } : {},
|
|
@@ -2366,7 +2367,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
|
|
|
2366
2367
|
void _render;
|
|
2367
2368
|
void _next;
|
|
2368
2369
|
void _local;
|
|
2369
|
-
const billingLookup =
|
|
2370
|
+
const billingLookup = _chunkFVM4PS5Qjs.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
|
|
2370
2371
|
const inspection = toolExecutionInspection(input);
|
|
2371
2372
|
return {
|
|
2372
2373
|
...base,
|
|
@@ -2462,7 +2463,7 @@ function printToolExecutionWarnings(toolId, params, metadata) {
|
|
|
2462
2463
|
}
|
|
2463
2464
|
}
|
|
2464
2465
|
function assertExecutableToolMetadata(toolId, metadata) {
|
|
2465
|
-
if (
|
|
2466
|
+
if (_chunkFVM4PS5Qjs.isPlayLikeTool.call(void 0, metadata)) {
|
|
2466
2467
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
2467
2468
|
playLikeToolExecuteErrorMessage(
|
|
2468
2469
|
toolId,
|
|
@@ -2480,7 +2481,7 @@ function valueAt(value, path) {
|
|
|
2480
2481
|
for (const [index, part] of parts.entries()) {
|
|
2481
2482
|
const each = part === "*" || part.endsWith("[*]");
|
|
2482
2483
|
if (part !== "*") {
|
|
2483
|
-
at =
|
|
2484
|
+
at = _chunkFVM4PS5Qjs.isRecord.call(void 0, at) ? at[each ? part.slice(0, -3) : part] : void 0;
|
|
2484
2485
|
}
|
|
2485
2486
|
if (!each) continue;
|
|
2486
2487
|
if (!Array.isArray(at)) return void 0;
|
|
@@ -2496,7 +2497,7 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2496
2497
|
const getters = ["extractedValues", "extractedLists"].flatMap(
|
|
2497
2498
|
(kind) => {
|
|
2498
2499
|
const group = _optionalChain([result, 'optionalAccess', _28 => _28[kind]]);
|
|
2499
|
-
return Array.isArray(group) ? group :
|
|
2500
|
+
return Array.isArray(group) ? group : _chunkFVM4PS5Qjs.isRecord.call(void 0, group) ? Object.entries(group).map(([name, getter]) => ({
|
|
2500
2501
|
name,
|
|
2501
2502
|
...getter
|
|
2502
2503
|
})) : [];
|
|
@@ -2521,13 +2522,13 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2521
2522
|
}
|
|
2522
2523
|
function writeToolReceipt(input) {
|
|
2523
2524
|
const { response, metadata } = input;
|
|
2524
|
-
const envelope =
|
|
2525
|
+
const envelope = _chunkFVM4PS5Qjs.isRecord.call(void 0, response) ? response : {};
|
|
2525
2526
|
const jobId = typeof envelope.job_id === "string" ? envelope.job_id : null;
|
|
2526
|
-
const toolResponse =
|
|
2527
|
+
const toolResponse = _chunkFVM4PS5Qjs.recordField.call(void 0, envelope, "toolResponse");
|
|
2527
2528
|
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;
|
|
2528
2529
|
const status = typeof envelope.status === "string" ? envelope.status : "completed";
|
|
2529
|
-
const charged =
|
|
2530
|
-
|
|
2530
|
+
const charged = _chunkFVM4PS5Qjs.recordField.call(void 0, envelope, "billing").credits_charged;
|
|
2531
|
+
_chunkX5MGQ7UTjs.writeExecutionOutput.call(void 0,
|
|
2531
2532
|
{
|
|
2532
2533
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2533
2534
|
status,
|
|
@@ -2558,8 +2559,8 @@ async function executeToolForReceipt(input) {
|
|
|
2558
2559
|
let retryKey = null;
|
|
2559
2560
|
let received = false;
|
|
2560
2561
|
try {
|
|
2561
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2562
|
-
const client = new (0,
|
|
2562
|
+
const cliInvocationId = _nullishCoalesce(_chunkWKFAX2K7js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkWKFAX2K7js.beginToolExecuteCommand.call(void 0, )));
|
|
2563
|
+
const client = new (0, _chunkXMKUJ44Zjs.DeeplineClient)();
|
|
2563
2564
|
const metadata = assertExecutableToolMetadata(
|
|
2564
2565
|
toolId,
|
|
2565
2566
|
await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
|
|
@@ -2580,9 +2581,9 @@ async function executeToolForReceipt(input) {
|
|
|
2580
2581
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2581
2582
|
..._optionalChain([metadata, 'access', _35 => _35.executionMetadata, 'optionalAccess', _36 => _36.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2582
2583
|
...key ? { idempotencyKey: key } : {},
|
|
2583
|
-
searchRef:
|
|
2584
|
+
searchRef: _chunk32YQBJONjs.recentSearchRef.call(void 0, ),
|
|
2584
2585
|
cliInvocationId,
|
|
2585
|
-
onResponseReceived:
|
|
2586
|
+
onResponseReceived: _chunkX5MGQ7UTjs.recordApiResponse
|
|
2586
2587
|
}).catch((error) => {
|
|
2587
2588
|
const guidance = toolGuidanceLines(metadata.guidance);
|
|
2588
2589
|
if (guidance.length)
|
|
@@ -2605,7 +2606,7 @@ async function executeToolForReceipt(input) {
|
|
|
2605
2606
|
if (received) throw error;
|
|
2606
2607
|
const outcomeKnown = answeredWithFailure(error);
|
|
2607
2608
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _37 => _37.discard, 'call', _38 => _38()]);
|
|
2608
|
-
|
|
2609
|
+
_chunkX5MGQ7UTjs.writeExecutionOutput.call(void 0,
|
|
2609
2610
|
{
|
|
2610
2611
|
id: outcomeKnown ? null : key,
|
|
2611
2612
|
status: "failed",
|
|
@@ -2629,11 +2630,11 @@ function answeredWithFailure(error) {
|
|
|
2629
2630
|
error.statusCode !== 408 && error.code !== "EXECUTION_OUTCOME_UNKNOWN";
|
|
2630
2631
|
}
|
|
2631
2632
|
async function getToolExecutionReceipt(key, output) {
|
|
2632
|
-
const client = new (0,
|
|
2633
|
+
const client = new (0, _chunkXMKUJ44Zjs.DeeplineClient)();
|
|
2633
2634
|
const execution = await client.executions.getByKey(key);
|
|
2634
2635
|
output.label = `${execution.toolId} (tool)`;
|
|
2635
2636
|
if (execution.response === void 0) {
|
|
2636
|
-
|
|
2637
|
+
_chunkX5MGQ7UTjs.writeExecutionOutput.call(void 0,
|
|
2637
2638
|
{
|
|
2638
2639
|
id: key,
|
|
2639
2640
|
status: execution.executionRecovery.state,
|
|
@@ -2662,19 +2663,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2662
2663
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2663
2664
|
} catch (error) {
|
|
2664
2665
|
if (wantsJson) {
|
|
2665
|
-
|
|
2666
|
+
_chunkYDXEXVBVjs.printJsonError.call(void 0, error);
|
|
2666
2667
|
} else {
|
|
2667
2668
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2668
2669
|
}
|
|
2669
2670
|
return error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2670
2671
|
}
|
|
2671
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2672
|
+
const cliInvocationId = _nullishCoalesce(_chunkWKFAX2K7js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkWKFAX2K7js.beginToolExecuteCommand.call(void 0, )));
|
|
2672
2673
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2673
|
-
const tracing =
|
|
2674
|
+
const tracing = _chunkAJL2Q6IQjs.isCliTraceEnabled.call(void 0, );
|
|
2674
2675
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2675
|
-
const client = new (0,
|
|
2676
|
+
const client = new (0, _chunkXMKUJ44Zjs.DeeplineClient)();
|
|
2676
2677
|
if (clientStartedAt !== void 0) {
|
|
2677
|
-
|
|
2678
|
+
_chunkAJL2Q6IQjs.recordCliTrace.call(void 0, {
|
|
2678
2679
|
phase: "cli.tool_execute_client_setup",
|
|
2679
2680
|
ms: performance.now() - clientStartedAt
|
|
2680
2681
|
});
|
|
@@ -2683,13 +2684,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2683
2684
|
const readMetadata = async () => {
|
|
2684
2685
|
if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2685
2686
|
try {
|
|
2686
|
-
metadata = await
|
|
2687
|
+
metadata = await _chunkWKFAX2K7js.runToolExecuteStage.call(void 0,
|
|
2687
2688
|
"tool metadata lookup",
|
|
2688
2689
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2689
2690
|
);
|
|
2690
2691
|
} catch (error) {
|
|
2691
2692
|
if (isMissingToolMetadataError(error)) {
|
|
2692
|
-
const play = await
|
|
2693
|
+
const play = await _chunkWKFAX2K7js.runToolExecuteStage.call(void 0,
|
|
2693
2694
|
"play alias lookup",
|
|
2694
2695
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2695
2696
|
);
|
|
@@ -2718,7 +2719,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2718
2719
|
assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2719
2720
|
} catch (error) {
|
|
2720
2721
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2721
|
-
if (wantsJson)
|
|
2722
|
+
if (wantsJson) _chunkYDXEXVBVjs.printJsonError.call(void 0, error);
|
|
2722
2723
|
else console.error(error.message);
|
|
2723
2724
|
return 2;
|
|
2724
2725
|
}
|
|
@@ -2730,7 +2731,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2730
2731
|
metadata = await readMetadata();
|
|
2731
2732
|
} catch (error) {
|
|
2732
2733
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2733
|
-
if (wantsJson)
|
|
2734
|
+
if (wantsJson) _chunkYDXEXVBVjs.printJsonError.call(void 0, error);
|
|
2734
2735
|
else console.error(error.message);
|
|
2735
2736
|
return 2;
|
|
2736
2737
|
}
|
|
@@ -2746,7 +2747,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2746
2747
|
metadata = await readMetadata();
|
|
2747
2748
|
} catch (error) {
|
|
2748
2749
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2749
|
-
if (wantsJson)
|
|
2750
|
+
if (wantsJson) _chunkYDXEXVBVjs.printJsonError.call(void 0, error);
|
|
2750
2751
|
else console.error(error.message);
|
|
2751
2752
|
return 2;
|
|
2752
2753
|
}
|
|
@@ -2772,11 +2773,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2772
2773
|
responseIntent,
|
|
2773
2774
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2774
2775
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2775
|
-
searchRef:
|
|
2776
|
+
searchRef: _chunk32YQBJONjs.recentSearchRef.call(void 0, ),
|
|
2776
2777
|
cliInvocationId,
|
|
2777
|
-
onResponseReceived:
|
|
2778
|
+
onResponseReceived: _chunkX5MGQ7UTjs.recordApiResponse,
|
|
2778
2779
|
...tracing ? {
|
|
2779
|
-
onServerTiming: (serverTiming) =>
|
|
2780
|
+
onServerTiming: (serverTiming) => _chunkAJL2Q6IQjs.recordCliTrace.call(void 0, {
|
|
2780
2781
|
phase: "tool_execute_server_timing",
|
|
2781
2782
|
cliInvocationId,
|
|
2782
2783
|
serverTiming,
|
|
@@ -2787,13 +2788,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2787
2788
|
let rawResponse;
|
|
2788
2789
|
let successfulCompatibilityResponse;
|
|
2789
2790
|
try {
|
|
2790
|
-
const executeResult = await
|
|
2791
|
+
const executeResult = await _chunkWKFAX2K7js.runToolExecuteStage.call(void 0,
|
|
2791
2792
|
"execute request",
|
|
2792
2793
|
async () => {
|
|
2793
2794
|
try {
|
|
2794
2795
|
if (tracing) {
|
|
2795
2796
|
submissionStartedAt = performance.now();
|
|
2796
|
-
|
|
2797
|
+
_chunkAJL2Q6IQjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2797
2798
|
}
|
|
2798
2799
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2799
2800
|
...executeOptions,
|
|
@@ -2803,34 +2804,34 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2803
2804
|
} catch (error) {
|
|
2804
2805
|
if (!(error instanceof _chunkDIAWYWT5js.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2805
2806
|
throw error;
|
|
2806
|
-
const baseUrl =
|
|
2807
|
+
const baseUrl = _chunkJLYDLK6Xjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2807
2808
|
if (maintenancePolicy !== "off") {
|
|
2808
|
-
|
|
2809
|
+
_chunkQNELA7SXjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2809
2810
|
}
|
|
2810
|
-
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await
|
|
2811
|
+
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await _chunkWKFAX2K7js.runToolExecuteStage.call(void 0,
|
|
2811
2812
|
"SDK compatibility",
|
|
2812
|
-
() =>
|
|
2813
|
+
() => _chunkQNELA7SXjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
2813
2814
|
command: "tools execute",
|
|
2814
|
-
skillsVersion:
|
|
2815
|
+
skillsVersion: _chunkJLYDLK6Xjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2815
2816
|
persistCache: maintenancePolicy !== "off"
|
|
2816
2817
|
})
|
|
2817
2818
|
);
|
|
2818
2819
|
if (compatibility.error) throw compatibility.error;
|
|
2819
2820
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _44 => _44.readMetadata, 'call', _45 => _45()]), () => ( metadata));
|
|
2820
|
-
if (maintenancePolicy !== "off" && await
|
|
2821
|
+
if (maintenancePolicy !== "off" && await _chunkWKFAX2K7js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2821
2822
|
compatibility.response,
|
|
2822
2823
|
baseUrl,
|
|
2823
2824
|
maintenancePolicy
|
|
2824
2825
|
)) {
|
|
2825
2826
|
return void 0;
|
|
2826
2827
|
}
|
|
2827
|
-
|
|
2828
|
+
_chunkQNELA7SXjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
2828
2829
|
quietAdvisory: wantsJson
|
|
2829
2830
|
});
|
|
2830
2831
|
if (maintenancePolicy !== "off") {
|
|
2831
|
-
await
|
|
2832
|
+
await _chunkWKFAX2K7js.runToolExecuteStage.call(void 0,
|
|
2832
2833
|
"agent skills sync",
|
|
2833
|
-
() =>
|
|
2834
|
+
() => _chunkQNELA7SXjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2834
2835
|
update: _optionalChain([compatibility, 'access', _46 => _46.response, 'optionalAccess', _47 => _47.skills]),
|
|
2835
2836
|
mode: "detached"
|
|
2836
2837
|
})
|
|
@@ -2839,7 +2840,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2839
2840
|
const legacyMetadata = await readMetadata();
|
|
2840
2841
|
if (tracing) {
|
|
2841
2842
|
submissionStartedAt = performance.now();
|
|
2842
|
-
|
|
2843
|
+
_chunkAJL2Q6IQjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2843
2844
|
}
|
|
2844
2845
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2845
2846
|
...executeOptions,
|
|
@@ -2862,8 +2863,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2862
2863
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2863
2864
|
const updateRequiredBeforeExecution = error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2864
2865
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2865
|
-
const baseUrl =
|
|
2866
|
-
if (await
|
|
2866
|
+
const baseUrl = _chunkJLYDLK6Xjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2867
|
+
if (await _chunkWKFAX2K7js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2867
2868
|
compatibility.response,
|
|
2868
2869
|
baseUrl,
|
|
2869
2870
|
maintenancePolicy
|
|
@@ -2887,7 +2888,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2887
2888
|
}
|
|
2888
2889
|
}
|
|
2889
2890
|
if (failure instanceof _chunkDIAWYWT5js.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2890
|
-
if (wantsJson)
|
|
2891
|
+
if (wantsJson) _chunkYDXEXVBVjs.printJsonError.call(void 0, failure);
|
|
2891
2892
|
else console.error(failure.message);
|
|
2892
2893
|
return 2;
|
|
2893
2894
|
}
|
|
@@ -2914,9 +2915,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2914
2915
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
2915
2916
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _54 => _54.auto_update]);
|
|
2916
2917
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _55 => _55.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
2917
|
-
await
|
|
2918
|
+
await _chunkWKFAX2K7js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2918
2919
|
compatibilityResponse,
|
|
2919
|
-
|
|
2920
|
+
_chunkJLYDLK6Xjs.resolveConfig.call(void 0, ).baseUrl,
|
|
2920
2921
|
maintenancePolicy
|
|
2921
2922
|
);
|
|
2922
2923
|
}
|
|
@@ -2934,8 +2935,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2934
2935
|
);
|
|
2935
2936
|
}
|
|
2936
2937
|
}
|
|
2937
|
-
const responseMetadata =
|
|
2938
|
-
|
|
2938
|
+
const responseMetadata = _chunkFVM4PS5Qjs.recordField.call(void 0,
|
|
2939
|
+
_chunkFVM4PS5Qjs.recordField.call(void 0, rawResponse, "_metadata"),
|
|
2939
2940
|
"tool"
|
|
2940
2941
|
);
|
|
2941
2942
|
const listOutputPaths = responseMetadata.listOutputPaths;
|
|
@@ -2947,11 +2948,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2947
2948
|
await readMetadata()
|
|
2948
2949
|
);
|
|
2949
2950
|
}
|
|
2950
|
-
if (
|
|
2951
|
+
if (_chunkFVM4PS5Qjs.isRecord.call(void 0, rawResponse)) {
|
|
2951
2952
|
const { _metadata, ...execution } = rawResponse;
|
|
2952
2953
|
rawResponse = execution;
|
|
2953
2954
|
}
|
|
2954
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
2955
|
+
const { listConversion, summary, baseEnvelope } = await _chunkWKFAX2K7js.runToolExecuteStage.call(void 0,
|
|
2955
2956
|
"result formatting",
|
|
2956
2957
|
async () => {
|
|
2957
2958
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -2986,9 +2987,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2986
2987
|
}
|
|
2987
2988
|
skillsSyncAttempted = true;
|
|
2988
2989
|
try {
|
|
2989
|
-
await
|
|
2990
|
+
await _chunkWKFAX2K7js.runToolExecuteStage.call(void 0,
|
|
2990
2991
|
"agent skills sync",
|
|
2991
|
-
() =>
|
|
2992
|
+
() => _chunkQNELA7SXjs.syncSdkSkillsIfNeeded.call(void 0, _chunkJLYDLK6Xjs.resolveConfig.call(void 0, ).baseUrl, {
|
|
2992
2993
|
update: deliveredCompatibilityResponse.skills,
|
|
2993
2994
|
mode: "detached"
|
|
2994
2995
|
})
|
|
@@ -2999,15 +3000,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2999
3000
|
);
|
|
3000
3001
|
}
|
|
3001
3002
|
};
|
|
3002
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
3003
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkYDXEXVBVjs.printCommandEnvelope.call(void 0, envelope, {
|
|
3003
3004
|
...options2,
|
|
3004
3005
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
3005
3006
|
});
|
|
3006
3007
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
3007
3008
|
await syncSkillsForDeliveredOutput();
|
|
3008
|
-
|
|
3009
|
+
_chunkYDXEXVBVjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
3009
3010
|
};
|
|
3010
|
-
const delivered = await
|
|
3011
|
+
const delivered = await _chunkWKFAX2K7js.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
3011
3012
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
3012
3013
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
3013
3014
|
return true;
|
|
@@ -3020,7 +3021,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3020
3021
|
await printDeliveredJsonEnvelope({
|
|
3021
3022
|
...baseEnvelope,
|
|
3022
3023
|
local: {
|
|
3023
|
-
...
|
|
3024
|
+
..._chunkFVM4PS5Qjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
|
|
3024
3025
|
payload_file: jsonPath
|
|
3025
3026
|
}
|
|
3026
3027
|
});
|
|
@@ -3036,7 +3037,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3036
3037
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3037
3038
|
);
|
|
3038
3039
|
if (wantsJson) {
|
|
3039
|
-
|
|
3040
|
+
_chunkYDXEXVBVjs.printJsonError.call(void 0, error);
|
|
3040
3041
|
} else {
|
|
3041
3042
|
console.error(error.message);
|
|
3042
3043
|
}
|
|
@@ -3131,13 +3132,13 @@ inspect: ${inspection.inspect}
|
|
|
3131
3132
|
return true;
|
|
3132
3133
|
});
|
|
3133
3134
|
if (delivered) {
|
|
3134
|
-
await
|
|
3135
|
+
await _chunkWKFAX2K7js.runToolExecuteStage.call(void 0,
|
|
3135
3136
|
"acknowledge delivery",
|
|
3136
3137
|
() => recovery.acknowledgeDelivery()
|
|
3137
3138
|
);
|
|
3138
3139
|
}
|
|
3139
3140
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3140
|
-
|
|
3141
|
+
_chunkQNELA7SXjs.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3141
3142
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _58 => _58.auto_update, 'optionalAccess', _59 => _59.should_auto_update]) === true
|
|
3142
3143
|
});
|
|
3143
3144
|
}
|