@wirecat/mail-cli 0.23.1 → 0.25.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 +23 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-FJHJCGRU.js → all-profiles-QEV2PSOR.js} +11 -11
- package/dist/bundle/{anthropic-AFL7NKVZ.js → anthropic-5NKQXIHM.js} +28 -12
- package/dist/bundle/{app-server-WKCBJMHI.js → app-server-G2CJNT4R.js} +62 -50
- package/dist/bundle/{bun-HQATAQJQ.js → bun-6HBYWQIX.js} +2 -2
- package/dist/bundle/{bun-sqlite-4ECAV7OU.js → bun-sqlite-DXIQ7BVR.js} +9 -5
- package/dist/bundle/{chunk-MUDHCYN4.js → chunk-37F6QYTO.js} +6 -6
- package/dist/bundle/{chunk-NMGF3UOZ.js → chunk-3XVR2ROR.js} +50 -46
- package/dist/bundle/{chunk-QUKD5SO2.js → chunk-434YOD6A.js} +4 -4
- package/dist/bundle/{chunk-7SWWVDEZ.js → chunk-4W4EVVL4.js} +61 -21
- package/dist/bundle/{chunk-CCYHBNRL.js → chunk-5QYK3LWS.js} +326 -56
- package/dist/bundle/{chunk-7YRKUEYE.js → chunk-5ZYFV6FD.js} +694 -228
- package/dist/bundle/chunk-7GLJSJ7M.js +16 -0
- package/dist/bundle/{chunk-NOA6E6MM.js → chunk-A6BPOX5O.js} +38841 -24161
- package/dist/bundle/{chunk-34743C4C.js → chunk-ADKMBXY4.js} +1 -1
- package/dist/bundle/{chunk-2HXHAFRP.js → chunk-B7SWTH5O.js} +2 -2
- package/dist/bundle/{chunk-NKBAZ4VC.js → chunk-BC7PFQL7.js} +2 -2
- package/dist/bundle/{chunk-ROKTS7WM.js → chunk-CBYBZCQP.js} +1 -1
- package/dist/bundle/chunk-CIWWNBVW.js +188 -0
- package/dist/bundle/{chunk-SBGXKM4U.js → chunk-DIA56CS7.js} +8 -7
- package/dist/bundle/{chunk-VYHIX3OP.js → chunk-EXVY76VO.js} +61 -607
- package/dist/bundle/{chunk-BVJQBAGL.js → chunk-FZZD4AFY.js} +14 -14
- package/dist/bundle/{chunk-VFKX5UMJ.js → chunk-G5LHHAW2.js} +6 -6
- package/dist/bundle/{chunk-QV3M2MHG.js → chunk-GJRYZXBN.js} +13 -136
- package/dist/bundle/{chunk-GJNFNC76.js → chunk-GY4XCLCO.js} +10 -15
- package/dist/bundle/{chunk-V7CFZ773.js → chunk-HEIDAHRC.js} +2 -2
- package/dist/bundle/{chunk-AGNAT7CM.js → chunk-HEYVMAAQ.js} +2 -2
- package/dist/bundle/{chunk-HOKGIYUO.js → chunk-HJSJBNCJ.js} +119 -9
- package/dist/bundle/{chunk-KKGX7JMX.js → chunk-HLXVUMZJ.js} +2 -2
- package/dist/bundle/{chunk-OU5CWCG2.js → chunk-IACWKZWS.js} +1 -1
- package/dist/bundle/{chunk-QR7JZM3D.js → chunk-IXO4SCKE.js} +1 -1
- package/dist/bundle/{chunk-GOMJNH56.js → chunk-IZOYW4Z4.js} +32 -8
- package/dist/bundle/{chunk-WN4HP7IZ.js → chunk-J4OYK4WL.js} +14 -14
- package/dist/bundle/{chunk-76RTQYJQ.js → chunk-JG4MNYG2.js} +1 -1
- package/dist/bundle/{chunk-VAMCRP47.js → chunk-K2OGF7KC.js} +2 -2
- package/dist/bundle/chunk-K6HR6HCO.js +32 -0
- package/dist/bundle/{chunk-B6QMMRIM.js → chunk-KFB2X6KE.js} +1530 -1525
- package/dist/bundle/{chunk-3UFD76IR.js → chunk-KK4HD3SI.js} +6 -6
- package/dist/bundle/{chunk-3QVGB2CI.js → chunk-L4QVOEOB.js} +4 -4
- package/dist/bundle/chunk-LGZPKKBN.js +53 -0
- package/dist/bundle/chunk-LVGX7VTD.js +138 -0
- package/dist/bundle/chunk-MBFPFWCO.js +1243 -0
- package/dist/bundle/{chunk-3DQYO7FB.js → chunk-MCPOZNWG.js} +1 -1
- package/dist/bundle/{chunk-SR3ADLGX.js → chunk-MWGH3M46.js} +3 -3
- package/dist/bundle/{chunk-OJCUSHZG.js → chunk-ND5H5ADM.js} +4 -4
- package/dist/bundle/chunk-NMZQTYKJ.js +18 -0
- package/dist/bundle/{chunk-4YJJQNNJ.js → chunk-OLKCJBZY.js} +5 -5
- package/dist/bundle/{chunk-E7ZVKQHG.js → chunk-OLLIWNFG.js} +3 -3
- package/dist/bundle/{chunk-R5MYOLQP.js → chunk-P6GXNT7Z.js} +13 -13
- package/dist/bundle/{chunk-M7RGG3UU.js → chunk-PGC5TRH6.js} +3 -3
- package/dist/bundle/{chunk-3OZKDC6Y.js → chunk-PHHH2NQP.js} +15 -9
- package/dist/bundle/{chunk-S5OTP7XS.js → chunk-PP3YOAWG.js} +3 -3
- package/dist/bundle/{chunk-4IFX4HV2.js → chunk-PQMJ5BXH.js} +4 -4
- package/dist/bundle/{chunk-ZXIPJF3Y.js → chunk-QB3DP2TN.js} +2 -2
- package/dist/bundle/{chunk-4IWJARFA.js → chunk-QQUY4MZY.js} +1 -1
- package/dist/bundle/{chunk-UHC5I3JV.js → chunk-RX5CJ55S.js} +1 -1
- package/dist/bundle/{chunk-CYQVWITQ.js → chunk-S2QRAKQI.js} +99 -42
- package/dist/bundle/{chunk-V3TDQUXD.js → chunk-SMTBV62X.js} +44 -60
- package/dist/bundle/{chunk-SNTLN2QT.js → chunk-T27IMG6X.js} +3 -1
- package/dist/bundle/{chunk-LLYVBO3R.js → chunk-TY644DKQ.js} +19 -19
- package/dist/bundle/{chunk-R554W7ZO.js → chunk-U6IQ6YQ2.js} +2 -2
- package/dist/bundle/{chunk-MBKNL5TX.js → chunk-VFU7PVPQ.js} +373 -133
- package/dist/bundle/{chunk-UMXVQIGD.js → chunk-VL6H2BND.js} +377 -12
- package/dist/bundle/{chunk-DALBYUPC.js → chunk-VUBZFMGP.js} +2 -2
- package/dist/bundle/{chunk-VYIIX6VN.js → chunk-WOAYHCM2.js} +1 -1
- package/dist/bundle/{chunk-LQDMUMA2.js → chunk-WX6OYVCH.js} +5370 -3700
- package/dist/bundle/chunk-XMDEM6BZ.js +2094 -0
- package/dist/bundle/{chunk-CUOCDJFI.js → chunk-XQYKIZMG.js} +13 -9
- package/dist/bundle/{chunk-PMIKRELC.js → chunk-YNS2YVUR.js} +69 -6
- package/dist/bundle/{chunk-CBWA2T3N.js → chunk-Z5T6OW3V.js} +14 -5
- package/dist/bundle/command-contract-XSW2Q33S.js +36 -0
- package/dist/bundle/command-server-entry-XMSSY5ID.js +165 -0
- package/dist/bundle/{decode-QXKTMOTH.js → decode-RYGB4PGT.js} +5 -5
- package/dist/bundle/{dispatch-G4CYFWQ2.js → dispatch-PLQOIZG5.js} +10 -10
- package/dist/bundle/{dist-5FX36DAW.js → dist-GY2AQETI.js} +79 -46
- package/dist/bundle/{echarts-HHUM43TU.js → echarts-7CM2MCMW.js} +2 -2
- package/dist/bundle/{embed-SRZSDZVI.js → embed-FTBDPOPT.js} +6 -6
- package/dist/bundle/{embedder-WZIZCWLX.js → embedder-B43WGNBD.js} +9 -9
- package/dist/bundle/{failure-FFPK2WYB.js → failure-XP5QYV2T.js} +2 -2
- package/dist/bundle/{first-run-6DVWZ3JQ.js → first-run-XIIUARNM.js} +12 -11
- package/dist/bundle/first-screen-Z7HC6PQU.js +34 -0
- package/dist/bundle/{instructions-UWONE6UT.js → instructions-R7OHVAWH.js} +1 -1
- package/dist/bundle/mail.js +37 -13
- package/dist/bundle/{mcp-CFVG2OUS.js → mcp-7KQUJNFN.js} +2 -2
- package/dist/bundle/{node-HLAOYJDB.js → node-3N2JGZ7V.js} +2 -2
- package/dist/bundle/{node-sqlite-RO66I7W6.js → node-sqlite-WFJXW3CZ.js} +10 -6
- package/dist/bundle/{oauth-VNLB2TET.js → oauth-SVJLQTWV.js} +7 -7
- package/dist/bundle/{open-QQSG343L.js → open-ZDONVKSX.js} +5 -5
- package/dist/bundle/{openai-JTFC7OGF.js → openai-XVEW6XOU.js} +21 -38
- package/dist/bundle/{process-3CZAXR6P.js → process-YAHHUFR5.js} +1 -1
- package/dist/bundle/{program-XTOS4RAM.js → program-HU2UVMJE.js} +7071 -5421
- package/dist/bundle/{prompt-HGQ6GPYL.js → prompt-JAJ2CUJI.js} +5 -5
- package/dist/bundle/{recognize-2SHMNEIZ.js → recognize-UFBWUNFR.js} +4 -4
- package/dist/bundle/{remote-GBQC3433.js → remote-2GFOVLCR.js} +9 -7
- package/dist/bundle/{rerank-FQHQXFNR.js → rerank-BGPSMXTL.js} +7 -7
- package/dist/bundle/{serve-THU67QUZ.js → serve-CB3XJTH3.js} +9 -9
- package/dist/bundle/server-34GEF22R.js +68 -0
- package/dist/bundle/{server-LOT3CLYX.js → server-M7FQY7TX.js} +42 -40
- package/dist/bundle/{sqlite-runtime-NOOUMBC4.js → sqlite-runtime-AEV6PGDR.js} +6 -6
- package/dist/bundle/{state-KSKZCV2U.js → state-YLBEQLBI.js} +6 -6
- package/dist/bundle/{store-BAKSHTKF.js → store-CDUL3HKK.js} +19 -16
- package/dist/bundle/{store-OHNZOQ7U.js → store-EKWKY6GG.js} +49 -20
- package/dist/bundle/store-maintenance-command-XH2JUM5F.js +58 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/chunk-5UKBUI4I.js +0 -35
- package/dist/bundle/chunk-EXPR6QAX.js +0 -394
- package/dist/bundle/chunk-FWFNUJQD.js +0 -12172
- package/dist/bundle/command-contract-IIHBNF7J.js +0 -35
- package/dist/bundle/first-screen-SRZ7NYHZ.js +0 -33
- package/dist/bundle/server-VKMUX7ZT.js +0 -65
- package/dist/bundle/store-maintenance-command-ROQHJVEA.js +0 -54
- /package/dist/bundle/{chunk-QZLK2ISN.js → chunk-YVNHQFLC.js} +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
addStoreMaintenanceCommands,
|
|
5
|
+
buildStems,
|
|
6
|
+
storeMaintenanceCommands,
|
|
7
|
+
storeSummary
|
|
8
|
+
} from "./chunk-VFU7PVPQ.js";
|
|
9
|
+
import "./chunk-HEYVMAAQ.js";
|
|
10
|
+
import "./chunk-EXVY76VO.js";
|
|
11
|
+
import "./chunk-WX6OYVCH.js";
|
|
12
|
+
import "./chunk-P6GXNT7Z.js";
|
|
13
|
+
import "./chunk-GJRYZXBN.js";
|
|
14
|
+
import "./chunk-Z5T6OW3V.js";
|
|
15
|
+
import "./chunk-PGC5TRH6.js";
|
|
16
|
+
import "./chunk-PP3YOAWG.js";
|
|
17
|
+
import "./chunk-QB3DP2TN.js";
|
|
18
|
+
import "./chunk-HTQTIKWP.js";
|
|
19
|
+
import "./chunk-KFB2X6KE.js";
|
|
20
|
+
import "./chunk-DIA56CS7.js";
|
|
21
|
+
import "./chunk-XQYKIZMG.js";
|
|
22
|
+
import "./chunk-IACWKZWS.js";
|
|
23
|
+
import "./chunk-L4QVOEOB.js";
|
|
24
|
+
import "./chunk-MCPOZNWG.js";
|
|
25
|
+
import "./chunk-MWGH3M46.js";
|
|
26
|
+
import "./chunk-S2QRAKQI.js";
|
|
27
|
+
import "./chunk-OLLIWNFG.js";
|
|
28
|
+
import "./chunk-A6BPOX5O.js";
|
|
29
|
+
import "./chunk-XMDEM6BZ.js";
|
|
30
|
+
import "./chunk-MBFPFWCO.js";
|
|
31
|
+
import "./chunk-5ZYFV6FD.js";
|
|
32
|
+
import "./chunk-U6IQ6YQ2.js";
|
|
33
|
+
import "./chunk-CBYBZCQP.js";
|
|
34
|
+
import "./chunk-GY4XCLCO.js";
|
|
35
|
+
import "./chunk-7GLJSJ7M.js";
|
|
36
|
+
import "./chunk-YNS2YVUR.js";
|
|
37
|
+
import "./chunk-K6HR6HCO.js";
|
|
38
|
+
import "./chunk-KK4HD3SI.js";
|
|
39
|
+
import "./chunk-G5LHHAW2.js";
|
|
40
|
+
import "./chunk-434YOD6A.js";
|
|
41
|
+
import "./chunk-RX5CJ55S.js";
|
|
42
|
+
import "./chunk-YVNHQFLC.js";
|
|
43
|
+
import "./chunk-D72URWJE.js";
|
|
44
|
+
import "./chunk-LGZPKKBN.js";
|
|
45
|
+
import "./chunk-37F6QYTO.js";
|
|
46
|
+
import "./chunk-T27IMG6X.js";
|
|
47
|
+
import "./chunk-TY644DKQ.js";
|
|
48
|
+
import "./chunk-IZOYW4Z4.js";
|
|
49
|
+
import "./chunk-Y5E2WNWB.js";
|
|
50
|
+
import "./chunk-VUBZFMGP.js";
|
|
51
|
+
import "./chunk-IXO4SCKE.js";
|
|
52
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
53
|
+
export {
|
|
54
|
+
addStoreMaintenanceCommands,
|
|
55
|
+
buildStems,
|
|
56
|
+
storeMaintenanceCommands,
|
|
57
|
+
storeSummary
|
|
58
|
+
};
|
package/dist/config.d.ts
CHANGED
|
@@ -116,6 +116,7 @@ export declare const configuration: {
|
|
|
116
116
|
record_input: v.OptionalSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.LiteralSchema<"failed", undefined>], (issue: v.BaseIssue<unknown>) => string>, undefined>;
|
|
117
117
|
keep_runs_for_days: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
118
118
|
keep_successful_runs_for_days: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
119
|
+
keep_store_runs_for_days: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
119
120
|
runs_size_limit_mb: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
120
121
|
permissions: v.OptionalSchema<v.RecordSchema<v.GenericSchema<string>, v.PicklistSchema<readonly ["deny", "readonly", "ask", "allow"], (issue: v.PicklistIssue) => string>, (issue: v.BaseIssue<unknown>) => string>, undefined>;
|
|
121
122
|
sends_per_hour: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
@@ -126,6 +127,7 @@ export declare const configuration: {
|
|
|
126
127
|
history_dialog_days: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>, v.MaxValueAction<number, 1095, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
127
128
|
history_group_days: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>, v.MaxValueAction<number, 1095, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
128
129
|
history_group_members_max: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
130
|
+
history_muted: v.OptionalSchema<v.BooleanSchema<(issue: v.BaseIssue<unknown>) => string>, undefined>;
|
|
129
131
|
picture_search: v.OptionalSchema<v.BooleanSchema<(issue: v.BaseIssue<unknown>) => string>, undefined>;
|
|
130
132
|
search_reranker: v.OptionalSchema<v.PicklistSchema<[...string[], "off"], (issue: v.BaseIssue<unknown>) => string>, undefined>;
|
|
131
133
|
update_check: v.OptionalSchema<v.BooleanSchema<(issue: v.BaseIssue<unknown>) => string>, undefined>;
|
|
@@ -195,6 +197,7 @@ export declare const configuration: {
|
|
|
195
197
|
record_input: v.OptionalSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.LiteralSchema<"failed", undefined>], (issue: v.BaseIssue<unknown>) => string>, undefined>;
|
|
196
198
|
keep_runs_for_days: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
197
199
|
keep_successful_runs_for_days: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
200
|
+
keep_store_runs_for_days: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
198
201
|
runs_size_limit_mb: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
199
202
|
permissions: v.OptionalSchema<v.RecordSchema<v.GenericSchema<string>, v.PicklistSchema<readonly ["deny", "readonly", "ask", "allow"], (issue: v.PicklistIssue) => string>, (issue: v.BaseIssue<unknown>) => string>, undefined>;
|
|
200
203
|
sends_per_hour: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
@@ -205,6 +208,7 @@ export declare const configuration: {
|
|
|
205
208
|
history_dialog_days: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>, v.MaxValueAction<number, 1095, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
206
209
|
history_group_days: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>, v.MaxValueAction<number, 1095, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
207
210
|
history_group_members_max: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>]>, undefined>;
|
|
211
|
+
history_muted: v.OptionalSchema<v.BooleanSchema<(issue: v.BaseIssue<unknown>) => string>, undefined>;
|
|
208
212
|
picture_search: v.OptionalSchema<v.BooleanSchema<(issue: v.BaseIssue<unknown>) => string>, undefined>;
|
|
209
213
|
search_reranker: v.OptionalSchema<v.PicklistSchema<[...string[], "off"], (issue: v.BaseIssue<unknown>) => string>, undefined>;
|
|
210
214
|
}, (issue: v.StrictObjectIssue) => string>, "has to be an object of profiles, by name">, {}>;
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,QAAQ,EAGd,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAG5B,wGAAwG;AACxG,eAAO,MAAM,eAAe,yBAAyB,CAAA;AAErD,oIAAoI;AACpI,eAAO,MAAM,UAAU;IACrB,QAAQ;IAaR,WAAW;CACZ,CAAA;AAmBD,yEAAyE;AACzE,eAAO,MAAM,yBAAyB,KAAK,CAAA;AAE3C,MAAM,WAAW,OAAO;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,KAAK,GAAG,UAAU,CAAA;IAC7B,sFAAsF;IACtF,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,UAAU,CAAA;KAAE,CAAA;IACtE,8FAA8F;IAC9F,IAAI,EAAE,cAAc,GAAG,OAAO,CAAA;IAC9B,4GAA4G;IAC5G,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,qGAAqG;IACrG,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,4GAA4G;IAC5G,WAAW,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CAC9C;AAKD,eAAO,MAAM,aAAa;;iBAA0B,OAAO;kBAAY,cAAc
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,QAAQ,EAGd,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAG5B,wGAAwG;AACxG,eAAO,MAAM,eAAe,yBAAyB,CAAA;AAErD,oIAAoI;AACpI,eAAO,MAAM,UAAU;IACrB,QAAQ;IAaR,WAAW;CACZ,CAAA;AAmBD,yEAAyE;AACzE,eAAO,MAAM,yBAAyB,KAAK,CAAA;AAE3C,MAAM,WAAW,OAAO;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,KAAK,GAAG,UAAU,CAAA;IAC7B,sFAAsF;IACtF,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,UAAU,CAAA;KAAE,CAAA;IACtE,8FAA8F;IAC9F,IAAI,EAAE,cAAc,GAAG,OAAO,CAAA;IAC9B,4GAA4G;IAC5G,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,qGAAqG;IACrG,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,4GAA4G;IAC5G,WAAW,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CAC9C;AAKD,eAAO,MAAM,aAAa;;iBAA0B,OAAO;kBAAY,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsFnF,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,cAAc,CAAA;CAAE,CAAA"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.25.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "0.
|
|
1
|
+
export const VERSION = "0.25.0";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/mail-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"mcpName": "dev.wirecat/mail-cli",
|
|
5
5
|
"description": "IMAP sync of a mailbox into the shared WireCat store, offline search, and flags, folders and Trash with undo on the server, the app password kept in the OS keyring — built for agents and scripts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"docs:spell": "cspell lint --config cspell.json --no-progress --no-summary README.md SECURITY.md CHANGELOG.md AGENTS.md CLAUDE.md 'docs/*.md' 'skills/**/*.md'"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@wirecat/cli-base": "0.
|
|
61
|
-
"@wirecat/cli-core": "0.
|
|
60
|
+
"@wirecat/cli-base": "0.93.0",
|
|
61
|
+
"@wirecat/cli-core": "0.647.0",
|
|
62
62
|
"commander": "15.0.0",
|
|
63
63
|
"imapflow": "2.9.1",
|
|
64
64
|
"nodemailer": "10.1.7",
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
resolvePaths
|
|
5
|
-
} from "./chunk-LLYVBO3R.js";
|
|
6
|
-
import {
|
|
7
|
-
__name
|
|
8
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
9
|
-
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/store/path.js
|
|
11
|
-
import { userInfo } from "node:os";
|
|
12
|
-
import { isAbsolute, join, relative, resolve } from "node:path";
|
|
13
|
-
var wirecatDirectory = /* @__PURE__ */ __name((env = process.env, platform) => resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env, ...platform ? { platform } : {} }).state, "wirecatDirectory");
|
|
14
|
-
var storePath = /* @__PURE__ */ __name((env = process.env) => env.MESSAGING_STORE ?? join(wirecatDirectory(env), "wirecat.db"), "storePath");
|
|
15
|
-
var accountHome = /* @__PURE__ */ __name(() => {
|
|
16
|
-
try {
|
|
17
|
-
return userInfo().homedir;
|
|
18
|
-
} catch {
|
|
19
|
-
return void 0;
|
|
20
|
-
}
|
|
21
|
-
}, "accountHome");
|
|
22
|
-
var refuseOwnerStoreInTests = /* @__PURE__ */ __name((file, env = process.env, home = accountHome()) => {
|
|
23
|
-
if (!env.VITEST || !home || file === ":memory:")
|
|
24
|
-
return;
|
|
25
|
-
const inside = relative(wirecatDirectory({ HOME: home, USERPROFILE: home }), resolve(file));
|
|
26
|
-
if (inside.startsWith("..") || isAbsolute(inside))
|
|
27
|
-
return;
|
|
28
|
-
throw new Error(`a test tried to open ${file}, in the owner's real WireCat folder; give it a MESSAGING_STORE or HOME of its own`);
|
|
29
|
-
}, "refuseOwnerStoreInTests");
|
|
30
|
-
|
|
31
|
-
export {
|
|
32
|
-
wirecatDirectory,
|
|
33
|
-
storePath,
|
|
34
|
-
refuseOwnerStoreInTests
|
|
35
|
-
};
|
|
@@ -1,394 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
isCliFailure,
|
|
5
|
-
isStoreDamage
|
|
6
|
-
} from "./chunk-R554W7ZO.js";
|
|
7
|
-
import {
|
|
8
|
-
refuseOwnerStoreInTests
|
|
9
|
-
} from "./chunk-5UKBUI4I.js";
|
|
10
|
-
import {
|
|
11
|
-
array,
|
|
12
|
-
boolean,
|
|
13
|
-
integer,
|
|
14
|
-
isoTime,
|
|
15
|
-
isoTimestamp,
|
|
16
|
-
minLength,
|
|
17
|
-
minValue,
|
|
18
|
-
nullable,
|
|
19
|
-
number,
|
|
20
|
-
optional,
|
|
21
|
-
picklist,
|
|
22
|
-
pipe,
|
|
23
|
-
record,
|
|
24
|
-
reference,
|
|
25
|
-
strictObject,
|
|
26
|
-
string,
|
|
27
|
-
unknown
|
|
28
|
-
} from "./chunk-GOMJNH56.js";
|
|
29
|
-
import {
|
|
30
|
-
CliError
|
|
31
|
-
} from "./chunk-DALBYUPC.js";
|
|
32
|
-
import {
|
|
33
|
-
__name
|
|
34
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
35
|
-
|
|
36
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/store/source-review.js
|
|
37
|
-
var SOURCE_REVIEW_KIND = "memory_source_review";
|
|
38
|
-
var SOURCE_REVIEW_CAUSES = ["changed", "outdated", "deleted", "contradicted"];
|
|
39
|
-
var ERASED_TEXT = "[source erased]";
|
|
40
|
-
var severity = /* @__PURE__ */ __name((cause) => SOURCE_REVIEW_CAUSES.indexOf(cause), "severity");
|
|
41
|
-
var graver = /* @__PURE__ */ __name((a, b) => severity(b) > severity(a) ? b : a, "graver");
|
|
42
|
-
|
|
43
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/tasks/model.js
|
|
44
|
-
var TASK_KINDS = ["question", "request", "mention", "promise"];
|
|
45
|
-
var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
|
|
46
|
-
var CLOSED_STATES = ["done", "dismissed"];
|
|
47
|
-
var TASK_ORIGINS = ["rule", "agent", "owner"];
|
|
48
|
-
var TASK_VERDICTS = ["useful", "not_useful"];
|
|
49
|
-
var isClosedState = /* @__PURE__ */ __name((state) => CLOSED_STATES.includes(state), "isClosedState");
|
|
50
|
-
function closeTask(task, state, by, at, reason) {
|
|
51
|
-
if (isClosedState(task.state))
|
|
52
|
-
throw new CliError("validation_error", `task ${task.id} is already ${task.state}`, { reason: "task.closed" });
|
|
53
|
-
const { claimedBy: _by, claimedUntil: _until, ...unclaimed } = task;
|
|
54
|
-
return { ...unclaimed, state, closedAt: at, closedBy: by, ...reason === void 0 ? {} : { reason } };
|
|
55
|
-
}
|
|
56
|
-
__name(closeTask, "closeTask");
|
|
57
|
-
|
|
58
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/tasks/priority.js
|
|
59
|
-
var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
|
|
60
|
-
var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
|
|
61
|
-
var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
|
|
62
|
-
var priorityLabel = /* @__PURE__ */ __name((score) => score === null ? null : PRIORITY_LABELS[Math.min(3, Math.max(0, Math.floor(score * 4)))], "priorityLabel");
|
|
63
|
-
var priorityBand = /* @__PURE__ */ __name((label) => {
|
|
64
|
-
const at = PRIORITY_LABELS.indexOf(label);
|
|
65
|
-
return { from: at / 4, to: (at + 1) / 4 };
|
|
66
|
-
}, "priorityBand");
|
|
67
|
-
var legacyPriority = /* @__PURE__ */ __name((score) => score === null ? null : score < 0.125 ? 4 : 3 - PRIORITY_LABELS.indexOf(priorityLabel(score)), "legacyPriority");
|
|
68
|
-
var checkedScore = /* @__PURE__ */ __name((score) => {
|
|
69
|
-
if (!Number.isFinite(score) || score < 0 || score > 1)
|
|
70
|
-
throw new CliError("validation_error", "a priority score is 0 to 1");
|
|
71
|
-
return score;
|
|
72
|
-
}, "checkedScore");
|
|
73
|
-
var priorityOf = /* @__PURE__ */ __name((value) => {
|
|
74
|
-
const word = value.trim().toLowerCase();
|
|
75
|
-
if (word === "none")
|
|
76
|
-
return null;
|
|
77
|
-
if (PRIORITY_LABELS.includes(word))
|
|
78
|
-
return MIDDLE[word];
|
|
79
|
-
if (/^[0-4]$/.test(word))
|
|
80
|
-
return LEGACY_PRIORITY_SCORES[Number(word)];
|
|
81
|
-
if (/^(0?\.\d+|[01]\.\d*)$/.test(word) && Number(word) <= 1)
|
|
82
|
-
return Number(word);
|
|
83
|
-
throw new CliError("validation_error", `a priority is ${PRIORITY_LABELS.join(", ")}, none, or a score from 0.0 to 1.0 with its decimal point; 0 (urgent) \u2026 4 (low) still work as critical, high, medium, low, low`);
|
|
84
|
-
}, "priorityOf");
|
|
85
|
-
var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
|
|
86
|
-
|
|
87
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/tasks/service.js
|
|
88
|
-
function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
|
|
89
|
-
async function find(id2) {
|
|
90
|
-
const task = await store.get(id2);
|
|
91
|
-
if (!task)
|
|
92
|
-
throw new CliError("not_found", `no task ${id2}`);
|
|
93
|
-
return task;
|
|
94
|
-
}
|
|
95
|
-
__name(find, "find");
|
|
96
|
-
return {
|
|
97
|
-
/**
|
|
98
|
-
* A rule never makes a second task from a source it has seen, whatever that task's state, so a
|
|
99
|
-
* dismissed one stays dismissed — nor from a message attached or merged into a task. A person or an agent may
|
|
100
|
-
* add a task of another kind to it. A task a rule opens goes through the host's duplicate check.
|
|
101
|
-
*/
|
|
102
|
-
async add(input) {
|
|
103
|
-
const rule = input.origin === "rule";
|
|
104
|
-
const existing = await store.findBySource(input.account, input.source, rule ? { linked: true } : void 0);
|
|
105
|
-
const same = rule ? existing[0] : existing.find((task2) => task2.kind === input.kind);
|
|
106
|
-
if (same)
|
|
107
|
-
return { task: same, created: false };
|
|
108
|
-
const task = { ...input, id: newId(), state: "open", createdAt: now() };
|
|
109
|
-
await store.insert(task);
|
|
110
|
-
if (!rule || !store.reviewDuplicates)
|
|
111
|
-
return { task, created: true };
|
|
112
|
-
return { task, created: true, review: await store.reviewDuplicates(task.id) };
|
|
113
|
-
},
|
|
114
|
-
async close(id2, { as, by, reason }) {
|
|
115
|
-
const task = closeTask(await find(id2), as, by, now(), reason);
|
|
116
|
-
await store.update(task);
|
|
117
|
-
return task;
|
|
118
|
-
},
|
|
119
|
-
list: /* @__PURE__ */ __name((filter = {}) => store.list(filter), "list"),
|
|
120
|
-
async stats(filter = {}) {
|
|
121
|
-
const byGroup = /* @__PURE__ */ new Map();
|
|
122
|
-
for (const task of await store.list(filter))
|
|
123
|
-
byGroup.set(task.group, [...byGroup.get(task.group) ?? [], task]);
|
|
124
|
-
return [...byGroup].map(([group, tasks]) => {
|
|
125
|
-
const open = tasks.filter((task) => !isClosedState(task.state));
|
|
126
|
-
const closeMs = tasks.flatMap((task) => task.closedAt ? [task.closedAt.getTime() - task.createdAt.getTime()] : []);
|
|
127
|
-
const oldestOpenAt = open.map((task) => task.createdAt).sort((a, b) => a.getTime() - b.getTime())[0];
|
|
128
|
-
return {
|
|
129
|
-
group,
|
|
130
|
-
open: open.length,
|
|
131
|
-
...oldestOpenAt ? { oldestOpenAt } : {},
|
|
132
|
-
...closeMs.length > 0 ? { medianCloseMs: median(closeMs) } : {}
|
|
133
|
-
};
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
__name(createTaskService, "createTaskService");
|
|
139
|
-
function median(values) {
|
|
140
|
-
const sorted = [...values].sort((a, b) => a - b);
|
|
141
|
-
const middle = Math.floor(sorted.length / 2);
|
|
142
|
-
const upper = sorted[middle] ?? 0;
|
|
143
|
-
return sorted.length % 2 === 1 ? upper : ((sorted[middle - 1] ?? 0) + upper) / 2;
|
|
144
|
-
}
|
|
145
|
-
__name(median, "median");
|
|
146
|
-
|
|
147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/tasks/store.js
|
|
148
|
-
function matches(task, filter) {
|
|
149
|
-
return (filter.account === void 0 || task.account === filter.account) && (filter.state === void 0 || task.state === filter.state) && (filter.group === void 0 || task.group === filter.group) && (filter.kind === void 0 || task.kind === filter.kind) && (filter.createdBefore === void 0 || task.createdAt < filter.createdBefore);
|
|
150
|
-
}
|
|
151
|
-
__name(matches, "matches");
|
|
152
|
-
|
|
153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
|
|
154
|
-
var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
|
|
155
|
-
var MEMORY_KINDS = ["summary", "digest", "preference"];
|
|
156
|
-
var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
|
|
157
|
-
var MEMORY_SCOPES = ["personal", "work"];
|
|
158
|
-
var WORK_TASK_TYPES = ["bug", "feature", "chore"];
|
|
159
|
-
var TASK_TYPES = [...WORK_TASK_TYPES, ...TASK_KINDS];
|
|
160
|
-
|
|
161
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/store/marks.js
|
|
162
|
-
import { readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
163
|
-
var damageMarkPath = /* @__PURE__ */ __name((store) => `${store}.damaged.json`, "damageMarkPath");
|
|
164
|
-
var healthMarkPath = /* @__PURE__ */ __name((store) => `${store}.health.json`, "healthMarkPath");
|
|
165
|
-
var inodeOf = /* @__PURE__ */ __name((store) => statSync(store, { throwIfNoEntry: false })?.ino, "inodeOf");
|
|
166
|
-
var readJson = /* @__PURE__ */ __name((path) => {
|
|
167
|
-
try {
|
|
168
|
-
return JSON.parse(readFileSync(path, "utf8"));
|
|
169
|
-
} catch (error) {
|
|
170
|
-
if (error.code === "ENOENT")
|
|
171
|
-
return null;
|
|
172
|
-
throw error;
|
|
173
|
-
}
|
|
174
|
-
}, "readJson");
|
|
175
|
-
var ownerStoreInTests = /* @__PURE__ */ __name((store) => {
|
|
176
|
-
try {
|
|
177
|
-
refuseOwnerStoreInTests(store);
|
|
178
|
-
return false;
|
|
179
|
-
} catch {
|
|
180
|
-
return true;
|
|
181
|
-
}
|
|
182
|
-
}, "ownerStoreInTests");
|
|
183
|
-
var sqliteFailure = /* @__PURE__ */ __name((error) => isCliFailure(error) && error.details?.reason === "store.damaged" ? error.cause : error, "sqliteFailure");
|
|
184
|
-
var markStoreDamaged = /* @__PURE__ */ __name((error, { store, command, version, runId, now = Date.now }) => {
|
|
185
|
-
const failure = sqliteFailure(error);
|
|
186
|
-
if (!isStoreDamage(failure) || ownerStoreInTests(store))
|
|
187
|
-
return false;
|
|
188
|
-
const inode = inodeOf(store);
|
|
189
|
-
if (inode === void 0)
|
|
190
|
-
return false;
|
|
191
|
-
const mark = {
|
|
192
|
-
at: new Date(now()).toISOString(),
|
|
193
|
-
command,
|
|
194
|
-
...version ? { cli_version: version } : {},
|
|
195
|
-
...runId ? { run_id: runId } : {},
|
|
196
|
-
error: failure.message.slice(0, 500),
|
|
197
|
-
inode
|
|
198
|
-
};
|
|
199
|
-
try {
|
|
200
|
-
writeFileSync(damageMarkPath(store), `${JSON.stringify(mark, null, 2)}
|
|
201
|
-
`, { flag: "wx", mode: 384 });
|
|
202
|
-
return true;
|
|
203
|
-
} catch {
|
|
204
|
-
return false;
|
|
205
|
-
}
|
|
206
|
-
}, "markStoreDamaged");
|
|
207
|
-
var readDamageMark = /* @__PURE__ */ __name((store) => {
|
|
208
|
-
const path = damageMarkPath(store);
|
|
209
|
-
let mark;
|
|
210
|
-
try {
|
|
211
|
-
mark = readJson(path);
|
|
212
|
-
} catch {
|
|
213
|
-
return { at: "unknown", command: "unknown", error: `${path} cannot be read`, inode: inodeOf(store) ?? 0 };
|
|
214
|
-
}
|
|
215
|
-
if (mark === null)
|
|
216
|
-
return null;
|
|
217
|
-
if (mark.inode !== inodeOf(store)) {
|
|
218
|
-
clearDamageMark(store);
|
|
219
|
-
return null;
|
|
220
|
-
}
|
|
221
|
-
return mark;
|
|
222
|
-
}, "readDamageMark");
|
|
223
|
-
var clearDamageMark = /* @__PURE__ */ __name((store) => rmSync(damageMarkPath(store), { force: true }), "clearDamageMark");
|
|
224
|
-
var refuseDamagedStore = /* @__PURE__ */ __name((store, cli) => {
|
|
225
|
-
const mark = readDamageMark(store);
|
|
226
|
-
if (!mark)
|
|
227
|
-
return;
|
|
228
|
-
throw new CliError("configuration_error", `the store was found damaged at ${mark.at} by \`${mark.command}\` (${mark.error}), so nothing writes to it until it is recovered; \`${cli ?? "<cli>"} store recover\` says what is damaged and what to do`, { reason: "store.damaged" });
|
|
229
|
-
}, "refuseDamagedStore");
|
|
230
|
-
var readHealthMark = /* @__PURE__ */ __name((store) => {
|
|
231
|
-
try {
|
|
232
|
-
return readJson(healthMarkPath(store));
|
|
233
|
-
} catch {
|
|
234
|
-
return null;
|
|
235
|
-
}
|
|
236
|
-
}, "readHealthMark");
|
|
237
|
-
var recordDeepCheck = /* @__PURE__ */ __name((store, health, { cli, version, schema, now = Date.now }) => {
|
|
238
|
-
const previous = readHealthMark(store);
|
|
239
|
-
if (ownerStoreInTests(store))
|
|
240
|
-
return { previous, cleared: null };
|
|
241
|
-
const checkedAt = new Date(now()).toISOString();
|
|
242
|
-
const mark = {
|
|
243
|
-
checked_at: checkedAt,
|
|
244
|
-
ok: health.ok,
|
|
245
|
-
problems: health.problems ?? 0,
|
|
246
|
-
schema,
|
|
247
|
-
cli,
|
|
248
|
-
...version ? { cli_version: version } : {},
|
|
249
|
-
last_ok_at: health.ok ? checkedAt : previous?.last_ok_at ?? null
|
|
250
|
-
};
|
|
251
|
-
const cleared = health.ok ? readDamageMark(store) : null;
|
|
252
|
-
try {
|
|
253
|
-
writeFileSync(healthMarkPath(store), `${JSON.stringify(mark, null, 2)}
|
|
254
|
-
`, { mode: 384 });
|
|
255
|
-
} catch {
|
|
256
|
-
}
|
|
257
|
-
if (cleared)
|
|
258
|
-
clearDamageMark(store);
|
|
259
|
-
return { previous, cleared };
|
|
260
|
-
}, "recordDeepCheck");
|
|
261
|
-
|
|
262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/fields.js
|
|
263
|
-
var text = string();
|
|
264
|
-
var id = pipe(string(), minLength(1));
|
|
265
|
-
var time = isoTime;
|
|
266
|
-
var zonedTime = pipe(string(), isoTimestamp("an ISO 8601 time with a zone"));
|
|
267
|
-
var count = pipe(number(), integer(), minValue(0));
|
|
268
|
-
var untrusted = optional(array(text));
|
|
269
|
-
var providerMetadata = optional(record(string(), unknown()));
|
|
270
|
-
var evidenceSource = strictObject({
|
|
271
|
-
ref: nullable(reference),
|
|
272
|
-
kind: text,
|
|
273
|
-
title: nullable(text),
|
|
274
|
-
sender: nullable(text),
|
|
275
|
-
at: nullable(time),
|
|
276
|
-
excerpt: nullable(text),
|
|
277
|
-
tool: nullable(text),
|
|
278
|
-
missing: boolean()
|
|
279
|
-
});
|
|
280
|
-
var sourceReview = nullable(strictObject({ id, cause: picklist(SOURCE_REVIEW_CAUSES) }));
|
|
281
|
-
var author = strictObject({
|
|
282
|
-
type: picklist(["person", "bot"]),
|
|
283
|
-
id,
|
|
284
|
-
name: nullable(text)
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
|
|
288
|
-
var organization = strictObject({
|
|
289
|
-
id,
|
|
290
|
-
ref: reference,
|
|
291
|
-
kind: picklist(["company", "team", "family", "community"]),
|
|
292
|
-
name: text,
|
|
293
|
-
scope: picklist(["personal", "work"]),
|
|
294
|
-
created_at: time
|
|
295
|
-
});
|
|
296
|
-
var project = strictObject({
|
|
297
|
-
id,
|
|
298
|
-
ref: reference,
|
|
299
|
-
key: text,
|
|
300
|
-
name: text,
|
|
301
|
-
kind: picklist(["project", "inbox"]),
|
|
302
|
-
type: picklist(["work", "client", "personal", "oss", "other"]),
|
|
303
|
-
organization_id: nullable(id),
|
|
304
|
-
scope: picklist(["personal", "work"]),
|
|
305
|
-
created_at: time
|
|
306
|
-
});
|
|
307
|
-
var reminder = strictObject({
|
|
308
|
-
id,
|
|
309
|
-
task: text,
|
|
310
|
-
due_at: time,
|
|
311
|
-
timezone: text,
|
|
312
|
-
state: picklist(["pending", "leased", "delivered", "cancelled"]),
|
|
313
|
-
revision: number(),
|
|
314
|
-
receipt: nullable(text)
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
|
|
318
|
-
var LINK_KINDS = [
|
|
319
|
-
"links-to",
|
|
320
|
-
"blocked-by",
|
|
321
|
-
"follow-up-of",
|
|
322
|
-
"about",
|
|
323
|
-
"member-of",
|
|
324
|
-
"labelled",
|
|
325
|
-
"answered-by",
|
|
326
|
-
"evidence",
|
|
327
|
-
"created-from",
|
|
328
|
-
"duplicate-of",
|
|
329
|
-
"related-to",
|
|
330
|
-
"reports-to",
|
|
331
|
-
"customer-of",
|
|
332
|
-
"partner-of",
|
|
333
|
-
"assigned-to",
|
|
334
|
-
"attached"
|
|
335
|
-
];
|
|
336
|
-
var LINK_ORIGINS = ["file", "owner", "suggested", "message"];
|
|
337
|
-
var LINK_SOURCES = [...LINK_ORIGINS, "calendar"];
|
|
338
|
-
var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
|
|
339
|
-
var COUNTERPART_ROLE = "counterpart";
|
|
340
|
-
|
|
341
|
-
export {
|
|
342
|
-
SOURCE_REVIEW_KIND,
|
|
343
|
-
SOURCE_REVIEW_CAUSES,
|
|
344
|
-
ERASED_TEXT,
|
|
345
|
-
severity,
|
|
346
|
-
graver,
|
|
347
|
-
text,
|
|
348
|
-
id,
|
|
349
|
-
time,
|
|
350
|
-
zonedTime,
|
|
351
|
-
count,
|
|
352
|
-
untrusted,
|
|
353
|
-
providerMetadata,
|
|
354
|
-
evidenceSource,
|
|
355
|
-
sourceReview,
|
|
356
|
-
author,
|
|
357
|
-
TASK_KINDS,
|
|
358
|
-
TASK_STATES,
|
|
359
|
-
CLOSED_STATES,
|
|
360
|
-
TASK_ORIGINS,
|
|
361
|
-
TASK_VERDICTS,
|
|
362
|
-
isClosedState,
|
|
363
|
-
PRIORITY_LABELS,
|
|
364
|
-
priorityLabel,
|
|
365
|
-
priorityBand,
|
|
366
|
-
legacyPriority,
|
|
367
|
-
checkedScore,
|
|
368
|
-
priorityOf,
|
|
369
|
-
priorityOption,
|
|
370
|
-
createTaskService,
|
|
371
|
-
matches,
|
|
372
|
-
FACT_STATUSES,
|
|
373
|
-
MEMORY_KINDS,
|
|
374
|
-
MEMORY_STATUSES,
|
|
375
|
-
MEMORY_SCOPES,
|
|
376
|
-
WORK_TASK_TYPES,
|
|
377
|
-
TASK_TYPES,
|
|
378
|
-
damageMarkPath,
|
|
379
|
-
healthMarkPath,
|
|
380
|
-
markStoreDamaged,
|
|
381
|
-
readDamageMark,
|
|
382
|
-
clearDamageMark,
|
|
383
|
-
refuseDamagedStore,
|
|
384
|
-
readHealthMark,
|
|
385
|
-
recordDeepCheck,
|
|
386
|
-
organization,
|
|
387
|
-
project,
|
|
388
|
-
reminder,
|
|
389
|
-
LINK_KINDS,
|
|
390
|
-
LINK_ORIGINS,
|
|
391
|
-
LINK_SOURCES,
|
|
392
|
-
linkKind,
|
|
393
|
-
COUNTERPART_ROLE
|
|
394
|
-
};
|