@wirecat/cli-memo 0.131.31 → 0.131.33
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/bin/memo.js +2 -2
- package/dist/bundle/{all-profiles-PFCNICOF.js → all-profiles-I67AQBML.js} +5 -5
- package/dist/bundle/{anthropic-QLGMYWVZ.js → anthropic-TAN7BXEI.js} +3 -3
- package/dist/bundle/{app-server-QD67I7V2.js → app-server-BB6D3T5A.js} +35 -35
- package/dist/bundle/auto-6555QOPH.js +86 -0
- package/dist/bundle/{bun-JRTUGKIJ.js → bun-UQEFISW2.js} +2 -2
- package/dist/bundle/{bun-sqlite-HCZP2CNO.js → bun-sqlite-2QF3TO47.js} +2 -2
- package/dist/bundle/{chunk-HLJ6IUVF.js → chunk-2S5YZCD4.js} +2 -2
- package/dist/bundle/{chunk-3G44GDIZ.js → chunk-2Y2UWMJX.js} +5 -5
- package/dist/bundle/{chunk-GNY5YLNY.js → chunk-3CVPUL6V.js} +2 -2
- package/dist/bundle/{chunk-OS55OQ74.js → chunk-3DDGDOTM.js} +5 -5
- package/dist/bundle/{chunk-XWIRWBB5.js → chunk-3TEBUFO4.js} +1 -1
- package/dist/bundle/{chunk-3OH5DJ6X.js → chunk-4BDZUM4Z.js} +7 -1
- package/dist/bundle/{chunk-NG26I3JV.js → chunk-536BN5HJ.js} +1 -1
- package/dist/bundle/{chunk-7AMJFTJM.js → chunk-5DEHFWR4.js} +1 -1
- package/dist/bundle/{chunk-X6HXGL5E.js → chunk-5JAYP233.js} +7 -7
- package/dist/bundle/{chunk-63JF4E76.js → chunk-5M4CW3PM.js} +330 -247
- package/dist/bundle/{chunk-4D6BG353.js → chunk-62H5HS77.js} +6 -6
- package/dist/bundle/{chunk-ARVXP2UJ.js → chunk-6MDFXQ3P.js} +258 -258
- package/dist/bundle/{chunk-W4GV42D5.js → chunk-7OSMWDV3.js} +2 -2
- package/dist/bundle/{chunk-ZHDOELM7.js → chunk-ABORNS53.js} +7 -7
- package/dist/bundle/{chunk-CGI5EIIA.js → chunk-AFCZMG3T.js} +20 -20
- package/dist/bundle/{chunk-S3FQQRUM.js → chunk-AP3AG2BB.js} +4 -4
- package/dist/bundle/{chunk-FGJKBQCP.js → chunk-BFLYYQZ7.js} +3 -3
- package/dist/bundle/{chunk-5YVU6PXP.js → chunk-BSPNSDJR.js} +4 -4
- package/dist/bundle/{chunk-GKZ65EOY.js → chunk-BT6ZZUXC.js} +54 -54
- package/dist/bundle/{chunk-NDJUEFV2.js → chunk-BUYST3RY.js} +1 -1
- package/dist/bundle/{chunk-L34KLQIU.js → chunk-DUQGOBGY.js} +9 -9
- package/dist/bundle/{chunk-Q2ZIIXA2.js → chunk-EN3D3M3X.js} +2 -2
- package/dist/bundle/{chunk-JTSYAO5V.js → chunk-FQ23ENBP.js} +350 -280
- package/dist/bundle/{chunk-WGX6AEUP.js → chunk-FZXOHGOA.js} +3 -3
- package/dist/bundle/{chunk-ZB5ZZWFR.js → chunk-GUCICZ5E.js} +4 -4
- package/dist/bundle/{chunk-RO4YPDGF.js → chunk-HU2UNNN5.js} +1 -1
- package/dist/bundle/{chunk-RRDXT63A.js → chunk-IT5OORGL.js} +1 -1
- package/dist/bundle/{chunk-K6ZWFP2X.js → chunk-JCFO4LQL.js} +1 -1
- package/dist/bundle/{chunk-AZGQ7ABE.js → chunk-JOUN3RQQ.js} +165 -151
- package/dist/bundle/{chunk-42I4XE3O.js → chunk-KBSN3KOJ.js} +20 -20
- package/dist/bundle/{chunk-A56GDMFH.js → chunk-KJBKP66D.js} +3 -3
- package/dist/bundle/{chunk-PG4KORTB.js → chunk-KTGIARY4.js} +1 -1
- package/dist/bundle/{chunk-XUMYVRBZ.js → chunk-L5XW7SRP.js} +1 -1
- package/dist/bundle/{chunk-H24AL555.js → chunk-LDEPGWLS.js} +27 -27
- package/dist/bundle/{chunk-FE2SLKUO.js → chunk-LJZAVL4S.js} +2 -2
- package/dist/bundle/{chunk-5JTW3LNF.js → chunk-LUX5CPKS.js} +1 -1
- package/dist/bundle/{chunk-2N74ZVI6.js → chunk-MF2IXW4D.js} +1 -1
- package/dist/bundle/{chunk-CWHGN6HC.js → chunk-MI6OKBKQ.js} +4 -4
- package/dist/bundle/{chunk-7JWW4YEK.js → chunk-MZMKZ3FS.js} +8 -8
- package/dist/bundle/{chunk-2XBDA3XF.js → chunk-N75EWKKC.js} +1 -1
- package/dist/bundle/{chunk-TFEXCHMC.js → chunk-NAKJLG6G.js} +5 -5
- package/dist/bundle/{chunk-REUXOW2O.js → chunk-NOBWIWEE.js} +2 -2
- package/dist/bundle/{chunk-7MKROF5R.js → chunk-OGOMIZVL.js} +1 -1
- package/dist/bundle/{chunk-5BVGJBZX.js → chunk-P7AWDFQW.js} +1 -1
- package/dist/bundle/{chunk-MVFINUJS.js → chunk-PI5XHH3B.js} +6 -5
- package/dist/bundle/{chunk-QWA3MTHH.js → chunk-PVKETTTH.js} +7 -7
- package/dist/bundle/{chunk-Q3ZB4JGL.js → chunk-QMK5MB3I.js} +2 -2
- package/dist/bundle/{chunk-USMKR34T.js → chunk-R37MXUSP.js} +11 -11
- package/dist/bundle/{chunk-HGXTDMKN.js → chunk-RRLIMG4U.js} +85 -32
- package/dist/bundle/{chunk-K3CJHSLS.js → chunk-S6HHL43A.js} +1 -1
- package/dist/bundle/{chunk-UXA37BVT.js → chunk-SLY3522P.js} +4 -4
- package/dist/bundle/{chunk-QUQOKNAX.js → chunk-SN3VTCKM.js} +12 -12
- package/dist/bundle/{chunk-ROT4V3ZT.js → chunk-UMWPJXNA.js} +3 -3
- package/dist/bundle/{chunk-K3TUIQZ4.js → chunk-WSSMVWI6.js} +43 -43
- package/dist/bundle/{chunk-54DA525P.js → chunk-X5WJDJ7B.js} +14 -9
- package/dist/bundle/{chunk-URPBRYVA.js → chunk-YBSILL43.js} +4 -4
- package/dist/bundle/{chunk-WP3J2FNH.js → chunk-YGKZOBRU.js} +10 -10
- package/dist/bundle/{command-contract-DFXPO5Q7.js → command-contract-LRGVHRDS.js} +11 -11
- package/dist/bundle/{decode-7NGILAKQ.js → decode-AC2QFP22.js} +2 -2
- package/dist/bundle/{echarts-JERQI2HW.js → echarts-2LGYCSJM.js} +2 -2
- package/dist/bundle/{embed-3AO7KZXC.js → embed-5G5NJRTM.js} +3 -3
- package/dist/bundle/{embedder-WRQ7TDDB.js → embedder-AWGIIEIK.js} +6 -6
- package/dist/bundle/{entry-IBRPU7NO.js → entry-J2G7NST5.js} +4 -4
- package/dist/bundle/failure-7SDDOWOC.js +66 -0
- package/dist/bundle/{first-run-IJOREEQM.js → first-run-CIE4REGV.js} +5 -5
- package/dist/bundle/{first-screen-KYNY6ELY.js → first-screen-PLNL6V5J.js} +12 -12
- package/dist/bundle/{instructions-BET2PLGV.js → instructions-5236MVDG.js} +1 -1
- package/dist/bundle/{mcp-NUBFFPGF.js → mcp-IRYWZZMF.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-NCSG7QX5.js → node-7746MVI2.js} +2 -2
- package/dist/bundle/{node-sqlite-QL4M5RIK.js → node-sqlite-2JD5RF5A.js} +3 -3
- package/dist/bundle/{oauth-BGMMED35.js → oauth-BUMW77DB.js} +4 -4
- package/dist/bundle/{open-YN3KJMMQ.js → open-CXUGW7QC.js} +2 -2
- package/dist/bundle/{openai-CTZUSKUS.js → openai-ORFEPFYD.js} +7 -7
- package/dist/bundle/{process-DW237TK4.js → process-JXXYNYHP.js} +1 -1
- package/dist/bundle/{program-Q7VXEIJ7.js → program-4RYVZYD2.js} +105 -81
- package/dist/bundle/{prompt-EZCCUYCS.js → prompt-EHLY4L77.js} +2 -2
- package/dist/bundle/{recognize-XP3LHQD6.js → recognize-ES7MH57V.js} +1 -1
- package/dist/bundle/{remote-RLR5ZKKT.js → remote-EZ76X2VI.js} +4 -4
- package/dist/bundle/{rerank-P7LE52AC.js → rerank-CDIZ6AA6.js} +4 -4
- package/dist/bundle/{serve-UA7RQDNK.js → serve-YRSGBTJY.js} +6 -6
- package/dist/bundle/server-EUYRPM4X.js +48 -0
- package/dist/bundle/{server-NWCYWOPZ.js → server-MW5247KA.js} +50 -50
- package/dist/bundle/server-OHIH2CMF.js +61 -0
- package/dist/bundle/{state-72Y55LBR.js → state-S6A5VAWR.js} +3 -3
- package/dist/bundle/{store-PED4JCBB.js → store-O5CDNS3U.js} +9 -9
- package/dist/bundle/store-maintenance-command-3OFVJT4R.js +48 -0
- package/dist/bundle/update-RC5CLYFY.js +69 -0
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +7 -1
- package/dist/examples.js.map +1 -1
- package/dist/findings/command.d.ts.map +1 -1
- package/dist/findings/command.js +4 -4
- package/dist/findings/command.js.map +1 -1
- package/dist/findings-input.d.ts +7 -0
- package/dist/findings-input.d.ts.map +1 -0
- package/dist/findings-input.js +23 -0
- package/dist/findings-input.js.map +1 -0
- package/dist/knowledge/project-actions-command.d.ts.map +1 -1
- package/dist/knowledge/project-actions-command.js +4 -4
- package/dist/knowledge/project-actions-command.js.map +1 -1
- package/dist/knowledge/project-actions.d.ts +2 -0
- package/dist/knowledge/project-actions.d.ts.map +1 -1
- package/dist/mail/findings-command.d.ts +1 -1
- package/dist/mail/findings-command.d.ts.map +1 -1
- package/dist/mail/findings-command.js +5 -6
- package/dist/mail/findings-command.js.map +1 -1
- package/dist/mail/review-command.d.ts +4 -3
- package/dist/mail/review-command.d.ts.map +1 -1
- package/dist/mail/review-command.js +9 -5
- package/dist/mail/review-command.js.map +1 -1
- package/dist/mcp/permissions.d.ts +1 -1
- package/dist/mcp/permissions.d.ts.map +1 -1
- package/dist/mcp/permissions.js +1 -0
- package/dist/mcp/permissions.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/tasks/command.d.ts.map +1 -1
- package/dist/tasks/command.js +2 -0
- package/dist/tasks/command.js.map +1 -1
- package/dist/tasks/list.d.ts.map +1 -1
- package/dist/tasks/list.js +2 -0
- package/dist/tasks/list.js.map +1 -1
- package/dist/tasks/tasks.d.ts +4 -0
- package/dist/tasks/tasks.d.ts.map +1 -1
- package/dist/tasks/tasks.js +2 -0
- package/dist/tasks/tasks.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/skills/cli-memo/topics/mail.md +2 -1
- package/skills/mail-triage/SKILL.md +28 -10
- package/dist/bundle/auto-MCSKUSPU.js +0 -86
- package/dist/bundle/failure-QBQMSEYX.js +0 -66
- package/dist/bundle/server-N6L3LGQO.js +0 -48
- package/dist/bundle/server-XU362INX.js +0 -61
- package/dist/bundle/store-maintenance-command-B364Q2O4.js +0 -48
- package/dist/bundle/update-X2A5CW5A.js +0 -69
- /package/dist/bundle/{chunk-QPPNLE7G.js → chunk-JB5P5WSQ.js} +0 -0
|
@@ -3,17 +3,17 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
SAMPLE_RATE,
|
|
5
5
|
toModelRate
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FZXOHGOA.js";
|
|
7
7
|
import {
|
|
8
8
|
OPENAI_URL
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QMK5MB3I.js";
|
|
10
10
|
import {
|
|
11
11
|
OPENAI_TRANSCRIBE_MODEL,
|
|
12
12
|
VAD,
|
|
13
13
|
filesPresent,
|
|
14
14
|
modelsDirectory,
|
|
15
15
|
vadPath
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BFLYYQZ7.js";
|
|
17
17
|
import {
|
|
18
18
|
DEFAULT_RETRY,
|
|
19
19
|
backoffMs
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
__name
|
|
26
26
|
} from "./chunk-ZVVMGPBJ.js";
|
|
27
27
|
|
|
28
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/speech/openai.js
|
|
29
29
|
import { setTimeout as wait } from "node:timers/promises";
|
|
30
30
|
|
|
31
31
|
// node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
|
|
@@ -52,7 +52,7 @@ var parseRateLimitReset = /* @__PURE__ */ __name((header, now) => {
|
|
|
52
52
|
}, "parseRateLimitReset");
|
|
53
53
|
var providerWaitMs = /* @__PURE__ */ __name((headers, now) => parseRetryAfter(headers.get("retry-after"), now) ?? parseRateLimitReset(headers.get("x-ratelimit-reset"), now), "providerWaitMs");
|
|
54
54
|
|
|
55
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/speech/wav.js
|
|
56
56
|
var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
|
|
57
57
|
const bytes = Buffer.alloc(44 + samples.length * 2);
|
|
58
58
|
bytes.write("RIFF", 0, "ascii");
|
|
@@ -73,7 +73,7 @@ var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
|
|
|
73
73
|
return new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
74
74
|
}, "encodeWav");
|
|
75
75
|
|
|
76
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
76
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/speech/openai.js
|
|
77
77
|
var LONGEST_REQUEST_SECONDS = 600;
|
|
78
78
|
var JOINED_SECONDS = 0.2;
|
|
79
79
|
var PAD_SECONDS = 0.2;
|
|
@@ -195,7 +195,7 @@ var piecesOf = /* @__PURE__ */ __name((spans, limit) => {
|
|
|
195
195
|
return pieces;
|
|
196
196
|
}, "piecesOf");
|
|
197
197
|
var openCutter = /* @__PURE__ */ __name(async (vadModel) => {
|
|
198
|
-
const { openSpeechCutter } = await import("./recognize-
|
|
198
|
+
const { openSpeechCutter } = await import("./recognize-ES7MH57V.js");
|
|
199
199
|
return openSpeechCutter(vadModel);
|
|
200
200
|
}, "openCutter");
|
|
201
201
|
var checkKeywords = /* @__PURE__ */ __name((keywords = []) => {
|
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
unit
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NAKJLG6G.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
8
|
} from "./chunk-EB2IULWB.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
|
|
14
14
|
import { setTimeout } from "node:timers/promises";
|
|
15
15
|
var OPENAI_URL = "https://api.openai.com/v1";
|
|
16
16
|
var OPENAI_MODELS = {
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
agentJson,
|
|
8
8
|
commandAvailability,
|
|
9
9
|
failureContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-X5WJDJ7B.js";
|
|
11
11
|
import {
|
|
12
12
|
callerOf
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LJZAVL4S.js";
|
|
14
14
|
import {
|
|
15
15
|
QUERY_ARGUMENT,
|
|
16
16
|
lentConnection,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
refuseLacking,
|
|
19
19
|
servicesFor,
|
|
20
20
|
storeModeDeps
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6MDFXQ3P.js";
|
|
22
22
|
import {
|
|
23
23
|
DEFAULT_OUTPUT_BYTES,
|
|
24
24
|
ENTITIES,
|
|
@@ -42,19 +42,19 @@ import {
|
|
|
42
42
|
sealed,
|
|
43
43
|
startRecording,
|
|
44
44
|
traceOf
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-JOUN3RQQ.js";
|
|
46
46
|
import {
|
|
47
47
|
currentCaller,
|
|
48
48
|
keepsSuccess,
|
|
49
49
|
runContextOf,
|
|
50
50
|
withCaller
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-5JAYP233.js";
|
|
52
52
|
import {
|
|
53
53
|
queryDescription
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-BT6ZZUXC.js";
|
|
55
55
|
import {
|
|
56
56
|
MAX_BUFFERED_INPUT
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-S6HHL43A.js";
|
|
58
58
|
import {
|
|
59
59
|
captureStreams,
|
|
60
60
|
traceIdOf
|
|
@@ -106,7 +106,7 @@ import {
|
|
|
106
106
|
__name
|
|
107
107
|
} from "./chunk-ZVVMGPBJ.js";
|
|
108
108
|
|
|
109
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mcp/agent.js
|
|
110
110
|
import { Readable } from "node:stream";
|
|
111
111
|
|
|
112
112
|
// node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/lint.js
|
|
@@ -2853,7 +2853,7 @@ var VOCABULARY = defineVocabulary({
|
|
|
2853
2853
|
flags: [...HOW_FLAGS, ...WHAT_FLAGS, ...CALENDAR_FLAGS, ...MAIL_FLAGS]
|
|
2854
2854
|
});
|
|
2855
2855
|
|
|
2856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mcp/agent.js
|
|
2857
2857
|
var TYPES = new Map(VOCABULARY.flags.map((flag) => [flag.name, flag.type]));
|
|
2858
2858
|
var snake = /* @__PURE__ */ __name((name) => name.replaceAll("|", "_or_").replace(/[^a-z0-9]+/gi, "_"), "snake");
|
|
2859
2859
|
var longOf = /* @__PURE__ */ __name((option) => option.flags.match(/--[a-z0-9][a-z0-9-]*/)?.[0], "longOf");
|
|
@@ -3076,7 +3076,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
|
|
|
3076
3076
|
}
|
|
3077
3077
|
}, "runCommandForAgent");
|
|
3078
3078
|
|
|
3079
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mcp/tool.js
|
|
3080
3080
|
var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
|
|
3081
3081
|
var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
|
|
3082
3082
|
var message = pipe(
|
|
@@ -3335,7 +3335,7 @@ var failed = /* @__PURE__ */ __name((error, errors, effects) => {
|
|
|
3335
3335
|
return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(error, context))));
|
|
3336
3336
|
}, "failed");
|
|
3337
3337
|
|
|
3338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mcp/surface.js
|
|
3339
3339
|
import { randomUUID } from "node:crypto";
|
|
3340
3340
|
var MATCHES = 8;
|
|
3341
3341
|
var ANSWER = answerSchema();
|
|
@@ -19,23 +19,24 @@ import {
|
|
|
19
19
|
noteServer,
|
|
20
20
|
pointsOf,
|
|
21
21
|
readPastMark,
|
|
22
|
+
rewindMark,
|
|
22
23
|
scheduleLimitsOf,
|
|
23
24
|
serverSearchOptions,
|
|
24
25
|
summaryOf,
|
|
25
26
|
unansweredHours
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5M4CW3PM.js";
|
|
27
28
|
import {
|
|
28
29
|
MAIL_HIT_UNTRUSTED,
|
|
29
30
|
messagesAnswer,
|
|
30
31
|
offsetOf,
|
|
31
32
|
shownOf
|
|
32
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-AFCZMG3T.js";
|
|
33
34
|
import {
|
|
34
35
|
messageItem
|
|
35
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-WSSMVWI6.js";
|
|
36
37
|
import {
|
|
37
38
|
knownPermissionKeys
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-KBSN3KOJ.js";
|
|
39
40
|
import {
|
|
40
41
|
AGENDA_DEFAULTS,
|
|
41
42
|
DEFAULT_BACKEND,
|
|
@@ -58,7 +59,7 @@ import {
|
|
|
58
59
|
sourceKey,
|
|
59
60
|
typedQuery,
|
|
60
61
|
withQuery
|
|
61
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-6MDFXQ3P.js";
|
|
62
63
|
import {
|
|
63
64
|
Command,
|
|
64
65
|
FETCH,
|
|
@@ -94,11 +95,11 @@ import {
|
|
|
94
95
|
untrusted,
|
|
95
96
|
withSettingDefaults,
|
|
96
97
|
withoutSetting
|
|
97
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-JOUN3RQQ.js";
|
|
98
99
|
import {
|
|
99
100
|
mailHolderVariable,
|
|
100
101
|
readOnlyLockOf
|
|
101
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-BUYST3RY.js";
|
|
102
103
|
import {
|
|
103
104
|
DEFAULT_DECISION_POLICY,
|
|
104
105
|
MESSAGE_PARSING,
|
|
@@ -109,14 +110,14 @@ import {
|
|
|
109
110
|
parseReference,
|
|
110
111
|
queryFilter,
|
|
111
112
|
validateFields
|
|
112
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-FQ23ENBP.js";
|
|
113
114
|
import {
|
|
114
115
|
dateRange,
|
|
115
116
|
defineQuery,
|
|
116
117
|
parseLucene,
|
|
117
118
|
queryFieldsOf,
|
|
118
119
|
timezoneOf
|
|
119
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-BT6ZZUXC.js";
|
|
120
121
|
import {
|
|
121
122
|
configFilePath,
|
|
122
123
|
resolvePaths,
|
|
@@ -9890,7 +9891,7 @@ var require_cjs = __commonJS({
|
|
|
9890
9891
|
}
|
|
9891
9892
|
});
|
|
9892
9893
|
|
|
9893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9894
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/attachments.js
|
|
9894
9895
|
var MAX_ATTACHMENT_CHARS = 2e5;
|
|
9895
9896
|
var DEFAULT_ATTACHMENT_POLICY = { read: true, maxBytes: 10 * 1024 * 1024 };
|
|
9896
9897
|
var POLICY_SKIPS = ["not-read", "too-large"];
|
|
@@ -9929,7 +9930,7 @@ var readAttachments = /* @__PURE__ */ __name(async (mail, messageId, { loadEngin
|
|
|
9929
9930
|
return files;
|
|
9930
9931
|
}, "readAttachments");
|
|
9931
9932
|
|
|
9932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/read.js
|
|
9933
9934
|
var lowerSuspicious = /* @__PURE__ */ __name((items, suspicious) => [
|
|
9934
9935
|
...items.filter((item) => !suspicious(item)),
|
|
9935
9936
|
...items.filter(suspicious)
|
|
@@ -10016,11 +10017,11 @@ var attachmentsText = /* @__PURE__ */ __name((hit) => (hit.attachments ?? []).ma
|
|
|
10016
10017
|
${file.text.replace(/\n/g, "\n ")}`;
|
|
10017
10018
|
}).join("\n"), "attachmentsText");
|
|
10018
10019
|
|
|
10019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/bulk.js
|
|
10020
10021
|
var BULK = "bulk";
|
|
10021
10022
|
var bulkBox = { externalId: "memo:bulk", name: "bulk", kind: BULK };
|
|
10022
10023
|
|
|
10023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10024
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/email-input.js
|
|
10024
10025
|
var sentAtOf = /* @__PURE__ */ __name((date, receivedAt) => {
|
|
10025
10026
|
const sent = date === null ? Number.NaN : Date.parse(date);
|
|
10026
10027
|
return Number.isNaN(sent) ? Date.parse(receivedAt) : sent;
|
|
@@ -10040,7 +10041,7 @@ var parsedEmail = /* @__PURE__ */ __name((mail, item, header, address) => ({
|
|
|
10040
10041
|
outgoing: mail.from === null ? null : mail.from.email === address
|
|
10041
10042
|
}), "parsedEmail");
|
|
10042
10043
|
|
|
10043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10044
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
10044
10045
|
var import_disposable_email_domains_js = __toESM(require_dist2(), 1);
|
|
10045
10046
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
10046
10047
|
var WEIGHTS = {
|
|
@@ -10148,7 +10149,7 @@ var scoreGroup = /* @__PURE__ */ __name((items, context) => {
|
|
|
10148
10149
|
return { score: kept.reduce((sum, signal) => sum + WEIGHTS[signal], 0), signals: kept };
|
|
10149
10150
|
}, "scoreGroup");
|
|
10150
10151
|
|
|
10151
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10152
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/presets.js
|
|
10152
10153
|
var PRESETS = {
|
|
10153
10154
|
social: {
|
|
10154
10155
|
about: "notifications from social networks",
|
|
@@ -10240,7 +10241,7 @@ var presetMatches = /* @__PURE__ */ __name((name, facts) => {
|
|
|
10240
10241
|
return false;
|
|
10241
10242
|
}, "presetMatches");
|
|
10242
10243
|
|
|
10243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10244
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/probe.js
|
|
10244
10245
|
var share = /* @__PURE__ */ __name((part, whole) => Math.round(part / whole * 100) / 100, "share");
|
|
10245
10246
|
var isSent = /* @__PURE__ */ __name((item) => item.labels?.includes("Sent") || /(^|\/)sent\b/i.test(item.folder ?? ""), "isSent");
|
|
10246
10247
|
var groupKey = /* @__PURE__ */ __name((headers) => headers.listId === void 0 ? `from:${headers.from}` : `list:${headers.listId}`, "groupKey");
|
|
@@ -10308,7 +10309,7 @@ var probeMail = /* @__PURE__ */ __name((items, limit, ages = /* @__PURE__ */ new
|
|
|
10308
10309
|
};
|
|
10309
10310
|
}, "probeMail");
|
|
10310
10311
|
|
|
10311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/facts.js
|
|
10312
10313
|
var factsOf = /* @__PURE__ */ __name((listed2, rules, ages = /* @__PURE__ */ new Map()) => {
|
|
10313
10314
|
const grouped = rules.some(({ match }) => match.score_at_least !== void 0 || match.preset !== void 0);
|
|
10314
10315
|
if (!grouped)
|
|
@@ -15579,7 +15580,7 @@ var PostalMime = class _PostalMime {
|
|
|
15579
15580
|
}
|
|
15580
15581
|
};
|
|
15581
15582
|
|
|
15582
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15583
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/headers.js
|
|
15583
15584
|
var unfold = /* @__PURE__ */ __name((text2) => text2.replace(/\r?\n[ \t]+/g, " "), "unfold");
|
|
15584
15585
|
var field = /* @__PURE__ */ __name((unfolded, name) => new RegExp(`^${name}:[ \\t]*(.*?)\\r?$`, "im").exec(unfolded)?.[1], "field");
|
|
15585
15586
|
var fieldsOf = /* @__PURE__ */ __name((unfolded, name) => [...unfolded.matchAll(new RegExp(`^${name}:[ \\t]*(.*?)\\r?$`, "gim"))].map(([, value]) => value), "fieldsOf");
|
|
@@ -15626,7 +15627,7 @@ var mailHeadersOf = /* @__PURE__ */ __name((raw) => {
|
|
|
15626
15627
|
};
|
|
15627
15628
|
}, "mailHeadersOf");
|
|
15628
15629
|
|
|
15629
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/parse.js
|
|
15630
15631
|
var MAX_BODY_CHARS = 1e6;
|
|
15631
15632
|
var MAX_ATTACHMENTS = 50;
|
|
15632
15633
|
var BRACKETED_ID = /<[^<>\s]+>/g;
|
|
@@ -15691,13 +15692,13 @@ var parseMail = /* @__PURE__ */ __name(async (raw, maxBodyChars = MAX_BODY_CHARS
|
|
|
15691
15692
|
};
|
|
15692
15693
|
}, "parseMail");
|
|
15693
15694
|
|
|
15694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/partial.js
|
|
15695
15696
|
var PARTIAL = "partial";
|
|
15696
15697
|
|
|
15697
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/account-key.js
|
|
15698
15699
|
var mailAccountKey = /* @__PURE__ */ __name((address) => ({ provider: "email", account: address.toLowerCase() }), "mailAccountKey");
|
|
15699
15700
|
|
|
15700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15701
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/rule-stored.js
|
|
15701
15702
|
var ACTION_OF = { full: "keep", envelope: "envelope", skip: "skip" };
|
|
15702
15703
|
var KINDS = {
|
|
15703
15704
|
from: "string",
|
|
@@ -15766,7 +15767,7 @@ var storedMailRuleSet = /* @__PURE__ */ __name(async (store, account, query) =>
|
|
|
15766
15767
|
}, "storedMailRuleSet");
|
|
15767
15768
|
var storedMailRules = /* @__PURE__ */ __name(async (store, account, query) => (await storedMailRuleSet(store, account, query)).rules, "storedMailRules");
|
|
15768
15769
|
|
|
15769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15770
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/rules.js
|
|
15770
15771
|
var DAY_MS2 = 24 * 60 * 60 * 1e3;
|
|
15771
15772
|
var domainOf = /* @__PURE__ */ __name((address) => address.slice(address.lastIndexOf("@") + 1), "domainOf");
|
|
15772
15773
|
var domainMatches = /* @__PURE__ */ __name((wanted2, sender) => {
|
|
@@ -15838,7 +15839,7 @@ var tagsOf = /* @__PURE__ */ __name((rules, facts) => {
|
|
|
15838
15839
|
}, "tagsOf");
|
|
15839
15840
|
var conditionKeys = /* @__PURE__ */ __name((match) => Object.keys(match).filter((key) => match[key] !== void 0).sort(), "conditionKeys");
|
|
15840
15841
|
|
|
15841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/rule-input.js
|
|
15842
15843
|
var STORE_ACTION = { keep: "full", envelope: "envelope", skip: "skip" };
|
|
15843
15844
|
var LOWER = ["from", "domain", "list_id", "subject"];
|
|
15844
15845
|
var conditionsOf = /* @__PURE__ */ __name((match) => Object.fromEntries(conditionKeys(match).map((key) => {
|
|
@@ -15868,7 +15869,7 @@ var ruleInput = /* @__PURE__ */ __name((rule, source = rule.source ?? "owner") =
|
|
|
15868
15869
|
decidedAt: decidedAtOf(rule.decided_at)
|
|
15869
15870
|
}), "ruleInput");
|
|
15870
15871
|
|
|
15871
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/rule-tags.js
|
|
15872
15873
|
var reuseOf = /* @__PURE__ */ __name((error) => {
|
|
15873
15874
|
const { details } = error;
|
|
15874
15875
|
return details?.reason === "tag-review.required" ? details.candidates?.[0]?.name : void 0;
|
|
@@ -15929,7 +15930,7 @@ var settleRuleTags = /* @__PURE__ */ __name(async (store, accountId, rules, outc
|
|
|
15929
15930
|
}
|
|
15930
15931
|
}, "settleRuleTags");
|
|
15931
15932
|
|
|
15932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/server-query.js
|
|
15933
15934
|
var DAY = 864e5;
|
|
15934
15935
|
var empty = /* @__PURE__ */ __name(() => ({ words: [], from: [], to: [], cc: [], subject: [], body: [] }), "empty");
|
|
15935
15936
|
var narrows = /* @__PURE__ */ __name((criteria) => criteria.words.length + criteria.from.length + criteria.to.length + criteria.cc.length + criteria.subject.length + criteria.body.length > 0 || criteria.since !== void 0 || criteria.before !== void 0 || criteria.seen !== void 0 || criteria.flagged !== void 0, "narrows");
|
|
@@ -16002,7 +16003,7 @@ var mailCriteriaOf = /* @__PURE__ */ __name((text2, { exact, timezone } = {}) =>
|
|
|
16002
16003
|
};
|
|
16003
16004
|
}, "mailCriteriaOf");
|
|
16004
16005
|
|
|
16005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/server-search.js
|
|
16006
16007
|
var refusal = {
|
|
16007
16008
|
unsupported: "this mailbox's server cannot be searched \u2014 use --backend archive",
|
|
16008
16009
|
offline: "--backend server needs the network \u2014 not with --offline",
|
|
@@ -16217,7 +16218,7 @@ var searchMailServer = /* @__PURE__ */ __name(async (store, mailbox, access, req
|
|
|
16217
16218
|
return { report, sources };
|
|
16218
16219
|
}, "searchMailServer");
|
|
16219
16220
|
|
|
16220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/cli/marks.js
|
|
16221
16222
|
var iso = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
16222
16223
|
var mailMark = strictObject({
|
|
16223
16224
|
holder: string(),
|
|
@@ -16260,8 +16261,59 @@ var acknowledgeCommand = /* @__PURE__ */ __name((mail) => answerEntity(proposesO
|
|
|
16260
16261
|
const mark = await mail.read(this, (store, mailbox) => acknowledgeMark(store, mailbox, holder, cursor));
|
|
16261
16262
|
renderAnswer(this, outputFor(this), itemOf(markItem(mark)), () => markText(mark));
|
|
16262
16263
|
}), "acknowledgeCommand");
|
|
16264
|
+
var mailMarkReset = strictObject({
|
|
16265
|
+
mark: mailMark,
|
|
16266
|
+
/** Where the mark was before. */
|
|
16267
|
+
from_id: number(),
|
|
16268
|
+
/** Emails the holder reads whole again. */
|
|
16269
|
+
again: number(),
|
|
16270
|
+
/** Bulk emails it gets again as excerpts, unless they are surely newsletters. */
|
|
16271
|
+
bulk: number(),
|
|
16272
|
+
/** Emails between the two marks it skips again: drafts, envelopes, suspicious senders, partial mail. */
|
|
16273
|
+
skipped: number(),
|
|
16274
|
+
/** Nothing moved: `--dry-run` only counts. */
|
|
16275
|
+
dry_run: boolean()
|
|
16276
|
+
});
|
|
16277
|
+
var wholeNumber = /* @__PURE__ */ __name((value) => {
|
|
16278
|
+
const parsed = Number(value);
|
|
16279
|
+
if (!Number.isSafeInteger(parsed) || parsed < 1)
|
|
16280
|
+
throw new CliError("validation_error", `--last takes a whole number of emails, 1 or more \u2014 got ${value}`);
|
|
16281
|
+
return parsed;
|
|
16282
|
+
}, "wholeNumber");
|
|
16283
|
+
var resetMarkCommand = /* @__PURE__ */ __name((mail) => answerEntity(annotate(new Command("reset"), {
|
|
16284
|
+
effects: LOCAL_WRITE,
|
|
16285
|
+
examples: [
|
|
16286
|
+
`${mail.app.command} personal messages reset --holder mail-triage --last 8 --dry-run`,
|
|
16287
|
+
`${mail.app.command} personal messages reset --holder mail-triage --since-time 2026-11-04T00:00:00Z`
|
|
16288
|
+
]
|
|
16289
|
+
}), "mail_mark_reset", mailMarkReset).summary("move a holder's processing mark back, so it reads that mail again (owner only)").description("the owner moves a holder's mark back past the mail received since --since-time, or past the last --last emails it was given; its next reviews give that mail again. The answer says how many emails it reads again. An agent cannot: a holder only moves its own mark forward, with `messages acknowledge`").requiredOption("--holder <name>", "whose mark: lower-case letters, digits and dashes, such as mail-triage").option("--since-time <time>", "read again what was received since this ISO 8601 time, or 2d ago").option("--last <n>", "read again the last n emails the holder was given", wholeNumber).option("--dry-run", "count what would be read again, and move nothing").action(async function() {
|
|
16290
|
+
const { holder, sinceTime, last, dryRun } = this.opts();
|
|
16291
|
+
if (sinceTime === void 0 === (last === void 0))
|
|
16292
|
+
throw new CliError("validation_error", "give --since-time or --last, one of them");
|
|
16293
|
+
const env = environmentOf(this).env ?? process.env;
|
|
16294
|
+
if (env[mailHolderVariable(mail.app)]?.trim() || actorOf(this) !== "owner" || readOnlyLockOf(mail.app, env))
|
|
16295
|
+
throw new CliError("permission_error", "only the owner moves a holder's mark back; an agent only acknowledges", {
|
|
16296
|
+
reason: "mail.reset-owner-only"
|
|
16297
|
+
});
|
|
16298
|
+
const now = Date.now();
|
|
16299
|
+
const to = last === void 0 ? { since: momentOf(sinceTime, "--since-time", now) } : { last };
|
|
16300
|
+
const reset = await mail.read(this, (store, mailbox) => rewindMark(store, mailbox, holder, to, { now, dry: dryRun === true }));
|
|
16301
|
+
const item = {
|
|
16302
|
+
mark: markItem(reset.mark),
|
|
16303
|
+
from_id: reset.fromId,
|
|
16304
|
+
again: reset.again,
|
|
16305
|
+
bulk: reset.bulk,
|
|
16306
|
+
skipped: reset.skipped,
|
|
16307
|
+
dry_run: reset.dry
|
|
16308
|
+
};
|
|
16309
|
+
renderAnswer(this, outputFor(this), itemOf(item), () => {
|
|
16310
|
+
const mark = reset.mark.throughId === reset.fromId ? `the mark stays at ${reset.fromId}` : `the mark ${reset.dry ? "would move" : "moved"} from ${reset.fromId} to ${reset.mark.throughId}`;
|
|
16311
|
+
return `${holder} ${reset.dry ? "would read" : "reads"} ${reset.again} emails again, and ${reset.bulk} bulk ones as excerpts unless they are newsletters; ${reset.skipped} are skipped again; ${mark}
|
|
16312
|
+
`;
|
|
16313
|
+
});
|
|
16314
|
+
}), "resetMarkCommand");
|
|
16263
16315
|
|
|
16264
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16316
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/review.js
|
|
16265
16317
|
var REVIEW_THREADS = 50;
|
|
16266
16318
|
var REVIEW_PER_THREAD = 50;
|
|
16267
16319
|
var OWED_DAYS = 30;
|
|
@@ -16359,7 +16411,7 @@ var reviewMail = /* @__PURE__ */ __name(async (store, mailbox, options) => {
|
|
|
16359
16411
|
};
|
|
16360
16412
|
}, "reviewMail");
|
|
16361
16413
|
|
|
16362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/cli/review.js
|
|
16363
16415
|
var DAY2 = 864e5;
|
|
16364
16416
|
var REVIEW_UNTRUSTED = [...SUMMARY_UNTRUSTED, ...MAIL_HIT_UNTRUSTED];
|
|
16365
16417
|
var MAIL_REVIEW_QUERY = defineQuery({
|
|
@@ -16607,7 +16659,7 @@ an agent over MCP, and each scheduled run.`).action(async function(query) {
|
|
|
16607
16659
|
saved?.save(found.checked ?? {}, found.complete ? { through: found.until } : {});
|
|
16608
16660
|
}), "mailReviewCommand");
|
|
16609
16661
|
|
|
16610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16662
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/cli/bulk-settings.js
|
|
16611
16663
|
var listed = /* @__PURE__ */ __name((words2) => words2.join(", "), "listed");
|
|
16612
16664
|
var MAIL_BULK_SETTINGS = [
|
|
16613
16665
|
{
|
|
@@ -16663,7 +16715,7 @@ var bulkTriageOf = /* @__PURE__ */ __name((config) => {
|
|
|
16663
16715
|
};
|
|
16664
16716
|
}, "bulkTriageOf");
|
|
16665
16717
|
|
|
16666
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16718
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mail/cli/index.js
|
|
16667
16719
|
var absentAccount = /* @__PURE__ */ __name((error) => {
|
|
16668
16720
|
if (error instanceof CliError && error.code === "not_found")
|
|
16669
16721
|
return void 0;
|
|
@@ -16854,6 +16906,7 @@ var messagesCommand = /* @__PURE__ */ __name((mail) => {
|
|
|
16854
16906
|
renderAnswer(this, output, beforeN || afterN ? listOf("messages show", { items: shown, limit: Math.max(1, shown.length), has_more: false }) : itemOf(shown.find((_, at) => emails[at]?.anchor) ?? shown[0], unread ? { meta: { complete: false, issues: [unread] } } : void 0), () => shownText(emails));
|
|
16855
16907
|
});
|
|
16856
16908
|
messages.addCommand(acknowledgeCommand(mail));
|
|
16909
|
+
messages.addCommand(resetMarkCommand(mail));
|
|
16857
16910
|
return messages;
|
|
16858
16911
|
}, "messagesCommand");
|
|
16859
16912
|
var mailThread = strictObject({
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/cli/input-policy.js
|
|
11
11
|
var MAX_BUFFERED_INPUT = 16 * 1024 * 1024;
|
|
12
12
|
var MAX_SECRET_INPUT = 64 * 1024;
|
|
13
13
|
var policies = /* @__PURE__ */ new WeakMap();
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
answeredWire
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OGOMIZVL.js";
|
|
6
6
|
import {
|
|
7
7
|
CALLER_META_KEY,
|
|
8
8
|
PROXY_CLIENT_NAME,
|
|
9
9
|
callerOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LJZAVL4S.js";
|
|
11
11
|
import {
|
|
12
12
|
StdioServerTransport,
|
|
13
13
|
serveStdio
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
__name
|
|
20
20
|
} from "./chunk-ZVVMGPBJ.js";
|
|
21
21
|
|
|
22
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/mcp/all-profiles.js
|
|
23
23
|
import { spawn } from "node:child_process";
|
|
24
24
|
import { randomUUID } from "node:crypto";
|
|
25
25
|
var PROTOCOL = "2025-06-18";
|
|
@@ -253,7 +253,7 @@ var serveAllProfilesOverStdio = /* @__PURE__ */ __name(async (options, io = {})
|
|
|
253
253
|
}, "serveAllProfilesOverStdio");
|
|
254
254
|
var serveAllProfilesOverHttp = /* @__PURE__ */ __name(async (options, http) => {
|
|
255
255
|
const { build, close } = allProfilesServer(options);
|
|
256
|
-
const { serveOverHttp } = await import("./serve-
|
|
256
|
+
const { serveOverHttp } = await import("./serve-YRSGBTJY.js");
|
|
257
257
|
const listening = await serveOverHttp(build, {
|
|
258
258
|
...http,
|
|
259
259
|
appName: options.command,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/files/ordinary-file.js
|
|
11
11
|
import { constants } from "node:fs";
|
|
12
12
|
import { lstat, open } from "node:fs/promises";
|
|
13
13
|
var deviceOf = /* @__PURE__ */ __name((dev) => process.platform === "win32" ? BigInt.asUintN(32, dev) : dev, "deviceOf");
|
|
@@ -73,7 +73,7 @@ var syncDirectory = /* @__PURE__ */ __name(async (path) => {
|
|
|
73
73
|
}
|
|
74
74
|
}, "syncDirectory");
|
|
75
75
|
|
|
76
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
76
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/files/atomic-write.js
|
|
77
77
|
import { randomUUID } from "node:crypto";
|
|
78
78
|
import { constants as constants2 } from "node:fs";
|
|
79
79
|
import { link, open as open2, realpath, rename, unlink } from "node:fs/promises";
|
|
@@ -111,7 +111,7 @@ var writeFileAtomic = /* @__PURE__ */ __name(async (path, content, { mode = 384,
|
|
|
111
111
|
}
|
|
112
112
|
}, "writeFileAtomic");
|
|
113
113
|
|
|
114
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/files/bounded-utf8.js
|
|
115
115
|
var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
|
|
116
116
|
if (!Number.isSafeInteger(maxBytes) || maxBytes < 1 || maxBytes > 16 * 1024 * 1024)
|
|
117
117
|
throw new CliError("validation_error", "file maxBytes takes 1\u201316777216 bytes");
|
|
@@ -140,21 +140,21 @@ var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
|
|
|
140
140
|
}
|
|
141
141
|
}, "readBoundedUtf8File");
|
|
142
142
|
|
|
143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
143
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/files/lock.js
|
|
144
144
|
import { mkdir as mkdir2 } from "node:fs/promises";
|
|
145
145
|
import { basename as basename2, dirname as dirname2 } from "node:path";
|
|
146
146
|
|
|
147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
|
|
148
148
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
149
149
|
import { lstat as lstat3, mkdir, open as open3, realpath as realpath3, rmdir as rmdir2, unlink as unlink4 } from "node:fs/promises";
|
|
150
150
|
import { hostname as hostname2 } from "node:os";
|
|
151
151
|
import { join as join3 } from "node:path";
|
|
152
152
|
|
|
153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
|
|
154
154
|
import { lstat as lstat2, readdir, realpath as realpath2, unlink as unlink2 } from "node:fs/promises";
|
|
155
155
|
import { join as join2 } from "node:path";
|
|
156
156
|
|
|
157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/files/native-lease-owner.js
|
|
158
158
|
import { hostname } from "node:os";
|
|
159
159
|
var missingLeaseFile = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missingLeaseFile");
|
|
160
160
|
var readLeaseOwner = /* @__PURE__ */ __name(async (path, name, signal) => {
|
|
@@ -199,7 +199,7 @@ var leaseOwnerStatus = /* @__PURE__ */ __name((owner) => {
|
|
|
199
199
|
}
|
|
200
200
|
}, "leaseOwnerStatus");
|
|
201
201
|
|
|
202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
|
|
203
203
|
var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
|
|
204
204
|
const inspect = /* @__PURE__ */ __name(async (destination, options = {}) => {
|
|
205
205
|
options.signal?.throwIfAborted();
|
|
@@ -258,7 +258,7 @@ var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
|
|
|
258
258
|
return { inspect, recover };
|
|
259
259
|
}, "leaseInspection");
|
|
260
260
|
|
|
261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/files/native-lease-release.js
|
|
262
262
|
import { rmdir, unlink as unlink3 } from "node:fs/promises";
|
|
263
263
|
var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identity) => {
|
|
264
264
|
let releasing;
|
|
@@ -283,7 +283,7 @@ var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identi
|
|
|
283
283
|
};
|
|
284
284
|
}, "ownedNativeLease");
|
|
285
285
|
|
|
286
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
|
|
287
287
|
var validName = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length > 0 && value !== "." && value !== ".." && !/[\\/\0:]/.test(value), "validName");
|
|
288
288
|
var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
|
|
289
289
|
const { markerDirectory, legacyMarker } = layout;
|
|
@@ -354,7 +354,7 @@ var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
|
|
|
354
354
|
};
|
|
355
355
|
}, "nativeWriterLeaseStore");
|
|
356
356
|
|
|
357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/files/lock.js
|
|
358
358
|
var acquireLock = /* @__PURE__ */ __name(async (path, { signal } = {}) => {
|
|
359
359
|
const folder = dirname2(path);
|
|
360
360
|
await mkdir2(folder, { recursive: true, mode: 448 });
|
|
@@ -369,7 +369,7 @@ var acquireLock = /* @__PURE__ */ __name(async (path, { signal } = {}) => {
|
|
|
369
369
|
});
|
|
370
370
|
}, "acquireLock");
|
|
371
371
|
|
|
372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.577.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_b456bb3dbfa5a2ab44c157391052a5e8/node_modules/@wirecat/cli-core/dist/files/safe-name.js
|
|
373
373
|
import { basename as basename3 } from "node:path";
|
|
374
374
|
var safeName = /* @__PURE__ */ __name((name, platform = process.platform) => {
|
|
375
375
|
let plain = name === void 0 ? "" : basename3(name.replaceAll("\\", "/")).replace(/[\p{Cc}---]/gu, "").replace(/^\.+/, "");
|