@wirecat/cli-memo 0.131.26 → 0.131.28
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-VULFSNYE.js → all-profiles-5T23TSLS.js} +5 -5
- package/dist/bundle/{anthropic-VXQ6ST2U.js → anthropic-AKD5CPO6.js} +3 -3
- package/dist/bundle/{app-server-HQPELIPY.js → app-server-NE7EMWAU.js} +35 -35
- package/dist/bundle/auto-UI3T442Q.js +86 -0
- package/dist/bundle/{bun-2NMWL5YB.js → bun-MWSCIVYY.js} +2 -2
- package/dist/bundle/{bun-sqlite-CT544OXO.js → bun-sqlite-K2OK3SS6.js} +2 -2
- package/dist/bundle/{chunk-7LMTWOTP.js → chunk-25IIXY5K.js} +1 -1
- package/dist/bundle/{chunk-OYB3FUYQ.js → chunk-2JM3HWSF.js} +1 -1
- package/dist/bundle/{chunk-TKVRZZE3.js → chunk-2O34ULVN.js} +1 -1
- package/dist/bundle/{chunk-ARDUJR5Z.js → chunk-3NCXHUGK.js} +1 -1
- package/dist/bundle/{chunk-CRC3AW6N.js → chunk-3NERKJCL.js} +2 -2
- package/dist/bundle/{chunk-KFDPW2AR.js → chunk-4BUJ4P4V.js} +2 -2
- package/dist/bundle/{chunk-A4NZ2XOG.js → chunk-4ETZKMSQ.js} +7 -7
- package/dist/bundle/{chunk-BO4FN4UB.js → chunk-52DNGWWV.js} +2 -2
- package/dist/bundle/{chunk-J57DDKF4.js → chunk-5FTTDKHU.js} +1 -1
- package/dist/bundle/{chunk-NAM2Y63Z.js → chunk-5VD4BWQ5.js} +2 -2
- package/dist/bundle/{chunk-CW3NJ764.js → chunk-6GF5XTEK.js} +4 -4
- package/dist/bundle/{chunk-7ISENDNK.js → chunk-7STRA63S.js} +10 -10
- package/dist/bundle/{chunk-A6PITALJ.js → chunk-7UZF7FFF.js} +1 -1
- package/dist/bundle/{chunk-3ZJE5TIG.js → chunk-7VIPLKQY.js} +1 -1
- package/dist/bundle/{chunk-LJZFMXDC.js → chunk-7XJX6KV7.js} +20 -20
- package/dist/bundle/{chunk-BELLQAWL.js → chunk-BRYOBI2N.js} +7 -7
- package/dist/bundle/{chunk-S3RBWUUA.js → chunk-BWH7HBVK.js} +5 -5
- package/dist/bundle/{chunk-6PRRZC7Z.js → chunk-BWHPJFJQ.js} +1 -1
- package/dist/bundle/{chunk-FHY664YS.js → chunk-C6A2FRMX.js} +3 -3
- package/dist/bundle/{chunk-5FPQGUJA.js → chunk-CUUQ5SGZ.js} +1 -1
- package/dist/bundle/{chunk-XKGXVVYV.js → chunk-DFSJNUV3.js} +4 -4
- package/dist/bundle/{chunk-HVVBSM2C.js → chunk-EDGK35LX.js} +245 -245
- package/dist/bundle/{chunk-UZXCBBDC.js → chunk-EKSAED2S.js} +9 -9
- package/dist/bundle/{chunk-H6O6IQND.js → chunk-FAMGHE4L.js} +3 -3
- package/dist/bundle/{chunk-NH2JSH24.js → chunk-FXUDATZI.js} +4 -4
- package/dist/bundle/{chunk-CUWI6JIX.js → chunk-GOZXK5ZB.js} +5 -5
- package/dist/bundle/{chunk-254TXVLA.js → chunk-GR4Z3X3R.js} +1 -1
- package/dist/bundle/{chunk-DKKWZMR7.js → chunk-GYQQZAPM.js} +1 -1
- package/dist/bundle/{chunk-2ND2XYME.js → chunk-HG2ZICMV.js} +24 -16
- package/dist/bundle/{chunk-TPFWNOPG.js → chunk-HMZLIJZI.js} +4 -4
- package/dist/bundle/{chunk-QKQ7A4L7.js → chunk-IPVYKIDQ.js} +43 -43
- package/dist/bundle/{chunk-IJ34FAES.js → chunk-JVJSEZRZ.js} +11 -11
- package/dist/bundle/{chunk-M4QN77GH.js → chunk-JXPSZJRX.js} +3 -3
- package/dist/bundle/{chunk-Z3YGDBBS.js → chunk-KNAXSFFK.js} +2 -2
- package/dist/bundle/{chunk-GJBK3M6X.js → chunk-L2AJTH4B.js} +4 -4
- package/dist/bundle/{chunk-HN3EDDVX.js → chunk-L32UNV6A.js} +12 -12
- package/dist/bundle/{chunk-MQAHMAJB.js → chunk-LCU6HHIT.js} +1 -1
- package/dist/bundle/{chunk-TXANQZEG.js → chunk-LYBA6YTS.js} +2 -2
- package/dist/bundle/{chunk-M6O4DH5F.js → chunk-MMQ3PNY2.js} +1 -1
- package/dist/bundle/{chunk-3CVDHJER.js → chunk-N3YOSX2R.js} +1 -1
- package/dist/bundle/{chunk-KTDNFSXC.js → chunk-NSU2QZ2Y.js} +20 -20
- package/dist/bundle/{chunk-GPYGMETC.js → chunk-P6KGH4HJ.js} +445 -300
- package/dist/bundle/{chunk-SY7M2DLJ.js → chunk-QM7JJICP.js} +8 -8
- package/dist/bundle/{chunk-KMZRXGTF.js → chunk-R2YCDWZB.js} +1 -1
- package/dist/bundle/{chunk-AGMYCYSG.js → chunk-RQ37GH4Q.js} +150 -150
- package/dist/bundle/{chunk-LMN7SYX4.js → chunk-SS6NIBT3.js} +1 -1
- package/dist/bundle/{chunk-4ENVJFRM.js → chunk-SUWRZHLN.js} +27 -27
- package/dist/bundle/{chunk-ZR3BPBS6.js → chunk-TOCIBRXE.js} +7 -7
- package/dist/bundle/{chunk-IUM5XZWV.js → chunk-TPRGT6QU.js} +5 -5
- package/dist/bundle/{chunk-WRZ7JDA2.js → chunk-TZQBS2W6.js} +5 -5
- package/dist/bundle/{chunk-YFBKS5BW.js → chunk-UQVZIZ3X.js} +2 -2
- package/dist/bundle/{chunk-VL3YCTZD.js → chunk-WF5E3GTN.js} +6 -6
- package/dist/bundle/{chunk-6TJCRDNZ.js → chunk-WXMIDNA5.js} +3 -3
- package/dist/bundle/{chunk-DUHXWFCB.js → chunk-YS26XHBU.js} +4 -4
- package/dist/bundle/{chunk-PWA3RNXN.js → chunk-ZAHUDQE4.js} +256 -256
- package/dist/bundle/{chunk-GOEHJK2R.js → chunk-ZJO43QQG.js} +4 -4
- package/dist/bundle/{chunk-QFW4MJIH.js → chunk-ZLTARJG7.js} +51 -51
- package/dist/bundle/{command-contract-RQMIQKBS.js → command-contract-YR55Y4J2.js} +11 -11
- package/dist/bundle/{decode-7VB3CHK2.js → decode-KGZGT6YR.js} +2 -2
- package/dist/bundle/{echarts-45D6USAX.js → echarts-ZVR7COJR.js} +2 -2
- package/dist/bundle/{embed-KU2RGB24.js → embed-E3SYH7BI.js} +3 -3
- package/dist/bundle/{embedder-E7YZDZ5Y.js → embedder-2OGNW5GQ.js} +6 -6
- package/dist/bundle/{entry-N42HJMIN.js → entry-ZVAL5NC5.js} +4 -4
- package/dist/bundle/failure-62K4QAPV.js +66 -0
- package/dist/bundle/{first-run-Y5YNAAO3.js → first-run-IH2OAKCU.js} +5 -5
- package/dist/bundle/{first-screen-SNPGBQFZ.js → first-screen-HLMFDOCL.js} +12 -12
- package/dist/bundle/{instructions-6EFSPC7C.js → instructions-BQO5IVUS.js} +1 -1
- package/dist/bundle/{mcp-6Z7UKX7E.js → mcp-JQ6WGHBL.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-OXC26QXO.js → node-SESRJP6V.js} +2 -2
- package/dist/bundle/{node-sqlite-FNTICDEN.js → node-sqlite-E6WGF6VQ.js} +3 -3
- package/dist/bundle/{oauth-4JFOFCBB.js → oauth-5XEPM7P2.js} +4 -4
- package/dist/bundle/{open-WXFCCY7S.js → open-ORDS45GQ.js} +2 -2
- package/dist/bundle/{openai-TPQKQNM7.js → openai-IWEPM3B7.js} +7 -7
- package/dist/bundle/{process-YWPAOI6G.js → process-EVTLTA56.js} +1 -1
- package/dist/bundle/{program-WFUPN7XO.js → program-QJOC2VHS.js} +95 -79
- package/dist/bundle/{prompt-HJUH4EP4.js → prompt-GSBAQBKX.js} +2 -2
- package/dist/bundle/{recognize-DAIRHALM.js → recognize-D5ZG7KRK.js} +1 -1
- package/dist/bundle/{remote-MJLWTLAX.js → remote-Q5KOZYAA.js} +4 -4
- package/dist/bundle/{rerank-VAK5HSJE.js → rerank-BDBJYOQV.js} +4 -4
- package/dist/bundle/{serve-M2A66WOW.js → serve-JR7XMZ4X.js} +6 -6
- package/dist/bundle/server-EWORQZZB.js +48 -0
- package/dist/bundle/server-HHTRVQYX.js +61 -0
- package/dist/bundle/{server-NN2CBVSX.js → server-RWZYJVLZ.js} +50 -50
- package/dist/bundle/{state-6TBUXJOX.js → state-WTKI4AQ7.js} +3 -3
- package/dist/bundle/{store-TJCL3QBY.js → store-XMGQNBP3.js} +9 -9
- package/dist/bundle/store-maintenance-command-EY5EIO2H.js +48 -0
- package/dist/bundle/update-CUBOZISO.js +69 -0
- package/dist/contract-overrides/skill.d.ts.map +1 -1
- package/dist/contract-overrides/skill.js +1 -1
- package/dist/contract-overrides/skill.js.map +1 -1
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +1 -0
- package/dist/examples.js.map +1 -1
- package/dist/facts/command.d.ts.map +1 -1
- package/dist/facts/command.js +1 -0
- package/dist/facts/command.js.map +1 -1
- package/dist/program.d.ts +2 -0
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +15 -1
- package/dist/program.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/SKILL.md +28 -204
- package/skills/cli-memo/topics/mail.md +31 -0
- package/skills/cli-memo/topics/mcp.md +13 -0
- package/skills/cli-memo/topics/meetings.md +36 -0
- package/skills/cli-memo/topics/money.md +14 -0
- package/skills/cli-memo/topics/projects.md +44 -0
- package/skills/cli-memo/topics/proposals.md +19 -0
- package/skills/cli-memo/topics/search.md +60 -0
- package/skills/cli-memo/topics/vocabulary.md +8 -0
- package/dist/bundle/auto-3R4RFJGK.js +0 -86
- package/dist/bundle/failure-R355OCVE.js +0 -66
- package/dist/bundle/server-33FB7QXW.js +0 -48
- package/dist/bundle/server-AIPDQO57.js +0 -61
- package/dist/bundle/store-maintenance-command-NKJV5A3G.js +0 -48
- package/dist/bundle/update-OXR3SNM2.js +0 -69
- /package/dist/bundle/{chunk-DF7NE4ZG.js → chunk-3HNCLKYR.js} +0 -0
|
@@ -71,11 +71,11 @@ import {
|
|
|
71
71
|
validateQuery,
|
|
72
72
|
walkQuery,
|
|
73
73
|
zonedMoment
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-ZLTARJG7.js";
|
|
75
75
|
import {
|
|
76
76
|
holdsCredential,
|
|
77
77
|
secretNamed
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-5FTTDKHU.js";
|
|
79
79
|
import {
|
|
80
80
|
DEFAULT_STEMMERS,
|
|
81
81
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -88,26 +88,26 @@ import {
|
|
|
88
88
|
fold,
|
|
89
89
|
normalize,
|
|
90
90
|
parseStemmers
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-4ETZKMSQ.js";
|
|
92
92
|
import {
|
|
93
93
|
DEFAULT_TASK_CATEGORIES,
|
|
94
94
|
sharedConfigPath,
|
|
95
95
|
storedTaskCategories,
|
|
96
96
|
taskCategoriesReader
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-FXUDATZI.js";
|
|
98
98
|
import {
|
|
99
99
|
refuseOwnerStoreInTests,
|
|
100
100
|
storePath
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-LCU6HHIT.js";
|
|
102
102
|
import {
|
|
103
103
|
quietSqliteWarning,
|
|
104
104
|
storeCapable
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-GOZXK5ZB.js";
|
|
106
106
|
import {
|
|
107
107
|
PRAGMAS,
|
|
108
108
|
TIME_LIMIT_FUNCTION,
|
|
109
109
|
TimeLimitReached
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-R2YCDWZB.js";
|
|
111
111
|
import {
|
|
112
112
|
array,
|
|
113
113
|
boolean,
|
|
@@ -157,12 +157,12 @@ import {
|
|
|
157
157
|
sql,
|
|
158
158
|
sqliteTable,
|
|
159
159
|
text
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-SS6NIBT3.js";
|
|
161
161
|
import {
|
|
162
162
|
__name
|
|
163
163
|
} from "./chunk-ZVVMGPBJ.js";
|
|
164
164
|
|
|
165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
166
166
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
167
167
|
const methods = whole;
|
|
168
168
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -290,7 +290,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
290
290
|
};
|
|
291
291
|
}, "bindAccount");
|
|
292
292
|
|
|
293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
294
294
|
var SCHEME = "msg:";
|
|
295
295
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat: chat2, message: message2 }) => SCHEME + [provider, account, chat2, message2].map(encodeURIComponent).join("/"), "formatLocator");
|
|
296
296
|
var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -304,7 +304,7 @@ var parseLocator = /* @__PURE__ */ __name((reference2) => {
|
|
|
304
304
|
return { provider, account, chat: chat2, message: message2 };
|
|
305
305
|
}, "parseLocator");
|
|
306
306
|
|
|
307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
308
308
|
var SIMPLE_REFERENCES = [
|
|
309
309
|
"note",
|
|
310
310
|
"document",
|
|
@@ -451,7 +451,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text6) => {
|
|
|
451
451
|
return match !== null && byPrefix.has(match[1]);
|
|
452
452
|
}, "looksLikeReference");
|
|
453
453
|
|
|
454
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
454
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
455
455
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
|
|
456
456
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
457
457
|
var PROVIDERS = [
|
|
@@ -567,7 +567,7 @@ var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
|
567
567
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
568
568
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
569
569
|
|
|
570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
571
571
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
572
572
|
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");
|
|
573
573
|
var fail = /* @__PURE__ */ __name((message2) => {
|
|
@@ -590,7 +590,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
590
590
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
591
591
|
}, "sourceOf");
|
|
592
592
|
|
|
593
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
593
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
594
594
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
595
595
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
596
596
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -777,7 +777,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf2 = (kind4)
|
|
|
777
777
|
return { accounts: [...chosen.values()], skipped };
|
|
778
778
|
}, "fitting");
|
|
779
779
|
|
|
780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
781
781
|
var IndexBuilderOn = class {
|
|
782
782
|
static {
|
|
783
783
|
__name(this, "IndexBuilderOn");
|
|
@@ -972,7 +972,7 @@ function alias(table, alias2) {
|
|
|
972
972
|
}
|
|
973
973
|
__name(alias, "alias");
|
|
974
974
|
|
|
975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
976
976
|
var ENTITY_TABLES = {
|
|
977
977
|
account: "accounts",
|
|
978
978
|
attachment: "attachments",
|
|
@@ -1014,7 +1014,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
1014
1014
|
return { table, pointer, type, count, known: known2 };
|
|
1015
1015
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
1016
1016
|
|
|
1017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
1018
1018
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
1019
1019
|
id: integer("id").primaryKey(),
|
|
1020
1020
|
name: text("name").notNull().unique(),
|
|
@@ -1023,7 +1023,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
1023
1023
|
updatedAt: integer("updated_at").notNull()
|
|
1024
1024
|
});
|
|
1025
1025
|
|
|
1026
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1026
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
1027
1027
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
1028
1028
|
sourceKey: text("source_key").notNull(),
|
|
1029
1029
|
collection: text("collection").notNull(),
|
|
@@ -1033,13 +1033,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
1033
1033
|
createdAt: integer("created_at").notNull()
|
|
1034
1034
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
1035
1035
|
|
|
1036
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
1037
1037
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
1038
1038
|
id: integer("id").notNull(),
|
|
1039
1039
|
indexableType: text("indexable_type").notNull()
|
|
1040
1040
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
1041
1041
|
|
|
1042
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
1043
1043
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
1044
1044
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
1045
1045
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -1065,7 +1065,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
1065
1065
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
1066
1066
|
]);
|
|
1067
1067
|
|
|
1068
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1068
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
1069
1069
|
var accounts = sqliteTable("accounts", {
|
|
1070
1070
|
id: integer("id").primaryKey(),
|
|
1071
1071
|
provider: text("provider").notNull(),
|
|
@@ -2374,7 +2374,8 @@ var recordRelations = sqliteTable("record_relations", {
|
|
|
2374
2374
|
targetType: text("target_type").notNull(),
|
|
2375
2375
|
targetExternalId: text("target_external_id").notNull(),
|
|
2376
2376
|
targetId: integer("target_id").references(() => records.id),
|
|
2377
|
-
createdAt: integer("created_at").notNull()
|
|
2377
|
+
createdAt: integer("created_at").notNull(),
|
|
2378
|
+
amount: text("amount")
|
|
2378
2379
|
}, (table) => [
|
|
2379
2380
|
unique().on(table.recordId, table.role, table.targetType, table.targetExternalId),
|
|
2380
2381
|
index("record_relations_by_target_type_target_external_id").on(table.targetType, table.targetExternalId),
|
|
@@ -2688,7 +2689,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
2688
2689
|
at: integer("at").notNull()
|
|
2689
2690
|
});
|
|
2690
2691
|
|
|
2691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
2692
2693
|
var ARMS = [
|
|
2693
2694
|
[
|
|
2694
2695
|
"message",
|
|
@@ -2815,7 +2816,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
2815
2816
|
return recomputed;
|
|
2816
2817
|
}, "drainInvolvementQueue");
|
|
2817
2818
|
|
|
2818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2819
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
2819
2820
|
import { domainToUnicode } from "node:url";
|
|
2820
2821
|
|
|
2821
2822
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -12837,7 +12838,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
12837
12838
|
}, "oa");
|
|
12838
12839
|
var na = { parse: O, get: aa, isValid: oa };
|
|
12839
12840
|
|
|
12840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12841
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
12841
12842
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
12842
12843
|
var ID = /^[\w-]{10,}$/;
|
|
12843
12844
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -12878,7 +12879,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text6) => [...text6.matchAll(L
|
|
|
12878
12879
|
return { url, documentId: googleDocumentId(url) };
|
|
12879
12880
|
}), "googleDocumentLinks");
|
|
12880
12881
|
|
|
12881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
12882
12883
|
var PHONE_PLANS = [
|
|
12883
12884
|
{
|
|
12884
12885
|
country: "us",
|
|
@@ -13258,7 +13259,7 @@ var PHONE_PLANS = [
|
|
|
13258
13259
|
}
|
|
13259
13260
|
];
|
|
13260
13261
|
|
|
13261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13262
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
13262
13263
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
13263
13264
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
13264
13265
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -13299,7 +13300,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
13299
13300
|
return void 0;
|
|
13300
13301
|
}, "nationalPhone");
|
|
13301
13302
|
|
|
13302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
13303
13304
|
var BEFORE = [
|
|
13304
13305
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
13305
13306
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -13559,7 +13560,7 @@ var findPlaces = /* @__PURE__ */ __name((text6) => {
|
|
|
13559
13560
|
return found2.sort((a, b) => a.start - b.start);
|
|
13560
13561
|
}, "findPlaces");
|
|
13561
13562
|
|
|
13562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13563
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
13563
13564
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
13564
13565
|
var MENTION_VERSIONS = {
|
|
13565
13566
|
phone: 1,
|
|
@@ -13749,7 +13750,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
13749
13750
|
};
|
|
13750
13751
|
}, "typedPhone");
|
|
13751
13752
|
|
|
13752
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
13753
13754
|
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";
|
|
13754
13755
|
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";
|
|
13755
13756
|
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";
|
|
@@ -13757,7 +13758,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
13757
13758
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
13758
13759
|
var NAME_WORDS = WORDS.split(" ");
|
|
13759
13760
|
|
|
13760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
13761
13762
|
var LATIN_TO_CYRILLIC = {
|
|
13762
13763
|
shch: "\u0449",
|
|
13763
13764
|
sch: "\u0449",
|
|
@@ -13965,7 +13966,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text6, stem, taken) => {
|
|
|
13965
13966
|
return found2;
|
|
13966
13967
|
}, "findUnknownNames");
|
|
13967
13968
|
|
|
13968
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13969
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
13969
13970
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
13970
13971
|
"webpage",
|
|
13971
13972
|
"share",
|
|
@@ -14005,7 +14006,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
|
14005
14006
|
});
|
|
14006
14007
|
}, "matchDownloads");
|
|
14007
14008
|
|
|
14008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
14009
14010
|
var QUERY_VERSION = 1;
|
|
14010
14011
|
var QUERY_LIMITS2 = {
|
|
14011
14012
|
...QUERY_LIMITS,
|
|
@@ -14041,7 +14042,7 @@ function exhausted(budget) {
|
|
|
14041
14042
|
}
|
|
14042
14043
|
__name(exhausted, "exhausted");
|
|
14043
14044
|
|
|
14044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
14045
14046
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
14046
14047
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
14047
14048
|
kind: "char",
|
|
@@ -14441,7 +14442,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
14441
14442
|
return out;
|
|
14442
14443
|
}, "foldRegex");
|
|
14443
14444
|
|
|
14444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14445
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
14445
14446
|
var PRESET_VERSION = 1;
|
|
14446
14447
|
var PRESETS = {
|
|
14447
14448
|
password: {
|
|
@@ -14495,7 +14496,7 @@ var PRESETS = {
|
|
|
14495
14496
|
}
|
|
14496
14497
|
};
|
|
14497
14498
|
|
|
14498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
14499
14500
|
var FIELD_VERSION = 2;
|
|
14500
14501
|
var UNITS = {
|
|
14501
14502
|
"": 1,
|
|
@@ -14956,12 +14957,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
|
|
|
14956
14957
|
return validateFields(parsed3.output);
|
|
14957
14958
|
}, "validateAst");
|
|
14958
14959
|
|
|
14959
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14960
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
14960
14961
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
14961
14962
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
14962
14963
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
14963
14964
|
|
|
14964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14965
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
14965
14966
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
14966
14967
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
14967
14968
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -14985,7 +14986,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
14985
14986
|
};
|
|
14986
14987
|
}, "linkMatch");
|
|
14987
14988
|
|
|
14988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
14989
14990
|
var SETTING = "phoneCountries";
|
|
14990
14991
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
14991
14992
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -15016,7 +15017,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
15016
15017
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
15017
15018
|
}, "valueMatch");
|
|
15018
15019
|
|
|
15019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
15020
15021
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
15021
15022
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
15022
15023
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -15044,7 +15045,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
15044
15045
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
15045
15046
|
}, "vocabularySimilarity");
|
|
15046
15047
|
|
|
15047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
15048
15049
|
import { createHash } from "node:crypto";
|
|
15049
15050
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
15050
15051
|
try {
|
|
@@ -15110,7 +15111,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind4, by, options
|
|
|
15110
15111
|
});
|
|
15111
15112
|
}, "guardTagCreation");
|
|
15112
15113
|
|
|
15113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
15114
15115
|
var invalid2 = /* @__PURE__ */ __name((message2) => {
|
|
15115
15116
|
throw new CliError("validation_error", message2);
|
|
15116
15117
|
}, "invalid");
|
|
@@ -15187,7 +15188,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
15187
15188
|
};
|
|
15188
15189
|
}, "createTagRedirectIndex");
|
|
15189
15190
|
|
|
15190
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
15191
15192
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
15192
15193
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
15193
15194
|
if (!row2)
|
|
@@ -15215,7 +15216,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
15215
15216
|
return snapshot2;
|
|
15216
15217
|
}, "tagRedirectSnapshot");
|
|
15217
15218
|
|
|
15218
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15219
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
15219
15220
|
import { createHash as createHash2 } from "node:crypto";
|
|
15220
15221
|
var TASK_KEY_PREFIXES = {
|
|
15221
15222
|
question: "Q",
|
|
@@ -15243,7 +15244,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
15243
15244
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
15244
15245
|
}, "taskAccountOf");
|
|
15245
15246
|
|
|
15246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15247
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
15247
15248
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
15248
15249
|
var REFERABLE = {
|
|
15249
15250
|
note: { tombstone: true },
|
|
@@ -15407,7 +15408,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
15407
15408
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
15408
15409
|
}, "taskIdOf");
|
|
15409
15410
|
|
|
15410
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
15411
15412
|
var toMs = /* @__PURE__ */ __name((iso13) => {
|
|
15412
15413
|
if (iso13 === null || iso13 === void 0)
|
|
15413
15414
|
return null;
|
|
@@ -15421,7 +15422,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
15421
15422
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
15422
15423
|
var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
15423
15424
|
|
|
15424
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
15425
15426
|
var TAG_KINDS = ["tag", "topic"];
|
|
15426
15427
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
15427
15428
|
var TAG_TYPE = {
|
|
@@ -15624,7 +15625,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
15624
15625
|
return result;
|
|
15625
15626
|
}, "tagsOf");
|
|
15626
15627
|
|
|
15627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15628
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
15628
15629
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
15629
15630
|
var SPEECH = speech("att");
|
|
15630
15631
|
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");
|
|
@@ -15988,7 +15989,7 @@ var FIELD_COMPILERS = {
|
|
|
15988
15989
|
subject
|
|
15989
15990
|
};
|
|
15990
15991
|
|
|
15991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
15992
15993
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
15993
15994
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
15994
15995
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -16004,7 +16005,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
16004
16005
|
};
|
|
16005
16006
|
}, "placeOf");
|
|
16006
16007
|
|
|
16007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
16008
16009
|
var DRAIN_ON_WRITE = 500;
|
|
16009
16010
|
var METHOD = "rules";
|
|
16010
16011
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -16167,7 +16168,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
16167
16168
|
return queued.length;
|
|
16168
16169
|
}, "drainMentions");
|
|
16169
16170
|
|
|
16170
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
16171
16172
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
16172
16173
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
16173
16174
|
if (!exists2)
|
|
@@ -16175,7 +16176,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
16175
16176
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
16176
16177
|
}, "indexRow");
|
|
16177
16178
|
|
|
16178
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
16179
16180
|
var INDEX = "message_stems";
|
|
16180
16181
|
var SETTING2 = "searchStemmers";
|
|
16181
16182
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -16297,7 +16298,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
16297
16298
|
};
|
|
16298
16299
|
}, "stemmerCache");
|
|
16299
16300
|
|
|
16300
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16301
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
16301
16302
|
var SQLITE_BUSY = 5;
|
|
16302
16303
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
16303
16304
|
var isBusy = /* @__PURE__ */ __name((error) => {
|
|
@@ -16392,7 +16393,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
16392
16393
|
}
|
|
16393
16394
|
}, "read");
|
|
16394
16395
|
|
|
16395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
16396
16397
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
16397
16398
|
coalesce(CASE k.chunkable_type
|
|
16398
16399
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -16534,7 +16535,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
16534
16535
|
}, "dropUnusedVectors");
|
|
16535
16536
|
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");
|
|
16536
16537
|
|
|
16537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
16538
16539
|
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({
|
|
16539
16540
|
target: [accounts.provider, accounts.externalId],
|
|
16540
16541
|
set: {
|
|
@@ -16643,7 +16644,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
16643
16644
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
16644
16645
|
}, "dropOrphanPeople");
|
|
16645
16646
|
|
|
16646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16647
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
16647
16648
|
var FOLDED = [
|
|
16648
16649
|
{ table: "tasks", column: "title" },
|
|
16649
16650
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -16680,7 +16681,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
16680
16681
|
return filled2;
|
|
16681
16682
|
}, "fillFolded");
|
|
16682
16683
|
|
|
16683
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16684
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
16684
16685
|
var HISTORY_KEY = "$history";
|
|
16685
16686
|
var objectOf = /* @__PURE__ */ __name((text6) => {
|
|
16686
16687
|
if (typeof text6 !== "string")
|
|
@@ -16756,7 +16757,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
16756
16757
|
return rest;
|
|
16757
16758
|
}, "withoutHistory");
|
|
16758
16759
|
|
|
16759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
16760
16761
|
import { createHash as createHash3 } from "node:crypto";
|
|
16761
16762
|
var CHUNK_CHARS = 1200;
|
|
16762
16763
|
var CHUNK_OVERLAP = 150;
|
|
@@ -16861,7 +16862,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
16861
16862
|
return chunks2;
|
|
16862
16863
|
}, "cutChunks");
|
|
16863
16864
|
|
|
16864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16865
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
16865
16866
|
var DAY = 864e5;
|
|
16866
16867
|
var CURRENCY = [
|
|
16867
16868
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -16987,7 +16988,7 @@ var dueDayOf = /* @__PURE__ */ __name((text6, createdMs) => {
|
|
|
16987
16988
|
return best?.day ?? null;
|
|
16988
16989
|
}, "dueDayOf");
|
|
16989
16990
|
|
|
16990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16991
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
16991
16992
|
var DAY2 = 864e5;
|
|
16992
16993
|
var STOP_WORDS = new Set([
|
|
16993
16994
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -17142,7 +17143,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
17142
17143
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
17143
17144
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
17144
17145
|
|
|
17145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
17146
17147
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
17147
17148
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
17148
17149
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -17413,7 +17414,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
|
|
|
17413
17414
|
};
|
|
17414
17415
|
}, "readiness");
|
|
17415
17416
|
|
|
17416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
17417
17418
|
var DOCUMENT_PICTURE = "document_picture";
|
|
17418
17419
|
var SCAN_PAGE2 = 5e3;
|
|
17419
17420
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -17476,7 +17477,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
17476
17477
|
}, "nearestPictures")
|
|
17477
17478
|
}), "documentPicturesOver");
|
|
17478
17479
|
|
|
17479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
17480
17481
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
17481
17482
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
17482
17483
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -17541,7 +17542,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
17541
17542
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
17542
17543
|
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");
|
|
17543
17544
|
|
|
17544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
17545
17546
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
17546
17547
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
17547
17548
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -17631,7 +17632,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
17631
17632
|
});
|
|
17632
17633
|
}, "linkMeeting");
|
|
17633
17634
|
|
|
17634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
17635
17636
|
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), ''))";
|
|
17636
17637
|
var UNSEARCHED_EVENT_TYPES = [
|
|
17637
17638
|
"working-location",
|
|
@@ -17861,7 +17862,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
17861
17862
|
return true;
|
|
17862
17863
|
}, "resetNoteIndex");
|
|
17863
17864
|
|
|
17864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17865
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
17865
17866
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
17866
17867
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
17867
17868
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -17880,7 +17881,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
17880
17881
|
}
|
|
17881
17882
|
}, "resolvePersonLinks");
|
|
17882
17883
|
|
|
17883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
17884
17885
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
17885
17886
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
17886
17887
|
find: orm.select({
|
|
@@ -18105,7 +18106,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
18105
18106
|
}, "meetingIdentityPk");
|
|
18106
18107
|
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");
|
|
18107
18108
|
|
|
18108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
18109
18110
|
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");
|
|
18110
18111
|
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");
|
|
18111
18112
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -18385,7 +18386,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
18385
18386
|
}
|
|
18386
18387
|
}, "replaceAutoTags");
|
|
18387
18388
|
|
|
18388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
18389
18390
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
18390
18391
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
18391
18392
|
var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
|
|
@@ -18404,7 +18405,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
18404
18405
|
return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
|
|
18405
18406
|
}, "counterFreshness");
|
|
18406
18407
|
|
|
18407
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
18408
18409
|
import { createHash as createHash4 } from "node:crypto";
|
|
18409
18410
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
18410
18411
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -18502,7 +18503,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
18502
18503
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
18503
18504
|
}, "contextEvidenceRequest");
|
|
18504
18505
|
|
|
18505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
18506
18507
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
18507
18508
|
var ACTIVITY = `
|
|
18508
18509
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -18618,7 +18619,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
18618
18619
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
18619
18620
|
}), "mailActivity");
|
|
18620
18621
|
|
|
18621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
18622
18623
|
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");
|
|
18623
18624
|
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;
|
|
18624
18625
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -18759,7 +18760,7 @@ var mailOwnText = /* @__PURE__ */ __name((body2) => {
|
|
|
18759
18760
|
return text6 || body2.trim();
|
|
18760
18761
|
}, "mailOwnText");
|
|
18761
18762
|
|
|
18762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18763
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
18763
18764
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
18764
18765
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
18765
18766
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
|
|
@@ -18869,7 +18870,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
18869
18870
|
return emails3 + threads;
|
|
18870
18871
|
}, "drainEmailIndex");
|
|
18871
18872
|
|
|
18872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
18873
18874
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
18874
18875
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
18875
18876
|
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,
|
|
@@ -18967,7 +18968,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
18967
18968
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
18968
18969
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
18969
18970
|
|
|
18970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18971
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
18971
18972
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
18972
18973
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
18973
18974
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -19017,7 +19018,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
19017
19018
|
return threads.length;
|
|
19018
19019
|
}, "markEmailsRestored");
|
|
19019
19020
|
|
|
19020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
19021
19022
|
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");
|
|
19022
19023
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
19023
19024
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -19084,7 +19085,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
19084
19085
|
}
|
|
19085
19086
|
}), "mailRulesOver");
|
|
19086
19087
|
|
|
19087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
19088
19089
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
19089
19090
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
19090
19091
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -19092,7 +19093,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
19092
19093
|
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);
|
|
19093
19094
|
}, "reviewLink");
|
|
19094
19095
|
|
|
19095
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19096
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
19096
19097
|
function checkMeetingCancelled(signal) {
|
|
19097
19098
|
if (!signal?.aborted)
|
|
19098
19099
|
return;
|
|
@@ -19103,7 +19104,7 @@ function checkMeetingCancelled(signal) {
|
|
|
19103
19104
|
}
|
|
19104
19105
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
19105
19106
|
|
|
19106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
19107
19108
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
19108
19109
|
id: Number(row2.id),
|
|
19109
19110
|
accountId: Number(row2.account_id),
|
|
@@ -19153,7 +19154,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
19153
19154
|
createdAt: Number(row2.created_at)
|
|
19154
19155
|
}), "transcriptRowOf");
|
|
19155
19156
|
|
|
19156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
19157
19158
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
19158
19159
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
19159
19160
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -19320,7 +19321,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
19320
19321
|
}
|
|
19321
19322
|
}), "meetingReadsOver");
|
|
19322
19323
|
|
|
19323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
19324
19325
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
19325
19326
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
19326
19327
|
const params = [input.accountId];
|
|
@@ -19363,7 +19364,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
19363
19364
|
return { clauses, params };
|
|
19364
19365
|
}, "meetingSelectionSql");
|
|
19365
19366
|
|
|
19366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
19367
19368
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
19368
19369
|
async meetingChatLines(input) {
|
|
19369
19370
|
checkMeetingCancelled(input.signal);
|
|
@@ -19391,7 +19392,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
19391
19392
|
}
|
|
19392
19393
|
}), "meetingChatLinesOver");
|
|
19393
19394
|
|
|
19394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
19395
19396
|
var MESSAGE_FIELDS = {
|
|
19396
19397
|
pk: messages.id,
|
|
19397
19398
|
nativeId: messages.externalId,
|
|
@@ -19562,7 +19563,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
19562
19563
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
19563
19564
|
}), "chatActivity");
|
|
19564
19565
|
|
|
19565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
19566
19567
|
var HIT_FIELDS = {
|
|
19567
19568
|
...MESSAGE_FIELDS,
|
|
19568
19569
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -19661,7 +19662,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
19661
19662
|
};
|
|
19662
19663
|
}, "directReplies");
|
|
19663
19664
|
|
|
19664
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19665
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
19665
19666
|
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");
|
|
19666
19667
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
19667
19668
|
const found2 = identityRow(context, ref3);
|
|
@@ -19792,7 +19793,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
19792
19793
|
}, "mentioning");
|
|
19793
19794
|
var escaped = /* @__PURE__ */ __name((text6) => text6.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
19794
19795
|
|
|
19795
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
19796
19797
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
19797
19798
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
19798
19799
|
}, "missing");
|
|
@@ -19914,7 +19915,7 @@ function meetingContextLinksOver(context) {
|
|
|
19914
19915
|
}
|
|
19915
19916
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
19916
19917
|
|
|
19917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
19918
19919
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
19919
19920
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
19920
19921
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -19943,7 +19944,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19943
19944
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
19944
19945
|
}, "indexedText");
|
|
19945
19946
|
|
|
19946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19947
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
19947
19948
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
19948
19949
|
var meetingCurrentIndexRows = `
|
|
19949
19950
|
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
|
|
@@ -19974,7 +19975,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19974
19975
|
}, "invalidateMeetingStems");
|
|
19975
19976
|
var meetingStemmableText = /* @__PURE__ */ __name((text6) => text6.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
19976
19977
|
|
|
19977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
19978
19979
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
19979
19980
|
return {
|
|
19980
19981
|
async indexSearch(original) {
|
|
@@ -20042,10 +20043,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
20042
20043
|
}
|
|
20043
20044
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
20044
20045
|
|
|
20045
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
20046
20047
|
import { createHash as createHash5 } from "node:crypto";
|
|
20047
20048
|
|
|
20048
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20049
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
20049
20050
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
20050
20051
|
const padded = ` ${term} `;
|
|
20051
20052
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -20054,7 +20055,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
20054
20055
|
return [...pieces];
|
|
20055
20056
|
}, "trigrams");
|
|
20056
20057
|
|
|
20057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
20058
20059
|
var SHORTEST_CORRECTION = 3;
|
|
20059
20060
|
var maxEdits = /* @__PURE__ */ __name((word) => word.length <= 4 ? 1 : 2, "maxEdits");
|
|
20060
20061
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -20101,7 +20102,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
20101
20102
|
return corrections;
|
|
20102
20103
|
}, "correctWords");
|
|
20103
20104
|
|
|
20104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
20105
20106
|
var SHORTEST_GARBLED = 4;
|
|
20106
20107
|
var MOST_WIDENED = 64;
|
|
20107
20108
|
var plain = /* @__PURE__ */ __name((word) => word.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -20193,7 +20194,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
20193
20194
|
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((word) => word.term));
|
|
20194
20195
|
}, "widenWords");
|
|
20195
20196
|
|
|
20196
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
20197
20198
|
import { readFileSync } from "node:fs";
|
|
20198
20199
|
var loaded;
|
|
20199
20200
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -20252,7 +20253,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word) => {
|
|
|
20252
20253
|
return false;
|
|
20253
20254
|
}, "knownRussianWord");
|
|
20254
20255
|
|
|
20255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
20256
20257
|
var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
20257
20258
|
var MOST_WORDS = 128;
|
|
20258
20259
|
var quote = /* @__PURE__ */ __name((word) => `"${word.replaceAll('"', '""')}"`, "quote");
|
|
@@ -20479,7 +20480,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text6, stemmer) => {
|
|
|
20479
20480
|
return check3(tree);
|
|
20480
20481
|
}, "matchMeetingText");
|
|
20481
20482
|
|
|
20482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
20483
20484
|
var fail3 = /* @__PURE__ */ __name((message2) => {
|
|
20484
20485
|
throw new CliError("validation_error", message2);
|
|
20485
20486
|
}, "fail");
|
|
@@ -20661,7 +20662,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
20661
20662
|
}
|
|
20662
20663
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
20663
20664
|
|
|
20664
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20665
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
20665
20666
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20666
20667
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
20667
20668
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -20693,7 +20694,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20693
20694
|
}
|
|
20694
20695
|
}), "meetingLanguagesOver");
|
|
20695
20696
|
|
|
20696
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20697
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
20697
20698
|
import { createHash as createHash6 } from "node:crypto";
|
|
20698
20699
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
20699
20700
|
if (value === void 0)
|
|
@@ -20783,7 +20784,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
20783
20784
|
}
|
|
20784
20785
|
}), "meetingParticipantSearchOver");
|
|
20785
20786
|
|
|
20786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20787
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
20787
20788
|
var preparationQueries = {
|
|
20788
20789
|
participants: {
|
|
20789
20790
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -20833,7 +20834,7 @@ var preparationQueries = {
|
|
|
20833
20834
|
}
|
|
20834
20835
|
};
|
|
20835
20836
|
|
|
20836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
20837
20838
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20838
20839
|
async preparationContext(original) {
|
|
20839
20840
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -20874,7 +20875,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20874
20875
|
}
|
|
20875
20876
|
}), "meetingPreparationContextOver");
|
|
20876
20877
|
|
|
20877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
20878
20879
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
20879
20880
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
20880
20881
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -20888,7 +20889,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
20888
20889
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
20889
20890
|
)`, "preparationSubjects");
|
|
20890
20891
|
|
|
20891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
20892
20893
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20893
20894
|
async preparationKnowledge(original) {
|
|
20894
20895
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20933,7 +20934,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
20933
20934
|
}
|
|
20934
20935
|
}), "meetingPreparationKnowledgeOver");
|
|
20935
20936
|
|
|
20936
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20937
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
20937
20938
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20938
20939
|
async preparationNotes(original) {
|
|
20939
20940
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20986,7 +20987,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20986
20987
|
}
|
|
20987
20988
|
}), "meetingPreparationNotesOver");
|
|
20988
20989
|
|
|
20989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
20990
20991
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20991
20992
|
async relatedHistory(original) {
|
|
20992
20993
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -21057,7 +21058,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
21057
21058
|
}
|
|
21058
21059
|
}), "meetingRelatedHistoryOver");
|
|
21059
21060
|
|
|
21060
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
21061
21062
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
21062
21063
|
var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
21063
21064
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -21138,7 +21139,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
21138
21139
|
}
|
|
21139
21140
|
}), "meetingReviewOver");
|
|
21140
21141
|
|
|
21141
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
21142
21143
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
21143
21144
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
21144
21145
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -21192,7 +21193,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
21192
21193
|
}
|
|
21193
21194
|
}), "meetingSeriesHistoryOver");
|
|
21194
21195
|
|
|
21195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
21196
21197
|
var MOST_ROWS = 5e5;
|
|
21197
21198
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
21198
21199
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -21261,7 +21262,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
21261
21262
|
}
|
|
21262
21263
|
}), "meetingStatsOver");
|
|
21263
21264
|
|
|
21264
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
21265
21266
|
var CURSOR_KEY = "meetings";
|
|
21266
21267
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
21267
21268
|
id: Number(row2.id),
|
|
@@ -21830,7 +21831,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
21830
21831
|
};
|
|
21831
21832
|
}, "meetingStoreOver");
|
|
21832
21833
|
|
|
21833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
21834
21835
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
21835
21836
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
21836
21837
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -21856,7 +21857,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
21856
21857
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
21857
21858
|
}, "release");
|
|
21858
21859
|
|
|
21859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
21860
21861
|
var THREAD_COLUMNS = {
|
|
21861
21862
|
subject: {
|
|
21862
21863
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -21873,7 +21874,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
21873
21874
|
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);
|
|
21874
21875
|
}, "threadRows");
|
|
21875
21876
|
|
|
21876
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
21877
21878
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
21878
21879
|
id: `email:${place.emailId}`,
|
|
21879
21880
|
chatId: place.threadExternalId,
|
|
@@ -22429,7 +22430,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
22429
22430
|
}
|
|
22430
22431
|
}), "mailStoreOver");
|
|
22431
22432
|
|
|
22432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
22433
22434
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
22434
22435
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
22435
22436
|
var folded4 = /* @__PURE__ */ __name((word) => /^[а-яё'-]*$/.test(word) ? word.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word), "folded");
|
|
@@ -22519,7 +22520,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
22519
22520
|
}, "knownWord");
|
|
22520
22521
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
22521
22522
|
|
|
22522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
22523
22524
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
22524
22525
|
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");
|
|
22525
22526
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -22605,7 +22606,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
22605
22606
|
return found2;
|
|
22606
22607
|
}, "spokenTranscripts");
|
|
22607
22608
|
|
|
22608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22609
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
22609
22610
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
22610
22611
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
22611
22612
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -22652,7 +22653,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
22652
22653
|
});
|
|
22653
22654
|
}, "placeHits");
|
|
22654
22655
|
|
|
22655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
22656
22657
|
var GROUPS = {
|
|
22657
22658
|
chat: {
|
|
22658
22659
|
key: "m.chat_id",
|
|
@@ -22674,7 +22675,7 @@ var GROUPS = {
|
|
|
22674
22675
|
}
|
|
22675
22676
|
};
|
|
22676
22677
|
|
|
22677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22678
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
22678
22679
|
var MESSAGES2 = {
|
|
22679
22680
|
rows: "messages",
|
|
22680
22681
|
threads: "chats",
|
|
@@ -23157,7 +23158,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
23157
23158
|
};
|
|
23158
23159
|
}, "runCompiled");
|
|
23159
23160
|
|
|
23160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
23161
23162
|
function invalidMetadata() {
|
|
23162
23163
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
23163
23164
|
}
|
|
@@ -23259,7 +23260,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
23259
23260
|
};
|
|
23260
23261
|
}), "counterTargets");
|
|
23261
23262
|
|
|
23262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
23263
23264
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind4) => `'${kind4}'`).join(",");
|
|
23264
23265
|
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,
|
|
23265
23266
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -23378,7 +23379,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
23378
23379
|
}));
|
|
23379
23380
|
}, "attachmentViews");
|
|
23380
23381
|
|
|
23381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23382
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
23382
23383
|
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");
|
|
23383
23384
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text6, source2) => {
|
|
23384
23385
|
const { orm, database, now: now2 } = context;
|
|
@@ -23416,7 +23417,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
23416
23417
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
23417
23418
|
}, "intoVoiceAttachment");
|
|
23418
23419
|
|
|
23419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
23420
23421
|
var FIELDS = [
|
|
23421
23422
|
"threadExternalId",
|
|
23422
23423
|
"senderIdentityId",
|
|
@@ -23733,7 +23734,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
23733
23734
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
23734
23735
|
}, "writeDerivedReactions");
|
|
23735
23736
|
|
|
23736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
23737
23738
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
23738
23739
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
23739
23740
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -23754,7 +23755,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
23754
23755
|
};
|
|
23755
23756
|
}, "keysOver");
|
|
23756
23757
|
|
|
23757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23758
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
23758
23759
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
23759
23760
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
23760
23761
|
if (!row2)
|
|
@@ -23789,7 +23790,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
23789
23790
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
23790
23791
|
}, "saveProfile");
|
|
23791
23792
|
|
|
23792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
23793
23794
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
23794
23795
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
23795
23796
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -23846,7 +23847,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
23846
23847
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
23847
23848
|
}, "proposedBySql");
|
|
23848
23849
|
|
|
23849
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23850
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
23850
23851
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
23851
23852
|
const owner = ownerPerson(context.database).id;
|
|
23852
23853
|
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);
|
|
@@ -23867,7 +23868,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
23867
23868
|
return personOf(context, ref3);
|
|
23868
23869
|
}, "linkToOwner");
|
|
23869
23870
|
|
|
23870
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23871
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
23871
23872
|
var PROVIDERS_SETTING = "providers";
|
|
23872
23873
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
23873
23874
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -23902,7 +23903,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
23902
23903
|
});
|
|
23903
23904
|
}, "registerProvider");
|
|
23904
23905
|
|
|
23905
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23906
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
23906
23907
|
var DAY3 = 864e5;
|
|
23907
23908
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
23908
23909
|
var TEXT_LIMIT = 20;
|
|
@@ -24101,7 +24102,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
24101
24102
|
};
|
|
24102
24103
|
}, "taskSimilarityOver");
|
|
24103
24104
|
|
|
24104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
24105
24106
|
var SETTING3 = "taskCategories";
|
|
24106
24107
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
24107
24108
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -24120,7 +24121,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
24120
24121
|
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);
|
|
24121
24122
|
}, "saveTaskCategories");
|
|
24122
24123
|
|
|
24123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24124
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
24124
24125
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
24125
24126
|
var ALLOWED = "taskAgentClose";
|
|
24126
24127
|
var MIN = "taskAgentCloseMin";
|
|
@@ -24176,10 +24177,10 @@ var SUGGESTION_COLUMNS = [
|
|
|
24176
24177
|
];
|
|
24177
24178
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
24178
24179
|
|
|
24179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24180
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
24180
24181
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
24181
24182
|
|
|
24182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
24183
24184
|
var TASK_CLOSE_KIND = "task_close";
|
|
24184
24185
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
24185
24186
|
var isOwnerOnlyKind = /* @__PURE__ */ __name((kind4) => kind4 === MAIL_FINDINGS_KIND || kind4 === MEETING_FINDINGS_KIND || kind4 === TASK_CLOSE_KIND, "isOwnerOnlyKind");
|
|
@@ -24227,7 +24228,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
24227
24228
|
}, "assertMayDecide");
|
|
24228
24229
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
24229
24230
|
|
|
24230
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/money.js
|
|
24231
24232
|
var CURRENCY_SCALES = {
|
|
24232
24233
|
AED: 2,
|
|
24233
24234
|
AMD: 2,
|
|
@@ -24312,7 +24313,7 @@ var quantityOf = /* @__PURE__ */ __name((text6) => {
|
|
|
24312
24313
|
}, "quantityOf");
|
|
24313
24314
|
var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
|
|
24314
24315
|
|
|
24315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24316
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/finance.js
|
|
24316
24317
|
var INVOICE_DIRECTIONS = ["receivable", "payable"];
|
|
24317
24318
|
var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
|
|
24318
24319
|
var MONEY_DIRECTIONS = ["in", "out"];
|
|
@@ -24341,7 +24342,7 @@ var paymentLine = /* @__PURE__ */ __name((payment) => {
|
|
|
24341
24342
|
var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
|
|
24342
24343
|
var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
|
|
24343
24344
|
|
|
24344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
24345
24346
|
var PROFILE_PLACEHOLDER = "<profile>";
|
|
24346
24347
|
var oneLine = /* @__PURE__ */ __name((text6) => singleLine(text6.replace(/\s+/g, " ").trim()), "oneLine");
|
|
24347
24348
|
var openKind = /* @__PURE__ */ __name((kind4) => kind4 === "email" ? "message" : kind4 === "email_thread" ? "chat" : kind4 === "unknown" ? void 0 : kind4, "openKind");
|
|
@@ -24393,7 +24394,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
|
|
|
24393
24394
|
return `${WORDS2[summary.kind]} ${named2}${notes3 === "" ? "" : ` (${notes3})`}`;
|
|
24394
24395
|
}, "refLabel");
|
|
24395
24396
|
|
|
24396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24397
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
24397
24398
|
var EXCERPT_CHARS = 280;
|
|
24398
24399
|
var TITLE_CHARS = 120;
|
|
24399
24400
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -24746,7 +24747,7 @@ var refReadsOf = /* @__PURE__ */ __name((database, texts2, { excerpt = false } =
|
|
|
24746
24747
|
var summaryOf2 = /* @__PURE__ */ __name(({ sender, excerpt, ...summary }, withExcerpt) => withExcerpt ? { ...summary, excerpt } : summary, "summaryOf");
|
|
24747
24748
|
var refSummariesOf = /* @__PURE__ */ __name((database, texts2, options = {}) => new Map([...refReadsOf(database, texts2, options)].map(([text6, read2]) => [text6, summaryOf2(read2, options.excerpt === true)])), "refSummariesOf");
|
|
24748
24749
|
|
|
24749
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
24750
24751
|
var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
|
|
24751
24752
|
ref: ref3,
|
|
24752
24753
|
kind: read2.kind,
|
|
@@ -24782,7 +24783,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
24782
24783
|
});
|
|
24783
24784
|
}, "evidenceSourcesOf");
|
|
24784
24785
|
|
|
24785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
24786
24787
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
24787
24788
|
var MAX_TEXT_CHARS = 2e6;
|
|
24788
24789
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -24808,7 +24809,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
24808
24809
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
24809
24810
|
}, "pdfPreviewLimits");
|
|
24810
24811
|
|
|
24811
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
24812
24813
|
import { randomBytes } from "node:crypto";
|
|
24813
24814
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
24814
24815
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -24821,7 +24822,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
24821
24822
|
return time3 + random;
|
|
24822
24823
|
}, "ulid");
|
|
24823
24824
|
|
|
24824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
24825
24826
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
24826
24827
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
24827
24828
|
if (!meta && !sections?.length)
|
|
@@ -24842,7 +24843,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
24842
24843
|
return typeof language === "string" && language !== "" ? language : null;
|
|
24843
24844
|
}, "languageOf");
|
|
24844
24845
|
|
|
24845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
24846
24847
|
var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
24847
24848
|
var objectOf2 = /* @__PURE__ */ __name((value) => {
|
|
24848
24849
|
if (isObject(value))
|
|
@@ -25085,7 +25086,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
25085
25086
|
};
|
|
25086
25087
|
}, "filesStoreOver");
|
|
25087
25088
|
|
|
25088
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
25089
25090
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
25090
25091
|
entity: "document",
|
|
25091
25092
|
backend: "sql",
|
|
@@ -25131,7 +25132,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
25131
25132
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
25132
25133
|
}, "importedDocumentWhere");
|
|
25133
25134
|
|
|
25134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
25135
25136
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
25136
25137
|
var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
25137
25138
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
|
|
@@ -25657,7 +25658,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
25657
25658
|
};
|
|
25658
25659
|
}, "notesStoreOver");
|
|
25659
25660
|
|
|
25660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
25661
25662
|
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";
|
|
25662
25663
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
25663
25664
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -25879,7 +25880,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
25879
25880
|
};
|
|
25880
25881
|
}, "memoriesStoreOver");
|
|
25881
25882
|
|
|
25882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
25883
25884
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
25884
25885
|
var KEY = "taskFirstPassPerChat";
|
|
25885
25886
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -25899,7 +25900,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
25899
25900
|
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);
|
|
25900
25901
|
}, "saveFirstPassPerChat");
|
|
25901
25902
|
|
|
25902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
25903
25904
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
25904
25905
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
25905
25906
|
name,
|
|
@@ -26122,7 +26123,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
26122
26123
|
return root === void 0 ? void 0 : { ...query, root };
|
|
26123
26124
|
}, "withoutField");
|
|
26124
26125
|
|
|
26125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
26126
26127
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
26127
26128
|
if (row2.author_type == null)
|
|
26128
26129
|
return null;
|
|
@@ -26150,7 +26151,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
26150
26151
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
26151
26152
|
}, "addComment");
|
|
26152
26153
|
|
|
26153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26154
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
26154
26155
|
var TASK_RELATION_KINDS = [
|
|
26155
26156
|
"blocked-by",
|
|
26156
26157
|
"follow-up-of",
|
|
@@ -26280,7 +26281,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
26280
26281
|
};
|
|
26281
26282
|
}, "taskRelationsStoreOver");
|
|
26282
26283
|
|
|
26283
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
26284
26285
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
26285
26286
|
var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
26286
26287
|
var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind4, changes, at) => {
|
|
@@ -26800,7 +26801,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
26800
26801
|
};
|
|
26801
26802
|
}, "workTasksOver");
|
|
26802
26803
|
|
|
26803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
26804
26805
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
26805
26806
|
const { database, now: now2 } = context;
|
|
26806
26807
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -26849,7 +26850,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
26849
26850
|
};
|
|
26850
26851
|
}, "taskCloseOver");
|
|
26851
26852
|
|
|
26852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26853
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
26853
26854
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
26854
26855
|
const { database, now: now2 } = context;
|
|
26855
26856
|
const required3 = /* @__PURE__ */ __name((id2) => {
|
|
@@ -27067,7 +27068,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
27067
27068
|
};
|
|
27068
27069
|
}, "taskPairsOver");
|
|
27069
27070
|
|
|
27070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
27071
27072
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
27072
27073
|
var TASK_STATS_SQL = {
|
|
27073
27074
|
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"),
|
|
@@ -27106,7 +27107,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
27106
27107
|
}, "statNames")
|
|
27107
27108
|
}), "taskStatsOver");
|
|
27108
27109
|
|
|
27109
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
27110
27111
|
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";
|
|
27111
27112
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
27112
27113
|
const key2 = inboxKey(account);
|
|
@@ -27313,7 +27314,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
27313
27314
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
27314
27315
|
}, "oneOf");
|
|
27315
27316
|
|
|
27316
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
27317
27318
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
27318
27319
|
const { database } = context;
|
|
27319
27320
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -27358,7 +27359,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
27358
27359
|
};
|
|
27359
27360
|
}, "accountsStoreOver");
|
|
27360
27361
|
|
|
27361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27362
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
27362
27363
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
27363
27364
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
27364
27365
|
const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -27382,7 +27383,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
27382
27383
|
})), "keepDownloads");
|
|
27383
27384
|
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");
|
|
27384
27385
|
|
|
27385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
27386
27387
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
27387
27388
|
const { database } = context;
|
|
27388
27389
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -27439,7 +27440,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
27439
27440
|
}, "keepAttachmentText")
|
|
27440
27441
|
}), "attachmentsStoreOver");
|
|
27441
27442
|
|
|
27442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
27443
27444
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
27444
27445
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
27445
27446
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -27619,7 +27620,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
27619
27620
|
return done;
|
|
27620
27621
|
}, "rekeyChats");
|
|
27621
27622
|
|
|
27622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
27623
27624
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
27624
27625
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
27625
27626
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -27677,7 +27678,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
27677
27678
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
27678
27679
|
}, "chatCoverage");
|
|
27679
27680
|
|
|
27680
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27681
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
27681
27682
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
27682
27683
|
const { database } = context;
|
|
27683
27684
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -27812,7 +27813,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
27812
27813
|
};
|
|
27813
27814
|
}, "chatsStoreOver");
|
|
27814
27815
|
|
|
27815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
27816
27817
|
import { createHash as createHash7 } from "node:crypto";
|
|
27817
27818
|
var BATCH_CONTEXT = 50;
|
|
27818
27819
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -27950,7 +27951,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
27950
27951
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
27951
27952
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
27952
27953
|
|
|
27953
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27954
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
27954
27955
|
import { setTimeout } from "node:timers/promises";
|
|
27955
27956
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
27956
27957
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -28262,7 +28263,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
28262
28263
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
28263
28264
|
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");
|
|
28264
28265
|
|
|
28265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
28266
28267
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28267
28268
|
const { database } = context;
|
|
28268
28269
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -28369,7 +28370,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28369
28370
|
};
|
|
28370
28371
|
}, "conversationsStoreOver");
|
|
28371
28372
|
|
|
28372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
28373
28374
|
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";
|
|
28374
28375
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
28375
28376
|
const { database } = context;
|
|
@@ -28394,7 +28395,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
28394
28395
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
28395
28396
|
}), "countersStoreOver");
|
|
28396
28397
|
|
|
28397
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
28398
28399
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
28399
28400
|
var MENTION_QUERY = defineQuery({
|
|
28400
28401
|
entity: "mention",
|
|
@@ -28610,7 +28611,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
28610
28611
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
28611
28612
|
}, "listPlaces");
|
|
28612
28613
|
|
|
28613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28614
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
28614
28615
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
28615
28616
|
const { database } = context;
|
|
28616
28617
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -28645,7 +28646,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
28645
28646
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
28646
28647
|
}), "mentionsStoreOver");
|
|
28647
28648
|
|
|
28648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
28649
28650
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
28650
28651
|
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");
|
|
28651
28652
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -28660,7 +28661,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
28660
28661
|
}));
|
|
28661
28662
|
}, "documentLinkMessages");
|
|
28662
28663
|
|
|
28663
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28664
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
28664
28665
|
var stemmerFor = stemmerCache();
|
|
28665
28666
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
28666
28667
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -28704,7 +28705,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
28704
28705
|
});
|
|
28705
28706
|
}, "laterSharingRare");
|
|
28706
28707
|
|
|
28707
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
28708
28709
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
28709
28710
|
const { database } = context;
|
|
28710
28711
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -28839,7 +28840,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
28839
28840
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
28840
28841
|
}), "messagesStoreOver");
|
|
28841
28842
|
|
|
28842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28843
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
28843
28844
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
28844
28845
|
var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
28845
28846
|
var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -28896,7 +28897,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
|
|
|
28896
28897
|
});
|
|
28897
28898
|
}, "personPreparation");
|
|
28898
28899
|
|
|
28899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
28900
28901
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
28901
28902
|
const id2 = Number(uid);
|
|
28902
28903
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -28904,7 +28905,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
28904
28905
|
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)));
|
|
28905
28906
|
}, "personSeenInAccounts");
|
|
28906
28907
|
|
|
28907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28908
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
28908
28909
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
28909
28910
|
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);
|
|
28910
28911
|
if (!row2)
|
|
@@ -28970,7 +28971,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
28970
28971
|
return { id: id2, personId, removed: true };
|
|
28971
28972
|
}, "removeNote");
|
|
28972
28973
|
|
|
28973
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
28974
28975
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
28975
28976
|
const { database } = context;
|
|
28976
28977
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -29055,13 +29056,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
29055
29056
|
};
|
|
29056
29057
|
}, "peopleStoreOver");
|
|
29057
29058
|
|
|
29058
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
29059
29060
|
import { createHash as createHash9 } from "node:crypto";
|
|
29060
29061
|
|
|
29061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29062
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
29062
29063
|
import { createHash as createHash8 } from "node:crypto";
|
|
29063
29064
|
|
|
29064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
29065
29066
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
29066
29067
|
var AUTHOR_MEASURES = [
|
|
29067
29068
|
"messages",
|
|
@@ -29201,7 +29202,7 @@ var withoutUrls = /* @__PURE__ */ __name((text6) => text6.replace(/\S+/gu, (toke
|
|
|
29201
29202
|
var rankingWords = /* @__PURE__ */ __name((text6) => withoutUrls(text6).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
29202
29203
|
var rankingQuestion = /* @__PURE__ */ __name((text6) => withoutUrls(text6).includes("?"), "rankingQuestion");
|
|
29203
29204
|
|
|
29204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
29205
29206
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
29206
29207
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
29207
29208
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -29423,7 +29424,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
29423
29424
|
};
|
|
29424
29425
|
}, "rankReplyGraph");
|
|
29425
29426
|
|
|
29426
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
29427
29428
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
29428
29429
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
29429
29430
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -29597,7 +29598,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
29597
29598
|
return { items, evidence, summary, graph: graph.quality };
|
|
29598
29599
|
}, "calculateAdminStatistics");
|
|
29599
29600
|
|
|
29600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29601
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
29601
29602
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
29602
29603
|
const dates = [];
|
|
29603
29604
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -29619,7 +29620,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
29619
29620
|
return dates[0].node.resolution.date;
|
|
29620
29621
|
}, "rankingContextRange");
|
|
29621
29622
|
|
|
29622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
29623
29624
|
var reactionCounts = /* @__PURE__ */ __name((stored3) => {
|
|
29624
29625
|
let counts;
|
|
29625
29626
|
try {
|
|
@@ -29914,7 +29915,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
29914
29915
|
});
|
|
29915
29916
|
}, "rankQuery");
|
|
29916
29917
|
|
|
29917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
29918
29919
|
function fail4(message2, reason = "query.too-large") {
|
|
29919
29920
|
throw new CliError("validation_error", message2, { reason, complete: false });
|
|
29920
29921
|
}
|
|
@@ -30091,7 +30092,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
30091
30092
|
return result;
|
|
30092
30093
|
}), "adminStatisticsQuery");
|
|
30093
30094
|
|
|
30094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
30095
30096
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
30096
30097
|
if (!execution.accounts.length)
|
|
30097
30098
|
return { conversations: [], chats: [] };
|
|
@@ -30109,7 +30110,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
30109
30110
|
return { conversations: conversations2, chats: chats2 };
|
|
30110
30111
|
}, "conversationEligibility");
|
|
30111
30112
|
|
|
30112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
30113
30114
|
import { createHash as createHash10 } from "node:crypto";
|
|
30114
30115
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
30115
30116
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -30259,7 +30260,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
30259
30260
|
return result;
|
|
30260
30261
|
}, "rankingEvidence");
|
|
30261
30262
|
|
|
30262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
30263
30264
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
30264
30265
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2) => {
|
|
30265
30266
|
const params = [...scope3.accounts.flatMap(({ provider, account }) => [provider, account]), ...kinds2];
|
|
@@ -30353,7 +30354,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
30353
30354
|
});
|
|
30354
30355
|
}, "waitingChats");
|
|
30355
30356
|
|
|
30356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
30357
30358
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
30358
30359
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
30359
30360
|
if (execution.corpus === "mail")
|
|
@@ -30374,7 +30375,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
30374
30375
|
};
|
|
30375
30376
|
}, "queriesStoreOver");
|
|
30376
30377
|
|
|
30377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30378
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
30378
30379
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
30379
30380
|
const { database, now: now2 } = context;
|
|
30380
30381
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -30413,10 +30414,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
30413
30414
|
}));
|
|
30414
30415
|
}, "chatEventsOf");
|
|
30415
30416
|
|
|
30416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
30417
30418
|
import { createHash as createHash11 } from "node:crypto";
|
|
30418
30419
|
|
|
30419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
30420
30421
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
30421
30422
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
30422
30423
|
timeZone: zone,
|
|
@@ -30436,7 +30437,7 @@ var weekKey = /* @__PURE__ */ __name((day) => {
|
|
|
30436
30437
|
return date3.toISOString().slice(0, 10);
|
|
30437
30438
|
}, "weekKey");
|
|
30438
30439
|
|
|
30439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30440
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
30440
30441
|
var RETENTION_TOLERANCE = 864e5;
|
|
30441
30442
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
30442
30443
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -30490,7 +30491,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
30490
30491
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
30491
30492
|
}, "retentionCohorts");
|
|
30492
30493
|
|
|
30493
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30494
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
30494
30495
|
var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
30495
30496
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
30496
30497
|
validateRetentionOptions(options);
|
|
@@ -30621,7 +30622,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
30621
30622
|
};
|
|
30622
30623
|
}, "retentionQuery");
|
|
30623
30624
|
|
|
30624
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
30625
30626
|
var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
30626
30627
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
30627
30628
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -30752,7 +30753,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
30752
30753
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
30753
30754
|
})), "trackedChats");
|
|
30754
30755
|
|
|
30755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
30756
30757
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
30757
30758
|
const { database } = context;
|
|
30758
30759
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -30808,7 +30809,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30808
30809
|
};
|
|
30809
30810
|
}, "rosterStoreOver");
|
|
30810
30811
|
|
|
30811
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
30812
30813
|
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");
|
|
30813
30814
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
30814
30815
|
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 ?`);
|
|
@@ -30832,7 +30833,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
30832
30833
|
}
|
|
30833
30834
|
}, "backfillNormalized");
|
|
30834
30835
|
|
|
30835
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
30836
30837
|
var INDEX2 = "message_words";
|
|
30837
30838
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
30838
30839
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -30959,7 +30960,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
30959
30960
|
});
|
|
30960
30961
|
}, "resetSearchIndex");
|
|
30961
30962
|
|
|
30962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
30963
30964
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
30964
30965
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
30965
30966
|
const before2 = stemsState(database);
|
|
@@ -31054,7 +31055,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
31054
31055
|
return resetStems(database, { now: now2 });
|
|
31055
31056
|
}, "followDefaultStemmers");
|
|
31056
31057
|
|
|
31057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
31058
31059
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
31059
31060
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
31060
31061
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -31076,7 +31077,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
31076
31077
|
});
|
|
31077
31078
|
}, "termCandidates");
|
|
31078
31079
|
|
|
31079
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
31080
31081
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
31081
31082
|
const { database } = context;
|
|
31082
31083
|
const stemmerFor2 = stemmerCache();
|
|
@@ -31098,7 +31099,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31098
31099
|
};
|
|
31099
31100
|
}, "searchIndexStoreOver");
|
|
31100
31101
|
|
|
31101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
31102
31103
|
var HISTORY_KEPT = 1e3;
|
|
31103
31104
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
31104
31105
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -31167,7 +31168,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
31167
31168
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
31168
31169
|
}, "clearHistory");
|
|
31169
31170
|
|
|
31170
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
31171
31172
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
31172
31173
|
const { database } = context;
|
|
31173
31174
|
return {
|
|
@@ -31191,7 +31192,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31191
31192
|
};
|
|
31192
31193
|
}, "searchesStoreOver");
|
|
31193
31194
|
|
|
31194
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
31195
31196
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
31196
31197
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
31197
31198
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -31234,7 +31235,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
31234
31235
|
};
|
|
31235
31236
|
}, "agentActionsStoreOver");
|
|
31236
31237
|
|
|
31237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31238
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
31238
31239
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
31239
31240
|
}) => {
|
|
31240
31241
|
const { database, now: now2 } = context;
|
|
@@ -31293,7 +31294,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
31293
31294
|
};
|
|
31294
31295
|
}, "botUpdateStoreOver");
|
|
31295
31296
|
|
|
31296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
31297
31298
|
var DAY4 = 864e5;
|
|
31298
31299
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
31299
31300
|
if (filter.accountIds !== void 0 && filter.accountId !== void 0)
|
|
@@ -31402,7 +31403,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
31402
31403
|
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);
|
|
31403
31404
|
}, "listEvents");
|
|
31404
31405
|
|
|
31405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
31406
31407
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
31407
31408
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
31408
31409
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -31457,7 +31458,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
31457
31458
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
31458
31459
|
}, "forgetCalendarRows");
|
|
31459
31460
|
|
|
31460
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
31461
31462
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
31462
31463
|
id: Number(row2.id),
|
|
31463
31464
|
accountId: Number(row2.account_id),
|
|
@@ -32044,7 +32045,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32044
32045
|
};
|
|
32045
32046
|
}, "eventStoreOver");
|
|
32046
32047
|
|
|
32047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
32048
32049
|
var CATALOG_QUERY = defineQuery({
|
|
32049
32050
|
entity: "document",
|
|
32050
32051
|
backend: "sql",
|
|
@@ -32286,7 +32287,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
32286
32287
|
};
|
|
32287
32288
|
}, "catalogStoreOver");
|
|
32288
32289
|
|
|
32289
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
32290
32291
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
32291
32292
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
32292
32293
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -32299,7 +32300,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
32299
32300
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
32300
32301
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
32301
32302
|
|
|
32302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
32303
32304
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
32304
32305
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
32305
32306
|
signal?.throwIfAborted();
|
|
@@ -32398,7 +32399,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
32398
32399
|
});
|
|
32399
32400
|
}, "readMeetingContextEvidence");
|
|
32400
32401
|
|
|
32401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
32402
32403
|
var corpora = {
|
|
32403
32404
|
message: {
|
|
32404
32405
|
table: "messages",
|
|
@@ -32637,7 +32638,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32637
32638
|
}
|
|
32638
32639
|
}), "contextRecordsOver");
|
|
32639
32640
|
|
|
32640
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32641
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
32641
32642
|
var NOTE_FIELDS = [
|
|
32642
32643
|
"text",
|
|
32643
32644
|
"exact",
|
|
@@ -33067,7 +33068,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
33067
33068
|
};
|
|
33068
33069
|
}, "noteSearchOver");
|
|
33069
33070
|
|
|
33070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
33071
33072
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
33072
33073
|
var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
33073
33074
|
var EVENT_CORPUS = {
|
|
@@ -33199,7 +33200,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
33199
33200
|
};
|
|
33200
33201
|
}, "eventSearchOver");
|
|
33201
33202
|
|
|
33202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
33203
33204
|
var refuse2 = /* @__PURE__ */ __name((message2, reason, code = "validation_error") => {
|
|
33204
33205
|
throw new CliError(code, message2, { reason });
|
|
33205
33206
|
}, "refuse");
|
|
@@ -33464,6 +33465,13 @@ var financeOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
33464
33465
|
});
|
|
33465
33466
|
return type === "invoice" ? invoiceDetail(ref3) : paymentDetail(ref3);
|
|
33466
33467
|
}, "decide");
|
|
33468
|
+
const mayAllocate = /* @__PURE__ */ __name((row2, by) => {
|
|
33469
|
+
if (by === "owner")
|
|
33470
|
+
return;
|
|
33471
|
+
const own = row2.author_type === "bot" && row2.author_name != null && botKey(String(row2.author_name)) === botKey(by.bot);
|
|
33472
|
+
if (row2.review !== "proposed" || !own)
|
|
33473
|
+
refuse2(`only the owner allocates payment:${row2.id}; a bot allocates only from a payment it proposed that is still proposed`, "finance.owner-only", "permission_error");
|
|
33474
|
+
}, "mayAllocate");
|
|
33467
33475
|
const limitOf2 = /* @__PURE__ */ __name((limit) => Math.min(Math.max(limit ?? 100, 1), 500), "limitOf");
|
|
33468
33476
|
return {
|
|
33469
33477
|
addInvoice: /* @__PURE__ */ __name((input) => {
|
|
@@ -33586,11 +33594,7 @@ var financeOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
33586
33594
|
allocate: /* @__PURE__ */ __name(({ payment, invoice, amount, by }) => {
|
|
33587
33595
|
const row2 = rowOf2(payment, "payment");
|
|
33588
33596
|
const ref3 = `payment:${row2.id}`;
|
|
33589
|
-
|
|
33590
|
-
const own = row2.author_type === "bot" && row2.author_name != null && botKey(String(row2.author_name)) === botKey(by.bot);
|
|
33591
|
-
if (row2.review !== "proposed" || !own)
|
|
33592
|
-
refuse2(`only the owner allocates ${ref3}; a bot allocates only from a payment it proposed that is still proposed`, "finance.owner-only", "permission_error");
|
|
33593
|
-
}
|
|
33597
|
+
mayAllocate(row2, by);
|
|
33594
33598
|
if (row2.review === "rejected" || row2.deleted_at != null)
|
|
33595
33599
|
refuse2(`${ref3} is ${String(row2.review)}`, "finance.allocate");
|
|
33596
33600
|
const currency = String(row2.currency);
|
|
@@ -33606,6 +33610,23 @@ var financeOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
33606
33610
|
const found2 = allocationsWhere("payment_id", Number(row2.id)).find((one2) => one2.invoice === `invoice:${invoiceId}`);
|
|
33607
33611
|
return found2;
|
|
33608
33612
|
}, "allocate"),
|
|
33613
|
+
unallocate: /* @__PURE__ */ __name(({ payment, invoice, by }) => {
|
|
33614
|
+
const row2 = rowOf2(payment, "payment");
|
|
33615
|
+
const ref3 = `payment:${row2.id}`;
|
|
33616
|
+
mayAllocate(row2, by);
|
|
33617
|
+
if (row2.review !== "proposed" || row2.deleted_at != null)
|
|
33618
|
+
refuse2(`${ref3} is ${row2.deleted_at != null ? "deleted" : String(row2.review)}; only a proposed payment's allocations are taken back`, "finance.unallocate");
|
|
33619
|
+
const target = rowOf2(invoice, "invoice");
|
|
33620
|
+
write(database, () => {
|
|
33621
|
+
const gone = database.prepare("DELETE FROM payment_allocations WHERE payment_id = ? AND invoice_id = ?").run(Number(row2.id), Number(target.id));
|
|
33622
|
+
if (gone.changes === 0)
|
|
33623
|
+
throw new CliError("not_found", `${ref3} is not allocated to invoice:${target.id}`, {
|
|
33624
|
+
reason: "finance.not-allocated"
|
|
33625
|
+
});
|
|
33626
|
+
settle(Number(target.id));
|
|
33627
|
+
});
|
|
33628
|
+
return paymentDetail(ref3);
|
|
33629
|
+
}, "unallocate"),
|
|
33609
33630
|
confirm: /* @__PURE__ */ __name((reference2, by, reason) => decide2(reference2, by, reason, true), "confirm"),
|
|
33610
33631
|
reject: /* @__PURE__ */ __name((reference2, by, reason) => decide2(reference2, by, reason, false), "reject"),
|
|
33611
33632
|
openTotals: /* @__PURE__ */ __name((filter = {}) => {
|
|
@@ -33628,13 +33649,14 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33628
33649
|
payment: /* @__PURE__ */ __name(async (reference2) => operations.payment(reference2), "payment"),
|
|
33629
33650
|
payments: /* @__PURE__ */ __name(async (filter) => operations.payments(filter), "payments"),
|
|
33630
33651
|
allocate: /* @__PURE__ */ __name(async (input) => operations.allocate(input), "allocate"),
|
|
33652
|
+
unallocate: /* @__PURE__ */ __name(async (input) => operations.unallocate(input), "unallocate"),
|
|
33631
33653
|
confirm: /* @__PURE__ */ __name(async (reference2, by, reason) => operations.confirm(reference2, by, reason), "confirm"),
|
|
33632
33654
|
reject: /* @__PURE__ */ __name(async (reference2, by, reason) => operations.reject(reference2, by, reason), "reject"),
|
|
33633
33655
|
openTotals: /* @__PURE__ */ __name(async (filter) => operations.openTotals(filter), "openTotals")
|
|
33634
33656
|
};
|
|
33635
33657
|
}, "financeStoreOver");
|
|
33636
33658
|
|
|
33637
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
33638
33660
|
var refuse3 = /* @__PURE__ */ __name((message2, reason) => {
|
|
33639
33661
|
throw new CliError("validation_error", message2, { reason });
|
|
33640
33662
|
}, "refuse");
|
|
@@ -33712,7 +33734,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
33712
33734
|
};
|
|
33713
33735
|
}, "paymentEntriesOver");
|
|
33714
33736
|
|
|
33715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
33716
33738
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
33717
33739
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
33718
33740
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -33738,7 +33760,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
33738
33760
|
return valid;
|
|
33739
33761
|
}, "validateEvidenceFindings");
|
|
33740
33762
|
|
|
33741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33763
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
33742
33764
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
33743
33765
|
try {
|
|
33744
33766
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -33750,7 +33772,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
33750
33772
|
}
|
|
33751
33773
|
}, "calendarMoment");
|
|
33752
33774
|
|
|
33753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
33754
33776
|
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";
|
|
33755
33777
|
var iso9 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
33756
33778
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -33876,6 +33898,32 @@ var factOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
33876
33898
|
database.prepare("UPDATE facts SET status = 'reversed', updated_at = ? WHERE id = ?").run(now2(), Number(row2.id));
|
|
33877
33899
|
return factOf(rowOf2(reference2));
|
|
33878
33900
|
}, "reverse"),
|
|
33901
|
+
revoke: /* @__PURE__ */ __name((reference2, by, reason) => {
|
|
33902
|
+
const row2 = rowOf2(reference2);
|
|
33903
|
+
const ref3 = `fact:${row2.id}`;
|
|
33904
|
+
assertMayWithdraw({ id: ref3, proposedBy: { type: "unknown" }, proposed: false }, by);
|
|
33905
|
+
write(database, () => {
|
|
33906
|
+
const current = database.prepare("SELECT * FROM facts WHERE id = ?").get(Number(row2.id));
|
|
33907
|
+
if (current.status !== "accepted")
|
|
33908
|
+
throw new CliError("validation_error", `only an accepted fact can be revoked; ${ref3} is ${String(current.status)}`, { reason: "fact.not-accepted" });
|
|
33909
|
+
if (current.author_type === "person")
|
|
33910
|
+
throw new CliError("validation_error", `${ref3} is the owner's own fact, never proposed; correct it with a fact that supersedes it, or remove it`, { reason: "fact.owner-written" });
|
|
33911
|
+
if (current.supersedes_id != null)
|
|
33912
|
+
throw new CliError("validation_error", `${ref3} corrects fact:${current.supersedes_id}, which stopped holding when ${ref3} was accepted; remove it or correct it with another fact instead`, { reason: "fact.revoke-correction" });
|
|
33913
|
+
const at = now2();
|
|
33914
|
+
const { decision, history, ...metadata3 } = current.metadata == null ? {} : JSON.parse(String(current.metadata));
|
|
33915
|
+
const step = {
|
|
33916
|
+
step: "revoked",
|
|
33917
|
+
by: "owner",
|
|
33918
|
+
at: iso9(at),
|
|
33919
|
+
confirmedBy: { type: current.confirmed_by_type, id: String(current.confirmed_by_id) },
|
|
33920
|
+
...decision === void 0 ? {} : { decision },
|
|
33921
|
+
...reason?.trim() ? { reason: reason.trim() } : {}
|
|
33922
|
+
};
|
|
33923
|
+
database.prepare("UPDATE facts SET status = 'proposed', confirmed_by_type = NULL, confirmed_by_id = NULL, metadata = ?, updated_at = ? WHERE id = ?").run(JSON.stringify({ ...metadata3, history: [...history ?? [], step] }), at, Number(row2.id));
|
|
33924
|
+
});
|
|
33925
|
+
return factOf(rowOf2(reference2));
|
|
33926
|
+
}, "revoke"),
|
|
33879
33927
|
reject: /* @__PURE__ */ __name((reference2, by, reason) => {
|
|
33880
33928
|
const row2 = rowOf2(reference2);
|
|
33881
33929
|
decided(row2, by);
|
|
@@ -33926,13 +33974,14 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33926
33974
|
list: /* @__PURE__ */ __name(async (options) => operations.list(options), "list"),
|
|
33927
33975
|
accept: /* @__PURE__ */ __name(async (reference2, by, reason) => operations.accept(reference2, by, reason), "accept"),
|
|
33928
33976
|
reverse: /* @__PURE__ */ __name(async (reference2, by) => operations.reverse(reference2, by), "reverse"),
|
|
33977
|
+
revoke: /* @__PURE__ */ __name(async (reference2, by, reason) => operations.revoke(reference2, by, reason), "revoke"),
|
|
33929
33978
|
reject: /* @__PURE__ */ __name(async (reference2, by, reason) => operations.reject(reference2, by, reason), "reject"),
|
|
33930
33979
|
remove: /* @__PURE__ */ __name(async (reference2, by) => operations.remove(reference2, by), "remove"),
|
|
33931
33980
|
sources: /* @__PURE__ */ __name(async (reference2) => operations.sources(reference2), "sources")
|
|
33932
33981
|
};
|
|
33933
33982
|
}, "factsStoreOver");
|
|
33934
33983
|
|
|
33935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33984
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
33936
33985
|
var invalid4 = /* @__PURE__ */ __name((message2) => {
|
|
33937
33986
|
throw new CliError("validation_error", message2);
|
|
33938
33987
|
}, "invalid");
|
|
@@ -34034,7 +34083,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind4) => {
|
|
|
34034
34083
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes, create };
|
|
34035
34084
|
}, "findingsCoreOver");
|
|
34036
34085
|
|
|
34037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34086
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
34038
34087
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
34039
34088
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
34040
34089
|
var iso10 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -34199,7 +34248,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
34199
34248
|
};
|
|
34200
34249
|
}, "proposedActionsStoreOver");
|
|
34201
34250
|
|
|
34202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
34203
34252
|
var stale = /* @__PURE__ */ __name(() => {
|
|
34204
34253
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
34205
34254
|
reason: "evidence-findings.stale"
|
|
@@ -34380,7 +34429,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
34380
34429
|
};
|
|
34381
34430
|
}, "evidenceFindingsStoreOver");
|
|
34382
34431
|
|
|
34383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
34384
34433
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
34385
34434
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
34386
34435
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -34433,7 +34482,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
34433
34482
|
}, "forPerson")
|
|
34434
34483
|
}), "involvementStoreOver");
|
|
34435
34484
|
|
|
34436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34485
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
34437
34486
|
import { createHash as createHash12 } from "node:crypto";
|
|
34438
34487
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
34439
34488
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -34519,7 +34568,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
34519
34568
|
};
|
|
34520
34569
|
}, "meetingProjectsStoreOver");
|
|
34521
34570
|
|
|
34522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
34523
34572
|
var relationOf = /* @__PURE__ */ __name((link3) => ({
|
|
34524
34573
|
id: link3.id,
|
|
34525
34574
|
from: link3.from,
|
|
@@ -34745,16 +34794,16 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
34745
34794
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
34746
34795
|
}, "decidedOrigin");
|
|
34747
34796
|
|
|
34748
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34797
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
34749
34798
|
import { createHash as createHash15 } from "node:crypto";
|
|
34750
34799
|
|
|
34751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
34752
34801
|
import { createHash as createHash14 } from "node:crypto";
|
|
34753
34802
|
|
|
34754
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34803
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
34755
34804
|
import { createHash as createHash13 } from "node:crypto";
|
|
34756
34805
|
|
|
34757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
34758
34807
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
34759
34808
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
34760
34809
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -34805,7 +34854,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
34805
34854
|
return input;
|
|
34806
34855
|
}, "consolidationApplyInput");
|
|
34807
34856
|
|
|
34808
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34857
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
34809
34858
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
34810
34859
|
id: String(row2.id),
|
|
34811
34860
|
sourceId: String(row2.source_id),
|
|
@@ -34880,7 +34929,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
34880
34929
|
}, { beforeCommit: check3 });
|
|
34881
34930
|
}, "applyTagConsolidation");
|
|
34882
34931
|
|
|
34883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
34884
34933
|
var selections = [
|
|
34885
34934
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
34886
34935
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -35024,7 +35073,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
35024
35073
|
};
|
|
35025
35074
|
}, "previewRows");
|
|
35026
35075
|
|
|
35027
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
35028
35077
|
var kinds = ["project", "tag", "topic"];
|
|
35029
35078
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
35030
35079
|
if (signal?.aborted)
|
|
@@ -35288,7 +35337,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35288
35337
|
};
|
|
35289
35338
|
}, "vocabularyStoreOver");
|
|
35290
35339
|
|
|
35291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35340
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
35292
35341
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
35293
35342
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
35294
35343
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -35845,7 +35894,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
35845
35894
|
return key2.padEnd(3, "X");
|
|
35846
35895
|
}, "projectKey");
|
|
35847
35896
|
|
|
35848
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35897
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
35849
35898
|
var DAY5 = 864e5;
|
|
35850
35899
|
var SETTING4 = "logs_pruned_at";
|
|
35851
35900
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -35872,7 +35921,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
35872
35921
|
};
|
|
35873
35922
|
}, "logPruner");
|
|
35874
35923
|
|
|
35875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
35876
35925
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
35877
35926
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
35878
35927
|
var invalid6 = /* @__PURE__ */ __name((message2) => {
|
|
@@ -35998,7 +36047,7 @@ var validateMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
35998
36047
|
}, "validateMailFindings");
|
|
35999
36048
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
36000
36049
|
|
|
36001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36050
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
36002
36051
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
36003
36052
|
throw new CliError("validation_error", "mail findings cite mail that changed since it was read; stage a new batch", {
|
|
36004
36053
|
reason: "mail-findings.stale"
|
|
@@ -36292,7 +36341,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
36292
36341
|
};
|
|
36293
36342
|
}, "mailFindingsStoreOver");
|
|
36294
36343
|
|
|
36295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
36296
36345
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
36297
36346
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
36298
36347
|
reason: "meeting-findings.stale"
|
|
@@ -36460,7 +36509,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
36460
36509
|
};
|
|
36461
36510
|
}, "meetingFindingsStoreOver");
|
|
36462
36511
|
|
|
36463
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
36464
36513
|
var RANK_BATCH = 512;
|
|
36465
36514
|
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";
|
|
36466
36515
|
var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -36731,7 +36780,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
36731
36780
|
}
|
|
36732
36781
|
}), "meetingVectorsOver");
|
|
36733
36782
|
|
|
36734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
36735
36784
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
36736
36785
|
var TEXTS = {
|
|
36737
36786
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -36832,11 +36881,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
36832
36881
|
};
|
|
36833
36882
|
}, "sourceMentionStoreOver");
|
|
36834
36883
|
|
|
36835
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
36836
36885
|
import { mkdirSync, statSync, writeFileSync } from "node:fs";
|
|
36837
36886
|
import { dirname } from "node:path";
|
|
36838
36887
|
|
|
36839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
36840
36889
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
36841
36890
|
var CLIENTS_SETTING = "clients";
|
|
36842
36891
|
var coreVersion = (() => {
|
|
@@ -36894,7 +36943,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
36894
36943
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
36895
36944
|
}, "refusalAdvice");
|
|
36896
36945
|
|
|
36897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
36898
36947
|
var GENERATED = [
|
|
36899
36948
|
{
|
|
36900
36949
|
"name": "20261010184427_initial",
|
|
@@ -37858,10 +37907,16 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
37858
37907
|
"statements": [
|
|
37859
37908
|
"-- Tests wrote the fake `chat` messenger of src/testing/shared-program.ts into real stores until a test could no longer\n-- open one (#2438). Deleting an account is the store's own purge, in code (every child row, the people only it saw,\n-- the vectors only it held), so the next writable open removes every `chat` account and deletes this key\n-- (purgeTestAccounts). A store without one gets no key, so a test's own `chat` rows written after this stay.\nINSERT OR REPLACE INTO store_settings (key, value, at)\nSELECT 'test_accounts_to_purge', '1', unixepoch() * 1000 WHERE EXISTS (SELECT 1 FROM accounts WHERE provider = 'chat');"
|
|
37860
37909
|
]
|
|
37910
|
+
},
|
|
37911
|
+
{
|
|
37912
|
+
"name": "20261104232153_version-49-relation-amounts",
|
|
37913
|
+
"statements": [
|
|
37914
|
+
"ALTER TABLE `record_relations` ADD `amount` text;"
|
|
37915
|
+
]
|
|
37861
37916
|
}
|
|
37862
37917
|
];
|
|
37863
37918
|
|
|
37864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
37865
37920
|
var MANIFEST = [
|
|
37866
37921
|
{ name: "20261010184427_initial", version: 1, minCompatible: 1 },
|
|
37867
37922
|
{ name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
|
|
@@ -37925,7 +37980,8 @@ var MANIFEST = [
|
|
|
37925
37980
|
{ name: "20261102173113_version-45-finance-rules", version: 45, minCompatible: 34 },
|
|
37926
37981
|
{ name: "20261102185954_version-46-payment-facts", version: 46, minCompatible: 34 },
|
|
37927
37982
|
{ name: "20261102192959_version-47-records", version: 47, minCompatible: 34 },
|
|
37928
|
-
{ name: "20261102222340_version-48-test-accounts", version: 48, minCompatible: 34 }
|
|
37983
|
+
{ name: "20261102222340_version-48-test-accounts", version: 48, minCompatible: 34 },
|
|
37984
|
+
{ name: "20261104232153_version-49-relation-amounts", version: 49, minCompatible: 34 }
|
|
37929
37985
|
];
|
|
37930
37986
|
var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated = GENERATED) => {
|
|
37931
37987
|
const migrations = [];
|
|
@@ -37949,7 +38005,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
37949
38005
|
return migrations;
|
|
37950
38006
|
}, "generatedMigrations");
|
|
37951
38007
|
|
|
37952
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
37953
38009
|
var MIGRATIONS = generatedMigrations();
|
|
37954
38010
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
37955
38011
|
version INTEGER PRIMARY KEY,
|
|
@@ -38002,7 +38058,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
38002
38058
|
}
|
|
38003
38059
|
}, "migrate");
|
|
38004
38060
|
|
|
38005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
38006
38062
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
38007
38063
|
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 ?");
|
|
38008
38064
|
if (pending.get(0, 1) === void 0)
|
|
@@ -38024,7 +38080,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
38024
38080
|
}
|
|
38025
38081
|
}, "fillJoinKeys");
|
|
38026
38082
|
|
|
38027
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38083
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
38028
38084
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
38029
38085
|
refuseOwnerStoreInTests(path);
|
|
38030
38086
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -38038,8 +38094,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
38038
38094
|
}, "openSqlite");
|
|
38039
38095
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
38040
38096
|
quietSqliteWarning();
|
|
38041
|
-
const { drizzle } = await import("./node-
|
|
38042
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
38097
|
+
const { drizzle } = await import("./node-SESRJP6V.js");
|
|
38098
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-E6WGF6VQ.js");
|
|
38043
38099
|
const client = await nodeClient(path, { readOnly });
|
|
38044
38100
|
try {
|
|
38045
38101
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -38049,8 +38105,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
38049
38105
|
}
|
|
38050
38106
|
}, "openUnderNode");
|
|
38051
38107
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
38052
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
38053
|
-
const { drizzle } = await import("./bun-
|
|
38108
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-K2OK3SS6.js");
|
|
38109
|
+
const { drizzle } = await import("./bun-MWSCIVYY.js");
|
|
38054
38110
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
38055
38111
|
try {
|
|
38056
38112
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -38060,7 +38116,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
38060
38116
|
}
|
|
38061
38117
|
}, "openUnderBun");
|
|
38062
38118
|
|
|
38063
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38119
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
38064
38120
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
38065
38121
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
38066
38122
|
try {
|
|
@@ -38128,7 +38184,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
38128
38184
|
});
|
|
38129
38185
|
}, "movePaymentFacts");
|
|
38130
38186
|
|
|
38131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
38132
38188
|
var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
38133
38189
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
38134
38190
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -38143,7 +38199,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
38143
38199
|
throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
|
|
38144
38200
|
}, "assertReadCompatible");
|
|
38145
38201
|
|
|
38146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
38147
38203
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
38148
38204
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
38149
38205
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -38189,7 +38245,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
38189
38245
|
});
|
|
38190
38246
|
}, "moveSuggestedLinks");
|
|
38191
38247
|
|
|
38192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38248
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
38193
38249
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
38194
38250
|
var TEST_PROVIDER = "chat";
|
|
38195
38251
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -38210,7 +38266,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
38210
38266
|
}
|
|
38211
38267
|
}, "purgeTestAccounts");
|
|
38212
38268
|
|
|
38213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
38214
38270
|
var BACKFILL_ON_OPEN = 5e3;
|
|
38215
38271
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
38216
38272
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -38275,10 +38331,10 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
|
|
|
38275
38331
|
}
|
|
38276
38332
|
}, "openStoreContext");
|
|
38277
38333
|
|
|
38278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
38279
38335
|
import { createHash as createHash16 } from "node:crypto";
|
|
38280
38336
|
|
|
38281
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38337
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
38282
38338
|
var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
38283
38339
|
var ref = text4(2048);
|
|
38284
38340
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -38344,7 +38400,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
38344
38400
|
}))
|
|
38345
38401
|
});
|
|
38346
38402
|
|
|
38347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38403
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
38348
38404
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
38349
38405
|
var invalid9 = /* @__PURE__ */ __name((field4) => {
|
|
38350
38406
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -38448,7 +38504,7 @@ var validateProjectAnnotationsGraph = /* @__PURE__ */ __name((manifest, addition
|
|
|
38448
38504
|
invalid9("external.unused");
|
|
38449
38505
|
}, "validateProjectAnnotationsGraph");
|
|
38450
38506
|
|
|
38451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
38452
38508
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
38453
38509
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
38454
38510
|
var targetSchema = strictObject({
|
|
@@ -38554,7 +38610,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
38554
38610
|
};
|
|
38555
38611
|
}, "planBoundProjectAnnotations");
|
|
38556
38612
|
|
|
38557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38613
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
38558
38614
|
import { createHash as createHash17 } from "node:crypto";
|
|
38559
38615
|
var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
38560
38616
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -38648,7 +38704,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
38648
38704
|
})).digest("hex");
|
|
38649
38705
|
}, "projectAnnotationSnapshotFingerprint");
|
|
38650
38706
|
|
|
38651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38707
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
38652
38708
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
38653
38709
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
38654
38710
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -38665,7 +38721,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
38665
38721
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
38666
38722
|
}, "projectAnnotationRequest");
|
|
38667
38723
|
|
|
38668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38724
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
38669
38725
|
var SnapshotBudget = class {
|
|
38670
38726
|
static {
|
|
38671
38727
|
__name(this, "SnapshotBudget");
|
|
@@ -38691,13 +38747,13 @@ var SnapshotBudget = class {
|
|
|
38691
38747
|
}
|
|
38692
38748
|
};
|
|
38693
38749
|
|
|
38694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
38695
38751
|
import { createHash as createHash19 } from "node:crypto";
|
|
38696
38752
|
|
|
38697
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
38698
38754
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
38699
38755
|
|
|
38700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
38701
38757
|
import { createHash as createHash18 } from "node:crypto";
|
|
38702
38758
|
var invalid11 = /* @__PURE__ */ __name(() => {
|
|
38703
38759
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -38840,7 +38896,7 @@ var ProjectSnapshotSources = class {
|
|
|
38840
38896
|
}
|
|
38841
38897
|
};
|
|
38842
38898
|
|
|
38843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
38844
38900
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
38845
38901
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
38846
38902
|
}, "unsupported");
|
|
@@ -39011,7 +39067,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
39011
39067
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
39012
39068
|
}), "projectAnnotationSnapshot");
|
|
39013
39069
|
|
|
39014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
39015
39071
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
39016
39072
|
const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
39017
39073
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -39073,7 +39129,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
39073
39129
|
};
|
|
39074
39130
|
}), "previewAnnotationSnapshot");
|
|
39075
39131
|
|
|
39076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39132
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
39077
39133
|
var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
|
|
39078
39134
|
const mappings = { ...bindings };
|
|
39079
39135
|
const resolve = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -39115,7 +39171,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
39115
39171
|
return mappings;
|
|
39116
39172
|
}, "restoreAnnotationRecords");
|
|
39117
39173
|
|
|
39118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
39119
39175
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
39120
39176
|
async preview(request) {
|
|
39121
39177
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -39145,7 +39201,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
39145
39201
|
}
|
|
39146
39202
|
}), "projectAnnotationStoreOver");
|
|
39147
39203
|
|
|
39148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
39149
39205
|
import { createHash as createHash20 } from "node:crypto";
|
|
39150
39206
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
39151
39207
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -39155,6 +39211,7 @@ var TYPE = "^(invoice|payment|person|organization|project|custom:[a-z0-9][a-z0-9
|
|
|
39155
39211
|
var MAX_ID = 512;
|
|
39156
39212
|
var MAX_FIELDS_BYTES = 65536;
|
|
39157
39213
|
var MAX_RELATIONS = 100;
|
|
39214
|
+
var DECIMAL2 = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
39158
39215
|
var RECORDS_ENVELOPE_SCHEMA = {
|
|
39159
39216
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
39160
39217
|
title: "WireCat records envelope, version 1",
|
|
@@ -39202,13 +39259,19 @@ var RECORDS_ENVELOPE_SCHEMA = {
|
|
|
39202
39259
|
properties: {
|
|
39203
39260
|
role: { type: "string", pattern: WORD4 },
|
|
39204
39261
|
type: { type: "string", pattern: TYPE },
|
|
39205
|
-
external_id: { type: "string", minLength: 1, maxLength: MAX_ID }
|
|
39262
|
+
external_id: { type: "string", minLength: 1, maxLength: MAX_ID },
|
|
39263
|
+
amount: {
|
|
39264
|
+
type: "string",
|
|
39265
|
+
pattern: DECIMAL2,
|
|
39266
|
+
description: "A settles relation's share of the payment, a decimal in its currency"
|
|
39267
|
+
}
|
|
39206
39268
|
}
|
|
39207
39269
|
}
|
|
39208
39270
|
}
|
|
39209
39271
|
};
|
|
39210
39272
|
var wordPattern = new RegExp(WORD4);
|
|
39211
39273
|
var typePattern = new RegExp(TYPE);
|
|
39274
|
+
var decimalPattern = new RegExp(DECIMAL2);
|
|
39212
39275
|
var isObject2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isObject");
|
|
39213
39276
|
var escapePointer = /* @__PURE__ */ __name((segment) => String(segment).replaceAll("~", "~0").replaceAll("/", "~1"), "escapePointer");
|
|
39214
39277
|
var pointerOf = /* @__PURE__ */ __name((...segments) => segments.map((s) => `/${escapePointer(s)}`).join(""), "pointerOf");
|
|
@@ -39245,15 +39308,19 @@ var relationErrors = /* @__PURE__ */ __name((relations, at) => {
|
|
|
39245
39308
|
const here = [...at, index2];
|
|
39246
39309
|
if (!isObject2(relation))
|
|
39247
39310
|
return [invalid12(here, "a relation is an object")];
|
|
39248
|
-
const extra = extraKeys(relation, ["role", "type", "external_id"]);
|
|
39311
|
+
const extra = extraKeys(relation, ["role", "type", "external_id", "amount"]);
|
|
39249
39312
|
if (extra.length > 0)
|
|
39250
|
-
return [invalid12([...here, extra[0]], "a relation holds role, type and
|
|
39313
|
+
return [invalid12([...here, extra[0]], "a relation holds role, type, external_id and amount")];
|
|
39251
39314
|
if (typeof relation.role !== "string" || !wordPattern.test(relation.role))
|
|
39252
39315
|
return [invalid12([...here, "role"], "a role is lowercase letters, digits, - and _")];
|
|
39253
39316
|
if (typeof relation.type !== "string" || !typePattern.test(relation.type))
|
|
39254
39317
|
return [invalid12([...here, "type"], `a type is one of ${RECORD_ENTITY_TYPES.join(", ")} or custom:<name>`)];
|
|
39255
39318
|
if (!idText(relation.external_id))
|
|
39256
39319
|
return [invalid12([...here, "external_id"], `an external id takes 1\u2013${MAX_ID} characters`)];
|
|
39320
|
+
if (relation.amount !== void 0 && (typeof relation.amount !== "string" || !decimalPattern.test(relation.amount)))
|
|
39321
|
+
return [invalid12([...here, "amount"], 'an amount is a decimal string, such as "13000.00"')];
|
|
39322
|
+
if (relation.amount !== void 0 && relation.role !== "settles")
|
|
39323
|
+
return [invalid12([...here, "amount"], "only a settles relation carries an amount")];
|
|
39257
39324
|
return [];
|
|
39258
39325
|
});
|
|
39259
39326
|
}, "relationErrors");
|
|
@@ -39337,7 +39404,12 @@ var canonical2 = /* @__PURE__ */ __name((value) => {
|
|
|
39337
39404
|
}, "canonical");
|
|
39338
39405
|
var recordFingerprint = /* @__PURE__ */ __name((fields4, relations) => createHash20("sha256").update(JSON.stringify(canonical2({
|
|
39339
39406
|
fields: fields4,
|
|
39340
|
-
relations: relations.map((relation) => [
|
|
39407
|
+
relations: relations.map((relation) => [
|
|
39408
|
+
relation.role,
|
|
39409
|
+
relation.type,
|
|
39410
|
+
relation.external_id,
|
|
39411
|
+
...relation.amount === void 0 ? [] : [relation.amount]
|
|
39412
|
+
]).sort((a, b) => a.join("\0").localeCompare(b.join("\0")))
|
|
39341
39413
|
}))).digest("hex"), "recordFingerprint");
|
|
39342
39414
|
var envelopeOfJsonl = /* @__PURE__ */ __name((text6) => {
|
|
39343
39415
|
const lines = text6.split(/\r?\n/);
|
|
@@ -39361,7 +39433,7 @@ var envelopeOfJsonl = /* @__PURE__ */ __name((text6) => {
|
|
|
39361
39433
|
return isObject2(header) ? { ...header, records: records2 } : header;
|
|
39362
39434
|
}, "envelopeOfJsonl");
|
|
39363
39435
|
|
|
39364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
39365
39437
|
var PROJECTED = {
|
|
39366
39438
|
invoice: { roles: ["issuer", "counterparty", "project"], many: [] },
|
|
39367
39439
|
payment: { roles: ["payer", "payee", "project", "settles"], many: ["settles"] }
|
|
@@ -39378,6 +39450,7 @@ var codeOf = /* @__PURE__ */ __name((error) => {
|
|
|
39378
39450
|
return reason;
|
|
39379
39451
|
return error.code === "not_found" ? "record.reference-not-found" : "record.entity";
|
|
39380
39452
|
}, "codeOf");
|
|
39453
|
+
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => relation.role !== "settles")), "unsettled");
|
|
39381
39454
|
var iso12 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
39382
39455
|
var stringField = /* @__PURE__ */ __name((fields4, name) => {
|
|
39383
39456
|
const value = fields4[name];
|
|
@@ -39444,8 +39517,9 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39444
39517
|
const entityRef = /* @__PURE__ */ __name((type, id2) => type == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? `${String(type)}:${String(id2)}`, "entityRef");
|
|
39445
39518
|
const relatedOf = /* @__PURE__ */ __name((recordId, type) => {
|
|
39446
39519
|
const { roles, many } = PROJECTED[type];
|
|
39447
|
-
const rows = sql2("SELECT rr.role, t.entity_type, t.entity_id FROM record_relations rr LEFT JOIN records t ON t.id = rr.target_id AND t.deleted_at IS NULL WHERE rr.record_id = ?").all(recordId);
|
|
39520
|
+
const rows = sql2("SELECT rr.role, rr.amount, t.entity_type, t.entity_id FROM record_relations rr LEFT JOIN records t ON t.id = rr.target_id AND t.deleted_at IS NULL WHERE rr.record_id = ? ORDER BY rr.id").all(recordId);
|
|
39448
39521
|
const related = /* @__PURE__ */ new Map();
|
|
39522
|
+
const shares = [];
|
|
39449
39523
|
const missing4 = /* @__PURE__ */ new Set();
|
|
39450
39524
|
for (const row2 of rows) {
|
|
39451
39525
|
const role = String(row2.role);
|
|
@@ -39456,39 +39530,92 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39456
39530
|
missing4.add(role);
|
|
39457
39531
|
else
|
|
39458
39532
|
related.set(role, [...related.get(role) ?? [], ref3]);
|
|
39533
|
+
if (ref3 !== null && role === "settles")
|
|
39534
|
+
shares.push({ invoice: ref3, amount: row2.amount == null ? null : String(row2.amount) });
|
|
39459
39535
|
}
|
|
39460
39536
|
for (const [role, refs] of related)
|
|
39461
39537
|
if (refs.length > 1 && !many.includes(role))
|
|
39462
39538
|
refusal(`a record has one ${role}`, "record.relation-ambiguous");
|
|
39463
|
-
return { related, missing: [...missing4] };
|
|
39539
|
+
return { related, shares, missing: [...missing4] };
|
|
39464
39540
|
}, "relatedOf");
|
|
39465
39541
|
const project = /* @__PURE__ */ __name((row2, source2) => {
|
|
39466
39542
|
const type = row2.type;
|
|
39467
|
-
const { related, missing: missing4 } = relatedOf(Number(row2.id), type);
|
|
39543
|
+
const { related, shares, missing: missing4 } = relatedOf(Number(row2.id), type);
|
|
39468
39544
|
if (missing4.length > 0)
|
|
39469
39545
|
return { missing: missing4 };
|
|
39470
39546
|
const fields4 = JSON.parse(String(row2.fields));
|
|
39471
39547
|
for (const name of REFERENCE_FIELDS)
|
|
39472
39548
|
stringField(fields4, name);
|
|
39473
|
-
const ref3 = type === "invoice" ? finance.addInvoice(invoiceOf(fields4, related, source2)).ref : settle(fields4, related, source2);
|
|
39549
|
+
const ref3 = type === "invoice" ? finance.addInvoice(invoiceOf(fields4, related, source2)).ref : settle(finance.addPayment(paymentOf2(fields4, related, source2)), shares);
|
|
39474
39550
|
const entity = requiredThing(database, ref3);
|
|
39475
39551
|
sql2("UPDATE records SET entity_type = ?, entity_id = ?, projected_fingerprint = fingerprint WHERE id = ?").run(entity.type, entity.id, Number(row2.id));
|
|
39476
39552
|
return { proposed: ref3, missing: [] };
|
|
39477
39553
|
}, "project");
|
|
39478
|
-
const
|
|
39479
|
-
const
|
|
39554
|
+
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
39555
|
+
const [target, own] = [requiredThing(database, invoice), requiredThing(database, payment)];
|
|
39556
|
+
const row2 = sql2("SELECT i.total - (SELECT coalesce(sum(a.amount), 0) FROM payment_allocations a JOIN payments p ON p.id = a.payment_id WHERE a.invoice_id = i.id AND a.payment_id <> ? AND p.deleted_at IS NULL AND p.review <> 'rejected') AS free FROM invoices i WHERE i.id = ?").get(own.id, target.id);
|
|
39557
|
+
return Number(row2?.free ?? 0);
|
|
39558
|
+
}, "freeOn");
|
|
39559
|
+
const settle = /* @__PURE__ */ __name((made, shares) => {
|
|
39480
39560
|
const units = /* @__PURE__ */ __name((amount) => minorUnits(amount, made.currency), "units");
|
|
39481
39561
|
let left = units(made.unallocated);
|
|
39482
|
-
|
|
39483
|
-
|
|
39562
|
+
const given = shares.filter((one2) => one2.amount !== null);
|
|
39563
|
+
for (const { invoice, amount } of [...given, ...shares.filter((one2) => one2.amount === null)]) {
|
|
39564
|
+
const share = amount === null ? Math.min(left, freeOn(invoice, made.ref)) : units(amount);
|
|
39484
39565
|
if (share <= 0)
|
|
39485
39566
|
continue;
|
|
39486
|
-
|
|
39487
|
-
|
|
39567
|
+
finance.allocate({
|
|
39568
|
+
payment: made.ref,
|
|
39569
|
+
invoice,
|
|
39570
|
+
amount: formatDecimal(share, scaleOf(made.currency)),
|
|
39571
|
+
by: IMPORTER
|
|
39572
|
+
});
|
|
39488
39573
|
left -= share;
|
|
39489
39574
|
}
|
|
39490
39575
|
return made.ref;
|
|
39491
39576
|
}, "settle");
|
|
39577
|
+
const resettle = /* @__PURE__ */ __name((recordId, ref3) => {
|
|
39578
|
+
const payment = finance.payment(ref3);
|
|
39579
|
+
if (payment.review !== "proposed" || payment.author.type !== "bot" || payment.author.name !== IMPORTER.bot)
|
|
39580
|
+
return false;
|
|
39581
|
+
for (const { invoice } of payment.allocations)
|
|
39582
|
+
finance.unallocate({ payment: ref3, invoice, by: IMPORTER });
|
|
39583
|
+
settle(finance.payment(ref3), relatedOf(recordId, "payment").shares);
|
|
39584
|
+
return true;
|
|
39585
|
+
}, "resettle");
|
|
39586
|
+
const checkShares = /* @__PURE__ */ __name((record4) => {
|
|
39587
|
+
const relations = record4.relations ?? [];
|
|
39588
|
+
if (record4.type !== "payment" || !relations.some((relation) => relation.amount !== void 0))
|
|
39589
|
+
return;
|
|
39590
|
+
const fields4 = record4.fields ?? {};
|
|
39591
|
+
if (typeof fields4.currency !== "string")
|
|
39592
|
+
return;
|
|
39593
|
+
const currency = fields4.currency;
|
|
39594
|
+
let left;
|
|
39595
|
+
try {
|
|
39596
|
+
left = minorUnits(fields4.amount, currency);
|
|
39597
|
+
} catch {
|
|
39598
|
+
return;
|
|
39599
|
+
}
|
|
39600
|
+
for (const [index2, { amount }] of relations.entries()) {
|
|
39601
|
+
if (amount === void 0)
|
|
39602
|
+
continue;
|
|
39603
|
+
const at = ["relations", index2, "amount"];
|
|
39604
|
+
let units = 0;
|
|
39605
|
+
try {
|
|
39606
|
+
units = minorUnits(amount, currency, "a settles amount");
|
|
39607
|
+
} catch (error) {
|
|
39608
|
+
if (!(error instanceof CliError))
|
|
39609
|
+
throw error;
|
|
39610
|
+
refusal(error.message, codeOf(error), at);
|
|
39611
|
+
}
|
|
39612
|
+
if (units <= 0)
|
|
39613
|
+
refusal("a settles amount is more than 0", "money.amount", at);
|
|
39614
|
+
left -= units;
|
|
39615
|
+
if (left < 0)
|
|
39616
|
+
refusal(`the settles amounts add up to more than the payment's ${String(fields4.amount)} ${currency}`, "record.over-payment", at);
|
|
39617
|
+
}
|
|
39618
|
+
}, "checkShares");
|
|
39492
39619
|
const completeDependents = /* @__PURE__ */ __name((target, source2, proposed, laterErrors) => {
|
|
39493
39620
|
const queue = [target];
|
|
39494
39621
|
while (queue.length > 0) {
|
|
@@ -39512,10 +39639,15 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39512
39639
|
}
|
|
39513
39640
|
}
|
|
39514
39641
|
}, "completeDependents");
|
|
39642
|
+
const storedRelations = /* @__PURE__ */ __name((recordId) => sql2("SELECT role, target_type, target_external_id FROM record_relations WHERE record_id = ?").all(recordId).map((row2) => ({
|
|
39643
|
+
role: String(row2.role),
|
|
39644
|
+
type: String(row2.target_type),
|
|
39645
|
+
external_id: String(row2.target_external_id)
|
|
39646
|
+
})), "storedRelations");
|
|
39515
39647
|
const relate = /* @__PURE__ */ __name((recordId, accountId, relations, at) => {
|
|
39516
39648
|
sql2("DELETE FROM record_relations WHERE record_id = ?").run(recordId);
|
|
39517
39649
|
for (const relation of relations)
|
|
39518
|
-
sql2("INSERT OR IGNORE INTO record_relations (record_id, role, target_type, target_external_id, target_id, created_at) VALUES (?, ?, ?, ?, (SELECT id FROM records WHERE account_id = ? AND type = ? AND external_id = ?), ?)").run(recordId, relation.role, relation.type, relation.external_id, accountId, relation.type, relation.external_id, at);
|
|
39650
|
+
sql2("INSERT OR IGNORE INTO record_relations (record_id, role, target_type, target_external_id, target_id, created_at, amount) VALUES (?, ?, ?, ?, (SELECT id FROM records WHERE account_id = ? AND type = ? AND external_id = ?), ?, ?)").run(recordId, relation.role, relation.type, relation.external_id, accountId, relation.type, relation.external_id, at, relation.amount ?? null);
|
|
39519
39651
|
}, "relate");
|
|
39520
39652
|
const writeOne = /* @__PURE__ */ __name((accountId, source2, { record: record4 }, proposed) => {
|
|
39521
39653
|
const stored3 = sql2("SELECT * FROM records WHERE account_id = ? AND type = ? AND external_id = ?").get(accountId, record4.type, record4.external_id);
|
|
@@ -39544,6 +39676,8 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39544
39676
|
const fields4 = JSON.stringify(record4.fields);
|
|
39545
39677
|
if (stored3 && stored3.fingerprint === fingerprint2 && stored3.deleted_at == null)
|
|
39546
39678
|
return { status: "unchanged", id: Number(stored3.id) };
|
|
39679
|
+
checkShares(record4);
|
|
39680
|
+
const beyondSettles = stored3?.entity_id != null && (stored3.projected_fingerprint !== stored3.fingerprint || unsettled(JSON.parse(String(stored3.fields)), storedRelations(Number(stored3.id))) !== unsettled(record4.fields ?? {}, relations));
|
|
39547
39681
|
const id2 = stored3 ? Number(stored3.id) : Number(sql2("INSERT INTO records (account_id, type, external_id, fields, revision, fingerprint, batch_id, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id").get(accountId, record4.type, record4.external_id, fields4, revision2, fingerprint2, source2.batch_id, time3, time3)?.id);
|
|
39548
39682
|
if (stored3)
|
|
39549
39683
|
sql2("UPDATE records SET fields = ?, revision = ?, fingerprint = ?, batch_id = ?, updated_at = ?, deleted_at = NULL WHERE id = ?").run(fields4, revision2, fingerprint2, source2.batch_id, time3, id2);
|
|
@@ -39551,16 +39685,26 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39551
39685
|
sql2("UPDATE record_relations SET target_id = ? WHERE target_id IS NULL AND target_type = ? AND target_external_id = ? AND record_id IN (SELECT id FROM records WHERE account_id = ?)").run(id2, record4.type, record4.external_id, accountId);
|
|
39552
39686
|
relate(id2, accountId, relations, time3);
|
|
39553
39687
|
let projected = false;
|
|
39688
|
+
let flagged = stored3?.entity_id != null && stored3.projected_fingerprint !== fingerprint2;
|
|
39554
39689
|
if (isProjected(record4.type) && stored3?.entity_id == null) {
|
|
39555
39690
|
const done = project({ id: id2, type: record4.type, fields: fields4, account_id: accountId }, source2);
|
|
39556
39691
|
if (done.proposed)
|
|
39557
39692
|
proposed.push(done.proposed);
|
|
39558
39693
|
projected = done.proposed !== void 0;
|
|
39694
|
+
} else if (record4.type === "payment" && stored3?.entity_type === "payment" && stored3.deleted_at == null) {
|
|
39695
|
+
const ref3 = `payment:${Number(stored3.entity_id)}`;
|
|
39696
|
+
if (resettle(id2, ref3)) {
|
|
39697
|
+
proposed.push(ref3);
|
|
39698
|
+
if (!beyondSettles) {
|
|
39699
|
+
sql2("UPDATE records SET projected_fingerprint = fingerprint WHERE id = ?").run(id2);
|
|
39700
|
+
flagged = false;
|
|
39701
|
+
}
|
|
39702
|
+
}
|
|
39559
39703
|
}
|
|
39560
39704
|
return {
|
|
39561
39705
|
status: stored3 ? "updated" : "created",
|
|
39562
39706
|
id: id2,
|
|
39563
|
-
flagged
|
|
39707
|
+
flagged,
|
|
39564
39708
|
// Records waiting on this one move only when it has an entity: made now, or back from a delete.
|
|
39565
39709
|
complete: projected || stored3?.deleted_at != null && stored3.entity_id != null
|
|
39566
39710
|
};
|
|
@@ -39603,7 +39747,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39603
39747
|
if (!(error instanceof CliError))
|
|
39604
39748
|
throw error;
|
|
39605
39749
|
const at = error.details?.at ?? "fields";
|
|
39606
|
-
const pointer = pointerOf("records", item.index, at);
|
|
39750
|
+
const pointer = pointerOf("records", item.index, ...[at].flat());
|
|
39607
39751
|
outcomes.push({
|
|
39608
39752
|
index: item.index,
|
|
39609
39753
|
key: item.record.key,
|
|
@@ -39630,10 +39774,11 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39630
39774
|
fields: JSON.parse(String(row2.fields)),
|
|
39631
39775
|
revision: row2.revision == null ? null : Number(row2.revision),
|
|
39632
39776
|
fingerprint: String(row2.fingerprint),
|
|
39633
|
-
relations: sql2("SELECT role, target_type, target_external_id, target_id FROM record_relations WHERE record_id = ? ORDER BY id").all(Number(row2.id)).map((relation) => ({
|
|
39777
|
+
relations: sql2("SELECT role, target_type, target_external_id, target_id, amount FROM record_relations WHERE record_id = ? ORDER BY id").all(Number(row2.id)).map((relation) => ({
|
|
39634
39778
|
role: String(relation.role),
|
|
39635
39779
|
type: String(relation.target_type),
|
|
39636
39780
|
externalId: String(relation.target_external_id),
|
|
39781
|
+
amount: relation.amount == null ? null : String(relation.amount),
|
|
39637
39782
|
resolved: relation.target_id != null
|
|
39638
39783
|
})),
|
|
39639
39784
|
entity: entityRef(row2.entity_type, row2.entity_id),
|
|
@@ -39701,7 +39846,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39701
39846
|
};
|
|
39702
39847
|
}, "recordStoreOver");
|
|
39703
39848
|
|
|
39704
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
39705
39850
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
39706
39851
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
39707
39852
|
let merged = { from: from2, to };
|
|
@@ -39714,7 +39859,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
39714
39859
|
}, "markRange");
|
|
39715
39860
|
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");
|
|
39716
39861
|
|
|
39717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
39718
39863
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
39719
39864
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
39720
39865
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -39735,7 +39880,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
39735
39880
|
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);
|
|
39736
39881
|
}, "setTaskAnalysisMark");
|
|
39737
39882
|
|
|
39738
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
39739
39884
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
39740
39885
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
39741
39886
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
|
|
@@ -39745,7 +39890,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
39745
39890
|
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);
|
|
39746
39891
|
}, "setTaskRulesStop");
|
|
39747
39892
|
|
|
39748
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
39749
39894
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
39750
39895
|
const { database } = context;
|
|
39751
39896
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -39804,7 +39949,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39804
39949
|
};
|
|
39805
39950
|
}, "syncStoreOver");
|
|
39806
39951
|
|
|
39807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
39808
39953
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
39809
39954
|
const { database } = context;
|
|
39810
39955
|
return {
|
|
@@ -39826,7 +39971,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39826
39971
|
};
|
|
39827
39972
|
}, "tagsStoreOver");
|
|
39828
39973
|
|
|
39829
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
39830
39975
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
39831
39976
|
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
|
|
39832
39977
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -39953,7 +40098,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
39953
40098
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
39954
40099
|
}, "savePictureChunks");
|
|
39955
40100
|
|
|
39956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40101
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
39957
40102
|
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,
|
|
39958
40103
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
39959
40104
|
FROM messages m
|
|
@@ -40042,7 +40187,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
40042
40187
|
return plain2(best(found2));
|
|
40043
40188
|
}, "nearestMessages");
|
|
40044
40189
|
|
|
40045
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40190
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
40046
40191
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
40047
40192
|
const { database } = context;
|
|
40048
40193
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -40300,7 +40445,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
40300
40445
|
embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
|
|
40301
40446
|
}), "vectorsStoreOver");
|
|
40302
40447
|
|
|
40303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
40304
40449
|
import { existsSync, readFileSync as readFileSync4 } from "node:fs";
|
|
40305
40450
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
40306
40451
|
var BOOKKEEPING = ["schema_migrations", "store_settings"];
|
|
@@ -40388,10 +40533,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
40388
40533
|
}
|
|
40389
40534
|
}, "lastBackup");
|
|
40390
40535
|
|
|
40391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
40392
40537
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
40393
40538
|
|
|
40394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40539
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
40395
40540
|
var COUNTED_TABLES = [
|
|
40396
40541
|
"accounts",
|
|
40397
40542
|
"chats",
|
|
@@ -40476,7 +40621,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
40476
40621
|
};
|
|
40477
40622
|
}, "storeContents");
|
|
40478
40623
|
|
|
40479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.572.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ed77a8fcc4bb89e891ff55f6d86f2f53/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
40480
40625
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
40481
40626
|
const context = await openStoreContext(options);
|
|
40482
40627
|
try {
|