deepline 0.3.574 → 0.3.575
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +0 -18
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/builtin-pacing.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +4 -1
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-receipt-gateway.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-fly-rollback-alignment.ts +0 -14
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +45 -7
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +6 -66
- package/dist/cli/{agents-7ZZSF4FS.js → agents-BCLO3KQJ.js} +204 -41
- package/dist/cli/{agents-6WN5LYUP.mjs → agents-ULGDKUTM.mjs} +182 -19
- package/dist/cli/{auth-I2QVO677.mjs → auth-4WCL7A6W.mjs} +5 -5
- package/dist/cli/auth-DXUHEL5I.js +44 -0
- package/dist/cli/{billing-YPH4GEWU.mjs → billing-7JQ6EUQU.mjs} +9 -9
- package/dist/cli/{billing-44QFBUWA.js → billing-BF5LVXOM.js} +102 -102
- package/dist/cli/{chunk-MGF3MK27.mjs → chunk-2T7XOKVL.mjs} +5 -5
- package/dist/cli/{chunk-7UR57HPJ.js → chunk-2UM3I2MY.js} +1 -1
- package/dist/cli/{chunk-SRUNYWQ2.mjs → chunk-3PVKXUSJ.mjs} +1 -1
- package/dist/cli/{chunk-W6UCS3O6.mjs → chunk-56N3XAT6.mjs} +5 -5
- package/dist/cli/{chunk-LLSCFLFU.mjs → chunk-5D7OJY4W.mjs} +1 -1
- package/dist/cli/{chunk-5E2PAGF5.js → chunk-5H6254MJ.js} +21 -21
- package/dist/cli/{chunk-VYSUJMB5.js → chunk-5VSHQG5E.js} +8 -8
- package/dist/cli/{chunk-SLXCVPN7.js → chunk-636GD4IR.js} +2 -2
- package/dist/cli/{chunk-LJLM4BUL.js → chunk-6IKLITVH.js} +6 -6
- package/dist/cli/{chunk-D6ZVRKJ2.js → chunk-737Y7QGT.js} +41 -41
- package/dist/cli/{chunk-UXIUAIL2.js → chunk-7DLAJ6JJ.js} +53 -53
- package/dist/cli/{chunk-2QYU57RG.js → chunk-AO56MZ7D.js} +3 -3
- package/dist/cli/{chunk-BUBOZKH2.js → chunk-AS5XGOZY.js} +2 -2
- package/dist/cli/{chunk-XVBEEGI4.mjs → chunk-BM536WWR.mjs} +1 -1
- package/dist/cli/{chunk-DX646HO7.mjs → chunk-BONMEBWZ.mjs} +4 -4
- package/dist/cli/{chunk-S22FSNNC.mjs → chunk-BQUAE6LQ.mjs} +1 -1
- package/dist/cli/{chunk-G7OR3GVD.mjs → chunk-CVY4MBXH.mjs} +5 -5
- package/dist/cli/{chunk-KSHZY52O.js → chunk-DMPGJCNZ.js} +72 -10
- package/dist/cli/{chunk-Q3A53SWK.mjs → chunk-DWUESXDD.mjs} +1 -1
- package/dist/cli/{chunk-IA2LTIWO.mjs → chunk-E4RYSSXX.mjs} +2 -2
- package/dist/cli/{chunk-VLUBEMWM.js → chunk-EV3OPDHF.js} +20 -20
- package/dist/cli/{chunk-ECLCRE5P.js → chunk-EZIXKNKM.js} +3 -3
- package/dist/cli/{chunk-JCO226JM.mjs → chunk-FDCU3VAJ.mjs} +72 -10
- package/dist/cli/{chunk-6B5EZOI3.js → chunk-FXXERR52.js} +10 -10
- package/dist/cli/{chunk-L2NXB4WG.mjs → chunk-FYKHAT2F.mjs} +64 -3
- package/dist/cli/{chunk-NDDGFX4X.js → chunk-G2H6SQQY.js} +11 -11
- package/dist/cli/{chunk-I62ZBEKH.js → chunk-G4WPDCXA.js} +48 -48
- package/dist/cli/{chunk-G2HW2SAP.js → chunk-GB4IZ5TV.js} +13 -13
- package/dist/cli/{chunk-7334X74C.mjs → chunk-GQZFZG6R.mjs} +2 -2
- package/dist/cli/{chunk-JY7RKJ65.mjs → chunk-H3CG72RZ.mjs} +13 -13
- package/dist/cli/{chunk-N6I3BB2O.js → chunk-H6JMRLAZ.js} +274 -274
- package/dist/cli/{chunk-6GZIT3TH.js → chunk-HEOM3FAC.js} +20 -20
- package/dist/cli/{chunk-DG56RWI2.js → chunk-HO76C7AE.js} +2 -2
- package/dist/cli/{chunk-X7RKCAMX.mjs → chunk-IAJ65IDZ.mjs} +4 -4
- package/dist/cli/{chunk-ZFXDD7VM.mjs → chunk-IBYMGR5Y.mjs} +1 -1
- package/dist/cli/{chunk-LCAXLGAY.mjs → chunk-IOWLFWWG.mjs} +2 -2
- package/dist/cli/{chunk-NRVEVKXR.mjs → chunk-JGLCK2XF.mjs} +2 -2
- package/dist/cli/{chunk-IB225ZK4.js → chunk-KNCNFL76.js} +4 -4
- package/dist/cli/{chunk-QPSBV4FD.mjs → chunk-MN7JLH2T.mjs} +2 -2
- package/dist/cli/{chunk-OH6WOID2.mjs → chunk-MWLOBURN.mjs} +2 -2
- package/dist/cli/{chunk-AFPGYZBH.js → chunk-MXK4M7HP.js} +17 -17
- package/dist/cli/{chunk-MAMGREBW.mjs → chunk-NF722E6C.mjs} +1 -1
- package/dist/cli/{chunk-7GQU46SZ.js → chunk-PQYDO72W.js} +26 -26
- package/dist/cli/{chunk-4T2U72SP.mjs → chunk-QEDRUURT.mjs} +1 -1
- package/dist/cli/{chunk-B2XLIQPH.mjs → chunk-QKP3WYSZ.mjs} +2 -2
- package/dist/cli/{chunk-VGIDPJXM.mjs → chunk-RHRRY2BX.mjs} +3 -3
- package/dist/cli/{chunk-ZTCP5BHH.mjs → chunk-RW3URFZK.mjs} +2 -2
- package/dist/cli/{chunk-XMBTAPHR.js → chunk-SKHUWQZE.js} +7 -7
- package/dist/cli/{chunk-OIZUFRTE.mjs → chunk-SYQTBHRX.mjs} +3 -3
- package/dist/cli/{chunk-PW6NKI2A.mjs → chunk-TMFR2B45.mjs} +3 -3
- package/dist/cli/{chunk-YR4REP4D.mjs → chunk-TTBZ7QXX.mjs} +1 -1
- package/dist/cli/{chunk-GMQZFWQU.mjs → chunk-UQZP7XBQ.mjs} +7 -7
- package/dist/cli/{chunk-DOZIWA66.js → chunk-V5XLENWK.js} +5 -5
- package/dist/cli/{chunk-2TMAKJBT.mjs → chunk-X47J55ZJ.mjs} +2 -2
- package/dist/cli/{chunk-ID3LGPOE.js → chunk-XFV353R2.js} +23 -23
- package/dist/cli/{chunk-2RPRSTHD.js → chunk-YNAXKA23.js} +5 -5
- package/dist/cli/{chunk-IXYVHTRZ.js → chunk-ZO65VJRJ.js} +70 -9
- package/dist/cli/{chunk-PP5RMEQQ.js → chunk-ZQXJYO5P.js} +5 -5
- package/dist/cli/{chunk-H7PVSG3L.js → chunk-ZS6DT4LD.js} +15 -15
- package/dist/cli/{chunk-Z3XFXFRT.js → chunk-ZYSJND73.js} +9 -9
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{concurrent-runs-help-ROQM6UB3.mjs → concurrent-runs-help-HITK6EOO.mjs} +6 -6
- package/dist/cli/concurrent-runs-help-JLWY54WL.js +22 -0
- package/dist/cli/{csv-FWGSY4GE.js → csv-RS7XHQ4P.js} +13 -13
- package/dist/cli/{csv-R7GV33BC.mjs → csv-V2T23MXT.mjs} +4 -4
- package/dist/cli/{db-UWXA4RRV.mjs → db-OQ4RNTGE.mjs} +6 -6
- package/dist/cli/{db-OCH35YJG.js → db-WFIVRPKY.js} +27 -27
- package/dist/cli/describe-33PBWO5O.js +50 -0
- package/dist/cli/{describe-QI4HMUGE.mjs → describe-AXV2EEX3.mjs} +21 -21
- package/dist/cli/describe-core.d.mts +10 -1
- package/dist/cli/describe-core.d.ts +10 -1
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-7CFGC24E.js → executions-5H2RIWZ3.js} +8 -8
- package/dist/cli/{executions-YF3KMZZN.mjs → executions-THP5ZDBQ.mjs} +6 -6
- package/dist/cli/{feedback-DWIWBS7O.mjs → feedback-2EJPILGE.mjs} +6 -6
- package/dist/cli/{feedback-YCZHHSBS.js → feedback-UOI6UEGA.js} +14 -14
- package/dist/cli/git-2OPYEPYW.js +26 -0
- package/dist/cli/{git-XCGMQQOD.mjs → git-DI3LJIAT.mjs} +5 -5
- package/dist/cli/index.js +148 -148
- package/dist/cli/index.mjs +47 -47
- package/dist/cli/{integrations-5ABAJBSW.mjs → integrations-DJYS5VRK.mjs} +7 -7
- package/dist/cli/{integrations-IEZA3TGK.js → integrations-TYN2BSQ6.js} +29 -29
- package/dist/cli/{legacy-noops-KNFLJ5P2.js → legacy-noops-GXQHNLGJ.js} +9 -9
- package/dist/cli/{legacy-noops-OZMY73Y3.mjs → legacy-noops-Z457BB6O.mjs} +6 -6
- package/dist/cli/{mcp-WSPFKQPZ.mjs → mcp-NAW3GFNN.mjs} +4 -4
- package/dist/cli/{mcp-NLQAO7KP.js → mcp-WMBOOTQL.js} +24 -24
- package/dist/cli/{monitors-LPKFFTOX.mjs → monitors-A7NYAXSJ.mjs} +7 -7
- package/dist/cli/{monitors-BJYOB4S3.js → monitors-OOQVE7XR.js} +100 -100
- package/dist/cli/{org-RYPMUYUW.mjs → org-7YCDUSZE.mjs} +6 -6
- package/dist/cli/{org-WIVHI4WT.js → org-D2AMIVBS.js} +121 -121
- package/dist/cli/{outcomes-QKX7IE3O.js → outcomes-2FKZDJSQ.js} +14 -14
- package/dist/cli/{outcomes-FADJYC4I.mjs → outcomes-TNTKCUEO.mjs} +6 -6
- package/dist/cli/{play-4ZKK5Q7U.mjs → play-L6CVHSN4.mjs} +20 -20
- package/dist/cli/{play-ID73J3NP.js → play-NWKHCHVZ.js} +349 -349
- package/dist/cli/{providers-LURYBSNO.mjs → providers-22LO747B.mjs} +6 -6
- package/dist/cli/{providers-WCCGYGW6.js → providers-PZGOI5CN.js} +9 -9
- package/dist/cli/{quickstart-KCCSEE5J.mjs → quickstart-3ZRVKGMH.mjs} +4 -4
- package/dist/cli/{quickstart-LVPOU25V.js → quickstart-LLWOC2GR.js} +6 -6
- package/dist/cli/{run-XXK7DDUF.mjs → run-D46W2GUA.mjs} +48 -27
- package/dist/cli/{run-2QMJRCVA.js → run-SNF23STR.js} +70 -49
- package/dist/cli/search-H57MZPLF.js +32 -0
- package/dist/cli/{search-ZYAWW3CK.mjs → search-XWVCICIX.mjs} +7 -7
- package/dist/cli/{search-output-YNXAZSKT.js → search-output-36GHD67U.js} +8 -8
- package/dist/cli/{search-output-N45AIOB4.mjs → search-output-YM5QXFQQ.mjs} +5 -5
- package/dist/cli/{secrets-7Q3AOUAS.mjs → secrets-7PTZEFRC.mjs} +6 -6
- package/dist/cli/{secrets-MHT27L2M.js → secrets-UXCIHG5I.js} +15 -15
- package/dist/cli/{sessions-6QKOM7M3.mjs → sessions-DTXJKRP4.mjs} +6 -6
- package/dist/cli/sessions-JJZMQSH4.js +23 -0
- package/dist/cli/{settings-NPVIDENI.mjs → settings-74B6UOS4.mjs} +12 -12
- package/dist/cli/{settings-OP7Q6YX6.js → settings-EYSDZE37.js} +85 -85
- package/dist/cli/{setup-OOT3EIMF.mjs → setup-2QRZ36CH.mjs} +9 -9
- package/dist/cli/{setup-RT6GHL3W.js → setup-E7PVXBPL.js} +49 -49
- package/dist/cli/{skills-TEXI4CLZ.mjs → skills-2WZ7N3UW.mjs} +7 -7
- package/dist/cli/skills-RIF2DCZI.js +37 -0
- package/dist/cli/tools-7VRQ4GSI.js +57 -0
- package/dist/cli/{tools-G5L36M3X.mjs → tools-YK5SCUZD.mjs} +19 -19
- package/dist/cli/{update-YNKQTE4D.mjs → update-563YQK53.mjs} +9 -9
- package/dist/cli/update-CMZAIAES.js +37 -0
- package/dist/cli/{views-IQFMUMLU.mjs → views-ISNCRZUP.mjs} +6 -6
- package/dist/cli/{views-OVQ5AQAU.js → views-OLPS6TPG.js} +21 -21
- package/dist/cli/{workflow-Y5IFMI7N.mjs → workflow-B3ZKU3OR.mjs} +7 -7
- package/dist/cli/{workflow-RCBYXIFZ.js → workflow-CUSCTYMW.js} +17 -17
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +122 -122
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-UKPV5U2B.js +0 -44
- package/dist/cli/concurrent-runs-help-BFVCUJF4.js +0 -22
- package/dist/cli/describe-6OI5K2SH.js +0 -50
- package/dist/cli/git-TGLNZRS3.js +0 -26
- package/dist/cli/search-AQSAXA6D.js +0 -32
- package/dist/cli/sessions-RGD7L4LC.js +0 -23
- package/dist/cli/skills-ERAA734H.js +0 -37
- package/dist/cli/tools-D5SZSIIH.js +0 -57
- package/dist/cli/update-WZ6527EF.js +0 -37
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkG2H6SQQYjs = require('./chunk-G2H6SQQY.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -11,11 +11,11 @@ var _chunkNDDGFX4Xjs = require('./chunk-NDDGFX4X.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkZS6DT4LDjs = require('./chunk-ZS6DT4LD.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkFXXERR52js = require('./chunk-FXXERR52.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -37,10 +37,10 @@ var _chunk6B5EZOI3js = require('./chunk-6B5EZOI3.js');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkSKHUWQZEjs = require('./chunk-SKHUWQZE.js');
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkZO65VJRJjs = require('./chunk-ZO65VJRJ.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 _chunkYNAXKA23js = require('./chunk-YNAXKA23.js');
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
var
|
|
63
|
+
var _chunk5VSHQG5Ejs = require('./chunk-5VSHQG5E.js');
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
var
|
|
70
|
+
var _chunkXFV353R2js = require('./chunk-XFV353R2.js');
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
var
|
|
75
|
+
var _chunk636GD4IRjs = require('./chunk-636GD4IR.js');
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
var
|
|
82
|
+
var _chunkG4WPDCXAjs = require('./chunk-G4WPDCXA.js');
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
@@ -88,12 +88,12 @@ var _chunkI62ZBEKHjs = require('./chunk-I62ZBEKH.js');
|
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
|
|
91
|
-
var
|
|
91
|
+
var _chunkEV3OPDHFjs = require('./chunk-EV3OPDHF.js');
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
var
|
|
96
|
+
var _chunkAO56MZ7Djs = require('./chunk-AO56MZ7D.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 = _chunkAO56MZ7Djs.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
|
+
_chunkAO56MZ7Djs.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 (_chunkSKHUWQZEjs.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: _chunkSKHUWQZEjs.playRunCommandForTool.call(void 0, tool, tool.toolId)
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
444
|
return {
|
|
@@ -511,21 +511,21 @@ function firstSentence(text) {
|
|
|
511
511
|
return (match ? match[0] : clean).trim();
|
|
512
512
|
}
|
|
513
513
|
function requiredInputIds(tool) {
|
|
514
|
-
const inputSchema =
|
|
514
|
+
const inputSchema = _chunkSKHUWQZEjs.recordField.call(void 0,
|
|
515
515
|
tool,
|
|
516
516
|
"inputSchema",
|
|
517
517
|
"input_schema"
|
|
518
518
|
);
|
|
519
|
-
return
|
|
519
|
+
return _chunkSKHUWQZEjs.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 = _chunkSKHUWQZEjs.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: _chunkSKHUWQZEjs.stringField.call(void 0, record, "connectionMessage", "connection_message") || void 0
|
|
529
529
|
});
|
|
530
530
|
return message ? ` - \u26A0 ${message}` : "";
|
|
531
531
|
}
|
|
@@ -533,19 +533,19 @@ function runsOnOwnKey(tool) {
|
|
|
533
533
|
return tool.billingSource === "own_provider_credentials" || tool.billingSource === "free";
|
|
534
534
|
}
|
|
535
535
|
function shortPricingHint(tool) {
|
|
536
|
-
const pricing =
|
|
536
|
+
const pricing = _chunkSKHUWQZEjs.recordField.call(void 0,
|
|
537
537
|
tool,
|
|
538
538
|
"pricing"
|
|
539
539
|
);
|
|
540
540
|
const credits = numberField(pricing, "creditsPerUnit", "credits_per_unit");
|
|
541
|
-
const unit =
|
|
541
|
+
const unit = _chunkSKHUWQZEjs.stringField.call(void 0, pricing, "unit");
|
|
542
542
|
if (runsOnOwnKey(tool)) return "0 (your key)";
|
|
543
543
|
if (credits !== null) {
|
|
544
544
|
return `${formatDecimal(credits)} cr/${unit || "unit"}`;
|
|
545
545
|
}
|
|
546
|
-
const summary =
|
|
546
|
+
const summary = _chunkSKHUWQZEjs.stringField.call(void 0, pricing, "summary");
|
|
547
547
|
if (summary) return summary;
|
|
548
|
-
const displayText =
|
|
548
|
+
const displayText = _chunkSKHUWQZEjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
549
549
|
return displayText || null;
|
|
550
550
|
}
|
|
551
551
|
function aggregateCategorySummaries(tools) {
|
|
@@ -589,13 +589,13 @@ function categoryEnumerationRender(summaries) {
|
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
591
|
async function listToolCategories(emitJson, compact) {
|
|
592
|
-
const client = new (0,
|
|
592
|
+
const client = new (0, _chunkYNAXKA23js.DeeplineClient)();
|
|
593
593
|
if (!emitJson) {
|
|
594
594
|
const summaries2 = (await client.listToolCategories()).map((category) => ({
|
|
595
595
|
...category,
|
|
596
596
|
description: describeToolCategory(category.name)
|
|
597
597
|
}));
|
|
598
|
-
|
|
598
|
+
_chunkEV3OPDHFjs.printCommandEnvelope.call(void 0,
|
|
599
599
|
{ categories: summaries2, render: categoryEnumerationRender(summaries2) },
|
|
600
600
|
{ json: false }
|
|
601
601
|
);
|
|
@@ -605,7 +605,7 @@ async function listToolCategories(emitJson, compact) {
|
|
|
605
605
|
const items = rawTools.map(toListedTool);
|
|
606
606
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
607
607
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
608
|
-
|
|
608
|
+
_chunkEV3OPDHFjs.printCommandEnvelope.call(void 0,
|
|
609
609
|
{
|
|
610
610
|
tools: outputItems,
|
|
611
611
|
count: outputItems.length,
|
|
@@ -624,7 +624,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
624
624
|
const known = summaries.map((item) => item.name);
|
|
625
625
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
626
626
|
if (emitJson) {
|
|
627
|
-
|
|
627
|
+
_chunkEV3OPDHFjs.printJson.call(void 0, {
|
|
628
628
|
ok: false,
|
|
629
629
|
exitCode: 4,
|
|
630
630
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -638,13 +638,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
638
638
|
const render = categoryEnumerationRender(summaries);
|
|
639
639
|
console.error(message);
|
|
640
640
|
console.error("");
|
|
641
|
-
console.error(
|
|
641
|
+
console.error(_chunkEV3OPDHFjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
642
642
|
console.error("");
|
|
643
643
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
644
644
|
return 4;
|
|
645
645
|
}
|
|
646
646
|
async function listToolsInCategory(category, emitJson) {
|
|
647
|
-
const client = new (0,
|
|
647
|
+
const client = new (0, _chunkYNAXKA23js.DeeplineClient)();
|
|
648
648
|
const { tools: rawTools, categories } = await client.listToolsInCategory(category);
|
|
649
649
|
const summaries = categories.map((item) => ({
|
|
650
650
|
...item,
|
|
@@ -681,7 +681,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
681
681
|
}
|
|
682
682
|
]
|
|
683
683
|
};
|
|
684
|
-
|
|
684
|
+
_chunkEV3OPDHFjs.printCommandEnvelope.call(void 0,
|
|
685
685
|
{
|
|
686
686
|
category,
|
|
687
687
|
total: rows.length,
|
|
@@ -694,7 +694,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
694
694
|
return 0;
|
|
695
695
|
}
|
|
696
696
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
697
|
-
const client = new (0,
|
|
697
|
+
const client = new (0, _chunkYNAXKA23js.DeeplineClient)();
|
|
698
698
|
const items = (await client.listTools({
|
|
699
699
|
categories: requestedCategories.join(","),
|
|
700
700
|
compact
|
|
@@ -723,7 +723,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
723
723
|
]
|
|
724
724
|
};
|
|
725
725
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
726
|
-
|
|
726
|
+
_chunkEV3OPDHFjs.printCommandEnvelope.call(void 0,
|
|
727
727
|
{
|
|
728
728
|
tools: outputItems,
|
|
729
729
|
count: outputItems.length,
|
|
@@ -742,13 +742,13 @@ async function listTools(category, options = {}) {
|
|
|
742
742
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()]), () => ( ""));
|
|
743
743
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
744
744
|
const compact = options.compact !== false;
|
|
745
|
-
const emitJson = options.json === true ||
|
|
745
|
+
const emitJson = options.json === true || _chunkEV3OPDHFjs.shouldEmitJson.call(void 0, );
|
|
746
746
|
if (positional && flagCategories.length > 0) {
|
|
747
747
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
748
748
|
if (!flagIsSameSingle) {
|
|
749
749
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
750
750
|
if (emitJson) {
|
|
751
|
-
|
|
751
|
+
_chunkEV3OPDHFjs.printJson.call(void 0, {
|
|
752
752
|
ok: false,
|
|
753
753
|
exitCode: 2,
|
|
754
754
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -775,7 +775,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
775
775
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
776
776
|
return 1;
|
|
777
777
|
}
|
|
778
|
-
const client = new (0,
|
|
778
|
+
const client = new (0, _chunkYNAXKA23js.DeeplineClient)();
|
|
779
779
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
780
780
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
781
781
|
const jsonOutput = options.json === true;
|
|
@@ -799,7 +799,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
799
799
|
query,
|
|
800
800
|
mode
|
|
801
801
|
}) : null;
|
|
802
|
-
|
|
802
|
+
_chunkEV3OPDHFjs.printCommandEnvelope.call(void 0,
|
|
803
803
|
{
|
|
804
804
|
tools: outputTools,
|
|
805
805
|
count: outputTools.length,
|
|
@@ -817,7 +817,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
817
817
|
} : {},
|
|
818
818
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
819
819
|
},
|
|
820
|
-
{ json: options.json ||
|
|
820
|
+
{ json: options.json || _chunkEV3OPDHFjs.shouldEmitJson.call(void 0, ) }
|
|
821
821
|
);
|
|
822
822
|
return 0;
|
|
823
823
|
}
|
|
@@ -872,8 +872,8 @@ function printPlayAliasToolError(toolId, play) {
|
|
|
872
872
|
console.error(playAliasToolErrorMessage(toolId, play));
|
|
873
873
|
}
|
|
874
874
|
function playLikeToolExecuteErrorMessage(toolId, tool) {
|
|
875
|
-
const playReference = tool ?
|
|
876
|
-
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${
|
|
875
|
+
const playReference = tool ? _chunkSKHUWQZEjs.playReferenceForTool.call(void 0, tool) : null;
|
|
876
|
+
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunkSKHUWQZEjs.playSearchCommandForToolId.call(void 0, toolId)}`;
|
|
877
877
|
return [
|
|
878
878
|
`${toolId} is a workflow/play entry, not an atomic provider tool.`,
|
|
879
879
|
nextStep,
|
|
@@ -913,13 +913,13 @@ Output:
|
|
|
913
913
|
activity.
|
|
914
914
|
`
|
|
915
915
|
);
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
916
|
+
_chunkZS6DT4LDjs.registerIntegrationBalanceCommand.call(void 0, tools, true);
|
|
917
|
+
_chunkZS6DT4LDjs.registerWorkspaceConnectionListCommand.call(void 0, tools, "workspace-connections", true);
|
|
918
|
+
_chunkZS6DT4LDjs.registerLegacyHubSpotMembersCommand.call(void 0, tools, true);
|
|
919
|
+
_chunkZS6DT4LDjs.registerLegacyWorkspaceConnectionCommand.call(void 0, tools, true);
|
|
920
|
+
_chunkZS6DT4LDjs.registerLegacyCalendarDelegationCommand.call(void 0, tools, true);
|
|
921
|
+
_chunkZS6DT4LDjs.registerLegacyAvailabilityCalendarsCommand.call(void 0, tools, true);
|
|
922
|
+
_chunkZS6DT4LDjs.registerIntegrationConnectCommand.call(void 0, tools, false, true);
|
|
923
923
|
tools.command("list [category]").description("Browse tool categories, or list every tool in a category.").addHelpText(
|
|
924
924
|
"after",
|
|
925
925
|
`
|
|
@@ -952,7 +952,7 @@ Examples:
|
|
|
952
952
|
json: Boolean(options.json)
|
|
953
953
|
});
|
|
954
954
|
});
|
|
955
|
-
|
|
955
|
+
_chunkFXXERR52js.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
956
956
|
tools.command("grep <query>").description(
|
|
957
957
|
"Regex grep over tool ids, descriptions, categories, and input fields."
|
|
958
958
|
).addHelpText(
|
|
@@ -987,7 +987,7 @@ Examples:
|
|
|
987
987
|
});
|
|
988
988
|
const addToolMetadataCommand = (command) => {
|
|
989
989
|
let compatibilityMetadata;
|
|
990
|
-
|
|
990
|
+
_chunkXFV353R2js.registerCompatibilityCatalog.call(void 0, command, () => ({
|
|
991
991
|
toolId: command.args[0],
|
|
992
992
|
acceptMetadata: (metadata) => {
|
|
993
993
|
compatibilityMetadata = metadata;
|
|
@@ -1057,7 +1057,7 @@ Examples:
|
|
|
1057
1057
|
process.exitCode = await narrowView();
|
|
1058
1058
|
return;
|
|
1059
1059
|
}
|
|
1060
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
1060
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-33PBWO5O.js")));
|
|
1061
1061
|
process.exitCode = await describeAnything(
|
|
1062
1062
|
toolId,
|
|
1063
1063
|
{
|
|
@@ -1072,7 +1072,7 @@ Examples:
|
|
|
1072
1072
|
});
|
|
1073
1073
|
};
|
|
1074
1074
|
addToolMetadataCommand(
|
|
1075
|
-
|
|
1075
|
+
_chunkG2H6SQQYjs.addDescribeOptions.call(void 0,
|
|
1076
1076
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
1077
1077
|
{ json: false }
|
|
1078
1078
|
)
|
|
@@ -1141,7 +1141,7 @@ Examples:
|
|
|
1141
1141
|
options,
|
|
1142
1142
|
void 0,
|
|
1143
1143
|
true,
|
|
1144
|
-
|
|
1144
|
+
_chunk636GD4IRjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
1145
1145
|
);
|
|
1146
1146
|
}
|
|
1147
1147
|
);
|
|
@@ -1149,13 +1149,13 @@ Examples:
|
|
|
1149
1149
|
function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
1150
1150
|
let metadata;
|
|
1151
1151
|
const startedAt = performance.now();
|
|
1152
|
-
const baseUrl =
|
|
1153
|
-
|
|
1154
|
-
const result =
|
|
1152
|
+
const baseUrl = _chunkAO56MZ7Djs.resolveConfig.call(void 0, ).baseUrl;
|
|
1153
|
+
_chunk636GD4IRjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1154
|
+
const result = _chunkXFV353R2js.runToolExecuteStage.call(void 0,
|
|
1155
1155
|
"SDK compatibility",
|
|
1156
|
-
() =>
|
|
1156
|
+
() => _chunkG4WPDCXAjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1157
1157
|
command: "tools execute",
|
|
1158
|
-
skillsVersion:
|
|
1158
|
+
skillsVersion: _chunkAO56MZ7Djs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
1159
1159
|
persistCache: false,
|
|
1160
1160
|
timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
|
|
1161
1161
|
catalog: {
|
|
@@ -1169,7 +1169,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1169
1169
|
})
|
|
1170
1170
|
).then(
|
|
1171
1171
|
(compatibility) => {
|
|
1172
|
-
|
|
1172
|
+
_chunk636GD4IRjs.recordCliTrace.call(void 0, {
|
|
1173
1173
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1174
1174
|
ms: performance.now() - startedAt,
|
|
1175
1175
|
ok: compatibility.error === null,
|
|
@@ -1178,7 +1178,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1178
1178
|
return compatibility;
|
|
1179
1179
|
},
|
|
1180
1180
|
(error) => {
|
|
1181
|
-
|
|
1181
|
+
_chunk636GD4IRjs.recordCliTrace.call(void 0, {
|
|
1182
1182
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1183
1183
|
ms: performance.now() - startedAt,
|
|
1184
1184
|
ok: false
|
|
@@ -1193,7 +1193,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1193
1193
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1194
1194
|
return 1;
|
|
1195
1195
|
}
|
|
1196
|
-
const client = new (0,
|
|
1196
|
+
const client = new (0, _chunkYNAXKA23js.DeeplineClient)();
|
|
1197
1197
|
let tool;
|
|
1198
1198
|
try {
|
|
1199
1199
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1252,12 +1252,12 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1252
1252
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1253
1253
|
if (inferenceQuote)
|
|
1254
1254
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1255
|
-
|
|
1255
|
+
_chunkEV3OPDHFjs.printCommandEnvelope.call(void 0,
|
|
1256
1256
|
{
|
|
1257
1257
|
toolId: String(tool.toolId || toolId),
|
|
1258
|
-
cost:
|
|
1258
|
+
cost: _chunkSKHUWQZEjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1259
1259
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1260
|
-
...
|
|
1260
|
+
..._chunkSKHUWQZEjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunkSKHUWQZEjs.recordField.call(void 0, tool, "pricing") } : {},
|
|
1261
1261
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1262
1262
|
},
|
|
1263
1263
|
{
|
|
@@ -1268,14 +1268,14 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1268
1268
|
);
|
|
1269
1269
|
return 0;
|
|
1270
1270
|
}
|
|
1271
|
-
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !
|
|
1272
|
-
const contract =
|
|
1271
|
+
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunkSKHUWQZEjs.isMonitorTypeTool.call(void 0, tool) && !_chunkSKHUWQZEjs.isMonitorVariantIndex.call(void 0, tool) && !_chunkSKHUWQZEjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
|
|
1272
|
+
const contract = _chunkSKHUWQZEjs.toolContractJsonForDescribe.call(void 0,
|
|
1273
1273
|
tool,
|
|
1274
1274
|
toolId,
|
|
1275
1275
|
void 0,
|
|
1276
1276
|
seedToolListScript
|
|
1277
1277
|
);
|
|
1278
|
-
|
|
1278
|
+
_chunkEV3OPDHFjs.printCompactJson.call(void 0, {
|
|
1279
1279
|
toolId: contract.toolId,
|
|
1280
1280
|
...options.schemaOnly ? {
|
|
1281
1281
|
inputSchema: contract.inputSchema,
|
|
@@ -1298,8 +1298,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1298
1298
|
return 0;
|
|
1299
1299
|
}
|
|
1300
1300
|
if (options.contractJson) {
|
|
1301
|
-
|
|
1302
|
-
...
|
|
1301
|
+
_chunkEV3OPDHFjs.printCompactJson.call(void 0, {
|
|
1302
|
+
..._chunkSKHUWQZEjs.toolContractJsonForDescribe.call(void 0,
|
|
1303
1303
|
tool,
|
|
1304
1304
|
toolId,
|
|
1305
1305
|
void 0,
|
|
@@ -1312,8 +1312,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1312
1312
|
}
|
|
1313
1313
|
const emitJson = options.json === true;
|
|
1314
1314
|
if (emitJson) {
|
|
1315
|
-
|
|
1316
|
-
...
|
|
1315
|
+
_chunkEV3OPDHFjs.printCompactJson.call(void 0, {
|
|
1316
|
+
..._chunkSKHUWQZEjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
|
|
1317
1317
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1318
1318
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1319
1319
|
});
|
|
@@ -1338,7 +1338,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1338
1338
|
printCompactToolContract(tool, toolId);
|
|
1339
1339
|
if (modelDescription) {
|
|
1340
1340
|
process.stdout.write(`
|
|
1341
|
-
${
|
|
1341
|
+
${_chunkSKHUWQZEjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1342
1342
|
}
|
|
1343
1343
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1344
1344
|
return 0;
|
|
@@ -1346,7 +1346,7 @@ ${_chunkXMBTAPHRjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
|
1346
1346
|
printCompactToolContract(tool, toolId);
|
|
1347
1347
|
if (modelDescription) {
|
|
1348
1348
|
process.stdout.write(`
|
|
1349
|
-
${
|
|
1349
|
+
${_chunkSKHUWQZEjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1350
1350
|
}
|
|
1351
1351
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1352
1352
|
return 0;
|
|
@@ -1363,10 +1363,10 @@ function printInferenceQuoteSummary(quote) {
|
|
|
1363
1363
|
for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
|
|
1364
1364
|
}
|
|
1365
1365
|
function printMonitorTypeFilters(tool) {
|
|
1366
|
-
const schema =
|
|
1367
|
-
const properties =
|
|
1366
|
+
const schema = _chunkSKHUWQZEjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
|
|
1367
|
+
const properties = _chunkSKHUWQZEjs.recordField.call(void 0, schema, "properties");
|
|
1368
1368
|
const required = new Set(
|
|
1369
|
-
|
|
1369
|
+
_chunkSKHUWQZEjs.arrayField.call(void 0, schema, "required").filter(
|
|
1370
1370
|
(v) => typeof v === "string"
|
|
1371
1371
|
)
|
|
1372
1372
|
);
|
|
@@ -1377,24 +1377,24 @@ function printMonitorTypeFilters(tool) {
|
|
|
1377
1377
|
}
|
|
1378
1378
|
console.log("Deploy filters (set in the monitor payload):");
|
|
1379
1379
|
for (const name of names) {
|
|
1380
|
-
const field =
|
|
1380
|
+
const field = _chunkSKHUWQZEjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
|
|
1381
1381
|
const star = required.has(name) ? "*" : "";
|
|
1382
|
-
const enumVals =
|
|
1382
|
+
const enumVals = _chunkSKHUWQZEjs.arrayField.call(void 0, field, "enum").filter(
|
|
1383
1383
|
(v) => typeof v === "string"
|
|
1384
1384
|
);
|
|
1385
|
-
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` :
|
|
1386
|
-
const desc =
|
|
1385
|
+
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunkSKHUWQZEjs.stringField.call(void 0, field, "type") || "string";
|
|
1386
|
+
const desc = _chunkSKHUWQZEjs.stringField.call(void 0, field, "description");
|
|
1387
1387
|
console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
1390
|
function printMonitorTypeFilterExamples(tool) {
|
|
1391
|
-
const documentation =
|
|
1392
|
-
const fields =
|
|
1391
|
+
const documentation = _chunkSKHUWQZEjs.recordField.call(void 0, tool, "documentation");
|
|
1392
|
+
const fields = _chunkSKHUWQZEjs.recordField.call(void 0, documentation, "fields");
|
|
1393
1393
|
const examples = Object.entries(fields).flatMap(([name, rawField]) => {
|
|
1394
|
-
const grammar =
|
|
1395
|
-
const example =
|
|
1394
|
+
const grammar = _chunkSKHUWQZEjs.recordField.call(void 0, _chunkSKHUWQZEjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
|
|
1395
|
+
const example = _chunkSKHUWQZEjs.stringField.call(void 0, grammar, "example");
|
|
1396
1396
|
const values = [
|
|
1397
|
-
...
|
|
1397
|
+
..._chunkSKHUWQZEjs.arrayField.call(void 0, grammar, "examples").filter(
|
|
1398
1398
|
(value) => typeof value === "string" && Boolean(value)
|
|
1399
1399
|
),
|
|
1400
1400
|
...example ? [example] : []
|
|
@@ -1409,21 +1409,21 @@ function printMonitorTypeFilterExamples(tool) {
|
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
1411
|
function printMonitorTypeStreams(tool) {
|
|
1412
|
-
const streams =
|
|
1413
|
-
|
|
1412
|
+
const streams = _chunkSKHUWQZEjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
|
|
1413
|
+
_chunkSKHUWQZEjs.isRecord
|
|
1414
1414
|
);
|
|
1415
1415
|
if (!streams.length) return;
|
|
1416
1416
|
console.log("");
|
|
1417
1417
|
console.log("Filter columns (a play's sqlListeners.where, per stream):");
|
|
1418
1418
|
for (const stream of streams) {
|
|
1419
|
-
const name =
|
|
1420
|
-
const cols =
|
|
1419
|
+
const name = _chunkSKHUWQZEjs.stringField.call(void 0, stream, "stream");
|
|
1420
|
+
const cols = _chunkSKHUWQZEjs.arrayField.call(void 0, stream, "columns").filter(_chunkSKHUWQZEjs.isRecord).map((col) => _chunkSKHUWQZEjs.stringField.call(void 0, col, "name")).filter(Boolean);
|
|
1421
1421
|
console.log(`- ${name}: ${cols.join(", ")}`);
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
1424
|
function monitorTypePricingLines(tool) {
|
|
1425
|
-
const pricing =
|
|
1426
|
-
const byType =
|
|
1425
|
+
const pricing = _chunkSKHUWQZEjs.recordField.call(void 0, tool, "pricing");
|
|
1426
|
+
const byType = _chunkSKHUWQZEjs.recordField.call(void 0,
|
|
1427
1427
|
pricing,
|
|
1428
1428
|
"pricing_by_radar_type",
|
|
1429
1429
|
"pricingByRadarType"
|
|
@@ -1434,9 +1434,9 @@ function monitorTypePricingLines(tool) {
|
|
|
1434
1434
|
}
|
|
1435
1435
|
const lines = ["Pricing (Deepline credits per accepted event):"];
|
|
1436
1436
|
for (const key of keys) {
|
|
1437
|
-
const entry =
|
|
1437
|
+
const entry = _chunkSKHUWQZEjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
|
|
1438
1438
|
const credits = numberField(entry, "deepline_credits", "deeplineCredits");
|
|
1439
|
-
const display =
|
|
1439
|
+
const display = _chunkSKHUWQZEjs.stringField.call(void 0, entry, "display");
|
|
1440
1440
|
const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "not listed");
|
|
1441
1441
|
lines.push(`- ${key}: ${shown}`);
|
|
1442
1442
|
}
|
|
@@ -1446,20 +1446,20 @@ function printMonitorTypePricing(tool) {
|
|
|
1446
1446
|
for (const line of monitorTypePricingLines(tool)) console.log(line);
|
|
1447
1447
|
}
|
|
1448
1448
|
function printMonitorTypeDeploy(tool) {
|
|
1449
|
-
const deploy =
|
|
1450
|
-
const toolId =
|
|
1451
|
-
const example =
|
|
1449
|
+
const deploy = _chunkSKHUWQZEjs.recordField.call(void 0, tool, "deploy");
|
|
1450
|
+
const toolId = _chunkSKHUWQZEjs.stringField.call(void 0, tool, "toolId");
|
|
1451
|
+
const example = _chunkSKHUWQZEjs.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
|
|
1452
1452
|
console.log("Deploy (a monitor type is deployed, not executed):");
|
|
1453
1453
|
console.log(` ${example}`);
|
|
1454
1454
|
}
|
|
1455
1455
|
function printMonitorTypeContract(tool, requestedToolId) {
|
|
1456
|
-
const toolId =
|
|
1456
|
+
const toolId = _chunkSKHUWQZEjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
|
|
1457
1457
|
console.log(toolId);
|
|
1458
|
-
const displayName =
|
|
1458
|
+
const displayName = _chunkSKHUWQZEjs.stringField.call(void 0, tool, "displayName");
|
|
1459
1459
|
if (displayName) console.log(`Best for: ${displayName}`);
|
|
1460
|
-
const description =
|
|
1460
|
+
const description = _chunkSKHUWQZEjs.stringField.call(void 0, tool, "description");
|
|
1461
1461
|
if (description) console.log(`Description: ${description}`);
|
|
1462
|
-
const categories =
|
|
1462
|
+
const categories = _chunkSKHUWQZEjs.arrayField.call(void 0, tool, "categories").filter(
|
|
1463
1463
|
(v) => typeof v === "string"
|
|
1464
1464
|
);
|
|
1465
1465
|
if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
|
|
@@ -1479,31 +1479,31 @@ function printMonitorTypeContract(tool, requestedToolId) {
|
|
|
1479
1479
|
console.log(`More: deepline describe ${toolId}`);
|
|
1480
1480
|
}
|
|
1481
1481
|
function toolGuidanceLines(guidance) {
|
|
1482
|
-
const record =
|
|
1483
|
-
const toolGuidance =
|
|
1484
|
-
const providerGuidance =
|
|
1482
|
+
const record = _chunkSKHUWQZEjs.isRecord.call(void 0, guidance) ? guidance : {};
|
|
1483
|
+
const toolGuidance = _chunkSKHUWQZEjs.stringField.call(void 0, record, "tool");
|
|
1484
|
+
const providerGuidance = _chunkSKHUWQZEjs.stringField.call(void 0, record, "provider");
|
|
1485
1485
|
return [
|
|
1486
1486
|
...toolGuidance ? [`- This tool: ${toolGuidance}`] : [],
|
|
1487
1487
|
...providerGuidance ? [`- Provider: ${providerGuidance}`] : []
|
|
1488
1488
|
];
|
|
1489
1489
|
}
|
|
1490
1490
|
function printCompactToolContract(tool, requestedToolId) {
|
|
1491
|
-
if (
|
|
1491
|
+
if (_chunkSKHUWQZEjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1492
1492
|
printMonitorTypeContract(tool, requestedToolId);
|
|
1493
1493
|
return;
|
|
1494
1494
|
}
|
|
1495
|
-
const contract =
|
|
1495
|
+
const contract = _chunkSKHUWQZEjs.toolContractJsonForDescribe.call(void 0,
|
|
1496
1496
|
tool,
|
|
1497
1497
|
requestedToolId,
|
|
1498
1498
|
void 0,
|
|
1499
1499
|
seedToolListScript
|
|
1500
1500
|
);
|
|
1501
|
-
const cost =
|
|
1502
|
-
const getters =
|
|
1501
|
+
const cost = _chunkSKHUWQZEjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
|
|
1502
|
+
const getters = _chunkSKHUWQZEjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1503
1503
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1504
1504
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1505
|
-
const inputFields =
|
|
1506
|
-
|
|
1505
|
+
const inputFields = _chunkSKHUWQZEjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1506
|
+
_chunkSKHUWQZEjs.recordField.call(void 0, contract, "inputSchema")
|
|
1507
1507
|
);
|
|
1508
1508
|
console.log(String(contract.toolId));
|
|
1509
1509
|
if (contract.displayName) console.log(`Best for: ${contract.displayName}`);
|
|
@@ -1520,9 +1520,9 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1520
1520
|
printToolOutputArrayShape(contract);
|
|
1521
1521
|
printToolExecutionHints(contract);
|
|
1522
1522
|
if (contract.deprecated === true) {
|
|
1523
|
-
const deprecation =
|
|
1524
|
-
const message =
|
|
1525
|
-
const replacementToolId =
|
|
1523
|
+
const deprecation = _chunkSKHUWQZEjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
|
|
1524
|
+
const message = _chunkSKHUWQZEjs.stringField.call(void 0, deprecation, "message");
|
|
1525
|
+
const replacementToolId = _chunkSKHUWQZEjs.stringField.call(void 0,
|
|
1526
1526
|
deprecation,
|
|
1527
1527
|
"replacementToolId",
|
|
1528
1528
|
"replacement_tool_id"
|
|
@@ -1545,12 +1545,12 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1545
1545
|
console.log("");
|
|
1546
1546
|
console.log("Inputs:");
|
|
1547
1547
|
for (const field of inputFields) {
|
|
1548
|
-
if (!
|
|
1549
|
-
const name =
|
|
1548
|
+
if (!_chunkSKHUWQZEjs.isRecord.call(void 0, field)) continue;
|
|
1549
|
+
const name = _chunkSKHUWQZEjs.stringField.call(void 0, field, "name");
|
|
1550
1550
|
if (!name) continue;
|
|
1551
1551
|
const required = field.required ? "*" : "";
|
|
1552
|
-
const type =
|
|
1553
|
-
const description =
|
|
1552
|
+
const type = _chunkSKHUWQZEjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1553
|
+
const description = _chunkSKHUWQZEjs.stringField.call(void 0, field, "description");
|
|
1554
1554
|
const enumValues = Array.isArray(field.enum) ? field.enum : [];
|
|
1555
1555
|
const enumSuffix = enumValues.length ? ` enum=${enumValues.map(String).join("|")}` : "";
|
|
1556
1556
|
const itemBoundsSuffix = arrayItemBoundsSuffix(field);
|
|
@@ -1565,8 +1565,8 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
console.log("");
|
|
1567
1567
|
printToolExamplesOnly(tool, requestedToolId);
|
|
1568
|
-
const starterScript =
|
|
1569
|
-
const starterPath =
|
|
1568
|
+
const starterScript = _chunkSKHUWQZEjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
|
|
1569
|
+
const starterPath = _chunkSKHUWQZEjs.stringField.call(void 0, starterScript, "path");
|
|
1570
1570
|
if (starterPath) {
|
|
1571
1571
|
console.log("");
|
|
1572
1572
|
console.log(`Starter script: ${starterPath}`);
|
|
@@ -1577,16 +1577,16 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1577
1577
|
console.log("Getters:");
|
|
1578
1578
|
if (listGetters.length) console.log(listGetterHeading());
|
|
1579
1579
|
for (const entry of listGetters) {
|
|
1580
|
-
if (
|
|
1580
|
+
if (_chunkSKHUWQZEjs.isRecord.call(void 0, entry))
|
|
1581
1581
|
console.log(
|
|
1582
|
-
`- ${
|
|
1582
|
+
`- ${_chunkSKHUWQZEjs.stringField.call(void 0, entry, "name")}: ${_chunkSKHUWQZEjs.playResultExpression.call(void 0, entry)}`
|
|
1583
1583
|
);
|
|
1584
1584
|
}
|
|
1585
1585
|
if (valueGetters.length) console.log("Values:");
|
|
1586
1586
|
for (const entry of valueGetters) {
|
|
1587
|
-
if (
|
|
1587
|
+
if (_chunkSKHUWQZEjs.isRecord.call(void 0, entry))
|
|
1588
1588
|
console.log(
|
|
1589
|
-
`- ${
|
|
1589
|
+
`- ${_chunkSKHUWQZEjs.stringField.call(void 0, entry, "name")}: ${_chunkSKHUWQZEjs.playResultExpression.call(void 0, entry)}`
|
|
1590
1590
|
);
|
|
1591
1591
|
}
|
|
1592
1592
|
}
|
|
@@ -1597,22 +1597,22 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1597
1597
|
console.log(`More: deepline describe ${contract.toolId}`);
|
|
1598
1598
|
}
|
|
1599
1599
|
function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
1600
|
-
if (
|
|
1600
|
+
if (_chunkSKHUWQZEjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1601
1601
|
return monitorTypePricingLines(tool);
|
|
1602
1602
|
}
|
|
1603
1603
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1604
|
-
const cost =
|
|
1605
|
-
const pricingModel =
|
|
1606
|
-
const billing =
|
|
1607
|
-
const explicitUnit =
|
|
1604
|
+
const cost = _chunkSKHUWQZEjs.Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1605
|
+
const pricingModel = _chunkSKHUWQZEjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
|
|
1606
|
+
const billing = _chunkSKHUWQZEjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunkSKHUWQZEjs.stringField.call(void 0, cost, "billingSource") || _chunkSKHUWQZEjs.stringField.call(void 0, cost, "billingMode") || "unknown";
|
|
1607
|
+
const explicitUnit = _chunkSKHUWQZEjs.stringField.call(void 0, cost, "unit");
|
|
1608
1608
|
const unit = explicitUnit || (pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit");
|
|
1609
1609
|
const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
|
|
1610
1610
|
const usd = numberField(cost, "deeplineUsdPerPricingUnit");
|
|
1611
|
-
const displayText =
|
|
1612
|
-
const summary =
|
|
1611
|
+
const displayText = _chunkSKHUWQZEjs.stringField.call(void 0, cost, "displayText");
|
|
1612
|
+
const summary = _chunkSKHUWQZEjs.stringField.call(void 0, cost, "summary");
|
|
1613
1613
|
const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
|
|
1614
1614
|
const reference = cost.observedReference;
|
|
1615
|
-
const observedMax =
|
|
1615
|
+
const observedMax = _chunkSKHUWQZEjs.observedMaxText.call(void 0, cost);
|
|
1616
1616
|
return [
|
|
1617
1617
|
`${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
|
|
1618
1618
|
...observedMax ? [` ${observedMax}`] : [],
|
|
@@ -1629,19 +1629,19 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
|
1629
1629
|
console.log(line);
|
|
1630
1630
|
}
|
|
1631
1631
|
function printToolSchemaOnly(tool, requestedToolId) {
|
|
1632
|
-
if (
|
|
1632
|
+
if (_chunkSKHUWQZEjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1633
1633
|
printMonitorTypeFilters(tool);
|
|
1634
1634
|
printMonitorTypeStreams(tool);
|
|
1635
1635
|
return;
|
|
1636
1636
|
}
|
|
1637
|
-
const contract =
|
|
1637
|
+
const contract = _chunkSKHUWQZEjs.toolContractJsonForDescribe.call(void 0,
|
|
1638
1638
|
tool,
|
|
1639
1639
|
requestedToolId,
|
|
1640
1640
|
void 0,
|
|
1641
1641
|
seedToolListScript
|
|
1642
1642
|
);
|
|
1643
|
-
const inputFields =
|
|
1644
|
-
|
|
1643
|
+
const inputFields = _chunkSKHUWQZEjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1644
|
+
_chunkSKHUWQZEjs.recordField.call(void 0, contract, "inputSchema")
|
|
1645
1645
|
);
|
|
1646
1646
|
console.log(`Schema: ${contract.toolId}`);
|
|
1647
1647
|
if (!inputFields.length) {
|
|
@@ -1668,37 +1668,37 @@ function printToolSchemaOnly(tool, requestedToolId) {
|
|
|
1668
1668
|
}
|
|
1669
1669
|
printToolOutputArrayShape(contract);
|
|
1670
1670
|
const declaredSchema = declaredToolJsonSchema(
|
|
1671
|
-
|
|
1671
|
+
_chunkSKHUWQZEjs.recordField.call(void 0, contract, "inputSchema")
|
|
1672
1672
|
);
|
|
1673
1673
|
if (declaredSchema) {
|
|
1674
1674
|
console.log("Declared input JSON Schema:");
|
|
1675
1675
|
console.log(JSON.stringify(declaredSchema, null, 2));
|
|
1676
1676
|
}
|
|
1677
|
-
if (
|
|
1677
|
+
if (_chunkSKHUWQZEjs.isRecord.call(void 0, contract.responseSchema)) {
|
|
1678
1678
|
console.log("Deepline execution response JSON Schema:");
|
|
1679
1679
|
console.log(JSON.stringify(contract.responseSchema, null, 2));
|
|
1680
1680
|
}
|
|
1681
1681
|
}
|
|
1682
1682
|
function printToolExamplesOnly(tool, requestedToolId) {
|
|
1683
|
-
if (
|
|
1683
|
+
if (_chunkSKHUWQZEjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1684
1684
|
printMonitorTypeDeploy(tool);
|
|
1685
1685
|
return;
|
|
1686
1686
|
}
|
|
1687
|
-
if (
|
|
1687
|
+
if (_chunkSKHUWQZEjs.isMonitorVariantIndex.call(void 0, tool)) {
|
|
1688
1688
|
console.log(
|
|
1689
1689
|
`${requestedToolId} is deployed as one monitor type per radar type. Describe one for its example:`
|
|
1690
1690
|
);
|
|
1691
|
-
for (const variant of
|
|
1692
|
-
const describeCommand =
|
|
1691
|
+
for (const variant of _chunkSKHUWQZEjs.arrayField.call(void 0, tool, "variants").filter(_chunkSKHUWQZEjs.isRecord)) {
|
|
1692
|
+
const describeCommand = _chunkSKHUWQZEjs.stringField.call(void 0, variant, "describeCommand");
|
|
1693
1693
|
if (describeCommand) console.log(` ${describeCommand}`);
|
|
1694
1694
|
}
|
|
1695
1695
|
return;
|
|
1696
1696
|
}
|
|
1697
|
-
if (
|
|
1697
|
+
if (_chunkSKHUWQZEjs.isPlayLikeTool.call(void 0, tool)) {
|
|
1698
1698
|
printPlayLikeToolUsage(tool, requestedToolId);
|
|
1699
1699
|
return;
|
|
1700
1700
|
}
|
|
1701
|
-
const contract =
|
|
1701
|
+
const contract = _chunkSKHUWQZEjs.toolContractJsonForDescribe.call(void 0,
|
|
1702
1702
|
tool,
|
|
1703
1703
|
requestedToolId,
|
|
1704
1704
|
void 0,
|
|
@@ -1706,9 +1706,9 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1706
1706
|
);
|
|
1707
1707
|
const toolId = String(contract.toolId);
|
|
1708
1708
|
const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
|
|
1709
|
-
const examples =
|
|
1709
|
+
const examples = _chunkSKHUWQZEjs.arrayField.call(void 0, tool, "examples").filter(_chunkSKHUWQZEjs.isRecord);
|
|
1710
1710
|
const firstExample = examples[0];
|
|
1711
|
-
const sampleInput = firstExample &&
|
|
1711
|
+
const sampleInput = firstExample && _chunkSKHUWQZEjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunkSKHUWQZEjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunkSKHUWQZEjs.samplePayloadForInputFields.call(void 0, inputFields)));
|
|
1712
1712
|
console.log("Example input payload:");
|
|
1713
1713
|
console.log(JSON.stringify(sampleInput, null, 2));
|
|
1714
1714
|
console.log(`Use in a play:`);
|
|
@@ -1722,32 +1722,32 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1722
1722
|
);
|
|
1723
1723
|
console.log("});");
|
|
1724
1724
|
console.log("const response = result.toolResponse.rawV2;");
|
|
1725
|
-
const getters =
|
|
1725
|
+
const getters = _chunkSKHUWQZEjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1726
1726
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1727
1727
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1728
|
-
const firstGetter = valueGetters.find(
|
|
1728
|
+
const firstGetter = valueGetters.find(_chunkSKHUWQZEjs.isRecord);
|
|
1729
1729
|
if (firstGetter) {
|
|
1730
|
-
const name =
|
|
1731
|
-
const expression =
|
|
1730
|
+
const name = _chunkSKHUWQZEjs.stringField.call(void 0, firstGetter, "name") || "value";
|
|
1731
|
+
const expression = _chunkSKHUWQZEjs.stringField.call(void 0, firstGetter, "expression");
|
|
1732
1732
|
if (expression)
|
|
1733
1733
|
console.log(
|
|
1734
1734
|
`const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
|
|
1735
1735
|
);
|
|
1736
1736
|
}
|
|
1737
1737
|
const arrayNames = new Set(
|
|
1738
|
-
|
|
1739
|
-
|
|
1738
|
+
_chunkSKHUWQZEjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1739
|
+
_chunkSKHUWQZEjs.recordField.call(void 0, tool, "outputSchema", "output_schema")
|
|
1740
1740
|
).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
|
|
1741
1741
|
);
|
|
1742
1742
|
const firstList = _nullishCoalesce(listGetters.find(
|
|
1743
|
-
(entry) =>
|
|
1744
|
-
), () => ( listGetters.find(
|
|
1745
|
-
if (
|
|
1746
|
-
const name = safeIdentifier(
|
|
1743
|
+
(entry) => _chunkSKHUWQZEjs.isRecord.call(void 0, entry) && arrayNames.has(_chunkSKHUWQZEjs.stringField.call(void 0, entry, "name"))
|
|
1744
|
+
), () => ( listGetters.find(_chunkSKHUWQZEjs.isRecord)));
|
|
1745
|
+
if (_chunkSKHUWQZEjs.isRecord.call(void 0, firstList)) {
|
|
1746
|
+
const name = safeIdentifier(_chunkSKHUWQZEjs.stringField.call(void 0, firstList, "name") || "list");
|
|
1747
1747
|
if (_chunkJ33TSWO5js.playToolListGetterMode.call(void 0, ) === "array") {
|
|
1748
|
-
console.log(`const ${name}_rows = ${
|
|
1748
|
+
console.log(`const ${name}_rows = ${_chunkSKHUWQZEjs.playResultExpression.call(void 0, firstList)};`);
|
|
1749
1749
|
} else {
|
|
1750
|
-
console.log(`const ${name}_ds = ${
|
|
1750
|
+
console.log(`const ${name}_ds = ${_chunkSKHUWQZEjs.playResultExpression.call(void 0, firstList)};`);
|
|
1751
1751
|
console.log(
|
|
1752
1752
|
"// Complete small list from this response; throws above the memory cap."
|
|
1753
1753
|
);
|
|
@@ -1757,7 +1757,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1757
1757
|
console.log("```");
|
|
1758
1758
|
if (firstList) printListGetterConsumption();
|
|
1759
1759
|
for (const example of examples) {
|
|
1760
|
-
const description =
|
|
1760
|
+
const description = _chunkSKHUWQZEjs.stringField.call(void 0, example, "description");
|
|
1761
1761
|
if (description) console.log(description);
|
|
1762
1762
|
console.log("Example Deepline execution response:");
|
|
1763
1763
|
console.log(JSON.stringify(example.response, null, 2));
|
|
@@ -1772,14 +1772,14 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1772
1772
|
}
|
|
1773
1773
|
function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
1774
1774
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1775
|
-
const inputFields =
|
|
1776
|
-
|
|
1775
|
+
const inputFields = _chunkSKHUWQZEjs.toolInputFieldsForDisplay.call(void 0,
|
|
1776
|
+
_chunkSKHUWQZEjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
|
|
1777
1777
|
);
|
|
1778
|
-
const sampleInput =
|
|
1779
|
-
const playReference =
|
|
1778
|
+
const sampleInput = _chunkSKHUWQZEjs.samplePayloadForInputFields.call(void 0, inputFields);
|
|
1779
|
+
const playReference = _chunkSKHUWQZEjs.playReferenceForTool.call(void 0, tool);
|
|
1780
1780
|
console.log("Run as a play:");
|
|
1781
1781
|
console.log(
|
|
1782
|
-
|
|
1782
|
+
_chunkSKHUWQZEjs.playRunCommandForTool.call(void 0,
|
|
1783
1783
|
tool,
|
|
1784
1784
|
toolId,
|
|
1785
1785
|
Object.keys(sampleInput).length ? sampleInput : void 0
|
|
@@ -1790,13 +1790,13 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
|
1790
1790
|
}
|
|
1791
1791
|
}
|
|
1792
1792
|
function printToolGettersOnly(tool, requestedToolId) {
|
|
1793
|
-
const contract =
|
|
1793
|
+
const contract = _chunkSKHUWQZEjs.toolContractJsonForDescribe.call(void 0,
|
|
1794
1794
|
tool,
|
|
1795
1795
|
requestedToolId,
|
|
1796
1796
|
void 0,
|
|
1797
1797
|
seedToolListScript
|
|
1798
1798
|
);
|
|
1799
|
-
const getters =
|
|
1799
|
+
const getters = _chunkSKHUWQZEjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1800
1800
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1801
1801
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1802
1802
|
console.log(`Getters: ${contract.toolId}`);
|
|
@@ -1807,9 +1807,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1807
1807
|
if (listGetters.length) {
|
|
1808
1808
|
console.log(listGetterHeading());
|
|
1809
1809
|
for (const entry of listGetters) {
|
|
1810
|
-
if (
|
|
1810
|
+
if (_chunkSKHUWQZEjs.isRecord.call(void 0, entry))
|
|
1811
1811
|
console.log(
|
|
1812
|
-
`- ${
|
|
1812
|
+
`- ${_chunkSKHUWQZEjs.stringField.call(void 0, entry, "name")}: ${_chunkSKHUWQZEjs.playResultExpression.call(void 0, entry)}`
|
|
1813
1813
|
);
|
|
1814
1814
|
}
|
|
1815
1815
|
printListGetterConsumption();
|
|
@@ -1817,9 +1817,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1817
1817
|
if (valueGetters.length) {
|
|
1818
1818
|
console.log("Values:");
|
|
1819
1819
|
for (const entry of valueGetters) {
|
|
1820
|
-
if (
|
|
1820
|
+
if (_chunkSKHUWQZEjs.isRecord.call(void 0, entry))
|
|
1821
1821
|
console.log(
|
|
1822
|
-
`- ${
|
|
1822
|
+
`- ${_chunkSKHUWQZEjs.stringField.call(void 0, entry, "name")}: ${_chunkSKHUWQZEjs.playResultExpression.call(void 0, entry)}`
|
|
1823
1823
|
);
|
|
1824
1824
|
}
|
|
1825
1825
|
}
|
|
@@ -1857,22 +1857,22 @@ function listedToolDescription(tool) {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
function formatListedToolCost(tool) {
|
|
1859
1859
|
const record = tool;
|
|
1860
|
-
const pricing =
|
|
1861
|
-
const displayText =
|
|
1862
|
-
if (
|
|
1860
|
+
const pricing = _chunkSKHUWQZEjs.recordField.call(void 0, record, "pricing");
|
|
1861
|
+
const displayText = _chunkSKHUWQZEjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
1862
|
+
if (_chunkSKHUWQZEjs.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
|
|
1863
1863
|
return `Cost: ${displayText || "Free"}`;
|
|
1864
1864
|
}
|
|
1865
1865
|
return displayText ? `Cost: ${displayText}` : "";
|
|
1866
1866
|
}
|
|
1867
1867
|
function printToolOutputArrayShape(tool) {
|
|
1868
|
-
const outputFields =
|
|
1869
|
-
|
|
1868
|
+
const outputFields = _chunkSKHUWQZEjs.toolOutputFieldsForDisplay.call(void 0,
|
|
1869
|
+
_chunkSKHUWQZEjs.recordField.call(void 0, _chunkSKHUWQZEjs.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
|
|
1870
1870
|
);
|
|
1871
1871
|
if (outputFields.length === 0) return;
|
|
1872
1872
|
console.log(" Output array shape (declared schema):");
|
|
1873
1873
|
for (const field of outputFields.slice(0, 60)) {
|
|
1874
1874
|
const name = String(field.name);
|
|
1875
|
-
const type =
|
|
1875
|
+
const type = _chunkSKHUWQZEjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1876
1876
|
const itemBounds = arrayItemBoundsSuffix(field);
|
|
1877
1877
|
console.log(` - ${name}: ${type}${itemBounds}`);
|
|
1878
1878
|
}
|
|
@@ -1881,14 +1881,14 @@ function printToolOutputArrayShape(tool) {
|
|
|
1881
1881
|
}
|
|
1882
1882
|
}
|
|
1883
1883
|
function declaredToolJsonSchema(inputSchema) {
|
|
1884
|
-
if (
|
|
1884
|
+
if (_chunkSKHUWQZEjs.isRecord.call(void 0, inputSchema.jsonSchema)) {
|
|
1885
1885
|
return inputSchema.jsonSchema;
|
|
1886
1886
|
}
|
|
1887
1887
|
return Array.isArray(inputSchema.fields) ? null : inputSchema;
|
|
1888
1888
|
}
|
|
1889
1889
|
function arrayItemBoundsSuffix(field) {
|
|
1890
|
-
const itemSchema =
|
|
1891
|
-
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type :
|
|
1890
|
+
const itemSchema = _chunkSKHUWQZEjs.isRecord.call(void 0, field.items) ? field.items : null;
|
|
1891
|
+
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunkSKHUWQZEjs.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
|
|
1892
1892
|
const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _16 => _16.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
|
|
1893
1893
|
const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
|
|
1894
1894
|
const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
|
|
@@ -1901,21 +1901,21 @@ function arrayItemBoundsSuffix(field) {
|
|
|
1901
1901
|
return itemTypeSuffix;
|
|
1902
1902
|
}
|
|
1903
1903
|
function printToolExecutionHints(value) {
|
|
1904
|
-
const batchCapabilityRecord =
|
|
1905
|
-
|
|
1904
|
+
const batchCapabilityRecord = _chunkSKHUWQZEjs.recordField.call(void 0,
|
|
1905
|
+
_chunkSKHUWQZEjs.isRecord.call(void 0, value) ? value : {},
|
|
1906
1906
|
"batchCapability",
|
|
1907
1907
|
"batch_capability"
|
|
1908
1908
|
);
|
|
1909
1909
|
const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
|
|
1910
|
-
const executionMetadata =
|
|
1911
|
-
|
|
1910
|
+
const executionMetadata = _chunkSKHUWQZEjs.recordField.call(void 0,
|
|
1911
|
+
_chunkSKHUWQZEjs.isRecord.call(void 0, value) ? value : {},
|
|
1912
1912
|
"executionMetadata",
|
|
1913
1913
|
"execution_metadata"
|
|
1914
1914
|
);
|
|
1915
1915
|
if (batchCapability) {
|
|
1916
|
-
const status =
|
|
1917
|
-
const surface =
|
|
1918
|
-
const operation =
|
|
1916
|
+
const status = _chunkSKHUWQZEjs.stringField.call(void 0, batchCapability, "status") || "unknown";
|
|
1917
|
+
const surface = _chunkSKHUWQZEjs.stringField.call(void 0, batchCapability, "surface");
|
|
1918
|
+
const operation = _chunkSKHUWQZEjs.stringField.call(void 0,
|
|
1919
1919
|
batchCapability,
|
|
1920
1920
|
"batchOperation",
|
|
1921
1921
|
"batch_operation"
|
|
@@ -1925,7 +1925,7 @@ function printToolExecutionHints(value) {
|
|
|
1925
1925
|
"maxBatchSize",
|
|
1926
1926
|
"max_batch_size"
|
|
1927
1927
|
);
|
|
1928
|
-
const notes =
|
|
1928
|
+
const notes = _chunkSKHUWQZEjs.stringField.call(void 0, batchCapability, "notes");
|
|
1929
1929
|
console.log("");
|
|
1930
1930
|
console.log("Batching:");
|
|
1931
1931
|
console.log(`- Catalog status: ${status}${surface ? ` (${surface})` : ""}`);
|
|
@@ -1944,11 +1944,11 @@ function printToolExecutionHints(value) {
|
|
|
1944
1944
|
}
|
|
1945
1945
|
if (notes) console.log(`- Details: ${notes}`);
|
|
1946
1946
|
}
|
|
1947
|
-
const configuredRateLimits =
|
|
1947
|
+
const configuredRateLimits = _chunkSKHUWQZEjs.arrayField.call(void 0,
|
|
1948
1948
|
executionMetadata,
|
|
1949
1949
|
"configuredRateLimits",
|
|
1950
1950
|
"configured_rate_limits"
|
|
1951
|
-
).filter(
|
|
1951
|
+
).filter(_chunkSKHUWQZEjs.isRecord);
|
|
1952
1952
|
if (configuredRateLimits.length > 0) {
|
|
1953
1953
|
console.log("");
|
|
1954
1954
|
console.log(
|
|
@@ -1958,7 +1958,7 @@ function printToolExecutionHints(value) {
|
|
|
1958
1958
|
const requests = numberField(limit, "requestsPerWindow");
|
|
1959
1959
|
const windowMs = numberField(limit, "windowMs");
|
|
1960
1960
|
if (requests === null || windowMs === null) continue;
|
|
1961
|
-
const usage =
|
|
1961
|
+
const usage = _chunkSKHUWQZEjs.stringField.call(void 0, limit, "usage") || "unknown";
|
|
1962
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;
|
|
1963
1963
|
const explicitMaxConcurrency = numberField(
|
|
1964
1964
|
limit,
|
|
@@ -1967,11 +1967,11 @@ function printToolExecutionHints(value) {
|
|
|
1967
1967
|
);
|
|
1968
1968
|
const concurrencyText = explicitMaxConcurrency === null ? "no explicit concurrency limit" : `explicit concurrency limit ${explicitMaxConcurrency}`;
|
|
1969
1969
|
console.log(
|
|
1970
|
-
`- ${requests} requests per ${formatRateWindow(windowMs)}${
|
|
1970
|
+
`- ${requests} requests per ${formatRateWindow(windowMs)}${_chunkZO65VJRJjs.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
|
|
1971
1971
|
);
|
|
1972
1972
|
}
|
|
1973
1973
|
}
|
|
1974
|
-
const queueHint =
|
|
1974
|
+
const queueHint = _chunkSKHUWQZEjs.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
|
|
1975
1975
|
const requestsPerSecondHint = numberField(
|
|
1976
1976
|
queueHint,
|
|
1977
1977
|
"requestsPerSecondHint",
|
|
@@ -1997,25 +1997,25 @@ function formatRateWindow(windowMs) {
|
|
|
1997
1997
|
}
|
|
1998
1998
|
function samplePayload(samples, key) {
|
|
1999
1999
|
const entry = samples[key];
|
|
2000
|
-
if (!
|
|
2000
|
+
if (!_chunkSKHUWQZEjs.isRecord.call(void 0, entry)) return void 0;
|
|
2001
2001
|
return Object.prototype.hasOwnProperty.call(entry, "payload") ? entry.payload : entry;
|
|
2002
2002
|
}
|
|
2003
2003
|
function commandEnvelopeFromRawResponse(rawResponse) {
|
|
2004
|
-
return
|
|
2004
|
+
return _chunkSKHUWQZEjs.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
|
|
2005
2005
|
}
|
|
2006
2006
|
function toolExecuteExitCode(envelope) {
|
|
2007
2007
|
return envelope.status === "failed" || envelope.ok === false ? 1 : 0;
|
|
2008
2008
|
}
|
|
2009
2009
|
function extractToolExecutionWarningMessages(rawResponse) {
|
|
2010
|
-
if (!
|
|
2010
|
+
if (!_chunkSKHUWQZEjs.isRecord.call(void 0, rawResponse)) return [];
|
|
2011
2011
|
const candidates = [
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2012
|
+
_chunkSKHUWQZEjs.recordField.call(void 0, _chunkSKHUWQZEjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
|
|
2013
|
+
_chunkSKHUWQZEjs.recordField.call(void 0,
|
|
2014
|
+
_chunkSKHUWQZEjs.recordField.call(void 0, _chunkSKHUWQZEjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
|
|
2015
2015
|
"meta"
|
|
2016
2016
|
),
|
|
2017
|
-
|
|
2018
|
-
|
|
2017
|
+
_chunkSKHUWQZEjs.recordField.call(void 0, rawResponse, "meta"),
|
|
2018
|
+
_chunkSKHUWQZEjs.recordField.call(void 0, _chunkSKHUWQZEjs.recordField.call(void 0, rawResponse, "result"), "meta")
|
|
2019
2019
|
];
|
|
2020
2020
|
const messages = [];
|
|
2021
2021
|
for (const candidate of candidates) {
|
|
@@ -2024,8 +2024,8 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
2024
2024
|
for (const warning of warnings) {
|
|
2025
2025
|
if (typeof warning === "string" && warning.trim()) {
|
|
2026
2026
|
messages.push(warning.trim());
|
|
2027
|
-
} else if (
|
|
2028
|
-
const message =
|
|
2027
|
+
} else if (_chunkSKHUWQZEjs.isRecord.call(void 0, warning)) {
|
|
2028
|
+
const message = _chunkSKHUWQZEjs.stringField.call(void 0, warning, "message");
|
|
2029
2029
|
if (message) messages.push(message);
|
|
2030
2030
|
}
|
|
2031
2031
|
}
|
|
@@ -2033,20 +2033,20 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
2033
2033
|
return [...new Set(messages)];
|
|
2034
2034
|
}
|
|
2035
2035
|
function apifySyncRecoveryNext(rawResponse) {
|
|
2036
|
-
if (!
|
|
2037
|
-
const toolResponse =
|
|
2038
|
-
const raw =
|
|
2036
|
+
if (!_chunkSKHUWQZEjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
|
|
2037
|
+
const toolResponse = _chunkSKHUWQZEjs.recordField.call(void 0, rawResponse, "toolResponse");
|
|
2038
|
+
const raw = _chunkSKHUWQZEjs.recordField.call(void 0, toolResponse, "raw");
|
|
2039
2039
|
if (raw.state !== "awaiting_apify") return null;
|
|
2040
|
-
const next =
|
|
2041
|
-
const getActorRun =
|
|
2042
|
-
const getActorRunTool =
|
|
2043
|
-
const getActorRunPayload =
|
|
2040
|
+
const next = _chunkSKHUWQZEjs.recordField.call(void 0, raw, "next");
|
|
2041
|
+
const getActorRun = _chunkSKHUWQZEjs.recordField.call(void 0, next, "getActorRun");
|
|
2042
|
+
const getActorRunTool = _chunkSKHUWQZEjs.stringField.call(void 0, getActorRun, "tool");
|
|
2043
|
+
const getActorRunPayload = _chunkSKHUWQZEjs.recordField.call(void 0, getActorRun, "payload");
|
|
2044
2044
|
if (!getActorRunTool || Object.keys(getActorRunPayload).length === 0) {
|
|
2045
2045
|
return null;
|
|
2046
2046
|
}
|
|
2047
|
-
const getDatasetItems =
|
|
2048
|
-
const getDatasetItemsTool =
|
|
2049
|
-
const getDatasetItemsPayload =
|
|
2047
|
+
const getDatasetItems = _chunkSKHUWQZEjs.recordField.call(void 0, next, "getDatasetItems");
|
|
2048
|
+
const getDatasetItemsTool = _chunkSKHUWQZEjs.stringField.call(void 0, getDatasetItems, "tool");
|
|
2049
|
+
const getDatasetItemsPayload = _chunkSKHUWQZEjs.recordField.call(void 0, getDatasetItems, "payload");
|
|
2050
2050
|
return {
|
|
2051
2051
|
getActorRun: `deepline run ${getActorRunTool} --input ${_chunkBVXIGOBZjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
|
|
2052
2052
|
...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
|
|
@@ -2056,7 +2056,7 @@ function apifySyncRecoveryNext(rawResponse) {
|
|
|
2056
2056
|
}
|
|
2057
2057
|
function listExtractorPathsFromUsageGuidance(tool) {
|
|
2058
2058
|
const toolExecutionResult = _optionalChain([tool, 'access', _18 => _18.usageGuidance, 'optionalAccess', _19 => _19.toolExecutionResult]);
|
|
2059
|
-
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 : _chunkSKHUWQZEjs.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _21 => _21.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
|
|
2060
2060
|
return extractedLists.flatMap((entry) => {
|
|
2061
2061
|
const paths = _nullishCoalesce(_optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.candidatePaths]), () => ( _optionalChain([entry, 'access', _24 => _24.details, 'optionalAccess', _25 => _25.rawToolOutputPaths])));
|
|
2062
2062
|
if (!Array.isArray(paths)) return [];
|
|
@@ -2138,7 +2138,7 @@ function parseJsonObjectArgument(raw, flagName) {
|
|
|
2138
2138
|
}
|
|
2139
2139
|
throw invalidJsonError(flagName, message);
|
|
2140
2140
|
}
|
|
2141
|
-
if (!
|
|
2141
|
+
if (!_chunkSKHUWQZEjs.isRecord.call(void 0, parsed)) {
|
|
2142
2142
|
throw invalidJsonError(flagName, "expected an object.");
|
|
2143
2143
|
}
|
|
2144
2144
|
return parsed;
|
|
@@ -2186,7 +2186,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2186
2186
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2187
2187
|
}
|
|
2188
2188
|
if (options.idempotencyKey !== void 0) {
|
|
2189
|
-
|
|
2189
|
+
_chunk5VSHQG5Ejs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2190
2190
|
}
|
|
2191
2191
|
if (options.connection !== void 0 && (options.recover || options.idempotencyKey !== void 0)) {
|
|
2192
2192
|
throw new Error(
|
|
@@ -2325,7 +2325,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2325
2325
|
kind: summaryEntries.length > 0 ? "object" : "raw",
|
|
2326
2326
|
summary: input.summary
|
|
2327
2327
|
};
|
|
2328
|
-
const envelopeHasCanonicalOutput =
|
|
2328
|
+
const envelopeHasCanonicalOutput = _chunkSKHUWQZEjs.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
|
|
2329
2329
|
const envelopeHasDeclaredOutput = Object.prototype.hasOwnProperty.call(
|
|
2330
2330
|
envelope,
|
|
2331
2331
|
"output"
|
|
@@ -2353,7 +2353,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2353
2353
|
return {
|
|
2354
2354
|
...envelope,
|
|
2355
2355
|
...input.idempotencyKey ? { idempotency_key: input.idempotencyKey } : {},
|
|
2356
|
-
...
|
|
2356
|
+
..._chunkSKHUWQZEjs.isRecord.call(void 0, input.rawResponse) && _chunkSKHUWQZEjs.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
|
|
2357
2357
|
...envelopeHasCanonicalOutput || envelopeHasDeclaredOutput ? { output_preview: outputPreview } : { output: outputPreview },
|
|
2358
2358
|
...summaryEntries.length > 0 ? { summary: input.summary } : {},
|
|
2359
2359
|
...warningMessages.length > 0 ? { warnings: warningMessages } : {},
|
|
@@ -2414,7 +2414,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
|
|
|
2414
2414
|
void _render;
|
|
2415
2415
|
void _next;
|
|
2416
2416
|
void _local;
|
|
2417
|
-
const billingLookup =
|
|
2417
|
+
const billingLookup = _chunkSKHUWQZEjs.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
|
|
2418
2418
|
const inspection = toolExecutionInspection(input);
|
|
2419
2419
|
return {
|
|
2420
2420
|
...base,
|
|
@@ -2510,7 +2510,7 @@ function printToolExecutionWarnings(toolId, params, metadata) {
|
|
|
2510
2510
|
}
|
|
2511
2511
|
}
|
|
2512
2512
|
function assertExecutableToolMetadata(toolId, metadata) {
|
|
2513
|
-
if (
|
|
2513
|
+
if (_chunkSKHUWQZEjs.isPlayLikeTool.call(void 0, metadata)) {
|
|
2514
2514
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
2515
2515
|
playLikeToolExecuteErrorMessage(
|
|
2516
2516
|
toolId,
|
|
@@ -2528,7 +2528,7 @@ function valueAt(value, path) {
|
|
|
2528
2528
|
for (const [index, part] of parts.entries()) {
|
|
2529
2529
|
const each = part === "*" || part.endsWith("[*]");
|
|
2530
2530
|
if (part !== "*") {
|
|
2531
|
-
at =
|
|
2531
|
+
at = _chunkSKHUWQZEjs.isRecord.call(void 0, at) ? at[each ? part.slice(0, -3) : part] : void 0;
|
|
2532
2532
|
}
|
|
2533
2533
|
if (!each) continue;
|
|
2534
2534
|
if (!Array.isArray(at)) return void 0;
|
|
@@ -2544,7 +2544,7 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2544
2544
|
const getters = ["extractedValues", "extractedLists"].flatMap(
|
|
2545
2545
|
(kind) => {
|
|
2546
2546
|
const group = _optionalChain([result, 'optionalAccess', _30 => _30[kind]]);
|
|
2547
|
-
return Array.isArray(group) ? group :
|
|
2547
|
+
return Array.isArray(group) ? group : _chunkSKHUWQZEjs.isRecord.call(void 0, group) ? Object.entries(group).map(([name, getter]) => ({
|
|
2548
2548
|
name,
|
|
2549
2549
|
...getter
|
|
2550
2550
|
})) : [];
|
|
@@ -2569,13 +2569,13 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2569
2569
|
}
|
|
2570
2570
|
function writeToolReceipt(input) {
|
|
2571
2571
|
const { response, metadata } = input;
|
|
2572
|
-
const envelope =
|
|
2572
|
+
const envelope = _chunkSKHUWQZEjs.isRecord.call(void 0, response) ? response : {};
|
|
2573
2573
|
const jobId = typeof envelope.job_id === "string" ? envelope.job_id : null;
|
|
2574
|
-
const toolResponse =
|
|
2574
|
+
const toolResponse = _chunkSKHUWQZEjs.recordField.call(void 0, envelope, "toolResponse");
|
|
2575
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;
|
|
2576
2576
|
const status = typeof envelope.status === "string" ? envelope.status : "completed";
|
|
2577
|
-
const charged =
|
|
2578
|
-
|
|
2577
|
+
const charged = _chunkSKHUWQZEjs.recordField.call(void 0, envelope, "billing").credits_charged;
|
|
2578
|
+
_chunkG2H6SQQYjs.writeExecutionOutput.call(void 0,
|
|
2579
2579
|
{
|
|
2580
2580
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2581
2581
|
status,
|
|
@@ -2606,8 +2606,8 @@ async function executeToolForReceipt(input) {
|
|
|
2606
2606
|
let retryKey = null;
|
|
2607
2607
|
let received = false;
|
|
2608
2608
|
try {
|
|
2609
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2610
|
-
const client = new (0,
|
|
2609
|
+
const cliInvocationId = _nullishCoalesce(_chunkXFV353R2js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkXFV353R2js.beginToolExecuteCommand.call(void 0, )));
|
|
2610
|
+
const client = new (0, _chunkYNAXKA23js.DeeplineClient)();
|
|
2611
2611
|
const metadata = assertExecutableToolMetadata(
|
|
2612
2612
|
toolId,
|
|
2613
2613
|
await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
|
|
@@ -2629,9 +2629,9 @@ async function executeToolForReceipt(input) {
|
|
|
2629
2629
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2630
2630
|
..._optionalChain([metadata, 'access', _37 => _37.executionMetadata, 'optionalAccess', _38 => _38.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2631
2631
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2632
|
-
searchRef:
|
|
2632
|
+
searchRef: _chunkFXXERR52js.recentSearchRef.call(void 0, toolId),
|
|
2633
2633
|
cliInvocationId,
|
|
2634
|
-
onResponseReceived:
|
|
2634
|
+
onResponseReceived: _chunkG2H6SQQYjs.recordApiResponse
|
|
2635
2635
|
});
|
|
2636
2636
|
const response = await call(key).catch((error) => {
|
|
2637
2637
|
if (!key || !refusedRetryKey(error)) throw error;
|
|
@@ -2667,11 +2667,11 @@ async function executeToolForReceipt(input) {
|
|
|
2667
2667
|
if (received) throw error;
|
|
2668
2668
|
const outcomeKnown = answeredWithFailure(error);
|
|
2669
2669
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _39 => _39.discard, 'call', _40 => _40()]);
|
|
2670
|
-
|
|
2670
|
+
_chunkG2H6SQQYjs.writeExecutionOutput.call(void 0,
|
|
2671
2671
|
{
|
|
2672
2672
|
id: outcomeKnown ? null : key,
|
|
2673
2673
|
status: "failed",
|
|
2674
|
-
error:
|
|
2674
|
+
error: _chunkEV3OPDHFjs.errorToJsonPayload.call(void 0, error).error,
|
|
2675
2675
|
...key && !outcomeKnown ? {
|
|
2676
2676
|
next: {
|
|
2677
2677
|
retry: "Run the same command again: it picks up this call without paying twice."
|
|
@@ -2703,11 +2703,11 @@ function answeredWithFailure(error) {
|
|
|
2703
2703
|
!(error.code === "IDEMPOTENCY_NOT_SUPPORTED" && !serverBodyHasCode(_optionalChain([error, 'access', _43 => _43.details, 'optionalAccess', _44 => _44.response]), "IDEMPOTENCY_NOT_SUPPORTED"));
|
|
2704
2704
|
}
|
|
2705
2705
|
async function getToolExecutionReceipt(key, output) {
|
|
2706
|
-
const client = new (0,
|
|
2706
|
+
const client = new (0, _chunkYNAXKA23js.DeeplineClient)();
|
|
2707
2707
|
const execution = await client.executions.getByKey(key);
|
|
2708
2708
|
output.label = `${execution.toolId} (tool)`;
|
|
2709
2709
|
if (execution.response === void 0) {
|
|
2710
|
-
|
|
2710
|
+
_chunkG2H6SQQYjs.writeExecutionOutput.call(void 0,
|
|
2711
2711
|
{
|
|
2712
2712
|
id: key,
|
|
2713
2713
|
status: execution.executionRecovery.state,
|
|
@@ -2736,19 +2736,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2736
2736
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2737
2737
|
} catch (error) {
|
|
2738
2738
|
if (wantsJson) {
|
|
2739
|
-
|
|
2739
|
+
_chunkEV3OPDHFjs.printJsonError.call(void 0, error);
|
|
2740
2740
|
} else {
|
|
2741
2741
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2742
2742
|
}
|
|
2743
2743
|
return error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2744
2744
|
}
|
|
2745
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2745
|
+
const cliInvocationId = _nullishCoalesce(_chunkXFV353R2js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkXFV353R2js.beginToolExecuteCommand.call(void 0, )));
|
|
2746
2746
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2747
|
-
const tracing =
|
|
2747
|
+
const tracing = _chunk636GD4IRjs.isCliTraceEnabled.call(void 0, );
|
|
2748
2748
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2749
|
-
const client = new (0,
|
|
2749
|
+
const client = new (0, _chunkYNAXKA23js.DeeplineClient)();
|
|
2750
2750
|
if (clientStartedAt !== void 0) {
|
|
2751
|
-
|
|
2751
|
+
_chunk636GD4IRjs.recordCliTrace.call(void 0, {
|
|
2752
2752
|
phase: "cli.tool_execute_client_setup",
|
|
2753
2753
|
ms: performance.now() - clientStartedAt
|
|
2754
2754
|
});
|
|
@@ -2757,13 +2757,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2757
2757
|
const readMetadata = async () => {
|
|
2758
2758
|
if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2759
2759
|
try {
|
|
2760
|
-
metadata = await
|
|
2760
|
+
metadata = await _chunkXFV353R2js.runToolExecuteStage.call(void 0,
|
|
2761
2761
|
"tool metadata lookup",
|
|
2762
2762
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2763
2763
|
);
|
|
2764
2764
|
} catch (error) {
|
|
2765
2765
|
if (isMissingToolMetadataError(error)) {
|
|
2766
|
-
const play = await
|
|
2766
|
+
const play = await _chunkXFV353R2js.runToolExecuteStage.call(void 0,
|
|
2767
2767
|
"play alias lookup",
|
|
2768
2768
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2769
2769
|
);
|
|
@@ -2786,7 +2786,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2786
2786
|
toolMetadata = await readMetadata();
|
|
2787
2787
|
} catch (error) {
|
|
2788
2788
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2789
|
-
if (wantsJson)
|
|
2789
|
+
if (wantsJson) _chunkEV3OPDHFjs.printJsonError.call(void 0, error);
|
|
2790
2790
|
else console.error(error.message);
|
|
2791
2791
|
return 2;
|
|
2792
2792
|
}
|
|
@@ -2814,7 +2814,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2814
2814
|
assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2815
2815
|
} catch (error) {
|
|
2816
2816
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2817
|
-
if (wantsJson)
|
|
2817
|
+
if (wantsJson) _chunkEV3OPDHFjs.printJsonError.call(void 0, error);
|
|
2818
2818
|
else console.error(error.message);
|
|
2819
2819
|
return 2;
|
|
2820
2820
|
}
|
|
@@ -2826,7 +2826,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2826
2826
|
metadata = await readMetadata();
|
|
2827
2827
|
} catch (error) {
|
|
2828
2828
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2829
|
-
if (wantsJson)
|
|
2829
|
+
if (wantsJson) _chunkEV3OPDHFjs.printJsonError.call(void 0, error);
|
|
2830
2830
|
else console.error(error.message);
|
|
2831
2831
|
return 2;
|
|
2832
2832
|
}
|
|
@@ -2842,7 +2842,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2842
2842
|
metadata = await readMetadata();
|
|
2843
2843
|
} catch (error) {
|
|
2844
2844
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2845
|
-
if (wantsJson)
|
|
2845
|
+
if (wantsJson) _chunkEV3OPDHFjs.printJsonError.call(void 0, error);
|
|
2846
2846
|
else console.error(error.message);
|
|
2847
2847
|
return 2;
|
|
2848
2848
|
}
|
|
@@ -2869,11 +2869,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2869
2869
|
...parsed.connection !== void 0 ? { connection: parsed.connection } : {},
|
|
2870
2870
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2871
2871
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2872
|
-
searchRef:
|
|
2872
|
+
searchRef: _chunkFXXERR52js.recentSearchRef.call(void 0, parsed.toolId),
|
|
2873
2873
|
cliInvocationId,
|
|
2874
|
-
onResponseReceived:
|
|
2874
|
+
onResponseReceived: _chunkG2H6SQQYjs.recordApiResponse,
|
|
2875
2875
|
...tracing ? {
|
|
2876
|
-
onServerTiming: (serverTiming) =>
|
|
2876
|
+
onServerTiming: (serverTiming) => _chunk636GD4IRjs.recordCliTrace.call(void 0, {
|
|
2877
2877
|
phase: "tool_execute_server_timing",
|
|
2878
2878
|
cliInvocationId,
|
|
2879
2879
|
serverTiming,
|
|
@@ -2884,13 +2884,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2884
2884
|
let rawResponse;
|
|
2885
2885
|
let successfulCompatibilityResponse;
|
|
2886
2886
|
try {
|
|
2887
|
-
const executeResult = await
|
|
2887
|
+
const executeResult = await _chunkXFV353R2js.runToolExecuteStage.call(void 0,
|
|
2888
2888
|
"execute request",
|
|
2889
2889
|
async () => {
|
|
2890
2890
|
try {
|
|
2891
2891
|
if (tracing) {
|
|
2892
2892
|
submissionStartedAt = performance.now();
|
|
2893
|
-
|
|
2893
|
+
_chunk636GD4IRjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2894
2894
|
}
|
|
2895
2895
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2896
2896
|
...executeOptions,
|
|
@@ -2900,34 +2900,34 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2900
2900
|
} catch (error) {
|
|
2901
2901
|
if (parsed.connection !== void 0 || !(error instanceof _chunkLFQJW4S2js.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2902
2902
|
throw error;
|
|
2903
|
-
const baseUrl =
|
|
2903
|
+
const baseUrl = _chunkAO56MZ7Djs.resolveConfig.call(void 0, ).baseUrl;
|
|
2904
2904
|
if (maintenancePolicy !== "off") {
|
|
2905
|
-
|
|
2905
|
+
_chunkG4WPDCXAjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2906
2906
|
}
|
|
2907
2907
|
const preflight = deferredCompatibility ? await deferredCompatibility.result.catch(() => null) : null;
|
|
2908
|
-
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 _chunkXFV353R2js.runToolExecuteStage.call(void 0,
|
|
2909
2909
|
"SDK compatibility",
|
|
2910
|
-
() =>
|
|
2910
|
+
() => _chunkG4WPDCXAjs.requireSdkCompatibility.call(void 0, baseUrl, {
|
|
2911
2911
|
command: "tools execute",
|
|
2912
|
-
skillsVersion:
|
|
2912
|
+
skillsVersion: _chunkAO56MZ7Djs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2913
2913
|
persistCache: maintenancePolicy !== "off"
|
|
2914
2914
|
})
|
|
2915
2915
|
);
|
|
2916
2916
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _51 => _51.readMetadata, 'call', _52 => _52()]), () => ( metadata));
|
|
2917
|
-
if (maintenancePolicy !== "off" && await
|
|
2917
|
+
if (maintenancePolicy !== "off" && await _chunkXFV353R2js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2918
2918
|
compatibilityResponse,
|
|
2919
2919
|
baseUrl,
|
|
2920
2920
|
maintenancePolicy
|
|
2921
2921
|
)) {
|
|
2922
2922
|
return void 0;
|
|
2923
2923
|
}
|
|
2924
|
-
|
|
2924
|
+
_chunkG4WPDCXAjs.enforceSdkCompatibilityResponse.call(void 0, compatibilityResponse, {
|
|
2925
2925
|
quietAdvisory: wantsJson
|
|
2926
2926
|
});
|
|
2927
2927
|
if (maintenancePolicy !== "off") {
|
|
2928
|
-
await
|
|
2928
|
+
await _chunkXFV353R2js.runToolExecuteStage.call(void 0,
|
|
2929
2929
|
"agent skills sync",
|
|
2930
|
-
() =>
|
|
2930
|
+
() => _chunkG4WPDCXAjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2931
2931
|
update: _optionalChain([compatibilityResponse, 'optionalAccess', _53 => _53.skills]),
|
|
2932
2932
|
mode: "detached"
|
|
2933
2933
|
})
|
|
@@ -2936,7 +2936,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2936
2936
|
const legacyMetadata = await readMetadata();
|
|
2937
2937
|
if (tracing) {
|
|
2938
2938
|
submissionStartedAt = performance.now();
|
|
2939
|
-
|
|
2939
|
+
_chunk636GD4IRjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2940
2940
|
}
|
|
2941
2941
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2942
2942
|
...executeOptions,
|
|
@@ -2959,8 +2959,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2959
2959
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2960
2960
|
const updateRequiredBeforeExecution = error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2961
2961
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2962
|
-
const baseUrl =
|
|
2963
|
-
if (await
|
|
2962
|
+
const baseUrl = _chunkAO56MZ7Djs.resolveConfig.call(void 0, ).baseUrl;
|
|
2963
|
+
if (await _chunkXFV353R2js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2964
2964
|
compatibility.response,
|
|
2965
2965
|
baseUrl,
|
|
2966
2966
|
maintenancePolicy
|
|
@@ -2984,7 +2984,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2984
2984
|
}
|
|
2985
2985
|
}
|
|
2986
2986
|
if (failure instanceof _chunkLFQJW4S2js.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2987
|
-
if (wantsJson)
|
|
2987
|
+
if (wantsJson) _chunkEV3OPDHFjs.printJsonError.call(void 0, failure);
|
|
2988
2988
|
else console.error(failure.message);
|
|
2989
2989
|
return 2;
|
|
2990
2990
|
}
|
|
@@ -3011,9 +3011,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3011
3011
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
3012
3012
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _60 => _60.auto_update]);
|
|
3013
3013
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _61 => _61.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
3014
|
-
await
|
|
3014
|
+
await _chunkXFV353R2js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
3015
3015
|
compatibilityResponse,
|
|
3016
|
-
|
|
3016
|
+
_chunkAO56MZ7Djs.resolveConfig.call(void 0, ).baseUrl,
|
|
3017
3017
|
maintenancePolicy
|
|
3018
3018
|
);
|
|
3019
3019
|
}
|
|
@@ -3031,8 +3031,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3031
3031
|
);
|
|
3032
3032
|
}
|
|
3033
3033
|
}
|
|
3034
|
-
const responseMetadata =
|
|
3035
|
-
|
|
3034
|
+
const responseMetadata = _chunkSKHUWQZEjs.recordField.call(void 0,
|
|
3035
|
+
_chunkSKHUWQZEjs.recordField.call(void 0, rawResponse, "_metadata"),
|
|
3036
3036
|
"tool"
|
|
3037
3037
|
);
|
|
3038
3038
|
const listOutputPaths = responseMetadata.listOutputPaths;
|
|
@@ -3044,11 +3044,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3044
3044
|
await readMetadata()
|
|
3045
3045
|
);
|
|
3046
3046
|
}
|
|
3047
|
-
if (
|
|
3047
|
+
if (_chunkSKHUWQZEjs.isRecord.call(void 0, rawResponse)) {
|
|
3048
3048
|
const { _metadata, ...execution } = rawResponse;
|
|
3049
3049
|
rawResponse = execution;
|
|
3050
3050
|
}
|
|
3051
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
3051
|
+
const { listConversion, summary, baseEnvelope } = await _chunkXFV353R2js.runToolExecuteStage.call(void 0,
|
|
3052
3052
|
"result formatting",
|
|
3053
3053
|
async () => {
|
|
3054
3054
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -3083,9 +3083,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3083
3083
|
}
|
|
3084
3084
|
skillsSyncAttempted = true;
|
|
3085
3085
|
try {
|
|
3086
|
-
await
|
|
3086
|
+
await _chunkXFV353R2js.runToolExecuteStage.call(void 0,
|
|
3087
3087
|
"agent skills sync",
|
|
3088
|
-
() =>
|
|
3088
|
+
() => _chunkG4WPDCXAjs.syncSdkSkillsIfNeeded.call(void 0, _chunkAO56MZ7Djs.resolveConfig.call(void 0, ).baseUrl, {
|
|
3089
3089
|
update: deliveredCompatibilityResponse.skills,
|
|
3090
3090
|
mode: "detached"
|
|
3091
3091
|
})
|
|
@@ -3096,15 +3096,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3096
3096
|
);
|
|
3097
3097
|
}
|
|
3098
3098
|
};
|
|
3099
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
3099
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkEV3OPDHFjs.printCommandEnvelope.call(void 0, envelope, {
|
|
3100
3100
|
...options2,
|
|
3101
3101
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
3102
3102
|
});
|
|
3103
3103
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
3104
3104
|
await syncSkillsForDeliveredOutput();
|
|
3105
|
-
|
|
3105
|
+
_chunkEV3OPDHFjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
3106
3106
|
};
|
|
3107
|
-
const delivered = await
|
|
3107
|
+
const delivered = await _chunkXFV353R2js.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
3108
3108
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
3109
3109
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
3110
3110
|
return true;
|
|
@@ -3117,7 +3117,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3117
3117
|
await printDeliveredJsonEnvelope({
|
|
3118
3118
|
...baseEnvelope,
|
|
3119
3119
|
local: {
|
|
3120
|
-
...
|
|
3120
|
+
..._chunkSKHUWQZEjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
|
|
3121
3121
|
payload_file: jsonPath
|
|
3122
3122
|
}
|
|
3123
3123
|
});
|
|
@@ -3133,7 +3133,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3133
3133
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3134
3134
|
);
|
|
3135
3135
|
if (wantsJson) {
|
|
3136
|
-
|
|
3136
|
+
_chunkEV3OPDHFjs.printJsonError.call(void 0, error);
|
|
3137
3137
|
} else {
|
|
3138
3138
|
console.error(error.message);
|
|
3139
3139
|
}
|
|
@@ -3228,13 +3228,13 @@ inspect: ${inspection.inspect}
|
|
|
3228
3228
|
return true;
|
|
3229
3229
|
});
|
|
3230
3230
|
if (delivered) {
|
|
3231
|
-
await
|
|
3231
|
+
await _chunkXFV353R2js.runToolExecuteStage.call(void 0,
|
|
3232
3232
|
"acknowledge delivery",
|
|
3233
3233
|
() => recovery.acknowledgeDelivery()
|
|
3234
3234
|
);
|
|
3235
3235
|
}
|
|
3236
3236
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3237
|
-
|
|
3237
|
+
_chunkG4WPDCXAjs.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3238
3238
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _64 => _64.auto_update, 'optionalAccess', _65 => _65.should_auto_update]) === true
|
|
3239
3239
|
});
|
|
3240
3240
|
}
|