@wirecat/tg-cli 0.127.0 → 0.128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/tg.js +2 -2
- package/dist/bundle/{adapter-EZFS2UR6.js → adapter-JOI34QLS.js} +43 -43
- package/dist/bundle/{all-profiles-TNIUBQK6.js → all-profiles-2BZEE7J2.js} +18 -28
- package/dist/bundle/{anthropic-NGIS5LTL.js → anthropic-NW7DL3S3.js} +2 -2
- package/dist/bundle/{app-server-RPU76G7D.js → app-server-RUTYKELF.js} +39 -54
- package/dist/bundle/{bot-api-QJ6U6BLG.js → bot-api-DW6NAZAQ.js} +44 -44
- package/dist/bundle/{bot-history-THULK2C6.js → bot-history-FAJ2W42U.js} +12 -12
- package/dist/bundle/{bun-QLSLLP27.js → bun-IVP5LSVI.js} +2 -2
- package/dist/bundle/{bun-sqlite-SH5245ZY.js → bun-sqlite-ATPCJ4CT.js} +3 -3
- package/dist/bundle/{chunk-4CQ3PV3V.js → chunk-2A3TC52A.js} +7 -7
- package/dist/bundle/{chunk-SN52ZGFN.js → chunk-2IL4YDGG.js} +2 -2
- package/dist/bundle/{chunk-TGKTIDYS.js → chunk-2QHIOPSA.js} +176 -150
- package/dist/bundle/{chunk-ZSS3BH6Z.js → chunk-3UGRMFWK.js} +2 -2
- package/dist/bundle/{chunk-QPVCFSVU.js → chunk-4DSIGS2E.js} +5 -5
- package/dist/bundle/{chunk-BNM6KNUQ.js → chunk-5AP25FMW.js} +1 -1
- package/dist/bundle/{chunk-ERUB3KU3.js → chunk-7D6LI2N7.js} +5 -5
- package/dist/bundle/{chunk-FSDLSEZA.js → chunk-7I5NMVX7.js} +1 -1
- package/dist/bundle/{chunk-3WI53AA4.js → chunk-AF2XVV5P.js} +648 -239
- package/dist/bundle/{chunk-3I3TGKVG.js → chunk-BVCRDHI2.js} +3 -3
- package/dist/bundle/{chunk-JF7D2Y4K.js → chunk-E56QE3UC.js} +352 -325
- package/dist/bundle/{chunk-J6FHZXNS.js → chunk-EAUHYQUK.js} +40 -48
- package/dist/bundle/{chunk-IWJ5OLU6.js → chunk-F4UIBEQK.js} +2 -2
- package/dist/bundle/{chunk-DNNYE6PS.js → chunk-FHGAJK4I.js} +16 -13
- package/dist/bundle/{chunk-MTU3UP5U.js → chunk-G3PL3R45.js} +1 -1
- package/dist/bundle/{chunk-Y7UA7HGL.js → chunk-GYO4WXLG.js} +2 -2
- package/dist/bundle/{chunk-LOG65WHO.js → chunk-IHLNXL2D.js} +1 -1
- package/dist/bundle/{chunk-P5NJECXX.js → chunk-IIHCSJV2.js} +507 -340
- package/dist/bundle/{chunk-4FFKCC7Y.js → chunk-IV2KJQ5F.js} +16 -15
- package/dist/bundle/{chunk-EGNQSWPH.js → chunk-J3SX36NE.js} +1 -1
- package/dist/bundle/{chunk-CXWAKV2O.js → chunk-JI2PFQFL.js} +5 -5
- package/dist/bundle/{chunk-S3XUJPPL.js → chunk-JJGPU24U.js} +4 -4
- package/dist/bundle/{chunk-XUAVZ6YX.js → chunk-KF2Q776U.js} +7 -7
- package/dist/bundle/{chunk-3CV5TBBR.js → chunk-KKZQK6IK.js} +2 -2
- package/dist/bundle/{chunk-VMV5CMLH.js → chunk-LTADKMP5.js} +1 -1
- package/dist/bundle/{chunk-X4ECHJNG.js → chunk-MC6FOTCV.js} +98 -6
- package/dist/bundle/{chunk-BWHVHPAQ.js → chunk-MDGLKMLD.js} +5 -5
- package/dist/bundle/{chunk-APSMQIA4.js → chunk-MGBVVQTU.js} +2 -2
- package/dist/bundle/{chunk-JWEKUAVZ.js → chunk-MOUPWPNL.js} +10 -10
- package/dist/bundle/{chunk-NBN5OYXH.js → chunk-NXDQXDRN.js} +3 -3
- package/dist/bundle/{chunk-GHVRCLJI.js → chunk-ODBK56ZR.js} +1 -1
- package/dist/bundle/{chunk-7GE6KMLB.js → chunk-OX6574YV.js} +11 -11
- package/dist/bundle/{chunk-2R6ZSE3O.js → chunk-PJA43HVE.js} +2 -2
- package/dist/bundle/{chunk-5AOFOJQA.js → chunk-Q3ZO6Q3M.js} +4 -4
- package/dist/bundle/{chunk-FD44T7HC.js → chunk-QO4ON2X7.js} +1 -1
- package/dist/bundle/{chunk-Y65BQJOY.js → chunk-QYN5RDTZ.js} +2 -2
- package/dist/bundle/{chunk-R52ZZZKZ.js → chunk-R4QVV3LN.js} +23 -12
- package/dist/bundle/{chunk-UIQMBOXU.js → chunk-RIGNCUZD.js} +1 -1
- package/dist/bundle/{chunk-5SN6KFPC.js → chunk-RZFIQMOA.js} +55 -52
- package/dist/bundle/{chunk-4MKRKW6V.js → chunk-SDLJJF7E.js} +12 -12
- package/dist/bundle/{chunk-HPM47WO3.js → chunk-T2CWSFGY.js} +394 -378
- package/dist/bundle/{chunk-JFQZ6BWI.js → chunk-TGUXKG4B.js} +16 -16
- package/dist/bundle/{chunk-Y62I2T36.js → chunk-TQFUAKU6.js} +1 -1
- package/dist/bundle/{chunk-UW34Z7J3.js → chunk-UURJO46N.js} +1 -1
- package/dist/bundle/{chunk-K4VO7S6Q.js → chunk-WG3BF7SA.js} +1 -1
- package/dist/bundle/{chunk-YIPOWJPN.js → chunk-WMF6SL5D.js} +1 -1
- package/dist/bundle/{chunk-UY2TRFYN.js → chunk-WMUPZ3IY.js} +10 -10
- package/dist/bundle/{chunk-H7GAFD4N.js → chunk-WPMJQIEU.js} +1 -1
- package/dist/bundle/{chunk-5FDYMMEQ.js → chunk-XYAH6QQO.js} +2 -2
- package/dist/bundle/{chunk-YZGIQY2R.js → chunk-YSXDCSBP.js} +33 -23
- package/dist/bundle/{chunk-45URY64S.js → chunk-YVV5S2QA.js} +1 -1
- package/dist/bundle/{chunk-5KZKVKWU.js → chunk-ZVLYK6CZ.js} +6 -6
- package/dist/bundle/{command-contract-DY6Y4TES.js → command-contract-3BSXDYBC.js} +13 -13
- package/dist/bundle/{command-server-entry-UG2CLYXI.js → command-server-entry-BU3X4XNL.js} +20 -20
- package/dist/bundle/{decode-3NEUZJ2N.js → decode-NXB7E46F.js} +2 -2
- package/dist/bundle/{echarts-CN6ZVAJZ.js → echarts-NAXLKJLA.js} +2 -2
- package/dist/bundle/{embed-M4EHIKA5.js → embed-LB6ONWHX.js} +3 -3
- package/dist/bundle/{embedder-K2XL2UB4.js → embedder-WE7B2RU5.js} +6 -6
- package/dist/bundle/{entry-6M55YL2H.js → entry-W6Y52ZRN.js} +6 -6
- package/dist/bundle/{first-run-TLJILIOF.js → first-run-NVYNZZA6.js} +5 -5
- package/dist/bundle/{first-screen-WME7ILW2.js → first-screen-Z6TVHK6I.js} +14 -14
- package/dist/bundle/{instructions-QLC2AXAB.js → instructions-MRUC57NS.js} +1 -1
- package/dist/bundle/{node-BAA3T4CH.js → node-G7PMDYQV.js} +2 -2
- package/dist/bundle/{node-sqlite-FNYVHQCO.js → node-sqlite-RXWQ3SES.js} +4 -4
- package/dist/bundle/{oauth-32T5KL5E.js → oauth-6ZWOL6KX.js} +4 -4
- package/dist/bundle/{open-4VQ6FUEI.js → open-V7LMZCFI.js} +2 -2
- package/dist/bundle/{openai-HDOKCN3Z.js → openai-P472V4ZM.js} +12 -12
- package/dist/bundle/{process-GOUBIWKC.js → process-GSNPENHL.js} +1 -1
- package/dist/bundle/{program-QFXJL2R5.js → program-IELITPKT.js} +46 -46
- package/dist/bundle/{prompt-YYODWYFO.js → prompt-2CP6CQ5N.js} +2 -2
- package/dist/bundle/{recognize-7ZULX5HL.js → recognize-R2DEQ5TC.js} +1 -1
- package/dist/bundle/{remote-TUG7M5Y5.js → remote-JG3POFES.js} +6 -6
- package/dist/bundle/{rerank-D2EZWG66.js → rerank-TVMR3OLL.js} +4 -4
- package/dist/bundle/{serve-MP3GA2XX.js → serve-DBWSMLPH.js} +6 -6
- package/dist/bundle/{server-D277L3H3.js → server-EXJ2WNZY.js} +37 -35
- package/dist/bundle/server-SXNFFAIR.js +61 -0
- package/dist/bundle/{sqlite-runtime-XHZXEOLY.js → sqlite-runtime-AWMY7W4Q.js} +3 -3
- package/dist/bundle/{state-YI3W6HGO.js → state-HN44BWNQ.js} +3 -3
- package/dist/bundle/{store-C4RFPYPK.js → store-GIYS3LHV.js} +9 -9
- package/dist/bundle/{store-CIZPJFWE.js → store-LOVKYQDC.js} +11 -11
- package/dist/bundle/store-maintenance-command-X3VOYNCG.js +52 -0
- package/dist/bundle/tg.js +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/chunk-ZIPUVOGT.js +0 -76
- package/dist/bundle/server-GEP7QXGI.js +0 -62
- package/dist/bundle/store-maintenance-command-JNDYWFD2.js +0 -52
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
fold,
|
|
13
13
|
normalize,
|
|
14
14
|
parseStemmers
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2A3TC52A.js";
|
|
16
16
|
import {
|
|
17
17
|
SQLiteTable,
|
|
18
18
|
TableAliasProxyHandler,
|
|
@@ -37,17 +37,17 @@ import {
|
|
|
37
37
|
sql,
|
|
38
38
|
sqliteTable,
|
|
39
39
|
text
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-WG3BF7SA.js";
|
|
41
41
|
import {
|
|
42
42
|
quietSqliteWarning,
|
|
43
43
|
storeCapable
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-JI2PFQFL.js";
|
|
45
45
|
import {
|
|
46
46
|
PRAGMAS,
|
|
47
47
|
TIME_LIMIT_FUNCTION,
|
|
48
48
|
TimeLimitReached,
|
|
49
49
|
isQueryOnly
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-LTADKMP5.js";
|
|
51
51
|
import {
|
|
52
52
|
ACCOUNT_GROUPS,
|
|
53
53
|
ADDED_ACCOUNT,
|
|
@@ -229,20 +229,20 @@ import {
|
|
|
229
229
|
walkQuery,
|
|
230
230
|
walletLine,
|
|
231
231
|
zonedMoment
|
|
232
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-AF2XVV5P.js";
|
|
233
233
|
import {
|
|
234
234
|
sqliteCode
|
|
235
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-MGBVVQTU.js";
|
|
236
236
|
import {
|
|
237
237
|
DEFAULT_TASK_CATEGORIES,
|
|
238
238
|
sharedConfigPath,
|
|
239
239
|
storedTaskCategories,
|
|
240
240
|
taskCategoriesReader
|
|
241
|
-
} from "./chunk-
|
|
241
|
+
} from "./chunk-7D6LI2N7.js";
|
|
242
242
|
import {
|
|
243
243
|
refuseOwnerStoreInTests,
|
|
244
244
|
storePath
|
|
245
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-TQFUAKU6.js";
|
|
246
246
|
import {
|
|
247
247
|
array,
|
|
248
248
|
boolean,
|
|
@@ -10012,7 +10012,7 @@ var require_cjs = __commonJS({
|
|
|
10012
10012
|
}
|
|
10013
10013
|
});
|
|
10014
10014
|
|
|
10015
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10015
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
10016
10016
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
10017
10017
|
const methods = whole;
|
|
10018
10018
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10140,7 +10140,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10140
10140
|
};
|
|
10141
10141
|
}, "bindAccount");
|
|
10142
10142
|
|
|
10143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10143
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10144
10144
|
var IndexBuilderOn = class {
|
|
10145
10145
|
static {
|
|
10146
10146
|
__name(this, "IndexBuilderOn");
|
|
@@ -10335,7 +10335,7 @@ function alias(table, alias2) {
|
|
|
10335
10335
|
}
|
|
10336
10336
|
__name(alias, "alias");
|
|
10337
10337
|
|
|
10338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/record-fields.js
|
|
10339
10339
|
var DECIMAL_PATTERN = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
10340
10340
|
var SIGNED_DECIMAL = "^-?[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
10341
10341
|
var DAY = "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
|
|
@@ -10385,7 +10385,7 @@ var arrayOf = /* @__PURE__ */ __name((item, maxItems, description) => ({
|
|
|
10385
10385
|
}), "arrayOf");
|
|
10386
10386
|
var isObject = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isObject");
|
|
10387
10387
|
|
|
10388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/record-types.js
|
|
10389
10389
|
var kept = /* @__PURE__ */ __name((description) => ({ description }), "kept");
|
|
10390
10390
|
var PARTY = ["person", "organization"];
|
|
10391
10391
|
var ORGANIZATION = ["organization"];
|
|
@@ -10780,7 +10780,7 @@ var hasV1Roles = /* @__PURE__ */ __name((type) => rolesOf2(type).some(([, role])
|
|
|
10780
10780
|
var IDENTITY_TYPES = RECORD_ENTITY_TYPES.filter((type) => RECORD_TYPES[type].review === "identity");
|
|
10781
10781
|
var article = /* @__PURE__ */ __name((word2) => /^[aeiou]/.test(word2) ? "an" : "a", "article");
|
|
10782
10782
|
|
|
10783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10784
10784
|
var ENTITY_TABLES = {
|
|
10785
10785
|
...RECORD_TABLES,
|
|
10786
10786
|
account: "accounts",
|
|
@@ -10819,7 +10819,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10819
10819
|
return { table, pointer, type, count: count2, known: known2 };
|
|
10820
10820
|
}).filter(({ count: count2 }) => count2 > 0)), "orphanPointers");
|
|
10821
10821
|
|
|
10822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
10823
10823
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
10824
10824
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
10825
10825
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -10876,7 +10876,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
10876
10876
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
10877
10877
|
}, "proposedBySql");
|
|
10878
10878
|
|
|
10879
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
|
|
10880
10880
|
var TABLES = { memory: "memories", fact: "facts" };
|
|
10881
10881
|
var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
|
|
10882
10882
|
var KEPT = 20;
|
|
@@ -10971,7 +10971,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
|
|
|
10971
10971
|
return scrubbed;
|
|
10972
10972
|
}, "scrubSourceReviews");
|
|
10973
10973
|
|
|
10974
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
10975
10975
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
10976
10976
|
var REFERABLE = {
|
|
10977
10977
|
...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
|
|
@@ -11131,7 +11131,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
11131
11131
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
11132
11132
|
}, "taskIdOf");
|
|
11133
11133
|
|
|
11134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
|
|
11135
11135
|
var QUOTE_LIMIT = 500;
|
|
11136
11136
|
var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
|
|
11137
11137
|
var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
|
|
@@ -11410,11 +11410,11 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at2) => {
|
|
|
11410
11410
|
database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
|
|
11411
11411
|
}, "deleteDocumentRow");
|
|
11412
11412
|
|
|
11413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/identity-links.js
|
|
11414
11414
|
var IDENTITY_LINK_KIND = "identity_link";
|
|
11415
11415
|
var IDENTITY_LINK_SIGNALS = ["agent", "phone", "email", "guest-email", "name", "account"];
|
|
11416
11416
|
|
|
11417
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/merged-persons.js
|
|
11418
11418
|
var SEPARATIONS = ["unlink", "split", "undo-merge"];
|
|
11419
11419
|
var mergeSql = /* @__PURE__ */ __name((event2) => `(${event2}.from_person_id IS NOT NULL AND ${event2}.from_person_id <> ${event2}.to_person_id AND ${event2}.method NOT IN (${SEPARATIONS.map((method) => `'${method}'`).join(", ")}) AND NOT EXISTS (SELECT 1 FROM identity_link_events stay WHERE stay.to_person_id = ${event2}.from_person_id AND stay.identity_id <> ${event2}.identity_id AND stay.id < ${event2}.id AND stay.id = (SELECT max(s.id) FROM identity_link_events s WHERE s.identity_id = stay.identity_id AND s.id < ${event2}.id) AND NOT EXISTS (SELECT 1 FROM identity_link_events went WHERE went.identity_id = stay.identity_id AND went.from_person_id = ${event2}.from_person_id AND went.to_person_id = ${event2}.to_person_id AND went.id = (SELECT min(w.id) FROM identity_link_events w WHERE w.identity_id = stay.identity_id AND w.id > ${event2}.id))))`, "mergeSql");
|
|
11420
11420
|
var mergedAwaySql = /* @__PURE__ */ __name((person2) => `(${person2}.owner = 0 AND NOT EXISTS (SELECT 1 FROM identity_links ml WHERE ml.person_id = ${person2}.id) AND EXISTS (SELECT 1 FROM identity_link_events me WHERE me.from_person_id = ${person2}.id AND ${mergeSql("me")}))`, "mergedAwaySql");
|
|
@@ -11446,7 +11446,7 @@ var samePersons = /* @__PURE__ */ __name((database, pk) => {
|
|
|
11446
11446
|
}, "samePersons");
|
|
11447
11447
|
var idsOf = /* @__PURE__ */ __name((database, type, id2) => JSON.stringify(type === "person" ? samePersons(database, id2) : [id2]), "idsOf");
|
|
11448
11448
|
|
|
11449
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11449
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-link-rows.js
|
|
11450
11450
|
var pairOf = /* @__PURE__ */ __name((a, b) => [Number(a), Number(b)].sort((x, y) => x - y).join("-"), "pairOf");
|
|
11451
11451
|
var pkOf = /* @__PURE__ */ __name((database, ref3) => {
|
|
11452
11452
|
const at2 = ref3.indexOf(":");
|
|
@@ -11553,13 +11553,13 @@ var forgetErasedLinks = /* @__PURE__ */ __name((database) => {
|
|
|
11553
11553
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
11554
11554
|
}, "forgetErasedLinks");
|
|
11555
11555
|
|
|
11556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/identity-splits.js
|
|
11557
11557
|
var IDENTITY_SPLIT_KIND = "identity_split";
|
|
11558
11558
|
|
|
11559
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11559
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
11560
11560
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
11561
11561
|
|
|
11562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
11563
11563
|
var TASK_CLOSE_KIND = "task_close";
|
|
11564
11564
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
11565
11565
|
var isOwnerOnlyKind = /* @__PURE__ */ __name((kind3) => kind3 === MAIL_FINDINGS_KIND || kind3 === MEETING_FINDINGS_KIND || kind3 === TASK_CLOSE_KIND || kind3 === SOURCE_REVIEW_KIND || kind3 === IDENTITY_LINK_KIND || kind3 === IDENTITY_SPLIT_KIND, "isOwnerOnlyKind");
|
|
@@ -11607,7 +11607,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
11607
11607
|
}, "assertMayDecide");
|
|
11608
11608
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
11609
11609
|
|
|
11610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/addresses.js
|
|
11611
11611
|
var EMAIL_ADDRESS = /^[^\s@]+@[^\s@]+\.[^\s@]+$/u;
|
|
11612
11612
|
var isEmailAddress = /* @__PURE__ */ __name((value) => EMAIL_ADDRESS.test(value), "isEmailAddress");
|
|
11613
11613
|
var ROLE_ADDRESS_WORDS = {
|
|
@@ -11669,7 +11669,7 @@ var PERSON_LIKE = /* @__PURE__ */ new Set(["hr"]);
|
|
|
11669
11669
|
var isPersonLikeRoleAddress = /* @__PURE__ */ __name((address) => PERSON_LIKE.has(localWord(address)), "isPersonLikeRoleAddress");
|
|
11670
11670
|
var isNoReplyAddress = /* @__PURE__ */ __name((address) => NO_REPLY.has(localWord(address)), "isNoReplyAddress");
|
|
11671
11671
|
|
|
11672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11672
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
11673
11673
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
11674
11674
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
11675
11675
|
var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
@@ -11699,7 +11699,7 @@ var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
|
11699
11699
|
]);
|
|
11700
11700
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
11701
11701
|
|
|
11702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11702
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/address-organization.js
|
|
11703
11703
|
var BY_ADDRESS = "SELECT DISTINCT o.id FROM organizations o JOIN organization_identities oi ON oi.organization_id = o.id JOIN identities i ON i.id = oi.identity_id WHERE o.deleted_at IS NULL AND i.provider = 'email' AND ";
|
|
11704
11704
|
var idsOf2 = /* @__PURE__ */ __name((rows) => rows.map((row2) => Number(row2.id)), "idsOf");
|
|
11705
11705
|
var holdAddress = /* @__PURE__ */ __name(({ database, now: now2 }, organization2, email, { method, author }) => {
|
|
@@ -11724,7 +11724,7 @@ var organizationOfAddress = /* @__PURE__ */ __name((context, { name, email, meth
|
|
|
11724
11724
|
return id2;
|
|
11725
11725
|
}, "organizationOfAddress");
|
|
11726
11726
|
|
|
11727
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
11728
11728
|
var PHONE_PLANS = [
|
|
11729
11729
|
{
|
|
11730
11730
|
country: "us",
|
|
@@ -12104,7 +12104,7 @@ var PHONE_PLANS = [
|
|
|
12104
12104
|
}
|
|
12105
12105
|
];
|
|
12106
12106
|
|
|
12107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
12108
12108
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
12109
12109
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
12110
12110
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -12179,10 +12179,10 @@ var storedPhone = /* @__PURE__ */ __name((raw, provider) => {
|
|
|
12179
12179
|
return found2 ? `+${found2[1]}` : void 0;
|
|
12180
12180
|
}, "storedPhone");
|
|
12181
12181
|
|
|
12182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
12183
12183
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
12184
12184
|
|
|
12185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12185
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/journal.js
|
|
12186
12186
|
import { existsSync, statSync } from "node:fs";
|
|
12187
12187
|
var watched = /* @__PURE__ */ new WeakMap();
|
|
12188
12188
|
var walInode = /* @__PURE__ */ __name((store) => statSync(`${store}-wal`, { throwIfNoEntry: false })?.ino, "walInode");
|
|
@@ -12208,7 +12208,7 @@ var checkJournal = /* @__PURE__ */ __name((database) => {
|
|
|
12208
12208
|
throw new CliError("conflict", "the store's journal file was deleted or replaced by another program while this command had the store open, so nothing more is written; `store recover` says what to do", { reason: "store.journal-replaced" });
|
|
12209
12209
|
}, "checkJournal");
|
|
12210
12210
|
|
|
12211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/write-events.js
|
|
12212
12212
|
var WRITE = /^\s*(?:WITH\b[\s\S]*?\)\s*)?(INSERT|REPLACE|UPDATE|DELETE)\b(?:\s+OR\s+[A-Za-z]+)?\s+(?:INTO\s+|FROM\s+)?(?:("?)(\w+)\2\.)?["`[]?(\w+)/i;
|
|
12213
12213
|
var writeTarget = /* @__PURE__ */ __name((sql2) => {
|
|
12214
12214
|
const match = WRITE.exec(sql2);
|
|
@@ -12288,7 +12288,7 @@ var committedWrites = /* @__PURE__ */ __name((database) => {
|
|
|
12288
12288
|
}, "committedWrites");
|
|
12289
12289
|
var droppedWrites = /* @__PURE__ */ __name((database) => tallies.get(database)?.pending.clear(), "droppedWrites");
|
|
12290
12290
|
|
|
12291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12291
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
12292
12292
|
var ARMS = [
|
|
12293
12293
|
[
|
|
12294
12294
|
"message",
|
|
@@ -12416,7 +12416,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
12416
12416
|
return recomputed;
|
|
12417
12417
|
}, "drainInvolvementQueue");
|
|
12418
12418
|
|
|
12419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
12420
12420
|
import { domainToUnicode } from "node:url";
|
|
12421
12421
|
|
|
12422
12422
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -22438,7 +22438,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
22438
22438
|
}, "oa");
|
|
22439
22439
|
var na = { parse: O, get: aa, isValid: oa };
|
|
22440
22440
|
|
|
22441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22441
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
22442
22442
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
22443
22443
|
var ID = /^[\w-]{10,}$/;
|
|
22444
22444
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -22480,7 +22480,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text8) => [...text8.matchAll(L
|
|
|
22480
22480
|
return { url, documentId: googleDocumentId(url) };
|
|
22481
22481
|
}), "googleDocumentLinks");
|
|
22482
22482
|
|
|
22483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
22484
22484
|
var BEFORE = [
|
|
22485
22485
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
22486
22486
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -22740,7 +22740,7 @@ var findPlaces = /* @__PURE__ */ __name((text8) => {
|
|
|
22740
22740
|
return found2.sort((a, b) => a.start - b.start);
|
|
22741
22741
|
}, "findPlaces");
|
|
22742
22742
|
|
|
22743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22743
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
22744
22744
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
22745
22745
|
var MENTION_VERSIONS = {
|
|
22746
22746
|
phone: 1,
|
|
@@ -22916,7 +22916,7 @@ var exactlyOne = /* @__PURE__ */ __name((text8, options) => {
|
|
|
22916
22916
|
return one2 && one2.start === 0 && one2.end === text8.length ? one2.value : void 0;
|
|
22917
22917
|
}, "exactlyOne");
|
|
22918
22918
|
|
|
22919
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
22920
22920
|
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";
|
|
22921
22921
|
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";
|
|
22922
22922
|
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";
|
|
@@ -22924,7 +22924,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
22924
22924
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
22925
22925
|
var NAME_WORDS = WORDS.split(" ");
|
|
22926
22926
|
|
|
22927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22927
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
22928
22928
|
var LATIN_TO_CYRILLIC = {
|
|
22929
22929
|
shch: "\u0449",
|
|
22930
22930
|
sch: "\u0449",
|
|
@@ -23132,7 +23132,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text8, stem, taken) => {
|
|
|
23132
23132
|
return found2;
|
|
23133
23133
|
}, "findUnknownNames");
|
|
23134
23134
|
|
|
23135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
23136
23136
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
23137
23137
|
"webpage",
|
|
23138
23138
|
"share",
|
|
@@ -23173,7 +23173,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
|
|
|
23173
23173
|
});
|
|
23174
23174
|
}, "matchDownloads");
|
|
23175
23175
|
|
|
23176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
23177
23177
|
var QUERY_VERSION = 1;
|
|
23178
23178
|
var QUERY_LIMITS2 = {
|
|
23179
23179
|
...QUERY_LIMITS,
|
|
@@ -23218,7 +23218,7 @@ function tooWideTerm([term], budget) {
|
|
|
23218
23218
|
}
|
|
23219
23219
|
__name(tooWideTerm, "tooWideTerm");
|
|
23220
23220
|
|
|
23221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
23222
23222
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
23223
23223
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
23224
23224
|
kind: "char",
|
|
@@ -23618,7 +23618,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
23618
23618
|
return out;
|
|
23619
23619
|
}, "foldRegex");
|
|
23620
23620
|
|
|
23621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23621
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
23622
23622
|
var PRESET_VERSION = 1;
|
|
23623
23623
|
var PRESETS = {
|
|
23624
23624
|
password: {
|
|
@@ -23672,7 +23672,7 @@ var PRESETS = {
|
|
|
23672
23672
|
}
|
|
23673
23673
|
};
|
|
23674
23674
|
|
|
23675
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
23676
23676
|
var FIELD_VERSION = 2;
|
|
23677
23677
|
var UNITS = {
|
|
23678
23678
|
"": 1,
|
|
@@ -24201,12 +24201,12 @@ var validateAst = /* @__PURE__ */ __name((input, options = {}) => {
|
|
|
24201
24201
|
return validateFields(parsed4.output, options);
|
|
24202
24202
|
}, "validateAst");
|
|
24203
24203
|
|
|
24204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
24205
24205
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
24206
24206
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
24207
24207
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
24208
24208
|
|
|
24209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24209
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
24210
24210
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
24211
24211
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
24212
24212
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -24230,7 +24230,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
24230
24230
|
};
|
|
24231
24231
|
}, "linkMatch");
|
|
24232
24232
|
|
|
24233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
24234
24234
|
var SETTING = "phoneCountries";
|
|
24235
24235
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
24236
24236
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -24261,7 +24261,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
24261
24261
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
24262
24262
|
}, "valueMatch");
|
|
24263
24263
|
|
|
24264
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24264
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
24265
24265
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
24266
24266
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
24267
24267
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -24289,7 +24289,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
24289
24289
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
24290
24290
|
}, "vocabularySimilarity");
|
|
24291
24291
|
|
|
24292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
24293
24293
|
import { createHash } from "node:crypto";
|
|
24294
24294
|
var folded3 = /* @__PURE__ */ __name((name) => {
|
|
24295
24295
|
try {
|
|
@@ -24355,7 +24355,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
24355
24355
|
});
|
|
24356
24356
|
}, "guardTagCreation");
|
|
24357
24357
|
|
|
24358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
24359
24359
|
var invalid = /* @__PURE__ */ __name((message3) => {
|
|
24360
24360
|
throw new CliError("validation_error", message3);
|
|
24361
24361
|
}, "invalid");
|
|
@@ -24432,7 +24432,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
24432
24432
|
};
|
|
24433
24433
|
}, "createTagRedirectIndex");
|
|
24434
24434
|
|
|
24435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
24436
24436
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
24437
24437
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
24438
24438
|
if (!row2)
|
|
@@ -24460,7 +24460,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
24460
24460
|
return snapshot2;
|
|
24461
24461
|
}, "tagRedirectSnapshot");
|
|
24462
24462
|
|
|
24463
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
24464
24464
|
import { createHash as createHash2 } from "node:crypto";
|
|
24465
24465
|
var TASK_KEY_PREFIXES = {
|
|
24466
24466
|
question: "Q",
|
|
@@ -24488,7 +24488,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
24488
24488
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
24489
24489
|
}, "taskAccountOf");
|
|
24490
24490
|
|
|
24491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24491
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
24492
24492
|
var toMs = /* @__PURE__ */ __name((iso17) => {
|
|
24493
24493
|
if (iso17 === null || iso17 === void 0)
|
|
24494
24494
|
return null;
|
|
@@ -24502,7 +24502,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
24502
24502
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
24503
24503
|
var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
24504
24504
|
|
|
24505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
24506
24506
|
var TAG_KINDS = ["tag", "topic"];
|
|
24507
24507
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
24508
24508
|
var TAG_TYPE = {
|
|
@@ -24686,7 +24686,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
24686
24686
|
...filter.where ? [filter.where] : [],
|
|
24687
24687
|
...filter.source === void 0 ? [] : [{ sql: filter.source === "auto" ? "x.auto = 1" : "(x.auto = 0 OR x.source = 'owner')", params: [] }]
|
|
24688
24688
|
];
|
|
24689
|
-
const rows = database.prepare(`SELECT * FROM (SELECT tag,type,min(created_at) AS created_at,chat_id,chat_title,person_id,name,name_folded,message_id,CASE WHEN max(source='owner') THEN 'owner' ELSE min(source) END AS source,target_id,tag_id,task_id,tag_type,max(auto) AS auto FROM (SELECT u.*, CASE u.type WHEN 'identity' THEN 'contact' WHEN 'email_thread' THEN 'chat' WHEN 'email' THEN 'message' ELSE u.type END AS tag_type, (u.type = 'chat' AND EXISTS (SELECT 1 FROM canonical_auto_tag_claims ac JOIN resolved_tags rt ON rt.id=ac.tag_id WHERE ac.chat_id = u.target_id AND rt.canonical_id = u.tag_id)) AS auto FROM (${union}) u) GROUP BY tag,type,target_id) x WHERE ${where.length === 0 ? "1" : where.map(({ sql: sql2 }) => `(${sql2})`).join(" AND ")} ORDER BY x.tag, x.type, x.created_at, x.chat_id, x.person_id, x.message_id` + (filter.window ? " LIMIT ? OFFSET ?" : "")).all(...chosen.flatMap(({ params }) => selectedTag === void 0 ? params : [...params, selectedTag]), ...where.flatMap(({ params }) => params), ...filter.window ? [filter.window.limit, filter.window.offset] : []);
|
|
24689
|
+
const rows = database.prepare(`SELECT * FROM (SELECT tag,type,min(created_at) AS created_at,chat_id,chat_title,person_id,name,name_folded,message_id,CASE WHEN max(source='owner') THEN 'owner' ELSE min(source) END AS source,target_id,tag_id,task_id,tag_type,max(auto) AS auto FROM (SELECT u.*, CASE u.type WHEN 'identity' THEN 'contact' WHEN 'email_thread' THEN 'chat' WHEN 'email' THEN 'message' ELSE u.type END AS tag_type, (u.type = 'chat' AND EXISTS (SELECT 1 FROM canonical_auto_tag_claims ac JOIN resolved_tags rt ON rt.id=ac.tag_id WHERE ac.chat_id = u.target_id AND rt.canonical_id = u.tag_id)) AS auto FROM (${union}) u) GROUP BY tag,type,target_id) x WHERE ${where.length === 0 ? "1" : where.map(({ sql: sql2 }) => `(${sql2})`).join(" AND ")} ORDER BY x.tag, x.type, x.created_at, x.chat_id, x.person_id, x.message_id, x.target_id` + (filter.window ? " LIMIT ? OFFSET ?" : "")).all(...chosen.flatMap(({ params }) => selectedTag === void 0 ? params : [...params, selectedTag]), ...where.flatMap(({ params }) => params), ...filter.window ? [filter.window.limit, filter.window.offset] : []);
|
|
24690
24690
|
const result = rows.map((row2) => {
|
|
24691
24691
|
const type = TAG_TYPE[String(row2.type)];
|
|
24692
24692
|
const chatId = row2.chat_id == null ? void 0 : String(row2.chat_id);
|
|
@@ -24705,7 +24705,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
24705
24705
|
return result;
|
|
24706
24706
|
}, "tagsOf");
|
|
24707
24707
|
|
|
24708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
24709
24709
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
24710
24710
|
var SPEECH = speech("att");
|
|
24711
24711
|
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");
|
|
@@ -25195,7 +25195,7 @@ var FIELD_COMPILERS = {
|
|
|
25195
25195
|
subject
|
|
25196
25196
|
};
|
|
25197
25197
|
|
|
25198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
25199
25199
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
25200
25200
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
25201
25201
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -25211,11 +25211,11 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
25211
25211
|
};
|
|
25212
25212
|
}, "placeOf");
|
|
25213
25213
|
|
|
25214
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25214
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
25215
25215
|
var DRAIN_ON_WRITE = 500;
|
|
25216
25216
|
var METHOD = "rules";
|
|
25217
25217
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
25218
|
-
const chat2 = database.prepare("SELECT 'linked' AS status, 'chat' AS target_type, id AS target_id, 'rules' AS author FROM chats WHERE (? IS NOT NULL AND lower(username) = lower(?)) OR external_id = ? ORDER BY id LIMIT 1");
|
|
25218
|
+
const chat2 = database.prepare("SELECT 'linked' AS status, 'chat' AS target_type, c.id AS target_id, 'rules' AS author FROM chats c JOIN accounts a ON a.id = c.account_id WHERE a.provider = 'telegram' AND ((? IS NOT NULL AND lower(c.username) = lower(?)) OR c.external_id = ?) ORDER BY c.id LIMIT 1");
|
|
25219
25219
|
const account = database.prepare("SELECT 'linked' AS status, 'identity' AS target_type, id AS target_id, 'rules' AS author FROM identities WHERE provider = 'telegram' AND lower(username) = lower(?) ORDER BY id LIMIT 1");
|
|
25220
25220
|
return (value) => {
|
|
25221
25221
|
const target = telegramTarget(value);
|
|
@@ -25377,7 +25377,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
25377
25377
|
return queued.length;
|
|
25378
25378
|
}, "drainMentions");
|
|
25379
25379
|
|
|
25380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25380
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
25381
25381
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
25382
25382
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
25383
25383
|
if (!exists2)
|
|
@@ -25385,7 +25385,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
25385
25385
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
25386
25386
|
}, "indexRow");
|
|
25387
25387
|
|
|
25388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
25389
25389
|
var INDEX = "message_stems";
|
|
25390
25390
|
var SETTING2 = "searchStemmers";
|
|
25391
25391
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -25507,7 +25507,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
25507
25507
|
};
|
|
25508
25508
|
}, "stemmerCache");
|
|
25509
25509
|
|
|
25510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
25511
25511
|
var rehearsal = new AsyncLocalStorage();
|
|
25512
25512
|
var SQLITE_BUSY = 5;
|
|
25513
25513
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
@@ -25650,7 +25650,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
25650
25650
|
}
|
|
25651
25651
|
}, "read");
|
|
25652
25652
|
|
|
25653
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
25654
25654
|
var FOLDED = [
|
|
25655
25655
|
{ table: "tasks", column: "title" },
|
|
25656
25656
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -25687,7 +25687,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
25687
25687
|
return filled2;
|
|
25688
25688
|
}, "fillFolded");
|
|
25689
25689
|
|
|
25690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25690
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
25691
25691
|
import { createHash as createHash3 } from "node:crypto";
|
|
25692
25692
|
var CHUNK_CHARS = 1200;
|
|
25693
25693
|
var CHUNK_OVERLAP = 150;
|
|
@@ -25792,7 +25792,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
25792
25792
|
return chunks2;
|
|
25793
25793
|
}, "cutChunks");
|
|
25794
25794
|
|
|
25795
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25795
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
25796
25796
|
var DAY2 = 864e5;
|
|
25797
25797
|
var CURRENCY = [
|
|
25798
25798
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -25918,7 +25918,7 @@ var dueDayOf = /* @__PURE__ */ __name((text8, createdMs) => {
|
|
|
25918
25918
|
return best?.day ?? null;
|
|
25919
25919
|
}, "dueDayOf");
|
|
25920
25920
|
|
|
25921
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25921
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
25922
25922
|
var DAY3 = 864e5;
|
|
25923
25923
|
var STOP_WORDS = new Set([
|
|
25924
25924
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -26073,7 +26073,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
26073
26073
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
26074
26074
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
26075
26075
|
|
|
26076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
26077
26077
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
26078
26078
|
coalesce(CASE k.chunkable_type
|
|
26079
26079
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -26215,7 +26215,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
26215
26215
|
}, "dropUnusedVectors");
|
|
26216
26216
|
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");
|
|
26217
26217
|
|
|
26218
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
26219
26219
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
26220
26220
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
26221
26221
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -26490,7 +26490,7 @@ var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.ma
|
|
|
26490
26490
|
Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
|
|
26491
26491
|
])), "vectorCounts");
|
|
26492
26492
|
|
|
26493
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
26494
26494
|
var DOCUMENT_PICTURE = "document_picture";
|
|
26495
26495
|
var SCAN_PAGE2 = 5e3;
|
|
26496
26496
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -26553,12 +26553,12 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
26553
26553
|
}, "nearestPictures")
|
|
26554
26554
|
}), "documentPicturesOver");
|
|
26555
26555
|
|
|
26556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
|
|
26557
26557
|
var noteIndexText = /* @__PURE__ */ __name((title2, text8) => title2 ? `${title2}
|
|
26558
26558
|
|
|
26559
26559
|
${text8}` : text8, "noteIndexText");
|
|
26560
26560
|
|
|
26561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
|
|
26562
26562
|
var ENRICHMENT_SUBJECTS = ["document", "note", "email"];
|
|
26563
26563
|
var ENRICHMENT_POSITION = 1e6;
|
|
26564
26564
|
var EMAIL_ENRICHMENT = "email_enrichment";
|
|
@@ -26652,7 +26652,7 @@ var enrichmentsOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
|
26652
26652
|
}), "clear")
|
|
26653
26653
|
}), "enrichmentsOver");
|
|
26654
26654
|
|
|
26655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
26656
26656
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
26657
26657
|
const literal5 = escaped2 ?? plain2 ?? "";
|
|
26658
26658
|
return wildcard ?? (/[*?[]/u.test(literal5) ? `[${literal5}]` : literal5);
|
|
@@ -26693,7 +26693,7 @@ var leaf = /* @__PURE__ */ __name((node, columns2, options) => {
|
|
|
26693
26693
|
}
|
|
26694
26694
|
case "time": {
|
|
26695
26695
|
const range = node.operator === "range" ? [node.value, node.upper ?? "*", node.lower_inclusive ?? true, node.upper_inclusive ?? true] : [node.value, node.value, true, true];
|
|
26696
|
-
const { lower, upper, lower_inclusive, upper_inclusive } = dateRange(range[0], range[1], range[2], range[3], options.zone
|
|
26696
|
+
const { lower, upper, lower_inclusive, upper_inclusive } = dateRange(range[0], range[1], range[2], range[3], timezoneOf(options.zone), node.span, options.now);
|
|
26697
26697
|
return all([
|
|
26698
26698
|
{ sql: `${sql2} IS NOT NULL`, params: [] },
|
|
26699
26699
|
...lower === void 0 ? [] : [{ sql: `${sql2} ${lower_inclusive ? ">=" : ">"} ?`, params: [lower] }],
|
|
@@ -26728,7 +26728,7 @@ var compile = /* @__PURE__ */ __name((node, columns2, options) => {
|
|
|
26728
26728
|
var queryFilter = /* @__PURE__ */ __name((ast, columns2, options = {}) => compile(ast.root, columns2, options), "queryFilter");
|
|
26729
26729
|
var bound2 = /* @__PURE__ */ __name(({ sql: text8, params }) => sql.join(text8.split("?").map((part2, at2) => at2 < params.length ? sql`${sql.raw(part2)}${params[at2]}` : sql.raw(part2)), sql``), "bound");
|
|
26730
26730
|
|
|
26731
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26731
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
26732
26732
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
26733
26733
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
26734
26734
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -26818,7 +26818,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
26818
26818
|
});
|
|
26819
26819
|
}, "linkMeeting");
|
|
26820
26820
|
|
|
26821
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/task-titles.js
|
|
26822
26822
|
var MAX_TITLE = 120;
|
|
26823
26823
|
var placeholderTitleOf = /* @__PURE__ */ __name((row2) => `${String(row2.type)} \u2014 ${String(row2.source_locator ?? "")}`, "placeholderTitleOf");
|
|
26824
26824
|
var PLACEHOLDER_TITLE_SQL = "title = type || ' \u2014 ' || coalesce(source_locator, '')";
|
|
@@ -26880,7 +26880,7 @@ var fillFoundTaskTitles = /* @__PURE__ */ __name((database, warn, { batch = 500
|
|
|
26880
26880
|
}
|
|
26881
26881
|
}, "fillFoundTaskTitles");
|
|
26882
26882
|
|
|
26883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
26884
26884
|
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), ''))";
|
|
26885
26885
|
var UNSEARCHED_EVENT_TYPES = [
|
|
26886
26886
|
"working-location",
|
|
@@ -27127,7 +27127,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
27127
27127
|
return true;
|
|
27128
27128
|
}, "resetNoteIndex");
|
|
27129
27129
|
|
|
27130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27130
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
27131
27131
|
var keyOf2 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
27132
27132
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names2) => {
|
|
27133
27133
|
for (const key2 of new Set(names2.filter((name) => !!name?.trim()).map(keyOf2))) {
|
|
@@ -27146,7 +27146,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names2) => {
|
|
|
27146
27146
|
}
|
|
27147
27147
|
}, "resolvePersonLinks");
|
|
27148
27148
|
|
|
27149
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
27150
27150
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
27151
27151
|
id: integer("id").primaryKey(),
|
|
27152
27152
|
name: text("name").notNull().unique(),
|
|
@@ -27155,7 +27155,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
27155
27155
|
updatedAt: integer("updated_at").notNull()
|
|
27156
27156
|
});
|
|
27157
27157
|
|
|
27158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
|
|
27159
27159
|
var linkRevisions = sqliteTable("link_revisions", {
|
|
27160
27160
|
id: integer("id").primaryKey(),
|
|
27161
27161
|
linkId: integer("link_id").notNull(),
|
|
@@ -27167,7 +27167,7 @@ var linkRevisions = sqliteTable("link_revisions", {
|
|
|
27167
27167
|
createdAt: integer("created_at").notNull()
|
|
27168
27168
|
}, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
|
|
27169
27169
|
|
|
27170
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27170
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
27171
27171
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
27172
27172
|
sourceKey: text("source_key").notNull(),
|
|
27173
27173
|
collection: text("collection").notNull(),
|
|
@@ -27177,13 +27177,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
27177
27177
|
createdAt: integer("created_at").notNull()
|
|
27178
27178
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
27179
27179
|
|
|
27180
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27180
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
27181
27181
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
27182
27182
|
id: integer("id").notNull(),
|
|
27183
27183
|
indexableType: text("indexable_type").notNull()
|
|
27184
27184
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
27185
27185
|
|
|
27186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
27187
27187
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
27188
27188
|
id: integer("id").primaryKey(),
|
|
27189
27189
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -27203,7 +27203,7 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
27203
27203
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
27204
27204
|
]);
|
|
27205
27205
|
|
|
27206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27206
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
|
|
27207
27207
|
var enrichments = sqliteTable("enrichments", {
|
|
27208
27208
|
subjectType: text("subject_type").notNull(),
|
|
27209
27209
|
subjectId: integer("subject_id").notNull(),
|
|
@@ -27215,7 +27215,7 @@ var enrichments = sqliteTable("enrichments", {
|
|
|
27215
27215
|
createdAt: integer("created_at").notNull()
|
|
27216
27216
|
}, (table) => [primaryKey({ columns: [table.subjectType, table.subjectId] })]);
|
|
27217
27217
|
|
|
27218
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/templates.js
|
|
27219
27219
|
var templates = sqliteTable("templates", {
|
|
27220
27220
|
key: text("key").notNull(),
|
|
27221
27221
|
channel: text("channel").notNull(),
|
|
@@ -27237,7 +27237,7 @@ var templatesHistory = sqliteTable("templates_history", {
|
|
|
27237
27237
|
index("templates_history_by_key_channel_language_id").on(table.key, table.channel, table.language, table.id)
|
|
27238
27238
|
]);
|
|
27239
27239
|
|
|
27240
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27240
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
|
|
27241
27241
|
var links = sqliteTable("links", {
|
|
27242
27242
|
id: integer("id").primaryKey(),
|
|
27243
27243
|
fromType: text("from_type").notNull(),
|
|
@@ -27268,7 +27268,7 @@ var links = sqliteTable("links", {
|
|
|
27268
27268
|
index("links_by_to_type_to_id").on(table.toType, table.toId)
|
|
27269
27269
|
]);
|
|
27270
27270
|
|
|
27271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
27272
27272
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
27273
27273
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
27274
27274
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -27294,7 +27294,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
27294
27294
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
27295
27295
|
]);
|
|
27296
27296
|
|
|
27297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
27298
27298
|
var accounts = sqliteTable("accounts", {
|
|
27299
27299
|
id: integer("id").primaryKey(),
|
|
27300
27300
|
provider: text("provider").notNull(),
|
|
@@ -29304,7 +29304,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
29304
29304
|
at: integer("at").notNull()
|
|
29305
29305
|
});
|
|
29306
29306
|
|
|
29307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
29308
29308
|
var contactsOf = /* @__PURE__ */ __name(({ phones: phones2, emails: emails3 }) => {
|
|
29309
29309
|
if (phones2 === void 0 && emails3 === void 0)
|
|
29310
29310
|
return void 0;
|
|
@@ -29550,7 +29550,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
29550
29550
|
}, "meetingIdentityPk");
|
|
29551
29551
|
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");
|
|
29552
29552
|
|
|
29553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29553
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
29554
29554
|
var TAKES = {
|
|
29555
29555
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
29556
29556
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -29610,7 +29610,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference2, scope3, profilesOn
|
|
|
29610
29610
|
throw wrongAccount(reference2, scope3, profiles);
|
|
29611
29611
|
}, "ensureAccount");
|
|
29612
29612
|
|
|
29613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29613
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
29614
29614
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
29615
29615
|
const padded = ` ${term} `;
|
|
29616
29616
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -29619,7 +29619,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
29619
29619
|
return [...pieces];
|
|
29620
29620
|
}, "trigrams");
|
|
29621
29621
|
|
|
29622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
29623
29623
|
var isId = /* @__PURE__ */ __name((reference2) => /^-?\d+$/.test(reference2.trim()), "isId");
|
|
29624
29624
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
|
|
29625
29625
|
var pickChat = /* @__PURE__ */ __name((reference2, chats2) => {
|
|
@@ -29690,7 +29690,7 @@ ${lines}`, { candidates });
|
|
|
29690
29690
|
}, "ambiguous");
|
|
29691
29691
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
29692
29692
|
|
|
29693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29693
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/display-names.js
|
|
29694
29694
|
var QUOTES = [
|
|
29695
29695
|
['"', '"'],
|
|
29696
29696
|
["'", "'"],
|
|
@@ -29748,7 +29748,7 @@ var nameKey = /* @__PURE__ */ __name((name) => {
|
|
|
29748
29748
|
}, "nameKey");
|
|
29749
29749
|
var isReadable = /* @__PURE__ */ __name((shown2) => shown2 !== null && READABLE.test(shown2), "isReadable");
|
|
29750
29750
|
|
|
29751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
29752
29752
|
var identitiesOf = /* @__PURE__ */ __name(({ database }, person2) => database.prepare("SELECT identity_id AS pk FROM identity_links WHERE person_id = ?").all(person2).map(({ pk }) => Number(pk)), "identitiesOf");
|
|
29753
29753
|
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
29754
29754
|
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
@@ -29763,7 +29763,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
|
29763
29763
|
var separated = /* @__PURE__ */ __name((context, one2, other) => one2 !== other && apart(context, { identities: identitiesOf(context, one2), person: one2 }, { identities: identitiesOf(context, other), person: other }), "separated");
|
|
29764
29764
|
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
29765
29765
|
|
|
29766
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29766
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
29767
29767
|
var MESSAGE_FIELDS = {
|
|
29768
29768
|
pk: messages.id,
|
|
29769
29769
|
nativeId: messages.externalId,
|
|
@@ -29943,7 +29943,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
29943
29943
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
29944
29944
|
}), "chatActivity");
|
|
29945
29945
|
|
|
29946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
29947
29947
|
var HIT_FIELDS = {
|
|
29948
29948
|
...MESSAGE_FIELDS,
|
|
29949
29949
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -30042,7 +30042,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
30042
30042
|
};
|
|
30043
30043
|
}, "directReplies");
|
|
30044
30044
|
|
|
30045
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
30046
30046
|
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");
|
|
30047
30047
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
30048
30048
|
const found2 = identityRow(context, ref3);
|
|
@@ -30255,11 +30255,11 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
30255
30255
|
}, "mentioning");
|
|
30256
30256
|
var escaped = /* @__PURE__ */ __name((text8) => text8.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
30257
30257
|
|
|
30258
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30258
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
30259
30259
|
var profilesOn = /* @__PURE__ */ __name((profiles, app, key2) => Object.entries(profiles[app] ?? {}).filter(([, saved]) => saved.provider === key2.provider && saved.account === key2.account).map(([name]) => name), "profilesOn");
|
|
30260
30260
|
var oneLine = /* @__PURE__ */ __name((text8) => singleLine(text8.replace(/\s+/g, " ").trim()), "oneLine");
|
|
30261
30261
|
|
|
30262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30262
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-accounts.js
|
|
30263
30263
|
var accountKeys = /* @__PURE__ */ __name((database, ids3) => {
|
|
30264
30264
|
const unique2 = [...new Set(ids3)];
|
|
30265
30265
|
if (unique2.length === 0)
|
|
@@ -30348,7 +30348,7 @@ var refEndsOf = /* @__PURE__ */ __name((database, text8) => {
|
|
|
30348
30348
|
}, "refEndsOf");
|
|
30349
30349
|
var refAccountsOf = /* @__PURE__ */ __name((database, text8) => refEndsOf(database, text8)?.flat(), "refAccountsOf");
|
|
30350
30350
|
|
|
30351
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
30352
30352
|
var EXCERPT_CHARS = 280;
|
|
30353
30353
|
var TITLE_CHARS = 120;
|
|
30354
30354
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -30772,7 +30772,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
30772
30772
|
ends: /* @__PURE__ */ __name(async (text8) => refEndsOf(context.database, text8), "ends")
|
|
30773
30773
|
}), "refsStoreOver");
|
|
30774
30774
|
|
|
30775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
30776
30776
|
var sourceOf3 = /* @__PURE__ */ __name((read3, ref3) => ({
|
|
30777
30777
|
ref: ref3,
|
|
30778
30778
|
kind: read3.kind,
|
|
@@ -30810,7 +30810,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
30810
30810
|
});
|
|
30811
30811
|
}, "evidenceSourcesOf");
|
|
30812
30812
|
|
|
30813
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30813
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
30814
30814
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
30815
30815
|
var MAX_TEXT_CHARS = 2e6;
|
|
30816
30816
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -30836,7 +30836,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
30836
30836
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
30837
30837
|
}, "pdfPreviewLimits");
|
|
30838
30838
|
|
|
30839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
30840
30840
|
import { randomBytes } from "node:crypto";
|
|
30841
30841
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
30842
30842
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -30849,7 +30849,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
30849
30849
|
return time3 + random;
|
|
30850
30850
|
}, "ulid");
|
|
30851
30851
|
|
|
30852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
30853
30853
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
30854
30854
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
30855
30855
|
if (!meta && !sections?.length)
|
|
@@ -30870,7 +30870,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
30870
30870
|
return typeof language === "string" && language !== "" ? language : null;
|
|
30871
30871
|
}, "languageOf");
|
|
30872
30872
|
|
|
30873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
30874
30874
|
var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
30875
30875
|
var objectOf2 = /* @__PURE__ */ __name((value) => {
|
|
30876
30876
|
if (isObject2(value))
|
|
@@ -31117,7 +31117,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
31117
31117
|
};
|
|
31118
31118
|
}, "filesStoreOver");
|
|
31119
31119
|
|
|
31120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
31121
31121
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
31122
31122
|
entity: "document",
|
|
31123
31123
|
backend: "sql",
|
|
@@ -31163,7 +31163,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
31163
31163
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns2);
|
|
31164
31164
|
}, "importedDocumentWhere");
|
|
31165
31165
|
|
|
31166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
31167
31167
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
31168
31168
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
31169
31169
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -31171,7 +31171,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
31171
31171
|
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);
|
|
31172
31172
|
}, "reviewLink");
|
|
31173
31173
|
|
|
31174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/link-row.js
|
|
31175
31175
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
31176
31176
|
var thingRef = /* @__PURE__ */ __name((database, type, id2) => type == null || id2 == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? null, "thingRef");
|
|
31177
31177
|
var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
@@ -31204,7 +31204,7 @@ var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
|
31204
31204
|
};
|
|
31205
31205
|
}, "linkOf");
|
|
31206
31206
|
|
|
31207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
31208
31208
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
31209
31209
|
const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
|
|
31210
31210
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -31225,7 +31225,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
31225
31225
|
return changed;
|
|
31226
31226
|
}, "dateFileNotes");
|
|
31227
31227
|
|
|
31228
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31228
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
31229
31229
|
var textOf2 = /* @__PURE__ */ __name((text8, what, max = 1e5, allowEmpty = false) => {
|
|
31230
31230
|
const value = text8.trim();
|
|
31231
31231
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -31238,7 +31238,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
31238
31238
|
return value;
|
|
31239
31239
|
}, "oneOf");
|
|
31240
31240
|
|
|
31241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31241
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
31242
31242
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
31243
31243
|
var RELATIONSHIPS = RELATION_KINDS.map(linkKind).join(", ");
|
|
31244
31244
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31753,10 +31753,10 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31753
31753
|
};
|
|
31754
31754
|
}, "notesStoreOver");
|
|
31755
31755
|
|
|
31756
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/rows-page.js
|
|
31757
31757
|
var pageOfRows = /* @__PURE__ */ __name((rows, limit, offset = 0) => rows.length > limit ? { items: rows.slice(0, limit), hasMore: true, nextOffset: offset + limit } : { items: rows, hasMore: false }, "pageOfRows");
|
|
31758
31758
|
|
|
31759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31759
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
31760
31760
|
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";
|
|
31761
31761
|
var iso5 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
31762
31762
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -32021,7 +32021,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32021
32021
|
};
|
|
32022
32022
|
}, "memoriesStoreOver");
|
|
32023
32023
|
|
|
32024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32024
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
32025
32025
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
32026
32026
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
32027
32027
|
throw new CliError(code, message3, { reason });
|
|
@@ -32169,7 +32169,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
32169
32169
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly: ownerOnly2, linkedId, ...decisionsOver(context) };
|
|
32170
32170
|
}, "reviewedRowsOver");
|
|
32171
32171
|
|
|
32172
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
32173
32173
|
var MAX_LINES = 500;
|
|
32174
32174
|
var PARENTS = {
|
|
32175
32175
|
invoice: {
|
|
@@ -32269,7 +32269,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
32269
32269
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
32270
32270
|
}, "moneyLinesOver");
|
|
32271
32271
|
|
|
32272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32272
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
32273
32273
|
var COUNTED = {
|
|
32274
32274
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
32275
32275
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -32344,7 +32344,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
32344
32344
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
32345
32345
|
}, "refundRulesOver");
|
|
32346
32346
|
|
|
32347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
32348
32348
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
32349
32349
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
32350
32350
|
var PAID = netPaidSql("i.id");
|
|
@@ -32748,7 +32748,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32748
32748
|
};
|
|
32749
32749
|
}, "financeStoreOver");
|
|
32750
32750
|
|
|
32751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
32752
32752
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
32753
32753
|
throw new CliError("validation_error", message3, { reason });
|
|
32754
32754
|
}, "refuse");
|
|
@@ -32826,7 +32826,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
32826
32826
|
};
|
|
32827
32827
|
}, "paymentEntriesOver");
|
|
32828
32828
|
|
|
32829
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32829
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
32830
32830
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
32831
32831
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
32832
32832
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -32853,7 +32853,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
32853
32853
|
return valid;
|
|
32854
32854
|
}, "validateEvidenceFindings");
|
|
32855
32855
|
|
|
32856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
32857
32857
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
32858
32858
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
32859
32859
|
var iso7 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -33047,7 +33047,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33047
33047
|
};
|
|
33048
33048
|
}, "proposedActionsStoreOver");
|
|
33049
33049
|
|
|
33050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33050
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-proposals.js
|
|
33051
33051
|
var CONFIRMED = "proposal";
|
|
33052
33052
|
var refOf = /* @__PURE__ */ __name(({ database }, pk) => {
|
|
33053
33053
|
const row2 = database.prepare("SELECT provider, external_id FROM identities WHERE id = ?").get(pk);
|
|
@@ -33397,7 +33397,7 @@ var identityLinkRows = /* @__PURE__ */ __name((context, { person: person2, statu
|
|
|
33397
33397
|
return { items, hasMore: rows.length > limit };
|
|
33398
33398
|
}, "identityLinkRows");
|
|
33399
33399
|
|
|
33400
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33400
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/person-merges.js
|
|
33401
33401
|
var mergeId = /* @__PURE__ */ __name((to, from2) => `merge:${to}-${from2}`, "mergeId");
|
|
33402
33402
|
var parseMergeId = /* @__PURE__ */ __name((id2) => {
|
|
33403
33403
|
const found2 = /^merge:([1-9]\d*)-([1-9]\d*)$/.exec(id2.trim());
|
|
@@ -33500,7 +33500,7 @@ var split = /* @__PURE__ */ __name((context, uid, refs, by) => {
|
|
|
33500
33500
|
return recordOf(context, alone);
|
|
33501
33501
|
}, "split");
|
|
33502
33502
|
|
|
33503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-split-proposals.js
|
|
33504
33504
|
var refOf2 = /* @__PURE__ */ __name(({ provider, id: id2 }) => `${provider}:${id2}`, "refOf");
|
|
33505
33505
|
var keyOf3 = /* @__PURE__ */ __name((split2, person2, identities2) => `${split2} ${person2} ${[...identities2].sort().join(" ")}`, "keyOf");
|
|
33506
33506
|
var planOf = /* @__PURE__ */ __name((context, input) => {
|
|
@@ -33677,7 +33677,7 @@ var forgetErasedSplits = /* @__PURE__ */ __name((database) => {
|
|
|
33677
33677
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
33678
33678
|
}, "forgetErasedSplits");
|
|
33679
33679
|
|
|
33680
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/test-data.js
|
|
33681
33681
|
var SEED_PEOPLE = [
|
|
33682
33682
|
{ name: "Owner", username: "owner" },
|
|
33683
33683
|
{ name: "Ann Lee", username: "ann" },
|
|
@@ -33694,7 +33694,7 @@ var RESERVED_ADDRESS_GLOBS = [
|
|
|
33694
33694
|
];
|
|
33695
33695
|
var SEED_ID_GLOBS = ["person-[0-9]*"];
|
|
33696
33696
|
|
|
33697
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33697
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/test-people.js
|
|
33698
33698
|
var TEST_DATA_KIND = "test_data";
|
|
33699
33699
|
var globs = /* @__PURE__ */ __name((column2, patterns) => patterns.map((pattern) => `${column2} GLOB '${pattern}'`).join(" OR "), "globs");
|
|
33700
33700
|
var SURE = `(${globs("i.external_id", SEED_ID_GLOBS)} OR ${globs("lower(i.email)", RESERVED_ADDRESS_GLOBS)})`;
|
|
@@ -33763,7 +33763,7 @@ var forgetErasedTestData = /* @__PURE__ */ __name((database) => {
|
|
|
33763
33763
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
33764
33764
|
}, "forgetErasedTestData");
|
|
33765
33765
|
|
|
33766
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33766
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
33767
33767
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null, startScope) => Number(orm.insert(accounts).values({
|
|
33768
33768
|
provider,
|
|
33769
33769
|
externalId: account,
|
|
@@ -33964,7 +33964,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
33964
33964
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
33965
33965
|
}, "dropOrphanPeople");
|
|
33966
33966
|
|
|
33967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33967
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
33968
33968
|
var HISTORY_KEY = "$history";
|
|
33969
33969
|
var objectOf3 = /* @__PURE__ */ __name((text8) => {
|
|
33970
33970
|
if (typeof text8 !== "string")
|
|
@@ -34040,7 +34040,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
34040
34040
|
return rest;
|
|
34041
34041
|
}, "withoutHistory");
|
|
34042
34042
|
|
|
34043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
34044
34044
|
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");
|
|
34045
34045
|
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");
|
|
34046
34046
|
var setChatScope = /* @__PURE__ */ __name((context, accountKey, chatId, scope3) => {
|
|
@@ -34338,7 +34338,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
34338
34338
|
}
|
|
34339
34339
|
}, "replaceAutoTags");
|
|
34340
34340
|
|
|
34341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34341
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
34342
34342
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
34343
34343
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
34344
34344
|
var counterValue = /* @__PURE__ */ __name((message3, field4) => {
|
|
@@ -34375,7 +34375,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
34375
34375
|
return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
|
|
34376
34376
|
}, "counterFreshness");
|
|
34377
34377
|
|
|
34378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34378
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-tokens.js
|
|
34379
34379
|
var BOT_TOKEN = /(?<!\d)(\d{6,12}):[A-Za-z0-9_-]{30,40}(?![A-Za-z0-9_-])/g;
|
|
34380
34380
|
var MAY_HOLD = "*[0-9][0-9][0-9][0-9][0-9][0-9]:*";
|
|
34381
34381
|
var MASKED_THROUGH = "bot_tokens_masked_through";
|
|
@@ -34415,7 +34415,7 @@ var maskStoredBotTokens = /* @__PURE__ */ __name((context) => {
|
|
|
34415
34415
|
}, "maskStoredBotTokens");
|
|
34416
34416
|
var masks = /* @__PURE__ */ __name((value) => value != null && withoutBotTokens(String(value)) !== value, "masks");
|
|
34417
34417
|
|
|
34418
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
34419
34419
|
import { createHash as createHash4 } from "node:crypto";
|
|
34420
34420
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
34421
34421
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -34513,7 +34513,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
34513
34513
|
return { source: source2, query, chat: chat2, senders, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
34514
34514
|
}, "contextEvidenceRequest");
|
|
34515
34515
|
|
|
34516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
34517
34517
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
34518
34518
|
var ACTIVITY = `
|
|
34519
34519
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -34643,7 +34643,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
34643
34643
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
34644
34644
|
}), "mailActivity");
|
|
34645
34645
|
|
|
34646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
34647
34647
|
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");
|
|
34648
34648
|
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;
|
|
34649
34649
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -34724,7 +34724,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
34724
34724
|
return withoutSignOff(withoutGreeting(kept2)).join("\n").trim();
|
|
34725
34725
|
}, "mailCore");
|
|
34726
34726
|
|
|
34727
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
34728
34728
|
var titleOf2 = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
34729
34729
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
34730
34730
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
@@ -34837,7 +34837,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
34837
34837
|
return emails3 + threads;
|
|
34838
34838
|
}, "drainEmailIndex");
|
|
34839
34839
|
|
|
34840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
34841
34841
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
34842
34842
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
34843
34843
|
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,
|
|
@@ -34935,7 +34935,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
34935
34935
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
34936
34936
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
34937
34937
|
|
|
34938
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
34939
34939
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
34940
34940
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
34941
34941
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -34985,7 +34985,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
34985
34985
|
return threads.length;
|
|
34986
34986
|
}, "markEmailsRestored");
|
|
34987
34987
|
|
|
34988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34988
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
34989
34989
|
var MAIL_PIECE_ROWS = `SELECT p.id, p.content_hash AS hash, p.type, p.owner, p.position, p.email_id AS email, v.vector
|
|
34990
34990
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
34991
34991
|
WHERE p.account_id = ?
|
|
@@ -35045,7 +35045,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
35045
35045
|
}, "indexedMailPieces");
|
|
35046
35046
|
var nearestMailPieces = /* @__PURE__ */ __name((database, model, query, filter, depth) => (filter.threadExternalId === void 0 ? indexedMailPieces(database, model, query, filter, depth) : void 0) ?? scannedMailPieces(database, model, query, filter), "nearestMailPieces");
|
|
35047
35047
|
|
|
35048
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
35049
35049
|
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");
|
|
35050
35050
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
35051
35051
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -35112,7 +35112,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
35112
35112
|
}
|
|
35113
35113
|
}), "mailRulesOver");
|
|
35114
35114
|
|
|
35115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
35116
35116
|
function checkMeetingCancelled(signal) {
|
|
35117
35117
|
if (!signal?.aborted)
|
|
35118
35118
|
return;
|
|
@@ -35123,7 +35123,7 @@ function checkMeetingCancelled(signal) {
|
|
|
35123
35123
|
}
|
|
35124
35124
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
35125
35125
|
|
|
35126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
35127
35127
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
35128
35128
|
id: Number(row2.id),
|
|
35129
35129
|
accountId: Number(row2.account_id),
|
|
@@ -35173,7 +35173,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
35173
35173
|
createdAt: Number(row2.created_at)
|
|
35174
35174
|
}), "transcriptRowOf");
|
|
35175
35175
|
|
|
35176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
35177
35177
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
35178
35178
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
35179
35179
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -35340,7 +35340,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35340
35340
|
}
|
|
35341
35341
|
}), "meetingReadsOver");
|
|
35342
35342
|
|
|
35343
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35343
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
35344
35344
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
35345
35345
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
35346
35346
|
const params = [input.accountId];
|
|
@@ -35383,7 +35383,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
35383
35383
|
return { clauses, params };
|
|
35384
35384
|
}, "meetingSelectionSql");
|
|
35385
35385
|
|
|
35386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
35387
35387
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35388
35388
|
async meetingChatLines(input) {
|
|
35389
35389
|
checkMeetingCancelled(input.signal);
|
|
@@ -35411,7 +35411,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35411
35411
|
}
|
|
35412
35412
|
}), "meetingChatLinesOver");
|
|
35413
35413
|
|
|
35414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
35415
35415
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
35416
35416
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
35417
35417
|
}, "missing");
|
|
@@ -35534,7 +35534,7 @@ function meetingContextLinksOver(context) {
|
|
|
35534
35534
|
}
|
|
35535
35535
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
35536
35536
|
|
|
35537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-documents.js
|
|
35538
35538
|
var TRANSCRIPT_ROLE = "transcript";
|
|
35539
35539
|
var roleOf3 = /* @__PURE__ */ __name((value) => MEETING_DOCUMENT_ROLES.find((role) => role === value), "roleOf");
|
|
35540
35540
|
var attach = /* @__PURE__ */ __name((database, meetingId, fileId, role, metadata3, listed, now2) => {
|
|
@@ -35608,7 +35608,7 @@ var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
35608
35608
|
};
|
|
35609
35609
|
}, "meetingTranscriptDocumentsOver");
|
|
35610
35610
|
|
|
35611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
35612
35612
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
35613
35613
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
35614
35614
|
var summaryOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -35637,7 +35637,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
35637
35637
|
return row2 ? summaryText(summaryOf2(row2)) : null;
|
|
35638
35638
|
}, "indexedText");
|
|
35639
35639
|
|
|
35640
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35640
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
35641
35641
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
35642
35642
|
var meetingCurrentIndexRows = `
|
|
35643
35643
|
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
|
|
@@ -35668,7 +35668,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
35668
35668
|
}, "invalidateMeetingStems");
|
|
35669
35669
|
var meetingStemmableText = /* @__PURE__ */ __name((text8) => text8.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
35670
35670
|
|
|
35671
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
35672
35672
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
35673
35673
|
return {
|
|
35674
35674
|
async indexSearch(original) {
|
|
@@ -35736,10 +35736,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
35736
35736
|
}
|
|
35737
35737
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
35738
35738
|
|
|
35739
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35739
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
35740
35740
|
import { createHash as createHash5 } from "node:crypto";
|
|
35741
35741
|
|
|
35742
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35742
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/lucene/plain.js
|
|
35743
35743
|
var REPAIRED = /* @__PURE__ */ new Set([
|
|
35744
35744
|
"query.invalid-syntax",
|
|
35745
35745
|
"query.unclosed-literal",
|
|
@@ -35882,7 +35882,7 @@ var plainQuery = /* @__PURE__ */ __name((text8, fields4 = SEARCH_FIELDS) => {
|
|
|
35882
35882
|
return text8;
|
|
35883
35883
|
}, "plainQuery");
|
|
35884
35884
|
|
|
35885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35885
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
35886
35886
|
var SHORTEST_CORRECTION = 3;
|
|
35887
35887
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
35888
35888
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -35929,7 +35929,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words4) => {
|
|
|
35929
35929
|
return corrections;
|
|
35930
35930
|
}, "correctWords");
|
|
35931
35931
|
|
|
35932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
35933
35933
|
var SHORTEST_GARBLED = 4;
|
|
35934
35934
|
var MOST_WIDENED = 64;
|
|
35935
35935
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -36021,7 +36021,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
36021
36021
|
return found2.map((words4) => words4.sort((a, b) => a.distance - b.distance || b.docs - a.docs || a.term.localeCompare(b.term)).slice(0, MOST_WIDENED).map((word2) => word2.term));
|
|
36022
36022
|
}, "widenWords");
|
|
36023
36023
|
|
|
36024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36024
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
36025
36025
|
import { readFileSync } from "node:fs";
|
|
36026
36026
|
var loaded;
|
|
36027
36027
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -36080,7 +36080,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
36080
36080
|
return false;
|
|
36081
36081
|
}, "knownRussianWord");
|
|
36082
36082
|
|
|
36083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36083
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
36084
36084
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
36085
36085
|
var MOST_WORDS = 128;
|
|
36086
36086
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -36336,7 +36336,7 @@ var matchedMeetingWords = /* @__PURE__ */ __name((tree, text8, stemmer2) => {
|
|
|
36336
36336
|
return [...found2];
|
|
36337
36337
|
}, "matchedMeetingWords");
|
|
36338
36338
|
|
|
36339
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36339
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
36340
36340
|
var fail = /* @__PURE__ */ __name((message3) => {
|
|
36341
36341
|
throw new CliError("validation_error", message3);
|
|
36342
36342
|
}, "fail");
|
|
@@ -36520,7 +36520,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
36520
36520
|
}
|
|
36521
36521
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
36522
36522
|
|
|
36523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
36524
36524
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36525
36525
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
36526
36526
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -36552,7 +36552,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36552
36552
|
}
|
|
36553
36553
|
}), "meetingLanguagesOver");
|
|
36554
36554
|
|
|
36555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36555
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
36556
36556
|
import { createHash as createHash6 } from "node:crypto";
|
|
36557
36557
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
36558
36558
|
if (value === void 0)
|
|
@@ -36645,7 +36645,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
36645
36645
|
}
|
|
36646
36646
|
}), "meetingParticipantSearchOver");
|
|
36647
36647
|
|
|
36648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
36649
36649
|
var preparationQueries = {
|
|
36650
36650
|
participants: {
|
|
36651
36651
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -36695,7 +36695,7 @@ var preparationQueries = {
|
|
|
36695
36695
|
}
|
|
36696
36696
|
};
|
|
36697
36697
|
|
|
36698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
36699
36699
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36700
36700
|
async preparationContext(original) {
|
|
36701
36701
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -36736,7 +36736,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36736
36736
|
}
|
|
36737
36737
|
}), "meetingPreparationContextOver");
|
|
36738
36738
|
|
|
36739
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36739
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
36740
36740
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
36741
36741
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
36742
36742
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -36750,7 +36750,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
36750
36750
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
36751
36751
|
)`, "preparationSubjects");
|
|
36752
36752
|
|
|
36753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
36754
36754
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36755
36755
|
async preparationKnowledge(original) {
|
|
36756
36756
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -36795,7 +36795,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
36795
36795
|
}
|
|
36796
36796
|
}), "meetingPreparationKnowledgeOver");
|
|
36797
36797
|
|
|
36798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36798
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
36799
36799
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36800
36800
|
async preparationNotes(original) {
|
|
36801
36801
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -36848,7 +36848,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36848
36848
|
}
|
|
36849
36849
|
}), "meetingPreparationNotesOver");
|
|
36850
36850
|
|
|
36851
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36851
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
36852
36852
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36853
36853
|
async relatedHistory(original) {
|
|
36854
36854
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -36919,7 +36919,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36919
36919
|
}
|
|
36920
36920
|
}), "meetingRelatedHistoryOver");
|
|
36921
36921
|
|
|
36922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36922
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
36923
36923
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
36924
36924
|
var text4 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
36925
36925
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -37000,7 +37000,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
37000
37000
|
}
|
|
37001
37001
|
}), "meetingReviewOver");
|
|
37002
37002
|
|
|
37003
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
37004
37004
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
37005
37005
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
37006
37006
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -37054,7 +37054,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
37054
37054
|
}
|
|
37055
37055
|
}), "meetingSeriesHistoryOver");
|
|
37056
37056
|
|
|
37057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
37058
37058
|
var MOST_ROWS = 5e5;
|
|
37059
37059
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
37060
37060
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -37123,7 +37123,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
37123
37123
|
}
|
|
37124
37124
|
}), "meetingStatsOver");
|
|
37125
37125
|
|
|
37126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
|
|
37127
37127
|
var CYRILLIC_TO_LATIN = {
|
|
37128
37128
|
\u0430: "a",
|
|
37129
37129
|
\u0431: "b",
|
|
@@ -37345,7 +37345,7 @@ for (const [full, short] of Object.entries(SHORT_FORMS))
|
|
|
37345
37345
|
}
|
|
37346
37346
|
var fullNames = /* @__PURE__ */ __name((skeleton) => [skeleton, ...FULL_NAMES.get(skeleton) ?? []], "fullNames");
|
|
37347
37347
|
|
|
37348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37348
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/name-traces.js
|
|
37349
37349
|
var peopleByNameKey = /* @__PURE__ */ __name((database) => {
|
|
37350
37350
|
const found2 = /* @__PURE__ */ new Map();
|
|
37351
37351
|
for (const row2 of database.prepare("SELECT p.id, p.name FROM persons p WHERE p.owner = 0 AND p.name IS NOT NULL AND EXISTS (SELECT 1 FROM identity_links l WHERE l.person_id = p.id) ORDER BY p.id").all()) {
|
|
@@ -37461,7 +37461,7 @@ function* sharedTraces(database, a, b, name, except) {
|
|
|
37461
37461
|
}
|
|
37462
37462
|
__name(sharedTraces, "sharedTraces");
|
|
37463
37463
|
|
|
37464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/person-matcher.js
|
|
37465
37465
|
var spellingsOf = /* @__PURE__ */ __name((value) => [value, value.slice(1)], "spellingsOf");
|
|
37466
37466
|
var PERSON_BY = {
|
|
37467
37467
|
// UNION, not OR: each branch reads its own index.
|
|
@@ -37484,7 +37484,7 @@ var personsByIdentifiers = /* @__PURE__ */ __name((database, ids3) => {
|
|
|
37484
37484
|
return [...found2].sort((a, b) => a - b);
|
|
37485
37485
|
}, "personsByIdentifiers");
|
|
37486
37486
|
|
|
37487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/person-match-scan.js
|
|
37488
37488
|
var BY = "rule";
|
|
37489
37489
|
var RULE = { bot: "rule", kind: "rule" };
|
|
37490
37490
|
var MOST_SHARING = 6;
|
|
@@ -37931,7 +37931,7 @@ var linkPhones = /* @__PURE__ */ __name((context, identities2) => {
|
|
|
37931
37931
|
return pass.result;
|
|
37932
37932
|
}, "linkPhones");
|
|
37933
37933
|
|
|
37934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37934
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
37935
37935
|
var CURSOR_KEY = "meetings";
|
|
37936
37936
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
37937
37937
|
id: Number(row2.id),
|
|
@@ -38283,6 +38283,7 @@ var MEETING_COLUMNS = {
|
|
|
38283
38283
|
ended_at: { type: "time", sql: "ended_at" },
|
|
38284
38284
|
duration_ms: { type: "num", sql: "duration_ms" },
|
|
38285
38285
|
participants_count: { type: "num", sql: "participants_count" },
|
|
38286
|
+
provider_id: { type: "kw", sql: "external_id" },
|
|
38286
38287
|
created_at: { type: "time", sql: "created_at" },
|
|
38287
38288
|
updated_at: { type: "time", sql: "updated_at" }
|
|
38288
38289
|
};
|
|
@@ -38305,8 +38306,14 @@ var filtered = /* @__PURE__ */ __name((filter = {}) => {
|
|
|
38305
38306
|
add2("started_at >= ?", filter.since);
|
|
38306
38307
|
if (filter.until !== void 0)
|
|
38307
38308
|
add2("started_at <= ?", filter.until);
|
|
38309
|
+
if (filter.ids !== void 0)
|
|
38310
|
+
add2("id IN (SELECT value FROM json_each(?))", JSON.stringify(filter.ids));
|
|
38308
38311
|
if (filter.query !== void 0) {
|
|
38309
|
-
const compiled = queryFilter(filter.query, MEETING_COLUMNS, {
|
|
38312
|
+
const compiled = queryFilter(filter.query, MEETING_COLUMNS, {
|
|
38313
|
+
command: "meetings list",
|
|
38314
|
+
...filter.timezone === void 0 ? {} : { zone: filter.timezone },
|
|
38315
|
+
...filter.now === void 0 ? {} : { now: filter.now }
|
|
38316
|
+
});
|
|
38310
38317
|
where.push(`(${compiled.sql})`);
|
|
38311
38318
|
params.push(...compiled.params);
|
|
38312
38319
|
}
|
|
@@ -38479,6 +38486,10 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
38479
38486
|
async meeting(id2) {
|
|
38480
38487
|
return details(database, id2);
|
|
38481
38488
|
},
|
|
38489
|
+
async meetingByExternalId(accountId, externalId) {
|
|
38490
|
+
const row2 = database.prepare("SELECT id FROM meetings WHERE account_id = ? AND external_id = ?").get(accountId, externalId);
|
|
38491
|
+
return row2 ? details(database, Number(row2.id)) : null;
|
|
38492
|
+
},
|
|
38482
38493
|
async participants(query, accountId) {
|
|
38483
38494
|
return participants2(database, query, accountId);
|
|
38484
38495
|
},
|
|
@@ -38519,7 +38530,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
38519
38530
|
};
|
|
38520
38531
|
}, "meetingStoreOver");
|
|
38521
38532
|
|
|
38522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
38523
38534
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
38524
38535
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
38525
38536
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -38545,7 +38556,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder2) => {
|
|
|
38545
38556
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder2))).run();
|
|
38546
38557
|
}, "release");
|
|
38547
38558
|
|
|
38548
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38559
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
38549
38560
|
var THREAD_COLUMNS = {
|
|
38550
38561
|
subject: {
|
|
38551
38562
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -38562,7 +38573,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
38562
38573
|
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);
|
|
38563
38574
|
}, "threadRows");
|
|
38564
38575
|
|
|
38565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38576
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
38566
38577
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
38567
38578
|
id: `email:${place.emailId}`,
|
|
38568
38579
|
chatId: place.threadExternalId,
|
|
@@ -39104,7 +39115,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
39104
39115
|
}
|
|
39105
39116
|
}), "mailStoreOver");
|
|
39106
39117
|
|
|
39107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39118
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
39108
39119
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
39109
39120
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
39110
39121
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -39194,7 +39205,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
39194
39205
|
}, "knownWord");
|
|
39195
39206
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
39196
39207
|
|
|
39197
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
39198
39209
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
39199
39210
|
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");
|
|
39200
39211
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -39280,7 +39291,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
39280
39291
|
return found2;
|
|
39281
39292
|
}, "spokenTranscripts");
|
|
39282
39293
|
|
|
39283
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39294
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
39284
39295
|
var startOf = /* @__PURE__ */ __name((node) => node.operator === "wildcard" && node.implicit ? /^([\p{L}\p{N}]+)\*$/u.exec(normalize(node.value))?.[1] : void 0, "startOf");
|
|
39285
39296
|
var matchOf = /* @__PURE__ */ __name((node) => {
|
|
39286
39297
|
const start = startOf(node);
|
|
@@ -39338,7 +39349,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
39338
39349
|
});
|
|
39339
39350
|
}, "placeHits");
|
|
39340
39351
|
|
|
39341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39352
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
39342
39353
|
var GROUPS = {
|
|
39343
39354
|
chat: {
|
|
39344
39355
|
key: "m.chat_id",
|
|
@@ -39360,7 +39371,7 @@ var GROUPS = {
|
|
|
39360
39371
|
}
|
|
39361
39372
|
};
|
|
39362
39373
|
|
|
39363
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
39364
39375
|
var MESSAGES2 = {
|
|
39365
39376
|
rows: "messages",
|
|
39366
39377
|
threads: "chats",
|
|
@@ -39853,7 +39864,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
39853
39864
|
};
|
|
39854
39865
|
}, "runCompiled");
|
|
39855
39866
|
|
|
39856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
39857
39868
|
function invalidMetadata() {
|
|
39858
39869
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
39859
39870
|
}
|
|
@@ -39955,7 +39966,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
39955
39966
|
};
|
|
39956
39967
|
}), "counterTargets");
|
|
39957
39968
|
|
|
39958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39969
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
39959
39970
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
39960
39971
|
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,
|
|
39961
39972
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -40074,7 +40085,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
40074
40085
|
}));
|
|
40075
40086
|
}, "attachmentViews");
|
|
40076
40087
|
|
|
40077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
40078
40089
|
var transcript2 = /* @__PURE__ */ __name(({ orm }, chatKey, messageId) => orm.select({ text: messageTranscripts.text, source: messageTranscripts.source }).from(messageTranscripts).where(and(eq(messageTranscripts.chatId, chatKey), eq(messageTranscripts.messageExternalId, messageId))).get(), "transcript");
|
|
40079
40090
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text8, source2) => {
|
|
40080
40091
|
const { orm, database, now: now2 } = context;
|
|
@@ -40112,7 +40123,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
40112
40123
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
40113
40124
|
}, "intoVoiceAttachment");
|
|
40114
40125
|
|
|
40115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
40116
40127
|
var FIELDS = [
|
|
40117
40128
|
"threadExternalId",
|
|
40118
40129
|
"senderIdentityId",
|
|
@@ -40222,6 +40233,11 @@ var upsertMessage = /* @__PURE__ */ __name((context, key2, accountKey, chatKey,
|
|
|
40222
40233
|
} else {
|
|
40223
40234
|
pk = found2.pk;
|
|
40224
40235
|
const edit = message3.editedAt !== null;
|
|
40236
|
+
const stale4 = !revived && found2.editedAt !== null && (fields4.editedAt !== null ? Number(fields4.editedAt) < found2.editedAt : seenAt !== void 0 && seenAt < found2.editedAt);
|
|
40237
|
+
if (stale4) {
|
|
40238
|
+
fields4.editedAt = null;
|
|
40239
|
+
fields4.normalizedText = null;
|
|
40240
|
+
}
|
|
40225
40241
|
if (edit) {
|
|
40226
40242
|
const incoming = Number(fields4.sentAt);
|
|
40227
40243
|
if (found2.sentAt > 0 && (incoming <= 0 || found2.sentAt < incoming))
|
|
@@ -40243,7 +40259,7 @@ var upsertMessage = /* @__PURE__ */ __name((context, key2, accountKey, chatKey,
|
|
|
40243
40259
|
}
|
|
40244
40260
|
}
|
|
40245
40261
|
statements.update.run({ ...fields4, pk });
|
|
40246
|
-
if (found2.text !== message3.text && !revived) {
|
|
40262
|
+
if (found2.text !== message3.text && !revived && !stale4) {
|
|
40247
40263
|
orm.insert(messageRevisions).values({ messageId: pk, text: found2.text, editedAt: found2.editedAt, createdAt: now2() }).run();
|
|
40248
40264
|
orm.update(messages).set({ text: message3.text }).where(eq(messages.id, pk)).run();
|
|
40249
40265
|
purgeVectorsOf(context, pk);
|
|
@@ -40431,7 +40447,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
40431
40447
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
40432
40448
|
}, "writeDerivedReactions");
|
|
40433
40449
|
|
|
40434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
40435
40451
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
40436
40452
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
40437
40453
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -40452,7 +40468,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
40452
40468
|
};
|
|
40453
40469
|
}, "keysOver");
|
|
40454
40470
|
|
|
40455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
40456
40472
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
40457
40473
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
40458
40474
|
if (!row2)
|
|
@@ -40499,7 +40515,7 @@ var forgetProfile = /* @__PURE__ */ __name((database, app, profile, now2) => {
|
|
|
40499
40515
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
40500
40516
|
}, "forgetProfile");
|
|
40501
40517
|
|
|
40502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40518
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
40503
40519
|
var ACCOUNT_REASON = "an account you connected, under another name: a mailbox or messenger you read may be someone else's";
|
|
40504
40520
|
var ownerNames = /* @__PURE__ */ __name(({ database }, owner) => database.prepare("SELECT i.name FROM identity_links l JOIN identities i ON i.id = l.identity_id WHERE l.person_id = ?").all(owner).map(({ name }) => new Set(nameSkeletons(displayName(typeof name === "string" ? name : null)))).filter((words4) => words4.size > 0), "ownerNames");
|
|
40505
40521
|
var ownersName = /* @__PURE__ */ __name((name, owner, alone) => {
|
|
@@ -40558,7 +40574,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
40558
40574
|
return personOf2(context, ref3);
|
|
40559
40575
|
}, "linkToOwner");
|
|
40560
40576
|
|
|
40561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
40562
40578
|
var PROVIDERS_SETTING = "providers";
|
|
40563
40579
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
40564
40580
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -40606,7 +40622,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
40606
40622
|
});
|
|
40607
40623
|
}, "registerProvider");
|
|
40608
40624
|
|
|
40609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
40610
40626
|
var DAY4 = 864e5;
|
|
40611
40627
|
var RECENTLY_CLOSED_MS = 14 * DAY4;
|
|
40612
40628
|
var TEXT_LIMIT = 20;
|
|
@@ -40804,7 +40820,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
40804
40820
|
};
|
|
40805
40821
|
}, "taskSimilarityOver");
|
|
40806
40822
|
|
|
40807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40823
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
40808
40824
|
var SETTING3 = "taskCategories";
|
|
40809
40825
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
40810
40826
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -40823,7 +40839,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
40823
40839
|
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);
|
|
40824
40840
|
}, "saveTaskCategories");
|
|
40825
40841
|
|
|
40826
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
40827
40843
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
40828
40844
|
var ALLOWED = "taskAgentClose";
|
|
40829
40845
|
var MIN = "taskAgentCloseMin";
|
|
@@ -40879,7 +40895,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
40879
40895
|
];
|
|
40880
40896
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
40881
40897
|
|
|
40882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40898
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
40883
40899
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
40884
40900
|
var KEY = "taskFirstPassPerChat";
|
|
40885
40901
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -40899,7 +40915,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
40899
40915
|
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);
|
|
40900
40916
|
}, "saveFirstPassPerChat");
|
|
40901
40917
|
|
|
40902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
40903
40919
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
40904
40920
|
var EXTERNAL_ID_CHARS = 200;
|
|
40905
40921
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -40926,7 +40942,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
40926
40942
|
return text8;
|
|
40927
40943
|
}, "sourceUrlOf");
|
|
40928
40944
|
|
|
40929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40945
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
40930
40946
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
40931
40947
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
40932
40948
|
name,
|
|
@@ -41178,7 +41194,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
41178
41194
|
var TASK_PEOPLE = `WITH merged AS (SELECT json_extract(value, '$[0]') AS id, json_extract(value, '$[1]') AS now FROM json_each(?)), counts AS (SELECT coalesce(m.now, a.assignee_id) AS person, count(DISTINCT t.id) AS n FROM task_assignments a JOIN tasks t ON t.id = a.task_id AND t.deleted_at IS NULL LEFT JOIN merged m ON m.id = a.assignee_id WHERE a.assignee_type = 'person' GROUP BY 1) SELECT p.id, p.name, p.owner, coalesce(c.n, 0) AS n FROM persons p LEFT JOIN counts c ON c.person = p.id WHERE NOT ${mergedAwaySql("p")} ORDER BY p.owner DESC, n DESC, p.name IS NULL, p.name COLLATE NOCASE, p.id LIMIT ?`;
|
|
41179
41195
|
var mergedAssignees = /* @__PURE__ */ __name((database) => JSON.stringify(database.prepare(`SELECT DISTINCT a.assignee_id AS id FROM task_assignments a JOIN persons p ON p.id = a.assignee_id WHERE a.assignee_type = 'person' AND ${mergedAwaySql("p")}`).all().map(({ id: id2 }) => [Number(id2), currentPerson(database, Number(id2))])), "mergedAssignees");
|
|
41180
41196
|
|
|
41181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
41182
41198
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
41183
41199
|
if (row2.author_type == null)
|
|
41184
41200
|
return null;
|
|
@@ -41206,7 +41222,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
41206
41222
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
41207
41223
|
}, "addComment");
|
|
41208
41224
|
|
|
41209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
41210
41226
|
var TASK_RELATION_KINDS = [
|
|
41211
41227
|
"blocked-by",
|
|
41212
41228
|
"follow-up-of",
|
|
@@ -41336,7 +41352,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
41336
41352
|
};
|
|
41337
41353
|
}, "taskRelationsStoreOver");
|
|
41338
41354
|
|
|
41339
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
41340
41356
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
41341
41357
|
var TASK_EVENT_KINDS = [
|
|
41342
41358
|
"created",
|
|
@@ -41895,7 +41911,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
41895
41911
|
};
|
|
41896
41912
|
}, "workTasksOver");
|
|
41897
41913
|
|
|
41898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
41899
41915
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
41900
41916
|
const { database, now: now2 } = context;
|
|
41901
41917
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -41944,7 +41960,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
41944
41960
|
};
|
|
41945
41961
|
}, "taskCloseOver");
|
|
41946
41962
|
|
|
41947
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
41948
41964
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
41949
41965
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
41950
41966
|
const { database, now: now2 } = context;
|
|
@@ -42163,7 +42179,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
42163
42179
|
};
|
|
42164
42180
|
}, "taskPairsOver");
|
|
42165
42181
|
|
|
42166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
42167
42183
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
42168
42184
|
var TASK_STATS_SQL = {
|
|
42169
42185
|
rows: /* @__PURE__ */ __name((board, filter) => `SELECT t.source_group, t.source_kind, t.project_id, t.status, t.created_at, t.closed_at FROM tasks t WHERE ${board ? PROJECT_SCOPE : ACCOUNT_SCOPE}${filter} ORDER BY t.created_at, t.id`, "rows"),
|
|
@@ -42202,7 +42218,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
42202
42218
|
}, "statNames")
|
|
42203
42219
|
}), "taskStatsOver");
|
|
42204
42220
|
|
|
42205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
42206
42222
|
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";
|
|
42207
42223
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
42208
42224
|
const key2 = inboxKey(account);
|
|
@@ -42418,7 +42434,7 @@ var oneOf4 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
42418
42434
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
42419
42435
|
}, "oneOf");
|
|
42420
42436
|
|
|
42421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42437
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
42422
42438
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
42423
42439
|
const { database } = context;
|
|
42424
42440
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -42488,7 +42504,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
42488
42504
|
};
|
|
42489
42505
|
}, "accountsStoreOver");
|
|
42490
42506
|
|
|
42491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
42492
42508
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
42493
42509
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
42494
42510
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -42512,7 +42528,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
42512
42528
|
})), "keepDownloads");
|
|
42513
42529
|
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");
|
|
42514
42530
|
|
|
42515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
42516
42532
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
42517
42533
|
const { database } = context;
|
|
42518
42534
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -42569,7 +42585,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42569
42585
|
}, "keepAttachmentText")
|
|
42570
42586
|
}), "attachmentsStoreOver");
|
|
42571
42587
|
|
|
42572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42588
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
42573
42589
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
42574
42590
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
42575
42591
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -42754,7 +42770,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
42754
42770
|
return done;
|
|
42755
42771
|
}, "rekeyChats");
|
|
42756
42772
|
|
|
42757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
42758
42774
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
42759
42775
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
42760
42776
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -42812,7 +42828,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
42812
42828
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
42813
42829
|
}, "chatCoverage");
|
|
42814
42830
|
|
|
42815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
42816
42832
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
42817
42833
|
const { database } = context;
|
|
42818
42834
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -42961,7 +42977,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42961
42977
|
};
|
|
42962
42978
|
}, "chatsStoreOver");
|
|
42963
42979
|
|
|
42964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
42965
42981
|
import { createHash as createHash7 } from "node:crypto";
|
|
42966
42982
|
var BATCH_CONTEXT = 50;
|
|
42967
42983
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -43099,7 +43115,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
43099
43115
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
43100
43116
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
43101
43117
|
|
|
43102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43118
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
43103
43119
|
import { setTimeout } from "node:timers/promises";
|
|
43104
43120
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
43105
43121
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -43411,7 +43427,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
43411
43427
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
43412
43428
|
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");
|
|
43413
43429
|
|
|
43414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
43415
43431
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
43416
43432
|
const { database } = context;
|
|
43417
43433
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -43518,7 +43534,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43518
43534
|
};
|
|
43519
43535
|
}, "conversationsStoreOver");
|
|
43520
43536
|
|
|
43521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
43522
43538
|
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";
|
|
43523
43539
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
43524
43540
|
const { database } = context;
|
|
@@ -43543,7 +43559,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
43543
43559
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
43544
43560
|
}), "countersStoreOver");
|
|
43545
43561
|
|
|
43546
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
43547
43563
|
var MENTION_STATUSES = ["found", "linked", "proposed", "dismissed"];
|
|
43548
43564
|
var MENTION_QUERY = defineQuery({
|
|
43549
43565
|
entity: "mention",
|
|
@@ -43762,7 +43778,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
43762
43778
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
43763
43779
|
}, "listPlaces");
|
|
43764
43780
|
|
|
43765
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
43766
43782
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
43767
43783
|
const { database } = context;
|
|
43768
43784
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -43797,7 +43813,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
43797
43813
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
43798
43814
|
}), "mentionsStoreOver");
|
|
43799
43815
|
|
|
43800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
43801
43817
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
43802
43818
|
var MUTED_NOW = "(coalesce(c.muted,0)=1 AND (c.muted_until IS NULL OR c.muted_until>?))";
|
|
43803
43819
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2, now2) => {
|
|
@@ -43896,7 +43912,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
43896
43912
|
});
|
|
43897
43913
|
}, "waitingChats");
|
|
43898
43914
|
|
|
43899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43915
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-activity-counts.js
|
|
43900
43916
|
var SQL = `SELECT coalesce(nullif(trim(c.title), ''), (SELECT sender_name FROM messages WHERE chat_id = c.id AND outgoing = 0 AND deleted_at IS NULL ORDER BY sent_at DESC LIMIT 1)) AS title, ${MUTED_NOW} AS muted, w.messages, w.sent, (SELECT max(sent_at) FROM messages WHERE chat_id = c.id AND deleted_at IS NULL AND sent_at < ?) AS last FROM chats c, (SELECT count(*) AS messages, coalesce(sum(outgoing = 1), 0) AS sent FROM messages WHERE chat_id = ? AND deleted_at IS NULL AND sent_at >= ? AND sent_at < ?) w WHERE c.id = ?`;
|
|
43901
43917
|
var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since, until, now: now2 }) => {
|
|
43902
43918
|
const statement = database.prepare(SQL);
|
|
@@ -43916,7 +43932,7 @@ var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since
|
|
|
43916
43932
|
return found2;
|
|
43917
43933
|
}, "chatActivityCounts");
|
|
43918
43934
|
|
|
43919
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43935
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
43920
43936
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
43921
43937
|
const read3 = 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");
|
|
43922
43938
|
const rows = messageId === void 0 ? read3.all(chatKey) : read3.all(chatKey, messageId);
|
|
@@ -43931,7 +43947,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
43931
43947
|
}));
|
|
43932
43948
|
}, "documentLinkMessages");
|
|
43933
43949
|
|
|
43934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43950
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
43935
43951
|
var stemmerFor = stemmerCache();
|
|
43936
43952
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
43937
43953
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -43975,7 +43991,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
43975
43991
|
});
|
|
43976
43992
|
}, "laterSharingRare");
|
|
43977
43993
|
|
|
43978
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43994
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
43979
43995
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
43980
43996
|
const { database } = context;
|
|
43981
43997
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -44116,7 +44132,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
44116
44132
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
44117
44133
|
}), "messagesStoreOver");
|
|
44118
44134
|
|
|
44119
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/person-kinds.js
|
|
44120
44136
|
var PERSON_KINDS = ["person", "organization", "automated", "stranger", "unsorted", "test"];
|
|
44121
44137
|
var AUTOMATED_WORDS = /* @__PURE__ */ new Set([
|
|
44122
44138
|
"noreply",
|
|
@@ -44179,7 +44195,7 @@ var isCompanyName = /* @__PURE__ */ __name((name) => {
|
|
|
44179
44195
|
return wordsOf3(name.replaceAll(".", "")).some((word2) => LEGAL_FORMS.has(word2) || COMPANY_WORDS.has(word2));
|
|
44180
44196
|
}, "isCompanyName");
|
|
44181
44197
|
|
|
44182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/person-ties.js
|
|
44183
44199
|
var SMALL_GROUP_MEMBERS = 10;
|
|
44184
44200
|
var PERSON_TIES = ["chat", "small-group", "mail", "meeting", "crm", "phone-book"];
|
|
44185
44201
|
var ALWAYS_SHOWN = ["owner", "added", "task"];
|
|
@@ -44234,7 +44250,7 @@ var shownReasons = /* @__PURE__ */ __name((database, people2) => {
|
|
|
44234
44250
|
return new Map([...found2].map(([person2, reasons]) => [person2, ORDER.filter((one2) => reasons.has(one2))]));
|
|
44235
44251
|
}, "shownReasons");
|
|
44236
44252
|
|
|
44237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/people-list.js
|
|
44238
44254
|
var PEOPLE_SORTS = ["interactions", "recent", "name", "tasks"];
|
|
44239
44255
|
var MIN_QUERY = 3;
|
|
44240
44256
|
var ftsPhrase = /* @__PURE__ */ __name((text8) => `"${text8.replaceAll('"', '""')}"`, "ftsPhrase");
|
|
@@ -44580,7 +44596,7 @@ var similarPeople = /* @__PURE__ */ __name((database, typed, limit) => {
|
|
|
44580
44596
|
return withLastContact(database, rows).map((person2, at2) => ({ ...person2, sameName: same[at2] === true }));
|
|
44581
44597
|
}, "similarPeople");
|
|
44582
44598
|
|
|
44583
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44599
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/person-doubts.js
|
|
44584
44600
|
var DOUBT_REASONS = ["owner-other-name", "test-data", "shared-address", "mixed-names"];
|
|
44585
44601
|
var COLUMNS5 = "l.person_id AS person, p.owner, p.name AS person_name, i.id AS pk, i.provider, i.external_id, i.name, i.phone, i.email, i.username, l.method, l.author, l.created_at, EXISTS (SELECT 1 FROM accounts a WHERE a.provider = i.provider AND a.external_id = i.external_id) AS account FROM identity_links l JOIN identities i ON i.id = l.identity_id JOIN persons p ON p.id = l.person_id";
|
|
44586
44602
|
var text5 = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? value : null, "text");
|
|
@@ -44836,7 +44852,7 @@ var markTestData = /* @__PURE__ */ __name((context, uid, by) => {
|
|
|
44836
44852
|
return { person: `person:${person2}`, identities: identities2 };
|
|
44837
44853
|
}, "markTestData");
|
|
44838
44854
|
|
|
44839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44855
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
44840
44856
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
44841
44857
|
var IN_SCOPES = "IN (SELECT value FROM json_each(?))";
|
|
44842
44858
|
var projectScope = /* @__PURE__ */ __name((id2) => `(SELECT p.scope FROM main.projects p WHERE p.id=${id2})`, "projectScope");
|
|
@@ -44905,7 +44921,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
44905
44921
|
});
|
|
44906
44922
|
}, "personPreparation");
|
|
44907
44923
|
|
|
44908
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
44909
44925
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
44910
44926
|
const id2 = Number(uid);
|
|
44911
44927
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -44913,7 +44929,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
44913
44929
|
return Boolean(database.prepare("SELECT 1 FROM persons p JOIN identity_links l ON l.person_id=p.id JOIN account_identities a ON a.identity_id=l.identity_id WHERE p.id=? AND a.account_id IN (SELECT value FROM json_each(?)) LIMIT 1").get(currentPerson(database, id2), JSON.stringify(accountIds)));
|
|
44914
44930
|
}, "personSeenInAccounts");
|
|
44915
44931
|
|
|
44916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
44917
44933
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
44918
44934
|
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);
|
|
44919
44935
|
if (!row2)
|
|
@@ -44980,7 +44996,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
44980
44996
|
return { id: id2, personId, removed: true };
|
|
44981
44997
|
}, "removeNote");
|
|
44982
44998
|
|
|
44983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
44984
45000
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
44985
45001
|
const { database } = context;
|
|
44986
45002
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -45107,13 +45123,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
45107
45123
|
};
|
|
45108
45124
|
}, "peopleStoreOver");
|
|
45109
45125
|
|
|
45110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
45111
45127
|
import { createHash as createHash9 } from "node:crypto";
|
|
45112
45128
|
|
|
45113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
45114
45130
|
import { createHash as createHash8 } from "node:crypto";
|
|
45115
45131
|
|
|
45116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45132
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
45117
45133
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
45118
45134
|
var AUTHOR_MEASURES = [
|
|
45119
45135
|
"messages",
|
|
@@ -45253,7 +45269,7 @@ var withoutUrls = /* @__PURE__ */ __name((text8) => text8.replace(/\S+/gu, (toke
|
|
|
45253
45269
|
var rankingWords = /* @__PURE__ */ __name((text8) => withoutUrls(text8).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
45254
45270
|
var rankingQuestion = /* @__PURE__ */ __name((text8) => withoutUrls(text8).includes("?"), "rankingQuestion");
|
|
45255
45271
|
|
|
45256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45272
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
45257
45273
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
45258
45274
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
45259
45275
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -45475,7 +45491,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
45475
45491
|
};
|
|
45476
45492
|
}, "rankReplyGraph");
|
|
45477
45493
|
|
|
45478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45494
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
45479
45495
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
45480
45496
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
45481
45497
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -45649,7 +45665,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
45649
45665
|
return { items, evidence, summary, graph: graph.quality };
|
|
45650
45666
|
}, "calculateAdminStatistics");
|
|
45651
45667
|
|
|
45652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45668
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
45653
45669
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
45654
45670
|
const dates = [];
|
|
45655
45671
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -45671,7 +45687,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
45671
45687
|
return dates[0].node.resolution.date;
|
|
45672
45688
|
}, "rankingContextRange");
|
|
45673
45689
|
|
|
45674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45690
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
45675
45691
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
45676
45692
|
let counts;
|
|
45677
45693
|
try {
|
|
@@ -45966,7 +45982,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
45966
45982
|
});
|
|
45967
45983
|
}, "rankQuery");
|
|
45968
45984
|
|
|
45969
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45985
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
45970
45986
|
function fail2(message3, reason = "query.too-large") {
|
|
45971
45987
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
45972
45988
|
}
|
|
@@ -46143,7 +46159,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
46143
46159
|
return result;
|
|
46144
46160
|
}), "adminStatisticsQuery");
|
|
46145
46161
|
|
|
46146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
46147
46163
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
46148
46164
|
if (!execution.accounts.length)
|
|
46149
46165
|
return { conversations: [], chats: [] };
|
|
@@ -46161,7 +46177,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
46161
46177
|
return { conversations: conversations2, chats: chats2 };
|
|
46162
46178
|
}, "conversationEligibility");
|
|
46163
46179
|
|
|
46164
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46180
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
46165
46181
|
import { createHash as createHash10 } from "node:crypto";
|
|
46166
46182
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
46167
46183
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -46311,7 +46327,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
46311
46327
|
return result;
|
|
46312
46328
|
}, "rankingEvidence");
|
|
46313
46329
|
|
|
46314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
46315
46331
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
46316
46332
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
46317
46333
|
if (execution.corpus === "mail")
|
|
@@ -46332,7 +46348,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
46332
46348
|
};
|
|
46333
46349
|
}, "queriesStoreOver");
|
|
46334
46350
|
|
|
46335
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
46336
46352
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
46337
46353
|
const { database, now: now2 } = context;
|
|
46338
46354
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -46371,10 +46387,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
46371
46387
|
}));
|
|
46372
46388
|
}, "chatEventsOf");
|
|
46373
46389
|
|
|
46374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46390
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
46375
46391
|
import { createHash as createHash11 } from "node:crypto";
|
|
46376
46392
|
|
|
46377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
46378
46394
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
46379
46395
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
46380
46396
|
timeZone: zone,
|
|
@@ -46394,7 +46410,7 @@ var weekKey = /* @__PURE__ */ __name((day3) => {
|
|
|
46394
46410
|
return date3.toISOString().slice(0, 10);
|
|
46395
46411
|
}, "weekKey");
|
|
46396
46412
|
|
|
46397
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
46398
46414
|
var RETENTION_TOLERANCE = 864e5;
|
|
46399
46415
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
46400
46416
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -46448,7 +46464,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
46448
46464
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
46449
46465
|
}, "retentionCohorts");
|
|
46450
46466
|
|
|
46451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46467
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
46452
46468
|
var iso10 = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString(), "iso");
|
|
46453
46469
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
46454
46470
|
validateRetentionOptions(options);
|
|
@@ -46579,7 +46595,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
46579
46595
|
};
|
|
46580
46596
|
}, "retentionQuery");
|
|
46581
46597
|
|
|
46582
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
46583
46599
|
var iso11 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
46584
46600
|
var marksOf = /* @__PURE__ */ __name(({ isBot: isBot2, flagged, deleted, hasPhoto }) => ({
|
|
46585
46601
|
...isBot2 === void 0 ? {} : { bot: isBot2 },
|
|
@@ -46708,7 +46724,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
46708
46724
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
46709
46725
|
})), "trackedChats");
|
|
46710
46726
|
|
|
46711
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
46712
46728
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
46713
46729
|
const { database } = context;
|
|
46714
46730
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -46764,7 +46780,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46764
46780
|
};
|
|
46765
46781
|
}, "rosterStoreOver");
|
|
46766
46782
|
|
|
46767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
46768
46784
|
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");
|
|
46769
46785
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
46770
46786
|
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 ?`);
|
|
@@ -46788,7 +46804,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
46788
46804
|
}
|
|
46789
46805
|
}, "backfillNormalized");
|
|
46790
46806
|
|
|
46791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46807
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
46792
46808
|
var INDEX2 = "message_words";
|
|
46793
46809
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
46794
46810
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -46915,7 +46931,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
46915
46931
|
});
|
|
46916
46932
|
}, "resetSearchIndex");
|
|
46917
46933
|
|
|
46918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46934
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
46919
46935
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
46920
46936
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
46921
46937
|
const before2 = stemsState(database);
|
|
@@ -47010,7 +47026,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
47010
47026
|
return resetStems(database, { now: now2 });
|
|
47011
47027
|
}, "followDefaultStemmers");
|
|
47012
47028
|
|
|
47013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
47014
47030
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
47015
47031
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
47016
47032
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -47032,7 +47048,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
47032
47048
|
});
|
|
47033
47049
|
}, "termCandidates");
|
|
47034
47050
|
|
|
47035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
47036
47052
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
47037
47053
|
const { database } = context;
|
|
47038
47054
|
const stemmerFor2 = stemmerCache();
|
|
@@ -47056,7 +47072,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47056
47072
|
};
|
|
47057
47073
|
}, "searchIndexStoreOver");
|
|
47058
47074
|
|
|
47059
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
47060
47076
|
var HISTORY_KEPT = 1e3;
|
|
47061
47077
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
47062
47078
|
var COLUMNS6 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -47126,7 +47142,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
47126
47142
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
47127
47143
|
}, "clearHistory");
|
|
47128
47144
|
|
|
47129
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
47130
47146
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
47131
47147
|
const { database } = context;
|
|
47132
47148
|
return {
|
|
@@ -47150,7 +47166,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47150
47166
|
};
|
|
47151
47167
|
}, "searchesStoreOver");
|
|
47152
47168
|
|
|
47153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
47154
47170
|
import { createHash as createHash12 } from "node:crypto";
|
|
47155
47171
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
47156
47172
|
var TEXT_COLUMNS = "kind = ?, title = ?, file_name = ?, extension = ?, url = ?, mime = ?, size = ?, content_hash = ?, body = ?, extraction = ?, metadata = ?, language = ?";
|
|
@@ -47392,7 +47408,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
47392
47408
|
};
|
|
47393
47409
|
}, "addedSourcesOver");
|
|
47394
47410
|
|
|
47395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
47396
47412
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
47397
47413
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
47398
47414
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -47440,7 +47456,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
47440
47456
|
};
|
|
47441
47457
|
}, "agentActionsStoreOver");
|
|
47442
47458
|
|
|
47443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/base-suggest.js
|
|
47444
47460
|
var baseSettingKey = /* @__PURE__ */ __name((kind3) => `stages.base.${kind3}`, "baseSettingKey");
|
|
47445
47461
|
var storedPipeline = /* @__PURE__ */ __name((value) => {
|
|
47446
47462
|
if (typeof value !== "string")
|
|
@@ -47486,7 +47502,7 @@ var suggestBaseStages = /* @__PURE__ */ __name((database, kind3, pipelines2, { o
|
|
|
47486
47502
|
}
|
|
47487
47503
|
}, "suggestBaseStages");
|
|
47488
47504
|
|
|
47489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
47490
47506
|
import { createHash as createHash13 } from "node:crypto";
|
|
47491
47507
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
47492
47508
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -47627,7 +47643,7 @@ var fieldReferences = /* @__PURE__ */ __name((record4, options = {}) => {
|
|
|
47627
47643
|
return found2;
|
|
47628
47644
|
}, "fieldReferences");
|
|
47629
47645
|
|
|
47630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
47631
47647
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
47632
47648
|
var SOURCE = "crm";
|
|
47633
47649
|
var crmIdentityId = /* @__PURE__ */ __name((key2, externalId, type = "contact") => `${idPart(key2.account)}/${type}/${idPart(externalId)}`, "crmIdentityId");
|
|
@@ -47758,7 +47774,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
47758
47774
|
return { savePipeline, saveItemRow };
|
|
47759
47775
|
}, "crmRowsOver");
|
|
47760
47776
|
|
|
47761
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activities.js
|
|
47762
47778
|
var ACTIVITY_RECORD = "crm.activity";
|
|
47763
47779
|
var MOST_BODY = 2e4;
|
|
47764
47780
|
var MOST_SUBJECT = 500;
|
|
@@ -47838,7 +47854,7 @@ var crmActivitiesOver = /* @__PURE__ */ __name((context) => {
|
|
|
47838
47854
|
return { save: save2, of };
|
|
47839
47855
|
}, "crmActivitiesOver");
|
|
47840
47856
|
|
|
47841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47857
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
47842
47858
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
47843
47859
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, cutoff) => {
|
|
47844
47860
|
const rows = database.prepare(`SELECT stage_id, currency, count(*) AS items, coalesce(sum(amount), 0) AS units FROM ${TABLES3[kind3]} WHERE stage_id IN (${stageIds.map(() => "?").join(", ") || "NULL"}) AND deleted_at IS NULL AND (? IS NULL OR created_at >= ?) GROUP BY stage_id, currency ORDER BY currency`).all(...stageIds, cutoff, cutoff);
|
|
@@ -47855,7 +47871,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, cuto
|
|
|
47855
47871
|
});
|
|
47856
47872
|
}, "stageAmountsOf");
|
|
47857
47873
|
|
|
47858
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47874
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
47859
47875
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
47860
47876
|
var itemsSql = /* @__PURE__ */ __name((kind3) => `SELECT d.*, s.name AS stage_name, s.pipeline_id, p.name AS pipeline_name, b.name AS author_name, b.kind AS author_kind, a.provider AS account_provider, a.external_id AS account_external_id, bs.id AS base_stage_ref_id, bs.name AS base_stage_name FROM ${TABLES4[kind3]} d JOIN pipeline_stages s ON s.id = d.stage_id JOIN pipelines p ON p.id = s.pipeline_id LEFT JOIN bots b ON d.author_type = 'bot' AND b.id = d.author_id LEFT JOIN accounts a ON a.id = d.account_id LEFT JOIN pipeline_stages bs ON s.base_confirmed = 1 AND bs.id = s.base_stage_id`, "itemsSql");
|
|
47861
47877
|
var MAX_STAGES = 30;
|
|
@@ -48334,7 +48350,7 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48334
48350
|
};
|
|
48335
48351
|
}, "dealsStoreOver");
|
|
48336
48352
|
|
|
48337
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
48338
48354
|
var KEY2 = "ownerLanguages";
|
|
48339
48355
|
var ISO_639_1 = new Set("aa ab ae af ak am an ar as av ay az ba be bg bi bm bn bo br bs ca ce ch co cr cs cu cv cy da de dv dz ee el en eo es et eu fa ff fi fj fo fr fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mr ms mt my na nb nd ne ng nl nn no nr nv ny oc oj om or os pa pi pl ps pt qu rm rn ro ru rw sa sc sd se sg si sk sl sm sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zu".split(" "));
|
|
48340
48356
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -48364,7 +48380,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
48364
48380
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(KEY2, JSON.stringify(languages), now2);
|
|
48365
48381
|
}, "saveOwnerLanguages");
|
|
48366
48382
|
|
|
48367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48383
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/base-stages.js
|
|
48368
48384
|
var OUTCOMES = {
|
|
48369
48385
|
lead: ["open", "open", "open", "won", "lost"],
|
|
48370
48386
|
deal: ["open", "open", "open", "open", "won", "lost"]
|
|
@@ -48697,7 +48713,7 @@ var baseStagesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48697
48713
|
};
|
|
48698
48714
|
}, "baseStagesStoreOver");
|
|
48699
48715
|
|
|
48700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
48701
48717
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
48702
48718
|
}) => {
|
|
48703
48719
|
const { database, now: now2 } = context;
|
|
@@ -48756,7 +48772,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
48756
48772
|
};
|
|
48757
48773
|
}, "botUpdateStoreOver");
|
|
48758
48774
|
|
|
48759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
48760
48776
|
var IMPORTER = { bot: "import" };
|
|
48761
48777
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
48762
48778
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -48801,7 +48817,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
48801
48817
|
};
|
|
48802
48818
|
}), "moneyLinesOf");
|
|
48803
48819
|
|
|
48804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/relation-role-labels.js
|
|
48805
48821
|
var label = /* @__PURE__ */ __name((en, ru, es) => ({ en, ru, es }), "label");
|
|
48806
48822
|
var ROLE_LABELS = {
|
|
48807
48823
|
organization: {
|
|
@@ -48842,7 +48858,7 @@ var ROLE_LABELS = {
|
|
|
48842
48858
|
}
|
|
48843
48859
|
};
|
|
48844
48860
|
|
|
48845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
48846
48862
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
48847
48863
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
48848
48864
|
var listOf2 = /* @__PURE__ */ __name((list2) => {
|
|
@@ -48926,7 +48942,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
48926
48942
|
};
|
|
48927
48943
|
}, "relationRolesOver");
|
|
48928
48944
|
|
|
48929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48945
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
48930
48946
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
48931
48947
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
48932
48948
|
var CRM_SCOPES = ["mine", "all"];
|
|
@@ -49121,7 +49137,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
49121
49137
|
return [{ setting: String(row2.key), value: settingValue(database, parsed4.key, parsed4.name) }];
|
|
49122
49138
|
}), "crmSettingsOf");
|
|
49123
49139
|
|
|
49124
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
49125
49141
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
49126
49142
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
49127
49143
|
id: link3.id,
|
|
@@ -49481,7 +49497,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
49481
49497
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
49482
49498
|
}, "decidedOrigin");
|
|
49483
49499
|
|
|
49484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
49485
49501
|
var keyOf4 = /* @__PURE__ */ __name((kind3, fromType, fromId, toType, toId, role) => `${String(kind3)}|${String(fromType)}:${String(fromId)}|${String(toType)}:${String(toId)}|${role == null ? "" : String(role)}`, "keyOf");
|
|
49486
49502
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
49487
49503
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" }, onOutcome } = {}) => {
|
|
@@ -49619,7 +49635,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
49619
49635
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
49620
49636
|
}), "relationsStoreOver");
|
|
49621
49637
|
|
|
49622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49638
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relationships.js
|
|
49623
49639
|
var importSource = /* @__PURE__ */ __name((provider) => `import:${provider}`, "importSource");
|
|
49624
49640
|
var noRelationships = /* @__PURE__ */ __name(() => ({
|
|
49625
49641
|
added: 0,
|
|
@@ -49809,7 +49825,7 @@ var recordRelationshipsOver = /* @__PURE__ */ __name((context) => {
|
|
|
49809
49825
|
return { report, placeOf: placeOf2, withdrawFrom };
|
|
49810
49826
|
}, "recordRelationshipsOver");
|
|
49811
49827
|
|
|
49812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
49813
49829
|
var CONTRACTS = "SELECT k.*, b.name AS author_name, b.kind AS author_kind FROM contracts k LEFT JOIN bots b ON k.author_type = 'bot' AND b.id = k.author_id";
|
|
49814
49830
|
var DAY_MS2 = 864e5;
|
|
49815
49831
|
var deadlineOf = /* @__PURE__ */ __name((expiration, days) => expiration === null || days === null ? null : new Date(Date.parse(`${expiration}T00:00:00Z`) - days * DAY_MS2).toISOString().slice(0, 10), "deadlineOf");
|
|
@@ -49968,7 +49984,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49968
49984
|
};
|
|
49969
49985
|
}, "contractsStoreOver");
|
|
49970
49986
|
|
|
49971
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49987
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
49972
49988
|
var BUSINESS_FIND_MAX = 2001;
|
|
49973
49989
|
var party2 = /* @__PURE__ */ __name((kind3, id2, as) => `LEFT JOIN persons ${as}p ON ${kind3} = 'person' AND ${as}p.id = ${id2} AND ${as}p.owner = 0 LEFT JOIN organizations ${as}o ON ${kind3} = 'organization' AND ${as}o.id = ${id2} LEFT JOIN projects ${as}j ON ${kind3} = 'project' AND ${as}j.id = ${id2}`, "party");
|
|
49974
49990
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
@@ -50073,7 +50089,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
50073
50089
|
};
|
|
50074
50090
|
}, "businessSearchOver");
|
|
50075
50091
|
|
|
50076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
50077
50093
|
var DAY5 = 864e5;
|
|
50078
50094
|
var COUNTERPART_LINK = `EXISTS (SELECT 1 FROM links l WHERE l.from_type = 'event' AND l.from_id = e.id AND l.to_type = 'person' AND l.to_id = ? AND l.kind = ${linkKind("related-to")} AND l.role = '${COUNTERPART_ROLE}')`;
|
|
50079
50095
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -50189,7 +50205,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
50189
50205
|
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);
|
|
50190
50206
|
}, "listEvents");
|
|
50191
50207
|
|
|
50192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
50193
50209
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
50194
50210
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
50195
50211
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -50246,7 +50262,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
50246
50262
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
50247
50263
|
}, "forgetCalendarRows");
|
|
50248
50264
|
|
|
50249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
50250
50266
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
50251
50267
|
id: Number(row2.id),
|
|
50252
50268
|
accountId: Number(row2.account_id),
|
|
@@ -50849,7 +50865,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50849
50865
|
};
|
|
50850
50866
|
}, "eventStoreOver");
|
|
50851
50867
|
|
|
50852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50868
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
50853
50869
|
var CATALOG_QUERY = defineQuery({
|
|
50854
50870
|
entity: "document",
|
|
50855
50871
|
backend: "sql",
|
|
@@ -51091,7 +51107,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
51091
51107
|
};
|
|
51092
51108
|
}, "catalogStoreOver");
|
|
51093
51109
|
|
|
51094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
51095
51111
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
51096
51112
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
51097
51113
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -51104,7 +51120,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
51104
51120
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
51105
51121
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
51106
51122
|
|
|
51107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
51108
51124
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
51109
51125
|
const { source: source2, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
51110
51126
|
signal?.throwIfAborted();
|
|
@@ -51203,7 +51219,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
51203
51219
|
});
|
|
51204
51220
|
}, "readMeetingContextEvidence");
|
|
51205
51221
|
|
|
51206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
51207
51223
|
var corpora = {
|
|
51208
51224
|
message: {
|
|
51209
51225
|
table: "messages",
|
|
@@ -51442,7 +51458,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
51442
51458
|
}
|
|
51443
51459
|
}), "contextRecordsOver");
|
|
51444
51460
|
|
|
51445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-contacts.js
|
|
51446
51462
|
var PLACEHOLDER = /(?:^|\s)null(?:\s+#\d+)?(?=\s|$)/gi;
|
|
51447
51463
|
var withoutPlaceholder = /* @__PURE__ */ __name((name) => name.replace(PLACEHOLDER, " ").replace(/\s+/g, " ").trim() || null, "withoutPlaceholder");
|
|
51448
51464
|
var DryRun = class extends Error {
|
|
@@ -51519,7 +51535,7 @@ var removeCrmContacts = /* @__PURE__ */ __name((context, key2, { users, before:
|
|
|
51519
51535
|
}
|
|
51520
51536
|
}, "removeCrmContacts");
|
|
51521
51537
|
|
|
51522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-stage-entries.js
|
|
51523
51539
|
var STAGE_ENTRY_RECORD = "crm.stage-entry";
|
|
51524
51540
|
var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
51525
51541
|
const { database, now: now2 } = context;
|
|
@@ -51566,7 +51582,7 @@ var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
51566
51582
|
return { save: save2, pending, handled };
|
|
51567
51583
|
}, "crmStageEntriesOver");
|
|
51568
51584
|
|
|
51569
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
51570
51586
|
var PENDING = "crm:pending-relations";
|
|
51571
51587
|
var PENDING_DAYS = 30;
|
|
51572
51588
|
var PENDING_MOST = 5e3;
|
|
@@ -52075,10 +52091,10 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
52075
52091
|
};
|
|
52076
52092
|
}, "crmCopiesOver");
|
|
52077
52093
|
|
|
52078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
52079
52095
|
import { createHash as createHash14, randomBytes as randomBytes2 } from "node:crypto";
|
|
52080
52096
|
|
|
52081
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
52082
52098
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
52083
52099
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
52084
52100
|
var CALLBACK_PREFIX = "wcr1:";
|
|
@@ -52092,7 +52108,7 @@ var callbackDataOf = /* @__PURE__ */ __name((token) => {
|
|
|
52092
52108
|
}, "callbackDataOf");
|
|
52093
52109
|
var parseCallbackData = /* @__PURE__ */ __name((data) => typeof data === "string" ? CALLBACK.exec(data)?.[1] : void 0, "parseCallbackData");
|
|
52094
52110
|
|
|
52095
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
52096
52112
|
var digestOf = /* @__PURE__ */ __name((token) => createHash14("sha256").update(token).digest("hex"), "digestOf");
|
|
52097
52113
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
52098
52114
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -52191,7 +52207,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
52191
52207
|
};
|
|
52192
52208
|
}, "decisionRequestStoreOver");
|
|
52193
52209
|
|
|
52194
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-listing.js
|
|
52195
52211
|
var MEETING_ROW_KINDS = ["meeting", "call", "event"];
|
|
52196
52212
|
var DAY6 = 864e5;
|
|
52197
52213
|
var JOINED = `(SELECT ce.event_id FROM calendar_entries ce JOIN events je ON je.id = ce.event_id
|
|
@@ -52552,7 +52568,7 @@ var meetingListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
52552
52568
|
};
|
|
52553
52569
|
}, "meetingListingOver");
|
|
52554
52570
|
|
|
52555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/document-listing.js
|
|
52556
52572
|
var DOCUMENT_KINDS = [
|
|
52557
52573
|
"transcript",
|
|
52558
52574
|
"doc",
|
|
@@ -52789,7 +52805,7 @@ var documentListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
52789
52805
|
};
|
|
52790
52806
|
}, "documentListingOver");
|
|
52791
52807
|
|
|
52792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
52793
52809
|
var NOTE_FIELDS = [
|
|
52794
52810
|
"text",
|
|
52795
52811
|
"exact",
|
|
@@ -53230,7 +53246,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
53230
53246
|
};
|
|
53231
53247
|
}, "noteSearchOver");
|
|
53232
53248
|
|
|
53233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
53234
53250
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
53235
53251
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
53236
53252
|
var EVENT_CORPUS = {
|
|
@@ -53362,7 +53378,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
53362
53378
|
};
|
|
53363
53379
|
}, "eventSearchOver");
|
|
53364
53380
|
|
|
53365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
53366
53382
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
53367
53383
|
try {
|
|
53368
53384
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -53374,7 +53390,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
53374
53390
|
}
|
|
53375
53391
|
}, "calendarMoment");
|
|
53376
53392
|
|
|
53377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
53378
53394
|
var NAMED4 = "SELECT f.*, b.name AS author_name, b.kind AS author_kind FROM facts f LEFT JOIN bots b ON f.author_type = 'bot' AND b.id = f.author_id";
|
|
53379
53395
|
var iso13 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
53380
53396
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -53597,7 +53613,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
53597
53613
|
};
|
|
53598
53614
|
}, "factsStoreOver");
|
|
53599
53615
|
|
|
53600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53616
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
53601
53617
|
var invalid5 = /* @__PURE__ */ __name((message3) => {
|
|
53602
53618
|
throw new CliError("validation_error", message3);
|
|
53603
53619
|
}, "invalid");
|
|
@@ -53765,7 +53781,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
53765
53781
|
return { snapshot: snapshot2, snapshotParts, previous, settle, keepWaiting, named: named2, sameDecision, create };
|
|
53766
53782
|
}, "findingsCoreOver");
|
|
53767
53783
|
|
|
53768
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
53769
53785
|
var stale = /* @__PURE__ */ __name(() => {
|
|
53770
53786
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
53771
53787
|
reason: "evidence-findings.stale"
|
|
@@ -54029,7 +54045,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54029
54045
|
};
|
|
54030
54046
|
}, "evidenceFindingsStoreOver");
|
|
54031
54047
|
|
|
54032
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
54033
54049
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
54034
54050
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
54035
54051
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -54083,7 +54099,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
54083
54099
|
}, "forPerson")
|
|
54084
54100
|
}), "involvementStoreOver");
|
|
54085
54101
|
|
|
54086
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
54087
54103
|
var LABELLED = {
|
|
54088
54104
|
note: "note",
|
|
54089
54105
|
document: "document",
|
|
@@ -54095,7 +54111,7 @@ var LABELLED = {
|
|
|
54095
54111
|
account: "folder"
|
|
54096
54112
|
};
|
|
54097
54113
|
|
|
54098
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
54099
54115
|
import { createHash as createHash15 } from "node:crypto";
|
|
54100
54116
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
54101
54117
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -54181,7 +54197,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
54181
54197
|
};
|
|
54182
54198
|
}, "meetingProjectsStoreOver");
|
|
54183
54199
|
|
|
54184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
54185
54201
|
var ORGANIZATIONS_QUERY = {
|
|
54186
54202
|
entity: "organization",
|
|
54187
54203
|
backend: "sql",
|
|
@@ -54222,7 +54238,7 @@ var REMINDERS_QUERY = {
|
|
|
54222
54238
|
})
|
|
54223
54239
|
};
|
|
54224
54240
|
|
|
54225
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54241
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-categories.js
|
|
54226
54242
|
var OWN2 = "(SELECT id FROM organizations WHERE deleted_at IS NULL AND json_extract(metadata, '$.own') = 1)";
|
|
54227
54243
|
var EMPLOYED = "('employee', 'contractor', 'founder')";
|
|
54228
54244
|
var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now2) => {
|
|
@@ -54243,7 +54259,7 @@ var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now
|
|
|
54243
54259
|
return { sql: `EXISTS (SELECT 1 FROM links l WHERE ${where} AND ${usable})`, params: keys };
|
|
54244
54260
|
}, "categorySql");
|
|
54245
54261
|
|
|
54246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54262
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
54247
54263
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
54248
54264
|
id: String(row2.id),
|
|
54249
54265
|
ref: `organization:${row2.id}`,
|
|
@@ -54288,7 +54304,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
54288
54304
|
}), "setOwnOrganization")
|
|
54289
54305
|
}), "organizationsStoreOver");
|
|
54290
54306
|
|
|
54291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
54292
54308
|
var KINDS = RELATION_KINDS.map(linkKind).join(", ");
|
|
54293
54309
|
var ACCOUNT_ENDS = [
|
|
54294
54310
|
["deal", "deals"],
|
|
@@ -54439,13 +54455,13 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
54439
54455
|
__name(proposalItem, "proposalItem");
|
|
54440
54456
|
}, "relationListOver");
|
|
54441
54457
|
|
|
54442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54458
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
54443
54459
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
54444
54460
|
...relationListOver(context),
|
|
54445
54461
|
...relationRolesOver(context)
|
|
54446
54462
|
}), "relationReadsOver");
|
|
54447
54463
|
|
|
54448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
54449
54465
|
var TABLES5 = { memory: "memories", fact: "facts" };
|
|
54450
54466
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
54451
54467
|
var DEFAULT_LIMIT = 500;
|
|
@@ -54688,16 +54704,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54688
54704
|
};
|
|
54689
54705
|
}, "sourceReviewStoreOver");
|
|
54690
54706
|
|
|
54691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54707
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
54692
54708
|
import { createHash as createHash18 } from "node:crypto";
|
|
54693
54709
|
|
|
54694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54710
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
54695
54711
|
import { createHash as createHash17 } from "node:crypto";
|
|
54696
54712
|
|
|
54697
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
54698
54714
|
import { createHash as createHash16 } from "node:crypto";
|
|
54699
54715
|
|
|
54700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
54701
54717
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
54702
54718
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
54703
54719
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -54748,7 +54764,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
54748
54764
|
return input;
|
|
54749
54765
|
}, "consolidationApplyInput");
|
|
54750
54766
|
|
|
54751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
54752
54768
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
54753
54769
|
id: String(row2.id),
|
|
54754
54770
|
sourceId: String(row2.source_id),
|
|
@@ -54823,7 +54839,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
54823
54839
|
}, { beforeCommit: check3 });
|
|
54824
54840
|
}, "applyTagConsolidation");
|
|
54825
54841
|
|
|
54826
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
54827
54843
|
var selections = [
|
|
54828
54844
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
54829
54845
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -54967,7 +54983,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
54967
54983
|
};
|
|
54968
54984
|
}, "previewRows");
|
|
54969
54985
|
|
|
54970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54986
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
54971
54987
|
var kinds = ["project", "tag", "topic"];
|
|
54972
54988
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
54973
54989
|
if (signal?.aborted)
|
|
@@ -55231,7 +55247,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55231
55247
|
};
|
|
55232
55248
|
}, "vocabularyStoreOver");
|
|
55233
55249
|
|
|
55234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
55235
55251
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
55236
55252
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
55237
55253
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -55782,7 +55798,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
55782
55798
|
return key2.padEnd(3, "X");
|
|
55783
55799
|
}, "projectKey");
|
|
55784
55800
|
|
|
55785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
55786
55802
|
var DAY7 = 864e5;
|
|
55787
55803
|
var SETTING5 = "logs_pruned_at";
|
|
55788
55804
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY7, botUpdatePayloadsMs: 30 * DAY7 };
|
|
@@ -55809,7 +55825,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
55809
55825
|
};
|
|
55810
55826
|
}, "logPruner");
|
|
55811
55827
|
|
|
55812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
55813
55829
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
55814
55830
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
55815
55831
|
var invalid7 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -56168,7 +56184,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
56168
56184
|
}, "checkMailFindings");
|
|
56169
56185
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
56170
56186
|
|
|
56171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
56172
56188
|
var ORDERS = "SELECT o.*, b.name AS author_name, b.kind AS author_kind FROM orders o LEFT JOIN bots b ON o.author_type = 'bot' AND b.id = o.author_id";
|
|
56173
56189
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
56174
56190
|
const { database, now: now2 } = context;
|
|
@@ -56383,7 +56399,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56383
56399
|
};
|
|
56384
56400
|
}, "ordersStoreOver");
|
|
56385
56401
|
|
|
56386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
56387
56403
|
var MAIL_EDITS = {
|
|
56388
56404
|
task: ["title", "type", "reason", "commitment", "project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence"],
|
|
56389
56405
|
fact: ["statement", "type", "reason", "subject", "project"],
|
|
@@ -56872,7 +56888,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
56872
56888
|
};
|
|
56873
56889
|
}, "mailFindingsStoreOver");
|
|
56874
56890
|
|
|
56875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
56876
56892
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
56877
56893
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
56878
56894
|
reason: "meeting-findings.stale"
|
|
@@ -57085,7 +57101,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57085
57101
|
};
|
|
57086
57102
|
}, "meetingFindingsStoreOver");
|
|
57087
57103
|
|
|
57088
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
57089
57105
|
var RANK_BATCH = 512;
|
|
57090
57106
|
var LIVE5 = "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";
|
|
57091
57107
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -57356,7 +57372,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
57356
57372
|
}
|
|
57357
57373
|
}), "meetingVectorsOver");
|
|
57358
57374
|
|
|
57359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
57360
57376
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
57361
57377
|
var TEXTS = {
|
|
57362
57378
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -57457,7 +57473,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57457
57473
|
};
|
|
57458
57474
|
}, "sourceMentionStoreOver");
|
|
57459
57475
|
|
|
57460
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57476
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
57461
57477
|
var TRANSACTIONS = "SELECT t.*, w.name AS wallet_name, b.name AS author_name, b.kind AS author_kind, (SELECT coalesce(sum(amount), 0) FROM transaction_splits WHERE transaction_id = t.id) AS split FROM financial_transactions t JOIN financial_accounts w ON w.id = t.financial_account_id LEFT JOIN bots b ON t.author_type = 'bot' AND b.id = t.author_id";
|
|
57462
57478
|
var MAX_SPLITS = 100;
|
|
57463
57479
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -57691,11 +57707,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57691
57707
|
};
|
|
57692
57708
|
}, "transactionsStoreOver");
|
|
57693
57709
|
|
|
57694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57710
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
57695
57711
|
import { accessSync, constants, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
57696
57712
|
import { dirname as dirname2 } from "node:path";
|
|
57697
57713
|
|
|
57698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
57699
57715
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
57700
57716
|
var CLIENTS_SETTING = "clients";
|
|
57701
57717
|
var coreVersion = (() => {
|
|
@@ -57756,7 +57772,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
57756
57772
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
57757
57773
|
}, "refusalAdvice");
|
|
57758
57774
|
|
|
57759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
57760
57776
|
var GENERATED = [
|
|
57761
57777
|
{
|
|
57762
57778
|
"name": "20261010184427_initial",
|
|
@@ -59110,7 +59126,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
59110
59126
|
}
|
|
59111
59127
|
];
|
|
59112
59128
|
|
|
59113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
59114
59130
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
59115
59131
|
import { basename, dirname, join as join3, parse } from "node:path";
|
|
59116
59132
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -59343,7 +59359,7 @@ var rollBack2 = /* @__PURE__ */ __name((database, path) => {
|
|
|
59343
59359
|
return { ...result, foreignKeyViolations };
|
|
59344
59360
|
}, "rollBack");
|
|
59345
59361
|
|
|
59346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59362
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
59347
59363
|
var V31_TABLES = [
|
|
59348
59364
|
"accounts",
|
|
59349
59365
|
"account_identities",
|
|
@@ -59508,7 +59524,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
59508
59524
|
return migrations;
|
|
59509
59525
|
}, "generatedMigrations");
|
|
59510
59526
|
|
|
59511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
59512
59528
|
var MIGRATIONS = generatedMigrations();
|
|
59513
59529
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
59514
59530
|
version INTEGER PRIMARY KEY,
|
|
@@ -59605,7 +59621,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
59605
59621
|
}
|
|
59606
59622
|
}, "migrate");
|
|
59607
59623
|
|
|
59608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
59609
59625
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
59610
59626
|
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 ?");
|
|
59611
59627
|
if (pending.get(0, 1) === void 0)
|
|
@@ -59627,7 +59643,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
59627
59643
|
}
|
|
59628
59644
|
}, "fillJoinKeys");
|
|
59629
59645
|
|
|
59630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
59631
59647
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
59632
59648
|
refuseOwnerStoreInTests(path);
|
|
59633
59649
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -59641,8 +59657,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
59641
59657
|
}, "openSqlite");
|
|
59642
59658
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
59643
59659
|
quietSqliteWarning();
|
|
59644
|
-
const { drizzle } = await import("./node-
|
|
59645
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
59660
|
+
const { drizzle } = await import("./node-G7PMDYQV.js");
|
|
59661
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-RXWQ3SES.js");
|
|
59646
59662
|
const client = await nodeClient(path, { readOnly });
|
|
59647
59663
|
try {
|
|
59648
59664
|
if (!readOnly)
|
|
@@ -59656,8 +59672,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
59656
59672
|
}
|
|
59657
59673
|
}, "openUnderNode");
|
|
59658
59674
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
59659
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
59660
|
-
const { drizzle } = await import("./bun-
|
|
59675
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-ATPCJ4CT.js");
|
|
59676
|
+
const { drizzle } = await import("./bun-IVP5LSVI.js");
|
|
59661
59677
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
59662
59678
|
try {
|
|
59663
59679
|
if (!readOnly)
|
|
@@ -59671,7 +59687,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
59671
59687
|
}
|
|
59672
59688
|
}, "openUnderBun");
|
|
59673
59689
|
|
|
59674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59690
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
59675
59691
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
59676
59692
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
59677
59693
|
try {
|
|
@@ -59739,7 +59755,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
59739
59755
|
});
|
|
59740
59756
|
}, "movePaymentFacts");
|
|
59741
59757
|
|
|
59742
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59758
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
59743
59759
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
59744
59760
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
59745
59761
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -59757,7 +59773,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
59757
59773
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
59758
59774
|
}, "assertReadCompatible");
|
|
59759
59775
|
|
|
59760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
59761
59777
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
59762
59778
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
59763
59779
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -59803,7 +59819,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
59803
59819
|
});
|
|
59804
59820
|
}, "moveSuggestedLinks");
|
|
59805
59821
|
|
|
59806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
59807
59823
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
59808
59824
|
var TEST_PROVIDER = "chat";
|
|
59809
59825
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -59824,7 +59840,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
59824
59840
|
}
|
|
59825
59841
|
}, "purgeTestAccounts");
|
|
59826
59842
|
|
|
59827
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59843
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
59828
59844
|
var BACKFILL_ON_OPEN = 5e3;
|
|
59829
59845
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
59830
59846
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -59936,7 +59952,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
59936
59952
|
}
|
|
59937
59953
|
}, "openStoreContext");
|
|
59938
59954
|
|
|
59939
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
59940
59956
|
var PRODUCTS = "SELECT c.*, b.name AS author_name, b.kind AS author_kind FROM catalog_items c LEFT JOIN bots b ON c.author_type = 'bot' AND b.id = c.author_id";
|
|
59941
59957
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
59942
59958
|
const { database, now: now2 } = context;
|
|
@@ -60044,13 +60060,13 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60044
60060
|
};
|
|
60045
60061
|
}, "productsStoreOver");
|
|
60046
60062
|
|
|
60047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
60048
60064
|
import { createHash as createHash20 } from "node:crypto";
|
|
60049
60065
|
|
|
60050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60066
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
60051
60067
|
import { createHash as createHash19 } from "node:crypto";
|
|
60052
60068
|
|
|
60053
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
60054
60070
|
var text6 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
60055
60071
|
var ref = text6(2048);
|
|
60056
60072
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -60120,7 +60136,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
60120
60136
|
}))
|
|
60121
60137
|
});
|
|
60122
60138
|
|
|
60123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
60124
60140
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
60125
60141
|
var invalid10 = /* @__PURE__ */ __name((field4) => {
|
|
60126
60142
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -60253,7 +60269,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
60253
60269
|
return createHash19("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
60254
60270
|
}, "projectAnnotationsFingerprint");
|
|
60255
60271
|
|
|
60256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60272
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
60257
60273
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
60258
60274
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
60259
60275
|
var targetSchema = strictObject({
|
|
@@ -60360,7 +60376,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
60360
60376
|
}, "planBoundProjectAnnotations");
|
|
60361
60377
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
60362
60378
|
|
|
60363
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
60364
60380
|
import { createHash as createHash21 } from "node:crypto";
|
|
60365
60381
|
var text7 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
60366
60382
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -60454,7 +60470,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
60454
60470
|
})).digest("hex");
|
|
60455
60471
|
}, "projectAnnotationSnapshotFingerprint");
|
|
60456
60472
|
|
|
60457
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60473
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
60458
60474
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
60459
60475
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
60460
60476
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -60471,7 +60487,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
60471
60487
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
60472
60488
|
}, "projectAnnotationRequest");
|
|
60473
60489
|
|
|
60474
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60490
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
60475
60491
|
var SnapshotBudget = class {
|
|
60476
60492
|
static {
|
|
60477
60493
|
__name(this, "SnapshotBudget");
|
|
@@ -60497,13 +60513,13 @@ var SnapshotBudget = class {
|
|
|
60497
60513
|
}
|
|
60498
60514
|
};
|
|
60499
60515
|
|
|
60500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
60501
60517
|
import { createHash as createHash23 } from "node:crypto";
|
|
60502
60518
|
|
|
60503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
60504
60520
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
60505
60521
|
|
|
60506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
60507
60523
|
import { createHash as createHash22 } from "node:crypto";
|
|
60508
60524
|
var invalid12 = /* @__PURE__ */ __name(() => {
|
|
60509
60525
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -60646,7 +60662,7 @@ var ProjectSnapshotSources = class {
|
|
|
60646
60662
|
}
|
|
60647
60663
|
};
|
|
60648
60664
|
|
|
60649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60665
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
60650
60666
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
60651
60667
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
60652
60668
|
}, "unsupported");
|
|
@@ -60824,7 +60840,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
60824
60840
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
60825
60841
|
}), "projectAnnotationSnapshot");
|
|
60826
60842
|
|
|
60827
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60843
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
60828
60844
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
60829
60845
|
const current2 = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
60830
60846
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -60886,7 +60902,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
60886
60902
|
};
|
|
60887
60903
|
}), "previewAnnotationSnapshot");
|
|
60888
60904
|
|
|
60889
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
60890
60906
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
60891
60907
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
60892
60908
|
if (link3.kind === "evidence" && to)
|
|
@@ -60953,7 +60969,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
60953
60969
|
return mappings;
|
|
60954
60970
|
}, "restoreAnnotationRecords");
|
|
60955
60971
|
|
|
60956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
60957
60973
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
60958
60974
|
async preview(request) {
|
|
60959
60975
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -60983,7 +60999,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
60983
60999
|
}
|
|
60984
61000
|
}), "projectAnnotationStoreOver");
|
|
60985
61001
|
|
|
60986
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61002
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
60987
61003
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
60988
61004
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
60989
61005
|
const sql2 = /* @__PURE__ */ __name((text8) => database.prepare(text8), "sql");
|
|
@@ -61054,7 +61070,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
61054
61070
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
61055
61071
|
}, "recordRelationsOver");
|
|
61056
61072
|
|
|
61057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61073
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
61058
61074
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
61059
61075
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
61060
61076
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -61108,7 +61124,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
61108
61124
|
return { pointedAt, remap };
|
|
61109
61125
|
}, "recordRemapOver");
|
|
61110
61126
|
|
|
61111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
61112
61128
|
var runs = 0;
|
|
61113
61129
|
var PAGE = 500;
|
|
61114
61130
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -61321,7 +61337,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
61321
61337
|
return pointerOf("records", index2, "fields", key2);
|
|
61322
61338
|
}, "waitingPointer");
|
|
61323
61339
|
|
|
61324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61340
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
61325
61341
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
61326
61342
|
var SCHEME = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
61327
61343
|
var ORG_EMAIL = "org-email";
|
|
@@ -61487,7 +61503,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
61487
61503
|
]);
|
|
61488
61504
|
}, "renameMade");
|
|
61489
61505
|
|
|
61490
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
61491
61507
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
61492
61508
|
name: given2(fields4, "name"),
|
|
61493
61509
|
unit: given2(fields4, "unit"),
|
|
@@ -61610,7 +61626,7 @@ var DIRECT_PROJECTORS = {
|
|
|
61610
61626
|
lead: dealProjector("lead")
|
|
61611
61627
|
};
|
|
61612
61628
|
|
|
61613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61629
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-document.js
|
|
61614
61630
|
var TEXT_ONLY = { storage: "text", localPath: null };
|
|
61615
61631
|
var textOf7 = /* @__PURE__ */ __name(({ fields: fields4, externalId }) => {
|
|
61616
61632
|
const text8 = String(fields4.text ?? "");
|
|
@@ -61679,7 +61695,7 @@ var DOCUMENT_PROJECTORS = {
|
|
|
61679
61695
|
}
|
|
61680
61696
|
};
|
|
61681
61697
|
|
|
61682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
61683
61699
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
61684
61700
|
const importer = authorActor(context, IMPORTER).actor;
|
|
61685
61701
|
return context.database.prepare("SELECT 1 FROM payment_allocations WHERE payment_id = ? AND NOT (author_type = ? AND author_id = ?) LIMIT 1").get(paymentId, importer.type, importer.id) !== void 0;
|
|
@@ -61889,7 +61905,7 @@ var MONEY_PROJECTORS = {
|
|
|
61889
61905
|
}
|
|
61890
61906
|
};
|
|
61891
61907
|
|
|
61892
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61908
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
61893
61909
|
var CALLS_CALENDAR = "calls";
|
|
61894
61910
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
61895
61911
|
if (!isImportedProvider(source2.provider))
|
|
@@ -62064,7 +62080,7 @@ var PHONE_PROJECTORS = {
|
|
|
62064
62080
|
}
|
|
62065
62081
|
};
|
|
62066
62082
|
|
|
62067
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62083
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
62068
62084
|
var RECORD_PROJECTORS = {
|
|
62069
62085
|
...MONEY_PROJECTORS,
|
|
62070
62086
|
...DIRECT_PROJECTORS,
|
|
@@ -62075,7 +62091,7 @@ var RECORD_PROJECTORS = {
|
|
|
62075
62091
|
project: null
|
|
62076
62092
|
};
|
|
62077
62093
|
|
|
62078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
62079
62095
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
62080
62096
|
const sql2 = /* @__PURE__ */ __name((text8) => database.prepare(text8), "sql");
|
|
62081
62097
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -62137,7 +62153,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
62137
62153
|
return { settle, checkShares };
|
|
62138
62154
|
}, "recordSettlingOver");
|
|
62139
62155
|
|
|
62140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
62141
62157
|
import { createHash as createHash24 } from "node:crypto";
|
|
62142
62158
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
62143
62159
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -62153,7 +62169,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
62153
62169
|
return { stamp, untouched };
|
|
62154
62170
|
}, "importStampsOver");
|
|
62155
62171
|
|
|
62156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
62157
62173
|
var SUBSCRIPTIONS = "SELECT s.*, b.name AS author_name, b.kind AS author_kind FROM subscriptions s LEFT JOIN bots b ON s.author_type = 'bot' AND b.id = s.author_id";
|
|
62158
62174
|
var PRICES = "SELECT p.*, b.name AS author_name, b.kind AS author_kind FROM subscription_prices p LEFT JOIN bots b ON p.author_type = 'bot' AND b.id = p.author_id";
|
|
62159
62175
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -62390,7 +62406,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62390
62406
|
};
|
|
62391
62407
|
}, "subscriptionsStoreOver");
|
|
62392
62408
|
|
|
62393
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
62394
62410
|
var WALLETS = "SELECT w.*, b.name AS author_name, b.kind AS author_kind FROM financial_accounts w LEFT JOIN bots b ON w.author_type = 'bot' AND b.id = w.author_id";
|
|
62395
62411
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
62396
62412
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -62515,7 +62531,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62515
62531
|
};
|
|
62516
62532
|
}, "walletsStoreOver");
|
|
62517
62533
|
|
|
62518
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62534
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
62519
62535
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
62520
62536
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
62521
62537
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -62774,7 +62790,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
62774
62790
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
62775
62791
|
}, "recordWritesOver");
|
|
62776
62792
|
|
|
62777
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
62778
62794
|
var LIMIT = 1e3;
|
|
62779
62795
|
var iso16 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
62780
62796
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -62998,7 +63014,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62998
63014
|
};
|
|
62999
63015
|
}, "recordStoreOver");
|
|
63000
63016
|
|
|
63001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/templates.js
|
|
63002
63018
|
var templateOf = /* @__PURE__ */ __name((row2) => ({
|
|
63003
63019
|
key: row2.key,
|
|
63004
63020
|
channel: row2.channel,
|
|
@@ -63053,7 +63069,7 @@ var storedTemplateBodies = /* @__PURE__ */ __name((database, key2, language) =>
|
|
|
63053
63069
|
return Object.fromEntries(rows.map((row2) => [row2.channel, row2.body]));
|
|
63054
63070
|
}, "storedTemplateBodies");
|
|
63055
63071
|
|
|
63056
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
63057
63073
|
var refusalOf2 = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
63058
63074
|
var wrapped2 = /* @__PURE__ */ new WeakMap();
|
|
63059
63075
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -63088,7 +63104,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
63088
63104
|
return proxy;
|
|
63089
63105
|
}, "storeErrors");
|
|
63090
63106
|
|
|
63091
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
63092
63108
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
63093
63109
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
63094
63110
|
let merged2 = { from: from2, to };
|
|
@@ -63101,7 +63117,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
63101
63117
|
}, "markRange");
|
|
63102
63118
|
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");
|
|
63103
63119
|
|
|
63104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
63105
63121
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
63106
63122
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
63107
63123
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -63122,7 +63138,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
63122
63138
|
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);
|
|
63123
63139
|
}, "setTaskAnalysisMark");
|
|
63124
63140
|
|
|
63125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63141
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
63126
63142
|
var keyOf6 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
63127
63143
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
63128
63144
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf6(account));
|
|
@@ -63132,7 +63148,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
63132
63148
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf6(account), JSON.stringify(until), now2);
|
|
63133
63149
|
}, "setTaskRulesStop");
|
|
63134
63150
|
|
|
63135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
63136
63152
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
63137
63153
|
const { database } = context;
|
|
63138
63154
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -63191,7 +63207,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
63191
63207
|
};
|
|
63192
63208
|
}, "syncStoreOver");
|
|
63193
63209
|
|
|
63194
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
63195
63211
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
63196
63212
|
const { database } = context;
|
|
63197
63213
|
return {
|
|
@@ -63213,7 +63229,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
63213
63229
|
};
|
|
63214
63230
|
}, "tagsStoreOver");
|
|
63215
63231
|
|
|
63216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
63217
63233
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
63218
63234
|
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
|
|
63219
63235
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -63340,7 +63356,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
63340
63356
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
63341
63357
|
}, "savePictureChunks");
|
|
63342
63358
|
|
|
63343
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
63344
63360
|
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,
|
|
63345
63361
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
63346
63362
|
FROM messages m
|
|
@@ -63429,7 +63445,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
63429
63445
|
return plain2(best(found2));
|
|
63430
63446
|
}, "nearestMessages");
|
|
63431
63447
|
|
|
63432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
63433
63449
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
63434
63450
|
const { database } = context;
|
|
63435
63451
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -63688,7 +63704,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
63688
63704
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
63689
63705
|
}), "vectorsStoreOver");
|
|
63690
63706
|
|
|
63691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63707
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
63692
63708
|
import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
63693
63709
|
import { dirname as dirname3, join as join4 } from "node:path";
|
|
63694
63710
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -63776,10 +63792,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
63776
63792
|
}
|
|
63777
63793
|
}, "lastBackup");
|
|
63778
63794
|
|
|
63779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63795
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
63780
63796
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
63781
63797
|
|
|
63782
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63798
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
63783
63799
|
var COUNTED_TABLES = [
|
|
63784
63800
|
"accounts",
|
|
63785
63801
|
"chats",
|
|
@@ -63864,7 +63880,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
63864
63880
|
};
|
|
63865
63881
|
}, "storeContents");
|
|
63866
63882
|
|
|
63867
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
63868
63884
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
63869
63885
|
const context = await openStoreContext(options);
|
|
63870
63886
|
try {
|