deepline 0.3.523 → 0.3.525
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 +68 -60
- package/dist/bundling-sources/sdk/src/http-core.ts +14 -0
- package/dist/bundling-sources/sdk/src/plays/play-description.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +10 -0
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +60 -14
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue-delivery.ts +9 -3
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +19 -0
- package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
- package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +397 -22
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +473 -13
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +28 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-retry-summary.ts +202 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +60 -8
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-telemetry.ts +112 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +39 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-sql.ts +13 -5
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +10 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-retry-facts.ts +62 -0
- package/dist/cli/auth-K7PMRXNG.js +43 -0
- package/dist/cli/{auth-ENQUQS56.mjs → auth-TH3VGYBK.mjs} +5 -5
- package/dist/cli/{billing-6A27ULCX.mjs → billing-CMHFI2LN.mjs} +8 -8
- package/dist/cli/{billing-6HONTJOY.js → billing-TWKVUFU2.js} +83 -83
- package/dist/cli/{chunk-JMMNCJ7Z.js → chunk-2WFVLOB7.js} +1 -1
- package/dist/cli/{chunk-S4YKRH3W.js → chunk-4UWXFXQF.js} +3 -3
- package/dist/cli/{chunk-PCORO245.mjs → chunk-5BSGWIQD.mjs} +2 -2
- package/dist/cli/{chunk-SBGKKOCC.js → chunk-5JFAQUZS.js} +26 -26
- package/dist/cli/{chunk-RVHUW4TN.js → chunk-5YAJGRWB.js} +17 -17
- package/dist/cli/{chunk-ITJ7NB2D.mjs → chunk-7AOFSZJM.mjs} +3 -1
- package/dist/cli/{chunk-JVEFMOY2.mjs → chunk-7C4F4TLR.mjs} +1 -1
- package/dist/cli/{chunk-QMBL5ZIQ.mjs → chunk-7OF3A4KJ.mjs} +3 -3
- package/dist/cli/{chunk-326WVSWS.js → chunk-AVDEYOVP.js} +269 -269
- package/dist/cli/{chunk-GJYLC4JB.mjs → chunk-BNH4Y35W.mjs} +2 -2
- package/dist/cli/{chunk-ZWN4RXC2.js → chunk-CKTRQSRA.js} +22 -22
- package/dist/cli/{chunk-I62LJ7NU.mjs → chunk-CLTL7ZJI.mjs} +1 -1
- package/dist/cli/{chunk-IEVXYHGJ.js → chunk-CQSANB3V.js} +5 -5
- package/dist/cli/{chunk-QYXIODWH.js → chunk-CWRL6IQP.js} +44 -29
- package/dist/cli/{chunk-WVQOXYTQ.mjs → chunk-CZNEQMJR.mjs} +37 -34
- package/dist/cli/{chunk-4NWY7JBB.js → chunk-DYS3KWYF.js} +11 -11
- package/dist/cli/{chunk-HSVGP4CI.mjs → chunk-EP6YH6QJ.mjs} +2 -2
- package/dist/cli/{chunk-XYL26236.js → chunk-ESWM2JW4.js} +2 -2
- package/dist/cli/{chunk-6OZ2WSHD.mjs → chunk-ETHVJ2ZE.mjs} +1 -1
- package/dist/cli/{chunk-6DBRBWHC.mjs → chunk-GCLNX72G.mjs} +2 -2
- package/dist/cli/{chunk-R2VZVHJP.mjs → chunk-GESIFFQX.mjs} +1 -1
- package/dist/cli/{chunk-QSAC3IVI.mjs → chunk-IMO3HXWZ.mjs} +1 -1
- package/dist/cli/{chunk-JGZQBDYG.mjs → chunk-JVWSIA2V.mjs} +4 -4
- package/dist/cli/{chunk-7GNKAACY.js → chunk-KBOSALBI.js} +10 -10
- package/dist/cli/{chunk-K326BEVR.js → chunk-KEZ3KBWW.js} +10 -10
- package/dist/cli/{chunk-7M5FRSFP.mjs → chunk-KPINGHIF.mjs} +2 -2
- package/dist/cli/{chunk-UH3EAFFN.mjs → chunk-LAMGJQDY.mjs} +2 -2
- package/dist/cli/{chunk-UQN4VTZL.js → chunk-LE537GBC.js} +13 -6
- package/dist/cli/{chunk-PESMXAUG.js → chunk-LXKH4MKH.js} +6 -6
- package/dist/cli/{chunk-4V63IJCL.mjs → chunk-M43ZYNDA.mjs} +5 -5
- package/dist/cli/{chunk-XVXEARHC.js → chunk-MHBSRNI7.js} +41 -41
- package/dist/cli/{chunk-HUC5SGJQ.js → chunk-MRUFGOJR.js} +2 -2
- package/dist/cli/{chunk-RQN4PHRE.js → chunk-N4MMU3QF.js} +21 -21
- package/dist/cli/{chunk-2BRDHM4S.js → chunk-NB2ECLQE.js} +9 -9
- package/dist/cli/{chunk-DNXP3D5H.mjs → chunk-NO4URKKT.mjs} +5 -5
- package/dist/cli/{chunk-MZROKQV3.js → chunk-NRBCETWL.js} +44 -44
- package/dist/cli/{chunk-JCTTXLAZ.mjs → chunk-OWQF6WVH.mjs} +10 -3
- package/dist/cli/{chunk-NWTMQGPP.mjs → chunk-OXFIJYN3.mjs} +8 -8
- package/dist/cli/{chunk-FBMOBNJY.js → chunk-P62LON53.js} +2 -2
- package/dist/cli/{chunk-NMU3VR5U.js → chunk-PMH4GLMD.js} +1 -0
- package/dist/cli/{chunk-S3A4IXBQ.mjs → chunk-PSX3WHIH.mjs} +1 -0
- package/dist/cli/{chunk-N5MLEXZ7.js → chunk-QR7VYYNM.js} +176 -173
- package/dist/cli/{chunk-RKREB7MU.mjs → chunk-RMZ6CISE.mjs} +3 -3
- package/dist/cli/{chunk-V46J3UTM.js → chunk-S5LUY3KJ.js} +7 -7
- package/dist/cli/{chunk-MCXPJYBN.js → chunk-TFEGJEYO.js} +3 -3
- package/dist/cli/{chunk-MT3WG3KR.js → chunk-TO72GW5I.js} +16 -16
- package/dist/cli/{chunk-H7275EZU.mjs → chunk-TXSBPBHB.mjs} +5 -5
- package/dist/cli/{chunk-SXTVJIGB.mjs → chunk-U4M32NFS.mjs} +1 -1
- package/dist/cli/{chunk-5WFQXAD4.mjs → chunk-UQYKSOGO.mjs} +5 -5
- package/dist/cli/{chunk-KILRUAXF.mjs → chunk-UXF3ODJJ.mjs} +2 -2
- package/dist/cli/{chunk-36LQQL5C.js → chunk-V2GN4PLK.js} +5 -5
- package/dist/cli/{chunk-HUIFUE4L.js → chunk-V65J64FL.js} +53 -53
- package/dist/cli/{chunk-U6DLLV3S.mjs → chunk-VYIAWAKJ.mjs} +1 -1
- package/dist/cli/{chunk-WGVJA4I5.js → chunk-WA3FG7DH.js} +14 -14
- package/dist/cli/{chunk-MHTRYBXY.mjs → chunk-WEYFSBAD.mjs} +44 -29
- package/dist/cli/{chunk-LZL6V5M5.mjs → chunk-WGRDOPAK.mjs} +2 -2
- package/dist/cli/{chunk-NTLBZUHD.js → chunk-XYIECA7M.js} +4 -2
- package/dist/cli/{chunk-QOO5W5XS.mjs → chunk-YC7FKAJ4.mjs} +12 -12
- package/dist/cli/{chunk-BN5VKY4X.js → chunk-ZS2WHWWL.js} +7 -7
- package/dist/cli/{chunk-F3WRLFFM.mjs → chunk-ZWFTHEPT.mjs} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-UBACJK75.js → csv-5JHWVJ5N.js} +13 -13
- package/dist/cli/{csv-YFJ2JLUP.mjs → csv-OO554TPX.mjs} +4 -4
- package/dist/cli/{db-2ZPA2LZ7.js → db-CYQJ4OXF.js} +28 -28
- package/dist/cli/{db-NKGYTAQO.mjs → db-SQKJ6RKU.mjs} +7 -7
- package/dist/cli/describe-N7AKTUQV.mjs +50 -0
- package/dist/cli/describe-PASXOL3R.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 +5 -5
- package/dist/cli/describe-core.mjs +4 -4
- package/dist/cli/{executions-HTHQ7KKD.mjs → executions-F34DORW6.mjs} +7 -7
- package/dist/cli/{executions-NXMRGPIL.js → executions-K7EGCRKX.js} +9 -9
- package/dist/cli/{feedback-USP4T34P.mjs → feedback-GQHKCS66.mjs} +5 -5
- package/dist/cli/{feedback-TGVQACRO.js → feedback-NOQVCA3Q.js} +10 -10
- package/dist/cli/{git-KUONEHCD.mjs → git-2EEITXDB.mjs} +5 -5
- package/dist/cli/git-UU4YFJ2Q.js +25 -0
- package/dist/cli/index.js +146 -146
- package/dist/cli/index.mjs +45 -45
- package/dist/cli/{legacy-noops-B2GMHU42.mjs → legacy-noops-JHMY5XRB.mjs} +6 -6
- package/dist/cli/{legacy-noops-2JY3CQ24.js → legacy-noops-RFNHQ7RG.js} +9 -9
- package/dist/cli/{monitors-2OVBZJ6Z.mjs → monitors-RDMP6SPZ.mjs} +8 -8
- package/dist/cli/{monitors-XI6I52AX.js → monitors-UKRZ4BDK.js} +101 -101
- package/dist/cli/{org-5TUQ2H6Y.js → org-OX7TYTHV.js} +87 -87
- package/dist/cli/{org-BNJW764Y.mjs → org-RF3G4KMB.mjs} +7 -7
- package/dist/cli/{pages-QC3TQIPW.mjs → pages-FBM3MGSP.mjs} +7 -7
- package/dist/cli/{pages-UXCLX53Y.js → pages-MKQT5LFV.js} +19 -19
- package/dist/cli/{play-KRWMZ7FG.js → play-OOVX2DMV.js} +802 -713
- package/dist/cli/{play-45PPG5SZ.mjs → play-YWC2UORM.mjs} +197 -108
- package/dist/cli/{providers-RBUJ72Y3.js → providers-2CGZYLER.js} +10 -10
- package/dist/cli/{providers-JDT35MRL.mjs → providers-3PEQESIU.mjs} +7 -7
- package/dist/cli/{quickstart-JZ4Q3HFT.js → quickstart-6AANHKQZ.js} +6 -6
- package/dist/cli/{quickstart-GD2SWGAC.mjs → quickstart-KVB36SOW.mjs} +4 -4
- package/dist/cli/{run-JEAHA367.js → run-NJ7WV5TK.js} +46 -46
- package/dist/cli/{run-KIZ3HBI2.mjs → run-QC23NRKO.mjs} +27 -27
- package/dist/cli/{search-5UFNXHFK.mjs → search-7BMFFZI2.mjs} +9 -9
- package/dist/cli/search-NH4DTXUK.js +33 -0
- package/dist/cli/{search-output-HAXPKQO6.mjs → search-output-CALZ4ZI2.mjs} +4 -4
- package/dist/cli/{search-output-W3RDSVLE.js → search-output-XC2AVBFX.js} +6 -6
- package/dist/cli/{secrets-JAWT66B2.mjs → secrets-7ZHA57DI.mjs} +7 -7
- package/dist/cli/{secrets-PC7C2Q32.js → secrets-VHU4B2D4.js} +16 -16
- package/dist/cli/sessions-2TE5JWVP.js +18 -0
- package/dist/cli/{sessions-325V7G35.mjs → sessions-YYULWFZE.mjs} +6 -6
- package/dist/cli/{settings-FKHTA65P.mjs → settings-AVY4NNHI.mjs} +14 -14
- package/dist/cli/{settings-RGU6Y2QR.js → settings-WV77QJGD.js} +87 -87
- package/dist/cli/{setup-43GOYTFC.mjs → setup-AOUJ3RMU.mjs} +10 -10
- package/dist/cli/{setup-ZMZ7HU2I.js → setup-GE5TLTC4.js} +50 -50
- package/dist/cli/{skills-Q2VAHSXM.mjs → skills-FVWO2G66.mjs} +8 -8
- package/dist/cli/skills-OL7LD6QX.js +37 -0
- package/dist/cli/{tools-BUH7ZWDS.mjs → tools-URE655B4.mjs} +20 -20
- package/dist/cli/tools-VQ5JO6DI.js +57 -0
- package/dist/cli/{update-JFALWOHD.mjs → update-5B4G4345.mjs} +10 -10
- package/dist/cli/update-7ZOIOTZN.js +35 -0
- package/dist/cli/{artifacts-RBHR2DG4.mjs → views-GSECJ5IK.mjs} +77 -77
- package/dist/cli/views-IC762HEQ.js +270 -0
- package/dist/cli/{workflow-ISJKLY6X.mjs → workflow-6UQM565I.mjs} +8 -8
- package/dist/cli/{workflow-YELST32A.js → workflow-EME7ZEOV.js} +18 -18
- package/dist/{client-C2N7MofG.d.mts → client-Bd2meveV.d.mts} +1 -1
- package/dist/{client-C7lTRJjw.d.ts → client-CBCVhL8U.d.ts} +1 -1
- package/dist/{client-core-BTkDSKGn.d.mts → client-core-CGj8V9mw.d.mts} +110 -43
- package/dist/{client-core-hmhBi7Ib.d.ts → client-core-CsRRWCFy.d.ts} +110 -43
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10 -10
- package/dist/index.mjs +7 -7
- package/dist/install-integrity.json +120 -118
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/play-description.js +2 -2
- package/dist/plays/play-description.mjs +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 +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/artifacts-RZTS2JHZ.js +0 -270
- package/dist/cli/auth-DPWYFQR5.js +0 -43
- package/dist/cli/describe-GX7DRKWZ.mjs +0 -50
- package/dist/cli/describe-WQZF7MEG.js +0 -50
- package/dist/cli/git-X3SCQREB.js +0 -25
- package/dist/cli/search-6JULJMD7.js +0 -33
- package/dist/cli/sessions-WFUCOJHZ.js +0 -18
- package/dist/cli/skills-3XTQ6FFM.js +0 -37
- package/dist/cli/tools-UK2R4YXQ.js +0 -57
- package/dist/cli/update-LNKPHS54.js +0 -35
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkKBOSALBIjs = require('./chunk-KBOSALBI.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkDYS3KWYFjs = require('./chunk-DYS3KWYF.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -27,10 +27,10 @@ var _chunk4NWY7JBBjs = require('./chunk-4NWY7JBB.js');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkZS2WHWWLjs = require('./chunk-ZS2WHWWL.js');
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkXYIECA7Mjs = require('./chunk-XYIECA7M.js');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
@@ -46,10 +46,10 @@ var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
|
|
|
46
46
|
var _chunkHGFFYVXNjs = require('./chunk-HGFFYVXN.js');
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
var
|
|
49
|
+
var _chunkV2GN4PLKjs = require('./chunk-V2GN4PLK.js');
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
var
|
|
52
|
+
var _chunkQR7VYYNMjs = require('./chunk-QR7VYYNM.js');
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
|
|
@@ -59,18 +59,18 @@ var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunkCKTRQSRAjs = require('./chunk-CKTRQSRA.js');
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
var
|
|
67
|
+
var _chunkMRUFGOJRjs = require('./chunk-MRUFGOJR.js');
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
var
|
|
73
|
+
var _chunkNRBCETWLjs = require('./chunk-NRBCETWL.js');
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
|
|
@@ -78,12 +78,12 @@ var _chunkMZROKQV3js = require('./chunk-MZROKQV3.js');
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
var
|
|
81
|
+
var _chunkS5LUY3KJjs = require('./chunk-S5LUY3KJ.js');
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
var
|
|
86
|
+
var _chunkTFEGJEYOjs = require('./chunk-TFEGJEYO.js');
|
|
87
87
|
|
|
88
88
|
|
|
89
89
|
var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
|
|
@@ -189,10 +189,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
191
|
function pendingToolExecutionPath(input) {
|
|
192
|
-
const config =
|
|
192
|
+
const config = _chunkTFEGJEYOjs.resolveConfig.call(void 0, );
|
|
193
193
|
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");
|
|
194
194
|
return _path.join.call(void 0,
|
|
195
|
-
|
|
195
|
+
_chunkTFEGJEYOjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
196
196
|
`${PENDING_PREFIX}${fingerprint}.json`
|
|
197
197
|
);
|
|
198
198
|
}
|
|
@@ -344,13 +344,13 @@ var TOOL_COMMAND_TEMPLATES = {
|
|
|
344
344
|
execute: "deepline run <toolId> --input '{...}'"
|
|
345
345
|
};
|
|
346
346
|
function toListedTool(tool) {
|
|
347
|
-
if (
|
|
347
|
+
if (_chunkZS2WHWWLjs.isPlayLikeTool.call(void 0, tool)) {
|
|
348
348
|
return {
|
|
349
349
|
...tool,
|
|
350
350
|
description: listedToolDescription(tool),
|
|
351
351
|
id: tool.toolId,
|
|
352
352
|
type: "play",
|
|
353
|
-
executeCommand:
|
|
353
|
+
executeCommand: _chunkZS2WHWWLjs.playRunCommandForTool.call(void 0, tool, tool.toolId)
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
356
|
return {
|
|
@@ -432,37 +432,37 @@ function firstSentence(text) {
|
|
|
432
432
|
return (match ? match[0] : clean).trim();
|
|
433
433
|
}
|
|
434
434
|
function requiredInputIds(tool) {
|
|
435
|
-
const inputSchema =
|
|
435
|
+
const inputSchema = _chunkZS2WHWWLjs.recordField.call(void 0,
|
|
436
436
|
tool,
|
|
437
437
|
"inputSchema",
|
|
438
438
|
"input_schema"
|
|
439
439
|
);
|
|
440
|
-
return
|
|
440
|
+
return _chunkZS2WHWWLjs.toolInputFieldsForDisplay.call(void 0, inputSchema).filter((field) => field.required === true).map((field) => String(_nullishCoalesce(field.name, () => ( "")))).filter(Boolean);
|
|
441
441
|
}
|
|
442
442
|
function notConnectedSuffix(tool) {
|
|
443
443
|
const record = tool;
|
|
444
|
-
const status =
|
|
444
|
+
const status = _chunkZS2WHWWLjs.stringField.call(void 0, record, "credentialStatus", "credential_status");
|
|
445
445
|
const connected = record.connected;
|
|
446
446
|
const message = toolConnectionStatusMessage({
|
|
447
447
|
connected: connected === false ? false : void 0,
|
|
448
448
|
credentialStatus: status || void 0,
|
|
449
|
-
connectionMessage:
|
|
449
|
+
connectionMessage: _chunkZS2WHWWLjs.stringField.call(void 0, record, "connectionMessage", "connection_message") || void 0
|
|
450
450
|
});
|
|
451
451
|
return message ? ` - \u26A0 ${message}` : "";
|
|
452
452
|
}
|
|
453
453
|
function shortPricingHint(tool) {
|
|
454
|
-
const pricing =
|
|
454
|
+
const pricing = _chunkZS2WHWWLjs.recordField.call(void 0,
|
|
455
455
|
tool,
|
|
456
456
|
"pricing"
|
|
457
457
|
);
|
|
458
458
|
const credits = numberField(pricing, "creditsPerUnit", "credits_per_unit");
|
|
459
|
-
const unit =
|
|
459
|
+
const unit = _chunkZS2WHWWLjs.stringField.call(void 0, pricing, "unit");
|
|
460
460
|
if (credits !== null) {
|
|
461
461
|
return `${formatDecimal(credits)} cr/${unit || "unit"}`;
|
|
462
462
|
}
|
|
463
|
-
const summary =
|
|
463
|
+
const summary = _chunkZS2WHWWLjs.stringField.call(void 0, pricing, "summary");
|
|
464
464
|
if (summary) return summary;
|
|
465
|
-
const displayText =
|
|
465
|
+
const displayText = _chunkZS2WHWWLjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
466
466
|
return displayText || null;
|
|
467
467
|
}
|
|
468
468
|
function aggregateCategorySummaries(tools) {
|
|
@@ -506,13 +506,13 @@ function categoryEnumerationRender(summaries) {
|
|
|
506
506
|
};
|
|
507
507
|
}
|
|
508
508
|
async function listToolCategories(emitJson, compact) {
|
|
509
|
-
const client = new (0,
|
|
509
|
+
const client = new (0, _chunkV2GN4PLKjs.DeeplineClient)();
|
|
510
510
|
if (!emitJson) {
|
|
511
511
|
const summaries2 = (await client.listToolCategories()).map((category) => ({
|
|
512
512
|
...category,
|
|
513
513
|
description: describeToolCategory(category.name)
|
|
514
514
|
}));
|
|
515
|
-
|
|
515
|
+
_chunkS5LUY3KJjs.printCommandEnvelope.call(void 0,
|
|
516
516
|
{ categories: summaries2, render: categoryEnumerationRender(summaries2) },
|
|
517
517
|
{ json: false }
|
|
518
518
|
);
|
|
@@ -522,7 +522,7 @@ async function listToolCategories(emitJson, compact) {
|
|
|
522
522
|
const items = rawTools.map(toListedTool);
|
|
523
523
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
524
524
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
525
|
-
|
|
525
|
+
_chunkS5LUY3KJjs.printCommandEnvelope.call(void 0,
|
|
526
526
|
{
|
|
527
527
|
tools: outputItems,
|
|
528
528
|
count: outputItems.length,
|
|
@@ -541,7 +541,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
541
541
|
const known = summaries.map((item) => item.name);
|
|
542
542
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
543
543
|
if (emitJson) {
|
|
544
|
-
|
|
544
|
+
_chunkS5LUY3KJjs.printJson.call(void 0, {
|
|
545
545
|
ok: false,
|
|
546
546
|
exitCode: 4,
|
|
547
547
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -555,13 +555,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
555
555
|
const render = categoryEnumerationRender(summaries);
|
|
556
556
|
console.error(message);
|
|
557
557
|
console.error("");
|
|
558
|
-
console.error(
|
|
558
|
+
console.error(_chunkS5LUY3KJjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
559
559
|
console.error("");
|
|
560
560
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
561
561
|
return 4;
|
|
562
562
|
}
|
|
563
563
|
async function listToolsInCategory(category, emitJson) {
|
|
564
|
-
const client = new (0,
|
|
564
|
+
const client = new (0, _chunkV2GN4PLKjs.DeeplineClient)();
|
|
565
565
|
const { tools: rawTools, categories } = await client.listToolsInCategory(category);
|
|
566
566
|
const summaries = categories.map((item) => ({
|
|
567
567
|
...item,
|
|
@@ -597,7 +597,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
597
597
|
}
|
|
598
598
|
]
|
|
599
599
|
};
|
|
600
|
-
|
|
600
|
+
_chunkS5LUY3KJjs.printCommandEnvelope.call(void 0,
|
|
601
601
|
{
|
|
602
602
|
category,
|
|
603
603
|
total: rows.length,
|
|
@@ -610,7 +610,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
610
610
|
return 0;
|
|
611
611
|
}
|
|
612
612
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
613
|
-
const client = new (0,
|
|
613
|
+
const client = new (0, _chunkV2GN4PLKjs.DeeplineClient)();
|
|
614
614
|
const items = (await client.listTools({
|
|
615
615
|
categories: requestedCategories.join(","),
|
|
616
616
|
compact
|
|
@@ -639,7 +639,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
639
639
|
]
|
|
640
640
|
};
|
|
641
641
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
642
|
-
|
|
642
|
+
_chunkS5LUY3KJjs.printCommandEnvelope.call(void 0,
|
|
643
643
|
{
|
|
644
644
|
tools: outputItems,
|
|
645
645
|
count: outputItems.length,
|
|
@@ -658,13 +658,13 @@ async function listTools(category, options = {}) {
|
|
|
658
658
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]), () => ( ""));
|
|
659
659
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
660
660
|
const compact = options.compact !== false;
|
|
661
|
-
const emitJson = options.json === true ||
|
|
661
|
+
const emitJson = options.json === true || _chunkS5LUY3KJjs.shouldEmitJson.call(void 0, );
|
|
662
662
|
if (positional && flagCategories.length > 0) {
|
|
663
663
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
664
664
|
if (!flagIsSameSingle) {
|
|
665
665
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
666
666
|
if (emitJson) {
|
|
667
|
-
|
|
667
|
+
_chunkS5LUY3KJjs.printJson.call(void 0, {
|
|
668
668
|
ok: false,
|
|
669
669
|
exitCode: 2,
|
|
670
670
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -691,7 +691,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
691
691
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
692
692
|
return 1;
|
|
693
693
|
}
|
|
694
|
-
const client = new (0,
|
|
694
|
+
const client = new (0, _chunkV2GN4PLKjs.DeeplineClient)();
|
|
695
695
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
696
696
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
697
697
|
const jsonOutput = options.json === true;
|
|
@@ -715,7 +715,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
715
715
|
query,
|
|
716
716
|
mode
|
|
717
717
|
}) : null;
|
|
718
|
-
|
|
718
|
+
_chunkS5LUY3KJjs.printCommandEnvelope.call(void 0,
|
|
719
719
|
{
|
|
720
720
|
tools: outputTools,
|
|
721
721
|
count: outputTools.length,
|
|
@@ -733,7 +733,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
733
733
|
} : {},
|
|
734
734
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
735
735
|
},
|
|
736
|
-
{ json: options.json ||
|
|
736
|
+
{ json: options.json || _chunkS5LUY3KJjs.shouldEmitJson.call(void 0, ) }
|
|
737
737
|
);
|
|
738
738
|
return 0;
|
|
739
739
|
}
|
|
@@ -788,8 +788,8 @@ function printPlayAliasToolError(toolId, play) {
|
|
|
788
788
|
console.error(playAliasToolErrorMessage(toolId, play));
|
|
789
789
|
}
|
|
790
790
|
function playLikeToolExecuteErrorMessage(toolId, tool) {
|
|
791
|
-
const playReference = tool ?
|
|
792
|
-
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${
|
|
791
|
+
const playReference = tool ? _chunkZS2WHWWLjs.playReferenceForTool.call(void 0, tool) : null;
|
|
792
|
+
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunkZS2WHWWLjs.playSearchCommandForToolId.call(void 0, toolId)}`;
|
|
793
793
|
return [
|
|
794
794
|
`${toolId} is a workflow/play entry, not an atomic provider tool.`,
|
|
795
795
|
nextStep,
|
|
@@ -832,10 +832,10 @@ Output:
|
|
|
832
832
|
tools.command("balance <provider>").description(
|
|
833
833
|
"Read a fresh balance using this workspace\u2019s own provider connection (LeadMagic)."
|
|
834
834
|
).option("--json", "Print the balance and observation timestamp as JSON").action(async (provider, options) => {
|
|
835
|
-
const balance = await new (0,
|
|
835
|
+
const balance = await new (0, _chunkV2GN4PLKjs.DeeplineClient)().getIntegrationBalance(
|
|
836
836
|
provider
|
|
837
837
|
);
|
|
838
|
-
if (
|
|
838
|
+
if (_chunkS5LUY3KJjs.shouldEmitJson.call(void 0, options.json)) console.log(JSON.stringify(balance));
|
|
839
839
|
else
|
|
840
840
|
console.log(
|
|
841
841
|
`${balance.provider}: ${balance.balance.value} ${balance.unit} (observed ${balance.observedAt})`
|
|
@@ -860,10 +860,10 @@ Output:
|
|
|
860
860
|
).option("--json", "Print JSON without credential values").action(
|
|
861
861
|
async (provider, options) => {
|
|
862
862
|
if (options.link) {
|
|
863
|
-
const link = await new (0,
|
|
863
|
+
const link = await new (0, _chunkV2GN4PLKjs.DeeplineClient)().getIntegrationConnectLink(
|
|
864
864
|
provider
|
|
865
865
|
);
|
|
866
|
-
if (
|
|
866
|
+
if (_chunkS5LUY3KJjs.shouldEmitJson.call(void 0, options.json)) console.log(JSON.stringify(link));
|
|
867
867
|
else console.log(link.connect_url);
|
|
868
868
|
return;
|
|
869
869
|
}
|
|
@@ -873,7 +873,7 @@ Output:
|
|
|
873
873
|
if (options.preset !== void 0 && (options.scopes !== void 0 || options.optionalScopes !== void 0))
|
|
874
874
|
throw new Error("Use --preset or individual scopes, not both.");
|
|
875
875
|
const splitScopes = (value) => value.split(",").map((scope) => scope.trim()).filter(Boolean);
|
|
876
|
-
const result2 = await new (0,
|
|
876
|
+
const result2 = await new (0, _chunkV2GN4PLKjs.DeeplineClient)().startIntegrationOAuth(
|
|
877
877
|
provider,
|
|
878
878
|
{
|
|
879
879
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
@@ -885,7 +885,7 @@ Output:
|
|
|
885
885
|
throw new Error(
|
|
886
886
|
"The API did not return an OAuth authorization URL."
|
|
887
887
|
);
|
|
888
|
-
if (
|
|
888
|
+
if (_chunkS5LUY3KJjs.shouldEmitJson.call(void 0, options.json))
|
|
889
889
|
console.log(
|
|
890
890
|
JSON.stringify({ provider, redirect_url: result2.redirect_url })
|
|
891
891
|
);
|
|
@@ -911,7 +911,7 @@ Output:
|
|
|
911
911
|
"--credentials-file must contain a nonempty JSON object of string credential values."
|
|
912
912
|
);
|
|
913
913
|
}
|
|
914
|
-
const result = await new (0,
|
|
914
|
+
const result = await new (0, _chunkV2GN4PLKjs.DeeplineClient)().setIntegrationCredentials(
|
|
915
915
|
provider,
|
|
916
916
|
credentials
|
|
917
917
|
);
|
|
@@ -921,7 +921,7 @@ Output:
|
|
|
921
921
|
);
|
|
922
922
|
}
|
|
923
923
|
const confirmation = { provider, credential_saved: true };
|
|
924
|
-
if (
|
|
924
|
+
if (_chunkS5LUY3KJjs.shouldEmitJson.call(void 0, options.json))
|
|
925
925
|
console.log(JSON.stringify(confirmation));
|
|
926
926
|
else
|
|
927
927
|
console.log(
|
|
@@ -961,7 +961,7 @@ Examples:
|
|
|
961
961
|
json: Boolean(options.json)
|
|
962
962
|
});
|
|
963
963
|
});
|
|
964
|
-
|
|
964
|
+
_chunkDYS3KWYFjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
965
965
|
tools.command("grep <query>").description(
|
|
966
966
|
"Regex grep over tool ids, descriptions, categories, and input fields."
|
|
967
967
|
).addHelpText(
|
|
@@ -996,7 +996,7 @@ Examples:
|
|
|
996
996
|
});
|
|
997
997
|
const addToolMetadataCommand = (command) => {
|
|
998
998
|
let compatibilityMetadata;
|
|
999
|
-
|
|
999
|
+
_chunkCKTRQSRAjs.registerCompatibilityCatalog.call(void 0, command, () => ({
|
|
1000
1000
|
toolId: command.args[0],
|
|
1001
1001
|
acceptMetadata: (metadata) => {
|
|
1002
1002
|
compatibilityMetadata = metadata;
|
|
@@ -1066,7 +1066,7 @@ Examples:
|
|
|
1066
1066
|
process.exitCode = await narrowView();
|
|
1067
1067
|
return;
|
|
1068
1068
|
}
|
|
1069
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
1069
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-PASXOL3R.js")));
|
|
1070
1070
|
process.exitCode = await describeAnything(
|
|
1071
1071
|
toolId,
|
|
1072
1072
|
{
|
|
@@ -1081,7 +1081,7 @@ Examples:
|
|
|
1081
1081
|
});
|
|
1082
1082
|
};
|
|
1083
1083
|
addToolMetadataCommand(
|
|
1084
|
-
|
|
1084
|
+
_chunkKBOSALBIjs.addDescribeOptions.call(void 0,
|
|
1085
1085
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
1086
1086
|
{ json: false }
|
|
1087
1087
|
)
|
|
@@ -1150,7 +1150,7 @@ Examples:
|
|
|
1150
1150
|
options,
|
|
1151
1151
|
void 0,
|
|
1152
1152
|
true,
|
|
1153
|
-
|
|
1153
|
+
_chunkMRUFGOJRjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
1154
1154
|
);
|
|
1155
1155
|
}
|
|
1156
1156
|
);
|
|
@@ -1158,13 +1158,13 @@ Examples:
|
|
|
1158
1158
|
function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
1159
1159
|
let metadata;
|
|
1160
1160
|
const startedAt = performance.now();
|
|
1161
|
-
const baseUrl =
|
|
1162
|
-
|
|
1163
|
-
const result =
|
|
1161
|
+
const baseUrl = _chunkTFEGJEYOjs.resolveConfig.call(void 0, ).baseUrl;
|
|
1162
|
+
_chunkMRUFGOJRjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1163
|
+
const result = _chunkCKTRQSRAjs.runToolExecuteStage.call(void 0,
|
|
1164
1164
|
"SDK compatibility",
|
|
1165
|
-
() =>
|
|
1165
|
+
() => _chunkNRBCETWLjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1166
1166
|
command: "tools execute",
|
|
1167
|
-
skillsVersion:
|
|
1167
|
+
skillsVersion: _chunkTFEGJEYOjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
1168
1168
|
persistCache: false,
|
|
1169
1169
|
timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
|
|
1170
1170
|
catalog: {
|
|
@@ -1178,7 +1178,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1178
1178
|
})
|
|
1179
1179
|
).then(
|
|
1180
1180
|
(compatibility) => {
|
|
1181
|
-
|
|
1181
|
+
_chunkMRUFGOJRjs.recordCliTrace.call(void 0, {
|
|
1182
1182
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1183
1183
|
ms: performance.now() - startedAt,
|
|
1184
1184
|
ok: compatibility.error === null,
|
|
@@ -1187,7 +1187,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1187
1187
|
return compatibility;
|
|
1188
1188
|
},
|
|
1189
1189
|
(error) => {
|
|
1190
|
-
|
|
1190
|
+
_chunkMRUFGOJRjs.recordCliTrace.call(void 0, {
|
|
1191
1191
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1192
1192
|
ms: performance.now() - startedAt,
|
|
1193
1193
|
ok: false
|
|
@@ -1202,7 +1202,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1202
1202
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1203
1203
|
return 1;
|
|
1204
1204
|
}
|
|
1205
|
-
const client = new (0,
|
|
1205
|
+
const client = new (0, _chunkV2GN4PLKjs.DeeplineClient)();
|
|
1206
1206
|
let tool;
|
|
1207
1207
|
try {
|
|
1208
1208
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1256,12 +1256,12 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1256
1256
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1257
1257
|
if (inferenceQuote)
|
|
1258
1258
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1259
|
-
|
|
1259
|
+
_chunkS5LUY3KJjs.printCommandEnvelope.call(void 0,
|
|
1260
1260
|
{
|
|
1261
1261
|
toolId: String(tool.toolId || toolId),
|
|
1262
|
-
cost:
|
|
1262
|
+
cost: _chunkZS2WHWWLjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1263
1263
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1264
|
-
...
|
|
1264
|
+
..._chunkZS2WHWWLjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunkZS2WHWWLjs.recordField.call(void 0, tool, "pricing") } : {},
|
|
1265
1265
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1266
1266
|
},
|
|
1267
1267
|
{
|
|
@@ -1272,14 +1272,14 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1272
1272
|
);
|
|
1273
1273
|
return 0;
|
|
1274
1274
|
}
|
|
1275
|
-
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !
|
|
1276
|
-
const contract =
|
|
1275
|
+
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunkZS2WHWWLjs.isMonitorTypeTool.call(void 0, tool) && !_chunkZS2WHWWLjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
|
|
1276
|
+
const contract = _chunkZS2WHWWLjs.toolContractJsonForDescribe.call(void 0,
|
|
1277
1277
|
tool,
|
|
1278
1278
|
toolId,
|
|
1279
1279
|
void 0,
|
|
1280
1280
|
seedToolListScript
|
|
1281
1281
|
);
|
|
1282
|
-
|
|
1282
|
+
_chunkS5LUY3KJjs.printCompactJson.call(void 0, {
|
|
1283
1283
|
toolId: contract.toolId,
|
|
1284
1284
|
...options.schemaOnly ? {
|
|
1285
1285
|
inputSchema: contract.inputSchema,
|
|
@@ -1302,8 +1302,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1302
1302
|
return 0;
|
|
1303
1303
|
}
|
|
1304
1304
|
if (options.contractJson) {
|
|
1305
|
-
|
|
1306
|
-
...
|
|
1305
|
+
_chunkS5LUY3KJjs.printCompactJson.call(void 0, {
|
|
1306
|
+
..._chunkZS2WHWWLjs.toolContractJsonForDescribe.call(void 0,
|
|
1307
1307
|
tool,
|
|
1308
1308
|
toolId,
|
|
1309
1309
|
void 0,
|
|
@@ -1316,8 +1316,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
const emitJson = options.json === true;
|
|
1318
1318
|
if (emitJson) {
|
|
1319
|
-
|
|
1320
|
-
...
|
|
1319
|
+
_chunkS5LUY3KJjs.printCompactJson.call(void 0, {
|
|
1320
|
+
..._chunkZS2WHWWLjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
|
|
1321
1321
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1322
1322
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1323
1323
|
});
|
|
@@ -1342,7 +1342,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1342
1342
|
printCompactToolContract(tool, toolId);
|
|
1343
1343
|
if (modelDescription) {
|
|
1344
1344
|
process.stdout.write(`
|
|
1345
|
-
${
|
|
1345
|
+
${_chunkZS2WHWWLjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1346
1346
|
}
|
|
1347
1347
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1348
1348
|
return 0;
|
|
@@ -1350,7 +1350,7 @@ ${_chunkBN5VKY4Xjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
|
1350
1350
|
printCompactToolContract(tool, toolId);
|
|
1351
1351
|
if (modelDescription) {
|
|
1352
1352
|
process.stdout.write(`
|
|
1353
|
-
${
|
|
1353
|
+
${_chunkZS2WHWWLjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1354
1354
|
}
|
|
1355
1355
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1356
1356
|
return 0;
|
|
@@ -1367,10 +1367,10 @@ function printInferenceQuoteSummary(quote) {
|
|
|
1367
1367
|
for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
|
|
1368
1368
|
}
|
|
1369
1369
|
function printMonitorTypeFilters(tool) {
|
|
1370
|
-
const schema =
|
|
1371
|
-
const properties =
|
|
1370
|
+
const schema = _chunkZS2WHWWLjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
|
|
1371
|
+
const properties = _chunkZS2WHWWLjs.recordField.call(void 0, schema, "properties");
|
|
1372
1372
|
const required = new Set(
|
|
1373
|
-
|
|
1373
|
+
_chunkZS2WHWWLjs.arrayField.call(void 0, schema, "required").filter(
|
|
1374
1374
|
(v) => typeof v === "string"
|
|
1375
1375
|
)
|
|
1376
1376
|
);
|
|
@@ -1381,24 +1381,24 @@ function printMonitorTypeFilters(tool) {
|
|
|
1381
1381
|
}
|
|
1382
1382
|
console.log("Deploy filters (set in the monitor payload):");
|
|
1383
1383
|
for (const name of names) {
|
|
1384
|
-
const field =
|
|
1384
|
+
const field = _chunkZS2WHWWLjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
|
|
1385
1385
|
const star = required.has(name) ? "*" : "";
|
|
1386
|
-
const enumVals =
|
|
1386
|
+
const enumVals = _chunkZS2WHWWLjs.arrayField.call(void 0, field, "enum").filter(
|
|
1387
1387
|
(v) => typeof v === "string"
|
|
1388
1388
|
);
|
|
1389
|
-
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` :
|
|
1390
|
-
const desc =
|
|
1389
|
+
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunkZS2WHWWLjs.stringField.call(void 0, field, "type") || "string";
|
|
1390
|
+
const desc = _chunkZS2WHWWLjs.stringField.call(void 0, field, "description");
|
|
1391
1391
|
console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
|
|
1392
1392
|
}
|
|
1393
1393
|
}
|
|
1394
1394
|
function printMonitorTypeFilterExamples(tool) {
|
|
1395
|
-
const documentation =
|
|
1396
|
-
const fields =
|
|
1395
|
+
const documentation = _chunkZS2WHWWLjs.recordField.call(void 0, tool, "documentation");
|
|
1396
|
+
const fields = _chunkZS2WHWWLjs.recordField.call(void 0, documentation, "fields");
|
|
1397
1397
|
const examples = Object.entries(fields).flatMap(([name, rawField]) => {
|
|
1398
|
-
const grammar =
|
|
1399
|
-
const example =
|
|
1398
|
+
const grammar = _chunkZS2WHWWLjs.recordField.call(void 0, _chunkZS2WHWWLjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
|
|
1399
|
+
const example = _chunkZS2WHWWLjs.stringField.call(void 0, grammar, "example");
|
|
1400
1400
|
const values = [
|
|
1401
|
-
...
|
|
1401
|
+
..._chunkZS2WHWWLjs.arrayField.call(void 0, grammar, "examples").filter(
|
|
1402
1402
|
(value) => typeof value === "string" && Boolean(value)
|
|
1403
1403
|
),
|
|
1404
1404
|
...example ? [example] : []
|
|
@@ -1413,21 +1413,21 @@ function printMonitorTypeFilterExamples(tool) {
|
|
|
1413
1413
|
}
|
|
1414
1414
|
}
|
|
1415
1415
|
function printMonitorTypeStreams(tool) {
|
|
1416
|
-
const streams =
|
|
1417
|
-
|
|
1416
|
+
const streams = _chunkZS2WHWWLjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
|
|
1417
|
+
_chunkZS2WHWWLjs.isRecord
|
|
1418
1418
|
);
|
|
1419
1419
|
if (!streams.length) return;
|
|
1420
1420
|
console.log("");
|
|
1421
1421
|
console.log("Filter columns (a play's sqlListeners.where, per stream):");
|
|
1422
1422
|
for (const stream of streams) {
|
|
1423
|
-
const name =
|
|
1424
|
-
const cols =
|
|
1423
|
+
const name = _chunkZS2WHWWLjs.stringField.call(void 0, stream, "stream");
|
|
1424
|
+
const cols = _chunkZS2WHWWLjs.arrayField.call(void 0, stream, "columns").filter(_chunkZS2WHWWLjs.isRecord).map((col) => _chunkZS2WHWWLjs.stringField.call(void 0, col, "name")).filter(Boolean);
|
|
1425
1425
|
console.log(`- ${name}: ${cols.join(", ")}`);
|
|
1426
1426
|
}
|
|
1427
1427
|
}
|
|
1428
1428
|
function monitorTypePricingLines(tool) {
|
|
1429
|
-
const pricing =
|
|
1430
|
-
const byType =
|
|
1429
|
+
const pricing = _chunkZS2WHWWLjs.recordField.call(void 0, tool, "pricing");
|
|
1430
|
+
const byType = _chunkZS2WHWWLjs.recordField.call(void 0,
|
|
1431
1431
|
pricing,
|
|
1432
1432
|
"pricing_by_radar_type",
|
|
1433
1433
|
"pricingByRadarType"
|
|
@@ -1438,9 +1438,9 @@ function monitorTypePricingLines(tool) {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
const lines = ["Pricing (Deepline credits per accepted event):"];
|
|
1440
1440
|
for (const key of keys) {
|
|
1441
|
-
const entry =
|
|
1441
|
+
const entry = _chunkZS2WHWWLjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
|
|
1442
1442
|
const credits = numberField(entry, "deepline_credits", "deeplineCredits");
|
|
1443
|
-
const display =
|
|
1443
|
+
const display = _chunkZS2WHWWLjs.stringField.call(void 0, entry, "display");
|
|
1444
1444
|
const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "not listed");
|
|
1445
1445
|
lines.push(`- ${key}: ${shown}`);
|
|
1446
1446
|
}
|
|
@@ -1450,20 +1450,20 @@ function printMonitorTypePricing(tool) {
|
|
|
1450
1450
|
for (const line of monitorTypePricingLines(tool)) console.log(line);
|
|
1451
1451
|
}
|
|
1452
1452
|
function printMonitorTypeDeploy(tool) {
|
|
1453
|
-
const deploy =
|
|
1454
|
-
const toolId =
|
|
1455
|
-
const example =
|
|
1453
|
+
const deploy = _chunkZS2WHWWLjs.recordField.call(void 0, tool, "deploy");
|
|
1454
|
+
const toolId = _chunkZS2WHWWLjs.stringField.call(void 0, tool, "toolId");
|
|
1455
|
+
const example = _chunkZS2WHWWLjs.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
|
|
1456
1456
|
console.log("Deploy (a monitor type is deployed, not executed):");
|
|
1457
1457
|
console.log(` ${example}`);
|
|
1458
1458
|
}
|
|
1459
1459
|
function printMonitorTypeContract(tool, requestedToolId) {
|
|
1460
|
-
const toolId =
|
|
1460
|
+
const toolId = _chunkZS2WHWWLjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
|
|
1461
1461
|
console.log(toolId);
|
|
1462
|
-
const displayName =
|
|
1462
|
+
const displayName = _chunkZS2WHWWLjs.stringField.call(void 0, tool, "displayName");
|
|
1463
1463
|
if (displayName) console.log(`Best for: ${displayName}`);
|
|
1464
|
-
const description =
|
|
1464
|
+
const description = _chunkZS2WHWWLjs.stringField.call(void 0, tool, "description");
|
|
1465
1465
|
if (description) console.log(`Description: ${description}`);
|
|
1466
|
-
const categories =
|
|
1466
|
+
const categories = _chunkZS2WHWWLjs.arrayField.call(void 0, tool, "categories").filter(
|
|
1467
1467
|
(v) => typeof v === "string"
|
|
1468
1468
|
);
|
|
1469
1469
|
if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
|
|
@@ -1483,31 +1483,31 @@ function printMonitorTypeContract(tool, requestedToolId) {
|
|
|
1483
1483
|
console.log(`More: deepline describe ${toolId}`);
|
|
1484
1484
|
}
|
|
1485
1485
|
function toolGuidanceLines(guidance) {
|
|
1486
|
-
const record =
|
|
1487
|
-
const toolGuidance =
|
|
1488
|
-
const providerGuidance =
|
|
1486
|
+
const record = _chunkZS2WHWWLjs.isRecord.call(void 0, guidance) ? guidance : {};
|
|
1487
|
+
const toolGuidance = _chunkZS2WHWWLjs.stringField.call(void 0, record, "tool");
|
|
1488
|
+
const providerGuidance = _chunkZS2WHWWLjs.stringField.call(void 0, record, "provider");
|
|
1489
1489
|
return [
|
|
1490
1490
|
...toolGuidance ? [`- This tool: ${toolGuidance}`] : [],
|
|
1491
1491
|
...providerGuidance ? [`- Provider: ${providerGuidance}`] : []
|
|
1492
1492
|
];
|
|
1493
1493
|
}
|
|
1494
1494
|
function printCompactToolContract(tool, requestedToolId) {
|
|
1495
|
-
if (
|
|
1495
|
+
if (_chunkZS2WHWWLjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1496
1496
|
printMonitorTypeContract(tool, requestedToolId);
|
|
1497
1497
|
return;
|
|
1498
1498
|
}
|
|
1499
|
-
const contract =
|
|
1499
|
+
const contract = _chunkZS2WHWWLjs.toolContractJsonForDescribe.call(void 0,
|
|
1500
1500
|
tool,
|
|
1501
1501
|
requestedToolId,
|
|
1502
1502
|
void 0,
|
|
1503
1503
|
seedToolListScript
|
|
1504
1504
|
);
|
|
1505
|
-
const cost =
|
|
1506
|
-
const getters =
|
|
1505
|
+
const cost = _chunkZS2WHWWLjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
|
|
1506
|
+
const getters = _chunkZS2WHWWLjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1507
1507
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1508
1508
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1509
|
-
const inputFields =
|
|
1510
|
-
|
|
1509
|
+
const inputFields = _chunkZS2WHWWLjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1510
|
+
_chunkZS2WHWWLjs.recordField.call(void 0, contract, "inputSchema")
|
|
1511
1511
|
);
|
|
1512
1512
|
console.log(String(contract.toolId));
|
|
1513
1513
|
if (contract.displayName) console.log(`Best for: ${contract.displayName}`);
|
|
@@ -1524,9 +1524,9 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1524
1524
|
printToolOutputArrayShape(contract);
|
|
1525
1525
|
printToolExecutionHints(contract);
|
|
1526
1526
|
if (contract.deprecated === true) {
|
|
1527
|
-
const deprecation =
|
|
1528
|
-
const message =
|
|
1529
|
-
const replacementToolId =
|
|
1527
|
+
const deprecation = _chunkZS2WHWWLjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
|
|
1528
|
+
const message = _chunkZS2WHWWLjs.stringField.call(void 0, deprecation, "message");
|
|
1529
|
+
const replacementToolId = _chunkZS2WHWWLjs.stringField.call(void 0,
|
|
1530
1530
|
deprecation,
|
|
1531
1531
|
"replacementToolId",
|
|
1532
1532
|
"replacement_tool_id"
|
|
@@ -1549,12 +1549,12 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1549
1549
|
console.log("");
|
|
1550
1550
|
console.log("Inputs:");
|
|
1551
1551
|
for (const field of inputFields) {
|
|
1552
|
-
if (!
|
|
1553
|
-
const name =
|
|
1552
|
+
if (!_chunkZS2WHWWLjs.isRecord.call(void 0, field)) continue;
|
|
1553
|
+
const name = _chunkZS2WHWWLjs.stringField.call(void 0, field, "name");
|
|
1554
1554
|
if (!name) continue;
|
|
1555
1555
|
const required = field.required ? "*" : "";
|
|
1556
|
-
const type =
|
|
1557
|
-
const description =
|
|
1556
|
+
const type = _chunkZS2WHWWLjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1557
|
+
const description = _chunkZS2WHWWLjs.stringField.call(void 0, field, "description");
|
|
1558
1558
|
const enumValues = Array.isArray(field.enum) ? field.enum : [];
|
|
1559
1559
|
const enumSuffix = enumValues.length ? ` enum=${enumValues.map(String).join("|")}` : "";
|
|
1560
1560
|
const itemBoundsSuffix = arrayItemBoundsSuffix(field);
|
|
@@ -1569,8 +1569,8 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1569
1569
|
}
|
|
1570
1570
|
console.log("");
|
|
1571
1571
|
printToolExamplesOnly(tool, requestedToolId);
|
|
1572
|
-
const starterScript =
|
|
1573
|
-
const starterPath =
|
|
1572
|
+
const starterScript = _chunkZS2WHWWLjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
|
|
1573
|
+
const starterPath = _chunkZS2WHWWLjs.stringField.call(void 0, starterScript, "path");
|
|
1574
1574
|
if (starterPath) {
|
|
1575
1575
|
console.log("");
|
|
1576
1576
|
console.log(`Starter script: ${starterPath}`);
|
|
@@ -1581,16 +1581,16 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1581
1581
|
console.log("Getters:");
|
|
1582
1582
|
if (listGetters.length) console.log(listGetterHeading());
|
|
1583
1583
|
for (const entry of listGetters) {
|
|
1584
|
-
if (
|
|
1584
|
+
if (_chunkZS2WHWWLjs.isRecord.call(void 0, entry))
|
|
1585
1585
|
console.log(
|
|
1586
|
-
`- ${
|
|
1586
|
+
`- ${_chunkZS2WHWWLjs.stringField.call(void 0, entry, "name")}: ${_chunkZS2WHWWLjs.playResultExpression.call(void 0, entry)}`
|
|
1587
1587
|
);
|
|
1588
1588
|
}
|
|
1589
1589
|
if (valueGetters.length) console.log("Values:");
|
|
1590
1590
|
for (const entry of valueGetters) {
|
|
1591
|
-
if (
|
|
1591
|
+
if (_chunkZS2WHWWLjs.isRecord.call(void 0, entry))
|
|
1592
1592
|
console.log(
|
|
1593
|
-
`- ${
|
|
1593
|
+
`- ${_chunkZS2WHWWLjs.stringField.call(void 0, entry, "name")}: ${_chunkZS2WHWWLjs.playResultExpression.call(void 0, entry)}`
|
|
1594
1594
|
);
|
|
1595
1595
|
}
|
|
1596
1596
|
}
|
|
@@ -1601,22 +1601,22 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1601
1601
|
console.log(`More: deepline describe ${contract.toolId}`);
|
|
1602
1602
|
}
|
|
1603
1603
|
function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
1604
|
-
if (
|
|
1604
|
+
if (_chunkZS2WHWWLjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1605
1605
|
return monitorTypePricingLines(tool);
|
|
1606
1606
|
}
|
|
1607
1607
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1608
|
-
const cost =
|
|
1609
|
-
const pricingModel =
|
|
1610
|
-
const billing =
|
|
1611
|
-
const explicitUnit =
|
|
1608
|
+
const cost = _chunkZS2WHWWLjs.Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1609
|
+
const pricingModel = _chunkZS2WHWWLjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
|
|
1610
|
+
const billing = _chunkZS2WHWWLjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunkZS2WHWWLjs.stringField.call(void 0, cost, "billingSource") || _chunkZS2WHWWLjs.stringField.call(void 0, cost, "billingMode") || "unknown";
|
|
1611
|
+
const explicitUnit = _chunkZS2WHWWLjs.stringField.call(void 0, cost, "unit");
|
|
1612
1612
|
const unit = explicitUnit || (pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit");
|
|
1613
1613
|
const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
|
|
1614
1614
|
const usd = numberField(cost, "deeplineUsdPerPricingUnit");
|
|
1615
|
-
const displayText =
|
|
1616
|
-
const summary =
|
|
1615
|
+
const displayText = _chunkZS2WHWWLjs.stringField.call(void 0, cost, "displayText");
|
|
1616
|
+
const summary = _chunkZS2WHWWLjs.stringField.call(void 0, cost, "summary");
|
|
1617
1617
|
const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
|
|
1618
1618
|
const reference = cost.observedReference;
|
|
1619
|
-
const observedMax =
|
|
1619
|
+
const observedMax = _chunkZS2WHWWLjs.observedMaxText.call(void 0, cost);
|
|
1620
1620
|
return [
|
|
1621
1621
|
`${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
|
|
1622
1622
|
...observedMax ? [` ${observedMax}`] : [],
|
|
@@ -1633,19 +1633,19 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
|
1633
1633
|
console.log(line);
|
|
1634
1634
|
}
|
|
1635
1635
|
function printToolSchemaOnly(tool, requestedToolId) {
|
|
1636
|
-
if (
|
|
1636
|
+
if (_chunkZS2WHWWLjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1637
1637
|
printMonitorTypeFilters(tool);
|
|
1638
1638
|
printMonitorTypeStreams(tool);
|
|
1639
1639
|
return;
|
|
1640
1640
|
}
|
|
1641
|
-
const contract =
|
|
1641
|
+
const contract = _chunkZS2WHWWLjs.toolContractJsonForDescribe.call(void 0,
|
|
1642
1642
|
tool,
|
|
1643
1643
|
requestedToolId,
|
|
1644
1644
|
void 0,
|
|
1645
1645
|
seedToolListScript
|
|
1646
1646
|
);
|
|
1647
|
-
const inputFields =
|
|
1648
|
-
|
|
1647
|
+
const inputFields = _chunkZS2WHWWLjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1648
|
+
_chunkZS2WHWWLjs.recordField.call(void 0, contract, "inputSchema")
|
|
1649
1649
|
);
|
|
1650
1650
|
console.log(`Schema: ${contract.toolId}`);
|
|
1651
1651
|
if (!inputFields.length) {
|
|
@@ -1672,27 +1672,27 @@ function printToolSchemaOnly(tool, requestedToolId) {
|
|
|
1672
1672
|
}
|
|
1673
1673
|
printToolOutputArrayShape(contract);
|
|
1674
1674
|
const declaredSchema = declaredToolJsonSchema(
|
|
1675
|
-
|
|
1675
|
+
_chunkZS2WHWWLjs.recordField.call(void 0, contract, "inputSchema")
|
|
1676
1676
|
);
|
|
1677
1677
|
if (declaredSchema) {
|
|
1678
1678
|
console.log("Declared input JSON Schema:");
|
|
1679
1679
|
console.log(JSON.stringify(declaredSchema, null, 2));
|
|
1680
1680
|
}
|
|
1681
|
-
if (
|
|
1681
|
+
if (_chunkZS2WHWWLjs.isRecord.call(void 0, contract.responseSchema)) {
|
|
1682
1682
|
console.log("Deepline execution response JSON Schema:");
|
|
1683
1683
|
console.log(JSON.stringify(contract.responseSchema, null, 2));
|
|
1684
1684
|
}
|
|
1685
1685
|
}
|
|
1686
1686
|
function printToolExamplesOnly(tool, requestedToolId) {
|
|
1687
|
-
if (
|
|
1687
|
+
if (_chunkZS2WHWWLjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1688
1688
|
printMonitorTypeDeploy(tool);
|
|
1689
1689
|
return;
|
|
1690
1690
|
}
|
|
1691
|
-
if (
|
|
1691
|
+
if (_chunkZS2WHWWLjs.isPlayLikeTool.call(void 0, tool)) {
|
|
1692
1692
|
printPlayLikeToolUsage(tool, requestedToolId);
|
|
1693
1693
|
return;
|
|
1694
1694
|
}
|
|
1695
|
-
const contract =
|
|
1695
|
+
const contract = _chunkZS2WHWWLjs.toolContractJsonForDescribe.call(void 0,
|
|
1696
1696
|
tool,
|
|
1697
1697
|
requestedToolId,
|
|
1698
1698
|
void 0,
|
|
@@ -1700,9 +1700,9 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1700
1700
|
);
|
|
1701
1701
|
const toolId = String(contract.toolId);
|
|
1702
1702
|
const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
|
|
1703
|
-
const examples =
|
|
1703
|
+
const examples = _chunkZS2WHWWLjs.arrayField.call(void 0, tool, "examples").filter(_chunkZS2WHWWLjs.isRecord);
|
|
1704
1704
|
const firstExample = examples[0];
|
|
1705
|
-
const sampleInput = firstExample &&
|
|
1705
|
+
const sampleInput = firstExample && _chunkZS2WHWWLjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunkZS2WHWWLjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunkZS2WHWWLjs.samplePayloadForInputFields.call(void 0, inputFields)));
|
|
1706
1706
|
console.log("Example input payload:");
|
|
1707
1707
|
console.log(JSON.stringify(sampleInput, null, 2));
|
|
1708
1708
|
console.log(`Use in a play:`);
|
|
@@ -1716,32 +1716,32 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1716
1716
|
);
|
|
1717
1717
|
console.log("});");
|
|
1718
1718
|
console.log("const response = result.toolResponse.rawV2;");
|
|
1719
|
-
const getters =
|
|
1719
|
+
const getters = _chunkZS2WHWWLjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1720
1720
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1721
1721
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1722
|
-
const firstGetter = valueGetters.find(
|
|
1722
|
+
const firstGetter = valueGetters.find(_chunkZS2WHWWLjs.isRecord);
|
|
1723
1723
|
if (firstGetter) {
|
|
1724
|
-
const name =
|
|
1725
|
-
const expression =
|
|
1724
|
+
const name = _chunkZS2WHWWLjs.stringField.call(void 0, firstGetter, "name") || "value";
|
|
1725
|
+
const expression = _chunkZS2WHWWLjs.stringField.call(void 0, firstGetter, "expression");
|
|
1726
1726
|
if (expression)
|
|
1727
1727
|
console.log(
|
|
1728
1728
|
`const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
|
|
1729
1729
|
);
|
|
1730
1730
|
}
|
|
1731
1731
|
const arrayNames = new Set(
|
|
1732
|
-
|
|
1733
|
-
|
|
1732
|
+
_chunkZS2WHWWLjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1733
|
+
_chunkZS2WHWWLjs.recordField.call(void 0, tool, "outputSchema", "output_schema")
|
|
1734
1734
|
).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
|
|
1735
1735
|
);
|
|
1736
1736
|
const firstList = _nullishCoalesce(listGetters.find(
|
|
1737
|
-
(entry) =>
|
|
1738
|
-
), () => ( listGetters.find(
|
|
1739
|
-
if (
|
|
1740
|
-
const name = safeIdentifier(
|
|
1737
|
+
(entry) => _chunkZS2WHWWLjs.isRecord.call(void 0, entry) && arrayNames.has(_chunkZS2WHWWLjs.stringField.call(void 0, entry, "name"))
|
|
1738
|
+
), () => ( listGetters.find(_chunkZS2WHWWLjs.isRecord)));
|
|
1739
|
+
if (_chunkZS2WHWWLjs.isRecord.call(void 0, firstList)) {
|
|
1740
|
+
const name = safeIdentifier(_chunkZS2WHWWLjs.stringField.call(void 0, firstList, "name") || "list");
|
|
1741
1741
|
if (_chunkJ33TSWO5js.playToolListGetterMode.call(void 0, ) === "array") {
|
|
1742
|
-
console.log(`const ${name}_rows = ${
|
|
1742
|
+
console.log(`const ${name}_rows = ${_chunkZS2WHWWLjs.playResultExpression.call(void 0, firstList)};`);
|
|
1743
1743
|
} else {
|
|
1744
|
-
console.log(`const ${name}_ds = ${
|
|
1744
|
+
console.log(`const ${name}_ds = ${_chunkZS2WHWWLjs.playResultExpression.call(void 0, firstList)};`);
|
|
1745
1745
|
console.log(
|
|
1746
1746
|
"// Complete small list from this response; throws above the memory cap."
|
|
1747
1747
|
);
|
|
@@ -1751,7 +1751,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1751
1751
|
console.log("```");
|
|
1752
1752
|
if (firstList) printListGetterConsumption();
|
|
1753
1753
|
for (const example of examples) {
|
|
1754
|
-
const description =
|
|
1754
|
+
const description = _chunkZS2WHWWLjs.stringField.call(void 0, example, "description");
|
|
1755
1755
|
if (description) console.log(description);
|
|
1756
1756
|
console.log("Example Deepline execution response:");
|
|
1757
1757
|
console.log(JSON.stringify(example.response, null, 2));
|
|
@@ -1766,14 +1766,14 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1766
1766
|
}
|
|
1767
1767
|
function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
1768
1768
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1769
|
-
const inputFields =
|
|
1770
|
-
|
|
1769
|
+
const inputFields = _chunkZS2WHWWLjs.toolInputFieldsForDisplay.call(void 0,
|
|
1770
|
+
_chunkZS2WHWWLjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
|
|
1771
1771
|
);
|
|
1772
|
-
const sampleInput =
|
|
1773
|
-
const playReference =
|
|
1772
|
+
const sampleInput = _chunkZS2WHWWLjs.samplePayloadForInputFields.call(void 0, inputFields);
|
|
1773
|
+
const playReference = _chunkZS2WHWWLjs.playReferenceForTool.call(void 0, tool);
|
|
1774
1774
|
console.log("Run as a play:");
|
|
1775
1775
|
console.log(
|
|
1776
|
-
|
|
1776
|
+
_chunkZS2WHWWLjs.playRunCommandForTool.call(void 0,
|
|
1777
1777
|
tool,
|
|
1778
1778
|
toolId,
|
|
1779
1779
|
Object.keys(sampleInput).length ? sampleInput : void 0
|
|
@@ -1784,13 +1784,13 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
|
1784
1784
|
}
|
|
1785
1785
|
}
|
|
1786
1786
|
function printToolGettersOnly(tool, requestedToolId) {
|
|
1787
|
-
const contract =
|
|
1787
|
+
const contract = _chunkZS2WHWWLjs.toolContractJsonForDescribe.call(void 0,
|
|
1788
1788
|
tool,
|
|
1789
1789
|
requestedToolId,
|
|
1790
1790
|
void 0,
|
|
1791
1791
|
seedToolListScript
|
|
1792
1792
|
);
|
|
1793
|
-
const getters =
|
|
1793
|
+
const getters = _chunkZS2WHWWLjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1794
1794
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1795
1795
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1796
1796
|
console.log(`Getters: ${contract.toolId}`);
|
|
@@ -1801,9 +1801,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1801
1801
|
if (listGetters.length) {
|
|
1802
1802
|
console.log(listGetterHeading());
|
|
1803
1803
|
for (const entry of listGetters) {
|
|
1804
|
-
if (
|
|
1804
|
+
if (_chunkZS2WHWWLjs.isRecord.call(void 0, entry))
|
|
1805
1805
|
console.log(
|
|
1806
|
-
`- ${
|
|
1806
|
+
`- ${_chunkZS2WHWWLjs.stringField.call(void 0, entry, "name")}: ${_chunkZS2WHWWLjs.playResultExpression.call(void 0, entry)}`
|
|
1807
1807
|
);
|
|
1808
1808
|
}
|
|
1809
1809
|
printListGetterConsumption();
|
|
@@ -1811,9 +1811,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1811
1811
|
if (valueGetters.length) {
|
|
1812
1812
|
console.log("Values:");
|
|
1813
1813
|
for (const entry of valueGetters) {
|
|
1814
|
-
if (
|
|
1814
|
+
if (_chunkZS2WHWWLjs.isRecord.call(void 0, entry))
|
|
1815
1815
|
console.log(
|
|
1816
|
-
`- ${
|
|
1816
|
+
`- ${_chunkZS2WHWWLjs.stringField.call(void 0, entry, "name")}: ${_chunkZS2WHWWLjs.playResultExpression.call(void 0, entry)}`
|
|
1817
1817
|
);
|
|
1818
1818
|
}
|
|
1819
1819
|
}
|
|
@@ -1851,22 +1851,22 @@ function listedToolDescription(tool) {
|
|
|
1851
1851
|
}
|
|
1852
1852
|
function formatListedToolCost(tool) {
|
|
1853
1853
|
const record = tool;
|
|
1854
|
-
if (
|
|
1854
|
+
if (_chunkZS2WHWWLjs.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
|
|
1855
1855
|
return "Cost: Free";
|
|
1856
1856
|
}
|
|
1857
|
-
const pricing =
|
|
1858
|
-
const displayText =
|
|
1857
|
+
const pricing = _chunkZS2WHWWLjs.recordField.call(void 0, record, "pricing");
|
|
1858
|
+
const displayText = _chunkZS2WHWWLjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
1859
1859
|
return displayText ? `Cost: ${displayText}` : "";
|
|
1860
1860
|
}
|
|
1861
1861
|
function printToolOutputArrayShape(tool) {
|
|
1862
|
-
const outputFields =
|
|
1863
|
-
|
|
1862
|
+
const outputFields = _chunkZS2WHWWLjs.toolOutputFieldsForDisplay.call(void 0,
|
|
1863
|
+
_chunkZS2WHWWLjs.recordField.call(void 0, _chunkZS2WHWWLjs.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
|
|
1864
1864
|
);
|
|
1865
1865
|
if (outputFields.length === 0) return;
|
|
1866
1866
|
console.log(" Output array shape (declared schema):");
|
|
1867
1867
|
for (const field of outputFields.slice(0, 60)) {
|
|
1868
1868
|
const name = String(field.name);
|
|
1869
|
-
const type =
|
|
1869
|
+
const type = _chunkZS2WHWWLjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1870
1870
|
const itemBounds = arrayItemBoundsSuffix(field);
|
|
1871
1871
|
console.log(` - ${name}: ${type}${itemBounds}`);
|
|
1872
1872
|
}
|
|
@@ -1875,14 +1875,14 @@ function printToolOutputArrayShape(tool) {
|
|
|
1875
1875
|
}
|
|
1876
1876
|
}
|
|
1877
1877
|
function declaredToolJsonSchema(inputSchema) {
|
|
1878
|
-
if (
|
|
1878
|
+
if (_chunkZS2WHWWLjs.isRecord.call(void 0, inputSchema.jsonSchema)) {
|
|
1879
1879
|
return inputSchema.jsonSchema;
|
|
1880
1880
|
}
|
|
1881
1881
|
return Array.isArray(inputSchema.fields) ? null : inputSchema;
|
|
1882
1882
|
}
|
|
1883
1883
|
function arrayItemBoundsSuffix(field) {
|
|
1884
|
-
const itemSchema =
|
|
1885
|
-
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type :
|
|
1884
|
+
const itemSchema = _chunkZS2WHWWLjs.isRecord.call(void 0, field.items) ? field.items : null;
|
|
1885
|
+
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunkZS2WHWWLjs.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
|
|
1886
1886
|
const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _14 => _14.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
|
|
1887
1887
|
const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
|
|
1888
1888
|
const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
|
|
@@ -1895,21 +1895,21 @@ function arrayItemBoundsSuffix(field) {
|
|
|
1895
1895
|
return itemTypeSuffix;
|
|
1896
1896
|
}
|
|
1897
1897
|
function printToolExecutionHints(value) {
|
|
1898
|
-
const batchCapabilityRecord =
|
|
1899
|
-
|
|
1898
|
+
const batchCapabilityRecord = _chunkZS2WHWWLjs.recordField.call(void 0,
|
|
1899
|
+
_chunkZS2WHWWLjs.isRecord.call(void 0, value) ? value : {},
|
|
1900
1900
|
"batchCapability",
|
|
1901
1901
|
"batch_capability"
|
|
1902
1902
|
);
|
|
1903
1903
|
const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
|
|
1904
|
-
const executionMetadata =
|
|
1905
|
-
|
|
1904
|
+
const executionMetadata = _chunkZS2WHWWLjs.recordField.call(void 0,
|
|
1905
|
+
_chunkZS2WHWWLjs.isRecord.call(void 0, value) ? value : {},
|
|
1906
1906
|
"executionMetadata",
|
|
1907
1907
|
"execution_metadata"
|
|
1908
1908
|
);
|
|
1909
1909
|
if (batchCapability) {
|
|
1910
|
-
const status =
|
|
1911
|
-
const surface =
|
|
1912
|
-
const operation =
|
|
1910
|
+
const status = _chunkZS2WHWWLjs.stringField.call(void 0, batchCapability, "status") || "unknown";
|
|
1911
|
+
const surface = _chunkZS2WHWWLjs.stringField.call(void 0, batchCapability, "surface");
|
|
1912
|
+
const operation = _chunkZS2WHWWLjs.stringField.call(void 0,
|
|
1913
1913
|
batchCapability,
|
|
1914
1914
|
"batchOperation",
|
|
1915
1915
|
"batch_operation"
|
|
@@ -1919,7 +1919,7 @@ function printToolExecutionHints(value) {
|
|
|
1919
1919
|
"maxBatchSize",
|
|
1920
1920
|
"max_batch_size"
|
|
1921
1921
|
);
|
|
1922
|
-
const notes =
|
|
1922
|
+
const notes = _chunkZS2WHWWLjs.stringField.call(void 0, batchCapability, "notes");
|
|
1923
1923
|
console.log("");
|
|
1924
1924
|
console.log("Batching:");
|
|
1925
1925
|
console.log(`- Catalog status: ${status}${surface ? ` (${surface})` : ""}`);
|
|
@@ -1938,11 +1938,11 @@ function printToolExecutionHints(value) {
|
|
|
1938
1938
|
}
|
|
1939
1939
|
if (notes) console.log(`- Details: ${notes}`);
|
|
1940
1940
|
}
|
|
1941
|
-
const configuredRateLimits =
|
|
1941
|
+
const configuredRateLimits = _chunkZS2WHWWLjs.arrayField.call(void 0,
|
|
1942
1942
|
executionMetadata,
|
|
1943
1943
|
"configuredRateLimits",
|
|
1944
1944
|
"configured_rate_limits"
|
|
1945
|
-
).filter(
|
|
1945
|
+
).filter(_chunkZS2WHWWLjs.isRecord);
|
|
1946
1946
|
if (configuredRateLimits.length > 0) {
|
|
1947
1947
|
console.log("");
|
|
1948
1948
|
console.log(
|
|
@@ -1952,7 +1952,7 @@ function printToolExecutionHints(value) {
|
|
|
1952
1952
|
const requests = numberField(limit, "requestsPerWindow");
|
|
1953
1953
|
const windowMs = numberField(limit, "windowMs");
|
|
1954
1954
|
if (requests === null || windowMs === null) continue;
|
|
1955
|
-
const usage =
|
|
1955
|
+
const usage = _chunkZS2WHWWLjs.stringField.call(void 0, limit, "usage") || "unknown";
|
|
1956
1956
|
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;
|
|
1957
1957
|
const explicitMaxConcurrency = numberField(
|
|
1958
1958
|
limit,
|
|
@@ -1961,11 +1961,11 @@ function printToolExecutionHints(value) {
|
|
|
1961
1961
|
);
|
|
1962
1962
|
const concurrencyText = explicitMaxConcurrency === null ? "no explicit concurrency limit" : `explicit concurrency limit ${explicitMaxConcurrency}`;
|
|
1963
1963
|
console.log(
|
|
1964
|
-
`- ${requests} requests per ${formatRateWindow(windowMs)}${
|
|
1964
|
+
`- ${requests} requests per ${formatRateWindow(windowMs)}${_chunkXYIECA7Mjs.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
|
|
1965
1965
|
);
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
|
-
const queueHint =
|
|
1968
|
+
const queueHint = _chunkZS2WHWWLjs.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
|
|
1969
1969
|
const requestsPerSecondHint = numberField(
|
|
1970
1970
|
queueHint,
|
|
1971
1971
|
"requestsPerSecondHint",
|
|
@@ -1991,25 +1991,25 @@ function formatRateWindow(windowMs) {
|
|
|
1991
1991
|
}
|
|
1992
1992
|
function samplePayload(samples, key) {
|
|
1993
1993
|
const entry = samples[key];
|
|
1994
|
-
if (!
|
|
1994
|
+
if (!_chunkZS2WHWWLjs.isRecord.call(void 0, entry)) return void 0;
|
|
1995
1995
|
return Object.prototype.hasOwnProperty.call(entry, "payload") ? entry.payload : entry;
|
|
1996
1996
|
}
|
|
1997
1997
|
function commandEnvelopeFromRawResponse(rawResponse) {
|
|
1998
|
-
return
|
|
1998
|
+
return _chunkZS2WHWWLjs.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
|
|
1999
1999
|
}
|
|
2000
2000
|
function toolExecuteExitCode(envelope) {
|
|
2001
2001
|
return envelope.status === "failed" || envelope.ok === false ? 1 : 0;
|
|
2002
2002
|
}
|
|
2003
2003
|
function extractToolExecutionWarningMessages(rawResponse) {
|
|
2004
|
-
if (!
|
|
2004
|
+
if (!_chunkZS2WHWWLjs.isRecord.call(void 0, rawResponse)) return [];
|
|
2005
2005
|
const candidates = [
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2006
|
+
_chunkZS2WHWWLjs.recordField.call(void 0, _chunkZS2WHWWLjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
|
|
2007
|
+
_chunkZS2WHWWLjs.recordField.call(void 0,
|
|
2008
|
+
_chunkZS2WHWWLjs.recordField.call(void 0, _chunkZS2WHWWLjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
|
|
2009
2009
|
"meta"
|
|
2010
2010
|
),
|
|
2011
|
-
|
|
2012
|
-
|
|
2011
|
+
_chunkZS2WHWWLjs.recordField.call(void 0, rawResponse, "meta"),
|
|
2012
|
+
_chunkZS2WHWWLjs.recordField.call(void 0, _chunkZS2WHWWLjs.recordField.call(void 0, rawResponse, "result"), "meta")
|
|
2013
2013
|
];
|
|
2014
2014
|
const messages = [];
|
|
2015
2015
|
for (const candidate of candidates) {
|
|
@@ -2018,8 +2018,8 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
2018
2018
|
for (const warning of warnings) {
|
|
2019
2019
|
if (typeof warning === "string" && warning.trim()) {
|
|
2020
2020
|
messages.push(warning.trim());
|
|
2021
|
-
} else if (
|
|
2022
|
-
const message =
|
|
2021
|
+
} else if (_chunkZS2WHWWLjs.isRecord.call(void 0, warning)) {
|
|
2022
|
+
const message = _chunkZS2WHWWLjs.stringField.call(void 0, warning, "message");
|
|
2023
2023
|
if (message) messages.push(message);
|
|
2024
2024
|
}
|
|
2025
2025
|
}
|
|
@@ -2027,20 +2027,20 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
2027
2027
|
return [...new Set(messages)];
|
|
2028
2028
|
}
|
|
2029
2029
|
function apifySyncRecoveryNext(rawResponse) {
|
|
2030
|
-
if (!
|
|
2031
|
-
const toolResponse =
|
|
2032
|
-
const raw =
|
|
2030
|
+
if (!_chunkZS2WHWWLjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
|
|
2031
|
+
const toolResponse = _chunkZS2WHWWLjs.recordField.call(void 0, rawResponse, "toolResponse");
|
|
2032
|
+
const raw = _chunkZS2WHWWLjs.recordField.call(void 0, toolResponse, "raw");
|
|
2033
2033
|
if (raw.state !== "awaiting_apify") return null;
|
|
2034
|
-
const next =
|
|
2035
|
-
const getActorRun =
|
|
2036
|
-
const getActorRunTool =
|
|
2037
|
-
const getActorRunPayload =
|
|
2034
|
+
const next = _chunkZS2WHWWLjs.recordField.call(void 0, raw, "next");
|
|
2035
|
+
const getActorRun = _chunkZS2WHWWLjs.recordField.call(void 0, next, "getActorRun");
|
|
2036
|
+
const getActorRunTool = _chunkZS2WHWWLjs.stringField.call(void 0, getActorRun, "tool");
|
|
2037
|
+
const getActorRunPayload = _chunkZS2WHWWLjs.recordField.call(void 0, getActorRun, "payload");
|
|
2038
2038
|
if (!getActorRunTool || Object.keys(getActorRunPayload).length === 0) {
|
|
2039
2039
|
return null;
|
|
2040
2040
|
}
|
|
2041
|
-
const getDatasetItems =
|
|
2042
|
-
const getDatasetItemsTool =
|
|
2043
|
-
const getDatasetItemsPayload =
|
|
2041
|
+
const getDatasetItems = _chunkZS2WHWWLjs.recordField.call(void 0, next, "getDatasetItems");
|
|
2042
|
+
const getDatasetItemsTool = _chunkZS2WHWWLjs.stringField.call(void 0, getDatasetItems, "tool");
|
|
2043
|
+
const getDatasetItemsPayload = _chunkZS2WHWWLjs.recordField.call(void 0, getDatasetItems, "payload");
|
|
2044
2044
|
return {
|
|
2045
2045
|
getActorRun: `deepline run ${getActorRunTool} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
|
|
2046
2046
|
...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
|
|
@@ -2050,7 +2050,7 @@ function apifySyncRecoveryNext(rawResponse) {
|
|
|
2050
2050
|
}
|
|
2051
2051
|
function listExtractorPathsFromUsageGuidance(tool) {
|
|
2052
2052
|
const toolExecutionResult = _optionalChain([tool, 'access', _16 => _16.usageGuidance, 'optionalAccess', _17 => _17.toolExecutionResult]);
|
|
2053
|
-
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists :
|
|
2053
|
+
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists : _chunkZS2WHWWLjs.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _19 => _19.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
|
|
2054
2054
|
return extractedLists.flatMap((entry) => {
|
|
2055
2055
|
const paths = _nullishCoalesce(_optionalChain([entry, 'access', _20 => _20.details, 'optionalAccess', _21 => _21.candidatePaths]), () => ( _optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.rawToolOutputPaths])));
|
|
2056
2056
|
if (!Array.isArray(paths)) return [];
|
|
@@ -2135,7 +2135,7 @@ function parseJsonObjectArgument(raw, flagName) {
|
|
|
2135
2135
|
}
|
|
2136
2136
|
throw invalidJsonError(flagName, message);
|
|
2137
2137
|
}
|
|
2138
|
-
if (!
|
|
2138
|
+
if (!_chunkZS2WHWWLjs.isRecord.call(void 0, parsed)) {
|
|
2139
2139
|
throw invalidJsonError(flagName, "expected an object.");
|
|
2140
2140
|
}
|
|
2141
2141
|
return parsed;
|
|
@@ -2179,7 +2179,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2179
2179
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2180
2180
|
}
|
|
2181
2181
|
if (options.idempotencyKey !== void 0) {
|
|
2182
|
-
|
|
2182
|
+
_chunkQR7VYYNMjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2183
2183
|
}
|
|
2184
2184
|
if (options.recoveryTimeoutMs !== void 0) {
|
|
2185
2185
|
const parsed = Number(options.recoveryTimeoutMs);
|
|
@@ -2308,7 +2308,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2308
2308
|
kind: summaryEntries.length > 0 ? "object" : "raw",
|
|
2309
2309
|
summary: input.summary
|
|
2310
2310
|
};
|
|
2311
|
-
const envelopeHasCanonicalOutput =
|
|
2311
|
+
const envelopeHasCanonicalOutput = _chunkZS2WHWWLjs.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
|
|
2312
2312
|
const envelopeHasDeclaredOutput = Object.prototype.hasOwnProperty.call(
|
|
2313
2313
|
envelope,
|
|
2314
2314
|
"output"
|
|
@@ -2336,7 +2336,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2336
2336
|
return {
|
|
2337
2337
|
...envelope,
|
|
2338
2338
|
...input.idempotencyKey ? { idempotency_key: input.idempotencyKey } : {},
|
|
2339
|
-
...
|
|
2339
|
+
..._chunkZS2WHWWLjs.isRecord.call(void 0, input.rawResponse) && _chunkZS2WHWWLjs.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
|
|
2340
2340
|
...envelopeHasCanonicalOutput || envelopeHasDeclaredOutput ? { output_preview: outputPreview } : { output: outputPreview },
|
|
2341
2341
|
...summaryEntries.length > 0 ? { summary: input.summary } : {},
|
|
2342
2342
|
...warningMessages.length > 0 ? { warnings: warningMessages } : {},
|
|
@@ -2397,7 +2397,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
|
|
|
2397
2397
|
void _render;
|
|
2398
2398
|
void _next;
|
|
2399
2399
|
void _local;
|
|
2400
|
-
const billingLookup =
|
|
2400
|
+
const billingLookup = _chunkZS2WHWWLjs.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
|
|
2401
2401
|
const inspection = toolExecutionInspection(input);
|
|
2402
2402
|
return {
|
|
2403
2403
|
...base,
|
|
@@ -2493,7 +2493,7 @@ function printToolExecutionWarnings(toolId, params, metadata) {
|
|
|
2493
2493
|
}
|
|
2494
2494
|
}
|
|
2495
2495
|
function assertExecutableToolMetadata(toolId, metadata) {
|
|
2496
|
-
if (
|
|
2496
|
+
if (_chunkZS2WHWWLjs.isPlayLikeTool.call(void 0, metadata)) {
|
|
2497
2497
|
throw new (0, _chunkSQWET4SLjs.DeeplineError)(
|
|
2498
2498
|
playLikeToolExecuteErrorMessage(
|
|
2499
2499
|
toolId,
|
|
@@ -2511,7 +2511,7 @@ function valueAt(value, path) {
|
|
|
2511
2511
|
for (const [index, part] of parts.entries()) {
|
|
2512
2512
|
const each = part === "*" || part.endsWith("[*]");
|
|
2513
2513
|
if (part !== "*") {
|
|
2514
|
-
at =
|
|
2514
|
+
at = _chunkZS2WHWWLjs.isRecord.call(void 0, at) ? at[each ? part.slice(0, -3) : part] : void 0;
|
|
2515
2515
|
}
|
|
2516
2516
|
if (!each) continue;
|
|
2517
2517
|
if (!Array.isArray(at)) return void 0;
|
|
@@ -2527,7 +2527,7 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2527
2527
|
const getters = ["extractedValues", "extractedLists"].flatMap(
|
|
2528
2528
|
(kind) => {
|
|
2529
2529
|
const group = _optionalChain([result, 'optionalAccess', _28 => _28[kind]]);
|
|
2530
|
-
return Array.isArray(group) ? group :
|
|
2530
|
+
return Array.isArray(group) ? group : _chunkZS2WHWWLjs.isRecord.call(void 0, group) ? Object.entries(group).map(([name, getter]) => ({
|
|
2531
2531
|
name,
|
|
2532
2532
|
...getter
|
|
2533
2533
|
})) : [];
|
|
@@ -2552,13 +2552,13 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2552
2552
|
}
|
|
2553
2553
|
function writeToolReceipt(input) {
|
|
2554
2554
|
const { response, metadata } = input;
|
|
2555
|
-
const envelope =
|
|
2555
|
+
const envelope = _chunkZS2WHWWLjs.isRecord.call(void 0, response) ? response : {};
|
|
2556
2556
|
const jobId = typeof envelope.job_id === "string" ? envelope.job_id : null;
|
|
2557
|
-
const toolResponse =
|
|
2557
|
+
const toolResponse = _chunkZS2WHWWLjs.recordField.call(void 0, envelope, "toolResponse");
|
|
2558
2558
|
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;
|
|
2559
2559
|
const status = typeof envelope.status === "string" ? envelope.status : "completed";
|
|
2560
|
-
const charged =
|
|
2561
|
-
|
|
2560
|
+
const charged = _chunkZS2WHWWLjs.recordField.call(void 0, envelope, "billing").credits_charged;
|
|
2561
|
+
_chunkKBOSALBIjs.writeExecutionOutput.call(void 0,
|
|
2562
2562
|
{
|
|
2563
2563
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2564
2564
|
status,
|
|
@@ -2589,8 +2589,8 @@ async function executeToolForReceipt(input) {
|
|
|
2589
2589
|
let retryKey = null;
|
|
2590
2590
|
let received = false;
|
|
2591
2591
|
try {
|
|
2592
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2593
|
-
const client = new (0,
|
|
2592
|
+
const cliInvocationId = _nullishCoalesce(_chunkCKTRQSRAjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkCKTRQSRAjs.beginToolExecuteCommand.call(void 0, )));
|
|
2593
|
+
const client = new (0, _chunkV2GN4PLKjs.DeeplineClient)();
|
|
2594
2594
|
const metadata = assertExecutableToolMetadata(
|
|
2595
2595
|
toolId,
|
|
2596
2596
|
await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
|
|
@@ -2611,9 +2611,9 @@ async function executeToolForReceipt(input) {
|
|
|
2611
2611
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2612
2612
|
..._optionalChain([metadata, 'access', _35 => _35.executionMetadata, 'optionalAccess', _36 => _36.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2613
2613
|
...key ? { idempotencyKey: key } : {},
|
|
2614
|
-
searchRef:
|
|
2614
|
+
searchRef: _chunkDYS3KWYFjs.recentSearchRef.call(void 0, toolId),
|
|
2615
2615
|
cliInvocationId,
|
|
2616
|
-
onResponseReceived:
|
|
2616
|
+
onResponseReceived: _chunkKBOSALBIjs.recordApiResponse
|
|
2617
2617
|
}).catch((error) => {
|
|
2618
2618
|
const guidance = toolGuidanceLines(metadata.guidance);
|
|
2619
2619
|
if (guidance.length)
|
|
@@ -2636,7 +2636,7 @@ async function executeToolForReceipt(input) {
|
|
|
2636
2636
|
if (received) throw error;
|
|
2637
2637
|
const outcomeKnown = answeredWithFailure(error);
|
|
2638
2638
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _37 => _37.discard, 'call', _38 => _38()]);
|
|
2639
|
-
|
|
2639
|
+
_chunkKBOSALBIjs.writeExecutionOutput.call(void 0,
|
|
2640
2640
|
{
|
|
2641
2641
|
id: outcomeKnown ? null : key,
|
|
2642
2642
|
status: "failed",
|
|
@@ -2660,11 +2660,11 @@ function answeredWithFailure(error) {
|
|
|
2660
2660
|
error.statusCode !== 408 && error.code !== "EXECUTION_OUTCOME_UNKNOWN";
|
|
2661
2661
|
}
|
|
2662
2662
|
async function getToolExecutionReceipt(key, output) {
|
|
2663
|
-
const client = new (0,
|
|
2663
|
+
const client = new (0, _chunkV2GN4PLKjs.DeeplineClient)();
|
|
2664
2664
|
const execution = await client.executions.getByKey(key);
|
|
2665
2665
|
output.label = `${execution.toolId} (tool)`;
|
|
2666
2666
|
if (execution.response === void 0) {
|
|
2667
|
-
|
|
2667
|
+
_chunkKBOSALBIjs.writeExecutionOutput.call(void 0,
|
|
2668
2668
|
{
|
|
2669
2669
|
id: key,
|
|
2670
2670
|
status: execution.executionRecovery.state,
|
|
@@ -2693,19 +2693,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2693
2693
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2694
2694
|
} catch (error) {
|
|
2695
2695
|
if (wantsJson) {
|
|
2696
|
-
|
|
2696
|
+
_chunkS5LUY3KJjs.printJsonError.call(void 0, error);
|
|
2697
2697
|
} else {
|
|
2698
2698
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2699
2699
|
}
|
|
2700
2700
|
return error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2701
2701
|
}
|
|
2702
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2702
|
+
const cliInvocationId = _nullishCoalesce(_chunkCKTRQSRAjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkCKTRQSRAjs.beginToolExecuteCommand.call(void 0, )));
|
|
2703
2703
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2704
|
-
const tracing =
|
|
2704
|
+
const tracing = _chunkMRUFGOJRjs.isCliTraceEnabled.call(void 0, );
|
|
2705
2705
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2706
|
-
const client = new (0,
|
|
2706
|
+
const client = new (0, _chunkV2GN4PLKjs.DeeplineClient)();
|
|
2707
2707
|
if (clientStartedAt !== void 0) {
|
|
2708
|
-
|
|
2708
|
+
_chunkMRUFGOJRjs.recordCliTrace.call(void 0, {
|
|
2709
2709
|
phase: "cli.tool_execute_client_setup",
|
|
2710
2710
|
ms: performance.now() - clientStartedAt
|
|
2711
2711
|
});
|
|
@@ -2714,13 +2714,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2714
2714
|
const readMetadata = async () => {
|
|
2715
2715
|
if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2716
2716
|
try {
|
|
2717
|
-
metadata = await
|
|
2717
|
+
metadata = await _chunkCKTRQSRAjs.runToolExecuteStage.call(void 0,
|
|
2718
2718
|
"tool metadata lookup",
|
|
2719
2719
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2720
2720
|
);
|
|
2721
2721
|
} catch (error) {
|
|
2722
2722
|
if (isMissingToolMetadataError(error)) {
|
|
2723
|
-
const play = await
|
|
2723
|
+
const play = await _chunkCKTRQSRAjs.runToolExecuteStage.call(void 0,
|
|
2724
2724
|
"play alias lookup",
|
|
2725
2725
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2726
2726
|
);
|
|
@@ -2749,7 +2749,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2749
2749
|
assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2750
2750
|
} catch (error) {
|
|
2751
2751
|
if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2752
|
-
if (wantsJson)
|
|
2752
|
+
if (wantsJson) _chunkS5LUY3KJjs.printJsonError.call(void 0, error);
|
|
2753
2753
|
else console.error(error.message);
|
|
2754
2754
|
return 2;
|
|
2755
2755
|
}
|
|
@@ -2761,7 +2761,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2761
2761
|
metadata = await readMetadata();
|
|
2762
2762
|
} catch (error) {
|
|
2763
2763
|
if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2764
|
-
if (wantsJson)
|
|
2764
|
+
if (wantsJson) _chunkS5LUY3KJjs.printJsonError.call(void 0, error);
|
|
2765
2765
|
else console.error(error.message);
|
|
2766
2766
|
return 2;
|
|
2767
2767
|
}
|
|
@@ -2777,7 +2777,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2777
2777
|
metadata = await readMetadata();
|
|
2778
2778
|
} catch (error) {
|
|
2779
2779
|
if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2780
|
-
if (wantsJson)
|
|
2780
|
+
if (wantsJson) _chunkS5LUY3KJjs.printJsonError.call(void 0, error);
|
|
2781
2781
|
else console.error(error.message);
|
|
2782
2782
|
return 2;
|
|
2783
2783
|
}
|
|
@@ -2803,11 +2803,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2803
2803
|
responseIntent,
|
|
2804
2804
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2805
2805
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2806
|
-
searchRef:
|
|
2806
|
+
searchRef: _chunkDYS3KWYFjs.recentSearchRef.call(void 0, parsed.toolId),
|
|
2807
2807
|
cliInvocationId,
|
|
2808
|
-
onResponseReceived:
|
|
2808
|
+
onResponseReceived: _chunkKBOSALBIjs.recordApiResponse,
|
|
2809
2809
|
...tracing ? {
|
|
2810
|
-
onServerTiming: (serverTiming) =>
|
|
2810
|
+
onServerTiming: (serverTiming) => _chunkMRUFGOJRjs.recordCliTrace.call(void 0, {
|
|
2811
2811
|
phase: "tool_execute_server_timing",
|
|
2812
2812
|
cliInvocationId,
|
|
2813
2813
|
serverTiming,
|
|
@@ -2818,13 +2818,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2818
2818
|
let rawResponse;
|
|
2819
2819
|
let successfulCompatibilityResponse;
|
|
2820
2820
|
try {
|
|
2821
|
-
const executeResult = await
|
|
2821
|
+
const executeResult = await _chunkCKTRQSRAjs.runToolExecuteStage.call(void 0,
|
|
2822
2822
|
"execute request",
|
|
2823
2823
|
async () => {
|
|
2824
2824
|
try {
|
|
2825
2825
|
if (tracing) {
|
|
2826
2826
|
submissionStartedAt = performance.now();
|
|
2827
|
-
|
|
2827
|
+
_chunkMRUFGOJRjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2828
2828
|
}
|
|
2829
2829
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2830
2830
|
...executeOptions,
|
|
@@ -2834,34 +2834,34 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2834
2834
|
} catch (error) {
|
|
2835
2835
|
if (!(error instanceof _chunkSQWET4SLjs.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2836
2836
|
throw error;
|
|
2837
|
-
const baseUrl =
|
|
2837
|
+
const baseUrl = _chunkTFEGJEYOjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2838
2838
|
if (maintenancePolicy !== "off") {
|
|
2839
|
-
|
|
2839
|
+
_chunkNRBCETWLjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2840
2840
|
}
|
|
2841
|
-
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await
|
|
2841
|
+
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await _chunkCKTRQSRAjs.runToolExecuteStage.call(void 0,
|
|
2842
2842
|
"SDK compatibility",
|
|
2843
|
-
() =>
|
|
2843
|
+
() => _chunkNRBCETWLjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
2844
2844
|
command: "tools execute",
|
|
2845
|
-
skillsVersion:
|
|
2845
|
+
skillsVersion: _chunkTFEGJEYOjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2846
2846
|
persistCache: maintenancePolicy !== "off"
|
|
2847
2847
|
})
|
|
2848
2848
|
);
|
|
2849
2849
|
if (compatibility.error) throw compatibility.error;
|
|
2850
2850
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _44 => _44.readMetadata, 'call', _45 => _45()]), () => ( metadata));
|
|
2851
|
-
if (maintenancePolicy !== "off" && await
|
|
2851
|
+
if (maintenancePolicy !== "off" && await _chunkCKTRQSRAjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2852
2852
|
compatibility.response,
|
|
2853
2853
|
baseUrl,
|
|
2854
2854
|
maintenancePolicy
|
|
2855
2855
|
)) {
|
|
2856
2856
|
return void 0;
|
|
2857
2857
|
}
|
|
2858
|
-
|
|
2858
|
+
_chunkNRBCETWLjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
2859
2859
|
quietAdvisory: wantsJson
|
|
2860
2860
|
});
|
|
2861
2861
|
if (maintenancePolicy !== "off") {
|
|
2862
|
-
await
|
|
2862
|
+
await _chunkCKTRQSRAjs.runToolExecuteStage.call(void 0,
|
|
2863
2863
|
"agent skills sync",
|
|
2864
|
-
() =>
|
|
2864
|
+
() => _chunkNRBCETWLjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2865
2865
|
update: _optionalChain([compatibility, 'access', _46 => _46.response, 'optionalAccess', _47 => _47.skills]),
|
|
2866
2866
|
mode: "detached"
|
|
2867
2867
|
})
|
|
@@ -2870,7 +2870,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2870
2870
|
const legacyMetadata = await readMetadata();
|
|
2871
2871
|
if (tracing) {
|
|
2872
2872
|
submissionStartedAt = performance.now();
|
|
2873
|
-
|
|
2873
|
+
_chunkMRUFGOJRjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2874
2874
|
}
|
|
2875
2875
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2876
2876
|
...executeOptions,
|
|
@@ -2893,8 +2893,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2893
2893
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2894
2894
|
const updateRequiredBeforeExecution = error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2895
2895
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2896
|
-
const baseUrl =
|
|
2897
|
-
if (await
|
|
2896
|
+
const baseUrl = _chunkTFEGJEYOjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2897
|
+
if (await _chunkCKTRQSRAjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2898
2898
|
compatibility.response,
|
|
2899
2899
|
baseUrl,
|
|
2900
2900
|
maintenancePolicy
|
|
@@ -2918,7 +2918,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2918
2918
|
}
|
|
2919
2919
|
}
|
|
2920
2920
|
if (failure instanceof _chunkSQWET4SLjs.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2921
|
-
if (wantsJson)
|
|
2921
|
+
if (wantsJson) _chunkS5LUY3KJjs.printJsonError.call(void 0, failure);
|
|
2922
2922
|
else console.error(failure.message);
|
|
2923
2923
|
return 2;
|
|
2924
2924
|
}
|
|
@@ -2945,9 +2945,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2945
2945
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
2946
2946
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _54 => _54.auto_update]);
|
|
2947
2947
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _55 => _55.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
2948
|
-
await
|
|
2948
|
+
await _chunkCKTRQSRAjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2949
2949
|
compatibilityResponse,
|
|
2950
|
-
|
|
2950
|
+
_chunkTFEGJEYOjs.resolveConfig.call(void 0, ).baseUrl,
|
|
2951
2951
|
maintenancePolicy
|
|
2952
2952
|
);
|
|
2953
2953
|
}
|
|
@@ -2965,8 +2965,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2965
2965
|
);
|
|
2966
2966
|
}
|
|
2967
2967
|
}
|
|
2968
|
-
const responseMetadata =
|
|
2969
|
-
|
|
2968
|
+
const responseMetadata = _chunkZS2WHWWLjs.recordField.call(void 0,
|
|
2969
|
+
_chunkZS2WHWWLjs.recordField.call(void 0, rawResponse, "_metadata"),
|
|
2970
2970
|
"tool"
|
|
2971
2971
|
);
|
|
2972
2972
|
const listOutputPaths = responseMetadata.listOutputPaths;
|
|
@@ -2978,11 +2978,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2978
2978
|
await readMetadata()
|
|
2979
2979
|
);
|
|
2980
2980
|
}
|
|
2981
|
-
if (
|
|
2981
|
+
if (_chunkZS2WHWWLjs.isRecord.call(void 0, rawResponse)) {
|
|
2982
2982
|
const { _metadata, ...execution } = rawResponse;
|
|
2983
2983
|
rawResponse = execution;
|
|
2984
2984
|
}
|
|
2985
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
2985
|
+
const { listConversion, summary, baseEnvelope } = await _chunkCKTRQSRAjs.runToolExecuteStage.call(void 0,
|
|
2986
2986
|
"result formatting",
|
|
2987
2987
|
async () => {
|
|
2988
2988
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -3017,9 +3017,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3017
3017
|
}
|
|
3018
3018
|
skillsSyncAttempted = true;
|
|
3019
3019
|
try {
|
|
3020
|
-
await
|
|
3020
|
+
await _chunkCKTRQSRAjs.runToolExecuteStage.call(void 0,
|
|
3021
3021
|
"agent skills sync",
|
|
3022
|
-
() =>
|
|
3022
|
+
() => _chunkNRBCETWLjs.syncSdkSkillsIfNeeded.call(void 0, _chunkTFEGJEYOjs.resolveConfig.call(void 0, ).baseUrl, {
|
|
3023
3023
|
update: deliveredCompatibilityResponse.skills,
|
|
3024
3024
|
mode: "detached"
|
|
3025
3025
|
})
|
|
@@ -3030,15 +3030,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3030
3030
|
);
|
|
3031
3031
|
}
|
|
3032
3032
|
};
|
|
3033
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
3033
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkS5LUY3KJjs.printCommandEnvelope.call(void 0, envelope, {
|
|
3034
3034
|
...options2,
|
|
3035
3035
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
3036
3036
|
});
|
|
3037
3037
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
3038
3038
|
await syncSkillsForDeliveredOutput();
|
|
3039
|
-
|
|
3039
|
+
_chunkS5LUY3KJjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
3040
3040
|
};
|
|
3041
|
-
const delivered = await
|
|
3041
|
+
const delivered = await _chunkCKTRQSRAjs.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
3042
3042
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
3043
3043
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
3044
3044
|
return true;
|
|
@@ -3051,7 +3051,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3051
3051
|
await printDeliveredJsonEnvelope({
|
|
3052
3052
|
...baseEnvelope,
|
|
3053
3053
|
local: {
|
|
3054
|
-
...
|
|
3054
|
+
..._chunkZS2WHWWLjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
|
|
3055
3055
|
payload_file: jsonPath
|
|
3056
3056
|
}
|
|
3057
3057
|
});
|
|
@@ -3067,7 +3067,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3067
3067
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3068
3068
|
);
|
|
3069
3069
|
if (wantsJson) {
|
|
3070
|
-
|
|
3070
|
+
_chunkS5LUY3KJjs.printJsonError.call(void 0, error);
|
|
3071
3071
|
} else {
|
|
3072
3072
|
console.error(error.message);
|
|
3073
3073
|
}
|
|
@@ -3162,13 +3162,13 @@ inspect: ${inspection.inspect}
|
|
|
3162
3162
|
return true;
|
|
3163
3163
|
});
|
|
3164
3164
|
if (delivered) {
|
|
3165
|
-
await
|
|
3165
|
+
await _chunkCKTRQSRAjs.runToolExecuteStage.call(void 0,
|
|
3166
3166
|
"acknowledge delivery",
|
|
3167
3167
|
() => recovery.acknowledgeDelivery()
|
|
3168
3168
|
);
|
|
3169
3169
|
}
|
|
3170
3170
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3171
|
-
|
|
3171
|
+
_chunkNRBCETWLjs.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3172
3172
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _58 => _58.auto_update, 'optionalAccess', _59 => _59.should_auto_update]) === true
|
|
3173
3173
|
});
|
|
3174
3174
|
}
|