@wirecat/mail-cli 0.35.0 → 0.36.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 +20 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/agent-MW7YWUIY.js +39 -0
- package/dist/bundle/{all-profiles-6BDSMVOO.js → all-profiles-RS6OV3YO.js} +11 -11
- package/dist/bundle/{anthropic-C3XUXUCJ.js → anthropic-PPQ7DTXN.js} +5 -5
- package/dist/bundle/{app-server-GUHDK4OR.js → app-server-EBFBMFQC.js} +67 -67
- package/dist/bundle/{bun-FN7AM4AG.js → bun-J7HAT7MW.js} +2 -2
- package/dist/bundle/{bun-sqlite-56IVBF22.js → bun-sqlite-PCSNAXIQ.js} +6 -6
- package/dist/bundle/{chunk-DREU6TN6.js → chunk-2RV4V55B.js} +18 -18
- package/dist/bundle/{chunk-CMGZXBJW.js → chunk-2UNZ3L2H.js} +6 -6
- package/dist/bundle/{chunk-5WYBI35N.js → chunk-2VEFNFYZ.js} +3 -3
- package/dist/bundle/{chunk-XQNKAM26.js → chunk-3BYKGMRM.js} +6 -6
- package/dist/bundle/{chunk-ZMYRPMAJ.js → chunk-3NOXZZJV.js} +1 -1
- package/dist/bundle/{chunk-UWDRU3R6.js → chunk-3ZKNXKM7.js} +2 -2
- package/dist/bundle/{chunk-GG634DR3.js → chunk-42XY6D5C.js} +5 -5
- package/dist/bundle/{chunk-4IASS7NQ.js → chunk-437UHSIO.js} +69 -5
- package/dist/bundle/{chunk-6Q5THDNW.js → chunk-4WSTWZUB.js} +2 -2
- package/dist/bundle/{chunk-46SBNO67.js → chunk-5G4MDFZ2.js} +7 -7
- package/dist/bundle/{chunk-TP766H4O.js → chunk-5JEKBYIH.js} +14 -14
- package/dist/bundle/{chunk-6VARUB3J.js → chunk-5TIWO6AR.js} +12 -12
- package/dist/bundle/{chunk-DFHUJTP5.js → chunk-5VPLQS4S.js} +2 -2
- package/dist/bundle/{chunk-G662S2M4.js → chunk-645FQC4G.js} +16 -16
- package/dist/bundle/{chunk-OTP2HJ67.js → chunk-6FZPFNEU.js} +9 -9
- package/dist/bundle/{chunk-YTI533XF.js → chunk-6LJIENVT.js} +2 -2
- package/dist/bundle/{chunk-W7ICCFG5.js → chunk-6NDPOY4N.js} +1 -1
- package/dist/bundle/{chunk-3ACF6TIV.js → chunk-6PKMUKUF.js} +1 -1
- package/dist/bundle/{chunk-DZHEVVXA.js → chunk-6TT62IUW.js} +25 -25
- package/dist/bundle/{chunk-EU4J6GCJ.js → chunk-6UYIWQLU.js} +4 -4
- package/dist/bundle/{chunk-W4JYGMTU.js → chunk-6VMJLOYO.js} +12 -12
- package/dist/bundle/{chunk-CDGVYQXG.js → chunk-774VG5WZ.js} +1 -1
- package/dist/bundle/{chunk-MCJYJIH5.js → chunk-AVR4FPYG.js} +8 -8
- package/dist/bundle/{chunk-WDEVKKAD.js → chunk-BBQERXQX.js} +3 -3
- package/dist/bundle/{chunk-YA44BG3N.js → chunk-C3JSQ7UJ.js} +23 -10
- package/dist/bundle/{chunk-6B4WZVLN.js → chunk-CJHO6B3M.js} +26 -26
- package/dist/bundle/{chunk-ODQCRZX5.js → chunk-CJMZQ2MZ.js} +8 -8
- package/dist/bundle/{chunk-2UNQTKRH.js → chunk-CMOO4INK.js} +1 -1
- package/dist/bundle/{chunk-7PXAUMK5.js → chunk-DVJPEZGV.js} +13 -13
- package/dist/bundle/{chunk-7JVKQ6NM.js → chunk-EGR3YUWD.js} +4 -4
- package/dist/bundle/{chunk-RQJGX7F7.js → chunk-GBZIWCEP.js} +3 -3
- package/dist/bundle/{chunk-635AFLZO.js → chunk-GCTHVCJU.js} +4 -4
- package/dist/bundle/{chunk-DD2P67NP.js → chunk-GEU3WR75.js} +3 -3
- package/dist/bundle/{chunk-ILEKGH44.js → chunk-GI6DNX7Q.js} +35 -35
- package/dist/bundle/{chunk-Q5U2HIBJ.js → chunk-HH34WRQE.js} +7 -7
- package/dist/bundle/{chunk-AV2ZJ4WX.js → chunk-HPSESLOZ.js} +1 -1
- package/dist/bundle/{chunk-EHAXFDDP.js → chunk-IBOWSQ7X.js} +3 -4
- package/dist/bundle/{chunk-RJNKM3CQ.js → chunk-JCILSTFK.js} +1 -1
- package/dist/bundle/{chunk-4U5ODZO7.js → chunk-KLPFPNZP.js} +11 -11
- package/dist/bundle/{chunk-PQDQCCGG.js → chunk-KP7JHJVP.js} +17 -17
- package/dist/bundle/{chunk-3EV2B7KZ.js → chunk-KTVQIKU5.js} +13 -13
- package/dist/bundle/{chunk-YCIWSKOH.js → chunk-KVFBSOCV.js} +9 -9
- package/dist/bundle/{chunk-7YMLEWTX.js → chunk-L4QLZDBZ.js} +6 -6
- package/dist/bundle/{chunk-2B67TUIF.js → chunk-LQQIYBHN.js} +64 -60
- package/dist/bundle/{chunk-J5ULUTWE.js → chunk-MQ6DQRRI.js} +4 -4
- package/dist/bundle/{chunk-HKWZG7CZ.js → chunk-MRWV5VNQ.js} +6 -6
- package/dist/bundle/{chunk-EX4Z7CCO.js → chunk-MT3LYU4T.js} +379 -379
- package/dist/bundle/{chunk-TP2BCK2Z.js → chunk-NCY55XIT.js} +8 -8
- package/dist/bundle/{chunk-5XQI7WCJ.js → chunk-NJZR3OFK.js} +1 -1
- package/dist/bundle/{chunk-YRAJFTFU.js → chunk-NSH2UHJR.js} +8 -8
- package/dist/bundle/{chunk-3KAJCOJP.js → chunk-NTUP5RCP.js} +8 -1
- package/dist/bundle/{chunk-OO4OKMNB.js → chunk-NYR7PIAG.js} +3 -3
- package/dist/bundle/{chunk-TARNPINT.js → chunk-NYYMMIVW.js} +3 -3
- package/dist/bundle/{chunk-YQTRKNZQ.js → chunk-OEL4DQTT.js} +4 -4
- package/dist/bundle/{chunk-E6HSSKRX.js → chunk-PF7ZNIVP.js} +2 -2
- package/dist/bundle/{chunk-HM6AMYHR.js → chunk-PMGAU6AP.js} +2 -2
- package/dist/bundle/{chunk-UHGKN5US.js → chunk-PMSZBUC7.js} +8 -8
- package/dist/bundle/{chunk-7KMI47AP.js → chunk-PPIMXOBT.js} +6 -6
- package/dist/bundle/{chunk-WZKM5I7B.js → chunk-Q6TPXXOS.js} +16 -16
- package/dist/bundle/{chunk-CFQQTDSA.js → chunk-QDNYJOWJ.js} +1 -1
- package/dist/bundle/{chunk-AISQNKT7.js → chunk-QI2XGTFH.js} +8 -8
- package/dist/bundle/{chunk-OOQFBRNR.js → chunk-REWV37HQ.js} +6 -6
- package/dist/bundle/{chunk-HF5QWKK2.js → chunk-RJUVWJTA.js} +7 -7
- package/dist/bundle/{chunk-XKKYRMGG.js → chunk-RMWS7IQ4.js} +4 -4
- package/dist/bundle/{chunk-QYCMB7JY.js → chunk-ROK7Z5LQ.js} +162 -157
- package/dist/bundle/{chunk-QFMKCU42.js → chunk-SCJVKWMV.js} +265 -264
- package/dist/bundle/{chunk-3WAZKCDF.js → chunk-SJNFPBPF.js} +2 -2
- package/dist/bundle/{chunk-RBV2AM52.js → chunk-TV634B6T.js} +1 -1
- package/dist/bundle/{chunk-L4RCWRWS.js → chunk-U3BO342P.js} +1 -1
- package/dist/bundle/{chunk-V4O47JV6.js → chunk-U67XMAEE.js} +3 -3
- package/dist/bundle/{chunk-HJDIMVFW.js → chunk-V5I7QP4T.js} +2 -2
- package/dist/bundle/{chunk-ZYEU35MB.js → chunk-VIDPFLFM.js} +2 -2
- package/dist/bundle/{chunk-HVXOA4FO.js → chunk-VIJV474N.js} +1 -1
- package/dist/bundle/{chunk-AXKIXVQA.js → chunk-WNQECDIP.js} +61 -61
- package/dist/bundle/{chunk-RQHWSNX4.js → chunk-WPPPO427.js} +4 -4
- package/dist/bundle/{chunk-7FXZKQAC.js → chunk-WZFGZBGD.js} +19 -19
- package/dist/bundle/{chunk-ZX7HZDD6.js → chunk-XRVZMM5B.js} +46 -32
- package/dist/bundle/{chunk-NEDS4ORI.js → chunk-YPB5BEAD.js} +2 -2
- package/dist/bundle/{chunk-I3QZCQJT.js → chunk-ZRSLG3B3.js} +6 -6
- package/dist/bundle/{chunk-GU3PYIV2.js → chunk-ZV57PIPE.js} +2 -2
- package/dist/bundle/command-contract-WFTIRPL5.js +39 -0
- package/dist/bundle/{command-server-entry-TPJ47FYS.js → command-server-entry-73RJELAV.js} +28 -28
- package/dist/bundle/{decode-XHUASXQK.js → decode-7BUWBDPT.js} +5 -5
- package/dist/bundle/{dispatch-MQZHGGVP.js → dispatch-IBOMVWZA.js} +8 -8
- package/dist/bundle/{dist-BAE4IQ52.js → dist-MULVCVSR.js} +20 -18
- package/dist/bundle/{echarts-U7Z2PKIG.js → echarts-VLWFC322.js} +2 -2
- package/dist/bundle/{embed-W7GPB6EI.js → embed-W3VH4HPY.js} +6 -6
- package/dist/bundle/{embedder-T72XLFQ5.js → embedder-I7ERQZJV.js} +9 -9
- package/dist/bundle/{failure-MP6VKL5Y.js → failure-QMAPSQ7X.js} +2 -2
- package/dist/bundle/{first-run-C44TJXRI.js → first-run-LCVER6QN.js} +12 -12
- package/dist/bundle/first-screen-DCTHI4NQ.js +39 -0
- package/dist/bundle/{instructions-WGMWQNPP.js → instructions-BNCVLSYQ.js} +1 -1
- package/dist/bundle/mail.js +12 -12
- package/dist/bundle/{mcp-YGOAUNC3.js → mcp-Z2KZNCXB.js} +2 -2
- package/dist/bundle/meeting-combined-ITU7SZ7E.js +24 -0
- package/dist/bundle/{meeting-model-QVHLD4WI.js → meeting-model-BWLSTNXA.js} +11 -11
- package/dist/bundle/{meeting-semantic-QKQHUHXX.js → meeting-semantic-ZIEHXN2R.js} +6 -6
- package/dist/bundle/{node-WANDMJJQ.js → node-RYFTRSG4.js} +2 -2
- package/dist/bundle/{node-sqlite-NM5XA4DR.js → node-sqlite-XCHVNTGQ.js} +7 -7
- package/dist/bundle/{oauth-6E63ELEE.js → oauth-FNUJSKKJ.js} +7 -7
- package/dist/bundle/{open-5542RTLE.js → open-WVWSJ3WI.js} +5 -5
- package/dist/bundle/{openai-NOYNPFB5.js → openai-QOUTYYTF.js} +15 -15
- package/dist/bundle/{process-7AEXXSBX.js → process-W5KPID53.js} +1 -1
- package/dist/bundle/{program-VMA5CGNR.js → program-L5UANM3I.js} +662 -505
- package/dist/bundle/{prompt-WYYO4AJL.js → prompt-JSBAPNJE.js} +5 -5
- package/dist/bundle/{recognize-UGCCOMAS.js → recognize-FDX4SJ6Q.js} +4 -4
- package/dist/bundle/{remote-VZS6BNQB.js → remote-MYOXOQHM.js} +9 -9
- package/dist/bundle/{rerank-O46D5GJ2.js → rerank-NY5MSZCR.js} +7 -7
- package/dist/bundle/{serve-QAAF2LCW.js → serve-URI6NZA3.js} +9 -9
- package/dist/bundle/{server-Q3PUZLLX.js → server-HQ25RHQM.js} +59 -59
- package/dist/bundle/server-UVYFU2JN.js +84 -0
- package/dist/bundle/{sqlite-runtime-EQBCDO2U.js → sqlite-runtime-6UUPSSKG.js} +6 -6
- package/dist/bundle/{state-XIOHYXCR.js → state-NDDVFPCI.js} +6 -6
- package/dist/bundle/{store-VJBL5XKR.js → store-2RDOICVN.js} +24 -24
- package/dist/bundle/{store-OXJZZUR7.js → store-PKYWPKKR.js} +22 -22
- package/dist/bundle/store-maintenance-command-Y5XTO47X.js +71 -0
- package/dist/bundle/surface-3XKM3MQ2.js +70 -0
- package/dist/commands/session-start.js +1 -1
- package/dist/commands/session-start.js.map +1 -1
- package/dist/oauth.d.ts.map +1 -1
- package/dist/oauth.js +2 -1
- package/dist/oauth.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-KWLCQCSC.js +0 -39
- package/dist/bundle/command-contract-D5UXWHMS.js +0 -39
- package/dist/bundle/first-screen-IESI7DAU.js +0 -39
- package/dist/bundle/meeting-combined-XGZBSWIQ.js +0 -24
- package/dist/bundle/server-456MYK3X.js +0 -84
- package/dist/bundle/store-maintenance-command-D7XYIX52.js +0 -71
- package/dist/bundle/surface-N7LK7PKN.js +0 -70
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
typedPhone,
|
|
51
51
|
validCounter,
|
|
52
52
|
wildcardPattern
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-2RV4V55B.js";
|
|
54
54
|
import {
|
|
55
55
|
DEFAULT_STEMMERS,
|
|
56
56
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -61,30 +61,30 @@ import {
|
|
|
61
61
|
analyzerIdentity,
|
|
62
62
|
createStemmer,
|
|
63
63
|
parseStemmers
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-CJMZQ2MZ.js";
|
|
65
65
|
import {
|
|
66
66
|
calendarMoment,
|
|
67
67
|
dayIn
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-NYR7PIAG.js";
|
|
69
69
|
import {
|
|
70
70
|
PRESENCE,
|
|
71
71
|
fuseRanked,
|
|
72
72
|
isPresence,
|
|
73
73
|
parseBytes,
|
|
74
74
|
plainQuery
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-NCY55XIT.js";
|
|
76
76
|
import {
|
|
77
77
|
QUERY_LIMITS,
|
|
78
78
|
exhausted,
|
|
79
79
|
outOfTime,
|
|
80
80
|
searchError,
|
|
81
81
|
tooWideTerm
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-U67XMAEE.js";
|
|
83
83
|
import {
|
|
84
84
|
NORMALIZER_VERSION,
|
|
85
85
|
fold,
|
|
86
86
|
normalize
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-U3BO342P.js";
|
|
88
88
|
import {
|
|
89
89
|
ACCOUNT_GROUPS,
|
|
90
90
|
CATEGORIES,
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
runEvent,
|
|
123
123
|
severity,
|
|
124
124
|
sourceOf2 as sourceOf
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-6TT62IUW.js";
|
|
126
126
|
import {
|
|
127
127
|
ADDED_ACCOUNT,
|
|
128
128
|
ADDED_PROVIDER,
|
|
@@ -211,14 +211,14 @@ import {
|
|
|
211
211
|
usableLinkSql,
|
|
212
212
|
useStoredProviders,
|
|
213
213
|
walletLine
|
|
214
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-5TIWO6AR.js";
|
|
215
215
|
import {
|
|
216
216
|
sqliteCode
|
|
217
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-3ZKNXKM7.js";
|
|
218
218
|
import {
|
|
219
219
|
normalizeTag,
|
|
220
220
|
tagOf
|
|
221
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-6LJIENVT.js";
|
|
222
222
|
import {
|
|
223
223
|
CHAT_MESSAGES_READ,
|
|
224
224
|
FACT_TYPES,
|
|
@@ -274,27 +274,27 @@ import {
|
|
|
274
274
|
validateQuery,
|
|
275
275
|
walkQuery,
|
|
276
276
|
zonedMoment
|
|
277
|
-
} from "./chunk-
|
|
277
|
+
} from "./chunk-WNQECDIP.js";
|
|
278
278
|
import {
|
|
279
279
|
DEFAULT_TASK_CATEGORIES,
|
|
280
280
|
sharedConfigPath,
|
|
281
281
|
storedTaskCategories,
|
|
282
282
|
taskCategoriesReader
|
|
283
|
-
} from "./chunk-
|
|
283
|
+
} from "./chunk-HH34WRQE.js";
|
|
284
284
|
import {
|
|
285
285
|
refuseOwnerStoreInTests,
|
|
286
286
|
storePath
|
|
287
|
-
} from "./chunk-
|
|
287
|
+
} from "./chunk-VIDPFLFM.js";
|
|
288
288
|
import {
|
|
289
289
|
quietSqliteWarning,
|
|
290
290
|
storeCapable
|
|
291
|
-
} from "./chunk-
|
|
291
|
+
} from "./chunk-ZRSLG3B3.js";
|
|
292
292
|
import {
|
|
293
293
|
PRAGMAS,
|
|
294
294
|
TIME_LIMIT_FUNCTION,
|
|
295
295
|
TimeLimitReached,
|
|
296
296
|
isQueryOnly
|
|
297
|
-
} from "./chunk-
|
|
297
|
+
} from "./chunk-CMOO4INK.js";
|
|
298
298
|
import {
|
|
299
299
|
array,
|
|
300
300
|
boolean,
|
|
@@ -312,7 +312,7 @@ import {
|
|
|
312
312
|
safeParse,
|
|
313
313
|
strictObject,
|
|
314
314
|
string
|
|
315
|
-
} from "./chunk-
|
|
315
|
+
} from "./chunk-C3JSQ7UJ.js";
|
|
316
316
|
import {
|
|
317
317
|
resolveFrom
|
|
318
318
|
} from "./chunk-Y5E2WNWB.js";
|
|
@@ -320,7 +320,7 @@ import {
|
|
|
320
320
|
CliError,
|
|
321
321
|
isCliError,
|
|
322
322
|
singleLine
|
|
323
|
-
} from "./chunk-
|
|
323
|
+
} from "./chunk-PMGAU6AP.js";
|
|
324
324
|
import {
|
|
325
325
|
SQLiteTable,
|
|
326
326
|
TableAliasProxyHandler,
|
|
@@ -345,7 +345,7 @@ import {
|
|
|
345
345
|
sql,
|
|
346
346
|
sqliteTable,
|
|
347
347
|
text
|
|
348
|
-
} from "./chunk-
|
|
348
|
+
} from "./chunk-6NDPOY4N.js";
|
|
349
349
|
import {
|
|
350
350
|
__commonJS,
|
|
351
351
|
__name,
|
|
@@ -10089,7 +10089,7 @@ var require_cjs = __commonJS({
|
|
|
10089
10089
|
}
|
|
10090
10090
|
});
|
|
10091
10091
|
|
|
10092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
10093
10093
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
10094
10094
|
const methods = whole;
|
|
10095
10095
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10217,7 +10217,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10217
10217
|
};
|
|
10218
10218
|
}, "bindAccount");
|
|
10219
10219
|
|
|
10220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10220
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10221
10221
|
var IndexBuilderOn = class {
|
|
10222
10222
|
static {
|
|
10223
10223
|
__name(this, "IndexBuilderOn");
|
|
@@ -10412,7 +10412,7 @@ function alias(table, alias2) {
|
|
|
10412
10412
|
}
|
|
10413
10413
|
__name(alias, "alias");
|
|
10414
10414
|
|
|
10415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10415
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10416
10416
|
var ENTITY_TABLES = {
|
|
10417
10417
|
...RECORD_TABLES,
|
|
10418
10418
|
account: "accounts",
|
|
@@ -10452,7 +10452,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10452
10452
|
return { table, pointer, type, count: count2, known: known2 };
|
|
10453
10453
|
}).filter(({ count: count2 }) => count2 > 0)), "orphanPointers");
|
|
10454
10454
|
|
|
10455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10455
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/identity-links.js
|
|
10456
10456
|
var IDENTITY_LINK_KIND = "identity_link";
|
|
10457
10457
|
var IDENTITY_LINK_SIGNALS = ["agent", "phone", "email", "guest-email", "name", "account"];
|
|
10458
10458
|
var LINK_WEAKNESSES = [
|
|
@@ -10465,7 +10465,7 @@ var LINK_WEAKNESSES = [
|
|
|
10465
10465
|
"not-own-number"
|
|
10466
10466
|
];
|
|
10467
10467
|
|
|
10468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10468
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/merged-persons.js
|
|
10469
10469
|
var SEPARATIONS = ["unlink", "split", "undo-merge"];
|
|
10470
10470
|
var mergeSql = /* @__PURE__ */ __name((event2) => `(${event2}.from_person_id IS NOT NULL AND ${event2}.from_person_id <> ${event2}.to_person_id AND ${event2}.method NOT IN (${SEPARATIONS.map((method) => `'${method}'`).join(", ")}) AND NOT EXISTS (SELECT 1 FROM identity_link_events stay WHERE stay.to_person_id = ${event2}.from_person_id AND stay.identity_id <> ${event2}.identity_id AND stay.id < ${event2}.id AND stay.id = (SELECT max(s.id) FROM identity_link_events s WHERE s.identity_id = stay.identity_id AND s.id < ${event2}.id) AND NOT EXISTS (SELECT 1 FROM identity_link_events went WHERE went.identity_id = stay.identity_id AND went.from_person_id = ${event2}.from_person_id AND went.to_person_id = ${event2}.to_person_id AND went.id = (SELECT min(w.id) FROM identity_link_events w WHERE w.identity_id = stay.identity_id AND w.id > ${event2}.id))))`, "mergeSql");
|
|
10471
10471
|
var mergedAwaySql = /* @__PURE__ */ __name((person2) => `(${person2}.owner = 0 AND NOT EXISTS (SELECT 1 FROM identity_links ml WHERE ml.person_id = ${person2}.id) AND EXISTS (SELECT 1 FROM identity_link_events me WHERE me.from_person_id = ${person2}.id AND ${mergeSql("me")}))`, "mergedAwaySql");
|
|
@@ -10497,7 +10497,7 @@ var samePersons = /* @__PURE__ */ __name((database, pk) => {
|
|
|
10497
10497
|
}, "samePersons");
|
|
10498
10498
|
var idsOf = /* @__PURE__ */ __name((database, type, id2) => JSON.stringify(type === "person" ? samePersons(database, id2) : [id2]), "idsOf");
|
|
10499
10499
|
|
|
10500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-link-rows.js
|
|
10501
10501
|
var pairOf = /* @__PURE__ */ __name((a, b) => [Number(a), Number(b)].sort((x, y) => x - y).join("-"), "pairOf");
|
|
10502
10502
|
var pkOf = /* @__PURE__ */ __name((database, ref3) => {
|
|
10503
10503
|
const at2 = ref3.indexOf(":");
|
|
@@ -10604,13 +10604,13 @@ var forgetErasedLinks = /* @__PURE__ */ __name((database) => {
|
|
|
10604
10604
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
10605
10605
|
}, "forgetErasedLinks");
|
|
10606
10606
|
|
|
10607
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/identity-splits.js
|
|
10608
10608
|
var IDENTITY_SPLIT_KIND = "identity_split";
|
|
10609
10609
|
|
|
10610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
10611
10611
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
10612
10612
|
|
|
10613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10613
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
10614
10614
|
var TASK_CLOSE_KIND = "task_close";
|
|
10615
10615
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
10616
10616
|
var isOwnerOnlyKind = /* @__PURE__ */ __name((kind3) => kind3 === MAIL_FINDINGS_KIND || kind3 === MEETING_FINDINGS_KIND || kind3 === TASK_CLOSE_KIND || kind3 === SOURCE_REVIEW_KIND || kind3 === IDENTITY_LINK_KIND || kind3 === IDENTITY_SPLIT_KIND, "isOwnerOnlyKind");
|
|
@@ -10658,7 +10658,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
10658
10658
|
}, "assertMayDecide");
|
|
10659
10659
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
10660
10660
|
|
|
10661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
10662
10662
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
10663
10663
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
10664
10664
|
var WEIGHTS = {
|
|
@@ -10792,7 +10792,7 @@ var scoreGroup = /* @__PURE__ */ __name((items, context) => {
|
|
|
10792
10792
|
return { score: kept.reduce((sum, signal) => sum + WEIGHTS[signal], 0), signals: kept };
|
|
10793
10793
|
}, "scoreGroup");
|
|
10794
10794
|
|
|
10795
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10795
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/address-organization.js
|
|
10796
10796
|
var BY_ADDRESS = "SELECT DISTINCT o.id FROM organizations o JOIN organization_identities oi ON oi.organization_id = o.id JOIN identities i ON i.id = oi.identity_id WHERE o.deleted_at IS NULL AND i.provider = 'email' AND ";
|
|
10797
10797
|
var idsOf2 = /* @__PURE__ */ __name((rows) => rows.map((row2) => Number(row2.id)), "idsOf");
|
|
10798
10798
|
var holdAddress = /* @__PURE__ */ __name(({ database, now: now2 }, organization2, email, { method, author }) => {
|
|
@@ -10817,10 +10817,10 @@ var organizationOfAddress = /* @__PURE__ */ __name((context, { name, email, meth
|
|
|
10817
10817
|
return id2;
|
|
10818
10818
|
}, "organizationOfAddress");
|
|
10819
10819
|
|
|
10820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
10821
10821
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
10822
10822
|
|
|
10823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10823
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/journal.js
|
|
10824
10824
|
import { existsSync, statSync } from "node:fs";
|
|
10825
10825
|
var watched = /* @__PURE__ */ new WeakMap();
|
|
10826
10826
|
var walInode = /* @__PURE__ */ __name((store) => statSync(`${store}-wal`, { throwIfNoEntry: false })?.ino, "walInode");
|
|
@@ -10846,7 +10846,7 @@ var checkJournal = /* @__PURE__ */ __name((database) => {
|
|
|
10846
10846
|
throw new CliError("conflict", "the store's journal file was deleted or replaced by another program while this command had the store open, so nothing more is written; `store recover` says what to do", { reason: "store.journal-replaced" });
|
|
10847
10847
|
}, "checkJournal");
|
|
10848
10848
|
|
|
10849
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/write-events.js
|
|
10850
10850
|
var WRITE = /^\s*(?:WITH\b[\s\S]*?\)\s*)?(INSERT|REPLACE|UPDATE|DELETE)\b(?:\s+OR\s+[A-Za-z]+)?\s+(?:INTO\s+|FROM\s+)?(?:("?)(\w+)\2\.)?["`[]?(\w+)/i;
|
|
10851
10851
|
var writeTarget = /* @__PURE__ */ __name((sql2) => {
|
|
10852
10852
|
const match = WRITE.exec(sql2);
|
|
@@ -10926,7 +10926,7 @@ var committedWrites = /* @__PURE__ */ __name((database) => {
|
|
|
10926
10926
|
}, "committedWrites");
|
|
10927
10927
|
var droppedWrites = /* @__PURE__ */ __name((database) => tallies.get(database)?.pending.clear(), "droppedWrites");
|
|
10928
10928
|
|
|
10929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
10930
10930
|
var ARMS = [
|
|
10931
10931
|
[
|
|
10932
10932
|
"message",
|
|
@@ -11054,7 +11054,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
11054
11054
|
return recomputed;
|
|
11055
11055
|
}, "drainInvolvementQueue");
|
|
11056
11056
|
|
|
11057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
11058
11058
|
import { domainToUnicode } from "node:url";
|
|
11059
11059
|
|
|
11060
11060
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -21076,7 +21076,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
21076
21076
|
}, "oa");
|
|
21077
21077
|
var na = { parse: O, get: aa, isValid: oa };
|
|
21078
21078
|
|
|
21079
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
21080
21080
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
21081
21081
|
var ID = /^[\w-]{10,}$/;
|
|
21082
21082
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -21118,7 +21118,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text8) => [...text8.matchAll(L
|
|
|
21118
21118
|
return { url, documentId: googleDocumentId(url) };
|
|
21119
21119
|
}), "googleDocumentLinks");
|
|
21120
21120
|
|
|
21121
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
21122
21122
|
var BEFORE = [
|
|
21123
21123
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
21124
21124
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -21378,7 +21378,7 @@ var findPlaces = /* @__PURE__ */ __name((text8) => {
|
|
|
21378
21378
|
return found2.sort((a, b) => a.start - b.start);
|
|
21379
21379
|
}, "findPlaces");
|
|
21380
21380
|
|
|
21381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
21382
21382
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
21383
21383
|
var MENTION_VERSIONS = {
|
|
21384
21384
|
phone: 1,
|
|
@@ -21554,7 +21554,7 @@ var exactlyOne = /* @__PURE__ */ __name((text8, options) => {
|
|
|
21554
21554
|
return one2 && one2.start === 0 && one2.end === text8.length ? one2.value : void 0;
|
|
21555
21555
|
}, "exactlyOne");
|
|
21556
21556
|
|
|
21557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
21558
21558
|
var RUSSIAN = "\u0410\u043B\u0435\u043A\u0441\u0430\u043D\u0434\u0440 \u0410\u043B\u0435\u043A\u0441\u0435\u0439 \u0410\u043D\u0430\u0442\u043E\u043B\u0438\u0439 \u0410\u043D\u0434\u0440\u0435\u0439 \u0410\u043D\u0442\u043E\u043D \u0410\u0440\u043A\u0430\u0434\u0438\u0439 \u0410\u0440\u0441\u0435\u043D\u0438\u0439 \u0410\u0440\u0442\u0451\u043C \u0410\u0440\u0442\u0435\u043C \u0410\u0440\u0442\u0443\u0440 \u0411\u043E\u0440\u0438\u0441 \u0412\u0430\u0434\u0438\u043C \u0412\u0430\u043B\u0435\u043D\u0442\u0438\u043D \u0412\u0430\u043B\u0435\u0440\u0438\u0439 \u0412\u0430\u0441\u0438\u043B\u0438\u0439 \u0412\u0438\u043A\u0442\u043E\u0440 \u0412\u0438\u0442\u0430\u043B\u0438\u0439 \u0412\u043B\u0430\u0434\u0438\u043C\u0438\u0440 \u0412\u043B\u0430\u0434\u0438\u0441\u043B\u0430\u0432 \u0412\u0441\u0435\u0432\u043E\u043B\u043E\u0434 \u0412\u044F\u0447\u0435\u0441\u043B\u0430\u0432 \u0413\u0435\u043D\u043D\u0430\u0434\u0438\u0439 \u0413\u0435\u043E\u0440\u0433\u0438\u0439 \u0413\u043B\u0435\u0431 \u0413\u0440\u0438\u0433\u043E\u0440\u0438\u0439 \u0414\u0430\u043D\u0438\u0438\u043B \u0414\u0430\u043D\u0438\u043B\u0430 \u0414\u0435\u043D\u0438\u0441 \u0414\u043C\u0438\u0442\u0440\u0438\u0439 \u0415\u0432\u0433\u0435\u043D\u0438\u0439 \u0415\u0433\u043E\u0440 \u0418\u0432\u0430\u043D \u0418\u0433\u043E\u0440\u044C \u0418\u043B\u044C\u044F \u041A\u0438\u0440\u0438\u043B\u043B \u041A\u043E\u043D\u0441\u0442\u0430\u043D\u0442\u0438\u043D \u041B\u0435\u043E\u043D\u0438\u0434 \u041C\u0430\u043A\u0441\u0438\u043C \u041C\u0430\u0440\u0430\u0442 \u041C\u0430\u0442\u0432\u0435\u0439 \u041C\u0438\u0445\u0430\u0438\u043B \u041D\u0438\u043A\u0438\u0442\u0430 \u041D\u0438\u043A\u043E\u043B\u0430\u0439 \u041E\u043B\u0435\u0433 \u041F\u0430\u0432\u0435\u043B \u041F\u0451\u0442\u0440 \u041F\u0435\u0442\u0440 \u0420\u043E\u0434\u0438\u043E\u043D \u0420\u043E\u0441\u0442\u0438\u0441\u043B\u0430\u0432 \u0420\u0443\u0441\u043B\u0430\u043D \u0420\u0443\u0441\u0442\u0430\u043C \u0421\u0435\u043C\u0451\u043D \u0421\u0435\u043C\u0435\u043D \u0421\u0435\u0440\u0433\u0435\u0439 \u0421\u0442\u0430\u043D\u0438\u0441\u043B\u0430\u0432 \u0421\u0442\u0435\u043F\u0430\u043D \u0422\u0438\u043C\u043E\u0444\u0435\u0439 \u0422\u0438\u043C\u0443\u0440 \u0424\u0451\u0434\u043E\u0440 \u0424\u0435\u0434\u043E\u0440 \u0424\u0438\u043B\u0438\u043F\u043F \u042D\u0434\u0443\u0430\u0440\u0434 \u042E\u0440\u0438\u0439 \u042F\u0440\u043E\u0441\u043B\u0430\u0432 \u042F\u043A\u043E\u0432 \u042D\u043B\u044C\u0434\u0430\u0440 \u0414\u0430\u0432\u0438\u0434 \u0417\u0430\u0445\u0430\u0440 \u0421\u0430\u0432\u0435\u043B\u0438\u0439 \u041C\u0438\u0440\u043E\u043D \u041F\u043B\u0430\u0442\u043E\u043D \u0414\u0435\u043C\u0438\u0434 \u0410\u0440\u0441\u0435\u043D \u041D\u0443\u0440\u043B\u0430\u043D \u0410\u043D\u0437\u043E\u0440 \u0410\u043B\u0435\u043A\u0441\u0430\u043D\u0434\u0440\u0430 \u0410\u043B\u0438\u043D\u0430 \u0410\u043B\u0438\u0441\u0430 \u0410\u043B\u043B\u0430 \u0410\u043D\u0430\u0441\u0442\u0430\u0441\u0438\u044F \u0410\u043D\u0433\u0435\u043B\u0438\u043D\u0430 \u0410\u043D\u043D\u0430 \u0410\u043D\u0442\u043E\u043D\u0438\u043D\u0430 \u0412\u0430\u043B\u0435\u043D\u0442\u0438\u043D\u0430 \u0412\u0430\u043B\u0435\u0440\u0438\u044F \u0412\u0430\u0440\u0432\u0430\u0440\u0430 \u0412\u0435\u0440\u043E\u043D\u0438\u043A\u0430 \u0412\u0438\u043A\u0442\u043E\u0440\u0438\u044F \u0413\u0430\u043B\u0438\u043D\u0430 \u0414\u0430\u0440\u044C\u044F \u0414\u0438\u0430\u043D\u0430 \u0415\u0432\u0433\u0435\u043D\u0438\u044F \u0415\u043A\u0430\u0442\u0435\u0440\u0438\u043D\u0430 \u0415\u043B\u0435\u043D\u0430 \u0415\u043B\u0438\u0437\u0430\u0432\u0435\u0442\u0430 \u0416\u0430\u043D\u043D\u0430 \u0417\u0438\u043D\u0430\u0438\u0434\u0430 \u041A\u0430\u0440\u0438\u043D\u0430 \u041A\u0438\u0440\u0430 \u041A\u043B\u0430\u0432\u0434\u0438\u044F \u041A\u0440\u0438\u0441\u0442\u0438\u043D\u0430 \u041A\u0441\u0435\u043D\u0438\u044F \u041B\u0430\u0440\u0438\u0441\u0430 \u041B\u0438\u0434\u0438\u044F \u041B\u044E\u0434\u043C\u0438\u043B\u0430 \u041C\u0430\u0440\u0433\u0430\u0440\u0438\u0442\u0430 \u041C\u0430\u0440\u0438\u043D\u0430 \u041C\u0430\u0440\u0438\u044F \u041C\u0438\u043B\u0430\u043D\u0430 \u041D\u0430\u0442\u0430\u043B\u044C\u044F \u041D\u0430\u0442\u0430\u043B\u0438\u044F \u041D\u0438\u043D\u0430 \u041E\u043A\u0441\u0430\u043D\u0430 \u041E\u043B\u0435\u0441\u044F \u041E\u043B\u044C\u0433\u0430 \u041F\u043E\u043B\u0438\u043D\u0430 \u0420\u0430\u0438\u0441\u0430 \u0421\u0432\u0435\u0442\u043B\u0430\u043D\u0430 \u0421\u043E\u0444\u0438\u044F \u0421\u043E\u0444\u044C\u044F \u0422\u0430\u0438\u0441\u0438\u044F \u0422\u0430\u043C\u0430\u0440\u0430 \u0422\u0430\u0442\u044C\u044F\u043D\u0430 \u0423\u043B\u044C\u044F\u043D\u0430 \u042E\u043B\u0438\u044F \u042D\u043B\u044C\u0432\u0438\u0440\u0430 \u0420\u0435\u0433\u0438\u043D\u0430 \u0421\u043D\u0435\u0436\u0430\u043D\u0430 \u0410\u043B\u0451\u043D\u0430 \u0410\u043B\u0435\u043D\u0430 \u0412\u0430\u0441\u0438\u043B\u0438\u0441\u0430 \u0410\u0440\u0438\u043D\u0430 \u0415\u0441\u0435\u043D\u0438\u044F \u042D\u0432\u0435\u043B\u0438\u043D\u0430 \u0421\u0430\u0448\u0430 \u0416\u0435\u043D\u044F \u0412\u0430\u043B\u044F \u0414\u0438\u043C\u0430 \u041C\u0438\u0448\u0430 \u041A\u043E\u043B\u044F \u041F\u0435\u0442\u044F \u0412\u0430\u0441\u044F \u0421\u0435\u0440\u0451\u0436\u0430 \u0421\u0435\u0440\u0435\u0436\u0430 \u041F\u0430\u0448\u0430 \u041B\u0451\u0448\u0430 \u041B\u0435\u0448\u0430 \u0412\u0438\u0442\u044F \u041A\u043E\u0441\u0442\u044F \u0412\u043E\u0432\u0430 \u0412\u043E\u043B\u043E\u0434\u044F \u0412\u0430\u043D\u044F \u0413\u043E\u0448\u0430 \u0413\u0440\u0438\u0448\u0430 \u0422\u043E\u043B\u044F \u0411\u043E\u0440\u044F \u0421\u0442\u0430\u0441 \u0422\u0451\u043C\u0430 \u0422\u0430\u043D\u044F \u041A\u0430\u0442\u044F \u041B\u0435\u043D\u0430 \u041D\u0430\u0442\u0430\u0448\u0430 \u0421\u0432\u0435\u0442\u0430 \u042E\u043B\u044F \u041D\u0430\u0441\u0442\u044F \u0414\u0430\u0448\u0430 \u041C\u0430\u0448\u0430 \u041B\u044E\u0434\u0430 \u0413\u0430\u043B\u044F \u0412\u0438\u043A\u0430 \u041A\u0441\u044E\u0448\u0430 \u041B\u0438\u0437\u0430 \u0421\u043E\u043D\u044F \u041D\u0430\u0434\u044F \u041B\u0435\u0440\u0430 \u0410\u043B\u0451\u0448\u0430 \u0410\u043B\u0435\u0448\u0430 \u041C\u0438\u0442\u044F \u0421\u0435\u043D\u044F \u0424\u0435\u0434\u044F \u0416\u0435\u043D\u0435\u0447\u043A\u0430 \u041E\u043B\u0435\u043D\u044C\u043A\u0430 \u0422\u0430\u043D\u0435\u0447\u043A\u0430";
|
|
21559
21559
|
var EUROPEAN = "James John Robert Michael William David Richard Joseph Thomas Charles Christopher Daniel Matthew Anthony Donald Steven Paul Andrew Joshua Kenneth Kevin Brian George Timothy Ronald Edward Jason Jeffrey Ryan Jacob Gary Nicholas Eric Jonathan Stephen Larry Justin Scott Brandon Benjamin Samuel Gregory Alexander Patrick Raymond Dennis Jerry Tyler Aaron Nathan Henry Peter Zachary Douglas Harold Kyle Noah Ethan Oliver Harry Lucas Liam Mary Patricia Jennifer Linda Elizabeth Barbara Susan Jessica Sarah Karen Lisa Nancy Betty Margaret Sandra Ashley Kimberly Emily Donna Michelle Carol Amanda Dorothy Melissa Deborah Stephanie Rebecca Sharon Laura Cynthia Kathleen Angela Shirley Anna Brenda Pamela Emma Nicole Helen Samantha Katherine Christine Rachel Carolyn Janet Catherine Maria Heather Diane Ruth Julie Olivia Joyce Kelly Lauren Christina Joan Evelyn Judith Megan Andrea Cheryl Hannah Jacqueline Martha Teresa Sara Madison Frances Kathryn Janice Abigail Alice Julia Judy Sophia Denise Doris Marilyn Danielle Beverly Isabella Theresa Diana Natalie Charlotte Marie Kayla Alexis Javier Carlos Antonio Manuel Francisco Juan Pedro Alejandro Miguel Rafael Pablo Sergio Fernando Jorge Luis Alberto \xC1lvaro Diego Adri\xE1n Rub\xE9n Iv\xE1n \xD3scar Andr\xE9s Ra\xFAl Enrique Vicente Joaqu\xEDn Ignacio Gonzalo Marcos V\xEDctor Jaime Alfonso Guillermo Tom\xE1s Emilio Gabriel Nicol\xE1s Mart\xEDn Jordi Josep Xavier Luc\xEDa Carmen Isabel Cristina Marta Elena Raquel Silvia Beatriz Paula Nuria N\xFAria Sonia Alicia Irene Montserrat Inmaculada Noelia Lorena Sof\xEDa Valeria Claudia Natalia Sandra Ver\xF3nica Esther Yolanda Vanesa Laia Klaus J\xFCrgen Wolfgang Stefan Andreas Matthias Markus Tobias Florian Lukas Jonas Maximilian Sebastian Dirk Sabine Ursula Petra Monika Katrin Anja Pierre Michel Philippe Alain Fran\xE7ois Christophe Laurent Olivier Julien Mathieu S\xE9bastien Guillaume Antoine Camille Nathalie Isabelle Sylvie Sophie C\xE9line Aur\xE9lie Chlo\xE9 Manon Giuseppe Giovanni Marco Luca Francesco Alessandro Matteo Lorenzo Stefano Paolo Roberto Davide Simone Federico Giulia Francesca Chiara Valentina Alessia Martina Elisa Jo\xE3o Pedro Tiago Beatriz In\xEAs Mariana Piotr Krzysztof Tomasz Marcin Agnieszka Katarzyna Ma\u0142gorzata Magdalena";
|
|
21560
21560
|
var WORDS = "\u0412\u0435\u0440\u0430 \u041D\u0430\u0434\u0435\u0436\u0434\u0430 \u041B\u044E\u0431\u043E\u0432\u044C \u0421\u043B\u0430\u0432\u0430 \u0420\u043E\u043C\u0430\u043D \u0420\u043E\u0437\u0430 \u041C\u0430\u0439\u044F \u041B\u0438\u043B\u0438\u044F \u0417\u043B\u0430\u0442\u0430 \u041C\u0438\u043B\u0430 \u041D\u0438\u043A\u0430 \u041B\u0435\u0432 \u0413\u043B\u043E\u0440\u0438\u044F Will Mark Rose Grace Hope Faith Bill Frank Jack June April Summer Amber Ruby Lily Daisy Victoria Virginia Georgia Florence Sydney Chelsea Jordan Austin Dallas Mercedes Dolores Rosa Pilar Marina Esperanza Gloria Amparo Consuelo Roc\xEDo Salvador Santiago Jes\xFAs \xC1ngeles Hugo Ram\xF3n Christian Felix F\xE9lix Mario Martin Victor Pierre Paz Merc\xE8 Estrella Aurora Concepci\xF3n Remedios Soledad Milagros Angel \xC1ngel Dawn Joy Holly Ivy Iris Violet Pearl";
|
|
@@ -21562,7 +21562,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
21562
21562
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
21563
21563
|
var NAME_WORDS = WORDS.split(" ");
|
|
21564
21564
|
|
|
21565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21565
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
21566
21566
|
var LATIN_TO_CYRILLIC = {
|
|
21567
21567
|
shch: "\u0449",
|
|
21568
21568
|
sch: "\u0449",
|
|
@@ -21770,7 +21770,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text8, stem, taken) => {
|
|
|
21770
21770
|
return found2;
|
|
21771
21771
|
}, "findUnknownNames");
|
|
21772
21772
|
|
|
21773
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
21774
21774
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
21775
21775
|
"webpage",
|
|
21776
21776
|
"share",
|
|
@@ -21811,7 +21811,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
|
|
|
21811
21811
|
});
|
|
21812
21812
|
}, "matchDownloads");
|
|
21813
21813
|
|
|
21814
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21814
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
21815
21815
|
var PRESET_VERSION = 1;
|
|
21816
21816
|
var PRESETS = {
|
|
21817
21817
|
password: {
|
|
@@ -21865,12 +21865,12 @@ var PRESETS = {
|
|
|
21865
21865
|
}
|
|
21866
21866
|
};
|
|
21867
21867
|
|
|
21868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21868
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
21869
21869
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
21870
21870
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
21871
21871
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
21872
21872
|
|
|
21873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
21874
21874
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
21875
21875
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
21876
21876
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -21894,7 +21894,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
21894
21894
|
};
|
|
21895
21895
|
}, "linkMatch");
|
|
21896
21896
|
|
|
21897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21897
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
21898
21898
|
var SETTING = "phoneCountries";
|
|
21899
21899
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
21900
21900
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -21925,7 +21925,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
21925
21925
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
21926
21926
|
}, "valueMatch");
|
|
21927
21927
|
|
|
21928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
21929
21929
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
21930
21930
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
21931
21931
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -21953,7 +21953,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
21953
21953
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
21954
21954
|
}, "vocabularySimilarity");
|
|
21955
21955
|
|
|
21956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
21957
21957
|
import { createHash } from "node:crypto";
|
|
21958
21958
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
21959
21959
|
try {
|
|
@@ -22019,7 +22019,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
22019
22019
|
});
|
|
22020
22020
|
}, "guardTagCreation");
|
|
22021
22021
|
|
|
22022
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22022
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
22023
22023
|
var invalid = /* @__PURE__ */ __name((message3) => {
|
|
22024
22024
|
throw new CliError("validation_error", message3);
|
|
22025
22025
|
}, "invalid");
|
|
@@ -22096,7 +22096,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
22096
22096
|
};
|
|
22097
22097
|
}, "createTagRedirectIndex");
|
|
22098
22098
|
|
|
22099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
22100
22100
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
22101
22101
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
22102
22102
|
if (!row2)
|
|
@@ -22124,7 +22124,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
22124
22124
|
return snapshot2;
|
|
22125
22125
|
}, "tagRedirectSnapshot");
|
|
22126
22126
|
|
|
22127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
22128
22128
|
import { createHash as createHash2 } from "node:crypto";
|
|
22129
22129
|
var TASK_KEY_PREFIXES = {
|
|
22130
22130
|
question: "Q",
|
|
@@ -22152,7 +22152,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
22152
22152
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
22153
22153
|
}, "taskAccountOf");
|
|
22154
22154
|
|
|
22155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
22156
22156
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
22157
22157
|
var REFERABLE = {
|
|
22158
22158
|
...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
|
|
@@ -22316,7 +22316,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
22316
22316
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
22317
22317
|
}, "taskIdOf");
|
|
22318
22318
|
|
|
22319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22319
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
22320
22320
|
var toMs = /* @__PURE__ */ __name((iso17) => {
|
|
22321
22321
|
if (iso17 === null || iso17 === void 0)
|
|
22322
22322
|
return null;
|
|
@@ -22330,7 +22330,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
22330
22330
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
22331
22331
|
var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
22332
22332
|
|
|
22333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
22334
22334
|
var TAG_KINDS = ["tag", "topic"];
|
|
22335
22335
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
22336
22336
|
var TAG_TYPE = {
|
|
@@ -22533,7 +22533,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
22533
22533
|
return result;
|
|
22534
22534
|
}, "tagsOf");
|
|
22535
22535
|
|
|
22536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/trigram-match.js
|
|
22537
22537
|
var MOST_YO_SPELLINGS = 64;
|
|
22538
22538
|
var yoSpellings = /* @__PURE__ */ __name((run) => {
|
|
22539
22539
|
let spellings2 = [""];
|
|
@@ -22555,7 +22555,7 @@ var anyCaseGlob = /* @__PURE__ */ __name((word2) => `*${[...word2.normalize("NFC
|
|
|
22555
22555
|
return forms2.size === 1 ? c : `[${[...forms2].join("")}]`;
|
|
22556
22556
|
}).join("")}*`, "anyCaseGlob");
|
|
22557
22557
|
|
|
22558
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
22559
22559
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
22560
22560
|
var SPEECH = speech("att");
|
|
22561
22561
|
var mentionText = /* @__PURE__ */ __name((alias2) => `CASE WHEN coalesce(json_extract(${alias2}.contact, '$.phone'), '') <> '' THEN 'phone: ' || json_extract(${alias2}.contact, '$.phone') ELSE ${alias2}.text END`, "mentionText");
|
|
@@ -23043,7 +23043,7 @@ var FIELD_COMPILERS = {
|
|
|
23043
23043
|
subject
|
|
23044
23044
|
};
|
|
23045
23045
|
|
|
23046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
23047
23047
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
23048
23048
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
23049
23049
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -23059,7 +23059,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
23059
23059
|
};
|
|
23060
23060
|
}, "placeOf");
|
|
23061
23061
|
|
|
23062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23062
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
23063
23063
|
var DRAIN_ON_WRITE = 500;
|
|
23064
23064
|
var METHOD = "rules";
|
|
23065
23065
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -23225,7 +23225,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
23225
23225
|
return queued.length;
|
|
23226
23226
|
}, "drainMentions");
|
|
23227
23227
|
|
|
23228
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23228
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
23229
23229
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
23230
23230
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
23231
23231
|
if (!exists2)
|
|
@@ -23233,7 +23233,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
23233
23233
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
23234
23234
|
}, "indexRow");
|
|
23235
23235
|
|
|
23236
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
23237
23237
|
var INDEX = "message_stems";
|
|
23238
23238
|
var SETTING2 = "searchStemmers";
|
|
23239
23239
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -23359,7 +23359,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
23359
23359
|
};
|
|
23360
23360
|
}, "stemmerCache");
|
|
23361
23361
|
|
|
23362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23362
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
23363
23363
|
var rehearsal = new AsyncLocalStorage();
|
|
23364
23364
|
var SQLITE_BUSY = 5;
|
|
23365
23365
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
@@ -23502,7 +23502,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
23502
23502
|
}
|
|
23503
23503
|
}, "read");
|
|
23504
23504
|
|
|
23505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
23506
23506
|
var FOLDED = [
|
|
23507
23507
|
{ table: "tasks", column: "title" },
|
|
23508
23508
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -23539,7 +23539,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
23539
23539
|
return filled;
|
|
23540
23540
|
}, "fillFolded");
|
|
23541
23541
|
|
|
23542
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23542
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
23543
23543
|
import { createHash as createHash3 } from "node:crypto";
|
|
23544
23544
|
var CHUNK_CHARS = 1200;
|
|
23545
23545
|
var CHUNK_OVERLAP = 150;
|
|
@@ -23644,7 +23644,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
23644
23644
|
return chunks2;
|
|
23645
23645
|
}, "cutChunks");
|
|
23646
23646
|
|
|
23647
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23647
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
23648
23648
|
var DAY = 864e5;
|
|
23649
23649
|
var CURRENCY = [
|
|
23650
23650
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -23770,7 +23770,7 @@ var dueDayOf = /* @__PURE__ */ __name((text8, createdMs) => {
|
|
|
23770
23770
|
return best?.day ?? null;
|
|
23771
23771
|
}, "dueDayOf");
|
|
23772
23772
|
|
|
23773
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
23774
23774
|
var DAY2 = 864e5;
|
|
23775
23775
|
var STOP_WORDS = new Set([
|
|
23776
23776
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -23925,7 +23925,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
23925
23925
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
23926
23926
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
23927
23927
|
|
|
23928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
23929
23929
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
23930
23930
|
coalesce(CASE k.chunkable_type
|
|
23931
23931
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -24067,7 +24067,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
24067
24067
|
}, "dropUnusedVectors");
|
|
24068
24068
|
var dropAllUnusedVectors = /* @__PURE__ */ __name((database) => database.prepare("DELETE FROM embeddings WHERE NOT EXISTS (SELECT 1 FROM chunks k WHERE k.content_hash = embeddings.content_hash) RETURNING 1").all().length, "dropAllUnusedVectors");
|
|
24069
24069
|
|
|
24070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
24071
24071
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
24072
24072
|
r.last_message_id, r.text_start, r.text_end FROM conversations c
|
|
24073
24073
|
CROSS JOIN chunks k ON k.chunkable_type = 'conversation' AND k.chunkable_id = c.id
|
|
@@ -24412,7 +24412,7 @@ var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.ma
|
|
|
24412
24412
|
Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
|
|
24413
24413
|
])), "vectorCounts");
|
|
24414
24414
|
|
|
24415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24415
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
24416
24416
|
var DOCUMENT_PICTURE = "document_picture";
|
|
24417
24417
|
var SCAN_PAGE2 = 5e3;
|
|
24418
24418
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -24475,12 +24475,12 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
24475
24475
|
}, "nearestPictures")
|
|
24476
24476
|
}), "documentPicturesOver");
|
|
24477
24477
|
|
|
24478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
|
|
24479
24479
|
var noteIndexText = /* @__PURE__ */ __name((title2, text8) => title2 ? `${title2}
|
|
24480
24480
|
|
|
24481
24481
|
${text8}` : text8, "noteIndexText");
|
|
24482
24482
|
|
|
24483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
|
|
24484
24484
|
var ENRICHMENT_SUBJECTS = ["document", "note", "email"];
|
|
24485
24485
|
var ENRICHMENT_POSITION = 1e6;
|
|
24486
24486
|
var EMAIL_ENRICHMENT = "email_enrichment";
|
|
@@ -24574,7 +24574,7 @@ var enrichmentsOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
|
24574
24574
|
}), "clear")
|
|
24575
24575
|
}), "enrichmentsOver");
|
|
24576
24576
|
|
|
24577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
24578
24578
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
24579
24579
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
24580
24580
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -24650,7 +24650,7 @@ var compile = /* @__PURE__ */ __name((node, columns2, options) => {
|
|
|
24650
24650
|
var queryFilter = /* @__PURE__ */ __name((ast, columns2, options) => compile(ast.root, columns2, options), "queryFilter");
|
|
24651
24651
|
var bound2 = /* @__PURE__ */ __name(({ sql: text8, params }) => sql.join(text8.split("?").map((part2, at2) => at2 < params.length ? sql`${sql.raw(part2)}${params[at2]}` : sql.raw(part2)), sql``), "bound");
|
|
24652
24652
|
|
|
24653
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
24654
24654
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
24655
24655
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
24656
24656
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -24740,7 +24740,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
24740
24740
|
});
|
|
24741
24741
|
}, "linkMeeting");
|
|
24742
24742
|
|
|
24743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24743
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/task-titles.js
|
|
24744
24744
|
var MAX_TITLE = 120;
|
|
24745
24745
|
var placeholderTitleOf = /* @__PURE__ */ __name((row2) => `${String(row2.type)} \u2014 ${String(row2.source_locator ?? "")}`, "placeholderTitleOf");
|
|
24746
24746
|
var PLACEHOLDER_TITLE_SQL = "title = type || ' \u2014 ' || coalesce(source_locator, '')";
|
|
@@ -24802,7 +24802,7 @@ var fillFoundTaskTitles = /* @__PURE__ */ __name((database, warn, { batch = 500
|
|
|
24802
24802
|
}
|
|
24803
24803
|
}, "fillFoundTaskTitles");
|
|
24804
24804
|
|
|
24805
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
24806
24806
|
var EVENT_TEXT = "trim(coalesce(e.description, '') || ' ' || coalesce(e.location, '') || ' ' || coalesce((SELECT group_concat(p.name, ' ') FROM calendar_entries ce JOIN calendar_entry_participants p ON p.entry_id = ce.id WHERE ce.event_id = e.id AND ce.deleted_at IS NULL AND p.resource = 0 AND p.name IS NOT NULL), ''))";
|
|
24807
24807
|
var UNSEARCHED_EVENT_TYPES = [
|
|
24808
24808
|
"working-location",
|
|
@@ -25049,7 +25049,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
25049
25049
|
return true;
|
|
25050
25050
|
}, "resetNoteIndex");
|
|
25051
25051
|
|
|
25052
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25052
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
25053
25053
|
var keyOf2 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
25054
25054
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
25055
25055
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf2))) {
|
|
@@ -25068,7 +25068,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
25068
25068
|
}
|
|
25069
25069
|
}, "resolvePersonLinks");
|
|
25070
25070
|
|
|
25071
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
25072
25072
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
25073
25073
|
id: integer("id").primaryKey(),
|
|
25074
25074
|
name: text("name").notNull().unique(),
|
|
@@ -25077,7 +25077,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
25077
25077
|
updatedAt: integer("updated_at").notNull()
|
|
25078
25078
|
});
|
|
25079
25079
|
|
|
25080
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
|
|
25081
25081
|
var linkRevisions = sqliteTable("link_revisions", {
|
|
25082
25082
|
id: integer("id").primaryKey(),
|
|
25083
25083
|
linkId: integer("link_id").notNull(),
|
|
@@ -25089,7 +25089,7 @@ var linkRevisions = sqliteTable("link_revisions", {
|
|
|
25089
25089
|
createdAt: integer("created_at").notNull()
|
|
25090
25090
|
}, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
|
|
25091
25091
|
|
|
25092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
25093
25093
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
25094
25094
|
sourceKey: text("source_key").notNull(),
|
|
25095
25095
|
collection: text("collection").notNull(),
|
|
@@ -25099,13 +25099,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
25099
25099
|
createdAt: integer("created_at").notNull()
|
|
25100
25100
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
25101
25101
|
|
|
25102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
25103
25103
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
25104
25104
|
id: integer("id").notNull(),
|
|
25105
25105
|
indexableType: text("indexable_type").notNull()
|
|
25106
25106
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
25107
25107
|
|
|
25108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25108
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
25109
25109
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
25110
25110
|
id: integer("id").primaryKey(),
|
|
25111
25111
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -25125,7 +25125,7 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
25125
25125
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
25126
25126
|
]);
|
|
25127
25127
|
|
|
25128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25128
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
|
|
25129
25129
|
var enrichments = sqliteTable("enrichments", {
|
|
25130
25130
|
subjectType: text("subject_type").notNull(),
|
|
25131
25131
|
subjectId: integer("subject_id").notNull(),
|
|
@@ -25137,7 +25137,7 @@ var enrichments = sqliteTable("enrichments", {
|
|
|
25137
25137
|
createdAt: integer("created_at").notNull()
|
|
25138
25138
|
}, (table) => [primaryKey({ columns: [table.subjectType, table.subjectId] })]);
|
|
25139
25139
|
|
|
25140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/templates.js
|
|
25141
25141
|
var templates = sqliteTable("templates", {
|
|
25142
25142
|
key: text("key").notNull(),
|
|
25143
25143
|
channel: text("channel").notNull(),
|
|
@@ -25159,7 +25159,7 @@ var templatesHistory = sqliteTable("templates_history", {
|
|
|
25159
25159
|
index("templates_history_by_key_channel_language_id").on(table.key, table.channel, table.language, table.id)
|
|
25160
25160
|
]);
|
|
25161
25161
|
|
|
25162
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
|
|
25163
25163
|
var links = sqliteTable("links", {
|
|
25164
25164
|
id: integer("id").primaryKey(),
|
|
25165
25165
|
fromType: text("from_type").notNull(),
|
|
@@ -25190,7 +25190,7 @@ var links = sqliteTable("links", {
|
|
|
25190
25190
|
index("links_by_to_type_to_id").on(table.toType, table.toId)
|
|
25191
25191
|
]);
|
|
25192
25192
|
|
|
25193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
25194
25194
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
25195
25195
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
25196
25196
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -25216,7 +25216,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
25216
25216
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
25217
25217
|
]);
|
|
25218
25218
|
|
|
25219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25219
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
25220
25220
|
var accounts = sqliteTable("accounts", {
|
|
25221
25221
|
id: integer("id").primaryKey(),
|
|
25222
25222
|
provider: text("provider").notNull(),
|
|
@@ -27383,7 +27383,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
27383
27383
|
at: integer("at").notNull()
|
|
27384
27384
|
});
|
|
27385
27385
|
|
|
27386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
27387
27387
|
var contactsOf = /* @__PURE__ */ __name(({ phones: phones2, emails: emails3 }) => {
|
|
27388
27388
|
if (phones2 === void 0 && emails3 === void 0)
|
|
27389
27389
|
return void 0;
|
|
@@ -27629,7 +27629,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
27629
27629
|
}, "meetingIdentityPk");
|
|
27630
27630
|
var phoneOf = /* @__PURE__ */ __name(({ orm }, provider, nativeId) => orm.select({ phone: identities.phone }).from(identities).where(and(eq(identities.provider, provider), eq(identities.externalId, nativeId))).get()?.phone ?? null, "phoneOf");
|
|
27631
27631
|
|
|
27632
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
27633
27633
|
var identitiesOf = /* @__PURE__ */ __name(({ database }, person2) => database.prepare("SELECT identity_id AS pk FROM identity_links WHERE person_id = ?").all(person2).map(({ pk }) => Number(pk)), "identitiesOf");
|
|
27634
27634
|
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
27635
27635
|
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
@@ -27644,7 +27644,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
|
27644
27644
|
var separated = /* @__PURE__ */ __name((context, one2, other) => one2 !== other && apart(context, { identities: identitiesOf(context, one2), person: one2 }, { identities: identitiesOf(context, other), person: other }), "separated");
|
|
27645
27645
|
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
27646
27646
|
|
|
27647
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27647
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
27648
27648
|
var MESSAGE_FIELDS = {
|
|
27649
27649
|
pk: messages.id,
|
|
27650
27650
|
nativeId: messages.externalId,
|
|
@@ -27824,7 +27824,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
27824
27824
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
27825
27825
|
}), "chatActivity");
|
|
27826
27826
|
|
|
27827
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27827
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
27828
27828
|
var HIT_FIELDS = {
|
|
27829
27829
|
...MESSAGE_FIELDS,
|
|
27830
27830
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -27925,7 +27925,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
27925
27925
|
};
|
|
27926
27926
|
}, "directReplies");
|
|
27927
27927
|
|
|
27928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
27929
27929
|
var identityRow = /* @__PURE__ */ __name(({ orm }, { provider, id: id2 }) => orm.select({ pk: identities.id, personPk: identityLinks.personId }).from(identities).innerJoin(identityLinks, eq(identityLinks.identityId, identities.id)).where(and(eq(identities.provider, provider), eq(identities.externalId, id2))).get(), "identityRow");
|
|
27930
27930
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
27931
27931
|
const found2 = identityRow(context, ref3);
|
|
@@ -28138,7 +28138,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
28138
28138
|
}, "mentioning");
|
|
28139
28139
|
var escaped = /* @__PURE__ */ __name((text8) => text8.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
28140
28140
|
|
|
28141
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28141
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
28142
28142
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
28143
28143
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
28144
28144
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -28195,7 +28195,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
28195
28195
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
28196
28196
|
}, "proposedBySql");
|
|
28197
28197
|
|
|
28198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
|
|
28199
28199
|
var TABLES = { memory: "memories", fact: "facts" };
|
|
28200
28200
|
var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
|
|
28201
28201
|
var KEPT = 20;
|
|
@@ -28290,7 +28290,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
|
|
|
28290
28290
|
return scrubbed;
|
|
28291
28291
|
}, "scrubSourceReviews");
|
|
28292
28292
|
|
|
28293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
|
|
28294
28294
|
var QUOTE_LIMIT = 500;
|
|
28295
28295
|
var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
|
|
28296
28296
|
var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
|
|
@@ -28569,11 +28569,11 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at2) => {
|
|
|
28569
28569
|
database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
|
|
28570
28570
|
}, "deleteDocumentRow");
|
|
28571
28571
|
|
|
28572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
28573
28573
|
var profilesOn = /* @__PURE__ */ __name((profiles, app, key2) => Object.entries(profiles[app] ?? {}).filter(([, saved]) => saved.provider === key2.provider && saved.account === key2.account).map(([name]) => name), "profilesOn");
|
|
28574
28574
|
var oneLine = /* @__PURE__ */ __name((text8) => singleLine(text8.replace(/\s+/g, " ").trim()), "oneLine");
|
|
28575
28575
|
|
|
28576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28576
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-accounts.js
|
|
28577
28577
|
var accountKeys = /* @__PURE__ */ __name((database, ids3) => {
|
|
28578
28578
|
const unique2 = [...new Set(ids3)];
|
|
28579
28579
|
if (unique2.length === 0)
|
|
@@ -28662,7 +28662,7 @@ var refEndsOf = /* @__PURE__ */ __name((database, text8) => {
|
|
|
28662
28662
|
}, "refEndsOf");
|
|
28663
28663
|
var refAccountsOf = /* @__PURE__ */ __name((database, text8) => refEndsOf(database, text8)?.flat(), "refAccountsOf");
|
|
28664
28664
|
|
|
28665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28665
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
28666
28666
|
var EXCERPT_CHARS = 280;
|
|
28667
28667
|
var TITLE_CHARS = 120;
|
|
28668
28668
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -29086,7 +29086,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
29086
29086
|
ends: /* @__PURE__ */ __name(async (text8) => refEndsOf(context.database, text8), "ends")
|
|
29087
29087
|
}), "refsStoreOver");
|
|
29088
29088
|
|
|
29089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
29090
29090
|
var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
|
|
29091
29091
|
ref: ref3,
|
|
29092
29092
|
kind: read2.kind,
|
|
@@ -29124,7 +29124,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
29124
29124
|
});
|
|
29125
29125
|
}, "evidenceSourcesOf");
|
|
29126
29126
|
|
|
29127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
29128
29128
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
29129
29129
|
var MAX_TEXT_CHARS = 2e6;
|
|
29130
29130
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -29150,7 +29150,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
29150
29150
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
29151
29151
|
}, "pdfPreviewLimits");
|
|
29152
29152
|
|
|
29153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
29154
29154
|
import { randomBytes } from "node:crypto";
|
|
29155
29155
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
29156
29156
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -29163,7 +29163,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
29163
29163
|
return time3 + random;
|
|
29164
29164
|
}, "ulid");
|
|
29165
29165
|
|
|
29166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
29167
29167
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
29168
29168
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
29169
29169
|
if (!meta && !sections?.length)
|
|
@@ -29184,11 +29184,11 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
29184
29184
|
return typeof language === "string" && language !== "" ? language : null;
|
|
29185
29185
|
}, "languageOf");
|
|
29186
29186
|
|
|
29187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/file-note.js
|
|
29188
29188
|
var LIVE3 = "f.deleted_at IS NULL AND d.deleted_at IS NULL AND coalesce(json_extract(d.metadata, '$.catalog.active'), 1)=1";
|
|
29189
29189
|
var fileNoteRow = /* @__PURE__ */ __name((database, account, local, path) => database.prepare(local ? `SELECT d.*, f.account_id AS account_id, f.external_id AS external_id, coalesce(f.external_updated_at, d.external_updated_at) AS external_updated_at FROM files f JOIN documents d ON d.id = f.document_id WHERE f.account_id = ? AND f.external_id = ? AND ${LIVE3} ORDER BY d.created_at, d.id LIMIT 1` : `SELECT d.*, f.account_id AS account_id, coalesce(f.external_updated_at, d.external_updated_at) AS external_updated_at FROM documents d JOIN files f ON f.document_id = d.id AND f.account_id = d.account_id WHERE d.account_id = ? AND d.external_id = ? AND ${LIVE3} LIMIT 1`).get(account, path), "fileNoteRow");
|
|
29190
29190
|
|
|
29191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
29192
29192
|
var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
29193
29193
|
var objectOf = /* @__PURE__ */ __name((value) => {
|
|
29194
29194
|
if (isObject2(value))
|
|
@@ -29435,7 +29435,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
29435
29435
|
};
|
|
29436
29436
|
}, "filesStoreOver");
|
|
29437
29437
|
|
|
29438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29438
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
29439
29439
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
29440
29440
|
entity: "document",
|
|
29441
29441
|
backend: "sql",
|
|
@@ -29481,7 +29481,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
29481
29481
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns2, { zone: timezoneOf() });
|
|
29482
29482
|
}, "importedDocumentWhere");
|
|
29483
29483
|
|
|
29484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29484
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
29485
29485
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
29486
29486
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
29487
29487
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -29489,7 +29489,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
29489
29489
|
reason = excluded.reason, updated_at = excluded.updated_at WHERE link_reviews.status = 'open'`).run(linkable.type, linkable.id, entity, JSON.stringify([...candidates].sort((a, b) => a - b)), reason, now2, now2);
|
|
29490
29490
|
}, "reviewLink");
|
|
29491
29491
|
|
|
29492
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/link-row.js
|
|
29493
29493
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
29494
29494
|
var thingRef = /* @__PURE__ */ __name((database, type, id2) => type == null || id2 == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? null, "thingRef");
|
|
29495
29495
|
var hasBothEnds = /* @__PURE__ */ __name((link3) => link3.from !== null && link3.to !== null, "hasBothEnds");
|
|
@@ -29523,7 +29523,7 @@ var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
|
29523
29523
|
};
|
|
29524
29524
|
}, "linkOf");
|
|
29525
29525
|
|
|
29526
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
29527
29527
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
29528
29528
|
const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
|
|
29529
29529
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -29544,7 +29544,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
29544
29544
|
return changed;
|
|
29545
29545
|
}, "dateFileNotes");
|
|
29546
29546
|
|
|
29547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
29548
29548
|
var textOf2 = /* @__PURE__ */ __name((text8, what, max = 1e5, allowEmpty = false) => {
|
|
29549
29549
|
const value = text8.trim();
|
|
29550
29550
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -29557,7 +29557,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
29557
29557
|
return value;
|
|
29558
29558
|
}, "oneOf");
|
|
29559
29559
|
|
|
29560
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29560
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
29561
29561
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
29562
29562
|
var RELATIONSHIPS = RELATION_KINDS.map(linkKind).join(", ");
|
|
29563
29563
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
@@ -30079,10 +30079,10 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30079
30079
|
};
|
|
30080
30080
|
}, "notesStoreOver");
|
|
30081
30081
|
|
|
30082
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30082
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/rows-page.js
|
|
30083
30083
|
var pageOfRows = /* @__PURE__ */ __name((rows, limit, offset = 0) => rows.length > limit ? { items: rows.slice(0, limit), hasMore: true, nextOffset: offset + limit } : { items: rows, hasMore: false }, "pageOfRows");
|
|
30084
30084
|
|
|
30085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30085
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
30086
30086
|
var NAMED = "SELECT m.*, b.name AS author_name, b.kind AS author_kind FROM memories m LEFT JOIN bots b ON m.author_type = 'bot' AND b.id = m.author_id";
|
|
30087
30087
|
var iso5 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
30088
30088
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -30347,7 +30347,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30347
30347
|
};
|
|
30348
30348
|
}, "memoriesStoreOver");
|
|
30349
30349
|
|
|
30350
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
30351
30351
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
30352
30352
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
30353
30353
|
throw new CliError(code, message3, { reason });
|
|
@@ -30495,7 +30495,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
30495
30495
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly: ownerOnly2, linkedId, ...decisionsOver(context) };
|
|
30496
30496
|
}, "reviewedRowsOver");
|
|
30497
30497
|
|
|
30498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
30499
30499
|
var MAX_LINES = 500;
|
|
30500
30500
|
var PARENTS = {
|
|
30501
30501
|
invoice: {
|
|
@@ -30595,7 +30595,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
30595
30595
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
30596
30596
|
}, "moneyLinesOver");
|
|
30597
30597
|
|
|
30598
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
30599
30599
|
var COUNTED = {
|
|
30600
30600
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
30601
30601
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -30670,7 +30670,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
30670
30670
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
30671
30671
|
}, "refundRulesOver");
|
|
30672
30672
|
|
|
30673
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30673
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
30674
30674
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
30675
30675
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
30676
30676
|
var PAID = netPaidSql("i.id");
|
|
@@ -31074,7 +31074,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31074
31074
|
};
|
|
31075
31075
|
}, "financeStoreOver");
|
|
31076
31076
|
|
|
31077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
31078
31078
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
31079
31079
|
throw new CliError("validation_error", message3, { reason });
|
|
31080
31080
|
}, "refuse");
|
|
@@ -31152,7 +31152,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
31152
31152
|
};
|
|
31153
31153
|
}, "paymentEntriesOver");
|
|
31154
31154
|
|
|
31155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
31156
31156
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
31157
31157
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
31158
31158
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -31179,7 +31179,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
31179
31179
|
return valid;
|
|
31180
31180
|
}, "validateEvidenceFindings");
|
|
31181
31181
|
|
|
31182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
31183
31183
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
31184
31184
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
31185
31185
|
var iso7 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31373,7 +31373,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31373
31373
|
};
|
|
31374
31374
|
}, "proposedActionsStoreOver");
|
|
31375
31375
|
|
|
31376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-proposals.js
|
|
31377
31377
|
var CONFIRMED = "proposal";
|
|
31378
31378
|
var refOf = /* @__PURE__ */ __name(({ database }, pk) => {
|
|
31379
31379
|
const row2 = database.prepare("SELECT provider, external_id FROM identities WHERE id = ?").get(pk);
|
|
@@ -31725,7 +31725,7 @@ var identityLinkRows = /* @__PURE__ */ __name((context, { person: person2, statu
|
|
|
31725
31725
|
return { items, hasMore: rows.length > limit };
|
|
31726
31726
|
}, "identityLinkRows");
|
|
31727
31727
|
|
|
31728
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/person-merges.js
|
|
31729
31729
|
var mergeId = /* @__PURE__ */ __name((to, from2) => `merge:${to}-${from2}`, "mergeId");
|
|
31730
31730
|
var parseMergeId = /* @__PURE__ */ __name((id2) => {
|
|
31731
31731
|
const found2 = /^merge:([1-9]\d*)-([1-9]\d*)$/.exec(id2.trim());
|
|
@@ -31828,7 +31828,7 @@ var split = /* @__PURE__ */ __name((context, uid, refs, by) => {
|
|
|
31828
31828
|
return recordOf(context, alone);
|
|
31829
31829
|
}, "split");
|
|
31830
31830
|
|
|
31831
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-split-proposals.js
|
|
31832
31832
|
var refOf2 = /* @__PURE__ */ __name(({ provider, id: id2 }) => `${provider}:${id2}`, "refOf");
|
|
31833
31833
|
var keyOf3 = /* @__PURE__ */ __name((split2, person2, identities2) => `${split2} ${person2} ${[...identities2].sort().join(" ")}`, "keyOf");
|
|
31834
31834
|
var planOf = /* @__PURE__ */ __name((context, input) => {
|
|
@@ -32005,7 +32005,7 @@ var forgetErasedSplits = /* @__PURE__ */ __name((database) => {
|
|
|
32005
32005
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
32006
32006
|
}, "forgetErasedSplits");
|
|
32007
32007
|
|
|
32008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/test-data.js
|
|
32009
32009
|
var SEED_PEOPLE = [
|
|
32010
32010
|
{ name: "Owner", username: "owner" },
|
|
32011
32011
|
{ name: "Ann Lee", username: "ann" },
|
|
@@ -32022,7 +32022,7 @@ var RESERVED_ADDRESS_GLOBS = [
|
|
|
32022
32022
|
];
|
|
32023
32023
|
var SEED_ID_GLOBS = ["person-[0-9]*"];
|
|
32024
32024
|
|
|
32025
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32025
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/test-people.js
|
|
32026
32026
|
var TEST_DATA_KIND = "test_data";
|
|
32027
32027
|
var globs = /* @__PURE__ */ __name((column2, patterns) => patterns.map((pattern) => `${column2} GLOB '${pattern}'`).join(" OR "), "globs");
|
|
32028
32028
|
var SURE = `(${globs("i.external_id", SEED_ID_GLOBS)} OR ${globs("lower(i.email)", RESERVED_ADDRESS_GLOBS)})`;
|
|
@@ -32091,7 +32091,7 @@ var forgetErasedTestData = /* @__PURE__ */ __name((database) => {
|
|
|
32091
32091
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
32092
32092
|
}, "forgetErasedTestData");
|
|
32093
32093
|
|
|
32094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
32095
32095
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null, startScope) => Number(orm.insert(accounts).values({
|
|
32096
32096
|
provider,
|
|
32097
32097
|
externalId: account,
|
|
@@ -32185,7 +32185,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
32185
32185
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
32186
32186
|
}, "dropOrphanPeople");
|
|
32187
32187
|
|
|
32188
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
32189
32189
|
var HISTORY_KEY = "$history";
|
|
32190
32190
|
var objectOf2 = /* @__PURE__ */ __name((text8) => {
|
|
32191
32191
|
if (typeof text8 !== "string")
|
|
@@ -32261,7 +32261,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
32261
32261
|
return rest;
|
|
32262
32262
|
}, "withoutHistory");
|
|
32263
32263
|
|
|
32264
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32264
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
32265
32265
|
var chatOf = /* @__PURE__ */ __name(({ orm }, accountKey, chatKey) => orm.select({ id: chats.externalId }).from(chats).where(and(eq(chats.id, chatKey), eq(chats.accountId, accountKey))).get()?.id, "chatOf");
|
|
32266
32266
|
var findChatPk = /* @__PURE__ */ __name(({ orm }, accountKey, chatId) => orm.select({ pk: chats.id }).from(chats).where(and(eq(chats.accountId, accountKey), eq(chats.externalId, chatId))).get()?.pk, "findChatPk");
|
|
32267
32267
|
var setChatScope = /* @__PURE__ */ __name((context, accountKey, chatId, scope3) => {
|
|
@@ -32559,7 +32559,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
32559
32559
|
}
|
|
32560
32560
|
}, "replaceAutoTags");
|
|
32561
32561
|
|
|
32562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-tokens.js
|
|
32563
32563
|
var BOT_TOKEN = /(?<!\d)(\d{6,12}):[A-Za-z0-9_-]{30,40}(?![A-Za-z0-9_-])/g;
|
|
32564
32564
|
var MAY_HOLD = "*[0-9][0-9][0-9][0-9][0-9][0-9]:*";
|
|
32565
32565
|
var MASKED_THROUGH = "bot_tokens_masked_through";
|
|
@@ -32599,7 +32599,7 @@ var maskStoredBotTokens = /* @__PURE__ */ __name((context) => {
|
|
|
32599
32599
|
}, "maskStoredBotTokens");
|
|
32600
32600
|
var masks = /* @__PURE__ */ __name((value) => value != null && withoutBotTokens(String(value)) !== value, "masks");
|
|
32601
32601
|
|
|
32602
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32602
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
32603
32603
|
import { createHash as createHash4 } from "node:crypto";
|
|
32604
32604
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
32605
32605
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -32697,7 +32697,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
32697
32697
|
return { source: source2, query, chat: chat2, senders, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
32698
32698
|
}, "contextEvidenceRequest");
|
|
32699
32699
|
|
|
32700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32700
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
32701
32701
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
32702
32702
|
var ACTIVITY = `
|
|
32703
32703
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -32827,7 +32827,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
32827
32827
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
32828
32828
|
}), "mailActivity");
|
|
32829
32829
|
|
|
32830
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32830
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
32831
32831
|
var GREETING = new RegExp("^(hi|hello|hey|dear|greetings|good (morning|afternoon|evening)|\u043F\u0440\u0438\u0432\u0435\u0442|\u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439(\u0442\u0435)?|\u0434\u043E\u0431\u0440(\u044B\u0439|\u043E\u0435|\u043E\u0433\u043E) (\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440|\u0443\u0442\u0440\u043E|\u0443\u0442\u0440\u0430|\u0434\u043D\u044F)|hola|buen(os|as) (d\xEDas|dias|tardes|noches)|estimad[oa]s?|querid[oa]s?)(?![\\p{L}\\p{N}])([\\s,]+\\p{L}[\\p{L}.'\u2019-]*){0,3}\\s*[,!.:]?$", "iu");
|
|
32832
32832
|
var SIGN_OFF = /^(best|best regards|best wishes|kind regards|warm regards|regards|thanks|thanks again|thanks a lot|thank you|many thanks|cheers|sincerely|yours|yours truly|yours sincerely|br|с уважением|спасибо|заранее спасибо|всего доброго|всего хорошего|un saludo|saludos|saludos cordiales|atentamente|gracias|muchas gracias)[\s,.!]*$/iu;
|
|
32833
32833
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -32968,7 +32968,7 @@ var mailOwnText = /* @__PURE__ */ __name((body2) => {
|
|
|
32968
32968
|
return text8 || body2.trim();
|
|
32969
32969
|
}, "mailOwnText");
|
|
32970
32970
|
|
|
32971
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32971
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
32972
32972
|
var titleOf2 = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
32973
32973
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
32974
32974
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
@@ -33081,7 +33081,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
33081
33081
|
return emails3 + threads;
|
|
33082
33082
|
}, "drainEmailIndex");
|
|
33083
33083
|
|
|
33084
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
33085
33085
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
33086
33086
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
33087
33087
|
var folderEmails = /* @__PURE__ */ __name((database, accountId, folder, uidvalidity) => database.prepare(`SELECT l.uid, e.external_id, coalesce(e.received_at, e.sent_at) AS at, e.read, e.flagged,
|
|
@@ -33179,7 +33179,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
33179
33179
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
33180
33180
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
33181
33181
|
|
|
33182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
33183
33183
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
33184
33184
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
33185
33185
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -33229,7 +33229,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
33229
33229
|
return threads.length;
|
|
33230
33230
|
}, "markEmailsRestored");
|
|
33231
33231
|
|
|
33232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
33233
33233
|
var MAIL_PIECE_ROWS = `SELECT p.id, p.content_hash AS hash, p.type, p.owner, p.position, p.email_id AS email, v.vector
|
|
33234
33234
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
33235
33235
|
WHERE p.account_id = ?
|
|
@@ -33289,7 +33289,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
33289
33289
|
}, "indexedMailPieces");
|
|
33290
33290
|
var nearestMailPieces = /* @__PURE__ */ __name((database, model, query, filter, depth) => (filter.threadExternalId === void 0 ? indexedMailPieces(database, model, query, filter, depth) : void 0) ?? scannedMailPieces(database, model, query, filter), "nearestMailPieces");
|
|
33291
33291
|
|
|
33292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
33293
33293
|
var sorted = /* @__PURE__ */ __name((value) => Array.isArray(value) ? value.map(sorted) : value !== null && typeof value === "object" ? Object.fromEntries(Object.keys(value).sort().map((key2) => [key2, sorted(value[key2])])) : value, "sorted");
|
|
33294
33294
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
33295
33295
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -33356,7 +33356,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
33356
33356
|
}
|
|
33357
33357
|
}), "mailRulesOver");
|
|
33358
33358
|
|
|
33359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
33360
33360
|
function checkMeetingCancelled(signal) {
|
|
33361
33361
|
if (!signal?.aborted)
|
|
33362
33362
|
return;
|
|
@@ -33367,7 +33367,7 @@ function checkMeetingCancelled(signal) {
|
|
|
33367
33367
|
}
|
|
33368
33368
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
33369
33369
|
|
|
33370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
33371
33371
|
var managerOf = /* @__PURE__ */ __name((database, meetingId) => {
|
|
33372
33372
|
const found2 = database.prepare("SELECT p.display_name, i.name, l.person_id FROM meeting_participants p JOIN identities i ON i.id = p.identity_id LEFT JOIN identity_links l ON l.identity_id = p.identity_id WHERE p.meeting_id = ? AND p.role = 'manager' ORDER BY p.id LIMIT 1").get(meetingId);
|
|
33373
33373
|
if (!found2)
|
|
@@ -33432,7 +33432,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
33432
33432
|
createdAt: Number(row2.created_at)
|
|
33433
33433
|
}), "transcriptRowOf");
|
|
33434
33434
|
|
|
33435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
33436
33436
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
33437
33437
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
33438
33438
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -33599,7 +33599,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33599
33599
|
}
|
|
33600
33600
|
}), "meetingReadsOver");
|
|
33601
33601
|
|
|
33602
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33602
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
33603
33603
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
33604
33604
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
33605
33605
|
const params = [input.accountId];
|
|
@@ -33642,7 +33642,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
33642
33642
|
return { clauses, params };
|
|
33643
33643
|
}, "meetingSelectionSql");
|
|
33644
33644
|
|
|
33645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33645
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-calls.js
|
|
33646
33646
|
var MOST_CALLS = 2e5;
|
|
33647
33647
|
var parsed3 = /* @__PURE__ */ __name((value) => {
|
|
33648
33648
|
if (typeof value !== "string")
|
|
@@ -33697,7 +33697,7 @@ var meetingCallsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33697
33697
|
}
|
|
33698
33698
|
}), "meetingCallsOver");
|
|
33699
33699
|
|
|
33700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33700
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
33701
33701
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
33702
33702
|
async meetingChatLines(input) {
|
|
33703
33703
|
checkMeetingCancelled(input.signal);
|
|
@@ -33725,7 +33725,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33725
33725
|
}
|
|
33726
33726
|
}), "meetingChatLinesOver");
|
|
33727
33727
|
|
|
33728
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
33729
33729
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
33730
33730
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
33731
33731
|
}, "missing");
|
|
@@ -33848,7 +33848,7 @@ function meetingContextLinksOver(context) {
|
|
|
33848
33848
|
}
|
|
33849
33849
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
33850
33850
|
|
|
33851
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33851
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-documents.js
|
|
33852
33852
|
var TRANSCRIPT_ROLE = "transcript";
|
|
33853
33853
|
var roleOf3 = /* @__PURE__ */ __name((value) => MEETING_DOCUMENT_ROLES.find((role) => role === value), "roleOf");
|
|
33854
33854
|
var attach = /* @__PURE__ */ __name((database, meetingId, fileId, role, metadata3, listed, now2) => {
|
|
@@ -33922,7 +33922,7 @@ var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
33922
33922
|
};
|
|
33923
33923
|
}, "meetingTranscriptDocumentsOver");
|
|
33924
33924
|
|
|
33925
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33925
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
33926
33926
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
33927
33927
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
33928
33928
|
var summaryOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -33951,7 +33951,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
33951
33951
|
return row2 ? summaryText(summaryOf2(row2)) : null;
|
|
33952
33952
|
}, "indexedText");
|
|
33953
33953
|
|
|
33954
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33954
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
33955
33955
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
33956
33956
|
var meetingCurrentIndexRows = `
|
|
33957
33957
|
SELECT 'meeting_transcript_row' AS indexable_type,r.id,r.id*4+1 AS rid,1 AS live,coalesce(length(CAST(r.text AS BLOB)),0) AS bytes FROM meeting_transcript_rows r JOIN meeting_transcripts t ON t.id=r.meeting_transcript_id JOIN meetings m ON m.id=t.meeting_id WHERE m.account_id=? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL
|
|
@@ -33982,7 +33982,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
33982
33982
|
}, "invalidateMeetingStems");
|
|
33983
33983
|
var meetingStemmableText = /* @__PURE__ */ __name((text8) => text8.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
33984
33984
|
|
|
33985
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33985
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
33986
33986
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
33987
33987
|
return {
|
|
33988
33988
|
async indexSearch(original) {
|
|
@@ -34050,10 +34050,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
34050
34050
|
}
|
|
34051
34051
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
34052
34052
|
|
|
34053
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
34054
34054
|
import { createHash as createHash5 } from "node:crypto";
|
|
34055
34055
|
|
|
34056
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
34057
34057
|
var SHORTEST_CORRECTION = 3;
|
|
34058
34058
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
34059
34059
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -34100,7 +34100,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words4) => {
|
|
|
34100
34100
|
return corrections;
|
|
34101
34101
|
}, "correctWords");
|
|
34102
34102
|
|
|
34103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
34104
34104
|
var SHORTEST_GARBLED = 4;
|
|
34105
34105
|
var MOST_WIDENED = 64;
|
|
34106
34106
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -34192,7 +34192,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
34192
34192
|
return found2.map((words4) => words4.sort((a, b) => a.distance - b.distance || b.docs - a.docs || a.term.localeCompare(b.term)).slice(0, MOST_WIDENED).map((word2) => word2.term));
|
|
34193
34193
|
}, "widenWords");
|
|
34194
34194
|
|
|
34195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
34196
34196
|
import { readFileSync } from "node:fs";
|
|
34197
34197
|
var loaded;
|
|
34198
34198
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -34251,7 +34251,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
34251
34251
|
return false;
|
|
34252
34252
|
}, "knownRussianWord");
|
|
34253
34253
|
|
|
34254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
34255
34255
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
34256
34256
|
var MOST_WORDS = 128;
|
|
34257
34257
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -34507,7 +34507,7 @@ var matchedMeetingWords = /* @__PURE__ */ __name((tree, text8, stemmer2) => {
|
|
|
34507
34507
|
return [...found2];
|
|
34508
34508
|
}, "matchedMeetingWords");
|
|
34509
34509
|
|
|
34510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
34511
34511
|
var fail = /* @__PURE__ */ __name((message3) => {
|
|
34512
34512
|
throw new CliError("validation_error", message3);
|
|
34513
34513
|
}, "fail");
|
|
@@ -34691,7 +34691,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
34691
34691
|
}
|
|
34692
34692
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
34693
34693
|
|
|
34694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
34695
34695
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34696
34696
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
34697
34697
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -34723,7 +34723,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34723
34723
|
}
|
|
34724
34724
|
}), "meetingLanguagesOver");
|
|
34725
34725
|
|
|
34726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
34727
34727
|
import { createHash as createHash6 } from "node:crypto";
|
|
34728
34728
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
34729
34729
|
if (value === void 0)
|
|
@@ -34816,7 +34816,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
34816
34816
|
}
|
|
34817
34817
|
}), "meetingParticipantSearchOver");
|
|
34818
34818
|
|
|
34819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34819
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
34820
34820
|
var preparationQueries = {
|
|
34821
34821
|
participants: {
|
|
34822
34822
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -34866,7 +34866,7 @@ var preparationQueries = {
|
|
|
34866
34866
|
}
|
|
34867
34867
|
};
|
|
34868
34868
|
|
|
34869
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34869
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
34870
34870
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34871
34871
|
async preparationContext(original) {
|
|
34872
34872
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -34907,7 +34907,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34907
34907
|
}
|
|
34908
34908
|
}), "meetingPreparationContextOver");
|
|
34909
34909
|
|
|
34910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
34911
34911
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
34912
34912
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
34913
34913
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -34921,7 +34921,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
34921
34921
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
34922
34922
|
)`, "preparationSubjects");
|
|
34923
34923
|
|
|
34924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
34925
34925
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34926
34926
|
async preparationKnowledge(original) {
|
|
34927
34927
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -34966,7 +34966,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
34966
34966
|
}
|
|
34967
34967
|
}), "meetingPreparationKnowledgeOver");
|
|
34968
34968
|
|
|
34969
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34969
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
34970
34970
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34971
34971
|
async preparationNotes(original) {
|
|
34972
34972
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -35019,7 +35019,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35019
35019
|
}
|
|
35020
35020
|
}), "meetingPreparationNotesOver");
|
|
35021
35021
|
|
|
35022
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35022
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
35023
35023
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35024
35024
|
async relatedHistory(original) {
|
|
35025
35025
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -35090,7 +35090,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35090
35090
|
}
|
|
35091
35091
|
}), "meetingRelatedHistoryOver");
|
|
35092
35092
|
|
|
35093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
35094
35094
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
35095
35095
|
var text3 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
35096
35096
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -35171,7 +35171,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35171
35171
|
}
|
|
35172
35172
|
}), "meetingReviewOver");
|
|
35173
35173
|
|
|
35174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
35175
35175
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
35176
35176
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
35177
35177
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -35225,7 +35225,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35225
35225
|
}
|
|
35226
35226
|
}), "meetingSeriesHistoryOver");
|
|
35227
35227
|
|
|
35228
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35228
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
35229
35229
|
var MOST_ROWS = 5e5;
|
|
35230
35230
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
35231
35231
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -35294,7 +35294,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35294
35294
|
}
|
|
35295
35295
|
}), "meetingStatsOver");
|
|
35296
35296
|
|
|
35297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
|
|
35298
35298
|
var CYRILLIC_TO_LATIN = {
|
|
35299
35299
|
\u0430: "a",
|
|
35300
35300
|
\u0431: "b",
|
|
@@ -35516,7 +35516,7 @@ for (const [full, short] of Object.entries(SHORT_FORMS))
|
|
|
35516
35516
|
}
|
|
35517
35517
|
var fullNames = /* @__PURE__ */ __name((skeleton) => [skeleton, ...FULL_NAMES.get(skeleton) ?? []], "fullNames");
|
|
35518
35518
|
|
|
35519
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/name-traces.js
|
|
35520
35520
|
var peopleByNameKey = /* @__PURE__ */ __name((database) => {
|
|
35521
35521
|
const found2 = /* @__PURE__ */ new Map();
|
|
35522
35522
|
for (const row2 of database.prepare("SELECT p.id, p.name FROM persons p WHERE p.owner = 0 AND p.name IS NOT NULL AND EXISTS (SELECT 1 FROM identity_links l WHERE l.person_id = p.id) ORDER BY p.id").all()) {
|
|
@@ -35632,7 +35632,7 @@ function* sharedTraces(database, a, b, name, except) {
|
|
|
35632
35632
|
}
|
|
35633
35633
|
__name(sharedTraces, "sharedTraces");
|
|
35634
35634
|
|
|
35635
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/person-matcher.js
|
|
35636
35636
|
var spellingsOf = /* @__PURE__ */ __name((value) => [value, value.slice(1)], "spellingsOf");
|
|
35637
35637
|
var PERSON_BY = {
|
|
35638
35638
|
// UNION, not OR: each branch reads its own index.
|
|
@@ -35655,7 +35655,7 @@ var personsByIdentifiers = /* @__PURE__ */ __name((database, ids3) => {
|
|
|
35655
35655
|
return [...found2].sort((a, b) => a - b);
|
|
35656
35656
|
}, "personsByIdentifiers");
|
|
35657
35657
|
|
|
35658
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35658
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/person-match-scan.js
|
|
35659
35659
|
var BY = "rule";
|
|
35660
35660
|
var RULE2 = { bot: "rule", kind: "rule" };
|
|
35661
35661
|
var MOST_SHARING = 6;
|
|
@@ -36104,7 +36104,7 @@ var linkPhones = /* @__PURE__ */ __name((context, identities2) => {
|
|
|
36104
36104
|
return pass.result;
|
|
36105
36105
|
}, "linkPhones");
|
|
36106
36106
|
|
|
36107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
36108
36108
|
var CURSOR_KEY = "meetings";
|
|
36109
36109
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
36110
36110
|
id: Number(row2.id),
|
|
@@ -36711,7 +36711,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
36711
36711
|
};
|
|
36712
36712
|
}, "meetingStoreOver");
|
|
36713
36713
|
|
|
36714
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
36715
36715
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
36716
36716
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
36717
36717
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -36737,7 +36737,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder2) => {
|
|
|
36737
36737
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder2))).run();
|
|
36738
36738
|
}, "release");
|
|
36739
36739
|
|
|
36740
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36740
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
36741
36741
|
var THREAD_COLUMNS = {
|
|
36742
36742
|
subject: {
|
|
36743
36743
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -36754,7 +36754,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
36754
36754
|
AND (${filter.where?.sql ?? "1"}) ORDER BY coalesce(last_email_at, 0) DESC, id DESC LIMIT ? OFFSET ?`).all(filter.accountId ?? null, filter.accountId ?? null, filter.includeDeleted ? 1 : 0, ...filter.where?.params ?? [], limit, offset);
|
|
36755
36755
|
}, "threadRows");
|
|
36756
36756
|
|
|
36757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
36758
36758
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
36759
36759
|
id: `email:${place.emailId}`,
|
|
36760
36760
|
chatId: place.threadExternalId,
|
|
@@ -37296,7 +37296,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
37296
37296
|
}
|
|
37297
37297
|
}), "mailStoreOver");
|
|
37298
37298
|
|
|
37299
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
37300
37300
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
37301
37301
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
37302
37302
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -37386,7 +37386,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
37386
37386
|
}, "knownWord");
|
|
37387
37387
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
37388
37388
|
|
|
37389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
37390
37390
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
37391
37391
|
var readsTranscripts = /* @__PURE__ */ __name((node) => (node.operator === "term" || node.operator === "phrase") && /[\p{L}\p{N}]/u.test(normalize(node.value)) && (node.field === "transcript" || node.implicit === true && (node.field === "text" || node.field === "exact")), "readsTranscripts");
|
|
37392
37392
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -37472,7 +37472,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
37472
37472
|
return found2;
|
|
37473
37473
|
}, "spokenTranscripts");
|
|
37474
37474
|
|
|
37475
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37475
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
37476
37476
|
var startOf = /* @__PURE__ */ __name((node) => node.operator === "wildcard" && node.implicit ? /^([\p{L}\p{N}]+)\*$/u.exec(normalize(node.value))?.[1] : void 0, "startOf");
|
|
37477
37477
|
var matchOf = /* @__PURE__ */ __name((node) => {
|
|
37478
37478
|
const start = startOf(node);
|
|
@@ -37530,7 +37530,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
37530
37530
|
});
|
|
37531
37531
|
}, "placeHits");
|
|
37532
37532
|
|
|
37533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
37534
37534
|
var GROUPS = {
|
|
37535
37535
|
chat: {
|
|
37536
37536
|
key: "m.chat_id",
|
|
@@ -37552,7 +37552,7 @@ var GROUPS = {
|
|
|
37552
37552
|
}
|
|
37553
37553
|
};
|
|
37554
37554
|
|
|
37555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37555
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
37556
37556
|
var MESSAGES = {
|
|
37557
37557
|
rows: "messages",
|
|
37558
37558
|
threads: "chats",
|
|
@@ -38048,7 +38048,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
38048
38048
|
};
|
|
38049
38049
|
}, "runCompiled");
|
|
38050
38050
|
|
|
38051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
38052
38052
|
function invalidMetadata() {
|
|
38053
38053
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
38054
38054
|
}
|
|
@@ -38150,7 +38150,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
38150
38150
|
};
|
|
38151
38151
|
}), "counterTargets");
|
|
38152
38152
|
|
|
38153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
38154
38154
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
38155
38155
|
var fileAttachments = /* @__PURE__ */ __name(({ database }, accountKey, { chatKey, messageId, beforePk, limit }) => database.prepare(`SELECT att.id AS pk, c.external_id AS chat_id, m.external_id AS message_id, att.position, att.kind, att.name, att.mime,
|
|
38156
38156
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -38269,7 +38269,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
38269
38269
|
}));
|
|
38270
38270
|
}, "attachmentViews");
|
|
38271
38271
|
|
|
38272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38272
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
38273
38273
|
var transcript2 = /* @__PURE__ */ __name(({ orm }, chatKey, messageId) => orm.select({ text: messageTranscripts.text, source: messageTranscripts.source }).from(messageTranscripts).where(and(eq(messageTranscripts.chatId, chatKey), eq(messageTranscripts.messageExternalId, messageId))).get(), "transcript");
|
|
38274
38274
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text8, source2) => {
|
|
38275
38275
|
const { orm, database, now: now2 } = context;
|
|
@@ -38307,7 +38307,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
38307
38307
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
38308
38308
|
}, "intoVoiceAttachment");
|
|
38309
38309
|
|
|
38310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38310
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
38311
38311
|
var FIELDS = [
|
|
38312
38312
|
"threadExternalId",
|
|
38313
38313
|
"senderIdentityId",
|
|
@@ -38631,7 +38631,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
38631
38631
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
38632
38632
|
}, "writeDerivedReactions");
|
|
38633
38633
|
|
|
38634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38634
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
38635
38635
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
38636
38636
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
38637
38637
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -38652,7 +38652,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
38652
38652
|
};
|
|
38653
38653
|
}, "keysOver");
|
|
38654
38654
|
|
|
38655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
38656
38656
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
38657
38657
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
38658
38658
|
if (!row2)
|
|
@@ -38699,7 +38699,7 @@ var forgetProfile = /* @__PURE__ */ __name((database, app, profile, now2) => {
|
|
|
38699
38699
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
38700
38700
|
}, "forgetProfile");
|
|
38701
38701
|
|
|
38702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38702
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
38703
38703
|
var DAY3 = 864e5;
|
|
38704
38704
|
var COUNTERPART_LINK = `EXISTS (SELECT 1 FROM links l WHERE l.from_type = 'event' AND l.from_id = e.id AND l.to_type = 'person' AND l.to_id = ? AND l.kind = ${linkKind("related-to")} AND l.role = '${COUNTERPART_ROLE}')`;
|
|
38705
38705
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -38815,7 +38815,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
38815
38815
|
return database.prepare(`SELECT e.* FROM events e WHERE ${clauses.join(" AND ")} ORDER BY ${filter.newest ? "e.starts_at DESC, e.id DESC" : "e.starts_at, e.id"} LIMIT ? OFFSET ?`).all(...params, limit, offset).map(eventOf);
|
|
38816
38816
|
}, "listEvents");
|
|
38817
38817
|
|
|
38818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
38819
38819
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
38820
38820
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey, now: now2 }, refresh) => {
|
|
38821
38821
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -38872,7 +38872,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
38872
38872
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
38873
38873
|
}, "forgetCalendarRows");
|
|
38874
38874
|
|
|
38875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38875
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
38876
38876
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
38877
38877
|
id: Number(row2.id),
|
|
38878
38878
|
accountId: Number(row2.account_id),
|
|
@@ -39475,7 +39475,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39475
39475
|
};
|
|
39476
39476
|
}, "eventStoreOver");
|
|
39477
39477
|
|
|
39478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/account-purge.js
|
|
39479
39479
|
var purgeAccount = /* @__PURE__ */ __name((context, accountKey) => {
|
|
39480
39480
|
const { orm, database, now: now2 } = context;
|
|
39481
39481
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -39599,7 +39599,7 @@ var purgeCrmCopies = /* @__PURE__ */ __name((database, accountKey) => {
|
|
|
39599
39599
|
run("DELETE FROM pipelines WHERE account_id = ?", accountKey);
|
|
39600
39600
|
}, "purgeCrmCopies");
|
|
39601
39601
|
|
|
39602
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39602
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
39603
39603
|
var ACCOUNT_REASON = "an account you connected, under another name: a mailbox or messenger you read may be someone else's";
|
|
39604
39604
|
var ownerNames = /* @__PURE__ */ __name(({ database }, owner) => database.prepare("SELECT i.name FROM identity_links l JOIN identities i ON i.id = l.identity_id WHERE l.person_id = ?").all(owner).map(({ name }) => new Set(nameSkeletons(displayName(typeof name === "string" ? name : null)))).filter((words4) => words4.size > 0), "ownerNames");
|
|
39605
39605
|
var ownersName = /* @__PURE__ */ __name((name, owner, alone) => {
|
|
@@ -39658,7 +39658,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
39658
39658
|
return personOf2(context, ref3);
|
|
39659
39659
|
}, "linkToOwner");
|
|
39660
39660
|
|
|
39661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
39662
39662
|
var PROVIDERS_SETTING = "providers";
|
|
39663
39663
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
39664
39664
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -39706,7 +39706,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
39706
39706
|
});
|
|
39707
39707
|
}, "registerProvider");
|
|
39708
39708
|
|
|
39709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
39710
39710
|
var DAY4 = 864e5;
|
|
39711
39711
|
var RECENTLY_CLOSED_MS = 14 * DAY4;
|
|
39712
39712
|
var TEXT_LIMIT = 20;
|
|
@@ -39904,7 +39904,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
39904
39904
|
};
|
|
39905
39905
|
}, "taskSimilarityOver");
|
|
39906
39906
|
|
|
39907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
39908
39908
|
var SETTING3 = "taskCategories";
|
|
39909
39909
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
39910
39910
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -39923,7 +39923,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
39923
39923
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(SETTING3, JSON.stringify(categories), now2);
|
|
39924
39924
|
}, "saveTaskCategories");
|
|
39925
39925
|
|
|
39926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
39927
39927
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
39928
39928
|
var ALLOWED = "taskAgentClose";
|
|
39929
39929
|
var MIN = "taskAgentCloseMin";
|
|
@@ -39979,7 +39979,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
39979
39979
|
];
|
|
39980
39980
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
39981
39981
|
|
|
39982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39982
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
39983
39983
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
39984
39984
|
var KEY = "taskFirstPassPerChat";
|
|
39985
39985
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -39999,7 +39999,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
39999
39999
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(KEY, String(value), now2);
|
|
40000
40000
|
}, "saveFirstPassPerChat");
|
|
40001
40001
|
|
|
40002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40002
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
40003
40003
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
40004
40004
|
var EXTERNAL_ID_CHARS = 200;
|
|
40005
40005
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -40026,7 +40026,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
40026
40026
|
return text8;
|
|
40027
40027
|
}, "sourceUrlOf");
|
|
40028
40028
|
|
|
40029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
40030
40030
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
40031
40031
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
40032
40032
|
name,
|
|
@@ -40278,7 +40278,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
40278
40278
|
var TASK_PEOPLE = `WITH merged AS (SELECT json_extract(value, '$[0]') AS id, json_extract(value, '$[1]') AS now FROM json_each(?)), counts AS (SELECT coalesce(m.now, a.assignee_id) AS person, count(DISTINCT t.id) AS n FROM task_assignments a JOIN tasks t ON t.id = a.task_id AND t.deleted_at IS NULL LEFT JOIN merged m ON m.id = a.assignee_id WHERE a.assignee_type = 'person' GROUP BY 1) SELECT p.id, p.name, p.owner, coalesce(c.n, 0) AS n FROM persons p LEFT JOIN counts c ON c.person = p.id WHERE NOT ${mergedAwaySql("p")} ORDER BY p.owner DESC, n DESC, p.name IS NULL, p.name COLLATE NOCASE, p.id LIMIT ?`;
|
|
40279
40279
|
var mergedAssignees = /* @__PURE__ */ __name((database) => JSON.stringify(database.prepare(`SELECT DISTINCT a.assignee_id AS id FROM task_assignments a JOIN persons p ON p.id = a.assignee_id WHERE a.assignee_type = 'person' AND ${mergedAwaySql("p")}`).all().map(({ id: id2 }) => [Number(id2), currentPerson(database, Number(id2))])), "mergedAssignees");
|
|
40280
40280
|
|
|
40281
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
40282
40282
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
40283
40283
|
if (row2.author_type == null)
|
|
40284
40284
|
return null;
|
|
@@ -40306,7 +40306,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
40306
40306
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
40307
40307
|
}, "addComment");
|
|
40308
40308
|
|
|
40309
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
40310
40310
|
var TASK_RELATION_KINDS = [
|
|
40311
40311
|
"blocked-by",
|
|
40312
40312
|
"follow-up-of",
|
|
@@ -40436,7 +40436,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record3) => {
|
|
|
40436
40436
|
};
|
|
40437
40437
|
}, "taskRelationsStoreOver");
|
|
40438
40438
|
|
|
40439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
40440
40440
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
40441
40441
|
var TASK_EVENT_KINDS = [
|
|
40442
40442
|
"created",
|
|
@@ -40995,7 +40995,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
40995
40995
|
};
|
|
40996
40996
|
}, "workTasksOver");
|
|
40997
40997
|
|
|
40998
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
40999
40999
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
41000
41000
|
const { database, now: now2 } = context;
|
|
41001
41001
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -41044,7 +41044,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
41044
41044
|
};
|
|
41045
41045
|
}, "taskCloseOver");
|
|
41046
41046
|
|
|
41047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
41048
41048
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
41049
41049
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
41050
41050
|
const { database, now: now2 } = context;
|
|
@@ -41263,7 +41263,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
41263
41263
|
};
|
|
41264
41264
|
}, "taskPairsOver");
|
|
41265
41265
|
|
|
41266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
41267
41267
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
41268
41268
|
var TASK_STATS_SQL = {
|
|
41269
41269
|
rows: /* @__PURE__ */ __name((board, filter) => `SELECT t.source_group, t.source_kind, t.project_id, t.status, t.created_at, t.closed_at FROM tasks t WHERE ${board ? PROJECT_SCOPE : ACCOUNT_SCOPE}${filter} ORDER BY t.created_at, t.id`, "rows"),
|
|
@@ -41302,7 +41302,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
41302
41302
|
}, "statNames")
|
|
41303
41303
|
}), "taskStatsOver");
|
|
41304
41304
|
|
|
41305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
41306
41306
|
var COLUMNS3 = "t.id AS row_id, t.package_id, t.source_locator, t.source_kind, t.source_group, t.type, t.status, t.close_reason, t.source, t.created_at, t.due_at, t.closed_at, t.closed_by_type, t.closed_by_id, t.key, t.category, t.claimed_by, t.claimed_until, p.name AS account";
|
|
41307
41307
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
41308
41308
|
const key2 = inboxKey(account);
|
|
@@ -41518,7 +41518,7 @@ var oneOf4 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
41518
41518
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
41519
41519
|
}, "oneOf");
|
|
41520
41520
|
|
|
41521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41521
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
41522
41522
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
41523
41523
|
const { database } = context;
|
|
41524
41524
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -41588,7 +41588,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
41588
41588
|
};
|
|
41589
41589
|
}, "accountsStoreOver");
|
|
41590
41590
|
|
|
41591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
41592
41592
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
41593
41593
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
41594
41594
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -41612,7 +41612,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
41612
41612
|
})), "keepDownloads");
|
|
41613
41613
|
var keepProviderRefs = /* @__PURE__ */ __name((context, chatKey, messageId, files2) => updatePlaced(context, chatKey, messageId, files2.filter((file) => Object.keys(file.providerRef).length > 0), (file) => refColumn(file.providerRef)), "keepProviderRefs");
|
|
41614
41614
|
|
|
41615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41615
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
41616
41616
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
41617
41617
|
const { database } = context;
|
|
41618
41618
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -41669,7 +41669,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
41669
41669
|
}, "keepAttachmentText")
|
|
41670
41670
|
}), "attachmentsStoreOver");
|
|
41671
41671
|
|
|
41672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41672
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
41673
41673
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
41674
41674
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
41675
41675
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -41854,7 +41854,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
41854
41854
|
return done;
|
|
41855
41855
|
}, "rekeyChats");
|
|
41856
41856
|
|
|
41857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41857
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
41858
41858
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
41859
41859
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
41860
41860
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -41912,7 +41912,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
41912
41912
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
41913
41913
|
}, "chatCoverage");
|
|
41914
41914
|
|
|
41915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41915
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
41916
41916
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
41917
41917
|
const { database } = context;
|
|
41918
41918
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -42061,7 +42061,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42061
42061
|
};
|
|
42062
42062
|
}, "chatsStoreOver");
|
|
42063
42063
|
|
|
42064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
42065
42065
|
import { createHash as createHash7 } from "node:crypto";
|
|
42066
42066
|
var BATCH_CONTEXT = 50;
|
|
42067
42067
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -42201,7 +42201,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
42201
42201
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
42202
42202
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
42203
42203
|
|
|
42204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
42205
42205
|
import { setTimeout } from "node:timers/promises";
|
|
42206
42206
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
42207
42207
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -42513,7 +42513,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
42513
42513
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
42514
42514
|
WHERE d.id IN (l.message_id, l.parent_id) AND d.deleted_at > l.created_at)`).map(({ id: id2, parent: parent2 }) => [id2, parent2])), "agentAnswers");
|
|
42515
42515
|
|
|
42516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
42517
42517
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
42518
42518
|
const { database } = context;
|
|
42519
42519
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -42620,7 +42620,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42620
42620
|
};
|
|
42621
42621
|
}, "conversationsStoreOver");
|
|
42622
42622
|
|
|
42623
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
42624
42624
|
var LIVE_MESSAGE = "SELECT m.id AS pk FROM messages m JOIN chats c ON c.id=m.chat_id JOIN accounts ac ON ac.id=m.account_id WHERE ac.provider=? AND ac.external_id=? AND c.external_id=? AND m.external_id=? AND m.deleted_at IS NULL";
|
|
42625
42625
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
42626
42626
|
const { database } = context;
|
|
@@ -42645,7 +42645,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42645
42645
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
42646
42646
|
}), "countersStoreOver");
|
|
42647
42647
|
|
|
42648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
42649
42649
|
var MENTION_STATUSES = ["found", "linked", "proposed", "dismissed"];
|
|
42650
42650
|
var MENTION_QUERY = defineQuery({
|
|
42651
42651
|
entity: "mention",
|
|
@@ -42864,7 +42864,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
42864
42864
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
42865
42865
|
}, "listPlaces");
|
|
42866
42866
|
|
|
42867
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
42868
42868
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
42869
42869
|
const { database } = context;
|
|
42870
42870
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -42899,7 +42899,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42899
42899
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
42900
42900
|
}), "mentionsStoreOver");
|
|
42901
42901
|
|
|
42902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42902
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
42903
42903
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
42904
42904
|
var MUTED_NOW = "(coalesce(c.muted,0)=1 AND (c.muted_until IS NULL OR c.muted_until>?))";
|
|
42905
42905
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2, now2) => {
|
|
@@ -42998,7 +42998,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
42998
42998
|
});
|
|
42999
42999
|
}, "waitingChats");
|
|
43000
43000
|
|
|
43001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43001
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-activity-counts.js
|
|
43002
43002
|
var SQL = `SELECT coalesce(nullif(trim(c.title), ''), (SELECT sender_name FROM messages WHERE chat_id = c.id AND outgoing = 0 AND deleted_at IS NULL ORDER BY sent_at DESC LIMIT 1)) AS title, ${MUTED_NOW} AS muted, w.messages, w.sent, (SELECT max(sent_at) FROM messages WHERE chat_id = c.id AND deleted_at IS NULL AND sent_at < ?) AS last FROM chats c, (SELECT count(*) AS messages, coalesce(sum(outgoing = 1), 0) AS sent FROM messages WHERE chat_id = ? AND deleted_at IS NULL AND sent_at >= ? AND sent_at < ?) w WHERE c.id = ?`;
|
|
43003
43003
|
var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since, until, now: now2 }) => {
|
|
43004
43004
|
const statement = database.prepare(SQL);
|
|
@@ -43018,7 +43018,7 @@ var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since
|
|
|
43018
43018
|
return found2;
|
|
43019
43019
|
}, "chatActivityCounts");
|
|
43020
43020
|
|
|
43021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
43022
43022
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
43023
43023
|
const read2 = database.prepare("SELECT m.id, m.external_id, m.text, m.sent_at, m.sender_name, coalesce(m.sender_chat_external_id, i.external_id) AS sender_id FROM messages m LEFT JOIN identities i ON i.id = m.sender_identity_id WHERE m.chat_id = ? AND m.deleted_at IS NULL AND (m.text LIKE '%google.com%' OR m.text LIKE '%forms.gle%') " + (messageId === void 0 ? "" : "AND m.external_id = ? ") + "ORDER BY m.sent_at DESC, m.id DESC");
|
|
43024
43024
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -43033,7 +43033,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
43033
43033
|
}));
|
|
43034
43034
|
}, "documentLinkMessages");
|
|
43035
43035
|
|
|
43036
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
43037
43037
|
var stemmerFor = stemmerCache();
|
|
43038
43038
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
43039
43039
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -43077,7 +43077,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
43077
43077
|
});
|
|
43078
43078
|
}, "laterSharingRare");
|
|
43079
43079
|
|
|
43080
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
43081
43081
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
43082
43082
|
const { database } = context;
|
|
43083
43083
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -43218,7 +43218,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
43218
43218
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
43219
43219
|
}), "messagesStoreOver");
|
|
43220
43220
|
|
|
43221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-links.js
|
|
43222
43222
|
var AGENT_METHOD = "agent";
|
|
43223
43223
|
var personsOf = /* @__PURE__ */ __name(({ database }) => new Map(database.prepare("SELECT identity_id, person_id FROM identity_links").all().map((row2) => [Number(row2.identity_id), Number(row2.person_id)])), "personsOf");
|
|
43224
43224
|
var weaknessOf = /* @__PURE__ */ __name((context, kind3, value, holders, sides, others) => {
|
|
@@ -43362,7 +43362,7 @@ var agentMerges = /* @__PURE__ */ __name((context, { limit, offset }) => {
|
|
|
43362
43362
|
return { items: found2.slice(offset, offset + limit), hasMore: found2.length > offset + limit };
|
|
43363
43363
|
}, "agentMerges");
|
|
43364
43364
|
|
|
43365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-rekey.js
|
|
43366
43366
|
var quoted2 = /* @__PURE__ */ __name((name) => `"${name.replace(/"/g, '""')}"`, "quoted");
|
|
43367
43367
|
var columnsOf3 = /* @__PURE__ */ __name((database, table) => database.prepare("SELECT name, pk, type FROM pragma_table_info(?)").all(table), "columnsOf");
|
|
43368
43368
|
var foreignKeysTo = /* @__PURE__ */ __name((database, table) => database.prepare(`SELECT m.name AS tbl, f."from" AS col FROM sqlite_master m JOIN pragma_foreign_key_list(m.name) f
|
|
@@ -43506,7 +43506,7 @@ var rekeyIdentities = /* @__PURE__ */ __name((context, provider, pairs, { lockMs
|
|
|
43506
43506
|
return done;
|
|
43507
43507
|
}, "rekeyIdentities");
|
|
43508
43508
|
|
|
43509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43509
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/person-kinds.js
|
|
43510
43510
|
var PERSON_KINDS = ["person", "organization", "automated", "stranger", "unsorted", "test"];
|
|
43511
43511
|
var AUTOMATED_WORDS = /* @__PURE__ */ new Set([
|
|
43512
43512
|
"noreply",
|
|
@@ -43569,7 +43569,7 @@ var isCompanyName = /* @__PURE__ */ __name((name) => {
|
|
|
43569
43569
|
return wordsOf3(name.replaceAll(".", "")).some((word2) => LEGAL_FORMS.has(word2) || COMPANY_WORDS.has(word2));
|
|
43570
43570
|
}, "isCompanyName");
|
|
43571
43571
|
|
|
43572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/person-ties.js
|
|
43573
43573
|
var SMALL_GROUP_MEMBERS = 10;
|
|
43574
43574
|
var PERSON_TIES = ["chat", "small-group", "mail", "meeting", "crm", "phone-book"];
|
|
43575
43575
|
var ALWAYS_SHOWN = ["owner", "added", "task"];
|
|
@@ -43624,7 +43624,7 @@ var shownReasons = /* @__PURE__ */ __name((database, people2) => {
|
|
|
43624
43624
|
return new Map([...found2].map(([person2, reasons]) => [person2, ORDER.filter((one2) => reasons.has(one2))]));
|
|
43625
43625
|
}, "shownReasons");
|
|
43626
43626
|
|
|
43627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/people-list.js
|
|
43628
43628
|
var PEOPLE_SORTS = ["interactions", "recent", "name", "tasks"];
|
|
43629
43629
|
var MIN_QUERY = 3;
|
|
43630
43630
|
var matching2 = /* @__PURE__ */ __name((query) => {
|
|
@@ -43969,7 +43969,7 @@ var similarPeople = /* @__PURE__ */ __name((database, typed, limit) => {
|
|
|
43969
43969
|
return withLastContact(database, rows).map((person2, at2) => ({ ...person2, sameName: same[at2] === true }));
|
|
43970
43970
|
}, "similarPeople");
|
|
43971
43971
|
|
|
43972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/person-doubts.js
|
|
43973
43973
|
var DOUBT_REASONS = ["owner-other-name", "test-data", "shared-address", "mixed-names"];
|
|
43974
43974
|
var COLUMNS5 = "l.person_id AS person, p.owner, p.name AS person_name, i.id AS pk, i.provider, i.external_id, i.name, i.phone, i.email, i.username, l.method, l.author, l.created_at, EXISTS (SELECT 1 FROM accounts a WHERE a.provider = i.provider AND a.external_id = i.external_id) AS account FROM identity_links l JOIN identities i ON i.id = l.identity_id JOIN persons p ON p.id = l.person_id";
|
|
43975
43975
|
var text4 = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? value : null, "text");
|
|
@@ -44225,7 +44225,7 @@ var markTestData = /* @__PURE__ */ __name((context, uid, by) => {
|
|
|
44225
44225
|
return { person: `person:${person2}`, identities: identities2 };
|
|
44226
44226
|
}, "markTestData");
|
|
44227
44227
|
|
|
44228
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44228
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
44229
44229
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
44230
44230
|
var IN_SCOPES = "IN (SELECT value FROM json_each(?))";
|
|
44231
44231
|
var projectScope = /* @__PURE__ */ __name((id2) => `(SELECT p.scope FROM main.projects p WHERE p.id=${id2})`, "projectScope");
|
|
@@ -44294,7 +44294,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
44294
44294
|
});
|
|
44295
44295
|
}, "personPreparation");
|
|
44296
44296
|
|
|
44297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
44298
44298
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
44299
44299
|
const id2 = Number(uid);
|
|
44300
44300
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -44302,7 +44302,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
44302
44302
|
return Boolean(database.prepare("SELECT 1 FROM persons p JOIN identity_links l ON l.person_id=p.id JOIN account_identities a ON a.identity_id=l.identity_id WHERE p.id=? AND a.account_id IN (SELECT value FROM json_each(?)) LIMIT 1").get(currentPerson(database, id2), JSON.stringify(accountIds)));
|
|
44303
44303
|
}, "personSeenInAccounts");
|
|
44304
44304
|
|
|
44305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
44306
44306
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
44307
44307
|
const row2 = database.prepare("SELECT a.id AS account_id, i.id AS identity_id FROM accounts a JOIN account_identities ai ON ai.account_id=a.id JOIN identities i ON i.id=ai.identity_id WHERE a.provider=? AND a.external_id=? AND i.provider=? AND i.external_id=?").get(key2.provider, key2.account, key2.provider, personId);
|
|
44308
44308
|
if (!row2)
|
|
@@ -44369,7 +44369,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
44369
44369
|
return { id: id2, personId, removed: true };
|
|
44370
44370
|
}, "removeNote");
|
|
44371
44371
|
|
|
44372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
44373
44373
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
44374
44374
|
const { database } = context;
|
|
44375
44375
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -44512,13 +44512,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
44512
44512
|
};
|
|
44513
44513
|
}, "peopleStoreOver");
|
|
44514
44514
|
|
|
44515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
44516
44516
|
import { createHash as createHash9 } from "node:crypto";
|
|
44517
44517
|
|
|
44518
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44518
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
44519
44519
|
import { createHash as createHash8 } from "node:crypto";
|
|
44520
44520
|
|
|
44521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44521
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
44522
44522
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
44523
44523
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
44524
44524
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -44740,7 +44740,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
44740
44740
|
};
|
|
44741
44741
|
}, "rankReplyGraph");
|
|
44742
44742
|
|
|
44743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44743
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
44744
44744
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
44745
44745
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
44746
44746
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -44914,7 +44914,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
44914
44914
|
return { items, evidence, summary, graph: graph.quality };
|
|
44915
44915
|
}, "calculateAdminStatistics");
|
|
44916
44916
|
|
|
44917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
44918
44918
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
44919
44919
|
const dates = [];
|
|
44920
44920
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -44936,7 +44936,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
44936
44936
|
return dates[0].node.resolution.date;
|
|
44937
44937
|
}, "rankingContextRange");
|
|
44938
44938
|
|
|
44939
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
44940
44940
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
44941
44941
|
let counts;
|
|
44942
44942
|
try {
|
|
@@ -45231,7 +45231,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
45231
45231
|
});
|
|
45232
45232
|
}, "rankQuery");
|
|
45233
45233
|
|
|
45234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45234
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
45235
45235
|
function fail2(message3, reason = "query.too-large") {
|
|
45236
45236
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
45237
45237
|
}
|
|
@@ -45408,7 +45408,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
45408
45408
|
return result;
|
|
45409
45409
|
}), "adminStatisticsQuery");
|
|
45410
45410
|
|
|
45411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
45412
45412
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
45413
45413
|
if (!execution.accounts.length)
|
|
45414
45414
|
return { conversations: [], chats: [] };
|
|
@@ -45426,7 +45426,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
45426
45426
|
return { conversations: conversations2, chats: chats2 };
|
|
45427
45427
|
}, "conversationEligibility");
|
|
45428
45428
|
|
|
45429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45429
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
45430
45430
|
import { createHash as createHash10 } from "node:crypto";
|
|
45431
45431
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
45432
45432
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -45576,7 +45576,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
45576
45576
|
return result;
|
|
45577
45577
|
}, "rankingEvidence");
|
|
45578
45578
|
|
|
45579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
45580
45580
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
45581
45581
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
45582
45582
|
if (execution.corpus === "mail")
|
|
@@ -45597,7 +45597,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
45597
45597
|
};
|
|
45598
45598
|
}, "queriesStoreOver");
|
|
45599
45599
|
|
|
45600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45600
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
45601
45601
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
45602
45602
|
const { database, now: now2 } = context;
|
|
45603
45603
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -45636,10 +45636,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
45636
45636
|
}));
|
|
45637
45637
|
}, "chatEventsOf");
|
|
45638
45638
|
|
|
45639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
45640
45640
|
import { createHash as createHash11 } from "node:crypto";
|
|
45641
45641
|
|
|
45642
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45642
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
45643
45643
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
45644
45644
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
45645
45645
|
timeZone: zone,
|
|
@@ -45659,7 +45659,7 @@ var weekKey = /* @__PURE__ */ __name((day2) => {
|
|
|
45659
45659
|
return date3.toISOString().slice(0, 10);
|
|
45660
45660
|
}, "weekKey");
|
|
45661
45661
|
|
|
45662
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45662
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
45663
45663
|
var RETENTION_TOLERANCE = 864e5;
|
|
45664
45664
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
45665
45665
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -45713,7 +45713,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
45713
45713
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
45714
45714
|
}, "retentionCohorts");
|
|
45715
45715
|
|
|
45716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
45717
45717
|
var iso10 = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString(), "iso");
|
|
45718
45718
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
45719
45719
|
validateRetentionOptions(options);
|
|
@@ -45844,7 +45844,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
45844
45844
|
};
|
|
45845
45845
|
}, "retentionQuery");
|
|
45846
45846
|
|
|
45847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45847
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
45848
45848
|
var iso11 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
45849
45849
|
var marksOf = /* @__PURE__ */ __name(({ isBot: isBot2, flagged, deleted, hasPhoto }) => ({
|
|
45850
45850
|
...isBot2 === void 0 ? {} : { bot: isBot2 },
|
|
@@ -45973,7 +45973,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
45973
45973
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
45974
45974
|
})), "trackedChats");
|
|
45975
45975
|
|
|
45976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
45977
45977
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45978
45978
|
const { database } = context;
|
|
45979
45979
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -46029,7 +46029,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46029
46029
|
};
|
|
46030
46030
|
}, "rosterStoreOver");
|
|
46031
46031
|
|
|
46032
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
46033
46033
|
var pendingNormalization = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM messages WHERE normalized_text IS NULL AND deleted_at IS NULL").get()?.n), "pendingNormalization");
|
|
46034
46034
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
46035
46035
|
const next = database.prepare(`SELECT id AS pk, text FROM messages WHERE normalized_text IS NULL AND deleted_at IS NULL AND id > ? ORDER BY id LIMIT ?`);
|
|
@@ -46053,7 +46053,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
46053
46053
|
}
|
|
46054
46054
|
}, "backfillNormalized");
|
|
46055
46055
|
|
|
46056
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
46057
46057
|
var INDEX2 = "message_words";
|
|
46058
46058
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
46059
46059
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -46180,7 +46180,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
46180
46180
|
});
|
|
46181
46181
|
}, "resetSearchIndex");
|
|
46182
46182
|
|
|
46183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
46184
46184
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
46185
46185
|
const filled = { stemmed: 0, drained: 0 };
|
|
46186
46186
|
const before2 = stemsState(database);
|
|
@@ -46275,7 +46275,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
46275
46275
|
return resetStems(database, { now: now2 });
|
|
46276
46276
|
}, "followDefaultStemmers");
|
|
46277
46277
|
|
|
46278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
46279
46279
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
46280
46280
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms) => {
|
|
46281
46281
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -46297,7 +46297,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
46297
46297
|
});
|
|
46298
46298
|
}, "termCandidates");
|
|
46299
46299
|
|
|
46300
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46300
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
46301
46301
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
46302
46302
|
const { database } = context;
|
|
46303
46303
|
const stemmerFor2 = stemmerCache();
|
|
@@ -46322,7 +46322,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46322
46322
|
};
|
|
46323
46323
|
}, "searchIndexStoreOver");
|
|
46324
46324
|
|
|
46325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
46326
46326
|
var HISTORY_KEPT = 1e3;
|
|
46327
46327
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
46328
46328
|
var COLUMNS6 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -46392,7 +46392,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
46392
46392
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
46393
46393
|
}, "clearHistory");
|
|
46394
46394
|
|
|
46395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
46396
46396
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
46397
46397
|
const { database } = context;
|
|
46398
46398
|
return {
|
|
@@ -46416,7 +46416,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46416
46416
|
};
|
|
46417
46417
|
}, "searchesStoreOver");
|
|
46418
46418
|
|
|
46419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
46420
46420
|
import { createHash as createHash12 } from "node:crypto";
|
|
46421
46421
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
46422
46422
|
var TEXT_COLUMNS = "kind = ?, title = ?, file_name = ?, extension = ?, url = ?, mime = ?, size = ?, content_hash = ?, body = ?, extraction = ?, metadata = ?, language = ?";
|
|
@@ -46658,7 +46658,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
46658
46658
|
};
|
|
46659
46659
|
}, "addedSourcesOver");
|
|
46660
46660
|
|
|
46661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
46662
46662
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
46663
46663
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
46664
46664
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -46706,7 +46706,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
46706
46706
|
};
|
|
46707
46707
|
}, "agentActionsStoreOver");
|
|
46708
46708
|
|
|
46709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/base-suggest.js
|
|
46710
46710
|
var baseSettingKey = /* @__PURE__ */ __name((kind3) => `stages.base.${kind3}`, "baseSettingKey");
|
|
46711
46711
|
var storedPipeline = /* @__PURE__ */ __name((value) => {
|
|
46712
46712
|
if (typeof value !== "string")
|
|
@@ -46752,11 +46752,11 @@ var suggestBaseStages = /* @__PURE__ */ __name((database, kind3, pipelines2, { o
|
|
|
46752
46752
|
}
|
|
46753
46753
|
}, "suggestBaseStages");
|
|
46754
46754
|
|
|
46755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/copy-viewer.js
|
|
46756
46756
|
var viewerSql = /* @__PURE__ */ __name((alias2, viewer) => viewer === void 0 ? { sql: "1", params: [] } : viewer.assignee === null ? { sql: "0", params: [] } : { sql: `json_extract(${alias2}.metadata, '$.assignee') = ?`, params: [viewer.assignee] }, "viewerSql");
|
|
46757
46757
|
var seenBy = /* @__PURE__ */ __name((viewer, row2) => viewer === void 0 || row2.provider !== viewer.account.provider || row2.account !== viewer.account.account || viewer.assignee !== null && row2.assignee === viewer.assignee, "seenBy");
|
|
46758
46758
|
|
|
46759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46759
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
46760
46760
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
46761
46761
|
var MONEY_REFUSALS = ["money.currency", "money.amount"];
|
|
46762
46762
|
var amountFault = /* @__PURE__ */ __name((item, code) => {
|
|
@@ -46928,7 +46928,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
46928
46928
|
return { savePipeline, saveItemRow };
|
|
46929
46929
|
}, "crmRowsOver");
|
|
46930
46930
|
|
|
46931
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activities.js
|
|
46932
46932
|
var ACTIVITY_RECORD = "crm.activity";
|
|
46933
46933
|
var forgetActivitiesOn = /* @__PURE__ */ __name((database, accountId, kind3, externalIds, at2) => {
|
|
46934
46934
|
const removed = "rr.target_type = ? AND rr.target_external_id IN (SELECT value FROM json_each(?))";
|
|
@@ -47116,7 +47116,7 @@ var seenSql = /* @__PURE__ */ __name((viewer) => {
|
|
|
47116
47116
|
};
|
|
47117
47117
|
}, "seenSql");
|
|
47118
47118
|
|
|
47119
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47119
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-stage-entries.js
|
|
47120
47120
|
var STAGE_ENTRY_RECORD = "crm.stage-entry";
|
|
47121
47121
|
var STAGE_ENTRY_DAYS = 90;
|
|
47122
47122
|
var STAGE_TASK_DAYS = 7;
|
|
@@ -47184,7 +47184,7 @@ var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
47184
47184
|
return { save: save2, pending, handled, expire };
|
|
47185
47185
|
}, "crmStageEntriesOver");
|
|
47186
47186
|
|
|
47187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
47188
47188
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
47189
47189
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, { since, until }, viewer) => {
|
|
47190
47190
|
const seen = viewerSql("d", viewer);
|
|
@@ -47202,7 +47202,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, { si
|
|
|
47202
47202
|
});
|
|
47203
47203
|
}, "stageAmountsOf");
|
|
47204
47204
|
|
|
47205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/pipeline-period.js
|
|
47206
47206
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
47207
47207
|
var DAY6 = 864e5;
|
|
47208
47208
|
var LOST_REASONS = 10;
|
|
@@ -47359,7 +47359,7 @@ var pipelinePeriod = /* @__PURE__ */ __name((context, pipeline, window, zone, vi
|
|
|
47359
47359
|
};
|
|
47360
47360
|
}, "pipelinePeriod");
|
|
47361
47361
|
|
|
47362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47362
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
47363
47363
|
var TABLES5 = { deal: "deals", lead: "leads" };
|
|
47364
47364
|
var itemsSql = /* @__PURE__ */ __name((kind3) => `SELECT d.*, s.name AS stage_name, s.pipeline_id, p.name AS pipeline_name, b.name AS author_name, b.kind AS author_kind, a.provider AS account_provider, a.external_id AS account_external_id, bs.id AS base_stage_ref_id, bs.name AS base_stage_name FROM ${TABLES5[kind3]} d JOIN pipeline_stages s ON s.id = d.stage_id JOIN pipelines p ON p.id = s.pipeline_id LEFT JOIN bots b ON d.author_type = 'bot' AND b.id = d.author_id LEFT JOIN accounts a ON a.id = d.account_id LEFT JOIN pipeline_stages bs ON s.base_confirmed = 1 AND bs.id = s.base_stage_id`, "itemsSql");
|
|
47365
47365
|
var MAX_STAGES = 30;
|
|
@@ -47832,7 +47832,7 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47832
47832
|
};
|
|
47833
47833
|
}, "dealsStoreOver");
|
|
47834
47834
|
|
|
47835
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
47836
47836
|
var KEY2 = "ownerLanguages";
|
|
47837
47837
|
var ISO_639_1 = new Set("aa ab ae af ak am an ar as av ay az ba be bg bi bm bn bo br bs ca ce ch co cr cs cu cv cy da de dv dz ee el en eo es et eu fa ff fi fj fo fr fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mr ms mt my na nb nd ne ng nl nn no nr nv ny oc oj om or os pa pi pl ps pt qu rm rn ro ru rw sa sc sd se sg si sk sl sm sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zu".split(" "));
|
|
47838
47838
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -47862,7 +47862,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
47862
47862
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(KEY2, JSON.stringify(languages), now2);
|
|
47863
47863
|
}, "saveOwnerLanguages");
|
|
47864
47864
|
|
|
47865
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47865
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/base-stages.js
|
|
47866
47866
|
var OUTCOMES = {
|
|
47867
47867
|
lead: ["open", "open", "open", "won", "lost"],
|
|
47868
47868
|
deal: ["open", "open", "open", "open", "won", "lost"]
|
|
@@ -48195,7 +48195,7 @@ var baseStagesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48195
48195
|
};
|
|
48196
48196
|
}, "baseStagesStoreOver");
|
|
48197
48197
|
|
|
48198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
48199
48199
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
48200
48200
|
}) => {
|
|
48201
48201
|
const { database, now: now2 } = context;
|
|
@@ -48254,7 +48254,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
48254
48254
|
};
|
|
48255
48255
|
}, "botUpdateStoreOver");
|
|
48256
48256
|
|
|
48257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
48258
48258
|
var IMPORTER = { bot: "import" };
|
|
48259
48259
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
48260
48260
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -48299,7 +48299,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
48299
48299
|
};
|
|
48300
48300
|
}), "moneyLinesOf");
|
|
48301
48301
|
|
|
48302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48302
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
48303
48303
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
48304
48304
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
48305
48305
|
var listOf2 = /* @__PURE__ */ __name((list2) => {
|
|
@@ -48383,7 +48383,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
48383
48383
|
};
|
|
48384
48384
|
}, "relationRolesOver");
|
|
48385
48385
|
|
|
48386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
48387
48387
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
48388
48388
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
48389
48389
|
var CRM_SCOPES = ["mine", "all"];
|
|
@@ -48614,7 +48614,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
48614
48614
|
return [{ setting: String(row2.key), value: settingValue(database, parsed5.key, parsed5.name) }];
|
|
48615
48615
|
}), "crmSettingsOf");
|
|
48616
48616
|
|
|
48617
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48617
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
48618
48618
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
48619
48619
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
48620
48620
|
id: link3.id,
|
|
@@ -48974,7 +48974,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
48974
48974
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
48975
48975
|
}, "decidedOrigin");
|
|
48976
48976
|
|
|
48977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
48978
48978
|
var keyOf4 = /* @__PURE__ */ __name((kind3, fromType, fromId, toType, toId, role) => `${String(kind3)}|${String(fromType)}:${String(fromId)}|${String(toType)}:${String(toId)}|${role == null ? "" : String(role)}`, "keyOf");
|
|
48979
48979
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
48980
48980
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" }, onOutcome } = {}) => {
|
|
@@ -49112,7 +49112,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
49112
49112
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
49113
49113
|
}), "relationsStoreOver");
|
|
49114
49114
|
|
|
49115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relationships.js
|
|
49116
49116
|
var importSource = /* @__PURE__ */ __name((provider) => `import:${provider}`, "importSource");
|
|
49117
49117
|
var noRelationships = /* @__PURE__ */ __name(() => ({
|
|
49118
49118
|
added: 0,
|
|
@@ -49302,7 +49302,7 @@ var recordRelationshipsOver = /* @__PURE__ */ __name((context) => {
|
|
|
49302
49302
|
return { report, placeOf: placeOf2, withdrawFrom };
|
|
49303
49303
|
}, "recordRelationshipsOver");
|
|
49304
49304
|
|
|
49305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
49306
49306
|
var CONTRACTS = "SELECT k.*, b.name AS author_name, b.kind AS author_kind FROM contracts k LEFT JOIN bots b ON k.author_type = 'bot' AND b.id = k.author_id";
|
|
49307
49307
|
var DAY_MS2 = 864e5;
|
|
49308
49308
|
var deadlineOf = /* @__PURE__ */ __name((expiration, days) => expiration === null || days === null ? null : new Date(Date.parse(`${expiration}T00:00:00Z`) - days * DAY_MS2).toISOString().slice(0, 10), "deadlineOf");
|
|
@@ -49461,7 +49461,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49461
49461
|
};
|
|
49462
49462
|
}, "contractsStoreOver");
|
|
49463
49463
|
|
|
49464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
49465
49465
|
var BUSINESS_FIND_MAX = 2001;
|
|
49466
49466
|
var party2 = /* @__PURE__ */ __name((kind3, id2, as) => `LEFT JOIN persons ${as}p ON ${kind3} = 'person' AND ${as}p.id = ${id2} AND ${as}p.owner = 0 LEFT JOIN organizations ${as}o ON ${kind3} = 'organization' AND ${as}o.id = ${id2} LEFT JOIN projects ${as}j ON ${kind3} = 'project' AND ${as}j.id = ${id2}`, "party");
|
|
49467
49467
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
@@ -49566,7 +49566,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
49566
49566
|
};
|
|
49567
49567
|
}, "businessSearchOver");
|
|
49568
49568
|
|
|
49569
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49569
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
49570
49570
|
var CATALOG_QUERY = defineQuery({
|
|
49571
49571
|
entity: "document",
|
|
49572
49572
|
backend: "sql",
|
|
@@ -49799,10 +49799,10 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
49799
49799
|
};
|
|
49800
49800
|
}, "catalogStoreOver");
|
|
49801
49801
|
|
|
49802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/content.js
|
|
49803
49803
|
import { createHash as createHash13 } from "node:crypto";
|
|
49804
49804
|
|
|
49805
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-files.js
|
|
49806
49806
|
import { sep } from "node:path";
|
|
49807
49807
|
var MOST = 500;
|
|
49808
49808
|
var CURRENTLY = /* @__PURE__ */ __name((table) => `EXISTS (SELECT 1 FROM ${table} r WHERE r.account_id = f.account_id AND r.external_id = f.owner_id AND r.deleted_at IS NULL AND json_extract(r.metadata, '$.assignee') = ?)`, "CURRENTLY");
|
|
@@ -49927,7 +49927,7 @@ var crmFilesOver = /* @__PURE__ */ __name((context) => {
|
|
|
49927
49927
|
};
|
|
49928
49928
|
}, "crmFilesOver");
|
|
49929
49929
|
|
|
49930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/content.js
|
|
49931
49931
|
var MOST2 = 500;
|
|
49932
49932
|
var TABLE = {
|
|
49933
49933
|
author: "content_authors",
|
|
@@ -50206,7 +50206,7 @@ var contentStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50206
50206
|
};
|
|
50207
50207
|
}, "contentStoreOver");
|
|
50208
50208
|
|
|
50209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50209
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
50210
50210
|
var remote = /* @__PURE__ */ __name(() => `CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source') IN (${documentAccountProvidersSql()}) ELSE 0 END`, "remote");
|
|
50211
50211
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${remote()}) THEN
|
|
50212
50212
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -50219,7 +50219,7 @@ var contextDocumentTimeKind = /* @__PURE__ */ __name(() => `CASE WHEN (${remoteT
|
|
|
50219
50219
|
THEN 'source-modified' ELSE 'stored-update' END`, "contextDocumentTimeKind");
|
|
50220
50220
|
var contextDocumentUrl = /* @__PURE__ */ __name(() => `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`, "contextDocumentUrl");
|
|
50221
50221
|
|
|
50222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
50223
50223
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
50224
50224
|
const { source: source2, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
50225
50225
|
signal?.throwIfAborted();
|
|
@@ -50318,7 +50318,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
50318
50318
|
});
|
|
50319
50319
|
}, "readMeetingContextEvidence");
|
|
50320
50320
|
|
|
50321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50321
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
50322
50322
|
var corpora = {
|
|
50323
50323
|
message: {
|
|
50324
50324
|
table: "messages",
|
|
@@ -50563,7 +50563,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
50563
50563
|
}
|
|
50564
50564
|
}), "contextRecordsOver");
|
|
50565
50565
|
|
|
50566
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-changes.js
|
|
50567
50567
|
var CRM_CHANGES = [
|
|
50568
50568
|
"created",
|
|
50569
50569
|
"moved",
|
|
@@ -50706,7 +50706,7 @@ var crmReadsOver = /* @__PURE__ */ __name((context) => {
|
|
|
50706
50706
|
};
|
|
50707
50707
|
}, "crmReadsOver");
|
|
50708
50708
|
|
|
50709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-contacts.js
|
|
50710
50710
|
var PLACEHOLDER = /(?:^|\s)null(?:\s+#\d+)?(?=\s|$)/gi;
|
|
50711
50711
|
var withoutPlaceholder = /* @__PURE__ */ __name((name) => name.replace(PLACEHOLDER, " ").replace(/\s+/g, " ").trim() || null, "withoutPlaceholder");
|
|
50712
50712
|
var DryRun = class extends Error {
|
|
@@ -50785,7 +50785,7 @@ var removeCrmContacts = /* @__PURE__ */ __name((context, key2, { users, before:
|
|
|
50785
50785
|
}
|
|
50786
50786
|
}, "removeCrmContacts");
|
|
50787
50787
|
|
|
50788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
50789
50789
|
var PENDING = "crm:pending-relations";
|
|
50790
50790
|
var PENDING_DAYS = 30;
|
|
50791
50791
|
var PENDING_MOST = 5e3;
|
|
@@ -51340,10 +51340,10 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
51340
51340
|
};
|
|
51341
51341
|
}, "crmCopiesOver");
|
|
51342
51342
|
|
|
51343
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51343
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
51344
51344
|
import { createHash as createHash14, randomBytes as randomBytes2 } from "node:crypto";
|
|
51345
51345
|
|
|
51346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
51347
51347
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
51348
51348
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
51349
51349
|
var CALLBACK_PREFIX = "wcr1:";
|
|
@@ -51357,7 +51357,7 @@ var callbackDataOf = /* @__PURE__ */ __name((token) => {
|
|
|
51357
51357
|
}, "callbackDataOf");
|
|
51358
51358
|
var parseCallbackData = /* @__PURE__ */ __name((data) => typeof data === "string" ? CALLBACK.exec(data)?.[1] : void 0, "parseCallbackData");
|
|
51359
51359
|
|
|
51360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
51361
51361
|
var digestOf = /* @__PURE__ */ __name((token) => createHash14("sha256").update(token).digest("hex"), "digestOf");
|
|
51362
51362
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
51363
51363
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -51456,7 +51456,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
51456
51456
|
};
|
|
51457
51457
|
}, "decisionRequestStoreOver");
|
|
51458
51458
|
|
|
51459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-listing.js
|
|
51460
51460
|
var MEETING_ROW_KINDS = ["meeting", "call", "event"];
|
|
51461
51461
|
var DAY8 = 864e5;
|
|
51462
51462
|
var JOINED = `(SELECT ce.event_id FROM calendar_entries ce JOIN events je ON je.id = ce.event_id
|
|
@@ -51843,7 +51843,7 @@ var meetingListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
51843
51843
|
};
|
|
51844
51844
|
}, "meetingListingOver");
|
|
51845
51845
|
|
|
51846
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/document-listing.js
|
|
51847
51847
|
var DOCUMENT_KINDS = [
|
|
51848
51848
|
"transcript",
|
|
51849
51849
|
"doc",
|
|
@@ -52080,7 +52080,7 @@ var documentListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
52080
52080
|
};
|
|
52081
52081
|
}, "documentListingOver");
|
|
52082
52082
|
|
|
52083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52083
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
52084
52084
|
var NOTE_FIELDS = [
|
|
52085
52085
|
"text",
|
|
52086
52086
|
"exact",
|
|
@@ -52577,7 +52577,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
52577
52577
|
};
|
|
52578
52578
|
}, "noteSearchOver");
|
|
52579
52579
|
|
|
52580
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52580
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
52581
52581
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
52582
52582
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
52583
52583
|
var EVENT_CORPUS = {
|
|
@@ -52717,7 +52717,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
52717
52717
|
};
|
|
52718
52718
|
}, "eventSearchOver");
|
|
52719
52719
|
|
|
52720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
52721
52721
|
var NAMED4 = "SELECT f.*, b.name AS author_name, b.kind AS author_kind FROM facts f LEFT JOIN bots b ON f.author_type = 'bot' AND b.id = f.author_id";
|
|
52722
52722
|
var iso13 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
52723
52723
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -52980,7 +52980,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52980
52980
|
};
|
|
52981
52981
|
}, "factsStoreOver");
|
|
52982
52982
|
|
|
52983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52983
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
52984
52984
|
var invalid4 = /* @__PURE__ */ __name((message3) => {
|
|
52985
52985
|
throw new CliError("validation_error", message3);
|
|
52986
52986
|
}, "invalid");
|
|
@@ -53148,7 +53148,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
53148
53148
|
return { snapshot: snapshot2, snapshotParts, previous, settle, keepWaiting, named: named3, sameDecision, create };
|
|
53149
53149
|
}, "findingsCoreOver");
|
|
53150
53150
|
|
|
53151
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
53152
53152
|
var stale = /* @__PURE__ */ __name(() => {
|
|
53153
53153
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
53154
53154
|
reason: "evidence-findings.stale"
|
|
@@ -53412,7 +53412,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
53412
53412
|
};
|
|
53413
53413
|
}, "evidenceFindingsStoreOver");
|
|
53414
53414
|
|
|
53415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53415
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
53416
53416
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
53417
53417
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
53418
53418
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -53466,7 +53466,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
53466
53466
|
}, "forPerson")
|
|
53467
53467
|
}), "involvementStoreOver");
|
|
53468
53468
|
|
|
53469
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53469
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
53470
53470
|
var LABELLED = {
|
|
53471
53471
|
note: "note",
|
|
53472
53472
|
document: "document",
|
|
@@ -53479,7 +53479,7 @@ var LABELLED = {
|
|
|
53479
53479
|
};
|
|
53480
53480
|
var accountMeetingTagging = /* @__PURE__ */ __name((alias2) => `(${alias2}.taggable_type <> 'meeting' OR EXISTS (SELECT 1 FROM meetings mt WHERE mt.id = ${alias2}.taggable_id AND mt.deleted_at IS NULL AND (? IS NULL OR mt.account_id = ?)))`, "accountMeetingTagging");
|
|
53481
53481
|
|
|
53482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53482
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
53483
53483
|
import { createHash as createHash15 } from "node:crypto";
|
|
53484
53484
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
53485
53485
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -53565,7 +53565,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
53565
53565
|
};
|
|
53566
53566
|
}, "meetingProjectsStoreOver");
|
|
53567
53567
|
|
|
53568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53568
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
53569
53569
|
var ORGANIZATIONS_QUERY = {
|
|
53570
53570
|
entity: "organization",
|
|
53571
53571
|
backend: "sql",
|
|
@@ -53606,7 +53606,7 @@ var REMINDERS_QUERY = {
|
|
|
53606
53606
|
})
|
|
53607
53607
|
};
|
|
53608
53608
|
|
|
53609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53609
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-categories.js
|
|
53610
53610
|
var OWN2 = "(SELECT id FROM organizations WHERE deleted_at IS NULL AND json_extract(metadata, '$.own') = 1)";
|
|
53611
53611
|
var EMPLOYED = "('employee', 'contractor', 'founder')";
|
|
53612
53612
|
var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now2) => {
|
|
@@ -53627,7 +53627,7 @@ var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now
|
|
|
53627
53627
|
return { sql: `EXISTS (SELECT 1 FROM links l WHERE ${where} AND ${usable})`, params: keys };
|
|
53628
53628
|
}, "categorySql");
|
|
53629
53629
|
|
|
53630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
53631
53631
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
53632
53632
|
id: String(row2.id),
|
|
53633
53633
|
ref: `organization:${row2.id}`,
|
|
@@ -53672,7 +53672,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
53672
53672
|
}), "setOwnOrganization")
|
|
53673
53673
|
}), "organizationsStoreOver");
|
|
53674
53674
|
|
|
53675
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
53676
53676
|
var KINDS = RELATION_KINDS.map(linkKind).join(", ");
|
|
53677
53677
|
var ACCOUNT_ENDS = [
|
|
53678
53678
|
["deal", "deals"],
|
|
@@ -53835,13 +53835,13 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
53835
53835
|
__name(proposalItem, "proposalItem");
|
|
53836
53836
|
}, "relationListOver");
|
|
53837
53837
|
|
|
53838
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53838
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
53839
53839
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
53840
53840
|
...relationListOver(context),
|
|
53841
53841
|
...relationRolesOver(context)
|
|
53842
53842
|
}), "relationReadsOver");
|
|
53843
53843
|
|
|
53844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53844
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
53845
53845
|
var TABLES6 = { memory: "memories", fact: "facts" };
|
|
53846
53846
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
53847
53847
|
var DEFAULT_LIMIT = 500;
|
|
@@ -54084,16 +54084,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54084
54084
|
};
|
|
54085
54085
|
}, "sourceReviewStoreOver");
|
|
54086
54086
|
|
|
54087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
54088
54088
|
import { createHash as createHash18 } from "node:crypto";
|
|
54089
54089
|
|
|
54090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54090
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
54091
54091
|
import { createHash as createHash17 } from "node:crypto";
|
|
54092
54092
|
|
|
54093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
54094
54094
|
import { createHash as createHash16 } from "node:crypto";
|
|
54095
54095
|
|
|
54096
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54096
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
54097
54097
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
54098
54098
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
54099
54099
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -54144,7 +54144,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
54144
54144
|
return input;
|
|
54145
54145
|
}, "consolidationApplyInput");
|
|
54146
54146
|
|
|
54147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
54148
54148
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
54149
54149
|
id: String(row2.id),
|
|
54150
54150
|
sourceId: String(row2.source_id),
|
|
@@ -54219,7 +54219,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
54219
54219
|
}, { beforeCommit: check3 });
|
|
54220
54220
|
}, "applyTagConsolidation");
|
|
54221
54221
|
|
|
54222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
54223
54223
|
var selections = [
|
|
54224
54224
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
54225
54225
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -54363,7 +54363,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
54363
54363
|
};
|
|
54364
54364
|
}, "previewRows");
|
|
54365
54365
|
|
|
54366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54366
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
54367
54367
|
var kinds = ["project", "tag", "topic"];
|
|
54368
54368
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
54369
54369
|
if (signal?.aborted)
|
|
@@ -54627,7 +54627,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54627
54627
|
};
|
|
54628
54628
|
}, "vocabularyStoreOver");
|
|
54629
54629
|
|
|
54630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
54631
54631
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
54632
54632
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
54633
54633
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -55181,7 +55181,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
55181
55181
|
return key2.padEnd(3, "X");
|
|
55182
55182
|
}, "projectKey");
|
|
55183
55183
|
|
|
55184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55184
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
55185
55185
|
var DAY9 = 864e5;
|
|
55186
55186
|
var SETTING5 = "logs_pruned_at";
|
|
55187
55187
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY9, botUpdatePayloadsMs: 30 * DAY9 };
|
|
@@ -55208,7 +55208,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
55208
55208
|
};
|
|
55209
55209
|
}, "logPruner");
|
|
55210
55210
|
|
|
55211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
55212
55212
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
55213
55213
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
55214
55214
|
var invalid6 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -55567,7 +55567,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
55567
55567
|
}, "checkMailFindings");
|
|
55568
55568
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
55569
55569
|
|
|
55570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
55571
55571
|
var ORDERS = "SELECT o.*, b.name AS author_name, b.kind AS author_kind FROM orders o LEFT JOIN bots b ON o.author_type = 'bot' AND b.id = o.author_id";
|
|
55572
55572
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
55573
55573
|
const { database, now: now2 } = context;
|
|
@@ -55782,7 +55782,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55782
55782
|
};
|
|
55783
55783
|
}, "ordersStoreOver");
|
|
55784
55784
|
|
|
55785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55785
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
55786
55786
|
var MAIL_EDITS = {
|
|
55787
55787
|
task: ["title", "type", "reason", "commitment", "project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence"],
|
|
55788
55788
|
fact: ["statement", "type", "reason", "subject", "project"],
|
|
@@ -56271,7 +56271,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
56271
56271
|
};
|
|
56272
56272
|
}, "mailFindingsStoreOver");
|
|
56273
56273
|
|
|
56274
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56274
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
56275
56275
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
56276
56276
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
56277
56277
|
reason: "meeting-findings.stale"
|
|
@@ -56484,7 +56484,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56484
56484
|
};
|
|
56485
56485
|
}, "meetingFindingsStoreOver");
|
|
56486
56486
|
|
|
56487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
56488
56488
|
var RANK_BATCH = 512;
|
|
56489
56489
|
var LIVE6 = "FROM chunks k JOIN meeting_transcripts t ON k.chunkable_type = 'meeting_transcript' AND t.id = k.chunkable_id JOIN meetings m ON m.id = t.meeting_id WHERE m.account_id = ? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL";
|
|
56490
56490
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -56755,7 +56755,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
56755
56755
|
}
|
|
56756
56756
|
}), "meetingVectorsOver");
|
|
56757
56757
|
|
|
56758
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56758
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
56759
56759
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
56760
56760
|
var TEXTS = {
|
|
56761
56761
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -56856,7 +56856,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56856
56856
|
};
|
|
56857
56857
|
}, "sourceMentionStoreOver");
|
|
56858
56858
|
|
|
56859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56859
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
56860
56860
|
var TRANSACTIONS = "SELECT t.*, w.name AS wallet_name, b.name AS author_name, b.kind AS author_kind, (SELECT coalesce(sum(amount), 0) FROM transaction_splits WHERE transaction_id = t.id) AS split FROM financial_transactions t JOIN financial_accounts w ON w.id = t.financial_account_id LEFT JOIN bots b ON t.author_type = 'bot' AND b.id = t.author_id";
|
|
56861
56861
|
var MAX_SPLITS = 100;
|
|
56862
56862
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -57090,11 +57090,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57090
57090
|
};
|
|
57091
57091
|
}, "transactionsStoreOver");
|
|
57092
57092
|
|
|
57093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
57094
57094
|
import { accessSync, constants, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
57095
57095
|
import { dirname as dirname2 } from "node:path";
|
|
57096
57096
|
|
|
57097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
57098
57098
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
57099
57099
|
var CLIENTS_SETTING = "clients";
|
|
57100
57100
|
var coreVersion = (() => {
|
|
@@ -57155,7 +57155,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
57155
57155
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
57156
57156
|
}, "refusalAdvice");
|
|
57157
57157
|
|
|
57158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
57159
57159
|
var GENERATED = [
|
|
57160
57160
|
{
|
|
57161
57161
|
"name": "20261010184427_initial",
|
|
@@ -58598,7 +58598,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
58598
58598
|
}
|
|
58599
58599
|
];
|
|
58600
58600
|
|
|
58601
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58601
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
58602
58602
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
58603
58603
|
import { basename, dirname, join as join3, parse } from "node:path";
|
|
58604
58604
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -58831,7 +58831,7 @@ var rollBack2 = /* @__PURE__ */ __name((database, path) => {
|
|
|
58831
58831
|
return { ...result, foreignKeyViolations };
|
|
58832
58832
|
}, "rollBack");
|
|
58833
58833
|
|
|
58834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
58835
58835
|
var V31_TABLES = [
|
|
58836
58836
|
"accounts",
|
|
58837
58837
|
"account_identities",
|
|
@@ -59005,7 +59005,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
59005
59005
|
return migrations;
|
|
59006
59006
|
}, "generatedMigrations");
|
|
59007
59007
|
|
|
59008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
59009
59009
|
var MIGRATIONS = generatedMigrations();
|
|
59010
59010
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
59011
59011
|
version INTEGER PRIMARY KEY,
|
|
@@ -59102,7 +59102,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
59102
59102
|
}
|
|
59103
59103
|
}, "migrate");
|
|
59104
59104
|
|
|
59105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
59106
59106
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
59107
59107
|
const pending = database.prepare("SELECT id, join_url FROM meetings WHERE join_url IS NOT NULL AND join_key IS NULL AND id > ? ORDER BY id LIMIT ?");
|
|
59108
59108
|
if (pending.get(0, 1) === void 0)
|
|
@@ -59124,7 +59124,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
59124
59124
|
}
|
|
59125
59125
|
}, "fillJoinKeys");
|
|
59126
59126
|
|
|
59127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
59128
59128
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
59129
59129
|
refuseOwnerStoreInTests(path);
|
|
59130
59130
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -59138,8 +59138,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
59138
59138
|
}, "openSqlite");
|
|
59139
59139
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
59140
59140
|
quietSqliteWarning();
|
|
59141
|
-
const { drizzle } = await import("./node-
|
|
59142
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
59141
|
+
const { drizzle } = await import("./node-RYFTRSG4.js");
|
|
59142
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-XCHVNTGQ.js");
|
|
59143
59143
|
const client = await nodeClient(path, { readOnly });
|
|
59144
59144
|
try {
|
|
59145
59145
|
if (!readOnly)
|
|
@@ -59153,8 +59153,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
59153
59153
|
}
|
|
59154
59154
|
}, "openUnderNode");
|
|
59155
59155
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
59156
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
59157
|
-
const { drizzle } = await import("./bun-
|
|
59156
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-PCSNAXIQ.js");
|
|
59157
|
+
const { drizzle } = await import("./bun-J7HAT7MW.js");
|
|
59158
59158
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
59159
59159
|
try {
|
|
59160
59160
|
if (!readOnly)
|
|
@@ -59168,7 +59168,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
59168
59168
|
}
|
|
59169
59169
|
}, "openUnderBun");
|
|
59170
59170
|
|
|
59171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
59172
59172
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
59173
59173
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
59174
59174
|
try {
|
|
@@ -59236,7 +59236,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
59236
59236
|
});
|
|
59237
59237
|
}, "movePaymentFacts");
|
|
59238
59238
|
|
|
59239
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
59240
59240
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
59241
59241
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
59242
59242
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -59254,7 +59254,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
59254
59254
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
59255
59255
|
}, "assertReadCompatible");
|
|
59256
59256
|
|
|
59257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
59258
59258
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
59259
59259
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
59260
59260
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -59300,7 +59300,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
59300
59300
|
});
|
|
59301
59301
|
}, "moveSuggestedLinks");
|
|
59302
59302
|
|
|
59303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
59304
59304
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
59305
59305
|
var TEST_PROVIDER = "chat";
|
|
59306
59306
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -59321,7 +59321,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
59321
59321
|
}
|
|
59322
59322
|
}, "purgeTestAccounts");
|
|
59323
59323
|
|
|
59324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
59325
59325
|
var BACKFILL_ON_OPEN = 5e3;
|
|
59326
59326
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
59327
59327
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -59433,7 +59433,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
59433
59433
|
}
|
|
59434
59434
|
}, "openStoreContext");
|
|
59435
59435
|
|
|
59436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
59437
59437
|
var PRODUCTS = "SELECT c.*, b.name AS author_name, b.kind AS author_kind FROM catalog_items c LEFT JOIN bots b ON c.author_type = 'bot' AND b.id = c.author_id";
|
|
59438
59438
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
59439
59439
|
const { database, now: now2 } = context;
|
|
@@ -59541,13 +59541,13 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
59541
59541
|
};
|
|
59542
59542
|
}, "productsStoreOver");
|
|
59543
59543
|
|
|
59544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
59545
59545
|
import { createHash as createHash20 } from "node:crypto";
|
|
59546
59546
|
|
|
59547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
59548
59548
|
import { createHash as createHash19 } from "node:crypto";
|
|
59549
59549
|
|
|
59550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
59551
59551
|
var text6 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
59552
59552
|
var ref = text6(2048);
|
|
59553
59553
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -59617,7 +59617,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
59617
59617
|
}))
|
|
59618
59618
|
});
|
|
59619
59619
|
|
|
59620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
59621
59621
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
59622
59622
|
var invalid9 = /* @__PURE__ */ __name((field4) => {
|
|
59623
59623
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -59750,7 +59750,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
59750
59750
|
return createHash19("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
59751
59751
|
}, "projectAnnotationsFingerprint");
|
|
59752
59752
|
|
|
59753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
59754
59754
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
59755
59755
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
59756
59756
|
var targetSchema = strictObject({
|
|
@@ -59857,7 +59857,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
59857
59857
|
}, "planBoundProjectAnnotations");
|
|
59858
59858
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
59859
59859
|
|
|
59860
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
59861
59861
|
import { createHash as createHash21 } from "node:crypto";
|
|
59862
59862
|
var text7 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
59863
59863
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -59951,7 +59951,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
59951
59951
|
})).digest("hex");
|
|
59952
59952
|
}, "projectAnnotationSnapshotFingerprint");
|
|
59953
59953
|
|
|
59954
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59954
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
59955
59955
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
59956
59956
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
59957
59957
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -59968,7 +59968,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
59968
59968
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
59969
59969
|
}, "projectAnnotationRequest");
|
|
59970
59970
|
|
|
59971
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59971
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
59972
59972
|
var SnapshotBudget = class {
|
|
59973
59973
|
static {
|
|
59974
59974
|
__name(this, "SnapshotBudget");
|
|
@@ -59994,13 +59994,13 @@ var SnapshotBudget = class {
|
|
|
59994
59994
|
}
|
|
59995
59995
|
};
|
|
59996
59996
|
|
|
59997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
59998
59998
|
import { createHash as createHash23 } from "node:crypto";
|
|
59999
59999
|
|
|
60000
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
60001
60001
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
60002
60002
|
|
|
60003
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
60004
60004
|
import { createHash as createHash22 } from "node:crypto";
|
|
60005
60005
|
var invalid11 = /* @__PURE__ */ __name(() => {
|
|
60006
60006
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -60143,7 +60143,7 @@ var ProjectSnapshotSources = class {
|
|
|
60143
60143
|
}
|
|
60144
60144
|
};
|
|
60145
60145
|
|
|
60146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
60147
60147
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
60148
60148
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
60149
60149
|
}, "unsupported");
|
|
@@ -60321,7 +60321,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
60321
60321
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
60322
60322
|
}), "projectAnnotationSnapshot");
|
|
60323
60323
|
|
|
60324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
60325
60325
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
60326
60326
|
const current2 = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
60327
60327
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -60383,7 +60383,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
60383
60383
|
};
|
|
60384
60384
|
}), "previewAnnotationSnapshot");
|
|
60385
60385
|
|
|
60386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
60387
60387
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
60388
60388
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
60389
60389
|
if (link3.kind === "evidence" && to)
|
|
@@ -60450,7 +60450,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
60450
60450
|
return mappings;
|
|
60451
60451
|
}, "restoreAnnotationRecords");
|
|
60452
60452
|
|
|
60453
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60453
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
60454
60454
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
60455
60455
|
async preview(request) {
|
|
60456
60456
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -60480,7 +60480,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
60480
60480
|
}
|
|
60481
60481
|
}), "projectAnnotationStoreOver");
|
|
60482
60482
|
|
|
60483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
60484
60484
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
60485
60485
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
60486
60486
|
const sql2 = /* @__PURE__ */ __name((text8) => database.prepare(text8), "sql");
|
|
@@ -60551,7 +60551,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
60551
60551
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
60552
60552
|
}, "recordRelationsOver");
|
|
60553
60553
|
|
|
60554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
60555
60555
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
60556
60556
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
60557
60557
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -60605,7 +60605,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
60605
60605
|
return { pointedAt, remap };
|
|
60606
60606
|
}, "recordRemapOver");
|
|
60607
60607
|
|
|
60608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
60609
60609
|
var runs = 0;
|
|
60610
60610
|
var PAGE = 500;
|
|
60611
60611
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -60818,7 +60818,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
60818
60818
|
return pointerOf("records", index2, "fields", key2);
|
|
60819
60819
|
}, "waitingPointer");
|
|
60820
60820
|
|
|
60821
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
60822
60822
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
60823
60823
|
var SCHEME = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
60824
60824
|
var ORG_EMAIL = "org-email";
|
|
@@ -60984,7 +60984,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
60984
60984
|
]);
|
|
60985
60985
|
}, "renameMade");
|
|
60986
60986
|
|
|
60987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60987
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
60988
60988
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
60989
60989
|
name: given(fields4, "name"),
|
|
60990
60990
|
unit: given(fields4, "unit"),
|
|
@@ -61107,7 +61107,7 @@ var DIRECT_PROJECTORS = {
|
|
|
61107
61107
|
lead: dealProjector("lead")
|
|
61108
61108
|
};
|
|
61109
61109
|
|
|
61110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-document.js
|
|
61111
61111
|
var TEXT_ONLY = { storage: "text", localPath: null };
|
|
61112
61112
|
var textOf7 = /* @__PURE__ */ __name(({ fields: fields4, externalId }) => {
|
|
61113
61113
|
const text8 = String(fields4.text ?? "");
|
|
@@ -61176,7 +61176,7 @@ var DOCUMENT_PROJECTORS = {
|
|
|
61176
61176
|
}
|
|
61177
61177
|
};
|
|
61178
61178
|
|
|
61179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
61180
61180
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
61181
61181
|
const importer = authorActor(context, IMPORTER).actor;
|
|
61182
61182
|
return context.database.prepare("SELECT 1 FROM payment_allocations WHERE payment_id = ? AND NOT (author_type = ? AND author_id = ?) LIMIT 1").get(paymentId, importer.type, importer.id) !== void 0;
|
|
@@ -61386,7 +61386,7 @@ var MONEY_PROJECTORS = {
|
|
|
61386
61386
|
}
|
|
61387
61387
|
};
|
|
61388
61388
|
|
|
61389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
61390
61390
|
var CALLS_CALENDAR = "calls";
|
|
61391
61391
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
61392
61392
|
if (!isImportedProvider(source2.provider))
|
|
@@ -61561,7 +61561,7 @@ var PHONE_PROJECTORS = {
|
|
|
61561
61561
|
}
|
|
61562
61562
|
};
|
|
61563
61563
|
|
|
61564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61564
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
61565
61565
|
var RECORD_PROJECTORS = {
|
|
61566
61566
|
...MONEY_PROJECTORS,
|
|
61567
61567
|
...DIRECT_PROJECTORS,
|
|
@@ -61572,7 +61572,7 @@ var RECORD_PROJECTORS = {
|
|
|
61572
61572
|
project: null
|
|
61573
61573
|
};
|
|
61574
61574
|
|
|
61575
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
61576
61576
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
61577
61577
|
const sql2 = /* @__PURE__ */ __name((text8) => database.prepare(text8), "sql");
|
|
61578
61578
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -61634,7 +61634,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
61634
61634
|
return { settle, checkShares };
|
|
61635
61635
|
}, "recordSettlingOver");
|
|
61636
61636
|
|
|
61637
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61637
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
61638
61638
|
import { createHash as createHash24 } from "node:crypto";
|
|
61639
61639
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
61640
61640
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -61650,7 +61650,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
61650
61650
|
return { stamp, untouched };
|
|
61651
61651
|
}, "importStampsOver");
|
|
61652
61652
|
|
|
61653
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
61654
61654
|
var SUBSCRIPTIONS = "SELECT s.*, b.name AS author_name, b.kind AS author_kind FROM subscriptions s LEFT JOIN bots b ON s.author_type = 'bot' AND b.id = s.author_id";
|
|
61655
61655
|
var PRICES = "SELECT p.*, b.name AS author_name, b.kind AS author_kind FROM subscription_prices p LEFT JOIN bots b ON p.author_type = 'bot' AND b.id = p.author_id";
|
|
61656
61656
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -61887,7 +61887,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
61887
61887
|
};
|
|
61888
61888
|
}, "subscriptionsStoreOver");
|
|
61889
61889
|
|
|
61890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
61891
61891
|
var WALLETS = "SELECT w.*, b.name AS author_name, b.kind AS author_kind FROM financial_accounts w LEFT JOIN bots b ON w.author_type = 'bot' AND b.id = w.author_id";
|
|
61892
61892
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
61893
61893
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -62012,7 +62012,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62012
62012
|
};
|
|
62013
62013
|
}, "walletsStoreOver");
|
|
62014
62014
|
|
|
62015
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62015
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
62016
62016
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
62017
62017
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
62018
62018
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -62271,7 +62271,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
62271
62271
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
62272
62272
|
}, "recordWritesOver");
|
|
62273
62273
|
|
|
62274
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62274
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
62275
62275
|
var LIMIT = 1e3;
|
|
62276
62276
|
var iso16 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
62277
62277
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -62495,7 +62495,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62495
62495
|
};
|
|
62496
62496
|
}, "recordStoreOver");
|
|
62497
62497
|
|
|
62498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/templates.js
|
|
62499
62499
|
var templateOf = /* @__PURE__ */ __name((row2) => ({
|
|
62500
62500
|
key: row2.key,
|
|
62501
62501
|
channel: row2.channel,
|
|
@@ -62550,12 +62550,12 @@ var storedTemplateBodies = /* @__PURE__ */ __name((database, key2, language) =>
|
|
|
62550
62550
|
return Object.fromEntries(rows.map((row2) => [row2.channel, row2.body]));
|
|
62551
62551
|
}, "storedTemplateBodies");
|
|
62552
62552
|
|
|
62553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62553
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/tracker.js
|
|
62554
62554
|
var trackerTitleOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "issue" ? record3.title : kind3 === "comment" ? record3.body.split("\n")[0]?.slice(0, 120) || "(comment)" : record3.name, "trackerTitleOf");
|
|
62555
62555
|
var trackerBodyOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "comment" ? record3.body : kind3 === "issue" || kind3 === "project" ? record3.description : null, "trackerBodyOf");
|
|
62556
62556
|
var trackerParentOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "comment" ? record3.issue : kind3 === "state" || kind3 === "label" ? record3.team : kind3 === "issue" ? record3.team : null, "trackerParentOf");
|
|
62557
62557
|
|
|
62558
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/tracker.js
|
|
62559
62559
|
var MOST3 = 500;
|
|
62560
62560
|
var itemOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
62561
62561
|
kind: String(row2.kind),
|
|
@@ -62725,7 +62725,7 @@ var trackerStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62725
62725
|
};
|
|
62726
62726
|
}, "trackerStoreOver");
|
|
62727
62727
|
|
|
62728
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
62729
62729
|
var refusalOf2 = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
62730
62730
|
var wrapped2 = /* @__PURE__ */ new WeakMap();
|
|
62731
62731
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -62760,7 +62760,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
62760
62760
|
return proxy;
|
|
62761
62761
|
}, "storeErrors");
|
|
62762
62762
|
|
|
62763
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62763
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
62764
62764
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
62765
62765
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
62766
62766
|
let merged2 = { from: from2, to };
|
|
@@ -62773,7 +62773,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
62773
62773
|
}, "markRange");
|
|
62774
62774
|
var ranges = /* @__PURE__ */ __name(({ orm }, chatKey) => orm.select({ from: syncRanges.fromKey, to: syncRanges.toKey }).from(syncRanges).where(eq(syncRanges.chatId, chatKey)).orderBy(syncRanges.fromKey).all(), "ranges");
|
|
62775
62775
|
|
|
62776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
62777
62777
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
62778
62778
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
62779
62779
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -62794,7 +62794,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
62794
62794
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(prefixOf2(account) + chatId, JSON.stringify({ ...saved, checkedAt: checkedAt ?? new Date(now2).toISOString() }), now2);
|
|
62795
62795
|
}, "setTaskAnalysisMark");
|
|
62796
62796
|
|
|
62797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62797
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
62798
62798
|
var keyOf6 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
62799
62799
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
62800
62800
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf6(account));
|
|
@@ -62804,7 +62804,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
62804
62804
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf6(account), JSON.stringify(until), now2);
|
|
62805
62805
|
}, "setTaskRulesStop");
|
|
62806
62806
|
|
|
62807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62807
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
62808
62808
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
62809
62809
|
const { database } = context;
|
|
62810
62810
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -62863,7 +62863,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62863
62863
|
};
|
|
62864
62864
|
}, "syncStoreOver");
|
|
62865
62865
|
|
|
62866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62866
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
62867
62867
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
62868
62868
|
const { database } = context;
|
|
62869
62869
|
return {
|
|
@@ -62885,7 +62885,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62885
62885
|
};
|
|
62886
62886
|
}, "tagsStoreOver");
|
|
62887
62887
|
|
|
62888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
62889
62889
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
62890
62890
|
var neighbours = /* @__PURE__ */ __name(({ orm }, chatKey, messagePk, sentAt, { messages: messages2, withinMs }, side) => orm.all(sql`SELECT sender_name AS sender, text, sent_at AS sentAt FROM messages
|
|
62891
62891
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -63012,7 +63012,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
63012
63012
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
63013
63013
|
}, "savePictureChunks");
|
|
63014
63014
|
|
|
63015
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63015
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
63016
63016
|
var messagesToEmbed = /* @__PURE__ */ __name(({ orm }, accountPk2, { chatKey, model, after: after2, limit }) => orm.all(sql`SELECT m.id AS messagePk, m.text, m.sent_at AS sentAt, k.content_hash AS hash,
|
|
63017
63017
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
63018
63018
|
FROM messages m
|
|
@@ -63101,7 +63101,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
63101
63101
|
return plain2(best(found2));
|
|
63102
63102
|
}, "nearestMessages");
|
|
63103
63103
|
|
|
63104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
63105
63105
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
63106
63106
|
const { database } = context;
|
|
63107
63107
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -63365,7 +63365,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
63365
63365
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
63366
63366
|
}), "vectorsStoreOver");
|
|
63367
63367
|
|
|
63368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
63369
63369
|
import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
63370
63370
|
import { dirname as dirname3, join as join4 } from "node:path";
|
|
63371
63371
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -63453,10 +63453,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
63453
63453
|
}
|
|
63454
63454
|
}, "lastBackup");
|
|
63455
63455
|
|
|
63456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63456
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
63457
63457
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
63458
63458
|
|
|
63459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
63460
63460
|
var COUNTED_TABLES = [
|
|
63461
63461
|
"accounts",
|
|
63462
63462
|
"chats",
|
|
@@ -63541,7 +63541,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
63541
63541
|
};
|
|
63542
63542
|
}, "storeContents");
|
|
63543
63543
|
|
|
63544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
63545
63545
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
63546
63546
|
const context = await openStoreContext(options);
|
|
63547
63547
|
try {
|