@wirecat/tg-cli 0.119.0 → 0.121.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 +27 -3
- package/dist/bin/tg.js +2 -2
- package/dist/bundle/{adapter-NEQQOANM.js → adapter-GVSBFSBY.js} +62 -58
- package/dist/bundle/{all-profiles-QFT46FTF.js → all-profiles-CTOGU4XR.js} +10 -10
- package/dist/bundle/{anthropic-UJ4RYCWU.js → anthropic-7472H6ES.js} +16 -7
- package/dist/bundle/{app-server-NE3EL5IK.js → app-server-GZWV4NPR.js} +47 -46
- package/dist/bundle/{bot-api-D4H5SCP5.js → bot-api-PPVAKICN.js} +53 -50
- package/dist/bundle/{bot-history-KF2PUMWA.js → bot-history-7YY7MCR4.js} +18 -18
- package/dist/bundle/{bun-F7MH5YKA.js → bun-KCN62RMD.js} +2 -2
- package/dist/bundle/{bun-sqlite-FYDJXUHF.js → bun-sqlite-2BNE56MY.js} +5 -5
- package/dist/bundle/{chunk-23JGV5FQ.js → chunk-24DWSW6H.js} +37 -122
- package/dist/bundle/{chunk-6ERQJRL2.js → chunk-3E35VJME.js} +2 -2
- package/dist/bundle/{chunk-CX2WCEQU.js → chunk-3EGVR7OF.js} +1795 -545
- package/dist/bundle/{chunk-RGU2G3KL.js → chunk-3HNI6GI7.js} +4 -4
- package/dist/bundle/{chunk-RUNFFBJU.js → chunk-4HJCWFPN.js} +119 -107
- package/dist/bundle/{chunk-7C6POLLO.js → chunk-4J34T6IQ.js} +1 -1
- package/dist/bundle/{chunk-QG5U6HCI.js → chunk-4W4EVVL4.js} +4 -4
- package/dist/bundle/{chunk-6K5R3YPN.js → chunk-54KFRAHF.js} +2 -2
- package/dist/bundle/{chunk-ROOUBFUW.js → chunk-5P43K3GL.js} +18950 -17132
- package/dist/bundle/{chunk-OG2CG2GS.js → chunk-6LRKWXCS.js} +17 -17
- package/dist/bundle/{chunk-QD27C3BG.js → chunk-6SQAE7NM.js} +10 -8
- package/dist/bundle/{chunk-IAGX5VFL.js → chunk-7DPWVKYS.js} +4 -4
- package/dist/bundle/{chunk-5EHJWIW4.js → chunk-7I6YVQHW.js} +2 -2
- package/dist/bundle/{chunk-ZEQ7ONPZ.js → chunk-7MXRFFIT.js} +3 -3
- package/dist/bundle/{chunk-3K65KTXD.js → chunk-7UIMMQOV.js} +2 -2
- package/dist/bundle/{chunk-7VUNJDYU.js → chunk-AYDLA27G.js} +4 -4
- package/dist/bundle/{chunk-TKHEVAEG.js → chunk-BJTJBNR7.js} +8 -8
- package/dist/bundle/{chunk-HPQQ76WF.js → chunk-CLMRF6XR.js} +3 -3
- package/dist/bundle/{chunk-D6YTBJY6.js → chunk-CMEWPXKU.js} +1 -1
- package/dist/bundle/{chunk-DQELQ7BL.js → chunk-CPDYPZIG.js} +4525 -4753
- package/dist/bundle/{chunk-QQ3QZFFD.js → chunk-DAK2J3FG.js} +8 -8
- package/dist/bundle/{chunk-S3HAFJVC.js → chunk-DG44ORQ3.js} +86 -29
- package/dist/bundle/{chunk-F223KYWG.js → chunk-ESLV57MC.js} +1 -1
- package/dist/bundle/{chunk-TEZKCH5B.js → chunk-FATTEYZH.js} +2 -2
- package/dist/bundle/{chunk-4AACB23H.js → chunk-FERGNQYA.js} +13 -13
- package/dist/bundle/{chunk-HGMMRT4G.js → chunk-GB55EDOF.js} +2 -2
- package/dist/bundle/chunk-GNGYV5NX.js +116 -0
- package/dist/bundle/{chunk-6OE5I3PR.js → chunk-KKD5ZPGD.js} +6 -6
- package/dist/bundle/{chunk-G3MQOH6Z.js → chunk-KPAUPIC3.js} +3 -3
- package/dist/bundle/chunk-KVW7LCZK.js +109 -0
- package/dist/bundle/{chunk-D4Y2KL5V.js → chunk-LTAHG7BO.js} +4 -4
- package/dist/bundle/{chunk-NDSRND3E.js → chunk-LVGX7VTD.js} +4 -4
- package/dist/bundle/{chunk-Z4CGZAFQ.js → chunk-M47CXY5J.js} +39 -58
- package/dist/bundle/{chunk-L33G5ARH.js → chunk-M73VM67N.js} +1920 -1325
- package/dist/bundle/{chunk-JKKEMVW3.js → chunk-MAPJUOTD.js} +4 -4
- package/dist/bundle/{chunk-5FEEFXJA.js → chunk-MCPOZNWG.js} +1 -1
- package/dist/bundle/{chunk-QTFXYR5W.js → chunk-MKAKM3V7.js} +4 -4
- package/dist/bundle/{chunk-FRW3CWC7.js → chunk-NR7PGYPO.js} +44 -42
- package/dist/bundle/chunk-PLBEUSZP.js +18 -0
- package/dist/bundle/{chunk-FJKP6MMP.js → chunk-QMNUQTA2.js} +2 -2
- package/dist/bundle/{chunk-FQ3C6DFV.js → chunk-QNNUNGPL.js} +3 -3
- package/dist/bundle/{chunk-CIDFV3IT.js → chunk-QQ264PXQ.js} +1 -1
- package/dist/bundle/{chunk-2BAJ6ORN.js → chunk-R6KXHBMW.js} +1 -1
- package/dist/bundle/{chunk-72QLHHSO.js → chunk-RPBO5XL3.js} +21 -19
- package/dist/bundle/{chunk-KBHK5UGL.js → chunk-RX5CJ55S.js} +1 -1
- package/dist/bundle/{chunk-W2BIBPRU.js → chunk-RZX7RDXY.js} +88 -48
- package/dist/bundle/{chunk-HV5YYAJX.js → chunk-S7P5X23R.js} +66 -29
- package/dist/bundle/{chunk-UBCLVM7C.js → chunk-SHIHW2YN.js} +3 -3
- package/dist/bundle/{chunk-YMWPRHXG.js → chunk-SQWTUENZ.js} +2063 -949
- package/dist/bundle/{chunk-XM3P7LLT.js → chunk-T7ONSJAA.js} +2 -2
- package/dist/bundle/{chunk-X5PDWCG7.js → chunk-TEMCXODM.js} +1 -1
- package/dist/bundle/{chunk-V5Z2JO6X.js → chunk-U6HEZPCR.js} +19 -19
- package/dist/bundle/{chunk-65BWMPCI.js → chunk-VAAZL6OD.js} +6 -6
- package/dist/bundle/{chunk-TT4CIXVH.js → chunk-VPNLTNQD.js} +6 -6
- package/dist/bundle/{chunk-SMHLQEE2.js → chunk-VUBZFMGP.js} +2 -2
- package/dist/bundle/{chunk-XDMJVWWR.js → chunk-W77WC6ZK.js} +3 -3
- package/dist/bundle/{chunk-KC4MQRAB.js → chunk-WGGSFGNZ.js} +8 -8
- package/dist/bundle/{chunk-BXIPT2BO.js → chunk-Y4CSR5RP.js} +3 -1
- package/dist/bundle/{chunk-3EQ7USKJ.js → chunk-YMJKHMHX.js} +2 -2
- package/dist/bundle/{chunk-FQZSS3AB.js → chunk-YRY752BB.js} +6 -6
- package/dist/bundle/{chunk-MDLSI3EN.js → chunk-ZSW7LN7T.js} +43 -597
- package/dist/bundle/command-contract-3W73W27G.js +33 -0
- package/dist/bundle/command-server-entry-37PKBJ5A.js +146 -0
- package/dist/bundle/{decode-5N4ERCHC.js → decode-F7KC7WT4.js} +5 -5
- package/dist/bundle/{dispatch-TBGXBDHE.js → dispatch-U2DW6UI7.js} +8 -8
- package/dist/bundle/{echarts-YDEBAMXT.js → echarts-4VYG66GX.js} +2 -2
- package/dist/bundle/{embed-T7H62XFR.js → embed-ENZ6R4HF.js} +6 -6
- package/dist/bundle/{embedder-AW3O2TR3.js → embedder-4CBICMFO.js} +9 -9
- package/dist/bundle/entry-XQ562EDO.js +21 -0
- package/dist/bundle/{failure-AWHPW2HE.js → failure-HJD7S5UA.js} +2 -2
- package/dist/bundle/{first-run-6PBZSRZU.js → first-run-PPXOC6ID.js} +11 -11
- package/dist/bundle/first-screen-JC6BYZYD.js +31 -0
- package/dist/bundle/{instructions-C3NJERO7.js → instructions-XLCMJ5PJ.js} +1 -1
- package/dist/bundle/{mcp-CWLASTLV.js → mcp-7KQUJNFN.js} +2 -2
- package/dist/bundle/{node-P3CIIYWU.js → node-SSAC67R5.js} +2 -2
- package/dist/bundle/{node-sqlite-YVHMNRVA.js → node-sqlite-SUUUSYSZ.js} +6 -6
- package/dist/bundle/{oauth-5OQYA2SV.js → oauth-2ZNHMPEX.js} +7 -7
- package/dist/bundle/{open-YGWUVSU7.js → open-EFNT7V2Q.js} +5 -5
- package/dist/bundle/{openai-U45JBQ6F.js → openai-7STFVJXA.js} +16 -16
- package/dist/bundle/{process-DCYX5EDG.js → process-63F4PNWH.js} +1 -1
- package/dist/bundle/{program-UZBFH2EZ.js → program-C2E3TQNK.js} +70 -67
- package/dist/bundle/{prompt-HPVTPTFI.js → prompt-QPO7EKD5.js} +5 -5
- package/dist/bundle/{proxy-transport-D7MCHGSV.js → proxy-transport-ENU2SJYT.js} +5 -5
- package/dist/bundle/{recognize-IJCPFJ76.js → recognize-MLXEHFYL.js} +4 -4
- package/dist/bundle/{remote-MWDYQWFW.js → remote-DO7FLJEF.js} +7 -7
- package/dist/bundle/{rerank-SXG64475.js → rerank-W3WSBDAM.js} +7 -7
- package/dist/bundle/{serve-KJQENHEH.js → serve-Z3TOTEMQ.js} +14 -14
- package/dist/bundle/{server-MXVXZWN6.js → server-BYSOJCUA.js} +36 -36
- package/dist/bundle/server-IRUVLXD4.js +61 -0
- package/dist/bundle/{state-CKKJWH27.js → state-PKRPBCMY.js} +6 -6
- package/dist/bundle/{store-R3BE4V56.js → store-Y4G7CNJT.js} +13 -13
- package/dist/bundle/store-maintenance-command-PHK43OSM.js +49 -0
- package/dist/bundle/tg.js +13 -13
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/command-contract-7TGMZRBE.js +0 -33
- package/dist/bundle/entry-L2LJ2VPY.js +0 -18
- package/dist/bundle/first-screen-UKCD7D2R.js +0 -31
- package/dist/bundle/server-RTMCRKQF.js +0 -60
- package/dist/bundle/store-maintenance-command-KDGBSBNU.js +0 -49
- /package/dist/bundle/{chunk-DWX4DE2I.js → chunk-YVNHQFLC.js} +0 -0
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
readLock,
|
|
6
6
|
releaseLock,
|
|
7
7
|
takeLock
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-W77WC6ZK.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.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
|
|
14
14
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
|
|
17
17
|
import { randomBytes } from "node:crypto";
|
|
18
18
|
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { dirname } from "node:path";
|
|
@@ -86,7 +86,7 @@ var activityRecorder = /* @__PURE__ */ __name((path, now = Date.now) => {
|
|
|
86
86
|
};
|
|
87
87
|
}, "activityRecorder");
|
|
88
88
|
|
|
89
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
89
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
|
|
90
90
|
var ACCESS_SECONDS = 60 * 60;
|
|
91
91
|
var REFRESH_SECONDS = 30 * 24 * 60 * 60;
|
|
92
92
|
var readStored = /* @__PURE__ */ __name((path) => existsSync2(path) ? JSON.parse(readFileSync2(path, "utf8")) : { clients: [], tokens: [] }, "readStored");
|
|
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
answerOf,
|
|
5
5
|
messengerContext
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZSW7LN7T.js";
|
|
7
7
|
import {
|
|
8
8
|
FETCHING,
|
|
9
9
|
RULES_VERSION,
|
|
@@ -27,55 +27,29 @@ import {
|
|
|
27
27
|
typedQuery,
|
|
28
28
|
withQuery,
|
|
29
29
|
withTimeLimit
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-SQWTUENZ.js";
|
|
31
31
|
import {
|
|
32
32
|
QUICK_HEALTH_CHECKS,
|
|
33
|
-
explainDamage,
|
|
34
33
|
fts5Tables,
|
|
35
34
|
invalidJson,
|
|
35
|
+
lossUnknown,
|
|
36
|
+
storeDamageReport,
|
|
36
37
|
storeHealth
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import {
|
|
39
|
-
stringWidth,
|
|
40
|
-
wrapAnsi
|
|
41
|
-
} from "./chunk-2ABQZVK4.js";
|
|
42
|
-
import {
|
|
43
|
-
Command,
|
|
44
|
-
LOCAL_READ,
|
|
45
|
-
LOCAL_WRITE,
|
|
46
|
-
REMOTE_READ,
|
|
47
|
-
REMOTE_WRITE,
|
|
48
|
-
annotate,
|
|
49
|
-
codeOf,
|
|
50
|
-
currentRun,
|
|
51
|
-
destroysNothing,
|
|
52
|
-
environmentOf,
|
|
53
|
-
itemOf,
|
|
54
|
-
jsonlRecords,
|
|
55
|
-
levelFor,
|
|
56
|
-
lineOf,
|
|
57
|
-
listOf,
|
|
58
|
-
modelTarget,
|
|
59
|
-
nextStep,
|
|
60
|
-
outputFor,
|
|
61
|
-
parseDuration,
|
|
62
|
-
recalledAccount,
|
|
63
|
-
recordLogFor,
|
|
64
|
-
renderAnswer,
|
|
65
|
-
snakeKeys,
|
|
66
|
-
storeTable,
|
|
67
|
-
withoutProviderRefs
|
|
68
|
-
} from "./chunk-DQELQ7BL.js";
|
|
38
|
+
} from "./chunk-DG44ORQ3.js";
|
|
69
39
|
import {
|
|
70
40
|
holdLock,
|
|
71
41
|
lockPath,
|
|
72
42
|
releaseLock,
|
|
73
43
|
servingProfiles,
|
|
74
44
|
takeLock
|
|
75
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-W77WC6ZK.js";
|
|
76
46
|
import {
|
|
77
|
-
|
|
78
|
-
|
|
47
|
+
stringWidth,
|
|
48
|
+
wrapAnsi
|
|
49
|
+
} from "./chunk-2ABQZVK4.js";
|
|
50
|
+
import {
|
|
51
|
+
readSecret
|
|
52
|
+
} from "./chunk-CLMRF6XR.js";
|
|
79
53
|
import {
|
|
80
54
|
CORPORA,
|
|
81
55
|
MIGRATIONS,
|
|
@@ -88,7 +62,6 @@ import {
|
|
|
88
62
|
fillStems,
|
|
89
63
|
fillTrigrams,
|
|
90
64
|
fillVectorIndexes,
|
|
91
|
-
formatLocator,
|
|
92
65
|
involvementStoreOver,
|
|
93
66
|
isDerivedTable,
|
|
94
67
|
migrate,
|
|
@@ -96,7 +69,6 @@ import {
|
|
|
96
69
|
openSqlite,
|
|
97
70
|
openStore,
|
|
98
71
|
orphanPointers,
|
|
99
|
-
parseLocator,
|
|
100
72
|
pendingNormalization,
|
|
101
73
|
readStoreTables,
|
|
102
74
|
rebuildMentions,
|
|
@@ -112,30 +84,60 @@ import {
|
|
|
112
84
|
storeClients,
|
|
113
85
|
storeContents,
|
|
114
86
|
vectorIndexCounts
|
|
115
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-5P43K3GL.js";
|
|
116
88
|
import {
|
|
89
|
+
openCache
|
|
90
|
+
} from "./chunk-VPNLTNQD.js";
|
|
91
|
+
import {
|
|
92
|
+
Command,
|
|
93
|
+
LOCAL_READ,
|
|
94
|
+
LOCAL_WRITE,
|
|
95
|
+
REMOTE_READ,
|
|
96
|
+
REMOTE_WRITE,
|
|
97
|
+
annotate,
|
|
98
|
+
codeOf,
|
|
99
|
+
destroysNothing,
|
|
100
|
+
environmentOf,
|
|
101
|
+
itemOf,
|
|
102
|
+
jsonlRecords,
|
|
103
|
+
levelFor,
|
|
104
|
+
lineOf,
|
|
105
|
+
listOf,
|
|
106
|
+
modelTarget,
|
|
107
|
+
nextStep,
|
|
108
|
+
outputFor,
|
|
109
|
+
parseDuration,
|
|
110
|
+
recalledAccount,
|
|
111
|
+
recordLogFor,
|
|
112
|
+
renderAnswer,
|
|
113
|
+
snakeKeys,
|
|
114
|
+
storeTable,
|
|
115
|
+
withoutProviderRefs
|
|
116
|
+
} from "./chunk-CPDYPZIG.js";
|
|
117
|
+
import {
|
|
118
|
+
holdersOf
|
|
119
|
+
} from "./chunk-CMEWPXKU.js";
|
|
120
|
+
import {
|
|
121
|
+
currentRun,
|
|
122
|
+
formatLocator,
|
|
123
|
+
parseLocator,
|
|
117
124
|
queryFieldsOf,
|
|
118
125
|
readDamageMark,
|
|
119
126
|
readHealthMark,
|
|
127
|
+
readJournalMark,
|
|
120
128
|
recordDeepCheck
|
|
121
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-3EGVR7OF.js";
|
|
122
130
|
import {
|
|
123
131
|
failureKey,
|
|
124
132
|
isStoreDamage
|
|
125
|
-
} from "./chunk-
|
|
126
|
-
import {
|
|
127
|
-
readSecret
|
|
128
|
-
} from "./chunk-HPQQ76WF.js";
|
|
133
|
+
} from "./chunk-7MXRFFIT.js";
|
|
129
134
|
import {
|
|
130
135
|
storePath
|
|
131
|
-
} from "./chunk-
|
|
132
|
-
import {
|
|
133
|
-
openCache
|
|
134
|
-
} from "./chunk-TT4CIXVH.js";
|
|
136
|
+
} from "./chunk-54KFRAHF.js";
|
|
135
137
|
import {
|
|
136
138
|
resolvePaths,
|
|
137
139
|
writeSecurely
|
|
138
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-U6HEZPCR.js";
|
|
139
141
|
import {
|
|
140
142
|
array,
|
|
141
143
|
boolean,
|
|
@@ -156,12 +158,12 @@ import {
|
|
|
156
158
|
string,
|
|
157
159
|
transform,
|
|
158
160
|
trim
|
|
159
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-WGGSFGNZ.js";
|
|
160
162
|
import {
|
|
161
163
|
CliError,
|
|
162
164
|
singleLine,
|
|
163
165
|
visibleControls
|
|
164
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-VUBZFMGP.js";
|
|
165
167
|
import {
|
|
166
168
|
__commonJS,
|
|
167
169
|
__name,
|
|
@@ -5501,11 +5503,11 @@ var require_liquid_node = __commonJS({
|
|
|
5501
5503
|
}
|
|
5502
5504
|
});
|
|
5503
5505
|
|
|
5504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
5505
5507
|
import { chmodSync, constants, copyFileSync, existsSync as existsSync10, mkdirSync, realpathSync as realpathSync3, renameSync as renameSync3, rmSync as rmSync3, statfsSync as statfsSync2, statSync as statSync4, writeFileSync as writeFileSync2 } from "node:fs";
|
|
5506
5508
|
import { dirname as dirname3, resolve } from "node:path";
|
|
5507
5509
|
|
|
5508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/sealed.js
|
|
5509
5511
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
5510
5512
|
import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
|
|
5511
5513
|
import { Transform } from "node:stream";
|
|
@@ -5612,7 +5614,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
|
|
|
5612
5614
|
renameSync(pending, to);
|
|
5613
5615
|
}, "unsealFile");
|
|
5614
5616
|
|
|
5615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5617
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/store/compatibility.js
|
|
5616
5618
|
var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
|
|
5617
5619
|
var fileSchemaOf = /* @__PURE__ */ __name((database) => {
|
|
5618
5620
|
const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
|
|
@@ -5636,7 +5638,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
|
|
|
5636
5638
|
};
|
|
5637
5639
|
}, "compatibilityOf");
|
|
5638
5640
|
|
|
5639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5641
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/store/repair.js
|
|
5640
5642
|
import { createHash as createHash2 } from "node:crypto";
|
|
5641
5643
|
var COPY_MARK = "__repair_";
|
|
5642
5644
|
var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
|
|
@@ -5890,19 +5892,19 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
|
|
|
5890
5892
|
return found;
|
|
5891
5893
|
}, "deleteCopy");
|
|
5892
5894
|
|
|
5893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5895
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
5894
5896
|
import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
|
|
5895
5897
|
|
|
5896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5898
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
5897
5899
|
import { existsSync as existsSync3 } from "node:fs";
|
|
5898
5900
|
|
|
5899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5901
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
5900
5902
|
import { execFileSync, spawn } from "node:child_process";
|
|
5901
5903
|
import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
|
|
5902
5904
|
import { basename, dirname, join } from "node:path";
|
|
5903
5905
|
import { Transform as Transform2 } from "node:stream";
|
|
5904
5906
|
|
|
5905
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/store/refill.js
|
|
5906
5908
|
var REFILL_MARGIN_MS = 864e5;
|
|
5907
5909
|
var TIME_KEYS = 1e12;
|
|
5908
5910
|
var integerId = `external_id GLOB '[0-9]*' AND NOT external_id GLOB '*[^0-9]*'`;
|
|
@@ -5982,7 +5984,7 @@ var forgetMail = /* @__PURE__ */ __name((database, cutoff, now) => {
|
|
|
5982
5984
|
return [...folders].map(([account, count3]) => ({ account, folders: count3 }));
|
|
5983
5985
|
}, "forgetMail");
|
|
5984
5986
|
|
|
5985
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5987
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
5986
5988
|
var SQLITE3_MINIMUM = [3, 43, 0];
|
|
5987
5989
|
var STORE_PARTS = ["", "-wal", "-shm"];
|
|
5988
5990
|
var RECOVER_LOCK = ".recover-lock";
|
|
@@ -6510,7 +6512,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6510
6512
|
}
|
|
6511
6513
|
}, "recoverLocked");
|
|
6512
6514
|
|
|
6513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
6514
6516
|
var COUNTED = [
|
|
6515
6517
|
"accounts",
|
|
6516
6518
|
"chats",
|
|
@@ -6543,18 +6545,23 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
|
|
|
6543
6545
|
}
|
|
6544
6546
|
} catch {
|
|
6545
6547
|
}
|
|
6548
|
+
const journal = readJournalMark(path);
|
|
6546
6549
|
recordDeepCheck(path, health, { cli: command, ...version ? { version } : {}, schema });
|
|
6547
6550
|
const mark = readDamageMark(path);
|
|
6548
|
-
const
|
|
6551
|
+
const lastKnownGood = readHealthMark(path)?.last_ok_at ?? null;
|
|
6549
6552
|
const inUse = storeHolders(path) ?? null;
|
|
6550
6553
|
const timers = activeTimers() ?? null;
|
|
6551
6554
|
const sqlite3 = sqlite3Program();
|
|
6552
|
-
const
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6555
|
+
const report = storeDamageReport({
|
|
6556
|
+
health,
|
|
6557
|
+
command,
|
|
6558
|
+
mark,
|
|
6559
|
+
journal,
|
|
6560
|
+
lastOkAt: lastKnownGood,
|
|
6561
|
+
holders: inUse,
|
|
6562
|
+
timers,
|
|
6563
|
+
sqlite3Usable: sqlite3.usable
|
|
6564
|
+
});
|
|
6558
6565
|
return {
|
|
6559
6566
|
path,
|
|
6560
6567
|
exists: true,
|
|
@@ -6565,13 +6572,13 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
|
|
|
6565
6572
|
damagedSearchIndexes: (health.searchIndexes ?? []).filter((index) => !index.ok).map(({ name, error }) => ({ name, ...error ? { error } : {} })),
|
|
6566
6573
|
invalidJson: health.invalidJson ?? [],
|
|
6567
6574
|
rows,
|
|
6568
|
-
|
|
6575
|
+
report,
|
|
6569
6576
|
damageMark: mark ? (({ inode: _, ...seen }) => seen)(mark) : null,
|
|
6570
|
-
lastKnownGood
|
|
6577
|
+
lastKnownGood,
|
|
6571
6578
|
inUse,
|
|
6572
6579
|
timers,
|
|
6573
6580
|
sqlite3: { version: sqlite3.version, usable: sqlite3.usable },
|
|
6574
|
-
next
|
|
6581
|
+
next: report?.steps.map((step) => step.command) ?? []
|
|
6575
6582
|
};
|
|
6576
6583
|
}, "storeRecoveryCheck");
|
|
6577
6584
|
var storeRecoveryRun = /* @__PURE__ */ __name(async (env, { command, version, note, timers: scheduled = activeTimers, copy }) => {
|
|
@@ -6612,13 +6619,12 @@ var refetchNotes = /* @__PURE__ */ __name(({ since, chats, mail }) => {
|
|
|
6612
6619
|
var recoveryNotes = /* @__PURE__ */ __name((answer) => {
|
|
6613
6620
|
if ("keptAt" in answer) {
|
|
6614
6621
|
const lost = answer.lost.map(({ table, before, read, kept, goneAtLeast, seenIn }) => `${table}: ${kept} kept of ${before ?? "an uncountable number"}${read > kept ? `, ${read - kept} read but unusable` : ""}` + (goneAtLeast > 0 ? `; at least ${goneAtLeast} rows are gone (the index ${seenIn} lists them)` : ""));
|
|
6615
|
-
const since = answer.lastKnownGood ? `since the last deep check that passed (${answer.lastKnownGood})` : "since the store was made (no deep check that passed is on record)";
|
|
6616
6622
|
return [
|
|
6617
6623
|
`recovered in ${answer.seconds.total} s; the damaged file is kept at ${answer.keptAt}`,
|
|
6618
6624
|
...lost,
|
|
6619
6625
|
...Object.entries(answer.placed).map(([table, rows]) => `${table}: ${rows} rows found on pages no table claimed were put back`),
|
|
6620
6626
|
...refetchNotes(answer.refetch),
|
|
6621
|
-
|
|
6627
|
+
lossUnknown(answer.lastKnownGood, lost.some((line) => line.includes("are gone"))),
|
|
6622
6628
|
...answer.dangling.map(({ table, parent, rows }) => `${rows} rows of ${table} point at ${parent} rows the store does not hold`),
|
|
6623
6629
|
...answer.invalidJson.map(({ table, column, rows, required }) => `${table}.${column}: ${rows} values were not valid JSON \u2014 ${required ? "those rows were dropped" : "set to empty"}`),
|
|
6624
6630
|
...answer.next.map((line) => `next: ${line}`)
|
|
@@ -6626,13 +6632,16 @@ var recoveryNotes = /* @__PURE__ */ __name((answer) => {
|
|
|
6626
6632
|
}
|
|
6627
6633
|
if (!answer.exists)
|
|
6628
6634
|
return ["no store yet"];
|
|
6629
|
-
|
|
6635
|
+
const report = answer.report;
|
|
6636
|
+
if (!report)
|
|
6630
6637
|
return [`the store is healthy (checked every page and search index in ${answer.seconds} s)`];
|
|
6631
|
-
const why = answer.explanation;
|
|
6632
6638
|
return [
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6639
|
+
report.whatHappened,
|
|
6640
|
+
...report.impact,
|
|
6641
|
+
report.externalDataSafe,
|
|
6642
|
+
report.loss,
|
|
6643
|
+
...report.likelyCauses.map(({ cause, check: check2 }) => `maybe: ${cause} \u2014 check: ${check2}`),
|
|
6644
|
+
...report.steps.map(({ command, why, destructive }) => `next: ${command} # ${destructive ? "changes things: " : ""}${why}`)
|
|
6636
6645
|
];
|
|
6637
6646
|
}, "recoveryNotes");
|
|
6638
6647
|
var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
|
|
@@ -6659,7 +6668,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
|
|
|
6659
6668
|
return recover;
|
|
6660
6669
|
}, "storeRecoverCommand");
|
|
6661
6670
|
|
|
6662
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
6663
6672
|
var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
|
|
6664
6673
|
var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
|
|
6665
6674
|
var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
|
|
@@ -6705,7 +6714,7 @@ var storeInfoCommand = /* @__PURE__ */ __name(() => annotate(new Command("info")
|
|
|
6705
6714
|
renderAnswer(this, outputFor(this), itemOf(answer));
|
|
6706
6715
|
}), "storeInfoCommand");
|
|
6707
6716
|
|
|
6708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
|
|
6709
6718
|
var ENCRYPT_OPTION = [
|
|
6710
6719
|
"--encrypt",
|
|
6711
6720
|
"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"
|
|
@@ -6724,7 +6733,7 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
|
|
|
6724
6733
|
return password;
|
|
6725
6734
|
}, "passwordOf");
|
|
6726
6735
|
|
|
6727
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6736
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/replies/rules.js
|
|
6728
6737
|
import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
|
|
6729
6738
|
import { join as join2 } from "node:path";
|
|
6730
6739
|
var REPLY_ACTIONS = ["reply", "task"];
|
|
@@ -6895,7 +6904,7 @@ var problem = /* @__PURE__ */ __name((issue) => {
|
|
|
6895
6904
|
}, "problem");
|
|
6896
6905
|
var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
|
|
6897
6906
|
|
|
6898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/replies/state.js
|
|
6899
6908
|
import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
|
|
6900
6909
|
import { join as join3 } from "node:path";
|
|
6901
6910
|
var ANSWERED_KEPT = 1e3;
|
|
@@ -6948,7 +6957,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
|
|
|
6948
6957
|
}, "recordReply");
|
|
6949
6958
|
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");
|
|
6950
6959
|
|
|
6951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6960
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/replies/decide.js
|
|
6952
6961
|
var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
|
|
6953
6962
|
var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
|
|
6954
6963
|
const { message, chat, owner, sender } = incoming;
|
|
@@ -7054,10 +7063,10 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
|
|
|
7054
7063
|
return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
|
|
7055
7064
|
}, "filled");
|
|
7056
7065
|
|
|
7057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7066
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
7058
7067
|
var import_liquidjs2 = __toESM(require_liquid_node(), 1);
|
|
7059
7068
|
|
|
7060
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/render/liquid.js
|
|
7061
7070
|
var import_liquidjs = __toESM(require_liquid_node(), 1);
|
|
7062
7071
|
var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
7063
7072
|
const engine = new import_liquidjs.Liquid({
|
|
@@ -7084,7 +7093,7 @@ var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
|
7084
7093
|
return engine;
|
|
7085
7094
|
}, "safeLiquid");
|
|
7086
7095
|
|
|
7087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7096
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
7088
7097
|
var TEMPLATE_LIMITS = {
|
|
7089
7098
|
parse: 32768,
|
|
7090
7099
|
renders: 2e3,
|
|
@@ -7223,7 +7232,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
7223
7232
|
}
|
|
7224
7233
|
}, "renderReplyTemplate");
|
|
7225
7234
|
|
|
7226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7235
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
|
|
7227
7236
|
var DRY_RUN_DAYS = 7;
|
|
7228
7237
|
var PAGE = 500;
|
|
7229
7238
|
var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
|
|
@@ -7337,7 +7346,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
|
|
|
7337
7346
|
}
|
|
7338
7347
|
}, "storedSince");
|
|
7339
7348
|
|
|
7340
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7349
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/replies/consents.js
|
|
7341
7350
|
import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
|
|
7342
7351
|
import { join as join4 } from "node:path";
|
|
7343
7352
|
var shape = strictObject({
|
|
@@ -7362,7 +7371,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
|
|
|
7362
7371
|
return consent.provider === provider && !consent.deniedChats.includes(chat);
|
|
7363
7372
|
}, "mayModelReply");
|
|
7364
7373
|
|
|
7365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/replies/rendering.js
|
|
7366
7375
|
var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
|
|
7367
7376
|
ai: true
|
|
7368
7377
|
}) => async (rule2, message, chat, now) => {
|
|
@@ -7409,7 +7418,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
|
|
|
7409
7418
|
return result2;
|
|
7410
7419
|
}, "replyRenderer");
|
|
7411
7420
|
|
|
7412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7421
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/replies/serve.js
|
|
7413
7422
|
var NOT_ALLOWED = "replies.send is not allow";
|
|
7414
7423
|
var NO_RULES = "no rules";
|
|
7415
7424
|
var ONLY_TASK = "opened a task, sent nothing";
|
|
@@ -7502,7 +7511,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
|
|
|
7502
7511
|
return { skip: why };
|
|
7503
7512
|
}, "replyTo");
|
|
7504
7513
|
|
|
7505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
|
|
7506
7515
|
var START_SYNC_DELAY_MS = 3e4;
|
|
7507
7516
|
var START_SYNC_BUDGET_MS = 5 * 6e4;
|
|
7508
7517
|
var START_SYNC_WINDOW_MS = 7 * 864e5;
|
|
@@ -7579,7 +7588,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn,
|
|
|
7579
7588
|
};
|
|
7580
7589
|
}, "startSync");
|
|
7581
7590
|
|
|
7582
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
|
|
7583
7592
|
var FIRST_FETCH_MS = 6e4;
|
|
7584
7593
|
var DAY_MS = 864e5;
|
|
7585
7594
|
var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
|
|
@@ -7633,7 +7642,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs =
|
|
|
7633
7642
|
};
|
|
7634
7643
|
}, "memberFetches");
|
|
7635
7644
|
|
|
7636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7645
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
|
|
7637
7646
|
var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
|
|
7638
7647
|
var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
|
|
7639
7648
|
if (context.format === "pretty") {
|
|
@@ -7666,7 +7675,7 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
|
|
|
7666
7675
|
return context;
|
|
7667
7676
|
}, "recordDiagnostics");
|
|
7668
7677
|
|
|
7669
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7678
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
|
|
7670
7679
|
import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync as realpathSync2 } from "node:fs";
|
|
7671
7680
|
import { dirname as dirname2, join as join5 } from "node:path";
|
|
7672
7681
|
var OUTDATED_CHECK_MS = 6e4;
|
|
@@ -7752,7 +7761,7 @@ var watchOutdated = /* @__PURE__ */ __name(({ check: check2, onOutdated, everyMs
|
|
|
7752
7761
|
};
|
|
7753
7762
|
}, "watchOutdated");
|
|
7754
7763
|
|
|
7755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7764
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
|
|
7756
7765
|
var STEMS_EVERY_MS = 3e4;
|
|
7757
7766
|
var STEMS_SLICE_MS = 2e3;
|
|
7758
7767
|
var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
|
|
@@ -7792,7 +7801,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
|
|
|
7792
7801
|
};
|
|
7793
7802
|
}, "stemFills");
|
|
7794
7803
|
|
|
7795
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/render/messages.js
|
|
7796
7805
|
import { styleText } from "node:util";
|
|
7797
7806
|
var TIME_WIDTH = 8;
|
|
7798
7807
|
var INDENT = " ".repeat(TIME_WIDTH + 2);
|
|
@@ -7968,7 +7977,7 @@ var editedAt = /* @__PURE__ */ __name((message, options) => {
|
|
|
7968
7977
|
return day(edited) === day(message.timestamp) ? time : `${day(edited)} ${time}`;
|
|
7969
7978
|
}, "editedAt");
|
|
7970
7979
|
|
|
7971
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
|
|
7972
7981
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
|
|
7973
7982
|
var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
7974
7983
|
kind: attachment.kind,
|
|
@@ -7987,7 +7996,7 @@ var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
|
7987
7996
|
phone: attachment.contact.phone,
|
|
7988
7997
|
user_id: attachment.contact.userId
|
|
7989
7998
|
}),
|
|
7990
|
-
buttons: attachment.buttons
|
|
7999
|
+
buttons: attachment.buttons?.map((row) => row.map(({ data: _data, ...button }) => button))
|
|
7991
8000
|
}), "attachmentItem");
|
|
7992
8001
|
var quotedItem = /* @__PURE__ */ __name((quoted) => quoted === null ? null : {
|
|
7993
8002
|
id: quoted.id,
|
|
@@ -8063,7 +8072,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
|
|
|
8063
8072
|
locale: messenger.app.locale
|
|
8064
8073
|
}), "viewOf");
|
|
8065
8074
|
|
|
8066
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
|
|
8067
8076
|
var observed = /* @__PURE__ */ __name((value) => ({
|
|
8068
8077
|
value: value.value,
|
|
8069
8078
|
observed_at: value.observedAt,
|
|
@@ -8130,7 +8139,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
|
|
|
8130
8139
|
}
|
|
8131
8140
|
}, "watchEventItem");
|
|
8132
8141
|
|
|
8133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
|
|
8134
8143
|
var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
|
|
8135
8144
|
output: { entity: "watch_item" },
|
|
8136
8145
|
effects: REMOTE_READ,
|
|
@@ -8285,7 +8294,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
|
|
|
8285
8294
|
}
|
|
8286
8295
|
}, "describe");
|
|
8287
8296
|
|
|
8288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
|
|
8289
8298
|
var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
8290
8299
|
const command = annotate(new Command("serve"), {
|
|
8291
8300
|
output: { entity: "serve_summary" },
|
|
@@ -8568,7 +8577,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
|
|
|
8568
8577
|
};
|
|
8569
8578
|
}, "tasking");
|
|
8570
8579
|
|
|
8571
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8580
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
|
|
8572
8581
|
import { existsSync as existsSync9 } from "node:fs";
|
|
8573
8582
|
var PATH = "store tables list";
|
|
8574
8583
|
var STORE_TABLES_QUERY = {
|
|
@@ -8611,7 +8620,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((messenger) => {
|
|
|
8611
8620
|
return tables;
|
|
8612
8621
|
}, "storeTablesCommand");
|
|
8613
8622
|
|
|
8614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
8615
8624
|
var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
|
|
8616
8625
|
var WORD_INDEX = "message_words";
|
|
8617
8626
|
var schemaOf = /* @__PURE__ */ __name((database) => {
|
|
@@ -8650,6 +8659,7 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, v
|
|
|
8650
8659
|
if (!existsSync10(path))
|
|
8651
8660
|
return { path, exists: false };
|
|
8652
8661
|
const checked = await storeHealth(path, { deep });
|
|
8662
|
+
const journal = readJournalMark(path);
|
|
8653
8663
|
const recorded = deep ? recordDeepCheck(path, checked, {
|
|
8654
8664
|
cli: command ?? "unknown",
|
|
8655
8665
|
...version ? { version } : {},
|
|
@@ -8667,13 +8677,15 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, v
|
|
|
8667
8677
|
...checked.invalidJson?.length ? { invalidJson: checked.invalidJson } : {},
|
|
8668
8678
|
...checked.searchIndexes?.some((index) => !index.ok) ? { damagedSearchIndexes: checked.searchIndexes.filter((index) => !index.ok).map((index) => index.name) } : {}
|
|
8669
8679
|
};
|
|
8670
|
-
const damage = command ?
|
|
8680
|
+
const damage = command ? storeDamageReport({ health: checked, command, mark, journal, lastOkAt: lastKnownGood }) : null;
|
|
8671
8681
|
const healthOf = {
|
|
8672
8682
|
health,
|
|
8673
8683
|
lastKnownGood,
|
|
8674
8684
|
...mark ? { damageMark: withoutInode(mark) } : {},
|
|
8685
|
+
...journal ? { journalMark: journal } : {},
|
|
8675
8686
|
...recorded?.cleared ? { damageMarkCleared: withoutInode(recorded.cleared) } : {},
|
|
8676
|
-
|
|
8687
|
+
// `what` keeps memo's doctor, which reads it, compiling until it moves to `whatHappened`.
|
|
8688
|
+
...damage ? { damage: { what: damage.whatHappened, ...damage } } : {}
|
|
8677
8689
|
};
|
|
8678
8690
|
try {
|
|
8679
8691
|
return await reading(path, (database) => {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
|
|
8
8
|
var botInstructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => [
|
|
9
9
|
`The owner's ${name} bot "${profile}", through the official Bot API \u2014 not the owner's personal account. What it writes, people see as the bot.`,
|
|
10
10
|
"Use these tools to read the chats this bot is in, find a message or a person, and \u2014 when the profile allows \u2014 write as the bot.",
|