deepline 0.3.578 → 0.3.580
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 +20 -2
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/billing/public-pricing.ts +470 -15
- package/dist/bundling-sources/shared_libs/monitors/billing/tamradar.ts +12 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +59 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +5 -3
- 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 +182 -80
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +39 -2
- 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-BF5VX5ZB.js} +31 -31
- package/dist/cli/{agents-LRBANBZH.mjs → agents-JRFTZE7G.mjs} +4 -4
- package/dist/cli/auth-25MVD7TK.js +44 -0
- package/dist/cli/{auth-5BJKVYMQ.mjs → auth-XJXZ64R4.mjs} +5 -5
- package/dist/cli/{billing-EBBI4MVL.mjs → billing-TXJBGP2I.mjs} +69 -64
- package/dist/cli/{billing-NT57POHH.js → billing-VGMTJI7W.js} +158 -153
- package/dist/cli/{chunk-XBO4ERH6.js → chunk-2ZCFAUCV.js} +3 -3
- package/dist/cli/{chunk-P35YQAUC.js → chunk-3OSNEWGR.js} +281 -275
- package/dist/cli/{chunk-7J473OJ5.mjs → chunk-3P4QZIJ5.mjs} +1 -1
- package/dist/cli/{chunk-SKHUWQZE.js → chunk-3S5KFHQH.js} +17 -7
- package/dist/cli/{chunk-4LMTY4RQ.mjs → chunk-3ZBPXNSW.mjs} +2 -2
- package/dist/cli/{chunk-H7DY5NQ3.mjs → chunk-5BPJW6X5.mjs} +5 -5
- package/dist/cli/{chunk-A7NKOXBV.js → chunk-6VSUP4WN.js} +4 -4
- package/dist/cli/{chunk-4KNRCUKY.mjs → chunk-7HOG3JZE.mjs} +21 -15
- package/dist/cli/{chunk-OAQYLTUN.mjs → chunk-7ORX33JX.mjs} +5 -5
- package/dist/cli/{chunk-24FGR73C.js → chunk-ANX3PYLT.js} +13 -13
- package/dist/cli/{chunk-VVZ7JZMQ.js → chunk-APJ7IPRT.js} +15 -15
- package/dist/cli/{chunk-MXPCTF57.js → chunk-AZTQJJH7.js} +17 -2
- package/dist/cli/{chunk-3GF33QJJ.mjs → chunk-BAXLPQTM.mjs} +4 -4
- package/dist/cli/{chunk-DDJN4RR6.mjs → chunk-BK4Z62CF.mjs} +4 -4
- package/dist/cli/{chunk-IFWB4BYZ.mjs → chunk-C6YXUGX2.mjs} +3 -3
- package/dist/cli/{chunk-J7PCSLRY.js → chunk-COAAKSFX.js} +5 -5
- package/dist/cli/{chunk-Y2TK7OXN.js → chunk-D6I7QWOZ.js} +2 -2
- package/dist/cli/{chunk-W47SXEWQ.js → chunk-DQEHBAHL.js} +9 -9
- package/dist/cli/{chunk-ITYSPUKD.mjs → chunk-EI7KTESB.mjs} +2 -2
- package/dist/cli/{chunk-HZXF2HFF.mjs → chunk-FCJJPEKN.mjs} +5 -5
- package/dist/cli/{chunk-NEH7NZFT.js → chunk-GDBNH57Z.js} +10 -10
- package/dist/cli/{chunk-CFG3ZM7M.mjs → chunk-GE4ZEMMA.mjs} +2 -2
- package/dist/cli/{chunk-4YSJOSBG.mjs → chunk-GIZIWNL5.mjs} +1 -1
- package/dist/cli/{chunk-PJXPHUAR.mjs → chunk-H3B6QM6V.mjs} +3 -3
- package/dist/cli/{chunk-25SSGQJJ.js → chunk-HEZ24K5F.js} +2 -2
- package/dist/cli/{chunk-LYZPGP3P.mjs → chunk-HLMF53HZ.mjs} +1 -1
- package/dist/cli/{chunk-T2CCLYHV.mjs → chunk-IERWFFDB.mjs} +7 -7
- package/dist/cli/{chunk-CFLAGRWL.mjs → chunk-IG3CXIJY.mjs} +1 -1
- package/dist/cli/{chunk-ALXYCC4K.mjs → chunk-IM322G7M.mjs} +1 -1
- package/dist/cli/{chunk-RW3URFZK.mjs → chunk-KLBIHDZB.mjs} +2 -2
- package/dist/cli/{chunk-VMCJKGZS.mjs → chunk-LC4ETCOA.mjs} +2 -2
- package/dist/cli/{chunk-CS36W3RL.js → chunk-LHV3HPAY.js} +26 -26
- package/dist/cli/{chunk-CPNTDIJK.js → chunk-MBOPKQJF.js} +1 -1
- package/dist/cli/{chunk-BPMA4S3O.js → chunk-MCYZO3RB.js} +21 -21
- package/dist/cli/{chunk-JQPFICW3.mjs → chunk-MEDA3STC.mjs} +1 -1
- package/dist/cli/{chunk-ZO65VJRJ.js → chunk-MOZDEYQC.js} +11 -1
- package/dist/cli/{chunk-6UFTWNC5.mjs → chunk-MP6XUVAJ.mjs} +2 -2
- package/dist/cli/{chunk-HGQT6EGK.js → chunk-NNWEQDZR.js} +20 -20
- package/dist/cli/{chunk-AZFSCPYK.mjs → chunk-NV5IJ3NY.mjs} +17 -2
- package/dist/cli/{chunk-QPOJLAFT.mjs → chunk-O7AWGIDD.mjs} +2 -2
- package/dist/cli/{chunk-G7PH2QVM.js → chunk-PFNYLTCZ.js} +5 -5
- package/dist/cli/{chunk-DWUESXDD.mjs → chunk-QXQBTTRD.mjs} +11 -1
- package/dist/cli/{chunk-5IMWXYVB.js → chunk-R77IVVEZ.js} +53 -53
- package/dist/cli/{chunk-MXK4M7HP.js → chunk-S2YKIWCD.js} +17 -17
- package/dist/cli/{chunk-FYKHAT2F.mjs → chunk-SECFDB27.mjs} +10 -0
- package/dist/cli/{chunk-NTHN7ODR.mjs → chunk-SQBSK74D.mjs} +7 -3
- package/dist/cli/{chunk-M3ITWEGS.js → chunk-TSOXJZSW.js} +41 -41
- package/dist/cli/{chunk-CSPOWVWS.mjs → chunk-U4VCAECC.mjs} +8 -3
- package/dist/cli/{chunk-RLPPLS6A.js → chunk-URZPR54R.js} +6 -6
- package/dist/cli/{chunk-27HAQRGH.js → chunk-V5NDHTBB.js} +23 -23
- package/dist/cli/{chunk-HKZN33F2.mjs → chunk-VF3EGTHU.mjs} +3 -3
- package/dist/cli/{chunk-5LCV36BR.js → chunk-VOQWPUIF.js} +20 -20
- package/dist/cli/{chunk-3ZUKYLC6.js → chunk-WJUAVMQC.js} +217 -213
- package/dist/cli/{chunk-W66GXHYR.mjs → chunk-X5RXG6VS.mjs} +1 -1
- package/dist/cli/{chunk-UKSOIH2P.js → chunk-XFVJ3JNA.js} +5 -5
- package/dist/cli/{chunk-RWDYULX2.js → chunk-XQUVLYOL.js} +17 -12
- package/dist/cli/{chunk-XE66BGLB.js → chunk-YY6EB252.js} +2 -2
- package/dist/cli/{chunk-XX7TZM4N.js → chunk-Z6DERGHY.js} +48 -48
- package/dist/cli/{chunk-PXMCPEE2.js → chunk-ZADJC22U.js} +3 -3
- package/dist/cli/{chunk-4CNHOBUO.mjs → chunk-ZR7PDXIA.mjs} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/concurrent-runs-help-DEN63DUM.js +22 -0
- package/dist/cli/{concurrent-runs-help-2MHLIUC6.mjs → concurrent-runs-help-DSUQRWZQ.mjs} +6 -6
- package/dist/cli/{csv-RYYDAC76.js → csv-HSHF6JYZ.js} +13 -13
- package/dist/cli/{csv-J6SRBMOT.mjs → csv-QNXJBT5T.mjs} +4 -4
- package/dist/cli/{db-WK226TM7.mjs → db-RAWY3SWS.mjs} +6 -6
- package/dist/cli/{db-5QLH6QK5.js → db-VHYWVLLU.js} +27 -27
- package/dist/cli/{describe-UBSCFPH5.mjs → describe-WZOVHWAM.mjs} +21 -21
- package/dist/cli/describe-YHZ2EGBQ.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-AGV5V7SD.js → executions-DQIFH4Z6.js} +8 -8
- package/dist/cli/{executions-XF5BNCFS.mjs → executions-QABOXV4K.mjs} +6 -6
- package/dist/cli/{feedback-3RDEZE2M.js → feedback-6IER2W4G.js} +14 -14
- package/dist/cli/{feedback-LT3PDK72.mjs → feedback-DW4O63DG.mjs} +6 -6
- package/dist/cli/{git-7VBTCCBV.mjs → git-3NAPGZGR.mjs} +5 -5
- package/dist/cli/git-SQ2MAKAH.js +26 -0
- package/dist/cli/index.js +148 -148
- package/dist/cli/index.mjs +47 -47
- package/dist/cli/{integrations-JP732FQB.js → integrations-5LHIBBXB.js} +29 -29
- package/dist/cli/{integrations-E7QRWMKZ.mjs → integrations-TSRUTENK.mjs} +7 -7
- package/dist/cli/{legacy-noops-UFNQBPIT.mjs → legacy-noops-4N63A6H7.mjs} +6 -6
- package/dist/cli/{legacy-noops-UTL4W5WE.js → legacy-noops-S22XGYGN.js} +9 -9
- package/dist/cli/{mcp-YHETA3AU.mjs → mcp-4EJHRRFV.mjs} +4 -4
- package/dist/cli/{mcp-5X4XFB4V.js → mcp-JERBGJYE.js} +24 -24
- package/dist/cli/{monitors-WFVZ42OQ.mjs → monitors-7BTLBD6S.mjs} +16 -11
- package/dist/cli/{monitors-AN6KH4XY.js → monitors-FF35CGC4.js} +109 -104
- package/dist/cli/{org-CN3XJZLA.js → org-ADCDO7KU.js} +121 -121
- package/dist/cli/{org-OMDV7WDF.mjs → org-QYIIBKA2.mjs} +6 -6
- package/dist/cli/{outcomes-7HCZ6K3Q.js → outcomes-2LW4GK2L.js} +14 -14
- package/dist/cli/{outcomes-I4ZTG5ND.mjs → outcomes-C5DIBG4Q.mjs} +6 -6
- package/dist/cli/{play-TSNBSHGA.mjs → play-DTTDTISL.mjs} +20 -20
- package/dist/cli/{play-45VXZ57A.js → play-S5MZ2GRA.js} +349 -349
- package/dist/cli/{providers-4TB56ZLK.mjs → providers-AXOEFQ6Q.mjs} +6 -6
- package/dist/cli/{providers-RB3TT7AE.js → providers-N2IWEJBW.js} +9 -9
- package/dist/cli/{quickstart-XHZ3PG5I.mjs → quickstart-ADWSZBV6.mjs} +4 -4
- package/dist/cli/{quickstart-ZNDM6VUD.js → quickstart-UC5AJZWU.js} +6 -6
- package/dist/cli/{run-XNEJGAKV.js → run-6TDYUL7L.js} +49 -48
- package/dist/cli/{run-7PY4G6GB.mjs → run-R2FVH3K6.mjs} +27 -26
- package/dist/cli/{search-BG7KCIOG.mjs → search-GRHUFSLY.mjs} +7 -7
- package/dist/cli/search-V7ANBX3J.js +32 -0
- package/dist/cli/{search-output-3ZBNTHGO.js → search-output-O7NY3VMD.js} +8 -8
- package/dist/cli/{search-output-TWKKP2BE.mjs → search-output-UPQNAFAF.mjs} +5 -5
- package/dist/cli/{secrets-FNR6MX6A.js → secrets-72GJHFER.js} +15 -15
- package/dist/cli/{secrets-AZZCE7E3.mjs → secrets-NKAEJLIQ.mjs} +6 -6
- package/dist/cli/sessions-EO6RTMUC.js +23 -0
- package/dist/cli/{sessions-ZAMKN3AF.mjs → sessions-VIMF3UF5.mjs} +6 -6
- package/dist/cli/{settings-QGASFWV3.js → settings-HFAW5HIF.js} +85 -85
- package/dist/cli/{settings-WKWOOOI2.mjs → settings-KCQHBFNZ.mjs} +12 -12
- package/dist/cli/{setup-KUZDCR3F.js → setup-2MHWGEAD.js} +49 -49
- package/dist/cli/{setup-U36W42LE.mjs → setup-2ZD5ZIUH.mjs} +9 -9
- package/dist/cli/skills-ID6KKDLH.js +37 -0
- package/dist/cli/{skills-25CSZQIK.mjs → skills-X2DZZG5P.mjs} +7 -7
- package/dist/cli/tools-7UY7GERW.js +57 -0
- package/dist/cli/{tools-4NZQ22AA.mjs → tools-KPTOWKD4.mjs} +19 -19
- package/dist/cli/{update-CJYP36TG.mjs → update-6PMQCEUP.mjs} +9 -9
- package/dist/cli/update-T2RDLLSY.js +37 -0
- package/dist/cli/{views-76UIPWJD.js → views-MNBHNO6C.js} +37 -24
- package/dist/cli/{views-GYGE7FSV.mjs → views-VRZ5CTFL.mjs} +21 -8
- package/dist/cli/{workflow-LZSWALZS.mjs → workflow-7JUJWA5S.mjs} +7 -7
- package/dist/cli/{workflow-NCVXBATM.js → workflow-SSMFO7YE.js} +17 -17
- package/dist/{client-CF-bsrtI.d.mts → client-CmG8MT0x.d.mts} +1 -1
- package/dist/{client-BrdMPFCM.d.ts → client-QznpkWrk.d.ts} +1 -1
- package/dist/{client-core-rMoUWSYM.d.ts → client-core-CXDqfeiB.d.ts} +12 -1
- package/dist/{client-core-DM1ZedOG.d.mts → client-core-CY0jNW0e.d.mts} +12 -1
- 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 _chunkXQUVLYOLjs = require('./chunk-XQUVLYOL.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 _chunkAPJ7IPRTjs = require('./chunk-APJ7IPRT.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkGDBNH57Zjs = require('./chunk-GDBNH57Z.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 _chunk3S5KFHQHjs = require('./chunk-3S5KFHQH.js');
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkMOZDEYQCjs = require('./chunk-MOZDEYQC.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 _chunkXFVJ3JNAjs = require('./chunk-XFVJ3JNA.js');
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
var
|
|
63
|
+
var _chunkWJUAVMQCjs = require('./chunk-WJUAVMQC.js');
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
var
|
|
70
|
+
var _chunkV5NDHTBBjs = require('./chunk-V5NDHTBB.js');
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
var
|
|
75
|
+
var _chunkHEZ24K5Fjs = require('./chunk-HEZ24K5F.js');
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
var
|
|
82
|
+
var _chunkZ6DERGHYjs = require('./chunk-Z6DERGHY.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 _chunkNNWEQDZRjs = require('./chunk-NNWEQDZR.js');
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
var
|
|
96
|
+
var _chunk2ZCFAUCVjs = require('./chunk-2ZCFAUCV.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 = _chunk2ZCFAUCVjs.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
|
+
_chunk2ZCFAUCVjs.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 (_chunk3S5KFHQHjs.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: _chunk3S5KFHQHjs.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 = _chunk3S5KFHQHjs.recordField.call(void 0,
|
|
515
515
|
tool,
|
|
516
516
|
"inputSchema",
|
|
517
517
|
"input_schema"
|
|
518
518
|
);
|
|
519
|
-
return
|
|
519
|
+
return _chunk3S5KFHQHjs.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 = _chunk3S5KFHQHjs.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: _chunk3S5KFHQHjs.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 = _chunk3S5KFHQHjs.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 = _chunk3S5KFHQHjs.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 = _chunk3S5KFHQHjs.stringField.call(void 0, pricing, "summary");
|
|
547
547
|
if (summary) return summary;
|
|
548
|
-
const displayText =
|
|
548
|
+
const displayText = _chunk3S5KFHQHjs.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, _chunkXFVJ3JNAjs.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
|
+
_chunkNNWEQDZRjs.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
|
+
_chunkNNWEQDZRjs.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
|
+
_chunkNNWEQDZRjs.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(_chunkNNWEQDZRjs.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, _chunkXFVJ3JNAjs.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
|
+
_chunkNNWEQDZRjs.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, _chunkXFVJ3JNAjs.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
|
+
_chunkNNWEQDZRjs.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 || _chunkNNWEQDZRjs.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
|
+
_chunkNNWEQDZRjs.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, _chunkXFVJ3JNAjs.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
|
+
_chunkNNWEQDZRjs.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 || _chunkNNWEQDZRjs.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 ? _chunk3S5KFHQHjs.playReferenceForTool.call(void 0, tool) : null;
|
|
876
|
+
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunk3S5KFHQHjs.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
|
+
_chunkAPJ7IPRTjs.registerIntegrationBalanceCommand.call(void 0, tools, true);
|
|
917
|
+
_chunkAPJ7IPRTjs.registerWorkspaceConnectionListCommand.call(void 0, tools, "workspace-connections", true);
|
|
918
|
+
_chunkAPJ7IPRTjs.registerLegacyHubSpotMembersCommand.call(void 0, tools, true);
|
|
919
|
+
_chunkAPJ7IPRTjs.registerLegacyWorkspaceConnectionCommand.call(void 0, tools, true);
|
|
920
|
+
_chunkAPJ7IPRTjs.registerLegacyCalendarDelegationCommand.call(void 0, tools, true);
|
|
921
|
+
_chunkAPJ7IPRTjs.registerLegacyAvailabilityCalendarsCommand.call(void 0, tools, true);
|
|
922
|
+
_chunkAPJ7IPRTjs.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
|
+
_chunkGDBNH57Zjs.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
|
+
_chunkV5NDHTBBjs.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-YHZ2EGBQ.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
|
+
_chunkXQUVLYOLjs.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
|
+
_chunkHEZ24K5Fjs.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 = _chunk2ZCFAUCVjs.resolveConfig.call(void 0, ).baseUrl;
|
|
1153
|
+
_chunkHEZ24K5Fjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1154
|
+
const result = _chunkV5NDHTBBjs.runToolExecuteStage.call(void 0,
|
|
1155
1155
|
"SDK compatibility",
|
|
1156
|
-
() =>
|
|
1156
|
+
() => _chunkZ6DERGHYjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1157
1157
|
command: "tools execute",
|
|
1158
|
-
skillsVersion:
|
|
1158
|
+
skillsVersion: _chunk2ZCFAUCVjs.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
|
+
_chunkHEZ24K5Fjs.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
|
+
_chunkHEZ24K5Fjs.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, _chunkXFVJ3JNAjs.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
|
+
_chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
|
|
1256
1256
|
{
|
|
1257
1257
|
toolId: String(tool.toolId || toolId),
|
|
1258
|
-
cost:
|
|
1258
|
+
cost: _chunk3S5KFHQHjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1259
1259
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1260
|
-
...
|
|
1260
|
+
..._chunk3S5KFHQHjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunk3S5KFHQHjs.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) && !_chunk3S5KFHQHjs.isMonitorTypeTool.call(void 0, tool) && !_chunk3S5KFHQHjs.isMonitorVariantIndex.call(void 0, tool) && !_chunk3S5KFHQHjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
|
|
1272
|
+
const contract = _chunk3S5KFHQHjs.toolContractJsonForDescribe.call(void 0,
|
|
1273
1273
|
tool,
|
|
1274
1274
|
toolId,
|
|
1275
1275
|
void 0,
|
|
1276
1276
|
seedToolListScript
|
|
1277
1277
|
);
|
|
1278
|
-
|
|
1278
|
+
_chunkNNWEQDZRjs.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
|
+
_chunkNNWEQDZRjs.printCompactJson.call(void 0, {
|
|
1302
|
+
..._chunk3S5KFHQHjs.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
|
+
_chunkNNWEQDZRjs.printCompactJson.call(void 0, {
|
|
1316
|
+
..._chunk3S5KFHQHjs.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
|
+
${_chunk3S5KFHQHjs.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
|
+
${_chunk3S5KFHQHjs.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 = _chunk3S5KFHQHjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
|
|
1367
|
+
const properties = _chunk3S5KFHQHjs.recordField.call(void 0, schema, "properties");
|
|
1368
1368
|
const required = new Set(
|
|
1369
|
-
|
|
1369
|
+
_chunk3S5KFHQHjs.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 = _chunk3S5KFHQHjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
|
|
1381
1381
|
const star = required.has(name) ? "*" : "";
|
|
1382
|
-
const enumVals =
|
|
1382
|
+
const enumVals = _chunk3S5KFHQHjs.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(", ")}]` : _chunk3S5KFHQHjs.stringField.call(void 0, field, "type") || "string";
|
|
1386
|
+
const desc = _chunk3S5KFHQHjs.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 = _chunk3S5KFHQHjs.recordField.call(void 0, tool, "documentation");
|
|
1392
|
+
const fields = _chunk3S5KFHQHjs.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 = _chunk3S5KFHQHjs.recordField.call(void 0, _chunk3S5KFHQHjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
|
|
1395
|
+
const example = _chunk3S5KFHQHjs.stringField.call(void 0, grammar, "example");
|
|
1396
1396
|
const values = [
|
|
1397
|
-
...
|
|
1397
|
+
..._chunk3S5KFHQHjs.arrayField.call(void 0, grammar, "examples").filter(
|
|
1398
1398
|
(value) => typeof value === "string" && Boolean(value)
|
|
1399
1399
|
),
|
|
1400
1400
|
...example ? [example] : []
|
|
@@ -1409,34 +1409,37 @@ function printMonitorTypeFilterExamples(tool) {
|
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
1411
|
function printMonitorTypeStreams(tool) {
|
|
1412
|
-
const streams =
|
|
1413
|
-
|
|
1412
|
+
const streams = _chunk3S5KFHQHjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
|
|
1413
|
+
_chunk3S5KFHQHjs.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 = _chunk3S5KFHQHjs.stringField.call(void 0, stream, "stream");
|
|
1420
|
+
const cols = _chunk3S5KFHQHjs.arrayField.call(void 0, stream, "columns").filter(_chunk3S5KFHQHjs.isRecord).map((col) => _chunk3S5KFHQHjs.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 = _chunk3S5KFHQHjs.recordField.call(void 0, tool, "pricing");
|
|
1426
|
+
const byType = _chunk3S5KFHQHjs.recordField.call(void 0,
|
|
1427
1427
|
pricing,
|
|
1428
1428
|
"pricing_by_radar_type",
|
|
1429
1429
|
"pricingByRadarType"
|
|
1430
1430
|
);
|
|
1431
1431
|
const keys = Object.keys(byType);
|
|
1432
1432
|
if (!keys.length) {
|
|
1433
|
-
|
|
1433
|
+
const sentence = _chunk3S5KFHQHjs.stringField.call(void 0, pricing, "display") || _chunk3S5KFHQHjs.stringField.call(void 0, pricing, "customer_visible");
|
|
1434
|
+
return [
|
|
1435
|
+
sentence ? `Pricing: ${sentence}` : "Pricing: Deepline credits per accepted event"
|
|
1436
|
+
];
|
|
1434
1437
|
}
|
|
1435
1438
|
const lines = ["Pricing (Deepline credits per accepted event):"];
|
|
1436
1439
|
for (const key of keys) {
|
|
1437
|
-
const entry =
|
|
1440
|
+
const entry = _chunk3S5KFHQHjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
|
|
1438
1441
|
const credits = numberField(entry, "deepline_credits", "deeplineCredits");
|
|
1439
|
-
const display =
|
|
1442
|
+
const display = _chunk3S5KFHQHjs.stringField.call(void 0, entry, "display");
|
|
1440
1443
|
const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "not listed");
|
|
1441
1444
|
lines.push(`- ${key}: ${shown}`);
|
|
1442
1445
|
}
|
|
@@ -1446,20 +1449,20 @@ function printMonitorTypePricing(tool) {
|
|
|
1446
1449
|
for (const line of monitorTypePricingLines(tool)) console.log(line);
|
|
1447
1450
|
}
|
|
1448
1451
|
function printMonitorTypeDeploy(tool) {
|
|
1449
|
-
const deploy =
|
|
1450
|
-
const toolId =
|
|
1451
|
-
const example =
|
|
1452
|
+
const deploy = _chunk3S5KFHQHjs.recordField.call(void 0, tool, "deploy");
|
|
1453
|
+
const toolId = _chunk3S5KFHQHjs.stringField.call(void 0, tool, "toolId");
|
|
1454
|
+
const example = _chunk3S5KFHQHjs.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
|
|
1452
1455
|
console.log("Deploy (a monitor type is deployed, not executed):");
|
|
1453
1456
|
console.log(` ${example}`);
|
|
1454
1457
|
}
|
|
1455
1458
|
function printMonitorTypeContract(tool, requestedToolId) {
|
|
1456
|
-
const toolId =
|
|
1459
|
+
const toolId = _chunk3S5KFHQHjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
|
|
1457
1460
|
console.log(toolId);
|
|
1458
|
-
const displayName =
|
|
1461
|
+
const displayName = _chunk3S5KFHQHjs.stringField.call(void 0, tool, "displayName");
|
|
1459
1462
|
if (displayName) console.log(`Best for: ${displayName}`);
|
|
1460
|
-
const description =
|
|
1463
|
+
const description = _chunk3S5KFHQHjs.stringField.call(void 0, tool, "description");
|
|
1461
1464
|
if (description) console.log(`Description: ${description}`);
|
|
1462
|
-
const categories =
|
|
1465
|
+
const categories = _chunk3S5KFHQHjs.arrayField.call(void 0, tool, "categories").filter(
|
|
1463
1466
|
(v) => typeof v === "string"
|
|
1464
1467
|
);
|
|
1465
1468
|
if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
|
|
@@ -1479,31 +1482,31 @@ function printMonitorTypeContract(tool, requestedToolId) {
|
|
|
1479
1482
|
console.log(`More: deepline describe ${toolId}`);
|
|
1480
1483
|
}
|
|
1481
1484
|
function toolGuidanceLines(guidance) {
|
|
1482
|
-
const record =
|
|
1483
|
-
const toolGuidance =
|
|
1484
|
-
const providerGuidance =
|
|
1485
|
+
const record = _chunk3S5KFHQHjs.isRecord.call(void 0, guidance) ? guidance : {};
|
|
1486
|
+
const toolGuidance = _chunk3S5KFHQHjs.stringField.call(void 0, record, "tool");
|
|
1487
|
+
const providerGuidance = _chunk3S5KFHQHjs.stringField.call(void 0, record, "provider");
|
|
1485
1488
|
return [
|
|
1486
1489
|
...toolGuidance ? [`- This tool: ${toolGuidance}`] : [],
|
|
1487
1490
|
...providerGuidance ? [`- Provider: ${providerGuidance}`] : []
|
|
1488
1491
|
];
|
|
1489
1492
|
}
|
|
1490
1493
|
function printCompactToolContract(tool, requestedToolId) {
|
|
1491
|
-
if (
|
|
1494
|
+
if (_chunk3S5KFHQHjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1492
1495
|
printMonitorTypeContract(tool, requestedToolId);
|
|
1493
1496
|
return;
|
|
1494
1497
|
}
|
|
1495
|
-
const contract =
|
|
1498
|
+
const contract = _chunk3S5KFHQHjs.toolContractJsonForDescribe.call(void 0,
|
|
1496
1499
|
tool,
|
|
1497
1500
|
requestedToolId,
|
|
1498
1501
|
void 0,
|
|
1499
1502
|
seedToolListScript
|
|
1500
1503
|
);
|
|
1501
|
-
const cost =
|
|
1502
|
-
const getters =
|
|
1504
|
+
const cost = _chunk3S5KFHQHjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
|
|
1505
|
+
const getters = _chunk3S5KFHQHjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1503
1506
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1504
1507
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1505
|
-
const inputFields =
|
|
1506
|
-
|
|
1508
|
+
const inputFields = _chunk3S5KFHQHjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1509
|
+
_chunk3S5KFHQHjs.recordField.call(void 0, contract, "inputSchema")
|
|
1507
1510
|
);
|
|
1508
1511
|
console.log(String(contract.toolId));
|
|
1509
1512
|
if (contract.displayName) console.log(`Best for: ${contract.displayName}`);
|
|
@@ -1520,9 +1523,9 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1520
1523
|
printToolOutputArrayShape(contract);
|
|
1521
1524
|
printToolExecutionHints(contract);
|
|
1522
1525
|
if (contract.deprecated === true) {
|
|
1523
|
-
const deprecation =
|
|
1524
|
-
const message =
|
|
1525
|
-
const replacementToolId =
|
|
1526
|
+
const deprecation = _chunk3S5KFHQHjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
|
|
1527
|
+
const message = _chunk3S5KFHQHjs.stringField.call(void 0, deprecation, "message");
|
|
1528
|
+
const replacementToolId = _chunk3S5KFHQHjs.stringField.call(void 0,
|
|
1526
1529
|
deprecation,
|
|
1527
1530
|
"replacementToolId",
|
|
1528
1531
|
"replacement_tool_id"
|
|
@@ -1545,12 +1548,12 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1545
1548
|
console.log("");
|
|
1546
1549
|
console.log("Inputs:");
|
|
1547
1550
|
for (const field of inputFields) {
|
|
1548
|
-
if (!
|
|
1549
|
-
const name =
|
|
1551
|
+
if (!_chunk3S5KFHQHjs.isRecord.call(void 0, field)) continue;
|
|
1552
|
+
const name = _chunk3S5KFHQHjs.stringField.call(void 0, field, "name");
|
|
1550
1553
|
if (!name) continue;
|
|
1551
1554
|
const required = field.required ? "*" : "";
|
|
1552
|
-
const type =
|
|
1553
|
-
const description =
|
|
1555
|
+
const type = _chunk3S5KFHQHjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1556
|
+
const description = _chunk3S5KFHQHjs.stringField.call(void 0, field, "description");
|
|
1554
1557
|
const enumValues = Array.isArray(field.enum) ? field.enum : [];
|
|
1555
1558
|
const enumSuffix = enumValues.length ? ` enum=${enumValues.map(String).join("|")}` : "";
|
|
1556
1559
|
const itemBoundsSuffix = arrayItemBoundsSuffix(field);
|
|
@@ -1565,8 +1568,8 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1565
1568
|
}
|
|
1566
1569
|
console.log("");
|
|
1567
1570
|
printToolExamplesOnly(tool, requestedToolId);
|
|
1568
|
-
const starterScript =
|
|
1569
|
-
const starterPath =
|
|
1571
|
+
const starterScript = _chunk3S5KFHQHjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
|
|
1572
|
+
const starterPath = _chunk3S5KFHQHjs.stringField.call(void 0, starterScript, "path");
|
|
1570
1573
|
if (starterPath) {
|
|
1571
1574
|
console.log("");
|
|
1572
1575
|
console.log(`Starter script: ${starterPath}`);
|
|
@@ -1577,16 +1580,16 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1577
1580
|
console.log("Getters:");
|
|
1578
1581
|
if (listGetters.length) console.log(listGetterHeading());
|
|
1579
1582
|
for (const entry of listGetters) {
|
|
1580
|
-
if (
|
|
1583
|
+
if (_chunk3S5KFHQHjs.isRecord.call(void 0, entry))
|
|
1581
1584
|
console.log(
|
|
1582
|
-
`- ${
|
|
1585
|
+
`- ${_chunk3S5KFHQHjs.stringField.call(void 0, entry, "name")}: ${_chunk3S5KFHQHjs.playResultExpression.call(void 0, entry)}`
|
|
1583
1586
|
);
|
|
1584
1587
|
}
|
|
1585
1588
|
if (valueGetters.length) console.log("Values:");
|
|
1586
1589
|
for (const entry of valueGetters) {
|
|
1587
|
-
if (
|
|
1590
|
+
if (_chunk3S5KFHQHjs.isRecord.call(void 0, entry))
|
|
1588
1591
|
console.log(
|
|
1589
|
-
`- ${
|
|
1592
|
+
`- ${_chunk3S5KFHQHjs.stringField.call(void 0, entry, "name")}: ${_chunk3S5KFHQHjs.playResultExpression.call(void 0, entry)}`
|
|
1590
1593
|
);
|
|
1591
1594
|
}
|
|
1592
1595
|
}
|
|
@@ -1597,22 +1600,22 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1597
1600
|
console.log(`More: deepline describe ${contract.toolId}`);
|
|
1598
1601
|
}
|
|
1599
1602
|
function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
1600
|
-
if (
|
|
1603
|
+
if (_chunk3S5KFHQHjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1601
1604
|
return monitorTypePricingLines(tool);
|
|
1602
1605
|
}
|
|
1603
1606
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1604
|
-
const cost =
|
|
1605
|
-
const pricingModel =
|
|
1606
|
-
const billing =
|
|
1607
|
-
const explicitUnit =
|
|
1607
|
+
const cost = _chunk3S5KFHQHjs.Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1608
|
+
const pricingModel = _chunk3S5KFHQHjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
|
|
1609
|
+
const billing = _chunk3S5KFHQHjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunk3S5KFHQHjs.stringField.call(void 0, cost, "billingSource") || _chunk3S5KFHQHjs.stringField.call(void 0, cost, "billingMode") || "unknown";
|
|
1610
|
+
const explicitUnit = _chunk3S5KFHQHjs.stringField.call(void 0, cost, "unit");
|
|
1608
1611
|
const unit = explicitUnit || (pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit");
|
|
1609
1612
|
const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
|
|
1610
1613
|
const usd = numberField(cost, "deeplineUsdPerPricingUnit");
|
|
1611
|
-
const displayText =
|
|
1612
|
-
const summary =
|
|
1614
|
+
const displayText = _chunk3S5KFHQHjs.stringField.call(void 0, cost, "displayText");
|
|
1615
|
+
const summary = _chunk3S5KFHQHjs.stringField.call(void 0, cost, "summary");
|
|
1613
1616
|
const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
|
|
1614
1617
|
const reference = cost.observedReference;
|
|
1615
|
-
const observedMax =
|
|
1618
|
+
const observedMax = _chunk3S5KFHQHjs.observedMaxText.call(void 0, cost);
|
|
1616
1619
|
return [
|
|
1617
1620
|
`${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
|
|
1618
1621
|
...observedMax ? [` ${observedMax}`] : [],
|
|
@@ -1629,19 +1632,19 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
|
1629
1632
|
console.log(line);
|
|
1630
1633
|
}
|
|
1631
1634
|
function printToolSchemaOnly(tool, requestedToolId) {
|
|
1632
|
-
if (
|
|
1635
|
+
if (_chunk3S5KFHQHjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1633
1636
|
printMonitorTypeFilters(tool);
|
|
1634
1637
|
printMonitorTypeStreams(tool);
|
|
1635
1638
|
return;
|
|
1636
1639
|
}
|
|
1637
|
-
const contract =
|
|
1640
|
+
const contract = _chunk3S5KFHQHjs.toolContractJsonForDescribe.call(void 0,
|
|
1638
1641
|
tool,
|
|
1639
1642
|
requestedToolId,
|
|
1640
1643
|
void 0,
|
|
1641
1644
|
seedToolListScript
|
|
1642
1645
|
);
|
|
1643
|
-
const inputFields =
|
|
1644
|
-
|
|
1646
|
+
const inputFields = _chunk3S5KFHQHjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1647
|
+
_chunk3S5KFHQHjs.recordField.call(void 0, contract, "inputSchema")
|
|
1645
1648
|
);
|
|
1646
1649
|
console.log(`Schema: ${contract.toolId}`);
|
|
1647
1650
|
if (!inputFields.length) {
|
|
@@ -1668,37 +1671,37 @@ function printToolSchemaOnly(tool, requestedToolId) {
|
|
|
1668
1671
|
}
|
|
1669
1672
|
printToolOutputArrayShape(contract);
|
|
1670
1673
|
const declaredSchema = declaredToolJsonSchema(
|
|
1671
|
-
|
|
1674
|
+
_chunk3S5KFHQHjs.recordField.call(void 0, contract, "inputSchema")
|
|
1672
1675
|
);
|
|
1673
1676
|
if (declaredSchema) {
|
|
1674
1677
|
console.log("Declared input JSON Schema:");
|
|
1675
1678
|
console.log(JSON.stringify(declaredSchema, null, 2));
|
|
1676
1679
|
}
|
|
1677
|
-
if (
|
|
1680
|
+
if (_chunk3S5KFHQHjs.isRecord.call(void 0, contract.responseSchema)) {
|
|
1678
1681
|
console.log("Deepline execution response JSON Schema:");
|
|
1679
1682
|
console.log(JSON.stringify(contract.responseSchema, null, 2));
|
|
1680
1683
|
}
|
|
1681
1684
|
}
|
|
1682
1685
|
function printToolExamplesOnly(tool, requestedToolId) {
|
|
1683
|
-
if (
|
|
1686
|
+
if (_chunk3S5KFHQHjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1684
1687
|
printMonitorTypeDeploy(tool);
|
|
1685
1688
|
return;
|
|
1686
1689
|
}
|
|
1687
|
-
if (
|
|
1690
|
+
if (_chunk3S5KFHQHjs.isMonitorVariantIndex.call(void 0, tool)) {
|
|
1688
1691
|
console.log(
|
|
1689
1692
|
`${requestedToolId} is deployed as one monitor type per radar type. Describe one for its example:`
|
|
1690
1693
|
);
|
|
1691
|
-
for (const variant of
|
|
1692
|
-
const describeCommand =
|
|
1694
|
+
for (const variant of _chunk3S5KFHQHjs.arrayField.call(void 0, tool, "variants").filter(_chunk3S5KFHQHjs.isRecord)) {
|
|
1695
|
+
const describeCommand = _chunk3S5KFHQHjs.stringField.call(void 0, variant, "describeCommand");
|
|
1693
1696
|
if (describeCommand) console.log(` ${describeCommand}`);
|
|
1694
1697
|
}
|
|
1695
1698
|
return;
|
|
1696
1699
|
}
|
|
1697
|
-
if (
|
|
1700
|
+
if (_chunk3S5KFHQHjs.isPlayLikeTool.call(void 0, tool)) {
|
|
1698
1701
|
printPlayLikeToolUsage(tool, requestedToolId);
|
|
1699
1702
|
return;
|
|
1700
1703
|
}
|
|
1701
|
-
const contract =
|
|
1704
|
+
const contract = _chunk3S5KFHQHjs.toolContractJsonForDescribe.call(void 0,
|
|
1702
1705
|
tool,
|
|
1703
1706
|
requestedToolId,
|
|
1704
1707
|
void 0,
|
|
@@ -1706,9 +1709,9 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1706
1709
|
);
|
|
1707
1710
|
const toolId = String(contract.toolId);
|
|
1708
1711
|
const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
|
|
1709
|
-
const examples =
|
|
1712
|
+
const examples = _chunk3S5KFHQHjs.arrayField.call(void 0, tool, "examples").filter(_chunk3S5KFHQHjs.isRecord);
|
|
1710
1713
|
const firstExample = examples[0];
|
|
1711
|
-
const sampleInput = firstExample &&
|
|
1714
|
+
const sampleInput = firstExample && _chunk3S5KFHQHjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunk3S5KFHQHjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunk3S5KFHQHjs.samplePayloadForInputFields.call(void 0, inputFields)));
|
|
1712
1715
|
console.log("Example input payload:");
|
|
1713
1716
|
console.log(JSON.stringify(sampleInput, null, 2));
|
|
1714
1717
|
console.log(`Use in a play:`);
|
|
@@ -1722,32 +1725,32 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1722
1725
|
);
|
|
1723
1726
|
console.log("});");
|
|
1724
1727
|
console.log("const response = result.toolResponse.rawV2;");
|
|
1725
|
-
const getters =
|
|
1728
|
+
const getters = _chunk3S5KFHQHjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1726
1729
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1727
1730
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1728
|
-
const firstGetter = valueGetters.find(
|
|
1731
|
+
const firstGetter = valueGetters.find(_chunk3S5KFHQHjs.isRecord);
|
|
1729
1732
|
if (firstGetter) {
|
|
1730
|
-
const name =
|
|
1731
|
-
const expression =
|
|
1733
|
+
const name = _chunk3S5KFHQHjs.stringField.call(void 0, firstGetter, "name") || "value";
|
|
1734
|
+
const expression = _chunk3S5KFHQHjs.stringField.call(void 0, firstGetter, "expression");
|
|
1732
1735
|
if (expression)
|
|
1733
1736
|
console.log(
|
|
1734
1737
|
`const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
|
|
1735
1738
|
);
|
|
1736
1739
|
}
|
|
1737
1740
|
const arrayNames = new Set(
|
|
1738
|
-
|
|
1739
|
-
|
|
1741
|
+
_chunk3S5KFHQHjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1742
|
+
_chunk3S5KFHQHjs.recordField.call(void 0, tool, "outputSchema", "output_schema")
|
|
1740
1743
|
).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
|
|
1741
1744
|
);
|
|
1742
1745
|
const firstList = _nullishCoalesce(listGetters.find(
|
|
1743
|
-
(entry) =>
|
|
1744
|
-
), () => ( listGetters.find(
|
|
1745
|
-
if (
|
|
1746
|
-
const name = safeIdentifier(
|
|
1746
|
+
(entry) => _chunk3S5KFHQHjs.isRecord.call(void 0, entry) && arrayNames.has(_chunk3S5KFHQHjs.stringField.call(void 0, entry, "name"))
|
|
1747
|
+
), () => ( listGetters.find(_chunk3S5KFHQHjs.isRecord)));
|
|
1748
|
+
if (_chunk3S5KFHQHjs.isRecord.call(void 0, firstList)) {
|
|
1749
|
+
const name = safeIdentifier(_chunk3S5KFHQHjs.stringField.call(void 0, firstList, "name") || "list");
|
|
1747
1750
|
if (_chunkJ33TSWO5js.playToolListGetterMode.call(void 0, ) === "array") {
|
|
1748
|
-
console.log(`const ${name}_rows = ${
|
|
1751
|
+
console.log(`const ${name}_rows = ${_chunk3S5KFHQHjs.playResultExpression.call(void 0, firstList)};`);
|
|
1749
1752
|
} else {
|
|
1750
|
-
console.log(`const ${name}_ds = ${
|
|
1753
|
+
console.log(`const ${name}_ds = ${_chunk3S5KFHQHjs.playResultExpression.call(void 0, firstList)};`);
|
|
1751
1754
|
console.log(
|
|
1752
1755
|
"// Complete small list from this response; throws above the memory cap."
|
|
1753
1756
|
);
|
|
@@ -1757,7 +1760,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1757
1760
|
console.log("```");
|
|
1758
1761
|
if (firstList) printListGetterConsumption();
|
|
1759
1762
|
for (const example of examples) {
|
|
1760
|
-
const description =
|
|
1763
|
+
const description = _chunk3S5KFHQHjs.stringField.call(void 0, example, "description");
|
|
1761
1764
|
if (description) console.log(description);
|
|
1762
1765
|
console.log("Example Deepline execution response:");
|
|
1763
1766
|
console.log(JSON.stringify(example.response, null, 2));
|
|
@@ -1772,14 +1775,14 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1772
1775
|
}
|
|
1773
1776
|
function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
1774
1777
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1775
|
-
const inputFields =
|
|
1776
|
-
|
|
1778
|
+
const inputFields = _chunk3S5KFHQHjs.toolInputFieldsForDisplay.call(void 0,
|
|
1779
|
+
_chunk3S5KFHQHjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
|
|
1777
1780
|
);
|
|
1778
|
-
const sampleInput =
|
|
1779
|
-
const playReference =
|
|
1781
|
+
const sampleInput = _chunk3S5KFHQHjs.samplePayloadForInputFields.call(void 0, inputFields);
|
|
1782
|
+
const playReference = _chunk3S5KFHQHjs.playReferenceForTool.call(void 0, tool);
|
|
1780
1783
|
console.log("Run as a play:");
|
|
1781
1784
|
console.log(
|
|
1782
|
-
|
|
1785
|
+
_chunk3S5KFHQHjs.playRunCommandForTool.call(void 0,
|
|
1783
1786
|
tool,
|
|
1784
1787
|
toolId,
|
|
1785
1788
|
Object.keys(sampleInput).length ? sampleInput : void 0
|
|
@@ -1790,13 +1793,13 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
|
1790
1793
|
}
|
|
1791
1794
|
}
|
|
1792
1795
|
function printToolGettersOnly(tool, requestedToolId) {
|
|
1793
|
-
const contract =
|
|
1796
|
+
const contract = _chunk3S5KFHQHjs.toolContractJsonForDescribe.call(void 0,
|
|
1794
1797
|
tool,
|
|
1795
1798
|
requestedToolId,
|
|
1796
1799
|
void 0,
|
|
1797
1800
|
seedToolListScript
|
|
1798
1801
|
);
|
|
1799
|
-
const getters =
|
|
1802
|
+
const getters = _chunk3S5KFHQHjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1800
1803
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1801
1804
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1802
1805
|
console.log(`Getters: ${contract.toolId}`);
|
|
@@ -1807,9 +1810,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1807
1810
|
if (listGetters.length) {
|
|
1808
1811
|
console.log(listGetterHeading());
|
|
1809
1812
|
for (const entry of listGetters) {
|
|
1810
|
-
if (
|
|
1813
|
+
if (_chunk3S5KFHQHjs.isRecord.call(void 0, entry))
|
|
1811
1814
|
console.log(
|
|
1812
|
-
`- ${
|
|
1815
|
+
`- ${_chunk3S5KFHQHjs.stringField.call(void 0, entry, "name")}: ${_chunk3S5KFHQHjs.playResultExpression.call(void 0, entry)}`
|
|
1813
1816
|
);
|
|
1814
1817
|
}
|
|
1815
1818
|
printListGetterConsumption();
|
|
@@ -1817,9 +1820,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1817
1820
|
if (valueGetters.length) {
|
|
1818
1821
|
console.log("Values:");
|
|
1819
1822
|
for (const entry of valueGetters) {
|
|
1820
|
-
if (
|
|
1823
|
+
if (_chunk3S5KFHQHjs.isRecord.call(void 0, entry))
|
|
1821
1824
|
console.log(
|
|
1822
|
-
`- ${
|
|
1825
|
+
`- ${_chunk3S5KFHQHjs.stringField.call(void 0, entry, "name")}: ${_chunk3S5KFHQHjs.playResultExpression.call(void 0, entry)}`
|
|
1823
1826
|
);
|
|
1824
1827
|
}
|
|
1825
1828
|
}
|
|
@@ -1857,22 +1860,22 @@ function listedToolDescription(tool) {
|
|
|
1857
1860
|
}
|
|
1858
1861
|
function formatListedToolCost(tool) {
|
|
1859
1862
|
const record = tool;
|
|
1860
|
-
const pricing =
|
|
1861
|
-
const displayText =
|
|
1862
|
-
if (
|
|
1863
|
+
const pricing = _chunk3S5KFHQHjs.recordField.call(void 0, record, "pricing");
|
|
1864
|
+
const displayText = _chunk3S5KFHQHjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
1865
|
+
if (_chunk3S5KFHQHjs.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
|
|
1863
1866
|
return `Cost: ${displayText || "Free"}`;
|
|
1864
1867
|
}
|
|
1865
1868
|
return displayText ? `Cost: ${displayText}` : "";
|
|
1866
1869
|
}
|
|
1867
1870
|
function printToolOutputArrayShape(tool) {
|
|
1868
|
-
const outputFields =
|
|
1869
|
-
|
|
1871
|
+
const outputFields = _chunk3S5KFHQHjs.toolOutputFieldsForDisplay.call(void 0,
|
|
1872
|
+
_chunk3S5KFHQHjs.recordField.call(void 0, _chunk3S5KFHQHjs.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
|
|
1870
1873
|
);
|
|
1871
1874
|
if (outputFields.length === 0) return;
|
|
1872
1875
|
console.log(" Output array shape (declared schema):");
|
|
1873
1876
|
for (const field of outputFields.slice(0, 60)) {
|
|
1874
1877
|
const name = String(field.name);
|
|
1875
|
-
const type =
|
|
1878
|
+
const type = _chunk3S5KFHQHjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1876
1879
|
const itemBounds = arrayItemBoundsSuffix(field);
|
|
1877
1880
|
console.log(` - ${name}: ${type}${itemBounds}`);
|
|
1878
1881
|
}
|
|
@@ -1881,14 +1884,14 @@ function printToolOutputArrayShape(tool) {
|
|
|
1881
1884
|
}
|
|
1882
1885
|
}
|
|
1883
1886
|
function declaredToolJsonSchema(inputSchema) {
|
|
1884
|
-
if (
|
|
1887
|
+
if (_chunk3S5KFHQHjs.isRecord.call(void 0, inputSchema.jsonSchema)) {
|
|
1885
1888
|
return inputSchema.jsonSchema;
|
|
1886
1889
|
}
|
|
1887
1890
|
return Array.isArray(inputSchema.fields) ? null : inputSchema;
|
|
1888
1891
|
}
|
|
1889
1892
|
function arrayItemBoundsSuffix(field) {
|
|
1890
|
-
const itemSchema =
|
|
1891
|
-
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type :
|
|
1893
|
+
const itemSchema = _chunk3S5KFHQHjs.isRecord.call(void 0, field.items) ? field.items : null;
|
|
1894
|
+
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunk3S5KFHQHjs.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
|
|
1892
1895
|
const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _16 => _16.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
|
|
1893
1896
|
const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
|
|
1894
1897
|
const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
|
|
@@ -1901,21 +1904,21 @@ function arrayItemBoundsSuffix(field) {
|
|
|
1901
1904
|
return itemTypeSuffix;
|
|
1902
1905
|
}
|
|
1903
1906
|
function printToolExecutionHints(value) {
|
|
1904
|
-
const batchCapabilityRecord =
|
|
1905
|
-
|
|
1907
|
+
const batchCapabilityRecord = _chunk3S5KFHQHjs.recordField.call(void 0,
|
|
1908
|
+
_chunk3S5KFHQHjs.isRecord.call(void 0, value) ? value : {},
|
|
1906
1909
|
"batchCapability",
|
|
1907
1910
|
"batch_capability"
|
|
1908
1911
|
);
|
|
1909
1912
|
const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
|
|
1910
|
-
const executionMetadata =
|
|
1911
|
-
|
|
1913
|
+
const executionMetadata = _chunk3S5KFHQHjs.recordField.call(void 0,
|
|
1914
|
+
_chunk3S5KFHQHjs.isRecord.call(void 0, value) ? value : {},
|
|
1912
1915
|
"executionMetadata",
|
|
1913
1916
|
"execution_metadata"
|
|
1914
1917
|
);
|
|
1915
1918
|
if (batchCapability) {
|
|
1916
|
-
const status =
|
|
1917
|
-
const surface =
|
|
1918
|
-
const operation =
|
|
1919
|
+
const status = _chunk3S5KFHQHjs.stringField.call(void 0, batchCapability, "status") || "unknown";
|
|
1920
|
+
const surface = _chunk3S5KFHQHjs.stringField.call(void 0, batchCapability, "surface");
|
|
1921
|
+
const operation = _chunk3S5KFHQHjs.stringField.call(void 0,
|
|
1919
1922
|
batchCapability,
|
|
1920
1923
|
"batchOperation",
|
|
1921
1924
|
"batch_operation"
|
|
@@ -1925,7 +1928,7 @@ function printToolExecutionHints(value) {
|
|
|
1925
1928
|
"maxBatchSize",
|
|
1926
1929
|
"max_batch_size"
|
|
1927
1930
|
);
|
|
1928
|
-
const notes =
|
|
1931
|
+
const notes = _chunk3S5KFHQHjs.stringField.call(void 0, batchCapability, "notes");
|
|
1929
1932
|
console.log("");
|
|
1930
1933
|
console.log("Batching:");
|
|
1931
1934
|
console.log(`- Catalog status: ${status}${surface ? ` (${surface})` : ""}`);
|
|
@@ -1944,11 +1947,11 @@ function printToolExecutionHints(value) {
|
|
|
1944
1947
|
}
|
|
1945
1948
|
if (notes) console.log(`- Details: ${notes}`);
|
|
1946
1949
|
}
|
|
1947
|
-
const configuredRateLimits =
|
|
1950
|
+
const configuredRateLimits = _chunk3S5KFHQHjs.arrayField.call(void 0,
|
|
1948
1951
|
executionMetadata,
|
|
1949
1952
|
"configuredRateLimits",
|
|
1950
1953
|
"configured_rate_limits"
|
|
1951
|
-
).filter(
|
|
1954
|
+
).filter(_chunk3S5KFHQHjs.isRecord);
|
|
1952
1955
|
if (configuredRateLimits.length > 0) {
|
|
1953
1956
|
console.log("");
|
|
1954
1957
|
console.log(
|
|
@@ -1958,7 +1961,7 @@ function printToolExecutionHints(value) {
|
|
|
1958
1961
|
const requests = numberField(limit, "requestsPerWindow");
|
|
1959
1962
|
const windowMs = numberField(limit, "windowMs");
|
|
1960
1963
|
if (requests === null || windowMs === null) continue;
|
|
1961
|
-
const usage =
|
|
1964
|
+
const usage = _chunk3S5KFHQHjs.stringField.call(void 0, limit, "usage") || "unknown";
|
|
1962
1965
|
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
1966
|
const explicitMaxConcurrency = numberField(
|
|
1964
1967
|
limit,
|
|
@@ -1967,11 +1970,11 @@ function printToolExecutionHints(value) {
|
|
|
1967
1970
|
);
|
|
1968
1971
|
const concurrencyText = explicitMaxConcurrency === null ? "no explicit concurrency limit" : `explicit concurrency limit ${explicitMaxConcurrency}`;
|
|
1969
1972
|
console.log(
|
|
1970
|
-
`- ${requests} requests per ${formatRateWindow(windowMs)}${
|
|
1973
|
+
`- ${requests} requests per ${formatRateWindow(windowMs)}${_chunkMOZDEYQCjs.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
|
|
1971
1974
|
);
|
|
1972
1975
|
}
|
|
1973
1976
|
}
|
|
1974
|
-
const queueHint =
|
|
1977
|
+
const queueHint = _chunk3S5KFHQHjs.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
|
|
1975
1978
|
const requestsPerSecondHint = numberField(
|
|
1976
1979
|
queueHint,
|
|
1977
1980
|
"requestsPerSecondHint",
|
|
@@ -1997,25 +2000,25 @@ function formatRateWindow(windowMs) {
|
|
|
1997
2000
|
}
|
|
1998
2001
|
function samplePayload(samples, key) {
|
|
1999
2002
|
const entry = samples[key];
|
|
2000
|
-
if (!
|
|
2003
|
+
if (!_chunk3S5KFHQHjs.isRecord.call(void 0, entry)) return void 0;
|
|
2001
2004
|
return Object.prototype.hasOwnProperty.call(entry, "payload") ? entry.payload : entry;
|
|
2002
2005
|
}
|
|
2003
2006
|
function commandEnvelopeFromRawResponse(rawResponse) {
|
|
2004
|
-
return
|
|
2007
|
+
return _chunk3S5KFHQHjs.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
|
|
2005
2008
|
}
|
|
2006
2009
|
function toolExecuteExitCode(envelope) {
|
|
2007
2010
|
return envelope.status === "failed" || envelope.ok === false ? 1 : 0;
|
|
2008
2011
|
}
|
|
2009
2012
|
function extractToolExecutionWarningMessages(rawResponse) {
|
|
2010
|
-
if (!
|
|
2013
|
+
if (!_chunk3S5KFHQHjs.isRecord.call(void 0, rawResponse)) return [];
|
|
2011
2014
|
const candidates = [
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
+
_chunk3S5KFHQHjs.recordField.call(void 0, _chunk3S5KFHQHjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
|
|
2016
|
+
_chunk3S5KFHQHjs.recordField.call(void 0,
|
|
2017
|
+
_chunk3S5KFHQHjs.recordField.call(void 0, _chunk3S5KFHQHjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
|
|
2015
2018
|
"meta"
|
|
2016
2019
|
),
|
|
2017
|
-
|
|
2018
|
-
|
|
2020
|
+
_chunk3S5KFHQHjs.recordField.call(void 0, rawResponse, "meta"),
|
|
2021
|
+
_chunk3S5KFHQHjs.recordField.call(void 0, _chunk3S5KFHQHjs.recordField.call(void 0, rawResponse, "result"), "meta")
|
|
2019
2022
|
];
|
|
2020
2023
|
const messages = [];
|
|
2021
2024
|
for (const candidate of candidates) {
|
|
@@ -2024,8 +2027,8 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
2024
2027
|
for (const warning of warnings) {
|
|
2025
2028
|
if (typeof warning === "string" && warning.trim()) {
|
|
2026
2029
|
messages.push(warning.trim());
|
|
2027
|
-
} else if (
|
|
2028
|
-
const message =
|
|
2030
|
+
} else if (_chunk3S5KFHQHjs.isRecord.call(void 0, warning)) {
|
|
2031
|
+
const message = _chunk3S5KFHQHjs.stringField.call(void 0, warning, "message");
|
|
2029
2032
|
if (message) messages.push(message);
|
|
2030
2033
|
}
|
|
2031
2034
|
}
|
|
@@ -2033,20 +2036,20 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
2033
2036
|
return [...new Set(messages)];
|
|
2034
2037
|
}
|
|
2035
2038
|
function apifySyncRecoveryNext(rawResponse) {
|
|
2036
|
-
if (!
|
|
2037
|
-
const toolResponse =
|
|
2038
|
-
const raw =
|
|
2039
|
+
if (!_chunk3S5KFHQHjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
|
|
2040
|
+
const toolResponse = _chunk3S5KFHQHjs.recordField.call(void 0, rawResponse, "toolResponse");
|
|
2041
|
+
const raw = _chunk3S5KFHQHjs.recordField.call(void 0, toolResponse, "raw");
|
|
2039
2042
|
if (raw.state !== "awaiting_apify") return null;
|
|
2040
|
-
const next =
|
|
2041
|
-
const getActorRun =
|
|
2042
|
-
const getActorRunTool =
|
|
2043
|
-
const getActorRunPayload =
|
|
2043
|
+
const next = _chunk3S5KFHQHjs.recordField.call(void 0, raw, "next");
|
|
2044
|
+
const getActorRun = _chunk3S5KFHQHjs.recordField.call(void 0, next, "getActorRun");
|
|
2045
|
+
const getActorRunTool = _chunk3S5KFHQHjs.stringField.call(void 0, getActorRun, "tool");
|
|
2046
|
+
const getActorRunPayload = _chunk3S5KFHQHjs.recordField.call(void 0, getActorRun, "payload");
|
|
2044
2047
|
if (!getActorRunTool || Object.keys(getActorRunPayload).length === 0) {
|
|
2045
2048
|
return null;
|
|
2046
2049
|
}
|
|
2047
|
-
const getDatasetItems =
|
|
2048
|
-
const getDatasetItemsTool =
|
|
2049
|
-
const getDatasetItemsPayload =
|
|
2050
|
+
const getDatasetItems = _chunk3S5KFHQHjs.recordField.call(void 0, next, "getDatasetItems");
|
|
2051
|
+
const getDatasetItemsTool = _chunk3S5KFHQHjs.stringField.call(void 0, getDatasetItems, "tool");
|
|
2052
|
+
const getDatasetItemsPayload = _chunk3S5KFHQHjs.recordField.call(void 0, getDatasetItems, "payload");
|
|
2050
2053
|
return {
|
|
2051
2054
|
getActorRun: `deepline run ${getActorRunTool} --input ${_chunkBVXIGOBZjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
|
|
2052
2055
|
...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
|
|
@@ -2056,7 +2059,7 @@ function apifySyncRecoveryNext(rawResponse) {
|
|
|
2056
2059
|
}
|
|
2057
2060
|
function listExtractorPathsFromUsageGuidance(tool) {
|
|
2058
2061
|
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 :
|
|
2062
|
+
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _20 => _20.extractedLists])) ? toolExecutionResult.extractedLists : _chunk3S5KFHQHjs.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _21 => _21.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
|
|
2060
2063
|
return extractedLists.flatMap((entry) => {
|
|
2061
2064
|
const paths = _nullishCoalesce(_optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.candidatePaths]), () => ( _optionalChain([entry, 'access', _24 => _24.details, 'optionalAccess', _25 => _25.rawToolOutputPaths])));
|
|
2062
2065
|
if (!Array.isArray(paths)) return [];
|
|
@@ -2138,7 +2141,7 @@ function parseJsonObjectArgument(raw, flagName) {
|
|
|
2138
2141
|
}
|
|
2139
2142
|
throw invalidJsonError(flagName, message);
|
|
2140
2143
|
}
|
|
2141
|
-
if (!
|
|
2144
|
+
if (!_chunk3S5KFHQHjs.isRecord.call(void 0, parsed)) {
|
|
2142
2145
|
throw invalidJsonError(flagName, "expected an object.");
|
|
2143
2146
|
}
|
|
2144
2147
|
return parsed;
|
|
@@ -2186,7 +2189,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2186
2189
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2187
2190
|
}
|
|
2188
2191
|
if (options.idempotencyKey !== void 0) {
|
|
2189
|
-
|
|
2192
|
+
_chunkWJUAVMQCjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2190
2193
|
}
|
|
2191
2194
|
if (options.connection !== void 0 && (options.recover || options.idempotencyKey !== void 0)) {
|
|
2192
2195
|
throw new Error(
|
|
@@ -2325,7 +2328,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2325
2328
|
kind: summaryEntries.length > 0 ? "object" : "raw",
|
|
2326
2329
|
summary: input.summary
|
|
2327
2330
|
};
|
|
2328
|
-
const envelopeHasCanonicalOutput =
|
|
2331
|
+
const envelopeHasCanonicalOutput = _chunk3S5KFHQHjs.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
|
|
2329
2332
|
const envelopeHasDeclaredOutput = Object.prototype.hasOwnProperty.call(
|
|
2330
2333
|
envelope,
|
|
2331
2334
|
"output"
|
|
@@ -2353,7 +2356,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2353
2356
|
return {
|
|
2354
2357
|
...envelope,
|
|
2355
2358
|
...input.idempotencyKey ? { idempotency_key: input.idempotencyKey } : {},
|
|
2356
|
-
...
|
|
2359
|
+
..._chunk3S5KFHQHjs.isRecord.call(void 0, input.rawResponse) && _chunk3S5KFHQHjs.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
|
|
2357
2360
|
...envelopeHasCanonicalOutput || envelopeHasDeclaredOutput ? { output_preview: outputPreview } : { output: outputPreview },
|
|
2358
2361
|
...summaryEntries.length > 0 ? { summary: input.summary } : {},
|
|
2359
2362
|
...warningMessages.length > 0 ? { warnings: warningMessages } : {},
|
|
@@ -2414,7 +2417,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
|
|
|
2414
2417
|
void _render;
|
|
2415
2418
|
void _next;
|
|
2416
2419
|
void _local;
|
|
2417
|
-
const billingLookup =
|
|
2420
|
+
const billingLookup = _chunk3S5KFHQHjs.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
|
|
2418
2421
|
const inspection = toolExecutionInspection(input);
|
|
2419
2422
|
return {
|
|
2420
2423
|
...base,
|
|
@@ -2510,7 +2513,7 @@ function printToolExecutionWarnings(toolId, params, metadata) {
|
|
|
2510
2513
|
}
|
|
2511
2514
|
}
|
|
2512
2515
|
function assertExecutableToolMetadata(toolId, metadata) {
|
|
2513
|
-
if (
|
|
2516
|
+
if (_chunk3S5KFHQHjs.isPlayLikeTool.call(void 0, metadata)) {
|
|
2514
2517
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
2515
2518
|
playLikeToolExecuteErrorMessage(
|
|
2516
2519
|
toolId,
|
|
@@ -2528,7 +2531,7 @@ function valueAt(value, path) {
|
|
|
2528
2531
|
for (const [index, part] of parts.entries()) {
|
|
2529
2532
|
const each = part === "*" || part.endsWith("[*]");
|
|
2530
2533
|
if (part !== "*") {
|
|
2531
|
-
at =
|
|
2534
|
+
at = _chunk3S5KFHQHjs.isRecord.call(void 0, at) ? at[each ? part.slice(0, -3) : part] : void 0;
|
|
2532
2535
|
}
|
|
2533
2536
|
if (!each) continue;
|
|
2534
2537
|
if (!Array.isArray(at)) return void 0;
|
|
@@ -2544,7 +2547,7 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2544
2547
|
const getters = ["extractedValues", "extractedLists"].flatMap(
|
|
2545
2548
|
(kind) => {
|
|
2546
2549
|
const group = _optionalChain([result, 'optionalAccess', _30 => _30[kind]]);
|
|
2547
|
-
return Array.isArray(group) ? group :
|
|
2550
|
+
return Array.isArray(group) ? group : _chunk3S5KFHQHjs.isRecord.call(void 0, group) ? Object.entries(group).map(([name, getter]) => ({
|
|
2548
2551
|
name,
|
|
2549
2552
|
...getter
|
|
2550
2553
|
})) : [];
|
|
@@ -2569,13 +2572,15 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2569
2572
|
}
|
|
2570
2573
|
function writeToolReceipt(input) {
|
|
2571
2574
|
const { response, metadata } = input;
|
|
2572
|
-
const envelope =
|
|
2575
|
+
const envelope = _chunk3S5KFHQHjs.isRecord.call(void 0, response) ? response : {};
|
|
2573
2576
|
const jobId = typeof envelope.job_id === "string" ? envelope.job_id : null;
|
|
2574
|
-
const toolResponse =
|
|
2577
|
+
const toolResponse = _chunk3S5KFHQHjs.recordField.call(void 0, envelope, "toolResponse");
|
|
2575
2578
|
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
2579
|
const status = typeof envelope.status === "string" ? envelope.status : "completed";
|
|
2577
|
-
const
|
|
2578
|
-
|
|
2580
|
+
const billing = _chunk3S5KFHQHjs.recordField.call(void 0, envelope, "billing");
|
|
2581
|
+
const charged = billing.credits_charged;
|
|
2582
|
+
const credentialSource = _chunk3S5KFHQHjs.stringField.call(void 0, billing, "credential_source");
|
|
2583
|
+
_chunkXQUVLYOLjs.writeExecutionOutput.call(void 0,
|
|
2579
2584
|
{
|
|
2580
2585
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2581
2586
|
status,
|
|
@@ -2584,6 +2589,7 @@ function writeToolReceipt(input) {
|
|
|
2584
2589
|
complete: null,
|
|
2585
2590
|
declared: declaredOutputs(metadata, envelope, data),
|
|
2586
2591
|
credits: typeof charged === "number" ? charged : null,
|
|
2592
|
+
...credentialSource ? { credentialSource } : {},
|
|
2587
2593
|
warnings: [
|
|
2588
2594
|
..._nullishCoalesce(input.warnings, () => ( [])),
|
|
2589
2595
|
...extractToolExecutionWarningMessages(response)
|
|
@@ -2606,8 +2612,8 @@ async function executeToolForReceipt(input) {
|
|
|
2606
2612
|
let retryKey = null;
|
|
2607
2613
|
let received = false;
|
|
2608
2614
|
try {
|
|
2609
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2610
|
-
const client = new (0,
|
|
2615
|
+
const cliInvocationId = _nullishCoalesce(_chunkV5NDHTBBjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkV5NDHTBBjs.beginToolExecuteCommand.call(void 0, )));
|
|
2616
|
+
const client = new (0, _chunkXFVJ3JNAjs.DeeplineClient)();
|
|
2611
2617
|
const metadata = assertExecutableToolMetadata(
|
|
2612
2618
|
toolId,
|
|
2613
2619
|
await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
|
|
@@ -2629,9 +2635,9 @@ async function executeToolForReceipt(input) {
|
|
|
2629
2635
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2630
2636
|
..._optionalChain([metadata, 'access', _37 => _37.executionMetadata, 'optionalAccess', _38 => _38.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2631
2637
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2632
|
-
searchRef:
|
|
2638
|
+
searchRef: _chunkGDBNH57Zjs.recentSearchRef.call(void 0, toolId),
|
|
2633
2639
|
cliInvocationId,
|
|
2634
|
-
onResponseReceived:
|
|
2640
|
+
onResponseReceived: _chunkXQUVLYOLjs.recordApiResponse
|
|
2635
2641
|
});
|
|
2636
2642
|
const response = await call(key).catch((error) => {
|
|
2637
2643
|
if (!key || !refusedRetryKey(error)) throw error;
|
|
@@ -2667,11 +2673,11 @@ async function executeToolForReceipt(input) {
|
|
|
2667
2673
|
if (received) throw error;
|
|
2668
2674
|
const outcomeKnown = answeredWithFailure(error);
|
|
2669
2675
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _39 => _39.discard, 'call', _40 => _40()]);
|
|
2670
|
-
|
|
2676
|
+
_chunkXQUVLYOLjs.writeExecutionOutput.call(void 0,
|
|
2671
2677
|
{
|
|
2672
2678
|
id: outcomeKnown ? null : key,
|
|
2673
2679
|
status: "failed",
|
|
2674
|
-
error:
|
|
2680
|
+
error: _chunkNNWEQDZRjs.errorToJsonPayload.call(void 0, error).error,
|
|
2675
2681
|
...key && !outcomeKnown ? {
|
|
2676
2682
|
next: {
|
|
2677
2683
|
retry: "Run the same command again: it picks up this call without paying twice."
|
|
@@ -2703,11 +2709,11 @@ function answeredWithFailure(error) {
|
|
|
2703
2709
|
!(error.code === "IDEMPOTENCY_NOT_SUPPORTED" && !serverBodyHasCode(_optionalChain([error, 'access', _43 => _43.details, 'optionalAccess', _44 => _44.response]), "IDEMPOTENCY_NOT_SUPPORTED"));
|
|
2704
2710
|
}
|
|
2705
2711
|
async function getToolExecutionReceipt(key, output) {
|
|
2706
|
-
const client = new (0,
|
|
2712
|
+
const client = new (0, _chunkXFVJ3JNAjs.DeeplineClient)();
|
|
2707
2713
|
const execution = await client.executions.getByKey(key);
|
|
2708
2714
|
output.label = `${execution.toolId} (tool)`;
|
|
2709
2715
|
if (execution.response === void 0) {
|
|
2710
|
-
|
|
2716
|
+
_chunkXQUVLYOLjs.writeExecutionOutput.call(void 0,
|
|
2711
2717
|
{
|
|
2712
2718
|
id: key,
|
|
2713
2719
|
status: execution.executionRecovery.state,
|
|
@@ -2736,19 +2742,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2736
2742
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2737
2743
|
} catch (error) {
|
|
2738
2744
|
if (wantsJson) {
|
|
2739
|
-
|
|
2745
|
+
_chunkNNWEQDZRjs.printJsonError.call(void 0, error);
|
|
2740
2746
|
} else {
|
|
2741
2747
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2742
2748
|
}
|
|
2743
2749
|
return error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2744
2750
|
}
|
|
2745
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2751
|
+
const cliInvocationId = _nullishCoalesce(_chunkV5NDHTBBjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkV5NDHTBBjs.beginToolExecuteCommand.call(void 0, )));
|
|
2746
2752
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2747
|
-
const tracing =
|
|
2753
|
+
const tracing = _chunkHEZ24K5Fjs.isCliTraceEnabled.call(void 0, );
|
|
2748
2754
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2749
|
-
const client = new (0,
|
|
2755
|
+
const client = new (0, _chunkXFVJ3JNAjs.DeeplineClient)();
|
|
2750
2756
|
if (clientStartedAt !== void 0) {
|
|
2751
|
-
|
|
2757
|
+
_chunkHEZ24K5Fjs.recordCliTrace.call(void 0, {
|
|
2752
2758
|
phase: "cli.tool_execute_client_setup",
|
|
2753
2759
|
ms: performance.now() - clientStartedAt
|
|
2754
2760
|
});
|
|
@@ -2757,13 +2763,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2757
2763
|
const readMetadata = async () => {
|
|
2758
2764
|
if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2759
2765
|
try {
|
|
2760
|
-
metadata = await
|
|
2766
|
+
metadata = await _chunkV5NDHTBBjs.runToolExecuteStage.call(void 0,
|
|
2761
2767
|
"tool metadata lookup",
|
|
2762
2768
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2763
2769
|
);
|
|
2764
2770
|
} catch (error) {
|
|
2765
2771
|
if (isMissingToolMetadataError(error)) {
|
|
2766
|
-
const play = await
|
|
2772
|
+
const play = await _chunkV5NDHTBBjs.runToolExecuteStage.call(void 0,
|
|
2767
2773
|
"play alias lookup",
|
|
2768
2774
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2769
2775
|
);
|
|
@@ -2786,7 +2792,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2786
2792
|
toolMetadata = await readMetadata();
|
|
2787
2793
|
} catch (error) {
|
|
2788
2794
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2789
|
-
if (wantsJson)
|
|
2795
|
+
if (wantsJson) _chunkNNWEQDZRjs.printJsonError.call(void 0, error);
|
|
2790
2796
|
else console.error(error.message);
|
|
2791
2797
|
return 2;
|
|
2792
2798
|
}
|
|
@@ -2814,7 +2820,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2814
2820
|
assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2815
2821
|
} catch (error) {
|
|
2816
2822
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2817
|
-
if (wantsJson)
|
|
2823
|
+
if (wantsJson) _chunkNNWEQDZRjs.printJsonError.call(void 0, error);
|
|
2818
2824
|
else console.error(error.message);
|
|
2819
2825
|
return 2;
|
|
2820
2826
|
}
|
|
@@ -2826,7 +2832,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2826
2832
|
metadata = await readMetadata();
|
|
2827
2833
|
} catch (error) {
|
|
2828
2834
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2829
|
-
if (wantsJson)
|
|
2835
|
+
if (wantsJson) _chunkNNWEQDZRjs.printJsonError.call(void 0, error);
|
|
2830
2836
|
else console.error(error.message);
|
|
2831
2837
|
return 2;
|
|
2832
2838
|
}
|
|
@@ -2842,7 +2848,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2842
2848
|
metadata = await readMetadata();
|
|
2843
2849
|
} catch (error) {
|
|
2844
2850
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2845
|
-
if (wantsJson)
|
|
2851
|
+
if (wantsJson) _chunkNNWEQDZRjs.printJsonError.call(void 0, error);
|
|
2846
2852
|
else console.error(error.message);
|
|
2847
2853
|
return 2;
|
|
2848
2854
|
}
|
|
@@ -2869,11 +2875,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2869
2875
|
...parsed.connection !== void 0 ? { connection: parsed.connection } : {},
|
|
2870
2876
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2871
2877
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2872
|
-
searchRef:
|
|
2878
|
+
searchRef: _chunkGDBNH57Zjs.recentSearchRef.call(void 0, parsed.toolId),
|
|
2873
2879
|
cliInvocationId,
|
|
2874
|
-
onResponseReceived:
|
|
2880
|
+
onResponseReceived: _chunkXQUVLYOLjs.recordApiResponse,
|
|
2875
2881
|
...tracing ? {
|
|
2876
|
-
onServerTiming: (serverTiming) =>
|
|
2882
|
+
onServerTiming: (serverTiming) => _chunkHEZ24K5Fjs.recordCliTrace.call(void 0, {
|
|
2877
2883
|
phase: "tool_execute_server_timing",
|
|
2878
2884
|
cliInvocationId,
|
|
2879
2885
|
serverTiming,
|
|
@@ -2884,13 +2890,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2884
2890
|
let rawResponse;
|
|
2885
2891
|
let successfulCompatibilityResponse;
|
|
2886
2892
|
try {
|
|
2887
|
-
const executeResult = await
|
|
2893
|
+
const executeResult = await _chunkV5NDHTBBjs.runToolExecuteStage.call(void 0,
|
|
2888
2894
|
"execute request",
|
|
2889
2895
|
async () => {
|
|
2890
2896
|
try {
|
|
2891
2897
|
if (tracing) {
|
|
2892
2898
|
submissionStartedAt = performance.now();
|
|
2893
|
-
|
|
2899
|
+
_chunkHEZ24K5Fjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2894
2900
|
}
|
|
2895
2901
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2896
2902
|
...executeOptions,
|
|
@@ -2900,34 +2906,34 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2900
2906
|
} catch (error) {
|
|
2901
2907
|
if (parsed.connection !== void 0 || !(error instanceof _chunkLFQJW4S2js.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2902
2908
|
throw error;
|
|
2903
|
-
const baseUrl =
|
|
2909
|
+
const baseUrl = _chunk2ZCFAUCVjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2904
2910
|
if (maintenancePolicy !== "off") {
|
|
2905
|
-
|
|
2911
|
+
_chunkZ6DERGHYjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2906
2912
|
}
|
|
2907
2913
|
const preflight = deferredCompatibility ? await deferredCompatibility.result.catch(() => null) : null;
|
|
2908
|
-
const compatibilityResponse = _optionalChain([preflight, 'optionalAccess', _50 => _50.live]) === true ? preflight.response : await
|
|
2914
|
+
const compatibilityResponse = _optionalChain([preflight, 'optionalAccess', _50 => _50.live]) === true ? preflight.response : await _chunkV5NDHTBBjs.runToolExecuteStage.call(void 0,
|
|
2909
2915
|
"SDK compatibility",
|
|
2910
|
-
() =>
|
|
2916
|
+
() => _chunkZ6DERGHYjs.requireSdkCompatibility.call(void 0, baseUrl, {
|
|
2911
2917
|
command: "tools execute",
|
|
2912
|
-
skillsVersion:
|
|
2918
|
+
skillsVersion: _chunk2ZCFAUCVjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2913
2919
|
persistCache: maintenancePolicy !== "off"
|
|
2914
2920
|
})
|
|
2915
2921
|
);
|
|
2916
2922
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _51 => _51.readMetadata, 'call', _52 => _52()]), () => ( metadata));
|
|
2917
|
-
if (maintenancePolicy !== "off" && await
|
|
2923
|
+
if (maintenancePolicy !== "off" && await _chunkV5NDHTBBjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2918
2924
|
compatibilityResponse,
|
|
2919
2925
|
baseUrl,
|
|
2920
2926
|
maintenancePolicy
|
|
2921
2927
|
)) {
|
|
2922
2928
|
return void 0;
|
|
2923
2929
|
}
|
|
2924
|
-
|
|
2930
|
+
_chunkZ6DERGHYjs.enforceSdkCompatibilityResponse.call(void 0, compatibilityResponse, {
|
|
2925
2931
|
quietAdvisory: wantsJson
|
|
2926
2932
|
});
|
|
2927
2933
|
if (maintenancePolicy !== "off") {
|
|
2928
|
-
await
|
|
2934
|
+
await _chunkV5NDHTBBjs.runToolExecuteStage.call(void 0,
|
|
2929
2935
|
"agent skills sync",
|
|
2930
|
-
() =>
|
|
2936
|
+
() => _chunkZ6DERGHYjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2931
2937
|
update: _optionalChain([compatibilityResponse, 'optionalAccess', _53 => _53.skills]),
|
|
2932
2938
|
mode: "detached"
|
|
2933
2939
|
})
|
|
@@ -2936,7 +2942,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2936
2942
|
const legacyMetadata = await readMetadata();
|
|
2937
2943
|
if (tracing) {
|
|
2938
2944
|
submissionStartedAt = performance.now();
|
|
2939
|
-
|
|
2945
|
+
_chunkHEZ24K5Fjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2940
2946
|
}
|
|
2941
2947
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2942
2948
|
...executeOptions,
|
|
@@ -2959,8 +2965,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2959
2965
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2960
2966
|
const updateRequiredBeforeExecution = error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2961
2967
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2962
|
-
const baseUrl =
|
|
2963
|
-
if (await
|
|
2968
|
+
const baseUrl = _chunk2ZCFAUCVjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2969
|
+
if (await _chunkV5NDHTBBjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2964
2970
|
compatibility.response,
|
|
2965
2971
|
baseUrl,
|
|
2966
2972
|
maintenancePolicy
|
|
@@ -2984,7 +2990,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2984
2990
|
}
|
|
2985
2991
|
}
|
|
2986
2992
|
if (failure instanceof _chunkLFQJW4S2js.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2987
|
-
if (wantsJson)
|
|
2993
|
+
if (wantsJson) _chunkNNWEQDZRjs.printJsonError.call(void 0, failure);
|
|
2988
2994
|
else console.error(failure.message);
|
|
2989
2995
|
return 2;
|
|
2990
2996
|
}
|
|
@@ -3011,9 +3017,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3011
3017
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
3012
3018
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _60 => _60.auto_update]);
|
|
3013
3019
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _61 => _61.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
3014
|
-
await
|
|
3020
|
+
await _chunkV5NDHTBBjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
3015
3021
|
compatibilityResponse,
|
|
3016
|
-
|
|
3022
|
+
_chunk2ZCFAUCVjs.resolveConfig.call(void 0, ).baseUrl,
|
|
3017
3023
|
maintenancePolicy
|
|
3018
3024
|
);
|
|
3019
3025
|
}
|
|
@@ -3031,8 +3037,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3031
3037
|
);
|
|
3032
3038
|
}
|
|
3033
3039
|
}
|
|
3034
|
-
const responseMetadata =
|
|
3035
|
-
|
|
3040
|
+
const responseMetadata = _chunk3S5KFHQHjs.recordField.call(void 0,
|
|
3041
|
+
_chunk3S5KFHQHjs.recordField.call(void 0, rawResponse, "_metadata"),
|
|
3036
3042
|
"tool"
|
|
3037
3043
|
);
|
|
3038
3044
|
const listOutputPaths = responseMetadata.listOutputPaths;
|
|
@@ -3044,11 +3050,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3044
3050
|
await readMetadata()
|
|
3045
3051
|
);
|
|
3046
3052
|
}
|
|
3047
|
-
if (
|
|
3053
|
+
if (_chunk3S5KFHQHjs.isRecord.call(void 0, rawResponse)) {
|
|
3048
3054
|
const { _metadata, ...execution } = rawResponse;
|
|
3049
3055
|
rawResponse = execution;
|
|
3050
3056
|
}
|
|
3051
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
3057
|
+
const { listConversion, summary, baseEnvelope } = await _chunkV5NDHTBBjs.runToolExecuteStage.call(void 0,
|
|
3052
3058
|
"result formatting",
|
|
3053
3059
|
async () => {
|
|
3054
3060
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -3083,9 +3089,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3083
3089
|
}
|
|
3084
3090
|
skillsSyncAttempted = true;
|
|
3085
3091
|
try {
|
|
3086
|
-
await
|
|
3092
|
+
await _chunkV5NDHTBBjs.runToolExecuteStage.call(void 0,
|
|
3087
3093
|
"agent skills sync",
|
|
3088
|
-
() =>
|
|
3094
|
+
() => _chunkZ6DERGHYjs.syncSdkSkillsIfNeeded.call(void 0, _chunk2ZCFAUCVjs.resolveConfig.call(void 0, ).baseUrl, {
|
|
3089
3095
|
update: deliveredCompatibilityResponse.skills,
|
|
3090
3096
|
mode: "detached"
|
|
3091
3097
|
})
|
|
@@ -3096,15 +3102,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3096
3102
|
);
|
|
3097
3103
|
}
|
|
3098
3104
|
};
|
|
3099
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
3105
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0, envelope, {
|
|
3100
3106
|
...options2,
|
|
3101
3107
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
3102
3108
|
});
|
|
3103
3109
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
3104
3110
|
await syncSkillsForDeliveredOutput();
|
|
3105
|
-
|
|
3111
|
+
_chunkNNWEQDZRjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
3106
3112
|
};
|
|
3107
|
-
const delivered = await
|
|
3113
|
+
const delivered = await _chunkV5NDHTBBjs.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
3108
3114
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
3109
3115
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
3110
3116
|
return true;
|
|
@@ -3117,7 +3123,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3117
3123
|
await printDeliveredJsonEnvelope({
|
|
3118
3124
|
...baseEnvelope,
|
|
3119
3125
|
local: {
|
|
3120
|
-
...
|
|
3126
|
+
..._chunk3S5KFHQHjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
|
|
3121
3127
|
payload_file: jsonPath
|
|
3122
3128
|
}
|
|
3123
3129
|
});
|
|
@@ -3133,7 +3139,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3133
3139
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3134
3140
|
);
|
|
3135
3141
|
if (wantsJson) {
|
|
3136
|
-
|
|
3142
|
+
_chunkNNWEQDZRjs.printJsonError.call(void 0, error);
|
|
3137
3143
|
} else {
|
|
3138
3144
|
console.error(error.message);
|
|
3139
3145
|
}
|
|
@@ -3228,13 +3234,13 @@ inspect: ${inspection.inspect}
|
|
|
3228
3234
|
return true;
|
|
3229
3235
|
});
|
|
3230
3236
|
if (delivered) {
|
|
3231
|
-
await
|
|
3237
|
+
await _chunkV5NDHTBBjs.runToolExecuteStage.call(void 0,
|
|
3232
3238
|
"acknowledge delivery",
|
|
3233
3239
|
() => recovery.acknowledgeDelivery()
|
|
3234
3240
|
);
|
|
3235
3241
|
}
|
|
3236
3242
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3237
|
-
|
|
3243
|
+
_chunkZ6DERGHYjs.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3238
3244
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _64 => _64.auto_update, 'optionalAccess', _65 => _65.should_auto_update]) === true
|
|
3239
3245
|
});
|
|
3240
3246
|
}
|