@wirecat/mail-cli 0.6.0 → 0.7.0
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/CHANGELOG.md +42 -0
- package/README.md +8 -4
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-GBFTKUHA.js → all-profiles-SI67TKZM.js} +6 -6
- package/dist/bundle/{anthropic-PTSCWUG6.js → anthropic-DALMLC3Y.js} +4 -4
- package/dist/bundle/{app-server-5VJ2WCKJ.js → app-server-XOH327Z2.js} +41 -41
- package/dist/bundle/{bun-2KRUBPIN.js → bun-ORL67CJ6.js} +2 -2
- package/dist/bundle/{bun-sqlite-ELSRSJBM.js → bun-sqlite-DGXFNFHI.js} +3 -3
- package/dist/bundle/{chunk-B337KHJ5.js → chunk-23IEVVL2.js} +1 -1
- package/dist/bundle/{chunk-PKU6V4EQ.js → chunk-2M4K7HYR.js} +16 -16
- package/dist/bundle/{chunk-RDSAI6DC.js → chunk-35KD2CI2.js} +349 -254
- package/dist/bundle/{chunk-J4C32YKH.js → chunk-3GZK5GTU.js} +1 -1
- package/dist/bundle/{chunk-OHV5RDFE.js → chunk-3TYEJRMZ.js} +3 -3
- package/dist/bundle/{chunk-AGX7NR3S.js → chunk-45KA5667.js} +12 -12
- package/dist/bundle/{chunk-YBJMBPL7.js → chunk-4NYWHINR.js} +5 -5
- package/dist/bundle/{chunk-JKLQHPED.js → chunk-4ULY3GDL.js} +9 -9
- package/dist/bundle/{chunk-O555ZEQR.js → chunk-5BSEGMNE.js} +3 -3
- package/dist/bundle/{chunk-ZPGLWMNH.js → chunk-5JEYIHS6.js} +3 -3
- package/dist/bundle/{chunk-56PI2BRH.js → chunk-6LK7KTWB.js} +1 -1
- package/dist/bundle/{chunk-ES4PWHBJ.js → chunk-6RMMAUUW.js} +26 -26
- package/dist/bundle/{chunk-TKJDGAHT.js → chunk-6XNPXAJU.js} +31 -25
- package/dist/bundle/{chunk-PBYDT3CG.js → chunk-73OJJGZE.js} +3 -2
- package/dist/bundle/{chunk-WGK4AIRL.js → chunk-7K6KJWTO.js} +11 -11
- package/dist/bundle/{chunk-FIQOBLHS.js → chunk-AP7V256W.js} +1 -1
- package/dist/bundle/{chunk-K5JUROGN.js → chunk-BEMLGWY4.js} +1 -1
- package/dist/bundle/{chunk-P5B7IFOG.js → chunk-BGUMGCUY.js} +1 -1
- package/dist/bundle/{chunk-NZB4WGQS.js → chunk-CAKBG5FC.js} +5 -5
- package/dist/bundle/{chunk-RAZOSYEO.js → chunk-DKQWTQVY.js} +22 -22
- package/dist/bundle/{chunk-TPNC5VCJ.js → chunk-DXGMPMFP.js} +4 -4
- package/dist/bundle/{chunk-5AQKM47C.js → chunk-E3DRM6YP.js} +2 -2
- package/dist/bundle/{chunk-JFJTDL22.js → chunk-EYT33MM3.js} +44 -44
- package/dist/bundle/{chunk-LWTG5UOF.js → chunk-FPOGVDLS.js} +2 -2
- package/dist/bundle/{chunk-5KHJUYHQ.js → chunk-FTFNWGIR.js} +6 -6
- package/dist/bundle/{chunk-4PKHZQIM.js → chunk-GJUUTUK4.js} +7 -7
- package/dist/bundle/{chunk-NOU6MWEM.js → chunk-HFJNEXU7.js} +1 -1
- package/dist/bundle/{chunk-M7V3GSJQ.js → chunk-HV3EIYX4.js} +1 -1
- package/dist/bundle/{chunk-H4VFIH5W.js → chunk-IYZHM3ZN.js} +2 -2
- package/dist/bundle/{chunk-DA46WQEA.js → chunk-JFMUI4H6.js} +1 -1
- package/dist/bundle/{chunk-VF24ZAPX.js → chunk-LZ5J3UXD.js} +3 -3
- package/dist/bundle/{chunk-Y7JKWQC2.js → chunk-M2JCUVCJ.js} +112 -93
- package/dist/bundle/{chunk-KUQYWIVR.js → chunk-MCJ7LKYR.js} +5 -5
- package/dist/bundle/{chunk-XERTHQ6D.js → chunk-MHQKHWCJ.js} +14 -14
- package/dist/bundle/{chunk-VEAP5RVI.js → chunk-MMXMVGA6.js} +6 -6
- package/dist/bundle/{chunk-PHPC72DP.js → chunk-NNIXREJH.js} +5 -5
- package/dist/bundle/{chunk-UAXBLHZK.js → chunk-OHTR4WFO.js} +2 -2
- package/dist/bundle/{chunk-SAZJDKEI.js → chunk-PDL4UREY.js} +6 -6
- package/dist/bundle/{chunk-JLRMSNPX.js → chunk-Q2C3VMSU.js} +2 -0
- package/dist/bundle/{chunk-JIQAFFPV.js → chunk-Q44AYEOB.js} +2 -2
- package/dist/bundle/{chunk-6MV2TBDB.js → chunk-R5MML3FC.js} +51 -47
- package/dist/bundle/{chunk-ZRYFEEXZ.js → chunk-RQVWZBW3.js} +2 -2
- package/dist/bundle/{chunk-3KY7DA5A.js → chunk-S4YUR4S3.js} +426 -336
- package/dist/bundle/{chunk-MD2J3POF.js → chunk-U6UJ3HRS.js} +7 -1
- package/dist/bundle/{chunk-XZGLY2LU.js → chunk-V4TDG4KF.js} +10 -10
- package/dist/bundle/{chunk-ZMMIIBTM.js → chunk-VBOMKZ4E.js} +42 -42
- package/dist/bundle/{chunk-NCWO2FNC.js → chunk-VKPWP3AK.js} +1 -1
- package/dist/bundle/{chunk-O7VK7CJX.js → chunk-VNJMO5F6.js} +2 -2
- package/dist/bundle/{chunk-J5MYH4L5.js → chunk-VSHJWTX5.js} +5 -5
- package/dist/bundle/{chunk-DV4RSEAH.js → chunk-XQJWMBDY.js} +5 -5
- package/dist/bundle/{chunk-JKA2AICL.js → chunk-ZKCNMW7G.js} +1 -1
- package/dist/bundle/{chunk-WCL3WBH5.js → chunk-ZKZABB4K.js} +1 -1
- package/dist/bundle/{chunk-BVIHT7KR.js → chunk-ZNGQ3NZ4.js} +8 -8
- package/dist/bundle/{command-contract-NZF4B5OR.js → command-contract-CB5BII3S.js} +14 -14
- package/dist/bundle/{decode-HVXDCQ63.js → decode-KOBURZIQ.js} +3 -3
- package/dist/bundle/{dist-43DZXMBL.js → dist-T7HMT675.js} +10 -10
- package/dist/bundle/{echarts-LZ74IXHG.js → echarts-LEWTQO6H.js} +2 -2
- package/dist/bundle/{embed-OQF5U2C6.js → embed-PUFE4BSQ.js} +4 -4
- package/dist/bundle/{embedder-OCWQAWKO.js → embedder-3G4BQQ6X.js} +7 -7
- package/dist/bundle/{first-run-MTZPUPGA.js → first-run-FLXOC53U.js} +7 -7
- package/dist/bundle/first-screen-VUZEDSQW.js +32 -0
- package/dist/bundle/{instructions-M6F4FP7U.js → instructions-HGSXDCBT.js} +1 -1
- package/dist/bundle/mail.js +3 -3
- package/dist/bundle/{node-NYBBFHGN.js → node-5Z7PS4F5.js} +2 -2
- package/dist/bundle/{node-sqlite-CWCNWO75.js → node-sqlite-OAW7APIX.js} +3 -3
- package/dist/bundle/{oauth-DVX45EME.js → oauth-ZFZWPAJN.js} +5 -5
- package/dist/bundle/{open-M7EQWWHL.js → open-ZQMBZVH4.js} +2 -2
- package/dist/bundle/{openai-63KRU5H2.js → openai-XT2RIXAK.js} +11 -11
- package/dist/bundle/{process-DV5GQIGM.js → process-VVEQIHPE.js} +1 -1
- package/dist/bundle/{program-EPR3QCMX.js → program-RD3BBDNY.js} +2391 -941
- package/dist/bundle/{prompt-EPWPWTB3.js → prompt-PU7GE4Z4.js} +3 -3
- package/dist/bundle/{recognize-R46KDXK4.js → recognize-AG4A3KUK.js} +2 -2
- package/dist/bundle/{remote-RENCYB5X.js → remote-D6TQ6T7F.js} +5 -5
- package/dist/bundle/{rerank-VHPC5O73.js → rerank-GO24HJPF.js} +5 -5
- package/dist/bundle/{serve-KCH3ORYO.js → serve-WCHJAH6G.js} +7 -7
- package/dist/bundle/server-5KJJ3D6P.js +63 -0
- package/dist/bundle/{server-HZVXSK7B.js → server-CAVNBG3P.js} +33 -33
- package/dist/bundle/{sqlite-runtime-XP7ZJCKJ.js → sqlite-runtime-ANXC4AW2.js} +3 -3
- package/dist/bundle/{state-GQ4MEQJ5.js → state-EGJ66A62.js} +4 -4
- package/dist/bundle/{store-WT7YTR3Y.js → store-OON7FCMQ.js} +12 -12
- package/dist/bundle/{store-CQNLNINW.js → store-SBFA444C.js} +10 -10
- package/dist/bundle/store-maintenance-command-UEOJLYMJ.js +52 -0
- package/dist/commands/attachments.js +2 -2
- package/dist/commands/attachments.js.map +1 -1
- package/dist/commands/context.d.ts +21 -6
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +47 -6
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/drafts.d.ts.map +1 -1
- package/dist/commands/drafts.js +20 -16
- package/dist/commands/drafts.js.map +1 -1
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +10 -7
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/messages.d.ts.map +1 -1
- package/dist/commands/messages.js +13 -9
- package/dist/commands/messages.js.map +1 -1
- package/dist/commands/read.d.ts.map +1 -1
- package/dist/commands/read.js +2 -1
- package/dist/commands/read.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +5 -5
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/session-start.d.ts.map +1 -1
- package/dist/commands/session-start.js +107 -10
- package/dist/commands/session-start.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +72 -9
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/stats.d.ts.map +1 -1
- package/dist/commands/stats.js +2 -3
- package/dist/commands/stats.js.map +1 -1
- package/dist/commands/status.js +2 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.d.ts +0 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +8 -15
- package/dist/commands/sync.js.map +1 -1
- package/dist/config.d.ts +3 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +6 -1
- package/dist/config.js.map +1 -1
- package/dist/mail/backend.d.ts +23 -1
- package/dist/mail/backend.d.ts.map +1 -1
- package/dist/mail/backend.js +4 -1
- package/dist/mail/backend.js.map +1 -1
- package/dist/mail/compose.d.ts.map +1 -1
- package/dist/mail/compose.js +13 -25
- package/dist/mail/compose.js.map +1 -1
- package/dist/mail/doctor.d.ts +42 -0
- package/dist/mail/doctor.d.ts.map +1 -1
- package/dist/mail/doctor.js +76 -0
- package/dist/mail/doctor.js.map +1 -1
- package/dist/mail/drafts.d.ts.map +1 -1
- package/dist/mail/drafts.js +4 -4
- package/dist/mail/drafts.js.map +1 -1
- package/dist/mail/imap/connection.d.ts +6 -3
- package/dist/mail/imap/connection.d.ts.map +1 -1
- package/dist/mail/imap/connection.js +63 -16
- package/dist/mail/imap/connection.js.map +1 -1
- package/dist/mail/imap/index.d.ts +2 -2
- package/dist/mail/imap/index.d.ts.map +1 -1
- package/dist/mail/imap/index.js +3 -3
- package/dist/mail/imap/index.js.map +1 -1
- package/dist/mail/imap/search.d.ts.map +1 -1
- package/dist/mail/imap/search.js +10 -4
- package/dist/mail/imap/search.js.map +1 -1
- package/dist/mail/save.d.ts +2 -5
- package/dist/mail/save.d.ts.map +1 -1
- package/dist/mail/save.js +6 -27
- package/dist/mail/save.js.map +1 -1
- package/dist/mail/send.d.ts.map +1 -1
- package/dist/mail/send.js +1 -0
- package/dist/mail/send.js.map +1 -1
- package/dist/mail/smtp.d.ts +3 -3
- package/dist/mail/smtp.d.ts.map +1 -1
- package/dist/mail/smtp.js +72 -36
- package/dist/mail/smtp.js.map +1 -1
- package/dist/oauth.d.ts +74 -0
- package/dist/oauth.d.ts.map +1 -0
- package/dist/oauth.js +230 -0
- package/dist/oauth.js.map +1 -0
- package/dist/program.js +2 -2
- package/dist/program.js.map +1 -1
- package/dist/providers.d.ts +25 -3
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +32 -8
- package/dist/providers.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +6 -0
- package/dist/reasons.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -4
- package/dist/bundle/first-screen-4PBS6QK5.js +0 -32
- package/dist/bundle/server-FMCPE2ZK.js +0 -63
- package/dist/bundle/store-maintenance-command-YYR42IT4.js +0 -52
|
@@ -2,9 +2,9 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
readSecret
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-E3DRM6YP.js";
|
|
6
|
+
import "./chunk-BGUMGCUY.js";
|
|
7
|
+
import "./chunk-Q2C3VMSU.js";
|
|
8
8
|
import "./chunk-NXJLC2WK.js";
|
|
9
9
|
import "./chunk-Y5E2WNWB.js";
|
|
10
10
|
import "./chunk-BM445GYF.js";
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
openRecognizer,
|
|
9
9
|
openSpeechCutter,
|
|
10
10
|
toModelRate
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-LZ5J3UXD.js";
|
|
12
|
+
import "./chunk-Q2C3VMSU.js";
|
|
13
13
|
import "./chunk-NXJLC2WK.js";
|
|
14
14
|
import "./chunk-Y5E2WNWB.js";
|
|
15
15
|
import "./chunk-BM445GYF.js";
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
openRemote,
|
|
9
9
|
remoteKey,
|
|
10
10
|
remoteModel
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-RQVWZBW3.js";
|
|
12
|
+
import "./chunk-CAKBG5FC.js";
|
|
13
|
+
import "./chunk-3TYEJRMZ.js";
|
|
14
|
+
import "./chunk-Q44AYEOB.js";
|
|
15
|
+
import "./chunk-Q2C3VMSU.js";
|
|
16
16
|
import "./chunk-NXJLC2WK.js";
|
|
17
17
|
import "./chunk-Y5E2WNWB.js";
|
|
18
18
|
import "./chunk-BM445GYF.js";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
defaultThreads,
|
|
5
5
|
loadModel,
|
|
6
6
|
truncated
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-CAKBG5FC.js";
|
|
8
|
+
import "./chunk-3TYEJRMZ.js";
|
|
9
|
+
import "./chunk-Q44AYEOB.js";
|
|
10
|
+
import "./chunk-Q2C3VMSU.js";
|
|
11
11
|
import "./chunk-NXJLC2WK.js";
|
|
12
12
|
import "./chunk-Y5E2WNWB.js";
|
|
13
13
|
import "./chunk-BM445GYF.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
__name
|
|
16
16
|
} from "./chunk-ZVVMGPBJ.js";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/embeddings/rerank.js
|
|
19
19
|
var openReranker = /* @__PURE__ */ __name(async (model, directory, { threads = defaultThreads() } = {}) => {
|
|
20
20
|
const { ort, tokenizer, session } = await loadModel(model, directory, threads);
|
|
21
21
|
const typeIds = session.inputNames.includes("token_type_ids");
|
|
@@ -2,10 +2,10 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
listen
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BEMLGWY4.js";
|
|
6
6
|
import {
|
|
7
7
|
ownerLogin
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OHTR4WFO.js";
|
|
9
9
|
import {
|
|
10
10
|
WebStandardStreamableHTTPServerTransport,
|
|
11
11
|
createMcpHandler,
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
calledTools,
|
|
21
21
|
httpActivityFile,
|
|
22
22
|
httpLock
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-DXGMPMFP.js";
|
|
24
|
+
import "./chunk-5JEYIHS6.js";
|
|
25
|
+
import "./chunk-6LK7KTWB.js";
|
|
26
|
+
import "./chunk-Q2C3VMSU.js";
|
|
27
27
|
import "./chunk-NXJLC2WK.js";
|
|
28
28
|
import "./chunk-Y5E2WNWB.js";
|
|
29
29
|
import {
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
__name
|
|
34
34
|
} from "./chunk-ZVVMGPBJ.js";
|
|
35
35
|
|
|
36
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/mcp/http/serve.js
|
|
37
37
|
import { randomUUID } from "node:crypto";
|
|
38
38
|
var MCP_PATH = "/mcp";
|
|
39
39
|
var AS_METADATA = "/.well-known/oauth-authorization-server";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
PER_RUN,
|
|
5
|
+
createServer,
|
|
6
|
+
envelope,
|
|
7
|
+
serveOverHttpUntilStopped,
|
|
8
|
+
serveOverStdio
|
|
9
|
+
} from "./chunk-6RMMAUUW.js";
|
|
10
|
+
import "./chunk-MHQKHWCJ.js";
|
|
11
|
+
import "./chunk-6XNPXAJU.js";
|
|
12
|
+
import "./chunk-V4TDG4KF.js";
|
|
13
|
+
import "./chunk-73OJJGZE.js";
|
|
14
|
+
import "./chunk-JFMUI4H6.js";
|
|
15
|
+
import "./chunk-3GZK5GTU.js";
|
|
16
|
+
import "./chunk-VNJMO5F6.js";
|
|
17
|
+
import "./chunk-5D4AEUVA.js";
|
|
18
|
+
import "./chunk-DKQWTQVY.js";
|
|
19
|
+
import "./chunk-S4YUR4S3.js";
|
|
20
|
+
import "./chunk-45KA5667.js";
|
|
21
|
+
import "./chunk-FTFNWGIR.js";
|
|
22
|
+
import "./chunk-ZKCNMW7G.js";
|
|
23
|
+
import "./chunk-BGUMGCUY.js";
|
|
24
|
+
import "./chunk-NNIXREJH.js";
|
|
25
|
+
import "./chunk-M2JCUVCJ.js";
|
|
26
|
+
import "./chunk-R5MML3FC.js";
|
|
27
|
+
import "./chunk-VSHJWTX5.js";
|
|
28
|
+
import "./chunk-ZNGQ3NZ4.js";
|
|
29
|
+
import "./chunk-23IEVVL2.js";
|
|
30
|
+
import "./chunk-QZBT6BOU.js";
|
|
31
|
+
import "./chunk-IYZHM3ZN.js";
|
|
32
|
+
import "./chunk-DXGMPMFP.js";
|
|
33
|
+
import "./chunk-5JEYIHS6.js";
|
|
34
|
+
import "./chunk-6LK7KTWB.js";
|
|
35
|
+
import "./chunk-RQVWZBW3.js";
|
|
36
|
+
import "./chunk-2M4K7HYR.js";
|
|
37
|
+
import "./chunk-5BSEGMNE.js";
|
|
38
|
+
import "./chunk-35KD2CI2.js";
|
|
39
|
+
import "./chunk-MCJ7LKYR.js";
|
|
40
|
+
import "./chunk-MMXMVGA6.js";
|
|
41
|
+
import "./chunk-VBOMKZ4E.js";
|
|
42
|
+
import "./chunk-GJUUTUK4.js";
|
|
43
|
+
import "./chunk-4NYWHINR.js";
|
|
44
|
+
import "./chunk-XQJWMBDY.js";
|
|
45
|
+
import "./chunk-AP7V256W.js";
|
|
46
|
+
import "./chunk-SQLCCKEL.js";
|
|
47
|
+
import "./chunk-WJWLHLQ7.js";
|
|
48
|
+
import "./chunk-D72URWJE.js";
|
|
49
|
+
import "./chunk-CAKBG5FC.js";
|
|
50
|
+
import "./chunk-3TYEJRMZ.js";
|
|
51
|
+
import "./chunk-Q44AYEOB.js";
|
|
52
|
+
import "./chunk-Q2C3VMSU.js";
|
|
53
|
+
import "./chunk-NXJLC2WK.js";
|
|
54
|
+
import "./chunk-Y5E2WNWB.js";
|
|
55
|
+
import "./chunk-BM445GYF.js";
|
|
56
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
57
|
+
export {
|
|
58
|
+
PER_RUN,
|
|
59
|
+
createServer,
|
|
60
|
+
envelope,
|
|
61
|
+
serveOverHttpUntilStopped,
|
|
62
|
+
serveOverStdio
|
|
63
|
+
};
|
|
@@ -2,34 +2,34 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
botInstructions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HV3EIYX4.js";
|
|
6
6
|
import {
|
|
7
7
|
answered,
|
|
8
8
|
normal,
|
|
9
9
|
registerCommands,
|
|
10
10
|
runCommandForAgent,
|
|
11
11
|
toolsFromCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MHQKHWCJ.js";
|
|
13
13
|
import {
|
|
14
14
|
agentJson,
|
|
15
15
|
skillResource
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-V4TDG4KF.js";
|
|
17
|
+
import "./chunk-73OJJGZE.js";
|
|
18
18
|
import {
|
|
19
19
|
callerOf,
|
|
20
20
|
serveStdio
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VNJMO5F6.js";
|
|
22
22
|
import {
|
|
23
23
|
McpServer
|
|
24
24
|
} from "./chunk-5D4AEUVA.js";
|
|
25
25
|
import {
|
|
26
26
|
wholeList
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-S4YUR4S3.js";
|
|
28
|
+
import "./chunk-45KA5667.js";
|
|
29
|
+
import "./chunk-FTFNWGIR.js";
|
|
30
|
+
import "./chunk-ZKCNMW7G.js";
|
|
31
|
+
import "./chunk-BGUMGCUY.js";
|
|
32
|
+
import "./chunk-M2JCUVCJ.js";
|
|
33
33
|
import {
|
|
34
34
|
MESSENGER_CHANGE_REFUSAL,
|
|
35
35
|
changesMessenger,
|
|
@@ -37,31 +37,31 @@ import {
|
|
|
37
37
|
itemOf,
|
|
38
38
|
readOnlyLockOf,
|
|
39
39
|
readOnlyRefusal
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-R5MML3FC.js";
|
|
41
|
+
import "./chunk-VSHJWTX5.js";
|
|
42
|
+
import "./chunk-ZNGQ3NZ4.js";
|
|
43
|
+
import "./chunk-23IEVVL2.js";
|
|
44
44
|
import "./chunk-QZBT6BOU.js";
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-IYZHM3ZN.js";
|
|
46
|
+
import "./chunk-6LK7KTWB.js";
|
|
47
|
+
import "./chunk-RQVWZBW3.js";
|
|
48
|
+
import "./chunk-2M4K7HYR.js";
|
|
49
|
+
import "./chunk-5BSEGMNE.js";
|
|
50
|
+
import "./chunk-35KD2CI2.js";
|
|
51
|
+
import "./chunk-MCJ7LKYR.js";
|
|
52
|
+
import "./chunk-MMXMVGA6.js";
|
|
53
|
+
import "./chunk-VBOMKZ4E.js";
|
|
54
|
+
import "./chunk-GJUUTUK4.js";
|
|
55
|
+
import "./chunk-4NYWHINR.js";
|
|
56
|
+
import "./chunk-XQJWMBDY.js";
|
|
57
|
+
import "./chunk-AP7V256W.js";
|
|
58
58
|
import "./chunk-SQLCCKEL.js";
|
|
59
59
|
import "./chunk-WJWLHLQ7.js";
|
|
60
60
|
import "./chunk-D72URWJE.js";
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
61
|
+
import "./chunk-CAKBG5FC.js";
|
|
62
|
+
import "./chunk-3TYEJRMZ.js";
|
|
63
|
+
import "./chunk-Q44AYEOB.js";
|
|
64
|
+
import "./chunk-Q2C3VMSU.js";
|
|
65
65
|
import {
|
|
66
66
|
mcpErrorResult,
|
|
67
67
|
object
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
__name
|
|
73
73
|
} from "./chunk-ZVVMGPBJ.js";
|
|
74
74
|
|
|
75
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
75
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/mcp/bot/server.js
|
|
76
76
|
import { randomUUID } from "node:crypto";
|
|
77
77
|
var body = /* @__PURE__ */ __name((command, value) => Array.isArray(value) ? wholeList(`bot ${command}`, value) : value !== null && typeof value === "object" && ("item" in value || "items" in value) ? value : itemOf(value !== null && typeof value === "object" ? value : { value }), "body");
|
|
78
78
|
var createBotServer = /* @__PURE__ */ __name((options) => {
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
ensureSqlite,
|
|
5
5
|
nodeRuntime,
|
|
6
6
|
relay
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-FPOGVDLS.js";
|
|
8
|
+
import "./chunk-XQJWMBDY.js";
|
|
9
|
+
import "./chunk-Q2C3VMSU.js";
|
|
10
10
|
import "./chunk-NXJLC2WK.js";
|
|
11
11
|
import "./chunk-Y5E2WNWB.js";
|
|
12
12
|
import "./chunk-BM445GYF.js";
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
readHttpLock,
|
|
13
13
|
readStored,
|
|
14
14
|
signedInClients
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-DXGMPMFP.js";
|
|
16
|
+
import "./chunk-5JEYIHS6.js";
|
|
17
|
+
import "./chunk-6LK7KTWB.js";
|
|
18
|
+
import "./chunk-Q2C3VMSU.js";
|
|
19
19
|
import "./chunk-NXJLC2WK.js";
|
|
20
20
|
import "./chunk-Y5E2WNWB.js";
|
|
21
21
|
import "./chunk-BM445GYF.js";
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
previewDocumentTransfer,
|
|
9
9
|
previewProjectAnnotationSnapshot,
|
|
10
10
|
snapshotProjectAnnotations
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2M4K7HYR.js";
|
|
12
12
|
import {
|
|
13
13
|
note,
|
|
14
14
|
organization,
|
|
15
15
|
project,
|
|
16
16
|
reminder
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5BSEGMNE.js";
|
|
18
18
|
import {
|
|
19
19
|
CATALOG_QUERY,
|
|
20
20
|
EVENT_FIELDS,
|
|
@@ -54,8 +54,8 @@ import {
|
|
|
54
54
|
resetSearchIndex,
|
|
55
55
|
searchIndexState,
|
|
56
56
|
validateEvidenceFindings
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-
|
|
57
|
+
} from "./chunk-35KD2CI2.js";
|
|
58
|
+
import "./chunk-MCJ7LKYR.js";
|
|
59
59
|
import {
|
|
60
60
|
CLOSED_STATES,
|
|
61
61
|
FACT_STATUSES,
|
|
@@ -71,20 +71,20 @@ import {
|
|
|
71
71
|
priorityLabel,
|
|
72
72
|
priorityOf,
|
|
73
73
|
priorityOption
|
|
74
|
-
} from "./chunk-
|
|
75
|
-
import "./chunk-
|
|
76
|
-
import "./chunk-
|
|
77
|
-
import "./chunk-
|
|
74
|
+
} from "./chunk-MMXMVGA6.js";
|
|
75
|
+
import "./chunk-VBOMKZ4E.js";
|
|
76
|
+
import "./chunk-GJUUTUK4.js";
|
|
77
|
+
import "./chunk-4NYWHINR.js";
|
|
78
78
|
import {
|
|
79
79
|
PRAGMAS,
|
|
80
80
|
openCache
|
|
81
|
-
} from "./chunk-
|
|
82
|
-
import "./chunk-
|
|
81
|
+
} from "./chunk-XQJWMBDY.js";
|
|
82
|
+
import "./chunk-AP7V256W.js";
|
|
83
83
|
import "./chunk-WJWLHLQ7.js";
|
|
84
84
|
import {
|
|
85
85
|
storePath
|
|
86
|
-
} from "./chunk-
|
|
87
|
-
import "./chunk-
|
|
86
|
+
} from "./chunk-Q44AYEOB.js";
|
|
87
|
+
import "./chunk-Q2C3VMSU.js";
|
|
88
88
|
import "./chunk-NXJLC2WK.js";
|
|
89
89
|
import "./chunk-Y5E2WNWB.js";
|
|
90
90
|
import "./chunk-BM445GYF.js";
|
|
@@ -54,17 +54,17 @@ import {
|
|
|
54
54
|
threadConversation,
|
|
55
55
|
titlePart,
|
|
56
56
|
vectorIndexCounts
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
57
|
+
} from "./chunk-35KD2CI2.js";
|
|
58
|
+
import "./chunk-MCJ7LKYR.js";
|
|
59
|
+
import "./chunk-MMXMVGA6.js";
|
|
60
|
+
import "./chunk-VBOMKZ4E.js";
|
|
61
|
+
import "./chunk-GJUUTUK4.js";
|
|
62
|
+
import "./chunk-4NYWHINR.js";
|
|
63
|
+
import "./chunk-XQJWMBDY.js";
|
|
64
|
+
import "./chunk-AP7V256W.js";
|
|
65
65
|
import "./chunk-WJWLHLQ7.js";
|
|
66
|
-
import "./chunk-
|
|
67
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-Q44AYEOB.js";
|
|
67
|
+
import "./chunk-Q2C3VMSU.js";
|
|
68
68
|
import "./chunk-NXJLC2WK.js";
|
|
69
69
|
import "./chunk-Y5E2WNWB.js";
|
|
70
70
|
import "./chunk-BM445GYF.js";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
buildStems,
|
|
5
|
+
storeMaintenanceCommands,
|
|
6
|
+
storeSummary
|
|
7
|
+
} from "./chunk-EYT33MM3.js";
|
|
8
|
+
import "./chunk-HFJNEXU7.js";
|
|
9
|
+
import "./chunk-DKQWTQVY.js";
|
|
10
|
+
import "./chunk-S4YUR4S3.js";
|
|
11
|
+
import "./chunk-45KA5667.js";
|
|
12
|
+
import "./chunk-FTFNWGIR.js";
|
|
13
|
+
import "./chunk-ZKZABB4K.js";
|
|
14
|
+
import "./chunk-ZKCNMW7G.js";
|
|
15
|
+
import "./chunk-E3DRM6YP.js";
|
|
16
|
+
import "./chunk-BGUMGCUY.js";
|
|
17
|
+
import "./chunk-HTQTIKWP.js";
|
|
18
|
+
import "./chunk-R5MML3FC.js";
|
|
19
|
+
import "./chunk-VSHJWTX5.js";
|
|
20
|
+
import "./chunk-ZNGQ3NZ4.js";
|
|
21
|
+
import "./chunk-23IEVVL2.js";
|
|
22
|
+
import "./chunk-QZBT6BOU.js";
|
|
23
|
+
import "./chunk-IYZHM3ZN.js";
|
|
24
|
+
import "./chunk-5JEYIHS6.js";
|
|
25
|
+
import "./chunk-6LK7KTWB.js";
|
|
26
|
+
import "./chunk-RQVWZBW3.js";
|
|
27
|
+
import "./chunk-2M4K7HYR.js";
|
|
28
|
+
import "./chunk-5BSEGMNE.js";
|
|
29
|
+
import "./chunk-35KD2CI2.js";
|
|
30
|
+
import "./chunk-MCJ7LKYR.js";
|
|
31
|
+
import "./chunk-MMXMVGA6.js";
|
|
32
|
+
import "./chunk-VBOMKZ4E.js";
|
|
33
|
+
import "./chunk-GJUUTUK4.js";
|
|
34
|
+
import "./chunk-4NYWHINR.js";
|
|
35
|
+
import "./chunk-XQJWMBDY.js";
|
|
36
|
+
import "./chunk-AP7V256W.js";
|
|
37
|
+
import "./chunk-SQLCCKEL.js";
|
|
38
|
+
import "./chunk-WJWLHLQ7.js";
|
|
39
|
+
import "./chunk-D72URWJE.js";
|
|
40
|
+
import "./chunk-CAKBG5FC.js";
|
|
41
|
+
import "./chunk-3TYEJRMZ.js";
|
|
42
|
+
import "./chunk-Q44AYEOB.js";
|
|
43
|
+
import "./chunk-Q2C3VMSU.js";
|
|
44
|
+
import "./chunk-NXJLC2WK.js";
|
|
45
|
+
import "./chunk-Y5E2WNWB.js";
|
|
46
|
+
import "./chunk-BM445GYF.js";
|
|
47
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
48
|
+
export {
|
|
49
|
+
buildStems,
|
|
50
|
+
storeMaintenanceCommands,
|
|
51
|
+
storeSummary
|
|
52
|
+
};
|
|
@@ -25,7 +25,7 @@ const saved = v.looseObject({
|
|
|
25
25
|
/** The message's attachments as the store numbered them at sync: the same parser, so the same order and names. */
|
|
26
26
|
const attachmentsOf = async (opened, reference) => {
|
|
27
27
|
const { raw } = await fetchOriginal(opened.mailbox, opened.backend, reference, opened.profile);
|
|
28
|
-
const parsed = await parseMail(raw);
|
|
28
|
+
const parsed = await parseMail(raw, undefined, Number.POSITIVE_INFINITY);
|
|
29
29
|
const names = distinctNames(parsed.attachments.map(({ id, name }) => safeName(name, `attachment-${id + 1}`)));
|
|
30
30
|
return parsed.attachments.map((one, at) => ({
|
|
31
31
|
number: one.id + 1,
|
|
@@ -87,7 +87,7 @@ const downloadCommand = () => answerEntity(annotate(new Command("download"), {
|
|
|
87
87
|
for (const { path } of files)
|
|
88
88
|
refuseExisting(path);
|
|
89
89
|
for (const { path, content } of files)
|
|
90
|
-
savePrivately(path, content, flags.replace === true);
|
|
90
|
+
await savePrivately(path, content, flags.replace === true);
|
|
91
91
|
renderAnswer(this, outputFor(this), itemOf({ folder, files: files.map(({ number, name, path, bytes }) => ({ number, name, path, bytes })) }), () => files.length ? files.map(({ path, bytes }) => `${path} ${bytes} bytes\n`).join("") : "no attachments\n");
|
|
92
92
|
});
|
|
93
93
|
export const attachmentsCommand = () => new Command("attachments")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachments.js","sourceRoot":"","sources":["../../src/commands/attachments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACjH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc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AE,CAAC,CAAC,EAAE,CAAC,EACxG,GAAG,EAAE,CACH,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,KAAK,KAAK,UAAU,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAC3G,CAAA;AACH,CAAC,CAAC,CAAA;AAEN,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAY,EAAE,CAC9C,IAAI,OAAO,CAAC,aAAa,CAAC;KACvB,OAAO,CAAC,8CAA8C,CAAC;KACvD,UAAU,CAAC,WAAW,EAAE,CAAC;KACzB,UAAU,CAAC,eAAe,EAAE,CAAC,CAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { KeyringStore } from "@wirecat/cli-base";
|
|
2
2
|
import { type BaseEnvironment, type GlobalFlags } from "@wirecat/cli-core/cli";
|
|
3
|
-
import type
|
|
3
|
+
import { type Command, Option } from "commander";
|
|
4
4
|
import type { DiscoveryDeps } from "../discovery.js";
|
|
5
|
-
import type
|
|
6
|
-
import { type
|
|
5
|
+
import { type MailCredential, type MailEndpoint, type OpenBackend } from "../mail/backend.js";
|
|
6
|
+
import { type OAuthKind } from "../oauth.js";
|
|
7
|
+
import { type LookupHimalaya, type PasswordSource } from "../secret.js";
|
|
7
8
|
/** What a test hands `run()` in place of the network, the keyring and `secret-tool`. */
|
|
8
9
|
export interface MailEnvironment extends BaseEnvironment {
|
|
9
10
|
keyring?: KeyringStore;
|
|
@@ -11,6 +12,9 @@ export interface MailEnvironment extends BaseEnvironment {
|
|
|
11
12
|
discovery?: DiscoveryDeps;
|
|
12
13
|
/** Opens the mailbox in place of IMAP; a test hands in one on its fake server. */
|
|
13
14
|
backend?: OpenBackend;
|
|
15
|
+
/** The OAuth token endpoint and the browser, replaced in tests. */
|
|
16
|
+
fetch?: typeof fetch;
|
|
17
|
+
openBrowser?: (url: string) => Promise<void>;
|
|
14
18
|
}
|
|
15
19
|
export declare const contextOf: (command: Command) => {
|
|
16
20
|
environment: MailEnvironment;
|
|
@@ -26,17 +30,26 @@ export declare const endpointOf: (settings: ReturnType<typeof contextOf>["settin
|
|
|
26
30
|
export declare const passwordsOf: (context: ReturnType<typeof contextOf>) => {
|
|
27
31
|
read: () => Promise<{
|
|
28
32
|
secret: string;
|
|
29
|
-
source:
|
|
33
|
+
source: PasswordSource;
|
|
30
34
|
} | undefined>;
|
|
31
35
|
write: (secret: string, storage?: "keyring" | "file") => "keyring" | "file";
|
|
32
36
|
usesOwnersSignIn: () => boolean;
|
|
33
37
|
remove: () => boolean;
|
|
34
38
|
};
|
|
39
|
+
/** The OAuth provider a profile signs in with, from its provider in the registry. */
|
|
40
|
+
export declare const oauthKindOf: (mailbox: ReturnType<typeof contextOf>["settings"]["mailbox"]) => OAuthKind | undefined;
|
|
41
|
+
/** A profile's OAuth sign-in, refreshed as each connect asks; nothing is read until a login needs a token. */
|
|
42
|
+
export declare const oauthKeeperOf: (context: ReturnType<typeof contextOf>, kind: OAuthKind) => import("@wirecat/cli-core/oauth").TokenKeeper;
|
|
43
|
+
/** The profile's credential by its `auth`: the stored app password, or its OAuth sign-in. */
|
|
44
|
+
export declare const credentialOf: (context: ReturnType<typeof contextOf>) => Promise<{
|
|
45
|
+
credential: MailCredential;
|
|
46
|
+
passwordFrom?: PasswordSource;
|
|
47
|
+
}>;
|
|
35
48
|
export interface OpenMailOptions {
|
|
36
49
|
/** A server not saved in the profile yet: `session start` checks it before saving it. */
|
|
37
50
|
endpoint?: MailEndpoint;
|
|
38
|
-
/** A password just typed, not read from the keyring. */
|
|
39
|
-
|
|
51
|
+
/** A password just typed or a token just received, not read from the keyring. */
|
|
52
|
+
credential?: MailCredential;
|
|
40
53
|
canRetry?: () => boolean;
|
|
41
54
|
}
|
|
42
55
|
/**
|
|
@@ -49,4 +62,6 @@ export declare const openMail: (context: ReturnType<typeof contextOf>, options?:
|
|
|
49
62
|
passwordFrom: "environment" | "file" | "himalaya" | "keyring" | undefined;
|
|
50
63
|
}>;
|
|
51
64
|
export declare const collect: (value: string, previous?: string[]) => string[];
|
|
65
|
+
/** The empty list as its default is what tells the MCP tool to take a list for the option, not one string. */
|
|
66
|
+
export declare const repeatable: (flags: string, description: string) => Option;
|
|
52
67
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/commands/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAAE,KAAK,eAAe,EAAiB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC7F,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/commands/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAAE,KAAK,eAAe,EAAiB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC7F,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAEhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEpD,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAGjB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAmB,KAAK,SAAS,EAAgC,MAAM,aAAa,CAAA;AAE3F,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAiB,MAAM,cAAc,CAAA;AAEtF,wFAAwF;AACxF,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,SAAS,CAAC,EAAE,aAAa,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