@wirecat/zoom-cli 0.70.0 → 0.71.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/dist/answer-entities.d.ts +2 -0
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-GE2TFJJP.js → all-profiles-O4YNVPZX.js} +7 -7
- package/dist/bundle/{answer-policy-GOXSDYDD.js → answer-policy-PPSPMCLH.js} +52 -52
- package/dist/bundle/{anthropic-FA6NHENI.js → anthropic-7GGRX3RX.js} +13 -4
- package/dist/bundle/{app-server-IRADMSNX.js → app-server-CPMKM3HI.js} +46 -46
- package/dist/bundle/{bun-ZYZGGCX5.js → bun-POHZKEPV.js} +2 -2
- package/dist/bundle/{bun-sqlite-Y24TUIGS.js → bun-sqlite-PGYMBPEL.js} +2 -2
- package/dist/bundle/{chunk-DCUWJITQ.js → chunk-2FV5JUQU.js} +38 -592
- package/dist/bundle/{chunk-DNR4B5YV.js → chunk-2KESWII5.js} +2 -2
- package/dist/bundle/{chunk-KWRCP55G.js → chunk-2RUAMDVV.js} +10 -10
- package/dist/bundle/{chunk-IS3ZTT2Z.js → chunk-2U27KIKU.js} +2 -2
- package/dist/bundle/chunk-4LAQDZXU.js +1635 -0
- package/dist/bundle/{chunk-6IF5ZHDS.js → chunk-4QPQ7MDA.js} +1 -1
- package/dist/bundle/{chunk-MVOMLJYQ.js → chunk-4QUFFB2U.js} +3 -3
- package/dist/bundle/{chunk-AUNW7N4I.js → chunk-54YDWBYG.js} +1 -1
- package/dist/bundle/{chunk-AISJCF7A.js → chunk-5J4AMBMM.js} +4 -4
- package/dist/bundle/{chunk-UVPL7YAY.js → chunk-5K7OGPGA.js} +4 -4
- package/dist/bundle/{chunk-RO3ZR4VP.js → chunk-5LJTU4LY.js} +12 -12
- package/dist/bundle/{chunk-YTN2JN6N.js → chunk-633QXP57.js} +9 -7
- package/dist/bundle/{chunk-DXCTW3MV.js → chunk-64ZHF6PJ.js} +1 -1
- package/dist/bundle/{chunk-JRO2FWO2.js → chunk-77TCCHMP.js} +1 -1
- package/dist/bundle/{chunk-CIZ25UPK.js → chunk-7ROXXRGG.js} +2282 -1087
- package/dist/bundle/{chunk-OA37BWE5.js → chunk-ALIT5QFT.js} +1 -1
- package/dist/bundle/{chunk-V2E7QFZ3.js → chunk-BBTQIVFP.js} +1 -1
- package/dist/bundle/{chunk-M7E44TMT.js → chunk-BGTEVIW4.js} +5 -5
- package/dist/bundle/{chunk-2QFPVUM3.js → chunk-CFQF6IGY.js} +2 -2
- package/dist/bundle/{chunk-XWQNJKTP.js → chunk-CKPCVEXU.js} +5 -5
- package/dist/bundle/{chunk-L24UOUWG.js → chunk-CRFOGYDG.js} +1 -1
- package/dist/bundle/{chunk-OAQLVV6W.js → chunk-CT4WVR4N.js} +2 -2
- package/dist/bundle/{chunk-SNIY3JDN.js → chunk-DHWBSXG3.js} +20 -20
- package/dist/bundle/{chunk-CHGUNZ3L.js → chunk-DIQLXAAZ.js} +3 -3
- package/dist/bundle/{chunk-RRRJCHUC.js → chunk-DK6ICIGL.js} +3141 -982
- package/dist/bundle/{chunk-YUHM2OJM.js → chunk-DRBQDCDU.js} +9 -9
- package/dist/bundle/{chunk-LAG5O2FV.js → chunk-DSVZEXYJ.js} +1093 -895
- package/dist/bundle/{chunk-4DSIWYGO.js → chunk-FSHCAWZS.js} +29110 -16686
- package/dist/bundle/{chunk-SVF3NDAO.js → chunk-GGS6D4W4.js} +2 -2
- package/dist/bundle/{chunk-V5GRSOCZ.js → chunk-GL3MYFMX.js} +3 -3
- package/dist/bundle/{chunk-VSLDWT4E.js → chunk-GXF5HFFP.js} +3 -3
- package/dist/bundle/{chunk-ZV3INEKM.js → chunk-HB6XJQ3Y.js} +4 -4
- package/dist/bundle/{chunk-GB5X3GBE.js → chunk-I4DFFR7F.js} +2 -2
- package/dist/bundle/{chunk-ZS55EERO.js → chunk-IAV5BG3I.js} +1 -1
- package/dist/bundle/{chunk-VNU5L37V.js → chunk-IED3NS7G.js} +27 -35
- package/dist/bundle/{chunk-W7ZEEC4K.js → chunk-INVTDIF6.js} +1 -1
- package/dist/bundle/{chunk-GVT5363M.js → chunk-KMV7GZB6.js} +1 -1
- package/dist/bundle/{chunk-LXXCLQCW.js → chunk-LE7MDAQG.js} +2 -2
- package/dist/bundle/{chunk-2JEM2YNV.js → chunk-M76MXMLY.js} +1 -1
- package/dist/bundle/{chunk-RWIILYKW.js → chunk-MEED7YFG.js} +1 -1
- package/dist/bundle/{chunk-56OV5ASY.js → chunk-MRI6QMZ3.js} +9 -9
- package/dist/bundle/{chunk-BSS6HX4O.js → chunk-MW4EGDDV.js} +2 -2
- package/dist/bundle/{chunk-6HJFIMT7.js → chunk-N2FNMION.js} +1 -1
- package/dist/bundle/{chunk-J3SKXICS.js → chunk-OHWMIUCT.js} +139 -544
- package/dist/bundle/{chunk-M7VUXXGS.js → chunk-OWEBWDHV.js} +58 -3
- package/dist/bundle/{chunk-BVWF4B33.js → chunk-P3XC6EDU.js} +15 -19
- package/dist/bundle/{chunk-JULBAECW.js → chunk-Q2SUFGSH.js} +16 -6
- package/dist/bundle/{chunk-QL7EMFIC.js → chunk-Q3XLZIY3.js} +16 -16
- package/dist/bundle/{chunk-M6JIXMQZ.js → chunk-Q5PI72CR.js} +1 -1
- package/dist/bundle/{chunk-X4ZF4XXI.js → chunk-QTHIU7CO.js} +1 -1
- package/dist/bundle/{chunk-CSEBB4OP.js → chunk-QVSLSWAL.js} +7 -7
- package/dist/bundle/{chunk-VJ5ZU4UF.js → chunk-RN4EHCC5.js} +2 -2
- package/dist/bundle/{chunk-D3PNCJD5.js → chunk-SELXER2Q.js} +3 -3
- package/dist/bundle/{chunk-YJSPBUGB.js → chunk-TM4JSVGQ.js} +38 -49
- package/dist/bundle/{chunk-5XWCBLUR.js → chunk-UG447QY2.js} +1 -1
- package/dist/bundle/{chunk-RIPAUCKJ.js → chunk-ULDXZ6LH.js} +64 -57
- package/dist/bundle/chunk-USQ23X5V.js +1227 -0
- package/dist/bundle/{chunk-PV6OHXHN.js → chunk-VJXHIUFP.js} +14 -14
- package/dist/bundle/{chunk-3KC7C465.js → chunk-VRH7VRTK.js} +7 -7
- package/dist/bundle/{chunk-ZSKE7N2U.js → chunk-X277FBTF.js} +2 -2
- package/dist/bundle/{chunk-KM736RMJ.js → chunk-X3ZDN3U7.js} +1 -1
- package/dist/bundle/{chunk-CEJJBZAE.js → chunk-X4GWR6GO.js} +8 -8
- package/dist/bundle/chunk-XI3VIQKW.js +756 -0
- package/dist/bundle/{chunk-IWPXWGF7.js → chunk-YD2RYVMK.js} +33 -33
- package/dist/bundle/{chunk-RB33VTUW.js → chunk-YPO2U2YB.js} +473 -118
- package/dist/bundle/{chunk-IINZIP73.js → chunk-ZBFL5JPT.js} +7 -6
- package/dist/bundle/{chunk-QO2KPU26.js → chunk-ZVI6TFQR.js} +100 -43
- package/dist/bundle/{cli-VRSQ7HAE.js → cli-KHMEUXNG.js} +117 -64
- package/dist/bundle/command-contract-4K6XXZYE.js +41 -0
- package/dist/bundle/config-EEDB632I.js +90 -0
- package/dist/bundle/{decode-523PUQMR.js → decode-7RP4HSVE.js} +2 -2
- package/dist/bundle/{dist-6WWKPEVW.js → dist-BFT2SUBV.js} +60 -40
- package/dist/bundle/{echarts-S5UMX2D3.js → echarts-T2BSQ2YV.js} +2 -2
- package/dist/bundle/{embed-ODPDVHUK.js → embed-BAS6YPDT.js} +3 -3
- package/dist/bundle/{embedder-PAXRBSZE.js → embedder-5XD5FCAO.js} +6 -6
- package/dist/bundle/{first-run-NVTDR5VO.js → first-run-23WWZ2PW.js} +5 -5
- package/dist/bundle/first-screen-6HFUYVFR.js +39 -0
- package/dist/bundle/{instructions-DUB7E6C5.js → instructions-XZPROPKY.js} +1 -1
- package/dist/bundle/{main-A7JSYQI6.js → main-TZXKGL3L.js} +12 -12
- package/dist/bundle/{meetings-BDZQV3HR.js → meetings-JB2ISPND.js} +3 -1
- package/dist/bundle/{node-E25KP53H.js → node-A3B3MJWX.js} +2 -2
- package/dist/bundle/{node-sqlite-PHWDFZCP.js → node-sqlite-QVWDLGDX.js} +3 -3
- package/dist/bundle/{oauth-G2K46IYP.js → oauth-YA6IYV4O.js} +4 -4
- package/dist/bundle/{open-INWS5HIZ.js → open-SY7TXJBS.js} +2 -2
- package/dist/bundle/{openai-T44ORVGQ.js → openai-2AU24NRN.js} +8 -8
- package/dist/bundle/{process-UJ2JHMJN.js → process-6HNBTJIY.js} +1 -1
- package/dist/bundle/{program-LYTGFV6L.js → program-77BUCJ4H.js} +78 -89
- package/dist/bundle/{prompt-VTUCRCE4.js → prompt-YDG73YDS.js} +2 -2
- package/dist/bundle/{recognize-3CEPOW2F.js → recognize-ECXDGTB7.js} +1 -1
- package/dist/bundle/{remote-DRQEXEZL.js → remote-K4JHGBVJ.js} +4 -4
- package/dist/bundle/{rerank-UL4KNNVN.js → rerank-IU2YYD4T.js} +4 -4
- package/dist/bundle/{run-log-UZAB5CWF.js → run-log-LFEXNZ74.js} +50 -50
- package/dist/bundle/{serve-P5UWUOWQ.js → serve-3XWIF3HI.js} +6 -6
- package/dist/bundle/{server-M6XK2Y3X.js → server-56VYOHWP.js} +38 -38
- package/dist/bundle/server-YSTMUZ22.js +72 -0
- package/dist/bundle/{services-4HRYNY62.js → services-X7IPEGQ5.js} +85 -33
- package/dist/bundle/{speech-BBPBMFAO.js → speech-E2OBQWYA.js} +10 -10
- package/dist/bundle/{state-GDSUNUSY.js → state-4GMJYK4H.js} +3 -3
- package/dist/bundle/{store-VWLABMLF.js → store-KPI7GB5Y.js} +37 -19
- package/dist/bundle/{store-LBQ6FZP2.js → store-LA4TV4DM.js} +19 -13
- package/dist/bundle/store-connection-AZTIF6IH.js +83 -0
- package/dist/bundle/store-maintenance-command-LR572PS4.js +61 -0
- package/dist/bundle/zm.js +2 -2
- package/dist/bundle/{zoom-app-YIEJLWCW.js → zoom-app-QEJBTIJ4.js} +2 -2
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +0 -6
- package/dist/contract-overrides.js.map +1 -1
- package/dist/ingestion-search-commands.d.ts.map +1 -1
- package/dist/ingestion-search-commands.js +0 -10
- package/dist/ingestion-search-commands.js.map +1 -1
- package/dist/meeting-integration-commands.d.ts.map +1 -1
- package/dist/meeting-integration-commands.js +8 -6
- package/dist/meeting-integration-commands.js.map +1 -1
- package/dist/meeting-integration.d.ts +3 -1
- package/dist/meeting-integration.d.ts.map +1 -1
- package/dist/store-connection.d.ts.map +1 -1
- package/dist/store-connection.js +4 -3
- package/dist/store-connection.js.map +1 -1
- package/dist/unified-search.d.ts +4 -4
- package/dist/unified-search.d.ts.map +1 -1
- package/dist/unified-search.js +1 -24
- package/dist/unified-search.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/skills/zoom-cli/SKILL.md +2 -2
- package/dist/bundle/chunk-AT2XKNFN.js +0 -342
- package/dist/bundle/chunk-VE2VNECR.js +0 -380
- package/dist/bundle/chunk-Y6C3N7YG.js +0 -12434
- package/dist/bundle/command-contract-RPRKHVU6.js +0 -41
- package/dist/bundle/config-QU6A6VIO.js +0 -90
- package/dist/bundle/first-screen-5RWZDWLK.js +0 -39
- package/dist/bundle/server-F3NPVMS2.js +0 -72
- package/dist/bundle/store-connection-XEBFP56U.js +0 -83
- package/dist/bundle/store-maintenance-command-G43JN57J.js +0 -61
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
commandPathOf,
|
|
8
8
|
findCommand,
|
|
9
9
|
outputOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GL3MYFMX.js";
|
|
11
11
|
import {
|
|
12
12
|
Command,
|
|
13
13
|
Help,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
environmentOf,
|
|
19
19
|
metaOf,
|
|
20
20
|
takesProfile
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-DSVZEXYJ.js";
|
|
22
22
|
import {
|
|
23
23
|
writes
|
|
24
24
|
} from "./chunk-WOIHSQAL.js";
|
|
@@ -29,7 +29,7 @@ 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.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/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.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/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.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
|
|
137
138
|
var ARGUMENT_KINDS = {
|
|
138
139
|
chat: "chat",
|
|
139
140
|
chats: "chat",
|
|
@@ -354,7 +355,7 @@ var exampleReport = /* @__PURE__ */ __name((program) => {
|
|
|
354
355
|
return { written, generated, text };
|
|
355
356
|
}, "exampleReport");
|
|
356
357
|
|
|
357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
|
|
358
359
|
var WIRECAT_TOOLS = [
|
|
359
360
|
{
|
|
360
361
|
command: "tg",
|
|
@@ -23,20 +23,20 @@ import {
|
|
|
23
23
|
tagMemberIds,
|
|
24
24
|
thingOf,
|
|
25
25
|
write
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-FSHCAWZS.js";
|
|
27
27
|
import {
|
|
28
28
|
fold
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-VRH7VRTK.js";
|
|
30
|
+
import {
|
|
31
|
+
damagedFile
|
|
32
|
+
} from "./chunk-MEED7YFG.js";
|
|
30
33
|
import {
|
|
31
34
|
ADDED_PROVIDER,
|
|
32
35
|
filesAccountSql,
|
|
33
36
|
folderProviderOf,
|
|
34
37
|
folderProviderSql,
|
|
35
38
|
isDocumentAccountProvider
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import {
|
|
38
|
-
damagedFile
|
|
39
|
-
} from "./chunk-RWIILYKW.js";
|
|
39
|
+
} from "./chunk-XI3VIQKW.js";
|
|
40
40
|
import {
|
|
41
41
|
CliError
|
|
42
42
|
} from "./chunk-FEM2JQN2.js";
|
|
@@ -44,14 +44,27 @@ import {
|
|
|
44
44
|
__name
|
|
45
45
|
} from "./chunk-ZVVMGPBJ.js";
|
|
46
46
|
|
|
47
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/damage.js
|
|
48
48
|
var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
|
|
49
49
|
var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
|
|
50
50
|
var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
|
|
51
51
|
var WIRECAT_UNITS = ["memo-*", "mail-*", "tg-*", "max-*", "wirecat-*"];
|
|
52
52
|
var seen = /* @__PURE__ */ __name((mark) => `\`${mark.command}\` found the store damaged at ${mark.at} (${mark.error})`, "seen");
|
|
53
|
-
var
|
|
54
|
-
|
|
53
|
+
var journalSeen = /* @__PURE__ */ __name((store, { seen: seen2, command, at }) => {
|
|
54
|
+
const wal = `${store.replace(/^.*\//, "")}-wal`;
|
|
55
|
+
return seen2 === "shm-without-wal" ? `the store's journal file (${wal}) was missing when \`${command}\` opened the store at ${at}: another program deleted it, or a tool crashed while closing` : `the store's journal file (${wal}) was deleted or replaced by another program while \`${command}\` had the store open (${at})`;
|
|
56
|
+
}, "journalSeen");
|
|
57
|
+
var lossUnknown = /* @__PURE__ */ __name((lastOkAt, gone = false) => {
|
|
58
|
+
const since = lastOkAt ? `since the last deep check that passed (${lastOkAt})` : "since the store was made (no deep check that passed is on record)";
|
|
59
|
+
return `${gone ? "more rows may be gone" : "how many rows were lost is unknown"}: damage can take rows written ${since} without leaving a trace; a sync fetches again what the servers still hold`;
|
|
60
|
+
}, "lossUnknown");
|
|
61
|
+
var stopWriters = /* @__PURE__ */ __name((timers) => ({
|
|
62
|
+
command: timers?.length ? `systemctl --user stop ${timers.join(" ")}` : `systemctl --user stop ${WIRECAT_UNITS.map((unit) => `'${unit}'`).join(" ")}`,
|
|
63
|
+
why: "a tool that writes while the store is recovered damages the new file too",
|
|
64
|
+
destructive: false
|
|
65
|
+
}), "stopWriters");
|
|
66
|
+
var storeDamageReport = /* @__PURE__ */ __name(({ health, command, mark = null, journal = null, lastOkAt = null, holders = null, timers = null, sqlite3Usable = true }) => {
|
|
67
|
+
if (health.ok && !mark && !journal)
|
|
55
68
|
return null;
|
|
56
69
|
const indexNames = (health.searchIndexes ?? []).map((index) => index.name);
|
|
57
70
|
const badIndexes = (health.searchIndexes ?? []).filter((index) => !index.ok).map((index) => index.name);
|
|
@@ -60,42 +73,85 @@ var explainDamage = /* @__PURE__ */ __name((health, command, mark = null) => {
|
|
|
60
73
|
const derived = [.../* @__PURE__ */ new Set([...tables.filter((table) => isDerivedTable(table, indexNames)), ...badIndexes])];
|
|
61
74
|
const unopened = health.error !== void 0;
|
|
62
75
|
const json = (health.invalidJson ?? []).map(({ table, column }) => `${table}.${column}`);
|
|
63
|
-
const
|
|
64
|
-
const
|
|
76
|
+
const damaged = !health.ok || mark !== null;
|
|
77
|
+
const folder = health.path.replace(/\/[^/]*$/, "");
|
|
78
|
+
const checked = !damaged ? `every page of the store reads, but ${journalSeen(health.path, journal)}; what was written into it may be lost` : 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)}` : "");
|
|
79
|
+
const whatHappened = mark && !health.ok ? `${checked}; ${seen(mark)}` : checked;
|
|
65
80
|
const impact = [
|
|
66
81
|
...sources.length ? [`some rows of ${named(sources)} cannot be read; a recovery keeps every row it can read and names the rest`] : [],
|
|
67
82
|
...derived.length ? [`searches may miss results or fail; ${named(derived)} hold nothing that is not elsewhere, and are rebuilt`] : [],
|
|
68
83
|
...json.length ? [`a read of a row with a broken JSON value fails ("malformed JSON"); a recovery clears those values`] : [],
|
|
69
|
-
|
|
84
|
+
...!damaged ? ["everything works; rows written while the journal was gone may be missing, and a sync fetches them again"] : mark ? [
|
|
85
|
+
"reads that do not touch a damaged page work; every command that writes the store refuses until it is recovered"
|
|
86
|
+
] : ["reads that do not touch a damaged page work; a write that touches one fails until the store is recovered"]
|
|
87
|
+
];
|
|
88
|
+
const likelyCauses = [
|
|
89
|
+
...journal ? [{ cause: journalSeen(health.path, journal), check: `ls -li --time-style=full-iso ${folder}/` }] : [],
|
|
90
|
+
...holders?.length ? [
|
|
91
|
+
{
|
|
92
|
+
cause: `two programs wrote the file without seeing each other: ${holders.map(({ name, pid }) => `${name} (process ${pid})`).join(", ")} still ${holders.length === 1 ? "has" : "have"} it open`,
|
|
93
|
+
check: `fuser -v ${health.path}`
|
|
94
|
+
}
|
|
95
|
+
] : [],
|
|
96
|
+
...damaged ? [
|
|
97
|
+
{
|
|
98
|
+
cause: "the computer lost power or crashed while a tool was writing",
|
|
99
|
+
check: `journalctl --user ${WIRECAT_UNITS.map((unit) => `-u '${unit}'`).join(" ")} --since -14d | grep -i -e malformed -e corrupt -e 'disk full'`
|
|
100
|
+
},
|
|
101
|
+
{ cause: "the disk filled up while a tool was writing", check: `df -h ${folder}` },
|
|
102
|
+
{
|
|
103
|
+
cause: "the file was copied, restored or synced while a tool had it open, or it sits in a synced or network folder",
|
|
104
|
+
check: `findmnt -T ${folder}`
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
cause: "a fault of the disk itself",
|
|
108
|
+
check: "journalctl -k --since -14d | grep -i -e 'I/O error' -e nvme -e ata"
|
|
109
|
+
}
|
|
110
|
+
] : []
|
|
111
|
+
];
|
|
112
|
+
const steps = [
|
|
113
|
+
stopWriters(timers),
|
|
114
|
+
...(holders ?? []).map(({ pid, name }) => ({
|
|
115
|
+
command: `kill ${pid}`,
|
|
116
|
+
why: `${name} (process ${pid}) has the store open`,
|
|
117
|
+
destructive: true
|
|
118
|
+
})),
|
|
119
|
+
...damaged && !sqlite3Usable ? [
|
|
120
|
+
{
|
|
121
|
+
command: "sudo apt install sqlite3",
|
|
122
|
+
why: "the recovery copies rows with the sqlite3 program, 3.43 or newer (on macOS: brew install sqlite)",
|
|
123
|
+
destructive: false
|
|
124
|
+
}
|
|
125
|
+
] : [],
|
|
126
|
+
...damaged ? [
|
|
127
|
+
{
|
|
128
|
+
command: `${command} store recover run`,
|
|
129
|
+
why: "copies every readable row into a new file and puts it in place of the store; the damaged file is kept beside it, and it prints the syncs that fetch again what was lost",
|
|
130
|
+
destructive: true
|
|
131
|
+
}
|
|
132
|
+
] : [],
|
|
133
|
+
{
|
|
134
|
+
command: `${command} store recover`,
|
|
135
|
+
why: "checks every page again; a check that passes lifts the damage mark",
|
|
136
|
+
destructive: false
|
|
137
|
+
}
|
|
70
138
|
];
|
|
71
139
|
return {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"the computer lost power or crashed, or the disk filled up, while a tool was writing",
|
|
75
|
-
"the file was copied, restored or synced while a tool had it open, or it sits in a synced or network folder",
|
|
76
|
-
"a fault of the disk itself"
|
|
77
|
-
],
|
|
78
|
-
investigate: [
|
|
79
|
-
`journalctl --user ${WIRECAT_UNITS.map((unit) => `-u '${unit}'`).join(" ")} --since -14d | grep -i -e malformed -e corrupt -e 'disk full'`,
|
|
80
|
-
"journalctl -k --since -14d | grep -i -e 'I/O error' -e nvme -e ata",
|
|
81
|
-
`df -h ${health.path.replace(/\/[^/]*$/, "")}`,
|
|
82
|
-
...health.checked === "quick" || health.ok ? [`${command} store recover`] : []
|
|
83
|
-
],
|
|
140
|
+
whatHappened,
|
|
141
|
+
likelyCauses,
|
|
84
142
|
impact,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"run the fetch commands it prints, then start the timers again"
|
|
90
|
-
]
|
|
143
|
+
externalDataSafe: "only this computer's copy is damaged: Telegram, MAX, WhatsApp, the mail servers and Google Drive keep their own data, so whatever is lost here can be fetched again by a sync",
|
|
144
|
+
lastOkAt,
|
|
145
|
+
loss: lossUnknown(lastOkAt),
|
|
146
|
+
steps
|
|
91
147
|
};
|
|
92
|
-
}, "
|
|
148
|
+
}, "storeDamageReport");
|
|
93
149
|
|
|
94
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
|
|
95
151
|
import { realpathSync, statSync } from "node:fs";
|
|
96
152
|
import { resolve } from "node:path";
|
|
97
153
|
|
|
98
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
154
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
|
|
99
155
|
var planPeople = /* @__PURE__ */ __name((database, snapshot, mappings, bindings, conflicts) => {
|
|
100
156
|
const creatable = /* @__PURE__ */ new Set();
|
|
101
157
|
let people = 0, identities = 0;
|
|
@@ -158,11 +214,11 @@ var copyPeople = /* @__PURE__ */ __name((database, snapshot, mappings, now) => {
|
|
|
158
214
|
}
|
|
159
215
|
}, "copyPeople");
|
|
160
216
|
|
|
161
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
|
|
162
218
|
import { createHash } from "node:crypto";
|
|
163
219
|
var digest = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "digest");
|
|
164
220
|
|
|
165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
|
|
166
222
|
var documentsKeyOf = /* @__PURE__ */ __name((collection) => {
|
|
167
223
|
const colon = collection.indexOf(":");
|
|
168
224
|
const provider = collection.slice(0, colon);
|
|
@@ -206,7 +262,7 @@ var currentCollection = /* @__PURE__ */ __name((row) => {
|
|
|
206
262
|
};
|
|
207
263
|
}, "currentCollection");
|
|
208
264
|
|
|
209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
|
|
210
266
|
var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindings) => {
|
|
211
267
|
const mappings = /* @__PURE__ */ new Map();
|
|
212
268
|
const missing = /* @__PURE__ */ new Set(), conflicts = /* @__PURE__ */ new Set();
|
|
@@ -373,7 +429,7 @@ var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindin
|
|
|
373
429
|
};
|
|
374
430
|
}, "planTransfer");
|
|
375
431
|
|
|
376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
377
433
|
var TRANSFER_TABLES = { document: "documents", note: "notes", memory: "memories", fact: "facts" };
|
|
378
434
|
var MAX_ENTITIES = 1e3;
|
|
379
435
|
var MAX_AUXILIARY = 1e4;
|
|
@@ -535,7 +591,7 @@ var transferSnapshot = /* @__PURE__ */ __name((database, collection) => read(dat
|
|
|
535
591
|
};
|
|
536
592
|
}), "transferSnapshot");
|
|
537
593
|
|
|
538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
|
|
539
595
|
var providerHere = /* @__PURE__ */ __name(({ provider, name, settings }) => {
|
|
540
596
|
if (provider !== "folder" || String(name ?? "").startsWith("google-drive:"))
|
|
541
597
|
return provider ?? null;
|
|
@@ -707,7 +763,7 @@ var remapEntity = /* @__PURE__ */ __name((database, entity, id, mappings) => {
|
|
|
707
763
|
database.prepare(`UPDATE ${TRANSFER_TABLES[entity.kind]} SET ${columns.join(",")} WHERE id=?`).run(...values, id);
|
|
708
764
|
}, "remapEntity");
|
|
709
765
|
|
|
710
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
766
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
|
|
711
767
|
var locations = /* @__PURE__ */ __name((options) => {
|
|
712
768
|
for (const value of [options.source, options.destination, options.collection])
|
|
713
769
|
if (typeof value !== "string" || !value.trim())
|
|
@@ -809,7 +865,7 @@ var applyWith = /* @__PURE__ */ __name(async (location, options) => {
|
|
|
809
865
|
}
|
|
810
866
|
}, "applyWith");
|
|
811
867
|
|
|
812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
868
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/health.js
|
|
813
869
|
import { existsSync, statSync as statSync2 } from "node:fs";
|
|
814
870
|
var JSON_COLUMNS = {
|
|
815
871
|
accounts: ["settings"],
|
|
@@ -951,7 +1007,7 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
|
|
|
951
1007
|
}
|
|
952
1008
|
}, "storeHealth");
|
|
953
1009
|
|
|
954
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1010
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
|
|
955
1011
|
var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
|
|
956
1012
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
957
1013
|
throw new CliError("validation_error", "project preview options are required");
|
|
@@ -977,7 +1033,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
|
|
|
977
1033
|
});
|
|
978
1034
|
}, "previewProjectAnnotationSnapshot");
|
|
979
1035
|
|
|
980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
|
|
981
1037
|
var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
982
1038
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
983
1039
|
throw new CliError("validation_error", "snapshot options are required");
|
|
@@ -999,7 +1055,8 @@ var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
|
999
1055
|
}, "snapshotProjectAnnotations");
|
|
1000
1056
|
|
|
1001
1057
|
export {
|
|
1002
|
-
|
|
1058
|
+
lossUnknown,
|
|
1059
|
+
storeDamageReport,
|
|
1003
1060
|
invalidJson,
|
|
1004
1061
|
QUICK_HEALTH_CHECKS,
|
|
1005
1062
|
fts5Tables,
|