@wirecat/hubspot-cli 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/contracts/wirecat.json +2 -1
- package/dist/bin/hubspot.js +2 -2
- package/dist/bundle/agent-NMSIVLX7.js +41 -0
- package/dist/bundle/{all-profiles-GVEX5MXB.js → all-profiles-EMBBR5CW.js} +11 -11
- package/dist/bundle/{anthropic-GK6VBQUD.js → anthropic-AS2MTXO3.js} +5 -5
- package/dist/bundle/{app-server-JRROE463.js → app-server-WZWKHDLK.js} +70 -68
- package/dist/bundle/{bun-B7XTFPUF.js → bun-OPDGMZZQ.js} +2 -2
- package/dist/bundle/{bun-sqlite-QSNZ2YP4.js → bun-sqlite-NBAY7FR2.js} +6 -6
- package/dist/bundle/{chunk-I5WHQH5K.js → chunk-2JHVQMVC.js} +1 -1
- package/dist/bundle/{chunk-5EJ3C3JG.js → chunk-2XBDILVW.js} +1 -1
- package/dist/bundle/{chunk-ALOPYWYY.js → chunk-3HC5F3P7.js} +1 -1
- package/dist/bundle/{chunk-INT5JXGP.js → chunk-3YM4B2GT.js} +1 -1
- package/dist/bundle/{chunk-6WKK4UZP.js → chunk-4N7PP76S.js} +1 -1
- package/dist/bundle/{chunk-SBORPDIQ.js → chunk-4NLZXDXP.js} +4 -4
- package/dist/bundle/{chunk-2K5BAY32.js → chunk-5JKTVAXX.js} +19 -19
- package/dist/bundle/{chunk-YVMLFHWS.js → chunk-5XYI75HH.js} +3 -3
- package/dist/bundle/{chunk-JQUS4KFV.js → chunk-6TD3DCWC.js} +2 -2
- package/dist/bundle/{chunk-63YWTFZF.js → chunk-7SV76BVS.js} +3 -3
- package/dist/bundle/{chunk-2IRBXFIU.js → chunk-7T5BFWZI.js} +6678 -4803
- package/dist/bundle/{chunk-4LHNA6LJ.js → chunk-7Z53MLQP.js} +7 -7
- package/dist/bundle/{chunk-DBHJIFDS.js → chunk-AINKLKDN.js} +12 -12
- package/dist/bundle/{chunk-BXXU4EXK.js → chunk-BGWQIFAS.js} +38 -24
- package/dist/bundle/{chunk-RE55EPBX.js → chunk-CVAHCGE6.js} +26 -26
- package/dist/bundle/{chunk-2FLLS5IL.js → chunk-D7NSIQBI.js} +97 -50
- package/dist/bundle/{chunk-52NC5E42.js → chunk-D7OZWLJU.js} +11 -11
- package/dist/bundle/{chunk-TCSVW7BA.js → chunk-DNCLQPOM.js} +1 -1
- package/dist/bundle/{chunk-WASBOYI2.js → chunk-DPV53EZC.js} +4 -4
- package/dist/bundle/{chunk-XWYYFAML.js → chunk-EVUMQKV7.js} +3 -3
- package/dist/bundle/{chunk-4F62XXF6.js → chunk-FRF32QVB.js} +557 -599
- package/dist/bundle/{chunk-WSTF2MWW.js → chunk-GGMAIIVE.js} +1 -1
- package/dist/bundle/{chunk-LGGBKAVQ.js → chunk-GIMHJ7HA.js} +8 -8
- package/dist/bundle/{chunk-BQPAIGAF.js → chunk-GXDD4QWH.js} +2 -2
- package/dist/bundle/{chunk-M3JDGRXM.js → chunk-H6AH45GE.js} +163 -156
- package/dist/bundle/{chunk-DIKUPU3T.js → chunk-HZ3C4WXD.js} +3 -3
- package/dist/bundle/{chunk-TXCINEH6.js → chunk-IA77VHME.js} +13 -9
- package/dist/bundle/{chunk-OX37ZK27.js → chunk-IA7LLLEI.js} +3 -3
- package/dist/bundle/{chunk-GYH2AXPO.js → chunk-IGNMDKP7.js} +14 -14
- package/dist/bundle/{chunk-SZZVNPTI.js → chunk-IPKCM55K.js} +7 -7
- package/dist/bundle/{chunk-XL3NAXZY.js → chunk-JBZYHRUN.js} +5 -5
- package/dist/bundle/{chunk-WWIYZN67.js → chunk-JG6LCSEX.js} +13 -13
- package/dist/bundle/{chunk-BRBBZDMZ.js → chunk-JLXXUEAM.js} +2 -2
- package/dist/bundle/{chunk-ZH76HQDA.js → chunk-JPONKBEQ.js} +23 -23
- package/dist/bundle/{chunk-ZNRZJIRM.js → chunk-K5QWV6IX.js} +35 -35
- package/dist/bundle/{chunk-P7N3TZLH.js → chunk-KNL7CKF6.js} +179 -108
- package/dist/bundle/{chunk-GZD6BYO7.js → chunk-KVTNYRDO.js} +6 -6
- package/dist/bundle/chunk-KXJ3JEDH.js +2 -0
- package/dist/bundle/{chunk-5MFZYHPO.js → chunk-L45WN3AR.js} +3 -3
- package/dist/bundle/{chunk-DMYLQX2O.js → chunk-L72WUJAS.js} +2 -2
- package/dist/bundle/{chunk-6EHX762H.js → chunk-LCUWAH4L.js} +7 -7
- package/dist/bundle/{chunk-YFHCKAGU.js → chunk-LKH3UKLO.js} +4 -4
- package/dist/bundle/{chunk-A7KGBXBT.js → chunk-LM3W7YOM.js} +4 -4
- package/dist/bundle/{chunk-MR2BNER3.js → chunk-LZPKBN3C.js} +2 -2
- package/dist/bundle/{chunk-DIHVN5IC.js → chunk-LZPSIYRC.js} +8 -8
- package/dist/bundle/{chunk-VJQLJQHT.js → chunk-MYXUJCJD.js} +5 -5
- package/dist/bundle/{chunk-QAQK2WXJ.js → chunk-NA2B6PYR.js} +5 -5
- package/dist/bundle/{chunk-YGZ37OEN.js → chunk-NB7EOAUZ.js} +1 -1
- package/dist/bundle/{chunk-5AVU5SF6.js → chunk-NISH4UXM.js} +2 -2
- package/dist/bundle/{chunk-2V5KOOJV.js → chunk-NQVMPJAQ.js} +8 -8
- package/dist/bundle/{chunk-DWWZAQ4N.js → chunk-NVR6M4TF.js} +16 -16
- package/dist/bundle/{chunk-KGLMYQXM.js → chunk-O4AUYEGC.js} +2 -2
- package/dist/bundle/{chunk-WSUS3MUK.js → chunk-OGVSGXPI.js} +493 -452
- package/dist/bundle/{chunk-5ISQ4KJM.js → chunk-OUYXUGUX.js} +8 -8
- package/dist/bundle/chunk-P657KN5N.js +122 -0
- package/dist/bundle/{chunk-SFFV2F3Y.js → chunk-P7G5HFY3.js} +2 -2
- package/dist/bundle/{chunk-QY7EOB66.js → chunk-PFYPJUWX.js} +19 -15
- package/dist/bundle/{chunk-B3JVNOTB.js → chunk-PLPBEWD4.js} +3 -3
- package/dist/bundle/{chunk-CBTWKTWN.js → chunk-PMQ7GP6X.js} +6 -6
- package/dist/bundle/{chunk-L3DUZVBP.js → chunk-Q32ZDGS2.js} +8 -8
- package/dist/bundle/{chunk-YDTFPDAJ.js → chunk-Q7ICVP25.js} +1 -1
- package/dist/bundle/{chunk-GD5JTKLS.js → chunk-QLYSNL47.js} +6 -6
- package/dist/bundle/{chunk-H5HBZCEJ.js → chunk-QPPOIWPY.js} +8 -8
- package/dist/bundle/{chunk-JEUYZCWF.js → chunk-R2C5WDQV.js} +6 -6
- package/dist/bundle/{chunk-2HSYAKWO.js → chunk-RQORQN2V.js} +61 -61
- package/dist/bundle/{chunk-2PCVKD27.js → chunk-RRTMPSQR.js} +2 -2
- package/dist/bundle/{chunk-AP3CWDRK.js → chunk-S6JG4YUH.js} +2 -2
- package/dist/bundle/{chunk-CEHBT7QX.js → chunk-TTF5DP4V.js} +7 -7
- package/dist/bundle/{chunk-745FMNI5.js → chunk-TXDR6YSF.js} +1 -1
- package/dist/bundle/{chunk-3WG4MTQI.js → chunk-TY7NDMFY.js} +1 -1
- package/dist/bundle/{chunk-LJ52BS6C.js → chunk-U5CFLBNX.js} +8 -8
- package/dist/bundle/{chunk-UMXA357W.js → chunk-UDSL3MUU.js} +8 -8
- package/dist/bundle/{chunk-J5HHB27S.js → chunk-V57E7PJQ.js} +4 -4
- package/dist/bundle/{chunk-4HZQ5UIY.js → chunk-V7IF2K3P.js} +3 -3
- package/dist/bundle/{chunk-NUPAXK4Z.js → chunk-VB7FZOYX.js} +1 -1
- package/dist/bundle/{chunk-IRFFXKKK.js → chunk-VNMEE4ZZ.js} +3 -3
- package/dist/bundle/{chunk-SVRCPPNI.js → chunk-VZ5PPYDG.js} +1 -1
- package/dist/bundle/chunk-WOPVBRPV.js +29 -0
- package/dist/bundle/{chunk-GHBJBDTW.js → chunk-XEQQJBBO.js} +1 -1
- package/dist/bundle/chunk-XIKSGUMQ.js +1293 -0
- package/dist/bundle/{chunk-6IHXKMY6.js → chunk-XK5BAPHF.js} +7 -7
- package/dist/bundle/{chunk-ZNNGK73C.js → chunk-XQGN2D44.js} +3 -3
- package/dist/bundle/{chunk-XZLOQNS7.js → chunk-YKSH7BY2.js} +121 -36
- package/dist/bundle/{chunk-ZS6T2PYQ.js → chunk-YWDFYQOU.js} +2 -2
- package/dist/bundle/{chunk-BY3NKT34.js → chunk-ZJEENQRH.js} +12 -12
- package/dist/bundle/{chunk-SMEEFN65.js → chunk-ZZOCAZSZ.js} +3 -3
- package/dist/bundle/command-contract-BGTXROZA.js +40 -0
- package/dist/bundle/{command-server-entry-BFXXPNJO.js → command-server-entry-PDLRF2RV.js} +28 -28
- package/dist/bundle/{decode-5M7R44BR.js → decode-26M7XE2B.js} +5 -5
- package/dist/bundle/{dispatch-B2EP6DDT.js → dispatch-2FTOHA5D.js} +8 -8
- package/dist/bundle/{echarts-7MBFY6SZ.js → echarts-O3TNDAXJ.js} +2 -2
- package/dist/bundle/{embed-Y4GYNHRX.js → embed-XJLEAWXE.js} +6 -6
- package/dist/bundle/{embedder-FI4T4LQB.js → embedder-OEL6PXEH.js} +9 -9
- package/dist/bundle/{failure-AOACEURF.js → failure-OHIXWTR6.js} +2 -2
- package/dist/bundle/{first-run-YY66AKKG.js → first-run-J2T4IKK4.js} +12 -12
- package/dist/bundle/first-screen-Q5KYFT3R.js +41 -0
- package/dist/bundle/hubspot.js +27 -27
- package/dist/bundle/{instructions-SM7TKV6L.js → instructions-AMH5RWVJ.js} +1 -1
- package/dist/bundle/{mcp-ZNULRPZ4.js → mcp-5HFPWC3W.js} +2 -2
- package/dist/bundle/meeting-combined-5H6VGK6O.js +25 -0
- package/dist/bundle/{meeting-model-DKLMBQXX.js → meeting-model-USLGH5SE.js} +11 -11
- package/dist/bundle/{meeting-semantic-C5T6UDVB.js → meeting-semantic-Q6XYFYUD.js} +6 -6
- package/dist/bundle/{node-OS6OQF3F.js → node-EGMCBAO7.js} +2 -2
- package/dist/bundle/{node-sqlite-2XTWZ4HL.js → node-sqlite-2SWWGW6H.js} +7 -7
- package/dist/bundle/{oauth-BSSJ66FC.js → oauth-V5LGTXF2.js} +7 -7
- package/dist/bundle/{open-UZ3TKWDY.js → open-25EKOTZA.js} +5 -5
- package/dist/bundle/{openai-POVKFBTC.js → openai-CH37GSZS.js} +15 -15
- package/dist/bundle/{process-A7ZJGQ6G.js → process-SGHEN6MQ.js} +1 -1
- package/dist/bundle/{program-Q3JFUVC6.js → program-G4OZFVUI.js} +105 -101
- package/dist/bundle/{prompt-TYOYTRJM.js → prompt-2VSPX5S7.js} +5 -5
- package/dist/bundle/public-WB7IWBMR.js +196 -0
- package/dist/bundle/{recognize-GGFRONZT.js → recognize-NA5XUFKK.js} +4 -4
- package/dist/bundle/{remote-K4SLWHMI.js → remote-NRJOX6XW.js} +9 -9
- package/dist/bundle/{rerank-2QTKDUBV.js → rerank-NG3XMFCV.js} +7 -7
- package/dist/bundle/{schemas-EXBNVPMI.js → schemas-SKF4MZBJ.js} +1 -1
- package/dist/bundle/{serve-FG2G2X6Y.js → serve-MR67OBED.js} +9 -9
- package/dist/bundle/server-LFNGSVUQ.js +88 -0
- package/dist/bundle/{server-KRDHBT5Q.js → server-NZPHVRS6.js} +62 -60
- package/dist/bundle/{source-XP2JNUVU.js → source-P2KVDTJ5.js} +75 -73
- package/dist/bundle/{sqlite-runtime-TWV7KFLA.js → sqlite-runtime-V5U6F5EB.js} +6 -6
- package/dist/bundle/{state-EFX5ZQED.js → state-L4MWAATO.js} +6 -6
- package/dist/bundle/store-ARASPKTV.js +34 -0
- package/dist/bundle/{store-QPVH5VPJ.js → store-JFIZLDKO.js} +22 -22
- package/dist/bundle/{store-MNQ6YQIS.js → store-SUHY3G2X.js} +27 -24
- package/dist/bundle/store-maintenance-command-L2FXCEGU.js +75 -0
- package/dist/bundle/surface-NQK7CQ33.js +74 -0
- package/dist/bundle/writer-TYTMOXXA.js +88 -0
- package/dist/config.d.ts +5 -38
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/crm/source.js +1 -1
- package/dist/crm/source.js.map +1 -1
- package/dist/generated/definitions.d.ts +1 -1
- package/dist/generated/definitions.d.ts.map +1 -1
- package/dist/generated/manifest.d.ts +1 -1
- package/dist/generated/manifest.d.ts.map +1 -1
- package/dist/generated/manifest.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/agent-JXICB6TB.js +0 -40
- package/dist/bundle/chunk-HX2BE7DO.js +0 -40
- package/dist/bundle/chunk-YOVIH4QI.js +0 -1269
- package/dist/bundle/command-contract-7EWUA6E6.js +0 -40
- package/dist/bundle/first-screen-U7Z63VXE.js +0 -40
- package/dist/bundle/meeting-combined-B444C4NF.js +0 -25
- package/dist/bundle/server-VFKK6OS4.js +0 -86
- package/dist/bundle/store-LON2XRIS.js +0 -34
- package/dist/bundle/store-maintenance-command-YEMPRNJX.js +0 -73
- package/dist/bundle/surface-UJRMT6QT.js +0 -72
- package/dist/bundle/writer-NOSHE7ZI.js +0 -86
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
messengerContext
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IGNMDKP7.js";
|
|
6
6
|
import {
|
|
7
7
|
chatEventAnswer,
|
|
8
8
|
memberAnswer,
|
|
9
9
|
pollVoteAnswer
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NQVMPJAQ.js";
|
|
11
11
|
import {
|
|
12
12
|
serveRelay
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MYXUJCJD.js";
|
|
14
14
|
import {
|
|
15
15
|
FETCHING,
|
|
16
16
|
RULES_VERSION,
|
|
@@ -18,23 +18,26 @@ import {
|
|
|
18
18
|
applyTaskRulesOnArrival,
|
|
19
19
|
embeddingKeys,
|
|
20
20
|
endpointKeyName,
|
|
21
|
+
inside,
|
|
21
22
|
modelGateway,
|
|
22
23
|
newSendId,
|
|
23
24
|
onlineDeps,
|
|
24
25
|
openRequestTask,
|
|
25
26
|
patiently,
|
|
27
|
+
realPathOf,
|
|
26
28
|
refuseLockedOutput,
|
|
29
|
+
refusedPlace,
|
|
27
30
|
senderIsMe,
|
|
28
31
|
servicesFor,
|
|
29
32
|
syncsOneChat,
|
|
30
33
|
withTimeLimit
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-FRF32QVB.js";
|
|
32
35
|
import {
|
|
33
36
|
capability,
|
|
34
37
|
queryTerms,
|
|
35
38
|
typedQuery,
|
|
36
39
|
withQuery
|
|
37
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-PFYPJUWX.js";
|
|
38
41
|
import {
|
|
39
42
|
holdLock,
|
|
40
43
|
lockPath,
|
|
@@ -42,7 +45,7 @@ import {
|
|
|
42
45
|
releaseLock,
|
|
43
46
|
servingProfiles,
|
|
44
47
|
takeLock
|
|
45
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-XQGN2D44.js";
|
|
46
49
|
import {
|
|
47
50
|
Command,
|
|
48
51
|
LOCAL_READ,
|
|
@@ -69,10 +72,10 @@ import {
|
|
|
69
72
|
snakeKeys,
|
|
70
73
|
storeTable,
|
|
71
74
|
withoutProviderRefs
|
|
72
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-H6AH45GE.js";
|
|
73
76
|
import {
|
|
74
77
|
holdersOf
|
|
75
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-3YM4B2GT.js";
|
|
76
79
|
import {
|
|
77
80
|
QUICK_HEALTH_CHECKS,
|
|
78
81
|
fts5Tables,
|
|
@@ -80,7 +83,7 @@ import {
|
|
|
80
83
|
lossUnknown,
|
|
81
84
|
storeDamageReport,
|
|
82
85
|
storeHealth
|
|
83
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-JPONKBEQ.js";
|
|
84
87
|
import {
|
|
85
88
|
CORPORA,
|
|
86
89
|
MIGRATIONS,
|
|
@@ -118,55 +121,55 @@ import {
|
|
|
118
121
|
storeClients,
|
|
119
122
|
storeContents,
|
|
120
123
|
vectorIndexCounts
|
|
121
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-7T5BFWZI.js";
|
|
122
125
|
import {
|
|
123
126
|
currentRun,
|
|
124
127
|
readDamageMark,
|
|
125
128
|
readHealthMark,
|
|
126
129
|
readJournalMark,
|
|
127
130
|
recordDeepCheck
|
|
128
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-XIKSGUMQ.js";
|
|
129
132
|
import {
|
|
130
133
|
failureKey,
|
|
131
134
|
isStoreDamage
|
|
132
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-JLXXUEAM.js";
|
|
133
136
|
import {
|
|
134
137
|
modelAddressAllowed,
|
|
135
138
|
onThisComputer
|
|
136
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-7Z53MLQP.js";
|
|
137
140
|
import {
|
|
138
141
|
renderMessages
|
|
139
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-LZPKBN3C.js";
|
|
140
143
|
import {
|
|
141
144
|
levelFor
|
|
142
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-IPKCM55K.js";
|
|
143
146
|
import {
|
|
144
147
|
formatLocator,
|
|
145
148
|
parseLocator
|
|
146
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-AINKLKDN.js";
|
|
147
150
|
import {
|
|
148
151
|
queryFieldsOf
|
|
149
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-RQORQN2V.js";
|
|
150
153
|
import {
|
|
151
154
|
readSharedSection,
|
|
152
155
|
sharedConfigPath,
|
|
153
156
|
writeSharedSection
|
|
154
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-TTF5DP4V.js";
|
|
155
158
|
import {
|
|
156
159
|
readSecret
|
|
157
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-IA7LLLEI.js";
|
|
158
161
|
import {
|
|
159
162
|
storePath
|
|
160
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-L72WUJAS.js";
|
|
161
164
|
import {
|
|
162
165
|
openCache
|
|
163
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-PMQ7GP6X.js";
|
|
164
167
|
import {
|
|
165
168
|
Credentials,
|
|
166
169
|
isMovedRun,
|
|
167
170
|
resolvePaths,
|
|
168
171
|
writeSecurely
|
|
169
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-5JKTVAXX.js";
|
|
170
173
|
import {
|
|
171
174
|
array,
|
|
172
175
|
boolean,
|
|
@@ -191,7 +194,7 @@ import {
|
|
|
191
194
|
} from "./chunk-S4UUN6LD.js";
|
|
192
195
|
import {
|
|
193
196
|
CliError
|
|
194
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-S6JG4YUH.js";
|
|
195
198
|
import {
|
|
196
199
|
__commonJS,
|
|
197
200
|
__name,
|
|
@@ -266,9 +269,9 @@ var require_liquid_node = __commonJS({
|
|
|
266
269
|
__name(isIterator, "isIterator");
|
|
267
270
|
function promisify(fn) {
|
|
268
271
|
return function(...args) {
|
|
269
|
-
return new Promise((
|
|
272
|
+
return new Promise((resolve4, reject2) => {
|
|
270
273
|
fn(...args, (err, result2) => {
|
|
271
|
-
err ? reject2(err) :
|
|
274
|
+
err ? reject2(err) : resolve4(result2);
|
|
272
275
|
});
|
|
273
276
|
});
|
|
274
277
|
};
|
|
@@ -1858,12 +1861,12 @@ var require_liquid_node = __commonJS({
|
|
|
1858
1861
|
return fs$1.readFileSync(filepath, "utf8");
|
|
1859
1862
|
}
|
|
1860
1863
|
__name(readFileSync6, "readFileSync");
|
|
1861
|
-
function
|
|
1864
|
+
function resolve3(root, file2, ext) {
|
|
1862
1865
|
if (!path.extname(file2))
|
|
1863
1866
|
file2 += ext;
|
|
1864
1867
|
return path.resolve(root, file2);
|
|
1865
1868
|
}
|
|
1866
|
-
__name(
|
|
1869
|
+
__name(resolve3, "resolve");
|
|
1867
1870
|
function fallback(file2) {
|
|
1868
1871
|
try {
|
|
1869
1872
|
return requireResolve(file2);
|
|
@@ -1871,10 +1874,10 @@ var require_liquid_node = __commonJS({
|
|
|
1871
1874
|
}
|
|
1872
1875
|
}
|
|
1873
1876
|
__name(fallback, "fallback");
|
|
1874
|
-
function
|
|
1877
|
+
function dirname5(filepath) {
|
|
1875
1878
|
return path.dirname(filepath);
|
|
1876
1879
|
}
|
|
1877
|
-
__name(
|
|
1880
|
+
__name(dirname5, "dirname");
|
|
1878
1881
|
var realpathAsync = promisify(fs$1.realpath);
|
|
1879
1882
|
async function contains(root, file2) {
|
|
1880
1883
|
try {
|
|
@@ -1904,9 +1907,9 @@ var require_liquid_node = __commonJS({
|
|
|
1904
1907
|
readFile,
|
|
1905
1908
|
existsSync: existsSync11,
|
|
1906
1909
|
readFileSync: readFileSync6,
|
|
1907
|
-
resolve:
|
|
1910
|
+
resolve: resolve3,
|
|
1908
1911
|
fallback,
|
|
1909
|
-
dirname:
|
|
1912
|
+
dirname: dirname5,
|
|
1910
1913
|
contains,
|
|
1911
1914
|
containsSync,
|
|
1912
1915
|
sep: path.sep
|
|
@@ -3631,7 +3634,7 @@ var require_liquid_node = __commonJS({
|
|
|
3631
3634
|
uri_escape,
|
|
3632
3635
|
slugify
|
|
3633
3636
|
});
|
|
3634
|
-
var
|
|
3637
|
+
var join7 = argumentsToValue(function(v, arg) {
|
|
3635
3638
|
const array2 = toArray(v);
|
|
3636
3639
|
const sep = isNil(arg) ? " " : stringify(arg);
|
|
3637
3640
|
let outputSize = sep.length * Math.max(array2.length - 1, 0);
|
|
@@ -3907,7 +3910,7 @@ var require_liquid_node = __commonJS({
|
|
|
3907
3910
|
__name(sample, "sample");
|
|
3908
3911
|
var arrayFilters = /* @__PURE__ */ Object.freeze({
|
|
3909
3912
|
__proto__: null,
|
|
3910
|
-
join:
|
|
3913
|
+
join: join7,
|
|
3911
3914
|
last,
|
|
3912
3915
|
first,
|
|
3913
3916
|
reverse,
|
|
@@ -5531,11 +5534,11 @@ var require_liquid_node = __commonJS({
|
|
|
5531
5534
|
}
|
|
5532
5535
|
});
|
|
5533
5536
|
|
|
5534
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5537
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
5535
5538
|
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";
|
|
5536
|
-
import { dirname as
|
|
5539
|
+
import { dirname as dirname4, resolve as resolve2 } from "node:path";
|
|
5537
5540
|
|
|
5538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5541
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/sealed.js
|
|
5539
5542
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
5540
5543
|
import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
|
|
5541
5544
|
import { Transform } from "node:stream";
|
|
@@ -5547,7 +5550,7 @@ var NONCE = 12;
|
|
|
5547
5550
|
var TAG = 16;
|
|
5548
5551
|
var HEADER = MAGIC.length + 3 + SALT + NONCE;
|
|
5549
5552
|
var COST = { log2N: 17, r: 8, p: 1 };
|
|
5550
|
-
var keyOf = /* @__PURE__ */ __name((password, salt, { log2N, r, p }) => new Promise((
|
|
5553
|
+
var keyOf = /* @__PURE__ */ __name((password, salt, { log2N, r, p }) => new Promise((resolve3, reject) => scrypt(password, salt, 32, { N: 2 ** log2N, r, p, maxmem: 2 * 128 * r * 2 ** log2N }, (error, key) => error ? reject(error) : resolve3(key))), "keyOf");
|
|
5551
5554
|
var checkFor = /* @__PURE__ */ __name(async (password, cost = COST) => {
|
|
5552
5555
|
refuseEmpty(password);
|
|
5553
5556
|
const salt = randomBytes(SALT);
|
|
@@ -5642,7 +5645,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
|
|
|
5642
5645
|
renameSync(pending, to);
|
|
5643
5646
|
}, "unsealFile");
|
|
5644
5647
|
|
|
5645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5648
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/compatibility.js
|
|
5646
5649
|
var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
|
|
5647
5650
|
var fileSchemaOf = /* @__PURE__ */ __name((database) => {
|
|
5648
5651
|
const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
|
|
@@ -5666,7 +5669,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
|
|
|
5666
5669
|
};
|
|
5667
5670
|
}, "compatibilityOf");
|
|
5668
5671
|
|
|
5669
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5672
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/repair.js
|
|
5670
5673
|
import { createHash as createHash2 } from "node:crypto";
|
|
5671
5674
|
var COPY_MARK = "__repair_";
|
|
5672
5675
|
var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
|
|
@@ -5920,19 +5923,79 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
|
|
|
5920
5923
|
return found;
|
|
5921
5924
|
}, "deleteCopy");
|
|
5922
5925
|
|
|
5923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5926
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/path-options.js
|
|
5927
|
+
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
5928
|
+
var PATH_NAME = /^([a-z]+-)*(file|path|dir|directory|folder)s?$/;
|
|
5929
|
+
var PATH_PLACEHOLDER = /[<[]([a-z]+-)*(file|path|dir|directory|folder)s?(\.\.\.)?[>\]]/;
|
|
5930
|
+
var NOT_LOCAL = /* @__PURE__ */ new WeakMap();
|
|
5931
|
+
var IN_BACKUPS = /* @__PURE__ */ new WeakMap();
|
|
5932
|
+
var mark = /* @__PURE__ */ __name((marks, command, names) => {
|
|
5933
|
+
marks.set(command, /* @__PURE__ */ new Set([...marks.get(command) ?? [], ...names]));
|
|
5934
|
+
return command;
|
|
5935
|
+
}, "mark");
|
|
5936
|
+
var notLocalPaths = /* @__PURE__ */ __name((command, ...names) => mark(NOT_LOCAL, command, names), "notLocalPaths");
|
|
5937
|
+
var inStoreBackups = /* @__PURE__ */ __name((command, ...names) => mark(IN_BACKUPS, command, names), "inStoreBackups");
|
|
5938
|
+
var marked = /* @__PURE__ */ __name((marks, command, name) => {
|
|
5939
|
+
for (let at = command; at; at = at.parent)
|
|
5940
|
+
if (marks.get(at)?.has(name))
|
|
5941
|
+
return true;
|
|
5942
|
+
return false;
|
|
5943
|
+
}, "marked");
|
|
5944
|
+
var isLocalPathOption = /* @__PURE__ */ __name((command, option) => PATH_PLACEHOLDER.test(option.flags) && !marked(NOT_LOCAL, command, option.attributeName()), "isLocalPathOption");
|
|
5945
|
+
var isLocalPathArgument = /* @__PURE__ */ __name((command, argument) => PATH_NAME.test(argument.name()) && !marked(NOT_LOCAL, command, argument.name()), "isLocalPathArgument");
|
|
5946
|
+
var isNamed = /* @__PURE__ */ __name((value) => value !== "" && value !== "-" && !value.includes("://"), "isNamed");
|
|
5947
|
+
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one) => typeof one === "string" && isNamed(one)), "valuesOf");
|
|
5948
|
+
var localPathsOf = /* @__PURE__ */ __name((action) => {
|
|
5949
|
+
const found = [];
|
|
5950
|
+
for (let at = action; at; at = at.parent) {
|
|
5951
|
+
for (const option of at.options) {
|
|
5952
|
+
const key = option.attributeName();
|
|
5953
|
+
if (!isLocalPathOption(at, option) || at.getOptionValueSource(key) !== "cli")
|
|
5954
|
+
continue;
|
|
5955
|
+
const flag = option.long ?? option.flags;
|
|
5956
|
+
for (const value of valuesOf(at.getOptionValue(key)))
|
|
5957
|
+
found.push({ flag, value, inBackups: marked(IN_BACKUPS, at, key) });
|
|
5958
|
+
}
|
|
5959
|
+
}
|
|
5960
|
+
action.registeredArguments.forEach((argument, index) => {
|
|
5961
|
+
const value = action.processedArgs[index];
|
|
5962
|
+
if (!isLocalPathArgument(action, argument) || value === argument.defaultValue)
|
|
5963
|
+
return;
|
|
5964
|
+
for (const one of valuesOf(value))
|
|
5965
|
+
found.push({ flag: `<${argument.name()}>`, value: one, inBackups: marked(IN_BACKUPS, action, argument.name()) });
|
|
5966
|
+
});
|
|
5967
|
+
return found;
|
|
5968
|
+
}, "localPathsOf");
|
|
5969
|
+
var refuseAgentPaths = /* @__PURE__ */ __name((action, app, env) => {
|
|
5970
|
+
const backups = join(dirname(resolve(storePath(env))), "backups");
|
|
5971
|
+
for (const { flag, value, inBackups } of localPathsOf(action)) {
|
|
5972
|
+
if (inBackups && inside(realPathOf(value), realPathOf(backups)))
|
|
5973
|
+
continue;
|
|
5974
|
+
if (refusedPlace(value, app, env))
|
|
5975
|
+
throw new CliError("permission_error", `${flag} ${value}: an agent's call reads and writes no credential folder, no folder of a WireCat tool and not the message store \u2014 the owner runs it in a terminal`, { param: flag, sent: false });
|
|
5976
|
+
}
|
|
5977
|
+
}, "refuseAgentPaths");
|
|
5978
|
+
var absoluteFrom = /* @__PURE__ */ __name((cwd, value) => {
|
|
5979
|
+
if (Array.isArray(value))
|
|
5980
|
+
return value.map((one) => absoluteFrom(cwd, one));
|
|
5981
|
+
if (typeof value !== "string" || !isNamed(value) || isAbsolute(value))
|
|
5982
|
+
return value;
|
|
5983
|
+
return resolve(cwd, value);
|
|
5984
|
+
}, "absoluteFrom");
|
|
5985
|
+
|
|
5986
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
5924
5987
|
import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
|
|
5925
5988
|
|
|
5926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5989
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
5927
5990
|
import { existsSync as existsSync3 } from "node:fs";
|
|
5928
5991
|
|
|
5929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5992
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
5930
5993
|
import { execFileSync, spawn } from "node:child_process";
|
|
5931
5994
|
import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
|
|
5932
|
-
import { basename, dirname, join } from "node:path";
|
|
5995
|
+
import { basename, dirname as dirname2, join as join2 } from "node:path";
|
|
5933
5996
|
import { Transform as Transform2 } from "node:stream";
|
|
5934
5997
|
|
|
5935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5998
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/refill.js
|
|
5936
5999
|
var REFILL_MARGIN_MS = 864e5;
|
|
5937
6000
|
var TIME_KEYS = 1e12;
|
|
5938
6001
|
var integerId = `external_id GLOB '[0-9]*' AND NOT external_id GLOB '*[^0-9]*'`;
|
|
@@ -6012,7 +6075,7 @@ var forgetMail = /* @__PURE__ */ __name((database, cutoff, now) => {
|
|
|
6012
6075
|
return [...folders].map(([account, count3]) => ({ account, folders: count3 }));
|
|
6013
6076
|
}, "forgetMail");
|
|
6014
6077
|
|
|
6015
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6078
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
6016
6079
|
var SQLITE3_MINIMUM = [3, 43, 0];
|
|
6017
6080
|
var STORE_PARTS = ["", "-wal", "-shm"];
|
|
6018
6081
|
var RECOVER_LOCK = ".recover-lock";
|
|
@@ -6088,8 +6151,8 @@ var takeRecoverLock = /* @__PURE__ */ __name((path) => {
|
|
|
6088
6151
|
return () => rmSync2(lock, { force: true });
|
|
6089
6152
|
}, "takeRecoverLock");
|
|
6090
6153
|
var storeHolders = /* @__PURE__ */ __name((path) => {
|
|
6091
|
-
const folder = realpathSync(
|
|
6092
|
-
const files = STORE_PARTS.map((suffix) =>
|
|
6154
|
+
const folder = realpathSync(dirname2(path));
|
|
6155
|
+
const files = STORE_PARTS.map((suffix) => join2(folder, `${basename(path)}${suffix}`));
|
|
6093
6156
|
const wanted = process.platform === "linux" ? files.flatMap((file2) => [file2, `${file2} (deleted)`]) : files.filter(existsSync2);
|
|
6094
6157
|
const recovering = runningRecovery(path);
|
|
6095
6158
|
const pids = holdersOf(wanted);
|
|
@@ -6232,7 +6295,7 @@ var placeLostRows = /* @__PURE__ */ __name((database) => {
|
|
|
6232
6295
|
}
|
|
6233
6296
|
return Object.fromEntries(Object.entries(placed).filter(([, rows2]) => rows2 > 0));
|
|
6234
6297
|
}, "placeLostRows");
|
|
6235
|
-
var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3") => new Promise((
|
|
6298
|
+
var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3") => new Promise((resolve3, reject) => {
|
|
6236
6299
|
const reader = spawn(program, ["-readonly", path, `.recover --ignore-freelist --lost-and-found ${LOST_AND_FOUND}`], {
|
|
6237
6300
|
stdio: ["ignore", "pipe", "pipe"]
|
|
6238
6301
|
});
|
|
@@ -6269,7 +6332,7 @@ var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3"
|
|
|
6269
6332
|
if (readerCode !== 0)
|
|
6270
6333
|
reject(new CliError("validation_error", `sqlite3 could not read the store: ${errors.join("; ")}`));
|
|
6271
6334
|
else
|
|
6272
|
-
|
|
6335
|
+
resolve3({ errors, read });
|
|
6273
6336
|
}, "exited");
|
|
6274
6337
|
reader.on("error", reject);
|
|
6275
6338
|
writer.on("error", reject);
|
|
@@ -6405,7 +6468,7 @@ var recoverStore = /* @__PURE__ */ __name(async ({ path, command, version, sqlit
|
|
|
6405
6468
|
try {
|
|
6406
6469
|
refuseInUse(path);
|
|
6407
6470
|
const bytes = STORE_PARTS.reduce((sum, suffix) => sum + (statSync2(`${path}${suffix}`, { throwIfNoEntry: false })?.size ?? 0), 0);
|
|
6408
|
-
const { bavail, bsize } = statfsSync(
|
|
6471
|
+
const { bavail, bsize } = statfsSync(dirname2(path));
|
|
6409
6472
|
if (Number(bavail) * Number(bsize) < bytes * 1.2)
|
|
6410
6473
|
throw new CliError("validation_error", `the recovery needs about ${Math.ceil(bytes * 1.2 / 1e9)} GB free beside the store`);
|
|
6411
6474
|
return await recoverLocked({ path, command, version, sqlite3, now, note, copy, started, program });
|
|
@@ -6543,7 +6606,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6543
6606
|
}
|
|
6544
6607
|
}, "recoverLocked");
|
|
6545
6608
|
|
|
6546
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6609
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
6547
6610
|
var COUNTED = [
|
|
6548
6611
|
"accounts",
|
|
6549
6612
|
"chats",
|
|
@@ -6578,7 +6641,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
|
|
|
6578
6641
|
}
|
|
6579
6642
|
const journal = readJournalMark(path);
|
|
6580
6643
|
recordDeepCheck(path, health, { cli: command, ...version ? { version } : {}, schema });
|
|
6581
|
-
const
|
|
6644
|
+
const mark2 = readDamageMark(path);
|
|
6582
6645
|
const lastKnownGood = readHealthMark(path)?.last_ok_at ?? null;
|
|
6583
6646
|
const inUse = storeHolders(path) ?? null;
|
|
6584
6647
|
const timers = activeTimers() ?? null;
|
|
@@ -6586,7 +6649,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
|
|
|
6586
6649
|
const report = storeDamageReport({
|
|
6587
6650
|
health,
|
|
6588
6651
|
command,
|
|
6589
|
-
mark,
|
|
6652
|
+
mark: mark2,
|
|
6590
6653
|
journal,
|
|
6591
6654
|
lastOkAt: lastKnownGood,
|
|
6592
6655
|
holders: inUse,
|
|
@@ -6604,7 +6667,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
|
|
|
6604
6667
|
invalidJson: health.invalidJson ?? [],
|
|
6605
6668
|
rows,
|
|
6606
6669
|
report,
|
|
6607
|
-
damageMark:
|
|
6670
|
+
damageMark: mark2 ? (({ inode: _, ...seen }) => seen)(mark2) : null,
|
|
6608
6671
|
lastKnownGood,
|
|
6609
6672
|
inUse,
|
|
6610
6673
|
timers,
|
|
@@ -6637,12 +6700,12 @@ var storeRecoveryRun = /* @__PURE__ */ __name(async (env, { command, version, no
|
|
|
6637
6700
|
}, "storeRecoveryRun");
|
|
6638
6701
|
var refetchNotes = /* @__PURE__ */ __name(({ since, chats, mail }) => {
|
|
6639
6702
|
const from = since === null ? "from the start" : `from ${since} on`;
|
|
6640
|
-
const
|
|
6703
|
+
const marked2 = [
|
|
6641
6704
|
...chats.map(({ provider, account, chats: chats2 }) => `${chats2} chats of ${provider} ${account}`),
|
|
6642
6705
|
...mail.map(({ account, folders }) => `${folders} mail folders of ${account}`)
|
|
6643
6706
|
];
|
|
6644
6707
|
return [
|
|
6645
|
-
|
|
6708
|
+
marked2.length > 0 ? `marked as not fetched ${from}, so the next sync or serve fetches it again: ${marked2.join(", ")}` : `nothing held ${from} was marked as fetched, so there is nothing to fetch again`,
|
|
6646
6709
|
...chats.filter(({ provider }) => provider === "whatsapp").map(({ account }) => `whatsapp ${account}: WhatsApp cannot be asked for its chats, so only what the phone pushes while serve runs comes back`),
|
|
6647
6710
|
"notes, memories, tags and whatever else only this store held cannot be fetched again"
|
|
6648
6711
|
];
|
|
@@ -6699,7 +6762,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
|
|
|
6699
6762
|
return recover;
|
|
6700
6763
|
}, "storeRecoverCommand");
|
|
6701
6764
|
|
|
6702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6765
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
6703
6766
|
var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
|
|
6704
6767
|
var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
|
|
6705
6768
|
var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
|
|
@@ -6745,7 +6808,7 @@ var storeInfoCommand = /* @__PURE__ */ __name(() => annotate(new Command("info")
|
|
|
6745
6808
|
renderAnswer(this, outputFor(this), itemOf(answer));
|
|
6746
6809
|
}), "storeInfoCommand");
|
|
6747
6810
|
|
|
6748
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6811
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
|
|
6749
6812
|
var ENCRYPT_OPTION = [
|
|
6750
6813
|
"--encrypt",
|
|
6751
6814
|
"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"
|
|
@@ -6764,9 +6827,9 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
|
|
|
6764
6827
|
return password;
|
|
6765
6828
|
}, "passwordOf");
|
|
6766
6829
|
|
|
6767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6830
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/rules.js
|
|
6768
6831
|
import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
|
|
6769
|
-
import { join as
|
|
6832
|
+
import { join as join3 } from "node:path";
|
|
6770
6833
|
var REPLY_ACTIONS = ["reply", "task"];
|
|
6771
6834
|
var REPLY_MODELS = ["fill-only", "may-reword"];
|
|
6772
6835
|
var REPLY_KINDS = ["dialog", "group"];
|
|
@@ -6852,7 +6915,7 @@ var defaultRule = /* @__PURE__ */ __name((id) => ({
|
|
|
6852
6915
|
reply: { template: "", asReply: true },
|
|
6853
6916
|
limits: { perChat: "1/1d", perPerson: "1/1d" }
|
|
6854
6917
|
}), "defaultRule");
|
|
6855
|
-
var repliesPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) =>
|
|
6918
|
+
var repliesPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies.json`), "repliesPathFor");
|
|
6856
6919
|
var EVERYONE = { reply: "all", allow: { people: [], chats: [] }, deny: { people: [], chats: [] } };
|
|
6857
6920
|
var outsideAudience = /* @__PURE__ */ __name((audience, person, chat) => {
|
|
6858
6921
|
if (person !== null && audience.deny.people.includes(person))
|
|
@@ -6935,9 +6998,9 @@ var problem = /* @__PURE__ */ __name((issue) => {
|
|
|
6935
6998
|
}, "problem");
|
|
6936
6999
|
var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
|
|
6937
7000
|
|
|
6938
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7001
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/state.js
|
|
6939
7002
|
import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
|
|
6940
|
-
import { join as
|
|
7003
|
+
import { join as join4 } from "node:path";
|
|
6941
7004
|
var ANSWERED_KEPT = 1e3;
|
|
6942
7005
|
var times = record(string(), array(string()));
|
|
6943
7006
|
var stateFile = object({
|
|
@@ -6949,7 +7012,7 @@ var stateFile = object({
|
|
|
6949
7012
|
});
|
|
6950
7013
|
var emptyState = /* @__PURE__ */ __name(() => ({ paused: false, answered: [], sent: {} }), "emptyState");
|
|
6951
7014
|
var answeredKey = /* @__PURE__ */ __name((message) => `${message.chatId}:${message.id}`, "answeredKey");
|
|
6952
|
-
var repliesStatePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) =>
|
|
7015
|
+
var repliesStatePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join4(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, `${profile}.replies-state.json`), "repliesStatePathFor");
|
|
6953
7016
|
var readRepliesState = /* @__PURE__ */ __name((path) => {
|
|
6954
7017
|
if (!existsSync6(path))
|
|
6955
7018
|
return emptyState();
|
|
@@ -6988,7 +7051,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
|
|
|
6988
7051
|
}, "recordReply");
|
|
6989
7052
|
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");
|
|
6990
7053
|
|
|
6991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7054
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/decide.js
|
|
6992
7055
|
var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
|
|
6993
7056
|
var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
|
|
6994
7057
|
const { message, chat, owner, sender } = incoming;
|
|
@@ -7094,10 +7157,10 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
|
|
|
7094
7157
|
return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
|
|
7095
7158
|
}, "filled");
|
|
7096
7159
|
|
|
7097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7160
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
7098
7161
|
var import_liquidjs2 = __toESM(require_liquid_node(), 1);
|
|
7099
7162
|
|
|
7100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7163
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/render/liquid.js
|
|
7101
7164
|
var import_liquidjs = __toESM(require_liquid_node(), 1);
|
|
7102
7165
|
var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
7103
7166
|
const engine = new import_liquidjs.Liquid({
|
|
@@ -7124,7 +7187,7 @@ var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
|
7124
7187
|
return engine;
|
|
7125
7188
|
}, "safeLiquid");
|
|
7126
7189
|
|
|
7127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7190
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
7128
7191
|
var TEMPLATE_LIMITS = {
|
|
7129
7192
|
parse: 32768,
|
|
7130
7193
|
renders: 2e3,
|
|
@@ -7263,7 +7326,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
7263
7326
|
}
|
|
7264
7327
|
}, "renderReplyTemplate");
|
|
7265
7328
|
|
|
7266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7329
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
|
|
7267
7330
|
var DRY_RUN_DAYS = 7;
|
|
7268
7331
|
var PAGE = 500;
|
|
7269
7332
|
var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
|
|
@@ -7377,7 +7440,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
|
|
|
7377
7440
|
}
|
|
7378
7441
|
}, "storedSince");
|
|
7379
7442
|
|
|
7380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7443
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/models/ai.js
|
|
7381
7444
|
var AI_PROVIDERS = ["anthropic", "openai", "ollama"];
|
|
7382
7445
|
var DEFAULT_BASE_URL = {
|
|
7383
7446
|
anthropic: "https://api.anthropic.com",
|
|
@@ -7527,7 +7590,7 @@ var checkAi = /* @__PURE__ */ __name(async (deps) => {
|
|
|
7527
7590
|
}
|
|
7528
7591
|
}, "checkAi");
|
|
7529
7592
|
|
|
7530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7593
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/models/purpose.js
|
|
7531
7594
|
var HOSTED = {
|
|
7532
7595
|
openai: "https://api.openai.com/v1",
|
|
7533
7596
|
anthropic: "https://api.anthropic.com"
|
|
@@ -7548,14 +7611,14 @@ var purposeModel = /* @__PURE__ */ __name((settings, purpose, deps) => {
|
|
|
7548
7611
|
return shared ? { target: shared.target, key: /* @__PURE__ */ __name(() => shared.key, "key"), shared: shared.setting } : void 0;
|
|
7549
7612
|
}, "purposeModel");
|
|
7550
7613
|
|
|
7551
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7614
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/consents.js
|
|
7552
7615
|
import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
|
|
7553
|
-
import { join as
|
|
7616
|
+
import { join as join5 } from "node:path";
|
|
7554
7617
|
var shape = strictObject({
|
|
7555
7618
|
provider: nullable(pipe(string(), minLength(1))),
|
|
7556
7619
|
deniedChats: array(pipe(string(), minLength(1)))
|
|
7557
7620
|
});
|
|
7558
|
-
var replyConsentPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) =>
|
|
7621
|
+
var replyConsentPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join5(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies-consents.json`), "replyConsentPathFor");
|
|
7559
7622
|
var readReplyConsent = /* @__PURE__ */ __name((path) => {
|
|
7560
7623
|
if (!existsSync7(path))
|
|
7561
7624
|
return { provider: null, deniedChats: [] };
|
|
@@ -7573,7 +7636,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
|
|
|
7573
7636
|
return consent.provider === provider && !consent.deniedChats.includes(chat);
|
|
7574
7637
|
}, "mayModelReply");
|
|
7575
7638
|
|
|
7576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7639
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/rendering.js
|
|
7577
7640
|
var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
|
|
7578
7641
|
ai: true
|
|
7579
7642
|
}) => async (rule2, message, chat, now) => {
|
|
@@ -7621,7 +7684,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
|
|
|
7621
7684
|
return result2;
|
|
7622
7685
|
}, "replyRenderer");
|
|
7623
7686
|
|
|
7624
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7687
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/serve.js
|
|
7625
7688
|
var NOT_ALLOWED = "replies.send is not allow";
|
|
7626
7689
|
var NO_RULES = "no rules";
|
|
7627
7690
|
var ONLY_TASK = "opened a task, sent nothing";
|
|
@@ -7714,7 +7777,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
|
|
|
7714
7777
|
return { skip: why };
|
|
7715
7778
|
}, "replyTo");
|
|
7716
7779
|
|
|
7717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7780
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
|
|
7718
7781
|
var START_SYNC_DELAY_MS = 3e4;
|
|
7719
7782
|
var START_SYNC_BUDGET_MS = 5 * 6e4;
|
|
7720
7783
|
var START_SYNC_WINDOW_MS = 7 * 864e5;
|
|
@@ -7791,7 +7854,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn,
|
|
|
7791
7854
|
};
|
|
7792
7855
|
}, "startSync");
|
|
7793
7856
|
|
|
7794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7857
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
|
|
7795
7858
|
var FIRST_FETCH_MS = 6e4;
|
|
7796
7859
|
var DAY_MS = 864e5;
|
|
7797
7860
|
var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
|
|
@@ -7845,7 +7908,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs =
|
|
|
7845
7908
|
};
|
|
7846
7909
|
}, "memberFetches");
|
|
7847
7910
|
|
|
7848
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7911
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
|
|
7849
7912
|
var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
|
|
7850
7913
|
var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
|
|
7851
7914
|
if (context.format === "pretty") {
|
|
@@ -7878,22 +7941,22 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
|
|
|
7878
7941
|
return context;
|
|
7879
7942
|
}, "recordDiagnostics");
|
|
7880
7943
|
|
|
7881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7944
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
|
|
7882
7945
|
import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync as realpathSync2 } from "node:fs";
|
|
7883
|
-
import { dirname as
|
|
7946
|
+
import { dirname as dirname3, join as join6 } from "node:path";
|
|
7884
7947
|
var OUTDATED_CHECK_MS = 6e4;
|
|
7885
7948
|
var ownPackageRoot = /* @__PURE__ */ __name((running, script = process.argv[1]) => {
|
|
7886
7949
|
let dir;
|
|
7887
7950
|
try {
|
|
7888
|
-
dir =
|
|
7951
|
+
dir = dirname3(realpathSync2(script ?? ""));
|
|
7889
7952
|
} catch {
|
|
7890
7953
|
return void 0;
|
|
7891
7954
|
}
|
|
7892
7955
|
for (let up = 0; up < 8; up++) {
|
|
7893
|
-
const manifest =
|
|
7956
|
+
const manifest = join6(dir, "package.json");
|
|
7894
7957
|
if (existsSync8(manifest))
|
|
7895
7958
|
return installedVersion(dir) === running ? dir : void 0;
|
|
7896
|
-
const parent =
|
|
7959
|
+
const parent = dirname3(dir);
|
|
7897
7960
|
if (parent === dir)
|
|
7898
7961
|
return void 0;
|
|
7899
7962
|
dir = parent;
|
|
@@ -7902,7 +7965,7 @@ var ownPackageRoot = /* @__PURE__ */ __name((running, script = process.argv[1])
|
|
|
7902
7965
|
}, "ownPackageRoot");
|
|
7903
7966
|
var installedVersion = /* @__PURE__ */ __name((root) => {
|
|
7904
7967
|
try {
|
|
7905
|
-
const { version } = JSON.parse(readFileSync5(
|
|
7968
|
+
const { version } = JSON.parse(readFileSync5(join6(root, "package.json"), "utf8"));
|
|
7906
7969
|
return typeof version === "string" ? version : void 0;
|
|
7907
7970
|
} catch {
|
|
7908
7971
|
return void 0;
|
|
@@ -7964,7 +8027,7 @@ var watchOutdated = /* @__PURE__ */ __name(({ check: check2, onOutdated, everyMs
|
|
|
7964
8027
|
};
|
|
7965
8028
|
}, "watchOutdated");
|
|
7966
8029
|
|
|
7967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8030
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
|
|
7968
8031
|
var STEMS_EVERY_MS = 3e4;
|
|
7969
8032
|
var STEMS_SLICE_MS = 2e3;
|
|
7970
8033
|
var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
|
|
@@ -8004,7 +8067,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
|
|
|
8004
8067
|
};
|
|
8005
8068
|
}, "stemFills");
|
|
8006
8069
|
|
|
8007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8070
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
|
|
8008
8071
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
|
|
8009
8072
|
var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
8010
8073
|
kind: attachment.kind,
|
|
@@ -8100,7 +8163,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
|
|
|
8100
8163
|
locale: messenger.app.locale
|
|
8101
8164
|
}), "viewOf");
|
|
8102
8165
|
|
|
8103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8166
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
|
|
8104
8167
|
var observed = /* @__PURE__ */ __name((value) => ({
|
|
8105
8168
|
value: value.value,
|
|
8106
8169
|
observed_at: value.observedAt,
|
|
@@ -8167,7 +8230,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
|
|
|
8167
8230
|
}
|
|
8168
8231
|
}, "watchEventItem");
|
|
8169
8232
|
|
|
8170
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8233
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
|
|
8171
8234
|
var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
|
|
8172
8235
|
output: { entity: "watch_item" },
|
|
8173
8236
|
effects: REMOTE_READ,
|
|
@@ -8322,7 +8385,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
|
|
|
8322
8385
|
}
|
|
8323
8386
|
}, "describe");
|
|
8324
8387
|
|
|
8325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8388
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
|
|
8326
8389
|
var CURRENT_EVERY_MS = 6e4;
|
|
8327
8390
|
var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
8328
8391
|
const command = annotate(new Command("serve"), {
|
|
@@ -8622,7 +8685,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
|
|
|
8622
8685
|
};
|
|
8623
8686
|
}, "tasking");
|
|
8624
8687
|
|
|
8625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8688
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
|
|
8626
8689
|
import { existsSync as existsSync9 } from "node:fs";
|
|
8627
8690
|
var PATH = "store tables list";
|
|
8628
8691
|
var STORE_TABLES_QUERY = {
|
|
@@ -8665,7 +8728,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((owner) => {
|
|
|
8665
8728
|
return tables;
|
|
8666
8729
|
}, "storeTablesCommand");
|
|
8667
8730
|
|
|
8668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8731
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
8669
8732
|
var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
|
|
8670
8733
|
var WORD_INDEX = "message_words";
|
|
8671
8734
|
var schemaOf = /* @__PURE__ */ __name((database) => {
|
|
@@ -8691,7 +8754,7 @@ var readingOnly = /* @__PURE__ */ __name(async (path, read) => {
|
|
|
8691
8754
|
database.close();
|
|
8692
8755
|
}
|
|
8693
8756
|
}, "readingOnly");
|
|
8694
|
-
var withoutInode = /* @__PURE__ */ __name(({ inode: _, ...
|
|
8757
|
+
var withoutInode = /* @__PURE__ */ __name(({ inode: _, ...mark2 }) => mark2, "withoutInode");
|
|
8695
8758
|
var fileSchema = /* @__PURE__ */ __name(async (path) => {
|
|
8696
8759
|
try {
|
|
8697
8760
|
return await readingOnly(path, (database) => fileSchemaOf(database).version);
|
|
@@ -8710,7 +8773,7 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, v
|
|
|
8710
8773
|
...version ? { version } : {},
|
|
8711
8774
|
schema: await fileSchema(path)
|
|
8712
8775
|
}) : null;
|
|
8713
|
-
const
|
|
8776
|
+
const mark2 = readDamageMark(path);
|
|
8714
8777
|
const lastKnownGood = readHealthMark(path)?.last_ok_at ?? null;
|
|
8715
8778
|
const health = {
|
|
8716
8779
|
checked: checked.checked,
|
|
@@ -8722,11 +8785,11 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, v
|
|
|
8722
8785
|
...checked.invalidJson?.length ? { invalidJson: checked.invalidJson } : {},
|
|
8723
8786
|
...checked.searchIndexes?.some((index) => !index.ok) ? { damagedSearchIndexes: checked.searchIndexes.filter((index) => !index.ok).map((index) => index.name) } : {}
|
|
8724
8787
|
};
|
|
8725
|
-
const damage = command ? storeDamageReport({ health: checked, command, mark, journal, lastOkAt: lastKnownGood }) : null;
|
|
8788
|
+
const damage = command ? storeDamageReport({ health: checked, command, mark: mark2, journal, lastOkAt: lastKnownGood }) : null;
|
|
8726
8789
|
const healthOf = {
|
|
8727
8790
|
health,
|
|
8728
8791
|
lastKnownGood,
|
|
8729
|
-
...
|
|
8792
|
+
...mark2 ? { damageMark: withoutInode(mark2) } : {},
|
|
8730
8793
|
...journal ? { journalMark: journal } : {},
|
|
8731
8794
|
...recorded?.cleared ? { damageMarkCleared: withoutInode(recorded.cleared) } : {},
|
|
8732
8795
|
// `what` keeps memo's doctor, which reads it, compiling until it moves to `whatHappened`.
|
|
@@ -8913,7 +8976,7 @@ var inspect = /* @__PURE__ */ __name((path) => reading(path, (database) => {
|
|
|
8913
8976
|
...schema.version >= 71 ? [["content_post_words", indexIntegrity(database, "content_post_words", 0)]] : []
|
|
8914
8977
|
]);
|
|
8915
8978
|
const size = bytesOf2(path) + bytesOf2(`${path}-wal`);
|
|
8916
|
-
const { bavail, bsize } = statfsSync2(
|
|
8979
|
+
const { bavail, bsize } = statfsSync2(dirname4(path));
|
|
8917
8980
|
const free = Number(bavail) * Number(bsize);
|
|
8918
8981
|
const behind = schema.version > 0 ? chatsBehind(database) : [];
|
|
8919
8982
|
const vectorIndexes = schema.version >= 34 ? vectorIndexCounts(database) : [];
|
|
@@ -8998,8 +9061,9 @@ var chatsBehind = /* @__PURE__ */ __name((database) => database.prepare(`SELECT
|
|
|
8998
9061
|
held: row.held === null ? null : isoOf(row.held),
|
|
8999
9062
|
refreshed: isoOf(row.refreshed)
|
|
9000
9063
|
})), "chatsBehind");
|
|
9001
|
-
var migrateCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("migrate"), { output: { entity: "store_migration" }, effects: LOCAL_WRITE }).summary(`migrate an older ${archive(owner)}`).description("bring the store up to this build's schema, then normalize, index and stem the messages and notes stored before it").action(async function() {
|
|
9064
|
+
var migrateCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("migrate"), { output: { entity: "store_migration" }, effects: LOCAL_WRITE }).summary(`migrate an older ${archive(owner)}`).description("bring the store up to this build's schema, then normalize, index and stem the messages and notes stored before it").option("--no-backup", "migrate even when no rollback copy can be written; older tools then cannot open the store again").action(async function() {
|
|
9002
9065
|
const { renderer } = outputFor(this);
|
|
9066
|
+
const { backup = true } = this.opts();
|
|
9003
9067
|
const path = storePath(environmentOf(this).env ?? process.env);
|
|
9004
9068
|
if (!existsSync10(path)) {
|
|
9005
9069
|
result(this, { path, exists: false });
|
|
@@ -9008,11 +9072,13 @@ var migrateCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("mig
|
|
|
9008
9072
|
}
|
|
9009
9073
|
const answer = await reading(path, (database) => {
|
|
9010
9074
|
const from = schemaOf(database).version;
|
|
9011
|
-
migrate(database, {
|
|
9075
|
+
const notice = migrate(database, {
|
|
9012
9076
|
command: owner.app.command,
|
|
9013
9077
|
version: owner.app.version,
|
|
9014
|
-
rollback: { store: path, warn: /* @__PURE__ */ __name((line) => renderer.warn(line), "warn") }
|
|
9078
|
+
rollback: { store: path, warn: /* @__PURE__ */ __name((line) => renderer.warn(line), "warn"), withoutCopy: !backup }
|
|
9015
9079
|
});
|
|
9080
|
+
if (notice)
|
|
9081
|
+
renderer.warn(notice);
|
|
9016
9082
|
const { normalized, indexed, terms } = buildWordIndex(database, (note) => renderer.note(note));
|
|
9017
9083
|
const stemmed = buildStems(database, (note) => renderer.note(note));
|
|
9018
9084
|
const notes = buildNoteIndex(database, (note) => renderer.note(note));
|
|
@@ -9103,10 +9169,10 @@ var vacuumInto = /* @__PURE__ */ __name(async (path, target) => {
|
|
|
9103
9169
|
}
|
|
9104
9170
|
}, "vacuumInto");
|
|
9105
9171
|
var stampNow = /* @__PURE__ */ __name(() => (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-"), "stampNow");
|
|
9106
|
-
var backupCommand = /* @__PURE__ */ __name(() => destroysNothing(annotate(new Command("backup"), { output: { entity: "store_backup" }, effects: LOCAL_WRITE })).description("copy the store into a new file, while it is in use; never overwrites a file").argument("<file>", "the new file").option(...ENCRYPT_OPTION).action(async function(file2) {
|
|
9172
|
+
var backupCommand = /* @__PURE__ */ __name(() => inStoreBackups(destroysNothing(annotate(new Command("backup"), { output: { entity: "store_backup" }, effects: LOCAL_WRITE })), "file").description("copy the store into a new file, while it is in use; never overwrites a file").argument("<file>", "the new file").option(...ENCRYPT_OPTION).action(async function(file2) {
|
|
9107
9173
|
const { encrypt } = this.opts();
|
|
9108
9174
|
const path = storePath(environmentOf(this).env ?? process.env);
|
|
9109
|
-
const target =
|
|
9175
|
+
const target = resolve2(file2);
|
|
9110
9176
|
const { app, env } = environmentOf(this);
|
|
9111
9177
|
if (app)
|
|
9112
9178
|
refuseLockedOutput(target, app, env ?? process.env, "<file>");
|
|
@@ -9143,8 +9209,8 @@ var backupCommand = /* @__PURE__ */ __name(() => destroysNothing(annotate(new Co
|
|
|
9143
9209
|
}), "backupCommand");
|
|
9144
9210
|
var decryptCommand = /* @__PURE__ */ __name(() => annotate(new Command("decrypt"), { output: { entity: "store_decrypt" }, effects: LOCAL_WRITE }).description("open a file written with --encrypt into a new file; asks for its password").argument("<file>", "a file `store backup --encrypt` or `store export --encrypt` wrote").requiredOption("--output <file>", "the new file, readable only by you").action(async function(file2) {
|
|
9145
9211
|
const { output } = this.opts();
|
|
9146
|
-
const from =
|
|
9147
|
-
const to =
|
|
9212
|
+
const from = resolve2(file2);
|
|
9213
|
+
const to = resolve2(output);
|
|
9148
9214
|
if (!existsSync10(from))
|
|
9149
9215
|
throw new CliError("not_found", `no file at ${from}`);
|
|
9150
9216
|
if (!isSealed(from))
|
|
@@ -9154,16 +9220,16 @@ var decryptCommand = /* @__PURE__ */ __name(() => annotate(new Command("decrypt"
|
|
|
9154
9220
|
await unsealFile(from, to, await passwordOf(this, { twice: false }));
|
|
9155
9221
|
result(this, { path: to, from, bytes: bytesOf2(to) });
|
|
9156
9222
|
}), "decryptCommand");
|
|
9157
|
-
var restoreCommand = /* @__PURE__ */ __name((owner) => grantsAuthority(annotate(new Command("restore"), { output: { entity: "store_restore" }, effects: LOCAL_WRITE })).summary("restore a backup and keep the current store, or roll back a breaking upgrade").description("put a backup in place of the store; the store it replaces is kept beside it, never deleted. Given a rollback copy (backups/<store>-rollback-schema-<version>-<time>.db, kept for a day before an upgrade older tools cannot open), put its tables back in the store and return it to that version instead").argument("<file>", "a file `store backup` wrote, or a rollback copy; one written with --encrypt asks for its password").action(async function(file2) {
|
|
9223
|
+
var restoreCommand = /* @__PURE__ */ __name((owner) => inStoreBackups(grantsAuthority(annotate(new Command("restore"), { output: { entity: "store_restore" }, effects: LOCAL_WRITE })), "file").summary("restore a backup and keep the current store, or roll back a breaking upgrade").description("put a backup in place of the store; the store it replaces is kept beside it, never deleted. Given a rollback copy (backups/<store>-rollback-schema-<version>-<time>.db, kept for a day before an upgrade older tools cannot open), put its tables back in the store and return it to that version instead").argument("<file>", "a file `store backup` wrote, or a rollback copy; one written with --encrypt asks for its password").action(async function(file2) {
|
|
9158
9224
|
const path = storePath(environmentOf(this).env ?? process.env);
|
|
9159
|
-
const given =
|
|
9225
|
+
const given = resolve2(file2);
|
|
9160
9226
|
if (!existsSync10(given))
|
|
9161
9227
|
throw new CliError("not_found", `no file at ${given}`);
|
|
9162
9228
|
refuseWhileServing(this, owner);
|
|
9163
9229
|
if (!isSealed(given))
|
|
9164
9230
|
return restoreFrom(this, owner, given, given);
|
|
9165
9231
|
const opened = `${path}.unsealing-${process.pid}`;
|
|
9166
|
-
mkdirSync(
|
|
9232
|
+
mkdirSync(dirname4(path), { recursive: true, mode: 448 });
|
|
9167
9233
|
try {
|
|
9168
9234
|
await unsealFile(given, opened, await passwordOf(this, { twice: false }));
|
|
9169
9235
|
await restoreFrom(this, owner, opened, given);
|
|
@@ -9186,7 +9252,7 @@ var restoreFrom = /* @__PURE__ */ __name(async (command, owner, backup, given) =
|
|
|
9186
9252
|
const waitMs = environmentOf(command).storeLockWaitMs;
|
|
9187
9253
|
await quiesce(path, owner, "restore", (message) => renderer.warn(message), waitMs);
|
|
9188
9254
|
} else
|
|
9189
|
-
mkdirSync(
|
|
9255
|
+
mkdirSync(dirname4(path), { recursive: true, mode: 448 });
|
|
9190
9256
|
const incoming = `${path}.restoring-${stamp}`;
|
|
9191
9257
|
copyFileSync(backup, incoming, constants.COPYFILE_EXCL);
|
|
9192
9258
|
chmodSync(incoming, 384);
|
|
@@ -9403,6 +9469,11 @@ export {
|
|
|
9403
9469
|
checkFor,
|
|
9404
9470
|
passes,
|
|
9405
9471
|
seal,
|
|
9472
|
+
notLocalPaths,
|
|
9473
|
+
isLocalPathOption,
|
|
9474
|
+
isLocalPathArgument,
|
|
9475
|
+
refuseAgentPaths,
|
|
9476
|
+
absoluteFrom,
|
|
9406
9477
|
ENCRYPT_OPTION,
|
|
9407
9478
|
passwordOf,
|
|
9408
9479
|
DAY_MS,
|