deepline 0.3.514 → 0.3.516
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/errors.ts +1 -0
- package/dist/bundling-sources/sdk/src/http-core.ts +9 -4
- package/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +30 -15
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +6 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +71 -1
- package/dist/bundling-sources/shared_libs/play-runtime/secret-redaction.ts +20 -7
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +3 -1
- package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +45 -0
- package/dist/bundling-sources/shared_libs/tool-execution-error.ts +45 -0
- package/dist/cli/{artifacts-GNFL5LY4.mjs → artifacts-G56FISIE.mjs} +9 -9
- package/dist/cli/{artifacts-OZRO4LHT.js → artifacts-KMWS32R5.js} +21 -21
- package/dist/cli/auth-6EIEZ3UE.js +43 -0
- package/dist/cli/{auth-53EDAX7Y.mjs → auth-RSS7MOBV.mjs} +7 -7
- package/dist/cli/{billing-ZMX2V5X3.mjs → billing-2ALO3XEG.mjs} +10 -10
- package/dist/cli/{billing-B6V3FELL.js → billing-RCC6WBIZ.js} +93 -93
- package/dist/cli/{chunk-753MZFDF.mjs → chunk-2YEFJHAF.mjs} +3 -3
- package/dist/cli/{chunk-BBDWIUJA.js → chunk-4IIK6GIY.js} +17 -17
- package/dist/cli/{chunk-DMBCJFGY.mjs → chunk-5NU37KME.mjs} +2 -2
- package/dist/cli/{chunk-Z5WO6IBV.mjs → chunk-6ADGVZRX.mjs} +21 -6
- package/dist/cli/{chunk-RNSHCJME.js → chunk-6Y3DDRRN.js} +30 -30
- package/dist/cli/{chunk-NXT52SIV.js → chunk-6ZLL5GDN.js} +2 -2
- package/dist/cli/{chunk-QSFAUGFK.js → chunk-72L5HQ3J.js} +5 -5
- package/dist/cli/{chunk-DLYWOHO4.mjs → chunk-72MFP7V4.mjs} +1 -1
- package/dist/cli/{chunk-MF7ZVWJK.js → chunk-7R2V5Z6O.js} +41 -41
- package/dist/cli/{chunk-W3TN352L.mjs → chunk-C2SR3X7Y.mjs} +4 -4
- package/dist/cli/{chunk-76M3DL5G.mjs → chunk-C72J6JE3.mjs} +1 -1
- package/dist/cli/{chunk-RMRZ4BC4.mjs → chunk-CA24C3XL.mjs} +4 -4
- package/dist/cli/{chunk-2RCZCWPO.js → chunk-CKEZXNMV.js} +6 -6
- package/dist/cli/{chunk-C24VEYSP.js → chunk-D4OZSC3C.js} +8 -4
- package/dist/cli/{chunk-EVTD3ELD.mjs → chunk-E7ZM2ZRD.mjs} +5 -5
- package/dist/cli/{chunk-MJIS4XAZ.mjs → chunk-EYWP5JPU.mjs} +4 -4
- package/dist/cli/{chunk-TG4IMWAL.js → chunk-FIIBDWAO.js} +55 -55
- package/dist/cli/{chunk-7MJYZ33I.mjs → chunk-GJYLC4JB.mjs} +1 -1
- package/dist/cli/{chunk-7MBI2OLW.mjs → chunk-H6BSB2YJ.mjs} +1 -1
- package/dist/cli/{chunk-N4TR6QRI.mjs → chunk-HT675XNR.mjs} +1 -1
- package/dist/cli/{chunk-IZJGOMCW.mjs → chunk-HY6KAW5H.mjs} +5 -5
- package/dist/cli/{chunk-ILITNKGM.mjs → chunk-J4VMWSQK.mjs} +7 -7
- package/dist/cli/{chunk-TZS4G7CS.js → chunk-JB6FEEDQ.js} +2 -2
- package/dist/cli/{chunk-6FYGFIXD.mjs → chunk-JPLEDOEW.mjs} +2 -2
- package/dist/cli/{chunk-7ZCXQDOQ.mjs → chunk-LCKAG5RL.mjs} +2 -2
- package/dist/cli/{chunk-RVMV4MXO.mjs → chunk-LWUFEX26.mjs} +3 -3
- package/dist/cli/{chunk-FPWOEK7G.js → chunk-LZROM6VQ.js} +2 -2
- package/dist/cli/{chunk-RLVSWAWB.js → chunk-N6Q5SDGA.js} +62 -51
- package/dist/cli/{chunk-A6QCMBGL.js → chunk-NRO3NTVO.js} +5 -5
- package/dist/cli/{chunk-VLIDBQYL.js → chunk-P6AADORO.js} +3 -3
- package/dist/cli/{chunk-55WBE4UK.js → chunk-PKKSXXZ5.js} +26 -26
- package/dist/cli/{chunk-G6PUQQJP.js → chunk-PMS3LQ6B.js} +5 -5
- package/dist/cli/{chunk-JC3ABOZP.js → chunk-PPYJXP4Z.js} +38 -23
- package/dist/cli/{chunk-6SSISVXD.mjs → chunk-PVVWKOEB.mjs} +8 -7
- package/dist/cli/{chunk-DBBLPDXK.mjs → chunk-Q47MAAHI.mjs} +1 -1
- package/dist/cli/{chunk-2CTTSNFE.js → chunk-QG3MRMU5.js} +58 -57
- package/dist/cli/{chunk-53F6JDQ3.mjs → chunk-QG4LIOGI.mjs} +2 -2
- package/dist/cli/{chunk-4QF2K7TM.mjs → chunk-QNHHZ63P.mjs} +1 -1
- package/dist/cli/{chunk-A253CMOI.js → chunk-QUSYG3VP.js} +8 -8
- package/dist/cli/{chunk-T4NQ2ZOH.js → chunk-QX7WDG4V.js} +11 -11
- package/dist/cli/{chunk-MQK5SY5N.js → chunk-RB3OR32I.js} +16 -16
- package/dist/cli/{chunk-RFN7OKT2.mjs → chunk-RB5EMAWD.mjs} +1 -1
- package/dist/cli/{chunk-WP3ULMRU.js → chunk-RLI6FDQM.js} +6 -6
- package/dist/cli/{chunk-TMQUMILM.js → chunk-RVHUW4TN.js} +2 -2
- package/dist/cli/{chunk-DIAWYWT5.js → chunk-SQWET4SL.js} +18 -1
- package/dist/cli/{chunk-OZDT2CZW.mjs → chunk-STR5LXK4.mjs} +1 -1
- package/dist/cli/{chunk-ALJJRZNJ.js → chunk-T2N3B7IQ.js} +8 -8
- package/dist/cli/{chunk-OQ4JV3IW.js → chunk-TZNQRKDF.js} +1 -1
- package/dist/cli/{chunk-CUMA6DE2.js → chunk-UW5QWTUG.js} +19 -19
- package/dist/cli/{chunk-G6A7CGFV.mjs → chunk-V46UBZBJ.mjs} +6 -3
- package/dist/cli/{chunk-R5PJ6XZI.js → chunk-VIZJIBI4.js} +10 -10
- package/dist/cli/{chunk-Y2RIMVEM.js → chunk-W5I53WQ4.js} +112 -112
- package/dist/cli/{chunk-H7L5MS5E.mjs → chunk-WCQ7JGDV.mjs} +4 -4
- package/dist/cli/{chunk-7KD4IYLA.js → chunk-WE223LFR.js} +19 -19
- package/dist/cli/{chunk-H53YG6QG.mjs → chunk-X2YP36YP.mjs} +1 -1
- package/dist/cli/{chunk-LV2DGEJ3.js → chunk-XEQBYK4B.js} +16 -13
- package/dist/cli/{chunk-5LBXLQRW.js → chunk-YS7AI7R6.js} +108 -108
- package/dist/cli/{chunk-HJ5B67S3.mjs → chunk-YXGTO5XA.mjs} +8 -4
- package/dist/cli/{chunk-54IH5U3I.mjs → chunk-Z3KLCDCB.mjs} +23 -12
- package/dist/cli/{chunk-6OIRN4PC.mjs → chunk-ZFRN3B2R.mjs} +2 -2
- package/dist/cli/{chunk-EO52BKGA.mjs → chunk-ZMCQP4EU.mjs} +11 -11
- package/dist/cli/{chunk-HBL4PM5Q.mjs → chunk-ZPGGW27Q.mjs} +17 -0
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-2BLYUV2G.js → csv-RPR64UBS.js} +15 -15
- package/dist/cli/{csv-ONKAMLL4.mjs → csv-YXK5TB47.mjs} +6 -6
- package/dist/cli/{db-YKT6LEQ3.js → db-KO3JCGRG.js} +36 -36
- package/dist/cli/{db-4GVSGAXL.mjs → db-UQYILAMF.mjs} +9 -9
- package/dist/cli/describe-BPX3U2BF.js +50 -0
- package/dist/cli/describe-P2OK5X2S.mjs +50 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-VFCU5NGH.js → executions-5Z7H7HV3.js} +11 -11
- package/dist/cli/{executions-7OSL25KJ.mjs → executions-IQCRQXVA.mjs} +9 -9
- package/dist/cli/{feedback-ERTOLEC4.js → feedback-EDZJDARP.js} +12 -12
- package/dist/cli/{feedback-RPZELEA5.mjs → feedback-ZO6A4HTV.mjs} +7 -7
- package/dist/cli/{git-XKRQZ4A6.mjs → git-OBXSILWM.mjs} +7 -7
- package/dist/cli/git-Y34J73QC.js +25 -0
- package/dist/cli/index.js +150 -150
- package/dist/cli/index.mjs +46 -46
- package/dist/cli/{legacy-noops-MZCFS2FQ.mjs → legacy-noops-4UJM3FMN.mjs} +8 -8
- package/dist/cli/{legacy-noops-HG3M5HGZ.js → legacy-noops-HKXU2EU6.js} +11 -11
- package/dist/cli/{monitors-MESMMU5P.js → monitors-7EP3Q2DX.js} +110 -110
- package/dist/cli/{monitors-GBO5XAEZ.mjs → monitors-ZXF2KCW7.mjs} +10 -10
- package/dist/cli/{org-DJRNWIPO.mjs → org-EDHCUR6V.mjs} +9 -9
- package/dist/cli/{org-EZPREEWH.js → org-GFGOTUWP.js} +75 -75
- package/dist/cli/{pages-36BHVOFL.mjs → pages-EGEWMPJN.mjs} +9 -9
- package/dist/cli/{pages-ACI7VV6I.js → pages-TLFQQL5S.js} +21 -21
- package/dist/cli/{play-SUSVQHX5.mjs → play-NBO3MPDL.mjs} +22 -22
- package/dist/cli/{play-KCLLAGWR.js → play-XDHJY5R4.js} +392 -392
- package/dist/cli/{providers-MV2YW3J5.mjs → providers-NXJ7WPNH.mjs} +9 -9
- package/dist/cli/{providers-YFO3EFLK.js → providers-RU6BGEDM.js} +12 -12
- package/dist/cli/{quickstart-MATFTZVQ.js → quickstart-4ZZBMZPF.js} +8 -8
- package/dist/cli/{quickstart-KMXU2T3Z.mjs → quickstart-YBNDPNAR.mjs} +6 -6
- package/dist/cli/{run-UW5FM64G.js → run-374CTJBV.js} +46 -46
- package/dist/cli/{run-YRYVGUCJ.mjs → run-LX52KVZM.mjs} +27 -27
- package/dist/cli/{search-WF3Q3I5X.mjs → search-EH6JPV62.mjs} +11 -11
- package/dist/cli/search-YS4DHSQC.js +33 -0
- package/dist/cli/{search-output-BG743WAM.js → search-output-NATLJOWW.js} +9 -9
- package/dist/cli/{search-output-THOAHTCU.mjs → search-output-XIQERUHF.mjs} +7 -7
- package/dist/cli/{secrets-EOGBWN44.js → secrets-A3UXDE5V.js} +18 -18
- package/dist/cli/{secrets-LM7OTAUE.mjs → secrets-VRJQFUKF.mjs} +9 -9
- package/dist/cli/sessions-5TTH5FGZ.mjs +18 -0
- package/dist/cli/sessions-EXII5VOV.js +18 -0
- package/dist/cli/{settings-OWE3EEG7.js → settings-LX5EGLVT.js} +89 -89
- package/dist/cli/{settings-JXTFX5G2.mjs → settings-VRGFTOTJ.mjs} +16 -16
- package/dist/cli/{setup-FG37SKMB.mjs → setup-FXP5Y3Y6.mjs} +12 -12
- package/dist/cli/{setup-Z5BEQKA7.js → setup-QL4YWKOR.js} +52 -52
- package/dist/cli/skills-5L4CYX3V.js +37 -0
- package/dist/cli/{skills-UGNCBZTJ.mjs → skills-ET4PMBJE.mjs} +10 -10
- package/dist/cli/tools-5V77VIUA.js +57 -0
- package/dist/cli/{tools-J3PKLQSL.mjs → tools-WPL3NZAA.mjs} +20 -20
- package/dist/cli/update-G5RSSWM5.js +35 -0
- package/dist/cli/{update-GGZ2XTMZ.mjs → update-OCAHAKL2.mjs} +12 -12
- package/dist/cli/{workflow-AUZCSCZP.js → workflow-CWO3XL4O.js} +20 -20
- package/dist/cli/{workflow-C66BBXHH.mjs → workflow-NPZ2RLQG.mjs} +10 -10
- package/dist/{client-CmlKSBXd.d.ts → client-CQSPuqxh.d.ts} +1 -1
- package/dist/{client-By7bUS8h.d.mts → client-K1g4ab5Y.d.mts} +1 -1
- package/dist/{client-core-BZ3tpY_J.d.mts → client-core-BksGf5Gd.d.mts} +1 -1
- package/dist/{client-core-BM0mKhgp.d.ts → client-core-BlaqOlQ7.d.ts} +1 -1
- package/dist/{compiler-manifest-BeURaD5Y.d.mts → compiler-manifest-BliMS7ax.d.mts} +14 -1
- package/dist/{compiler-manifest-BeURaD5Y.d.ts → compiler-manifest-BliMS7ax.d.ts} +14 -1
- package/dist/{errors-kBuT4kGK.d.mts → errors-BZ6Zq1cz.d.mts} +1 -1
- package/dist/{errors-BoPXPrSy.d.ts → errors-xfNscfS1.d.ts} +1 -1
- package/dist/{index-DC7oRAAC.d.mts → index-DbvCg4zg.d.mts} +1 -1
- package/dist/{index-D0crdGM1.d.ts → index-FGdQv8J8.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +13 -13
- package/dist/index.mjs +9 -9
- package/dist/install-integrity.json +126 -126
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +1 -1
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +3 -3
- package/dist/plays/run-request.mjs +2 -2
- 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 +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +12 -12
- package/dist/server.mjs +6 -6
- package/package.json +1 -1
- package/dist/cli/auth-SM5GLO45.js +0 -43
- package/dist/cli/describe-KPGQP4LH.js +0 -50
- package/dist/cli/describe-PRT2WQMS.mjs +0 -50
- package/dist/cli/git-U353JURQ.js +0 -25
- package/dist/cli/search-4ZQOFG7G.js +0 -33
- package/dist/cli/sessions-GDSJ72XI.js +0 -18
- package/dist/cli/sessions-SP2JL27H.mjs +0 -18
- package/dist/cli/skills-SIX5OTNX.js +0 -37
- package/dist/cli/tools-EZOV37MQ.js +0 -57
- package/dist/cli/update-ISU7YN34.js +0 -35
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkRLI6FDQMjs = require('./chunk-RLI6FDQM.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkQX7WDG4Vjs = require('./chunk-QX7WDG4V.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -46,10 +46,10 @@ var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
|
|
|
46
46
|
var _chunkHGFFYVXNjs = require('./chunk-HGFFYVXN.js');
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
var
|
|
49
|
+
var _chunkPMS3LQ6Bjs = require('./chunk-PMS3LQ6B.js');
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
var
|
|
52
|
+
var _chunkYS7AI7R6js = require('./chunk-YS7AI7R6.js');
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
var _chunkWSGXBROEjs = require('./chunk-WSGXBROE.js');
|
|
@@ -59,18 +59,18 @@ var _chunkWSGXBROEjs = require('./chunk-WSGXBROE.js');
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunkPPYJXP4Zjs = require('./chunk-PPYJXP4Z.js');
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
var
|
|
67
|
+
var _chunkLZROM6VQjs = require('./chunk-LZROM6VQ.js');
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
var
|
|
73
|
+
var _chunkN6Q5SDGAjs = require('./chunk-N6Q5SDGA.js');
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
|
|
@@ -78,15 +78,15 @@ var _chunkRLVSWAWBjs = require('./chunk-RLVSWAWB.js');
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
var
|
|
81
|
+
var _chunkXEQBYK4Bjs = require('./chunk-XEQBYK4B.js');
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
var
|
|
86
|
+
var _chunkQUSYG3VPjs = require('./chunk-QUSYG3VP.js');
|
|
87
87
|
|
|
88
88
|
|
|
89
|
-
var
|
|
89
|
+
var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
|
|
90
90
|
|
|
91
91
|
// src/cli/commands/tools.ts
|
|
92
92
|
var _commander = require('commander');
|
|
@@ -189,10 +189,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
191
|
function pendingToolExecutionPath(input) {
|
|
192
|
-
const config =
|
|
192
|
+
const config = _chunkQUSYG3VPjs.resolveConfig.call(void 0, );
|
|
193
193
|
const fingerprint = _crypto.createHash.call(void 0, "sha256").update(config.baseUrl).update("\0").update(_crypto.createHash.call(void 0, "sha256").update(config.apiKey).digest("hex")).update("\0").update(input.toolId).update("\0").update(_chunkWSGXBROEjs.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
|
|
194
194
|
return _path.join.call(void 0,
|
|
195
|
-
|
|
195
|
+
_chunkQUSYG3VPjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
196
196
|
`${PENDING_PREFIX}${fingerprint}.json`
|
|
197
197
|
);
|
|
198
198
|
}
|
|
@@ -506,13 +506,13 @@ function categoryEnumerationRender(summaries) {
|
|
|
506
506
|
};
|
|
507
507
|
}
|
|
508
508
|
async function listToolCategories(emitJson, compact) {
|
|
509
|
-
const client = new (0,
|
|
509
|
+
const client = new (0, _chunkPMS3LQ6Bjs.DeeplineClient)();
|
|
510
510
|
if (!emitJson) {
|
|
511
511
|
const summaries2 = (await client.listToolCategories()).map((category) => ({
|
|
512
512
|
...category,
|
|
513
513
|
description: describeToolCategory(category.name)
|
|
514
514
|
}));
|
|
515
|
-
|
|
515
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
|
|
516
516
|
{ categories: summaries2, render: categoryEnumerationRender(summaries2) },
|
|
517
517
|
{ json: false }
|
|
518
518
|
);
|
|
@@ -522,7 +522,7 @@ async function listToolCategories(emitJson, compact) {
|
|
|
522
522
|
const items = rawTools.map(toListedTool);
|
|
523
523
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
524
524
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
525
|
-
|
|
525
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
|
|
526
526
|
{
|
|
527
527
|
tools: outputItems,
|
|
528
528
|
count: outputItems.length,
|
|
@@ -541,7 +541,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
541
541
|
const known = summaries.map((item) => item.name);
|
|
542
542
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
543
543
|
if (emitJson) {
|
|
544
|
-
|
|
544
|
+
_chunkXEQBYK4Bjs.printJson.call(void 0, {
|
|
545
545
|
ok: false,
|
|
546
546
|
exitCode: 4,
|
|
547
547
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -555,13 +555,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
555
555
|
const render = categoryEnumerationRender(summaries);
|
|
556
556
|
console.error(message);
|
|
557
557
|
console.error("");
|
|
558
|
-
console.error(
|
|
558
|
+
console.error(_chunkXEQBYK4Bjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
559
559
|
console.error("");
|
|
560
560
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
561
561
|
return 4;
|
|
562
562
|
}
|
|
563
563
|
async function listToolsInCategory(category, emitJson) {
|
|
564
|
-
const client = new (0,
|
|
564
|
+
const client = new (0, _chunkPMS3LQ6Bjs.DeeplineClient)();
|
|
565
565
|
const { tools: rawTools, categories } = await client.listToolsInCategory(category);
|
|
566
566
|
const summaries = categories.map((item) => ({
|
|
567
567
|
...item,
|
|
@@ -597,7 +597,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
597
597
|
}
|
|
598
598
|
]
|
|
599
599
|
};
|
|
600
|
-
|
|
600
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
|
|
601
601
|
{
|
|
602
602
|
category,
|
|
603
603
|
total: rows.length,
|
|
@@ -610,7 +610,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
610
610
|
return 0;
|
|
611
611
|
}
|
|
612
612
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
613
|
-
const client = new (0,
|
|
613
|
+
const client = new (0, _chunkPMS3LQ6Bjs.DeeplineClient)();
|
|
614
614
|
const items = (await client.listTools({
|
|
615
615
|
categories: requestedCategories.join(","),
|
|
616
616
|
compact
|
|
@@ -639,7 +639,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
639
639
|
]
|
|
640
640
|
};
|
|
641
641
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
642
|
-
|
|
642
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
|
|
643
643
|
{
|
|
644
644
|
tools: outputItems,
|
|
645
645
|
count: outputItems.length,
|
|
@@ -658,13 +658,13 @@ async function listTools(category, options = {}) {
|
|
|
658
658
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]), () => ( ""));
|
|
659
659
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
660
660
|
const compact = options.compact !== false;
|
|
661
|
-
const emitJson = options.json === true ||
|
|
661
|
+
const emitJson = options.json === true || _chunkXEQBYK4Bjs.shouldEmitJson.call(void 0, );
|
|
662
662
|
if (positional && flagCategories.length > 0) {
|
|
663
663
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
664
664
|
if (!flagIsSameSingle) {
|
|
665
665
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
666
666
|
if (emitJson) {
|
|
667
|
-
|
|
667
|
+
_chunkXEQBYK4Bjs.printJson.call(void 0, {
|
|
668
668
|
ok: false,
|
|
669
669
|
exitCode: 2,
|
|
670
670
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -691,7 +691,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
691
691
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
692
692
|
return 1;
|
|
693
693
|
}
|
|
694
|
-
const client = new (0,
|
|
694
|
+
const client = new (0, _chunkPMS3LQ6Bjs.DeeplineClient)();
|
|
695
695
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
696
696
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
697
697
|
const jsonOutput = options.json === true;
|
|
@@ -715,7 +715,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
715
715
|
query,
|
|
716
716
|
mode
|
|
717
717
|
}) : null;
|
|
718
|
-
|
|
718
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
|
|
719
719
|
{
|
|
720
720
|
tools: outputTools,
|
|
721
721
|
count: outputTools.length,
|
|
@@ -733,7 +733,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
733
733
|
} : {},
|
|
734
734
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
735
735
|
},
|
|
736
|
-
{ json: options.json ||
|
|
736
|
+
{ json: options.json || _chunkXEQBYK4Bjs.shouldEmitJson.call(void 0, ) }
|
|
737
737
|
);
|
|
738
738
|
return 0;
|
|
739
739
|
}
|
|
@@ -776,7 +776,7 @@ async function findPlayForToolId(client, toolId, cliInvocationId) {
|
|
|
776
776
|
return _nullishCoalesce(plays.find((play) => playIdentifiers(play).includes(requested)), () => ( null));
|
|
777
777
|
}
|
|
778
778
|
function isMissingToolMetadataError(error) {
|
|
779
|
-
return error instanceof
|
|
779
|
+
return error instanceof _chunkSQWET4SLjs.DeeplineError && error.statusCode === 404;
|
|
780
780
|
}
|
|
781
781
|
function playAliasToolErrorMessage(toolId, play) {
|
|
782
782
|
const playName = _nullishCoalesce(play.reference, () => ( play.name));
|
|
@@ -848,10 +848,10 @@ Output:
|
|
|
848
848
|
).option("--json", "Print JSON without credential values").action(
|
|
849
849
|
async (provider, options) => {
|
|
850
850
|
if (options.link) {
|
|
851
|
-
const link = await new (0,
|
|
851
|
+
const link = await new (0, _chunkPMS3LQ6Bjs.DeeplineClient)().getIntegrationConnectLink(
|
|
852
852
|
provider
|
|
853
853
|
);
|
|
854
|
-
if (
|
|
854
|
+
if (_chunkXEQBYK4Bjs.shouldEmitJson.call(void 0, options.json)) console.log(JSON.stringify(link));
|
|
855
855
|
else console.log(link.connect_url);
|
|
856
856
|
return;
|
|
857
857
|
}
|
|
@@ -861,7 +861,7 @@ Output:
|
|
|
861
861
|
if (options.preset !== void 0 && (options.scopes !== void 0 || options.optionalScopes !== void 0))
|
|
862
862
|
throw new Error("Use --preset or individual scopes, not both.");
|
|
863
863
|
const splitScopes = (value) => value.split(",").map((scope) => scope.trim()).filter(Boolean);
|
|
864
|
-
const result2 = await new (0,
|
|
864
|
+
const result2 = await new (0, _chunkPMS3LQ6Bjs.DeeplineClient)().startIntegrationOAuth(
|
|
865
865
|
provider,
|
|
866
866
|
{
|
|
867
867
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
@@ -873,7 +873,7 @@ Output:
|
|
|
873
873
|
throw new Error(
|
|
874
874
|
"The API did not return an OAuth authorization URL."
|
|
875
875
|
);
|
|
876
|
-
if (
|
|
876
|
+
if (_chunkXEQBYK4Bjs.shouldEmitJson.call(void 0, options.json))
|
|
877
877
|
console.log(
|
|
878
878
|
JSON.stringify({ provider, redirect_url: result2.redirect_url })
|
|
879
879
|
);
|
|
@@ -899,7 +899,7 @@ Output:
|
|
|
899
899
|
"--credentials-file must contain a nonempty JSON object of string credential values."
|
|
900
900
|
);
|
|
901
901
|
}
|
|
902
|
-
const result = await new (0,
|
|
902
|
+
const result = await new (0, _chunkPMS3LQ6Bjs.DeeplineClient)().setIntegrationCredentials(
|
|
903
903
|
provider,
|
|
904
904
|
credentials
|
|
905
905
|
);
|
|
@@ -909,7 +909,7 @@ Output:
|
|
|
909
909
|
);
|
|
910
910
|
}
|
|
911
911
|
const confirmation = { provider, credential_saved: true };
|
|
912
|
-
if (
|
|
912
|
+
if (_chunkXEQBYK4Bjs.shouldEmitJson.call(void 0, options.json))
|
|
913
913
|
console.log(JSON.stringify(confirmation));
|
|
914
914
|
else
|
|
915
915
|
console.log(
|
|
@@ -949,7 +949,7 @@ Examples:
|
|
|
949
949
|
json: Boolean(options.json)
|
|
950
950
|
});
|
|
951
951
|
});
|
|
952
|
-
|
|
952
|
+
_chunkQX7WDG4Vjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
953
953
|
tools.command("grep <query>").description(
|
|
954
954
|
"Regex grep over tool ids, descriptions, categories, and input fields."
|
|
955
955
|
).addHelpText(
|
|
@@ -984,7 +984,7 @@ Examples:
|
|
|
984
984
|
});
|
|
985
985
|
const addToolMetadataCommand = (command) => {
|
|
986
986
|
let compatibilityMetadata;
|
|
987
|
-
|
|
987
|
+
_chunkPPYJXP4Zjs.registerCompatibilityCatalog.call(void 0, command, () => ({
|
|
988
988
|
toolId: command.args[0],
|
|
989
989
|
acceptMetadata: (metadata) => {
|
|
990
990
|
compatibilityMetadata = metadata;
|
|
@@ -1054,7 +1054,7 @@ Examples:
|
|
|
1054
1054
|
process.exitCode = await narrowView();
|
|
1055
1055
|
return;
|
|
1056
1056
|
}
|
|
1057
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
1057
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-BPX3U2BF.js")));
|
|
1058
1058
|
process.exitCode = await describeAnything(
|
|
1059
1059
|
toolId,
|
|
1060
1060
|
{
|
|
@@ -1069,7 +1069,7 @@ Examples:
|
|
|
1069
1069
|
});
|
|
1070
1070
|
};
|
|
1071
1071
|
addToolMetadataCommand(
|
|
1072
|
-
|
|
1072
|
+
_chunkRLI6FDQMjs.addDescribeOptions.call(void 0,
|
|
1073
1073
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
1074
1074
|
{ json: false }
|
|
1075
1075
|
)
|
|
@@ -1138,7 +1138,7 @@ Examples:
|
|
|
1138
1138
|
options,
|
|
1139
1139
|
void 0,
|
|
1140
1140
|
true,
|
|
1141
|
-
|
|
1141
|
+
_chunkLZROM6VQjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
1142
1142
|
);
|
|
1143
1143
|
}
|
|
1144
1144
|
);
|
|
@@ -1146,13 +1146,13 @@ Examples:
|
|
|
1146
1146
|
function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
1147
1147
|
let metadata;
|
|
1148
1148
|
const startedAt = performance.now();
|
|
1149
|
-
const baseUrl =
|
|
1150
|
-
|
|
1151
|
-
const result =
|
|
1149
|
+
const baseUrl = _chunkQUSYG3VPjs.resolveConfig.call(void 0, ).baseUrl;
|
|
1150
|
+
_chunkLZROM6VQjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1151
|
+
const result = _chunkPPYJXP4Zjs.runToolExecuteStage.call(void 0,
|
|
1152
1152
|
"SDK compatibility",
|
|
1153
|
-
() =>
|
|
1153
|
+
() => _chunkN6Q5SDGAjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1154
1154
|
command: "tools execute",
|
|
1155
|
-
skillsVersion:
|
|
1155
|
+
skillsVersion: _chunkQUSYG3VPjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
1156
1156
|
persistCache: false,
|
|
1157
1157
|
timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
|
|
1158
1158
|
catalog: {
|
|
@@ -1166,7 +1166,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1166
1166
|
})
|
|
1167
1167
|
).then(
|
|
1168
1168
|
(compatibility) => {
|
|
1169
|
-
|
|
1169
|
+
_chunkLZROM6VQjs.recordCliTrace.call(void 0, {
|
|
1170
1170
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1171
1171
|
ms: performance.now() - startedAt,
|
|
1172
1172
|
ok: compatibility.error === null,
|
|
@@ -1175,7 +1175,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1175
1175
|
return compatibility;
|
|
1176
1176
|
},
|
|
1177
1177
|
(error) => {
|
|
1178
|
-
|
|
1178
|
+
_chunkLZROM6VQjs.recordCliTrace.call(void 0, {
|
|
1179
1179
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1180
1180
|
ms: performance.now() - startedAt,
|
|
1181
1181
|
ok: false
|
|
@@ -1190,7 +1190,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1190
1190
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1191
1191
|
return 1;
|
|
1192
1192
|
}
|
|
1193
|
-
const client = new (0,
|
|
1193
|
+
const client = new (0, _chunkPMS3LQ6Bjs.DeeplineClient)();
|
|
1194
1194
|
let tool;
|
|
1195
1195
|
try {
|
|
1196
1196
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1244,7 +1244,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1244
1244
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1245
1245
|
if (inferenceQuote)
|
|
1246
1246
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1247
|
-
|
|
1247
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
|
|
1248
1248
|
{
|
|
1249
1249
|
toolId: String(tool.toolId || toolId),
|
|
1250
1250
|
cost: _chunkBN5VKY4Xjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
@@ -1267,7 +1267,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1267
1267
|
void 0,
|
|
1268
1268
|
seedToolListScript
|
|
1269
1269
|
);
|
|
1270
|
-
|
|
1270
|
+
_chunkXEQBYK4Bjs.printCompactJson.call(void 0, {
|
|
1271
1271
|
toolId: contract.toolId,
|
|
1272
1272
|
...options.schemaOnly ? {
|
|
1273
1273
|
inputSchema: contract.inputSchema,
|
|
@@ -1290,7 +1290,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1290
1290
|
return 0;
|
|
1291
1291
|
}
|
|
1292
1292
|
if (options.contractJson) {
|
|
1293
|
-
|
|
1293
|
+
_chunkXEQBYK4Bjs.printCompactJson.call(void 0, {
|
|
1294
1294
|
..._chunkBN5VKY4Xjs.toolContractJsonForDescribe.call(void 0,
|
|
1295
1295
|
tool,
|
|
1296
1296
|
toolId,
|
|
@@ -1304,7 +1304,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1304
1304
|
}
|
|
1305
1305
|
const emitJson = options.json === true;
|
|
1306
1306
|
if (emitJson) {
|
|
1307
|
-
|
|
1307
|
+
_chunkXEQBYK4Bjs.printCompactJson.call(void 0, {
|
|
1308
1308
|
..._chunkBN5VKY4Xjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
|
|
1309
1309
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1310
1310
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -2167,7 +2167,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2167
2167
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2168
2168
|
}
|
|
2169
2169
|
if (options.idempotencyKey !== void 0) {
|
|
2170
|
-
|
|
2170
|
+
_chunkYS7AI7R6js.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2171
2171
|
}
|
|
2172
2172
|
if (options.recoveryTimeoutMs !== void 0) {
|
|
2173
2173
|
const parsed = Number(options.recoveryTimeoutMs);
|
|
@@ -2482,7 +2482,7 @@ function printToolExecutionWarnings(toolId, params, metadata) {
|
|
|
2482
2482
|
}
|
|
2483
2483
|
function assertExecutableToolMetadata(toolId, metadata) {
|
|
2484
2484
|
if (_chunkBN5VKY4Xjs.isPlayLikeTool.call(void 0, metadata)) {
|
|
2485
|
-
throw new (0,
|
|
2485
|
+
throw new (0, _chunkSQWET4SLjs.DeeplineError)(
|
|
2486
2486
|
playLikeToolExecuteErrorMessage(
|
|
2487
2487
|
toolId,
|
|
2488
2488
|
metadata
|
|
@@ -2546,7 +2546,7 @@ function writeToolReceipt(input) {
|
|
|
2546
2546
|
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;
|
|
2547
2547
|
const status = typeof envelope.status === "string" ? envelope.status : "completed";
|
|
2548
2548
|
const charged = _chunkBN5VKY4Xjs.recordField.call(void 0, envelope, "billing").credits_charged;
|
|
2549
|
-
|
|
2549
|
+
_chunkRLI6FDQMjs.writeExecutionOutput.call(void 0,
|
|
2550
2550
|
{
|
|
2551
2551
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2552
2552
|
status,
|
|
@@ -2577,8 +2577,8 @@ async function executeToolForReceipt(input) {
|
|
|
2577
2577
|
let retryKey = null;
|
|
2578
2578
|
let received = false;
|
|
2579
2579
|
try {
|
|
2580
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2581
|
-
const client = new (0,
|
|
2580
|
+
const cliInvocationId = _nullishCoalesce(_chunkPPYJXP4Zjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkPPYJXP4Zjs.beginToolExecuteCommand.call(void 0, )));
|
|
2581
|
+
const client = new (0, _chunkPMS3LQ6Bjs.DeeplineClient)();
|
|
2582
2582
|
const metadata = assertExecutableToolMetadata(
|
|
2583
2583
|
toolId,
|
|
2584
2584
|
await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
|
|
@@ -2599,9 +2599,9 @@ async function executeToolForReceipt(input) {
|
|
|
2599
2599
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2600
2600
|
..._optionalChain([metadata, 'access', _35 => _35.executionMetadata, 'optionalAccess', _36 => _36.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2601
2601
|
...key ? { idempotencyKey: key } : {},
|
|
2602
|
-
searchRef:
|
|
2602
|
+
searchRef: _chunkQX7WDG4Vjs.recentSearchRef.call(void 0, toolId),
|
|
2603
2603
|
cliInvocationId,
|
|
2604
|
-
onResponseReceived:
|
|
2604
|
+
onResponseReceived: _chunkRLI6FDQMjs.recordApiResponse
|
|
2605
2605
|
}).catch((error) => {
|
|
2606
2606
|
const guidance = toolGuidanceLines(metadata.guidance);
|
|
2607
2607
|
if (guidance.length)
|
|
@@ -2624,13 +2624,13 @@ async function executeToolForReceipt(input) {
|
|
|
2624
2624
|
if (received) throw error;
|
|
2625
2625
|
const outcomeKnown = answeredWithFailure(error);
|
|
2626
2626
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _37 => _37.discard, 'call', _38 => _38()]);
|
|
2627
|
-
|
|
2627
|
+
_chunkRLI6FDQMjs.writeExecutionOutput.call(void 0,
|
|
2628
2628
|
{
|
|
2629
2629
|
id: outcomeKnown ? null : key,
|
|
2630
2630
|
status: "failed",
|
|
2631
2631
|
error: {
|
|
2632
2632
|
message: error instanceof Error ? error.message : String(error),
|
|
2633
|
-
...error instanceof
|
|
2633
|
+
...error instanceof _chunkSQWET4SLjs.DeeplineError ? { code: error.code } : {}
|
|
2634
2634
|
},
|
|
2635
2635
|
...key && !outcomeKnown ? {
|
|
2636
2636
|
next: {
|
|
@@ -2644,15 +2644,15 @@ async function executeToolForReceipt(input) {
|
|
|
2644
2644
|
}
|
|
2645
2645
|
}
|
|
2646
2646
|
function answeredWithFailure(error) {
|
|
2647
|
-
return error instanceof
|
|
2647
|
+
return error instanceof _chunkSQWET4SLjs.DeeplineError && typeof error.statusCode === "number" && error.statusCode < 500 && // A request timeout says nothing about whether the call went through.
|
|
2648
2648
|
error.statusCode !== 408 && error.code !== "EXECUTION_OUTCOME_UNKNOWN";
|
|
2649
2649
|
}
|
|
2650
2650
|
async function getToolExecutionReceipt(key, output) {
|
|
2651
|
-
const client = new (0,
|
|
2651
|
+
const client = new (0, _chunkPMS3LQ6Bjs.DeeplineClient)();
|
|
2652
2652
|
const execution = await client.executions.getByKey(key);
|
|
2653
2653
|
output.label = `${execution.toolId} (tool)`;
|
|
2654
2654
|
if (execution.response === void 0) {
|
|
2655
|
-
|
|
2655
|
+
_chunkRLI6FDQMjs.writeExecutionOutput.call(void 0,
|
|
2656
2656
|
{
|
|
2657
2657
|
id: key,
|
|
2658
2658
|
status: execution.executionRecovery.state,
|
|
@@ -2681,19 +2681,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2681
2681
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2682
2682
|
} catch (error) {
|
|
2683
2683
|
if (wantsJson) {
|
|
2684
|
-
|
|
2684
|
+
_chunkXEQBYK4Bjs.printJsonError.call(void 0, error);
|
|
2685
2685
|
} else {
|
|
2686
2686
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2687
2687
|
}
|
|
2688
|
-
return error instanceof
|
|
2688
|
+
return error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2689
2689
|
}
|
|
2690
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2690
|
+
const cliInvocationId = _nullishCoalesce(_chunkPPYJXP4Zjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkPPYJXP4Zjs.beginToolExecuteCommand.call(void 0, )));
|
|
2691
2691
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2692
|
-
const tracing =
|
|
2692
|
+
const tracing = _chunkLZROM6VQjs.isCliTraceEnabled.call(void 0, );
|
|
2693
2693
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2694
|
-
const client = new (0,
|
|
2694
|
+
const client = new (0, _chunkPMS3LQ6Bjs.DeeplineClient)();
|
|
2695
2695
|
if (clientStartedAt !== void 0) {
|
|
2696
|
-
|
|
2696
|
+
_chunkLZROM6VQjs.recordCliTrace.call(void 0, {
|
|
2697
2697
|
phase: "cli.tool_execute_client_setup",
|
|
2698
2698
|
ms: performance.now() - clientStartedAt
|
|
2699
2699
|
});
|
|
@@ -2702,18 +2702,18 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2702
2702
|
const readMetadata = async () => {
|
|
2703
2703
|
if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2704
2704
|
try {
|
|
2705
|
-
metadata = await
|
|
2705
|
+
metadata = await _chunkPPYJXP4Zjs.runToolExecuteStage.call(void 0,
|
|
2706
2706
|
"tool metadata lookup",
|
|
2707
2707
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2708
2708
|
);
|
|
2709
2709
|
} catch (error) {
|
|
2710
2710
|
if (isMissingToolMetadataError(error)) {
|
|
2711
|
-
const play = await
|
|
2711
|
+
const play = await _chunkPPYJXP4Zjs.runToolExecuteStage.call(void 0,
|
|
2712
2712
|
"play alias lookup",
|
|
2713
2713
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2714
2714
|
);
|
|
2715
2715
|
if (play) {
|
|
2716
|
-
throw new (0,
|
|
2716
|
+
throw new (0, _chunkSQWET4SLjs.DeeplineError)(
|
|
2717
2717
|
playAliasToolErrorMessage(parsed.toolId, play),
|
|
2718
2718
|
400,
|
|
2719
2719
|
"PLAY_ALIAS_USED_AS_TOOL"
|
|
@@ -2736,8 +2736,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2736
2736
|
try {
|
|
2737
2737
|
assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2738
2738
|
} catch (error) {
|
|
2739
|
-
if (error instanceof
|
|
2740
|
-
if (wantsJson)
|
|
2739
|
+
if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2740
|
+
if (wantsJson) _chunkXEQBYK4Bjs.printJsonError.call(void 0, error);
|
|
2741
2741
|
else console.error(error.message);
|
|
2742
2742
|
return 2;
|
|
2743
2743
|
}
|
|
@@ -2748,8 +2748,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2748
2748
|
try {
|
|
2749
2749
|
metadata = await readMetadata();
|
|
2750
2750
|
} catch (error) {
|
|
2751
|
-
if (error instanceof
|
|
2752
|
-
if (wantsJson)
|
|
2751
|
+
if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2752
|
+
if (wantsJson) _chunkXEQBYK4Bjs.printJsonError.call(void 0, error);
|
|
2753
2753
|
else console.error(error.message);
|
|
2754
2754
|
return 2;
|
|
2755
2755
|
}
|
|
@@ -2764,8 +2764,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2764
2764
|
try {
|
|
2765
2765
|
metadata = await readMetadata();
|
|
2766
2766
|
} catch (error) {
|
|
2767
|
-
if (error instanceof
|
|
2768
|
-
if (wantsJson)
|
|
2767
|
+
if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2768
|
+
if (wantsJson) _chunkXEQBYK4Bjs.printJsonError.call(void 0, error);
|
|
2769
2769
|
else console.error(error.message);
|
|
2770
2770
|
return 2;
|
|
2771
2771
|
}
|
|
@@ -2791,11 +2791,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2791
2791
|
responseIntent,
|
|
2792
2792
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2793
2793
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2794
|
-
searchRef:
|
|
2794
|
+
searchRef: _chunkQX7WDG4Vjs.recentSearchRef.call(void 0, parsed.toolId),
|
|
2795
2795
|
cliInvocationId,
|
|
2796
|
-
onResponseReceived:
|
|
2796
|
+
onResponseReceived: _chunkRLI6FDQMjs.recordApiResponse,
|
|
2797
2797
|
...tracing ? {
|
|
2798
|
-
onServerTiming: (serverTiming) =>
|
|
2798
|
+
onServerTiming: (serverTiming) => _chunkLZROM6VQjs.recordCliTrace.call(void 0, {
|
|
2799
2799
|
phase: "tool_execute_server_timing",
|
|
2800
2800
|
cliInvocationId,
|
|
2801
2801
|
serverTiming,
|
|
@@ -2806,13 +2806,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2806
2806
|
let rawResponse;
|
|
2807
2807
|
let successfulCompatibilityResponse;
|
|
2808
2808
|
try {
|
|
2809
|
-
const executeResult = await
|
|
2809
|
+
const executeResult = await _chunkPPYJXP4Zjs.runToolExecuteStage.call(void 0,
|
|
2810
2810
|
"execute request",
|
|
2811
2811
|
async () => {
|
|
2812
2812
|
try {
|
|
2813
2813
|
if (tracing) {
|
|
2814
2814
|
submissionStartedAt = performance.now();
|
|
2815
|
-
|
|
2815
|
+
_chunkLZROM6VQjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2816
2816
|
}
|
|
2817
2817
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2818
2818
|
...executeOptions,
|
|
@@ -2820,36 +2820,36 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2820
2820
|
..._optionalChain([metadata, 'optionalAccess', _42 => _42.executionMetadata, 'optionalAccess', _43 => _43.retrySafeAmbiguousDelivery]) === true ? { retryAmbiguousDelivery: true } : {}
|
|
2821
2821
|
});
|
|
2822
2822
|
} catch (error) {
|
|
2823
|
-
if (!(error instanceof
|
|
2823
|
+
if (!(error instanceof _chunkSQWET4SLjs.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2824
2824
|
throw error;
|
|
2825
|
-
const baseUrl =
|
|
2825
|
+
const baseUrl = _chunkQUSYG3VPjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2826
2826
|
if (maintenancePolicy !== "off") {
|
|
2827
|
-
|
|
2827
|
+
_chunkN6Q5SDGAjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2828
2828
|
}
|
|
2829
|
-
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await
|
|
2829
|
+
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await _chunkPPYJXP4Zjs.runToolExecuteStage.call(void 0,
|
|
2830
2830
|
"SDK compatibility",
|
|
2831
|
-
() =>
|
|
2831
|
+
() => _chunkN6Q5SDGAjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
2832
2832
|
command: "tools execute",
|
|
2833
|
-
skillsVersion:
|
|
2833
|
+
skillsVersion: _chunkQUSYG3VPjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2834
2834
|
persistCache: maintenancePolicy !== "off"
|
|
2835
2835
|
})
|
|
2836
2836
|
);
|
|
2837
2837
|
if (compatibility.error) throw compatibility.error;
|
|
2838
2838
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _44 => _44.readMetadata, 'call', _45 => _45()]), () => ( metadata));
|
|
2839
|
-
if (maintenancePolicy !== "off" && await
|
|
2839
|
+
if (maintenancePolicy !== "off" && await _chunkPPYJXP4Zjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2840
2840
|
compatibility.response,
|
|
2841
2841
|
baseUrl,
|
|
2842
2842
|
maintenancePolicy
|
|
2843
2843
|
)) {
|
|
2844
2844
|
return void 0;
|
|
2845
2845
|
}
|
|
2846
|
-
|
|
2846
|
+
_chunkN6Q5SDGAjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
2847
2847
|
quietAdvisory: wantsJson
|
|
2848
2848
|
});
|
|
2849
2849
|
if (maintenancePolicy !== "off") {
|
|
2850
|
-
await
|
|
2850
|
+
await _chunkPPYJXP4Zjs.runToolExecuteStage.call(void 0,
|
|
2851
2851
|
"agent skills sync",
|
|
2852
|
-
() =>
|
|
2852
|
+
() => _chunkN6Q5SDGAjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2853
2853
|
update: _optionalChain([compatibility, 'access', _46 => _46.response, 'optionalAccess', _47 => _47.skills]),
|
|
2854
2854
|
mode: "detached"
|
|
2855
2855
|
})
|
|
@@ -2858,7 +2858,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2858
2858
|
const legacyMetadata = await readMetadata();
|
|
2859
2859
|
if (tracing) {
|
|
2860
2860
|
submissionStartedAt = performance.now();
|
|
2861
|
-
|
|
2861
|
+
_chunkLZROM6VQjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2862
2862
|
}
|
|
2863
2863
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2864
2864
|
...executeOptions,
|
|
@@ -2879,10 +2879,10 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2879
2879
|
compatibilityReadFailed = true;
|
|
2880
2880
|
}
|
|
2881
2881
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2882
|
-
const updateRequiredBeforeExecution = error instanceof
|
|
2882
|
+
const updateRequiredBeforeExecution = error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2883
2883
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2884
|
-
const baseUrl =
|
|
2885
|
-
if (await
|
|
2884
|
+
const baseUrl = _chunkQUSYG3VPjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2885
|
+
if (await _chunkPPYJXP4Zjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2886
2886
|
compatibility.response,
|
|
2887
2887
|
baseUrl,
|
|
2888
2888
|
maintenancePolicy
|
|
@@ -2891,22 +2891,22 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2891
2891
|
}
|
|
2892
2892
|
}
|
|
2893
2893
|
}
|
|
2894
|
-
if (error instanceof
|
|
2894
|
+
if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.code === "SDK_UPDATE_REQUIRED")
|
|
2895
2895
|
throw error;
|
|
2896
2896
|
let failure = error;
|
|
2897
|
-
if (!(failure instanceof
|
|
2897
|
+
if (!(failure instanceof _chunkSQWET4SLjs.DeeplineError) || failure.code !== "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2898
2898
|
const warningPreflightWasAvailable = !deferredCompatibility || !compatibilityReadFailed && !_optionalChain([compatibility, 'optionalAccess', _50 => _50.error]);
|
|
2899
2899
|
if (metadata || warningPreflightWasAvailable) {
|
|
2900
2900
|
try {
|
|
2901
2901
|
await readMetadata();
|
|
2902
2902
|
} catch (diagnosticError) {
|
|
2903
|
-
if (diagnosticError instanceof
|
|
2903
|
+
if (diagnosticError instanceof _chunkSQWET4SLjs.DeeplineError && diagnosticError.code === "PLAY_ALIAS_USED_AS_TOOL")
|
|
2904
2904
|
failure = diagnosticError;
|
|
2905
2905
|
}
|
|
2906
2906
|
}
|
|
2907
2907
|
}
|
|
2908
|
-
if (failure instanceof
|
|
2909
|
-
if (wantsJson)
|
|
2908
|
+
if (failure instanceof _chunkSQWET4SLjs.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2909
|
+
if (wantsJson) _chunkXEQBYK4Bjs.printJsonError.call(void 0, failure);
|
|
2910
2910
|
else console.error(failure.message);
|
|
2911
2911
|
return 2;
|
|
2912
2912
|
}
|
|
@@ -2933,9 +2933,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2933
2933
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
2934
2934
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _54 => _54.auto_update]);
|
|
2935
2935
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _55 => _55.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
2936
|
-
await
|
|
2936
|
+
await _chunkPPYJXP4Zjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2937
2937
|
compatibilityResponse,
|
|
2938
|
-
|
|
2938
|
+
_chunkQUSYG3VPjs.resolveConfig.call(void 0, ).baseUrl,
|
|
2939
2939
|
maintenancePolicy
|
|
2940
2940
|
);
|
|
2941
2941
|
}
|
|
@@ -2970,7 +2970,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2970
2970
|
const { _metadata, ...execution } = rawResponse;
|
|
2971
2971
|
rawResponse = execution;
|
|
2972
2972
|
}
|
|
2973
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
2973
|
+
const { listConversion, summary, baseEnvelope } = await _chunkPPYJXP4Zjs.runToolExecuteStage.call(void 0,
|
|
2974
2974
|
"result formatting",
|
|
2975
2975
|
async () => {
|
|
2976
2976
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -3005,9 +3005,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3005
3005
|
}
|
|
3006
3006
|
skillsSyncAttempted = true;
|
|
3007
3007
|
try {
|
|
3008
|
-
await
|
|
3008
|
+
await _chunkPPYJXP4Zjs.runToolExecuteStage.call(void 0,
|
|
3009
3009
|
"agent skills sync",
|
|
3010
|
-
() =>
|
|
3010
|
+
() => _chunkN6Q5SDGAjs.syncSdkSkillsIfNeeded.call(void 0, _chunkQUSYG3VPjs.resolveConfig.call(void 0, ).baseUrl, {
|
|
3011
3011
|
update: deliveredCompatibilityResponse.skills,
|
|
3012
3012
|
mode: "detached"
|
|
3013
3013
|
})
|
|
@@ -3018,15 +3018,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3018
3018
|
);
|
|
3019
3019
|
}
|
|
3020
3020
|
};
|
|
3021
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
3021
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0, envelope, {
|
|
3022
3022
|
...options2,
|
|
3023
3023
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
3024
3024
|
});
|
|
3025
3025
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
3026
3026
|
await syncSkillsForDeliveredOutput();
|
|
3027
|
-
|
|
3027
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
3028
3028
|
};
|
|
3029
|
-
const delivered = await
|
|
3029
|
+
const delivered = await _chunkPPYJXP4Zjs.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
3030
3030
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
3031
3031
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
3032
3032
|
return true;
|
|
@@ -3055,7 +3055,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3055
3055
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3056
3056
|
);
|
|
3057
3057
|
if (wantsJson) {
|
|
3058
|
-
|
|
3058
|
+
_chunkXEQBYK4Bjs.printJsonError.call(void 0, error);
|
|
3059
3059
|
} else {
|
|
3060
3060
|
console.error(error.message);
|
|
3061
3061
|
}
|
|
@@ -3150,13 +3150,13 @@ inspect: ${inspection.inspect}
|
|
|
3150
3150
|
return true;
|
|
3151
3151
|
});
|
|
3152
3152
|
if (delivered) {
|
|
3153
|
-
await
|
|
3153
|
+
await _chunkPPYJXP4Zjs.runToolExecuteStage.call(void 0,
|
|
3154
3154
|
"acknowledge delivery",
|
|
3155
3155
|
() => recovery.acknowledgeDelivery()
|
|
3156
3156
|
);
|
|
3157
3157
|
}
|
|
3158
3158
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3159
|
-
|
|
3159
|
+
_chunkN6Q5SDGAjs.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3160
3160
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _58 => _58.auto_update, 'optionalAccess', _59 => _59.should_auto_update]) === true
|
|
3161
3161
|
});
|
|
3162
3162
|
}
|