deepline 0.3.578 → 0.3.579
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/client-core.ts +7 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +124 -57
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +43 -64
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +25 -0
- package/dist/bundling-sources/shared_libs/plays/sandbox-runtime-limits.ts +83 -0
- package/dist/cli/{agents-MCU3ITQZ.js → agents-D5RZEVXQ.js} +31 -31
- package/dist/cli/{agents-LRBANBZH.mjs → agents-FJTRTYCL.mjs} +4 -4
- package/dist/cli/{auth-5BJKVYMQ.mjs → auth-OMYIDVXZ.mjs} +5 -5
- package/dist/cli/auth-Q4O7MJU4.js +44 -0
- package/dist/cli/{billing-NT57POHH.js → billing-EWFUDLQ7.js} +104 -102
- package/dist/cli/{billing-EBBI4MVL.mjs → billing-XK3LBNYS.mjs} +11 -9
- package/dist/cli/{chunk-H7DY5NQ3.mjs → chunk-27ZYRIQC.mjs} +5 -5
- package/dist/cli/{chunk-W66GXHYR.mjs → chunk-3Z4TVZE7.mjs} +1 -1
- package/dist/cli/{chunk-MXPCTF57.js → chunk-44NTNNKC.js} +11 -2
- package/dist/cli/{chunk-4LMTY4RQ.mjs → chunk-6DMGKAWO.mjs} +2 -2
- package/dist/cli/{chunk-ITYSPUKD.mjs → chunk-6EVVUVU3.mjs} +2 -2
- package/dist/cli/{chunk-4KNRCUKY.mjs → chunk-6GON36H3.mjs} +17 -14
- package/dist/cli/{chunk-A7NKOXBV.js → chunk-6MIEJJSO.js} +4 -4
- package/dist/cli/{chunk-4YSJOSBG.mjs → chunk-6NYHMXC7.mjs} +1 -1
- package/dist/cli/{chunk-PXMCPEE2.js → chunk-72TWLORR.js} +3 -3
- package/dist/cli/{chunk-3ZUKYLC6.js → chunk-7HOYKXVY.js} +8 -8
- package/dist/cli/{chunk-NEH7NZFT.js → chunk-7JMCRYXU.js} +10 -10
- package/dist/cli/{chunk-4CNHOBUO.mjs → chunk-7SZCJC4R.mjs} +2 -2
- package/dist/cli/{chunk-27HAQRGH.js → chunk-ABH6PUDZ.js} +23 -23
- package/dist/cli/{chunk-M3ITWEGS.js → chunk-AP7PIGL5.js} +41 -41
- package/dist/cli/{chunk-BPMA4S3O.js → chunk-BLEYV4BJ.js} +21 -21
- package/dist/cli/{chunk-DWUESXDD.mjs → chunk-BZ4M7OFO.mjs} +11 -1
- package/dist/cli/{chunk-5LCV36BR.js → chunk-DH736ASH.js} +20 -20
- package/dist/cli/{chunk-FYKHAT2F.mjs → chunk-DTQBQSUU.mjs} +9 -0
- package/dist/cli/{chunk-HZXF2HFF.mjs → chunk-F57NDSKT.mjs} +5 -5
- package/dist/cli/{chunk-VVZ7JZMQ.js → chunk-FKXSIIR4.js} +15 -15
- package/dist/cli/{chunk-CS36W3RL.js → chunk-G5CZDRY3.js} +26 -26
- package/dist/cli/{chunk-P35YQAUC.js → chunk-HEZW2IDK.js} +277 -274
- package/dist/cli/{chunk-AZFSCPYK.mjs → chunk-HGUFTSB5.mjs} +11 -2
- package/dist/cli/{chunk-CFLAGRWL.mjs → chunk-I2TSRLOI.mjs} +1 -1
- package/dist/cli/{chunk-OAQYLTUN.mjs → chunk-JFS4KHA3.mjs} +5 -5
- package/dist/cli/{chunk-XE66BGLB.js → chunk-K2BU67UC.js} +2 -2
- package/dist/cli/{chunk-NTHN7ODR.mjs → chunk-KIIOKQFY.mjs} +1 -1
- package/dist/cli/{chunk-IFWB4BYZ.mjs → chunk-KQAEXBVQ.mjs} +3 -3
- package/dist/cli/{chunk-RLPPLS6A.js → chunk-KWQHQG53.js} +6 -6
- package/dist/cli/{chunk-Y2TK7OXN.js → chunk-LCPJR3IY.js} +2 -2
- package/dist/cli/{chunk-W47SXEWQ.js → chunk-LQ45LCH7.js} +9 -9
- package/dist/cli/{chunk-LYZPGP3P.mjs → chunk-LV2LGW2Q.mjs} +1 -1
- package/dist/cli/{chunk-QPOJLAFT.mjs → chunk-LYBZLA6F.mjs} +2 -2
- package/dist/cli/{chunk-RWDYULX2.js → chunk-LYJ2NSHD.js} +17 -12
- package/dist/cli/{chunk-DDJN4RR6.mjs → chunk-M4YWN5BT.mjs} +4 -4
- package/dist/cli/{chunk-VMCJKGZS.mjs → chunk-N6X2UKYQ.mjs} +2 -2
- package/dist/cli/{chunk-25SSGQJJ.js → chunk-NKUXW4WB.js} +2 -2
- package/dist/cli/{chunk-CPNTDIJK.js → chunk-NOMO5GPI.js} +1 -1
- package/dist/cli/{chunk-CFG3ZM7M.mjs → chunk-NONMY5CY.mjs} +2 -2
- package/dist/cli/{chunk-24FGR73C.js → chunk-NWZU6HL4.js} +13 -13
- package/dist/cli/{chunk-HGQT6EGK.js → chunk-OOGP737I.js} +20 -20
- package/dist/cli/{chunk-ALXYCC4K.mjs → chunk-OSRATALX.mjs} +1 -1
- package/dist/cli/{chunk-ZO65VJRJ.js → chunk-PGRRMVQ5.js} +10 -1
- package/dist/cli/{chunk-J7PCSLRY.js → chunk-PLWZ3NB7.js} +5 -5
- package/dist/cli/{chunk-MXK4M7HP.js → chunk-Q4VKMF3B.js} +17 -17
- package/dist/cli/{chunk-SKHUWQZE.js → chunk-QA55PGJH.js} +17 -7
- package/dist/cli/{chunk-T2CCLYHV.mjs → chunk-S2OXA7QS.mjs} +7 -7
- package/dist/cli/{chunk-HKZN33F2.mjs → chunk-SUHCW7U5.mjs} +3 -3
- package/dist/cli/{chunk-PJXPHUAR.mjs → chunk-SZIWFQI2.mjs} +3 -3
- package/dist/cli/{chunk-7J473OJ5.mjs → chunk-TFNDOH4W.mjs} +1 -1
- package/dist/cli/{chunk-XBO4ERH6.js → chunk-TVAFWAOQ.js} +3 -3
- package/dist/cli/{chunk-UKSOIH2P.js → chunk-UYCBG75H.js} +5 -5
- package/dist/cli/{chunk-RW3URFZK.mjs → chunk-VFIIRK7S.mjs} +2 -2
- package/dist/cli/{chunk-3GF33QJJ.mjs → chunk-WQQQP3FH.mjs} +4 -4
- package/dist/cli/{chunk-G7PH2QVM.js → chunk-WWSGXX6U.js} +5 -5
- package/dist/cli/{chunk-JQPFICW3.mjs → chunk-X6LPC3SU.mjs} +1 -1
- package/dist/cli/{chunk-6UFTWNC5.mjs → chunk-XQYBBCFI.mjs} +2 -2
- package/dist/cli/{chunk-5IMWXYVB.js → chunk-XTM6NOJ6.js} +53 -53
- package/dist/cli/{chunk-XX7TZM4N.js → chunk-Y2ND6PPW.js} +48 -48
- package/dist/cli/{chunk-CSPOWVWS.mjs → chunk-YCWRKSLB.mjs} +8 -3
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/concurrent-runs-help-D6XH3FY5.js +22 -0
- package/dist/cli/{concurrent-runs-help-2MHLIUC6.mjs → concurrent-runs-help-IQBZBTD5.mjs} +6 -6
- package/dist/cli/{csv-J6SRBMOT.mjs → csv-6BEOWTGM.mjs} +4 -4
- package/dist/cli/{csv-RYYDAC76.js → csv-T7TWLIGD.js} +13 -13
- package/dist/cli/{db-WK226TM7.mjs → db-FA5QGXZ7.mjs} +6 -6
- package/dist/cli/{db-5QLH6QK5.js → db-MFTUN3DF.js} +27 -27
- package/dist/cli/{describe-UBSCFPH5.mjs → describe-TITEQNVE.mjs} +21 -21
- package/dist/cli/describe-TYZ5YH3V.js +50 -0
- package/dist/cli/describe-core.d.mts +4 -2
- package/dist/cli/describe-core.d.ts +4 -2
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-XF5BNCFS.mjs → executions-DMYJJIRB.mjs} +6 -6
- package/dist/cli/{executions-AGV5V7SD.js → executions-QW3L7G7J.js} +8 -8
- package/dist/cli/{feedback-3RDEZE2M.js → feedback-6JZGE7OQ.js} +14 -14
- package/dist/cli/{feedback-LT3PDK72.mjs → feedback-WPSNSFRC.mjs} +6 -6
- package/dist/cli/{git-7VBTCCBV.mjs → git-GO65XRM3.mjs} +5 -5
- package/dist/cli/git-UGGRLGTQ.js +26 -0
- package/dist/cli/index.js +148 -148
- package/dist/cli/index.mjs +47 -47
- package/dist/cli/{integrations-E7QRWMKZ.mjs → integrations-EEBPETH2.mjs} +7 -7
- package/dist/cli/{integrations-JP732FQB.js → integrations-T5JPSZXN.js} +29 -29
- package/dist/cli/{legacy-noops-UTL4W5WE.js → legacy-noops-B55OMNH7.js} +9 -9
- package/dist/cli/{legacy-noops-UFNQBPIT.mjs → legacy-noops-XDNZ46IR.mjs} +6 -6
- package/dist/cli/{mcp-5X4XFB4V.js → mcp-3YA333TQ.js} +24 -24
- package/dist/cli/{mcp-YHETA3AU.mjs → mcp-4QIUAAWS.mjs} +4 -4
- package/dist/cli/{monitors-WFVZ42OQ.mjs → monitors-BVUPS4CE.mjs} +7 -7
- package/dist/cli/{monitors-AN6KH4XY.js → monitors-FOS7MWZO.js} +100 -100
- package/dist/cli/{org-CN3XJZLA.js → org-CYM7HFLN.js} +121 -121
- package/dist/cli/{org-OMDV7WDF.mjs → org-TCMRRVFC.mjs} +6 -6
- package/dist/cli/{outcomes-I4ZTG5ND.mjs → outcomes-2JSWXWQ3.mjs} +6 -6
- package/dist/cli/{outcomes-7HCZ6K3Q.js → outcomes-VDJVP5YC.js} +14 -14
- package/dist/cli/{play-TSNBSHGA.mjs → play-CPP4EBYF.mjs} +20 -20
- package/dist/cli/{play-45VXZ57A.js → play-U3G73VIR.js} +349 -349
- package/dist/cli/{providers-RB3TT7AE.js → providers-2ZB67TK7.js} +9 -9
- package/dist/cli/{providers-4TB56ZLK.mjs → providers-RVMIX5ED.mjs} +6 -6
- package/dist/cli/{quickstart-XHZ3PG5I.mjs → quickstart-L3YO3OWZ.mjs} +4 -4
- package/dist/cli/{quickstart-ZNDM6VUD.js → quickstart-V3Y7XZ47.js} +6 -6
- package/dist/cli/{run-XNEJGAKV.js → run-M2CADJ6E.js} +49 -48
- package/dist/cli/{run-7PY4G6GB.mjs → run-PQ3Z2GOF.mjs} +27 -26
- package/dist/cli/{search-BG7KCIOG.mjs → search-QVLGI7SZ.mjs} +7 -7
- package/dist/cli/search-RHPPZZFG.js +32 -0
- package/dist/cli/{search-output-3ZBNTHGO.js → search-output-IUANVHWU.js} +8 -8
- package/dist/cli/{search-output-TWKKP2BE.mjs → search-output-PN3V7MSO.mjs} +5 -5
- package/dist/cli/{secrets-FNR6MX6A.js → secrets-AOW6F67J.js} +15 -15
- package/dist/cli/{secrets-AZZCE7E3.mjs → secrets-HK25G4K2.mjs} +6 -6
- package/dist/cli/sessions-AEGGTZ3K.js +23 -0
- package/dist/cli/{sessions-ZAMKN3AF.mjs → sessions-YN2OIAGR.mjs} +6 -6
- package/dist/cli/{settings-QGASFWV3.js → settings-6EV2FPGF.js} +85 -85
- package/dist/cli/{settings-WKWOOOI2.mjs → settings-7UW5TWSM.mjs} +12 -12
- package/dist/cli/{setup-U36W42LE.mjs → setup-BG56SHKH.mjs} +9 -9
- package/dist/cli/{setup-KUZDCR3F.js → setup-ZQPD2R5K.js} +49 -49
- package/dist/cli/skills-C6ZEZWBE.js +37 -0
- package/dist/cli/{skills-25CSZQIK.mjs → skills-MQV2TNUZ.mjs} +7 -7
- package/dist/cli/tools-PM3MC3RR.js +57 -0
- package/dist/cli/{tools-4NZQ22AA.mjs → tools-RGI4OE5T.mjs} +19 -19
- package/dist/cli/{update-CJYP36TG.mjs → update-SQKGHQKF.mjs} +9 -9
- package/dist/cli/update-ZHUPF2HT.js +37 -0
- package/dist/cli/{views-GYGE7FSV.mjs → views-734T2CXF.mjs} +6 -6
- package/dist/cli/{views-76UIPWJD.js → views-BUKVHCRD.js} +21 -21
- package/dist/cli/{workflow-LZSWALZS.mjs → workflow-JNRRBMEK.mjs} +7 -7
- package/dist/cli/{workflow-NCVXBATM.js → workflow-LPJC6RHP.js} +17 -17
- package/dist/{client-BrdMPFCM.d.ts → client-C1AubrWJ.d.ts} +1 -1
- package/dist/{client-CF-bsrtI.d.mts → client-CNYctEBh.d.mts} +1 -1
- package/dist/{client-core-DM1ZedOG.d.mts → client-core-Bb06TCx5.d.mts} +7 -0
- package/dist/{client-core-rMoUWSYM.d.ts → client-core-D6zAE46g.d.ts} +7 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +126 -126
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-VSW3MTFO.js +0 -44
- package/dist/cli/concurrent-runs-help-ATT2GVTQ.js +0 -22
- package/dist/cli/describe-Q27SRQWM.js +0 -50
- package/dist/cli/git-BBTP3H7J.js +0 -26
- package/dist/cli/search-ZBU5GW4W.js +0 -32
- package/dist/cli/sessions-GCY62GAW.js +0 -23
- package/dist/cli/skills-43DHMLRW.js +0 -37
- package/dist/cli/tools-5BGKNMFU.js +0 -57
- package/dist/cli/update-CUO2MTB6.js +0 -37
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkLYJ2NSHDjs = require('./chunk-LYJ2NSHD.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -11,11 +11,11 @@ var _chunkRWDYULX2js = require('./chunk-RWDYULX2.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkFKXSIIR4js = require('./chunk-FKXSIIR4.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunk7JMCRYXUjs = require('./chunk-7JMCRYXU.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -37,10 +37,10 @@ var _chunkNEH7NZFTjs = require('./chunk-NEH7NZFT.js');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkQA55PGJHjs = require('./chunk-QA55PGJH.js');
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkPGRRMVQ5js = require('./chunk-PGRRMVQ5.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 _chunkUYCBG75Hjs = require('./chunk-UYCBG75H.js');
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
var
|
|
63
|
+
var _chunk7HOYKXVYjs = require('./chunk-7HOYKXVY.js');
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
var
|
|
70
|
+
var _chunkABH6PUDZjs = require('./chunk-ABH6PUDZ.js');
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
var
|
|
75
|
+
var _chunkNKUXW4WBjs = require('./chunk-NKUXW4WB.js');
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
var
|
|
82
|
+
var _chunkY2ND6PPWjs = require('./chunk-Y2ND6PPW.js');
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
@@ -88,12 +88,12 @@ var _chunkXX7TZM4Njs = require('./chunk-XX7TZM4N.js');
|
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
|
|
91
|
-
var
|
|
91
|
+
var _chunkOOGP737Ijs = require('./chunk-OOGP737I.js');
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
var
|
|
96
|
+
var _chunkTVAFWAOQjs = require('./chunk-TVAFWAOQ.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 = _chunkTVAFWAOQjs.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
|
+
_chunkTVAFWAOQjs.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 (_chunkQA55PGJHjs.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: _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.recordField.call(void 0,
|
|
515
515
|
tool,
|
|
516
516
|
"inputSchema",
|
|
517
517
|
"input_schema"
|
|
518
518
|
);
|
|
519
|
-
return
|
|
519
|
+
return _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.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: _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.stringField.call(void 0, pricing, "summary");
|
|
547
547
|
if (summary) return summary;
|
|
548
|
-
const displayText =
|
|
548
|
+
const displayText = _chunkQA55PGJHjs.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, _chunkUYCBG75Hjs.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
|
+
_chunkOOGP737Ijs.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
|
+
_chunkOOGP737Ijs.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
|
+
_chunkOOGP737Ijs.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(_chunkOOGP737Ijs.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, _chunkUYCBG75Hjs.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
|
+
_chunkOOGP737Ijs.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, _chunkUYCBG75Hjs.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
|
+
_chunkOOGP737Ijs.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 || _chunkOOGP737Ijs.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
|
+
_chunkOOGP737Ijs.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, _chunkUYCBG75Hjs.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
|
+
_chunkOOGP737Ijs.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 || _chunkOOGP737Ijs.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 ? _chunkQA55PGJHjs.playReferenceForTool.call(void 0, tool) : null;
|
|
876
|
+
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunkQA55PGJHjs.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
|
+
_chunkFKXSIIR4js.registerIntegrationBalanceCommand.call(void 0, tools, true);
|
|
917
|
+
_chunkFKXSIIR4js.registerWorkspaceConnectionListCommand.call(void 0, tools, "workspace-connections", true);
|
|
918
|
+
_chunkFKXSIIR4js.registerLegacyHubSpotMembersCommand.call(void 0, tools, true);
|
|
919
|
+
_chunkFKXSIIR4js.registerLegacyWorkspaceConnectionCommand.call(void 0, tools, true);
|
|
920
|
+
_chunkFKXSIIR4js.registerLegacyCalendarDelegationCommand.call(void 0, tools, true);
|
|
921
|
+
_chunkFKXSIIR4js.registerLegacyAvailabilityCalendarsCommand.call(void 0, tools, true);
|
|
922
|
+
_chunkFKXSIIR4js.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
|
+
_chunk7JMCRYXUjs.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
|
+
_chunkABH6PUDZjs.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-TYZ5YH3V.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
|
+
_chunkLYJ2NSHDjs.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
|
+
_chunkNKUXW4WBjs.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 = _chunkTVAFWAOQjs.resolveConfig.call(void 0, ).baseUrl;
|
|
1153
|
+
_chunkNKUXW4WBjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1154
|
+
const result = _chunkABH6PUDZjs.runToolExecuteStage.call(void 0,
|
|
1155
1155
|
"SDK compatibility",
|
|
1156
|
-
() =>
|
|
1156
|
+
() => _chunkY2ND6PPWjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1157
1157
|
command: "tools execute",
|
|
1158
|
-
skillsVersion:
|
|
1158
|
+
skillsVersion: _chunkTVAFWAOQjs.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
|
+
_chunkNKUXW4WBjs.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
|
+
_chunkNKUXW4WBjs.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, _chunkUYCBG75Hjs.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
|
+
_chunkOOGP737Ijs.printCommandEnvelope.call(void 0,
|
|
1256
1256
|
{
|
|
1257
1257
|
toolId: String(tool.toolId || toolId),
|
|
1258
|
-
cost:
|
|
1258
|
+
cost: _chunkQA55PGJHjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1259
1259
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1260
|
-
...
|
|
1260
|
+
..._chunkQA55PGJHjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunkQA55PGJHjs.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) && !_chunkQA55PGJHjs.isMonitorTypeTool.call(void 0, tool) && !_chunkQA55PGJHjs.isMonitorVariantIndex.call(void 0, tool) && !_chunkQA55PGJHjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
|
|
1272
|
+
const contract = _chunkQA55PGJHjs.toolContractJsonForDescribe.call(void 0,
|
|
1273
1273
|
tool,
|
|
1274
1274
|
toolId,
|
|
1275
1275
|
void 0,
|
|
1276
1276
|
seedToolListScript
|
|
1277
1277
|
);
|
|
1278
|
-
|
|
1278
|
+
_chunkOOGP737Ijs.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
|
+
_chunkOOGP737Ijs.printCompactJson.call(void 0, {
|
|
1302
|
+
..._chunkQA55PGJHjs.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
|
+
_chunkOOGP737Ijs.printCompactJson.call(void 0, {
|
|
1316
|
+
..._chunkQA55PGJHjs.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
|
+
${_chunkQA55PGJHjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1342
1342
|
}
|
|
1343
1343
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1344
1344
|
return 0;
|
|
@@ -1346,7 +1346,7 @@ ${_chunkSKHUWQZEjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
|
1346
1346
|
printCompactToolContract(tool, toolId);
|
|
1347
1347
|
if (modelDescription) {
|
|
1348
1348
|
process.stdout.write(`
|
|
1349
|
-
${
|
|
1349
|
+
${_chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
|
|
1367
|
+
const properties = _chunkQA55PGJHjs.recordField.call(void 0, schema, "properties");
|
|
1368
1368
|
const required = new Set(
|
|
1369
|
-
|
|
1369
|
+
_chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
|
|
1381
1381
|
const star = required.has(name) ? "*" : "";
|
|
1382
|
-
const enumVals =
|
|
1382
|
+
const enumVals = _chunkQA55PGJHjs.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(", ")}]` : _chunkQA55PGJHjs.stringField.call(void 0, field, "type") || "string";
|
|
1386
|
+
const desc = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.recordField.call(void 0, tool, "documentation");
|
|
1392
|
+
const fields = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.recordField.call(void 0, _chunkQA55PGJHjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
|
|
1395
|
+
const example = _chunkQA55PGJHjs.stringField.call(void 0, grammar, "example");
|
|
1396
1396
|
const values = [
|
|
1397
|
-
...
|
|
1397
|
+
..._chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
|
|
1413
|
+
_chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.stringField.call(void 0, stream, "stream");
|
|
1420
|
+
const cols = _chunkQA55PGJHjs.arrayField.call(void 0, stream, "columns").filter(_chunkQA55PGJHjs.isRecord).map((col) => _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.recordField.call(void 0, tool, "pricing");
|
|
1426
|
+
const byType = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
|
|
1438
1438
|
const credits = numberField(entry, "deepline_credits", "deeplineCredits");
|
|
1439
|
-
const display =
|
|
1439
|
+
const display = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.recordField.call(void 0, tool, "deploy");
|
|
1450
|
+
const toolId = _chunkQA55PGJHjs.stringField.call(void 0, tool, "toolId");
|
|
1451
|
+
const example = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
|
|
1457
1457
|
console.log(toolId);
|
|
1458
|
-
const displayName =
|
|
1458
|
+
const displayName = _chunkQA55PGJHjs.stringField.call(void 0, tool, "displayName");
|
|
1459
1459
|
if (displayName) console.log(`Best for: ${displayName}`);
|
|
1460
|
-
const description =
|
|
1460
|
+
const description = _chunkQA55PGJHjs.stringField.call(void 0, tool, "description");
|
|
1461
1461
|
if (description) console.log(`Description: ${description}`);
|
|
1462
|
-
const categories =
|
|
1462
|
+
const categories = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.isRecord.call(void 0, guidance) ? guidance : {};
|
|
1483
|
+
const toolGuidance = _chunkQA55PGJHjs.stringField.call(void 0, record, "tool");
|
|
1484
|
+
const providerGuidance = _chunkQA55PGJHjs.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 (_chunkQA55PGJHjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1492
1492
|
printMonitorTypeContract(tool, requestedToolId);
|
|
1493
1493
|
return;
|
|
1494
1494
|
}
|
|
1495
|
-
const contract =
|
|
1495
|
+
const contract = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
|
|
1502
|
+
const getters = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1506
|
+
_chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
|
|
1524
|
+
const message = _chunkQA55PGJHjs.stringField.call(void 0, deprecation, "message");
|
|
1525
|
+
const replacementToolId = _chunkQA55PGJHjs.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 (!_chunkQA55PGJHjs.isRecord.call(void 0, field)) continue;
|
|
1549
|
+
const name = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1553
|
+
const description = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
|
|
1569
|
+
const starterPath = _chunkQA55PGJHjs.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 (_chunkQA55PGJHjs.isRecord.call(void 0, entry))
|
|
1581
1581
|
console.log(
|
|
1582
|
-
`- ${
|
|
1582
|
+
`- ${_chunkQA55PGJHjs.stringField.call(void 0, entry, "name")}: ${_chunkQA55PGJHjs.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 (_chunkQA55PGJHjs.isRecord.call(void 0, entry))
|
|
1588
1588
|
console.log(
|
|
1589
|
-
`- ${
|
|
1589
|
+
`- ${_chunkQA55PGJHjs.stringField.call(void 0, entry, "name")}: ${_chunkQA55PGJHjs.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 (_chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1605
|
+
const pricingModel = _chunkQA55PGJHjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
|
|
1606
|
+
const billing = _chunkQA55PGJHjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunkQA55PGJHjs.stringField.call(void 0, cost, "billingSource") || _chunkQA55PGJHjs.stringField.call(void 0, cost, "billingMode") || "unknown";
|
|
1607
|
+
const explicitUnit = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.stringField.call(void 0, cost, "displayText");
|
|
1612
|
+
const summary = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.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 (_chunkQA55PGJHjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1633
1633
|
printMonitorTypeFilters(tool);
|
|
1634
1634
|
printMonitorTypeStreams(tool);
|
|
1635
1635
|
return;
|
|
1636
1636
|
}
|
|
1637
|
-
const contract =
|
|
1637
|
+
const contract = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1644
|
+
_chunkQA55PGJHjs.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
|
+
_chunkQA55PGJHjs.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 (_chunkQA55PGJHjs.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 (_chunkQA55PGJHjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1684
1684
|
printMonitorTypeDeploy(tool);
|
|
1685
1685
|
return;
|
|
1686
1686
|
}
|
|
1687
|
-
if (
|
|
1687
|
+
if (_chunkQA55PGJHjs.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 _chunkQA55PGJHjs.arrayField.call(void 0, tool, "variants").filter(_chunkQA55PGJHjs.isRecord)) {
|
|
1692
|
+
const describeCommand = _chunkQA55PGJHjs.stringField.call(void 0, variant, "describeCommand");
|
|
1693
1693
|
if (describeCommand) console.log(` ${describeCommand}`);
|
|
1694
1694
|
}
|
|
1695
1695
|
return;
|
|
1696
1696
|
}
|
|
1697
|
-
if (
|
|
1697
|
+
if (_chunkQA55PGJHjs.isPlayLikeTool.call(void 0, tool)) {
|
|
1698
1698
|
printPlayLikeToolUsage(tool, requestedToolId);
|
|
1699
1699
|
return;
|
|
1700
1700
|
}
|
|
1701
|
-
const contract =
|
|
1701
|
+
const contract = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.arrayField.call(void 0, tool, "examples").filter(_chunkQA55PGJHjs.isRecord);
|
|
1710
1710
|
const firstExample = examples[0];
|
|
1711
|
-
const sampleInput = firstExample &&
|
|
1711
|
+
const sampleInput = firstExample && _chunkQA55PGJHjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunkQA55PGJHjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.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(_chunkQA55PGJHjs.isRecord);
|
|
1729
1729
|
if (firstGetter) {
|
|
1730
|
-
const name =
|
|
1731
|
-
const expression =
|
|
1730
|
+
const name = _chunkQA55PGJHjs.stringField.call(void 0, firstGetter, "name") || "value";
|
|
1731
|
+
const expression = _chunkQA55PGJHjs.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
|
+
_chunkQA55PGJHjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1739
|
+
_chunkQA55PGJHjs.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) => _chunkQA55PGJHjs.isRecord.call(void 0, entry) && arrayNames.has(_chunkQA55PGJHjs.stringField.call(void 0, entry, "name"))
|
|
1744
|
+
), () => ( listGetters.find(_chunkQA55PGJHjs.isRecord)));
|
|
1745
|
+
if (_chunkQA55PGJHjs.isRecord.call(void 0, firstList)) {
|
|
1746
|
+
const name = safeIdentifier(_chunkQA55PGJHjs.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 = ${_chunkQA55PGJHjs.playResultExpression.call(void 0, firstList)};`);
|
|
1749
1749
|
} else {
|
|
1750
|
-
console.log(`const ${name}_ds = ${
|
|
1750
|
+
console.log(`const ${name}_ds = ${_chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.toolInputFieldsForDisplay.call(void 0,
|
|
1776
|
+
_chunkQA55PGJHjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
|
|
1777
1777
|
);
|
|
1778
|
-
const sampleInput =
|
|
1779
|
-
const playReference =
|
|
1778
|
+
const sampleInput = _chunkQA55PGJHjs.samplePayloadForInputFields.call(void 0, inputFields);
|
|
1779
|
+
const playReference = _chunkQA55PGJHjs.playReferenceForTool.call(void 0, tool);
|
|
1780
1780
|
console.log("Run as a play:");
|
|
1781
1781
|
console.log(
|
|
1782
|
-
|
|
1782
|
+
_chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.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 (_chunkQA55PGJHjs.isRecord.call(void 0, entry))
|
|
1811
1811
|
console.log(
|
|
1812
|
-
`- ${
|
|
1812
|
+
`- ${_chunkQA55PGJHjs.stringField.call(void 0, entry, "name")}: ${_chunkQA55PGJHjs.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 (_chunkQA55PGJHjs.isRecord.call(void 0, entry))
|
|
1821
1821
|
console.log(
|
|
1822
|
-
`- ${
|
|
1822
|
+
`- ${_chunkQA55PGJHjs.stringField.call(void 0, entry, "name")}: ${_chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.recordField.call(void 0, record, "pricing");
|
|
1861
|
+
const displayText = _chunkQA55PGJHjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
1862
|
+
if (_chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.toolOutputFieldsForDisplay.call(void 0,
|
|
1869
|
+
_chunkQA55PGJHjs.recordField.call(void 0, _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.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 (_chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.isRecord.call(void 0, field.items) ? field.items : null;
|
|
1891
|
+
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.recordField.call(void 0,
|
|
1905
|
+
_chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.recordField.call(void 0,
|
|
1911
|
+
_chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.stringField.call(void 0, batchCapability, "status") || "unknown";
|
|
1917
|
+
const surface = _chunkQA55PGJHjs.stringField.call(void 0, batchCapability, "surface");
|
|
1918
|
+
const operation = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.arrayField.call(void 0,
|
|
1948
1948
|
executionMetadata,
|
|
1949
1949
|
"configuredRateLimits",
|
|
1950
1950
|
"configured_rate_limits"
|
|
1951
|
-
).filter(
|
|
1951
|
+
).filter(_chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.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)}${_chunkPGRRMVQ5js.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
|
|
1971
1971
|
);
|
|
1972
1972
|
}
|
|
1973
1973
|
}
|
|
1974
|
-
const queueHint =
|
|
1974
|
+
const queueHint = _chunkQA55PGJHjs.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 (!_chunkQA55PGJHjs.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 _chunkQA55PGJHjs.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 (!_chunkQA55PGJHjs.isRecord.call(void 0, rawResponse)) return [];
|
|
2011
2011
|
const candidates = [
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2012
|
+
_chunkQA55PGJHjs.recordField.call(void 0, _chunkQA55PGJHjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
|
|
2013
|
+
_chunkQA55PGJHjs.recordField.call(void 0,
|
|
2014
|
+
_chunkQA55PGJHjs.recordField.call(void 0, _chunkQA55PGJHjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
|
|
2015
2015
|
"meta"
|
|
2016
2016
|
),
|
|
2017
|
-
|
|
2018
|
-
|
|
2017
|
+
_chunkQA55PGJHjs.recordField.call(void 0, rawResponse, "meta"),
|
|
2018
|
+
_chunkQA55PGJHjs.recordField.call(void 0, _chunkQA55PGJHjs.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 (_chunkQA55PGJHjs.isRecord.call(void 0, warning)) {
|
|
2028
|
+
const message = _chunkQA55PGJHjs.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 (!_chunkQA55PGJHjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
|
|
2037
|
+
const toolResponse = _chunkQA55PGJHjs.recordField.call(void 0, rawResponse, "toolResponse");
|
|
2038
|
+
const raw = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.recordField.call(void 0, raw, "next");
|
|
2041
|
+
const getActorRun = _chunkQA55PGJHjs.recordField.call(void 0, next, "getActorRun");
|
|
2042
|
+
const getActorRunTool = _chunkQA55PGJHjs.stringField.call(void 0, getActorRun, "tool");
|
|
2043
|
+
const getActorRunPayload = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.recordField.call(void 0, next, "getDatasetItems");
|
|
2048
|
+
const getDatasetItemsTool = _chunkQA55PGJHjs.stringField.call(void 0, getDatasetItems, "tool");
|
|
2049
|
+
const getDatasetItemsPayload = _chunkQA55PGJHjs.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 : _chunkQA55PGJHjs.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 (!_chunkQA55PGJHjs.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
|
+
_chunk7HOYKXVYjs.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 = _chunkQA55PGJHjs.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
|
+
..._chunkQA55PGJHjs.isRecord.call(void 0, input.rawResponse) && _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.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 (_chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.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 : _chunkQA55PGJHjs.isRecord.call(void 0, group) ? Object.entries(group).map(([name, getter]) => ({
|
|
2548
2548
|
name,
|
|
2549
2549
|
...getter
|
|
2550
2550
|
})) : [];
|
|
@@ -2569,13 +2569,15 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2569
2569
|
}
|
|
2570
2570
|
function writeToolReceipt(input) {
|
|
2571
2571
|
const { response, metadata } = input;
|
|
2572
|
-
const envelope =
|
|
2572
|
+
const envelope = _chunkQA55PGJHjs.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 = _chunkQA55PGJHjs.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
|
|
2578
|
-
|
|
2577
|
+
const billing = _chunkQA55PGJHjs.recordField.call(void 0, envelope, "billing");
|
|
2578
|
+
const charged = billing.credits_charged;
|
|
2579
|
+
const credentialSource = _chunkQA55PGJHjs.stringField.call(void 0, billing, "credential_source");
|
|
2580
|
+
_chunkLYJ2NSHDjs.writeExecutionOutput.call(void 0,
|
|
2579
2581
|
{
|
|
2580
2582
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2581
2583
|
status,
|
|
@@ -2584,6 +2586,7 @@ function writeToolReceipt(input) {
|
|
|
2584
2586
|
complete: null,
|
|
2585
2587
|
declared: declaredOutputs(metadata, envelope, data),
|
|
2586
2588
|
credits: typeof charged === "number" ? charged : null,
|
|
2589
|
+
...credentialSource ? { credentialSource } : {},
|
|
2587
2590
|
warnings: [
|
|
2588
2591
|
..._nullishCoalesce(input.warnings, () => ( [])),
|
|
2589
2592
|
...extractToolExecutionWarningMessages(response)
|
|
@@ -2606,8 +2609,8 @@ async function executeToolForReceipt(input) {
|
|
|
2606
2609
|
let retryKey = null;
|
|
2607
2610
|
let received = false;
|
|
2608
2611
|
try {
|
|
2609
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2610
|
-
const client = new (0,
|
|
2612
|
+
const cliInvocationId = _nullishCoalesce(_chunkABH6PUDZjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkABH6PUDZjs.beginToolExecuteCommand.call(void 0, )));
|
|
2613
|
+
const client = new (0, _chunkUYCBG75Hjs.DeeplineClient)();
|
|
2611
2614
|
const metadata = assertExecutableToolMetadata(
|
|
2612
2615
|
toolId,
|
|
2613
2616
|
await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
|
|
@@ -2629,9 +2632,9 @@ async function executeToolForReceipt(input) {
|
|
|
2629
2632
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2630
2633
|
..._optionalChain([metadata, 'access', _37 => _37.executionMetadata, 'optionalAccess', _38 => _38.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2631
2634
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2632
|
-
searchRef:
|
|
2635
|
+
searchRef: _chunk7JMCRYXUjs.recentSearchRef.call(void 0, toolId),
|
|
2633
2636
|
cliInvocationId,
|
|
2634
|
-
onResponseReceived:
|
|
2637
|
+
onResponseReceived: _chunkLYJ2NSHDjs.recordApiResponse
|
|
2635
2638
|
});
|
|
2636
2639
|
const response = await call(key).catch((error) => {
|
|
2637
2640
|
if (!key || !refusedRetryKey(error)) throw error;
|
|
@@ -2667,11 +2670,11 @@ async function executeToolForReceipt(input) {
|
|
|
2667
2670
|
if (received) throw error;
|
|
2668
2671
|
const outcomeKnown = answeredWithFailure(error);
|
|
2669
2672
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _39 => _39.discard, 'call', _40 => _40()]);
|
|
2670
|
-
|
|
2673
|
+
_chunkLYJ2NSHDjs.writeExecutionOutput.call(void 0,
|
|
2671
2674
|
{
|
|
2672
2675
|
id: outcomeKnown ? null : key,
|
|
2673
2676
|
status: "failed",
|
|
2674
|
-
error:
|
|
2677
|
+
error: _chunkOOGP737Ijs.errorToJsonPayload.call(void 0, error).error,
|
|
2675
2678
|
...key && !outcomeKnown ? {
|
|
2676
2679
|
next: {
|
|
2677
2680
|
retry: "Run the same command again: it picks up this call without paying twice."
|
|
@@ -2703,11 +2706,11 @@ function answeredWithFailure(error) {
|
|
|
2703
2706
|
!(error.code === "IDEMPOTENCY_NOT_SUPPORTED" && !serverBodyHasCode(_optionalChain([error, 'access', _43 => _43.details, 'optionalAccess', _44 => _44.response]), "IDEMPOTENCY_NOT_SUPPORTED"));
|
|
2704
2707
|
}
|
|
2705
2708
|
async function getToolExecutionReceipt(key, output) {
|
|
2706
|
-
const client = new (0,
|
|
2709
|
+
const client = new (0, _chunkUYCBG75Hjs.DeeplineClient)();
|
|
2707
2710
|
const execution = await client.executions.getByKey(key);
|
|
2708
2711
|
output.label = `${execution.toolId} (tool)`;
|
|
2709
2712
|
if (execution.response === void 0) {
|
|
2710
|
-
|
|
2713
|
+
_chunkLYJ2NSHDjs.writeExecutionOutput.call(void 0,
|
|
2711
2714
|
{
|
|
2712
2715
|
id: key,
|
|
2713
2716
|
status: execution.executionRecovery.state,
|
|
@@ -2736,19 +2739,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2736
2739
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2737
2740
|
} catch (error) {
|
|
2738
2741
|
if (wantsJson) {
|
|
2739
|
-
|
|
2742
|
+
_chunkOOGP737Ijs.printJsonError.call(void 0, error);
|
|
2740
2743
|
} else {
|
|
2741
2744
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2742
2745
|
}
|
|
2743
2746
|
return error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2744
2747
|
}
|
|
2745
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2748
|
+
const cliInvocationId = _nullishCoalesce(_chunkABH6PUDZjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkABH6PUDZjs.beginToolExecuteCommand.call(void 0, )));
|
|
2746
2749
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2747
|
-
const tracing =
|
|
2750
|
+
const tracing = _chunkNKUXW4WBjs.isCliTraceEnabled.call(void 0, );
|
|
2748
2751
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2749
|
-
const client = new (0,
|
|
2752
|
+
const client = new (0, _chunkUYCBG75Hjs.DeeplineClient)();
|
|
2750
2753
|
if (clientStartedAt !== void 0) {
|
|
2751
|
-
|
|
2754
|
+
_chunkNKUXW4WBjs.recordCliTrace.call(void 0, {
|
|
2752
2755
|
phase: "cli.tool_execute_client_setup",
|
|
2753
2756
|
ms: performance.now() - clientStartedAt
|
|
2754
2757
|
});
|
|
@@ -2757,13 +2760,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2757
2760
|
const readMetadata = async () => {
|
|
2758
2761
|
if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2759
2762
|
try {
|
|
2760
|
-
metadata = await
|
|
2763
|
+
metadata = await _chunkABH6PUDZjs.runToolExecuteStage.call(void 0,
|
|
2761
2764
|
"tool metadata lookup",
|
|
2762
2765
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2763
2766
|
);
|
|
2764
2767
|
} catch (error) {
|
|
2765
2768
|
if (isMissingToolMetadataError(error)) {
|
|
2766
|
-
const play = await
|
|
2769
|
+
const play = await _chunkABH6PUDZjs.runToolExecuteStage.call(void 0,
|
|
2767
2770
|
"play alias lookup",
|
|
2768
2771
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2769
2772
|
);
|
|
@@ -2786,7 +2789,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2786
2789
|
toolMetadata = await readMetadata();
|
|
2787
2790
|
} catch (error) {
|
|
2788
2791
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2789
|
-
if (wantsJson)
|
|
2792
|
+
if (wantsJson) _chunkOOGP737Ijs.printJsonError.call(void 0, error);
|
|
2790
2793
|
else console.error(error.message);
|
|
2791
2794
|
return 2;
|
|
2792
2795
|
}
|
|
@@ -2814,7 +2817,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2814
2817
|
assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2815
2818
|
} catch (error) {
|
|
2816
2819
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2817
|
-
if (wantsJson)
|
|
2820
|
+
if (wantsJson) _chunkOOGP737Ijs.printJsonError.call(void 0, error);
|
|
2818
2821
|
else console.error(error.message);
|
|
2819
2822
|
return 2;
|
|
2820
2823
|
}
|
|
@@ -2826,7 +2829,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2826
2829
|
metadata = await readMetadata();
|
|
2827
2830
|
} catch (error) {
|
|
2828
2831
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2829
|
-
if (wantsJson)
|
|
2832
|
+
if (wantsJson) _chunkOOGP737Ijs.printJsonError.call(void 0, error);
|
|
2830
2833
|
else console.error(error.message);
|
|
2831
2834
|
return 2;
|
|
2832
2835
|
}
|
|
@@ -2842,7 +2845,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2842
2845
|
metadata = await readMetadata();
|
|
2843
2846
|
} catch (error) {
|
|
2844
2847
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2845
|
-
if (wantsJson)
|
|
2848
|
+
if (wantsJson) _chunkOOGP737Ijs.printJsonError.call(void 0, error);
|
|
2846
2849
|
else console.error(error.message);
|
|
2847
2850
|
return 2;
|
|
2848
2851
|
}
|
|
@@ -2869,11 +2872,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2869
2872
|
...parsed.connection !== void 0 ? { connection: parsed.connection } : {},
|
|
2870
2873
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2871
2874
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2872
|
-
searchRef:
|
|
2875
|
+
searchRef: _chunk7JMCRYXUjs.recentSearchRef.call(void 0, parsed.toolId),
|
|
2873
2876
|
cliInvocationId,
|
|
2874
|
-
onResponseReceived:
|
|
2877
|
+
onResponseReceived: _chunkLYJ2NSHDjs.recordApiResponse,
|
|
2875
2878
|
...tracing ? {
|
|
2876
|
-
onServerTiming: (serverTiming) =>
|
|
2879
|
+
onServerTiming: (serverTiming) => _chunkNKUXW4WBjs.recordCliTrace.call(void 0, {
|
|
2877
2880
|
phase: "tool_execute_server_timing",
|
|
2878
2881
|
cliInvocationId,
|
|
2879
2882
|
serverTiming,
|
|
@@ -2884,13 +2887,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2884
2887
|
let rawResponse;
|
|
2885
2888
|
let successfulCompatibilityResponse;
|
|
2886
2889
|
try {
|
|
2887
|
-
const executeResult = await
|
|
2890
|
+
const executeResult = await _chunkABH6PUDZjs.runToolExecuteStage.call(void 0,
|
|
2888
2891
|
"execute request",
|
|
2889
2892
|
async () => {
|
|
2890
2893
|
try {
|
|
2891
2894
|
if (tracing) {
|
|
2892
2895
|
submissionStartedAt = performance.now();
|
|
2893
|
-
|
|
2896
|
+
_chunkNKUXW4WBjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2894
2897
|
}
|
|
2895
2898
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2896
2899
|
...executeOptions,
|
|
@@ -2900,34 +2903,34 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2900
2903
|
} catch (error) {
|
|
2901
2904
|
if (parsed.connection !== void 0 || !(error instanceof _chunkLFQJW4S2js.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2902
2905
|
throw error;
|
|
2903
|
-
const baseUrl =
|
|
2906
|
+
const baseUrl = _chunkTVAFWAOQjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2904
2907
|
if (maintenancePolicy !== "off") {
|
|
2905
|
-
|
|
2908
|
+
_chunkY2ND6PPWjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2906
2909
|
}
|
|
2907
2910
|
const preflight = deferredCompatibility ? await deferredCompatibility.result.catch(() => null) : null;
|
|
2908
|
-
const compatibilityResponse = _optionalChain([preflight, 'optionalAccess', _50 => _50.live]) === true ? preflight.response : await
|
|
2911
|
+
const compatibilityResponse = _optionalChain([preflight, 'optionalAccess', _50 => _50.live]) === true ? preflight.response : await _chunkABH6PUDZjs.runToolExecuteStage.call(void 0,
|
|
2909
2912
|
"SDK compatibility",
|
|
2910
|
-
() =>
|
|
2913
|
+
() => _chunkY2ND6PPWjs.requireSdkCompatibility.call(void 0, baseUrl, {
|
|
2911
2914
|
command: "tools execute",
|
|
2912
|
-
skillsVersion:
|
|
2915
|
+
skillsVersion: _chunkTVAFWAOQjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2913
2916
|
persistCache: maintenancePolicy !== "off"
|
|
2914
2917
|
})
|
|
2915
2918
|
);
|
|
2916
2919
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _51 => _51.readMetadata, 'call', _52 => _52()]), () => ( metadata));
|
|
2917
|
-
if (maintenancePolicy !== "off" && await
|
|
2920
|
+
if (maintenancePolicy !== "off" && await _chunkABH6PUDZjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2918
2921
|
compatibilityResponse,
|
|
2919
2922
|
baseUrl,
|
|
2920
2923
|
maintenancePolicy
|
|
2921
2924
|
)) {
|
|
2922
2925
|
return void 0;
|
|
2923
2926
|
}
|
|
2924
|
-
|
|
2927
|
+
_chunkY2ND6PPWjs.enforceSdkCompatibilityResponse.call(void 0, compatibilityResponse, {
|
|
2925
2928
|
quietAdvisory: wantsJson
|
|
2926
2929
|
});
|
|
2927
2930
|
if (maintenancePolicy !== "off") {
|
|
2928
|
-
await
|
|
2931
|
+
await _chunkABH6PUDZjs.runToolExecuteStage.call(void 0,
|
|
2929
2932
|
"agent skills sync",
|
|
2930
|
-
() =>
|
|
2933
|
+
() => _chunkY2ND6PPWjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2931
2934
|
update: _optionalChain([compatibilityResponse, 'optionalAccess', _53 => _53.skills]),
|
|
2932
2935
|
mode: "detached"
|
|
2933
2936
|
})
|
|
@@ -2936,7 +2939,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2936
2939
|
const legacyMetadata = await readMetadata();
|
|
2937
2940
|
if (tracing) {
|
|
2938
2941
|
submissionStartedAt = performance.now();
|
|
2939
|
-
|
|
2942
|
+
_chunkNKUXW4WBjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2940
2943
|
}
|
|
2941
2944
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2942
2945
|
...executeOptions,
|
|
@@ -2959,8 +2962,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2959
2962
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2960
2963
|
const updateRequiredBeforeExecution = error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2961
2964
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2962
|
-
const baseUrl =
|
|
2963
|
-
if (await
|
|
2965
|
+
const baseUrl = _chunkTVAFWAOQjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2966
|
+
if (await _chunkABH6PUDZjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2964
2967
|
compatibility.response,
|
|
2965
2968
|
baseUrl,
|
|
2966
2969
|
maintenancePolicy
|
|
@@ -2984,7 +2987,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2984
2987
|
}
|
|
2985
2988
|
}
|
|
2986
2989
|
if (failure instanceof _chunkLFQJW4S2js.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2987
|
-
if (wantsJson)
|
|
2990
|
+
if (wantsJson) _chunkOOGP737Ijs.printJsonError.call(void 0, failure);
|
|
2988
2991
|
else console.error(failure.message);
|
|
2989
2992
|
return 2;
|
|
2990
2993
|
}
|
|
@@ -3011,9 +3014,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3011
3014
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
3012
3015
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _60 => _60.auto_update]);
|
|
3013
3016
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _61 => _61.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
3014
|
-
await
|
|
3017
|
+
await _chunkABH6PUDZjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
3015
3018
|
compatibilityResponse,
|
|
3016
|
-
|
|
3019
|
+
_chunkTVAFWAOQjs.resolveConfig.call(void 0, ).baseUrl,
|
|
3017
3020
|
maintenancePolicy
|
|
3018
3021
|
);
|
|
3019
3022
|
}
|
|
@@ -3031,8 +3034,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3031
3034
|
);
|
|
3032
3035
|
}
|
|
3033
3036
|
}
|
|
3034
|
-
const responseMetadata =
|
|
3035
|
-
|
|
3037
|
+
const responseMetadata = _chunkQA55PGJHjs.recordField.call(void 0,
|
|
3038
|
+
_chunkQA55PGJHjs.recordField.call(void 0, rawResponse, "_metadata"),
|
|
3036
3039
|
"tool"
|
|
3037
3040
|
);
|
|
3038
3041
|
const listOutputPaths = responseMetadata.listOutputPaths;
|
|
@@ -3044,11 +3047,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3044
3047
|
await readMetadata()
|
|
3045
3048
|
);
|
|
3046
3049
|
}
|
|
3047
|
-
if (
|
|
3050
|
+
if (_chunkQA55PGJHjs.isRecord.call(void 0, rawResponse)) {
|
|
3048
3051
|
const { _metadata, ...execution } = rawResponse;
|
|
3049
3052
|
rawResponse = execution;
|
|
3050
3053
|
}
|
|
3051
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
3054
|
+
const { listConversion, summary, baseEnvelope } = await _chunkABH6PUDZjs.runToolExecuteStage.call(void 0,
|
|
3052
3055
|
"result formatting",
|
|
3053
3056
|
async () => {
|
|
3054
3057
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -3083,9 +3086,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3083
3086
|
}
|
|
3084
3087
|
skillsSyncAttempted = true;
|
|
3085
3088
|
try {
|
|
3086
|
-
await
|
|
3089
|
+
await _chunkABH6PUDZjs.runToolExecuteStage.call(void 0,
|
|
3087
3090
|
"agent skills sync",
|
|
3088
|
-
() =>
|
|
3091
|
+
() => _chunkY2ND6PPWjs.syncSdkSkillsIfNeeded.call(void 0, _chunkTVAFWAOQjs.resolveConfig.call(void 0, ).baseUrl, {
|
|
3089
3092
|
update: deliveredCompatibilityResponse.skills,
|
|
3090
3093
|
mode: "detached"
|
|
3091
3094
|
})
|
|
@@ -3096,15 +3099,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3096
3099
|
);
|
|
3097
3100
|
}
|
|
3098
3101
|
};
|
|
3099
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
3102
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkOOGP737Ijs.printCommandEnvelope.call(void 0, envelope, {
|
|
3100
3103
|
...options2,
|
|
3101
3104
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
3102
3105
|
});
|
|
3103
3106
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
3104
3107
|
await syncSkillsForDeliveredOutput();
|
|
3105
|
-
|
|
3108
|
+
_chunkOOGP737Ijs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
3106
3109
|
};
|
|
3107
|
-
const delivered = await
|
|
3110
|
+
const delivered = await _chunkABH6PUDZjs.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
3108
3111
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
3109
3112
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
3110
3113
|
return true;
|
|
@@ -3117,7 +3120,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3117
3120
|
await printDeliveredJsonEnvelope({
|
|
3118
3121
|
...baseEnvelope,
|
|
3119
3122
|
local: {
|
|
3120
|
-
...
|
|
3123
|
+
..._chunkQA55PGJHjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
|
|
3121
3124
|
payload_file: jsonPath
|
|
3122
3125
|
}
|
|
3123
3126
|
});
|
|
@@ -3133,7 +3136,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3133
3136
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3134
3137
|
);
|
|
3135
3138
|
if (wantsJson) {
|
|
3136
|
-
|
|
3139
|
+
_chunkOOGP737Ijs.printJsonError.call(void 0, error);
|
|
3137
3140
|
} else {
|
|
3138
3141
|
console.error(error.message);
|
|
3139
3142
|
}
|
|
@@ -3228,13 +3231,13 @@ inspect: ${inspection.inspect}
|
|
|
3228
3231
|
return true;
|
|
3229
3232
|
});
|
|
3230
3233
|
if (delivered) {
|
|
3231
|
-
await
|
|
3234
|
+
await _chunkABH6PUDZjs.runToolExecuteStage.call(void 0,
|
|
3232
3235
|
"acknowledge delivery",
|
|
3233
3236
|
() => recovery.acknowledgeDelivery()
|
|
3234
3237
|
);
|
|
3235
3238
|
}
|
|
3236
3239
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3237
|
-
|
|
3240
|
+
_chunkY2ND6PPWjs.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3238
3241
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _64 => _64.auto_update, 'optionalAccess', _65 => _65.should_auto_update]) === true
|
|
3239
3242
|
});
|
|
3240
3243
|
}
|