@wirecat/zoom-cli 0.68.0 → 0.69.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/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-R66UM3HM.js → all-profiles-ZQWPCJEK.js} +7 -7
- package/dist/bundle/{answer-policy-UCGUO53A.js → answer-policy-VBDYLUXI.js} +52 -52
- package/dist/bundle/{anthropic-4ZI2BPLG.js → anthropic-7FUQ2HYJ.js} +3 -3
- package/dist/bundle/{app-server-64O5IQI5.js → app-server-DNPE2EQB.js} +46 -46
- package/dist/bundle/{bun-HUHQD76Z.js → bun-ZVQFCFCC.js} +2 -2
- package/dist/bundle/{bun-sqlite-VOVHPTIF.js → bun-sqlite-EB2UMUPJ.js} +2 -2
- package/dist/bundle/{chunk-EZRPSZJS.js → chunk-2SYWVIQJ.js} +1 -1
- package/dist/bundle/chunk-37B7A4RP.js +66 -0
- package/dist/bundle/{chunk-YJY3W2ZT.js → chunk-3TPRYZUW.js} +18 -15
- package/dist/bundle/{chunk-K67V24AT.js → chunk-4APZQYCH.js} +3 -3
- package/dist/bundle/{chunk-7QNJICKZ.js → chunk-52DCABMU.js} +23 -23
- package/dist/bundle/{chunk-KUB2U5NT.js → chunk-5GOE6PQK.js} +5 -5
- package/dist/bundle/{chunk-77KFLU5F.js → chunk-5H6VTEEC.js} +2 -2
- package/dist/bundle/{chunk-PIHBD3YS.js → chunk-5ZF6QVMC.js} +4 -4
- package/dist/bundle/{chunk-FMQS7HCC.js → chunk-5ZJXKASF.js} +249 -8
- package/dist/bundle/chunk-6AMMTXEA.js +12473 -0
- package/dist/bundle/{chunk-SRP6SFFD.js → chunk-6KMTQX3D.js} +1 -1
- package/dist/bundle/{chunk-2T6XHWDX.js → chunk-6N2D6JGX.js} +1 -1
- package/dist/bundle/{chunk-R7LFGEDE.js → chunk-6TICX3MN.js} +2 -2
- package/dist/bundle/{chunk-W42BJ65M.js → chunk-B5D7NZI7.js} +1 -1
- package/dist/bundle/{chunk-EWIBLDQQ.js → chunk-C6TEYKXV.js} +6 -6
- package/dist/bundle/{chunk-32FPA7P2.js → chunk-CKK6JOC4.js} +1 -1
- package/dist/bundle/{chunk-JRCYFCPL.js → chunk-CUZHKYC2.js} +19 -19
- package/dist/bundle/{chunk-355PHJYX.js → chunk-DHD25JII.js} +1 -1
- package/dist/bundle/{chunk-PUTGTW6W.js → chunk-EPPSMCEV.js} +1 -1
- package/dist/bundle/{chunk-AYEVBAGO.js → chunk-F5DYBWH7.js} +143 -22
- package/dist/bundle/{chunk-AJ7CMUGD.js → chunk-G6IX2MD2.js} +172 -143
- package/dist/bundle/{chunk-VLD7Y4SY.js → chunk-GR3QDHBU.js} +4 -4
- package/dist/bundle/{chunk-DGNPJGD3.js → chunk-GXDOTUUO.js} +8 -14
- package/dist/bundle/{chunk-5JAYUG3X.js → chunk-H3MFBYTQ.js} +2 -2
- package/dist/bundle/{chunk-TDGZMC6K.js → chunk-HC56J5LB.js} +57 -53
- package/dist/bundle/{chunk-4YFJYSSK.js → chunk-HSI7YOYK.js} +45 -29
- package/dist/bundle/{chunk-LYWUG43B.js → chunk-HW5QTRFF.js} +31 -31
- package/dist/bundle/{chunk-65T3PU75.js → chunk-IEC4E65G.js} +1 -1
- package/dist/bundle/{chunk-L4WVLRXM.js → chunk-IPBZKUC3.js} +3 -3
- package/dist/bundle/{chunk-TN3FH2GQ.js → chunk-JHFP3Z5S.js} +7 -7
- package/dist/bundle/{chunk-3BRV2YU2.js → chunk-JX5JJZC3.js} +2 -2
- package/dist/bundle/{chunk-YTF2WPV4.js → chunk-JZ4YOAHA.js} +679 -496
- package/dist/bundle/{chunk-474WF55M.js → chunk-KX5MZVPX.js} +38 -25
- package/dist/bundle/{chunk-TUNQ6NE2.js → chunk-L62EJDNZ.js} +2 -2
- package/dist/bundle/{chunk-6TJ62LZQ.js → chunk-LDRQ5NAP.js} +3 -3
- package/dist/bundle/{chunk-7DUYFITC.js → chunk-LEA4BGK7.js} +9 -9
- package/dist/bundle/{chunk-P2TISY3R.js → chunk-LQX74VKG.js} +1 -1
- package/dist/bundle/{chunk-RP3U3J53.js → chunk-MJMVIFSC.js} +6 -6
- package/dist/bundle/{chunk-A63ZFOQJ.js → chunk-MNOVYS43.js} +3 -3
- package/dist/bundle/{chunk-YQRNFG2E.js → chunk-MOTKS7XG.js} +7176 -13499
- package/dist/bundle/{chunk-6T3P226D.js → chunk-MSDCZ6GT.js} +4 -4
- package/dist/bundle/{chunk-DVA6MQWK.js → chunk-MVDPZRFE.js} +1 -1
- package/dist/bundle/{chunk-LBOSTBAY.js → chunk-O7L44JK2.js} +2031 -1900
- package/dist/bundle/{chunk-Y5LP5SHV.js → chunk-OSBHEM2A.js} +9 -9
- package/dist/bundle/{chunk-RRYUD2EF.js → chunk-QLGG7S6F.js} +2 -2
- package/dist/bundle/{chunk-ZRD3NDOX.js → chunk-QW5VPZEH.js} +1 -1
- package/dist/bundle/{chunk-LV7QRR5S.js → chunk-QXM7S3Y3.js} +5 -5
- package/dist/bundle/{chunk-US5C3WAY.js → chunk-R2ULMWB4.js} +27 -27
- package/dist/bundle/{chunk-QXTREL2M.js → chunk-R3JYPY3J.js} +2 -2
- package/dist/bundle/{chunk-JO4YADNV.js → chunk-RPQ3JOD3.js} +3 -3
- package/dist/bundle/{chunk-4TLPOY22.js → chunk-S2EAGDS7.js} +10 -10
- package/dist/bundle/{chunk-SSPSNSC5.js → chunk-SQT47CFW.js} +1 -1
- package/dist/bundle/{chunk-HXOAPH47.js → chunk-SZ3Z4ZNO.js} +1 -1
- package/dist/bundle/{chunk-DWSUSWAX.js → chunk-T5X4LGXE.js} +130 -11
- package/dist/bundle/{chunk-2OSBCYJT.js → chunk-TFFEFEG2.js} +16 -16
- package/dist/bundle/{chunk-EH5QGQFR.js → chunk-TKXLWFM2.js} +2 -2
- package/dist/bundle/{chunk-AVEIQMHZ.js → chunk-TN77LX6W.js} +1 -1
- package/dist/bundle/{chunk-77I67HWF.js → chunk-TWIC6JJG.js} +7 -7
- package/dist/bundle/{chunk-TZUKDM72.js → chunk-UEZ6URJR.js} +10 -10
- package/dist/bundle/{chunk-EJDV5IIF.js → chunk-V4MM6GST.js} +1 -1
- package/dist/bundle/{chunk-BSM43OMN.js → chunk-V74QFMSL.js} +1 -1
- package/dist/bundle/{chunk-6CJ7NHIP.js → chunk-WY4NYPPS.js} +12 -12
- package/dist/bundle/{chunk-FNQASORM.js → chunk-XITUFTON.js} +1 -1
- package/dist/bundle/{chunk-GOXDBCDM.js → chunk-XJBYGMZ4.js} +107 -63
- package/dist/bundle/{chunk-UU5PLDRA.js → chunk-XRZDYWF6.js} +2 -2
- package/dist/bundle/{chunk-6XO7RTJY.js → chunk-Z6TTGTMU.js} +92 -5
- package/dist/bundle/{chunk-UDJTRFRV.js → chunk-ZRHMB3LQ.js} +1 -1
- package/dist/bundle/{cli-VQJ7ZRYR.js → cli-P3BZUE6S.js} +67 -53
- package/dist/bundle/command-contract-TOLB32NJ.js +41 -0
- package/dist/bundle/config-4KLLIADY.js +90 -0
- package/dist/bundle/{decode-L3ENO2XH.js → decode-QWOQXM7M.js} +2 -2
- package/dist/bundle/{dist-WQLS7U23.js → dist-OUE4MF37.js} +79 -19
- package/dist/bundle/{echarts-5LLJ6JXC.js → echarts-65IMPY43.js} +2 -2
- package/dist/bundle/{embed-37MYTCU7.js → embed-4IULBCKL.js} +3 -3
- package/dist/bundle/{embedder-GNGHVJAO.js → embedder-JW4W6IZI.js} +6 -6
- package/dist/bundle/{first-run-NR5JKYP3.js → first-run-CH6C674R.js} +5 -5
- package/dist/bundle/first-screen-OCAW5ZN6.js +39 -0
- package/dist/bundle/{instructions-P72XX4AK.js → instructions-G5QIH2TM.js} +1 -1
- package/dist/bundle/{main-QYFCYSTW.js → main-O4ZJIEWP.js} +12 -12
- package/dist/bundle/{meetings-66UQINKI.js → meetings-77CCAVYD.js} +1 -1
- package/dist/bundle/{node-ZB4RNICS.js → node-E6VQHU4Y.js} +2 -2
- package/dist/bundle/{node-sqlite-XPRKBDF3.js → node-sqlite-RJZ4PGLD.js} +3 -3
- package/dist/bundle/{oauth-WJRDUU5J.js → oauth-F4JKNRW4.js} +4 -4
- package/dist/bundle/{open-S2YSIEOW.js → open-NYOGMIAA.js} +2 -2
- package/dist/bundle/{openai-CRNZFNZD.js → openai-5U6EQTFQ.js} +8 -8
- package/dist/bundle/{process-XNN4WG6N.js → process-OBWUKBMX.js} +1 -1
- package/dist/bundle/{program-BRPJKRCX.js → program-MU7DEJTO.js} +61 -61
- package/dist/bundle/{prompt-7RQOL25I.js → prompt-2QWQTHWT.js} +2 -2
- package/dist/bundle/{recognize-N5WADGQB.js → recognize-SNUNTUC3.js} +1 -1
- package/dist/bundle/{remote-WHYV35IF.js → remote-2CTCIQGF.js} +4 -4
- package/dist/bundle/{rerank-FBMZVWSH.js → rerank-XDA7NJNH.js} +4 -4
- package/dist/bundle/{run-log-TOCHREH2.js → run-log-NSG3DJVX.js} +50 -50
- package/dist/bundle/{serve-4BABX4WS.js → serve-TWQFHOV2.js} +6 -6
- package/dist/bundle/{server-CDVI6LOB.js → server-RIQ6HMH2.js} +38 -38
- package/dist/bundle/server-XO6XQQTJ.js +72 -0
- package/dist/bundle/{services-PIY33I7R.js → services-NKZQJQIV.js} +30 -24
- package/dist/bundle/{speech-LS5Q4FL2.js → speech-ZOB76SXA.js} +10 -10
- package/dist/bundle/{state-YUX5R2R7.js → state-7YYEIXQ5.js} +3 -3
- package/dist/bundle/{store-BD7HAXAA.js → store-E6RTSSNR.js} +21 -12
- package/dist/bundle/{store-ERMGBF2B.js → store-OX4HRBLO.js} +45 -14
- package/dist/bundle/store-connection-55QPNUDS.js +83 -0
- package/dist/bundle/store-maintenance-command-Q5MSU6OK.js +62 -0
- package/dist/bundle/zm.js +2 -2
- package/dist/bundle/{zoom-app-XJXZ4ZBX.js → zoom-app-TSI2MGVK.js} +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/chunk-NUJMJQXV.js +0 -787
- package/dist/bundle/chunk-YOAEZSDG.js +0 -22
- package/dist/bundle/command-contract-JPUWWYIV.js +0 -41
- package/dist/bundle/config-YGLLR77A.js +0 -90
- package/dist/bundle/first-screen-RCR7ATO2.js +0 -39
- package/dist/bundle/server-XOFQKFVO.js +0 -72
- package/dist/bundle/store-connection-JBR6CMTJ.js +0 -83
- package/dist/bundle/store-maintenance-command-I5DUSO2C.js +0 -62
|
@@ -2,11 +2,11 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
renderMessages
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XITUFTON.js";
|
|
6
6
|
import {
|
|
7
7
|
answerOf,
|
|
8
8
|
messengerContext
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-R2ULMWB4.js";
|
|
10
10
|
import {
|
|
11
11
|
chatEventAnswer,
|
|
12
12
|
memberAnswer,
|
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
serveRelay,
|
|
16
16
|
typedQuery,
|
|
17
17
|
withQuery
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TFFEFEG2.js";
|
|
19
19
|
import {
|
|
20
20
|
holdLock,
|
|
21
21
|
lockPath,
|
|
22
22
|
releaseLock,
|
|
23
23
|
servingProfiles,
|
|
24
24
|
takeLock
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-TKXLWFM2.js";
|
|
26
26
|
import {
|
|
27
27
|
FETCHING,
|
|
28
28
|
RULES_VERSION,
|
|
@@ -36,14 +36,14 @@ import {
|
|
|
36
36
|
servicesFor,
|
|
37
37
|
syncsOneChat,
|
|
38
38
|
withTimeLimit
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-JZ4YOAHA.js";
|
|
40
40
|
import {
|
|
41
41
|
QUICK_HEALTH_CHECKS,
|
|
42
42
|
explainDamage,
|
|
43
43
|
fts5Tables,
|
|
44
44
|
invalidJson,
|
|
45
45
|
storeHealth
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-HSI7YOYK.js";
|
|
47
47
|
import {
|
|
48
48
|
Command,
|
|
49
49
|
LOCAL_READ,
|
|
@@ -67,24 +67,21 @@ import {
|
|
|
67
67
|
snakeKeys,
|
|
68
68
|
storeTable,
|
|
69
69
|
withoutProviderRefs
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-G6IX2MD2.js";
|
|
71
71
|
import {
|
|
72
72
|
envName
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-TN77LX6W.js";
|
|
74
74
|
import {
|
|
75
75
|
holdersOf
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-MVDPZRFE.js";
|
|
77
77
|
import {
|
|
78
78
|
codeOf,
|
|
79
79
|
currentRun,
|
|
80
80
|
parseDuration
|
|
81
|
-
} from "./chunk-
|
|
82
|
-
import {
|
|
83
|
-
failureKey
|
|
84
|
-
} from "./chunk-YOAEZSDG.js";
|
|
81
|
+
} from "./chunk-CUZHKYC2.js";
|
|
85
82
|
import {
|
|
86
83
|
levelFor
|
|
87
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-IEC4E65G.js";
|
|
88
85
|
import {
|
|
89
86
|
CORPORA,
|
|
90
87
|
MIGRATIONS,
|
|
@@ -118,29 +115,38 @@ import {
|
|
|
118
115
|
storeClients,
|
|
119
116
|
storeContents,
|
|
120
117
|
vectorIndexCounts
|
|
121
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-MOTKS7XG.js";
|
|
122
119
|
import {
|
|
123
120
|
formatLocator,
|
|
124
121
|
parseLocator
|
|
125
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-6AMMTXEA.js";
|
|
123
|
+
import {
|
|
124
|
+
readDamageMark,
|
|
125
|
+
readHealthMark,
|
|
126
|
+
recordDeepCheck
|
|
127
|
+
} from "./chunk-T5X4LGXE.js";
|
|
128
|
+
import {
|
|
129
|
+
failureKey,
|
|
130
|
+
isStoreDamage
|
|
131
|
+
} from "./chunk-37B7A4RP.js";
|
|
126
132
|
import {
|
|
127
133
|
readSecret
|
|
128
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-QLGG7S6F.js";
|
|
129
135
|
import {
|
|
130
136
|
checkedOptions,
|
|
131
137
|
range
|
|
132
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-2SYWVIQJ.js";
|
|
133
139
|
import {
|
|
134
140
|
messagesFor,
|
|
135
141
|
systemFor,
|
|
136
142
|
validateImages
|
|
137
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-QW5VPZEH.js";
|
|
138
144
|
import {
|
|
139
145
|
storePath
|
|
140
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-CKK6JOC4.js";
|
|
141
147
|
import {
|
|
142
148
|
openCache
|
|
143
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-QXM7S3Y3.js";
|
|
144
150
|
import {
|
|
145
151
|
queryFieldsOf
|
|
146
152
|
} from "./chunk-B6JMVB6R.js";
|
|
@@ -5516,11 +5522,11 @@ var require_liquid_node = __commonJS({
|
|
|
5516
5522
|
}
|
|
5517
5523
|
});
|
|
5518
5524
|
|
|
5519
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
5520
5526
|
import { chmodSync, constants, copyFileSync, existsSync as existsSync9, mkdirSync, realpathSync as realpathSync2, renameSync as renameSync3, rmSync as rmSync3, statfsSync as statfsSync2, statSync as statSync4, writeFileSync as writeFileSync2 } from "node:fs";
|
|
5521
5527
|
import { dirname as dirname2, resolve } from "node:path";
|
|
5522
5528
|
|
|
5523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5529
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/sealed.js
|
|
5524
5530
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
5525
5531
|
import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
|
|
5526
5532
|
import { Transform } from "node:stream";
|
|
@@ -5627,7 +5633,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
|
|
|
5627
5633
|
renameSync(pending, to);
|
|
5628
5634
|
}, "unsealFile");
|
|
5629
5635
|
|
|
5630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/compatibility.js
|
|
5631
5637
|
var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
|
|
5632
5638
|
var fileSchemaOf = /* @__PURE__ */ __name((database) => {
|
|
5633
5639
|
const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
|
|
@@ -5651,7 +5657,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
|
|
|
5651
5657
|
};
|
|
5652
5658
|
}, "compatibilityOf");
|
|
5653
5659
|
|
|
5654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5660
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/repair.js
|
|
5655
5661
|
import { createHash as createHash2 } from "node:crypto";
|
|
5656
5662
|
var COPY_MARK = "__repair_";
|
|
5657
5663
|
var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
|
|
@@ -5905,13 +5911,13 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
|
|
|
5905
5911
|
return found;
|
|
5906
5912
|
}, "deleteCopy");
|
|
5907
5913
|
|
|
5908
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
5909
5915
|
import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
|
|
5910
5916
|
|
|
5911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
5912
5918
|
import { existsSync as existsSync3 } from "node:fs";
|
|
5913
5919
|
|
|
5914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5920
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
5915
5921
|
import { execFileSync, spawn } from "node:child_process";
|
|
5916
5922
|
import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
|
|
5917
5923
|
import { basename, dirname, join } from "node:path";
|
|
@@ -6209,7 +6215,14 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6209
6215
|
}, "stopWatching");
|
|
6210
6216
|
try {
|
|
6211
6217
|
const dataVersion = /* @__PURE__ */ __name(() => Number(watch.prepare("PRAGMA data_version").get()?.data_version), "dataVersion");
|
|
6212
|
-
|
|
6218
|
+
let rowsBefore;
|
|
6219
|
+
try {
|
|
6220
|
+
rowsBefore = tableRows(watch);
|
|
6221
|
+
} catch (error) {
|
|
6222
|
+
if (!isStoreDamage(error))
|
|
6223
|
+
throw error;
|
|
6224
|
+
throw new CliError("configuration_error", "the store file's header or schema is damaged, so its tables cannot be listed and it cannot be recovered; the file was left as it was", { reason: "store.unreadable" });
|
|
6225
|
+
}
|
|
6213
6226
|
const before = { data: dataVersion(), inode: statSync2(path).ino };
|
|
6214
6227
|
const stamp = new Date(now()).toISOString().replace(/[:.]/g, "-");
|
|
6215
6228
|
const target = `${path}.recovering-${stamp}`;
|
|
@@ -6237,6 +6250,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6237
6250
|
let dangling;
|
|
6238
6251
|
let json;
|
|
6239
6252
|
let fetch2;
|
|
6253
|
+
let schema;
|
|
6240
6254
|
try {
|
|
6241
6255
|
kept = tableRows(opened.database);
|
|
6242
6256
|
migrate(opened.database, { command, ...version ? { version } : {} });
|
|
@@ -6246,6 +6260,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6246
6260
|
note("looking for rows that point at rows that were lost");
|
|
6247
6261
|
dangling = danglingRows(opened.database);
|
|
6248
6262
|
fetch2 = mailToFetch(opened.database);
|
|
6263
|
+
schema = fileSchemaOf(opened.database).version;
|
|
6249
6264
|
opened.database.exec("PRAGMA wal_checkpoint(TRUNCATE)");
|
|
6250
6265
|
} catch (error) {
|
|
6251
6266
|
opened.database.close();
|
|
@@ -6273,6 +6288,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6273
6288
|
for (const suffix of STORE_PARTS)
|
|
6274
6289
|
if (existsSync2(`${target}${suffix}`))
|
|
6275
6290
|
renameSync2(`${target}${suffix}`, `${path}${suffix}`);
|
|
6291
|
+
recordDeepCheck(path, health, { cli: command, ...version ? { version } : {}, schema, now });
|
|
6276
6292
|
const lost = Object.entries(rowsBefore).map(([table, before2]) => ({ table, before: before2, read: read[table] ?? 0, kept: kept[table] ?? 0 })).filter(({ before: before2, read: read2, kept: kept2 }) => before2 === null || before2 > kept2 || read2 > kept2);
|
|
6277
6293
|
const seconds = /* @__PURE__ */ __name((from, to) => Math.round((to - from) / 100) / 10, "seconds");
|
|
6278
6294
|
return {
|
|
@@ -6298,7 +6314,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6298
6314
|
}
|
|
6299
6315
|
}, "recoverLocked");
|
|
6300
6316
|
|
|
6301
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
6302
6318
|
var COUNTED = [
|
|
6303
6319
|
"accounts",
|
|
6304
6320
|
"chats",
|
|
@@ -6313,15 +6329,17 @@ var COUNTED = [
|
|
|
6313
6329
|
"mentions"
|
|
6314
6330
|
];
|
|
6315
6331
|
var stopTimers = /* @__PURE__ */ __name((timers) => `systemctl --user stop ${timers.join(" ")}`, "stopTimers");
|
|
6316
|
-
var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command) => {
|
|
6332
|
+
var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) => {
|
|
6317
6333
|
const path = storePath(env);
|
|
6318
6334
|
if (!existsSync3(path))
|
|
6319
6335
|
return { path, exists: false, ok: true, next: [] };
|
|
6320
6336
|
const health = await storeHealth(path, { deep: true });
|
|
6321
6337
|
let rows = {};
|
|
6338
|
+
let schema = null;
|
|
6322
6339
|
try {
|
|
6323
6340
|
const { database } = await openSqlite(path, { readOnly: true });
|
|
6324
6341
|
try {
|
|
6342
|
+
schema = fileSchemaOf(database).version;
|
|
6325
6343
|
const all = tableRows(database);
|
|
6326
6344
|
rows = Object.fromEntries(COUNTED.filter((table) => table in all).map((table) => [table, all[table] ?? null]));
|
|
6327
6345
|
} finally {
|
|
@@ -6329,7 +6347,9 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command) => {
|
|
|
6329
6347
|
}
|
|
6330
6348
|
} catch {
|
|
6331
6349
|
}
|
|
6332
|
-
|
|
6350
|
+
recordDeepCheck(path, health, { cli: command, ...version ? { version } : {}, schema });
|
|
6351
|
+
const mark = readDamageMark(path);
|
|
6352
|
+
const explanation = explainDamage(health, command, mark);
|
|
6333
6353
|
const inUse = storeHolders(path) ?? null;
|
|
6334
6354
|
const timers = activeTimers() ?? null;
|
|
6335
6355
|
const sqlite3 = sqlite3Program();
|
|
@@ -6350,6 +6370,8 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command) => {
|
|
|
6350
6370
|
invalidJson: health.invalidJson ?? [],
|
|
6351
6371
|
rows,
|
|
6352
6372
|
explanation,
|
|
6373
|
+
damageMark: mark ? (({ inode: _, ...seen }) => seen)(mark) : null,
|
|
6374
|
+
lastKnownGood: readHealthMark(path)?.last_ok_at ?? null,
|
|
6353
6375
|
inUse,
|
|
6354
6376
|
timers,
|
|
6355
6377
|
sqlite3: { version: sqlite3.version, usable: sqlite3.usable },
|
|
@@ -6397,13 +6419,14 @@ var recoveryNotes = /* @__PURE__ */ __name((answer) => {
|
|
|
6397
6419
|
const why = answer.explanation;
|
|
6398
6420
|
return [
|
|
6399
6421
|
...why ? [why.what, ...why.impact, why.externalUnaffected] : [],
|
|
6422
|
+
answer.lastKnownGood ? `the store last passed a deep check at ${answer.lastKnownGood}` : "no deep check that passed is on record for this store",
|
|
6400
6423
|
...answer.next.map((line) => `next: ${line}`)
|
|
6401
6424
|
];
|
|
6402
6425
|
}, "recoveryNotes");
|
|
6403
6426
|
var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
|
|
6404
6427
|
const recover = annotate(new Command("recover"), { effects: LOCAL_READ, examples: [`${command} store recover`] }).summary("what is damaged in the store and how to recover it").description("check every page and search index of the store, say what is damaged, what it means and the commands that recover it; changes nothing").action(async function() {
|
|
6405
6428
|
const output = outputFor(this);
|
|
6406
|
-
const answer = await storeRecoveryCheck(environmentOf(this).env ?? process.env, command);
|
|
6429
|
+
const answer = await storeRecoveryCheck(environmentOf(this).env ?? process.env, command, version);
|
|
6407
6430
|
renderAnswer(this, output, itemOf(snakeKeys(answer)));
|
|
6408
6431
|
if (output.format === "pretty")
|
|
6409
6432
|
for (const line of recoveryNotes(answer))
|
|
@@ -6424,7 +6447,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
|
|
|
6424
6447
|
return recover;
|
|
6425
6448
|
}, "storeRecoverCommand");
|
|
6426
6449
|
|
|
6427
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
6428
6451
|
var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
|
|
6429
6452
|
var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
|
|
6430
6453
|
var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
|
|
@@ -6474,7 +6497,7 @@ var sharedStoreCommand = /* @__PURE__ */ __name((app) => {
|
|
|
6474
6497
|
return app ? store.addCommand(storeRecoverCommand(app)) : store;
|
|
6475
6498
|
}, "sharedStoreCommand");
|
|
6476
6499
|
|
|
6477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
|
|
6478
6501
|
var ENCRYPT_OPTION = [
|
|
6479
6502
|
"--encrypt",
|
|
6480
6503
|
"compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept \u2014 lose it and the file cannot be opened"
|
|
@@ -6493,7 +6516,7 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
|
|
|
6493
6516
|
return password;
|
|
6494
6517
|
}, "passwordOf");
|
|
6495
6518
|
|
|
6496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/replies/rules.js
|
|
6497
6520
|
import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
|
|
6498
6521
|
import { join as join2 } from "node:path";
|
|
6499
6522
|
var REPLY_ACTIONS = ["reply", "task"];
|
|
@@ -6664,7 +6687,7 @@ var problem = /* @__PURE__ */ __name((issue) => {
|
|
|
6664
6687
|
}, "problem");
|
|
6665
6688
|
var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
|
|
6666
6689
|
|
|
6667
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6690
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/replies/state.js
|
|
6668
6691
|
import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
|
|
6669
6692
|
import { join as join3 } from "node:path";
|
|
6670
6693
|
var ANSWERED_KEPT = 1e3;
|
|
@@ -6717,7 +6740,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
|
|
|
6717
6740
|
}, "recordReply");
|
|
6718
6741
|
var broken2 = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply state ${path} cannot be read (${why}) \u2014 fix or move the file`), "broken");
|
|
6719
6742
|
|
|
6720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6743
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/replies/decide.js
|
|
6721
6744
|
var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
|
|
6722
6745
|
var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
|
|
6723
6746
|
const { message, chat, owner, sender } = incoming;
|
|
@@ -6823,7 +6846,7 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
|
|
|
6823
6846
|
return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
|
|
6824
6847
|
}, "filled");
|
|
6825
6848
|
|
|
6826
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
6827
6850
|
var import_liquidjs = __toESM(require_liquid_node(), 1);
|
|
6828
6851
|
var TEMPLATE_LIMITS = {
|
|
6829
6852
|
parse: 32768,
|
|
@@ -6983,7 +7006,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
6983
7006
|
}
|
|
6984
7007
|
}, "renderReplyTemplate");
|
|
6985
7008
|
|
|
6986
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
|
|
6987
7010
|
var DRY_RUN_DAYS = 7;
|
|
6988
7011
|
var PAGE = 500;
|
|
6989
7012
|
var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
|
|
@@ -7097,7 +7120,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
|
|
|
7097
7120
|
}
|
|
7098
7121
|
}, "storedSince");
|
|
7099
7122
|
|
|
7100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/embeddings/keys.js
|
|
7101
7124
|
var endpointKeyName = /* @__PURE__ */ __name((baseUrl) => {
|
|
7102
7125
|
const host = new URL(baseUrl).host;
|
|
7103
7126
|
return ["openai", "anthropic"].includes(host) ? `endpoint:${host}` : host;
|
|
@@ -7128,7 +7151,7 @@ var embeddingKeys = /* @__PURE__ */ __name((app, env = process.env, keyring) =>
|
|
|
7128
7151
|
};
|
|
7129
7152
|
}, "embeddingKeys");
|
|
7130
7153
|
|
|
7131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7154
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/models/openai.js
|
|
7132
7155
|
var options = strictObject({
|
|
7133
7156
|
temperature: range(0, 2),
|
|
7134
7157
|
top_p: range(0, 1),
|
|
@@ -7177,7 +7200,7 @@ var openai = {
|
|
|
7177
7200
|
}), "complete")
|
|
7178
7201
|
};
|
|
7179
7202
|
|
|
7180
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/models/index.js
|
|
7181
7204
|
var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
7182
7205
|
complete: /* @__PURE__ */ __name(async (request) => {
|
|
7183
7206
|
if (deps.signal?.aborted)
|
|
@@ -7192,7 +7215,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
7192
7215
|
if (!adapter && target.provider === "openai")
|
|
7193
7216
|
adapter = openai;
|
|
7194
7217
|
if (!adapter && target.provider === "anthropic")
|
|
7195
|
-
adapter = (await import("./anthropic-
|
|
7218
|
+
adapter = (await import("./anthropic-7FUQ2HYJ.js")).anthropic;
|
|
7196
7219
|
if (!adapter)
|
|
7197
7220
|
throw new CliError("validation_error", `no model adapter for ${target.provider}`);
|
|
7198
7221
|
if (request.images !== void 0 && adapter.images !== true)
|
|
@@ -7233,7 +7256,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
7233
7256
|
}, "complete")
|
|
7234
7257
|
}), "modelGateway");
|
|
7235
7258
|
|
|
7236
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7259
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/replies/consents.js
|
|
7237
7260
|
import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
|
|
7238
7261
|
import { join as join4 } from "node:path";
|
|
7239
7262
|
var shape = strictObject({
|
|
@@ -7258,7 +7281,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
|
|
|
7258
7281
|
return consent.provider === provider && !consent.deniedChats.includes(chat);
|
|
7259
7282
|
}, "mayModelReply");
|
|
7260
7283
|
|
|
7261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/replies/rendering.js
|
|
7262
7285
|
var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options2 = {
|
|
7263
7286
|
ai: true
|
|
7264
7287
|
}) => async (rule2, message, chat, now) => {
|
|
@@ -7305,7 +7328,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
|
|
|
7305
7328
|
return result2;
|
|
7306
7329
|
}, "replyRenderer");
|
|
7307
7330
|
|
|
7308
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7331
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/replies/serve.js
|
|
7309
7332
|
var NOT_ALLOWED = "replies.send is not allow";
|
|
7310
7333
|
var NO_RULES = "no rules";
|
|
7311
7334
|
var ONLY_TASK = "opened a task, sent nothing";
|
|
@@ -7398,7 +7421,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
|
|
|
7398
7421
|
return { skip: why };
|
|
7399
7422
|
}, "replyTo");
|
|
7400
7423
|
|
|
7401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
|
|
7402
7425
|
var START_SYNC_DELAY_MS = 3e4;
|
|
7403
7426
|
var START_SYNC_BUDGET_MS = 5 * 6e4;
|
|
7404
7427
|
var START_SYNC_WINDOW_MS = 7 * 864e5;
|
|
@@ -7475,7 +7498,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch: fetch2, note
|
|
|
7475
7498
|
};
|
|
7476
7499
|
}, "startSync");
|
|
7477
7500
|
|
|
7478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
|
|
7479
7502
|
var FIRST_FETCH_MS = 6e4;
|
|
7480
7503
|
var DAY_MS = 864e5;
|
|
7481
7504
|
var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch: fetch2, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
|
|
@@ -7529,7 +7552,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch: fetch2, warn, fi
|
|
|
7529
7552
|
};
|
|
7530
7553
|
}, "memberFetches");
|
|
7531
7554
|
|
|
7532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7555
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
|
|
7533
7556
|
var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
|
|
7534
7557
|
var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
|
|
7535
7558
|
if (context.format === "pretty") {
|
|
@@ -7562,7 +7585,7 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
|
|
|
7562
7585
|
return context;
|
|
7563
7586
|
}, "recordDiagnostics");
|
|
7564
7587
|
|
|
7565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7588
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
|
|
7566
7589
|
var STEMS_EVERY_MS = 3e4;
|
|
7567
7590
|
var STEMS_SLICE_MS = 2e3;
|
|
7568
7591
|
var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
|
|
@@ -7602,7 +7625,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
|
|
|
7602
7625
|
};
|
|
7603
7626
|
}, "stemFills");
|
|
7604
7627
|
|
|
7605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7628
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
|
|
7606
7629
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
|
|
7607
7630
|
var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
7608
7631
|
kind: attachment.kind,
|
|
@@ -7697,7 +7720,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
|
|
|
7697
7720
|
locale: messenger.app.locale
|
|
7698
7721
|
}), "viewOf");
|
|
7699
7722
|
|
|
7700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7723
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
|
|
7701
7724
|
var observed = /* @__PURE__ */ __name((value) => ({
|
|
7702
7725
|
value: value.value,
|
|
7703
7726
|
observed_at: value.observedAt,
|
|
@@ -7764,7 +7787,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
|
|
|
7764
7787
|
}
|
|
7765
7788
|
}, "watchEventItem");
|
|
7766
7789
|
|
|
7767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7790
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
|
|
7768
7791
|
var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
|
|
7769
7792
|
output: { entity: "watch_item" },
|
|
7770
7793
|
effects: REMOTE_READ,
|
|
@@ -7919,7 +7942,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
|
|
|
7919
7942
|
}
|
|
7920
7943
|
}, "describe");
|
|
7921
7944
|
|
|
7922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7945
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
|
|
7923
7946
|
var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
7924
7947
|
const command = annotate(new Command("serve"), {
|
|
7925
7948
|
output: { entity: "serve_summary" },
|
|
@@ -8183,7 +8206,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
|
|
|
8183
8206
|
};
|
|
8184
8207
|
}, "tasking");
|
|
8185
8208
|
|
|
8186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8209
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
|
|
8187
8210
|
import { existsSync as existsSync8 } from "node:fs";
|
|
8188
8211
|
var PATH = "store tables list";
|
|
8189
8212
|
var STORE_TABLES_QUERY = {
|
|
@@ -8226,7 +8249,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((messenger) => {
|
|
|
8226
8249
|
return tables;
|
|
8227
8250
|
}, "storeTablesCommand");
|
|
8228
8251
|
|
|
8229
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
8230
8253
|
var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
|
|
8231
8254
|
var WORD_INDEX = "message_words";
|
|
8232
8255
|
var schemaOf = /* @__PURE__ */ __name((database) => {
|
|
@@ -8252,11 +8275,26 @@ var readingOnly = /* @__PURE__ */ __name(async (path, read) => {
|
|
|
8252
8275
|
database.close();
|
|
8253
8276
|
}
|
|
8254
8277
|
}, "readingOnly");
|
|
8255
|
-
var
|
|
8278
|
+
var withoutInode = /* @__PURE__ */ __name(({ inode: _, ...mark }) => mark, "withoutInode");
|
|
8279
|
+
var fileSchema = /* @__PURE__ */ __name(async (path) => {
|
|
8280
|
+
try {
|
|
8281
|
+
return await readingOnly(path, (database) => fileSchemaOf(database).version);
|
|
8282
|
+
} catch {
|
|
8283
|
+
return null;
|
|
8284
|
+
}
|
|
8285
|
+
}, "fileSchema");
|
|
8286
|
+
var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, version } = {}) => {
|
|
8256
8287
|
const path = storePath(env);
|
|
8257
8288
|
if (!existsSync9(path))
|
|
8258
8289
|
return { path, exists: false };
|
|
8259
8290
|
const checked = await storeHealth(path, { deep });
|
|
8291
|
+
const recorded = deep ? recordDeepCheck(path, checked, {
|
|
8292
|
+
cli: command ?? "unknown",
|
|
8293
|
+
...version ? { version } : {},
|
|
8294
|
+
schema: await fileSchema(path)
|
|
8295
|
+
}) : null;
|
|
8296
|
+
const mark = readDamageMark(path);
|
|
8297
|
+
const lastKnownGood = readHealthMark(path)?.last_ok_at ?? null;
|
|
8260
8298
|
const health = {
|
|
8261
8299
|
checked: checked.checked,
|
|
8262
8300
|
covers: deep ? "every page and every search index" : QUICK_HEALTH_CHECKS,
|
|
@@ -8267,18 +8305,24 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command }
|
|
|
8267
8305
|
...checked.invalidJson?.length ? { invalidJson: checked.invalidJson } : {},
|
|
8268
8306
|
...checked.searchIndexes?.some((index) => !index.ok) ? { damagedSearchIndexes: checked.searchIndexes.filter((index) => !index.ok).map((index) => index.name) } : {}
|
|
8269
8307
|
};
|
|
8270
|
-
const damage = command ? explainDamage(checked, command) : null;
|
|
8271
|
-
const healthOf = {
|
|
8308
|
+
const damage = command ? explainDamage(checked, command, mark) : null;
|
|
8309
|
+
const healthOf = {
|
|
8310
|
+
health,
|
|
8311
|
+
lastKnownGood,
|
|
8312
|
+
...mark ? { damageMark: withoutInode(mark) } : {},
|
|
8313
|
+
...recorded?.cleared ? { damageMarkCleared: withoutInode(recorded.cleared) } : {},
|
|
8314
|
+
...damage ? { damage } : {}
|
|
8315
|
+
};
|
|
8272
8316
|
try {
|
|
8273
8317
|
return await reading(path, (database) => {
|
|
8274
|
-
const { version, writable } = schemaOf(database);
|
|
8318
|
+
const { version: version2, writable } = schemaOf(database);
|
|
8275
8319
|
return {
|
|
8276
8320
|
path,
|
|
8277
8321
|
exists: true,
|
|
8278
|
-
schema:
|
|
8322
|
+
schema: version2,
|
|
8279
8323
|
speaks: SPEAKS,
|
|
8280
8324
|
writable,
|
|
8281
|
-
...
|
|
8325
|
+
...version2 > 0 ? { chats: count2(database, "chats"), messages: count2(database, "messages") } : {},
|
|
8282
8326
|
...healthOf
|
|
8283
8327
|
};
|
|
8284
8328
|
});
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
agentOf,
|
|
30
30
|
clientHash,
|
|
31
31
|
currentCaller
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-MJMVIFSC.js";
|
|
33
33
|
import {
|
|
34
34
|
__name
|
|
35
35
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -541,7 +541,7 @@ function toError(value) {
|
|
|
541
541
|
}
|
|
542
542
|
__name(toError, "toError");
|
|
543
543
|
|
|
544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/mcp/caller.js
|
|
545
545
|
var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
|
|
546
546
|
const client = caller?.agent?.client?.name;
|
|
547
547
|
if (client && client !== "unknown")
|