deepline 0.3.550 → 0.3.552
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 +23 -0
- package/dist/bundling-sources/sdk/src/http-core.ts +6 -2
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +58 -29
- package/dist/bundling-sources/sdk/src/types.ts +22 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/tool-connection.ts +42 -0
- package/dist/bundling-sources/shared_libs/monitors/package.json +2 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +80 -13
- package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +31 -0
- package/dist/bundling-sources/shared_libs/monitors/tamradar-countries.ts +285 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +1 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +163 -0
- package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +137 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +20 -16
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +47 -14
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +48 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +187 -16
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +102 -29
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +854 -3
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +15 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +6 -2
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +37 -7
- package/dist/bundling-sources/shared_libs/plays/share/static-pipeline-summary.ts +43 -0
- package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +1 -0
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +38 -5
- package/dist/bundling-sources/shared_libs/product-notifications/default-policy.ts +1 -1
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +16 -0
- package/dist/cli/{auth-UJCAHGZG.mjs → auth-KVSBJZOX.mjs} +5 -5
- package/dist/cli/auth-MMNVWATX.js +43 -0
- package/dist/cli/{billing-RYWMI7JJ.mjs → billing-54RHFEBI.mjs} +20 -13
- package/dist/cli/{billing-VO2O5O5O.js → billing-FQREA7UA.js} +109 -102
- package/dist/cli/chunk-2RIKOPIM.mjs +9 -0
- package/dist/cli/{chunk-XYIECA7M.js → chunk-2WFPHBR4.js} +30 -8
- package/dist/cli/{chunk-SBNNK73L.js → chunk-3FD5EQ62.js} +6 -6
- package/dist/cli/{chunk-JLFOQRWM.js → chunk-45PVGZST.js} +270 -270
- package/dist/cli/{chunk-YSYOQYZE.js → chunk-4MK42735.js} +48 -44
- package/dist/cli/{chunk-2IW5GKB4.js → chunk-4NQF6KJ3.js} +13 -13
- package/dist/cli/{chunk-72NXIFOT.mjs → chunk-4TALT2M3.mjs} +1 -1
- package/dist/cli/{chunk-ADWMIZCB.js → chunk-4UUR4TCH.js} +22 -13
- package/dist/cli/{chunk-EMPXPEIQ.mjs → chunk-57VZVF5D.mjs} +3 -3
- package/dist/cli/{chunk-5J3TRWTB.js → chunk-634ZDA3F.js} +1 -1
- package/dist/cli/{chunk-FMXLQHM2.mjs → chunk-6O5HOODW.mjs} +13 -13
- package/dist/cli/{chunk-HCFH2V27.mjs → chunk-6PRW5UBA.mjs} +3 -2
- package/dist/cli/{chunk-N2Y2IGNB.mjs → chunk-6RZOWL2V.mjs} +1 -1
- package/dist/cli/{chunk-JKLDCFY5.js → chunk-6YCA5NKJ.js} +11 -11
- package/dist/cli/{chunk-5LUF4LAR.mjs → chunk-6ZORHRKB.mjs} +1 -0
- package/dist/cli/{chunk-DGUTBLXF.js → chunk-77AAAGVB.js} +3 -2
- package/dist/cli/{chunk-OKNOQRQ3.js → chunk-7IKQKKNX.js} +3 -3
- package/dist/cli/{chunk-JYUIIDZO.js → chunk-ADRC5I3R.js} +23 -22
- package/dist/cli/{chunk-IZCPOX7X.mjs → chunk-AQWQ2BFX.mjs} +1 -1
- package/dist/cli/{chunk-7BWMCVYU.mjs → chunk-AWJPDPMA.mjs} +1 -1
- package/dist/cli/{chunk-S6XOKGBF.mjs → chunk-AZQ264ID.mjs} +1 -1
- package/dist/cli/{chunk-EU23QOJ6.js → chunk-BAIST2BR.js} +26 -26
- package/dist/cli/{chunk-6P7TGCHQ.mjs → chunk-BGBJV26E.mjs} +10 -3
- package/dist/cli/{chunk-COHCKZQK.mjs → chunk-DJ2JDK4O.mjs} +2 -1
- package/dist/cli/{chunk-E4S7OE7B.mjs → chunk-EOPEYCY7.mjs} +3 -3
- package/dist/cli/{chunk-LUULRAQB.mjs → chunk-EUPVF4SU.mjs} +10 -7
- package/dist/cli/{chunk-TB3WT76F.js → chunk-F2LH7TGF.js} +23 -20
- package/dist/cli/{chunk-UL7HWZO7.mjs → chunk-FTJLJCE5.mjs} +2 -2
- package/dist/cli/{chunk-3WG2GURT.js → chunk-G4O75EXF.js} +9 -9
- package/dist/cli/{chunk-7AOFSZJM.mjs → chunk-GGGAEVCX.mjs} +23 -1
- package/dist/cli/{chunk-R5CYKRA2.js → chunk-GKYAYLRI.js} +12 -12
- package/dist/cli/{chunk-UV4RU2TE.js → chunk-H4ALLC2X.js} +2 -0
- package/dist/cli/{chunk-LWHWMU4V.js → chunk-HO3XK3R7.js} +7 -7
- package/dist/cli/{chunk-E2QVWDDW.mjs → chunk-HYC4MKGK.mjs} +3 -3
- package/dist/cli/{chunk-KSUTNW3X.js → chunk-IDVVIXPJ.js} +42 -41
- package/dist/cli/{chunk-BJO7ZXAK.js → chunk-IHRKLXZN.js} +5 -5
- package/dist/cli/{chunk-ZQZOYGDC.mjs → chunk-IYSTRCLX.mjs} +5 -4
- package/dist/cli/{chunk-SMLWC7PM.js → chunk-JWUAX6OP.js} +10 -10
- package/dist/cli/{chunk-RKF263LR.js → chunk-KWSH5T7K.js} +25 -18
- package/dist/cli/{chunk-I62PCYU6.js → chunk-MF2GHZDO.js} +2 -2
- package/dist/cli/{chunk-XKE2PGZ2.js → chunk-PFO3ISXA.js} +26 -15
- package/dist/cli/{chunk-MXEYNRTZ.mjs → chunk-PTVD2GVQ.mjs} +6 -5
- package/dist/cli/{chunk-QD2KT7II.mjs → chunk-QAORXEY3.mjs} +2 -2
- package/dist/cli/{chunk-2AKS64KJ.mjs → chunk-QILKGXYF.mjs} +2 -2
- package/dist/cli/{chunk-DJWM5OOY.mjs → chunk-QPKH23EC.mjs} +4 -4
- package/dist/cli/{chunk-MAE3AKDR.mjs → chunk-QX7LFGJR.mjs} +18 -9
- package/dist/cli/{chunk-CIBQVA6V.mjs → chunk-QY3ZNU6Z.mjs} +2 -2
- package/dist/cli/{chunk-MJDQZYKO.js → chunk-RBEUVDZF.js} +10 -6
- package/dist/cli/{chunk-RS6ZSKX6.js → chunk-RQZQVFCJ.js} +2 -2
- package/dist/cli/{chunk-QNWNR6DG.js → chunk-S46HWQKO.js} +53 -53
- package/dist/cli/{chunk-4NQWUUOH.mjs → chunk-S5S355UY.mjs} +2 -2
- package/dist/cli/{chunk-NM3AYEDI.js → chunk-SHLFOPD6.js} +5 -5
- package/dist/cli/{chunk-K7JZV4QW.mjs → chunk-U7QRMBIY.mjs} +2 -2
- package/dist/cli/{chunk-ECWOIXAV.js → chunk-UPMRIVZB.js} +14 -12
- package/dist/cli/{chunk-R7J7CJPZ.js → chunk-V436Z54K.js} +1 -0
- package/dist/cli/{chunk-RINUMR6C.js → chunk-VQALXEXO.js} +20 -19
- package/dist/cli/{chunk-F2RXBNT5.mjs → chunk-WE5HES3H.mjs} +7 -5
- package/dist/cli/{chunk-GWNYLIF7.mjs → chunk-WEHCBH5R.mjs} +4 -2
- package/dist/cli/{chunk-SZNX3XU3.js → chunk-WLN3SUIA.js} +3 -3
- package/dist/cli/{chunk-3W44AJOE.js → chunk-XVB7V4N7.js} +18 -16
- package/dist/cli/{chunk-HEVUFICQ.mjs → chunk-YJHE3O5M.mjs} +9 -5
- package/dist/cli/{chunk-GVW5V562.mjs → chunk-YLTMXJFC.mjs} +7 -3
- package/dist/cli/{chunk-TL3WIXDH.mjs → chunk-Z5TSLLOW.mjs} +19 -8
- package/dist/cli/{chunk-KLQILE2I.mjs → chunk-ZIAXDBXX.mjs} +2 -2
- package/dist/cli/command-docs.js +4 -4
- package/dist/cli/command-docs.mjs +3 -3
- package/dist/cli/concurrent-runs-help-FQAIHKKC.js +21 -0
- package/dist/cli/{concurrent-runs-help-766HVJR3.mjs → concurrent-runs-help-Q4KPAUJX.mjs} +7 -7
- package/dist/cli/{csv-VU52KZOX.mjs → csv-2PTVDNO6.mjs} +10 -5
- package/dist/cli/{csv-4DZKGYCU.js → csv-F5VAGX4K.js} +19 -14
- package/dist/cli/{db-UBGW373S.mjs → db-IEDXAUF7.mjs} +6 -6
- package/dist/cli/{db-KPIH4HPW.js → db-Z3OIUFMM.js} +27 -27
- package/dist/cli/{describe-NGITP6RA.mjs → describe-QDANCTS3.mjs} +21 -21
- package/dist/cli/describe-VUTT5ZKU.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-G3X25U3V.js → executions-H6H5655J.js} +8 -8
- package/dist/cli/{executions-CO5UF3CV.mjs → executions-R3LP74QN.mjs} +6 -6
- package/dist/cli/{feedback-ZYF65WPH.js → feedback-VFOUR66B.js} +14 -14
- package/dist/cli/{feedback-M2L5DVN2.mjs → feedback-WL3MRVT5.mjs} +6 -6
- package/dist/cli/git-ETB3GH3K.js +25 -0
- package/dist/cli/{git-AYJD5CLS.mjs → git-YX2J4GCI.mjs} +5 -5
- package/dist/cli/index.js +148 -148
- package/dist/cli/index.mjs +47 -47
- package/dist/cli/{integrations-LKEGGTZO.mjs → integrations-5ZK5KLVP.mjs} +7 -7
- package/dist/cli/{integrations-GSXXJ4CF.js → integrations-E2JZYKHS.js} +15 -15
- package/dist/cli/{legacy-noops-MZDLLEKN.js → legacy-noops-3VW4IJTH.js} +9 -9
- package/dist/cli/{legacy-noops-UF4GKMD4.mjs → legacy-noops-SMN3GSXY.mjs} +6 -6
- package/dist/cli/{mcp-RTNC6LP3.js → mcp-UQV2K4EW.js} +24 -24
- package/dist/cli/{mcp-NHQ6RMBP.mjs → mcp-V6MGCYAG.mjs} +4 -4
- package/dist/cli/{monitors-NC4ZR5DH.mjs → monitors-GGKS5W6M.mjs} +7 -7
- package/dist/cli/{monitors-WMWB6EKQ.js → monitors-R3BBDCRC.js} +100 -100
- package/dist/cli/{org-33Q7CXJB.js → org-GRYVMNSW.js} +88 -88
- package/dist/cli/{org-ZXUSYREQ.mjs → org-Z37NGJV4.mjs} +6 -6
- package/dist/cli/{play-N24XV6TI.js → play-2MVO27VO.js} +332 -332
- package/dist/cli/{play-IPWFGNRE.mjs → play-MDWPR4XG.mjs} +19 -19
- package/dist/cli/{providers-AUI7MMQS.js → providers-2AACRUZH.js} +9 -9
- package/dist/cli/{providers-MSVE7UZS.mjs → providers-AKDYFZJZ.mjs} +6 -6
- package/dist/cli/{quickstart-PSC6VTRI.js → quickstart-H6IV3PV3.js} +6 -6
- package/dist/cli/{quickstart-OME5XMW5.mjs → quickstart-QDGRJFZY.mjs} +4 -4
- package/dist/cli/{run-UTIX7CJY.js → run-2634REDK.js} +47 -47
- package/dist/cli/{run-EYTT2DHO.mjs → run-RTSQNGRD.mjs} +26 -26
- package/dist/cli/{search-FVE7PM72.mjs → search-6AOJ4XPP.mjs} +7 -7
- package/dist/cli/search-VTW2YNBS.js +32 -0
- package/dist/cli/{search-output-TQMY6BDG.mjs → search-output-6ADMTOU5.mjs} +40 -10
- package/dist/cli/{search-output-O463JNLR.js → search-output-S5ODBL5E.js} +43 -13
- package/dist/cli/{secrets-TWZ2GO73.js → secrets-LHCIIHMT.js} +15 -15
- package/dist/cli/{secrets-KCJJAHQB.mjs → secrets-TFIFBFB3.mjs} +6 -6
- package/dist/cli/sessions-CJ4FJ2WB.js +22 -0
- package/dist/cli/{sessions-ZCWAA7QL.mjs → sessions-WHBVUHVW.mjs} +6 -6
- package/dist/cli/{settings-SCR654U7.js → settings-CP4FVK2W.js} +85 -85
- package/dist/cli/{settings-4JFKCKII.mjs → settings-EBONWL5C.mjs} +12 -12
- package/dist/cli/{setup-Q2YOPGOI.mjs → setup-I5AZE3IU.mjs} +15 -10
- package/dist/cli/{setup-O6GH3UWT.js → setup-LFGHTNLQ.js} +55 -50
- package/dist/cli/skills-R7EBXREW.js +36 -0
- package/dist/cli/{skills-QHPZ6H2G.mjs → skills-W76AO5XE.mjs} +7 -7
- package/dist/cli/{tools-YO22H46E.mjs → tools-7IJHGF6W.mjs} +19 -19
- package/dist/cli/tools-V7U2BDXM.js +57 -0
- package/dist/cli/update-4COPZETK.js +34 -0
- package/dist/cli/{update-WHBC5IHE.mjs → update-GFOPZTHY.mjs} +9 -9
- package/dist/cli/{views-4CZJ5BLG.js → views-BPL2TQJ4.js} +21 -21
- package/dist/cli/{views-XNLXV2BT.mjs → views-D4NX4SBG.mjs} +6 -6
- package/dist/cli/{workflow-QUWP2CG2.mjs → workflow-YXP42FUI.mjs} +7 -7
- package/dist/cli/{workflow-C4VBARIE.js → workflow-ZYNAUCKC.js} +17 -17
- package/dist/{client-Ceo295L2.d.ts → client-Bf3IpUKN.d.ts} +1 -1
- package/dist/{client-BEJqhQAj.d.mts → client-CyXGrO4D.d.mts} +1 -1
- package/dist/{client-core-BPYuWfBC.d.ts → client-core-BWd0lX0Z.d.ts} +110 -4
- package/dist/{client-core-BqetRxx-.d.mts → client-core-BxsLnXlm.d.mts} +110 -4
- 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 +127 -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-J4OW5RNJ.js +0 -43
- package/dist/cli/chunk-NIPLY25A.mjs +0 -7
- package/dist/cli/concurrent-runs-help-3XZIHVRP.js +0 -21
- package/dist/cli/describe-4BI6E2CM.js +0 -50
- package/dist/cli/git-QRZP4DNA.js +0 -25
- package/dist/cli/search-CQ6JG2EN.js +0 -32
- package/dist/cli/sessions-LMPXUPUH.js +0 -22
- package/dist/cli/skills-M4CFE65Z.js +0 -36
- package/dist/cli/tools-CV7XA2V6.js +0 -57
- package/dist/cli/update-PUWBKPWJ.js +0 -34
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk6YCA5NKJjs = require('./chunk-6YCA5NKJ.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -11,11 +11,11 @@ var _chunkJKLDCFY5js = require('./chunk-JKLDCFY5.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkGKYAYLRIjs = require('./chunk-GKYAYLRI.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkJWUAX6OPjs = require('./chunk-JWUAX6OP.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -36,10 +36,10 @@ var _chunkSMLWC7PMjs = require('./chunk-SMLWC7PM.js');
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _chunkUPMRIVZBjs = require('./chunk-UPMRIVZB.js');
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
var _chunk2WFPHBR4js = require('./chunk-2WFPHBR4.js');
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
@@ -55,10 +55,10 @@ var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
|
|
|
55
55
|
var _chunkHGFFYVXNjs = require('./chunk-HGFFYVXN.js');
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _chunkSHLFOPD6js = require('./chunk-SHLFOPD6.js');
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
var
|
|
61
|
+
var _chunkPFO3ISXAjs = require('./chunk-PFO3ISXA.js');
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
|
|
@@ -68,18 +68,18 @@ var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
|
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
var
|
|
71
|
+
var _chunkADRC5I3Rjs = require('./chunk-ADRC5I3R.js');
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
var
|
|
76
|
+
var _chunkMF2GHZDOjs = require('./chunk-MF2GHZDO.js');
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
var
|
|
82
|
+
var _chunk4MK42735js = require('./chunk-4MK42735.js');
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
@@ -88,12 +88,12 @@ var _chunkYSYOQYZEjs = require('./chunk-YSYOQYZE.js');
|
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
|
|
91
|
-
var
|
|
91
|
+
var _chunkVQALXEXOjs = require('./chunk-VQALXEXO.js');
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
var
|
|
96
|
+
var _chunk7IKQKKNXjs = require('./chunk-7IKQKKNX.js');
|
|
97
97
|
|
|
98
98
|
|
|
99
99
|
var _chunkBBTKAASQjs = require('./chunk-BBTKAASQ.js');
|
|
@@ -199,10 +199,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
201
|
function pendingToolExecutionPath(input) {
|
|
202
|
-
const config =
|
|
202
|
+
const config = _chunk7IKQKKNXjs.resolveConfig.call(void 0, );
|
|
203
203
|
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(_chunkXDVT3GOMjs.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
|
|
204
204
|
return _path.join.call(void 0,
|
|
205
|
-
|
|
205
|
+
_chunk7IKQKKNXjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
206
206
|
`${PENDING_PREFIX}${fingerprint}.json`
|
|
207
207
|
);
|
|
208
208
|
}
|
|
@@ -354,13 +354,13 @@ var TOOL_COMMAND_TEMPLATES = {
|
|
|
354
354
|
execute: "deepline run <toolId> --input '{...}'"
|
|
355
355
|
};
|
|
356
356
|
function toListedTool(tool) {
|
|
357
|
-
if (
|
|
357
|
+
if (_chunkUPMRIVZBjs.isPlayLikeTool.call(void 0, tool)) {
|
|
358
358
|
return {
|
|
359
359
|
...tool,
|
|
360
360
|
description: listedToolDescription(tool),
|
|
361
361
|
id: tool.toolId,
|
|
362
362
|
type: "play",
|
|
363
|
-
executeCommand:
|
|
363
|
+
executeCommand: _chunkUPMRIVZBjs.playRunCommandForTool.call(void 0, tool, tool.toolId)
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
366
|
return {
|
|
@@ -436,37 +436,37 @@ function firstSentence(text) {
|
|
|
436
436
|
return (match ? match[0] : clean).trim();
|
|
437
437
|
}
|
|
438
438
|
function requiredInputIds(tool) {
|
|
439
|
-
const inputSchema =
|
|
439
|
+
const inputSchema = _chunkUPMRIVZBjs.recordField.call(void 0,
|
|
440
440
|
tool,
|
|
441
441
|
"inputSchema",
|
|
442
442
|
"input_schema"
|
|
443
443
|
);
|
|
444
|
-
return
|
|
444
|
+
return _chunkUPMRIVZBjs.toolInputFieldsForDisplay.call(void 0, inputSchema).filter((field) => field.required === true).map((field) => String(_nullishCoalesce(field.name, () => ( "")))).filter(Boolean);
|
|
445
445
|
}
|
|
446
446
|
function notConnectedSuffix(tool) {
|
|
447
447
|
const record = tool;
|
|
448
|
-
const status =
|
|
448
|
+
const status = _chunkUPMRIVZBjs.stringField.call(void 0, record, "credentialStatus", "credential_status");
|
|
449
449
|
const connected = record.connected;
|
|
450
450
|
const message = toolConnectionStatusMessage({
|
|
451
451
|
connected: connected === false ? false : void 0,
|
|
452
452
|
credentialStatus: status || void 0,
|
|
453
|
-
connectionMessage:
|
|
453
|
+
connectionMessage: _chunkUPMRIVZBjs.stringField.call(void 0, record, "connectionMessage", "connection_message") || void 0
|
|
454
454
|
});
|
|
455
455
|
return message ? ` - \u26A0 ${message}` : "";
|
|
456
456
|
}
|
|
457
457
|
function shortPricingHint(tool) {
|
|
458
|
-
const pricing =
|
|
458
|
+
const pricing = _chunkUPMRIVZBjs.recordField.call(void 0,
|
|
459
459
|
tool,
|
|
460
460
|
"pricing"
|
|
461
461
|
);
|
|
462
462
|
const credits = numberField(pricing, "creditsPerUnit", "credits_per_unit");
|
|
463
|
-
const unit =
|
|
463
|
+
const unit = _chunkUPMRIVZBjs.stringField.call(void 0, pricing, "unit");
|
|
464
464
|
if (credits !== null) {
|
|
465
465
|
return `${formatDecimal(credits)} cr/${unit || "unit"}`;
|
|
466
466
|
}
|
|
467
|
-
const summary =
|
|
467
|
+
const summary = _chunkUPMRIVZBjs.stringField.call(void 0, pricing, "summary");
|
|
468
468
|
if (summary) return summary;
|
|
469
|
-
const displayText =
|
|
469
|
+
const displayText = _chunkUPMRIVZBjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
470
470
|
return displayText || null;
|
|
471
471
|
}
|
|
472
472
|
function aggregateCategorySummaries(tools) {
|
|
@@ -510,13 +510,13 @@ function categoryEnumerationRender(summaries) {
|
|
|
510
510
|
};
|
|
511
511
|
}
|
|
512
512
|
async function listToolCategories(emitJson, compact) {
|
|
513
|
-
const client = new (0,
|
|
513
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
514
514
|
if (!emitJson) {
|
|
515
515
|
const summaries2 = (await client.listToolCategories()).map((category) => ({
|
|
516
516
|
...category,
|
|
517
517
|
description: describeToolCategory(category.name)
|
|
518
518
|
}));
|
|
519
|
-
|
|
519
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
|
|
520
520
|
{ categories: summaries2, render: categoryEnumerationRender(summaries2) },
|
|
521
521
|
{ json: false }
|
|
522
522
|
);
|
|
@@ -526,7 +526,7 @@ async function listToolCategories(emitJson, compact) {
|
|
|
526
526
|
const items = rawTools.map(toListedTool);
|
|
527
527
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
528
528
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
529
|
-
|
|
529
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
|
|
530
530
|
{
|
|
531
531
|
tools: outputItems,
|
|
532
532
|
count: outputItems.length,
|
|
@@ -545,7 +545,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
545
545
|
const known = summaries.map((item) => item.name);
|
|
546
546
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
547
547
|
if (emitJson) {
|
|
548
|
-
|
|
548
|
+
_chunkVQALXEXOjs.printJson.call(void 0, {
|
|
549
549
|
ok: false,
|
|
550
550
|
exitCode: 4,
|
|
551
551
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -559,13 +559,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
559
559
|
const render = categoryEnumerationRender(summaries);
|
|
560
560
|
console.error(message);
|
|
561
561
|
console.error("");
|
|
562
|
-
console.error(
|
|
562
|
+
console.error(_chunkVQALXEXOjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
563
563
|
console.error("");
|
|
564
564
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
565
565
|
return 4;
|
|
566
566
|
}
|
|
567
567
|
async function listToolsInCategory(category, emitJson) {
|
|
568
|
-
const client = new (0,
|
|
568
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
569
569
|
const { tools: rawTools, categories } = await client.listToolsInCategory(category);
|
|
570
570
|
const summaries = categories.map((item) => ({
|
|
571
571
|
...item,
|
|
@@ -601,7 +601,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
601
601
|
}
|
|
602
602
|
]
|
|
603
603
|
};
|
|
604
|
-
|
|
604
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
|
|
605
605
|
{
|
|
606
606
|
category,
|
|
607
607
|
total: rows.length,
|
|
@@ -614,7 +614,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
614
614
|
return 0;
|
|
615
615
|
}
|
|
616
616
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
617
|
-
const client = new (0,
|
|
617
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
618
618
|
const items = (await client.listTools({
|
|
619
619
|
categories: requestedCategories.join(","),
|
|
620
620
|
compact
|
|
@@ -643,7 +643,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
643
643
|
]
|
|
644
644
|
};
|
|
645
645
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
646
|
-
|
|
646
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
|
|
647
647
|
{
|
|
648
648
|
tools: outputItems,
|
|
649
649
|
count: outputItems.length,
|
|
@@ -662,13 +662,13 @@ async function listTools(category, options = {}) {
|
|
|
662
662
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]), () => ( ""));
|
|
663
663
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
664
664
|
const compact = options.compact !== false;
|
|
665
|
-
const emitJson = options.json === true ||
|
|
665
|
+
const emitJson = options.json === true || _chunkVQALXEXOjs.shouldEmitJson.call(void 0, );
|
|
666
666
|
if (positional && flagCategories.length > 0) {
|
|
667
667
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
668
668
|
if (!flagIsSameSingle) {
|
|
669
669
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
670
670
|
if (emitJson) {
|
|
671
|
-
|
|
671
|
+
_chunkVQALXEXOjs.printJson.call(void 0, {
|
|
672
672
|
ok: false,
|
|
673
673
|
exitCode: 2,
|
|
674
674
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -695,7 +695,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
695
695
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
696
696
|
return 1;
|
|
697
697
|
}
|
|
698
|
-
const client = new (0,
|
|
698
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
699
699
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
700
700
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
701
701
|
const jsonOutput = options.json === true;
|
|
@@ -719,7 +719,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
719
719
|
query,
|
|
720
720
|
mode
|
|
721
721
|
}) : null;
|
|
722
|
-
|
|
722
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
|
|
723
723
|
{
|
|
724
724
|
tools: outputTools,
|
|
725
725
|
count: outputTools.length,
|
|
@@ -737,7 +737,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
737
737
|
} : {},
|
|
738
738
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
739
739
|
},
|
|
740
|
-
{ json: options.json ||
|
|
740
|
+
{ json: options.json || _chunkVQALXEXOjs.shouldEmitJson.call(void 0, ) }
|
|
741
741
|
);
|
|
742
742
|
return 0;
|
|
743
743
|
}
|
|
@@ -792,8 +792,8 @@ function printPlayAliasToolError(toolId, play) {
|
|
|
792
792
|
console.error(playAliasToolErrorMessage(toolId, play));
|
|
793
793
|
}
|
|
794
794
|
function playLikeToolExecuteErrorMessage(toolId, tool) {
|
|
795
|
-
const playReference = tool ?
|
|
796
|
-
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${
|
|
795
|
+
const playReference = tool ? _chunkUPMRIVZBjs.playReferenceForTool.call(void 0, tool) : null;
|
|
796
|
+
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunkUPMRIVZBjs.playSearchCommandForToolId.call(void 0, toolId)}`;
|
|
797
797
|
return [
|
|
798
798
|
`${toolId} is a workflow/play entry, not an atomic provider tool.`,
|
|
799
799
|
nextStep,
|
|
@@ -833,13 +833,13 @@ Output:
|
|
|
833
833
|
activity.
|
|
834
834
|
`
|
|
835
835
|
);
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
836
|
+
_chunkGKYAYLRIjs.registerIntegrationBalanceCommand.call(void 0, tools, true);
|
|
837
|
+
_chunkGKYAYLRIjs.registerWorkspaceConnectionListCommand.call(void 0, tools, "workspace-connections", true);
|
|
838
|
+
_chunkGKYAYLRIjs.registerLegacyHubSpotMembersCommand.call(void 0, tools, true);
|
|
839
|
+
_chunkGKYAYLRIjs.registerLegacyWorkspaceConnectionCommand.call(void 0, tools, true);
|
|
840
|
+
_chunkGKYAYLRIjs.registerLegacyCalendarDelegationCommand.call(void 0, tools, true);
|
|
841
|
+
_chunkGKYAYLRIjs.registerLegacyAvailabilityCalendarsCommand.call(void 0, tools, true);
|
|
842
|
+
_chunkGKYAYLRIjs.registerIntegrationConnectCommand.call(void 0, tools, false, true);
|
|
843
843
|
tools.command("list [category]").description("Browse tool categories, or list every tool in a category.").addHelpText(
|
|
844
844
|
"after",
|
|
845
845
|
`
|
|
@@ -872,7 +872,7 @@ Examples:
|
|
|
872
872
|
json: Boolean(options.json)
|
|
873
873
|
});
|
|
874
874
|
});
|
|
875
|
-
|
|
875
|
+
_chunkJWUAX6OPjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
876
876
|
tools.command("grep <query>").description(
|
|
877
877
|
"Regex grep over tool ids, descriptions, categories, and input fields."
|
|
878
878
|
).addHelpText(
|
|
@@ -907,7 +907,7 @@ Examples:
|
|
|
907
907
|
});
|
|
908
908
|
const addToolMetadataCommand = (command) => {
|
|
909
909
|
let compatibilityMetadata;
|
|
910
|
-
|
|
910
|
+
_chunkADRC5I3Rjs.registerCompatibilityCatalog.call(void 0, command, () => ({
|
|
911
911
|
toolId: command.args[0],
|
|
912
912
|
acceptMetadata: (metadata) => {
|
|
913
913
|
compatibilityMetadata = metadata;
|
|
@@ -977,7 +977,7 @@ Examples:
|
|
|
977
977
|
process.exitCode = await narrowView();
|
|
978
978
|
return;
|
|
979
979
|
}
|
|
980
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
980
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-VUTT5ZKU.js")));
|
|
981
981
|
process.exitCode = await describeAnything(
|
|
982
982
|
toolId,
|
|
983
983
|
{
|
|
@@ -992,7 +992,7 @@ Examples:
|
|
|
992
992
|
});
|
|
993
993
|
};
|
|
994
994
|
addToolMetadataCommand(
|
|
995
|
-
|
|
995
|
+
_chunk6YCA5NKJjs.addDescribeOptions.call(void 0,
|
|
996
996
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
997
997
|
{ json: false }
|
|
998
998
|
)
|
|
@@ -1061,7 +1061,7 @@ Examples:
|
|
|
1061
1061
|
options,
|
|
1062
1062
|
void 0,
|
|
1063
1063
|
true,
|
|
1064
|
-
|
|
1064
|
+
_chunkMF2GHZDOjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
1065
1065
|
);
|
|
1066
1066
|
}
|
|
1067
1067
|
);
|
|
@@ -1069,13 +1069,13 @@ Examples:
|
|
|
1069
1069
|
function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
1070
1070
|
let metadata;
|
|
1071
1071
|
const startedAt = performance.now();
|
|
1072
|
-
const baseUrl =
|
|
1073
|
-
|
|
1074
|
-
const result =
|
|
1072
|
+
const baseUrl = _chunk7IKQKKNXjs.resolveConfig.call(void 0, ).baseUrl;
|
|
1073
|
+
_chunkMF2GHZDOjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1074
|
+
const result = _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
|
|
1075
1075
|
"SDK compatibility",
|
|
1076
|
-
() =>
|
|
1076
|
+
() => _chunk4MK42735js.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1077
1077
|
command: "tools execute",
|
|
1078
|
-
skillsVersion:
|
|
1078
|
+
skillsVersion: _chunk7IKQKKNXjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
1079
1079
|
persistCache: false,
|
|
1080
1080
|
timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
|
|
1081
1081
|
catalog: {
|
|
@@ -1089,7 +1089,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1089
1089
|
})
|
|
1090
1090
|
).then(
|
|
1091
1091
|
(compatibility) => {
|
|
1092
|
-
|
|
1092
|
+
_chunkMF2GHZDOjs.recordCliTrace.call(void 0, {
|
|
1093
1093
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1094
1094
|
ms: performance.now() - startedAt,
|
|
1095
1095
|
ok: compatibility.error === null,
|
|
@@ -1098,7 +1098,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1098
1098
|
return compatibility;
|
|
1099
1099
|
},
|
|
1100
1100
|
(error) => {
|
|
1101
|
-
|
|
1101
|
+
_chunkMF2GHZDOjs.recordCliTrace.call(void 0, {
|
|
1102
1102
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1103
1103
|
ms: performance.now() - startedAt,
|
|
1104
1104
|
ok: false
|
|
@@ -1113,7 +1113,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1113
1113
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1114
1114
|
return 1;
|
|
1115
1115
|
}
|
|
1116
|
-
const client = new (0,
|
|
1116
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
1117
1117
|
let tool;
|
|
1118
1118
|
try {
|
|
1119
1119
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1167,12 +1167,12 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1167
1167
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1168
1168
|
if (inferenceQuote)
|
|
1169
1169
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1170
|
-
|
|
1170
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
|
|
1171
1171
|
{
|
|
1172
1172
|
toolId: String(tool.toolId || toolId),
|
|
1173
|
-
cost:
|
|
1173
|
+
cost: _chunkUPMRIVZBjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1174
1174
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1175
|
-
...
|
|
1175
|
+
..._chunkUPMRIVZBjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunkUPMRIVZBjs.recordField.call(void 0, tool, "pricing") } : {},
|
|
1176
1176
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1177
1177
|
},
|
|
1178
1178
|
{
|
|
@@ -1183,14 +1183,14 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1183
1183
|
);
|
|
1184
1184
|
return 0;
|
|
1185
1185
|
}
|
|
1186
|
-
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !
|
|
1187
|
-
const contract =
|
|
1186
|
+
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunkUPMRIVZBjs.isMonitorTypeTool.call(void 0, tool) && !_chunkUPMRIVZBjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
|
|
1187
|
+
const contract = _chunkUPMRIVZBjs.toolContractJsonForDescribe.call(void 0,
|
|
1188
1188
|
tool,
|
|
1189
1189
|
toolId,
|
|
1190
1190
|
void 0,
|
|
1191
1191
|
seedToolListScript
|
|
1192
1192
|
);
|
|
1193
|
-
|
|
1193
|
+
_chunkVQALXEXOjs.printCompactJson.call(void 0, {
|
|
1194
1194
|
toolId: contract.toolId,
|
|
1195
1195
|
...options.schemaOnly ? {
|
|
1196
1196
|
inputSchema: contract.inputSchema,
|
|
@@ -1213,8 +1213,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1213
1213
|
return 0;
|
|
1214
1214
|
}
|
|
1215
1215
|
if (options.contractJson) {
|
|
1216
|
-
|
|
1217
|
-
...
|
|
1216
|
+
_chunkVQALXEXOjs.printCompactJson.call(void 0, {
|
|
1217
|
+
..._chunkUPMRIVZBjs.toolContractJsonForDescribe.call(void 0,
|
|
1218
1218
|
tool,
|
|
1219
1219
|
toolId,
|
|
1220
1220
|
void 0,
|
|
@@ -1227,8 +1227,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1227
1227
|
}
|
|
1228
1228
|
const emitJson = options.json === true;
|
|
1229
1229
|
if (emitJson) {
|
|
1230
|
-
|
|
1231
|
-
...
|
|
1230
|
+
_chunkVQALXEXOjs.printCompactJson.call(void 0, {
|
|
1231
|
+
..._chunkUPMRIVZBjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
|
|
1232
1232
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1233
1233
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1234
1234
|
});
|
|
@@ -1253,7 +1253,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1253
1253
|
printCompactToolContract(tool, toolId);
|
|
1254
1254
|
if (modelDescription) {
|
|
1255
1255
|
process.stdout.write(`
|
|
1256
|
-
${
|
|
1256
|
+
${_chunkUPMRIVZBjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1257
1257
|
}
|
|
1258
1258
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1259
1259
|
return 0;
|
|
@@ -1261,7 +1261,7 @@ ${_chunkECWOIXAVjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
|
1261
1261
|
printCompactToolContract(tool, toolId);
|
|
1262
1262
|
if (modelDescription) {
|
|
1263
1263
|
process.stdout.write(`
|
|
1264
|
-
${
|
|
1264
|
+
${_chunkUPMRIVZBjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1265
1265
|
}
|
|
1266
1266
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1267
1267
|
return 0;
|
|
@@ -1278,10 +1278,10 @@ function printInferenceQuoteSummary(quote) {
|
|
|
1278
1278
|
for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
|
|
1279
1279
|
}
|
|
1280
1280
|
function printMonitorTypeFilters(tool) {
|
|
1281
|
-
const schema =
|
|
1282
|
-
const properties =
|
|
1281
|
+
const schema = _chunkUPMRIVZBjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
|
|
1282
|
+
const properties = _chunkUPMRIVZBjs.recordField.call(void 0, schema, "properties");
|
|
1283
1283
|
const required = new Set(
|
|
1284
|
-
|
|
1284
|
+
_chunkUPMRIVZBjs.arrayField.call(void 0, schema, "required").filter(
|
|
1285
1285
|
(v) => typeof v === "string"
|
|
1286
1286
|
)
|
|
1287
1287
|
);
|
|
@@ -1292,24 +1292,24 @@ function printMonitorTypeFilters(tool) {
|
|
|
1292
1292
|
}
|
|
1293
1293
|
console.log("Deploy filters (set in the monitor payload):");
|
|
1294
1294
|
for (const name of names) {
|
|
1295
|
-
const field =
|
|
1295
|
+
const field = _chunkUPMRIVZBjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
|
|
1296
1296
|
const star = required.has(name) ? "*" : "";
|
|
1297
|
-
const enumVals =
|
|
1297
|
+
const enumVals = _chunkUPMRIVZBjs.arrayField.call(void 0, field, "enum").filter(
|
|
1298
1298
|
(v) => typeof v === "string"
|
|
1299
1299
|
);
|
|
1300
|
-
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` :
|
|
1301
|
-
const desc =
|
|
1300
|
+
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunkUPMRIVZBjs.stringField.call(void 0, field, "type") || "string";
|
|
1301
|
+
const desc = _chunkUPMRIVZBjs.stringField.call(void 0, field, "description");
|
|
1302
1302
|
console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
1305
1305
|
function printMonitorTypeFilterExamples(tool) {
|
|
1306
|
-
const documentation =
|
|
1307
|
-
const fields =
|
|
1306
|
+
const documentation = _chunkUPMRIVZBjs.recordField.call(void 0, tool, "documentation");
|
|
1307
|
+
const fields = _chunkUPMRIVZBjs.recordField.call(void 0, documentation, "fields");
|
|
1308
1308
|
const examples = Object.entries(fields).flatMap(([name, rawField]) => {
|
|
1309
|
-
const grammar =
|
|
1310
|
-
const example =
|
|
1309
|
+
const grammar = _chunkUPMRIVZBjs.recordField.call(void 0, _chunkUPMRIVZBjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
|
|
1310
|
+
const example = _chunkUPMRIVZBjs.stringField.call(void 0, grammar, "example");
|
|
1311
1311
|
const values = [
|
|
1312
|
-
...
|
|
1312
|
+
..._chunkUPMRIVZBjs.arrayField.call(void 0, grammar, "examples").filter(
|
|
1313
1313
|
(value) => typeof value === "string" && Boolean(value)
|
|
1314
1314
|
),
|
|
1315
1315
|
...example ? [example] : []
|
|
@@ -1324,21 +1324,21 @@ function printMonitorTypeFilterExamples(tool) {
|
|
|
1324
1324
|
}
|
|
1325
1325
|
}
|
|
1326
1326
|
function printMonitorTypeStreams(tool) {
|
|
1327
|
-
const streams =
|
|
1328
|
-
|
|
1327
|
+
const streams = _chunkUPMRIVZBjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
|
|
1328
|
+
_chunkUPMRIVZBjs.isRecord
|
|
1329
1329
|
);
|
|
1330
1330
|
if (!streams.length) return;
|
|
1331
1331
|
console.log("");
|
|
1332
1332
|
console.log("Filter columns (a play's sqlListeners.where, per stream):");
|
|
1333
1333
|
for (const stream of streams) {
|
|
1334
|
-
const name =
|
|
1335
|
-
const cols =
|
|
1334
|
+
const name = _chunkUPMRIVZBjs.stringField.call(void 0, stream, "stream");
|
|
1335
|
+
const cols = _chunkUPMRIVZBjs.arrayField.call(void 0, stream, "columns").filter(_chunkUPMRIVZBjs.isRecord).map((col) => _chunkUPMRIVZBjs.stringField.call(void 0, col, "name")).filter(Boolean);
|
|
1336
1336
|
console.log(`- ${name}: ${cols.join(", ")}`);
|
|
1337
1337
|
}
|
|
1338
1338
|
}
|
|
1339
1339
|
function monitorTypePricingLines(tool) {
|
|
1340
|
-
const pricing =
|
|
1341
|
-
const byType =
|
|
1340
|
+
const pricing = _chunkUPMRIVZBjs.recordField.call(void 0, tool, "pricing");
|
|
1341
|
+
const byType = _chunkUPMRIVZBjs.recordField.call(void 0,
|
|
1342
1342
|
pricing,
|
|
1343
1343
|
"pricing_by_radar_type",
|
|
1344
1344
|
"pricingByRadarType"
|
|
@@ -1349,9 +1349,9 @@ function monitorTypePricingLines(tool) {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
const lines = ["Pricing (Deepline credits per accepted event):"];
|
|
1351
1351
|
for (const key of keys) {
|
|
1352
|
-
const entry =
|
|
1352
|
+
const entry = _chunkUPMRIVZBjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
|
|
1353
1353
|
const credits = numberField(entry, "deepline_credits", "deeplineCredits");
|
|
1354
|
-
const display =
|
|
1354
|
+
const display = _chunkUPMRIVZBjs.stringField.call(void 0, entry, "display");
|
|
1355
1355
|
const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "not listed");
|
|
1356
1356
|
lines.push(`- ${key}: ${shown}`);
|
|
1357
1357
|
}
|
|
@@ -1361,20 +1361,20 @@ function printMonitorTypePricing(tool) {
|
|
|
1361
1361
|
for (const line of monitorTypePricingLines(tool)) console.log(line);
|
|
1362
1362
|
}
|
|
1363
1363
|
function printMonitorTypeDeploy(tool) {
|
|
1364
|
-
const deploy =
|
|
1365
|
-
const toolId =
|
|
1366
|
-
const example =
|
|
1364
|
+
const deploy = _chunkUPMRIVZBjs.recordField.call(void 0, tool, "deploy");
|
|
1365
|
+
const toolId = _chunkUPMRIVZBjs.stringField.call(void 0, tool, "toolId");
|
|
1366
|
+
const example = _chunkUPMRIVZBjs.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
|
|
1367
1367
|
console.log("Deploy (a monitor type is deployed, not executed):");
|
|
1368
1368
|
console.log(` ${example}`);
|
|
1369
1369
|
}
|
|
1370
1370
|
function printMonitorTypeContract(tool, requestedToolId) {
|
|
1371
|
-
const toolId =
|
|
1371
|
+
const toolId = _chunkUPMRIVZBjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
|
|
1372
1372
|
console.log(toolId);
|
|
1373
|
-
const displayName =
|
|
1373
|
+
const displayName = _chunkUPMRIVZBjs.stringField.call(void 0, tool, "displayName");
|
|
1374
1374
|
if (displayName) console.log(`Best for: ${displayName}`);
|
|
1375
|
-
const description =
|
|
1375
|
+
const description = _chunkUPMRIVZBjs.stringField.call(void 0, tool, "description");
|
|
1376
1376
|
if (description) console.log(`Description: ${description}`);
|
|
1377
|
-
const categories =
|
|
1377
|
+
const categories = _chunkUPMRIVZBjs.arrayField.call(void 0, tool, "categories").filter(
|
|
1378
1378
|
(v) => typeof v === "string"
|
|
1379
1379
|
);
|
|
1380
1380
|
if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
|
|
@@ -1394,31 +1394,31 @@ function printMonitorTypeContract(tool, requestedToolId) {
|
|
|
1394
1394
|
console.log(`More: deepline describe ${toolId}`);
|
|
1395
1395
|
}
|
|
1396
1396
|
function toolGuidanceLines(guidance) {
|
|
1397
|
-
const record =
|
|
1398
|
-
const toolGuidance =
|
|
1399
|
-
const providerGuidance =
|
|
1397
|
+
const record = _chunkUPMRIVZBjs.isRecord.call(void 0, guidance) ? guidance : {};
|
|
1398
|
+
const toolGuidance = _chunkUPMRIVZBjs.stringField.call(void 0, record, "tool");
|
|
1399
|
+
const providerGuidance = _chunkUPMRIVZBjs.stringField.call(void 0, record, "provider");
|
|
1400
1400
|
return [
|
|
1401
1401
|
...toolGuidance ? [`- This tool: ${toolGuidance}`] : [],
|
|
1402
1402
|
...providerGuidance ? [`- Provider: ${providerGuidance}`] : []
|
|
1403
1403
|
];
|
|
1404
1404
|
}
|
|
1405
1405
|
function printCompactToolContract(tool, requestedToolId) {
|
|
1406
|
-
if (
|
|
1406
|
+
if (_chunkUPMRIVZBjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1407
1407
|
printMonitorTypeContract(tool, requestedToolId);
|
|
1408
1408
|
return;
|
|
1409
1409
|
}
|
|
1410
|
-
const contract =
|
|
1410
|
+
const contract = _chunkUPMRIVZBjs.toolContractJsonForDescribe.call(void 0,
|
|
1411
1411
|
tool,
|
|
1412
1412
|
requestedToolId,
|
|
1413
1413
|
void 0,
|
|
1414
1414
|
seedToolListScript
|
|
1415
1415
|
);
|
|
1416
|
-
const cost =
|
|
1417
|
-
const getters =
|
|
1416
|
+
const cost = _chunkUPMRIVZBjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
|
|
1417
|
+
const getters = _chunkUPMRIVZBjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1418
1418
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1419
1419
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1420
|
-
const inputFields =
|
|
1421
|
-
|
|
1420
|
+
const inputFields = _chunkUPMRIVZBjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1421
|
+
_chunkUPMRIVZBjs.recordField.call(void 0, contract, "inputSchema")
|
|
1422
1422
|
);
|
|
1423
1423
|
console.log(String(contract.toolId));
|
|
1424
1424
|
if (contract.displayName) console.log(`Best for: ${contract.displayName}`);
|
|
@@ -1435,9 +1435,9 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1435
1435
|
printToolOutputArrayShape(contract);
|
|
1436
1436
|
printToolExecutionHints(contract);
|
|
1437
1437
|
if (contract.deprecated === true) {
|
|
1438
|
-
const deprecation =
|
|
1439
|
-
const message =
|
|
1440
|
-
const replacementToolId =
|
|
1438
|
+
const deprecation = _chunkUPMRIVZBjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
|
|
1439
|
+
const message = _chunkUPMRIVZBjs.stringField.call(void 0, deprecation, "message");
|
|
1440
|
+
const replacementToolId = _chunkUPMRIVZBjs.stringField.call(void 0,
|
|
1441
1441
|
deprecation,
|
|
1442
1442
|
"replacementToolId",
|
|
1443
1443
|
"replacement_tool_id"
|
|
@@ -1460,12 +1460,12 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1460
1460
|
console.log("");
|
|
1461
1461
|
console.log("Inputs:");
|
|
1462
1462
|
for (const field of inputFields) {
|
|
1463
|
-
if (!
|
|
1464
|
-
const name =
|
|
1463
|
+
if (!_chunkUPMRIVZBjs.isRecord.call(void 0, field)) continue;
|
|
1464
|
+
const name = _chunkUPMRIVZBjs.stringField.call(void 0, field, "name");
|
|
1465
1465
|
if (!name) continue;
|
|
1466
1466
|
const required = field.required ? "*" : "";
|
|
1467
|
-
const type =
|
|
1468
|
-
const description =
|
|
1467
|
+
const type = _chunkUPMRIVZBjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1468
|
+
const description = _chunkUPMRIVZBjs.stringField.call(void 0, field, "description");
|
|
1469
1469
|
const enumValues = Array.isArray(field.enum) ? field.enum : [];
|
|
1470
1470
|
const enumSuffix = enumValues.length ? ` enum=${enumValues.map(String).join("|")}` : "";
|
|
1471
1471
|
const itemBoundsSuffix = arrayItemBoundsSuffix(field);
|
|
@@ -1480,8 +1480,8 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1480
1480
|
}
|
|
1481
1481
|
console.log("");
|
|
1482
1482
|
printToolExamplesOnly(tool, requestedToolId);
|
|
1483
|
-
const starterScript =
|
|
1484
|
-
const starterPath =
|
|
1483
|
+
const starterScript = _chunkUPMRIVZBjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
|
|
1484
|
+
const starterPath = _chunkUPMRIVZBjs.stringField.call(void 0, starterScript, "path");
|
|
1485
1485
|
if (starterPath) {
|
|
1486
1486
|
console.log("");
|
|
1487
1487
|
console.log(`Starter script: ${starterPath}`);
|
|
@@ -1492,16 +1492,16 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1492
1492
|
console.log("Getters:");
|
|
1493
1493
|
if (listGetters.length) console.log(listGetterHeading());
|
|
1494
1494
|
for (const entry of listGetters) {
|
|
1495
|
-
if (
|
|
1495
|
+
if (_chunkUPMRIVZBjs.isRecord.call(void 0, entry))
|
|
1496
1496
|
console.log(
|
|
1497
|
-
`- ${
|
|
1497
|
+
`- ${_chunkUPMRIVZBjs.stringField.call(void 0, entry, "name")}: ${_chunkUPMRIVZBjs.playResultExpression.call(void 0, entry)}`
|
|
1498
1498
|
);
|
|
1499
1499
|
}
|
|
1500
1500
|
if (valueGetters.length) console.log("Values:");
|
|
1501
1501
|
for (const entry of valueGetters) {
|
|
1502
|
-
if (
|
|
1502
|
+
if (_chunkUPMRIVZBjs.isRecord.call(void 0, entry))
|
|
1503
1503
|
console.log(
|
|
1504
|
-
`- ${
|
|
1504
|
+
`- ${_chunkUPMRIVZBjs.stringField.call(void 0, entry, "name")}: ${_chunkUPMRIVZBjs.playResultExpression.call(void 0, entry)}`
|
|
1505
1505
|
);
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
@@ -1512,22 +1512,22 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1512
1512
|
console.log(`More: deepline describe ${contract.toolId}`);
|
|
1513
1513
|
}
|
|
1514
1514
|
function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
1515
|
-
if (
|
|
1515
|
+
if (_chunkUPMRIVZBjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1516
1516
|
return monitorTypePricingLines(tool);
|
|
1517
1517
|
}
|
|
1518
1518
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1519
|
-
const cost =
|
|
1520
|
-
const pricingModel =
|
|
1521
|
-
const billing =
|
|
1522
|
-
const explicitUnit =
|
|
1519
|
+
const cost = _chunkUPMRIVZBjs.Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1520
|
+
const pricingModel = _chunkUPMRIVZBjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
|
|
1521
|
+
const billing = _chunkUPMRIVZBjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunkUPMRIVZBjs.stringField.call(void 0, cost, "billingSource") || _chunkUPMRIVZBjs.stringField.call(void 0, cost, "billingMode") || "unknown";
|
|
1522
|
+
const explicitUnit = _chunkUPMRIVZBjs.stringField.call(void 0, cost, "unit");
|
|
1523
1523
|
const unit = explicitUnit || (pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit");
|
|
1524
1524
|
const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
|
|
1525
1525
|
const usd = numberField(cost, "deeplineUsdPerPricingUnit");
|
|
1526
|
-
const displayText =
|
|
1527
|
-
const summary =
|
|
1526
|
+
const displayText = _chunkUPMRIVZBjs.stringField.call(void 0, cost, "displayText");
|
|
1527
|
+
const summary = _chunkUPMRIVZBjs.stringField.call(void 0, cost, "summary");
|
|
1528
1528
|
const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
|
|
1529
1529
|
const reference = cost.observedReference;
|
|
1530
|
-
const observedMax =
|
|
1530
|
+
const observedMax = _chunkUPMRIVZBjs.observedMaxText.call(void 0, cost);
|
|
1531
1531
|
return [
|
|
1532
1532
|
`${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
|
|
1533
1533
|
...observedMax ? [` ${observedMax}`] : [],
|
|
@@ -1544,19 +1544,19 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
|
1544
1544
|
console.log(line);
|
|
1545
1545
|
}
|
|
1546
1546
|
function printToolSchemaOnly(tool, requestedToolId) {
|
|
1547
|
-
if (
|
|
1547
|
+
if (_chunkUPMRIVZBjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1548
1548
|
printMonitorTypeFilters(tool);
|
|
1549
1549
|
printMonitorTypeStreams(tool);
|
|
1550
1550
|
return;
|
|
1551
1551
|
}
|
|
1552
|
-
const contract =
|
|
1552
|
+
const contract = _chunkUPMRIVZBjs.toolContractJsonForDescribe.call(void 0,
|
|
1553
1553
|
tool,
|
|
1554
1554
|
requestedToolId,
|
|
1555
1555
|
void 0,
|
|
1556
1556
|
seedToolListScript
|
|
1557
1557
|
);
|
|
1558
|
-
const inputFields =
|
|
1559
|
-
|
|
1558
|
+
const inputFields = _chunkUPMRIVZBjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1559
|
+
_chunkUPMRIVZBjs.recordField.call(void 0, contract, "inputSchema")
|
|
1560
1560
|
);
|
|
1561
1561
|
console.log(`Schema: ${contract.toolId}`);
|
|
1562
1562
|
if (!inputFields.length) {
|
|
@@ -1583,27 +1583,27 @@ function printToolSchemaOnly(tool, requestedToolId) {
|
|
|
1583
1583
|
}
|
|
1584
1584
|
printToolOutputArrayShape(contract);
|
|
1585
1585
|
const declaredSchema = declaredToolJsonSchema(
|
|
1586
|
-
|
|
1586
|
+
_chunkUPMRIVZBjs.recordField.call(void 0, contract, "inputSchema")
|
|
1587
1587
|
);
|
|
1588
1588
|
if (declaredSchema) {
|
|
1589
1589
|
console.log("Declared input JSON Schema:");
|
|
1590
1590
|
console.log(JSON.stringify(declaredSchema, null, 2));
|
|
1591
1591
|
}
|
|
1592
|
-
if (
|
|
1592
|
+
if (_chunkUPMRIVZBjs.isRecord.call(void 0, contract.responseSchema)) {
|
|
1593
1593
|
console.log("Deepline execution response JSON Schema:");
|
|
1594
1594
|
console.log(JSON.stringify(contract.responseSchema, null, 2));
|
|
1595
1595
|
}
|
|
1596
1596
|
}
|
|
1597
1597
|
function printToolExamplesOnly(tool, requestedToolId) {
|
|
1598
|
-
if (
|
|
1598
|
+
if (_chunkUPMRIVZBjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1599
1599
|
printMonitorTypeDeploy(tool);
|
|
1600
1600
|
return;
|
|
1601
1601
|
}
|
|
1602
|
-
if (
|
|
1602
|
+
if (_chunkUPMRIVZBjs.isPlayLikeTool.call(void 0, tool)) {
|
|
1603
1603
|
printPlayLikeToolUsage(tool, requestedToolId);
|
|
1604
1604
|
return;
|
|
1605
1605
|
}
|
|
1606
|
-
const contract =
|
|
1606
|
+
const contract = _chunkUPMRIVZBjs.toolContractJsonForDescribe.call(void 0,
|
|
1607
1607
|
tool,
|
|
1608
1608
|
requestedToolId,
|
|
1609
1609
|
void 0,
|
|
@@ -1611,9 +1611,9 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1611
1611
|
);
|
|
1612
1612
|
const toolId = String(contract.toolId);
|
|
1613
1613
|
const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
|
|
1614
|
-
const examples =
|
|
1614
|
+
const examples = _chunkUPMRIVZBjs.arrayField.call(void 0, tool, "examples").filter(_chunkUPMRIVZBjs.isRecord);
|
|
1615
1615
|
const firstExample = examples[0];
|
|
1616
|
-
const sampleInput = firstExample &&
|
|
1616
|
+
const sampleInput = firstExample && _chunkUPMRIVZBjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunkUPMRIVZBjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunkUPMRIVZBjs.samplePayloadForInputFields.call(void 0, inputFields)));
|
|
1617
1617
|
console.log("Example input payload:");
|
|
1618
1618
|
console.log(JSON.stringify(sampleInput, null, 2));
|
|
1619
1619
|
console.log(`Use in a play:`);
|
|
@@ -1627,32 +1627,32 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1627
1627
|
);
|
|
1628
1628
|
console.log("});");
|
|
1629
1629
|
console.log("const response = result.toolResponse.rawV2;");
|
|
1630
|
-
const getters =
|
|
1630
|
+
const getters = _chunkUPMRIVZBjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1631
1631
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1632
1632
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1633
|
-
const firstGetter = valueGetters.find(
|
|
1633
|
+
const firstGetter = valueGetters.find(_chunkUPMRIVZBjs.isRecord);
|
|
1634
1634
|
if (firstGetter) {
|
|
1635
|
-
const name =
|
|
1636
|
-
const expression =
|
|
1635
|
+
const name = _chunkUPMRIVZBjs.stringField.call(void 0, firstGetter, "name") || "value";
|
|
1636
|
+
const expression = _chunkUPMRIVZBjs.stringField.call(void 0, firstGetter, "expression");
|
|
1637
1637
|
if (expression)
|
|
1638
1638
|
console.log(
|
|
1639
1639
|
`const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
|
|
1640
1640
|
);
|
|
1641
1641
|
}
|
|
1642
1642
|
const arrayNames = new Set(
|
|
1643
|
-
|
|
1644
|
-
|
|
1643
|
+
_chunkUPMRIVZBjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1644
|
+
_chunkUPMRIVZBjs.recordField.call(void 0, tool, "outputSchema", "output_schema")
|
|
1645
1645
|
).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
|
|
1646
1646
|
);
|
|
1647
1647
|
const firstList = _nullishCoalesce(listGetters.find(
|
|
1648
|
-
(entry) =>
|
|
1649
|
-
), () => ( listGetters.find(
|
|
1650
|
-
if (
|
|
1651
|
-
const name = safeIdentifier(
|
|
1648
|
+
(entry) => _chunkUPMRIVZBjs.isRecord.call(void 0, entry) && arrayNames.has(_chunkUPMRIVZBjs.stringField.call(void 0, entry, "name"))
|
|
1649
|
+
), () => ( listGetters.find(_chunkUPMRIVZBjs.isRecord)));
|
|
1650
|
+
if (_chunkUPMRIVZBjs.isRecord.call(void 0, firstList)) {
|
|
1651
|
+
const name = safeIdentifier(_chunkUPMRIVZBjs.stringField.call(void 0, firstList, "name") || "list");
|
|
1652
1652
|
if (_chunkJ33TSWO5js.playToolListGetterMode.call(void 0, ) === "array") {
|
|
1653
|
-
console.log(`const ${name}_rows = ${
|
|
1653
|
+
console.log(`const ${name}_rows = ${_chunkUPMRIVZBjs.playResultExpression.call(void 0, firstList)};`);
|
|
1654
1654
|
} else {
|
|
1655
|
-
console.log(`const ${name}_ds = ${
|
|
1655
|
+
console.log(`const ${name}_ds = ${_chunkUPMRIVZBjs.playResultExpression.call(void 0, firstList)};`);
|
|
1656
1656
|
console.log(
|
|
1657
1657
|
"// Complete small list from this response; throws above the memory cap."
|
|
1658
1658
|
);
|
|
@@ -1662,7 +1662,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1662
1662
|
console.log("```");
|
|
1663
1663
|
if (firstList) printListGetterConsumption();
|
|
1664
1664
|
for (const example of examples) {
|
|
1665
|
-
const description =
|
|
1665
|
+
const description = _chunkUPMRIVZBjs.stringField.call(void 0, example, "description");
|
|
1666
1666
|
if (description) console.log(description);
|
|
1667
1667
|
console.log("Example Deepline execution response:");
|
|
1668
1668
|
console.log(JSON.stringify(example.response, null, 2));
|
|
@@ -1677,14 +1677,14 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1677
1677
|
}
|
|
1678
1678
|
function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
1679
1679
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1680
|
-
const inputFields =
|
|
1681
|
-
|
|
1680
|
+
const inputFields = _chunkUPMRIVZBjs.toolInputFieldsForDisplay.call(void 0,
|
|
1681
|
+
_chunkUPMRIVZBjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
|
|
1682
1682
|
);
|
|
1683
|
-
const sampleInput =
|
|
1684
|
-
const playReference =
|
|
1683
|
+
const sampleInput = _chunkUPMRIVZBjs.samplePayloadForInputFields.call(void 0, inputFields);
|
|
1684
|
+
const playReference = _chunkUPMRIVZBjs.playReferenceForTool.call(void 0, tool);
|
|
1685
1685
|
console.log("Run as a play:");
|
|
1686
1686
|
console.log(
|
|
1687
|
-
|
|
1687
|
+
_chunkUPMRIVZBjs.playRunCommandForTool.call(void 0,
|
|
1688
1688
|
tool,
|
|
1689
1689
|
toolId,
|
|
1690
1690
|
Object.keys(sampleInput).length ? sampleInput : void 0
|
|
@@ -1695,13 +1695,13 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
1697
|
function printToolGettersOnly(tool, requestedToolId) {
|
|
1698
|
-
const contract =
|
|
1698
|
+
const contract = _chunkUPMRIVZBjs.toolContractJsonForDescribe.call(void 0,
|
|
1699
1699
|
tool,
|
|
1700
1700
|
requestedToolId,
|
|
1701
1701
|
void 0,
|
|
1702
1702
|
seedToolListScript
|
|
1703
1703
|
);
|
|
1704
|
-
const getters =
|
|
1704
|
+
const getters = _chunkUPMRIVZBjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1705
1705
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1706
1706
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1707
1707
|
console.log(`Getters: ${contract.toolId}`);
|
|
@@ -1712,9 +1712,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1712
1712
|
if (listGetters.length) {
|
|
1713
1713
|
console.log(listGetterHeading());
|
|
1714
1714
|
for (const entry of listGetters) {
|
|
1715
|
-
if (
|
|
1715
|
+
if (_chunkUPMRIVZBjs.isRecord.call(void 0, entry))
|
|
1716
1716
|
console.log(
|
|
1717
|
-
`- ${
|
|
1717
|
+
`- ${_chunkUPMRIVZBjs.stringField.call(void 0, entry, "name")}: ${_chunkUPMRIVZBjs.playResultExpression.call(void 0, entry)}`
|
|
1718
1718
|
);
|
|
1719
1719
|
}
|
|
1720
1720
|
printListGetterConsumption();
|
|
@@ -1722,9 +1722,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1722
1722
|
if (valueGetters.length) {
|
|
1723
1723
|
console.log("Values:");
|
|
1724
1724
|
for (const entry of valueGetters) {
|
|
1725
|
-
if (
|
|
1725
|
+
if (_chunkUPMRIVZBjs.isRecord.call(void 0, entry))
|
|
1726
1726
|
console.log(
|
|
1727
|
-
`- ${
|
|
1727
|
+
`- ${_chunkUPMRIVZBjs.stringField.call(void 0, entry, "name")}: ${_chunkUPMRIVZBjs.playResultExpression.call(void 0, entry)}`
|
|
1728
1728
|
);
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
|
@@ -1762,22 +1762,22 @@ function listedToolDescription(tool) {
|
|
|
1762
1762
|
}
|
|
1763
1763
|
function formatListedToolCost(tool) {
|
|
1764
1764
|
const record = tool;
|
|
1765
|
-
if (
|
|
1765
|
+
if (_chunkUPMRIVZBjs.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
|
|
1766
1766
|
return "Cost: Free";
|
|
1767
1767
|
}
|
|
1768
|
-
const pricing =
|
|
1769
|
-
const displayText =
|
|
1768
|
+
const pricing = _chunkUPMRIVZBjs.recordField.call(void 0, record, "pricing");
|
|
1769
|
+
const displayText = _chunkUPMRIVZBjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
1770
1770
|
return displayText ? `Cost: ${displayText}` : "";
|
|
1771
1771
|
}
|
|
1772
1772
|
function printToolOutputArrayShape(tool) {
|
|
1773
|
-
const outputFields =
|
|
1774
|
-
|
|
1773
|
+
const outputFields = _chunkUPMRIVZBjs.toolOutputFieldsForDisplay.call(void 0,
|
|
1774
|
+
_chunkUPMRIVZBjs.recordField.call(void 0, _chunkUPMRIVZBjs.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
|
|
1775
1775
|
);
|
|
1776
1776
|
if (outputFields.length === 0) return;
|
|
1777
1777
|
console.log(" Output array shape (declared schema):");
|
|
1778
1778
|
for (const field of outputFields.slice(0, 60)) {
|
|
1779
1779
|
const name = String(field.name);
|
|
1780
|
-
const type =
|
|
1780
|
+
const type = _chunkUPMRIVZBjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1781
1781
|
const itemBounds = arrayItemBoundsSuffix(field);
|
|
1782
1782
|
console.log(` - ${name}: ${type}${itemBounds}`);
|
|
1783
1783
|
}
|
|
@@ -1786,14 +1786,14 @@ function printToolOutputArrayShape(tool) {
|
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
1788
1788
|
function declaredToolJsonSchema(inputSchema) {
|
|
1789
|
-
if (
|
|
1789
|
+
if (_chunkUPMRIVZBjs.isRecord.call(void 0, inputSchema.jsonSchema)) {
|
|
1790
1790
|
return inputSchema.jsonSchema;
|
|
1791
1791
|
}
|
|
1792
1792
|
return Array.isArray(inputSchema.fields) ? null : inputSchema;
|
|
1793
1793
|
}
|
|
1794
1794
|
function arrayItemBoundsSuffix(field) {
|
|
1795
|
-
const itemSchema =
|
|
1796
|
-
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type :
|
|
1795
|
+
const itemSchema = _chunkUPMRIVZBjs.isRecord.call(void 0, field.items) ? field.items : null;
|
|
1796
|
+
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunkUPMRIVZBjs.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
|
|
1797
1797
|
const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _14 => _14.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
|
|
1798
1798
|
const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
|
|
1799
1799
|
const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
|
|
@@ -1806,21 +1806,21 @@ function arrayItemBoundsSuffix(field) {
|
|
|
1806
1806
|
return itemTypeSuffix;
|
|
1807
1807
|
}
|
|
1808
1808
|
function printToolExecutionHints(value) {
|
|
1809
|
-
const batchCapabilityRecord =
|
|
1810
|
-
|
|
1809
|
+
const batchCapabilityRecord = _chunkUPMRIVZBjs.recordField.call(void 0,
|
|
1810
|
+
_chunkUPMRIVZBjs.isRecord.call(void 0, value) ? value : {},
|
|
1811
1811
|
"batchCapability",
|
|
1812
1812
|
"batch_capability"
|
|
1813
1813
|
);
|
|
1814
1814
|
const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
|
|
1815
|
-
const executionMetadata =
|
|
1816
|
-
|
|
1815
|
+
const executionMetadata = _chunkUPMRIVZBjs.recordField.call(void 0,
|
|
1816
|
+
_chunkUPMRIVZBjs.isRecord.call(void 0, value) ? value : {},
|
|
1817
1817
|
"executionMetadata",
|
|
1818
1818
|
"execution_metadata"
|
|
1819
1819
|
);
|
|
1820
1820
|
if (batchCapability) {
|
|
1821
|
-
const status =
|
|
1822
|
-
const surface =
|
|
1823
|
-
const operation =
|
|
1821
|
+
const status = _chunkUPMRIVZBjs.stringField.call(void 0, batchCapability, "status") || "unknown";
|
|
1822
|
+
const surface = _chunkUPMRIVZBjs.stringField.call(void 0, batchCapability, "surface");
|
|
1823
|
+
const operation = _chunkUPMRIVZBjs.stringField.call(void 0,
|
|
1824
1824
|
batchCapability,
|
|
1825
1825
|
"batchOperation",
|
|
1826
1826
|
"batch_operation"
|
|
@@ -1830,7 +1830,7 @@ function printToolExecutionHints(value) {
|
|
|
1830
1830
|
"maxBatchSize",
|
|
1831
1831
|
"max_batch_size"
|
|
1832
1832
|
);
|
|
1833
|
-
const notes =
|
|
1833
|
+
const notes = _chunkUPMRIVZBjs.stringField.call(void 0, batchCapability, "notes");
|
|
1834
1834
|
console.log("");
|
|
1835
1835
|
console.log("Batching:");
|
|
1836
1836
|
console.log(`- Catalog status: ${status}${surface ? ` (${surface})` : ""}`);
|
|
@@ -1849,11 +1849,11 @@ function printToolExecutionHints(value) {
|
|
|
1849
1849
|
}
|
|
1850
1850
|
if (notes) console.log(`- Details: ${notes}`);
|
|
1851
1851
|
}
|
|
1852
|
-
const configuredRateLimits =
|
|
1852
|
+
const configuredRateLimits = _chunkUPMRIVZBjs.arrayField.call(void 0,
|
|
1853
1853
|
executionMetadata,
|
|
1854
1854
|
"configuredRateLimits",
|
|
1855
1855
|
"configured_rate_limits"
|
|
1856
|
-
).filter(
|
|
1856
|
+
).filter(_chunkUPMRIVZBjs.isRecord);
|
|
1857
1857
|
if (configuredRateLimits.length > 0) {
|
|
1858
1858
|
console.log("");
|
|
1859
1859
|
console.log(
|
|
@@ -1863,7 +1863,7 @@ function printToolExecutionHints(value) {
|
|
|
1863
1863
|
const requests = numberField(limit, "requestsPerWindow");
|
|
1864
1864
|
const windowMs = numberField(limit, "windowMs");
|
|
1865
1865
|
if (requests === null || windowMs === null) continue;
|
|
1866
|
-
const usage =
|
|
1866
|
+
const usage = _chunkUPMRIVZBjs.stringField.call(void 0, limit, "usage") || "unknown";
|
|
1867
1867
|
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;
|
|
1868
1868
|
const explicitMaxConcurrency = numberField(
|
|
1869
1869
|
limit,
|
|
@@ -1872,11 +1872,11 @@ function printToolExecutionHints(value) {
|
|
|
1872
1872
|
);
|
|
1873
1873
|
const concurrencyText = explicitMaxConcurrency === null ? "no explicit concurrency limit" : `explicit concurrency limit ${explicitMaxConcurrency}`;
|
|
1874
1874
|
console.log(
|
|
1875
|
-
`- ${requests} requests per ${formatRateWindow(windowMs)}${
|
|
1875
|
+
`- ${requests} requests per ${formatRateWindow(windowMs)}${_chunk2WFPHBR4js.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
|
|
1876
1876
|
);
|
|
1877
1877
|
}
|
|
1878
1878
|
}
|
|
1879
|
-
const queueHint =
|
|
1879
|
+
const queueHint = _chunkUPMRIVZBjs.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
|
|
1880
1880
|
const requestsPerSecondHint = numberField(
|
|
1881
1881
|
queueHint,
|
|
1882
1882
|
"requestsPerSecondHint",
|
|
@@ -1902,25 +1902,25 @@ function formatRateWindow(windowMs) {
|
|
|
1902
1902
|
}
|
|
1903
1903
|
function samplePayload(samples, key) {
|
|
1904
1904
|
const entry = samples[key];
|
|
1905
|
-
if (!
|
|
1905
|
+
if (!_chunkUPMRIVZBjs.isRecord.call(void 0, entry)) return void 0;
|
|
1906
1906
|
return Object.prototype.hasOwnProperty.call(entry, "payload") ? entry.payload : entry;
|
|
1907
1907
|
}
|
|
1908
1908
|
function commandEnvelopeFromRawResponse(rawResponse) {
|
|
1909
|
-
return
|
|
1909
|
+
return _chunkUPMRIVZBjs.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
|
|
1910
1910
|
}
|
|
1911
1911
|
function toolExecuteExitCode(envelope) {
|
|
1912
1912
|
return envelope.status === "failed" || envelope.ok === false ? 1 : 0;
|
|
1913
1913
|
}
|
|
1914
1914
|
function extractToolExecutionWarningMessages(rawResponse) {
|
|
1915
|
-
if (!
|
|
1915
|
+
if (!_chunkUPMRIVZBjs.isRecord.call(void 0, rawResponse)) return [];
|
|
1916
1916
|
const candidates = [
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1917
|
+
_chunkUPMRIVZBjs.recordField.call(void 0, _chunkUPMRIVZBjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
|
|
1918
|
+
_chunkUPMRIVZBjs.recordField.call(void 0,
|
|
1919
|
+
_chunkUPMRIVZBjs.recordField.call(void 0, _chunkUPMRIVZBjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
|
|
1920
1920
|
"meta"
|
|
1921
1921
|
),
|
|
1922
|
-
|
|
1923
|
-
|
|
1922
|
+
_chunkUPMRIVZBjs.recordField.call(void 0, rawResponse, "meta"),
|
|
1923
|
+
_chunkUPMRIVZBjs.recordField.call(void 0, _chunkUPMRIVZBjs.recordField.call(void 0, rawResponse, "result"), "meta")
|
|
1924
1924
|
];
|
|
1925
1925
|
const messages = [];
|
|
1926
1926
|
for (const candidate of candidates) {
|
|
@@ -1929,8 +1929,8 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
1929
1929
|
for (const warning of warnings) {
|
|
1930
1930
|
if (typeof warning === "string" && warning.trim()) {
|
|
1931
1931
|
messages.push(warning.trim());
|
|
1932
|
-
} else if (
|
|
1933
|
-
const message =
|
|
1932
|
+
} else if (_chunkUPMRIVZBjs.isRecord.call(void 0, warning)) {
|
|
1933
|
+
const message = _chunkUPMRIVZBjs.stringField.call(void 0, warning, "message");
|
|
1934
1934
|
if (message) messages.push(message);
|
|
1935
1935
|
}
|
|
1936
1936
|
}
|
|
@@ -1938,20 +1938,20 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
1938
1938
|
return [...new Set(messages)];
|
|
1939
1939
|
}
|
|
1940
1940
|
function apifySyncRecoveryNext(rawResponse) {
|
|
1941
|
-
if (!
|
|
1942
|
-
const toolResponse =
|
|
1943
|
-
const raw =
|
|
1941
|
+
if (!_chunkUPMRIVZBjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
|
|
1942
|
+
const toolResponse = _chunkUPMRIVZBjs.recordField.call(void 0, rawResponse, "toolResponse");
|
|
1943
|
+
const raw = _chunkUPMRIVZBjs.recordField.call(void 0, toolResponse, "raw");
|
|
1944
1944
|
if (raw.state !== "awaiting_apify") return null;
|
|
1945
|
-
const next =
|
|
1946
|
-
const getActorRun =
|
|
1947
|
-
const getActorRunTool =
|
|
1948
|
-
const getActorRunPayload =
|
|
1945
|
+
const next = _chunkUPMRIVZBjs.recordField.call(void 0, raw, "next");
|
|
1946
|
+
const getActorRun = _chunkUPMRIVZBjs.recordField.call(void 0, next, "getActorRun");
|
|
1947
|
+
const getActorRunTool = _chunkUPMRIVZBjs.stringField.call(void 0, getActorRun, "tool");
|
|
1948
|
+
const getActorRunPayload = _chunkUPMRIVZBjs.recordField.call(void 0, getActorRun, "payload");
|
|
1949
1949
|
if (!getActorRunTool || Object.keys(getActorRunPayload).length === 0) {
|
|
1950
1950
|
return null;
|
|
1951
1951
|
}
|
|
1952
|
-
const getDatasetItems =
|
|
1953
|
-
const getDatasetItemsTool =
|
|
1954
|
-
const getDatasetItemsPayload =
|
|
1952
|
+
const getDatasetItems = _chunkUPMRIVZBjs.recordField.call(void 0, next, "getDatasetItems");
|
|
1953
|
+
const getDatasetItemsTool = _chunkUPMRIVZBjs.stringField.call(void 0, getDatasetItems, "tool");
|
|
1954
|
+
const getDatasetItemsPayload = _chunkUPMRIVZBjs.recordField.call(void 0, getDatasetItems, "payload");
|
|
1955
1955
|
return {
|
|
1956
1956
|
getActorRun: `deepline run ${getActorRunTool} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
|
|
1957
1957
|
...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
|
|
@@ -1961,7 +1961,7 @@ function apifySyncRecoveryNext(rawResponse) {
|
|
|
1961
1961
|
}
|
|
1962
1962
|
function listExtractorPathsFromUsageGuidance(tool) {
|
|
1963
1963
|
const toolExecutionResult = _optionalChain([tool, 'access', _16 => _16.usageGuidance, 'optionalAccess', _17 => _17.toolExecutionResult]);
|
|
1964
|
-
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists :
|
|
1964
|
+
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists : _chunkUPMRIVZBjs.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _19 => _19.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
|
|
1965
1965
|
return extractedLists.flatMap((entry) => {
|
|
1966
1966
|
const paths = _nullishCoalesce(_optionalChain([entry, 'access', _20 => _20.details, 'optionalAccess', _21 => _21.candidatePaths]), () => ( _optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.rawToolOutputPaths])));
|
|
1967
1967
|
if (!Array.isArray(paths)) return [];
|
|
@@ -2046,7 +2046,7 @@ function parseJsonObjectArgument(raw, flagName) {
|
|
|
2046
2046
|
}
|
|
2047
2047
|
throw invalidJsonError(flagName, message);
|
|
2048
2048
|
}
|
|
2049
|
-
if (!
|
|
2049
|
+
if (!_chunkUPMRIVZBjs.isRecord.call(void 0, parsed)) {
|
|
2050
2050
|
throw invalidJsonError(flagName, "expected an object.");
|
|
2051
2051
|
}
|
|
2052
2052
|
return parsed;
|
|
@@ -2090,7 +2090,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2090
2090
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2091
2091
|
}
|
|
2092
2092
|
if (options.idempotencyKey !== void 0) {
|
|
2093
|
-
|
|
2093
|
+
_chunkPFO3ISXAjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2094
2094
|
}
|
|
2095
2095
|
if (options.connection !== void 0 && (options.recover || options.idempotencyKey !== void 0)) {
|
|
2096
2096
|
throw new Error(
|
|
@@ -2225,7 +2225,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2225
2225
|
kind: summaryEntries.length > 0 ? "object" : "raw",
|
|
2226
2226
|
summary: input.summary
|
|
2227
2227
|
};
|
|
2228
|
-
const envelopeHasCanonicalOutput =
|
|
2228
|
+
const envelopeHasCanonicalOutput = _chunkUPMRIVZBjs.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
|
|
2229
2229
|
const envelopeHasDeclaredOutput = Object.prototype.hasOwnProperty.call(
|
|
2230
2230
|
envelope,
|
|
2231
2231
|
"output"
|
|
@@ -2253,7 +2253,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2253
2253
|
return {
|
|
2254
2254
|
...envelope,
|
|
2255
2255
|
...input.idempotencyKey ? { idempotency_key: input.idempotencyKey } : {},
|
|
2256
|
-
...
|
|
2256
|
+
..._chunkUPMRIVZBjs.isRecord.call(void 0, input.rawResponse) && _chunkUPMRIVZBjs.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
|
|
2257
2257
|
...envelopeHasCanonicalOutput || envelopeHasDeclaredOutput ? { output_preview: outputPreview } : { output: outputPreview },
|
|
2258
2258
|
...summaryEntries.length > 0 ? { summary: input.summary } : {},
|
|
2259
2259
|
...warningMessages.length > 0 ? { warnings: warningMessages } : {},
|
|
@@ -2314,7 +2314,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
|
|
|
2314
2314
|
void _render;
|
|
2315
2315
|
void _next;
|
|
2316
2316
|
void _local;
|
|
2317
|
-
const billingLookup =
|
|
2317
|
+
const billingLookup = _chunkUPMRIVZBjs.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
|
|
2318
2318
|
const inspection = toolExecutionInspection(input);
|
|
2319
2319
|
return {
|
|
2320
2320
|
...base,
|
|
@@ -2410,7 +2410,7 @@ function printToolExecutionWarnings(toolId, params, metadata) {
|
|
|
2410
2410
|
}
|
|
2411
2411
|
}
|
|
2412
2412
|
function assertExecutableToolMetadata(toolId, metadata) {
|
|
2413
|
-
if (
|
|
2413
|
+
if (_chunkUPMRIVZBjs.isPlayLikeTool.call(void 0, metadata)) {
|
|
2414
2414
|
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
2415
2415
|
playLikeToolExecuteErrorMessage(
|
|
2416
2416
|
toolId,
|
|
@@ -2428,7 +2428,7 @@ function valueAt(value, path) {
|
|
|
2428
2428
|
for (const [index, part] of parts.entries()) {
|
|
2429
2429
|
const each = part === "*" || part.endsWith("[*]");
|
|
2430
2430
|
if (part !== "*") {
|
|
2431
|
-
at =
|
|
2431
|
+
at = _chunkUPMRIVZBjs.isRecord.call(void 0, at) ? at[each ? part.slice(0, -3) : part] : void 0;
|
|
2432
2432
|
}
|
|
2433
2433
|
if (!each) continue;
|
|
2434
2434
|
if (!Array.isArray(at)) return void 0;
|
|
@@ -2444,7 +2444,7 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2444
2444
|
const getters = ["extractedValues", "extractedLists"].flatMap(
|
|
2445
2445
|
(kind) => {
|
|
2446
2446
|
const group = _optionalChain([result, 'optionalAccess', _28 => _28[kind]]);
|
|
2447
|
-
return Array.isArray(group) ? group :
|
|
2447
|
+
return Array.isArray(group) ? group : _chunkUPMRIVZBjs.isRecord.call(void 0, group) ? Object.entries(group).map(([name, getter]) => ({
|
|
2448
2448
|
name,
|
|
2449
2449
|
...getter
|
|
2450
2450
|
})) : [];
|
|
@@ -2469,13 +2469,13 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2469
2469
|
}
|
|
2470
2470
|
function writeToolReceipt(input) {
|
|
2471
2471
|
const { response, metadata } = input;
|
|
2472
|
-
const envelope =
|
|
2472
|
+
const envelope = _chunkUPMRIVZBjs.isRecord.call(void 0, response) ? response : {};
|
|
2473
2473
|
const jobId = typeof envelope.job_id === "string" ? envelope.job_id : null;
|
|
2474
|
-
const toolResponse =
|
|
2474
|
+
const toolResponse = _chunkUPMRIVZBjs.recordField.call(void 0, envelope, "toolResponse");
|
|
2475
2475
|
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;
|
|
2476
2476
|
const status = typeof envelope.status === "string" ? envelope.status : "completed";
|
|
2477
|
-
const charged =
|
|
2478
|
-
|
|
2477
|
+
const charged = _chunkUPMRIVZBjs.recordField.call(void 0, envelope, "billing").credits_charged;
|
|
2478
|
+
_chunk6YCA5NKJjs.writeExecutionOutput.call(void 0,
|
|
2479
2479
|
{
|
|
2480
2480
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2481
2481
|
status,
|
|
@@ -2506,8 +2506,8 @@ async function executeToolForReceipt(input) {
|
|
|
2506
2506
|
let retryKey = null;
|
|
2507
2507
|
let received = false;
|
|
2508
2508
|
try {
|
|
2509
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2510
|
-
const client = new (0,
|
|
2509
|
+
const cliInvocationId = _nullishCoalesce(_chunkADRC5I3Rjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkADRC5I3Rjs.beginToolExecuteCommand.call(void 0, )));
|
|
2510
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
2511
2511
|
const metadata = assertExecutableToolMetadata(
|
|
2512
2512
|
toolId,
|
|
2513
2513
|
await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
|
|
@@ -2528,9 +2528,9 @@ async function executeToolForReceipt(input) {
|
|
|
2528
2528
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2529
2529
|
..._optionalChain([metadata, 'access', _35 => _35.executionMetadata, 'optionalAccess', _36 => _36.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2530
2530
|
...key ? { idempotencyKey: key } : {},
|
|
2531
|
-
searchRef:
|
|
2531
|
+
searchRef: _chunkJWUAX6OPjs.recentSearchRef.call(void 0, toolId),
|
|
2532
2532
|
cliInvocationId,
|
|
2533
|
-
onResponseReceived:
|
|
2533
|
+
onResponseReceived: _chunk6YCA5NKJjs.recordApiResponse
|
|
2534
2534
|
}).catch((error) => {
|
|
2535
2535
|
const guidance = toolGuidanceLines(metadata.guidance);
|
|
2536
2536
|
if (guidance.length)
|
|
@@ -2553,11 +2553,11 @@ async function executeToolForReceipt(input) {
|
|
|
2553
2553
|
if (received) throw error;
|
|
2554
2554
|
const outcomeKnown = answeredWithFailure(error);
|
|
2555
2555
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _37 => _37.discard, 'call', _38 => _38()]);
|
|
2556
|
-
|
|
2556
|
+
_chunk6YCA5NKJjs.writeExecutionOutput.call(void 0,
|
|
2557
2557
|
{
|
|
2558
2558
|
id: outcomeKnown ? null : key,
|
|
2559
2559
|
status: "failed",
|
|
2560
|
-
error:
|
|
2560
|
+
error: _chunkVQALXEXOjs.errorToJsonPayload.call(void 0, error).error,
|
|
2561
2561
|
...key && !outcomeKnown ? {
|
|
2562
2562
|
next: {
|
|
2563
2563
|
retry: "Run the same command again: it picks up this call without paying twice."
|
|
@@ -2574,11 +2574,11 @@ function answeredWithFailure(error) {
|
|
|
2574
2574
|
error.statusCode !== 408 && error.code !== "EXECUTION_OUTCOME_UNKNOWN";
|
|
2575
2575
|
}
|
|
2576
2576
|
async function getToolExecutionReceipt(key, output) {
|
|
2577
|
-
const client = new (0,
|
|
2577
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
2578
2578
|
const execution = await client.executions.getByKey(key);
|
|
2579
2579
|
output.label = `${execution.toolId} (tool)`;
|
|
2580
2580
|
if (execution.response === void 0) {
|
|
2581
|
-
|
|
2581
|
+
_chunk6YCA5NKJjs.writeExecutionOutput.call(void 0,
|
|
2582
2582
|
{
|
|
2583
2583
|
id: key,
|
|
2584
2584
|
status: execution.executionRecovery.state,
|
|
@@ -2607,19 +2607,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2607
2607
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2608
2608
|
} catch (error) {
|
|
2609
2609
|
if (wantsJson) {
|
|
2610
|
-
|
|
2610
|
+
_chunkVQALXEXOjs.printJsonError.call(void 0, error);
|
|
2611
2611
|
} else {
|
|
2612
2612
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2613
2613
|
}
|
|
2614
2614
|
return error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2615
2615
|
}
|
|
2616
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2616
|
+
const cliInvocationId = _nullishCoalesce(_chunkADRC5I3Rjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkADRC5I3Rjs.beginToolExecuteCommand.call(void 0, )));
|
|
2617
2617
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2618
|
-
const tracing =
|
|
2618
|
+
const tracing = _chunkMF2GHZDOjs.isCliTraceEnabled.call(void 0, );
|
|
2619
2619
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2620
|
-
const client = new (0,
|
|
2620
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
2621
2621
|
if (clientStartedAt !== void 0) {
|
|
2622
|
-
|
|
2622
|
+
_chunkMF2GHZDOjs.recordCliTrace.call(void 0, {
|
|
2623
2623
|
phase: "cli.tool_execute_client_setup",
|
|
2624
2624
|
ms: performance.now() - clientStartedAt
|
|
2625
2625
|
});
|
|
@@ -2628,13 +2628,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2628
2628
|
const readMetadata = async () => {
|
|
2629
2629
|
if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2630
2630
|
try {
|
|
2631
|
-
metadata = await
|
|
2631
|
+
metadata = await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
|
|
2632
2632
|
"tool metadata lookup",
|
|
2633
2633
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2634
2634
|
);
|
|
2635
2635
|
} catch (error) {
|
|
2636
2636
|
if (isMissingToolMetadataError(error)) {
|
|
2637
|
-
const play = await
|
|
2637
|
+
const play = await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
|
|
2638
2638
|
"play alias lookup",
|
|
2639
2639
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2640
2640
|
);
|
|
@@ -2663,7 +2663,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2663
2663
|
assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2664
2664
|
} catch (error) {
|
|
2665
2665
|
if (error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2666
|
-
if (wantsJson)
|
|
2666
|
+
if (wantsJson) _chunkVQALXEXOjs.printJsonError.call(void 0, error);
|
|
2667
2667
|
else console.error(error.message);
|
|
2668
2668
|
return 2;
|
|
2669
2669
|
}
|
|
@@ -2675,7 +2675,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2675
2675
|
metadata = await readMetadata();
|
|
2676
2676
|
} catch (error) {
|
|
2677
2677
|
if (error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2678
|
-
if (wantsJson)
|
|
2678
|
+
if (wantsJson) _chunkVQALXEXOjs.printJsonError.call(void 0, error);
|
|
2679
2679
|
else console.error(error.message);
|
|
2680
2680
|
return 2;
|
|
2681
2681
|
}
|
|
@@ -2691,7 +2691,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2691
2691
|
metadata = await readMetadata();
|
|
2692
2692
|
} catch (error) {
|
|
2693
2693
|
if (error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2694
|
-
if (wantsJson)
|
|
2694
|
+
if (wantsJson) _chunkVQALXEXOjs.printJsonError.call(void 0, error);
|
|
2695
2695
|
else console.error(error.message);
|
|
2696
2696
|
return 2;
|
|
2697
2697
|
}
|
|
@@ -2718,11 +2718,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2718
2718
|
...parsed.connection !== void 0 ? { connection: parsed.connection } : {},
|
|
2719
2719
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2720
2720
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2721
|
-
searchRef:
|
|
2721
|
+
searchRef: _chunkJWUAX6OPjs.recentSearchRef.call(void 0, parsed.toolId),
|
|
2722
2722
|
cliInvocationId,
|
|
2723
|
-
onResponseReceived:
|
|
2723
|
+
onResponseReceived: _chunk6YCA5NKJjs.recordApiResponse,
|
|
2724
2724
|
...tracing ? {
|
|
2725
|
-
onServerTiming: (serverTiming) =>
|
|
2725
|
+
onServerTiming: (serverTiming) => _chunkMF2GHZDOjs.recordCliTrace.call(void 0, {
|
|
2726
2726
|
phase: "tool_execute_server_timing",
|
|
2727
2727
|
cliInvocationId,
|
|
2728
2728
|
serverTiming,
|
|
@@ -2733,13 +2733,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2733
2733
|
let rawResponse;
|
|
2734
2734
|
let successfulCompatibilityResponse;
|
|
2735
2735
|
try {
|
|
2736
|
-
const executeResult = await
|
|
2736
|
+
const executeResult = await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
|
|
2737
2737
|
"execute request",
|
|
2738
2738
|
async () => {
|
|
2739
2739
|
try {
|
|
2740
2740
|
if (tracing) {
|
|
2741
2741
|
submissionStartedAt = performance.now();
|
|
2742
|
-
|
|
2742
|
+
_chunkMF2GHZDOjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2743
2743
|
}
|
|
2744
2744
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2745
2745
|
...executeOptions,
|
|
@@ -2749,34 +2749,34 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2749
2749
|
} catch (error) {
|
|
2750
2750
|
if (parsed.connection !== void 0 || !(error instanceof _chunkBBTKAASQjs.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2751
2751
|
throw error;
|
|
2752
|
-
const baseUrl =
|
|
2752
|
+
const baseUrl = _chunk7IKQKKNXjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2753
2753
|
if (maintenancePolicy !== "off") {
|
|
2754
|
-
|
|
2754
|
+
_chunk4MK42735js.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2755
2755
|
}
|
|
2756
|
-
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await
|
|
2756
|
+
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
|
|
2757
2757
|
"SDK compatibility",
|
|
2758
|
-
() =>
|
|
2758
|
+
() => _chunk4MK42735js.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
2759
2759
|
command: "tools execute",
|
|
2760
|
-
skillsVersion:
|
|
2760
|
+
skillsVersion: _chunk7IKQKKNXjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2761
2761
|
persistCache: maintenancePolicy !== "off"
|
|
2762
2762
|
})
|
|
2763
2763
|
);
|
|
2764
2764
|
if (compatibility.error) throw compatibility.error;
|
|
2765
2765
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _44 => _44.readMetadata, 'call', _45 => _45()]), () => ( metadata));
|
|
2766
|
-
if (maintenancePolicy !== "off" && await
|
|
2766
|
+
if (maintenancePolicy !== "off" && await _chunkADRC5I3Rjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2767
2767
|
compatibility.response,
|
|
2768
2768
|
baseUrl,
|
|
2769
2769
|
maintenancePolicy
|
|
2770
2770
|
)) {
|
|
2771
2771
|
return void 0;
|
|
2772
2772
|
}
|
|
2773
|
-
|
|
2773
|
+
_chunk4MK42735js.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
2774
2774
|
quietAdvisory: wantsJson
|
|
2775
2775
|
});
|
|
2776
2776
|
if (maintenancePolicy !== "off") {
|
|
2777
|
-
await
|
|
2777
|
+
await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
|
|
2778
2778
|
"agent skills sync",
|
|
2779
|
-
() =>
|
|
2779
|
+
() => _chunk4MK42735js.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2780
2780
|
update: _optionalChain([compatibility, 'access', _46 => _46.response, 'optionalAccess', _47 => _47.skills]),
|
|
2781
2781
|
mode: "detached"
|
|
2782
2782
|
})
|
|
@@ -2785,7 +2785,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2785
2785
|
const legacyMetadata = await readMetadata();
|
|
2786
2786
|
if (tracing) {
|
|
2787
2787
|
submissionStartedAt = performance.now();
|
|
2788
|
-
|
|
2788
|
+
_chunkMF2GHZDOjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2789
2789
|
}
|
|
2790
2790
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2791
2791
|
...executeOptions,
|
|
@@ -2808,8 +2808,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2808
2808
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2809
2809
|
const updateRequiredBeforeExecution = error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2810
2810
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2811
|
-
const baseUrl =
|
|
2812
|
-
if (await
|
|
2811
|
+
const baseUrl = _chunk7IKQKKNXjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2812
|
+
if (await _chunkADRC5I3Rjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2813
2813
|
compatibility.response,
|
|
2814
2814
|
baseUrl,
|
|
2815
2815
|
maintenancePolicy
|
|
@@ -2833,7 +2833,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2833
2833
|
}
|
|
2834
2834
|
}
|
|
2835
2835
|
if (failure instanceof _chunkBBTKAASQjs.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2836
|
-
if (wantsJson)
|
|
2836
|
+
if (wantsJson) _chunkVQALXEXOjs.printJsonError.call(void 0, failure);
|
|
2837
2837
|
else console.error(failure.message);
|
|
2838
2838
|
return 2;
|
|
2839
2839
|
}
|
|
@@ -2860,9 +2860,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2860
2860
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
2861
2861
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _54 => _54.auto_update]);
|
|
2862
2862
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _55 => _55.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
2863
|
-
await
|
|
2863
|
+
await _chunkADRC5I3Rjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2864
2864
|
compatibilityResponse,
|
|
2865
|
-
|
|
2865
|
+
_chunk7IKQKKNXjs.resolveConfig.call(void 0, ).baseUrl,
|
|
2866
2866
|
maintenancePolicy
|
|
2867
2867
|
);
|
|
2868
2868
|
}
|
|
@@ -2880,8 +2880,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2880
2880
|
);
|
|
2881
2881
|
}
|
|
2882
2882
|
}
|
|
2883
|
-
const responseMetadata =
|
|
2884
|
-
|
|
2883
|
+
const responseMetadata = _chunkUPMRIVZBjs.recordField.call(void 0,
|
|
2884
|
+
_chunkUPMRIVZBjs.recordField.call(void 0, rawResponse, "_metadata"),
|
|
2885
2885
|
"tool"
|
|
2886
2886
|
);
|
|
2887
2887
|
const listOutputPaths = responseMetadata.listOutputPaths;
|
|
@@ -2893,11 +2893,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2893
2893
|
await readMetadata()
|
|
2894
2894
|
);
|
|
2895
2895
|
}
|
|
2896
|
-
if (
|
|
2896
|
+
if (_chunkUPMRIVZBjs.isRecord.call(void 0, rawResponse)) {
|
|
2897
2897
|
const { _metadata, ...execution } = rawResponse;
|
|
2898
2898
|
rawResponse = execution;
|
|
2899
2899
|
}
|
|
2900
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
2900
|
+
const { listConversion, summary, baseEnvelope } = await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
|
|
2901
2901
|
"result formatting",
|
|
2902
2902
|
async () => {
|
|
2903
2903
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -2932,9 +2932,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2932
2932
|
}
|
|
2933
2933
|
skillsSyncAttempted = true;
|
|
2934
2934
|
try {
|
|
2935
|
-
await
|
|
2935
|
+
await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
|
|
2936
2936
|
"agent skills sync",
|
|
2937
|
-
() =>
|
|
2937
|
+
() => _chunk4MK42735js.syncSdkSkillsIfNeeded.call(void 0, _chunk7IKQKKNXjs.resolveConfig.call(void 0, ).baseUrl, {
|
|
2938
2938
|
update: deliveredCompatibilityResponse.skills,
|
|
2939
2939
|
mode: "detached"
|
|
2940
2940
|
})
|
|
@@ -2945,15 +2945,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2945
2945
|
);
|
|
2946
2946
|
}
|
|
2947
2947
|
};
|
|
2948
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
2948
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkVQALXEXOjs.printCommandEnvelope.call(void 0, envelope, {
|
|
2949
2949
|
...options2,
|
|
2950
2950
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
2951
2951
|
});
|
|
2952
2952
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
2953
2953
|
await syncSkillsForDeliveredOutput();
|
|
2954
|
-
|
|
2954
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
2955
2955
|
};
|
|
2956
|
-
const delivered = await
|
|
2956
|
+
const delivered = await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
2957
2957
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
2958
2958
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
2959
2959
|
return true;
|
|
@@ -2966,7 +2966,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2966
2966
|
await printDeliveredJsonEnvelope({
|
|
2967
2967
|
...baseEnvelope,
|
|
2968
2968
|
local: {
|
|
2969
|
-
...
|
|
2969
|
+
..._chunkUPMRIVZBjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
|
|
2970
2970
|
payload_file: jsonPath
|
|
2971
2971
|
}
|
|
2972
2972
|
});
|
|
@@ -2982,7 +2982,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2982
2982
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
2983
2983
|
);
|
|
2984
2984
|
if (wantsJson) {
|
|
2985
|
-
|
|
2985
|
+
_chunkVQALXEXOjs.printJsonError.call(void 0, error);
|
|
2986
2986
|
} else {
|
|
2987
2987
|
console.error(error.message);
|
|
2988
2988
|
}
|
|
@@ -3077,13 +3077,13 @@ inspect: ${inspection.inspect}
|
|
|
3077
3077
|
return true;
|
|
3078
3078
|
});
|
|
3079
3079
|
if (delivered) {
|
|
3080
|
-
await
|
|
3080
|
+
await _chunkADRC5I3Rjs.runToolExecuteStage.call(void 0,
|
|
3081
3081
|
"acknowledge delivery",
|
|
3082
3082
|
() => recovery.acknowledgeDelivery()
|
|
3083
3083
|
);
|
|
3084
3084
|
}
|
|
3085
3085
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3086
|
-
|
|
3086
|
+
_chunk4MK42735js.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3087
3087
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _58 => _58.auto_update, 'optionalAccess', _59 => _59.should_auto_update]) === true
|
|
3088
3088
|
});
|
|
3089
3089
|
}
|