@wirecat/cli-memo 0.131.42 → 0.131.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/memo.js +2 -2
- package/dist/bundle/{all-profiles-ZBEW2K6Y.js → all-profiles-MFZPFIHO.js} +5 -5
- package/dist/bundle/{anthropic-2OBFMS2B.js → anthropic-KJBO3FCU.js} +3 -3
- package/dist/bundle/{app-server-2BPUD7XU.js → app-server-A2XCJDGI.js} +35 -35
- package/dist/bundle/auto-W3BUP6YI.js +86 -0
- package/dist/bundle/{bun-4NGTZRHL.js → bun-BT7YVHDQ.js} +2 -2
- package/dist/bundle/{bun-sqlite-INSVTXFN.js → bun-sqlite-EG4TSO2G.js} +2 -2
- package/dist/bundle/{chunk-HCMQGNZU.js → chunk-2HHWU7GF.js} +5 -5
- package/dist/bundle/{chunk-A2KU4HSF.js → chunk-45LXRNPA.js} +56 -56
- package/dist/bundle/{chunk-5O3T7Z7F.js → chunk-4J6U4RIU.js} +296 -282
- package/dist/bundle/{chunk-4OYYJSRS.js → chunk-5HODYN65.js} +31 -31
- package/dist/bundle/{chunk-2IO2DEBO.js → chunk-5OOASLTP.js} +8 -8
- package/dist/bundle/{chunk-RV4EBFH2.js → chunk-5Q5JMJKP.js} +9 -9
- package/dist/bundle/{chunk-CKLLVPTR.js → chunk-6LXBT4F3.js} +1 -1
- package/dist/bundle/{chunk-O4I3BJPM.js → chunk-7VXPMICZ.js} +6 -6
- package/dist/bundle/{chunk-TWBJOORY.js → chunk-BBT2TWCN.js} +1 -1
- package/dist/bundle/{chunk-DA5YMQCB.js → chunk-BJS2EWG5.js} +2 -2
- package/dist/bundle/{chunk-UX34ZUMK.js → chunk-CJQYTFN6.js} +3 -3
- package/dist/bundle/{chunk-MWKPW3RU.js → chunk-E454LAVZ.js} +1 -1
- package/dist/bundle/{chunk-2P54ZDQO.js → chunk-EYKJXPDD.js} +7 -7
- package/dist/bundle/{chunk-E3P7PIR3.js → chunk-GTN4Z7XH.js} +3 -3
- package/dist/bundle/{chunk-TCNOZZPS.js → chunk-GURLGLGY.js} +11 -11
- package/dist/bundle/{chunk-KVKO4X7K.js → chunk-GWI3XFJR.js} +3 -3
- package/dist/bundle/{chunk-UK2MCVKV.js → chunk-GZCZKPUM.js} +248 -248
- package/dist/bundle/{chunk-GECE7WJD.js → chunk-GZTKZRWO.js} +2 -2
- package/dist/bundle/{chunk-GHLLCV4E.js → chunk-HQXTNBEY.js} +7 -7
- package/dist/bundle/{chunk-O6YTC7DC.js → chunk-I6JHSNDD.js} +1 -1
- package/dist/bundle/{chunk-CZ2CX43P.js → chunk-IKLSYWX7.js} +4 -4
- package/dist/bundle/{chunk-YLJWCB6F.js → chunk-IXAHSLWQ.js} +43 -43
- package/dist/bundle/{chunk-QWNEZWGZ.js → chunk-JFGPXSHH.js} +4 -4
- package/dist/bundle/{chunk-WSPCOSYD.js → chunk-K6UTFYOL.js} +4 -4
- package/dist/bundle/{chunk-KHEFBWLH.js → chunk-KD4A5HF6.js} +1 -1
- package/dist/bundle/{chunk-HQQC5JRS.js → chunk-KKDTX2LO.js} +4 -4
- package/dist/bundle/{chunk-UCLNEOQS.js → chunk-MEO3B2OF.js} +12 -12
- package/dist/bundle/{chunk-RHIQ34XW.js → chunk-MQ66CMD3.js} +2 -2
- package/dist/bundle/{chunk-6BW7SC6A.js → chunk-N4XNQ67E.js} +1 -1
- package/dist/bundle/{chunk-WG6AOUQW.js → chunk-N6XUB5Z6.js} +24 -21
- package/dist/bundle/{chunk-OAIRZNL2.js → chunk-NEQGFKOR.js} +1 -1
- package/dist/bundle/{chunk-OJX6GNQY.js → chunk-NKAXCQNN.js} +20 -20
- package/dist/bundle/{chunk-42VOTRWE.js → chunk-NXCYAOYY.js} +1 -1
- package/dist/bundle/{chunk-QWZUMUA7.js → chunk-NXJZMS35.js} +5 -5
- package/dist/bundle/{chunk-TBGBA45H.js → chunk-O4VDVY67.js} +1 -1
- package/dist/bundle/{chunk-T4NH7JI6.js → chunk-OBFWJJFV.js} +2 -2
- package/dist/bundle/{chunk-IAML53OZ.js → chunk-OEOU4MLY.js} +2 -2
- package/dist/bundle/{chunk-67TMJCHI.js → chunk-OK372VP3.js} +10 -10
- package/dist/bundle/{chunk-WFA2ZLJB.js → chunk-POSVGIP5.js} +149 -149
- package/dist/bundle/{chunk-LBMZ7SQI.js → chunk-Q2SZI7LP.js} +2 -2
- package/dist/bundle/{chunk-XUNIJW7V.js → chunk-Q2XEAF7Q.js} +9 -9
- package/dist/bundle/{chunk-W7GJREIL.js → chunk-QNLXDR4W.js} +2 -2
- package/dist/bundle/{chunk-KBOLP4OR.js → chunk-QZDSHJMZ.js} +27 -27
- package/dist/bundle/{chunk-F6UUS3OF.js → chunk-R2YMI2ZV.js} +1 -1
- package/dist/bundle/{chunk-ELPCHMDA.js → chunk-S4PKJOJP.js} +3 -3
- package/dist/bundle/{chunk-QWNVEFWY.js → chunk-SP7FRSAG.js} +5 -5
- package/dist/bundle/{chunk-O34QHLL5.js → chunk-SWE4LSXN.js} +1 -1
- package/dist/bundle/{chunk-NP5FU56F.js → chunk-T2NE3S47.js} +1 -1
- package/dist/bundle/{chunk-NCBHNEWW.js → chunk-T3ZQDLBU.js} +1 -1
- package/dist/bundle/{chunk-JWQWLMFP.js → chunk-TK6P24AN.js} +413 -386
- package/dist/bundle/{chunk-LJDBOXZN.js → chunk-WJBLLOBC.js} +1 -1
- package/dist/bundle/{chunk-2XCXOI4F.js → chunk-WNZVZE3L.js} +4 -4
- package/dist/bundle/{chunk-OYHQYCGJ.js → chunk-X3PFDJSJ.js} +4 -4
- package/dist/bundle/{chunk-EKFHAT36.js → chunk-XIZPBRIW.js} +1 -1
- package/dist/bundle/{chunk-KKXXP5RY.js → chunk-XTLFCF35.js} +7 -7
- package/dist/bundle/{chunk-TXU5T7VA.js → chunk-YGNKWWOX.js} +1 -1
- package/dist/bundle/{chunk-PRL227K7.js → chunk-ZIRR4BJ5.js} +5 -5
- package/dist/bundle/{command-contract-EYE52WTH.js → command-contract-JJQE3MCP.js} +11 -11
- package/dist/bundle/{decode-JVG6DJJV.js → decode-AMWZXLFS.js} +2 -2
- package/dist/bundle/{echarts-4IS4IPI4.js → echarts-UCAIOY4N.js} +2 -2
- package/dist/bundle/{embed-7CN33CQR.js → embed-DYNZ4223.js} +3 -3
- package/dist/bundle/{embedder-TZ345BZF.js → embedder-XG344VNB.js} +6 -6
- package/dist/bundle/{entry-5VZRNBLV.js → entry-CIUBRSDD.js} +4 -4
- package/dist/bundle/failure-JTQUF4RT.js +66 -0
- package/dist/bundle/{first-run-EMHSBODF.js → first-run-DFXU6DO2.js} +5 -5
- package/dist/bundle/{first-screen-3PJ3HFLG.js → first-screen-QDTJRHSS.js} +12 -12
- package/dist/bundle/{instructions-BTAYTZIS.js → instructions-MFAYYVVL.js} +1 -1
- package/dist/bundle/{mcp-I5KREUIV.js → mcp-5GUDJIDV.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-FMT4QVUG.js → node-UILGGXFZ.js} +2 -2
- package/dist/bundle/{node-sqlite-2RDIBVYM.js → node-sqlite-FJR5DRBC.js} +3 -3
- package/dist/bundle/{oauth-MF53KMXM.js → oauth-2WCGPG4N.js} +4 -4
- package/dist/bundle/{open-WKKHNBXL.js → open-I7ZYXOHK.js} +2 -2
- package/dist/bundle/{openai-36KNG2DB.js → openai-4GB2FGUR.js} +7 -7
- package/dist/bundle/{process-F2FWK4Q4.js → process-NRZZD4IS.js} +1 -1
- package/dist/bundle/{program-W55Y6LL2.js → program-HYJUSSU4.js} +567 -198
- package/dist/bundle/{prompt-2TR6X3TJ.js → prompt-F5RHTE7V.js} +2 -2
- package/dist/bundle/{recognize-MOBCGUI7.js → recognize-UXXDJQEW.js} +1 -1
- package/dist/bundle/{remote-GARKVCO7.js → remote-IW5FTICS.js} +4 -4
- package/dist/bundle/{rerank-L3G7P3KX.js → rerank-RRLNQ5C2.js} +4 -4
- package/dist/bundle/{serve-ABRMEJ7P.js → serve-GXJLUYCV.js} +6 -6
- package/dist/bundle/{server-XLMROR5L.js → server-646V4VPF.js} +50 -50
- package/dist/bundle/server-DJUCOKNC.js +48 -0
- package/dist/bundle/server-ITBSOGIC.js +61 -0
- package/dist/bundle/{state-5N2RVH2Y.js → state-3NLLRTD2.js} +3 -3
- package/dist/bundle/{store-4ML7O47C.js → store-3DFD7E66.js} +9 -9
- package/dist/bundle/store-maintenance-command-D7O6QCVF.js +48 -0
- package/dist/bundle/update-GQFRQVAV.js +69 -0
- package/dist/context/command.d.ts +4 -0
- package/dist/context/command.d.ts.map +1 -1
- package/dist/context/command.js +7 -5
- package/dist/context/command.js.map +1 -1
- package/dist/context/context.d.ts.map +1 -1
- package/dist/context/context.js +4 -3
- package/dist/context/context.js.map +1 -1
- package/dist/contract-overrides/skill.js +1 -1
- package/dist/contract-overrides/skill.js.map +1 -1
- package/dist/digest/command.d.ts +9 -0
- package/dist/digest/command.d.ts.map +1 -0
- package/dist/digest/command.js +58 -0
- package/dist/digest/command.js.map +1 -0
- package/dist/digest/digest.d.ts +57 -0
- package/dist/digest/digest.d.ts.map +1 -0
- package/dist/digest/digest.js +333 -0
- package/dist/digest/digest.js.map +1 -0
- package/dist/digest/text.d.ts +8 -0
- package/dist/digest/text.d.ts.map +1 -0
- package/dist/digest/text.js +35 -0
- package/dist/digest/text.js.map +1 -0
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +3 -2
- package/dist/examples.js.map +1 -1
- package/dist/knowledge/command.d.ts.map +1 -1
- package/dist/knowledge/command.js +17 -33
- package/dist/knowledge/command.js.map +1 -1
- package/dist/knowledge/project-context.d.ts +1 -0
- package/dist/knowledge/project-context.d.ts.map +1 -1
- package/dist/knowledge/project-context.js +6 -3
- package/dist/knowledge/project-context.js.map +1 -1
- package/dist/knowledge/project-status-command.d.ts.map +1 -1
- package/dist/knowledge/project-status-command.js +2 -1
- package/dist/knowledge/project-status-command.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +1 -0
- package/dist/program.js.map +1 -1
- package/dist/review/command.d.ts.map +1 -1
- package/dist/review/command.js +4 -8
- package/dist/review/command.js.map +1 -1
- package/dist/review/status.d.ts +9 -0
- package/dist/review/status.d.ts.map +1 -1
- package/dist/review/status.js +11 -6
- package/dist/review/status.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/skills/cli-memo/topics/projects.md +3 -1
- package/skills/morning-digest/SKILL.md +49 -0
- package/dist/bundle/auto-NIATDHS4.js +0 -86
- package/dist/bundle/failure-KIFYUUO6.js +0 -66
- package/dist/bundle/server-NMRAFTY3.js +0 -61
- package/dist/bundle/server-VX3L42ED.js +0 -48
- package/dist/bundle/store-maintenance-command-O3OTXKNO.js +0 -48
- package/dist/bundle/update-OWKZLZTS.js +0 -69
- /package/dist/bundle/{chunk-O3EZTSTN.js → chunk-NJG67ZXD.js} +0 -0
|
@@ -100,11 +100,11 @@ import {
|
|
|
100
100
|
validateQuery,
|
|
101
101
|
walkQuery,
|
|
102
102
|
zonedMoment
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-45LXRNPA.js";
|
|
104
104
|
import {
|
|
105
105
|
holdsCredential,
|
|
106
106
|
secretNamed
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-NXCYAOYY.js";
|
|
108
108
|
import {
|
|
109
109
|
DEFAULT_STEMMERS,
|
|
110
110
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -117,26 +117,26 @@ import {
|
|
|
117
117
|
fold,
|
|
118
118
|
normalize,
|
|
119
119
|
parseStemmers
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-HQXTNBEY.js";
|
|
121
121
|
import {
|
|
122
122
|
DEFAULT_TASK_CATEGORIES,
|
|
123
123
|
sharedConfigPath,
|
|
124
124
|
storedTaskCategories,
|
|
125
125
|
taskCategoriesReader
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-X3PFDJSJ.js";
|
|
127
127
|
import {
|
|
128
128
|
refuseOwnerStoreInTests,
|
|
129
129
|
storePath
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-R2YMI2ZV.js";
|
|
131
131
|
import {
|
|
132
132
|
quietSqliteWarning,
|
|
133
133
|
storeCapable
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-SP7FRSAG.js";
|
|
135
135
|
import {
|
|
136
136
|
PRAGMAS,
|
|
137
137
|
TIME_LIMIT_FUNCTION,
|
|
138
138
|
TimeLimitReached
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-6LXBT4F3.js";
|
|
140
140
|
import {
|
|
141
141
|
array,
|
|
142
142
|
boolean,
|
|
@@ -186,7 +186,7 @@ import {
|
|
|
186
186
|
sql,
|
|
187
187
|
sqliteTable,
|
|
188
188
|
text
|
|
189
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-YGNKWWOX.js";
|
|
190
190
|
import {
|
|
191
191
|
__commonJS,
|
|
192
192
|
__name,
|
|
@@ -9930,7 +9930,7 @@ var require_cjs = __commonJS({
|
|
|
9930
9930
|
}
|
|
9931
9931
|
});
|
|
9932
9932
|
|
|
9933
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
9934
9934
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
9935
9935
|
const methods = whole;
|
|
9936
9936
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10058,7 +10058,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10058
10058
|
};
|
|
10059
10059
|
}, "bindAccount");
|
|
10060
10060
|
|
|
10061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
10062
10062
|
var SCHEME = "msg:";
|
|
10063
10063
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat: chat2, message: message2 }) => SCHEME + [provider, account, chat2, message2].map(encodeURIComponent).join("/"), "formatLocator");
|
|
10064
10064
|
var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -10072,7 +10072,7 @@ var parseLocator = /* @__PURE__ */ __name((reference2) => {
|
|
|
10072
10072
|
return { provider, account, chat: chat2, message: message2 };
|
|
10073
10073
|
}, "parseLocator");
|
|
10074
10074
|
|
|
10075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
10076
10076
|
var SIMPLE_REFERENCES = [
|
|
10077
10077
|
"note",
|
|
10078
10078
|
"document",
|
|
@@ -10223,8 +10223,8 @@ var looksLikeReference = /* @__PURE__ */ __name((text6) => {
|
|
|
10223
10223
|
return match !== null && byPrefix.has(match[1]);
|
|
10224
10224
|
}, "looksLikeReference");
|
|
10225
10225
|
|
|
10226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10227
|
-
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
|
|
10226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
10227
|
+
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
|
|
10228
10228
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
10229
10229
|
var PROVIDERS = [
|
|
10230
10230
|
{ name: "telegram", kind: "messages", aliases: ["tg"], command: "tg", opens: MESSENGER_OPENS },
|
|
@@ -10339,7 +10339,7 @@ var providerNamed = /* @__PURE__ */ __name((word2) => {
|
|
|
10339
10339
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
10340
10340
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
10341
10341
|
|
|
10342
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10342
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
10343
10343
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
10344
10344
|
var inSource = /* @__PURE__ */ __name((source2, provider) => source2 === "all" || source2 === "bots" && isBotProvider(provider) || source2 === "personal" && !isBotProvider(provider) || source2 === provider || providerNamed(source2)?.name === provider || isKind(source2) && kindOf(provider) === source2, "inSource");
|
|
10345
10345
|
var fail = /* @__PURE__ */ __name((message2) => {
|
|
@@ -10362,7 +10362,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
10362
10362
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
10363
10363
|
}, "sourceOf");
|
|
10364
10364
|
|
|
10365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
10366
10366
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
10367
10367
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
10368
10368
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -10524,7 +10524,8 @@ var READS = {
|
|
|
10524
10524
|
notes: "notes \u2014 search notes reads them",
|
|
10525
10525
|
documents: "documents \u2014 search notes reads them",
|
|
10526
10526
|
meetings: "meetings \u2014 search all reads them",
|
|
10527
|
-
events: "calendar events \u2014 no search reads them yet"
|
|
10527
|
+
events: "calendar events \u2014 no search reads them yet",
|
|
10528
|
+
crm: "CRM deals and leads \u2014 search all reads them"
|
|
10528
10529
|
};
|
|
10529
10530
|
var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf2 = (kind4) => READS[kind4]) => {
|
|
10530
10531
|
const chosen = /* @__PURE__ */ new Map();
|
|
@@ -10549,7 +10550,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf2 = (kind4)
|
|
|
10549
10550
|
return { accounts: [...chosen.values()], skipped };
|
|
10550
10551
|
}, "fitting");
|
|
10551
10552
|
|
|
10552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10553
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10553
10554
|
var IndexBuilderOn = class {
|
|
10554
10555
|
static {
|
|
10555
10556
|
__name(this, "IndexBuilderOn");
|
|
@@ -10744,7 +10745,7 @@ function alias(table, alias2) {
|
|
|
10744
10745
|
}
|
|
10745
10746
|
__name(alias, "alias");
|
|
10746
10747
|
|
|
10747
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10748
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10748
10749
|
var ENTITY_TABLES = {
|
|
10749
10750
|
account: "accounts",
|
|
10750
10751
|
attachment: "attachments",
|
|
@@ -10790,7 +10791,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10790
10791
|
return { table, pointer, type, count, known: known2 };
|
|
10791
10792
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
10792
10793
|
|
|
10793
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10794
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
10794
10795
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
10795
10796
|
id: integer("id").primaryKey(),
|
|
10796
10797
|
name: text("name").notNull().unique(),
|
|
@@ -10799,7 +10800,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
10799
10800
|
updatedAt: integer("updated_at").notNull()
|
|
10800
10801
|
});
|
|
10801
10802
|
|
|
10802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10803
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
10803
10804
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
10804
10805
|
sourceKey: text("source_key").notNull(),
|
|
10805
10806
|
collection: text("collection").notNull(),
|
|
@@ -10809,13 +10810,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
10809
10810
|
createdAt: integer("created_at").notNull()
|
|
10810
10811
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
10811
10812
|
|
|
10812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10813
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
10813
10814
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
10814
10815
|
id: integer("id").notNull(),
|
|
10815
10816
|
indexableType: text("indexable_type").notNull()
|
|
10816
10817
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
10817
10818
|
|
|
10818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10819
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
10819
10820
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
10820
10821
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
10821
10822
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -10841,7 +10842,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
10841
10842
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
10842
10843
|
]);
|
|
10843
10844
|
|
|
10844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
10845
10846
|
var accounts = sqliteTable("accounts", {
|
|
10846
10847
|
id: integer("id").primaryKey(),
|
|
10847
10848
|
provider: text("provider").notNull(),
|
|
@@ -12610,7 +12611,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
12610
12611
|
at: integer("at").notNull()
|
|
12611
12612
|
});
|
|
12612
12613
|
|
|
12613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12614
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
12614
12615
|
var ARMS = [
|
|
12615
12616
|
[
|
|
12616
12617
|
"message",
|
|
@@ -12737,7 +12738,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
12737
12738
|
return recomputed;
|
|
12738
12739
|
}, "drainInvolvementQueue");
|
|
12739
12740
|
|
|
12740
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12741
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
12741
12742
|
import { domainToUnicode } from "node:url";
|
|
12742
12743
|
|
|
12743
12744
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -22759,7 +22760,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
22759
22760
|
}, "oa");
|
|
22760
22761
|
var na = { parse: O, get: aa, isValid: oa };
|
|
22761
22762
|
|
|
22762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22763
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
22763
22764
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
22764
22765
|
var ID = /^[\w-]{10,}$/;
|
|
22765
22766
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -22800,7 +22801,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text6) => [...text6.matchAll(L
|
|
|
22800
22801
|
return { url, documentId: googleDocumentId(url) };
|
|
22801
22802
|
}), "googleDocumentLinks");
|
|
22802
22803
|
|
|
22803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
22804
22805
|
var PHONE_PLANS = [
|
|
22805
22806
|
{
|
|
22806
22807
|
country: "us",
|
|
@@ -23180,7 +23181,7 @@ var PHONE_PLANS = [
|
|
|
23180
23181
|
}
|
|
23181
23182
|
];
|
|
23182
23183
|
|
|
23183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23184
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
23184
23185
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
23185
23186
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
23186
23187
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -23221,7 +23222,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
23221
23222
|
return void 0;
|
|
23222
23223
|
}, "nationalPhone");
|
|
23223
23224
|
|
|
23224
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
23225
23226
|
var BEFORE = [
|
|
23226
23227
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
23227
23228
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -23481,7 +23482,7 @@ var findPlaces = /* @__PURE__ */ __name((text6) => {
|
|
|
23481
23482
|
return found2.sort((a, b) => a.start - b.start);
|
|
23482
23483
|
}, "findPlaces");
|
|
23483
23484
|
|
|
23484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23485
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
23485
23486
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
23486
23487
|
var MENTION_VERSIONS = {
|
|
23487
23488
|
phone: 1,
|
|
@@ -23671,7 +23672,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
23671
23672
|
};
|
|
23672
23673
|
}, "typedPhone");
|
|
23673
23674
|
|
|
23674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
23675
23676
|
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";
|
|
23676
23677
|
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";
|
|
23677
23678
|
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";
|
|
@@ -23679,7 +23680,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
23679
23680
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
23680
23681
|
var NAME_WORDS = WORDS.split(" ");
|
|
23681
23682
|
|
|
23682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23683
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
23683
23684
|
var LATIN_TO_CYRILLIC = {
|
|
23684
23685
|
shch: "\u0449",
|
|
23685
23686
|
sch: "\u0449",
|
|
@@ -23887,7 +23888,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text6, stem, taken) => {
|
|
|
23887
23888
|
return found2;
|
|
23888
23889
|
}, "findUnknownNames");
|
|
23889
23890
|
|
|
23890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
23891
23892
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
23892
23893
|
"webpage",
|
|
23893
23894
|
"share",
|
|
@@ -23927,7 +23928,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
|
23927
23928
|
});
|
|
23928
23929
|
}, "matchDownloads");
|
|
23929
23930
|
|
|
23930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
23931
23932
|
var QUERY_VERSION = 1;
|
|
23932
23933
|
var QUERY_LIMITS2 = {
|
|
23933
23934
|
...QUERY_LIMITS,
|
|
@@ -23963,7 +23964,7 @@ function exhausted(budget) {
|
|
|
23963
23964
|
}
|
|
23964
23965
|
__name(exhausted, "exhausted");
|
|
23965
23966
|
|
|
23966
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23967
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
23967
23968
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
23968
23969
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
23969
23970
|
kind: "char",
|
|
@@ -24363,7 +24364,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
24363
24364
|
return out;
|
|
24364
24365
|
}, "foldRegex");
|
|
24365
24366
|
|
|
24366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
24367
24368
|
var PRESET_VERSION = 1;
|
|
24368
24369
|
var PRESETS = {
|
|
24369
24370
|
password: {
|
|
@@ -24417,7 +24418,7 @@ var PRESETS = {
|
|
|
24417
24418
|
}
|
|
24418
24419
|
};
|
|
24419
24420
|
|
|
24420
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24421
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
24421
24422
|
var FIELD_VERSION = 2;
|
|
24422
24423
|
var UNITS = {
|
|
24423
24424
|
"": 1,
|
|
@@ -24878,12 +24879,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
|
|
|
24878
24879
|
return validateFields(parsed3.output);
|
|
24879
24880
|
}, "validateAst");
|
|
24880
24881
|
|
|
24881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
24882
24883
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
24883
24884
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
24884
24885
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
24885
24886
|
|
|
24886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24887
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
24887
24888
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
24888
24889
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
24889
24890
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -24907,7 +24908,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
24907
24908
|
};
|
|
24908
24909
|
}, "linkMatch");
|
|
24909
24910
|
|
|
24910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
24911
24912
|
var SETTING = "phoneCountries";
|
|
24912
24913
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
24913
24914
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -24938,7 +24939,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
24938
24939
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
24939
24940
|
}, "valueMatch");
|
|
24940
24941
|
|
|
24941
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
24942
24943
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
24943
24944
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
24944
24945
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -24966,7 +24967,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
24966
24967
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
24967
24968
|
}, "vocabularySimilarity");
|
|
24968
24969
|
|
|
24969
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
24970
24971
|
import { createHash } from "node:crypto";
|
|
24971
24972
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
24972
24973
|
try {
|
|
@@ -25032,7 +25033,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind4, by, options
|
|
|
25032
25033
|
});
|
|
25033
25034
|
}, "guardTagCreation");
|
|
25034
25035
|
|
|
25035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
25036
25037
|
var invalid2 = /* @__PURE__ */ __name((message2) => {
|
|
25037
25038
|
throw new CliError("validation_error", message2);
|
|
25038
25039
|
}, "invalid");
|
|
@@ -25109,7 +25110,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
25109
25110
|
};
|
|
25110
25111
|
}, "createTagRedirectIndex");
|
|
25111
25112
|
|
|
25112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
25113
25114
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
25114
25115
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
25115
25116
|
if (!row2)
|
|
@@ -25137,7 +25138,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
25137
25138
|
return snapshot2;
|
|
25138
25139
|
}, "tagRedirectSnapshot");
|
|
25139
25140
|
|
|
25140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25141
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
25141
25142
|
import { createHash as createHash2 } from "node:crypto";
|
|
25142
25143
|
var TASK_KEY_PREFIXES = {
|
|
25143
25144
|
question: "Q",
|
|
@@ -25165,7 +25166,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
25165
25166
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
25166
25167
|
}, "taskAccountOf");
|
|
25167
25168
|
|
|
25168
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
25169
25170
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
25170
25171
|
var REFERABLE = {
|
|
25171
25172
|
note: { tombstone: true },
|
|
@@ -25333,7 +25334,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
25333
25334
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
25334
25335
|
}, "taskIdOf");
|
|
25335
25336
|
|
|
25336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25337
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
25337
25338
|
var toMs = /* @__PURE__ */ __name((iso14) => {
|
|
25338
25339
|
if (iso14 === null || iso14 === void 0)
|
|
25339
25340
|
return null;
|
|
@@ -25347,7 +25348,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
25347
25348
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
25348
25349
|
var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
25349
25350
|
|
|
25350
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
25351
25352
|
var TAG_KINDS = ["tag", "topic"];
|
|
25352
25353
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
25353
25354
|
var TAG_TYPE = {
|
|
@@ -25550,7 +25551,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
25550
25551
|
return result;
|
|
25551
25552
|
}, "tagsOf");
|
|
25552
25553
|
|
|
25553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
25554
25555
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
25555
25556
|
var SPEECH = speech("att");
|
|
25556
25557
|
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");
|
|
@@ -25914,7 +25915,7 @@ var FIELD_COMPILERS = {
|
|
|
25914
25915
|
subject
|
|
25915
25916
|
};
|
|
25916
25917
|
|
|
25917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
25918
25919
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
25919
25920
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
25920
25921
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -25930,7 +25931,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
25930
25931
|
};
|
|
25931
25932
|
}, "placeOf");
|
|
25932
25933
|
|
|
25933
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25934
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
25934
25935
|
var DRAIN_ON_WRITE = 500;
|
|
25935
25936
|
var METHOD = "rules";
|
|
25936
25937
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -26093,7 +26094,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
26093
26094
|
return queued.length;
|
|
26094
26095
|
}, "drainMentions");
|
|
26095
26096
|
|
|
26096
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
26097
26098
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
26098
26099
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
26099
26100
|
if (!exists2)
|
|
@@ -26101,7 +26102,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
26101
26102
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
26102
26103
|
}, "indexRow");
|
|
26103
26104
|
|
|
26104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
26105
26106
|
var INDEX = "message_stems";
|
|
26106
26107
|
var SETTING2 = "searchStemmers";
|
|
26107
26108
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -26223,7 +26224,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
26223
26224
|
};
|
|
26224
26225
|
}, "stemmerCache");
|
|
26225
26226
|
|
|
26226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
26227
26228
|
var SQLITE_BUSY = 5;
|
|
26228
26229
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
26229
26230
|
var isBusy = /* @__PURE__ */ __name((error) => {
|
|
@@ -26318,7 +26319,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
26318
26319
|
}
|
|
26319
26320
|
}, "read");
|
|
26320
26321
|
|
|
26321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
26322
26323
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
26323
26324
|
coalesce(CASE k.chunkable_type
|
|
26324
26325
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -26460,7 +26461,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
26460
26461
|
}, "dropUnusedVectors");
|
|
26461
26462
|
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");
|
|
26462
26463
|
|
|
26463
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
26464
26465
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null) => Number(orm.insert(accounts).values({ provider, externalId: account, name, scope: scope3 ?? "personal", createdAt: now2(), updatedAt: now2() }).onConflictDoUpdate({
|
|
26465
26466
|
target: [accounts.provider, accounts.externalId],
|
|
26466
26467
|
set: {
|
|
@@ -26569,7 +26570,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
26569
26570
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
26570
26571
|
}, "dropOrphanPeople");
|
|
26571
26572
|
|
|
26572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26573
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
26573
26574
|
var FOLDED = [
|
|
26574
26575
|
{ table: "tasks", column: "title" },
|
|
26575
26576
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -26606,7 +26607,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
26606
26607
|
return filled2;
|
|
26607
26608
|
}, "fillFolded");
|
|
26608
26609
|
|
|
26609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
26610
26611
|
var HISTORY_KEY = "$history";
|
|
26611
26612
|
var objectOf = /* @__PURE__ */ __name((text6) => {
|
|
26612
26613
|
if (typeof text6 !== "string")
|
|
@@ -26682,7 +26683,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
26682
26683
|
return rest;
|
|
26683
26684
|
}, "withoutHistory");
|
|
26684
26685
|
|
|
26685
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
26686
26687
|
import { createHash as createHash3 } from "node:crypto";
|
|
26687
26688
|
var CHUNK_CHARS = 1200;
|
|
26688
26689
|
var CHUNK_OVERLAP = 150;
|
|
@@ -26787,7 +26788,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
26787
26788
|
return chunks2;
|
|
26788
26789
|
}, "cutChunks");
|
|
26789
26790
|
|
|
26790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
26791
26792
|
var DAY = 864e5;
|
|
26792
26793
|
var CURRENCY = [
|
|
26793
26794
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -26913,7 +26914,7 @@ var dueDayOf = /* @__PURE__ */ __name((text6, createdMs) => {
|
|
|
26913
26914
|
return best?.day ?? null;
|
|
26914
26915
|
}, "dueDayOf");
|
|
26915
26916
|
|
|
26916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
26917
26918
|
var DAY2 = 864e5;
|
|
26918
26919
|
var STOP_WORDS = new Set([
|
|
26919
26920
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -27068,7 +27069,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
27068
27069
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
27069
27070
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
27070
27071
|
|
|
27071
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
27072
27073
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
27073
27074
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
27074
27075
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -27339,7 +27340,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
|
|
|
27339
27340
|
};
|
|
27340
27341
|
}, "readiness");
|
|
27341
27342
|
|
|
27342
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27343
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
27343
27344
|
var DOCUMENT_PICTURE = "document_picture";
|
|
27344
27345
|
var SCAN_PAGE2 = 5e3;
|
|
27345
27346
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -27402,7 +27403,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
27402
27403
|
}, "nearestPictures")
|
|
27403
27404
|
}), "documentPicturesOver");
|
|
27404
27405
|
|
|
27405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
27406
27407
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
27407
27408
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
27408
27409
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -27467,7 +27468,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
27467
27468
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
27468
27469
|
var bound2 = /* @__PURE__ */ __name(({ sql: text6, params }) => sql.join(text6.split("?").map((part, at) => at < params.length ? sql`${sql.raw(part)}${params[at]}` : sql.raw(part)), sql``), "bound");
|
|
27469
27470
|
|
|
27470
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
27471
27472
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
27472
27473
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
27473
27474
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -27557,7 +27558,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
27557
27558
|
});
|
|
27558
27559
|
}, "linkMeeting");
|
|
27559
27560
|
|
|
27560
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
27561
27562
|
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), ''))";
|
|
27562
27563
|
var UNSEARCHED_EVENT_TYPES = [
|
|
27563
27564
|
"working-location",
|
|
@@ -27787,7 +27788,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
27787
27788
|
return true;
|
|
27788
27789
|
}, "resetNoteIndex");
|
|
27789
27790
|
|
|
27790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
27791
27792
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
27792
27793
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
27793
27794
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -27806,7 +27807,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
27806
27807
|
}
|
|
27807
27808
|
}, "resolvePersonLinks");
|
|
27808
27809
|
|
|
27809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27810
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
27810
27811
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
27811
27812
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
27812
27813
|
find: orm.select({
|
|
@@ -28031,7 +28032,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
28031
28032
|
}, "meetingIdentityPk");
|
|
28032
28033
|
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");
|
|
28033
28034
|
|
|
28034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
28035
28036
|
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");
|
|
28036
28037
|
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");
|
|
28037
28038
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -28311,7 +28312,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
28311
28312
|
}
|
|
28312
28313
|
}, "replaceAutoTags");
|
|
28313
28314
|
|
|
28314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
28315
28316
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
28316
28317
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
28317
28318
|
var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
|
|
@@ -28330,7 +28331,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
28330
28331
|
return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
|
|
28331
28332
|
}, "counterFreshness");
|
|
28332
28333
|
|
|
28333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
28334
28335
|
import { createHash as createHash4 } from "node:crypto";
|
|
28335
28336
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
28336
28337
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -28428,7 +28429,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
28428
28429
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
28429
28430
|
}, "contextEvidenceRequest");
|
|
28430
28431
|
|
|
28431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
28432
28433
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
28433
28434
|
var ACTIVITY = `
|
|
28434
28435
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -28545,7 +28546,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
28545
28546
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
28546
28547
|
}), "mailActivity");
|
|
28547
28548
|
|
|
28548
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
28549
28550
|
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");
|
|
28550
28551
|
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;
|
|
28551
28552
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -28686,7 +28687,7 @@ var mailOwnText = /* @__PURE__ */ __name((body2) => {
|
|
|
28686
28687
|
return text6 || body2.trim();
|
|
28687
28688
|
}, "mailOwnText");
|
|
28688
28689
|
|
|
28689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28690
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
28690
28691
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
28691
28692
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
28692
28693
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
|
|
@@ -28796,7 +28797,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
28796
28797
|
return emails3 + threads;
|
|
28797
28798
|
}, "drainEmailIndex");
|
|
28798
28799
|
|
|
28799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
28800
28801
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
28801
28802
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
28802
28803
|
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,
|
|
@@ -28894,7 +28895,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
28894
28895
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
28895
28896
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
28896
28897
|
|
|
28897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28898
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
28898
28899
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
28899
28900
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
28900
28901
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -28944,7 +28945,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
28944
28945
|
return threads.length;
|
|
28945
28946
|
}, "markEmailsRestored");
|
|
28946
28947
|
|
|
28947
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28948
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
28948
28949
|
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");
|
|
28949
28950
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
28950
28951
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -29011,7 +29012,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
29011
29012
|
}
|
|
29012
29013
|
}), "mailRulesOver");
|
|
29013
29014
|
|
|
29014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29015
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
29015
29016
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
29016
29017
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
29017
29018
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -29019,7 +29020,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
29019
29020
|
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);
|
|
29020
29021
|
}, "reviewLink");
|
|
29021
29022
|
|
|
29022
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29023
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
29023
29024
|
function checkMeetingCancelled(signal) {
|
|
29024
29025
|
if (!signal?.aborted)
|
|
29025
29026
|
return;
|
|
@@ -29030,7 +29031,7 @@ function checkMeetingCancelled(signal) {
|
|
|
29030
29031
|
}
|
|
29031
29032
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
29032
29033
|
|
|
29033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
29034
29035
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
29035
29036
|
id: Number(row2.id),
|
|
29036
29037
|
accountId: Number(row2.account_id),
|
|
@@ -29080,7 +29081,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
29080
29081
|
createdAt: Number(row2.created_at)
|
|
29081
29082
|
}), "transcriptRowOf");
|
|
29082
29083
|
|
|
29083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
29084
29085
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
29085
29086
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
29086
29087
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -29247,7 +29248,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
29247
29248
|
}
|
|
29248
29249
|
}), "meetingReadsOver");
|
|
29249
29250
|
|
|
29250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
29251
29252
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
29252
29253
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
29253
29254
|
const params = [input.accountId];
|
|
@@ -29290,7 +29291,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
29290
29291
|
return { clauses, params };
|
|
29291
29292
|
}, "meetingSelectionSql");
|
|
29292
29293
|
|
|
29293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29294
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
29294
29295
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
29295
29296
|
async meetingChatLines(input) {
|
|
29296
29297
|
checkMeetingCancelled(input.signal);
|
|
@@ -29318,7 +29319,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
29318
29319
|
}
|
|
29319
29320
|
}), "meetingChatLinesOver");
|
|
29320
29321
|
|
|
29321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
29322
29323
|
var MESSAGE_FIELDS = {
|
|
29323
29324
|
pk: messages.id,
|
|
29324
29325
|
nativeId: messages.externalId,
|
|
@@ -29489,7 +29490,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
29489
29490
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
29490
29491
|
}), "chatActivity");
|
|
29491
29492
|
|
|
29492
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
29493
29494
|
var HIT_FIELDS = {
|
|
29494
29495
|
...MESSAGE_FIELDS,
|
|
29495
29496
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -29588,7 +29589,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
29588
29589
|
};
|
|
29589
29590
|
}, "directReplies");
|
|
29590
29591
|
|
|
29591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29592
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
29592
29593
|
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");
|
|
29593
29594
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
29594
29595
|
const found2 = identityRow(context, ref3);
|
|
@@ -29719,7 +29720,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
29719
29720
|
}, "mentioning");
|
|
29720
29721
|
var escaped = /* @__PURE__ */ __name((text6) => text6.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
29721
29722
|
|
|
29722
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29723
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
29723
29724
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
29724
29725
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
29725
29726
|
}, "missing");
|
|
@@ -29841,7 +29842,7 @@ function meetingContextLinksOver(context) {
|
|
|
29841
29842
|
}
|
|
29842
29843
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
29843
29844
|
|
|
29844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
29845
29846
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
29846
29847
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
29847
29848
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -29870,7 +29871,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
29870
29871
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
29871
29872
|
}, "indexedText");
|
|
29872
29873
|
|
|
29873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29874
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
29874
29875
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
29875
29876
|
var meetingCurrentIndexRows = `
|
|
29876
29877
|
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
|
|
@@ -29901,7 +29902,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
29901
29902
|
}, "invalidateMeetingStems");
|
|
29902
29903
|
var meetingStemmableText = /* @__PURE__ */ __name((text6) => text6.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
29903
29904
|
|
|
29904
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
29905
29906
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
29906
29907
|
return {
|
|
29907
29908
|
async indexSearch(original) {
|
|
@@ -29969,10 +29970,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
29969
29970
|
}
|
|
29970
29971
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
29971
29972
|
|
|
29972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29973
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
29973
29974
|
import { createHash as createHash5 } from "node:crypto";
|
|
29974
29975
|
|
|
29975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
29976
29977
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
29977
29978
|
const padded = ` ${term} `;
|
|
29978
29979
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -29981,7 +29982,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
29981
29982
|
return [...pieces];
|
|
29982
29983
|
}, "trigrams");
|
|
29983
29984
|
|
|
29984
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29985
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
29985
29986
|
var SHORTEST_CORRECTION = 3;
|
|
29986
29987
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
29987
29988
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -30028,7 +30029,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
30028
30029
|
return corrections;
|
|
30029
30030
|
}, "correctWords");
|
|
30030
30031
|
|
|
30031
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
30032
30033
|
var SHORTEST_GARBLED = 4;
|
|
30033
30034
|
var MOST_WIDENED = 64;
|
|
30034
30035
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -30120,7 +30121,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
30120
30121
|
return found2.map((words3) => words3.sort((a, b) => a.distance - b.distance || b.docs - a.docs || a.term.localeCompare(b.term)).slice(0, MOST_WIDENED).map((word2) => word2.term));
|
|
30121
30122
|
}, "widenWords");
|
|
30122
30123
|
|
|
30123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30124
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
30124
30125
|
import { readFileSync } from "node:fs";
|
|
30125
30126
|
var loaded;
|
|
30126
30127
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -30179,7 +30180,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
30179
30180
|
return false;
|
|
30180
30181
|
}, "knownRussianWord");
|
|
30181
30182
|
|
|
30182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
30183
30184
|
var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
30184
30185
|
var MOST_WORDS = 128;
|
|
30185
30186
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -30406,7 +30407,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text6, stemmer) => {
|
|
|
30406
30407
|
return check3(tree);
|
|
30407
30408
|
}, "matchMeetingText");
|
|
30408
30409
|
|
|
30409
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30410
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
30410
30411
|
var fail3 = /* @__PURE__ */ __name((message2) => {
|
|
30411
30412
|
throw new CliError("validation_error", message2);
|
|
30412
30413
|
}, "fail");
|
|
@@ -30588,7 +30589,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
30588
30589
|
}
|
|
30589
30590
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
30590
30591
|
|
|
30591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30592
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
30592
30593
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30593
30594
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
30594
30595
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -30620,7 +30621,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30620
30621
|
}
|
|
30621
30622
|
}), "meetingLanguagesOver");
|
|
30622
30623
|
|
|
30623
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
30624
30625
|
import { createHash as createHash6 } from "node:crypto";
|
|
30625
30626
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
30626
30627
|
if (value === void 0)
|
|
@@ -30710,7 +30711,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
30710
30711
|
}
|
|
30711
30712
|
}), "meetingParticipantSearchOver");
|
|
30712
30713
|
|
|
30713
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
30714
30715
|
var preparationQueries = {
|
|
30715
30716
|
participants: {
|
|
30716
30717
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -30760,7 +30761,7 @@ var preparationQueries = {
|
|
|
30760
30761
|
}
|
|
30761
30762
|
};
|
|
30762
30763
|
|
|
30763
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30764
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
30764
30765
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30765
30766
|
async preparationContext(original) {
|
|
30766
30767
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -30801,7 +30802,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30801
30802
|
}
|
|
30802
30803
|
}), "meetingPreparationContextOver");
|
|
30803
30804
|
|
|
30804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
30805
30806
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
30806
30807
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
30807
30808
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -30815,7 +30816,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
30815
30816
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
30816
30817
|
)`, "preparationSubjects");
|
|
30817
30818
|
|
|
30818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30819
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
30819
30820
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30820
30821
|
async preparationKnowledge(original) {
|
|
30821
30822
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -30860,7 +30861,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
30860
30861
|
}
|
|
30861
30862
|
}), "meetingPreparationKnowledgeOver");
|
|
30862
30863
|
|
|
30863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
30864
30865
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30865
30866
|
async preparationNotes(original) {
|
|
30866
30867
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -30913,7 +30914,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30913
30914
|
}
|
|
30914
30915
|
}), "meetingPreparationNotesOver");
|
|
30915
30916
|
|
|
30916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
30917
30918
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30918
30919
|
async relatedHistory(original) {
|
|
30919
30920
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -30984,7 +30985,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30984
30985
|
}
|
|
30985
30986
|
}), "meetingRelatedHistoryOver");
|
|
30986
30987
|
|
|
30987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30988
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
30988
30989
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
30989
30990
|
var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
30990
30991
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -31065,7 +31066,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31065
31066
|
}
|
|
31066
31067
|
}), "meetingReviewOver");
|
|
31067
31068
|
|
|
31068
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
31069
31070
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
31070
31071
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
31071
31072
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -31119,7 +31120,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31119
31120
|
}
|
|
31120
31121
|
}), "meetingSeriesHistoryOver");
|
|
31121
31122
|
|
|
31122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
31123
31124
|
var MOST_ROWS = 5e5;
|
|
31124
31125
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
31125
31126
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -31188,7 +31189,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31188
31189
|
}
|
|
31189
31190
|
}), "meetingStatsOver");
|
|
31190
31191
|
|
|
31191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31192
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
31192
31193
|
var CURSOR_KEY = "meetings";
|
|
31193
31194
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
31194
31195
|
id: Number(row2.id),
|
|
@@ -31757,7 +31758,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31757
31758
|
};
|
|
31758
31759
|
}, "meetingStoreOver");
|
|
31759
31760
|
|
|
31760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
31761
31762
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
31762
31763
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
31763
31764
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -31783,7 +31784,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
31783
31784
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
31784
31785
|
}, "release");
|
|
31785
31786
|
|
|
31786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31787
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
31787
31788
|
var THREAD_COLUMNS = {
|
|
31788
31789
|
subject: {
|
|
31789
31790
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -31800,7 +31801,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
31800
31801
|
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);
|
|
31801
31802
|
}, "threadRows");
|
|
31802
31803
|
|
|
31803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
31804
31805
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
31805
31806
|
id: `email:${place.emailId}`,
|
|
31806
31807
|
chatId: place.threadExternalId,
|
|
@@ -32356,7 +32357,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
32356
32357
|
}
|
|
32357
32358
|
}), "mailStoreOver");
|
|
32358
32359
|
|
|
32359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
32360
32361
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
32361
32362
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
32362
32363
|
var folded4 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -32446,7 +32447,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
32446
32447
|
}, "knownWord");
|
|
32447
32448
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
32448
32449
|
|
|
32449
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
32450
32451
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
32451
32452
|
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");
|
|
32452
32453
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -32532,7 +32533,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
32532
32533
|
return found2;
|
|
32533
32534
|
}, "spokenTranscripts");
|
|
32534
32535
|
|
|
32535
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
32536
32537
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
32537
32538
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
32538
32539
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -32579,7 +32580,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
32579
32580
|
});
|
|
32580
32581
|
}, "placeHits");
|
|
32581
32582
|
|
|
32582
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32583
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
32583
32584
|
var GROUPS = {
|
|
32584
32585
|
chat: {
|
|
32585
32586
|
key: "m.chat_id",
|
|
@@ -32601,7 +32602,7 @@ var GROUPS = {
|
|
|
32601
32602
|
}
|
|
32602
32603
|
};
|
|
32603
32604
|
|
|
32604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32605
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
32605
32606
|
var MESSAGES2 = {
|
|
32606
32607
|
rows: "messages",
|
|
32607
32608
|
threads: "chats",
|
|
@@ -33084,7 +33085,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
33084
33085
|
};
|
|
33085
33086
|
}, "runCompiled");
|
|
33086
33087
|
|
|
33087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
33088
33089
|
function invalidMetadata() {
|
|
33089
33090
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
33090
33091
|
}
|
|
@@ -33186,7 +33187,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
33186
33187
|
};
|
|
33187
33188
|
}), "counterTargets");
|
|
33188
33189
|
|
|
33189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33190
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
33190
33191
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind4) => `'${kind4}'`).join(",");
|
|
33191
33192
|
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,
|
|
33192
33193
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -33305,7 +33306,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
33305
33306
|
}));
|
|
33306
33307
|
}, "attachmentViews");
|
|
33307
33308
|
|
|
33308
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
33309
33310
|
var transcript = /* @__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");
|
|
33310
33311
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text6, source2) => {
|
|
33311
33312
|
const { orm, database, now: now2 } = context;
|
|
@@ -33343,7 +33344,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
33343
33344
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
33344
33345
|
}, "intoVoiceAttachment");
|
|
33345
33346
|
|
|
33346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
33347
33348
|
var FIELDS = [
|
|
33348
33349
|
"threadExternalId",
|
|
33349
33350
|
"senderIdentityId",
|
|
@@ -33660,7 +33661,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
33660
33661
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
33661
33662
|
}, "writeDerivedReactions");
|
|
33662
33663
|
|
|
33663
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33664
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
33664
33665
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
33665
33666
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
33666
33667
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -33681,7 +33682,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
33681
33682
|
};
|
|
33682
33683
|
}, "keysOver");
|
|
33683
33684
|
|
|
33684
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33685
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
33685
33686
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
33686
33687
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
33687
33688
|
if (!row2)
|
|
@@ -33716,7 +33717,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
33716
33717
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
33717
33718
|
}, "saveProfile");
|
|
33718
33719
|
|
|
33719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
33720
33721
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
33721
33722
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
33722
33723
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -33773,7 +33774,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
33773
33774
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
33774
33775
|
}, "proposedBySql");
|
|
33775
33776
|
|
|
33776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
33777
33778
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
33778
33779
|
const owner = ownerPerson(context.database).id;
|
|
33779
33780
|
const strays = context.database.prepare("SELECT DISTINCT l.person_id AS person FROM identity_links l JOIN identities i ON i.id = l.identity_id JOIN accounts a ON a.provider = i.provider AND a.external_id = i.external_id WHERE l.person_id <> ?").all(owner);
|
|
@@ -33794,7 +33795,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
33794
33795
|
return personOf(context, ref3);
|
|
33795
33796
|
}, "linkToOwner");
|
|
33796
33797
|
|
|
33797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33798
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
33798
33799
|
var PROVIDERS_SETTING = "providers";
|
|
33799
33800
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
33800
33801
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -33829,7 +33830,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
33829
33830
|
});
|
|
33830
33831
|
}, "registerProvider");
|
|
33831
33832
|
|
|
33832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33833
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
33833
33834
|
var DAY3 = 864e5;
|
|
33834
33835
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
33835
33836
|
var TEXT_LIMIT = 20;
|
|
@@ -34028,7 +34029,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
34028
34029
|
};
|
|
34029
34030
|
}, "taskSimilarityOver");
|
|
34030
34031
|
|
|
34031
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
34032
34033
|
var SETTING3 = "taskCategories";
|
|
34033
34034
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
34034
34035
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -34047,7 +34048,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
34047
34048
|
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);
|
|
34048
34049
|
}, "saveTaskCategories");
|
|
34049
34050
|
|
|
34050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
34051
34052
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
34052
34053
|
var ALLOWED = "taskAgentClose";
|
|
34053
34054
|
var MIN = "taskAgentCloseMin";
|
|
@@ -34103,10 +34104,10 @@ var SUGGESTION_COLUMNS = [
|
|
|
34103
34104
|
];
|
|
34104
34105
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
34105
34106
|
|
|
34106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
34107
34108
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
34108
34109
|
|
|
34109
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
34110
34111
|
var TASK_CLOSE_KIND = "task_close";
|
|
34111
34112
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
34112
34113
|
var isOwnerOnlyKind = /* @__PURE__ */ __name((kind4) => kind4 === MAIL_FINDINGS_KIND || kind4 === MEETING_FINDINGS_KIND || kind4 === TASK_CLOSE_KIND, "isOwnerOnlyKind");
|
|
@@ -34154,7 +34155,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
34154
34155
|
}, "assertMayDecide");
|
|
34155
34156
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
34156
34157
|
|
|
34157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/deals.js
|
|
34158
34159
|
var DEAL_KINDS = ["deal", "lead"];
|
|
34159
34160
|
var DEAL_STATUSES = ["open", "won", "lost"];
|
|
34160
34161
|
var STAGE_OUTCOMES = DEAL_STATUSES;
|
|
@@ -34164,7 +34165,7 @@ var dealLine = /* @__PURE__ */ __name((deal) => {
|
|
|
34164
34165
|
return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
|
|
34165
34166
|
}, "dealLine");
|
|
34166
34167
|
|
|
34167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34168
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
34168
34169
|
var PROFILE_PLACEHOLDER = "<profile>";
|
|
34169
34170
|
var oneLine = /* @__PURE__ */ __name((text6) => singleLine(text6.replace(/\s+/g, " ").trim()), "oneLine");
|
|
34170
34171
|
var openKind = /* @__PURE__ */ __name((kind4) => kind4 === "email" ? "message" : kind4 === "email_thread" ? "chat" : kind4 === "unknown" ? void 0 : kind4, "openKind");
|
|
@@ -34220,7 +34221,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
|
|
|
34220
34221
|
return `${WORDS2[summary.kind]} ${named3}${notes2 === "" ? "" : ` (${notes2})`}`;
|
|
34221
34222
|
}, "refLabel");
|
|
34222
34223
|
|
|
34223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34224
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
34224
34225
|
var EXCERPT_CHARS = 280;
|
|
34225
34226
|
var TITLE_CHARS = 120;
|
|
34226
34227
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -34593,7 +34594,7 @@ var refReadsOf = /* @__PURE__ */ __name((database, texts2, { excerpt = false } =
|
|
|
34593
34594
|
var summaryOf2 = /* @__PURE__ */ __name(({ sender, excerpt, ...summary }, withExcerpt) => withExcerpt ? { ...summary, excerpt } : summary, "summaryOf");
|
|
34594
34595
|
var refSummariesOf = /* @__PURE__ */ __name((database, texts2, options = {}) => new Map([...refReadsOf(database, texts2, options)].map(([text6, read2]) => [text6, summaryOf2(read2, options.excerpt === true)])), "refSummariesOf");
|
|
34595
34596
|
|
|
34596
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34597
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
34597
34598
|
var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
|
|
34598
34599
|
ref: ref3,
|
|
34599
34600
|
kind: read2.kind,
|
|
@@ -34629,7 +34630,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
34629
34630
|
});
|
|
34630
34631
|
}, "evidenceSourcesOf");
|
|
34631
34632
|
|
|
34632
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
34633
34634
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
34634
34635
|
var MAX_TEXT_CHARS = 2e6;
|
|
34635
34636
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -34655,7 +34656,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
34655
34656
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
34656
34657
|
}, "pdfPreviewLimits");
|
|
34657
34658
|
|
|
34658
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
34659
34660
|
import { randomBytes } from "node:crypto";
|
|
34660
34661
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
34661
34662
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -34668,7 +34669,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
34668
34669
|
return time3 + random;
|
|
34669
34670
|
}, "ulid");
|
|
34670
34671
|
|
|
34671
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34672
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
34672
34673
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
34673
34674
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
34674
34675
|
if (!meta && !sections?.length)
|
|
@@ -34689,7 +34690,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
34689
34690
|
return typeof language === "string" && language !== "" ? language : null;
|
|
34690
34691
|
}, "languageOf");
|
|
34691
34692
|
|
|
34692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34693
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
34693
34694
|
var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
34694
34695
|
var objectOf2 = /* @__PURE__ */ __name((value) => {
|
|
34695
34696
|
if (isObject(value))
|
|
@@ -34932,7 +34933,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
34932
34933
|
};
|
|
34933
34934
|
}, "filesStoreOver");
|
|
34934
34935
|
|
|
34935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
34936
34937
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
34937
34938
|
entity: "document",
|
|
34938
34939
|
backend: "sql",
|
|
@@ -34978,7 +34979,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
34978
34979
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
34979
34980
|
}, "importedDocumentWhere");
|
|
34980
34981
|
|
|
34981
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34982
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
34982
34983
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
34983
34984
|
var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
34984
34985
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
|
|
@@ -35504,7 +35505,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35504
35505
|
};
|
|
35505
35506
|
}, "notesStoreOver");
|
|
35506
35507
|
|
|
35507
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
35508
35509
|
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";
|
|
35509
35510
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
35510
35511
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -35726,7 +35727,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35726
35727
|
};
|
|
35727
35728
|
}, "memoriesStoreOver");
|
|
35728
35729
|
|
|
35729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
35730
35731
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
35731
35732
|
var KEY = "taskFirstPassPerChat";
|
|
35732
35733
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -35746,7 +35747,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
35746
35747
|
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);
|
|
35747
35748
|
}, "saveFirstPassPerChat");
|
|
35748
35749
|
|
|
35749
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
35750
35751
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
35751
35752
|
var EXTERNAL_ID_CHARS = 200;
|
|
35752
35753
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -35773,7 +35774,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
35773
35774
|
return text6;
|
|
35774
35775
|
}, "sourceUrlOf");
|
|
35775
35776
|
|
|
35776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
35777
35778
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
35778
35779
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
35779
35780
|
name,
|
|
@@ -35996,7 +35997,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
35996
35997
|
return root === void 0 ? void 0 : { ...query, root };
|
|
35997
35998
|
}, "withoutField");
|
|
35998
35999
|
|
|
35999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
36000
36001
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
36001
36002
|
if (row2.author_type == null)
|
|
36002
36003
|
return null;
|
|
@@ -36024,7 +36025,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
36024
36025
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
36025
36026
|
}, "addComment");
|
|
36026
36027
|
|
|
36027
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36028
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
36028
36029
|
var TASK_RELATION_KINDS = [
|
|
36029
36030
|
"blocked-by",
|
|
36030
36031
|
"follow-up-of",
|
|
@@ -36154,7 +36155,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
36154
36155
|
};
|
|
36155
36156
|
}, "taskRelationsStoreOver");
|
|
36156
36157
|
|
|
36157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
36158
36159
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
36159
36160
|
var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
36160
36161
|
var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind4, changes, at) => {
|
|
@@ -36683,7 +36684,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
36683
36684
|
};
|
|
36684
36685
|
}, "workTasksOver");
|
|
36685
36686
|
|
|
36686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36687
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
36687
36688
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
36688
36689
|
const { database, now: now2 } = context;
|
|
36689
36690
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -36732,7 +36733,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
36732
36733
|
};
|
|
36733
36734
|
}, "taskCloseOver");
|
|
36734
36735
|
|
|
36735
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36736
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
36736
36737
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
36737
36738
|
const { database, now: now2 } = context;
|
|
36738
36739
|
const required3 = /* @__PURE__ */ __name((id2) => {
|
|
@@ -36950,7 +36951,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
36950
36951
|
};
|
|
36951
36952
|
}, "taskPairsOver");
|
|
36952
36953
|
|
|
36953
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36954
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
36954
36955
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
36955
36956
|
var TASK_STATS_SQL = {
|
|
36956
36957
|
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 ? BOARD_SCOPE : ACCOUNT_SCOPE}${filter} ORDER BY t.created_at, t.id`, "rows"),
|
|
@@ -36989,7 +36990,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
36989
36990
|
}, "statNames")
|
|
36990
36991
|
}), "taskStatsOver");
|
|
36991
36992
|
|
|
36992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
36993
36994
|
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";
|
|
36994
36995
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
36995
36996
|
const key2 = inboxKey(account);
|
|
@@ -37196,7 +37197,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
37196
37197
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
37197
37198
|
}, "oneOf");
|
|
37198
37199
|
|
|
37199
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
37200
37201
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
37201
37202
|
const { database } = context;
|
|
37202
37203
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -37241,7 +37242,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
37241
37242
|
};
|
|
37242
37243
|
}, "accountsStoreOver");
|
|
37243
37244
|
|
|
37244
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37245
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
37245
37246
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
37246
37247
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
37247
37248
|
const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -37265,7 +37266,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
37265
37266
|
})), "keepDownloads");
|
|
37266
37267
|
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");
|
|
37267
37268
|
|
|
37268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
37269
37270
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
37270
37271
|
const { database } = context;
|
|
37271
37272
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -37322,7 +37323,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
37322
37323
|
}, "keepAttachmentText")
|
|
37323
37324
|
}), "attachmentsStoreOver");
|
|
37324
37325
|
|
|
37325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
37326
37327
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
37327
37328
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
37328
37329
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -37502,7 +37503,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
37502
37503
|
return done;
|
|
37503
37504
|
}, "rekeyChats");
|
|
37504
37505
|
|
|
37505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
37506
37507
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
37507
37508
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
37508
37509
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -37560,7 +37561,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
37560
37561
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
37561
37562
|
}, "chatCoverage");
|
|
37562
37563
|
|
|
37563
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37564
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
37564
37565
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
37565
37566
|
const { database } = context;
|
|
37566
37567
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -37695,7 +37696,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37695
37696
|
};
|
|
37696
37697
|
}, "chatsStoreOver");
|
|
37697
37698
|
|
|
37698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37699
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
37699
37700
|
import { createHash as createHash7 } from "node:crypto";
|
|
37700
37701
|
var BATCH_CONTEXT = 50;
|
|
37701
37702
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -37833,7 +37834,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
37833
37834
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
37834
37835
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
37835
37836
|
|
|
37836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
37837
37838
|
import { setTimeout } from "node:timers/promises";
|
|
37838
37839
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
37839
37840
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -38145,7 +38146,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
38145
38146
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
38146
38147
|
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");
|
|
38147
38148
|
|
|
38148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
38149
38150
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
38150
38151
|
const { database } = context;
|
|
38151
38152
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -38252,7 +38253,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
38252
38253
|
};
|
|
38253
38254
|
}, "conversationsStoreOver");
|
|
38254
38255
|
|
|
38255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
38256
38257
|
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";
|
|
38257
38258
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
38258
38259
|
const { database } = context;
|
|
@@ -38277,7 +38278,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
38277
38278
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
38278
38279
|
}), "countersStoreOver");
|
|
38279
38280
|
|
|
38280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
38281
38282
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
38282
38283
|
var MENTION_QUERY = defineQuery({
|
|
38283
38284
|
entity: "mention",
|
|
@@ -38493,7 +38494,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
38493
38494
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
38494
38495
|
}, "listPlaces");
|
|
38495
38496
|
|
|
38496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38497
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
38497
38498
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
38498
38499
|
const { database } = context;
|
|
38499
38500
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -38528,7 +38529,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
38528
38529
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
38529
38530
|
}), "mentionsStoreOver");
|
|
38530
38531
|
|
|
38531
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38532
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
38532
38533
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
38533
38534
|
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");
|
|
38534
38535
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -38543,7 +38544,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
38543
38544
|
}));
|
|
38544
38545
|
}, "documentLinkMessages");
|
|
38545
38546
|
|
|
38546
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
38547
38548
|
var stemmerFor = stemmerCache();
|
|
38548
38549
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
38549
38550
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -38587,7 +38588,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
38587
38588
|
});
|
|
38588
38589
|
}, "laterSharingRare");
|
|
38589
38590
|
|
|
38590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
38591
38592
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
38592
38593
|
const { database } = context;
|
|
38593
38594
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -38722,7 +38723,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
38722
38723
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
38723
38724
|
}), "messagesStoreOver");
|
|
38724
38725
|
|
|
38725
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
38726
38727
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
38727
38728
|
var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
38728
38729
|
var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -38779,7 +38780,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
|
|
|
38779
38780
|
});
|
|
38780
38781
|
}, "personPreparation");
|
|
38781
38782
|
|
|
38782
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
38783
38784
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
38784
38785
|
const id2 = Number(uid);
|
|
38785
38786
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -38787,7 +38788,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
38787
38788
|
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(id2, JSON.stringify(accountIds)));
|
|
38788
38789
|
}, "personSeenInAccounts");
|
|
38789
38790
|
|
|
38790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
38791
38792
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
38792
38793
|
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);
|
|
38793
38794
|
if (!row2)
|
|
@@ -38853,7 +38854,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
38853
38854
|
return { id: id2, personId, removed: true };
|
|
38854
38855
|
}, "removeNote");
|
|
38855
38856
|
|
|
38856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38857
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
38857
38858
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
38858
38859
|
const { database } = context;
|
|
38859
38860
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -38938,13 +38939,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
38938
38939
|
};
|
|
38939
38940
|
}, "peopleStoreOver");
|
|
38940
38941
|
|
|
38941
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
38942
38943
|
import { createHash as createHash9 } from "node:crypto";
|
|
38943
38944
|
|
|
38944
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38945
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
38945
38946
|
import { createHash as createHash8 } from "node:crypto";
|
|
38946
38947
|
|
|
38947
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38948
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
38948
38949
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
38949
38950
|
var AUTHOR_MEASURES = [
|
|
38950
38951
|
"messages",
|
|
@@ -39084,7 +39085,7 @@ var withoutUrls = /* @__PURE__ */ __name((text6) => text6.replace(/\S+/gu, (toke
|
|
|
39084
39085
|
var rankingWords = /* @__PURE__ */ __name((text6) => withoutUrls(text6).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
39085
39086
|
var rankingQuestion = /* @__PURE__ */ __name((text6) => withoutUrls(text6).includes("?"), "rankingQuestion");
|
|
39086
39087
|
|
|
39087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
39088
39089
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
39089
39090
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
39090
39091
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -39306,7 +39307,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
39306
39307
|
};
|
|
39307
39308
|
}, "rankReplyGraph");
|
|
39308
39309
|
|
|
39309
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39310
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
39310
39311
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
39311
39312
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
39312
39313
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -39480,7 +39481,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
39480
39481
|
return { items, evidence, summary, graph: graph.quality };
|
|
39481
39482
|
}, "calculateAdminStatistics");
|
|
39482
39483
|
|
|
39483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39484
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
39484
39485
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
39485
39486
|
const dates = [];
|
|
39486
39487
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -39502,7 +39503,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
39502
39503
|
return dates[0].node.resolution.date;
|
|
39503
39504
|
}, "rankingContextRange");
|
|
39504
39505
|
|
|
39505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
39506
39507
|
var reactionCounts = /* @__PURE__ */ __name((stored3) => {
|
|
39507
39508
|
let counts;
|
|
39508
39509
|
try {
|
|
@@ -39797,7 +39798,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
39797
39798
|
});
|
|
39798
39799
|
}, "rankQuery");
|
|
39799
39800
|
|
|
39800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
39801
39802
|
function fail4(message2, reason = "query.too-large") {
|
|
39802
39803
|
throw new CliError("validation_error", message2, { reason, complete: false });
|
|
39803
39804
|
}
|
|
@@ -39974,7 +39975,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
39974
39975
|
return result;
|
|
39975
39976
|
}), "adminStatisticsQuery");
|
|
39976
39977
|
|
|
39977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
39978
39979
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
39979
39980
|
if (!execution.accounts.length)
|
|
39980
39981
|
return { conversations: [], chats: [] };
|
|
@@ -39992,7 +39993,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
39992
39993
|
return { conversations: conversations2, chats: chats2 };
|
|
39993
39994
|
}, "conversationEligibility");
|
|
39994
39995
|
|
|
39995
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
39996
39997
|
import { createHash as createHash10 } from "node:crypto";
|
|
39997
39998
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
39998
39999
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -40142,7 +40143,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
40142
40143
|
return result;
|
|
40143
40144
|
}, "rankingEvidence");
|
|
40144
40145
|
|
|
40145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
40146
40147
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
40147
40148
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2) => {
|
|
40148
40149
|
const params = [...scope3.accounts.flatMap(({ provider, account }) => [provider, account]), ...kinds2];
|
|
@@ -40236,7 +40237,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
40236
40237
|
});
|
|
40237
40238
|
}, "waitingChats");
|
|
40238
40239
|
|
|
40239
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40240
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
40240
40241
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
40241
40242
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
40242
40243
|
if (execution.corpus === "mail")
|
|
@@ -40257,7 +40258,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
40257
40258
|
};
|
|
40258
40259
|
}, "queriesStoreOver");
|
|
40259
40260
|
|
|
40260
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
40261
40262
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
40262
40263
|
const { database, now: now2 } = context;
|
|
40263
40264
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -40296,10 +40297,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
40296
40297
|
}));
|
|
40297
40298
|
}, "chatEventsOf");
|
|
40298
40299
|
|
|
40299
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40300
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
40300
40301
|
import { createHash as createHash11 } from "node:crypto";
|
|
40301
40302
|
|
|
40302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
40303
40304
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
40304
40305
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
40305
40306
|
timeZone: zone,
|
|
@@ -40319,7 +40320,7 @@ var weekKey = /* @__PURE__ */ __name((day) => {
|
|
|
40319
40320
|
return date3.toISOString().slice(0, 10);
|
|
40320
40321
|
}, "weekKey");
|
|
40321
40322
|
|
|
40322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40323
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
40323
40324
|
var RETENTION_TOLERANCE = 864e5;
|
|
40324
40325
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
40325
40326
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -40373,7 +40374,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
40373
40374
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
40374
40375
|
}, "retentionCohorts");
|
|
40375
40376
|
|
|
40376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
40377
40378
|
var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
40378
40379
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
40379
40380
|
validateRetentionOptions(options);
|
|
@@ -40504,7 +40505,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
40504
40505
|
};
|
|
40505
40506
|
}, "retentionQuery");
|
|
40506
40507
|
|
|
40507
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
40508
40509
|
var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
40509
40510
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
40510
40511
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -40635,7 +40636,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
40635
40636
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
40636
40637
|
})), "trackedChats");
|
|
40637
40638
|
|
|
40638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
40639
40640
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
40640
40641
|
const { database } = context;
|
|
40641
40642
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -40691,7 +40692,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
40691
40692
|
};
|
|
40692
40693
|
}, "rosterStoreOver");
|
|
40693
40694
|
|
|
40694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
40695
40696
|
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");
|
|
40696
40697
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
40697
40698
|
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 ?`);
|
|
@@ -40715,7 +40716,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
40715
40716
|
}
|
|
40716
40717
|
}, "backfillNormalized");
|
|
40717
40718
|
|
|
40718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40719
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
40719
40720
|
var INDEX2 = "message_words";
|
|
40720
40721
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
40721
40722
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -40842,7 +40843,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
40842
40843
|
});
|
|
40843
40844
|
}, "resetSearchIndex");
|
|
40844
40845
|
|
|
40845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
40846
40847
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
40847
40848
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
40848
40849
|
const before2 = stemsState(database);
|
|
@@ -40937,7 +40938,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
40937
40938
|
return resetStems(database, { now: now2 });
|
|
40938
40939
|
}, "followDefaultStemmers");
|
|
40939
40940
|
|
|
40940
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40941
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
40941
40942
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
40942
40943
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
40943
40944
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -40959,7 +40960,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
40959
40960
|
});
|
|
40960
40961
|
}, "termCandidates");
|
|
40961
40962
|
|
|
40962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
40963
40964
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
40964
40965
|
const { database } = context;
|
|
40965
40966
|
const stemmerFor2 = stemmerCache();
|
|
@@ -40981,7 +40982,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
40981
40982
|
};
|
|
40982
40983
|
}, "searchIndexStoreOver");
|
|
40983
40984
|
|
|
40984
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40985
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
40985
40986
|
var HISTORY_KEPT = 1e3;
|
|
40986
40987
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
40987
40988
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -41050,7 +41051,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
41050
41051
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
41051
41052
|
}, "clearHistory");
|
|
41052
41053
|
|
|
41053
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41054
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
41054
41055
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
41055
41056
|
const { database } = context;
|
|
41056
41057
|
return {
|
|
@@ -41074,7 +41075,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
41074
41075
|
};
|
|
41075
41076
|
}, "searchesStoreOver");
|
|
41076
41077
|
|
|
41077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
41078
41079
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
41079
41080
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
41080
41081
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -41117,7 +41118,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
41117
41118
|
};
|
|
41118
41119
|
}, "agentActionsStoreOver");
|
|
41119
41120
|
|
|
41120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
41121
41122
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
41122
41123
|
}) => {
|
|
41123
41124
|
const { database, now: now2 } = context;
|
|
@@ -41176,7 +41177,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
41176
41177
|
};
|
|
41177
41178
|
}, "botUpdateStoreOver");
|
|
41178
41179
|
|
|
41179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41180
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
41180
41181
|
var DAY4 = 864e5;
|
|
41181
41182
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
41182
41183
|
if (filter.accountIds !== void 0 && filter.accountId !== void 0)
|
|
@@ -41285,7 +41286,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
41285
41286
|
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);
|
|
41286
41287
|
}, "listEvents");
|
|
41287
41288
|
|
|
41288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
41289
41290
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
41290
41291
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
41291
41292
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -41340,7 +41341,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
41340
41341
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
41341
41342
|
}, "forgetCalendarRows");
|
|
41342
41343
|
|
|
41343
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
41344
41345
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
41345
41346
|
id: Number(row2.id),
|
|
41346
41347
|
accountId: Number(row2.account_id),
|
|
@@ -41927,7 +41928,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
41927
41928
|
};
|
|
41928
41929
|
}, "eventStoreOver");
|
|
41929
41930
|
|
|
41930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
41931
41932
|
var CATALOG_QUERY = defineQuery({
|
|
41932
41933
|
entity: "document",
|
|
41933
41934
|
backend: "sql",
|
|
@@ -42169,7 +42170,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
42169
42170
|
};
|
|
42170
42171
|
}, "catalogStoreOver");
|
|
42171
42172
|
|
|
42172
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42173
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
42173
42174
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
42174
42175
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
42175
42176
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -42182,7 +42183,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
42182
42183
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
42183
42184
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
42184
42185
|
|
|
42185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
42186
42187
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
42187
42188
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
42188
42189
|
signal?.throwIfAborted();
|
|
@@ -42281,7 +42282,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
42281
42282
|
});
|
|
42282
42283
|
}, "readMeetingContextEvidence");
|
|
42283
42284
|
|
|
42284
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42285
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
42285
42286
|
var corpora = {
|
|
42286
42287
|
message: {
|
|
42287
42288
|
table: "messages",
|
|
@@ -42520,7 +42521,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
42520
42521
|
}
|
|
42521
42522
|
}), "contextRecordsOver");
|
|
42522
42523
|
|
|
42523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42524
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
42524
42525
|
var refuse = /* @__PURE__ */ __name((message2, reason, code = "validation_error") => {
|
|
42525
42526
|
throw new CliError(code, message2, { reason });
|
|
42526
42527
|
}, "refuse");
|
|
@@ -42981,7 +42982,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42981
42982
|
};
|
|
42982
42983
|
}, "financeStoreOver");
|
|
42983
42984
|
|
|
42984
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42985
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
42985
42986
|
var TABLES = { deal: "deals", lead: "leads" };
|
|
42986
42987
|
var itemsSql = /* @__PURE__ */ __name((kind4) => `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 FROM ${TABLES[kind4]} 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`, "itemsSql");
|
|
42987
42988
|
var MAX_STAGES = 30;
|
|
@@ -43250,6 +43251,18 @@ var dealOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
43250
43251
|
const limit = Math.min(Math.max(filter.limit ?? 100, 1), 500);
|
|
43251
43252
|
return database.prepare(`${itemsSql(kind4)} WHERE d.deleted_at IS NULL AND (? IS NULL OR d.status = ?) AND (? IS NULL OR d.project_id = ?) AND (? IS NULL OR s.name_folded = ?) AND (? IS NULL OR p.id = ?) AND (? IS NULL OR d.organization_id = ?) AND ${by.sql} ORDER BY d.created_at DESC, d.id DESC LIMIT ?`).all(status, status, project2, project2, stage, stage, pipeline, pipeline, organization2?.id ?? null, organization2?.id ?? null, ...by.params, limit).map(itemOf(kind4));
|
|
43252
43253
|
}, "list"),
|
|
43254
|
+
find: /* @__PURE__ */ __name(({ words: words3, anyWord, accounts: accounts2, limit }) => {
|
|
43255
|
+
const wanted = [...new Set(words3.map((word2) => fold(word2).trim()).filter(Boolean))];
|
|
43256
|
+
if (!wanted.length)
|
|
43257
|
+
return [];
|
|
43258
|
+
const most2 = Math.min(Math.max(limit ?? 100, 1), 500);
|
|
43259
|
+
const within = accounts2?.map(({ provider, account }) => `${provider}\0${account}`);
|
|
43260
|
+
const found2 = DEAL_KINDS.flatMap((kind4) => database.prepare(`SELECT d.id, d.title, d.updated_at, a.provider, a.external_id AS account FROM ${TABLES[kind4]} d LEFT JOIN accounts a ON a.id = d.account_id WHERE d.deleted_at IS NULL`).all().filter((row2) => within === void 0 || within.includes(`${row2.provider}\0${row2.account}`)).map((row2) => {
|
|
43261
|
+
const title = fold(String(row2.title));
|
|
43262
|
+
return { kind: kind4, row: row2, score: wanted.filter((word2) => title.includes(word2)).length };
|
|
43263
|
+
}).filter(({ score }) => anyWord ? score > 0 : score === wanted.length));
|
|
43264
|
+
return found2.sort((a, b) => b.score - a.score || Number(b.row.updated_at) - Number(a.row.updated_at) || Number(b.row.id) - Number(a.row.id)).slice(0, most2).map(({ kind: kind4, row: row2 }) => read2(`${kind4}:${row2.id}`));
|
|
43265
|
+
}, "find"),
|
|
43253
43266
|
move: /* @__PURE__ */ __name((reference2, { stage, by }) => {
|
|
43254
43267
|
authorActor(context, by);
|
|
43255
43268
|
const { kind: kind4, row: row2 } = rowOf2(reference2);
|
|
@@ -43284,12 +43297,13 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43284
43297
|
add: /* @__PURE__ */ __name(async (input) => operations.add(input), "add"),
|
|
43285
43298
|
get: /* @__PURE__ */ __name(async (reference2) => operations.get(reference2), "get"),
|
|
43286
43299
|
list: /* @__PURE__ */ __name(async (filter) => operations.list(filter), "list"),
|
|
43300
|
+
find: /* @__PURE__ */ __name(async (search2) => operations.find(search2), "find"),
|
|
43287
43301
|
move: /* @__PURE__ */ __name(async (reference2, input) => operations.move(reference2, input), "move"),
|
|
43288
43302
|
close: /* @__PURE__ */ __name(async (reference2, input) => operations.close(reference2, input), "close")
|
|
43289
43303
|
};
|
|
43290
43304
|
}, "dealsStoreOver");
|
|
43291
43305
|
|
|
43292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
43293
43307
|
var NOTE_FIELDS = [
|
|
43294
43308
|
"text",
|
|
43295
43309
|
"exact",
|
|
@@ -43719,7 +43733,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
43719
43733
|
};
|
|
43720
43734
|
}, "noteSearchOver");
|
|
43721
43735
|
|
|
43722
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43736
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
43723
43737
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
43724
43738
|
var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
43725
43739
|
var EVENT_CORPUS = {
|
|
@@ -43851,7 +43865,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
43851
43865
|
};
|
|
43852
43866
|
}, "eventSearchOver");
|
|
43853
43867
|
|
|
43854
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43868
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
43855
43869
|
var refuse2 = /* @__PURE__ */ __name((message2, reason) => {
|
|
43856
43870
|
throw new CliError("validation_error", message2, { reason });
|
|
43857
43871
|
}, "refuse");
|
|
@@ -43929,7 +43943,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
43929
43943
|
};
|
|
43930
43944
|
}, "paymentEntriesOver");
|
|
43931
43945
|
|
|
43932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
43933
43947
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
43934
43948
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
43935
43949
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -43955,7 +43969,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
43955
43969
|
return valid;
|
|
43956
43970
|
}, "validateEvidenceFindings");
|
|
43957
43971
|
|
|
43958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
43959
43973
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
43960
43974
|
try {
|
|
43961
43975
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -43967,7 +43981,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
43967
43981
|
}
|
|
43968
43982
|
}, "calendarMoment");
|
|
43969
43983
|
|
|
43970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43984
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
43971
43985
|
var NAMED3 = "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";
|
|
43972
43986
|
var iso10 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
43973
43987
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -44176,7 +44190,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
44176
44190
|
};
|
|
44177
44191
|
}, "factsStoreOver");
|
|
44178
44192
|
|
|
44179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
44180
44194
|
var invalid4 = /* @__PURE__ */ __name((message2) => {
|
|
44181
44195
|
throw new CliError("validation_error", message2);
|
|
44182
44196
|
}, "invalid");
|
|
@@ -44280,7 +44294,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind4) => {
|
|
|
44280
44294
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes, create };
|
|
44281
44295
|
}, "findingsCoreOver");
|
|
44282
44296
|
|
|
44283
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
44284
44298
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
44285
44299
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
44286
44300
|
var iso11 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -44445,7 +44459,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
44445
44459
|
};
|
|
44446
44460
|
}, "proposedActionsStoreOver");
|
|
44447
44461
|
|
|
44448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44462
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
44449
44463
|
var stale = /* @__PURE__ */ __name(() => {
|
|
44450
44464
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
44451
44465
|
reason: "evidence-findings.stale"
|
|
@@ -44626,7 +44640,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
44626
44640
|
};
|
|
44627
44641
|
}, "evidenceFindingsStoreOver");
|
|
44628
44642
|
|
|
44629
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
44630
44644
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
44631
44645
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
44632
44646
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -44679,7 +44693,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
44679
44693
|
}, "forPerson")
|
|
44680
44694
|
}), "involvementStoreOver");
|
|
44681
44695
|
|
|
44682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44696
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
44683
44697
|
import { createHash as createHash12 } from "node:crypto";
|
|
44684
44698
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
44685
44699
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -44765,7 +44779,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
44765
44779
|
};
|
|
44766
44780
|
}, "meetingProjectsStoreOver");
|
|
44767
44781
|
|
|
44768
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44782
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
44769
44783
|
var ORGANIZATIONS_QUERY = {
|
|
44770
44784
|
entity: "organization",
|
|
44771
44785
|
backend: "sql",
|
|
@@ -44806,7 +44820,7 @@ var REMINDERS_QUERY = {
|
|
|
44806
44820
|
})
|
|
44807
44821
|
};
|
|
44808
44822
|
|
|
44809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44823
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
44810
44824
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
44811
44825
|
id: String(row2.id),
|
|
44812
44826
|
ref: `organization:${row2.id}`,
|
|
@@ -44839,7 +44853,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
44839
44853
|
}), "updateOrganization")
|
|
44840
44854
|
}), "organizationsStoreOver");
|
|
44841
44855
|
|
|
44842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
44843
44857
|
var relationOf = /* @__PURE__ */ __name((link3) => ({
|
|
44844
44858
|
id: link3.id,
|
|
44845
44859
|
from: link3.from,
|
|
@@ -45065,16 +45079,16 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
45065
45079
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
45066
45080
|
}, "decidedOrigin");
|
|
45067
45081
|
|
|
45068
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45082
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
45069
45083
|
import { createHash as createHash15 } from "node:crypto";
|
|
45070
45084
|
|
|
45071
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45085
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
45072
45086
|
import { createHash as createHash14 } from "node:crypto";
|
|
45073
45087
|
|
|
45074
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
45075
45089
|
import { createHash as createHash13 } from "node:crypto";
|
|
45076
45090
|
|
|
45077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45091
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
45078
45092
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
45079
45093
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
45080
45094
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -45125,7 +45139,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
45125
45139
|
return input;
|
|
45126
45140
|
}, "consolidationApplyInput");
|
|
45127
45141
|
|
|
45128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
45129
45143
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
45130
45144
|
id: String(row2.id),
|
|
45131
45145
|
sourceId: String(row2.source_id),
|
|
@@ -45200,7 +45214,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
45200
45214
|
}, { beforeCommit: check3 });
|
|
45201
45215
|
}, "applyTagConsolidation");
|
|
45202
45216
|
|
|
45203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
45204
45218
|
var selections = [
|
|
45205
45219
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
45206
45220
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -45344,7 +45358,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
45344
45358
|
};
|
|
45345
45359
|
}, "previewRows");
|
|
45346
45360
|
|
|
45347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
45348
45362
|
var kinds = ["project", "tag", "topic"];
|
|
45349
45363
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
45350
45364
|
if (signal?.aborted)
|
|
@@ -45608,7 +45622,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45608
45622
|
};
|
|
45609
45623
|
}, "vocabularyStoreOver");
|
|
45610
45624
|
|
|
45611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
45612
45626
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
45613
45627
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
45614
45628
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -46149,7 +46163,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
46149
46163
|
return key2.padEnd(3, "X");
|
|
46150
46164
|
}, "projectKey");
|
|
46151
46165
|
|
|
46152
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
46153
46167
|
var DAY5 = 864e5;
|
|
46154
46168
|
var SETTING4 = "logs_pruned_at";
|
|
46155
46169
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -46176,7 +46190,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
46176
46190
|
};
|
|
46177
46191
|
}, "logPruner");
|
|
46178
46192
|
|
|
46179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
46180
46194
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
46181
46195
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
46182
46196
|
var invalid6 = /* @__PURE__ */ __name((message2) => {
|
|
@@ -46552,7 +46566,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
46552
46566
|
}, "checkMailFindings");
|
|
46553
46567
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
46554
46568
|
|
|
46555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46569
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
46556
46570
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
46557
46571
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
46558
46572
|
var WEIGHTS = {
|
|
@@ -46685,7 +46699,7 @@ var scoreGroup = /* @__PURE__ */ __name((items, context) => {
|
|
|
46685
46699
|
return { score: kept.reduce((sum, signal) => sum + WEIGHTS[signal], 0), signals: kept };
|
|
46686
46700
|
}, "scoreGroup");
|
|
46687
46701
|
|
|
46688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46702
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
46689
46703
|
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";
|
|
46690
46704
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
46691
46705
|
const { database, now: now2 } = context;
|
|
@@ -46837,7 +46851,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46837
46851
|
};
|
|
46838
46852
|
}, "ordersStoreOver");
|
|
46839
46853
|
|
|
46840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
46841
46855
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
46842
46856
|
throw new CliError("validation_error", "mail findings cite mail that changed since it was read; stage a new batch", {
|
|
46843
46857
|
reason: "mail-findings.stale"
|
|
@@ -47294,7 +47308,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
47294
47308
|
};
|
|
47295
47309
|
}, "mailFindingsStoreOver");
|
|
47296
47310
|
|
|
47297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
47298
47312
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
47299
47313
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
47300
47314
|
reason: "meeting-findings.stale"
|
|
@@ -47462,7 +47476,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47462
47476
|
};
|
|
47463
47477
|
}, "meetingFindingsStoreOver");
|
|
47464
47478
|
|
|
47465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
47466
47480
|
var RANK_BATCH = 512;
|
|
47467
47481
|
var LIVE3 = "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";
|
|
47468
47482
|
var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -47733,7 +47747,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
47733
47747
|
}
|
|
47734
47748
|
}), "meetingVectorsOver");
|
|
47735
47749
|
|
|
47736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
47737
47751
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
47738
47752
|
var TEXTS = {
|
|
47739
47753
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -47834,11 +47848,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47834
47848
|
};
|
|
47835
47849
|
}, "sourceMentionStoreOver");
|
|
47836
47850
|
|
|
47837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47851
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
47838
47852
|
import { mkdirSync, statSync, writeFileSync } from "node:fs";
|
|
47839
47853
|
import { dirname } from "node:path";
|
|
47840
47854
|
|
|
47841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47855
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
47842
47856
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
47843
47857
|
var CLIENTS_SETTING = "clients";
|
|
47844
47858
|
var coreVersion = (() => {
|
|
@@ -47896,7 +47910,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
47896
47910
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
47897
47911
|
}, "refusalAdvice");
|
|
47898
47912
|
|
|
47899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47913
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
47900
47914
|
var GENERATED = [
|
|
47901
47915
|
{
|
|
47902
47916
|
"name": "20261010184427_initial",
|
|
@@ -48948,7 +48962,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
48948
48962
|
}
|
|
48949
48963
|
];
|
|
48950
48964
|
|
|
48951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48965
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
48952
48966
|
var MANIFEST = [
|
|
48953
48967
|
{ name: "20261010184427_initial", version: 1, minCompatible: 1 },
|
|
48954
48968
|
{ name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
|
|
@@ -49042,7 +49056,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
49042
49056
|
return migrations;
|
|
49043
49057
|
}, "generatedMigrations");
|
|
49044
49058
|
|
|
49045
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
49046
49060
|
var MIGRATIONS = generatedMigrations();
|
|
49047
49061
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
49048
49062
|
version INTEGER PRIMARY KEY,
|
|
@@ -49095,7 +49109,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
49095
49109
|
}
|
|
49096
49110
|
}, "migrate");
|
|
49097
49111
|
|
|
49098
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
49099
49113
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
49100
49114
|
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 ?");
|
|
49101
49115
|
if (pending.get(0, 1) === void 0)
|
|
@@ -49117,7 +49131,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
49117
49131
|
}
|
|
49118
49132
|
}, "fillJoinKeys");
|
|
49119
49133
|
|
|
49120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
49121
49135
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
49122
49136
|
refuseOwnerStoreInTests(path);
|
|
49123
49137
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -49131,8 +49145,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
49131
49145
|
}, "openSqlite");
|
|
49132
49146
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
49133
49147
|
quietSqliteWarning();
|
|
49134
|
-
const { drizzle } = await import("./node-
|
|
49135
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
49148
|
+
const { drizzle } = await import("./node-UILGGXFZ.js");
|
|
49149
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-FJR5DRBC.js");
|
|
49136
49150
|
const client = await nodeClient(path, { readOnly });
|
|
49137
49151
|
try {
|
|
49138
49152
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -49142,8 +49156,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
49142
49156
|
}
|
|
49143
49157
|
}, "openUnderNode");
|
|
49144
49158
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
49145
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
49146
|
-
const { drizzle } = await import("./bun-
|
|
49159
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-EG4TSO2G.js");
|
|
49160
|
+
const { drizzle } = await import("./bun-BT7YVHDQ.js");
|
|
49147
49161
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
49148
49162
|
try {
|
|
49149
49163
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -49153,7 +49167,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
49153
49167
|
}
|
|
49154
49168
|
}, "openUnderBun");
|
|
49155
49169
|
|
|
49156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49170
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
49157
49171
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
49158
49172
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
49159
49173
|
try {
|
|
@@ -49221,7 +49235,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
49221
49235
|
});
|
|
49222
49236
|
}, "movePaymentFacts");
|
|
49223
49237
|
|
|
49224
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49238
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
49225
49239
|
var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
49226
49240
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
49227
49241
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -49236,7 +49250,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
49236
49250
|
throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
|
|
49237
49251
|
}, "assertReadCompatible");
|
|
49238
49252
|
|
|
49239
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
49240
49254
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
49241
49255
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
49242
49256
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -49282,7 +49296,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
49282
49296
|
});
|
|
49283
49297
|
}, "moveSuggestedLinks");
|
|
49284
49298
|
|
|
49285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
49286
49300
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
49287
49301
|
var TEST_PROVIDER = "chat";
|
|
49288
49302
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -49303,7 +49317,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
49303
49317
|
}
|
|
49304
49318
|
}, "purgeTestAccounts");
|
|
49305
49319
|
|
|
49306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49320
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
49307
49321
|
var BACKFILL_ON_OPEN = 5e3;
|
|
49308
49322
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
49309
49323
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -49368,10 +49382,10 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
|
|
|
49368
49382
|
}
|
|
49369
49383
|
}, "openStoreContext");
|
|
49370
49384
|
|
|
49371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
49372
49386
|
import { createHash as createHash16 } from "node:crypto";
|
|
49373
49387
|
|
|
49374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
49375
49389
|
var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
49376
49390
|
var ref = text4(2048);
|
|
49377
49391
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -49437,7 +49451,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
49437
49451
|
}))
|
|
49438
49452
|
});
|
|
49439
49453
|
|
|
49440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49454
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
49441
49455
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
49442
49456
|
var invalid9 = /* @__PURE__ */ __name((field4) => {
|
|
49443
49457
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -49541,7 +49555,7 @@ var validateProjectAnnotationsGraph = /* @__PURE__ */ __name((manifest, addition
|
|
|
49541
49555
|
invalid9("external.unused");
|
|
49542
49556
|
}, "validateProjectAnnotationsGraph");
|
|
49543
49557
|
|
|
49544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
49545
49559
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
49546
49560
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
49547
49561
|
var targetSchema = strictObject({
|
|
@@ -49647,7 +49661,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
49647
49661
|
};
|
|
49648
49662
|
}, "planBoundProjectAnnotations");
|
|
49649
49663
|
|
|
49650
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49664
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
49651
49665
|
import { createHash as createHash17 } from "node:crypto";
|
|
49652
49666
|
var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
49653
49667
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -49741,7 +49755,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
49741
49755
|
})).digest("hex");
|
|
49742
49756
|
}, "projectAnnotationSnapshotFingerprint");
|
|
49743
49757
|
|
|
49744
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49758
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
49745
49759
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
49746
49760
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
49747
49761
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -49758,7 +49772,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
49758
49772
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
49759
49773
|
}, "projectAnnotationRequest");
|
|
49760
49774
|
|
|
49761
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
49762
49776
|
var SnapshotBudget = class {
|
|
49763
49777
|
static {
|
|
49764
49778
|
__name(this, "SnapshotBudget");
|
|
@@ -49784,13 +49798,13 @@ var SnapshotBudget = class {
|
|
|
49784
49798
|
}
|
|
49785
49799
|
};
|
|
49786
49800
|
|
|
49787
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
49788
49802
|
import { createHash as createHash19 } from "node:crypto";
|
|
49789
49803
|
|
|
49790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
49791
49805
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
49792
49806
|
|
|
49793
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49807
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
49794
49808
|
import { createHash as createHash18 } from "node:crypto";
|
|
49795
49809
|
var invalid11 = /* @__PURE__ */ __name(() => {
|
|
49796
49810
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -49933,7 +49947,7 @@ var ProjectSnapshotSources = class {
|
|
|
49933
49947
|
}
|
|
49934
49948
|
};
|
|
49935
49949
|
|
|
49936
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49950
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
49937
49951
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
49938
49952
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
49939
49953
|
}, "unsupported");
|
|
@@ -50104,7 +50118,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
50104
50118
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
50105
50119
|
}), "projectAnnotationSnapshot");
|
|
50106
50120
|
|
|
50107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
50108
50122
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
50109
50123
|
const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
50110
50124
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -50166,7 +50180,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
50166
50180
|
};
|
|
50167
50181
|
}), "previewAnnotationSnapshot");
|
|
50168
50182
|
|
|
50169
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
50170
50184
|
var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
|
|
50171
50185
|
const mappings = { ...bindings };
|
|
50172
50186
|
const resolve = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -50208,7 +50222,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
50208
50222
|
return mappings;
|
|
50209
50223
|
}, "restoreAnnotationRecords");
|
|
50210
50224
|
|
|
50211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
50212
50226
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
50213
50227
|
async preview(request) {
|
|
50214
50228
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -50238,7 +50252,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
50238
50252
|
}
|
|
50239
50253
|
}), "projectAnnotationStoreOver");
|
|
50240
50254
|
|
|
50241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50255
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
50242
50256
|
import { createHash as createHash20 } from "node:crypto";
|
|
50243
50257
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
50244
50258
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -50470,7 +50484,7 @@ var envelopeOfJsonl = /* @__PURE__ */ __name((text6) => {
|
|
|
50470
50484
|
return isObject2(header) ? { ...header, records: records2 } : header;
|
|
50471
50485
|
}, "envelopeOfJsonl");
|
|
50472
50486
|
|
|
50473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
50474
50488
|
var PROJECTED = {
|
|
50475
50489
|
invoice: { roles: ["issuer", "counterparty", "project"], many: [] },
|
|
50476
50490
|
payment: { roles: ["payer", "payee", "project", "settles"], many: ["settles"] }
|
|
@@ -50883,7 +50897,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50883
50897
|
};
|
|
50884
50898
|
}, "recordStoreOver");
|
|
50885
50899
|
|
|
50886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
50887
50901
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
50888
50902
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
50889
50903
|
let merged = { from: from2, to };
|
|
@@ -50896,7 +50910,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
50896
50910
|
}, "markRange");
|
|
50897
50911
|
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");
|
|
50898
50912
|
|
|
50899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50913
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
50900
50914
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
50901
50915
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
50902
50916
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -50917,7 +50931,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
50917
50931
|
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);
|
|
50918
50932
|
}, "setTaskAnalysisMark");
|
|
50919
50933
|
|
|
50920
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50934
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
50921
50935
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
50922
50936
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
50923
50937
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
|
|
@@ -50927,7 +50941,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
50927
50941
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf4(account), JSON.stringify(until), now2);
|
|
50928
50942
|
}, "setTaskRulesStop");
|
|
50929
50943
|
|
|
50930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
50931
50945
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
50932
50946
|
const { database } = context;
|
|
50933
50947
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -50986,7 +51000,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50986
51000
|
};
|
|
50987
51001
|
}, "syncStoreOver");
|
|
50988
51002
|
|
|
50989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
50990
51004
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
50991
51005
|
const { database } = context;
|
|
50992
51006
|
return {
|
|
@@ -51008,7 +51022,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51008
51022
|
};
|
|
51009
51023
|
}, "tagsStoreOver");
|
|
51010
51024
|
|
|
51011
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51025
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
51012
51026
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
51013
51027
|
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
|
|
51014
51028
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -51135,7 +51149,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
51135
51149
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
51136
51150
|
}, "savePictureChunks");
|
|
51137
51151
|
|
|
51138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51152
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
51139
51153
|
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,
|
|
51140
51154
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
51141
51155
|
FROM messages m
|
|
@@ -51224,7 +51238,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
51224
51238
|
return plain2(best(found2));
|
|
51225
51239
|
}, "nearestMessages");
|
|
51226
51240
|
|
|
51227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51241
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
51228
51242
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
51229
51243
|
const { database } = context;
|
|
51230
51244
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -51482,7 +51496,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
51482
51496
|
embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
|
|
51483
51497
|
}), "vectorsStoreOver");
|
|
51484
51498
|
|
|
51485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
51486
51500
|
import { existsSync, readFileSync as readFileSync4 } from "node:fs";
|
|
51487
51501
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
51488
51502
|
var BOOKKEEPING = ["schema_migrations", "store_settings"];
|
|
@@ -51570,10 +51584,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
51570
51584
|
}
|
|
51571
51585
|
}, "lastBackup");
|
|
51572
51586
|
|
|
51573
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51587
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
51574
51588
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
51575
51589
|
|
|
51576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
51577
51591
|
var COUNTED_TABLES = [
|
|
51578
51592
|
"accounts",
|
|
51579
51593
|
"chats",
|
|
@@ -51658,7 +51672,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
51658
51672
|
};
|
|
51659
51673
|
}, "storeContents");
|
|
51660
51674
|
|
|
51661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_4d927264f4292101afd5535290652319/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
51662
51676
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
51663
51677
|
const context = await openStoreContext(options);
|
|
51664
51678
|
try {
|