@wirecat/mail-cli 0.29.0 → 0.31.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 +31 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-Q4E2LPB4.js → all-profiles-XL62TNUO.js} +19 -29
- package/dist/bundle/{anthropic-S3N4JDJU.js → anthropic-3MSWVYCE.js} +2 -2
- package/dist/bundle/{app-server-E44CAPPI.js → app-server-RRNR5XFA.js} +45 -60
- package/dist/bundle/{bun-RDYA5FCZ.js → bun-E3F3PEQQ.js} +2 -2
- package/dist/bundle/{bun-sqlite-FPVHKI24.js → bun-sqlite-UOFN77LO.js} +3 -3
- package/dist/bundle/{chunk-KBTVVHFP.js → chunk-3CJ4C6BB.js} +12 -12
- package/dist/bundle/{chunk-KTLJ6F2B.js → chunk-3V6J7VPF.js} +3 -3
- package/dist/bundle/{chunk-44IAJV2T.js → chunk-4BW5JACS.js} +16 -16
- package/dist/bundle/{chunk-UQZJ2GFQ.js → chunk-4ME2NHNJ.js} +2 -2
- package/dist/bundle/{chunk-NUHUTJTM.js → chunk-5YRR52NH.js} +1 -1
- package/dist/bundle/{chunk-ZIFB6KGQ.js → chunk-6UOUDIXL.js} +1575 -945
- package/dist/bundle/{chunk-WZNQ2P7H.js → chunk-7E7YXQ52.js} +1307 -1307
- package/dist/bundle/{chunk-45ET53MO.js → chunk-BKRIIZPV.js} +2 -2
- package/dist/bundle/{chunk-TXDA437R.js → chunk-BNP7WLDQ.js} +1 -1
- package/dist/bundle/{chunk-W32UQL5I.js → chunk-BS6WYCNZ.js} +32 -22
- package/dist/bundle/{chunk-WSHPLO4Q.js → chunk-BXMLIKUM.js} +147 -391
- package/dist/bundle/{chunk-BPHLFSUO.js → chunk-D6D6JLXG.js} +16 -16
- package/dist/bundle/{chunk-YRER6N3Y.js → chunk-DCR3IWC7.js} +38 -47
- package/dist/bundle/{chunk-KSFPMRH6.js → chunk-DDCDOBZS.js} +1 -1
- package/dist/bundle/{chunk-DMW6J2P3.js → chunk-DPDS6IZJ.js} +1 -1
- package/dist/bundle/{chunk-5PDWUD3W.js → chunk-DWBY7DMF.js} +1 -1
- package/dist/bundle/{chunk-IZEK7JI7.js → chunk-DZSS2IUK.js} +18 -2
- package/dist/bundle/{chunk-UUM7AF32.js → chunk-E3IOR37T.js} +2 -2
- package/dist/bundle/{chunk-5ZJ6IHVE.js → chunk-EMVLCION.js} +1 -1
- package/dist/bundle/{chunk-IKTBM64M.js → chunk-EV5SR3OC.js} +7 -7
- package/dist/bundle/{chunk-D4QALV67.js → chunk-FRXDSR45.js} +1 -1
- package/dist/bundle/{chunk-BDWOTD7E.js → chunk-FYP2M6IT.js} +80 -80
- package/dist/bundle/{chunk-ATJANIQR.js → chunk-GWKGZOSO.js} +2 -2
- package/dist/bundle/{chunk-MVGFB7IS.js → chunk-GXBNTKJW.js} +2 -2
- package/dist/bundle/{chunk-Z5D6CRY6.js → chunk-GZLCZU5B.js} +322 -11
- package/dist/bundle/{chunk-ZPVVSA5R.js → chunk-H2QTUZ3C.js} +1 -1
- package/dist/bundle/{chunk-FHQ32JKS.js → chunk-HZCINHHS.js} +1 -1
- package/dist/bundle/{chunk-7AO73MJZ.js → chunk-HZL3X4XR.js} +15 -15
- package/dist/bundle/{chunk-HKC6ZJA5.js → chunk-I3BQ2QIY.js} +12 -12
- package/dist/bundle/{chunk-PCYTU7HS.js → chunk-I5Y6Y7Q5.js} +1 -1
- package/dist/bundle/{chunk-7E4KECG4.js → chunk-ITU6K7LU.js} +1 -1
- package/dist/bundle/{chunk-RGIEG4XK.js → chunk-JLIVJSCF.js} +1 -1
- package/dist/bundle/{chunk-3AH7UEM6.js → chunk-JYGFEMTR.js} +1 -1
- package/dist/bundle/{chunk-3RBUACSJ.js → chunk-KPFB2VUY.js} +762 -353
- package/dist/bundle/{chunk-FOZXPSHA.js → chunk-LGDJDD5J.js} +3 -3
- package/dist/bundle/{chunk-2MTIGJHQ.js → chunk-MS5XYEYW.js} +14 -9
- package/dist/bundle/{chunk-DIOHJT2W.js → chunk-NEJU74O4.js} +6 -6
- package/dist/bundle/{chunk-FDGCTY6J.js → chunk-NUN7DBR4.js} +9 -9
- package/dist/bundle/{chunk-6B2BBL35.js → chunk-NV3WPD3B.js} +5 -5
- package/dist/bundle/{chunk-NWA7JS74.js → chunk-NYQPKZWL.js} +633 -370
- package/dist/bundle/{chunk-RFM3AAK5.js → chunk-OP5ZLH53.js} +57 -54
- package/dist/bundle/{chunk-VXHL3XI6.js → chunk-OXHQNEXU.js} +98 -6
- package/dist/bundle/{chunk-ODPYXNHI.js → chunk-P6CYVOL6.js} +1 -1
- package/dist/bundle/{chunk-YAQGWHMH.js → chunk-PIXFZZUZ.js} +6 -6
- package/dist/bundle/{chunk-KNTAOY5J.js → chunk-PZL7DHVJ.js} +7 -7
- package/dist/bundle/{chunk-MT5KDBOM.js → chunk-QANXOKYQ.js} +5 -5
- package/dist/bundle/{chunk-UH7FYLFL.js → chunk-QSXJ2BVQ.js} +4 -4
- package/dist/bundle/{chunk-VERUQQZS.js → chunk-QVGCHTTU.js} +10 -10
- package/dist/bundle/{chunk-PYOM4J73.js → chunk-S2QO6KUI.js} +2 -2
- package/dist/bundle/{chunk-7ESXP4TG.js → chunk-SQA5JI7Q.js} +1 -1
- package/dist/bundle/{chunk-PIKOQWTL.js → chunk-T72DWT37.js} +4 -4
- package/dist/bundle/{chunk-YSR2XBDO.js → chunk-THZHNCJP.js} +3 -3
- package/dist/bundle/{chunk-XEMARUGS.js → chunk-TUXNILKR.js} +7 -7
- package/dist/bundle/{chunk-FM4B357N.js → chunk-UFMR2TB3.js} +2 -2
- package/dist/bundle/{chunk-OLTJB5PW.js → chunk-WZGFC7D5.js} +1 -1
- package/dist/bundle/{command-contract-TMLXLGVT.js → command-contract-YRNKDQDL.js} +15 -15
- package/dist/bundle/{command-server-entry-PFUR2W7X.js → command-server-entry-A3FCP24M.js} +21 -21
- package/dist/bundle/{decode-SIVT4JWX.js → decode-FI2ISRNZ.js} +2 -2
- package/dist/bundle/{dist-YWSF5MHP.js → dist-NLOOZJ64.js} +15 -11
- package/dist/bundle/{echarts-CABLIXX7.js → echarts-PMAJUJFE.js} +2 -2
- package/dist/bundle/{embed-OHENS6RB.js → embed-OIMT6SAX.js} +3 -3
- package/dist/bundle/{embedder-JINT4Y4O.js → embedder-Q5IF5WIM.js} +6 -6
- package/dist/bundle/{first-run-LU2MAK2B.js → first-run-4L53QWOT.js} +6 -6
- package/dist/bundle/first-screen-ZPQLAAIS.js +34 -0
- package/dist/bundle/{instructions-3D22PA4T.js → instructions-ZJGGGXOA.js} +1 -1
- package/dist/bundle/mail.js +2 -2
- package/dist/bundle/{node-42G4RGMW.js → node-DCSOHRD6.js} +2 -2
- package/dist/bundle/{node-sqlite-KQZM5M3N.js → node-sqlite-7F77K5JA.js} +4 -4
- package/dist/bundle/{oauth-7BNCNKQV.js → oauth-LVPMEN6M.js} +4 -4
- package/dist/bundle/{open-ULOQOP7K.js → open-XM5LWEN6.js} +2 -2
- package/dist/bundle/{openai-O5AH6VGT.js → openai-H2LCGK22.js} +12 -12
- package/dist/bundle/{process-6D767IDN.js → process-MFC5VSPT.js} +1 -1
- package/dist/bundle/{program-OE7MFRMJ.js → program-ZQ43ZYKZ.js} +1327 -1089
- package/dist/bundle/{prompt-WN7EBVKT.js → prompt-3LZAZNQ4.js} +2 -2
- package/dist/bundle/{recognize-IX33XEXZ.js → recognize-GYQMHFY2.js} +1 -1
- package/dist/bundle/{remote-22N3FQUC.js → remote-P2MD5G64.js} +6 -6
- package/dist/bundle/{rerank-IGX4EFA2.js → rerank-A5X6THV6.js} +4 -4
- package/dist/bundle/{serve-XWIRR2QZ.js → serve-IEC3EUKS.js} +6 -6
- package/dist/bundle/{server-DBS4WC6T.js → server-3REPXFNI.js} +43 -41
- package/dist/bundle/server-E2QTFURI.js +67 -0
- package/dist/bundle/{sqlite-runtime-WFBTXXXJ.js → sqlite-runtime-AOLQGC5J.js} +3 -3
- package/dist/bundle/{state-4J5ERHJA.js → state-D3P5IXXA.js} +3 -3
- package/dist/bundle/{store-YRBX7XLM.js → store-DIN6OY3K.js} +13 -13
- package/dist/bundle/{store-YSP2NPRJ.js → store-MZCQXBVW.js} +19 -15
- package/dist/bundle/store-maintenance-command-UMVFI6M6.js +58 -0
- package/dist/commands/rules.d.ts.map +1 -1
- package/dist/commands/rules.js +73 -22
- package/dist/commands/rules.js.map +1 -1
- package/dist/mail/rules/apply.d.ts.map +1 -1
- package/dist/mail/rules/apply.js +1 -9
- package/dist/mail/rules/apply.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/chunk-VFRI6RF7.js +0 -76
- package/dist/bundle/first-screen-KZNLKRRQ.js +0 -34
- package/dist/bundle/server-D5OTVERP.js +0 -68
- package/dist/bundle/store-maintenance-command-SH6IB7S6.js +0 -58
|
@@ -2,9 +2,10 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
storePath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BNP7WLDQ.js";
|
|
6
6
|
import {
|
|
7
|
-
resolvePaths
|
|
7
|
+
resolvePaths,
|
|
8
|
+
writeSecurely
|
|
8
9
|
} from "./chunk-7MEVD5PI.js";
|
|
9
10
|
import {
|
|
10
11
|
CliError,
|
|
@@ -14,11 +15,295 @@ import {
|
|
|
14
15
|
__name
|
|
15
16
|
} from "./chunk-ZVVMGPBJ.js";
|
|
16
17
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
-
import { mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/shared-config.js
|
|
19
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
19
20
|
import { dirname, join, resolve } from "node:path";
|
|
20
21
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/config-repair.js
|
|
23
|
+
var REPAIR_WORDS = {
|
|
24
|
+
byte_order_mark: "an invisible byte-order mark at the start",
|
|
25
|
+
comment: "a comment, which JSON does not allow",
|
|
26
|
+
trailing_comma: "a comma before a closing bracket",
|
|
27
|
+
missing_comma: "a missing comma",
|
|
28
|
+
unquoted_key: "a key without double quotes",
|
|
29
|
+
single_quotes: "text in single quotes",
|
|
30
|
+
missing_closer: "the file stops before its closing brackets \u2014 whatever followed this line was already lost"
|
|
31
|
+
};
|
|
32
|
+
var GiveUp = class {
|
|
33
|
+
static {
|
|
34
|
+
__name(this, "GiveUp");
|
|
35
|
+
}
|
|
36
|
+
at;
|
|
37
|
+
why;
|
|
38
|
+
constructor(at, why) {
|
|
39
|
+
this.at = at;
|
|
40
|
+
this.why = why;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
var NUMBER = /^-?(0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/;
|
|
44
|
+
var LITERAL = /^(true|false|null)/;
|
|
45
|
+
var KEY = /^[A-Za-z_$][\w$.-]*/;
|
|
46
|
+
var ENDS_VALUE = /^[\s,\]}/]?$/;
|
|
47
|
+
var repairConfigText = /* @__PURE__ */ __name((text) => {
|
|
48
|
+
try {
|
|
49
|
+
JSON.parse(text);
|
|
50
|
+
return { state: "valid" };
|
|
51
|
+
} catch {
|
|
52
|
+
}
|
|
53
|
+
const fixes = [];
|
|
54
|
+
const lineAt = /* @__PURE__ */ __name((offset) => text.slice(0, offset).split("\n").length, "lineAt");
|
|
55
|
+
const fix = /* @__PURE__ */ __name((kind, offset) => fixes.push({ kind, line: lineAt(offset) }), "fix");
|
|
56
|
+
const giveUp = /* @__PURE__ */ __name((why, offset = at) => {
|
|
57
|
+
throw new GiveUp(offset, why);
|
|
58
|
+
}, "giveUp");
|
|
59
|
+
let at = 0;
|
|
60
|
+
let truncated = false;
|
|
61
|
+
let last = "open";
|
|
62
|
+
let lastEnd = 0;
|
|
63
|
+
const previous = /* @__PURE__ */ __name(() => last, "previous");
|
|
64
|
+
const skip = /* @__PURE__ */ __name(() => {
|
|
65
|
+
for (; ; ) {
|
|
66
|
+
while (/\s/.test(text[at] ?? ""))
|
|
67
|
+
at++;
|
|
68
|
+
if (text.startsWith("//", at)) {
|
|
69
|
+
fix("comment", at);
|
|
70
|
+
while (at < text.length && text[at] !== "\n")
|
|
71
|
+
at++;
|
|
72
|
+
} else if (text.startsWith("/*", at)) {
|
|
73
|
+
const end = text.indexOf("*/", at + 2);
|
|
74
|
+
if (end < 0)
|
|
75
|
+
giveUp("a /* comment is never closed");
|
|
76
|
+
fix("comment", at);
|
|
77
|
+
at = end + 2;
|
|
78
|
+
} else
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
}, "skip");
|
|
82
|
+
const string = /* @__PURE__ */ __name(() => {
|
|
83
|
+
const quote = text[at];
|
|
84
|
+
const start = at;
|
|
85
|
+
if (quote === "'")
|
|
86
|
+
fix("single_quotes", at);
|
|
87
|
+
at++;
|
|
88
|
+
let body = "";
|
|
89
|
+
for (; ; ) {
|
|
90
|
+
if (at >= text.length)
|
|
91
|
+
giveUp("the file stops inside a quoted text", start);
|
|
92
|
+
const char = text[at];
|
|
93
|
+
if (char === quote)
|
|
94
|
+
break;
|
|
95
|
+
if (text.charCodeAt(at) < 32)
|
|
96
|
+
giveUp("a line break inside a quoted text");
|
|
97
|
+
if (char === "\\") {
|
|
98
|
+
const next = text[at + 1] ?? "";
|
|
99
|
+
if (quote === "'" && next === "'")
|
|
100
|
+
body += "'";
|
|
101
|
+
else if (/^["\\/bfnrt]$/.test(next))
|
|
102
|
+
body += `\\${next}`;
|
|
103
|
+
else if (next === "u" && /^[0-9a-fA-F]{4}$/.test(text.slice(at + 2, at + 6))) {
|
|
104
|
+
body += text.slice(at, at + 6);
|
|
105
|
+
at += 4;
|
|
106
|
+
} else
|
|
107
|
+
giveUp("an escape JSON has no meaning for");
|
|
108
|
+
at += 2;
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
body += char === '"' ? '\\"' : char;
|
|
112
|
+
at++;
|
|
113
|
+
}
|
|
114
|
+
at++;
|
|
115
|
+
return JSON.parse(`"${body}"`);
|
|
116
|
+
}, "string");
|
|
117
|
+
const key = /* @__PURE__ */ __name(() => {
|
|
118
|
+
const char = text[at] ?? "";
|
|
119
|
+
if (char === '"' || char === "'")
|
|
120
|
+
return string();
|
|
121
|
+
const word = KEY.exec(text.slice(at))?.[0];
|
|
122
|
+
if (!word)
|
|
123
|
+
return giveUp("something other than a key where a key should be");
|
|
124
|
+
fix("unquoted_key", at);
|
|
125
|
+
at += word.length;
|
|
126
|
+
return word;
|
|
127
|
+
}, "key");
|
|
128
|
+
const scalar = /* @__PURE__ */ __name(() => {
|
|
129
|
+
const char = text[at] ?? "";
|
|
130
|
+
if (char === '"' || char === "'")
|
|
131
|
+
return { json: JSON.stringify(string()) };
|
|
132
|
+
const word = (NUMBER.exec(text.slice(at)) ?? LITERAL.exec(text.slice(at)))?.[0];
|
|
133
|
+
if (!word || !ENDS_VALUE.test(text[at + word.length] ?? ""))
|
|
134
|
+
return giveUp("a value that is not JSON \u2014 text needs quotes, and only true, false and null go without");
|
|
135
|
+
if (at + word.length === text.length && NUMBER.test(word))
|
|
136
|
+
giveUp("the file stops inside a number");
|
|
137
|
+
at += word.length;
|
|
138
|
+
return { json: word };
|
|
139
|
+
}, "scalar");
|
|
140
|
+
const members = /* @__PURE__ */ __name((close, one) => {
|
|
141
|
+
const out = [];
|
|
142
|
+
at++;
|
|
143
|
+
last = "open";
|
|
144
|
+
let comma = -1;
|
|
145
|
+
for (; ; ) {
|
|
146
|
+
skip();
|
|
147
|
+
if (truncated)
|
|
148
|
+
return out;
|
|
149
|
+
if (at >= text.length) {
|
|
150
|
+
if (previous() === "close")
|
|
151
|
+
giveUp("the file stops after a closing bracket, so which brackets are missing has two readings");
|
|
152
|
+
if (previous() === "comma")
|
|
153
|
+
fix("trailing_comma", comma);
|
|
154
|
+
fix("missing_closer", text.length);
|
|
155
|
+
truncated = true;
|
|
156
|
+
return out;
|
|
157
|
+
}
|
|
158
|
+
const char = text[at];
|
|
159
|
+
if (char === close) {
|
|
160
|
+
if (previous() === "comma")
|
|
161
|
+
fix("trailing_comma", comma);
|
|
162
|
+
at++;
|
|
163
|
+
last = "close";
|
|
164
|
+
return out;
|
|
165
|
+
}
|
|
166
|
+
if (char === "}" || char === "]")
|
|
167
|
+
giveUp(`a ${char} where ${close} should close`);
|
|
168
|
+
if (char === ",") {
|
|
169
|
+
if (previous() !== "value" && previous() !== "close")
|
|
170
|
+
giveUp("a comma with nothing before it");
|
|
171
|
+
comma = at;
|
|
172
|
+
at++;
|
|
173
|
+
last = "comma";
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
if (previous() === "value" || previous() === "close") {
|
|
177
|
+
if (lineAt(at) === lineAt(lastEnd))
|
|
178
|
+
giveUp("two entries on one line with no comma between them");
|
|
179
|
+
fix("missing_comma", lastEnd);
|
|
180
|
+
}
|
|
181
|
+
out.push(one());
|
|
182
|
+
}
|
|
183
|
+
}, "members");
|
|
184
|
+
const value = /* @__PURE__ */ __name(() => {
|
|
185
|
+
const char = text[at] ?? "";
|
|
186
|
+
let node;
|
|
187
|
+
if (char === "{") {
|
|
188
|
+
const seen = /* @__PURE__ */ new Set();
|
|
189
|
+
node = {
|
|
190
|
+
object: members("}", () => {
|
|
191
|
+
const start = at;
|
|
192
|
+
const name = key();
|
|
193
|
+
if (seen.has(name))
|
|
194
|
+
giveUp("a key appears twice in one object", start);
|
|
195
|
+
seen.add(name);
|
|
196
|
+
skip();
|
|
197
|
+
if (at >= text.length)
|
|
198
|
+
giveUp("the file stops after a key, before its value");
|
|
199
|
+
if (text[at] !== ":")
|
|
200
|
+
giveUp("a key with no colon after it");
|
|
201
|
+
at++;
|
|
202
|
+
skip();
|
|
203
|
+
if (at >= text.length)
|
|
204
|
+
giveUp("the file stops after a key, before its value");
|
|
205
|
+
return [name, value()];
|
|
206
|
+
})
|
|
207
|
+
};
|
|
208
|
+
} else if (char === "[") {
|
|
209
|
+
node = {
|
|
210
|
+
array: members("]", () => {
|
|
211
|
+
return value();
|
|
212
|
+
})
|
|
213
|
+
};
|
|
214
|
+
} else
|
|
215
|
+
node = scalar();
|
|
216
|
+
if (!truncated) {
|
|
217
|
+
last = "json" in node ? "value" : "close";
|
|
218
|
+
lastEnd = at;
|
|
219
|
+
}
|
|
220
|
+
return node;
|
|
221
|
+
}, "value");
|
|
222
|
+
try {
|
|
223
|
+
if (text.includes("\0") || text.includes(String.fromCharCode(65533)))
|
|
224
|
+
giveUp("the file is not text", 0);
|
|
225
|
+
if (text.charCodeAt(0) === 65279) {
|
|
226
|
+
fix("byte_order_mark", 0);
|
|
227
|
+
at = 1;
|
|
228
|
+
}
|
|
229
|
+
skip();
|
|
230
|
+
if (text[at] !== "{")
|
|
231
|
+
giveUp(at >= text.length ? "the file is empty" : "the file does not start with {");
|
|
232
|
+
const root = value();
|
|
233
|
+
skip();
|
|
234
|
+
if (at < text.length)
|
|
235
|
+
giveUp("more text after the closing }");
|
|
236
|
+
const repaired = `${serialise(root, "")}
|
|
237
|
+
`;
|
|
238
|
+
JSON.parse(repaired);
|
|
239
|
+
return { state: "repaired", text: repaired, fixes };
|
|
240
|
+
} catch (error) {
|
|
241
|
+
if (!(error instanceof GiveUp))
|
|
242
|
+
throw error;
|
|
243
|
+
const before = text.slice(0, error.at).split("\n");
|
|
244
|
+
return {
|
|
245
|
+
state: "refused",
|
|
246
|
+
line: before.length,
|
|
247
|
+
column: (before.at(-1)?.length ?? 0) + 1,
|
|
248
|
+
why: error.why
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
}, "repairConfigText");
|
|
252
|
+
var serialise = /* @__PURE__ */ __name((node, indent) => {
|
|
253
|
+
if ("json" in node)
|
|
254
|
+
return node.json;
|
|
255
|
+
const inner = `${indent} `;
|
|
256
|
+
const parts = "object" in node ? node.object.map(([name, item]) => `${inner}${JSON.stringify(name)}: ${serialise(item, inner)}`) : node.array.map((item) => `${inner}${serialise(item, inner)}`);
|
|
257
|
+
const [open, close] = "object" in node ? ["{", "}"] : ["[", "]"];
|
|
258
|
+
return parts.length === 0 ? `${open}${close}` : `${open}
|
|
259
|
+
${parts.join(",\n")}
|
|
260
|
+
${indent}${close}`;
|
|
261
|
+
}, "serialise");
|
|
262
|
+
var SAFE_REPAIRS = /* @__PURE__ */ new Set([
|
|
263
|
+
"byte_order_mark",
|
|
264
|
+
"comment",
|
|
265
|
+
"trailing_comma",
|
|
266
|
+
"missing_comma"
|
|
267
|
+
]);
|
|
268
|
+
var FIX_FOR = {
|
|
269
|
+
unquoted_key: /* @__PURE__ */ __name((line) => `put the key on line ${line} in double quotes`, "unquoted_key"),
|
|
270
|
+
single_quotes: /* @__PURE__ */ __name((line) => `use double quotes for the text on line ${line}`, "single_quotes"),
|
|
271
|
+
missing_closer: /* @__PURE__ */ __name((line) => `add the closing } or ] the file lacks after line ${line}, and check that nothing after it was lost`, "missing_closer")
|
|
272
|
+
};
|
|
273
|
+
var FIX_FOR_REFUSAL = [
|
|
274
|
+
[/no comma between/, (line, before) => `add a comma after ${before} on line ${line}`],
|
|
275
|
+
[/no colon after/, (line) => `add a colon after the key on line ${line}`],
|
|
276
|
+
[/comma with nothing before/, (line) => `remove the extra comma on line ${line}`],
|
|
277
|
+
[/inside a quoted text/, (line) => `close the quotes on line ${line}`],
|
|
278
|
+
[/value that is not JSON/, (line) => `put the value on line ${line} in double quotes`],
|
|
279
|
+
[/key appears twice/, (line) => `keep one of the two keys named on line ${line}; the file holds both`]
|
|
280
|
+
];
|
|
281
|
+
var shown = /* @__PURE__ */ __name((line) => line.trim().replace(/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[^\s"',:{}[\]]+)(\s*:)?/g, (token, _value, key) => key || /^(true|false|null)$/.test(token) ? token : '"\u2026"'), "shown");
|
|
282
|
+
var explainBrokenJson = /* @__PURE__ */ __name((text, result) => {
|
|
283
|
+
const lines = text.replace(/^\uFEFF/u, "").split(/\r?\n/);
|
|
284
|
+
const around = /* @__PURE__ */ __name((line2) => {
|
|
285
|
+
const near = lines[line2 - 1]?.trim() ? lines[line2 - 1] : lines[line2 - 2];
|
|
286
|
+
return near ? ` \u2014 near \`${shown(near)}\`` : "";
|
|
287
|
+
}, "around");
|
|
288
|
+
if (result.state === "repaired") {
|
|
289
|
+
const asked = result.fixes.find((one) => !SAFE_REPAIRS.has(one.kind)) ?? result.fixes[0];
|
|
290
|
+
if (!asked)
|
|
291
|
+
return "it is not valid JSON";
|
|
292
|
+
const fix2 = FIX_FOR[asked.kind]?.(asked.line);
|
|
293
|
+
return `line ${asked.line} has ${REPAIR_WORDS[asked.kind]}${around(asked.line)}${fix2 ? `; likely fix: ${fix2}` : ""}`;
|
|
294
|
+
}
|
|
295
|
+
if (result.state === "valid")
|
|
296
|
+
return "it is valid JSON";
|
|
297
|
+
const { line, why } = result;
|
|
298
|
+
const column = line === 1 && text.charCodeAt(0) === 65279 ? result.column - 1 : result.column;
|
|
299
|
+
const head = (lines[line - 1] ?? "").slice(0, column - 1);
|
|
300
|
+
const entry = head.slice(Math.max(head.lastIndexOf(","), head.lastIndexOf("{"), head.lastIndexOf("[")) + 1);
|
|
301
|
+
const before = shown(entry) || shown(lines[line - 2] ?? "");
|
|
302
|
+
const fix = FIX_FOR_REFUSAL.find(([pattern]) => pattern.test(why))?.[1](line, `\`${before}\``);
|
|
303
|
+
return `line ${line}, column ${column}: ${why}${around(line)}; likely fix: ${fix ?? "correct that part by hand"}`;
|
|
304
|
+
}, "explainBrokenJson");
|
|
305
|
+
|
|
306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/task-categories.js
|
|
22
307
|
var DEFAULT_TASK_CATEGORIES = [
|
|
23
308
|
{
|
|
24
309
|
name: "taxes",
|
|
@@ -773,7 +1058,7 @@ var storedTaskCategories = /* @__PURE__ */ __name((json) => {
|
|
|
773
1058
|
}
|
|
774
1059
|
}, "storedTaskCategories");
|
|
775
1060
|
|
|
776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/shared-config.js
|
|
777
1062
|
var SECTION = "task_categories";
|
|
778
1063
|
var sharedConfigPath = /* @__PURE__ */ __name((store, env = process.env) => {
|
|
779
1064
|
const paths = resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env });
|
|
@@ -781,10 +1066,33 @@ var sharedConfigPath = /* @__PURE__ */ __name((store, env = process.env) => {
|
|
|
781
1066
|
return join(paths.config, "config.json");
|
|
782
1067
|
return resolve(store) === resolve(storePath({ ...env, MESSAGING_STORE: void 0 })) ? join(paths.config, "config.json") : join(dirname(store), "config.json");
|
|
783
1068
|
}, "sharedConfigPath");
|
|
1069
|
+
var backupPathFor = /* @__PURE__ */ __name((file) => {
|
|
1070
|
+
const stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
1071
|
+
let path = `${file}.bak-${stamp}`;
|
|
1072
|
+
for (let n = 2; existsSync(path); n++)
|
|
1073
|
+
path = `${file}.bak-${stamp}-${n}`;
|
|
1074
|
+
return path;
|
|
1075
|
+
}, "backupPathFor");
|
|
1076
|
+
var mended = /* @__PURE__ */ __name((path, bytes) => {
|
|
1077
|
+
const text = bytes.toString("utf8");
|
|
1078
|
+
const result = repairConfigText(text);
|
|
1079
|
+
if (result.state === "repaired" && result.fixes.every((one) => SAFE_REPAIRS.has(one.kind))) {
|
|
1080
|
+
try {
|
|
1081
|
+
writeSecurely(backupPathFor(path), bytes, statSync(path).mode & 511);
|
|
1082
|
+
writeSecurely(path, result.text, 384);
|
|
1083
|
+
} catch {
|
|
1084
|
+
}
|
|
1085
|
+
return JSON.parse(result.text);
|
|
1086
|
+
}
|
|
1087
|
+
throw new CliError("configuration_error", `${path} is not valid JSON, ${explainBrokenJson(text, result)}`, {
|
|
1088
|
+
reason: "config.invalid_json",
|
|
1089
|
+
file: path
|
|
1090
|
+
});
|
|
1091
|
+
}, "mended");
|
|
784
1092
|
var readJson = /* @__PURE__ */ __name((path) => {
|
|
785
|
-
let
|
|
1093
|
+
let bytes;
|
|
786
1094
|
try {
|
|
787
|
-
|
|
1095
|
+
bytes = readFileSync(path);
|
|
788
1096
|
} catch (error) {
|
|
789
1097
|
if (error.code === "ENOENT")
|
|
790
1098
|
return void 0;
|
|
@@ -792,9 +1100,9 @@ var readJson = /* @__PURE__ */ __name((path) => {
|
|
|
792
1100
|
}
|
|
793
1101
|
let parsed;
|
|
794
1102
|
try {
|
|
795
|
-
parsed = JSON.parse(
|
|
796
|
-
} catch
|
|
797
|
-
|
|
1103
|
+
parsed = JSON.parse(bytes.toString("utf8"));
|
|
1104
|
+
} catch {
|
|
1105
|
+
parsed = mended(path, bytes);
|
|
798
1106
|
}
|
|
799
1107
|
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed))
|
|
800
1108
|
throw new CliError("configuration_error", `${path} must hold a JSON object`);
|
|
@@ -869,6 +1177,8 @@ var taskCategoriesReader = /* @__PURE__ */ __name((path) => {
|
|
|
869
1177
|
}, "taskCategoriesReader");
|
|
870
1178
|
|
|
871
1179
|
export {
|
|
1180
|
+
REPAIR_WORDS,
|
|
1181
|
+
repairConfigText,
|
|
872
1182
|
DEFAULT_TASK_CATEGORIES,
|
|
873
1183
|
FALLBACK_CATEGORY,
|
|
874
1184
|
unlistedNote,
|
|
@@ -876,6 +1186,7 @@ export {
|
|
|
876
1186
|
taskCategoryValue,
|
|
877
1187
|
storedTaskCategories,
|
|
878
1188
|
sharedConfigPath,
|
|
1189
|
+
backupPathFor,
|
|
879
1190
|
readTaskCategoryEdits,
|
|
880
1191
|
applyTaskCategoryEdits,
|
|
881
1192
|
editsFrom,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/runs/secrets.js
|
|
8
8
|
var SECRET_WORDS = /* @__PURE__ */ new Set([
|
|
9
9
|
"authorization",
|
|
10
10
|
"cookie",
|
|
@@ -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.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/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();
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
servicesFor,
|
|
17
17
|
throughWrapper,
|
|
18
18
|
withFileLockAsync
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-NYQPKZWL.js";
|
|
20
20
|
import {
|
|
21
21
|
servingProfiles
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GXBNTKJW.js";
|
|
23
23
|
import {
|
|
24
24
|
asFirstWord,
|
|
25
25
|
baseContext,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
recalledAccount,
|
|
34
34
|
rememberAccount,
|
|
35
35
|
rootOf2 as rootOf
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-BXMLIKUM.js";
|
|
37
37
|
import {
|
|
38
38
|
AUTHORITY_KEY,
|
|
39
39
|
CEILING_KEY,
|
|
@@ -44,23 +44,23 @@ import {
|
|
|
44
44
|
levelFor,
|
|
45
45
|
readKeysForCommand,
|
|
46
46
|
skipFlagFor
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-MS5XYEYW.js";
|
|
48
48
|
import {
|
|
49
49
|
providerErrorKey
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-TUXNILKR.js";
|
|
51
51
|
import {
|
|
52
52
|
openStore
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-6UOUDIXL.js";
|
|
54
54
|
import {
|
|
55
55
|
chatReferenceOf,
|
|
56
56
|
ensureAccount,
|
|
57
57
|
foldName,
|
|
58
58
|
isId,
|
|
59
59
|
pickPerson
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-7E7YXQ52.js";
|
|
61
61
|
import {
|
|
62
62
|
isCliFailure
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-5YRR52NH.js";
|
|
64
64
|
import {
|
|
65
65
|
resolvePaths
|
|
66
66
|
} from "./chunk-7MEVD5PI.js";
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
__name
|
|
72
72
|
} from "./chunk-ZVVMGPBJ.js";
|
|
73
73
|
|
|
74
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
74
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
75
75
|
import { openSync } from "node:fs";
|
|
76
76
|
import { createInterface } from "node:readline";
|
|
77
77
|
import { ReadStream } from "node:tty";
|
|
@@ -126,7 +126,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
126
126
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
127
127
|
}, "terminalAsker");
|
|
128
128
|
|
|
129
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/sends/pace.js
|
|
130
130
|
import { readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
131
131
|
import { join } from "node:path";
|
|
132
132
|
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
@@ -221,7 +221,7 @@ var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
|
|
|
221
221
|
await (options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms))))(waitMs);
|
|
222
222
|
}, "waitForTurn");
|
|
223
223
|
|
|
224
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
224
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
225
225
|
var HOUSEKEEPING = /* @__PURE__ */ new Set([
|
|
226
226
|
"help",
|
|
227
227
|
"guide",
|
|
@@ -301,7 +301,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
301
301
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
302
302
|
}, "refuseUnknownPermissionKeys");
|
|
303
303
|
|
|
304
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
304
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
305
305
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
306
306
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
307
307
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
@@ -398,7 +398,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
398
398
|
});
|
|
399
399
|
}, "flooded");
|
|
400
400
|
|
|
401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
402
402
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
403
403
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
404
404
|
const write = currentOperation();
|
|
@@ -497,7 +497,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
497
497
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
498
498
|
}, "byPart");
|
|
499
499
|
|
|
500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
501
501
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
502
502
|
var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false, historyLimits, command = "cli" }) => {
|
|
503
503
|
let warned = false;
|
|
@@ -1073,7 +1073,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
1073
1073
|
}
|
|
1074
1074
|
}, "keep");
|
|
1075
1075
|
|
|
1076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
1077
1077
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
1078
1078
|
let opened;
|
|
1079
1079
|
return {
|
|
@@ -2,18 +2,18 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
validateFormattedText
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PIXFZZUZ.js";
|
|
6
6
|
import {
|
|
7
7
|
inputPolicy
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HZCINHHS.js";
|
|
9
9
|
import {
|
|
10
10
|
RECORDS_SCHEMA_VERSION,
|
|
11
11
|
RECORD_TYPES,
|
|
12
12
|
pointerOf
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7E7YXQ52.js";
|
|
14
14
|
import {
|
|
15
15
|
parseReference
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KPFB2VUY.js";
|
|
17
17
|
import {
|
|
18
18
|
indent
|
|
19
19
|
} from "./chunk-7MEVD5PI.js";
|
|
@@ -24,12 +24,12 @@ import {
|
|
|
24
24
|
__name
|
|
25
25
|
} from "./chunk-ZVVMGPBJ.js";
|
|
26
26
|
|
|
27
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/checks.js
|
|
28
28
|
var spelled = /* @__PURE__ */ __name((check, args) => `${check.replaceAll(".", " ")}${args === void 0 ? "" : ` ${args}`}`, "spelled");
|
|
29
29
|
var bareCheck = /* @__PURE__ */ __name((check, args) => `\`${spelled(check, args)}\``, "bareCheck");
|
|
30
30
|
var checkWords = /* @__PURE__ */ __name((command, profile) => (check, args) => `\`${command} ${profile === void 0 ? "" : `${profile} `}${spelled(check, args)}\``, "checkWords");
|
|
31
31
|
|
|
32
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/links.js
|
|
33
33
|
var LINK_VERSION = "v1";
|
|
34
34
|
var DEFAULT_LINK_CONFIG = { base: "https://wirecat.dev/o", enabled: true };
|
|
35
35
|
var APP_PREFIX = "wirecat://open";
|
|
@@ -146,7 +146,7 @@ var linkFor = /* @__PURE__ */ __name((ref, { form, config = DEFAULT_LINK_CONFIG,
|
|
|
146
146
|
return form === "app" ? `${APP_PREFIX}${path}` : `${config.base}#${path}`;
|
|
147
147
|
}, "linkFor");
|
|
148
148
|
|
|
149
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/markdown.js
|
|
150
150
|
var MARKERS = [
|
|
151
151
|
["**", "bold"],
|
|
152
152
|
["~~", "strike"],
|
|
@@ -192,7 +192,7 @@ var closing = /* @__PURE__ */ __name((input, open, marker) => {
|
|
|
192
192
|
return end;
|
|
193
193
|
}, "closing");
|
|
194
194
|
|
|
195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/markdown-spans.js
|
|
196
196
|
var STYLES = [
|
|
197
197
|
["**", "bold"],
|
|
198
198
|
["__", "underline"],
|
|
@@ -352,7 +352,7 @@ var parseMarkdownSpans = /* @__PURE__ */ __name((input) => {
|
|
|
352
352
|
return validateFormattedText(result);
|
|
353
353
|
}, "parseMarkdownSpans");
|
|
354
354
|
|
|
355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/polls.js
|
|
356
356
|
var countedPoll = /* @__PURE__ */ __name((poll, votes, self) => {
|
|
357
357
|
const cast = votes.filter((vote) => vote.answers.length > 0);
|
|
358
358
|
const mine = self === null ? void 0 : votes.find((vote) => vote.person.id === self);
|
|
@@ -367,7 +367,7 @@ var countedPoll = /* @__PURE__ */ __name((poll, votes, self) => {
|
|
|
367
367
|
};
|
|
368
368
|
}, "countedPoll");
|
|
369
369
|
|
|
370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/records-table.js
|
|
371
371
|
var TABLE_RECORD_TYPES = Object.keys(RECORD_TYPES).filter((type) => RECORD_TYPES[type].sheet !== false);
|
|
372
372
|
var TableError = class extends Error {
|
|
373
373
|
static {
|
|
@@ -2357,7 +2357,7 @@ var createDataURL = /* @__PURE__ */ __name(function(width, height, getPixel) {
|
|
|
2357
2357
|
var qrcode_default = qrcode;
|
|
2358
2358
|
var stringToBytes = qrcode.stringToBytes;
|
|
2359
2359
|
|
|
2360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/terminal/qr.js
|
|
2361
2361
|
var QUIET_ZONE = 4;
|
|
2362
2362
|
var BLACK_ON_WHITE = "\x1B[30;107m";
|
|
2363
2363
|
var RESET = "\x1B[0m";
|
|
@@ -2404,7 +2404,7 @@ var plainQr = /* @__PURE__ */ __name((link) => {
|
|
|
2404
2404
|
return lines.join("\n");
|
|
2405
2405
|
}, "plainQr");
|
|
2406
2406
|
|
|
2407
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2407
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/terminal/login-qr.js
|
|
2408
2408
|
var MARGIN = 2;
|
|
2409
2409
|
var atTerminal = /* @__PURE__ */ __name((input) => input.isTTY === true && !inputPolicy(input).noInput, "atTerminal");
|
|
2410
2410
|
var PASTE_QR = "agents: paste the QR code above into the chat as a code block, exactly as printed; when a new one is printed, paste it and say the old one expired";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/http/listen.js
|
|
8
8
|
import { createServer } from "node:http";
|
|
9
9
|
import { Readable } from "node:stream";
|
|
10
10
|
var MAX_BODY = 4 * 1024 * 1024;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
|
|
8
8
|
var instructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => {
|
|
9
9
|
const all = typeof profile !== "string";
|
|
10
10
|
const offers = /* @__PURE__ */ __name((key) => all || writes.includes(key), "offers");
|
|
@@ -58,7 +58,7 @@ var ENTRIES = [
|
|
|
58
58
|
var REASONS = defineReasons(ENTRIES.map(([reason, code, message]) => ({ reason, code, message, details: [] })));
|
|
59
59
|
|
|
60
60
|
// dist/version.js
|
|
61
|
-
var VERSION = "0.
|
|
61
|
+
var VERSION = "0.31.0";
|
|
62
62
|
|
|
63
63
|
// dist/identity.js
|
|
64
64
|
var PACKAGE = "@wirecat/mail-cli";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/render/messages.js
|
|
16
16
|
import { styleText } from "node:util";
|
|
17
17
|
var TIME_WIDTH = 8;
|
|
18
18
|
var INDENT = " ".repeat(TIME_WIDTH + 2);
|