deepline 0.3.572 → 0.3.574
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/config.ts +19 -0
- package/dist/bundling-sources/sdk/src/play.ts +7 -4
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +43 -7
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +56 -20
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +4 -3
- package/dist/cli/agents-6WN5LYUP.mjs +833 -0
- package/dist/cli/agents-7ZZSF4FS.js +833 -0
- package/dist/cli/{auth-YUDM3YOC.mjs → auth-I2QVO677.mjs} +5 -5
- package/dist/cli/auth-UKPV5U2B.js +44 -0
- package/dist/cli/{billing-F3ZGOWKL.js → billing-44QFBUWA.js} +106 -106
- package/dist/cli/{billing-O7WUC4TU.mjs → billing-YPH4GEWU.mjs} +10 -10
- package/dist/cli/{chunk-ITQPBWDS.js → chunk-2QYU57RG.js} +15 -7
- package/dist/cli/{chunk-LBNP52C4.js → chunk-2RPRSTHD.js} +5 -5
- package/dist/cli/{chunk-I4WKB3HO.mjs → chunk-2TMAKJBT.mjs} +2 -2
- package/dist/cli/{chunk-PQ6PM4V6.mjs → chunk-4T2U72SP.mjs} +1 -1
- package/dist/cli/{chunk-HYCJNHZ4.js → chunk-5E2PAGF5.js} +27 -20
- package/dist/cli/{chunk-W3HLZ24Q.js → chunk-6B5EZOI3.js} +10 -10
- package/dist/cli/{chunk-YOST7EJF.js → chunk-6GZIT3TH.js} +20 -20
- package/dist/cli/{chunk-72WI67H4.mjs → chunk-7334X74C.mjs} +2 -2
- package/dist/cli/{chunk-PI4TKE2B.js → chunk-7GQU46SZ.js} +26 -26
- package/dist/cli/{chunk-NOKSEYMS.js → chunk-7UR57HPJ.js} +1 -1
- package/dist/cli/{chunk-6ASDTHEN.js → chunk-AFPGYZBH.js} +21 -17
- package/dist/cli/{chunk-V2W7GX2I.mjs → chunk-B2XLIQPH.mjs} +3 -3
- package/dist/cli/{chunk-XNJXRS3B.js → chunk-BUBOZKH2.js} +2 -2
- package/dist/cli/{chunk-K4LAEKHS.js → chunk-D6ZVRKJ2.js} +41 -41
- package/dist/cli/{chunk-5VUD7HGD.js → chunk-DG56RWI2.js} +2 -2
- package/dist/cli/{chunk-UKD5ZBQD.js → chunk-DOZIWA66.js} +7 -7
- package/dist/cli/{chunk-EKWDSE6H.mjs → chunk-DX646HO7.mjs} +4 -4
- package/dist/cli/{chunk-43GCEVHO.js → chunk-ECLCRE5P.js} +3 -3
- package/dist/cli/{chunk-UUYB6IXC.js → chunk-G2HW2SAP.js} +13 -13
- package/dist/cli/{chunk-BWWDU6FN.mjs → chunk-G7OR3GVD.mjs} +5 -5
- package/dist/cli/{chunk-UQWYDNGB.mjs → chunk-GMQZFWQU.mjs} +17 -10
- package/dist/cli/{chunk-VGPHXXPI.js → chunk-H7PVSG3L.js} +15 -15
- package/dist/cli/{chunk-EL4LME5Y.js → chunk-I62ZBEKH.js} +48 -48
- package/dist/cli/{chunk-QA733N7N.mjs → chunk-IA2LTIWO.mjs} +2 -2
- package/dist/cli/{chunk-FGBX2WVJ.js → chunk-IB225ZK4.js} +4 -4
- package/dist/cli/{chunk-VZ4S5JRC.js → chunk-ID3LGPOE.js} +23 -23
- package/dist/cli/{chunk-LHPYCJNL.js → chunk-IXYVHTRZ.js} +19 -6
- package/dist/cli/{chunk-64MOX3SN.mjs → chunk-JCO226JM.mjs} +111 -2
- package/dist/cli/{chunk-SJI56XPM.mjs → chunk-JY7RKJ65.mjs} +21 -16
- package/dist/cli/{chunk-N6KF6X3D.js → chunk-KSHZY52O.js} +114 -5
- package/dist/cli/{chunk-BM4GE67C.mjs → chunk-L2NXB4WG.mjs} +19 -6
- package/dist/cli/{chunk-UFUXGMHL.mjs → chunk-LCAXLGAY.mjs} +2 -2
- package/dist/cli/{chunk-AHNJGA6Z.js → chunk-LJLM4BUL.js} +6 -6
- package/dist/cli/{chunk-EKIWY5DD.mjs → chunk-LLSCFLFU.mjs} +1 -1
- package/dist/cli/{chunk-OUVQKSVC.mjs → chunk-MAMGREBW.mjs} +1 -1
- package/dist/cli/{chunk-CYW6PE3G.mjs → chunk-MGF3MK27.mjs} +5 -5
- package/dist/cli/{chunk-PZGK6EEB.js → chunk-N6I3BB2O.js} +280 -275
- package/dist/cli/{chunk-4W5EFHHY.js → chunk-NDDGFX4X.js} +11 -11
- package/dist/cli/{chunk-RIA73OAZ.mjs → chunk-NRVEVKXR.mjs} +2 -2
- package/dist/cli/{chunk-UY6Z3XWW.mjs → chunk-OH6WOID2.mjs} +2 -2
- package/dist/cli/{chunk-GX4VZL4Z.mjs → chunk-OIZUFRTE.mjs} +3 -3
- package/dist/cli/{chunk-3SFLY3T3.js → chunk-PP5RMEQQ.js} +5 -5
- package/dist/cli/{chunk-UMP76GYQ.mjs → chunk-PW6NKI2A.mjs} +3 -3
- package/dist/cli/{chunk-ENHQBPR5.mjs → chunk-Q3A53SWK.mjs} +4 -3
- package/dist/cli/{chunk-X6F4XOT2.mjs → chunk-QPSBV4FD.mjs} +2 -2
- package/dist/cli/{chunk-6R57HEPF.mjs → chunk-S22FSNNC.mjs} +1 -1
- package/dist/cli/{chunk-XVQE6IBS.js → chunk-SLXCVPN7.js} +2 -2
- package/dist/cli/{chunk-AJO3I3LL.mjs → chunk-SRUNYWQ2.mjs} +9 -1
- package/dist/cli/{chunk-5EMYPLTW.js → chunk-UXIUAIL2.js} +53 -53
- package/dist/cli/{chunk-MVQ5XGRO.mjs → chunk-VGIDPJXM.mjs} +3 -3
- package/dist/cli/{chunk-PRDCU7BY.js → chunk-VLUBEMWM.js} +20 -20
- package/dist/cli/{chunk-W3RHISD6.js → chunk-VYSUJMB5.js} +8 -8
- package/dist/cli/{chunk-W742U53L.mjs → chunk-W6UCS3O6.mjs} +5 -5
- package/dist/cli/{chunk-Q6H5RRTG.mjs → chunk-X7RKCAMX.mjs} +4 -4
- package/dist/cli/{chunk-TBLP7HDL.js → chunk-XMBTAPHR.js} +10 -9
- package/dist/cli/{chunk-EDAG7ZU4.mjs → chunk-XVBEEGI4.mjs} +1 -1
- package/dist/cli/{chunk-JJEN7TRR.mjs → chunk-YR4REP4D.mjs} +1 -1
- package/dist/cli/{chunk-QMIMGKR2.js → chunk-Z3XFXFRT.js} +9 -9
- package/dist/cli/{chunk-JEI7PHET.mjs → chunk-ZFXDD7VM.mjs} +1 -1
- package/dist/cli/{chunk-HUJMFETO.mjs → chunk-ZTCP5BHH.mjs} +7 -3
- package/dist/cli/command-docs.js +3 -3
- package/dist/cli/command-docs.mjs +2 -2
- package/dist/cli/concurrent-runs-help-BFVCUJF4.js +22 -0
- package/dist/cli/{concurrent-runs-help-5BKCGFGL.mjs → concurrent-runs-help-ROQM6UB3.mjs} +7 -7
- package/dist/cli/{csv-7ZAWND7L.js → csv-FWGSY4GE.js} +13 -13
- package/dist/cli/{csv-MO5WZZDN.mjs → csv-R7GV33BC.mjs} +4 -4
- package/dist/cli/{db-36LX7JBQ.js → db-OCH35YJG.js} +27 -27
- package/dist/cli/{db-OYMULINA.mjs → db-UWXA4RRV.mjs} +6 -6
- package/dist/cli/describe-6OI5K2SH.js +50 -0
- package/dist/cli/{describe-JLAERB6X.mjs → describe-QI4HMUGE.mjs} +21 -21
- package/dist/cli/describe-core.d.mts +4 -2
- package/dist/cli/describe-core.d.ts +4 -2
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-AQ32J4BZ.js → executions-7CFGC24E.js} +8 -8
- package/dist/cli/{executions-IZAB2XNC.mjs → executions-YF3KMZZN.mjs} +6 -6
- package/dist/cli/{feedback-WA6EBE5H.mjs → feedback-DWIWBS7O.mjs} +6 -6
- package/dist/cli/{feedback-3IV54HOH.js → feedback-YCZHHSBS.js} +14 -14
- package/dist/cli/git-TGLNZRS3.js +26 -0
- package/dist/cli/{git-OSLU6HIK.mjs → git-XCGMQQOD.mjs} +5 -5
- package/dist/cli/index.js +152 -148
- package/dist/cli/index.mjs +51 -47
- package/dist/cli/{integrations-WOXFOC4M.mjs → integrations-5ABAJBSW.mjs} +7 -7
- package/dist/cli/{integrations-65SYNL53.js → integrations-IEZA3TGK.js} +29 -29
- package/dist/cli/{legacy-noops-3SGXDAV6.js → legacy-noops-KNFLJ5P2.js} +9 -9
- package/dist/cli/{legacy-noops-4FNG2JY3.mjs → legacy-noops-OZMY73Y3.mjs} +6 -6
- package/dist/cli/{mcp-PX27RHCY.js → mcp-NLQAO7KP.js} +24 -24
- package/dist/cli/{mcp-RZLWMZHH.mjs → mcp-WSPFKQPZ.mjs} +4 -4
- package/dist/cli/{monitors-F5BLGS4R.js → monitors-BJYOB4S3.js} +100 -100
- package/dist/cli/{monitors-VK2LW7VU.mjs → monitors-LPKFFTOX.mjs} +7 -7
- package/dist/cli/{org-7AEBTN6Y.mjs → org-RYPMUYUW.mjs} +6 -6
- package/dist/cli/{org-UU3V7U4K.js → org-WIVHI4WT.js} +121 -121
- package/dist/cli/{outcomes-BWERSUJL.mjs → outcomes-FADJYC4I.mjs} +9 -7
- package/dist/cli/{outcomes-GCTBGPMK.js → outcomes-QKX7IE3O.js} +17 -15
- package/dist/cli/{play-TX3RAAYS.mjs → play-4ZKK5Q7U.mjs} +88 -33
- package/dist/cli/{play-7NBCCL26.js → play-ID73J3NP.js} +393 -338
- package/dist/cli/{providers-KFWZXDCV.mjs → providers-LURYBSNO.mjs} +6 -6
- package/dist/cli/{providers-IL2IVKHB.js → providers-WCCGYGW6.js} +9 -9
- package/dist/cli/{quickstart-RAMDGRRI.mjs → quickstart-KCCSEE5J.mjs} +4 -4
- package/dist/cli/{quickstart-MPA6TUK5.js → quickstart-LVPOU25V.js} +6 -6
- package/dist/cli/{run-WBUSXBUS.js → run-2QMJRCVA.js} +48 -48
- package/dist/cli/{run-QNJSKPBN.mjs → run-XXK7DDUF.mjs} +26 -26
- package/dist/cli/search-AQSAXA6D.js +32 -0
- package/dist/cli/{search-2X4P2FXR.mjs → search-ZYAWW3CK.mjs} +7 -7
- package/dist/cli/{search-output-MNJ4AQLV.mjs → search-output-N45AIOB4.mjs} +9 -6
- package/dist/cli/{search-output-P2WNCHA3.js → search-output-YNXAZSKT.js} +12 -9
- package/dist/cli/{secrets-XX54OU22.mjs → secrets-7Q3AOUAS.mjs} +6 -6
- package/dist/cli/{secrets-K5CNDUVR.js → secrets-MHT27L2M.js} +15 -15
- package/dist/cli/{sessions-C4GQ6ZVO.mjs → sessions-6QKOM7M3.mjs} +6 -6
- package/dist/cli/sessions-RGD7L4LC.js +23 -0
- package/dist/cli/{settings-7HBTADGW.mjs → settings-NPVIDENI.mjs} +12 -12
- package/dist/cli/{settings-QP3DVFPS.js → settings-OP7Q6YX6.js} +85 -85
- package/dist/cli/{setup-VPDAKY2G.mjs → setup-OOT3EIMF.mjs} +9 -9
- package/dist/cli/{setup-X6J7U6B4.js → setup-RT6GHL3W.js} +49 -49
- package/dist/cli/skills-ERAA734H.js +37 -0
- package/dist/cli/{skills-UGY6W4AC.mjs → skills-TEXI4CLZ.mjs} +7 -7
- package/dist/cli/tools-D5SZSIIH.js +57 -0
- package/dist/cli/{tools-SVBUAHDD.mjs → tools-G5L36M3X.mjs} +19 -19
- package/dist/cli/update-WZ6527EF.js +37 -0
- package/dist/cli/{update-SDNKNDNW.mjs → update-YNKQTE4D.mjs} +9 -9
- package/dist/cli/{views-M6RBPC65.mjs → views-IQFMUMLU.mjs} +6 -6
- package/dist/cli/{views-JBFSHQBU.js → views-OVQ5AQAU.js} +21 -21
- package/dist/cli/{workflow-UAMTGHQC.js → workflow-RCBYXIFZ.js} +17 -17
- package/dist/cli/{workflow-RYVRAIHV.mjs → workflow-Y5IFMI7N.mjs} +7 -7
- package/dist/{client-DCnExziW.d.ts → client-BrdMPFCM.d.ts} +1 -1
- package/dist/{client-ClJlqkKt.d.mts → client-CF-bsrtI.d.mts} +1 -1
- package/dist/{client-core-DAOPQnGD.d.mts → client-core-DM1ZedOG.d.mts} +8 -0
- package/dist/{client-core-BKq5ZNAl.d.ts → client-core-rMoUWSYM.d.ts} +8 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +128 -126
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-PXIVGUVZ.js +0 -44
- package/dist/cli/concurrent-runs-help-KGELXJIQ.js +0 -22
- package/dist/cli/describe-AVGE4MH6.js +0 -50
- package/dist/cli/git-VOFO6V5W.js +0 -26
- package/dist/cli/search-CJHG3VA4.js +0 -32
- package/dist/cli/sessions-3RMRBBJZ.js +0 -23
- package/dist/cli/skills-JUGXGSX2.js +0 -37
- package/dist/cli/tools-ZEI42NSP.js +0 -57
- package/dist/cli/update-VC4UEGMR.js +0 -37
- /package/dist/cli/{chunk-2RIKOPIM.mjs → chunk-HECXJBED.mjs} +0 -0
- /package/dist/cli/{chunk-H4ALLC2X.js → chunk-TJCENACZ.js} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkNDDGFX4Xjs = require('./chunk-NDDGFX4X.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -11,11 +11,11 @@ var _chunk4W5EFHHYjs = require('./chunk-4W5EFHHY.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkH7PVSG3Ljs = require('./chunk-H7PVSG3L.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunk6B5EZOI3js = require('./chunk-6B5EZOI3.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -37,10 +37,10 @@ var _chunkW3HLZ24Qjs = require('./chunk-W3HLZ24Q.js');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkXMBTAPHRjs = require('./chunk-XMBTAPHR.js');
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkIXYVHTRZjs = require('./chunk-IXYVHTRZ.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 _chunk2RPRSTHDjs = require('./chunk-2RPRSTHD.js');
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
var
|
|
63
|
+
var _chunkVYSUJMB5js = require('./chunk-VYSUJMB5.js');
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
var
|
|
70
|
+
var _chunkID3LGPOEjs = require('./chunk-ID3LGPOE.js');
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
var
|
|
75
|
+
var _chunkSLXCVPN7js = require('./chunk-SLXCVPN7.js');
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
var
|
|
82
|
+
var _chunkI62ZBEKHjs = require('./chunk-I62ZBEKH.js');
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
@@ -88,12 +88,12 @@ var _chunkEL4LME5Yjs = require('./chunk-EL4LME5Y.js');
|
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
|
|
91
|
-
var
|
|
91
|
+
var _chunkVLUBEMWMjs = require('./chunk-VLUBEMWM.js');
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
var
|
|
96
|
+
var _chunk2QYU57RGjs = require('./chunk-2QYU57RG.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 = _chunk2QYU57RGjs.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
|
+
_chunk2QYU57RGjs.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 (_chunkXMBTAPHRjs.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: _chunkXMBTAPHRjs.playRunCommandForTool.call(void 0, tool, tool.toolId)
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
444
|
return {
|
|
@@ -511,37 +511,41 @@ function firstSentence(text) {
|
|
|
511
511
|
return (match ? match[0] : clean).trim();
|
|
512
512
|
}
|
|
513
513
|
function requiredInputIds(tool) {
|
|
514
|
-
const inputSchema =
|
|
514
|
+
const inputSchema = _chunkXMBTAPHRjs.recordField.call(void 0,
|
|
515
515
|
tool,
|
|
516
516
|
"inputSchema",
|
|
517
517
|
"input_schema"
|
|
518
518
|
);
|
|
519
|
-
return
|
|
519
|
+
return _chunkXMBTAPHRjs.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 = _chunkXMBTAPHRjs.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: _chunkXMBTAPHRjs.stringField.call(void 0, record, "connectionMessage", "connection_message") || void 0
|
|
529
529
|
});
|
|
530
530
|
return message ? ` - \u26A0 ${message}` : "";
|
|
531
531
|
}
|
|
532
|
+
function runsOnOwnKey(tool) {
|
|
533
|
+
return tool.billingSource === "own_provider_credentials" || tool.billingSource === "free";
|
|
534
|
+
}
|
|
532
535
|
function shortPricingHint(tool) {
|
|
533
|
-
const pricing =
|
|
536
|
+
const pricing = _chunkXMBTAPHRjs.recordField.call(void 0,
|
|
534
537
|
tool,
|
|
535
538
|
"pricing"
|
|
536
539
|
);
|
|
537
540
|
const credits = numberField(pricing, "creditsPerUnit", "credits_per_unit");
|
|
538
|
-
const unit =
|
|
541
|
+
const unit = _chunkXMBTAPHRjs.stringField.call(void 0, pricing, "unit");
|
|
542
|
+
if (runsOnOwnKey(tool)) return "0 (your key)";
|
|
539
543
|
if (credits !== null) {
|
|
540
544
|
return `${formatDecimal(credits)} cr/${unit || "unit"}`;
|
|
541
545
|
}
|
|
542
|
-
const summary =
|
|
546
|
+
const summary = _chunkXMBTAPHRjs.stringField.call(void 0, pricing, "summary");
|
|
543
547
|
if (summary) return summary;
|
|
544
|
-
const displayText =
|
|
548
|
+
const displayText = _chunkXMBTAPHRjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
545
549
|
return displayText || null;
|
|
546
550
|
}
|
|
547
551
|
function aggregateCategorySummaries(tools) {
|
|
@@ -585,13 +589,13 @@ function categoryEnumerationRender(summaries) {
|
|
|
585
589
|
};
|
|
586
590
|
}
|
|
587
591
|
async function listToolCategories(emitJson, compact) {
|
|
588
|
-
const client = new (0,
|
|
592
|
+
const client = new (0, _chunk2RPRSTHDjs.DeeplineClient)();
|
|
589
593
|
if (!emitJson) {
|
|
590
594
|
const summaries2 = (await client.listToolCategories()).map((category) => ({
|
|
591
595
|
...category,
|
|
592
596
|
description: describeToolCategory(category.name)
|
|
593
597
|
}));
|
|
594
|
-
|
|
598
|
+
_chunkVLUBEMWMjs.printCommandEnvelope.call(void 0,
|
|
595
599
|
{ categories: summaries2, render: categoryEnumerationRender(summaries2) },
|
|
596
600
|
{ json: false }
|
|
597
601
|
);
|
|
@@ -601,7 +605,7 @@ async function listToolCategories(emitJson, compact) {
|
|
|
601
605
|
const items = rawTools.map(toListedTool);
|
|
602
606
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
603
607
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
604
|
-
|
|
608
|
+
_chunkVLUBEMWMjs.printCommandEnvelope.call(void 0,
|
|
605
609
|
{
|
|
606
610
|
tools: outputItems,
|
|
607
611
|
count: outputItems.length,
|
|
@@ -620,7 +624,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
620
624
|
const known = summaries.map((item) => item.name);
|
|
621
625
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
622
626
|
if (emitJson) {
|
|
623
|
-
|
|
627
|
+
_chunkVLUBEMWMjs.printJson.call(void 0, {
|
|
624
628
|
ok: false,
|
|
625
629
|
exitCode: 4,
|
|
626
630
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -634,13 +638,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
634
638
|
const render = categoryEnumerationRender(summaries);
|
|
635
639
|
console.error(message);
|
|
636
640
|
console.error("");
|
|
637
|
-
console.error(
|
|
641
|
+
console.error(_chunkVLUBEMWMjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
638
642
|
console.error("");
|
|
639
643
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
640
644
|
return 4;
|
|
641
645
|
}
|
|
642
646
|
async function listToolsInCategory(category, emitJson) {
|
|
643
|
-
const client = new (0,
|
|
647
|
+
const client = new (0, _chunk2RPRSTHDjs.DeeplineClient)();
|
|
644
648
|
const { tools: rawTools, categories } = await client.listToolsInCategory(category);
|
|
645
649
|
const summaries = categories.map((item) => ({
|
|
646
650
|
...item,
|
|
@@ -654,6 +658,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
654
658
|
provider: tool.provider,
|
|
655
659
|
required: requiredInputIds(tool),
|
|
656
660
|
pricing: shortPricingHint(tool),
|
|
661
|
+
...tool.billingSource ? { billingSource: tool.billingSource } : {},
|
|
657
662
|
description: firstSentence(tool.description),
|
|
658
663
|
notConnected: notConnectedSuffix(tool)
|
|
659
664
|
})).sort((a, b) => a.id.localeCompare(b.id));
|
|
@@ -676,7 +681,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
676
681
|
}
|
|
677
682
|
]
|
|
678
683
|
};
|
|
679
|
-
|
|
684
|
+
_chunkVLUBEMWMjs.printCommandEnvelope.call(void 0,
|
|
680
685
|
{
|
|
681
686
|
category,
|
|
682
687
|
total: rows.length,
|
|
@@ -689,7 +694,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
689
694
|
return 0;
|
|
690
695
|
}
|
|
691
696
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
692
|
-
const client = new (0,
|
|
697
|
+
const client = new (0, _chunk2RPRSTHDjs.DeeplineClient)();
|
|
693
698
|
const items = (await client.listTools({
|
|
694
699
|
categories: requestedCategories.join(","),
|
|
695
700
|
compact
|
|
@@ -718,7 +723,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
718
723
|
]
|
|
719
724
|
};
|
|
720
725
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
721
|
-
|
|
726
|
+
_chunkVLUBEMWMjs.printCommandEnvelope.call(void 0,
|
|
722
727
|
{
|
|
723
728
|
tools: outputItems,
|
|
724
729
|
count: outputItems.length,
|
|
@@ -737,13 +742,13 @@ async function listTools(category, options = {}) {
|
|
|
737
742
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()]), () => ( ""));
|
|
738
743
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
739
744
|
const compact = options.compact !== false;
|
|
740
|
-
const emitJson = options.json === true ||
|
|
745
|
+
const emitJson = options.json === true || _chunkVLUBEMWMjs.shouldEmitJson.call(void 0, );
|
|
741
746
|
if (positional && flagCategories.length > 0) {
|
|
742
747
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
743
748
|
if (!flagIsSameSingle) {
|
|
744
749
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
745
750
|
if (emitJson) {
|
|
746
|
-
|
|
751
|
+
_chunkVLUBEMWMjs.printJson.call(void 0, {
|
|
747
752
|
ok: false,
|
|
748
753
|
exitCode: 2,
|
|
749
754
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -770,7 +775,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
770
775
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
771
776
|
return 1;
|
|
772
777
|
}
|
|
773
|
-
const client = new (0,
|
|
778
|
+
const client = new (0, _chunk2RPRSTHDjs.DeeplineClient)();
|
|
774
779
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
775
780
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
776
781
|
const jsonOutput = options.json === true;
|
|
@@ -794,7 +799,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
794
799
|
query,
|
|
795
800
|
mode
|
|
796
801
|
}) : null;
|
|
797
|
-
|
|
802
|
+
_chunkVLUBEMWMjs.printCommandEnvelope.call(void 0,
|
|
798
803
|
{
|
|
799
804
|
tools: outputTools,
|
|
800
805
|
count: outputTools.length,
|
|
@@ -812,7 +817,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
812
817
|
} : {},
|
|
813
818
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
814
819
|
},
|
|
815
|
-
{ json: options.json ||
|
|
820
|
+
{ json: options.json || _chunkVLUBEMWMjs.shouldEmitJson.call(void 0, ) }
|
|
816
821
|
);
|
|
817
822
|
return 0;
|
|
818
823
|
}
|
|
@@ -867,8 +872,8 @@ function printPlayAliasToolError(toolId, play) {
|
|
|
867
872
|
console.error(playAliasToolErrorMessage(toolId, play));
|
|
868
873
|
}
|
|
869
874
|
function playLikeToolExecuteErrorMessage(toolId, tool) {
|
|
870
|
-
const playReference = tool ?
|
|
871
|
-
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${
|
|
875
|
+
const playReference = tool ? _chunkXMBTAPHRjs.playReferenceForTool.call(void 0, tool) : null;
|
|
876
|
+
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunkXMBTAPHRjs.playSearchCommandForToolId.call(void 0, toolId)}`;
|
|
872
877
|
return [
|
|
873
878
|
`${toolId} is a workflow/play entry, not an atomic provider tool.`,
|
|
874
879
|
nextStep,
|
|
@@ -908,13 +913,13 @@ Output:
|
|
|
908
913
|
activity.
|
|
909
914
|
`
|
|
910
915
|
);
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
916
|
+
_chunkH7PVSG3Ljs.registerIntegrationBalanceCommand.call(void 0, tools, true);
|
|
917
|
+
_chunkH7PVSG3Ljs.registerWorkspaceConnectionListCommand.call(void 0, tools, "workspace-connections", true);
|
|
918
|
+
_chunkH7PVSG3Ljs.registerLegacyHubSpotMembersCommand.call(void 0, tools, true);
|
|
919
|
+
_chunkH7PVSG3Ljs.registerLegacyWorkspaceConnectionCommand.call(void 0, tools, true);
|
|
920
|
+
_chunkH7PVSG3Ljs.registerLegacyCalendarDelegationCommand.call(void 0, tools, true);
|
|
921
|
+
_chunkH7PVSG3Ljs.registerLegacyAvailabilityCalendarsCommand.call(void 0, tools, true);
|
|
922
|
+
_chunkH7PVSG3Ljs.registerIntegrationConnectCommand.call(void 0, tools, false, true);
|
|
918
923
|
tools.command("list [category]").description("Browse tool categories, or list every tool in a category.").addHelpText(
|
|
919
924
|
"after",
|
|
920
925
|
`
|
|
@@ -947,7 +952,7 @@ Examples:
|
|
|
947
952
|
json: Boolean(options.json)
|
|
948
953
|
});
|
|
949
954
|
});
|
|
950
|
-
|
|
955
|
+
_chunk6B5EZOI3js.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
951
956
|
tools.command("grep <query>").description(
|
|
952
957
|
"Regex grep over tool ids, descriptions, categories, and input fields."
|
|
953
958
|
).addHelpText(
|
|
@@ -982,7 +987,7 @@ Examples:
|
|
|
982
987
|
});
|
|
983
988
|
const addToolMetadataCommand = (command) => {
|
|
984
989
|
let compatibilityMetadata;
|
|
985
|
-
|
|
990
|
+
_chunkID3LGPOEjs.registerCompatibilityCatalog.call(void 0, command, () => ({
|
|
986
991
|
toolId: command.args[0],
|
|
987
992
|
acceptMetadata: (metadata) => {
|
|
988
993
|
compatibilityMetadata = metadata;
|
|
@@ -1052,7 +1057,7 @@ Examples:
|
|
|
1052
1057
|
process.exitCode = await narrowView();
|
|
1053
1058
|
return;
|
|
1054
1059
|
}
|
|
1055
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
1060
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-6OI5K2SH.js")));
|
|
1056
1061
|
process.exitCode = await describeAnything(
|
|
1057
1062
|
toolId,
|
|
1058
1063
|
{
|
|
@@ -1067,7 +1072,7 @@ Examples:
|
|
|
1067
1072
|
});
|
|
1068
1073
|
};
|
|
1069
1074
|
addToolMetadataCommand(
|
|
1070
|
-
|
|
1075
|
+
_chunkNDDGFX4Xjs.addDescribeOptions.call(void 0,
|
|
1071
1076
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
1072
1077
|
{ json: false }
|
|
1073
1078
|
)
|
|
@@ -1136,7 +1141,7 @@ Examples:
|
|
|
1136
1141
|
options,
|
|
1137
1142
|
void 0,
|
|
1138
1143
|
true,
|
|
1139
|
-
|
|
1144
|
+
_chunkSLXCVPN7js.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
1140
1145
|
);
|
|
1141
1146
|
}
|
|
1142
1147
|
);
|
|
@@ -1144,13 +1149,13 @@ Examples:
|
|
|
1144
1149
|
function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
1145
1150
|
let metadata;
|
|
1146
1151
|
const startedAt = performance.now();
|
|
1147
|
-
const baseUrl =
|
|
1148
|
-
|
|
1149
|
-
const result =
|
|
1152
|
+
const baseUrl = _chunk2QYU57RGjs.resolveConfig.call(void 0, ).baseUrl;
|
|
1153
|
+
_chunkSLXCVPN7js.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1154
|
+
const result = _chunkID3LGPOEjs.runToolExecuteStage.call(void 0,
|
|
1150
1155
|
"SDK compatibility",
|
|
1151
|
-
() =>
|
|
1156
|
+
() => _chunkI62ZBEKHjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1152
1157
|
command: "tools execute",
|
|
1153
|
-
skillsVersion:
|
|
1158
|
+
skillsVersion: _chunk2QYU57RGjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
1154
1159
|
persistCache: false,
|
|
1155
1160
|
timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
|
|
1156
1161
|
catalog: {
|
|
@@ -1164,7 +1169,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1164
1169
|
})
|
|
1165
1170
|
).then(
|
|
1166
1171
|
(compatibility) => {
|
|
1167
|
-
|
|
1172
|
+
_chunkSLXCVPN7js.recordCliTrace.call(void 0, {
|
|
1168
1173
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1169
1174
|
ms: performance.now() - startedAt,
|
|
1170
1175
|
ok: compatibility.error === null,
|
|
@@ -1173,7 +1178,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1173
1178
|
return compatibility;
|
|
1174
1179
|
},
|
|
1175
1180
|
(error) => {
|
|
1176
|
-
|
|
1181
|
+
_chunkSLXCVPN7js.recordCliTrace.call(void 0, {
|
|
1177
1182
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1178
1183
|
ms: performance.now() - startedAt,
|
|
1179
1184
|
ok: false
|
|
@@ -1188,7 +1193,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1188
1193
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1189
1194
|
return 1;
|
|
1190
1195
|
}
|
|
1191
|
-
const client = new (0,
|
|
1196
|
+
const client = new (0, _chunk2RPRSTHDjs.DeeplineClient)();
|
|
1192
1197
|
let tool;
|
|
1193
1198
|
try {
|
|
1194
1199
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1247,12 +1252,12 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1247
1252
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1248
1253
|
if (inferenceQuote)
|
|
1249
1254
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1250
|
-
|
|
1255
|
+
_chunkVLUBEMWMjs.printCommandEnvelope.call(void 0,
|
|
1251
1256
|
{
|
|
1252
1257
|
toolId: String(tool.toolId || toolId),
|
|
1253
|
-
cost:
|
|
1258
|
+
cost: _chunkXMBTAPHRjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1254
1259
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1255
|
-
...
|
|
1260
|
+
..._chunkXMBTAPHRjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunkXMBTAPHRjs.recordField.call(void 0, tool, "pricing") } : {},
|
|
1256
1261
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1257
1262
|
},
|
|
1258
1263
|
{
|
|
@@ -1263,14 +1268,14 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1263
1268
|
);
|
|
1264
1269
|
return 0;
|
|
1265
1270
|
}
|
|
1266
|
-
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !
|
|
1267
|
-
const contract =
|
|
1271
|
+
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunkXMBTAPHRjs.isMonitorTypeTool.call(void 0, tool) && !_chunkXMBTAPHRjs.isMonitorVariantIndex.call(void 0, tool) && !_chunkXMBTAPHRjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
|
|
1272
|
+
const contract = _chunkXMBTAPHRjs.toolContractJsonForDescribe.call(void 0,
|
|
1268
1273
|
tool,
|
|
1269
1274
|
toolId,
|
|
1270
1275
|
void 0,
|
|
1271
1276
|
seedToolListScript
|
|
1272
1277
|
);
|
|
1273
|
-
|
|
1278
|
+
_chunkVLUBEMWMjs.printCompactJson.call(void 0, {
|
|
1274
1279
|
toolId: contract.toolId,
|
|
1275
1280
|
...options.schemaOnly ? {
|
|
1276
1281
|
inputSchema: contract.inputSchema,
|
|
@@ -1293,8 +1298,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1293
1298
|
return 0;
|
|
1294
1299
|
}
|
|
1295
1300
|
if (options.contractJson) {
|
|
1296
|
-
|
|
1297
|
-
...
|
|
1301
|
+
_chunkVLUBEMWMjs.printCompactJson.call(void 0, {
|
|
1302
|
+
..._chunkXMBTAPHRjs.toolContractJsonForDescribe.call(void 0,
|
|
1298
1303
|
tool,
|
|
1299
1304
|
toolId,
|
|
1300
1305
|
void 0,
|
|
@@ -1307,8 +1312,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1307
1312
|
}
|
|
1308
1313
|
const emitJson = options.json === true;
|
|
1309
1314
|
if (emitJson) {
|
|
1310
|
-
|
|
1311
|
-
...
|
|
1315
|
+
_chunkVLUBEMWMjs.printCompactJson.call(void 0, {
|
|
1316
|
+
..._chunkXMBTAPHRjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
|
|
1312
1317
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1313
1318
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1314
1319
|
});
|
|
@@ -1333,7 +1338,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1333
1338
|
printCompactToolContract(tool, toolId);
|
|
1334
1339
|
if (modelDescription) {
|
|
1335
1340
|
process.stdout.write(`
|
|
1336
|
-
${
|
|
1341
|
+
${_chunkXMBTAPHRjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1337
1342
|
}
|
|
1338
1343
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1339
1344
|
return 0;
|
|
@@ -1341,7 +1346,7 @@ ${_chunkTBLP7HDLjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
|
1341
1346
|
printCompactToolContract(tool, toolId);
|
|
1342
1347
|
if (modelDescription) {
|
|
1343
1348
|
process.stdout.write(`
|
|
1344
|
-
${
|
|
1349
|
+
${_chunkXMBTAPHRjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1345
1350
|
}
|
|
1346
1351
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1347
1352
|
return 0;
|
|
@@ -1358,10 +1363,10 @@ function printInferenceQuoteSummary(quote) {
|
|
|
1358
1363
|
for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
|
|
1359
1364
|
}
|
|
1360
1365
|
function printMonitorTypeFilters(tool) {
|
|
1361
|
-
const schema =
|
|
1362
|
-
const properties =
|
|
1366
|
+
const schema = _chunkXMBTAPHRjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
|
|
1367
|
+
const properties = _chunkXMBTAPHRjs.recordField.call(void 0, schema, "properties");
|
|
1363
1368
|
const required = new Set(
|
|
1364
|
-
|
|
1369
|
+
_chunkXMBTAPHRjs.arrayField.call(void 0, schema, "required").filter(
|
|
1365
1370
|
(v) => typeof v === "string"
|
|
1366
1371
|
)
|
|
1367
1372
|
);
|
|
@@ -1372,24 +1377,24 @@ function printMonitorTypeFilters(tool) {
|
|
|
1372
1377
|
}
|
|
1373
1378
|
console.log("Deploy filters (set in the monitor payload):");
|
|
1374
1379
|
for (const name of names) {
|
|
1375
|
-
const field =
|
|
1380
|
+
const field = _chunkXMBTAPHRjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
|
|
1376
1381
|
const star = required.has(name) ? "*" : "";
|
|
1377
|
-
const enumVals =
|
|
1382
|
+
const enumVals = _chunkXMBTAPHRjs.arrayField.call(void 0, field, "enum").filter(
|
|
1378
1383
|
(v) => typeof v === "string"
|
|
1379
1384
|
);
|
|
1380
|
-
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` :
|
|
1381
|
-
const desc =
|
|
1385
|
+
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunkXMBTAPHRjs.stringField.call(void 0, field, "type") || "string";
|
|
1386
|
+
const desc = _chunkXMBTAPHRjs.stringField.call(void 0, field, "description");
|
|
1382
1387
|
console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
|
|
1383
1388
|
}
|
|
1384
1389
|
}
|
|
1385
1390
|
function printMonitorTypeFilterExamples(tool) {
|
|
1386
|
-
const documentation =
|
|
1387
|
-
const fields =
|
|
1391
|
+
const documentation = _chunkXMBTAPHRjs.recordField.call(void 0, tool, "documentation");
|
|
1392
|
+
const fields = _chunkXMBTAPHRjs.recordField.call(void 0, documentation, "fields");
|
|
1388
1393
|
const examples = Object.entries(fields).flatMap(([name, rawField]) => {
|
|
1389
|
-
const grammar =
|
|
1390
|
-
const example =
|
|
1394
|
+
const grammar = _chunkXMBTAPHRjs.recordField.call(void 0, _chunkXMBTAPHRjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
|
|
1395
|
+
const example = _chunkXMBTAPHRjs.stringField.call(void 0, grammar, "example");
|
|
1391
1396
|
const values = [
|
|
1392
|
-
...
|
|
1397
|
+
..._chunkXMBTAPHRjs.arrayField.call(void 0, grammar, "examples").filter(
|
|
1393
1398
|
(value) => typeof value === "string" && Boolean(value)
|
|
1394
1399
|
),
|
|
1395
1400
|
...example ? [example] : []
|
|
@@ -1404,21 +1409,21 @@ function printMonitorTypeFilterExamples(tool) {
|
|
|
1404
1409
|
}
|
|
1405
1410
|
}
|
|
1406
1411
|
function printMonitorTypeStreams(tool) {
|
|
1407
|
-
const streams =
|
|
1408
|
-
|
|
1412
|
+
const streams = _chunkXMBTAPHRjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
|
|
1413
|
+
_chunkXMBTAPHRjs.isRecord
|
|
1409
1414
|
);
|
|
1410
1415
|
if (!streams.length) return;
|
|
1411
1416
|
console.log("");
|
|
1412
1417
|
console.log("Filter columns (a play's sqlListeners.where, per stream):");
|
|
1413
1418
|
for (const stream of streams) {
|
|
1414
|
-
const name =
|
|
1415
|
-
const cols =
|
|
1419
|
+
const name = _chunkXMBTAPHRjs.stringField.call(void 0, stream, "stream");
|
|
1420
|
+
const cols = _chunkXMBTAPHRjs.arrayField.call(void 0, stream, "columns").filter(_chunkXMBTAPHRjs.isRecord).map((col) => _chunkXMBTAPHRjs.stringField.call(void 0, col, "name")).filter(Boolean);
|
|
1416
1421
|
console.log(`- ${name}: ${cols.join(", ")}`);
|
|
1417
1422
|
}
|
|
1418
1423
|
}
|
|
1419
1424
|
function monitorTypePricingLines(tool) {
|
|
1420
|
-
const pricing =
|
|
1421
|
-
const byType =
|
|
1425
|
+
const pricing = _chunkXMBTAPHRjs.recordField.call(void 0, tool, "pricing");
|
|
1426
|
+
const byType = _chunkXMBTAPHRjs.recordField.call(void 0,
|
|
1422
1427
|
pricing,
|
|
1423
1428
|
"pricing_by_radar_type",
|
|
1424
1429
|
"pricingByRadarType"
|
|
@@ -1429,9 +1434,9 @@ function monitorTypePricingLines(tool) {
|
|
|
1429
1434
|
}
|
|
1430
1435
|
const lines = ["Pricing (Deepline credits per accepted event):"];
|
|
1431
1436
|
for (const key of keys) {
|
|
1432
|
-
const entry =
|
|
1437
|
+
const entry = _chunkXMBTAPHRjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
|
|
1433
1438
|
const credits = numberField(entry, "deepline_credits", "deeplineCredits");
|
|
1434
|
-
const display =
|
|
1439
|
+
const display = _chunkXMBTAPHRjs.stringField.call(void 0, entry, "display");
|
|
1435
1440
|
const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "not listed");
|
|
1436
1441
|
lines.push(`- ${key}: ${shown}`);
|
|
1437
1442
|
}
|
|
@@ -1441,20 +1446,20 @@ function printMonitorTypePricing(tool) {
|
|
|
1441
1446
|
for (const line of monitorTypePricingLines(tool)) console.log(line);
|
|
1442
1447
|
}
|
|
1443
1448
|
function printMonitorTypeDeploy(tool) {
|
|
1444
|
-
const deploy =
|
|
1445
|
-
const toolId =
|
|
1446
|
-
const example =
|
|
1449
|
+
const deploy = _chunkXMBTAPHRjs.recordField.call(void 0, tool, "deploy");
|
|
1450
|
+
const toolId = _chunkXMBTAPHRjs.stringField.call(void 0, tool, "toolId");
|
|
1451
|
+
const example = _chunkXMBTAPHRjs.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
|
|
1447
1452
|
console.log("Deploy (a monitor type is deployed, not executed):");
|
|
1448
1453
|
console.log(` ${example}`);
|
|
1449
1454
|
}
|
|
1450
1455
|
function printMonitorTypeContract(tool, requestedToolId) {
|
|
1451
|
-
const toolId =
|
|
1456
|
+
const toolId = _chunkXMBTAPHRjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
|
|
1452
1457
|
console.log(toolId);
|
|
1453
|
-
const displayName =
|
|
1458
|
+
const displayName = _chunkXMBTAPHRjs.stringField.call(void 0, tool, "displayName");
|
|
1454
1459
|
if (displayName) console.log(`Best for: ${displayName}`);
|
|
1455
|
-
const description =
|
|
1460
|
+
const description = _chunkXMBTAPHRjs.stringField.call(void 0, tool, "description");
|
|
1456
1461
|
if (description) console.log(`Description: ${description}`);
|
|
1457
|
-
const categories =
|
|
1462
|
+
const categories = _chunkXMBTAPHRjs.arrayField.call(void 0, tool, "categories").filter(
|
|
1458
1463
|
(v) => typeof v === "string"
|
|
1459
1464
|
);
|
|
1460
1465
|
if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
|
|
@@ -1474,31 +1479,31 @@ function printMonitorTypeContract(tool, requestedToolId) {
|
|
|
1474
1479
|
console.log(`More: deepline describe ${toolId}`);
|
|
1475
1480
|
}
|
|
1476
1481
|
function toolGuidanceLines(guidance) {
|
|
1477
|
-
const record =
|
|
1478
|
-
const toolGuidance =
|
|
1479
|
-
const providerGuidance =
|
|
1482
|
+
const record = _chunkXMBTAPHRjs.isRecord.call(void 0, guidance) ? guidance : {};
|
|
1483
|
+
const toolGuidance = _chunkXMBTAPHRjs.stringField.call(void 0, record, "tool");
|
|
1484
|
+
const providerGuidance = _chunkXMBTAPHRjs.stringField.call(void 0, record, "provider");
|
|
1480
1485
|
return [
|
|
1481
1486
|
...toolGuidance ? [`- This tool: ${toolGuidance}`] : [],
|
|
1482
1487
|
...providerGuidance ? [`- Provider: ${providerGuidance}`] : []
|
|
1483
1488
|
];
|
|
1484
1489
|
}
|
|
1485
1490
|
function printCompactToolContract(tool, requestedToolId) {
|
|
1486
|
-
if (
|
|
1491
|
+
if (_chunkXMBTAPHRjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1487
1492
|
printMonitorTypeContract(tool, requestedToolId);
|
|
1488
1493
|
return;
|
|
1489
1494
|
}
|
|
1490
|
-
const contract =
|
|
1495
|
+
const contract = _chunkXMBTAPHRjs.toolContractJsonForDescribe.call(void 0,
|
|
1491
1496
|
tool,
|
|
1492
1497
|
requestedToolId,
|
|
1493
1498
|
void 0,
|
|
1494
1499
|
seedToolListScript
|
|
1495
1500
|
);
|
|
1496
|
-
const cost =
|
|
1497
|
-
const getters =
|
|
1501
|
+
const cost = _chunkXMBTAPHRjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
|
|
1502
|
+
const getters = _chunkXMBTAPHRjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1498
1503
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1499
1504
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1500
|
-
const inputFields =
|
|
1501
|
-
|
|
1505
|
+
const inputFields = _chunkXMBTAPHRjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1506
|
+
_chunkXMBTAPHRjs.recordField.call(void 0, contract, "inputSchema")
|
|
1502
1507
|
);
|
|
1503
1508
|
console.log(String(contract.toolId));
|
|
1504
1509
|
if (contract.displayName) console.log(`Best for: ${contract.displayName}`);
|
|
@@ -1515,9 +1520,9 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1515
1520
|
printToolOutputArrayShape(contract);
|
|
1516
1521
|
printToolExecutionHints(contract);
|
|
1517
1522
|
if (contract.deprecated === true) {
|
|
1518
|
-
const deprecation =
|
|
1519
|
-
const message =
|
|
1520
|
-
const replacementToolId =
|
|
1523
|
+
const deprecation = _chunkXMBTAPHRjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
|
|
1524
|
+
const message = _chunkXMBTAPHRjs.stringField.call(void 0, deprecation, "message");
|
|
1525
|
+
const replacementToolId = _chunkXMBTAPHRjs.stringField.call(void 0,
|
|
1521
1526
|
deprecation,
|
|
1522
1527
|
"replacementToolId",
|
|
1523
1528
|
"replacement_tool_id"
|
|
@@ -1540,12 +1545,12 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1540
1545
|
console.log("");
|
|
1541
1546
|
console.log("Inputs:");
|
|
1542
1547
|
for (const field of inputFields) {
|
|
1543
|
-
if (!
|
|
1544
|
-
const name =
|
|
1548
|
+
if (!_chunkXMBTAPHRjs.isRecord.call(void 0, field)) continue;
|
|
1549
|
+
const name = _chunkXMBTAPHRjs.stringField.call(void 0, field, "name");
|
|
1545
1550
|
if (!name) continue;
|
|
1546
1551
|
const required = field.required ? "*" : "";
|
|
1547
|
-
const type =
|
|
1548
|
-
const description =
|
|
1552
|
+
const type = _chunkXMBTAPHRjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1553
|
+
const description = _chunkXMBTAPHRjs.stringField.call(void 0, field, "description");
|
|
1549
1554
|
const enumValues = Array.isArray(field.enum) ? field.enum : [];
|
|
1550
1555
|
const enumSuffix = enumValues.length ? ` enum=${enumValues.map(String).join("|")}` : "";
|
|
1551
1556
|
const itemBoundsSuffix = arrayItemBoundsSuffix(field);
|
|
@@ -1560,8 +1565,8 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1560
1565
|
}
|
|
1561
1566
|
console.log("");
|
|
1562
1567
|
printToolExamplesOnly(tool, requestedToolId);
|
|
1563
|
-
const starterScript =
|
|
1564
|
-
const starterPath =
|
|
1568
|
+
const starterScript = _chunkXMBTAPHRjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
|
|
1569
|
+
const starterPath = _chunkXMBTAPHRjs.stringField.call(void 0, starterScript, "path");
|
|
1565
1570
|
if (starterPath) {
|
|
1566
1571
|
console.log("");
|
|
1567
1572
|
console.log(`Starter script: ${starterPath}`);
|
|
@@ -1572,16 +1577,16 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1572
1577
|
console.log("Getters:");
|
|
1573
1578
|
if (listGetters.length) console.log(listGetterHeading());
|
|
1574
1579
|
for (const entry of listGetters) {
|
|
1575
|
-
if (
|
|
1580
|
+
if (_chunkXMBTAPHRjs.isRecord.call(void 0, entry))
|
|
1576
1581
|
console.log(
|
|
1577
|
-
`- ${
|
|
1582
|
+
`- ${_chunkXMBTAPHRjs.stringField.call(void 0, entry, "name")}: ${_chunkXMBTAPHRjs.playResultExpression.call(void 0, entry)}`
|
|
1578
1583
|
);
|
|
1579
1584
|
}
|
|
1580
1585
|
if (valueGetters.length) console.log("Values:");
|
|
1581
1586
|
for (const entry of valueGetters) {
|
|
1582
|
-
if (
|
|
1587
|
+
if (_chunkXMBTAPHRjs.isRecord.call(void 0, entry))
|
|
1583
1588
|
console.log(
|
|
1584
|
-
`- ${
|
|
1589
|
+
`- ${_chunkXMBTAPHRjs.stringField.call(void 0, entry, "name")}: ${_chunkXMBTAPHRjs.playResultExpression.call(void 0, entry)}`
|
|
1585
1590
|
);
|
|
1586
1591
|
}
|
|
1587
1592
|
}
|
|
@@ -1592,22 +1597,22 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1592
1597
|
console.log(`More: deepline describe ${contract.toolId}`);
|
|
1593
1598
|
}
|
|
1594
1599
|
function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
1595
|
-
if (
|
|
1600
|
+
if (_chunkXMBTAPHRjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1596
1601
|
return monitorTypePricingLines(tool);
|
|
1597
1602
|
}
|
|
1598
1603
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1599
|
-
const cost =
|
|
1600
|
-
const pricingModel =
|
|
1601
|
-
const billing =
|
|
1602
|
-
const explicitUnit =
|
|
1604
|
+
const cost = _chunkXMBTAPHRjs.Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1605
|
+
const pricingModel = _chunkXMBTAPHRjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
|
|
1606
|
+
const billing = _chunkXMBTAPHRjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunkXMBTAPHRjs.stringField.call(void 0, cost, "billingSource") || _chunkXMBTAPHRjs.stringField.call(void 0, cost, "billingMode") || "unknown";
|
|
1607
|
+
const explicitUnit = _chunkXMBTAPHRjs.stringField.call(void 0, cost, "unit");
|
|
1603
1608
|
const unit = explicitUnit || (pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit");
|
|
1604
1609
|
const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
|
|
1605
1610
|
const usd = numberField(cost, "deeplineUsdPerPricingUnit");
|
|
1606
|
-
const displayText =
|
|
1607
|
-
const summary =
|
|
1611
|
+
const displayText = _chunkXMBTAPHRjs.stringField.call(void 0, cost, "displayText");
|
|
1612
|
+
const summary = _chunkXMBTAPHRjs.stringField.call(void 0, cost, "summary");
|
|
1608
1613
|
const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
|
|
1609
1614
|
const reference = cost.observedReference;
|
|
1610
|
-
const observedMax =
|
|
1615
|
+
const observedMax = _chunkXMBTAPHRjs.observedMaxText.call(void 0, cost);
|
|
1611
1616
|
return [
|
|
1612
1617
|
`${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
|
|
1613
1618
|
...observedMax ? [` ${observedMax}`] : [],
|
|
@@ -1624,19 +1629,19 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
|
1624
1629
|
console.log(line);
|
|
1625
1630
|
}
|
|
1626
1631
|
function printToolSchemaOnly(tool, requestedToolId) {
|
|
1627
|
-
if (
|
|
1632
|
+
if (_chunkXMBTAPHRjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1628
1633
|
printMonitorTypeFilters(tool);
|
|
1629
1634
|
printMonitorTypeStreams(tool);
|
|
1630
1635
|
return;
|
|
1631
1636
|
}
|
|
1632
|
-
const contract =
|
|
1637
|
+
const contract = _chunkXMBTAPHRjs.toolContractJsonForDescribe.call(void 0,
|
|
1633
1638
|
tool,
|
|
1634
1639
|
requestedToolId,
|
|
1635
1640
|
void 0,
|
|
1636
1641
|
seedToolListScript
|
|
1637
1642
|
);
|
|
1638
|
-
const inputFields =
|
|
1639
|
-
|
|
1643
|
+
const inputFields = _chunkXMBTAPHRjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1644
|
+
_chunkXMBTAPHRjs.recordField.call(void 0, contract, "inputSchema")
|
|
1640
1645
|
);
|
|
1641
1646
|
console.log(`Schema: ${contract.toolId}`);
|
|
1642
1647
|
if (!inputFields.length) {
|
|
@@ -1663,37 +1668,37 @@ function printToolSchemaOnly(tool, requestedToolId) {
|
|
|
1663
1668
|
}
|
|
1664
1669
|
printToolOutputArrayShape(contract);
|
|
1665
1670
|
const declaredSchema = declaredToolJsonSchema(
|
|
1666
|
-
|
|
1671
|
+
_chunkXMBTAPHRjs.recordField.call(void 0, contract, "inputSchema")
|
|
1667
1672
|
);
|
|
1668
1673
|
if (declaredSchema) {
|
|
1669
1674
|
console.log("Declared input JSON Schema:");
|
|
1670
1675
|
console.log(JSON.stringify(declaredSchema, null, 2));
|
|
1671
1676
|
}
|
|
1672
|
-
if (
|
|
1677
|
+
if (_chunkXMBTAPHRjs.isRecord.call(void 0, contract.responseSchema)) {
|
|
1673
1678
|
console.log("Deepline execution response JSON Schema:");
|
|
1674
1679
|
console.log(JSON.stringify(contract.responseSchema, null, 2));
|
|
1675
1680
|
}
|
|
1676
1681
|
}
|
|
1677
1682
|
function printToolExamplesOnly(tool, requestedToolId) {
|
|
1678
|
-
if (
|
|
1683
|
+
if (_chunkXMBTAPHRjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1679
1684
|
printMonitorTypeDeploy(tool);
|
|
1680
1685
|
return;
|
|
1681
1686
|
}
|
|
1682
|
-
if (
|
|
1687
|
+
if (_chunkXMBTAPHRjs.isMonitorVariantIndex.call(void 0, tool)) {
|
|
1683
1688
|
console.log(
|
|
1684
1689
|
`${requestedToolId} is deployed as one monitor type per radar type. Describe one for its example:`
|
|
1685
1690
|
);
|
|
1686
|
-
for (const variant of
|
|
1687
|
-
const describeCommand =
|
|
1691
|
+
for (const variant of _chunkXMBTAPHRjs.arrayField.call(void 0, tool, "variants").filter(_chunkXMBTAPHRjs.isRecord)) {
|
|
1692
|
+
const describeCommand = _chunkXMBTAPHRjs.stringField.call(void 0, variant, "describeCommand");
|
|
1688
1693
|
if (describeCommand) console.log(` ${describeCommand}`);
|
|
1689
1694
|
}
|
|
1690
1695
|
return;
|
|
1691
1696
|
}
|
|
1692
|
-
if (
|
|
1697
|
+
if (_chunkXMBTAPHRjs.isPlayLikeTool.call(void 0, tool)) {
|
|
1693
1698
|
printPlayLikeToolUsage(tool, requestedToolId);
|
|
1694
1699
|
return;
|
|
1695
1700
|
}
|
|
1696
|
-
const contract =
|
|
1701
|
+
const contract = _chunkXMBTAPHRjs.toolContractJsonForDescribe.call(void 0,
|
|
1697
1702
|
tool,
|
|
1698
1703
|
requestedToolId,
|
|
1699
1704
|
void 0,
|
|
@@ -1701,9 +1706,9 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1701
1706
|
);
|
|
1702
1707
|
const toolId = String(contract.toolId);
|
|
1703
1708
|
const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
|
|
1704
|
-
const examples =
|
|
1709
|
+
const examples = _chunkXMBTAPHRjs.arrayField.call(void 0, tool, "examples").filter(_chunkXMBTAPHRjs.isRecord);
|
|
1705
1710
|
const firstExample = examples[0];
|
|
1706
|
-
const sampleInput = firstExample &&
|
|
1711
|
+
const sampleInput = firstExample && _chunkXMBTAPHRjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunkXMBTAPHRjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunkXMBTAPHRjs.samplePayloadForInputFields.call(void 0, inputFields)));
|
|
1707
1712
|
console.log("Example input payload:");
|
|
1708
1713
|
console.log(JSON.stringify(sampleInput, null, 2));
|
|
1709
1714
|
console.log(`Use in a play:`);
|
|
@@ -1717,32 +1722,32 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1717
1722
|
);
|
|
1718
1723
|
console.log("});");
|
|
1719
1724
|
console.log("const response = result.toolResponse.rawV2;");
|
|
1720
|
-
const getters =
|
|
1725
|
+
const getters = _chunkXMBTAPHRjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1721
1726
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1722
1727
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1723
|
-
const firstGetter = valueGetters.find(
|
|
1728
|
+
const firstGetter = valueGetters.find(_chunkXMBTAPHRjs.isRecord);
|
|
1724
1729
|
if (firstGetter) {
|
|
1725
|
-
const name =
|
|
1726
|
-
const expression =
|
|
1730
|
+
const name = _chunkXMBTAPHRjs.stringField.call(void 0, firstGetter, "name") || "value";
|
|
1731
|
+
const expression = _chunkXMBTAPHRjs.stringField.call(void 0, firstGetter, "expression");
|
|
1727
1732
|
if (expression)
|
|
1728
1733
|
console.log(
|
|
1729
1734
|
`const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
|
|
1730
1735
|
);
|
|
1731
1736
|
}
|
|
1732
1737
|
const arrayNames = new Set(
|
|
1733
|
-
|
|
1734
|
-
|
|
1738
|
+
_chunkXMBTAPHRjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1739
|
+
_chunkXMBTAPHRjs.recordField.call(void 0, tool, "outputSchema", "output_schema")
|
|
1735
1740
|
).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
|
|
1736
1741
|
);
|
|
1737
1742
|
const firstList = _nullishCoalesce(listGetters.find(
|
|
1738
|
-
(entry) =>
|
|
1739
|
-
), () => ( listGetters.find(
|
|
1740
|
-
if (
|
|
1741
|
-
const name = safeIdentifier(
|
|
1743
|
+
(entry) => _chunkXMBTAPHRjs.isRecord.call(void 0, entry) && arrayNames.has(_chunkXMBTAPHRjs.stringField.call(void 0, entry, "name"))
|
|
1744
|
+
), () => ( listGetters.find(_chunkXMBTAPHRjs.isRecord)));
|
|
1745
|
+
if (_chunkXMBTAPHRjs.isRecord.call(void 0, firstList)) {
|
|
1746
|
+
const name = safeIdentifier(_chunkXMBTAPHRjs.stringField.call(void 0, firstList, "name") || "list");
|
|
1742
1747
|
if (_chunkJ33TSWO5js.playToolListGetterMode.call(void 0, ) === "array") {
|
|
1743
|
-
console.log(`const ${name}_rows = ${
|
|
1748
|
+
console.log(`const ${name}_rows = ${_chunkXMBTAPHRjs.playResultExpression.call(void 0, firstList)};`);
|
|
1744
1749
|
} else {
|
|
1745
|
-
console.log(`const ${name}_ds = ${
|
|
1750
|
+
console.log(`const ${name}_ds = ${_chunkXMBTAPHRjs.playResultExpression.call(void 0, firstList)};`);
|
|
1746
1751
|
console.log(
|
|
1747
1752
|
"// Complete small list from this response; throws above the memory cap."
|
|
1748
1753
|
);
|
|
@@ -1752,7 +1757,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1752
1757
|
console.log("```");
|
|
1753
1758
|
if (firstList) printListGetterConsumption();
|
|
1754
1759
|
for (const example of examples) {
|
|
1755
|
-
const description =
|
|
1760
|
+
const description = _chunkXMBTAPHRjs.stringField.call(void 0, example, "description");
|
|
1756
1761
|
if (description) console.log(description);
|
|
1757
1762
|
console.log("Example Deepline execution response:");
|
|
1758
1763
|
console.log(JSON.stringify(example.response, null, 2));
|
|
@@ -1767,14 +1772,14 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1767
1772
|
}
|
|
1768
1773
|
function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
1769
1774
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1770
|
-
const inputFields =
|
|
1771
|
-
|
|
1775
|
+
const inputFields = _chunkXMBTAPHRjs.toolInputFieldsForDisplay.call(void 0,
|
|
1776
|
+
_chunkXMBTAPHRjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
|
|
1772
1777
|
);
|
|
1773
|
-
const sampleInput =
|
|
1774
|
-
const playReference =
|
|
1778
|
+
const sampleInput = _chunkXMBTAPHRjs.samplePayloadForInputFields.call(void 0, inputFields);
|
|
1779
|
+
const playReference = _chunkXMBTAPHRjs.playReferenceForTool.call(void 0, tool);
|
|
1775
1780
|
console.log("Run as a play:");
|
|
1776
1781
|
console.log(
|
|
1777
|
-
|
|
1782
|
+
_chunkXMBTAPHRjs.playRunCommandForTool.call(void 0,
|
|
1778
1783
|
tool,
|
|
1779
1784
|
toolId,
|
|
1780
1785
|
Object.keys(sampleInput).length ? sampleInput : void 0
|
|
@@ -1785,13 +1790,13 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
|
1785
1790
|
}
|
|
1786
1791
|
}
|
|
1787
1792
|
function printToolGettersOnly(tool, requestedToolId) {
|
|
1788
|
-
const contract =
|
|
1793
|
+
const contract = _chunkXMBTAPHRjs.toolContractJsonForDescribe.call(void 0,
|
|
1789
1794
|
tool,
|
|
1790
1795
|
requestedToolId,
|
|
1791
1796
|
void 0,
|
|
1792
1797
|
seedToolListScript
|
|
1793
1798
|
);
|
|
1794
|
-
const getters =
|
|
1799
|
+
const getters = _chunkXMBTAPHRjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1795
1800
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1796
1801
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1797
1802
|
console.log(`Getters: ${contract.toolId}`);
|
|
@@ -1802,9 +1807,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1802
1807
|
if (listGetters.length) {
|
|
1803
1808
|
console.log(listGetterHeading());
|
|
1804
1809
|
for (const entry of listGetters) {
|
|
1805
|
-
if (
|
|
1810
|
+
if (_chunkXMBTAPHRjs.isRecord.call(void 0, entry))
|
|
1806
1811
|
console.log(
|
|
1807
|
-
`- ${
|
|
1812
|
+
`- ${_chunkXMBTAPHRjs.stringField.call(void 0, entry, "name")}: ${_chunkXMBTAPHRjs.playResultExpression.call(void 0, entry)}`
|
|
1808
1813
|
);
|
|
1809
1814
|
}
|
|
1810
1815
|
printListGetterConsumption();
|
|
@@ -1812,9 +1817,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1812
1817
|
if (valueGetters.length) {
|
|
1813
1818
|
console.log("Values:");
|
|
1814
1819
|
for (const entry of valueGetters) {
|
|
1815
|
-
if (
|
|
1820
|
+
if (_chunkXMBTAPHRjs.isRecord.call(void 0, entry))
|
|
1816
1821
|
console.log(
|
|
1817
|
-
`- ${
|
|
1822
|
+
`- ${_chunkXMBTAPHRjs.stringField.call(void 0, entry, "name")}: ${_chunkXMBTAPHRjs.playResultExpression.call(void 0, entry)}`
|
|
1818
1823
|
);
|
|
1819
1824
|
}
|
|
1820
1825
|
}
|
|
@@ -1852,22 +1857,22 @@ function listedToolDescription(tool) {
|
|
|
1852
1857
|
}
|
|
1853
1858
|
function formatListedToolCost(tool) {
|
|
1854
1859
|
const record = tool;
|
|
1855
|
-
|
|
1856
|
-
|
|
1860
|
+
const pricing = _chunkXMBTAPHRjs.recordField.call(void 0, record, "pricing");
|
|
1861
|
+
const displayText = _chunkXMBTAPHRjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
1862
|
+
if (_chunkXMBTAPHRjs.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
|
|
1863
|
+
return `Cost: ${displayText || "Free"}`;
|
|
1857
1864
|
}
|
|
1858
|
-
const pricing = _chunkTBLP7HDLjs.recordField.call(void 0, record, "pricing");
|
|
1859
|
-
const displayText = _chunkTBLP7HDLjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
1860
1865
|
return displayText ? `Cost: ${displayText}` : "";
|
|
1861
1866
|
}
|
|
1862
1867
|
function printToolOutputArrayShape(tool) {
|
|
1863
|
-
const outputFields =
|
|
1864
|
-
|
|
1868
|
+
const outputFields = _chunkXMBTAPHRjs.toolOutputFieldsForDisplay.call(void 0,
|
|
1869
|
+
_chunkXMBTAPHRjs.recordField.call(void 0, _chunkXMBTAPHRjs.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
|
|
1865
1870
|
);
|
|
1866
1871
|
if (outputFields.length === 0) return;
|
|
1867
1872
|
console.log(" Output array shape (declared schema):");
|
|
1868
1873
|
for (const field of outputFields.slice(0, 60)) {
|
|
1869
1874
|
const name = String(field.name);
|
|
1870
|
-
const type =
|
|
1875
|
+
const type = _chunkXMBTAPHRjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1871
1876
|
const itemBounds = arrayItemBoundsSuffix(field);
|
|
1872
1877
|
console.log(` - ${name}: ${type}${itemBounds}`);
|
|
1873
1878
|
}
|
|
@@ -1876,14 +1881,14 @@ function printToolOutputArrayShape(tool) {
|
|
|
1876
1881
|
}
|
|
1877
1882
|
}
|
|
1878
1883
|
function declaredToolJsonSchema(inputSchema) {
|
|
1879
|
-
if (
|
|
1884
|
+
if (_chunkXMBTAPHRjs.isRecord.call(void 0, inputSchema.jsonSchema)) {
|
|
1880
1885
|
return inputSchema.jsonSchema;
|
|
1881
1886
|
}
|
|
1882
1887
|
return Array.isArray(inputSchema.fields) ? null : inputSchema;
|
|
1883
1888
|
}
|
|
1884
1889
|
function arrayItemBoundsSuffix(field) {
|
|
1885
|
-
const itemSchema =
|
|
1886
|
-
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type :
|
|
1890
|
+
const itemSchema = _chunkXMBTAPHRjs.isRecord.call(void 0, field.items) ? field.items : null;
|
|
1891
|
+
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunkXMBTAPHRjs.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
|
|
1887
1892
|
const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _16 => _16.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
|
|
1888
1893
|
const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
|
|
1889
1894
|
const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
|
|
@@ -1896,21 +1901,21 @@ function arrayItemBoundsSuffix(field) {
|
|
|
1896
1901
|
return itemTypeSuffix;
|
|
1897
1902
|
}
|
|
1898
1903
|
function printToolExecutionHints(value) {
|
|
1899
|
-
const batchCapabilityRecord =
|
|
1900
|
-
|
|
1904
|
+
const batchCapabilityRecord = _chunkXMBTAPHRjs.recordField.call(void 0,
|
|
1905
|
+
_chunkXMBTAPHRjs.isRecord.call(void 0, value) ? value : {},
|
|
1901
1906
|
"batchCapability",
|
|
1902
1907
|
"batch_capability"
|
|
1903
1908
|
);
|
|
1904
1909
|
const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
|
|
1905
|
-
const executionMetadata =
|
|
1906
|
-
|
|
1910
|
+
const executionMetadata = _chunkXMBTAPHRjs.recordField.call(void 0,
|
|
1911
|
+
_chunkXMBTAPHRjs.isRecord.call(void 0, value) ? value : {},
|
|
1907
1912
|
"executionMetadata",
|
|
1908
1913
|
"execution_metadata"
|
|
1909
1914
|
);
|
|
1910
1915
|
if (batchCapability) {
|
|
1911
|
-
const status =
|
|
1912
|
-
const surface =
|
|
1913
|
-
const operation =
|
|
1916
|
+
const status = _chunkXMBTAPHRjs.stringField.call(void 0, batchCapability, "status") || "unknown";
|
|
1917
|
+
const surface = _chunkXMBTAPHRjs.stringField.call(void 0, batchCapability, "surface");
|
|
1918
|
+
const operation = _chunkXMBTAPHRjs.stringField.call(void 0,
|
|
1914
1919
|
batchCapability,
|
|
1915
1920
|
"batchOperation",
|
|
1916
1921
|
"batch_operation"
|
|
@@ -1920,7 +1925,7 @@ function printToolExecutionHints(value) {
|
|
|
1920
1925
|
"maxBatchSize",
|
|
1921
1926
|
"max_batch_size"
|
|
1922
1927
|
);
|
|
1923
|
-
const notes =
|
|
1928
|
+
const notes = _chunkXMBTAPHRjs.stringField.call(void 0, batchCapability, "notes");
|
|
1924
1929
|
console.log("");
|
|
1925
1930
|
console.log("Batching:");
|
|
1926
1931
|
console.log(`- Catalog status: ${status}${surface ? ` (${surface})` : ""}`);
|
|
@@ -1939,11 +1944,11 @@ function printToolExecutionHints(value) {
|
|
|
1939
1944
|
}
|
|
1940
1945
|
if (notes) console.log(`- Details: ${notes}`);
|
|
1941
1946
|
}
|
|
1942
|
-
const configuredRateLimits =
|
|
1947
|
+
const configuredRateLimits = _chunkXMBTAPHRjs.arrayField.call(void 0,
|
|
1943
1948
|
executionMetadata,
|
|
1944
1949
|
"configuredRateLimits",
|
|
1945
1950
|
"configured_rate_limits"
|
|
1946
|
-
).filter(
|
|
1951
|
+
).filter(_chunkXMBTAPHRjs.isRecord);
|
|
1947
1952
|
if (configuredRateLimits.length > 0) {
|
|
1948
1953
|
console.log("");
|
|
1949
1954
|
console.log(
|
|
@@ -1953,7 +1958,7 @@ function printToolExecutionHints(value) {
|
|
|
1953
1958
|
const requests = numberField(limit, "requestsPerWindow");
|
|
1954
1959
|
const windowMs = numberField(limit, "windowMs");
|
|
1955
1960
|
if (requests === null || windowMs === null) continue;
|
|
1956
|
-
const usage =
|
|
1961
|
+
const usage = _chunkXMBTAPHRjs.stringField.call(void 0, limit, "usage") || "unknown";
|
|
1957
1962
|
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
1963
|
const explicitMaxConcurrency = numberField(
|
|
1959
1964
|
limit,
|
|
@@ -1962,11 +1967,11 @@ function printToolExecutionHints(value) {
|
|
|
1962
1967
|
);
|
|
1963
1968
|
const concurrencyText = explicitMaxConcurrency === null ? "no explicit concurrency limit" : `explicit concurrency limit ${explicitMaxConcurrency}`;
|
|
1964
1969
|
console.log(
|
|
1965
|
-
`- ${requests} requests per ${formatRateWindow(windowMs)}${
|
|
1970
|
+
`- ${requests} requests per ${formatRateWindow(windowMs)}${_chunkIXYVHTRZjs.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
|
|
1966
1971
|
);
|
|
1967
1972
|
}
|
|
1968
1973
|
}
|
|
1969
|
-
const queueHint =
|
|
1974
|
+
const queueHint = _chunkXMBTAPHRjs.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
|
|
1970
1975
|
const requestsPerSecondHint = numberField(
|
|
1971
1976
|
queueHint,
|
|
1972
1977
|
"requestsPerSecondHint",
|
|
@@ -1992,25 +1997,25 @@ function formatRateWindow(windowMs) {
|
|
|
1992
1997
|
}
|
|
1993
1998
|
function samplePayload(samples, key) {
|
|
1994
1999
|
const entry = samples[key];
|
|
1995
|
-
if (!
|
|
2000
|
+
if (!_chunkXMBTAPHRjs.isRecord.call(void 0, entry)) return void 0;
|
|
1996
2001
|
return Object.prototype.hasOwnProperty.call(entry, "payload") ? entry.payload : entry;
|
|
1997
2002
|
}
|
|
1998
2003
|
function commandEnvelopeFromRawResponse(rawResponse) {
|
|
1999
|
-
return
|
|
2004
|
+
return _chunkXMBTAPHRjs.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
|
|
2000
2005
|
}
|
|
2001
2006
|
function toolExecuteExitCode(envelope) {
|
|
2002
2007
|
return envelope.status === "failed" || envelope.ok === false ? 1 : 0;
|
|
2003
2008
|
}
|
|
2004
2009
|
function extractToolExecutionWarningMessages(rawResponse) {
|
|
2005
|
-
if (!
|
|
2010
|
+
if (!_chunkXMBTAPHRjs.isRecord.call(void 0, rawResponse)) return [];
|
|
2006
2011
|
const candidates = [
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2012
|
+
_chunkXMBTAPHRjs.recordField.call(void 0, _chunkXMBTAPHRjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
|
|
2013
|
+
_chunkXMBTAPHRjs.recordField.call(void 0,
|
|
2014
|
+
_chunkXMBTAPHRjs.recordField.call(void 0, _chunkXMBTAPHRjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
|
|
2010
2015
|
"meta"
|
|
2011
2016
|
),
|
|
2012
|
-
|
|
2013
|
-
|
|
2017
|
+
_chunkXMBTAPHRjs.recordField.call(void 0, rawResponse, "meta"),
|
|
2018
|
+
_chunkXMBTAPHRjs.recordField.call(void 0, _chunkXMBTAPHRjs.recordField.call(void 0, rawResponse, "result"), "meta")
|
|
2014
2019
|
];
|
|
2015
2020
|
const messages = [];
|
|
2016
2021
|
for (const candidate of candidates) {
|
|
@@ -2019,8 +2024,8 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
2019
2024
|
for (const warning of warnings) {
|
|
2020
2025
|
if (typeof warning === "string" && warning.trim()) {
|
|
2021
2026
|
messages.push(warning.trim());
|
|
2022
|
-
} else if (
|
|
2023
|
-
const message =
|
|
2027
|
+
} else if (_chunkXMBTAPHRjs.isRecord.call(void 0, warning)) {
|
|
2028
|
+
const message = _chunkXMBTAPHRjs.stringField.call(void 0, warning, "message");
|
|
2024
2029
|
if (message) messages.push(message);
|
|
2025
2030
|
}
|
|
2026
2031
|
}
|
|
@@ -2028,20 +2033,20 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
2028
2033
|
return [...new Set(messages)];
|
|
2029
2034
|
}
|
|
2030
2035
|
function apifySyncRecoveryNext(rawResponse) {
|
|
2031
|
-
if (!
|
|
2032
|
-
const toolResponse =
|
|
2033
|
-
const raw =
|
|
2036
|
+
if (!_chunkXMBTAPHRjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
|
|
2037
|
+
const toolResponse = _chunkXMBTAPHRjs.recordField.call(void 0, rawResponse, "toolResponse");
|
|
2038
|
+
const raw = _chunkXMBTAPHRjs.recordField.call(void 0, toolResponse, "raw");
|
|
2034
2039
|
if (raw.state !== "awaiting_apify") return null;
|
|
2035
|
-
const next =
|
|
2036
|
-
const getActorRun =
|
|
2037
|
-
const getActorRunTool =
|
|
2038
|
-
const getActorRunPayload =
|
|
2040
|
+
const next = _chunkXMBTAPHRjs.recordField.call(void 0, raw, "next");
|
|
2041
|
+
const getActorRun = _chunkXMBTAPHRjs.recordField.call(void 0, next, "getActorRun");
|
|
2042
|
+
const getActorRunTool = _chunkXMBTAPHRjs.stringField.call(void 0, getActorRun, "tool");
|
|
2043
|
+
const getActorRunPayload = _chunkXMBTAPHRjs.recordField.call(void 0, getActorRun, "payload");
|
|
2039
2044
|
if (!getActorRunTool || Object.keys(getActorRunPayload).length === 0) {
|
|
2040
2045
|
return null;
|
|
2041
2046
|
}
|
|
2042
|
-
const getDatasetItems =
|
|
2043
|
-
const getDatasetItemsTool =
|
|
2044
|
-
const getDatasetItemsPayload =
|
|
2047
|
+
const getDatasetItems = _chunkXMBTAPHRjs.recordField.call(void 0, next, "getDatasetItems");
|
|
2048
|
+
const getDatasetItemsTool = _chunkXMBTAPHRjs.stringField.call(void 0, getDatasetItems, "tool");
|
|
2049
|
+
const getDatasetItemsPayload = _chunkXMBTAPHRjs.recordField.call(void 0, getDatasetItems, "payload");
|
|
2045
2050
|
return {
|
|
2046
2051
|
getActorRun: `deepline run ${getActorRunTool} --input ${_chunkBVXIGOBZjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
|
|
2047
2052
|
...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
|
|
@@ -2051,7 +2056,7 @@ function apifySyncRecoveryNext(rawResponse) {
|
|
|
2051
2056
|
}
|
|
2052
2057
|
function listExtractorPathsFromUsageGuidance(tool) {
|
|
2053
2058
|
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 :
|
|
2059
|
+
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _20 => _20.extractedLists])) ? toolExecutionResult.extractedLists : _chunkXMBTAPHRjs.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _21 => _21.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
|
|
2055
2060
|
return extractedLists.flatMap((entry) => {
|
|
2056
2061
|
const paths = _nullishCoalesce(_optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.candidatePaths]), () => ( _optionalChain([entry, 'access', _24 => _24.details, 'optionalAccess', _25 => _25.rawToolOutputPaths])));
|
|
2057
2062
|
if (!Array.isArray(paths)) return [];
|
|
@@ -2133,7 +2138,7 @@ function parseJsonObjectArgument(raw, flagName) {
|
|
|
2133
2138
|
}
|
|
2134
2139
|
throw invalidJsonError(flagName, message);
|
|
2135
2140
|
}
|
|
2136
|
-
if (!
|
|
2141
|
+
if (!_chunkXMBTAPHRjs.isRecord.call(void 0, parsed)) {
|
|
2137
2142
|
throw invalidJsonError(flagName, "expected an object.");
|
|
2138
2143
|
}
|
|
2139
2144
|
return parsed;
|
|
@@ -2181,7 +2186,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2181
2186
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2182
2187
|
}
|
|
2183
2188
|
if (options.idempotencyKey !== void 0) {
|
|
2184
|
-
|
|
2189
|
+
_chunkVYSUJMB5js.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2185
2190
|
}
|
|
2186
2191
|
if (options.connection !== void 0 && (options.recover || options.idempotencyKey !== void 0)) {
|
|
2187
2192
|
throw new Error(
|
|
@@ -2320,7 +2325,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2320
2325
|
kind: summaryEntries.length > 0 ? "object" : "raw",
|
|
2321
2326
|
summary: input.summary
|
|
2322
2327
|
};
|
|
2323
|
-
const envelopeHasCanonicalOutput =
|
|
2328
|
+
const envelopeHasCanonicalOutput = _chunkXMBTAPHRjs.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
|
|
2324
2329
|
const envelopeHasDeclaredOutput = Object.prototype.hasOwnProperty.call(
|
|
2325
2330
|
envelope,
|
|
2326
2331
|
"output"
|
|
@@ -2348,7 +2353,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2348
2353
|
return {
|
|
2349
2354
|
...envelope,
|
|
2350
2355
|
...input.idempotencyKey ? { idempotency_key: input.idempotencyKey } : {},
|
|
2351
|
-
...
|
|
2356
|
+
..._chunkXMBTAPHRjs.isRecord.call(void 0, input.rawResponse) && _chunkXMBTAPHRjs.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
|
|
2352
2357
|
...envelopeHasCanonicalOutput || envelopeHasDeclaredOutput ? { output_preview: outputPreview } : { output: outputPreview },
|
|
2353
2358
|
...summaryEntries.length > 0 ? { summary: input.summary } : {},
|
|
2354
2359
|
...warningMessages.length > 0 ? { warnings: warningMessages } : {},
|
|
@@ -2409,7 +2414,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
|
|
|
2409
2414
|
void _render;
|
|
2410
2415
|
void _next;
|
|
2411
2416
|
void _local;
|
|
2412
|
-
const billingLookup =
|
|
2417
|
+
const billingLookup = _chunkXMBTAPHRjs.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
|
|
2413
2418
|
const inspection = toolExecutionInspection(input);
|
|
2414
2419
|
return {
|
|
2415
2420
|
...base,
|
|
@@ -2505,7 +2510,7 @@ function printToolExecutionWarnings(toolId, params, metadata) {
|
|
|
2505
2510
|
}
|
|
2506
2511
|
}
|
|
2507
2512
|
function assertExecutableToolMetadata(toolId, metadata) {
|
|
2508
|
-
if (
|
|
2513
|
+
if (_chunkXMBTAPHRjs.isPlayLikeTool.call(void 0, metadata)) {
|
|
2509
2514
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
2510
2515
|
playLikeToolExecuteErrorMessage(
|
|
2511
2516
|
toolId,
|
|
@@ -2523,7 +2528,7 @@ function valueAt(value, path) {
|
|
|
2523
2528
|
for (const [index, part] of parts.entries()) {
|
|
2524
2529
|
const each = part === "*" || part.endsWith("[*]");
|
|
2525
2530
|
if (part !== "*") {
|
|
2526
|
-
at =
|
|
2531
|
+
at = _chunkXMBTAPHRjs.isRecord.call(void 0, at) ? at[each ? part.slice(0, -3) : part] : void 0;
|
|
2527
2532
|
}
|
|
2528
2533
|
if (!each) continue;
|
|
2529
2534
|
if (!Array.isArray(at)) return void 0;
|
|
@@ -2539,7 +2544,7 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2539
2544
|
const getters = ["extractedValues", "extractedLists"].flatMap(
|
|
2540
2545
|
(kind) => {
|
|
2541
2546
|
const group = _optionalChain([result, 'optionalAccess', _30 => _30[kind]]);
|
|
2542
|
-
return Array.isArray(group) ? group :
|
|
2547
|
+
return Array.isArray(group) ? group : _chunkXMBTAPHRjs.isRecord.call(void 0, group) ? Object.entries(group).map(([name, getter]) => ({
|
|
2543
2548
|
name,
|
|
2544
2549
|
...getter
|
|
2545
2550
|
})) : [];
|
|
@@ -2564,13 +2569,13 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2564
2569
|
}
|
|
2565
2570
|
function writeToolReceipt(input) {
|
|
2566
2571
|
const { response, metadata } = input;
|
|
2567
|
-
const envelope =
|
|
2572
|
+
const envelope = _chunkXMBTAPHRjs.isRecord.call(void 0, response) ? response : {};
|
|
2568
2573
|
const jobId = typeof envelope.job_id === "string" ? envelope.job_id : null;
|
|
2569
|
-
const toolResponse =
|
|
2574
|
+
const toolResponse = _chunkXMBTAPHRjs.recordField.call(void 0, envelope, "toolResponse");
|
|
2570
2575
|
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
2576
|
const status = typeof envelope.status === "string" ? envelope.status : "completed";
|
|
2572
|
-
const charged =
|
|
2573
|
-
|
|
2577
|
+
const charged = _chunkXMBTAPHRjs.recordField.call(void 0, envelope, "billing").credits_charged;
|
|
2578
|
+
_chunkNDDGFX4Xjs.writeExecutionOutput.call(void 0,
|
|
2574
2579
|
{
|
|
2575
2580
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2576
2581
|
status,
|
|
@@ -2601,8 +2606,8 @@ async function executeToolForReceipt(input) {
|
|
|
2601
2606
|
let retryKey = null;
|
|
2602
2607
|
let received = false;
|
|
2603
2608
|
try {
|
|
2604
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2605
|
-
const client = new (0,
|
|
2609
|
+
const cliInvocationId = _nullishCoalesce(_chunkID3LGPOEjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkID3LGPOEjs.beginToolExecuteCommand.call(void 0, )));
|
|
2610
|
+
const client = new (0, _chunk2RPRSTHDjs.DeeplineClient)();
|
|
2606
2611
|
const metadata = assertExecutableToolMetadata(
|
|
2607
2612
|
toolId,
|
|
2608
2613
|
await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
|
|
@@ -2624,9 +2629,9 @@ async function executeToolForReceipt(input) {
|
|
|
2624
2629
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2625
2630
|
..._optionalChain([metadata, 'access', _37 => _37.executionMetadata, 'optionalAccess', _38 => _38.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2626
2631
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2627
|
-
searchRef:
|
|
2632
|
+
searchRef: _chunk6B5EZOI3js.recentSearchRef.call(void 0, toolId),
|
|
2628
2633
|
cliInvocationId,
|
|
2629
|
-
onResponseReceived:
|
|
2634
|
+
onResponseReceived: _chunkNDDGFX4Xjs.recordApiResponse
|
|
2630
2635
|
});
|
|
2631
2636
|
const response = await call(key).catch((error) => {
|
|
2632
2637
|
if (!key || !refusedRetryKey(error)) throw error;
|
|
@@ -2662,11 +2667,11 @@ async function executeToolForReceipt(input) {
|
|
|
2662
2667
|
if (received) throw error;
|
|
2663
2668
|
const outcomeKnown = answeredWithFailure(error);
|
|
2664
2669
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _39 => _39.discard, 'call', _40 => _40()]);
|
|
2665
|
-
|
|
2670
|
+
_chunkNDDGFX4Xjs.writeExecutionOutput.call(void 0,
|
|
2666
2671
|
{
|
|
2667
2672
|
id: outcomeKnown ? null : key,
|
|
2668
2673
|
status: "failed",
|
|
2669
|
-
error:
|
|
2674
|
+
error: _chunkVLUBEMWMjs.errorToJsonPayload.call(void 0, error).error,
|
|
2670
2675
|
...key && !outcomeKnown ? {
|
|
2671
2676
|
next: {
|
|
2672
2677
|
retry: "Run the same command again: it picks up this call without paying twice."
|
|
@@ -2698,11 +2703,11 @@ function answeredWithFailure(error) {
|
|
|
2698
2703
|
!(error.code === "IDEMPOTENCY_NOT_SUPPORTED" && !serverBodyHasCode(_optionalChain([error, 'access', _43 => _43.details, 'optionalAccess', _44 => _44.response]), "IDEMPOTENCY_NOT_SUPPORTED"));
|
|
2699
2704
|
}
|
|
2700
2705
|
async function getToolExecutionReceipt(key, output) {
|
|
2701
|
-
const client = new (0,
|
|
2706
|
+
const client = new (0, _chunk2RPRSTHDjs.DeeplineClient)();
|
|
2702
2707
|
const execution = await client.executions.getByKey(key);
|
|
2703
2708
|
output.label = `${execution.toolId} (tool)`;
|
|
2704
2709
|
if (execution.response === void 0) {
|
|
2705
|
-
|
|
2710
|
+
_chunkNDDGFX4Xjs.writeExecutionOutput.call(void 0,
|
|
2706
2711
|
{
|
|
2707
2712
|
id: key,
|
|
2708
2713
|
status: execution.executionRecovery.state,
|
|
@@ -2731,19 +2736,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2731
2736
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2732
2737
|
} catch (error) {
|
|
2733
2738
|
if (wantsJson) {
|
|
2734
|
-
|
|
2739
|
+
_chunkVLUBEMWMjs.printJsonError.call(void 0, error);
|
|
2735
2740
|
} else {
|
|
2736
2741
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2737
2742
|
}
|
|
2738
2743
|
return error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2739
2744
|
}
|
|
2740
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2745
|
+
const cliInvocationId = _nullishCoalesce(_chunkID3LGPOEjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkID3LGPOEjs.beginToolExecuteCommand.call(void 0, )));
|
|
2741
2746
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2742
|
-
const tracing =
|
|
2747
|
+
const tracing = _chunkSLXCVPN7js.isCliTraceEnabled.call(void 0, );
|
|
2743
2748
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2744
|
-
const client = new (0,
|
|
2749
|
+
const client = new (0, _chunk2RPRSTHDjs.DeeplineClient)();
|
|
2745
2750
|
if (clientStartedAt !== void 0) {
|
|
2746
|
-
|
|
2751
|
+
_chunkSLXCVPN7js.recordCliTrace.call(void 0, {
|
|
2747
2752
|
phase: "cli.tool_execute_client_setup",
|
|
2748
2753
|
ms: performance.now() - clientStartedAt
|
|
2749
2754
|
});
|
|
@@ -2752,13 +2757,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2752
2757
|
const readMetadata = async () => {
|
|
2753
2758
|
if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2754
2759
|
try {
|
|
2755
|
-
metadata = await
|
|
2760
|
+
metadata = await _chunkID3LGPOEjs.runToolExecuteStage.call(void 0,
|
|
2756
2761
|
"tool metadata lookup",
|
|
2757
2762
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2758
2763
|
);
|
|
2759
2764
|
} catch (error) {
|
|
2760
2765
|
if (isMissingToolMetadataError(error)) {
|
|
2761
|
-
const play = await
|
|
2766
|
+
const play = await _chunkID3LGPOEjs.runToolExecuteStage.call(void 0,
|
|
2762
2767
|
"play alias lookup",
|
|
2763
2768
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2764
2769
|
);
|
|
@@ -2781,7 +2786,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2781
2786
|
toolMetadata = await readMetadata();
|
|
2782
2787
|
} catch (error) {
|
|
2783
2788
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2784
|
-
if (wantsJson)
|
|
2789
|
+
if (wantsJson) _chunkVLUBEMWMjs.printJsonError.call(void 0, error);
|
|
2785
2790
|
else console.error(error.message);
|
|
2786
2791
|
return 2;
|
|
2787
2792
|
}
|
|
@@ -2809,7 +2814,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2809
2814
|
assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2810
2815
|
} catch (error) {
|
|
2811
2816
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2812
|
-
if (wantsJson)
|
|
2817
|
+
if (wantsJson) _chunkVLUBEMWMjs.printJsonError.call(void 0, error);
|
|
2813
2818
|
else console.error(error.message);
|
|
2814
2819
|
return 2;
|
|
2815
2820
|
}
|
|
@@ -2821,7 +2826,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2821
2826
|
metadata = await readMetadata();
|
|
2822
2827
|
} catch (error) {
|
|
2823
2828
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2824
|
-
if (wantsJson)
|
|
2829
|
+
if (wantsJson) _chunkVLUBEMWMjs.printJsonError.call(void 0, error);
|
|
2825
2830
|
else console.error(error.message);
|
|
2826
2831
|
return 2;
|
|
2827
2832
|
}
|
|
@@ -2837,7 +2842,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2837
2842
|
metadata = await readMetadata();
|
|
2838
2843
|
} catch (error) {
|
|
2839
2844
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2840
|
-
if (wantsJson)
|
|
2845
|
+
if (wantsJson) _chunkVLUBEMWMjs.printJsonError.call(void 0, error);
|
|
2841
2846
|
else console.error(error.message);
|
|
2842
2847
|
return 2;
|
|
2843
2848
|
}
|
|
@@ -2864,11 +2869,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2864
2869
|
...parsed.connection !== void 0 ? { connection: parsed.connection } : {},
|
|
2865
2870
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2866
2871
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2867
|
-
searchRef:
|
|
2872
|
+
searchRef: _chunk6B5EZOI3js.recentSearchRef.call(void 0, parsed.toolId),
|
|
2868
2873
|
cliInvocationId,
|
|
2869
|
-
onResponseReceived:
|
|
2874
|
+
onResponseReceived: _chunkNDDGFX4Xjs.recordApiResponse,
|
|
2870
2875
|
...tracing ? {
|
|
2871
|
-
onServerTiming: (serverTiming) =>
|
|
2876
|
+
onServerTiming: (serverTiming) => _chunkSLXCVPN7js.recordCliTrace.call(void 0, {
|
|
2872
2877
|
phase: "tool_execute_server_timing",
|
|
2873
2878
|
cliInvocationId,
|
|
2874
2879
|
serverTiming,
|
|
@@ -2879,13 +2884,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2879
2884
|
let rawResponse;
|
|
2880
2885
|
let successfulCompatibilityResponse;
|
|
2881
2886
|
try {
|
|
2882
|
-
const executeResult = await
|
|
2887
|
+
const executeResult = await _chunkID3LGPOEjs.runToolExecuteStage.call(void 0,
|
|
2883
2888
|
"execute request",
|
|
2884
2889
|
async () => {
|
|
2885
2890
|
try {
|
|
2886
2891
|
if (tracing) {
|
|
2887
2892
|
submissionStartedAt = performance.now();
|
|
2888
|
-
|
|
2893
|
+
_chunkSLXCVPN7js.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2889
2894
|
}
|
|
2890
2895
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2891
2896
|
...executeOptions,
|
|
@@ -2895,34 +2900,34 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2895
2900
|
} catch (error) {
|
|
2896
2901
|
if (parsed.connection !== void 0 || !(error instanceof _chunkLFQJW4S2js.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2897
2902
|
throw error;
|
|
2898
|
-
const baseUrl =
|
|
2903
|
+
const baseUrl = _chunk2QYU57RGjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2899
2904
|
if (maintenancePolicy !== "off") {
|
|
2900
|
-
|
|
2905
|
+
_chunkI62ZBEKHjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2901
2906
|
}
|
|
2902
2907
|
const preflight = deferredCompatibility ? await deferredCompatibility.result.catch(() => null) : null;
|
|
2903
|
-
const compatibilityResponse = _optionalChain([preflight, 'optionalAccess', _50 => _50.live]) === true ? preflight.response : await
|
|
2908
|
+
const compatibilityResponse = _optionalChain([preflight, 'optionalAccess', _50 => _50.live]) === true ? preflight.response : await _chunkID3LGPOEjs.runToolExecuteStage.call(void 0,
|
|
2904
2909
|
"SDK compatibility",
|
|
2905
|
-
() =>
|
|
2910
|
+
() => _chunkI62ZBEKHjs.requireSdkCompatibility.call(void 0, baseUrl, {
|
|
2906
2911
|
command: "tools execute",
|
|
2907
|
-
skillsVersion:
|
|
2912
|
+
skillsVersion: _chunk2QYU57RGjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2908
2913
|
persistCache: maintenancePolicy !== "off"
|
|
2909
2914
|
})
|
|
2910
2915
|
);
|
|
2911
2916
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _51 => _51.readMetadata, 'call', _52 => _52()]), () => ( metadata));
|
|
2912
|
-
if (maintenancePolicy !== "off" && await
|
|
2917
|
+
if (maintenancePolicy !== "off" && await _chunkID3LGPOEjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2913
2918
|
compatibilityResponse,
|
|
2914
2919
|
baseUrl,
|
|
2915
2920
|
maintenancePolicy
|
|
2916
2921
|
)) {
|
|
2917
2922
|
return void 0;
|
|
2918
2923
|
}
|
|
2919
|
-
|
|
2924
|
+
_chunkI62ZBEKHjs.enforceSdkCompatibilityResponse.call(void 0, compatibilityResponse, {
|
|
2920
2925
|
quietAdvisory: wantsJson
|
|
2921
2926
|
});
|
|
2922
2927
|
if (maintenancePolicy !== "off") {
|
|
2923
|
-
await
|
|
2928
|
+
await _chunkID3LGPOEjs.runToolExecuteStage.call(void 0,
|
|
2924
2929
|
"agent skills sync",
|
|
2925
|
-
() =>
|
|
2930
|
+
() => _chunkI62ZBEKHjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2926
2931
|
update: _optionalChain([compatibilityResponse, 'optionalAccess', _53 => _53.skills]),
|
|
2927
2932
|
mode: "detached"
|
|
2928
2933
|
})
|
|
@@ -2931,7 +2936,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2931
2936
|
const legacyMetadata = await readMetadata();
|
|
2932
2937
|
if (tracing) {
|
|
2933
2938
|
submissionStartedAt = performance.now();
|
|
2934
|
-
|
|
2939
|
+
_chunkSLXCVPN7js.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2935
2940
|
}
|
|
2936
2941
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2937
2942
|
...executeOptions,
|
|
@@ -2954,8 +2959,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2954
2959
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2955
2960
|
const updateRequiredBeforeExecution = error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2956
2961
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2957
|
-
const baseUrl =
|
|
2958
|
-
if (await
|
|
2962
|
+
const baseUrl = _chunk2QYU57RGjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2963
|
+
if (await _chunkID3LGPOEjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2959
2964
|
compatibility.response,
|
|
2960
2965
|
baseUrl,
|
|
2961
2966
|
maintenancePolicy
|
|
@@ -2979,7 +2984,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2979
2984
|
}
|
|
2980
2985
|
}
|
|
2981
2986
|
if (failure instanceof _chunkLFQJW4S2js.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2982
|
-
if (wantsJson)
|
|
2987
|
+
if (wantsJson) _chunkVLUBEMWMjs.printJsonError.call(void 0, failure);
|
|
2983
2988
|
else console.error(failure.message);
|
|
2984
2989
|
return 2;
|
|
2985
2990
|
}
|
|
@@ -3006,9 +3011,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3006
3011
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
3007
3012
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _60 => _60.auto_update]);
|
|
3008
3013
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _61 => _61.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
3009
|
-
await
|
|
3014
|
+
await _chunkID3LGPOEjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
3010
3015
|
compatibilityResponse,
|
|
3011
|
-
|
|
3016
|
+
_chunk2QYU57RGjs.resolveConfig.call(void 0, ).baseUrl,
|
|
3012
3017
|
maintenancePolicy
|
|
3013
3018
|
);
|
|
3014
3019
|
}
|
|
@@ -3026,8 +3031,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3026
3031
|
);
|
|
3027
3032
|
}
|
|
3028
3033
|
}
|
|
3029
|
-
const responseMetadata =
|
|
3030
|
-
|
|
3034
|
+
const responseMetadata = _chunkXMBTAPHRjs.recordField.call(void 0,
|
|
3035
|
+
_chunkXMBTAPHRjs.recordField.call(void 0, rawResponse, "_metadata"),
|
|
3031
3036
|
"tool"
|
|
3032
3037
|
);
|
|
3033
3038
|
const listOutputPaths = responseMetadata.listOutputPaths;
|
|
@@ -3039,11 +3044,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3039
3044
|
await readMetadata()
|
|
3040
3045
|
);
|
|
3041
3046
|
}
|
|
3042
|
-
if (
|
|
3047
|
+
if (_chunkXMBTAPHRjs.isRecord.call(void 0, rawResponse)) {
|
|
3043
3048
|
const { _metadata, ...execution } = rawResponse;
|
|
3044
3049
|
rawResponse = execution;
|
|
3045
3050
|
}
|
|
3046
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
3051
|
+
const { listConversion, summary, baseEnvelope } = await _chunkID3LGPOEjs.runToolExecuteStage.call(void 0,
|
|
3047
3052
|
"result formatting",
|
|
3048
3053
|
async () => {
|
|
3049
3054
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -3078,9 +3083,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3078
3083
|
}
|
|
3079
3084
|
skillsSyncAttempted = true;
|
|
3080
3085
|
try {
|
|
3081
|
-
await
|
|
3086
|
+
await _chunkID3LGPOEjs.runToolExecuteStage.call(void 0,
|
|
3082
3087
|
"agent skills sync",
|
|
3083
|
-
() =>
|
|
3088
|
+
() => _chunkI62ZBEKHjs.syncSdkSkillsIfNeeded.call(void 0, _chunk2QYU57RGjs.resolveConfig.call(void 0, ).baseUrl, {
|
|
3084
3089
|
update: deliveredCompatibilityResponse.skills,
|
|
3085
3090
|
mode: "detached"
|
|
3086
3091
|
})
|
|
@@ -3091,15 +3096,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3091
3096
|
);
|
|
3092
3097
|
}
|
|
3093
3098
|
};
|
|
3094
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
3099
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkVLUBEMWMjs.printCommandEnvelope.call(void 0, envelope, {
|
|
3095
3100
|
...options2,
|
|
3096
3101
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
3097
3102
|
});
|
|
3098
3103
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
3099
3104
|
await syncSkillsForDeliveredOutput();
|
|
3100
|
-
|
|
3105
|
+
_chunkVLUBEMWMjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
3101
3106
|
};
|
|
3102
|
-
const delivered = await
|
|
3107
|
+
const delivered = await _chunkID3LGPOEjs.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
3103
3108
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
3104
3109
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
3105
3110
|
return true;
|
|
@@ -3112,7 +3117,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3112
3117
|
await printDeliveredJsonEnvelope({
|
|
3113
3118
|
...baseEnvelope,
|
|
3114
3119
|
local: {
|
|
3115
|
-
...
|
|
3120
|
+
..._chunkXMBTAPHRjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
|
|
3116
3121
|
payload_file: jsonPath
|
|
3117
3122
|
}
|
|
3118
3123
|
});
|
|
@@ -3128,7 +3133,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3128
3133
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3129
3134
|
);
|
|
3130
3135
|
if (wantsJson) {
|
|
3131
|
-
|
|
3136
|
+
_chunkVLUBEMWMjs.printJsonError.call(void 0, error);
|
|
3132
3137
|
} else {
|
|
3133
3138
|
console.error(error.message);
|
|
3134
3139
|
}
|
|
@@ -3223,13 +3228,13 @@ inspect: ${inspection.inspect}
|
|
|
3223
3228
|
return true;
|
|
3224
3229
|
});
|
|
3225
3230
|
if (delivered) {
|
|
3226
|
-
await
|
|
3231
|
+
await _chunkID3LGPOEjs.runToolExecuteStage.call(void 0,
|
|
3227
3232
|
"acknowledge delivery",
|
|
3228
3233
|
() => recovery.acknowledgeDelivery()
|
|
3229
3234
|
);
|
|
3230
3235
|
}
|
|
3231
3236
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3232
|
-
|
|
3237
|
+
_chunkI62ZBEKHjs.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3233
3238
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _64 => _64.auto_update, 'optionalAccess', _65 => _65.should_auto_update]) === true
|
|
3234
3239
|
});
|
|
3235
3240
|
}
|