deepline 0.3.557 → 0.3.559
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/redaction.ts +23 -1
- package/dist/bundling-sources/shared_libs/observability/telemetry.ts +4 -1
- package/dist/cli/auth-3SBMYRAJ.js +44 -0
- package/dist/cli/{auth-SGWFS2DS.mjs → auth-D6S6E7BL.mjs} +5 -5
- package/dist/cli/{billing-XJZX3JSG.mjs → billing-3BNTAYUY.mjs} +8 -8
- package/dist/cli/{billing-G6C2LUSN.js → billing-7YRVKWAU.js} +99 -99
- package/dist/cli/{chunk-TPRMS2D7.mjs → chunk-22Z2U5MW.mjs} +3 -3
- package/dist/cli/{chunk-7AMUXIZ5.js → chunk-24XWLHKJ.js} +1 -1
- package/dist/cli/{chunk-UP2CQTGX.js → chunk-2YQGXPQ7.js} +2 -2
- package/dist/cli/{chunk-XJUHHIH4.mjs → chunk-3MVBZ4XI.mjs} +5 -5
- package/dist/cli/{chunk-24PL5QN5.mjs → chunk-53HQJS6D.mjs} +1 -1
- package/dist/cli/{chunk-CPDXS2UK.js → chunk-6ASDTHEN.js} +17 -17
- package/dist/cli/{chunk-ODBQY6MD.js → chunk-6BJHMXMA.js} +2 -2
- package/dist/cli/{chunk-L7DGWNF7.js → chunk-A4KQZ6P5.js} +8 -8
- package/dist/cli/{chunk-VLXLKNR4.mjs → chunk-BM4GE67C.mjs} +2 -1
- package/dist/cli/{chunk-PITVKXY3.mjs → chunk-D7DXRFM2.mjs} +1 -1
- package/dist/cli/{chunk-WSX76BQX.js → chunk-EEUJNR5K.js} +6 -6
- package/dist/cli/{chunk-4AE3A4SL.mjs → chunk-ENHQBPR5.mjs} +1 -1
- package/dist/cli/{chunk-5H7BLMNH.js → chunk-EYL4V32Q.js} +4 -4
- package/dist/cli/{chunk-5S2G32ZX.js → chunk-FDVSB4NF.js} +53 -53
- package/dist/cli/{chunk-JORWYP5P.mjs → chunk-FHMGNUOP.mjs} +1 -1
- package/dist/cli/{chunk-MZSUMGWN.js → chunk-G7IGOVPF.js} +20 -20
- package/dist/cli/{chunk-JX4X4KAZ.mjs → chunk-GETMCDVX.mjs} +7 -7
- package/dist/cli/{chunk-A6FYP3KU.js → chunk-GFHBS7HG.js} +5 -5
- package/dist/cli/{chunk-NW6NYTYM.mjs → chunk-GWS7XJI2.mjs} +4 -4
- package/dist/cli/{chunk-NXYBZSRL.mjs → chunk-HUJMFETO.mjs} +2 -2
- package/dist/cli/{chunk-VVGGQBAV.mjs → chunk-II33OPIO.mjs} +2 -2
- package/dist/cli/{chunk-UVFR7FW4.js → chunk-IUDO463I.js} +20 -20
- package/dist/cli/{chunk-B2V6NKX7.js → chunk-JME33A35.js} +20 -20
- package/dist/cli/{chunk-JMDLLVIR.js → chunk-JUTXZW3S.js} +11 -11
- package/dist/cli/{chunk-DTMUYIUO.js → chunk-K5BZF2VO.js} +9 -9
- package/dist/cli/{chunk-5RVSMMQV.mjs → chunk-KACD2TYW.mjs} +2 -2
- package/dist/cli/{chunk-YQDBHVYJ.mjs → chunk-KGCY3MSS.mjs} +5 -5
- package/dist/cli/{chunk-2YT2TFNX.js → chunk-LHPYCJNL.js} +2 -1
- package/dist/cli/{chunk-YUB7OX65.mjs → chunk-LTCV5BI2.mjs} +1 -1
- package/dist/cli/{chunk-L5JD66EF.js → chunk-LWOYDMYC.js} +3 -3
- package/dist/cli/{chunk-WZKWSIZS.mjs → chunk-MJ4JEJLL.mjs} +1 -1
- package/dist/cli/{chunk-TW7HFIQG.mjs → chunk-MPEMAGZS.mjs} +13 -13
- package/dist/cli/{chunk-ARYKF2YT.mjs → chunk-MWZEGRY2.mjs} +2 -2
- package/dist/cli/{chunk-4YNKJTCP.mjs → chunk-OFC24U3N.mjs} +2 -2
- package/dist/cli/{chunk-EZNYE6GZ.js → chunk-OJ3FRPEP.js} +10 -10
- package/dist/cli/{chunk-NHGQHMV7.js → chunk-OSHKFYY4.js} +41 -41
- package/dist/cli/{chunk-GENZXMNR.mjs → chunk-P2DFD2NG.mjs} +1 -1
- package/dist/cli/{chunk-JY2EJQL5.js → chunk-PNFC7VHH.js} +5 -5
- package/dist/cli/{chunk-6C3E6ZZ3.js → chunk-PQ52YTDB.js} +13 -13
- package/dist/cli/{chunk-OOCGLW46.mjs → chunk-PZUBDHQ7.mjs} +4 -4
- package/dist/cli/{chunk-25SOYGAX.js → chunk-QGVOD6Y4.js} +274 -274
- package/dist/cli/{chunk-JWPJXCD2.js → chunk-QQ6AVBHW.js} +23 -23
- package/dist/cli/{chunk-6ZBAXLOR.js → chunk-SSE5P2CX.js} +12 -12
- package/dist/cli/{chunk-PK6MYC5E.js → chunk-TBLP7HDL.js} +7 -7
- package/dist/cli/{chunk-C46GRCHZ.js → chunk-TIMFDVUN.js} +48 -48
- package/dist/cli/{chunk-K35ZLTN2.js → chunk-TPLISQND.js} +5 -5
- package/dist/cli/{chunk-CDLTF6M2.mjs → chunk-UA2VLWZH.mjs} +2 -2
- package/dist/cli/{chunk-C6M5TIPZ.mjs → chunk-UHIOXXAO.mjs} +1 -1
- package/dist/cli/{chunk-U7LDRRRB.mjs → chunk-URACGTQE.mjs} +1 -1
- package/dist/cli/{chunk-OBW2YFHR.mjs → chunk-VZKBLSTA.mjs} +2 -2
- package/dist/cli/{chunk-ZAR6JSI6.js → chunk-WZUOUQZ3.js} +3 -3
- package/dist/cli/{chunk-T26CM5LC.js → chunk-XNN45XYF.js} +2 -2
- package/dist/cli/{chunk-GC4HHDE4.mjs → chunk-XPS2UBYV.mjs} +3 -3
- package/dist/cli/{chunk-DUXL7U7U.mjs → chunk-XXZDT3U7.mjs} +2 -2
- package/dist/cli/{chunk-NWQZIBPY.js → chunk-YE7OCVI5.js} +26 -26
- package/dist/cli/{chunk-QUAPOFCA.mjs → chunk-YFUFYV4M.mjs} +5 -5
- package/dist/cli/{chunk-2TTAHHSJ.mjs → chunk-YODGCJPX.mjs} +2 -2
- package/dist/cli/{chunk-ZKLUGMPE.mjs → chunk-ZMC5FEJN.mjs} +2 -2
- package/dist/cli/{concurrent-runs-help-HSBXPVDN.mjs → concurrent-runs-help-FCAZLZNA.mjs} +6 -6
- package/dist/cli/concurrent-runs-help-TVQO4USY.js +22 -0
- package/dist/cli/{csv-OQGWJ4HU.mjs → csv-BC26EB4B.mjs} +4 -4
- package/dist/cli/{csv-JEOU3DOF.js → csv-SCIQKZNH.js} +13 -13
- package/dist/cli/{db-75WPSR3C.js → db-IJRJVIQ3.js} +27 -27
- package/dist/cli/{db-YHCKYQJI.mjs → db-RVOPGYKY.mjs} +6 -6
- package/dist/cli/describe-4FBGZZK5.js +50 -0
- package/dist/cli/{describe-TSW245QQ.mjs → describe-K7CRL4PA.mjs} +21 -21
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-PNSETDOA.js → executions-IEVLTSXV.js} +8 -8
- package/dist/cli/{executions-NW3SQULX.mjs → executions-PDOO2GFK.mjs} +6 -6
- package/dist/cli/{feedback-R2Y4APBY.mjs → feedback-7YVUUROQ.mjs} +6 -6
- package/dist/cli/{feedback-LXTVGS4E.js → feedback-KHYOWTXA.js} +14 -14
- package/dist/cli/{git-S7DESBSB.mjs → git-426CAP5S.mjs} +5 -5
- package/dist/cli/git-O6A2FVJE.js +26 -0
- package/dist/cli/index.js +143 -143
- package/dist/cli/index.mjs +45 -45
- package/dist/cli/{integrations-ZLMM2CMG.js → integrations-BVHTRN3W.js} +15 -15
- package/dist/cli/{integrations-CQWODJ23.mjs → integrations-TNJ4IELE.mjs} +7 -7
- package/dist/cli/{legacy-noops-EGD7QOML.mjs → legacy-noops-2GB35THO.mjs} +6 -6
- package/dist/cli/{legacy-noops-4UDVSN5R.js → legacy-noops-F73BMPBV.js} +9 -9
- package/dist/cli/{mcp-Q3SKD3A2.mjs → mcp-BAGMQXNR.mjs} +4 -4
- package/dist/cli/{mcp-5W4HWAMB.js → mcp-KMTC7OBK.js} +24 -24
- package/dist/cli/{monitors-ZXHOLBOO.mjs → monitors-ECONWLHL.mjs} +7 -7
- package/dist/cli/{monitors-NA6QQRUK.js → monitors-O2BUIK7Q.js} +100 -100
- package/dist/cli/{org-25E7SBZP.js → org-5NQQ4PRU.js} +121 -121
- package/dist/cli/{org-O3NSKVA7.mjs → org-AEZZBWA3.mjs} +6 -6
- package/dist/cli/{outcomes-O5DS5XSH.js → outcomes-IKEQKAF7.js} +14 -14
- package/dist/cli/{outcomes-TEXVO2EV.mjs → outcomes-ZWHAJH5I.mjs} +6 -6
- package/dist/cli/{play-UFAJEDX4.mjs → play-BVKLMTAS.mjs} +20 -20
- package/dist/cli/{play-2FVIRT7Z.js → play-VDWB7FZ5.js} +337 -337
- package/dist/cli/{providers-4C4TJ5N3.js → providers-RXT3Q5Q7.js} +9 -9
- package/dist/cli/{providers-LCJA4VQ7.mjs → providers-SWRTGKJJ.mjs} +6 -6
- package/dist/cli/{quickstart-QOJLPGFW.mjs → quickstart-GQVXM7XV.mjs} +4 -4
- package/dist/cli/{quickstart-2OAKQFLT.js → quickstart-UJJNXI2S.js} +6 -6
- package/dist/cli/{run-SNAFQJWR.mjs → run-GDIEU622.mjs} +26 -26
- package/dist/cli/{run-SV3EPJGU.js → run-WOTVRFGN.js} +48 -48
- package/dist/cli/{search-KIJZGURG.mjs → search-EWC7V6GT.mjs} +7 -7
- package/dist/cli/search-UIZHXBHR.js +32 -0
- package/dist/cli/{search-output-OESDMVBG.mjs → search-output-FCW4R6Z4.mjs} +5 -5
- package/dist/cli/{search-output-WRHLYDZX.js → search-output-FL7STAYJ.js} +8 -8
- package/dist/cli/{secrets-GH6KF5VR.js → secrets-UXDUGONR.js} +15 -15
- package/dist/cli/{secrets-5WCCHFM5.mjs → secrets-XG22PDCR.mjs} +6 -6
- package/dist/cli/{sessions-52MAEUFQ.mjs → sessions-2OKBG7FD.mjs} +6 -6
- package/dist/cli/sessions-DPYJFTCW.js +23 -0
- package/dist/cli/{settings-HDOBMJ5A.mjs → settings-EDYA2V4W.mjs} +12 -12
- package/dist/cli/{settings-5RSARPXF.js → settings-RWN7YHK3.js} +85 -85
- package/dist/cli/{setup-4DTCFBOX.js → setup-HA3PG3ST.js} +49 -49
- package/dist/cli/{setup-UY3TSZZV.mjs → setup-UZW2IHAT.mjs} +9 -9
- package/dist/cli/skills-RQ6V5TGY.js +37 -0
- package/dist/cli/{skills-QUWJHOEZ.mjs → skills-V4KAUQQA.mjs} +7 -7
- package/dist/cli/{tools-U2LH642W.mjs → tools-HFUGLYHU.mjs} +19 -19
- package/dist/cli/tools-NGQKXMHP.js +57 -0
- package/dist/cli/{update-3H4E5YJ7.mjs → update-S3KEH7P2.mjs} +9 -9
- package/dist/cli/update-SJJK6XXM.js +37 -0
- package/dist/cli/{views-2LUZ3ATR.js → views-QH5L37UW.js} +21 -21
- package/dist/cli/{views-7WOYBLLQ.mjs → views-Y7Y5Y7V2.mjs} +6 -6
- package/dist/cli/{workflow-YME2SGMA.js → workflow-4W5JT5HP.js} +17 -17
- package/dist/cli/{workflow-55OASFLG.mjs → workflow-XNN54KIK.mjs} +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +118 -118
- 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-F7QPLPTB.js +0 -44
- package/dist/cli/concurrent-runs-help-3KEUX2GA.js +0 -22
- package/dist/cli/describe-ZUATHN4Z.js +0 -50
- package/dist/cli/git-GAXMETIP.js +0 -26
- package/dist/cli/search-DCHBSXPZ.js +0 -32
- package/dist/cli/sessions-MYG6BH6T.js +0 -23
- package/dist/cli/skills-EOC2MSQK.js +0 -37
- package/dist/cli/tools-AGOX64LC.js +0 -57
- package/dist/cli/update-OLLOIH4U.js +0 -37
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkJUTXZW3Sjs = require('./chunk-JUTXZW3S.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -11,11 +11,11 @@ var _chunkJMDLLVIRjs = require('./chunk-JMDLLVIR.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkSSE5P2CXjs = require('./chunk-SSE5P2CX.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkOJ3FRPEPjs = require('./chunk-OJ3FRPEP.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -37,10 +37,10 @@ var _chunkEZNYE6GZjs = require('./chunk-EZNYE6GZ.js');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkTBLP7HDLjs = require('./chunk-TBLP7HDL.js');
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkLHPYCJNLjs = require('./chunk-LHPYCJNL.js');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
@@ -57,29 +57,29 @@ var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
|
|
|
57
57
|
var _chunkHGFFYVXNjs = require('./chunk-HGFFYVXN.js');
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
var
|
|
60
|
+
var _chunkPNFC7VHHjs = require('./chunk-PNFC7VHH.js');
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
var
|
|
63
|
+
var _chunkA4KQZ6P5js = require('./chunk-A4KQZ6P5.js');
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
var
|
|
70
|
+
var _chunkQQ6AVBHWjs = require('./chunk-QQ6AVBHW.js');
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
var
|
|
75
|
+
var _chunk6BJHMXMAjs = require('./chunk-6BJHMXMA.js');
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
var
|
|
82
|
+
var _chunkTIMFDVUNjs = require('./chunk-TIMFDVUN.js');
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
@@ -88,12 +88,12 @@ var _chunkC46GRCHZjs = require('./chunk-C46GRCHZ.js');
|
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
|
|
91
|
-
var
|
|
91
|
+
var _chunkIUDO463Ijs = require('./chunk-IUDO463I.js');
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
var
|
|
96
|
+
var _chunkLWOYDMYCjs = require('./chunk-LWOYDMYC.js');
|
|
97
97
|
|
|
98
98
|
|
|
99
99
|
var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.js');
|
|
@@ -202,10 +202,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
204
|
function pendingToolExecutionPath(input) {
|
|
205
|
-
const config =
|
|
205
|
+
const config = _chunkLWOYDMYCjs.resolveConfig.call(void 0, );
|
|
206
206
|
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(_chunkCFJFUVX2js.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
|
|
207
207
|
return _path.join.call(void 0,
|
|
208
|
-
|
|
208
|
+
_chunkLWOYDMYCjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
209
209
|
`${PENDING_PREFIX}${fingerprint}.json`
|
|
210
210
|
);
|
|
211
211
|
}
|
|
@@ -432,13 +432,13 @@ var TOOL_COMMAND_TEMPLATES = {
|
|
|
432
432
|
execute: "deepline run <toolId> --input '{...}'"
|
|
433
433
|
};
|
|
434
434
|
function toListedTool(tool) {
|
|
435
|
-
if (
|
|
435
|
+
if (_chunkTBLP7HDLjs.isPlayLikeTool.call(void 0, tool)) {
|
|
436
436
|
return {
|
|
437
437
|
...tool,
|
|
438
438
|
description: listedToolDescription(tool),
|
|
439
439
|
id: tool.toolId,
|
|
440
440
|
type: "play",
|
|
441
|
-
executeCommand:
|
|
441
|
+
executeCommand: _chunkTBLP7HDLjs.playRunCommandForTool.call(void 0, tool, tool.toolId)
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
444
|
return {
|
|
@@ -511,37 +511,37 @@ function firstSentence(text) {
|
|
|
511
511
|
return (match ? match[0] : clean).trim();
|
|
512
512
|
}
|
|
513
513
|
function requiredInputIds(tool) {
|
|
514
|
-
const inputSchema =
|
|
514
|
+
const inputSchema = _chunkTBLP7HDLjs.recordField.call(void 0,
|
|
515
515
|
tool,
|
|
516
516
|
"inputSchema",
|
|
517
517
|
"input_schema"
|
|
518
518
|
);
|
|
519
|
-
return
|
|
519
|
+
return _chunkTBLP7HDLjs.toolInputFieldsForDisplay.call(void 0, inputSchema).filter((field) => field.required === true).map((field) => String(_nullishCoalesce(field.name, () => ( "")))).filter(Boolean);
|
|
520
520
|
}
|
|
521
521
|
function notConnectedSuffix(tool) {
|
|
522
522
|
const record = tool;
|
|
523
|
-
const status =
|
|
523
|
+
const status = _chunkTBLP7HDLjs.stringField.call(void 0, record, "credentialStatus", "credential_status");
|
|
524
524
|
const connected = record.connected;
|
|
525
525
|
const message = toolConnectionStatusMessage({
|
|
526
526
|
connected: connected === false ? false : void 0,
|
|
527
527
|
credentialStatus: status || void 0,
|
|
528
|
-
connectionMessage:
|
|
528
|
+
connectionMessage: _chunkTBLP7HDLjs.stringField.call(void 0, record, "connectionMessage", "connection_message") || void 0
|
|
529
529
|
});
|
|
530
530
|
return message ? ` - \u26A0 ${message}` : "";
|
|
531
531
|
}
|
|
532
532
|
function shortPricingHint(tool) {
|
|
533
|
-
const pricing =
|
|
533
|
+
const pricing = _chunkTBLP7HDLjs.recordField.call(void 0,
|
|
534
534
|
tool,
|
|
535
535
|
"pricing"
|
|
536
536
|
);
|
|
537
537
|
const credits = numberField(pricing, "creditsPerUnit", "credits_per_unit");
|
|
538
|
-
const unit =
|
|
538
|
+
const unit = _chunkTBLP7HDLjs.stringField.call(void 0, pricing, "unit");
|
|
539
539
|
if (credits !== null) {
|
|
540
540
|
return `${formatDecimal(credits)} cr/${unit || "unit"}`;
|
|
541
541
|
}
|
|
542
|
-
const summary =
|
|
542
|
+
const summary = _chunkTBLP7HDLjs.stringField.call(void 0, pricing, "summary");
|
|
543
543
|
if (summary) return summary;
|
|
544
|
-
const displayText =
|
|
544
|
+
const displayText = _chunkTBLP7HDLjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
545
545
|
return displayText || null;
|
|
546
546
|
}
|
|
547
547
|
function aggregateCategorySummaries(tools) {
|
|
@@ -585,13 +585,13 @@ function categoryEnumerationRender(summaries) {
|
|
|
585
585
|
};
|
|
586
586
|
}
|
|
587
587
|
async function listToolCategories(emitJson, compact) {
|
|
588
|
-
const client = new (0,
|
|
588
|
+
const client = new (0, _chunkPNFC7VHHjs.DeeplineClient)();
|
|
589
589
|
if (!emitJson) {
|
|
590
590
|
const summaries2 = (await client.listToolCategories()).map((category) => ({
|
|
591
591
|
...category,
|
|
592
592
|
description: describeToolCategory(category.name)
|
|
593
593
|
}));
|
|
594
|
-
|
|
594
|
+
_chunkIUDO463Ijs.printCommandEnvelope.call(void 0,
|
|
595
595
|
{ categories: summaries2, render: categoryEnumerationRender(summaries2) },
|
|
596
596
|
{ json: false }
|
|
597
597
|
);
|
|
@@ -601,7 +601,7 @@ async function listToolCategories(emitJson, compact) {
|
|
|
601
601
|
const items = rawTools.map(toListedTool);
|
|
602
602
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
603
603
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
604
|
-
|
|
604
|
+
_chunkIUDO463Ijs.printCommandEnvelope.call(void 0,
|
|
605
605
|
{
|
|
606
606
|
tools: outputItems,
|
|
607
607
|
count: outputItems.length,
|
|
@@ -620,7 +620,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
620
620
|
const known = summaries.map((item) => item.name);
|
|
621
621
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
622
622
|
if (emitJson) {
|
|
623
|
-
|
|
623
|
+
_chunkIUDO463Ijs.printJson.call(void 0, {
|
|
624
624
|
ok: false,
|
|
625
625
|
exitCode: 4,
|
|
626
626
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -634,13 +634,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
634
634
|
const render = categoryEnumerationRender(summaries);
|
|
635
635
|
console.error(message);
|
|
636
636
|
console.error("");
|
|
637
|
-
console.error(
|
|
637
|
+
console.error(_chunkIUDO463Ijs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
638
638
|
console.error("");
|
|
639
639
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
640
640
|
return 4;
|
|
641
641
|
}
|
|
642
642
|
async function listToolsInCategory(category, emitJson) {
|
|
643
|
-
const client = new (0,
|
|
643
|
+
const client = new (0, _chunkPNFC7VHHjs.DeeplineClient)();
|
|
644
644
|
const { tools: rawTools, categories } = await client.listToolsInCategory(category);
|
|
645
645
|
const summaries = categories.map((item) => ({
|
|
646
646
|
...item,
|
|
@@ -676,7 +676,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
676
676
|
}
|
|
677
677
|
]
|
|
678
678
|
};
|
|
679
|
-
|
|
679
|
+
_chunkIUDO463Ijs.printCommandEnvelope.call(void 0,
|
|
680
680
|
{
|
|
681
681
|
category,
|
|
682
682
|
total: rows.length,
|
|
@@ -689,7 +689,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
689
689
|
return 0;
|
|
690
690
|
}
|
|
691
691
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
692
|
-
const client = new (0,
|
|
692
|
+
const client = new (0, _chunkPNFC7VHHjs.DeeplineClient)();
|
|
693
693
|
const items = (await client.listTools({
|
|
694
694
|
categories: requestedCategories.join(","),
|
|
695
695
|
compact
|
|
@@ -718,7 +718,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
718
718
|
]
|
|
719
719
|
};
|
|
720
720
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
721
|
-
|
|
721
|
+
_chunkIUDO463Ijs.printCommandEnvelope.call(void 0,
|
|
722
722
|
{
|
|
723
723
|
tools: outputItems,
|
|
724
724
|
count: outputItems.length,
|
|
@@ -737,13 +737,13 @@ async function listTools(category, options = {}) {
|
|
|
737
737
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()]), () => ( ""));
|
|
738
738
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
739
739
|
const compact = options.compact !== false;
|
|
740
|
-
const emitJson = options.json === true ||
|
|
740
|
+
const emitJson = options.json === true || _chunkIUDO463Ijs.shouldEmitJson.call(void 0, );
|
|
741
741
|
if (positional && flagCategories.length > 0) {
|
|
742
742
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
743
743
|
if (!flagIsSameSingle) {
|
|
744
744
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
745
745
|
if (emitJson) {
|
|
746
|
-
|
|
746
|
+
_chunkIUDO463Ijs.printJson.call(void 0, {
|
|
747
747
|
ok: false,
|
|
748
748
|
exitCode: 2,
|
|
749
749
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -770,7 +770,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
770
770
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
771
771
|
return 1;
|
|
772
772
|
}
|
|
773
|
-
const client = new (0,
|
|
773
|
+
const client = new (0, _chunkPNFC7VHHjs.DeeplineClient)();
|
|
774
774
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
775
775
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
776
776
|
const jsonOutput = options.json === true;
|
|
@@ -794,7 +794,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
794
794
|
query,
|
|
795
795
|
mode
|
|
796
796
|
}) : null;
|
|
797
|
-
|
|
797
|
+
_chunkIUDO463Ijs.printCommandEnvelope.call(void 0,
|
|
798
798
|
{
|
|
799
799
|
tools: outputTools,
|
|
800
800
|
count: outputTools.length,
|
|
@@ -812,7 +812,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
812
812
|
} : {},
|
|
813
813
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
814
814
|
},
|
|
815
|
-
{ json: options.json ||
|
|
815
|
+
{ json: options.json || _chunkIUDO463Ijs.shouldEmitJson.call(void 0, ) }
|
|
816
816
|
);
|
|
817
817
|
return 0;
|
|
818
818
|
}
|
|
@@ -867,8 +867,8 @@ function printPlayAliasToolError(toolId, play) {
|
|
|
867
867
|
console.error(playAliasToolErrorMessage(toolId, play));
|
|
868
868
|
}
|
|
869
869
|
function playLikeToolExecuteErrorMessage(toolId, tool) {
|
|
870
|
-
const playReference = tool ?
|
|
871
|
-
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${
|
|
870
|
+
const playReference = tool ? _chunkTBLP7HDLjs.playReferenceForTool.call(void 0, tool) : null;
|
|
871
|
+
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunkTBLP7HDLjs.playSearchCommandForToolId.call(void 0, toolId)}`;
|
|
872
872
|
return [
|
|
873
873
|
`${toolId} is a workflow/play entry, not an atomic provider tool.`,
|
|
874
874
|
nextStep,
|
|
@@ -908,13 +908,13 @@ Output:
|
|
|
908
908
|
activity.
|
|
909
909
|
`
|
|
910
910
|
);
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
911
|
+
_chunkSSE5P2CXjs.registerIntegrationBalanceCommand.call(void 0, tools, true);
|
|
912
|
+
_chunkSSE5P2CXjs.registerWorkspaceConnectionListCommand.call(void 0, tools, "workspace-connections", true);
|
|
913
|
+
_chunkSSE5P2CXjs.registerLegacyHubSpotMembersCommand.call(void 0, tools, true);
|
|
914
|
+
_chunkSSE5P2CXjs.registerLegacyWorkspaceConnectionCommand.call(void 0, tools, true);
|
|
915
|
+
_chunkSSE5P2CXjs.registerLegacyCalendarDelegationCommand.call(void 0, tools, true);
|
|
916
|
+
_chunkSSE5P2CXjs.registerLegacyAvailabilityCalendarsCommand.call(void 0, tools, true);
|
|
917
|
+
_chunkSSE5P2CXjs.registerIntegrationConnectCommand.call(void 0, tools, false, true);
|
|
918
918
|
tools.command("list [category]").description("Browse tool categories, or list every tool in a category.").addHelpText(
|
|
919
919
|
"after",
|
|
920
920
|
`
|
|
@@ -947,7 +947,7 @@ Examples:
|
|
|
947
947
|
json: Boolean(options.json)
|
|
948
948
|
});
|
|
949
949
|
});
|
|
950
|
-
|
|
950
|
+
_chunkOJ3FRPEPjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
951
951
|
tools.command("grep <query>").description(
|
|
952
952
|
"Regex grep over tool ids, descriptions, categories, and input fields."
|
|
953
953
|
).addHelpText(
|
|
@@ -982,7 +982,7 @@ Examples:
|
|
|
982
982
|
});
|
|
983
983
|
const addToolMetadataCommand = (command) => {
|
|
984
984
|
let compatibilityMetadata;
|
|
985
|
-
|
|
985
|
+
_chunkQQ6AVBHWjs.registerCompatibilityCatalog.call(void 0, command, () => ({
|
|
986
986
|
toolId: command.args[0],
|
|
987
987
|
acceptMetadata: (metadata) => {
|
|
988
988
|
compatibilityMetadata = metadata;
|
|
@@ -1052,7 +1052,7 @@ Examples:
|
|
|
1052
1052
|
process.exitCode = await narrowView();
|
|
1053
1053
|
return;
|
|
1054
1054
|
}
|
|
1055
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
1055
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-4FBGZZK5.js")));
|
|
1056
1056
|
process.exitCode = await describeAnything(
|
|
1057
1057
|
toolId,
|
|
1058
1058
|
{
|
|
@@ -1067,7 +1067,7 @@ Examples:
|
|
|
1067
1067
|
});
|
|
1068
1068
|
};
|
|
1069
1069
|
addToolMetadataCommand(
|
|
1070
|
-
|
|
1070
|
+
_chunkJUTXZW3Sjs.addDescribeOptions.call(void 0,
|
|
1071
1071
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
1072
1072
|
{ json: false }
|
|
1073
1073
|
)
|
|
@@ -1136,7 +1136,7 @@ Examples:
|
|
|
1136
1136
|
options,
|
|
1137
1137
|
void 0,
|
|
1138
1138
|
true,
|
|
1139
|
-
|
|
1139
|
+
_chunk6BJHMXMAjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
1140
1140
|
);
|
|
1141
1141
|
}
|
|
1142
1142
|
);
|
|
@@ -1144,13 +1144,13 @@ Examples:
|
|
|
1144
1144
|
function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
1145
1145
|
let metadata;
|
|
1146
1146
|
const startedAt = performance.now();
|
|
1147
|
-
const baseUrl =
|
|
1148
|
-
|
|
1149
|
-
const result =
|
|
1147
|
+
const baseUrl = _chunkLWOYDMYCjs.resolveConfig.call(void 0, ).baseUrl;
|
|
1148
|
+
_chunk6BJHMXMAjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1149
|
+
const result = _chunkQQ6AVBHWjs.runToolExecuteStage.call(void 0,
|
|
1150
1150
|
"SDK compatibility",
|
|
1151
|
-
() =>
|
|
1151
|
+
() => _chunkTIMFDVUNjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1152
1152
|
command: "tools execute",
|
|
1153
|
-
skillsVersion:
|
|
1153
|
+
skillsVersion: _chunkLWOYDMYCjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
1154
1154
|
persistCache: false,
|
|
1155
1155
|
timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
|
|
1156
1156
|
catalog: {
|
|
@@ -1164,7 +1164,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1164
1164
|
})
|
|
1165
1165
|
).then(
|
|
1166
1166
|
(compatibility) => {
|
|
1167
|
-
|
|
1167
|
+
_chunk6BJHMXMAjs.recordCliTrace.call(void 0, {
|
|
1168
1168
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1169
1169
|
ms: performance.now() - startedAt,
|
|
1170
1170
|
ok: compatibility.error === null,
|
|
@@ -1173,7 +1173,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1173
1173
|
return compatibility;
|
|
1174
1174
|
},
|
|
1175
1175
|
(error) => {
|
|
1176
|
-
|
|
1176
|
+
_chunk6BJHMXMAjs.recordCliTrace.call(void 0, {
|
|
1177
1177
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1178
1178
|
ms: performance.now() - startedAt,
|
|
1179
1179
|
ok: false
|
|
@@ -1188,7 +1188,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1188
1188
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1189
1189
|
return 1;
|
|
1190
1190
|
}
|
|
1191
|
-
const client = new (0,
|
|
1191
|
+
const client = new (0, _chunkPNFC7VHHjs.DeeplineClient)();
|
|
1192
1192
|
let tool;
|
|
1193
1193
|
try {
|
|
1194
1194
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1247,12 +1247,12 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1247
1247
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1248
1248
|
if (inferenceQuote)
|
|
1249
1249
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1250
|
-
|
|
1250
|
+
_chunkIUDO463Ijs.printCommandEnvelope.call(void 0,
|
|
1251
1251
|
{
|
|
1252
1252
|
toolId: String(tool.toolId || toolId),
|
|
1253
|
-
cost:
|
|
1253
|
+
cost: _chunkTBLP7HDLjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1254
1254
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1255
|
-
...
|
|
1255
|
+
..._chunkTBLP7HDLjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunkTBLP7HDLjs.recordField.call(void 0, tool, "pricing") } : {},
|
|
1256
1256
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1257
1257
|
},
|
|
1258
1258
|
{
|
|
@@ -1263,14 +1263,14 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1263
1263
|
);
|
|
1264
1264
|
return 0;
|
|
1265
1265
|
}
|
|
1266
|
-
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !
|
|
1267
|
-
const contract =
|
|
1266
|
+
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunkTBLP7HDLjs.isMonitorTypeTool.call(void 0, tool) && !_chunkTBLP7HDLjs.isMonitorVariantIndex.call(void 0, tool) && !_chunkTBLP7HDLjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
|
|
1267
|
+
const contract = _chunkTBLP7HDLjs.toolContractJsonForDescribe.call(void 0,
|
|
1268
1268
|
tool,
|
|
1269
1269
|
toolId,
|
|
1270
1270
|
void 0,
|
|
1271
1271
|
seedToolListScript
|
|
1272
1272
|
);
|
|
1273
|
-
|
|
1273
|
+
_chunkIUDO463Ijs.printCompactJson.call(void 0, {
|
|
1274
1274
|
toolId: contract.toolId,
|
|
1275
1275
|
...options.schemaOnly ? {
|
|
1276
1276
|
inputSchema: contract.inputSchema,
|
|
@@ -1293,8 +1293,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1293
1293
|
return 0;
|
|
1294
1294
|
}
|
|
1295
1295
|
if (options.contractJson) {
|
|
1296
|
-
|
|
1297
|
-
...
|
|
1296
|
+
_chunkIUDO463Ijs.printCompactJson.call(void 0, {
|
|
1297
|
+
..._chunkTBLP7HDLjs.toolContractJsonForDescribe.call(void 0,
|
|
1298
1298
|
tool,
|
|
1299
1299
|
toolId,
|
|
1300
1300
|
void 0,
|
|
@@ -1307,8 +1307,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1307
1307
|
}
|
|
1308
1308
|
const emitJson = options.json === true;
|
|
1309
1309
|
if (emitJson) {
|
|
1310
|
-
|
|
1311
|
-
...
|
|
1310
|
+
_chunkIUDO463Ijs.printCompactJson.call(void 0, {
|
|
1311
|
+
..._chunkTBLP7HDLjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
|
|
1312
1312
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1313
1313
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1314
1314
|
});
|
|
@@ -1333,7 +1333,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1333
1333
|
printCompactToolContract(tool, toolId);
|
|
1334
1334
|
if (modelDescription) {
|
|
1335
1335
|
process.stdout.write(`
|
|
1336
|
-
${
|
|
1336
|
+
${_chunkTBLP7HDLjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1337
1337
|
}
|
|
1338
1338
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1339
1339
|
return 0;
|
|
@@ -1341,7 +1341,7 @@ ${_chunkPK6MYC5Ejs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
|
1341
1341
|
printCompactToolContract(tool, toolId);
|
|
1342
1342
|
if (modelDescription) {
|
|
1343
1343
|
process.stdout.write(`
|
|
1344
|
-
${
|
|
1344
|
+
${_chunkTBLP7HDLjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1345
1345
|
}
|
|
1346
1346
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1347
1347
|
return 0;
|
|
@@ -1358,10 +1358,10 @@ function printInferenceQuoteSummary(quote) {
|
|
|
1358
1358
|
for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
|
|
1359
1359
|
}
|
|
1360
1360
|
function printMonitorTypeFilters(tool) {
|
|
1361
|
-
const schema =
|
|
1362
|
-
const properties =
|
|
1361
|
+
const schema = _chunkTBLP7HDLjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
|
|
1362
|
+
const properties = _chunkTBLP7HDLjs.recordField.call(void 0, schema, "properties");
|
|
1363
1363
|
const required = new Set(
|
|
1364
|
-
|
|
1364
|
+
_chunkTBLP7HDLjs.arrayField.call(void 0, schema, "required").filter(
|
|
1365
1365
|
(v) => typeof v === "string"
|
|
1366
1366
|
)
|
|
1367
1367
|
);
|
|
@@ -1372,24 +1372,24 @@ function printMonitorTypeFilters(tool) {
|
|
|
1372
1372
|
}
|
|
1373
1373
|
console.log("Deploy filters (set in the monitor payload):");
|
|
1374
1374
|
for (const name of names) {
|
|
1375
|
-
const field =
|
|
1375
|
+
const field = _chunkTBLP7HDLjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
|
|
1376
1376
|
const star = required.has(name) ? "*" : "";
|
|
1377
|
-
const enumVals =
|
|
1377
|
+
const enumVals = _chunkTBLP7HDLjs.arrayField.call(void 0, field, "enum").filter(
|
|
1378
1378
|
(v) => typeof v === "string"
|
|
1379
1379
|
);
|
|
1380
|
-
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` :
|
|
1381
|
-
const desc =
|
|
1380
|
+
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunkTBLP7HDLjs.stringField.call(void 0, field, "type") || "string";
|
|
1381
|
+
const desc = _chunkTBLP7HDLjs.stringField.call(void 0, field, "description");
|
|
1382
1382
|
console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
|
|
1383
1383
|
}
|
|
1384
1384
|
}
|
|
1385
1385
|
function printMonitorTypeFilterExamples(tool) {
|
|
1386
|
-
const documentation =
|
|
1387
|
-
const fields =
|
|
1386
|
+
const documentation = _chunkTBLP7HDLjs.recordField.call(void 0, tool, "documentation");
|
|
1387
|
+
const fields = _chunkTBLP7HDLjs.recordField.call(void 0, documentation, "fields");
|
|
1388
1388
|
const examples = Object.entries(fields).flatMap(([name, rawField]) => {
|
|
1389
|
-
const grammar =
|
|
1390
|
-
const example =
|
|
1389
|
+
const grammar = _chunkTBLP7HDLjs.recordField.call(void 0, _chunkTBLP7HDLjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
|
|
1390
|
+
const example = _chunkTBLP7HDLjs.stringField.call(void 0, grammar, "example");
|
|
1391
1391
|
const values = [
|
|
1392
|
-
...
|
|
1392
|
+
..._chunkTBLP7HDLjs.arrayField.call(void 0, grammar, "examples").filter(
|
|
1393
1393
|
(value) => typeof value === "string" && Boolean(value)
|
|
1394
1394
|
),
|
|
1395
1395
|
...example ? [example] : []
|
|
@@ -1404,21 +1404,21 @@ function printMonitorTypeFilterExamples(tool) {
|
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
1406
|
function printMonitorTypeStreams(tool) {
|
|
1407
|
-
const streams =
|
|
1408
|
-
|
|
1407
|
+
const streams = _chunkTBLP7HDLjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
|
|
1408
|
+
_chunkTBLP7HDLjs.isRecord
|
|
1409
1409
|
);
|
|
1410
1410
|
if (!streams.length) return;
|
|
1411
1411
|
console.log("");
|
|
1412
1412
|
console.log("Filter columns (a play's sqlListeners.where, per stream):");
|
|
1413
1413
|
for (const stream of streams) {
|
|
1414
|
-
const name =
|
|
1415
|
-
const cols =
|
|
1414
|
+
const name = _chunkTBLP7HDLjs.stringField.call(void 0, stream, "stream");
|
|
1415
|
+
const cols = _chunkTBLP7HDLjs.arrayField.call(void 0, stream, "columns").filter(_chunkTBLP7HDLjs.isRecord).map((col) => _chunkTBLP7HDLjs.stringField.call(void 0, col, "name")).filter(Boolean);
|
|
1416
1416
|
console.log(`- ${name}: ${cols.join(", ")}`);
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
1419
|
function monitorTypePricingLines(tool) {
|
|
1420
|
-
const pricing =
|
|
1421
|
-
const byType =
|
|
1420
|
+
const pricing = _chunkTBLP7HDLjs.recordField.call(void 0, tool, "pricing");
|
|
1421
|
+
const byType = _chunkTBLP7HDLjs.recordField.call(void 0,
|
|
1422
1422
|
pricing,
|
|
1423
1423
|
"pricing_by_radar_type",
|
|
1424
1424
|
"pricingByRadarType"
|
|
@@ -1429,9 +1429,9 @@ function monitorTypePricingLines(tool) {
|
|
|
1429
1429
|
}
|
|
1430
1430
|
const lines = ["Pricing (Deepline credits per accepted event):"];
|
|
1431
1431
|
for (const key of keys) {
|
|
1432
|
-
const entry =
|
|
1432
|
+
const entry = _chunkTBLP7HDLjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
|
|
1433
1433
|
const credits = numberField(entry, "deepline_credits", "deeplineCredits");
|
|
1434
|
-
const display =
|
|
1434
|
+
const display = _chunkTBLP7HDLjs.stringField.call(void 0, entry, "display");
|
|
1435
1435
|
const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "not listed");
|
|
1436
1436
|
lines.push(`- ${key}: ${shown}`);
|
|
1437
1437
|
}
|
|
@@ -1441,20 +1441,20 @@ function printMonitorTypePricing(tool) {
|
|
|
1441
1441
|
for (const line of monitorTypePricingLines(tool)) console.log(line);
|
|
1442
1442
|
}
|
|
1443
1443
|
function printMonitorTypeDeploy(tool) {
|
|
1444
|
-
const deploy =
|
|
1445
|
-
const toolId =
|
|
1446
|
-
const example =
|
|
1444
|
+
const deploy = _chunkTBLP7HDLjs.recordField.call(void 0, tool, "deploy");
|
|
1445
|
+
const toolId = _chunkTBLP7HDLjs.stringField.call(void 0, tool, "toolId");
|
|
1446
|
+
const example = _chunkTBLP7HDLjs.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
|
|
1447
1447
|
console.log("Deploy (a monitor type is deployed, not executed):");
|
|
1448
1448
|
console.log(` ${example}`);
|
|
1449
1449
|
}
|
|
1450
1450
|
function printMonitorTypeContract(tool, requestedToolId) {
|
|
1451
|
-
const toolId =
|
|
1451
|
+
const toolId = _chunkTBLP7HDLjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
|
|
1452
1452
|
console.log(toolId);
|
|
1453
|
-
const displayName =
|
|
1453
|
+
const displayName = _chunkTBLP7HDLjs.stringField.call(void 0, tool, "displayName");
|
|
1454
1454
|
if (displayName) console.log(`Best for: ${displayName}`);
|
|
1455
|
-
const description =
|
|
1455
|
+
const description = _chunkTBLP7HDLjs.stringField.call(void 0, tool, "description");
|
|
1456
1456
|
if (description) console.log(`Description: ${description}`);
|
|
1457
|
-
const categories =
|
|
1457
|
+
const categories = _chunkTBLP7HDLjs.arrayField.call(void 0, tool, "categories").filter(
|
|
1458
1458
|
(v) => typeof v === "string"
|
|
1459
1459
|
);
|
|
1460
1460
|
if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
|
|
@@ -1474,31 +1474,31 @@ function printMonitorTypeContract(tool, requestedToolId) {
|
|
|
1474
1474
|
console.log(`More: deepline describe ${toolId}`);
|
|
1475
1475
|
}
|
|
1476
1476
|
function toolGuidanceLines(guidance) {
|
|
1477
|
-
const record =
|
|
1478
|
-
const toolGuidance =
|
|
1479
|
-
const providerGuidance =
|
|
1477
|
+
const record = _chunkTBLP7HDLjs.isRecord.call(void 0, guidance) ? guidance : {};
|
|
1478
|
+
const toolGuidance = _chunkTBLP7HDLjs.stringField.call(void 0, record, "tool");
|
|
1479
|
+
const providerGuidance = _chunkTBLP7HDLjs.stringField.call(void 0, record, "provider");
|
|
1480
1480
|
return [
|
|
1481
1481
|
...toolGuidance ? [`- This tool: ${toolGuidance}`] : [],
|
|
1482
1482
|
...providerGuidance ? [`- Provider: ${providerGuidance}`] : []
|
|
1483
1483
|
];
|
|
1484
1484
|
}
|
|
1485
1485
|
function printCompactToolContract(tool, requestedToolId) {
|
|
1486
|
-
if (
|
|
1486
|
+
if (_chunkTBLP7HDLjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1487
1487
|
printMonitorTypeContract(tool, requestedToolId);
|
|
1488
1488
|
return;
|
|
1489
1489
|
}
|
|
1490
|
-
const contract =
|
|
1490
|
+
const contract = _chunkTBLP7HDLjs.toolContractJsonForDescribe.call(void 0,
|
|
1491
1491
|
tool,
|
|
1492
1492
|
requestedToolId,
|
|
1493
1493
|
void 0,
|
|
1494
1494
|
seedToolListScript
|
|
1495
1495
|
);
|
|
1496
|
-
const cost =
|
|
1497
|
-
const getters =
|
|
1496
|
+
const cost = _chunkTBLP7HDLjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
|
|
1497
|
+
const getters = _chunkTBLP7HDLjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1498
1498
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1499
1499
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1500
|
-
const inputFields =
|
|
1501
|
-
|
|
1500
|
+
const inputFields = _chunkTBLP7HDLjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1501
|
+
_chunkTBLP7HDLjs.recordField.call(void 0, contract, "inputSchema")
|
|
1502
1502
|
);
|
|
1503
1503
|
console.log(String(contract.toolId));
|
|
1504
1504
|
if (contract.displayName) console.log(`Best for: ${contract.displayName}`);
|
|
@@ -1515,9 +1515,9 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1515
1515
|
printToolOutputArrayShape(contract);
|
|
1516
1516
|
printToolExecutionHints(contract);
|
|
1517
1517
|
if (contract.deprecated === true) {
|
|
1518
|
-
const deprecation =
|
|
1519
|
-
const message =
|
|
1520
|
-
const replacementToolId =
|
|
1518
|
+
const deprecation = _chunkTBLP7HDLjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
|
|
1519
|
+
const message = _chunkTBLP7HDLjs.stringField.call(void 0, deprecation, "message");
|
|
1520
|
+
const replacementToolId = _chunkTBLP7HDLjs.stringField.call(void 0,
|
|
1521
1521
|
deprecation,
|
|
1522
1522
|
"replacementToolId",
|
|
1523
1523
|
"replacement_tool_id"
|
|
@@ -1540,12 +1540,12 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1540
1540
|
console.log("");
|
|
1541
1541
|
console.log("Inputs:");
|
|
1542
1542
|
for (const field of inputFields) {
|
|
1543
|
-
if (!
|
|
1544
|
-
const name =
|
|
1543
|
+
if (!_chunkTBLP7HDLjs.isRecord.call(void 0, field)) continue;
|
|
1544
|
+
const name = _chunkTBLP7HDLjs.stringField.call(void 0, field, "name");
|
|
1545
1545
|
if (!name) continue;
|
|
1546
1546
|
const required = field.required ? "*" : "";
|
|
1547
|
-
const type =
|
|
1548
|
-
const description =
|
|
1547
|
+
const type = _chunkTBLP7HDLjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1548
|
+
const description = _chunkTBLP7HDLjs.stringField.call(void 0, field, "description");
|
|
1549
1549
|
const enumValues = Array.isArray(field.enum) ? field.enum : [];
|
|
1550
1550
|
const enumSuffix = enumValues.length ? ` enum=${enumValues.map(String).join("|")}` : "";
|
|
1551
1551
|
const itemBoundsSuffix = arrayItemBoundsSuffix(field);
|
|
@@ -1560,8 +1560,8 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
console.log("");
|
|
1562
1562
|
printToolExamplesOnly(tool, requestedToolId);
|
|
1563
|
-
const starterScript =
|
|
1564
|
-
const starterPath =
|
|
1563
|
+
const starterScript = _chunkTBLP7HDLjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
|
|
1564
|
+
const starterPath = _chunkTBLP7HDLjs.stringField.call(void 0, starterScript, "path");
|
|
1565
1565
|
if (starterPath) {
|
|
1566
1566
|
console.log("");
|
|
1567
1567
|
console.log(`Starter script: ${starterPath}`);
|
|
@@ -1572,16 +1572,16 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1572
1572
|
console.log("Getters:");
|
|
1573
1573
|
if (listGetters.length) console.log(listGetterHeading());
|
|
1574
1574
|
for (const entry of listGetters) {
|
|
1575
|
-
if (
|
|
1575
|
+
if (_chunkTBLP7HDLjs.isRecord.call(void 0, entry))
|
|
1576
1576
|
console.log(
|
|
1577
|
-
`- ${
|
|
1577
|
+
`- ${_chunkTBLP7HDLjs.stringField.call(void 0, entry, "name")}: ${_chunkTBLP7HDLjs.playResultExpression.call(void 0, entry)}`
|
|
1578
1578
|
);
|
|
1579
1579
|
}
|
|
1580
1580
|
if (valueGetters.length) console.log("Values:");
|
|
1581
1581
|
for (const entry of valueGetters) {
|
|
1582
|
-
if (
|
|
1582
|
+
if (_chunkTBLP7HDLjs.isRecord.call(void 0, entry))
|
|
1583
1583
|
console.log(
|
|
1584
|
-
`- ${
|
|
1584
|
+
`- ${_chunkTBLP7HDLjs.stringField.call(void 0, entry, "name")}: ${_chunkTBLP7HDLjs.playResultExpression.call(void 0, entry)}`
|
|
1585
1585
|
);
|
|
1586
1586
|
}
|
|
1587
1587
|
}
|
|
@@ -1592,22 +1592,22 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1592
1592
|
console.log(`More: deepline describe ${contract.toolId}`);
|
|
1593
1593
|
}
|
|
1594
1594
|
function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
1595
|
-
if (
|
|
1595
|
+
if (_chunkTBLP7HDLjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1596
1596
|
return monitorTypePricingLines(tool);
|
|
1597
1597
|
}
|
|
1598
1598
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1599
|
-
const cost =
|
|
1600
|
-
const pricingModel =
|
|
1601
|
-
const billing =
|
|
1602
|
-
const explicitUnit =
|
|
1599
|
+
const cost = _chunkTBLP7HDLjs.Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1600
|
+
const pricingModel = _chunkTBLP7HDLjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
|
|
1601
|
+
const billing = _chunkTBLP7HDLjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunkTBLP7HDLjs.stringField.call(void 0, cost, "billingSource") || _chunkTBLP7HDLjs.stringField.call(void 0, cost, "billingMode") || "unknown";
|
|
1602
|
+
const explicitUnit = _chunkTBLP7HDLjs.stringField.call(void 0, cost, "unit");
|
|
1603
1603
|
const unit = explicitUnit || (pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit");
|
|
1604
1604
|
const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
|
|
1605
1605
|
const usd = numberField(cost, "deeplineUsdPerPricingUnit");
|
|
1606
|
-
const displayText =
|
|
1607
|
-
const summary =
|
|
1606
|
+
const displayText = _chunkTBLP7HDLjs.stringField.call(void 0, cost, "displayText");
|
|
1607
|
+
const summary = _chunkTBLP7HDLjs.stringField.call(void 0, cost, "summary");
|
|
1608
1608
|
const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
|
|
1609
1609
|
const reference = cost.observedReference;
|
|
1610
|
-
const observedMax =
|
|
1610
|
+
const observedMax = _chunkTBLP7HDLjs.observedMaxText.call(void 0, cost);
|
|
1611
1611
|
return [
|
|
1612
1612
|
`${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
|
|
1613
1613
|
...observedMax ? [` ${observedMax}`] : [],
|
|
@@ -1624,19 +1624,19 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
|
1624
1624
|
console.log(line);
|
|
1625
1625
|
}
|
|
1626
1626
|
function printToolSchemaOnly(tool, requestedToolId) {
|
|
1627
|
-
if (
|
|
1627
|
+
if (_chunkTBLP7HDLjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1628
1628
|
printMonitorTypeFilters(tool);
|
|
1629
1629
|
printMonitorTypeStreams(tool);
|
|
1630
1630
|
return;
|
|
1631
1631
|
}
|
|
1632
|
-
const contract =
|
|
1632
|
+
const contract = _chunkTBLP7HDLjs.toolContractJsonForDescribe.call(void 0,
|
|
1633
1633
|
tool,
|
|
1634
1634
|
requestedToolId,
|
|
1635
1635
|
void 0,
|
|
1636
1636
|
seedToolListScript
|
|
1637
1637
|
);
|
|
1638
|
-
const inputFields =
|
|
1639
|
-
|
|
1638
|
+
const inputFields = _chunkTBLP7HDLjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1639
|
+
_chunkTBLP7HDLjs.recordField.call(void 0, contract, "inputSchema")
|
|
1640
1640
|
);
|
|
1641
1641
|
console.log(`Schema: ${contract.toolId}`);
|
|
1642
1642
|
if (!inputFields.length) {
|
|
@@ -1663,37 +1663,37 @@ function printToolSchemaOnly(tool, requestedToolId) {
|
|
|
1663
1663
|
}
|
|
1664
1664
|
printToolOutputArrayShape(contract);
|
|
1665
1665
|
const declaredSchema = declaredToolJsonSchema(
|
|
1666
|
-
|
|
1666
|
+
_chunkTBLP7HDLjs.recordField.call(void 0, contract, "inputSchema")
|
|
1667
1667
|
);
|
|
1668
1668
|
if (declaredSchema) {
|
|
1669
1669
|
console.log("Declared input JSON Schema:");
|
|
1670
1670
|
console.log(JSON.stringify(declaredSchema, null, 2));
|
|
1671
1671
|
}
|
|
1672
|
-
if (
|
|
1672
|
+
if (_chunkTBLP7HDLjs.isRecord.call(void 0, contract.responseSchema)) {
|
|
1673
1673
|
console.log("Deepline execution response JSON Schema:");
|
|
1674
1674
|
console.log(JSON.stringify(contract.responseSchema, null, 2));
|
|
1675
1675
|
}
|
|
1676
1676
|
}
|
|
1677
1677
|
function printToolExamplesOnly(tool, requestedToolId) {
|
|
1678
|
-
if (
|
|
1678
|
+
if (_chunkTBLP7HDLjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1679
1679
|
printMonitorTypeDeploy(tool);
|
|
1680
1680
|
return;
|
|
1681
1681
|
}
|
|
1682
|
-
if (
|
|
1682
|
+
if (_chunkTBLP7HDLjs.isMonitorVariantIndex.call(void 0, tool)) {
|
|
1683
1683
|
console.log(
|
|
1684
1684
|
`${requestedToolId} is deployed as one monitor type per radar type. Describe one for its example:`
|
|
1685
1685
|
);
|
|
1686
|
-
for (const variant of
|
|
1687
|
-
const describeCommand =
|
|
1686
|
+
for (const variant of _chunkTBLP7HDLjs.arrayField.call(void 0, tool, "variants").filter(_chunkTBLP7HDLjs.isRecord)) {
|
|
1687
|
+
const describeCommand = _chunkTBLP7HDLjs.stringField.call(void 0, variant, "describeCommand");
|
|
1688
1688
|
if (describeCommand) console.log(` ${describeCommand}`);
|
|
1689
1689
|
}
|
|
1690
1690
|
return;
|
|
1691
1691
|
}
|
|
1692
|
-
if (
|
|
1692
|
+
if (_chunkTBLP7HDLjs.isPlayLikeTool.call(void 0, tool)) {
|
|
1693
1693
|
printPlayLikeToolUsage(tool, requestedToolId);
|
|
1694
1694
|
return;
|
|
1695
1695
|
}
|
|
1696
|
-
const contract =
|
|
1696
|
+
const contract = _chunkTBLP7HDLjs.toolContractJsonForDescribe.call(void 0,
|
|
1697
1697
|
tool,
|
|
1698
1698
|
requestedToolId,
|
|
1699
1699
|
void 0,
|
|
@@ -1701,9 +1701,9 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1701
1701
|
);
|
|
1702
1702
|
const toolId = String(contract.toolId);
|
|
1703
1703
|
const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
|
|
1704
|
-
const examples =
|
|
1704
|
+
const examples = _chunkTBLP7HDLjs.arrayField.call(void 0, tool, "examples").filter(_chunkTBLP7HDLjs.isRecord);
|
|
1705
1705
|
const firstExample = examples[0];
|
|
1706
|
-
const sampleInput = firstExample &&
|
|
1706
|
+
const sampleInput = firstExample && _chunkTBLP7HDLjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunkTBLP7HDLjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunkTBLP7HDLjs.samplePayloadForInputFields.call(void 0, inputFields)));
|
|
1707
1707
|
console.log("Example input payload:");
|
|
1708
1708
|
console.log(JSON.stringify(sampleInput, null, 2));
|
|
1709
1709
|
console.log(`Use in a play:`);
|
|
@@ -1717,32 +1717,32 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1717
1717
|
);
|
|
1718
1718
|
console.log("});");
|
|
1719
1719
|
console.log("const response = result.toolResponse.rawV2;");
|
|
1720
|
-
const getters =
|
|
1720
|
+
const getters = _chunkTBLP7HDLjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1721
1721
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1722
1722
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1723
|
-
const firstGetter = valueGetters.find(
|
|
1723
|
+
const firstGetter = valueGetters.find(_chunkTBLP7HDLjs.isRecord);
|
|
1724
1724
|
if (firstGetter) {
|
|
1725
|
-
const name =
|
|
1726
|
-
const expression =
|
|
1725
|
+
const name = _chunkTBLP7HDLjs.stringField.call(void 0, firstGetter, "name") || "value";
|
|
1726
|
+
const expression = _chunkTBLP7HDLjs.stringField.call(void 0, firstGetter, "expression");
|
|
1727
1727
|
if (expression)
|
|
1728
1728
|
console.log(
|
|
1729
1729
|
`const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
|
|
1730
1730
|
);
|
|
1731
1731
|
}
|
|
1732
1732
|
const arrayNames = new Set(
|
|
1733
|
-
|
|
1734
|
-
|
|
1733
|
+
_chunkTBLP7HDLjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1734
|
+
_chunkTBLP7HDLjs.recordField.call(void 0, tool, "outputSchema", "output_schema")
|
|
1735
1735
|
).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
|
|
1736
1736
|
);
|
|
1737
1737
|
const firstList = _nullishCoalesce(listGetters.find(
|
|
1738
|
-
(entry) =>
|
|
1739
|
-
), () => ( listGetters.find(
|
|
1740
|
-
if (
|
|
1741
|
-
const name = safeIdentifier(
|
|
1738
|
+
(entry) => _chunkTBLP7HDLjs.isRecord.call(void 0, entry) && arrayNames.has(_chunkTBLP7HDLjs.stringField.call(void 0, entry, "name"))
|
|
1739
|
+
), () => ( listGetters.find(_chunkTBLP7HDLjs.isRecord)));
|
|
1740
|
+
if (_chunkTBLP7HDLjs.isRecord.call(void 0, firstList)) {
|
|
1741
|
+
const name = safeIdentifier(_chunkTBLP7HDLjs.stringField.call(void 0, firstList, "name") || "list");
|
|
1742
1742
|
if (_chunkJ33TSWO5js.playToolListGetterMode.call(void 0, ) === "array") {
|
|
1743
|
-
console.log(`const ${name}_rows = ${
|
|
1743
|
+
console.log(`const ${name}_rows = ${_chunkTBLP7HDLjs.playResultExpression.call(void 0, firstList)};`);
|
|
1744
1744
|
} else {
|
|
1745
|
-
console.log(`const ${name}_ds = ${
|
|
1745
|
+
console.log(`const ${name}_ds = ${_chunkTBLP7HDLjs.playResultExpression.call(void 0, firstList)};`);
|
|
1746
1746
|
console.log(
|
|
1747
1747
|
"// Complete small list from this response; throws above the memory cap."
|
|
1748
1748
|
);
|
|
@@ -1752,7 +1752,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1752
1752
|
console.log("```");
|
|
1753
1753
|
if (firstList) printListGetterConsumption();
|
|
1754
1754
|
for (const example of examples) {
|
|
1755
|
-
const description =
|
|
1755
|
+
const description = _chunkTBLP7HDLjs.stringField.call(void 0, example, "description");
|
|
1756
1756
|
if (description) console.log(description);
|
|
1757
1757
|
console.log("Example Deepline execution response:");
|
|
1758
1758
|
console.log(JSON.stringify(example.response, null, 2));
|
|
@@ -1767,14 +1767,14 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1767
1767
|
}
|
|
1768
1768
|
function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
1769
1769
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1770
|
-
const inputFields =
|
|
1771
|
-
|
|
1770
|
+
const inputFields = _chunkTBLP7HDLjs.toolInputFieldsForDisplay.call(void 0,
|
|
1771
|
+
_chunkTBLP7HDLjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
|
|
1772
1772
|
);
|
|
1773
|
-
const sampleInput =
|
|
1774
|
-
const playReference =
|
|
1773
|
+
const sampleInput = _chunkTBLP7HDLjs.samplePayloadForInputFields.call(void 0, inputFields);
|
|
1774
|
+
const playReference = _chunkTBLP7HDLjs.playReferenceForTool.call(void 0, tool);
|
|
1775
1775
|
console.log("Run as a play:");
|
|
1776
1776
|
console.log(
|
|
1777
|
-
|
|
1777
|
+
_chunkTBLP7HDLjs.playRunCommandForTool.call(void 0,
|
|
1778
1778
|
tool,
|
|
1779
1779
|
toolId,
|
|
1780
1780
|
Object.keys(sampleInput).length ? sampleInput : void 0
|
|
@@ -1785,13 +1785,13 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
1787
|
function printToolGettersOnly(tool, requestedToolId) {
|
|
1788
|
-
const contract =
|
|
1788
|
+
const contract = _chunkTBLP7HDLjs.toolContractJsonForDescribe.call(void 0,
|
|
1789
1789
|
tool,
|
|
1790
1790
|
requestedToolId,
|
|
1791
1791
|
void 0,
|
|
1792
1792
|
seedToolListScript
|
|
1793
1793
|
);
|
|
1794
|
-
const getters =
|
|
1794
|
+
const getters = _chunkTBLP7HDLjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1795
1795
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1796
1796
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1797
1797
|
console.log(`Getters: ${contract.toolId}`);
|
|
@@ -1802,9 +1802,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1802
1802
|
if (listGetters.length) {
|
|
1803
1803
|
console.log(listGetterHeading());
|
|
1804
1804
|
for (const entry of listGetters) {
|
|
1805
|
-
if (
|
|
1805
|
+
if (_chunkTBLP7HDLjs.isRecord.call(void 0, entry))
|
|
1806
1806
|
console.log(
|
|
1807
|
-
`- ${
|
|
1807
|
+
`- ${_chunkTBLP7HDLjs.stringField.call(void 0, entry, "name")}: ${_chunkTBLP7HDLjs.playResultExpression.call(void 0, entry)}`
|
|
1808
1808
|
);
|
|
1809
1809
|
}
|
|
1810
1810
|
printListGetterConsumption();
|
|
@@ -1812,9 +1812,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1812
1812
|
if (valueGetters.length) {
|
|
1813
1813
|
console.log("Values:");
|
|
1814
1814
|
for (const entry of valueGetters) {
|
|
1815
|
-
if (
|
|
1815
|
+
if (_chunkTBLP7HDLjs.isRecord.call(void 0, entry))
|
|
1816
1816
|
console.log(
|
|
1817
|
-
`- ${
|
|
1817
|
+
`- ${_chunkTBLP7HDLjs.stringField.call(void 0, entry, "name")}: ${_chunkTBLP7HDLjs.playResultExpression.call(void 0, entry)}`
|
|
1818
1818
|
);
|
|
1819
1819
|
}
|
|
1820
1820
|
}
|
|
@@ -1852,22 +1852,22 @@ function listedToolDescription(tool) {
|
|
|
1852
1852
|
}
|
|
1853
1853
|
function formatListedToolCost(tool) {
|
|
1854
1854
|
const record = tool;
|
|
1855
|
-
if (
|
|
1855
|
+
if (_chunkTBLP7HDLjs.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
|
|
1856
1856
|
return "Cost: Free";
|
|
1857
1857
|
}
|
|
1858
|
-
const pricing =
|
|
1859
|
-
const displayText =
|
|
1858
|
+
const pricing = _chunkTBLP7HDLjs.recordField.call(void 0, record, "pricing");
|
|
1859
|
+
const displayText = _chunkTBLP7HDLjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
1860
1860
|
return displayText ? `Cost: ${displayText}` : "";
|
|
1861
1861
|
}
|
|
1862
1862
|
function printToolOutputArrayShape(tool) {
|
|
1863
|
-
const outputFields =
|
|
1864
|
-
|
|
1863
|
+
const outputFields = _chunkTBLP7HDLjs.toolOutputFieldsForDisplay.call(void 0,
|
|
1864
|
+
_chunkTBLP7HDLjs.recordField.call(void 0, _chunkTBLP7HDLjs.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
|
|
1865
1865
|
);
|
|
1866
1866
|
if (outputFields.length === 0) return;
|
|
1867
1867
|
console.log(" Output array shape (declared schema):");
|
|
1868
1868
|
for (const field of outputFields.slice(0, 60)) {
|
|
1869
1869
|
const name = String(field.name);
|
|
1870
|
-
const type =
|
|
1870
|
+
const type = _chunkTBLP7HDLjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1871
1871
|
const itemBounds = arrayItemBoundsSuffix(field);
|
|
1872
1872
|
console.log(` - ${name}: ${type}${itemBounds}`);
|
|
1873
1873
|
}
|
|
@@ -1876,14 +1876,14 @@ function printToolOutputArrayShape(tool) {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
}
|
|
1878
1878
|
function declaredToolJsonSchema(inputSchema) {
|
|
1879
|
-
if (
|
|
1879
|
+
if (_chunkTBLP7HDLjs.isRecord.call(void 0, inputSchema.jsonSchema)) {
|
|
1880
1880
|
return inputSchema.jsonSchema;
|
|
1881
1881
|
}
|
|
1882
1882
|
return Array.isArray(inputSchema.fields) ? null : inputSchema;
|
|
1883
1883
|
}
|
|
1884
1884
|
function arrayItemBoundsSuffix(field) {
|
|
1885
|
-
const itemSchema =
|
|
1886
|
-
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type :
|
|
1885
|
+
const itemSchema = _chunkTBLP7HDLjs.isRecord.call(void 0, field.items) ? field.items : null;
|
|
1886
|
+
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunkTBLP7HDLjs.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
|
|
1887
1887
|
const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _16 => _16.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
|
|
1888
1888
|
const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
|
|
1889
1889
|
const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
|
|
@@ -1896,21 +1896,21 @@ function arrayItemBoundsSuffix(field) {
|
|
|
1896
1896
|
return itemTypeSuffix;
|
|
1897
1897
|
}
|
|
1898
1898
|
function printToolExecutionHints(value) {
|
|
1899
|
-
const batchCapabilityRecord =
|
|
1900
|
-
|
|
1899
|
+
const batchCapabilityRecord = _chunkTBLP7HDLjs.recordField.call(void 0,
|
|
1900
|
+
_chunkTBLP7HDLjs.isRecord.call(void 0, value) ? value : {},
|
|
1901
1901
|
"batchCapability",
|
|
1902
1902
|
"batch_capability"
|
|
1903
1903
|
);
|
|
1904
1904
|
const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
|
|
1905
|
-
const executionMetadata =
|
|
1906
|
-
|
|
1905
|
+
const executionMetadata = _chunkTBLP7HDLjs.recordField.call(void 0,
|
|
1906
|
+
_chunkTBLP7HDLjs.isRecord.call(void 0, value) ? value : {},
|
|
1907
1907
|
"executionMetadata",
|
|
1908
1908
|
"execution_metadata"
|
|
1909
1909
|
);
|
|
1910
1910
|
if (batchCapability) {
|
|
1911
|
-
const status =
|
|
1912
|
-
const surface =
|
|
1913
|
-
const operation =
|
|
1911
|
+
const status = _chunkTBLP7HDLjs.stringField.call(void 0, batchCapability, "status") || "unknown";
|
|
1912
|
+
const surface = _chunkTBLP7HDLjs.stringField.call(void 0, batchCapability, "surface");
|
|
1913
|
+
const operation = _chunkTBLP7HDLjs.stringField.call(void 0,
|
|
1914
1914
|
batchCapability,
|
|
1915
1915
|
"batchOperation",
|
|
1916
1916
|
"batch_operation"
|
|
@@ -1920,7 +1920,7 @@ function printToolExecutionHints(value) {
|
|
|
1920
1920
|
"maxBatchSize",
|
|
1921
1921
|
"max_batch_size"
|
|
1922
1922
|
);
|
|
1923
|
-
const notes =
|
|
1923
|
+
const notes = _chunkTBLP7HDLjs.stringField.call(void 0, batchCapability, "notes");
|
|
1924
1924
|
console.log("");
|
|
1925
1925
|
console.log("Batching:");
|
|
1926
1926
|
console.log(`- Catalog status: ${status}${surface ? ` (${surface})` : ""}`);
|
|
@@ -1939,11 +1939,11 @@ function printToolExecutionHints(value) {
|
|
|
1939
1939
|
}
|
|
1940
1940
|
if (notes) console.log(`- Details: ${notes}`);
|
|
1941
1941
|
}
|
|
1942
|
-
const configuredRateLimits =
|
|
1942
|
+
const configuredRateLimits = _chunkTBLP7HDLjs.arrayField.call(void 0,
|
|
1943
1943
|
executionMetadata,
|
|
1944
1944
|
"configuredRateLimits",
|
|
1945
1945
|
"configured_rate_limits"
|
|
1946
|
-
).filter(
|
|
1946
|
+
).filter(_chunkTBLP7HDLjs.isRecord);
|
|
1947
1947
|
if (configuredRateLimits.length > 0) {
|
|
1948
1948
|
console.log("");
|
|
1949
1949
|
console.log(
|
|
@@ -1953,7 +1953,7 @@ function printToolExecutionHints(value) {
|
|
|
1953
1953
|
const requests = numberField(limit, "requestsPerWindow");
|
|
1954
1954
|
const windowMs = numberField(limit, "windowMs");
|
|
1955
1955
|
if (requests === null || windowMs === null) continue;
|
|
1956
|
-
const usage =
|
|
1956
|
+
const usage = _chunkTBLP7HDLjs.stringField.call(void 0, limit, "usage") || "unknown";
|
|
1957
1957
|
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;
|
|
1958
1958
|
const explicitMaxConcurrency = numberField(
|
|
1959
1959
|
limit,
|
|
@@ -1962,11 +1962,11 @@ function printToolExecutionHints(value) {
|
|
|
1962
1962
|
);
|
|
1963
1963
|
const concurrencyText = explicitMaxConcurrency === null ? "no explicit concurrency limit" : `explicit concurrency limit ${explicitMaxConcurrency}`;
|
|
1964
1964
|
console.log(
|
|
1965
|
-
`- ${requests} requests per ${formatRateWindow(windowMs)}${
|
|
1965
|
+
`- ${requests} requests per ${formatRateWindow(windowMs)}${_chunkLHPYCJNLjs.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
|
|
1966
1966
|
);
|
|
1967
1967
|
}
|
|
1968
1968
|
}
|
|
1969
|
-
const queueHint =
|
|
1969
|
+
const queueHint = _chunkTBLP7HDLjs.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
|
|
1970
1970
|
const requestsPerSecondHint = numberField(
|
|
1971
1971
|
queueHint,
|
|
1972
1972
|
"requestsPerSecondHint",
|
|
@@ -1992,25 +1992,25 @@ function formatRateWindow(windowMs) {
|
|
|
1992
1992
|
}
|
|
1993
1993
|
function samplePayload(samples, key) {
|
|
1994
1994
|
const entry = samples[key];
|
|
1995
|
-
if (!
|
|
1995
|
+
if (!_chunkTBLP7HDLjs.isRecord.call(void 0, entry)) return void 0;
|
|
1996
1996
|
return Object.prototype.hasOwnProperty.call(entry, "payload") ? entry.payload : entry;
|
|
1997
1997
|
}
|
|
1998
1998
|
function commandEnvelopeFromRawResponse(rawResponse) {
|
|
1999
|
-
return
|
|
1999
|
+
return _chunkTBLP7HDLjs.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
|
|
2000
2000
|
}
|
|
2001
2001
|
function toolExecuteExitCode(envelope) {
|
|
2002
2002
|
return envelope.status === "failed" || envelope.ok === false ? 1 : 0;
|
|
2003
2003
|
}
|
|
2004
2004
|
function extractToolExecutionWarningMessages(rawResponse) {
|
|
2005
|
-
if (!
|
|
2005
|
+
if (!_chunkTBLP7HDLjs.isRecord.call(void 0, rawResponse)) return [];
|
|
2006
2006
|
const candidates = [
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2007
|
+
_chunkTBLP7HDLjs.recordField.call(void 0, _chunkTBLP7HDLjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
|
|
2008
|
+
_chunkTBLP7HDLjs.recordField.call(void 0,
|
|
2009
|
+
_chunkTBLP7HDLjs.recordField.call(void 0, _chunkTBLP7HDLjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
|
|
2010
2010
|
"meta"
|
|
2011
2011
|
),
|
|
2012
|
-
|
|
2013
|
-
|
|
2012
|
+
_chunkTBLP7HDLjs.recordField.call(void 0, rawResponse, "meta"),
|
|
2013
|
+
_chunkTBLP7HDLjs.recordField.call(void 0, _chunkTBLP7HDLjs.recordField.call(void 0, rawResponse, "result"), "meta")
|
|
2014
2014
|
];
|
|
2015
2015
|
const messages = [];
|
|
2016
2016
|
for (const candidate of candidates) {
|
|
@@ -2019,8 +2019,8 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
2019
2019
|
for (const warning of warnings) {
|
|
2020
2020
|
if (typeof warning === "string" && warning.trim()) {
|
|
2021
2021
|
messages.push(warning.trim());
|
|
2022
|
-
} else if (
|
|
2023
|
-
const message =
|
|
2022
|
+
} else if (_chunkTBLP7HDLjs.isRecord.call(void 0, warning)) {
|
|
2023
|
+
const message = _chunkTBLP7HDLjs.stringField.call(void 0, warning, "message");
|
|
2024
2024
|
if (message) messages.push(message);
|
|
2025
2025
|
}
|
|
2026
2026
|
}
|
|
@@ -2028,20 +2028,20 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
2028
2028
|
return [...new Set(messages)];
|
|
2029
2029
|
}
|
|
2030
2030
|
function apifySyncRecoveryNext(rawResponse) {
|
|
2031
|
-
if (!
|
|
2032
|
-
const toolResponse =
|
|
2033
|
-
const raw =
|
|
2031
|
+
if (!_chunkTBLP7HDLjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
|
|
2032
|
+
const toolResponse = _chunkTBLP7HDLjs.recordField.call(void 0, rawResponse, "toolResponse");
|
|
2033
|
+
const raw = _chunkTBLP7HDLjs.recordField.call(void 0, toolResponse, "raw");
|
|
2034
2034
|
if (raw.state !== "awaiting_apify") return null;
|
|
2035
|
-
const next =
|
|
2036
|
-
const getActorRun =
|
|
2037
|
-
const getActorRunTool =
|
|
2038
|
-
const getActorRunPayload =
|
|
2035
|
+
const next = _chunkTBLP7HDLjs.recordField.call(void 0, raw, "next");
|
|
2036
|
+
const getActorRun = _chunkTBLP7HDLjs.recordField.call(void 0, next, "getActorRun");
|
|
2037
|
+
const getActorRunTool = _chunkTBLP7HDLjs.stringField.call(void 0, getActorRun, "tool");
|
|
2038
|
+
const getActorRunPayload = _chunkTBLP7HDLjs.recordField.call(void 0, getActorRun, "payload");
|
|
2039
2039
|
if (!getActorRunTool || Object.keys(getActorRunPayload).length === 0) {
|
|
2040
2040
|
return null;
|
|
2041
2041
|
}
|
|
2042
|
-
const getDatasetItems =
|
|
2043
|
-
const getDatasetItemsTool =
|
|
2044
|
-
const getDatasetItemsPayload =
|
|
2042
|
+
const getDatasetItems = _chunkTBLP7HDLjs.recordField.call(void 0, next, "getDatasetItems");
|
|
2043
|
+
const getDatasetItemsTool = _chunkTBLP7HDLjs.stringField.call(void 0, getDatasetItems, "tool");
|
|
2044
|
+
const getDatasetItemsPayload = _chunkTBLP7HDLjs.recordField.call(void 0, getDatasetItems, "payload");
|
|
2045
2045
|
return {
|
|
2046
2046
|
getActorRun: `deepline run ${getActorRunTool} --input ${_chunkBVXIGOBZjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
|
|
2047
2047
|
...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
|
|
@@ -2051,7 +2051,7 @@ function apifySyncRecoveryNext(rawResponse) {
|
|
|
2051
2051
|
}
|
|
2052
2052
|
function listExtractorPathsFromUsageGuidance(tool) {
|
|
2053
2053
|
const toolExecutionResult = _optionalChain([tool, 'access', _18 => _18.usageGuidance, 'optionalAccess', _19 => _19.toolExecutionResult]);
|
|
2054
|
-
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _20 => _20.extractedLists])) ? toolExecutionResult.extractedLists :
|
|
2054
|
+
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _20 => _20.extractedLists])) ? toolExecutionResult.extractedLists : _chunkTBLP7HDLjs.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _21 => _21.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
|
|
2055
2055
|
return extractedLists.flatMap((entry) => {
|
|
2056
2056
|
const paths = _nullishCoalesce(_optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.candidatePaths]), () => ( _optionalChain([entry, 'access', _24 => _24.details, 'optionalAccess', _25 => _25.rawToolOutputPaths])));
|
|
2057
2057
|
if (!Array.isArray(paths)) return [];
|
|
@@ -2133,7 +2133,7 @@ function parseJsonObjectArgument(raw, flagName) {
|
|
|
2133
2133
|
}
|
|
2134
2134
|
throw invalidJsonError(flagName, message);
|
|
2135
2135
|
}
|
|
2136
|
-
if (!
|
|
2136
|
+
if (!_chunkTBLP7HDLjs.isRecord.call(void 0, parsed)) {
|
|
2137
2137
|
throw invalidJsonError(flagName, "expected an object.");
|
|
2138
2138
|
}
|
|
2139
2139
|
return parsed;
|
|
@@ -2181,7 +2181,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2181
2181
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2182
2182
|
}
|
|
2183
2183
|
if (options.idempotencyKey !== void 0) {
|
|
2184
|
-
|
|
2184
|
+
_chunkA4KQZ6P5js.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2185
2185
|
}
|
|
2186
2186
|
if (options.connection !== void 0 && (options.recover || options.idempotencyKey !== void 0)) {
|
|
2187
2187
|
throw new Error(
|
|
@@ -2320,7 +2320,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2320
2320
|
kind: summaryEntries.length > 0 ? "object" : "raw",
|
|
2321
2321
|
summary: input.summary
|
|
2322
2322
|
};
|
|
2323
|
-
const envelopeHasCanonicalOutput =
|
|
2323
|
+
const envelopeHasCanonicalOutput = _chunkTBLP7HDLjs.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
|
|
2324
2324
|
const envelopeHasDeclaredOutput = Object.prototype.hasOwnProperty.call(
|
|
2325
2325
|
envelope,
|
|
2326
2326
|
"output"
|
|
@@ -2348,7 +2348,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2348
2348
|
return {
|
|
2349
2349
|
...envelope,
|
|
2350
2350
|
...input.idempotencyKey ? { idempotency_key: input.idempotencyKey } : {},
|
|
2351
|
-
...
|
|
2351
|
+
..._chunkTBLP7HDLjs.isRecord.call(void 0, input.rawResponse) && _chunkTBLP7HDLjs.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
|
|
2352
2352
|
...envelopeHasCanonicalOutput || envelopeHasDeclaredOutput ? { output_preview: outputPreview } : { output: outputPreview },
|
|
2353
2353
|
...summaryEntries.length > 0 ? { summary: input.summary } : {},
|
|
2354
2354
|
...warningMessages.length > 0 ? { warnings: warningMessages } : {},
|
|
@@ -2409,7 +2409,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
|
|
|
2409
2409
|
void _render;
|
|
2410
2410
|
void _next;
|
|
2411
2411
|
void _local;
|
|
2412
|
-
const billingLookup =
|
|
2412
|
+
const billingLookup = _chunkTBLP7HDLjs.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
|
|
2413
2413
|
const inspection = toolExecutionInspection(input);
|
|
2414
2414
|
return {
|
|
2415
2415
|
...base,
|
|
@@ -2505,7 +2505,7 @@ function printToolExecutionWarnings(toolId, params, metadata) {
|
|
|
2505
2505
|
}
|
|
2506
2506
|
}
|
|
2507
2507
|
function assertExecutableToolMetadata(toolId, metadata) {
|
|
2508
|
-
if (
|
|
2508
|
+
if (_chunkTBLP7HDLjs.isPlayLikeTool.call(void 0, metadata)) {
|
|
2509
2509
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
2510
2510
|
playLikeToolExecuteErrorMessage(
|
|
2511
2511
|
toolId,
|
|
@@ -2523,7 +2523,7 @@ function valueAt(value, path) {
|
|
|
2523
2523
|
for (const [index, part] of parts.entries()) {
|
|
2524
2524
|
const each = part === "*" || part.endsWith("[*]");
|
|
2525
2525
|
if (part !== "*") {
|
|
2526
|
-
at =
|
|
2526
|
+
at = _chunkTBLP7HDLjs.isRecord.call(void 0, at) ? at[each ? part.slice(0, -3) : part] : void 0;
|
|
2527
2527
|
}
|
|
2528
2528
|
if (!each) continue;
|
|
2529
2529
|
if (!Array.isArray(at)) return void 0;
|
|
@@ -2539,7 +2539,7 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2539
2539
|
const getters = ["extractedValues", "extractedLists"].flatMap(
|
|
2540
2540
|
(kind) => {
|
|
2541
2541
|
const group = _optionalChain([result, 'optionalAccess', _30 => _30[kind]]);
|
|
2542
|
-
return Array.isArray(group) ? group :
|
|
2542
|
+
return Array.isArray(group) ? group : _chunkTBLP7HDLjs.isRecord.call(void 0, group) ? Object.entries(group).map(([name, getter]) => ({
|
|
2543
2543
|
name,
|
|
2544
2544
|
...getter
|
|
2545
2545
|
})) : [];
|
|
@@ -2564,13 +2564,13 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2564
2564
|
}
|
|
2565
2565
|
function writeToolReceipt(input) {
|
|
2566
2566
|
const { response, metadata } = input;
|
|
2567
|
-
const envelope =
|
|
2567
|
+
const envelope = _chunkTBLP7HDLjs.isRecord.call(void 0, response) ? response : {};
|
|
2568
2568
|
const jobId = typeof envelope.job_id === "string" ? envelope.job_id : null;
|
|
2569
|
-
const toolResponse =
|
|
2569
|
+
const toolResponse = _chunkTBLP7HDLjs.recordField.call(void 0, envelope, "toolResponse");
|
|
2570
2570
|
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;
|
|
2571
2571
|
const status = typeof envelope.status === "string" ? envelope.status : "completed";
|
|
2572
|
-
const charged =
|
|
2573
|
-
|
|
2572
|
+
const charged = _chunkTBLP7HDLjs.recordField.call(void 0, envelope, "billing").credits_charged;
|
|
2573
|
+
_chunkJUTXZW3Sjs.writeExecutionOutput.call(void 0,
|
|
2574
2574
|
{
|
|
2575
2575
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2576
2576
|
status,
|
|
@@ -2601,8 +2601,8 @@ async function executeToolForReceipt(input) {
|
|
|
2601
2601
|
let retryKey = null;
|
|
2602
2602
|
let received = false;
|
|
2603
2603
|
try {
|
|
2604
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2605
|
-
const client = new (0,
|
|
2604
|
+
const cliInvocationId = _nullishCoalesce(_chunkQQ6AVBHWjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkQQ6AVBHWjs.beginToolExecuteCommand.call(void 0, )));
|
|
2605
|
+
const client = new (0, _chunkPNFC7VHHjs.DeeplineClient)();
|
|
2606
2606
|
const metadata = assertExecutableToolMetadata(
|
|
2607
2607
|
toolId,
|
|
2608
2608
|
await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
|
|
@@ -2624,9 +2624,9 @@ async function executeToolForReceipt(input) {
|
|
|
2624
2624
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2625
2625
|
..._optionalChain([metadata, 'access', _37 => _37.executionMetadata, 'optionalAccess', _38 => _38.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2626
2626
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2627
|
-
searchRef:
|
|
2627
|
+
searchRef: _chunkOJ3FRPEPjs.recentSearchRef.call(void 0, toolId),
|
|
2628
2628
|
cliInvocationId,
|
|
2629
|
-
onResponseReceived:
|
|
2629
|
+
onResponseReceived: _chunkJUTXZW3Sjs.recordApiResponse
|
|
2630
2630
|
});
|
|
2631
2631
|
const response = await call(key).catch((error) => {
|
|
2632
2632
|
if (!key || !refusedRetryKey(error)) throw error;
|
|
@@ -2662,11 +2662,11 @@ async function executeToolForReceipt(input) {
|
|
|
2662
2662
|
if (received) throw error;
|
|
2663
2663
|
const outcomeKnown = answeredWithFailure(error);
|
|
2664
2664
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _39 => _39.discard, 'call', _40 => _40()]);
|
|
2665
|
-
|
|
2665
|
+
_chunkJUTXZW3Sjs.writeExecutionOutput.call(void 0,
|
|
2666
2666
|
{
|
|
2667
2667
|
id: outcomeKnown ? null : key,
|
|
2668
2668
|
status: "failed",
|
|
2669
|
-
error:
|
|
2669
|
+
error: _chunkIUDO463Ijs.errorToJsonPayload.call(void 0, error).error,
|
|
2670
2670
|
...key && !outcomeKnown ? {
|
|
2671
2671
|
next: {
|
|
2672
2672
|
retry: "Run the same command again: it picks up this call without paying twice."
|
|
@@ -2698,11 +2698,11 @@ function answeredWithFailure(error) {
|
|
|
2698
2698
|
!(error.code === "IDEMPOTENCY_NOT_SUPPORTED" && !serverBodyHasCode(_optionalChain([error, 'access', _43 => _43.details, 'optionalAccess', _44 => _44.response]), "IDEMPOTENCY_NOT_SUPPORTED"));
|
|
2699
2699
|
}
|
|
2700
2700
|
async function getToolExecutionReceipt(key, output) {
|
|
2701
|
-
const client = new (0,
|
|
2701
|
+
const client = new (0, _chunkPNFC7VHHjs.DeeplineClient)();
|
|
2702
2702
|
const execution = await client.executions.getByKey(key);
|
|
2703
2703
|
output.label = `${execution.toolId} (tool)`;
|
|
2704
2704
|
if (execution.response === void 0) {
|
|
2705
|
-
|
|
2705
|
+
_chunkJUTXZW3Sjs.writeExecutionOutput.call(void 0,
|
|
2706
2706
|
{
|
|
2707
2707
|
id: key,
|
|
2708
2708
|
status: execution.executionRecovery.state,
|
|
@@ -2731,19 +2731,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2731
2731
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2732
2732
|
} catch (error) {
|
|
2733
2733
|
if (wantsJson) {
|
|
2734
|
-
|
|
2734
|
+
_chunkIUDO463Ijs.printJsonError.call(void 0, error);
|
|
2735
2735
|
} else {
|
|
2736
2736
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2737
2737
|
}
|
|
2738
2738
|
return error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2739
2739
|
}
|
|
2740
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2740
|
+
const cliInvocationId = _nullishCoalesce(_chunkQQ6AVBHWjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkQQ6AVBHWjs.beginToolExecuteCommand.call(void 0, )));
|
|
2741
2741
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2742
|
-
const tracing =
|
|
2742
|
+
const tracing = _chunk6BJHMXMAjs.isCliTraceEnabled.call(void 0, );
|
|
2743
2743
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2744
|
-
const client = new (0,
|
|
2744
|
+
const client = new (0, _chunkPNFC7VHHjs.DeeplineClient)();
|
|
2745
2745
|
if (clientStartedAt !== void 0) {
|
|
2746
|
-
|
|
2746
|
+
_chunk6BJHMXMAjs.recordCliTrace.call(void 0, {
|
|
2747
2747
|
phase: "cli.tool_execute_client_setup",
|
|
2748
2748
|
ms: performance.now() - clientStartedAt
|
|
2749
2749
|
});
|
|
@@ -2752,13 +2752,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2752
2752
|
const readMetadata = async () => {
|
|
2753
2753
|
if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2754
2754
|
try {
|
|
2755
|
-
metadata = await
|
|
2755
|
+
metadata = await _chunkQQ6AVBHWjs.runToolExecuteStage.call(void 0,
|
|
2756
2756
|
"tool metadata lookup",
|
|
2757
2757
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2758
2758
|
);
|
|
2759
2759
|
} catch (error) {
|
|
2760
2760
|
if (isMissingToolMetadataError(error)) {
|
|
2761
|
-
const play = await
|
|
2761
|
+
const play = await _chunkQQ6AVBHWjs.runToolExecuteStage.call(void 0,
|
|
2762
2762
|
"play alias lookup",
|
|
2763
2763
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2764
2764
|
);
|
|
@@ -2781,7 +2781,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2781
2781
|
toolMetadata = await readMetadata();
|
|
2782
2782
|
} catch (error) {
|
|
2783
2783
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2784
|
-
if (wantsJson)
|
|
2784
|
+
if (wantsJson) _chunkIUDO463Ijs.printJsonError.call(void 0, error);
|
|
2785
2785
|
else console.error(error.message);
|
|
2786
2786
|
return 2;
|
|
2787
2787
|
}
|
|
@@ -2809,7 +2809,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2809
2809
|
assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2810
2810
|
} catch (error) {
|
|
2811
2811
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2812
|
-
if (wantsJson)
|
|
2812
|
+
if (wantsJson) _chunkIUDO463Ijs.printJsonError.call(void 0, error);
|
|
2813
2813
|
else console.error(error.message);
|
|
2814
2814
|
return 2;
|
|
2815
2815
|
}
|
|
@@ -2821,7 +2821,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2821
2821
|
metadata = await readMetadata();
|
|
2822
2822
|
} catch (error) {
|
|
2823
2823
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2824
|
-
if (wantsJson)
|
|
2824
|
+
if (wantsJson) _chunkIUDO463Ijs.printJsonError.call(void 0, error);
|
|
2825
2825
|
else console.error(error.message);
|
|
2826
2826
|
return 2;
|
|
2827
2827
|
}
|
|
@@ -2837,7 +2837,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2837
2837
|
metadata = await readMetadata();
|
|
2838
2838
|
} catch (error) {
|
|
2839
2839
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2840
|
-
if (wantsJson)
|
|
2840
|
+
if (wantsJson) _chunkIUDO463Ijs.printJsonError.call(void 0, error);
|
|
2841
2841
|
else console.error(error.message);
|
|
2842
2842
|
return 2;
|
|
2843
2843
|
}
|
|
@@ -2864,11 +2864,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2864
2864
|
...parsed.connection !== void 0 ? { connection: parsed.connection } : {},
|
|
2865
2865
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2866
2866
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2867
|
-
searchRef:
|
|
2867
|
+
searchRef: _chunkOJ3FRPEPjs.recentSearchRef.call(void 0, parsed.toolId),
|
|
2868
2868
|
cliInvocationId,
|
|
2869
|
-
onResponseReceived:
|
|
2869
|
+
onResponseReceived: _chunkJUTXZW3Sjs.recordApiResponse,
|
|
2870
2870
|
...tracing ? {
|
|
2871
|
-
onServerTiming: (serverTiming) =>
|
|
2871
|
+
onServerTiming: (serverTiming) => _chunk6BJHMXMAjs.recordCliTrace.call(void 0, {
|
|
2872
2872
|
phase: "tool_execute_server_timing",
|
|
2873
2873
|
cliInvocationId,
|
|
2874
2874
|
serverTiming,
|
|
@@ -2879,13 +2879,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2879
2879
|
let rawResponse;
|
|
2880
2880
|
let successfulCompatibilityResponse;
|
|
2881
2881
|
try {
|
|
2882
|
-
const executeResult = await
|
|
2882
|
+
const executeResult = await _chunkQQ6AVBHWjs.runToolExecuteStage.call(void 0,
|
|
2883
2883
|
"execute request",
|
|
2884
2884
|
async () => {
|
|
2885
2885
|
try {
|
|
2886
2886
|
if (tracing) {
|
|
2887
2887
|
submissionStartedAt = performance.now();
|
|
2888
|
-
|
|
2888
|
+
_chunk6BJHMXMAjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2889
2889
|
}
|
|
2890
2890
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2891
2891
|
...executeOptions,
|
|
@@ -2895,34 +2895,34 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2895
2895
|
} catch (error) {
|
|
2896
2896
|
if (parsed.connection !== void 0 || !(error instanceof _chunkLFQJW4S2js.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2897
2897
|
throw error;
|
|
2898
|
-
const baseUrl =
|
|
2898
|
+
const baseUrl = _chunkLWOYDMYCjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2899
2899
|
if (maintenancePolicy !== "off") {
|
|
2900
|
-
|
|
2900
|
+
_chunkTIMFDVUNjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2901
2901
|
}
|
|
2902
2902
|
const preflight = deferredCompatibility ? await deferredCompatibility.result.catch(() => null) : null;
|
|
2903
|
-
const compatibilityResponse = _optionalChain([preflight, 'optionalAccess', _50 => _50.live]) === true ? preflight.response : await
|
|
2903
|
+
const compatibilityResponse = _optionalChain([preflight, 'optionalAccess', _50 => _50.live]) === true ? preflight.response : await _chunkQQ6AVBHWjs.runToolExecuteStage.call(void 0,
|
|
2904
2904
|
"SDK compatibility",
|
|
2905
|
-
() =>
|
|
2905
|
+
() => _chunkTIMFDVUNjs.requireSdkCompatibility.call(void 0, baseUrl, {
|
|
2906
2906
|
command: "tools execute",
|
|
2907
|
-
skillsVersion:
|
|
2907
|
+
skillsVersion: _chunkLWOYDMYCjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2908
2908
|
persistCache: maintenancePolicy !== "off"
|
|
2909
2909
|
})
|
|
2910
2910
|
);
|
|
2911
2911
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _51 => _51.readMetadata, 'call', _52 => _52()]), () => ( metadata));
|
|
2912
|
-
if (maintenancePolicy !== "off" && await
|
|
2912
|
+
if (maintenancePolicy !== "off" && await _chunkQQ6AVBHWjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2913
2913
|
compatibilityResponse,
|
|
2914
2914
|
baseUrl,
|
|
2915
2915
|
maintenancePolicy
|
|
2916
2916
|
)) {
|
|
2917
2917
|
return void 0;
|
|
2918
2918
|
}
|
|
2919
|
-
|
|
2919
|
+
_chunkTIMFDVUNjs.enforceSdkCompatibilityResponse.call(void 0, compatibilityResponse, {
|
|
2920
2920
|
quietAdvisory: wantsJson
|
|
2921
2921
|
});
|
|
2922
2922
|
if (maintenancePolicy !== "off") {
|
|
2923
|
-
await
|
|
2923
|
+
await _chunkQQ6AVBHWjs.runToolExecuteStage.call(void 0,
|
|
2924
2924
|
"agent skills sync",
|
|
2925
|
-
() =>
|
|
2925
|
+
() => _chunkTIMFDVUNjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2926
2926
|
update: _optionalChain([compatibilityResponse, 'optionalAccess', _53 => _53.skills]),
|
|
2927
2927
|
mode: "detached"
|
|
2928
2928
|
})
|
|
@@ -2931,7 +2931,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2931
2931
|
const legacyMetadata = await readMetadata();
|
|
2932
2932
|
if (tracing) {
|
|
2933
2933
|
submissionStartedAt = performance.now();
|
|
2934
|
-
|
|
2934
|
+
_chunk6BJHMXMAjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2935
2935
|
}
|
|
2936
2936
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2937
2937
|
...executeOptions,
|
|
@@ -2954,8 +2954,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2954
2954
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2955
2955
|
const updateRequiredBeforeExecution = error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2956
2956
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2957
|
-
const baseUrl =
|
|
2958
|
-
if (await
|
|
2957
|
+
const baseUrl = _chunkLWOYDMYCjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2958
|
+
if (await _chunkQQ6AVBHWjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2959
2959
|
compatibility.response,
|
|
2960
2960
|
baseUrl,
|
|
2961
2961
|
maintenancePolicy
|
|
@@ -2979,7 +2979,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2979
2979
|
}
|
|
2980
2980
|
}
|
|
2981
2981
|
if (failure instanceof _chunkLFQJW4S2js.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2982
|
-
if (wantsJson)
|
|
2982
|
+
if (wantsJson) _chunkIUDO463Ijs.printJsonError.call(void 0, failure);
|
|
2983
2983
|
else console.error(failure.message);
|
|
2984
2984
|
return 2;
|
|
2985
2985
|
}
|
|
@@ -3006,9 +3006,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3006
3006
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
3007
3007
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _60 => _60.auto_update]);
|
|
3008
3008
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _61 => _61.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
3009
|
-
await
|
|
3009
|
+
await _chunkQQ6AVBHWjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
3010
3010
|
compatibilityResponse,
|
|
3011
|
-
|
|
3011
|
+
_chunkLWOYDMYCjs.resolveConfig.call(void 0, ).baseUrl,
|
|
3012
3012
|
maintenancePolicy
|
|
3013
3013
|
);
|
|
3014
3014
|
}
|
|
@@ -3026,8 +3026,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3026
3026
|
);
|
|
3027
3027
|
}
|
|
3028
3028
|
}
|
|
3029
|
-
const responseMetadata =
|
|
3030
|
-
|
|
3029
|
+
const responseMetadata = _chunkTBLP7HDLjs.recordField.call(void 0,
|
|
3030
|
+
_chunkTBLP7HDLjs.recordField.call(void 0, rawResponse, "_metadata"),
|
|
3031
3031
|
"tool"
|
|
3032
3032
|
);
|
|
3033
3033
|
const listOutputPaths = responseMetadata.listOutputPaths;
|
|
@@ -3039,11 +3039,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3039
3039
|
await readMetadata()
|
|
3040
3040
|
);
|
|
3041
3041
|
}
|
|
3042
|
-
if (
|
|
3042
|
+
if (_chunkTBLP7HDLjs.isRecord.call(void 0, rawResponse)) {
|
|
3043
3043
|
const { _metadata, ...execution } = rawResponse;
|
|
3044
3044
|
rawResponse = execution;
|
|
3045
3045
|
}
|
|
3046
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
3046
|
+
const { listConversion, summary, baseEnvelope } = await _chunkQQ6AVBHWjs.runToolExecuteStage.call(void 0,
|
|
3047
3047
|
"result formatting",
|
|
3048
3048
|
async () => {
|
|
3049
3049
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -3078,9 +3078,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3078
3078
|
}
|
|
3079
3079
|
skillsSyncAttempted = true;
|
|
3080
3080
|
try {
|
|
3081
|
-
await
|
|
3081
|
+
await _chunkQQ6AVBHWjs.runToolExecuteStage.call(void 0,
|
|
3082
3082
|
"agent skills sync",
|
|
3083
|
-
() =>
|
|
3083
|
+
() => _chunkTIMFDVUNjs.syncSdkSkillsIfNeeded.call(void 0, _chunkLWOYDMYCjs.resolveConfig.call(void 0, ).baseUrl, {
|
|
3084
3084
|
update: deliveredCompatibilityResponse.skills,
|
|
3085
3085
|
mode: "detached"
|
|
3086
3086
|
})
|
|
@@ -3091,15 +3091,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3091
3091
|
);
|
|
3092
3092
|
}
|
|
3093
3093
|
};
|
|
3094
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
3094
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkIUDO463Ijs.printCommandEnvelope.call(void 0, envelope, {
|
|
3095
3095
|
...options2,
|
|
3096
3096
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
3097
3097
|
});
|
|
3098
3098
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
3099
3099
|
await syncSkillsForDeliveredOutput();
|
|
3100
|
-
|
|
3100
|
+
_chunkIUDO463Ijs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
3101
3101
|
};
|
|
3102
|
-
const delivered = await
|
|
3102
|
+
const delivered = await _chunkQQ6AVBHWjs.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
3103
3103
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
3104
3104
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
3105
3105
|
return true;
|
|
@@ -3112,7 +3112,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3112
3112
|
await printDeliveredJsonEnvelope({
|
|
3113
3113
|
...baseEnvelope,
|
|
3114
3114
|
local: {
|
|
3115
|
-
...
|
|
3115
|
+
..._chunkTBLP7HDLjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
|
|
3116
3116
|
payload_file: jsonPath
|
|
3117
3117
|
}
|
|
3118
3118
|
});
|
|
@@ -3128,7 +3128,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3128
3128
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3129
3129
|
);
|
|
3130
3130
|
if (wantsJson) {
|
|
3131
|
-
|
|
3131
|
+
_chunkIUDO463Ijs.printJsonError.call(void 0, error);
|
|
3132
3132
|
} else {
|
|
3133
3133
|
console.error(error.message);
|
|
3134
3134
|
}
|
|
@@ -3223,13 +3223,13 @@ inspect: ${inspection.inspect}
|
|
|
3223
3223
|
return true;
|
|
3224
3224
|
});
|
|
3225
3225
|
if (delivered) {
|
|
3226
|
-
await
|
|
3226
|
+
await _chunkQQ6AVBHWjs.runToolExecuteStage.call(void 0,
|
|
3227
3227
|
"acknowledge delivery",
|
|
3228
3228
|
() => recovery.acknowledgeDelivery()
|
|
3229
3229
|
);
|
|
3230
3230
|
}
|
|
3231
3231
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3232
|
-
|
|
3232
|
+
_chunkTIMFDVUNjs.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3233
3233
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _64 => _64.auto_update, 'optionalAccess', _65 => _65.should_auto_update]) === true
|
|
3234
3234
|
});
|
|
3235
3235
|
}
|