deepline 0.3.491 → 0.3.493
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 +11 -5
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +6 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/verdict.ts +25 -9
- 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 +54 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +5 -4
- package/dist/bundling-sources/shared_libs/play-runtime/crustdata-company-identify-batching.ts +162 -0
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-reaper.ts +19 -3
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +5 -3
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-batching-registry.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/receipt-sql.ts +17 -23
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-modal-fallback.ts +28 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +293 -110
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-placement-policy.ts +75 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +20 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +412 -59
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +38 -10
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +19 -11
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-operation.ts +165 -12
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-state-machine.ts +358 -0
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +104 -2
- package/dist/bundling-sources/shared_libs/product-notifications/configuration-draft.ts +7 -2
- package/dist/bundling-sources/shared_libs/product-notifications/configuration.ts +4 -0
- package/dist/bundling-sources/shared_libs/product-notifications/content.ts +13 -0
- package/dist/bundling-sources/shared_libs/product-notifications/email.ts +49 -10
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +22 -0
- package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +6 -1
- package/dist/cli/{auth-FXAC472Y.mjs → auth-3NAY3AST.mjs} +5 -5
- package/dist/cli/auth-KYQLDI6V.js +43 -0
- package/dist/cli/{billing-PDOA3KZ3.js → billing-FSB4BBBO.js} +80 -80
- package/dist/cli/{billing-UM4LE33K.mjs → billing-SBWQCC7B.mjs} +7 -7
- package/dist/cli/{chunk-HSJK6EMU.mjs → chunk-2BRTYIAH.mjs} +23 -9
- package/dist/cli/{chunk-B2TXKEED.js → chunk-2H4OFVR5.js} +5 -5
- package/dist/cli/{chunk-BCKIBVEJ.js → chunk-2I7VN65H.js} +10 -10
- package/dist/cli/{chunk-LMG7O6XJ.mjs → chunk-2IHGVAGT.mjs} +2 -2
- package/dist/cli/{chunk-5KMGKG4B.js → chunk-2NGIBJM2.js} +8 -8
- package/dist/cli/{chunk-2MW6TGNZ.mjs → chunk-3QGUWB6E.mjs} +4 -4
- package/dist/cli/{chunk-ORKLMANE.mjs → chunk-4IJFQV3O.mjs} +1 -1
- package/dist/cli/{chunk-PIPEPCRL.mjs → chunk-4NIGNT7X.mjs} +1 -1
- package/dist/cli/{chunk-H6UIS36S.mjs → chunk-5DIZ2G74.mjs} +2 -2
- package/dist/cli/{chunk-TKLDKIJU.mjs → chunk-5JPKRDFC.mjs} +7 -5
- package/dist/cli/{chunk-FTXIJTV2.mjs → chunk-5WOPBX3H.mjs} +1 -1
- package/dist/cli/{chunk-KGJVDR4Q.mjs → chunk-67ZG7XZV.mjs} +3 -3
- package/dist/cli/{chunk-DUFRH43S.js → chunk-7HABWOMB.js} +261 -261
- package/dist/cli/{chunk-MN6DCV63.js → chunk-AGTXL6LZ.js} +5 -5
- package/dist/cli/{chunk-Q7G7CU4W.js → chunk-AWMCZAUR.js} +3 -3
- package/dist/cli/{chunk-HHTVRICE.js → chunk-C2MRDPA5.js} +17 -17
- package/dist/cli/{chunk-ONONSV2Q.mjs → chunk-DVQHG6AM.mjs} +1 -0
- package/dist/cli/{chunk-O3K22ZC7.js → chunk-DWJ4RXSA.js} +34 -11
- package/dist/cli/{chunk-MAM6ZOVS.mjs → chunk-DYP27IWC.mjs} +99 -24
- package/dist/cli/{chunk-NUOKAKZW.mjs → chunk-E5ILCMKQ.mjs} +1 -1
- package/dist/cli/{chunk-OLHWZM4A.mjs → chunk-EBAS3UT2.mjs} +6 -6
- package/dist/cli/{chunk-74H5OTRM.js → chunk-EFO5GVYS.js} +1 -1
- package/dist/cli/{chunk-X7YOVJBC.js → chunk-EYG336YV.js} +132 -57
- package/dist/cli/{chunk-YV4DP6KQ.mjs → chunk-GSC35TPZ.mjs} +2 -2
- package/dist/cli/{chunk-EPD7NSDJ.mjs → chunk-HLM2UFQ5.mjs} +13 -5
- package/dist/cli/{chunk-IG3GSBBE.js → chunk-HTUSTPP4.js} +32 -32
- package/dist/cli/{chunk-CFPFTS3A.mjs → chunk-IJJ6D5WL.mjs} +12 -12
- package/dist/cli/{chunk-TH7JLR5D.js → chunk-IJOHWGPF.js} +6 -6
- package/dist/cli/{chunk-RFSXXDH7.js → chunk-IOBPR2VO.js} +17 -17
- package/dist/cli/{chunk-HNG2U3IG.js → chunk-IOMEJKGK.js} +2 -2
- package/dist/cli/{chunk-A7ZMG2QZ.mjs → chunk-IRDYBMA7.mjs} +34 -11
- package/dist/cli/{chunk-ZEZ3CZ3X.js → chunk-JO2JZUBR.js} +3 -3
- package/dist/cli/{chunk-4IP5MLWU.js → chunk-JO5FFSR7.js} +6 -1
- package/dist/cli/{chunk-SJOHQ2WW.js → chunk-KCDZWS2B.js} +56 -56
- package/dist/cli/{chunk-CGDUFVNE.mjs → chunk-KGDDQMI7.mjs} +2 -2
- package/dist/cli/{chunk-OYJTLEB4.mjs → chunk-KKSKYZO4.mjs} +1 -1
- package/dist/cli/{chunk-TMAS3WH3.js → chunk-LGTZYI5B.js} +21 -21
- package/dist/cli/{chunk-SUMKWA53.js → chunk-MLEUOTEQ.js} +73 -59
- package/dist/cli/{chunk-3WRWPNHE.mjs → chunk-NALJJTPS.mjs} +5 -5
- package/dist/cli/{chunk-27MRSV6O.js → chunk-NPNAEPY4.js} +26 -26
- package/dist/cli/{chunk-AEKJZJ4R.js → chunk-NWIDPT7H.js} +4 -4
- package/dist/cli/{chunk-AUQQVDAB.js → chunk-PKV5CD3W.js} +1 -0
- package/dist/cli/{chunk-3FMU6F6E.js → chunk-QTPS5RLG.js} +15 -15
- package/dist/cli/{chunk-4OLXMJ2L.js → chunk-RLX5ZFNX.js} +8 -6
- package/dist/cli/{chunk-DEJIN4DF.mjs → chunk-SAW3FBCA.mjs} +5 -0
- package/dist/cli/{chunk-S4CYM4EC.mjs → chunk-SXD2EYAH.mjs} +6 -6
- package/dist/cli/{chunk-YNWET57Z.js → chunk-TIFRRLZT.js} +7 -7
- package/dist/cli/{chunk-6PMM7VJN.mjs → chunk-TNQOR6XQ.mjs} +1 -1
- package/dist/cli/{chunk-6UARNRXT.js → chunk-UCMY2SO2.js} +23 -15
- package/dist/cli/{chunk-X75ONMDJ.mjs → chunk-VFHIYWMC.mjs} +5 -5
- package/dist/cli/{chunk-ZX2FXZJN.js → chunk-WCZFCOMZ.js} +7 -7
- package/dist/cli/{chunk-IIO7UOVW.mjs → chunk-WTFI7BVH.mjs} +3 -3
- package/dist/cli/{chunk-I64PYCTB.js → chunk-XLE7KXE7.js} +2 -2
- package/dist/cli/{chunk-CRBBGKRH.js → chunk-XQX476QK.js} +14 -14
- package/dist/cli/{chunk-WCWVXN3R.mjs → chunk-Y3NN2UAF.mjs} +2 -2
- package/dist/cli/{chunk-3K4IAV7I.mjs → chunk-ZQH4TXM2.mjs} +2 -2
- package/dist/cli/{chunk-VC3SH4QW.mjs → chunk-ZVW7EWTC.mjs} +7 -7
- package/dist/cli/{chunk-QBOE5LEH.mjs → chunk-ZVXB7OU7.mjs} +1 -1
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-IGPAPAES.js → csv-DKYZE2KM.js} +13 -13
- package/dist/cli/{csv-RNMQHECI.mjs → csv-XR22YQXT.mjs} +4 -4
- package/dist/cli/{db-CKMVVGXJ.mjs → db-EOKG36YN.mjs} +7 -7
- package/dist/cli/{db-32OXM3TO.js → db-RNYRTCMV.js} +28 -28
- package/dist/cli/describe-ICFXOQBW.mjs +50 -0
- package/dist/cli/describe-RS75I33X.js +50 -0
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-S4M4JMCU.mjs → executions-3RAOACNS.mjs} +7 -7
- package/dist/cli/{executions-PCZS7B2M.js → executions-OBWPSWH7.js} +9 -9
- package/dist/cli/{feedback-FGUJVCBS.mjs → feedback-6EQRVBKF.mjs} +4 -4
- package/dist/cli/{feedback-6EGKPZ3U.js → feedback-6GPEUBLF.js} +8 -8
- package/dist/cli/getting-started.d.mts +12 -10
- package/dist/cli/getting-started.d.ts +12 -10
- package/dist/cli/getting-started.js +4 -2
- package/dist/cli/getting-started.mjs +3 -1
- package/dist/cli/{git-LR4ARG5H.mjs → git-CVQ24DTR.mjs} +5 -5
- package/dist/cli/git-DEFE4SSB.js +25 -0
- package/dist/cli/index.js +143 -143
- package/dist/cli/index.mjs +43 -43
- package/dist/cli/{legacy-noops-S37PJ7OJ.mjs → legacy-noops-QULJZYNH.mjs} +5 -5
- package/dist/cli/{legacy-noops-VX4JEQR6.js → legacy-noops-XPOATG5V.js} +8 -8
- package/dist/cli/{monitors-H3AX6CZG.mjs → monitors-AFT5YJPZ.mjs} +49 -9
- package/dist/cli/{monitors-ADASJI72.js → monitors-OJ4CMREE.js} +169 -129
- package/dist/cli/{org-ZRJ3C56J.js → org-RKT52CSL.js} +73 -73
- package/dist/cli/{org-D3F5LUDW.mjs → org-WHKNXANG.mjs} +7 -7
- package/dist/cli/{pages-PSHU366M.mjs → pages-EEAQFGVD.mjs} +7 -7
- package/dist/cli/{pages-5TKO3644.js → pages-SOE3R667.js} +18 -18
- package/dist/cli/{play-AUDDK7XB.mjs → play-LXFWHUBP.mjs} +147 -52
- package/dist/cli/{play-VDAETQDI.js → play-OTJJ4E4T.js} +661 -566
- package/dist/cli/{providers-IURPWRWD.js → providers-RU4HIAT3.js} +10 -10
- package/dist/cli/{providers-X7YMZSKQ.mjs → providers-U3CPKTMM.mjs} +7 -7
- package/dist/cli/{quickstart-6AGWVFNX.mjs → quickstart-75AO2AJC.mjs} +5 -5
- package/dist/cli/{quickstart-Y6GFXLDV.js → quickstart-N72IVA2Y.js} +13 -13
- package/dist/cli/{run-TG7J45NS.mjs → run-IGWFL6WH.mjs} +29 -28
- package/dist/cli/{run-TQFGOXNT.js → run-MMYES3IW.js} +44 -43
- package/dist/cli/search-EQURI7SZ.js +32 -0
- package/dist/cli/{search-3G4J2GC6.mjs → search-FIYESBLZ.mjs} +8 -8
- package/dist/cli/{search-output-NPZICK5C.js → search-output-2FXN4ZWD.js} +9 -6
- package/dist/cli/{search-output-ZGNHDCLL.mjs → search-output-3I5KSW36.mjs} +7 -4
- package/dist/cli/{secrets-KTTHT4ZG.js → secrets-HCZQ6JNP.js} +16 -16
- package/dist/cli/{secrets-EAWJBRUD.mjs → secrets-O7IUQ3VT.mjs} +7 -7
- package/dist/cli/{sessions-S4YVBPAW.js → sessions-5AYTT4IW.js} +6 -6
- package/dist/cli/{sessions-D4Q3LCEQ.mjs → sessions-KY7A3EZO.mjs} +5 -5
- package/dist/cli/{settings-BAK3VOWW.js → settings-P4VFYWJK.js} +80 -80
- package/dist/cli/{settings-JUORW6NL.mjs → settings-WSMRR2GS.mjs} +13 -13
- package/dist/cli/{setup-NJPHTW32.js → setup-J7CA3EJL.js} +57 -57
- package/dist/cli/{setup-AXFGCXJE.mjs → setup-YTVKVQC7.mjs} +13 -13
- package/dist/cli/skills-KKPEGLAR.js +36 -0
- package/dist/cli/{skills-SKJVDJEF.mjs → skills-W5WY764N.mjs} +10 -10
- package/dist/cli/tools-65Y4QTW6.js +57 -0
- package/dist/cli/{tools-63THJVJZ.mjs → tools-YECI6N3N.mjs} +20 -20
- package/dist/cli/{update-KSID5F74.mjs → update-BIFBIEII.mjs} +10 -10
- package/dist/cli/update-WDG7VFOW.js +34 -0
- package/dist/cli/{workflow-BLSMWBKW.js → workflow-D2TUFFH6.js} +18 -18
- package/dist/cli/{workflow-C4B54X2Z.mjs → workflow-XZVDNARC.mjs} +8 -8
- package/dist/{client-CQgGFxAH.d.ts → client-BDB_VbE4.d.ts} +1 -1
- package/dist/{client-B4R1scm2.d.mts → client-CNzJ1LTF.d.mts} +1 -1
- package/dist/{client-core-DMvHWjub.d.mts → client-core-CSv3DlPD.d.mts} +76 -5
- package/dist/{client-core-BUNjKBKq.d.ts → client-core-xEa9x3pl.d.ts} +76 -5
- 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 +115 -114
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/plays/run-request.js +2 -2
- package/dist/plays/run-request.mjs +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/auth-QIDL3YCW.js +0 -43
- package/dist/cli/describe-67GMIEIO.js +0 -50
- package/dist/cli/describe-QR7I3VOF.mjs +0 -50
- package/dist/cli/git-PIH5Z5LN.js +0 -25
- package/dist/cli/search-VC43NUY7.js +0 -32
- package/dist/cli/skills-4NQZISNK.js +0 -36
- package/dist/cli/tools-BAHK33FQ.js +0 -57
- package/dist/cli/update-EMIGRGJ7.js +0 -34
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkUCMY2SO2js = require('./chunk-UCMY2SO2.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkWCZFCOMZjs = require('./chunk-WCZFCOMZ.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -25,10 +25,10 @@ var _chunkZX2FXZJNjs = require('./chunk-ZX2FXZJN.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkTIFRRLZTjs = require('./chunk-TIFRRLZT.js');
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunkJO5FFSR7js = require('./chunk-JO5FFSR7.js');
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
@@ -48,10 +48,10 @@ var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
|
|
|
48
48
|
var _chunkHGFFYVXNjs = require('./chunk-HGFFYVXN.js');
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
var
|
|
51
|
+
var _chunk2H4OFVR5js = require('./chunk-2H4OFVR5.js');
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
var
|
|
54
|
+
var _chunkHTUSTPP4js = require('./chunk-HTUSTPP4.js');
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
|
|
@@ -61,18 +61,18 @@ var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
var
|
|
64
|
+
var _chunkLGTZYI5Bjs = require('./chunk-LGTZYI5B.js');
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
var
|
|
69
|
+
var _chunkIOMEJKGKjs = require('./chunk-IOMEJKGK.js');
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
var
|
|
75
|
+
var _chunkKCDZWS2Bjs = require('./chunk-KCDZWS2B.js');
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
@@ -80,12 +80,12 @@ var _chunkSJOHQ2WWjs = require('./chunk-SJOHQ2WW.js');
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
var
|
|
83
|
+
var _chunk2I7VN65Hjs = require('./chunk-2I7VN65H.js');
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
var
|
|
88
|
+
var _chunkJO2JZUBRjs = require('./chunk-JO2JZUBR.js');
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
@@ -191,10 +191,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
191
191
|
}
|
|
192
192
|
};
|
|
193
193
|
function pendingToolExecutionPath(input) {
|
|
194
|
-
const config =
|
|
194
|
+
const config = _chunkJO2JZUBRjs.resolveConfig.call(void 0, );
|
|
195
195
|
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");
|
|
196
196
|
return _path.join.call(void 0,
|
|
197
|
-
|
|
197
|
+
_chunkJO2JZUBRjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
198
198
|
`${PENDING_PREFIX}${fingerprint}.json`
|
|
199
199
|
);
|
|
200
200
|
}
|
|
@@ -346,13 +346,13 @@ var TOOL_COMMAND_TEMPLATES = {
|
|
|
346
346
|
execute: "deepline run <toolId> --input '{...}'"
|
|
347
347
|
};
|
|
348
348
|
function toListedTool(tool) {
|
|
349
|
-
if (
|
|
349
|
+
if (_chunkTIFRRLZTjs.isPlayLikeTool.call(void 0, tool)) {
|
|
350
350
|
return {
|
|
351
351
|
...tool,
|
|
352
352
|
description: listedToolDescription(tool),
|
|
353
353
|
id: tool.toolId,
|
|
354
354
|
type: "play",
|
|
355
|
-
executeCommand:
|
|
355
|
+
executeCommand: _chunkTIFRRLZTjs.playRunCommandForTool.call(void 0, tool, tool.toolId)
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
358
|
return {
|
|
@@ -434,16 +434,16 @@ function firstSentence(text) {
|
|
|
434
434
|
return (match ? match[0] : clean).trim();
|
|
435
435
|
}
|
|
436
436
|
function requiredInputIds(tool) {
|
|
437
|
-
const inputSchema =
|
|
437
|
+
const inputSchema = _chunkTIFRRLZTjs.recordField.call(void 0,
|
|
438
438
|
tool,
|
|
439
439
|
"inputSchema",
|
|
440
440
|
"input_schema"
|
|
441
441
|
);
|
|
442
|
-
return
|
|
442
|
+
return _chunkTIFRRLZTjs.toolInputFieldsForDisplay.call(void 0, inputSchema).filter((field) => field.required === true).map((field) => String(_nullishCoalesce(field.name, () => ( "")))).filter(Boolean);
|
|
443
443
|
}
|
|
444
444
|
function notConnectedSuffix(tool) {
|
|
445
445
|
const record = tool;
|
|
446
|
-
const status =
|
|
446
|
+
const status = _chunkTIFRRLZTjs.stringField.call(void 0, record, "credentialStatus", "credential_status");
|
|
447
447
|
const connected = record.connected;
|
|
448
448
|
const message = toolConnectionStatusMessage({
|
|
449
449
|
connected: connected === false ? false : void 0,
|
|
@@ -452,18 +452,18 @@ function notConnectedSuffix(tool) {
|
|
|
452
452
|
return message ? ` - \u26A0 ${message}` : "";
|
|
453
453
|
}
|
|
454
454
|
function shortPricingHint(tool) {
|
|
455
|
-
const pricing =
|
|
455
|
+
const pricing = _chunkTIFRRLZTjs.recordField.call(void 0,
|
|
456
456
|
tool,
|
|
457
457
|
"pricing"
|
|
458
458
|
);
|
|
459
459
|
const credits = numberField(pricing, "creditsPerUnit", "credits_per_unit");
|
|
460
|
-
const unit =
|
|
460
|
+
const unit = _chunkTIFRRLZTjs.stringField.call(void 0, pricing, "unit");
|
|
461
461
|
if (credits !== null) {
|
|
462
462
|
return `${formatDecimal(credits)} cr/${unit || "unit"}`;
|
|
463
463
|
}
|
|
464
|
-
const summary =
|
|
464
|
+
const summary = _chunkTIFRRLZTjs.stringField.call(void 0, pricing, "summary");
|
|
465
465
|
if (summary) return summary;
|
|
466
|
-
const displayText =
|
|
466
|
+
const displayText = _chunkTIFRRLZTjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
467
467
|
return displayText || null;
|
|
468
468
|
}
|
|
469
469
|
function aggregateCategorySummaries(tools) {
|
|
@@ -507,13 +507,13 @@ function categoryEnumerationRender(summaries) {
|
|
|
507
507
|
};
|
|
508
508
|
}
|
|
509
509
|
async function listToolCategories(emitJson, compact) {
|
|
510
|
-
const client = new (0,
|
|
510
|
+
const client = new (0, _chunk2H4OFVR5js.DeeplineClient)();
|
|
511
511
|
if (!emitJson) {
|
|
512
512
|
const summaries2 = (await client.listToolCategories()).map((category) => ({
|
|
513
513
|
...category,
|
|
514
514
|
description: describeToolCategory(category.name)
|
|
515
515
|
}));
|
|
516
|
-
|
|
516
|
+
_chunk2I7VN65Hjs.printCommandEnvelope.call(void 0,
|
|
517
517
|
{ categories: summaries2, render: categoryEnumerationRender(summaries2) },
|
|
518
518
|
{ json: false }
|
|
519
519
|
);
|
|
@@ -523,7 +523,7 @@ async function listToolCategories(emitJson, compact) {
|
|
|
523
523
|
const items = rawTools.map(toListedTool);
|
|
524
524
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
525
525
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
526
|
-
|
|
526
|
+
_chunk2I7VN65Hjs.printCommandEnvelope.call(void 0,
|
|
527
527
|
{
|
|
528
528
|
tools: outputItems,
|
|
529
529
|
count: outputItems.length,
|
|
@@ -542,7 +542,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
542
542
|
const known = summaries.map((item) => item.name);
|
|
543
543
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
544
544
|
if (emitJson) {
|
|
545
|
-
|
|
545
|
+
_chunk2I7VN65Hjs.printJson.call(void 0, {
|
|
546
546
|
ok: false,
|
|
547
547
|
exitCode: 4,
|
|
548
548
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -556,13 +556,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
556
556
|
const render = categoryEnumerationRender(summaries);
|
|
557
557
|
console.error(message);
|
|
558
558
|
console.error("");
|
|
559
|
-
console.error(
|
|
559
|
+
console.error(_chunk2I7VN65Hjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
560
560
|
console.error("");
|
|
561
561
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
562
562
|
return 4;
|
|
563
563
|
}
|
|
564
564
|
async function listToolsInCategory(category, emitJson) {
|
|
565
|
-
const client = new (0,
|
|
565
|
+
const client = new (0, _chunk2H4OFVR5js.DeeplineClient)();
|
|
566
566
|
const { tools: rawTools, categories } = await client.listToolsInCategory(category);
|
|
567
567
|
const summaries = categories.map((item) => ({
|
|
568
568
|
...item,
|
|
@@ -598,7 +598,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
598
598
|
}
|
|
599
599
|
]
|
|
600
600
|
};
|
|
601
|
-
|
|
601
|
+
_chunk2I7VN65Hjs.printCommandEnvelope.call(void 0,
|
|
602
602
|
{
|
|
603
603
|
category,
|
|
604
604
|
total: rows.length,
|
|
@@ -611,7 +611,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
611
611
|
return 0;
|
|
612
612
|
}
|
|
613
613
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
614
|
-
const client = new (0,
|
|
614
|
+
const client = new (0, _chunk2H4OFVR5js.DeeplineClient)();
|
|
615
615
|
const items = (await client.listTools({
|
|
616
616
|
categories: requestedCategories.join(","),
|
|
617
617
|
compact
|
|
@@ -640,7 +640,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
640
640
|
]
|
|
641
641
|
};
|
|
642
642
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
643
|
-
|
|
643
|
+
_chunk2I7VN65Hjs.printCommandEnvelope.call(void 0,
|
|
644
644
|
{
|
|
645
645
|
tools: outputItems,
|
|
646
646
|
count: outputItems.length,
|
|
@@ -659,13 +659,13 @@ async function listTools(category, options = {}) {
|
|
|
659
659
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]), () => ( ""));
|
|
660
660
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
661
661
|
const compact = options.compact !== false;
|
|
662
|
-
const emitJson = options.json === true ||
|
|
662
|
+
const emitJson = options.json === true || _chunk2I7VN65Hjs.shouldEmitJson.call(void 0, );
|
|
663
663
|
if (positional && flagCategories.length > 0) {
|
|
664
664
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
665
665
|
if (!flagIsSameSingle) {
|
|
666
666
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
667
667
|
if (emitJson) {
|
|
668
|
-
|
|
668
|
+
_chunk2I7VN65Hjs.printJson.call(void 0, {
|
|
669
669
|
ok: false,
|
|
670
670
|
exitCode: 2,
|
|
671
671
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -692,7 +692,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
692
692
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
693
693
|
return 1;
|
|
694
694
|
}
|
|
695
|
-
const client = new (0,
|
|
695
|
+
const client = new (0, _chunk2H4OFVR5js.DeeplineClient)();
|
|
696
696
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
697
697
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
698
698
|
const jsonOutput = options.json === true;
|
|
@@ -716,7 +716,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
716
716
|
query,
|
|
717
717
|
mode
|
|
718
718
|
}) : null;
|
|
719
|
-
|
|
719
|
+
_chunk2I7VN65Hjs.printCommandEnvelope.call(void 0,
|
|
720
720
|
{
|
|
721
721
|
tools: outputTools,
|
|
722
722
|
count: outputTools.length,
|
|
@@ -734,7 +734,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
734
734
|
} : {},
|
|
735
735
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
736
736
|
},
|
|
737
|
-
{ json: options.json ||
|
|
737
|
+
{ json: options.json || _chunk2I7VN65Hjs.shouldEmitJson.call(void 0, ) }
|
|
738
738
|
);
|
|
739
739
|
return 0;
|
|
740
740
|
}
|
|
@@ -789,8 +789,8 @@ function printPlayAliasToolError(toolId, play) {
|
|
|
789
789
|
console.error(playAliasToolErrorMessage(toolId, play));
|
|
790
790
|
}
|
|
791
791
|
function playLikeToolExecuteErrorMessage(toolId, tool) {
|
|
792
|
-
const playReference = tool ?
|
|
793
|
-
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${
|
|
792
|
+
const playReference = tool ? _chunkTIFRRLZTjs.playReferenceForTool.call(void 0, tool) : null;
|
|
793
|
+
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunkTIFRRLZTjs.playSearchCommandForToolId.call(void 0, toolId)}`;
|
|
794
794
|
return [
|
|
795
795
|
`${toolId} is a workflow/play entry, not an atomic provider tool.`,
|
|
796
796
|
nextStep,
|
|
@@ -845,7 +845,7 @@ Output:
|
|
|
845
845
|
if (options.preset !== void 0 && (options.scopes !== void 0 || options.optionalScopes !== void 0))
|
|
846
846
|
throw new Error("Use --preset or individual scopes, not both.");
|
|
847
847
|
const splitScopes = (value) => value.split(",").map((scope) => scope.trim()).filter(Boolean);
|
|
848
|
-
const result2 = await new (0,
|
|
848
|
+
const result2 = await new (0, _chunk2H4OFVR5js.DeeplineClient)().startIntegrationOAuth(
|
|
849
849
|
provider,
|
|
850
850
|
{
|
|
851
851
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
@@ -857,7 +857,7 @@ Output:
|
|
|
857
857
|
throw new Error(
|
|
858
858
|
"The API did not return an OAuth authorization URL."
|
|
859
859
|
);
|
|
860
|
-
if (
|
|
860
|
+
if (_chunk2I7VN65Hjs.shouldEmitJson.call(void 0, options.json))
|
|
861
861
|
console.log(
|
|
862
862
|
JSON.stringify({ provider, redirect_url: result2.redirect_url })
|
|
863
863
|
);
|
|
@@ -883,7 +883,7 @@ Output:
|
|
|
883
883
|
"--credentials-file must contain a nonempty JSON object of string credential values."
|
|
884
884
|
);
|
|
885
885
|
}
|
|
886
|
-
const result = await new (0,
|
|
886
|
+
const result = await new (0, _chunk2H4OFVR5js.DeeplineClient)().setIntegrationCredentials(
|
|
887
887
|
provider,
|
|
888
888
|
credentials
|
|
889
889
|
);
|
|
@@ -893,7 +893,7 @@ Output:
|
|
|
893
893
|
);
|
|
894
894
|
}
|
|
895
895
|
const confirmation = { provider, credential_saved: true };
|
|
896
|
-
if (
|
|
896
|
+
if (_chunk2I7VN65Hjs.shouldEmitJson.call(void 0, options.json))
|
|
897
897
|
console.log(JSON.stringify(confirmation));
|
|
898
898
|
else
|
|
899
899
|
console.log(
|
|
@@ -933,7 +933,7 @@ Examples:
|
|
|
933
933
|
json: Boolean(options.json)
|
|
934
934
|
});
|
|
935
935
|
});
|
|
936
|
-
|
|
936
|
+
_chunkWCZFCOMZjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
937
937
|
tools.command("grep <query>").description(
|
|
938
938
|
"Regex grep over tool ids, descriptions, categories, and input fields."
|
|
939
939
|
).addHelpText(
|
|
@@ -968,7 +968,7 @@ Examples:
|
|
|
968
968
|
});
|
|
969
969
|
const addToolMetadataCommand = (command) => {
|
|
970
970
|
let compatibilityMetadata;
|
|
971
|
-
|
|
971
|
+
_chunkLGTZYI5Bjs.registerCompatibilityCatalog.call(void 0, command, () => ({
|
|
972
972
|
toolId: command.args[0],
|
|
973
973
|
acceptMetadata: (metadata) => {
|
|
974
974
|
compatibilityMetadata = metadata;
|
|
@@ -1038,7 +1038,7 @@ Examples:
|
|
|
1038
1038
|
process.exitCode = await narrowView();
|
|
1039
1039
|
return;
|
|
1040
1040
|
}
|
|
1041
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
1041
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-RS75I33X.js")));
|
|
1042
1042
|
process.exitCode = await describeAnything(
|
|
1043
1043
|
toolId,
|
|
1044
1044
|
{
|
|
@@ -1053,7 +1053,7 @@ Examples:
|
|
|
1053
1053
|
});
|
|
1054
1054
|
};
|
|
1055
1055
|
addToolMetadataCommand(
|
|
1056
|
-
|
|
1056
|
+
_chunkUCMY2SO2js.addDescribeOptions.call(void 0,
|
|
1057
1057
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
1058
1058
|
{ json: false }
|
|
1059
1059
|
)
|
|
@@ -1122,7 +1122,7 @@ Examples:
|
|
|
1122
1122
|
options,
|
|
1123
1123
|
void 0,
|
|
1124
1124
|
true,
|
|
1125
|
-
|
|
1125
|
+
_chunkIOMEJKGKjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
1126
1126
|
);
|
|
1127
1127
|
}
|
|
1128
1128
|
);
|
|
@@ -1130,13 +1130,13 @@ Examples:
|
|
|
1130
1130
|
function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
1131
1131
|
let metadata;
|
|
1132
1132
|
const startedAt = performance.now();
|
|
1133
|
-
const baseUrl =
|
|
1134
|
-
|
|
1135
|
-
const result =
|
|
1133
|
+
const baseUrl = _chunkJO2JZUBRjs.resolveConfig.call(void 0, ).baseUrl;
|
|
1134
|
+
_chunkIOMEJKGKjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1135
|
+
const result = _chunkLGTZYI5Bjs.runToolExecuteStage.call(void 0,
|
|
1136
1136
|
"SDK compatibility",
|
|
1137
|
-
() =>
|
|
1137
|
+
() => _chunkKCDZWS2Bjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1138
1138
|
command: "tools execute",
|
|
1139
|
-
skillsVersion:
|
|
1139
|
+
skillsVersion: _chunkJO2JZUBRjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
1140
1140
|
persistCache: false,
|
|
1141
1141
|
timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
|
|
1142
1142
|
catalog: {
|
|
@@ -1150,7 +1150,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1150
1150
|
})
|
|
1151
1151
|
).then(
|
|
1152
1152
|
(compatibility) => {
|
|
1153
|
-
|
|
1153
|
+
_chunkIOMEJKGKjs.recordCliTrace.call(void 0, {
|
|
1154
1154
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1155
1155
|
ms: performance.now() - startedAt,
|
|
1156
1156
|
ok: compatibility.error === null,
|
|
@@ -1159,7 +1159,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1159
1159
|
return compatibility;
|
|
1160
1160
|
},
|
|
1161
1161
|
(error) => {
|
|
1162
|
-
|
|
1162
|
+
_chunkIOMEJKGKjs.recordCliTrace.call(void 0, {
|
|
1163
1163
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1164
1164
|
ms: performance.now() - startedAt,
|
|
1165
1165
|
ok: false
|
|
@@ -1174,7 +1174,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1174
1174
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1175
1175
|
return 1;
|
|
1176
1176
|
}
|
|
1177
|
-
const client = new (0,
|
|
1177
|
+
const client = new (0, _chunk2H4OFVR5js.DeeplineClient)();
|
|
1178
1178
|
let tool;
|
|
1179
1179
|
try {
|
|
1180
1180
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1228,12 +1228,12 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1228
1228
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1229
1229
|
if (inferenceQuote)
|
|
1230
1230
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1231
|
-
|
|
1231
|
+
_chunk2I7VN65Hjs.printCommandEnvelope.call(void 0,
|
|
1232
1232
|
{
|
|
1233
1233
|
toolId: String(tool.toolId || toolId),
|
|
1234
1234
|
cost: _chunkXK5DMLZEjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1235
1235
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1236
|
-
...
|
|
1236
|
+
..._chunkTIFRRLZTjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunkTIFRRLZTjs.recordField.call(void 0, tool, "pricing") } : {},
|
|
1237
1237
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1238
1238
|
},
|
|
1239
1239
|
{
|
|
@@ -1244,14 +1244,14 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1244
1244
|
);
|
|
1245
1245
|
return 0;
|
|
1246
1246
|
}
|
|
1247
|
-
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !
|
|
1248
|
-
const contract =
|
|
1247
|
+
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunkTIFRRLZTjs.isMonitorTypeTool.call(void 0, tool) && !_chunkTIFRRLZTjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
|
|
1248
|
+
const contract = _chunkTIFRRLZTjs.toolContractJsonForDescribe.call(void 0,
|
|
1249
1249
|
tool,
|
|
1250
1250
|
toolId,
|
|
1251
1251
|
void 0,
|
|
1252
1252
|
seedToolListScript
|
|
1253
1253
|
);
|
|
1254
|
-
|
|
1254
|
+
_chunk2I7VN65Hjs.printCompactJson.call(void 0, {
|
|
1255
1255
|
toolId: contract.toolId,
|
|
1256
1256
|
...options.schemaOnly ? {
|
|
1257
1257
|
inputSchema: contract.inputSchema,
|
|
@@ -1274,8 +1274,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1274
1274
|
return 0;
|
|
1275
1275
|
}
|
|
1276
1276
|
if (options.contractJson) {
|
|
1277
|
-
|
|
1278
|
-
...
|
|
1277
|
+
_chunk2I7VN65Hjs.printCompactJson.call(void 0, {
|
|
1278
|
+
..._chunkTIFRRLZTjs.toolContractJsonForDescribe.call(void 0,
|
|
1279
1279
|
tool,
|
|
1280
1280
|
toolId,
|
|
1281
1281
|
void 0,
|
|
@@ -1288,8 +1288,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
const emitJson = options.json === true;
|
|
1290
1290
|
if (emitJson) {
|
|
1291
|
-
|
|
1292
|
-
...
|
|
1291
|
+
_chunk2I7VN65Hjs.printCompactJson.call(void 0, {
|
|
1292
|
+
..._chunkTIFRRLZTjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
|
|
1293
1293
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1294
1294
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1295
1295
|
});
|
|
@@ -1314,7 +1314,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1314
1314
|
printCompactToolContract(tool, toolId);
|
|
1315
1315
|
if (modelDescription) {
|
|
1316
1316
|
process.stdout.write(`
|
|
1317
|
-
${
|
|
1317
|
+
${_chunkTIFRRLZTjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1318
1318
|
}
|
|
1319
1319
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1320
1320
|
return 0;
|
|
@@ -1322,7 +1322,7 @@ ${_chunkYNWET57Zjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
|
1322
1322
|
printCompactToolContract(tool, toolId);
|
|
1323
1323
|
if (modelDescription) {
|
|
1324
1324
|
process.stdout.write(`
|
|
1325
|
-
${
|
|
1325
|
+
${_chunkTIFRRLZTjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1326
1326
|
}
|
|
1327
1327
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1328
1328
|
return 0;
|
|
@@ -1339,10 +1339,10 @@ function printInferenceQuoteSummary(quote) {
|
|
|
1339
1339
|
for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
|
|
1340
1340
|
}
|
|
1341
1341
|
function printMonitorTypeFilters(tool) {
|
|
1342
|
-
const schema =
|
|
1343
|
-
const properties =
|
|
1342
|
+
const schema = _chunkTIFRRLZTjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
|
|
1343
|
+
const properties = _chunkTIFRRLZTjs.recordField.call(void 0, schema, "properties");
|
|
1344
1344
|
const required = new Set(
|
|
1345
|
-
|
|
1345
|
+
_chunkTIFRRLZTjs.arrayField.call(void 0, schema, "required").filter(
|
|
1346
1346
|
(v) => typeof v === "string"
|
|
1347
1347
|
)
|
|
1348
1348
|
);
|
|
@@ -1353,24 +1353,24 @@ function printMonitorTypeFilters(tool) {
|
|
|
1353
1353
|
}
|
|
1354
1354
|
console.log("Deploy filters (set in the monitor payload):");
|
|
1355
1355
|
for (const name of names) {
|
|
1356
|
-
const field =
|
|
1356
|
+
const field = _chunkTIFRRLZTjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
|
|
1357
1357
|
const star = required.has(name) ? "*" : "";
|
|
1358
|
-
const enumVals =
|
|
1358
|
+
const enumVals = _chunkTIFRRLZTjs.arrayField.call(void 0, field, "enum").filter(
|
|
1359
1359
|
(v) => typeof v === "string"
|
|
1360
1360
|
);
|
|
1361
|
-
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` :
|
|
1362
|
-
const desc =
|
|
1361
|
+
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunkTIFRRLZTjs.stringField.call(void 0, field, "type") || "string";
|
|
1362
|
+
const desc = _chunkTIFRRLZTjs.stringField.call(void 0, field, "description");
|
|
1363
1363
|
console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
1366
|
function printMonitorTypeFilterExamples(tool) {
|
|
1367
|
-
const documentation =
|
|
1368
|
-
const fields =
|
|
1367
|
+
const documentation = _chunkTIFRRLZTjs.recordField.call(void 0, tool, "documentation");
|
|
1368
|
+
const fields = _chunkTIFRRLZTjs.recordField.call(void 0, documentation, "fields");
|
|
1369
1369
|
const examples = Object.entries(fields).flatMap(([name, rawField]) => {
|
|
1370
|
-
const grammar =
|
|
1371
|
-
const example =
|
|
1370
|
+
const grammar = _chunkTIFRRLZTjs.recordField.call(void 0, _chunkTIFRRLZTjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
|
|
1371
|
+
const example = _chunkTIFRRLZTjs.stringField.call(void 0, grammar, "example");
|
|
1372
1372
|
const values = [
|
|
1373
|
-
...
|
|
1373
|
+
..._chunkTIFRRLZTjs.arrayField.call(void 0, grammar, "examples").filter(
|
|
1374
1374
|
(value) => typeof value === "string" && Boolean(value)
|
|
1375
1375
|
),
|
|
1376
1376
|
...example ? [example] : []
|
|
@@ -1385,21 +1385,21 @@ function printMonitorTypeFilterExamples(tool) {
|
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
1387
|
function printMonitorTypeStreams(tool) {
|
|
1388
|
-
const streams =
|
|
1389
|
-
|
|
1388
|
+
const streams = _chunkTIFRRLZTjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
|
|
1389
|
+
_chunkTIFRRLZTjs.isRecord
|
|
1390
1390
|
);
|
|
1391
1391
|
if (!streams.length) return;
|
|
1392
1392
|
console.log("");
|
|
1393
1393
|
console.log("Filter columns (a play's sqlListeners.where, per stream):");
|
|
1394
1394
|
for (const stream of streams) {
|
|
1395
|
-
const name =
|
|
1396
|
-
const cols =
|
|
1395
|
+
const name = _chunkTIFRRLZTjs.stringField.call(void 0, stream, "stream");
|
|
1396
|
+
const cols = _chunkTIFRRLZTjs.arrayField.call(void 0, stream, "columns").filter(_chunkTIFRRLZTjs.isRecord).map((col) => _chunkTIFRRLZTjs.stringField.call(void 0, col, "name")).filter(Boolean);
|
|
1397
1397
|
console.log(`- ${name}: ${cols.join(", ")}`);
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
1400
|
function monitorTypePricingLines(tool) {
|
|
1401
|
-
const pricing =
|
|
1402
|
-
const byType =
|
|
1401
|
+
const pricing = _chunkTIFRRLZTjs.recordField.call(void 0, tool, "pricing");
|
|
1402
|
+
const byType = _chunkTIFRRLZTjs.recordField.call(void 0,
|
|
1403
1403
|
pricing,
|
|
1404
1404
|
"pricing_by_radar_type",
|
|
1405
1405
|
"pricingByRadarType"
|
|
@@ -1410,9 +1410,9 @@ function monitorTypePricingLines(tool) {
|
|
|
1410
1410
|
}
|
|
1411
1411
|
const lines = ["Pricing (Deepline credits per accepted event):"];
|
|
1412
1412
|
for (const key of keys) {
|
|
1413
|
-
const entry =
|
|
1413
|
+
const entry = _chunkTIFRRLZTjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
|
|
1414
1414
|
const credits = numberField(entry, "deepline_credits", "deeplineCredits");
|
|
1415
|
-
const display =
|
|
1415
|
+
const display = _chunkTIFRRLZTjs.stringField.call(void 0, entry, "display");
|
|
1416
1416
|
const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "not listed");
|
|
1417
1417
|
lines.push(`- ${key}: ${shown}`);
|
|
1418
1418
|
}
|
|
@@ -1422,20 +1422,20 @@ function printMonitorTypePricing(tool) {
|
|
|
1422
1422
|
for (const line of monitorTypePricingLines(tool)) console.log(line);
|
|
1423
1423
|
}
|
|
1424
1424
|
function printMonitorTypeDeploy(tool) {
|
|
1425
|
-
const deploy =
|
|
1426
|
-
const toolId =
|
|
1427
|
-
const example =
|
|
1425
|
+
const deploy = _chunkTIFRRLZTjs.recordField.call(void 0, tool, "deploy");
|
|
1426
|
+
const toolId = _chunkTIFRRLZTjs.stringField.call(void 0, tool, "toolId");
|
|
1427
|
+
const example = _chunkTIFRRLZTjs.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
|
|
1428
1428
|
console.log("Deploy (a monitor type is deployed, not executed):");
|
|
1429
1429
|
console.log(` ${example}`);
|
|
1430
1430
|
}
|
|
1431
1431
|
function printMonitorTypeContract(tool, requestedToolId) {
|
|
1432
|
-
const toolId =
|
|
1432
|
+
const toolId = _chunkTIFRRLZTjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
|
|
1433
1433
|
console.log(toolId);
|
|
1434
|
-
const displayName =
|
|
1434
|
+
const displayName = _chunkTIFRRLZTjs.stringField.call(void 0, tool, "displayName");
|
|
1435
1435
|
if (displayName) console.log(`Best for: ${displayName}`);
|
|
1436
|
-
const description =
|
|
1436
|
+
const description = _chunkTIFRRLZTjs.stringField.call(void 0, tool, "description");
|
|
1437
1437
|
if (description) console.log(`Description: ${description}`);
|
|
1438
|
-
const categories =
|
|
1438
|
+
const categories = _chunkTIFRRLZTjs.arrayField.call(void 0, tool, "categories").filter(
|
|
1439
1439
|
(v) => typeof v === "string"
|
|
1440
1440
|
);
|
|
1441
1441
|
if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
|
|
@@ -1455,31 +1455,31 @@ function printMonitorTypeContract(tool, requestedToolId) {
|
|
|
1455
1455
|
console.log(`More: deepline describe ${toolId}`);
|
|
1456
1456
|
}
|
|
1457
1457
|
function toolGuidanceLines(guidance) {
|
|
1458
|
-
const record =
|
|
1459
|
-
const toolGuidance =
|
|
1460
|
-
const providerGuidance =
|
|
1458
|
+
const record = _chunkTIFRRLZTjs.isRecord.call(void 0, guidance) ? guidance : {};
|
|
1459
|
+
const toolGuidance = _chunkTIFRRLZTjs.stringField.call(void 0, record, "tool");
|
|
1460
|
+
const providerGuidance = _chunkTIFRRLZTjs.stringField.call(void 0, record, "provider");
|
|
1461
1461
|
return [
|
|
1462
1462
|
...toolGuidance ? [`- This tool: ${toolGuidance}`] : [],
|
|
1463
1463
|
...providerGuidance ? [`- Provider: ${providerGuidance}`] : []
|
|
1464
1464
|
];
|
|
1465
1465
|
}
|
|
1466
1466
|
function printCompactToolContract(tool, requestedToolId) {
|
|
1467
|
-
if (
|
|
1467
|
+
if (_chunkTIFRRLZTjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1468
1468
|
printMonitorTypeContract(tool, requestedToolId);
|
|
1469
1469
|
return;
|
|
1470
1470
|
}
|
|
1471
|
-
const contract =
|
|
1471
|
+
const contract = _chunkTIFRRLZTjs.toolContractJsonForDescribe.call(void 0,
|
|
1472
1472
|
tool,
|
|
1473
1473
|
requestedToolId,
|
|
1474
1474
|
void 0,
|
|
1475
1475
|
seedToolListScript
|
|
1476
1476
|
);
|
|
1477
|
-
const cost =
|
|
1478
|
-
const getters =
|
|
1477
|
+
const cost = _chunkTIFRRLZTjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
|
|
1478
|
+
const getters = _chunkTIFRRLZTjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1479
1479
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1480
1480
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1481
|
-
const inputFields =
|
|
1482
|
-
|
|
1481
|
+
const inputFields = _chunkTIFRRLZTjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1482
|
+
_chunkTIFRRLZTjs.recordField.call(void 0, contract, "inputSchema")
|
|
1483
1483
|
);
|
|
1484
1484
|
console.log(String(contract.toolId));
|
|
1485
1485
|
if (contract.displayName) console.log(`Best for: ${contract.displayName}`);
|
|
@@ -1496,9 +1496,9 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1496
1496
|
printToolOutputArrayShape(contract);
|
|
1497
1497
|
printToolExecutionHints(contract);
|
|
1498
1498
|
if (contract.deprecated === true) {
|
|
1499
|
-
const deprecation =
|
|
1500
|
-
const message =
|
|
1501
|
-
const replacementToolId =
|
|
1499
|
+
const deprecation = _chunkTIFRRLZTjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
|
|
1500
|
+
const message = _chunkTIFRRLZTjs.stringField.call(void 0, deprecation, "message");
|
|
1501
|
+
const replacementToolId = _chunkTIFRRLZTjs.stringField.call(void 0,
|
|
1502
1502
|
deprecation,
|
|
1503
1503
|
"replacementToolId",
|
|
1504
1504
|
"replacement_tool_id"
|
|
@@ -1521,12 +1521,12 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1521
1521
|
console.log("");
|
|
1522
1522
|
console.log("Inputs:");
|
|
1523
1523
|
for (const field of inputFields) {
|
|
1524
|
-
if (!
|
|
1525
|
-
const name =
|
|
1524
|
+
if (!_chunkTIFRRLZTjs.isRecord.call(void 0, field)) continue;
|
|
1525
|
+
const name = _chunkTIFRRLZTjs.stringField.call(void 0, field, "name");
|
|
1526
1526
|
if (!name) continue;
|
|
1527
1527
|
const required = field.required ? "*" : "";
|
|
1528
|
-
const type =
|
|
1529
|
-
const description =
|
|
1528
|
+
const type = _chunkTIFRRLZTjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1529
|
+
const description = _chunkTIFRRLZTjs.stringField.call(void 0, field, "description");
|
|
1530
1530
|
const enumValues = Array.isArray(field.enum) ? field.enum : [];
|
|
1531
1531
|
const enumSuffix = enumValues.length ? ` enum=${enumValues.map(String).join("|")}` : "";
|
|
1532
1532
|
const itemBoundsSuffix = arrayItemBoundsSuffix(field);
|
|
@@ -1541,8 +1541,8 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1541
1541
|
}
|
|
1542
1542
|
console.log("");
|
|
1543
1543
|
printToolExamplesOnly(tool, requestedToolId);
|
|
1544
|
-
const starterScript =
|
|
1545
|
-
const starterPath =
|
|
1544
|
+
const starterScript = _chunkTIFRRLZTjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
|
|
1545
|
+
const starterPath = _chunkTIFRRLZTjs.stringField.call(void 0, starterScript, "path");
|
|
1546
1546
|
if (starterPath) {
|
|
1547
1547
|
console.log("");
|
|
1548
1548
|
console.log(`Starter script: ${starterPath}`);
|
|
@@ -1553,16 +1553,16 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1553
1553
|
console.log("Getters:");
|
|
1554
1554
|
if (listGetters.length) console.log(listGetterHeading());
|
|
1555
1555
|
for (const entry of listGetters) {
|
|
1556
|
-
if (
|
|
1556
|
+
if (_chunkTIFRRLZTjs.isRecord.call(void 0, entry))
|
|
1557
1557
|
console.log(
|
|
1558
|
-
`- ${
|
|
1558
|
+
`- ${_chunkTIFRRLZTjs.stringField.call(void 0, entry, "name")}: ${_chunkTIFRRLZTjs.playResultExpression.call(void 0, entry)}`
|
|
1559
1559
|
);
|
|
1560
1560
|
}
|
|
1561
1561
|
if (valueGetters.length) console.log("Values:");
|
|
1562
1562
|
for (const entry of valueGetters) {
|
|
1563
|
-
if (
|
|
1563
|
+
if (_chunkTIFRRLZTjs.isRecord.call(void 0, entry))
|
|
1564
1564
|
console.log(
|
|
1565
|
-
`- ${
|
|
1565
|
+
`- ${_chunkTIFRRLZTjs.stringField.call(void 0, entry, "name")}: ${_chunkTIFRRLZTjs.playResultExpression.call(void 0, entry)}`
|
|
1566
1566
|
);
|
|
1567
1567
|
}
|
|
1568
1568
|
}
|
|
@@ -1573,19 +1573,19 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1573
1573
|
console.log(`More: deepline describe ${contract.toolId}`);
|
|
1574
1574
|
}
|
|
1575
1575
|
function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
1576
|
-
if (
|
|
1576
|
+
if (_chunkTIFRRLZTjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1577
1577
|
return monitorTypePricingLines(tool);
|
|
1578
1578
|
}
|
|
1579
1579
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1580
1580
|
const cost = _chunkXK5DMLZEjs.Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1581
|
-
const pricingModel =
|
|
1582
|
-
const billing =
|
|
1583
|
-
const explicitUnit =
|
|
1581
|
+
const pricingModel = _chunkTIFRRLZTjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
|
|
1582
|
+
const billing = _chunkTIFRRLZTjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunkTIFRRLZTjs.stringField.call(void 0, cost, "billingSource") || _chunkTIFRRLZTjs.stringField.call(void 0, cost, "billingMode") || "unknown";
|
|
1583
|
+
const explicitUnit = _chunkTIFRRLZTjs.stringField.call(void 0, cost, "unit");
|
|
1584
1584
|
const unit = explicitUnit || (pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit");
|
|
1585
1585
|
const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
|
|
1586
1586
|
const usd = numberField(cost, "deeplineUsdPerPricingUnit");
|
|
1587
|
-
const displayText =
|
|
1588
|
-
const summary =
|
|
1587
|
+
const displayText = _chunkTIFRRLZTjs.stringField.call(void 0, cost, "displayText");
|
|
1588
|
+
const summary = _chunkTIFRRLZTjs.stringField.call(void 0, cost, "summary");
|
|
1589
1589
|
const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
|
|
1590
1590
|
return [
|
|
1591
1591
|
`${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
|
|
@@ -1602,19 +1602,19 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
|
1602
1602
|
console.log(line);
|
|
1603
1603
|
}
|
|
1604
1604
|
function printToolSchemaOnly(tool, requestedToolId) {
|
|
1605
|
-
if (
|
|
1605
|
+
if (_chunkTIFRRLZTjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1606
1606
|
printMonitorTypeFilters(tool);
|
|
1607
1607
|
printMonitorTypeStreams(tool);
|
|
1608
1608
|
return;
|
|
1609
1609
|
}
|
|
1610
|
-
const contract =
|
|
1610
|
+
const contract = _chunkTIFRRLZTjs.toolContractJsonForDescribe.call(void 0,
|
|
1611
1611
|
tool,
|
|
1612
1612
|
requestedToolId,
|
|
1613
1613
|
void 0,
|
|
1614
1614
|
seedToolListScript
|
|
1615
1615
|
);
|
|
1616
|
-
const inputFields =
|
|
1617
|
-
|
|
1616
|
+
const inputFields = _chunkTIFRRLZTjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1617
|
+
_chunkTIFRRLZTjs.recordField.call(void 0, contract, "inputSchema")
|
|
1618
1618
|
);
|
|
1619
1619
|
console.log(`Schema: ${contract.toolId}`);
|
|
1620
1620
|
if (!inputFields.length) {
|
|
@@ -1641,27 +1641,27 @@ function printToolSchemaOnly(tool, requestedToolId) {
|
|
|
1641
1641
|
}
|
|
1642
1642
|
printToolOutputArrayShape(contract);
|
|
1643
1643
|
const declaredSchema = declaredToolJsonSchema(
|
|
1644
|
-
|
|
1644
|
+
_chunkTIFRRLZTjs.recordField.call(void 0, contract, "inputSchema")
|
|
1645
1645
|
);
|
|
1646
1646
|
if (declaredSchema) {
|
|
1647
1647
|
console.log("Declared input JSON Schema:");
|
|
1648
1648
|
console.log(JSON.stringify(declaredSchema, null, 2));
|
|
1649
1649
|
}
|
|
1650
|
-
if (
|
|
1650
|
+
if (_chunkTIFRRLZTjs.isRecord.call(void 0, contract.responseSchema)) {
|
|
1651
1651
|
console.log("Deepline execution response JSON Schema:");
|
|
1652
1652
|
console.log(JSON.stringify(contract.responseSchema, null, 2));
|
|
1653
1653
|
}
|
|
1654
1654
|
}
|
|
1655
1655
|
function printToolExamplesOnly(tool, requestedToolId) {
|
|
1656
|
-
if (
|
|
1656
|
+
if (_chunkTIFRRLZTjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1657
1657
|
printMonitorTypeDeploy(tool);
|
|
1658
1658
|
return;
|
|
1659
1659
|
}
|
|
1660
|
-
if (
|
|
1660
|
+
if (_chunkTIFRRLZTjs.isPlayLikeTool.call(void 0, tool)) {
|
|
1661
1661
|
printPlayLikeToolUsage(tool, requestedToolId);
|
|
1662
1662
|
return;
|
|
1663
1663
|
}
|
|
1664
|
-
const contract =
|
|
1664
|
+
const contract = _chunkTIFRRLZTjs.toolContractJsonForDescribe.call(void 0,
|
|
1665
1665
|
tool,
|
|
1666
1666
|
requestedToolId,
|
|
1667
1667
|
void 0,
|
|
@@ -1669,9 +1669,9 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1669
1669
|
);
|
|
1670
1670
|
const toolId = String(contract.toolId);
|
|
1671
1671
|
const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
|
|
1672
|
-
const examples =
|
|
1672
|
+
const examples = _chunkTIFRRLZTjs.arrayField.call(void 0, tool, "examples").filter(_chunkTIFRRLZTjs.isRecord);
|
|
1673
1673
|
const firstExample = examples[0];
|
|
1674
|
-
const sampleInput = firstExample &&
|
|
1674
|
+
const sampleInput = firstExample && _chunkTIFRRLZTjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunkTIFRRLZTjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunkTIFRRLZTjs.samplePayloadForInputFields.call(void 0, inputFields)));
|
|
1675
1675
|
console.log("Example input payload:");
|
|
1676
1676
|
console.log(JSON.stringify(sampleInput, null, 2));
|
|
1677
1677
|
console.log(`Use in a play:`);
|
|
@@ -1685,32 +1685,32 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1685
1685
|
);
|
|
1686
1686
|
console.log("});");
|
|
1687
1687
|
console.log("const response = result.toolResponse.rawV2;");
|
|
1688
|
-
const getters =
|
|
1688
|
+
const getters = _chunkTIFRRLZTjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1689
1689
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1690
1690
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1691
|
-
const firstGetter = valueGetters.find(
|
|
1691
|
+
const firstGetter = valueGetters.find(_chunkTIFRRLZTjs.isRecord);
|
|
1692
1692
|
if (firstGetter) {
|
|
1693
|
-
const name =
|
|
1694
|
-
const expression =
|
|
1693
|
+
const name = _chunkTIFRRLZTjs.stringField.call(void 0, firstGetter, "name") || "value";
|
|
1694
|
+
const expression = _chunkTIFRRLZTjs.stringField.call(void 0, firstGetter, "expression");
|
|
1695
1695
|
if (expression)
|
|
1696
1696
|
console.log(
|
|
1697
1697
|
`const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
|
|
1698
1698
|
);
|
|
1699
1699
|
}
|
|
1700
1700
|
const arrayNames = new Set(
|
|
1701
|
-
|
|
1702
|
-
|
|
1701
|
+
_chunkTIFRRLZTjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1702
|
+
_chunkTIFRRLZTjs.recordField.call(void 0, tool, "outputSchema", "output_schema")
|
|
1703
1703
|
).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
|
|
1704
1704
|
);
|
|
1705
1705
|
const firstList = _nullishCoalesce(listGetters.find(
|
|
1706
|
-
(entry) =>
|
|
1707
|
-
), () => ( listGetters.find(
|
|
1708
|
-
if (
|
|
1709
|
-
const name = safeIdentifier(
|
|
1706
|
+
(entry) => _chunkTIFRRLZTjs.isRecord.call(void 0, entry) && arrayNames.has(_chunkTIFRRLZTjs.stringField.call(void 0, entry, "name"))
|
|
1707
|
+
), () => ( listGetters.find(_chunkTIFRRLZTjs.isRecord)));
|
|
1708
|
+
if (_chunkTIFRRLZTjs.isRecord.call(void 0, firstList)) {
|
|
1709
|
+
const name = safeIdentifier(_chunkTIFRRLZTjs.stringField.call(void 0, firstList, "name") || "list");
|
|
1710
1710
|
if (_chunkJ33TSWO5js.playToolListGetterMode.call(void 0, ) === "array") {
|
|
1711
|
-
console.log(`const ${name}_rows = ${
|
|
1711
|
+
console.log(`const ${name}_rows = ${_chunkTIFRRLZTjs.playResultExpression.call(void 0, firstList)};`);
|
|
1712
1712
|
} else {
|
|
1713
|
-
console.log(`const ${name}_ds = ${
|
|
1713
|
+
console.log(`const ${name}_ds = ${_chunkTIFRRLZTjs.playResultExpression.call(void 0, firstList)};`);
|
|
1714
1714
|
console.log(
|
|
1715
1715
|
"// Complete small list from this response; throws above the memory cap."
|
|
1716
1716
|
);
|
|
@@ -1720,7 +1720,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1720
1720
|
console.log("```");
|
|
1721
1721
|
if (firstList) printListGetterConsumption();
|
|
1722
1722
|
for (const example of examples) {
|
|
1723
|
-
const description =
|
|
1723
|
+
const description = _chunkTIFRRLZTjs.stringField.call(void 0, example, "description");
|
|
1724
1724
|
if (description) console.log(description);
|
|
1725
1725
|
console.log("Example Deepline execution response:");
|
|
1726
1726
|
console.log(JSON.stringify(example.response, null, 2));
|
|
@@ -1735,14 +1735,14 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1735
1735
|
}
|
|
1736
1736
|
function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
1737
1737
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1738
|
-
const inputFields =
|
|
1739
|
-
|
|
1738
|
+
const inputFields = _chunkTIFRRLZTjs.toolInputFieldsForDisplay.call(void 0,
|
|
1739
|
+
_chunkTIFRRLZTjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
|
|
1740
1740
|
);
|
|
1741
|
-
const sampleInput =
|
|
1742
|
-
const playReference =
|
|
1741
|
+
const sampleInput = _chunkTIFRRLZTjs.samplePayloadForInputFields.call(void 0, inputFields);
|
|
1742
|
+
const playReference = _chunkTIFRRLZTjs.playReferenceForTool.call(void 0, tool);
|
|
1743
1743
|
console.log("Run as a play:");
|
|
1744
1744
|
console.log(
|
|
1745
|
-
|
|
1745
|
+
_chunkTIFRRLZTjs.playRunCommandForTool.call(void 0,
|
|
1746
1746
|
tool,
|
|
1747
1747
|
toolId,
|
|
1748
1748
|
Object.keys(sampleInput).length ? sampleInput : void 0
|
|
@@ -1753,13 +1753,13 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
|
1753
1753
|
}
|
|
1754
1754
|
}
|
|
1755
1755
|
function printToolGettersOnly(tool, requestedToolId) {
|
|
1756
|
-
const contract =
|
|
1756
|
+
const contract = _chunkTIFRRLZTjs.toolContractJsonForDescribe.call(void 0,
|
|
1757
1757
|
tool,
|
|
1758
1758
|
requestedToolId,
|
|
1759
1759
|
void 0,
|
|
1760
1760
|
seedToolListScript
|
|
1761
1761
|
);
|
|
1762
|
-
const getters =
|
|
1762
|
+
const getters = _chunkTIFRRLZTjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1763
1763
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1764
1764
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1765
1765
|
console.log(`Getters: ${contract.toolId}`);
|
|
@@ -1770,9 +1770,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1770
1770
|
if (listGetters.length) {
|
|
1771
1771
|
console.log(listGetterHeading());
|
|
1772
1772
|
for (const entry of listGetters) {
|
|
1773
|
-
if (
|
|
1773
|
+
if (_chunkTIFRRLZTjs.isRecord.call(void 0, entry))
|
|
1774
1774
|
console.log(
|
|
1775
|
-
`- ${
|
|
1775
|
+
`- ${_chunkTIFRRLZTjs.stringField.call(void 0, entry, "name")}: ${_chunkTIFRRLZTjs.playResultExpression.call(void 0, entry)}`
|
|
1776
1776
|
);
|
|
1777
1777
|
}
|
|
1778
1778
|
printListGetterConsumption();
|
|
@@ -1780,9 +1780,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1780
1780
|
if (valueGetters.length) {
|
|
1781
1781
|
console.log("Values:");
|
|
1782
1782
|
for (const entry of valueGetters) {
|
|
1783
|
-
if (
|
|
1783
|
+
if (_chunkTIFRRLZTjs.isRecord.call(void 0, entry))
|
|
1784
1784
|
console.log(
|
|
1785
|
-
`- ${
|
|
1785
|
+
`- ${_chunkTIFRRLZTjs.stringField.call(void 0, entry, "name")}: ${_chunkTIFRRLZTjs.playResultExpression.call(void 0, entry)}`
|
|
1786
1786
|
);
|
|
1787
1787
|
}
|
|
1788
1788
|
}
|
|
@@ -1820,22 +1820,22 @@ function listedToolDescription(tool) {
|
|
|
1820
1820
|
}
|
|
1821
1821
|
function formatListedToolCost(tool) {
|
|
1822
1822
|
const record = tool;
|
|
1823
|
-
if (
|
|
1823
|
+
if (_chunkTIFRRLZTjs.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
|
|
1824
1824
|
return "Cost: Free";
|
|
1825
1825
|
}
|
|
1826
|
-
const pricing =
|
|
1827
|
-
const displayText =
|
|
1826
|
+
const pricing = _chunkTIFRRLZTjs.recordField.call(void 0, record, "pricing");
|
|
1827
|
+
const displayText = _chunkTIFRRLZTjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
1828
1828
|
return displayText ? `Cost: ${displayText}` : "";
|
|
1829
1829
|
}
|
|
1830
1830
|
function printToolOutputArrayShape(tool) {
|
|
1831
|
-
const outputFields =
|
|
1832
|
-
|
|
1831
|
+
const outputFields = _chunkTIFRRLZTjs.toolOutputFieldsForDisplay.call(void 0,
|
|
1832
|
+
_chunkTIFRRLZTjs.recordField.call(void 0, _chunkTIFRRLZTjs.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
|
|
1833
1833
|
);
|
|
1834
1834
|
if (outputFields.length === 0) return;
|
|
1835
1835
|
console.log(" Output array shape (declared schema):");
|
|
1836
1836
|
for (const field of outputFields.slice(0, 60)) {
|
|
1837
1837
|
const name = String(field.name);
|
|
1838
|
-
const type =
|
|
1838
|
+
const type = _chunkTIFRRLZTjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1839
1839
|
const itemBounds = arrayItemBoundsSuffix(field);
|
|
1840
1840
|
console.log(` - ${name}: ${type}${itemBounds}`);
|
|
1841
1841
|
}
|
|
@@ -1844,14 +1844,14 @@ function printToolOutputArrayShape(tool) {
|
|
|
1844
1844
|
}
|
|
1845
1845
|
}
|
|
1846
1846
|
function declaredToolJsonSchema(inputSchema) {
|
|
1847
|
-
if (
|
|
1847
|
+
if (_chunkTIFRRLZTjs.isRecord.call(void 0, inputSchema.jsonSchema)) {
|
|
1848
1848
|
return inputSchema.jsonSchema;
|
|
1849
1849
|
}
|
|
1850
1850
|
return Array.isArray(inputSchema.fields) ? null : inputSchema;
|
|
1851
1851
|
}
|
|
1852
1852
|
function arrayItemBoundsSuffix(field) {
|
|
1853
|
-
const itemSchema =
|
|
1854
|
-
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type :
|
|
1853
|
+
const itemSchema = _chunkTIFRRLZTjs.isRecord.call(void 0, field.items) ? field.items : null;
|
|
1854
|
+
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunkTIFRRLZTjs.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
|
|
1855
1855
|
const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _14 => _14.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
|
|
1856
1856
|
const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
|
|
1857
1857
|
const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
|
|
@@ -1864,21 +1864,21 @@ function arrayItemBoundsSuffix(field) {
|
|
|
1864
1864
|
return itemTypeSuffix;
|
|
1865
1865
|
}
|
|
1866
1866
|
function printToolExecutionHints(value) {
|
|
1867
|
-
const batchCapabilityRecord =
|
|
1868
|
-
|
|
1867
|
+
const batchCapabilityRecord = _chunkTIFRRLZTjs.recordField.call(void 0,
|
|
1868
|
+
_chunkTIFRRLZTjs.isRecord.call(void 0, value) ? value : {},
|
|
1869
1869
|
"batchCapability",
|
|
1870
1870
|
"batch_capability"
|
|
1871
1871
|
);
|
|
1872
1872
|
const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
|
|
1873
|
-
const executionMetadata =
|
|
1874
|
-
|
|
1873
|
+
const executionMetadata = _chunkTIFRRLZTjs.recordField.call(void 0,
|
|
1874
|
+
_chunkTIFRRLZTjs.isRecord.call(void 0, value) ? value : {},
|
|
1875
1875
|
"executionMetadata",
|
|
1876
1876
|
"execution_metadata"
|
|
1877
1877
|
);
|
|
1878
1878
|
if (batchCapability) {
|
|
1879
|
-
const status =
|
|
1880
|
-
const surface =
|
|
1881
|
-
const operation =
|
|
1879
|
+
const status = _chunkTIFRRLZTjs.stringField.call(void 0, batchCapability, "status") || "unknown";
|
|
1880
|
+
const surface = _chunkTIFRRLZTjs.stringField.call(void 0, batchCapability, "surface");
|
|
1881
|
+
const operation = _chunkTIFRRLZTjs.stringField.call(void 0,
|
|
1882
1882
|
batchCapability,
|
|
1883
1883
|
"batchOperation",
|
|
1884
1884
|
"batch_operation"
|
|
@@ -1888,7 +1888,7 @@ function printToolExecutionHints(value) {
|
|
|
1888
1888
|
"maxBatchSize",
|
|
1889
1889
|
"max_batch_size"
|
|
1890
1890
|
);
|
|
1891
|
-
const notes =
|
|
1891
|
+
const notes = _chunkTIFRRLZTjs.stringField.call(void 0, batchCapability, "notes");
|
|
1892
1892
|
console.log("");
|
|
1893
1893
|
console.log("Batching:");
|
|
1894
1894
|
console.log(`- Catalog status: ${status}${surface ? ` (${surface})` : ""}`);
|
|
@@ -1907,11 +1907,11 @@ function printToolExecutionHints(value) {
|
|
|
1907
1907
|
}
|
|
1908
1908
|
if (notes) console.log(`- Details: ${notes}`);
|
|
1909
1909
|
}
|
|
1910
|
-
const configuredRateLimits =
|
|
1910
|
+
const configuredRateLimits = _chunkTIFRRLZTjs.arrayField.call(void 0,
|
|
1911
1911
|
executionMetadata,
|
|
1912
1912
|
"configuredRateLimits",
|
|
1913
1913
|
"configured_rate_limits"
|
|
1914
|
-
).filter(
|
|
1914
|
+
).filter(_chunkTIFRRLZTjs.isRecord);
|
|
1915
1915
|
if (configuredRateLimits.length > 0) {
|
|
1916
1916
|
console.log("");
|
|
1917
1917
|
console.log(
|
|
@@ -1921,7 +1921,7 @@ function printToolExecutionHints(value) {
|
|
|
1921
1921
|
const requests = numberField(limit, "requestsPerWindow");
|
|
1922
1922
|
const windowMs = numberField(limit, "windowMs");
|
|
1923
1923
|
if (requests === null || windowMs === null) continue;
|
|
1924
|
-
const usage =
|
|
1924
|
+
const usage = _chunkTIFRRLZTjs.stringField.call(void 0, limit, "usage") || "unknown";
|
|
1925
1925
|
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;
|
|
1926
1926
|
const explicitMaxConcurrency = numberField(
|
|
1927
1927
|
limit,
|
|
@@ -1930,11 +1930,11 @@ function printToolExecutionHints(value) {
|
|
|
1930
1930
|
);
|
|
1931
1931
|
const concurrencyText = explicitMaxConcurrency === null ? "no explicit concurrency limit" : `explicit concurrency limit ${explicitMaxConcurrency}`;
|
|
1932
1932
|
console.log(
|
|
1933
|
-
`- ${requests} requests per ${formatRateWindow(windowMs)}${
|
|
1933
|
+
`- ${requests} requests per ${formatRateWindow(windowMs)}${_chunkJO5FFSR7js.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
|
|
1934
1934
|
);
|
|
1935
1935
|
}
|
|
1936
1936
|
}
|
|
1937
|
-
const queueHint =
|
|
1937
|
+
const queueHint = _chunkTIFRRLZTjs.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
|
|
1938
1938
|
const requestsPerSecondHint = numberField(
|
|
1939
1939
|
queueHint,
|
|
1940
1940
|
"requestsPerSecondHint",
|
|
@@ -1960,25 +1960,25 @@ function formatRateWindow(windowMs) {
|
|
|
1960
1960
|
}
|
|
1961
1961
|
function samplePayload(samples, key) {
|
|
1962
1962
|
const entry = samples[key];
|
|
1963
|
-
if (!
|
|
1963
|
+
if (!_chunkTIFRRLZTjs.isRecord.call(void 0, entry)) return void 0;
|
|
1964
1964
|
return Object.prototype.hasOwnProperty.call(entry, "payload") ? entry.payload : entry;
|
|
1965
1965
|
}
|
|
1966
1966
|
function commandEnvelopeFromRawResponse(rawResponse) {
|
|
1967
|
-
return
|
|
1967
|
+
return _chunkTIFRRLZTjs.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
|
|
1968
1968
|
}
|
|
1969
1969
|
function toolExecuteExitCode(envelope) {
|
|
1970
1970
|
return envelope.status === "failed" || envelope.ok === false ? 1 : 0;
|
|
1971
1971
|
}
|
|
1972
1972
|
function extractToolExecutionWarningMessages(rawResponse) {
|
|
1973
|
-
if (!
|
|
1973
|
+
if (!_chunkTIFRRLZTjs.isRecord.call(void 0, rawResponse)) return [];
|
|
1974
1974
|
const candidates = [
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1975
|
+
_chunkTIFRRLZTjs.recordField.call(void 0, _chunkTIFRRLZTjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
|
|
1976
|
+
_chunkTIFRRLZTjs.recordField.call(void 0,
|
|
1977
|
+
_chunkTIFRRLZTjs.recordField.call(void 0, _chunkTIFRRLZTjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
|
|
1978
1978
|
"meta"
|
|
1979
1979
|
),
|
|
1980
|
-
|
|
1981
|
-
|
|
1980
|
+
_chunkTIFRRLZTjs.recordField.call(void 0, rawResponse, "meta"),
|
|
1981
|
+
_chunkTIFRRLZTjs.recordField.call(void 0, _chunkTIFRRLZTjs.recordField.call(void 0, rawResponse, "result"), "meta")
|
|
1982
1982
|
];
|
|
1983
1983
|
const messages = [];
|
|
1984
1984
|
for (const candidate of candidates) {
|
|
@@ -1987,8 +1987,8 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
1987
1987
|
for (const warning of warnings) {
|
|
1988
1988
|
if (typeof warning === "string" && warning.trim()) {
|
|
1989
1989
|
messages.push(warning.trim());
|
|
1990
|
-
} else if (
|
|
1991
|
-
const message =
|
|
1990
|
+
} else if (_chunkTIFRRLZTjs.isRecord.call(void 0, warning)) {
|
|
1991
|
+
const message = _chunkTIFRRLZTjs.stringField.call(void 0, warning, "message");
|
|
1992
1992
|
if (message) messages.push(message);
|
|
1993
1993
|
}
|
|
1994
1994
|
}
|
|
@@ -1996,20 +1996,20 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
1996
1996
|
return [...new Set(messages)];
|
|
1997
1997
|
}
|
|
1998
1998
|
function apifySyncRecoveryNext(rawResponse) {
|
|
1999
|
-
if (!
|
|
2000
|
-
const toolResponse =
|
|
2001
|
-
const raw =
|
|
1999
|
+
if (!_chunkTIFRRLZTjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
|
|
2000
|
+
const toolResponse = _chunkTIFRRLZTjs.recordField.call(void 0, rawResponse, "toolResponse");
|
|
2001
|
+
const raw = _chunkTIFRRLZTjs.recordField.call(void 0, toolResponse, "raw");
|
|
2002
2002
|
if (raw.state !== "awaiting_apify") return null;
|
|
2003
|
-
const next =
|
|
2004
|
-
const getActorRun =
|
|
2005
|
-
const getActorRunTool =
|
|
2006
|
-
const getActorRunPayload =
|
|
2003
|
+
const next = _chunkTIFRRLZTjs.recordField.call(void 0, raw, "next");
|
|
2004
|
+
const getActorRun = _chunkTIFRRLZTjs.recordField.call(void 0, next, "getActorRun");
|
|
2005
|
+
const getActorRunTool = _chunkTIFRRLZTjs.stringField.call(void 0, getActorRun, "tool");
|
|
2006
|
+
const getActorRunPayload = _chunkTIFRRLZTjs.recordField.call(void 0, getActorRun, "payload");
|
|
2007
2007
|
if (!getActorRunTool || Object.keys(getActorRunPayload).length === 0) {
|
|
2008
2008
|
return null;
|
|
2009
2009
|
}
|
|
2010
|
-
const getDatasetItems =
|
|
2011
|
-
const getDatasetItemsTool =
|
|
2012
|
-
const getDatasetItemsPayload =
|
|
2010
|
+
const getDatasetItems = _chunkTIFRRLZTjs.recordField.call(void 0, next, "getDatasetItems");
|
|
2011
|
+
const getDatasetItemsTool = _chunkTIFRRLZTjs.stringField.call(void 0, getDatasetItems, "tool");
|
|
2012
|
+
const getDatasetItemsPayload = _chunkTIFRRLZTjs.recordField.call(void 0, getDatasetItems, "payload");
|
|
2013
2013
|
return {
|
|
2014
2014
|
getActorRun: `deepline run ${getActorRunTool} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
|
|
2015
2015
|
...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
|
|
@@ -2019,7 +2019,7 @@ function apifySyncRecoveryNext(rawResponse) {
|
|
|
2019
2019
|
}
|
|
2020
2020
|
function listExtractorPathsFromUsageGuidance(tool) {
|
|
2021
2021
|
const toolExecutionResult = _optionalChain([tool, 'access', _16 => _16.usageGuidance, 'optionalAccess', _17 => _17.toolExecutionResult]);
|
|
2022
|
-
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists :
|
|
2022
|
+
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists : _chunkTIFRRLZTjs.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _19 => _19.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
|
|
2023
2023
|
return extractedLists.flatMap((entry) => {
|
|
2024
2024
|
const paths = _nullishCoalesce(_optionalChain([entry, 'access', _20 => _20.details, 'optionalAccess', _21 => _21.candidatePaths]), () => ( _optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.rawToolOutputPaths])));
|
|
2025
2025
|
if (!Array.isArray(paths)) return [];
|
|
@@ -2104,7 +2104,7 @@ function parseJsonObjectArgument(raw, flagName) {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
throw invalidJsonError(flagName, message);
|
|
2106
2106
|
}
|
|
2107
|
-
if (!
|
|
2107
|
+
if (!_chunkTIFRRLZTjs.isRecord.call(void 0, parsed)) {
|
|
2108
2108
|
throw invalidJsonError(flagName, "expected an object.");
|
|
2109
2109
|
}
|
|
2110
2110
|
return parsed;
|
|
@@ -2148,7 +2148,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2148
2148
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2149
2149
|
}
|
|
2150
2150
|
if (options.idempotencyKey !== void 0) {
|
|
2151
|
-
|
|
2151
|
+
_chunkHTUSTPP4js.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2152
2152
|
}
|
|
2153
2153
|
if (options.recoveryTimeoutMs !== void 0) {
|
|
2154
2154
|
const parsed = Number(options.recoveryTimeoutMs);
|
|
@@ -2277,7 +2277,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2277
2277
|
kind: summaryEntries.length > 0 ? "object" : "raw",
|
|
2278
2278
|
summary: input.summary
|
|
2279
2279
|
};
|
|
2280
|
-
const envelopeHasCanonicalOutput =
|
|
2280
|
+
const envelopeHasCanonicalOutput = _chunkTIFRRLZTjs.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
|
|
2281
2281
|
const envelopeHasDeclaredOutput = Object.prototype.hasOwnProperty.call(
|
|
2282
2282
|
envelope,
|
|
2283
2283
|
"output"
|
|
@@ -2305,7 +2305,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2305
2305
|
return {
|
|
2306
2306
|
...envelope,
|
|
2307
2307
|
...input.idempotencyKey ? { idempotency_key: input.idempotencyKey } : {},
|
|
2308
|
-
...
|
|
2308
|
+
..._chunkTIFRRLZTjs.isRecord.call(void 0, input.rawResponse) && _chunkTIFRRLZTjs.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
|
|
2309
2309
|
...envelopeHasCanonicalOutput || envelopeHasDeclaredOutput ? { output_preview: outputPreview } : { output: outputPreview },
|
|
2310
2310
|
...summaryEntries.length > 0 ? { summary: input.summary } : {},
|
|
2311
2311
|
...warningMessages.length > 0 ? { warnings: warningMessages } : {},
|
|
@@ -2366,7 +2366,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
|
|
|
2366
2366
|
void _render;
|
|
2367
2367
|
void _next;
|
|
2368
2368
|
void _local;
|
|
2369
|
-
const billingLookup =
|
|
2369
|
+
const billingLookup = _chunkTIFRRLZTjs.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
|
|
2370
2370
|
const inspection = toolExecutionInspection(input);
|
|
2371
2371
|
return {
|
|
2372
2372
|
...base,
|
|
@@ -2462,7 +2462,7 @@ function printToolExecutionWarnings(toolId, params, metadata) {
|
|
|
2462
2462
|
}
|
|
2463
2463
|
}
|
|
2464
2464
|
function assertExecutableToolMetadata(toolId, metadata) {
|
|
2465
|
-
if (
|
|
2465
|
+
if (_chunkTIFRRLZTjs.isPlayLikeTool.call(void 0, metadata)) {
|
|
2466
2466
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
2467
2467
|
playLikeToolExecuteErrorMessage(
|
|
2468
2468
|
toolId,
|
|
@@ -2480,7 +2480,7 @@ function valueAt(value, path) {
|
|
|
2480
2480
|
for (const [index, part] of parts.entries()) {
|
|
2481
2481
|
const each = part === "*" || part.endsWith("[*]");
|
|
2482
2482
|
if (part !== "*") {
|
|
2483
|
-
at =
|
|
2483
|
+
at = _chunkTIFRRLZTjs.isRecord.call(void 0, at) ? at[each ? part.slice(0, -3) : part] : void 0;
|
|
2484
2484
|
}
|
|
2485
2485
|
if (!each) continue;
|
|
2486
2486
|
if (!Array.isArray(at)) return void 0;
|
|
@@ -2496,7 +2496,7 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2496
2496
|
const getters = ["extractedValues", "extractedLists"].flatMap(
|
|
2497
2497
|
(kind) => {
|
|
2498
2498
|
const group = _optionalChain([result, 'optionalAccess', _28 => _28[kind]]);
|
|
2499
|
-
return Array.isArray(group) ? group :
|
|
2499
|
+
return Array.isArray(group) ? group : _chunkTIFRRLZTjs.isRecord.call(void 0, group) ? Object.entries(group).map(([name, getter]) => ({
|
|
2500
2500
|
name,
|
|
2501
2501
|
...getter
|
|
2502
2502
|
})) : [];
|
|
@@ -2521,13 +2521,13 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2521
2521
|
}
|
|
2522
2522
|
function writeToolReceipt(input) {
|
|
2523
2523
|
const { response, metadata } = input;
|
|
2524
|
-
const envelope =
|
|
2524
|
+
const envelope = _chunkTIFRRLZTjs.isRecord.call(void 0, response) ? response : {};
|
|
2525
2525
|
const jobId = typeof envelope.job_id === "string" ? envelope.job_id : null;
|
|
2526
|
-
const toolResponse =
|
|
2526
|
+
const toolResponse = _chunkTIFRRLZTjs.recordField.call(void 0, envelope, "toolResponse");
|
|
2527
2527
|
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;
|
|
2528
2528
|
const status = typeof envelope.status === "string" ? envelope.status : "completed";
|
|
2529
|
-
const charged =
|
|
2530
|
-
|
|
2529
|
+
const charged = _chunkTIFRRLZTjs.recordField.call(void 0, envelope, "billing").credits_charged;
|
|
2530
|
+
_chunkUCMY2SO2js.writeExecutionOutput.call(void 0,
|
|
2531
2531
|
{
|
|
2532
2532
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2533
2533
|
status,
|
|
@@ -2558,8 +2558,8 @@ async function executeToolForReceipt(input) {
|
|
|
2558
2558
|
let retryKey = null;
|
|
2559
2559
|
let received = false;
|
|
2560
2560
|
try {
|
|
2561
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2562
|
-
const client = new (0,
|
|
2561
|
+
const cliInvocationId = _nullishCoalesce(_chunkLGTZYI5Bjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkLGTZYI5Bjs.beginToolExecuteCommand.call(void 0, )));
|
|
2562
|
+
const client = new (0, _chunk2H4OFVR5js.DeeplineClient)();
|
|
2563
2563
|
const metadata = assertExecutableToolMetadata(
|
|
2564
2564
|
toolId,
|
|
2565
2565
|
await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
|
|
@@ -2580,9 +2580,9 @@ async function executeToolForReceipt(input) {
|
|
|
2580
2580
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2581
2581
|
..._optionalChain([metadata, 'access', _35 => _35.executionMetadata, 'optionalAccess', _36 => _36.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2582
2582
|
...key ? { idempotencyKey: key } : {},
|
|
2583
|
-
searchRef:
|
|
2583
|
+
searchRef: _chunkWCZFCOMZjs.recentSearchRef.call(void 0, ),
|
|
2584
2584
|
cliInvocationId,
|
|
2585
|
-
onResponseReceived:
|
|
2585
|
+
onResponseReceived: _chunkUCMY2SO2js.recordApiResponse
|
|
2586
2586
|
}).catch((error) => {
|
|
2587
2587
|
const guidance = toolGuidanceLines(metadata.guidance);
|
|
2588
2588
|
if (guidance.length)
|
|
@@ -2605,7 +2605,7 @@ async function executeToolForReceipt(input) {
|
|
|
2605
2605
|
if (received) throw error;
|
|
2606
2606
|
const outcomeKnown = answeredWithFailure(error);
|
|
2607
2607
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _37 => _37.discard, 'call', _38 => _38()]);
|
|
2608
|
-
|
|
2608
|
+
_chunkUCMY2SO2js.writeExecutionOutput.call(void 0,
|
|
2609
2609
|
{
|
|
2610
2610
|
id: outcomeKnown ? null : key,
|
|
2611
2611
|
status: "failed",
|
|
@@ -2629,11 +2629,11 @@ function answeredWithFailure(error) {
|
|
|
2629
2629
|
error.statusCode !== 408 && error.code !== "EXECUTION_OUTCOME_UNKNOWN";
|
|
2630
2630
|
}
|
|
2631
2631
|
async function getToolExecutionReceipt(key, output) {
|
|
2632
|
-
const client = new (0,
|
|
2632
|
+
const client = new (0, _chunk2H4OFVR5js.DeeplineClient)();
|
|
2633
2633
|
const execution = await client.executions.getByKey(key);
|
|
2634
2634
|
output.label = `${execution.toolId} (tool)`;
|
|
2635
2635
|
if (execution.response === void 0) {
|
|
2636
|
-
|
|
2636
|
+
_chunkUCMY2SO2js.writeExecutionOutput.call(void 0,
|
|
2637
2637
|
{
|
|
2638
2638
|
id: key,
|
|
2639
2639
|
status: execution.executionRecovery.state,
|
|
@@ -2662,19 +2662,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2662
2662
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2663
2663
|
} catch (error) {
|
|
2664
2664
|
if (wantsJson) {
|
|
2665
|
-
|
|
2665
|
+
_chunk2I7VN65Hjs.printJsonError.call(void 0, error);
|
|
2666
2666
|
} else {
|
|
2667
2667
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2668
2668
|
}
|
|
2669
2669
|
return error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2670
2670
|
}
|
|
2671
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2671
|
+
const cliInvocationId = _nullishCoalesce(_chunkLGTZYI5Bjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkLGTZYI5Bjs.beginToolExecuteCommand.call(void 0, )));
|
|
2672
2672
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2673
|
-
const tracing =
|
|
2673
|
+
const tracing = _chunkIOMEJKGKjs.isCliTraceEnabled.call(void 0, );
|
|
2674
2674
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2675
|
-
const client = new (0,
|
|
2675
|
+
const client = new (0, _chunk2H4OFVR5js.DeeplineClient)();
|
|
2676
2676
|
if (clientStartedAt !== void 0) {
|
|
2677
|
-
|
|
2677
|
+
_chunkIOMEJKGKjs.recordCliTrace.call(void 0, {
|
|
2678
2678
|
phase: "cli.tool_execute_client_setup",
|
|
2679
2679
|
ms: performance.now() - clientStartedAt
|
|
2680
2680
|
});
|
|
@@ -2683,13 +2683,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2683
2683
|
const readMetadata = async () => {
|
|
2684
2684
|
if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2685
2685
|
try {
|
|
2686
|
-
metadata = await
|
|
2686
|
+
metadata = await _chunkLGTZYI5Bjs.runToolExecuteStage.call(void 0,
|
|
2687
2687
|
"tool metadata lookup",
|
|
2688
2688
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2689
2689
|
);
|
|
2690
2690
|
} catch (error) {
|
|
2691
2691
|
if (isMissingToolMetadataError(error)) {
|
|
2692
|
-
const play = await
|
|
2692
|
+
const play = await _chunkLGTZYI5Bjs.runToolExecuteStage.call(void 0,
|
|
2693
2693
|
"play alias lookup",
|
|
2694
2694
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2695
2695
|
);
|
|
@@ -2718,7 +2718,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2718
2718
|
assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2719
2719
|
} catch (error) {
|
|
2720
2720
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2721
|
-
if (wantsJson)
|
|
2721
|
+
if (wantsJson) _chunk2I7VN65Hjs.printJsonError.call(void 0, error);
|
|
2722
2722
|
else console.error(error.message);
|
|
2723
2723
|
return 2;
|
|
2724
2724
|
}
|
|
@@ -2730,7 +2730,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2730
2730
|
metadata = await readMetadata();
|
|
2731
2731
|
} catch (error) {
|
|
2732
2732
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2733
|
-
if (wantsJson)
|
|
2733
|
+
if (wantsJson) _chunk2I7VN65Hjs.printJsonError.call(void 0, error);
|
|
2734
2734
|
else console.error(error.message);
|
|
2735
2735
|
return 2;
|
|
2736
2736
|
}
|
|
@@ -2746,7 +2746,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2746
2746
|
metadata = await readMetadata();
|
|
2747
2747
|
} catch (error) {
|
|
2748
2748
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2749
|
-
if (wantsJson)
|
|
2749
|
+
if (wantsJson) _chunk2I7VN65Hjs.printJsonError.call(void 0, error);
|
|
2750
2750
|
else console.error(error.message);
|
|
2751
2751
|
return 2;
|
|
2752
2752
|
}
|
|
@@ -2772,11 +2772,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2772
2772
|
responseIntent,
|
|
2773
2773
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2774
2774
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2775
|
-
searchRef:
|
|
2775
|
+
searchRef: _chunkWCZFCOMZjs.recentSearchRef.call(void 0, ),
|
|
2776
2776
|
cliInvocationId,
|
|
2777
|
-
onResponseReceived:
|
|
2777
|
+
onResponseReceived: _chunkUCMY2SO2js.recordApiResponse,
|
|
2778
2778
|
...tracing ? {
|
|
2779
|
-
onServerTiming: (serverTiming) =>
|
|
2779
|
+
onServerTiming: (serverTiming) => _chunkIOMEJKGKjs.recordCliTrace.call(void 0, {
|
|
2780
2780
|
phase: "tool_execute_server_timing",
|
|
2781
2781
|
cliInvocationId,
|
|
2782
2782
|
serverTiming,
|
|
@@ -2787,13 +2787,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2787
2787
|
let rawResponse;
|
|
2788
2788
|
let successfulCompatibilityResponse;
|
|
2789
2789
|
try {
|
|
2790
|
-
const executeResult = await
|
|
2790
|
+
const executeResult = await _chunkLGTZYI5Bjs.runToolExecuteStage.call(void 0,
|
|
2791
2791
|
"execute request",
|
|
2792
2792
|
async () => {
|
|
2793
2793
|
try {
|
|
2794
2794
|
if (tracing) {
|
|
2795
2795
|
submissionStartedAt = performance.now();
|
|
2796
|
-
|
|
2796
|
+
_chunkIOMEJKGKjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2797
2797
|
}
|
|
2798
2798
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2799
2799
|
...executeOptions,
|
|
@@ -2803,34 +2803,34 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2803
2803
|
} catch (error) {
|
|
2804
2804
|
if (!(error instanceof _chunkDIAWYWT5js.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2805
2805
|
throw error;
|
|
2806
|
-
const baseUrl =
|
|
2806
|
+
const baseUrl = _chunkJO2JZUBRjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2807
2807
|
if (maintenancePolicy !== "off") {
|
|
2808
|
-
|
|
2808
|
+
_chunkKCDZWS2Bjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2809
2809
|
}
|
|
2810
|
-
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await
|
|
2810
|
+
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await _chunkLGTZYI5Bjs.runToolExecuteStage.call(void 0,
|
|
2811
2811
|
"SDK compatibility",
|
|
2812
|
-
() =>
|
|
2812
|
+
() => _chunkKCDZWS2Bjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
2813
2813
|
command: "tools execute",
|
|
2814
|
-
skillsVersion:
|
|
2814
|
+
skillsVersion: _chunkJO2JZUBRjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2815
2815
|
persistCache: maintenancePolicy !== "off"
|
|
2816
2816
|
})
|
|
2817
2817
|
);
|
|
2818
2818
|
if (compatibility.error) throw compatibility.error;
|
|
2819
2819
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _44 => _44.readMetadata, 'call', _45 => _45()]), () => ( metadata));
|
|
2820
|
-
if (maintenancePolicy !== "off" && await
|
|
2820
|
+
if (maintenancePolicy !== "off" && await _chunkLGTZYI5Bjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2821
2821
|
compatibility.response,
|
|
2822
2822
|
baseUrl,
|
|
2823
2823
|
maintenancePolicy
|
|
2824
2824
|
)) {
|
|
2825
2825
|
return void 0;
|
|
2826
2826
|
}
|
|
2827
|
-
|
|
2827
|
+
_chunkKCDZWS2Bjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
2828
2828
|
quietAdvisory: wantsJson
|
|
2829
2829
|
});
|
|
2830
2830
|
if (maintenancePolicy !== "off") {
|
|
2831
|
-
await
|
|
2831
|
+
await _chunkLGTZYI5Bjs.runToolExecuteStage.call(void 0,
|
|
2832
2832
|
"agent skills sync",
|
|
2833
|
-
() =>
|
|
2833
|
+
() => _chunkKCDZWS2Bjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2834
2834
|
update: _optionalChain([compatibility, 'access', _46 => _46.response, 'optionalAccess', _47 => _47.skills]),
|
|
2835
2835
|
mode: "detached"
|
|
2836
2836
|
})
|
|
@@ -2839,7 +2839,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2839
2839
|
const legacyMetadata = await readMetadata();
|
|
2840
2840
|
if (tracing) {
|
|
2841
2841
|
submissionStartedAt = performance.now();
|
|
2842
|
-
|
|
2842
|
+
_chunkIOMEJKGKjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2843
2843
|
}
|
|
2844
2844
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2845
2845
|
...executeOptions,
|
|
@@ -2862,8 +2862,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2862
2862
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2863
2863
|
const updateRequiredBeforeExecution = error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2864
2864
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2865
|
-
const baseUrl =
|
|
2866
|
-
if (await
|
|
2865
|
+
const baseUrl = _chunkJO2JZUBRjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2866
|
+
if (await _chunkLGTZYI5Bjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2867
2867
|
compatibility.response,
|
|
2868
2868
|
baseUrl,
|
|
2869
2869
|
maintenancePolicy
|
|
@@ -2887,7 +2887,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2887
2887
|
}
|
|
2888
2888
|
}
|
|
2889
2889
|
if (failure instanceof _chunkDIAWYWT5js.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2890
|
-
if (wantsJson)
|
|
2890
|
+
if (wantsJson) _chunk2I7VN65Hjs.printJsonError.call(void 0, failure);
|
|
2891
2891
|
else console.error(failure.message);
|
|
2892
2892
|
return 2;
|
|
2893
2893
|
}
|
|
@@ -2914,9 +2914,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2914
2914
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
2915
2915
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _54 => _54.auto_update]);
|
|
2916
2916
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _55 => _55.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
2917
|
-
await
|
|
2917
|
+
await _chunkLGTZYI5Bjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2918
2918
|
compatibilityResponse,
|
|
2919
|
-
|
|
2919
|
+
_chunkJO2JZUBRjs.resolveConfig.call(void 0, ).baseUrl,
|
|
2920
2920
|
maintenancePolicy
|
|
2921
2921
|
);
|
|
2922
2922
|
}
|
|
@@ -2934,8 +2934,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2934
2934
|
);
|
|
2935
2935
|
}
|
|
2936
2936
|
}
|
|
2937
|
-
const responseMetadata =
|
|
2938
|
-
|
|
2937
|
+
const responseMetadata = _chunkTIFRRLZTjs.recordField.call(void 0,
|
|
2938
|
+
_chunkTIFRRLZTjs.recordField.call(void 0, rawResponse, "_metadata"),
|
|
2939
2939
|
"tool"
|
|
2940
2940
|
);
|
|
2941
2941
|
const listOutputPaths = responseMetadata.listOutputPaths;
|
|
@@ -2947,11 +2947,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2947
2947
|
await readMetadata()
|
|
2948
2948
|
);
|
|
2949
2949
|
}
|
|
2950
|
-
if (
|
|
2950
|
+
if (_chunkTIFRRLZTjs.isRecord.call(void 0, rawResponse)) {
|
|
2951
2951
|
const { _metadata, ...execution } = rawResponse;
|
|
2952
2952
|
rawResponse = execution;
|
|
2953
2953
|
}
|
|
2954
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
2954
|
+
const { listConversion, summary, baseEnvelope } = await _chunkLGTZYI5Bjs.runToolExecuteStage.call(void 0,
|
|
2955
2955
|
"result formatting",
|
|
2956
2956
|
async () => {
|
|
2957
2957
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -2986,9 +2986,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2986
2986
|
}
|
|
2987
2987
|
skillsSyncAttempted = true;
|
|
2988
2988
|
try {
|
|
2989
|
-
await
|
|
2989
|
+
await _chunkLGTZYI5Bjs.runToolExecuteStage.call(void 0,
|
|
2990
2990
|
"agent skills sync",
|
|
2991
|
-
() =>
|
|
2991
|
+
() => _chunkKCDZWS2Bjs.syncSdkSkillsIfNeeded.call(void 0, _chunkJO2JZUBRjs.resolveConfig.call(void 0, ).baseUrl, {
|
|
2992
2992
|
update: deliveredCompatibilityResponse.skills,
|
|
2993
2993
|
mode: "detached"
|
|
2994
2994
|
})
|
|
@@ -2999,15 +2999,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2999
2999
|
);
|
|
3000
3000
|
}
|
|
3001
3001
|
};
|
|
3002
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
3002
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunk2I7VN65Hjs.printCommandEnvelope.call(void 0, envelope, {
|
|
3003
3003
|
...options2,
|
|
3004
3004
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
3005
3005
|
});
|
|
3006
3006
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
3007
3007
|
await syncSkillsForDeliveredOutput();
|
|
3008
|
-
|
|
3008
|
+
_chunk2I7VN65Hjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
3009
3009
|
};
|
|
3010
|
-
const delivered = await
|
|
3010
|
+
const delivered = await _chunkLGTZYI5Bjs.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
3011
3011
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
3012
3012
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
3013
3013
|
return true;
|
|
@@ -3020,7 +3020,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3020
3020
|
await printDeliveredJsonEnvelope({
|
|
3021
3021
|
...baseEnvelope,
|
|
3022
3022
|
local: {
|
|
3023
|
-
...
|
|
3023
|
+
..._chunkTIFRRLZTjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
|
|
3024
3024
|
payload_file: jsonPath
|
|
3025
3025
|
}
|
|
3026
3026
|
});
|
|
@@ -3036,7 +3036,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3036
3036
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3037
3037
|
);
|
|
3038
3038
|
if (wantsJson) {
|
|
3039
|
-
|
|
3039
|
+
_chunk2I7VN65Hjs.printJsonError.call(void 0, error);
|
|
3040
3040
|
} else {
|
|
3041
3041
|
console.error(error.message);
|
|
3042
3042
|
}
|
|
@@ -3131,13 +3131,13 @@ inspect: ${inspection.inspect}
|
|
|
3131
3131
|
return true;
|
|
3132
3132
|
});
|
|
3133
3133
|
if (delivered) {
|
|
3134
|
-
await
|
|
3134
|
+
await _chunkLGTZYI5Bjs.runToolExecuteStage.call(void 0,
|
|
3135
3135
|
"acknowledge delivery",
|
|
3136
3136
|
() => recovery.acknowledgeDelivery()
|
|
3137
3137
|
);
|
|
3138
3138
|
}
|
|
3139
3139
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3140
|
-
|
|
3140
|
+
_chunkKCDZWS2Bjs.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3141
3141
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _58 => _58.auto_update, 'optionalAccess', _59 => _59.should_auto_update]) === true
|
|
3142
3142
|
});
|
|
3143
3143
|
}
|