@wirecat/tg-cli 0.117.0 → 0.119.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/contracts/wirecat.json +7621 -0
- package/dist/bin/tg.js +2 -2
- package/dist/bot/transport.d.ts.map +1 -1
- package/dist/bot/transport.js +15 -8
- package/dist/bot/transport.js.map +1 -1
- package/dist/bundle/{adapter-VNQ72MBK.js → adapter-NEQQOANM.js} +47 -48
- package/dist/bundle/{all-profiles-3W2UQTCK.js → all-profiles-QFT46FTF.js} +10 -10
- package/dist/bundle/{anthropic-DFUW2KTG.js → anthropic-UJ4RYCWU.js} +10 -8
- package/dist/bundle/{app-server-5XJIMLHB.js → app-server-NE3EL5IK.js} +43 -43
- package/dist/bundle/{bot-api-HRRBF3W6.js → bot-api-D4H5SCP5.js} +49 -49
- package/dist/bundle/{bot-history-GBH5XE4N.js → bot-history-KF2PUMWA.js} +18 -18
- package/dist/bundle/{bun-ZMOYGG6F.js → bun-F7MH5YKA.js} +2 -2
- package/dist/bundle/{bun-sqlite-6FZFMA7K.js → bun-sqlite-FYDJXUHF.js} +5 -5
- package/dist/bundle/{chunk-HZZGOLGP.js → chunk-23JGV5FQ.js} +11 -11
- package/dist/bundle/{chunk-PTIB7NEE.js → chunk-2BAJ6ORN.js} +1 -1
- package/dist/bundle/{chunk-L5WNE4WS.js → chunk-3EQ7USKJ.js} +2 -2
- package/dist/bundle/{chunk-YIXXH74F.js → chunk-3K65KTXD.js} +16 -3
- package/dist/bundle/{chunk-66FZBLRJ.js → chunk-4AACB23H.js} +13 -13
- package/dist/bundle/{chunk-NUCDEOFC.js → chunk-5EHJWIW4.js} +2 -2
- package/dist/bundle/{chunk-VW6BF6M7.js → chunk-5FEEFXJA.js} +1 -1
- package/dist/bundle/{chunk-HWYSRB64.js → chunk-65BWMPCI.js} +2 -2
- package/dist/bundle/{chunk-Q7O4CQDO.js → chunk-6ERQJRL2.js} +2 -2
- package/dist/bundle/{chunk-3GRX7WP6.js → chunk-6K5R3YPN.js} +2 -2
- package/dist/bundle/{chunk-KVTLT4V7.js → chunk-6OE5I3PR.js} +6 -6
- package/dist/bundle/{chunk-B2YPB5AE.js → chunk-72QLHHSO.js} +93 -29
- package/dist/bundle/{chunk-FEKXHILZ.js → chunk-7C6POLLO.js} +1 -1
- package/dist/bundle/{chunk-F6KBVIJP.js → chunk-7VUNJDYU.js} +22 -14
- package/dist/bundle/{chunk-EZTYJ43A.js → chunk-BXIPT2BO.js} +1 -1
- package/dist/bundle/{chunk-GFHNQBD2.js → chunk-CIDFV3IT.js} +1 -1
- package/dist/bundle/{chunk-C6TUVV7E.js → chunk-CX2WCEQU.js} +552 -222
- package/dist/bundle/{chunk-UYK5AXSW.js → chunk-D4Y2KL5V.js} +4 -4
- package/dist/bundle/{chunk-EL6I4WTB.js → chunk-D6YTBJY6.js} +1 -1
- package/dist/bundle/{chunk-X3CD475M.js → chunk-DQELQ7BL.js} +419 -198
- package/dist/bundle/{chunk-4JDGN6OD.js → chunk-F223KYWG.js} +1 -1
- package/dist/bundle/{chunk-RDH2QBUE.js → chunk-FJKP6MMP.js} +5 -3
- package/dist/bundle/{chunk-2452HCIV.js → chunk-FQ3C6DFV.js} +3 -3
- package/dist/bundle/{chunk-7Y3RUEVY.js → chunk-FQZSS3AB.js} +6 -6
- package/dist/bundle/{chunk-V47NPSSV.js → chunk-FRW3CWC7.js} +31 -29
- package/dist/bundle/{chunk-AG6HWPQP.js → chunk-G3MQOH6Z.js} +3 -3
- package/dist/bundle/{chunk-RDSLSV4M.js → chunk-HGMMRT4G.js} +2 -2
- package/dist/bundle/{chunk-SQXB5ZUZ.js → chunk-HPQQ76WF.js} +23 -5
- package/dist/bundle/{chunk-3RJYLN5V.js → chunk-HV5YYAJX.js} +158 -20
- package/dist/bundle/{chunk-3MQOLYAN.js → chunk-IAGX5VFL.js} +4 -4
- package/dist/bundle/{chunk-TFBHDIGY.js → chunk-JKKEMVW3.js} +18 -4
- package/dist/bundle/{chunk-P3ASN72F.js → chunk-KBHK5UGL.js} +1 -1
- package/dist/bundle/{chunk-EPCFXKTX.js → chunk-KC4MQRAB.js} +34 -8
- package/dist/bundle/{chunk-VMCQGZIA.js → chunk-L33G5ARH.js} +2801 -718
- package/dist/bundle/{chunk-V2T7NYNU.js → chunk-MDLSI3EN.js} +25 -23
- package/dist/bundle/chunk-NDSRND3E.js +138 -0
- package/dist/bundle/{chunk-HORGORHK.js → chunk-OG2CG2GS.js} +12 -12
- package/dist/bundle/{chunk-ZPILMEFY.js → chunk-QD27C3BG.js} +8 -21
- package/dist/bundle/{chunk-QOGYHU3Q.js → chunk-QG5U6HCI.js} +61 -21
- package/dist/bundle/{chunk-TG6ZYL4B.js → chunk-QQ3QZFFD.js} +8 -8
- package/dist/bundle/{chunk-56Q5JV3Z.js → chunk-QTFXYR5W.js} +24 -2
- package/dist/bundle/{chunk-FAHHERJ7.js → chunk-RGU2G3KL.js} +4 -4
- package/dist/bundle/{chunk-Z4QKLHJW.js → chunk-ROOUBFUW.js} +10148 -3906
- package/dist/bundle/{chunk-MLHKQDUN.js → chunk-RUNFFBJU.js} +872 -562
- package/dist/bundle/{chunk-G7B5UIE7.js → chunk-S3HAFJVC.js} +37 -11
- package/dist/bundle/{chunk-BXTDAGM4.js → chunk-SMHLQEE2.js} +2 -2
- package/dist/bundle/{chunk-JWIUK3SK.js → chunk-TEZKCH5B.js} +2 -2
- package/dist/bundle/{chunk-VRDVXXXD.js → chunk-TKHEVAEG.js} +9 -8
- package/dist/bundle/{chunk-MP7M6FFU.js → chunk-TT4CIXVH.js} +6 -6
- package/dist/bundle/{chunk-M7V5XRM6.js → chunk-UBCLVM7C.js} +3 -3
- package/dist/bundle/{chunk-YHZFGUAP.js → chunk-V5Z2JO6X.js} +19 -19
- package/dist/bundle/{chunk-6GFUL4OU.js → chunk-W2BIBPRU.js} +237 -38
- package/dist/bundle/{chunk-6HRN7BW6.js → chunk-X5PDWCG7.js} +1 -1
- package/dist/bundle/{chunk-AUBRELCM.js → chunk-XDMJVWWR.js} +3 -3
- package/dist/bundle/{chunk-EA2PGDER.js → chunk-XM3P7LLT.js} +2 -2
- package/dist/bundle/{chunk-UGPZCNYC.js → chunk-YMWPRHXG.js} +1411 -809
- package/dist/bundle/{chunk-2XLKZL6K.js → chunk-Z4CGZAFQ.js} +65 -31
- package/dist/bundle/{chunk-XW5C4TI7.js → chunk-ZEQ7ONPZ.js} +47 -1
- package/dist/bundle/command-contract-7TGMZRBE.js +33 -0
- package/dist/bundle/{decode-YMSOY2AY.js → decode-5N4ERCHC.js} +5 -5
- package/dist/bundle/{dispatch-OP27MWX5.js → dispatch-TBGXBDHE.js} +10 -10
- package/dist/bundle/{echarts-7XS55TQY.js → echarts-YDEBAMXT.js} +2 -2
- package/dist/bundle/{embed-QTOE7NN3.js → embed-T7H62XFR.js} +6 -6
- package/dist/bundle/{embedder-KBBRYSNH.js → embedder-AW3O2TR3.js} +9 -9
- package/dist/bundle/{entry-HGEUYYMX.js → entry-L2LJ2VPY.js} +7 -7
- package/dist/bundle/{failure-4JUQFXJT.js → failure-AWHPW2HE.js} +2 -2
- package/dist/bundle/{first-run-CSGMEJXY.js → first-run-6PBZSRZU.js} +11 -11
- package/dist/bundle/first-screen-UKCD7D2R.js +31 -0
- package/dist/bundle/{instructions-S6ZXCTFH.js → instructions-C3NJERO7.js} +1 -1
- package/dist/bundle/{mcp-M4QN2E7R.js → mcp-CWLASTLV.js} +2 -2
- package/dist/bundle/{node-LCIUWXXG.js → node-P3CIIYWU.js} +2 -2
- package/dist/bundle/{node-sqlite-HL4WY4N2.js → node-sqlite-YVHMNRVA.js} +6 -6
- package/dist/bundle/{oauth-U4KIMDKG.js → oauth-5OQYA2SV.js} +7 -7
- package/dist/bundle/{open-EH7OS7M7.js → open-YGWUVSU7.js} +5 -5
- package/dist/bundle/{openai-W5TB3NA5.js → openai-U45JBQ6F.js} +16 -37
- package/dist/bundle/{process-3CVLTCTA.js → process-DCYX5EDG.js} +1 -1
- package/dist/bundle/{program-LOIZTK2P.js → program-UZBFH2EZ.js} +55 -52
- package/dist/bundle/{prompt-IDNH7N3W.js → prompt-HPVTPTFI.js} +7 -5
- package/dist/bundle/{proxy-transport-4DPZB2W2.js → proxy-transport-D7MCHGSV.js} +5 -5
- package/dist/bundle/{recognize-G5EWYXIF.js → recognize-IJCPFJ76.js} +4 -4
- package/dist/bundle/{remote-4XTBZVZD.js → remote-MWDYQWFW.js} +7 -7
- package/dist/bundle/{rerank-OWSTDLZN.js → rerank-SXG64475.js} +7 -7
- package/dist/bundle/{serve-YCPSEWP3.js → serve-KJQENHEH.js} +9 -9
- package/dist/bundle/{server-ODG4A2KK.js → server-MXVXZWN6.js} +35 -35
- package/dist/bundle/server-RTMCRKQF.js +60 -0
- package/dist/bundle/{state-OL2235G5.js → state-CKKJWH27.js} +6 -6
- package/dist/bundle/{store-5AACYNDM.js → store-R3BE4V56.js} +44 -13
- package/dist/bundle/store-maintenance-command-KDGBSBNU.js +49 -0
- package/dist/bundle/tg.js +38 -14
- package/dist/commands/account-removal.d.ts +3 -0
- package/dist/commands/account-removal.d.ts.map +1 -0
- package/dist/commands/account-removal.js +57 -0
- package/dist/commands/account-removal.js.map +1 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +2 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/http.d.ts +6 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +8 -0
- package/dist/http.js.map +1 -0
- package/dist/identity.d.ts +4 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +14 -0
- package/dist/identity.js.map +1 -1
- package/dist/telegram/map.d.ts.map +1 -1
- package/dist/telegram/map.js +3 -0
- package/dist/telegram/map.js.map +1 -1
- package/dist/telegram/registration.d.ts +1 -1
- package/dist/telegram/registration.d.ts.map +1 -1
- package/dist/telegram/registration.js +4 -1
- package/dist/telegram/registration.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/package.json +7 -6
- package/dist/bundle/chunk-7NBUT62O.js +0 -33
- package/dist/bundle/command-contract-KMMHARMR.js +0 -33
- package/dist/bundle/first-screen-K2PBNJNE.js +0 -31
- package/dist/bundle/server-KELKX6S3.js +0 -60
- package/dist/bundle/store-maintenance-command-3J7WZYVN.js +0 -50
- /package/dist/bundle/{chunk-VOXIGICJ.js → chunk-DWX4DE2I.js} +0 -0
|
@@ -2,18 +2,19 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
openSqlite
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ROOUBFUW.js";
|
|
6
6
|
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.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/store/damage.js
|
|
11
11
|
var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
|
|
12
12
|
var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
|
|
13
13
|
var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
|
|
14
14
|
var WIRECAT_UNITS = ["memo-*", "mail-*", "tg-*", "max-*", "wirecat-*"];
|
|
15
|
-
var
|
|
16
|
-
|
|
15
|
+
var seen = /* @__PURE__ */ __name((mark) => `\`${mark.command}\` found the store damaged at ${mark.at} (${mark.error})`, "seen");
|
|
16
|
+
var explainDamage = /* @__PURE__ */ __name((health, command, mark = null) => {
|
|
17
|
+
if (health.ok && !mark)
|
|
17
18
|
return null;
|
|
18
19
|
const indexNames = (health.searchIndexes ?? []).map((index) => index.name);
|
|
19
20
|
const badIndexes = (health.searchIndexes ?? []).filter((index) => !index.ok).map((index) => index.name);
|
|
@@ -21,11 +22,14 @@ var explainDamage = /* @__PURE__ */ __name((health, command) => {
|
|
|
21
22
|
const sources = tables.filter((table) => !isDerivedTable(table, indexNames));
|
|
22
23
|
const derived = [.../* @__PURE__ */ new Set([...tables.filter((table) => isDerivedTable(table, indexNames)), ...badIndexes])];
|
|
23
24
|
const unopened = health.error !== void 0;
|
|
24
|
-
const
|
|
25
|
+
const json = (health.invalidJson ?? []).map(({ table, column }) => `${table}.${column}`);
|
|
26
|
+
const checked = health.ok ? `${seen(mark)}; the quick check reads too little to see it, and a deep check that passes clears it` : unopened ? `the store file cannot be opened: ${health.error}` : health.checked === "quick" ? "the store file's header or schema is damaged" : `the store file is damaged: ${health.problems ?? 0} problems` + (sources.length ? ` in the data of ${named(sources)}` : "") + (derived.length ? `${sources.length ? ", and" : " in"} the search data of ${named(derived)}` : "") + (json.length ? `; values that are not valid JSON in ${named(json)}` : "");
|
|
27
|
+
const what = mark && !health.ok ? `${checked}; ${seen(mark)}` : checked;
|
|
25
28
|
const impact = [
|
|
26
29
|
...sources.length ? [`some rows of ${named(sources)} cannot be read; a recovery keeps every row it can read and names the rest`] : [],
|
|
27
30
|
...derived.length ? [`searches may miss results or fail; ${named(derived)} hold nothing that is not elsewhere, and are rebuilt`] : [],
|
|
28
|
-
|
|
31
|
+
...json.length ? [`a read of a row with a broken JSON value fails ("malformed JSON"); a recovery clears those values`] : [],
|
|
32
|
+
mark ? "reads that do not touch a damaged page work; every command that writes the store refuses until it is recovered" : "reads that do not touch a damaged page work; a write that touches one fails until the store is recovered"
|
|
29
33
|
];
|
|
30
34
|
return {
|
|
31
35
|
what,
|
|
@@ -38,7 +42,7 @@ var explainDamage = /* @__PURE__ */ __name((health, command) => {
|
|
|
38
42
|
`journalctl --user ${WIRECAT_UNITS.map((unit) => `-u '${unit}'`).join(" ")} --since -14d | grep -i -e malformed -e corrupt -e 'disk full'`,
|
|
39
43
|
"journalctl -k --since -14d | grep -i -e 'I/O error' -e nvme -e ata",
|
|
40
44
|
`df -h ${health.path.replace(/\/[^/]*$/, "")}`,
|
|
41
|
-
...health.checked === "quick" ? [`${command} store recover`] : []
|
|
45
|
+
...health.checked === "quick" || health.ok ? [`${command} store recover`] : []
|
|
42
46
|
],
|
|
43
47
|
impact,
|
|
44
48
|
externalUnaffected: "only this computer's copy is damaged: Telegram, MAX, the mail servers and Google Drive keep their own data, so whatever is lost here can be fetched again by a sync",
|
|
@@ -50,8 +54,27 @@ var explainDamage = /* @__PURE__ */ __name((health, command) => {
|
|
|
50
54
|
};
|
|
51
55
|
}, "explainDamage");
|
|
52
56
|
|
|
53
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/store/health.js
|
|
54
58
|
import { existsSync, statSync } from "node:fs";
|
|
59
|
+
var JSON_COLUMNS = {
|
|
60
|
+
accounts: ["settings"],
|
|
61
|
+
account_identities: ["mail_signals"],
|
|
62
|
+
bot_updates: ["payload"],
|
|
63
|
+
documents: ["front_matter"],
|
|
64
|
+
emails: ["headers"],
|
|
65
|
+
meeting_participants: ["sessions"],
|
|
66
|
+
messages: ["mentions", "reply_to"],
|
|
67
|
+
proposed_actions: ["payload", "result"],
|
|
68
|
+
searches: ["params"],
|
|
69
|
+
tag_consolidations: ["source_member_ids", "survivor_member_ids"],
|
|
70
|
+
task_events: ["changes"]
|
|
71
|
+
};
|
|
72
|
+
var jsonColumns = /* @__PURE__ */ __name((database) => database.prepare(`SELECT m.name AS "table", c.name AS "column", c."notnull" AS required FROM sqlite_master m, pragma_table_info(m.name) c
|
|
73
|
+
WHERE m.type = 'table' AND m.sql NOT LIKE 'CREATE VIRTUAL%' ORDER BY 1, 2`).all().map((row) => ({ table: String(row.table), column: String(row.column), required: Number(row.required) === 1 })).filter(({ table, column }) => column === "metadata" || JSON_COLUMNS[table]?.includes(column)), "jsonColumns");
|
|
74
|
+
var invalidJson = /* @__PURE__ */ __name((database) => jsonColumns(database).map((one) => ({
|
|
75
|
+
...one,
|
|
76
|
+
rows: Number(database.prepare(`SELECT count(*) AS n FROM "${one.table}" WHERE "${one.column}" IS NOT NULL AND NOT json_valid("${one.column}")`).get()?.n)
|
|
77
|
+
})).filter(({ rows }) => rows > 0), "invalidJson");
|
|
55
78
|
var QUICK_CHECK_LIMIT = 1e4;
|
|
56
79
|
var QUICK_HEALTH_CHECKS = "the file header, its size against its page count, and the schema's own pages";
|
|
57
80
|
var FTS5 = /^\s*CREATE\s+VIRTUAL\s+TABLE\s+\S+\s+USING\s+fts5\s*\(/i;
|
|
@@ -157,12 +180,14 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
|
|
|
157
180
|
const lines = checkLines(database);
|
|
158
181
|
const pagesOk = lines.length === 1 && lines[0] === "ok";
|
|
159
182
|
const indexes = searchIndexHealth(database);
|
|
183
|
+
const json = pagesOk ? invalidJson(database) : [];
|
|
160
184
|
return done({
|
|
161
|
-
ok: pagesOk && problems.length === 0 && indexes.every((index) => index.ok),
|
|
185
|
+
ok: pagesOk && problems.length === 0 && indexes.every((index) => index.ok) && json.length === 0,
|
|
162
186
|
file,
|
|
163
187
|
problems: pagesOk ? 0 : lines.length,
|
|
164
188
|
damagedTables: pagesOk ? [] : damagedTables(database, lines),
|
|
165
|
-
searchIndexes: indexes
|
|
189
|
+
searchIndexes: indexes,
|
|
190
|
+
invalidJson: json
|
|
166
191
|
});
|
|
167
192
|
} catch (error) {
|
|
168
193
|
return done({ ok: false, error: messageOf(error) });
|
|
@@ -171,11 +196,12 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
|
|
|
171
196
|
}
|
|
172
197
|
}, "storeHealth");
|
|
173
198
|
|
|
174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
199
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
175
200
|
var MAX_BYTES = 16 * 1024 * 1024;
|
|
176
201
|
|
|
177
202
|
export {
|
|
178
203
|
explainDamage,
|
|
204
|
+
invalidJson,
|
|
179
205
|
QUICK_HEALTH_CHECKS,
|
|
180
206
|
fts5Tables,
|
|
181
207
|
storeHealth
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/errors.js
|
|
8
8
|
var errorCodes = [
|
|
9
9
|
"validation_error",
|
|
10
10
|
"configuration_error",
|
|
@@ -39,7 +39,7 @@ var CliError = class extends Error {
|
|
|
39
39
|
};
|
|
40
40
|
var isCliError = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && value[BRAND] === true, "isCliError");
|
|
41
41
|
|
|
42
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
42
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
|
|
43
43
|
var CONTROL = (
|
|
44
44
|
// biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
|
|
45
45
|
/[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
commandPathOf,
|
|
8
8
|
findCommand,
|
|
9
9
|
outputOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-D4Y2KL5V.js";
|
|
11
11
|
import {
|
|
12
12
|
Command,
|
|
13
13
|
Help,
|
|
@@ -18,18 +18,18 @@ import {
|
|
|
18
18
|
environmentOf,
|
|
19
19
|
metaOf,
|
|
20
20
|
takesProfile
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-DQELQ7BL.js";
|
|
22
22
|
import {
|
|
23
23
|
writes
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KC4MQRAB.js";
|
|
25
25
|
import {
|
|
26
26
|
CliError
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-SMHLQEE2.js";
|
|
28
28
|
import {
|
|
29
29
|
__name
|
|
30
30
|
} from "./chunk-ZVVMGPBJ.js";
|
|
31
31
|
|
|
32
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
|
|
33
33
|
var SECTIONS = {
|
|
34
34
|
read: "Read",
|
|
35
35
|
write: "Write",
|
|
@@ -80,6 +80,7 @@ var CORE_SECTIONS = {
|
|
|
80
80
|
replies: "automate",
|
|
81
81
|
runs: "automate",
|
|
82
82
|
schedule: "automate",
|
|
83
|
+
templates: "automate",
|
|
83
84
|
serve: "automate",
|
|
84
85
|
server: "automate",
|
|
85
86
|
account: "setup",
|
|
@@ -94,7 +95,7 @@ var CORE_SECTIONS = {
|
|
|
94
95
|
upgrade: "setup"
|
|
95
96
|
};
|
|
96
97
|
|
|
97
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
98
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
|
|
98
99
|
var DESCRIPTION = 90;
|
|
99
100
|
var COLUMN = 52;
|
|
100
101
|
var short = /* @__PURE__ */ __name((text) => {
|
|
@@ -133,7 +134,7 @@ var commandsText = /* @__PURE__ */ __name((root, commands, scope) => {
|
|
|
133
134
|
`;
|
|
134
135
|
}, "commandsText");
|
|
135
136
|
|
|
136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
|
|
137
138
|
var ARGUMENT_KINDS = {
|
|
138
139
|
chat: "chat",
|
|
139
140
|
chats: "chat",
|
|
@@ -325,7 +326,7 @@ var installCommandHelp = /* @__PURE__ */ __name((program, { profile = true } = {
|
|
|
325
326
|
command.addHelpText("after", () => commandHelpText(command));
|
|
326
327
|
}, "installCommandHelp");
|
|
327
328
|
|
|
328
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
|
|
329
330
|
var WIRECAT_TOOLS = [
|
|
330
331
|
{
|
|
331
332
|
command: "tg",
|
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
PRAGMAS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BXIPT2BO.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SMHLQEE2.js";
|
|
9
9
|
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.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
|
|
14
14
|
var SQLITE_WARNING = "SQLite is an experimental feature";
|
|
15
15
|
var quieted = /* @__PURE__ */ new WeakSet();
|
|
16
16
|
var quietSqliteWarning = /* @__PURE__ */ __name((host = process) => {
|
|
@@ -31,7 +31,7 @@ var isSqliteWarning = /* @__PURE__ */ __name((warning, options) => {
|
|
|
31
31
|
return name === "ExperimentalWarning" && message.startsWith(SQLITE_WARNING);
|
|
32
32
|
}, "isSqliteWarning");
|
|
33
33
|
|
|
34
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/store/open.js
|
|
35
35
|
var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
36
36
|
const database = await openFile(path);
|
|
37
37
|
try {
|
|
@@ -44,12 +44,12 @@ var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
|
44
44
|
}, "openCache");
|
|
45
45
|
var openFile = /* @__PURE__ */ __name((path) => "Bun" in globalThis ? openUnderBun(path) : openUnderNode(path), "openFile");
|
|
46
46
|
var openUnderBun = /* @__PURE__ */ __name(async (path) => {
|
|
47
|
-
const { openWithBunSqlite } = await import("./bun-sqlite-
|
|
47
|
+
const { openWithBunSqlite } = await import("./bun-sqlite-FYDJXUHF.js");
|
|
48
48
|
return await openWithBunSqlite(path);
|
|
49
49
|
}, "openUnderBun");
|
|
50
50
|
var openUnderNode = /* @__PURE__ */ __name(async (path) => {
|
|
51
51
|
quietSqliteWarning();
|
|
52
|
-
const { openWithNodeSqlite } = await import("./node-sqlite-
|
|
52
|
+
const { openWithNodeSqlite } = await import("./node-sqlite-YVHMNRVA.js");
|
|
53
53
|
return openWithNodeSqlite(path);
|
|
54
54
|
}, "openUnderNode");
|
|
55
55
|
var runtime = /* @__PURE__ */ __name(() => {
|
|
@@ -3,15 +3,15 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
readSharedSection,
|
|
5
5
|
writeSharedSection
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FQZSS3AB.js";
|
|
7
7
|
import {
|
|
8
8
|
CliError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SMHLQEE2.js";
|
|
10
10
|
import {
|
|
11
11
|
__name
|
|
12
12
|
} from "./chunk-ZVVMGPBJ.js";
|
|
13
13
|
|
|
14
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
|
|
15
15
|
var PERMISSION_ANSWERS = ["readonly", "allow"];
|
|
16
16
|
var QUESTIONS = ["languages", "tools", "permissions"];
|
|
17
17
|
var SECTION = "setup";
|
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
string,
|
|
20
20
|
text,
|
|
21
21
|
unknown
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-KC4MQRAB.js";
|
|
23
23
|
import {
|
|
24
24
|
CliError,
|
|
25
25
|
visibleControls
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-SMHLQEE2.js";
|
|
27
27
|
import {
|
|
28
28
|
__commonJS,
|
|
29
29
|
__name,
|
|
@@ -1896,7 +1896,7 @@ var require_cli_table3 = __commonJS({
|
|
|
1896
1896
|
}
|
|
1897
1897
|
});
|
|
1898
1898
|
|
|
1899
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1899
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
|
|
1900
1900
|
var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
|
|
1901
1901
|
if (signal?.aborted)
|
|
1902
1902
|
return Promise.reject(signal.reason);
|
|
@@ -1924,7 +1924,7 @@ var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
|
|
|
1924
1924
|
});
|
|
1925
1925
|
}, "waitForDrain");
|
|
1926
1926
|
|
|
1927
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1927
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
|
|
1928
1928
|
var processStreams = {
|
|
1929
1929
|
drain: /* @__PURE__ */ __name(async (signal) => {
|
|
1930
1930
|
await Promise.all([waitForDrain(process.stdout, signal), waitForDrain(process.stderr, signal)]);
|
|
@@ -1953,7 +1953,7 @@ var captureStreams = /* @__PURE__ */ __name(() => {
|
|
|
1953
1953
|
};
|
|
1954
1954
|
}, "captureStreams");
|
|
1955
1955
|
|
|
1956
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1956
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/retry.js
|
|
1957
1957
|
var DEFAULT_RETRY = {
|
|
1958
1958
|
retries: 1,
|
|
1959
1959
|
baseDelayMs: 250,
|
|
@@ -1965,7 +1965,7 @@ var backoffMs = /* @__PURE__ */ __name((attempt, config, random) => {
|
|
|
1965
1965
|
return Math.round(random() * ceiling);
|
|
1966
1966
|
}, "backoffMs");
|
|
1967
1967
|
|
|
1968
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1968
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/result-fields.js
|
|
1969
1969
|
var forbidden = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
1970
1970
|
var validate = /* @__PURE__ */ __name((paths) => {
|
|
1971
1971
|
if (paths.length === 0 || paths.length > 128 || paths.some((path) => path.length > 256 || !/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/.test(path) || path.split(".").some((part) => forbidden.has(part))))
|
|
@@ -2030,7 +2030,7 @@ var projectFields = /* @__PURE__ */ __name((value, fields) => {
|
|
|
2030
2030
|
return project(value, fields);
|
|
2031
2031
|
}, "projectFields");
|
|
2032
2032
|
|
|
2033
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2033
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
|
|
2034
2034
|
var BATCH_LIMITS = Object.freeze({
|
|
2035
2035
|
requests: 32,
|
|
2036
2036
|
input_bytes: 262144,
|
|
@@ -2157,7 +2157,7 @@ var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
|
|
|
2157
2157
|
};
|
|
2158
2158
|
}, "runBatch");
|
|
2159
2159
|
|
|
2160
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2160
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
|
|
2161
2161
|
import { randomBytes } from "node:crypto";
|
|
2162
2162
|
import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
2163
2163
|
import { dirname, join } from "node:path";
|
|
@@ -2201,16 +2201,16 @@ var saveConfigFile = /* @__PURE__ */ __name((path, config) => {
|
|
|
2201
2201
|
`, 384);
|
|
2202
2202
|
}, "saveConfigFile");
|
|
2203
2203
|
|
|
2204
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2204
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/constants.js
|
|
2205
2205
|
var BASE_CONSTANTS = new URL("../constants.json", new URL("constants.js", import.meta.resolve("@wirecat/cli-base")).href);
|
|
2206
2206
|
var baseConstantsSchema = object({});
|
|
2207
2207
|
var LayerSchema = record(string(), unknown());
|
|
2208
2208
|
|
|
2209
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2209
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
|
|
2210
2210
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
2211
2211
|
import { join as join3, resolve } from "node:path";
|
|
2212
2212
|
|
|
2213
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2213
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
|
|
2214
2214
|
import { createRequire } from "node:module";
|
|
2215
2215
|
var ENTRY_OPTIONS = { linux: { store: "secret-service" } };
|
|
2216
2216
|
var require2 = createRequire(new URL("keyring.js", import.meta.resolve("@wirecat/cli-base")).href);
|
|
@@ -2230,7 +2230,7 @@ var systemKeyring = {
|
|
|
2230
2230
|
delete: /* @__PURE__ */ __name((service, account) => entry(service, account).deletePassword(), "delete")
|
|
2231
2231
|
};
|
|
2232
2232
|
|
|
2233
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2233
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
|
|
2234
2234
|
import { homedir, userInfo } from "node:os";
|
|
2235
2235
|
import { join as join2, posix, win32 } from "node:path";
|
|
2236
2236
|
var PATH_KINDS = ["config", "state", "cache"];
|
|
@@ -2282,7 +2282,7 @@ var homeIsMoved = /* @__PURE__ */ __name(({ env = process.env, platform = proces
|
|
|
2282
2282
|
var isMovedRun = /* @__PURE__ */ __name((options) => pathsAreOverridden(options) || homeIsMoved(options), "isMovedRun");
|
|
2283
2283
|
var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join2(configDir, fileName), "configFilePath");
|
|
2284
2284
|
|
|
2285
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2285
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
|
|
2286
2286
|
var movedRunService = /* @__PURE__ */ __name((service, configDir) => `${service}:${resolve(configDir)}`, "movedRunService");
|
|
2287
2287
|
var warnedRuns = /* @__PURE__ */ new WeakSet();
|
|
2288
2288
|
var Credentials = class {
|
|
@@ -2417,7 +2417,7 @@ var Credentials = class {
|
|
|
2417
2417
|
}
|
|
2418
2418
|
};
|
|
2419
2419
|
|
|
2420
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2420
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
|
|
2421
2421
|
var abortError = /* @__PURE__ */ __name(() => new DOMException("The operation was aborted.", "AbortError"), "abortError");
|
|
2422
2422
|
var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, reject) => {
|
|
2423
2423
|
if (signal?.aborted) {
|
|
@@ -2431,10 +2431,10 @@ var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, re
|
|
|
2431
2431
|
}, { once: true });
|
|
2432
2432
|
}), "realSleep");
|
|
2433
2433
|
|
|
2434
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2434
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
|
|
2435
2435
|
import { appendFileSync } from "node:fs";
|
|
2436
2436
|
|
|
2437
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2437
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/log.js
|
|
2438
2438
|
var LOG_SEVERITIES = ["trace", "debug", "info", "warn", "error", "fatal"];
|
|
2439
2439
|
var logRecordSchema = strictObject({
|
|
2440
2440
|
time: isoTime,
|
|
@@ -2512,7 +2512,7 @@ var traceIdOf = /* @__PURE__ */ __name((traceparent) => {
|
|
|
2512
2512
|
return traceId;
|
|
2513
2513
|
}, "traceIdOf");
|
|
2514
2514
|
|
|
2515
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2515
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
|
|
2516
2516
|
var REDACTED_FIELDS = [
|
|
2517
2517
|
"authorization",
|
|
2518
2518
|
"Authorization",
|
|
@@ -2606,7 +2606,7 @@ var silent = {
|
|
|
2606
2606
|
}, "error")
|
|
2607
2607
|
};
|
|
2608
2608
|
|
|
2609
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2609
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
|
|
2610
2610
|
var import_cli_table3 = __toESM(require_cli_table3(), 1);
|
|
2611
2611
|
import { styleText } from "node:util";
|
|
2612
2612
|
var renderPretty = /* @__PURE__ */ __name((value, options) => {
|
|
@@ -2681,7 +2681,7 @@ var BORDERLESS = {
|
|
|
2681
2681
|
middle: ""
|
|
2682
2682
|
};
|
|
2683
2683
|
|
|
2684
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2684
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.87.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
|
|
2685
2685
|
var createRenderer = /* @__PURE__ */ __name(({ format, color, streams = processStreams, quiet = false }) => {
|
|
2686
2686
|
const mark = /* @__PURE__ */ __name((symbol, message) => format === "pretty" ? `${symbol} ${visibleControls(message)}` : visibleControls(message), "mark");
|
|
2687
2687
|
const say = /* @__PURE__ */ __name((symbol) => (message) => {
|