@wirecat/mail-cli 0.27.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-5XWH7TBM.js → all-profiles-Q4E2LPB4.js} +7 -7
- package/dist/bundle/{anthropic-QEQGUEPW.js → anthropic-S3N4JDJU.js} +2 -2
- package/dist/bundle/{app-server-YWDU56NR.js → app-server-E44CAPPI.js} +44 -44
- package/dist/bundle/{bun-PWMM6L45.js → bun-RDYA5FCZ.js} +2 -2
- package/dist/bundle/{bun-sqlite-S4QD5YUO.js → bun-sqlite-FPVHKI24.js} +3 -3
- package/dist/bundle/{chunk-2FZMIJW7.js → chunk-2MTIGJHQ.js} +4 -4
- package/dist/bundle/{chunk-QQTSPQ2D.js → chunk-3AH7UEM6.js} +1 -1
- package/dist/bundle/{chunk-7BXOFLWJ.js → chunk-3RBUACSJ.js} +54 -54
- package/dist/bundle/{chunk-4VDWQKDI.js → chunk-44IAJV2T.js} +16 -16
- package/dist/bundle/{chunk-NZG6IRDW.js → chunk-45ET53MO.js} +2 -2
- package/dist/bundle/{chunk-XBL46B4V.js → chunk-5PDWUD3W.js} +1 -1
- package/dist/bundle/{chunk-APLVXHFG.js → chunk-5ZJ6IHVE.js} +1 -1
- package/dist/bundle/{chunk-255RGG5W.js → chunk-6B2BBL35.js} +5 -5
- package/dist/bundle/{chunk-TKOZCIHU.js → chunk-7AO73MJZ.js} +15 -15
- package/dist/bundle/{chunk-AIEMFRBU.js → chunk-7E4KECG4.js} +1 -1
- package/dist/bundle/{chunk-UIKVP23D.js → chunk-7ESXP4TG.js} +1 -1
- package/dist/bundle/{chunk-77J5ID2O.js → chunk-ATJANIQR.js} +2 -2
- package/dist/bundle/{chunk-T7VERZP5.js → chunk-BDWOTD7E.js} +23 -23
- package/dist/bundle/{chunk-IDOHT4Z3.js → chunk-BPHLFSUO.js} +15 -15
- package/dist/bundle/{chunk-KHBZ4OEP.js → chunk-D4QALV67.js} +1 -1
- package/dist/bundle/{chunk-WRHAX53U.js → chunk-DIOHJT2W.js} +6 -6
- package/dist/bundle/{chunk-QVJMFZFW.js → chunk-DMW6J2P3.js} +1 -1
- package/dist/bundle/{chunk-ROLHKFKB.js → chunk-FDGCTY6J.js} +9 -9
- package/dist/bundle/{chunk-572NWJUN.js → chunk-FHQ32JKS.js} +1 -1
- package/dist/bundle/{chunk-CZRMT6XV.js → chunk-FM4B357N.js} +2 -2
- package/dist/bundle/{chunk-CKFVKHTB.js → chunk-FOZXPSHA.js} +3 -3
- package/dist/bundle/{chunk-5DLPM5AV.js → chunk-HKC6ZJA5.js} +12 -12
- package/dist/bundle/{chunk-BZCXAVGP.js → chunk-IKTBM64M.js} +7 -7
- package/dist/bundle/{chunk-WMXUFUV3.js → chunk-IZEK7JI7.js} +2 -2
- package/dist/bundle/{chunk-UEJVXUIO.js → chunk-KBTVVHFP.js} +12 -12
- package/dist/bundle/{chunk-ELPH22W6.js → chunk-KNTAOY5J.js} +7 -7
- package/dist/bundle/{chunk-EXWZCI5G.js → chunk-KSFPMRH6.js} +1 -1
- package/dist/bundle/{chunk-DSUOYJUL.js → chunk-KTLJ6F2B.js} +3 -3
- package/dist/bundle/{chunk-S7H7TAC3.js → chunk-MT5KDBOM.js} +5 -5
- package/dist/bundle/{chunk-XM2THVMR.js → chunk-MVGFB7IS.js} +2 -2
- package/dist/bundle/{chunk-SXKKOOA7.js → chunk-NUHUTJTM.js} +1 -1
- package/dist/bundle/{chunk-AIZ225IA.js → chunk-NWA7JS74.js} +241 -241
- package/dist/bundle/{chunk-PJ3FKBXG.js → chunk-ODPYXNHI.js} +1 -1
- package/dist/bundle/{chunk-ZVQDOKDY.js → chunk-OLTJB5PW.js} +1 -1
- package/dist/bundle/{chunk-TI2OANJZ.js → chunk-PCYTU7HS.js} +1 -1
- package/dist/bundle/{chunk-OEPNLKHI.js → chunk-PIKOQWTL.js} +4 -4
- package/dist/bundle/{chunk-RRLAFEPQ.js → chunk-PYOM4J73.js} +2 -2
- package/dist/bundle/{chunk-PA7LDYVX.js → chunk-RFM3AAK5.js} +52 -52
- package/dist/bundle/{chunk-UBH4UPZ7.js → chunk-RGIEG4XK.js} +2 -1
- package/dist/bundle/{chunk-VYZ37D2Q.js → chunk-TXDA437R.js} +1 -1
- package/dist/bundle/{chunk-5BPOEPYL.js → chunk-UH7FYLFL.js} +4 -4
- package/dist/bundle/{chunk-ZSWSFKNE.js → chunk-UQZJ2GFQ.js} +2 -2
- package/dist/bundle/{chunk-DQO2LX5I.js → chunk-UUM7AF32.js} +2 -2
- package/dist/bundle/{chunk-R3A65A4D.js → chunk-VERUQQZS.js} +10 -10
- package/dist/bundle/{chunk-R5FTCNLJ.js → chunk-VFRI6RF7.js} +1 -1
- package/dist/bundle/{chunk-FOTP6QLO.js → chunk-VXHL3XI6.js} +2 -2
- package/dist/bundle/{chunk-FVVSBQGK.js → chunk-W32UQL5I.js} +21 -21
- package/dist/bundle/{chunk-OCUKQRJ3.js → chunk-WSHPLO4Q.js} +149 -148
- package/dist/bundle/{chunk-RGQFVVBB.js → chunk-WZNQ2P7H.js} +17 -17
- package/dist/bundle/{chunk-HBK6MRAL.js → chunk-XEMARUGS.js} +7 -7
- package/dist/bundle/{chunk-OPOEAGVB.js → chunk-YAQGWHMH.js} +6 -6
- package/dist/bundle/{chunk-S2QRW647.js → chunk-YRER6N3Y.js} +29 -29
- package/dist/bundle/{chunk-OC3U2JAK.js → chunk-YSR2XBDO.js} +3 -3
- package/dist/bundle/{chunk-XCYDTIVK.js → chunk-Z5D6CRY6.js} +4 -4
- package/dist/bundle/{chunk-PRSXMM4I.js → chunk-ZIFB6KGQ.js} +359 -359
- package/dist/bundle/{chunk-MY4LVD64.js → chunk-ZPVVSA5R.js} +1 -1
- package/dist/bundle/{command-contract-MIJONVVG.js → command-contract-TMLXLGVT.js} +15 -15
- package/dist/bundle/{command-server-entry-VHUFW3OZ.js → command-server-entry-PFUR2W7X.js} +21 -21
- package/dist/bundle/{decode-TIMTSVXM.js → decode-SIVT4JWX.js} +2 -2
- package/dist/bundle/{dist-IP25JFTN.js → dist-YWSF5MHP.js} +11 -11
- package/dist/bundle/{echarts-SDZA2SWG.js → echarts-CABLIXX7.js} +2 -2
- package/dist/bundle/{embed-4W527BCE.js → embed-OHENS6RB.js} +3 -3
- package/dist/bundle/{embedder-LQE2SBJ3.js → embedder-JINT4Y4O.js} +6 -6
- package/dist/bundle/{first-run-KZTKMEI4.js → first-run-LU2MAK2B.js} +6 -6
- package/dist/bundle/first-screen-KZNLKRRQ.js +34 -0
- package/dist/bundle/{instructions-7T6JJIFS.js → instructions-3D22PA4T.js} +1 -1
- package/dist/bundle/mail.js +2 -2
- package/dist/bundle/{node-BZDMUFTW.js → node-42G4RGMW.js} +2 -2
- package/dist/bundle/{node-sqlite-PVSKI4OS.js → node-sqlite-KQZM5M3N.js} +4 -4
- package/dist/bundle/{oauth-TGYGAVGF.js → oauth-7BNCNKQV.js} +4 -4
- package/dist/bundle/{open-5YED4Q4C.js → open-ULOQOP7K.js} +2 -2
- package/dist/bundle/{openai-XVJTML22.js → openai-O5AH6VGT.js} +12 -12
- package/dist/bundle/{process-756VBE7E.js → process-6D767IDN.js} +1 -1
- package/dist/bundle/{program-TDHDXAQA.js → program-OE7MFRMJ.js} +525 -408
- package/dist/bundle/{prompt-HPZANASN.js → prompt-WN7EBVKT.js} +2 -2
- package/dist/bundle/{recognize-PP5XQQHH.js → recognize-IX33XEXZ.js} +1 -1
- package/dist/bundle/{remote-C2LU2WYG.js → remote-22N3FQUC.js} +6 -6
- package/dist/bundle/{rerank-WRHNOM4Z.js → rerank-IGX4EFA2.js} +4 -4
- package/dist/bundle/{serve-RE3IV2QB.js → serve-XWIRR2QZ.js} +6 -6
- package/dist/bundle/server-D5OTVERP.js +68 -0
- package/dist/bundle/{server-52BJ7UTO.js → server-DBS4WC6T.js} +35 -35
- package/dist/bundle/{sqlite-runtime-CRRL3MYX.js → sqlite-runtime-WFBTXXXJ.js} +3 -3
- package/dist/bundle/{state-YGJRPMWD.js → state-4J5ERHJA.js} +3 -3
- package/dist/bundle/{store-ESQE4VHP.js → store-YRBX7XLM.js} +13 -13
- package/dist/bundle/{store-6AZ5LVJL.js → store-YSP2NPRJ.js} +15 -15
- package/dist/bundle/store-maintenance-command-SH6IB7S6.js +58 -0
- package/dist/commands/rules.d.ts.map +1 -1
- package/dist/commands/rules.js +78 -20
- package/dist/commands/rules.js.map +1 -1
- package/dist/commands/words.d.ts.map +1 -1
- package/dist/commands/words.js +2 -0
- package/dist/commands/words.js.map +1 -1
- package/dist/mail/imap/connection.d.ts.map +1 -1
- package/dist/mail/imap/connection.js +10 -2
- package/dist/mail/imap/connection.js.map +1 -1
- package/dist/mail/rules/apply.d.ts +10 -2
- package/dist/mail/rules/apply.d.ts.map +1 -1
- package/dist/mail/rules/apply.js +110 -30
- package/dist/mail/rules/apply.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +1 -0
- package/dist/reasons.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/first-screen-4LG5SJ6D.js +0 -34
- package/dist/bundle/server-43V7HNFY.js +0 -68
- package/dist/bundle/store-maintenance-command-AKQMKUYO.js +0 -58
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
typedPhone,
|
|
59
59
|
validCounter,
|
|
60
60
|
wildcardPattern
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-WZNQ2P7H.js";
|
|
62
62
|
import {
|
|
63
63
|
ACCOUNT_GROUPS,
|
|
64
64
|
CATEGORIES,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
runEvent,
|
|
97
97
|
severity,
|
|
98
98
|
sourceOf3 as sourceOf
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-BDWOTD7E.js";
|
|
100
100
|
import {
|
|
101
101
|
ADDED_ACCOUNT,
|
|
102
102
|
ADDED_PROVIDER,
|
|
@@ -240,10 +240,10 @@ import {
|
|
|
240
240
|
walkQuery,
|
|
241
241
|
walletLine,
|
|
242
242
|
zonedMoment
|
|
243
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-3RBUACSJ.js";
|
|
244
244
|
import {
|
|
245
245
|
sqliteCode
|
|
246
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-NUHUTJTM.js";
|
|
247
247
|
import {
|
|
248
248
|
DEFAULT_STEMMERS,
|
|
249
249
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -253,32 +253,32 @@ import {
|
|
|
253
253
|
analyzerIdentity,
|
|
254
254
|
createStemmer,
|
|
255
255
|
parseStemmers
|
|
256
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-IKTBM64M.js";
|
|
257
257
|
import {
|
|
258
258
|
NORMALIZER_VERSION,
|
|
259
259
|
fold,
|
|
260
260
|
normalize
|
|
261
|
-
} from "./chunk-
|
|
261
|
+
} from "./chunk-D4QALV67.js";
|
|
262
262
|
import {
|
|
263
263
|
DEFAULT_TASK_CATEGORIES,
|
|
264
264
|
sharedConfigPath,
|
|
265
265
|
storedTaskCategories,
|
|
266
266
|
taskCategoriesReader
|
|
267
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-Z5D6CRY6.js";
|
|
268
268
|
import {
|
|
269
269
|
refuseOwnerStoreInTests,
|
|
270
270
|
storePath
|
|
271
|
-
} from "./chunk-
|
|
271
|
+
} from "./chunk-TXDA437R.js";
|
|
272
272
|
import {
|
|
273
273
|
quietSqliteWarning,
|
|
274
274
|
storeCapable
|
|
275
|
-
} from "./chunk-
|
|
275
|
+
} from "./chunk-6B2BBL35.js";
|
|
276
276
|
import {
|
|
277
277
|
PRAGMAS,
|
|
278
278
|
TIME_LIMIT_FUNCTION,
|
|
279
279
|
TimeLimitReached,
|
|
280
280
|
isQueryOnly
|
|
281
|
-
} from "./chunk-
|
|
281
|
+
} from "./chunk-OLTJB5PW.js";
|
|
282
282
|
import {
|
|
283
283
|
array,
|
|
284
284
|
boolean,
|
|
@@ -329,7 +329,7 @@ import {
|
|
|
329
329
|
sql,
|
|
330
330
|
sqliteTable,
|
|
331
331
|
text
|
|
332
|
-
} from "./chunk-
|
|
332
|
+
} from "./chunk-DMW6J2P3.js";
|
|
333
333
|
import {
|
|
334
334
|
__commonJS,
|
|
335
335
|
__name,
|
|
@@ -10073,7 +10073,7 @@ var require_cjs = __commonJS({
|
|
|
10073
10073
|
}
|
|
10074
10074
|
});
|
|
10075
10075
|
|
|
10076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
10077
10077
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
10078
10078
|
const methods = whole;
|
|
10079
10079
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10201,7 +10201,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10201
10201
|
};
|
|
10202
10202
|
}, "bindAccount");
|
|
10203
10203
|
|
|
10204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10205
10205
|
var IndexBuilderOn = class {
|
|
10206
10206
|
static {
|
|
10207
10207
|
__name(this, "IndexBuilderOn");
|
|
@@ -10396,7 +10396,7 @@ function alias(table, alias2) {
|
|
|
10396
10396
|
}
|
|
10397
10397
|
__name(alias, "alias");
|
|
10398
10398
|
|
|
10399
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10399
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10400
10400
|
var ENTITY_TABLES = {
|
|
10401
10401
|
...RECORD_TABLES,
|
|
10402
10402
|
account: "accounts",
|
|
@@ -10435,7 +10435,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10435
10435
|
return { table, pointer, type, count: count2, known: known2 };
|
|
10436
10436
|
}).filter(({ count: count2 }) => count2 > 0)), "orphanPointers");
|
|
10437
10437
|
|
|
10438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10438
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
10439
10439
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
10440
10440
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
10441
10441
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -10492,7 +10492,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
10492
10492
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
10493
10493
|
}, "proposedBySql");
|
|
10494
10494
|
|
|
10495
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10495
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
|
|
10496
10496
|
var TABLES = { memory: "memories", fact: "facts" };
|
|
10497
10497
|
var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
|
|
10498
10498
|
var KEPT = 20;
|
|
@@ -10587,7 +10587,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
|
|
|
10587
10587
|
return scrubbed;
|
|
10588
10588
|
}, "scrubSourceReviews");
|
|
10589
10589
|
|
|
10590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
10591
10591
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
10592
10592
|
var REFERABLE = {
|
|
10593
10593
|
...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
|
|
@@ -10747,7 +10747,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
10747
10747
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
10748
10748
|
}, "taskIdOf");
|
|
10749
10749
|
|
|
10750
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
|
|
10751
10751
|
var QUOTE_LIMIT = 500;
|
|
10752
10752
|
var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
|
|
10753
10753
|
var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
|
|
@@ -11026,11 +11026,11 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at2) => {
|
|
|
11026
11026
|
database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
|
|
11027
11027
|
}, "deleteDocumentRow");
|
|
11028
11028
|
|
|
11029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/identity-links.js
|
|
11030
11030
|
var IDENTITY_LINK_KIND = "identity_link";
|
|
11031
11031
|
var IDENTITY_LINK_SIGNALS = ["agent", "phone", "email", "guest-email", "name", "account"];
|
|
11032
11032
|
|
|
11033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11033
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/merged-persons.js
|
|
11034
11034
|
var SEPARATIONS = ["unlink", "split", "undo-merge"];
|
|
11035
11035
|
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");
|
|
11036
11036
|
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");
|
|
@@ -11062,7 +11062,7 @@ var samePersons = /* @__PURE__ */ __name((database, pk) => {
|
|
|
11062
11062
|
}, "samePersons");
|
|
11063
11063
|
var idsOf = /* @__PURE__ */ __name((database, type, id2) => JSON.stringify(type === "person" ? samePersons(database, id2) : [id2]), "idsOf");
|
|
11064
11064
|
|
|
11065
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-link-rows.js
|
|
11066
11066
|
var pairOf = /* @__PURE__ */ __name((a, b) => [Number(a), Number(b)].sort((x, y) => x - y).join("-"), "pairOf");
|
|
11067
11067
|
var pkOf = /* @__PURE__ */ __name((database, ref3) => {
|
|
11068
11068
|
const at2 = ref3.indexOf(":");
|
|
@@ -11169,13 +11169,13 @@ var forgetErasedLinks = /* @__PURE__ */ __name((database) => {
|
|
|
11169
11169
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
11170
11170
|
}, "forgetErasedLinks");
|
|
11171
11171
|
|
|
11172
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/identity-splits.js
|
|
11173
11173
|
var IDENTITY_SPLIT_KIND = "identity_split";
|
|
11174
11174
|
|
|
11175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
11176
11176
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
11177
11177
|
|
|
11178
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11178
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
11179
11179
|
var TASK_CLOSE_KIND = "task_close";
|
|
11180
11180
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
11181
11181
|
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");
|
|
@@ -11223,7 +11223,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
11223
11223
|
}, "assertMayDecide");
|
|
11224
11224
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
11225
11225
|
|
|
11226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
11227
11227
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
11228
11228
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
11229
11229
|
var WEIGHTS = {
|
|
@@ -11357,7 +11357,7 @@ var scoreGroup = /* @__PURE__ */ __name((items, context) => {
|
|
|
11357
11357
|
return { score: kept.reduce((sum, signal) => sum + WEIGHTS[signal], 0), signals: kept };
|
|
11358
11358
|
}, "scoreGroup");
|
|
11359
11359
|
|
|
11360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/address-organization.js
|
|
11361
11361
|
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 ";
|
|
11362
11362
|
var idsOf2 = /* @__PURE__ */ __name((rows) => rows.map((row2) => Number(row2.id)), "idsOf");
|
|
11363
11363
|
var holdAddress = /* @__PURE__ */ __name(({ database, now: now2 }, organization2, email, { method, author }) => {
|
|
@@ -11382,10 +11382,10 @@ var organizationOfAddress = /* @__PURE__ */ __name((context, { name, email, meth
|
|
|
11382
11382
|
return id2;
|
|
11383
11383
|
}, "organizationOfAddress");
|
|
11384
11384
|
|
|
11385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
11386
11386
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
11387
11387
|
|
|
11388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/journal.js
|
|
11389
11389
|
import { existsSync, statSync } from "node:fs";
|
|
11390
11390
|
var watched = /* @__PURE__ */ new WeakMap();
|
|
11391
11391
|
var walInode = /* @__PURE__ */ __name((store) => statSync(`${store}-wal`, { throwIfNoEntry: false })?.ino, "walInode");
|
|
@@ -11411,7 +11411,7 @@ var checkJournal = /* @__PURE__ */ __name((database) => {
|
|
|
11411
11411
|
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" });
|
|
11412
11412
|
}, "checkJournal");
|
|
11413
11413
|
|
|
11414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/write-events.js
|
|
11415
11415
|
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;
|
|
11416
11416
|
var writeTarget = /* @__PURE__ */ __name((sql2) => {
|
|
11417
11417
|
const match = WRITE.exec(sql2);
|
|
@@ -11491,7 +11491,7 @@ var committedWrites = /* @__PURE__ */ __name((database) => {
|
|
|
11491
11491
|
}, "committedWrites");
|
|
11492
11492
|
var droppedWrites = /* @__PURE__ */ __name((database) => tallies.get(database)?.pending.clear(), "droppedWrites");
|
|
11493
11493
|
|
|
11494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11494
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
11495
11495
|
var ARMS = [
|
|
11496
11496
|
[
|
|
11497
11497
|
"message",
|
|
@@ -11619,7 +11619,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
11619
11619
|
return recomputed;
|
|
11620
11620
|
}, "drainInvolvementQueue");
|
|
11621
11621
|
|
|
11622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
11623
11623
|
import { domainToUnicode } from "node:url";
|
|
11624
11624
|
|
|
11625
11625
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -21641,7 +21641,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
21641
21641
|
}, "oa");
|
|
21642
21642
|
var na = { parse: O, get: aa, isValid: oa };
|
|
21643
21643
|
|
|
21644
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21644
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
21645
21645
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
21646
21646
|
var ID = /^[\w-]{10,}$/;
|
|
21647
21647
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -21683,7 +21683,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text7) => [...text7.matchAll(L
|
|
|
21683
21683
|
return { url, documentId: googleDocumentId(url) };
|
|
21684
21684
|
}), "googleDocumentLinks");
|
|
21685
21685
|
|
|
21686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
21687
21687
|
var BEFORE = [
|
|
21688
21688
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
21689
21689
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -21943,7 +21943,7 @@ var findPlaces = /* @__PURE__ */ __name((text7) => {
|
|
|
21943
21943
|
return found2.sort((a, b) => a.start - b.start);
|
|
21944
21944
|
}, "findPlaces");
|
|
21945
21945
|
|
|
21946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
21947
21947
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
21948
21948
|
var MENTION_VERSIONS = {
|
|
21949
21949
|
phone: 1,
|
|
@@ -22119,7 +22119,7 @@ var exactlyOne = /* @__PURE__ */ __name((text7, options) => {
|
|
|
22119
22119
|
return one2 && one2.start === 0 && one2.end === text7.length ? one2.value : void 0;
|
|
22120
22120
|
}, "exactlyOne");
|
|
22121
22121
|
|
|
22122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
22123
22123
|
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";
|
|
22124
22124
|
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";
|
|
22125
22125
|
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";
|
|
@@ -22127,7 +22127,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
22127
22127
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
22128
22128
|
var NAME_WORDS = WORDS.split(" ");
|
|
22129
22129
|
|
|
22130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22130
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
22131
22131
|
var LATIN_TO_CYRILLIC = {
|
|
22132
22132
|
shch: "\u0449",
|
|
22133
22133
|
sch: "\u0449",
|
|
@@ -22335,7 +22335,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text7, stem, taken) => {
|
|
|
22335
22335
|
return found2;
|
|
22336
22336
|
}, "findUnknownNames");
|
|
22337
22337
|
|
|
22338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
22339
22339
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
22340
22340
|
"webpage",
|
|
22341
22341
|
"share",
|
|
@@ -22376,7 +22376,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
|
|
|
22376
22376
|
});
|
|
22377
22377
|
}, "matchDownloads");
|
|
22378
22378
|
|
|
22379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
22380
22380
|
var PRESET_VERSION = 1;
|
|
22381
22381
|
var PRESETS = {
|
|
22382
22382
|
password: {
|
|
@@ -22430,7 +22430,7 @@ var PRESETS = {
|
|
|
22430
22430
|
}
|
|
22431
22431
|
};
|
|
22432
22432
|
|
|
22433
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
22434
22434
|
var FIELD_VERSION = 2;
|
|
22435
22435
|
var UNITS = {
|
|
22436
22436
|
"": 1,
|
|
@@ -22959,12 +22959,12 @@ var validateAst = /* @__PURE__ */ __name((input, options = {}) => {
|
|
|
22959
22959
|
return validateFields(parsed4.output, options);
|
|
22960
22960
|
}, "validateAst");
|
|
22961
22961
|
|
|
22962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22962
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
22963
22963
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
22964
22964
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
22965
22965
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
22966
22966
|
|
|
22967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22967
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
22968
22968
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
22969
22969
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
22970
22970
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -22988,7 +22988,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
22988
22988
|
};
|
|
22989
22989
|
}, "linkMatch");
|
|
22990
22990
|
|
|
22991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22991
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
22992
22992
|
var SETTING = "phoneCountries";
|
|
22993
22993
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
22994
22994
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -23019,7 +23019,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
23019
23019
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
23020
23020
|
}, "valueMatch");
|
|
23021
23021
|
|
|
23022
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23022
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
23023
23023
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
23024
23024
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
23025
23025
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -23047,7 +23047,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
23047
23047
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
23048
23048
|
}, "vocabularySimilarity");
|
|
23049
23049
|
|
|
23050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23050
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
23051
23051
|
import { createHash } from "node:crypto";
|
|
23052
23052
|
var folded3 = /* @__PURE__ */ __name((name) => {
|
|
23053
23053
|
try {
|
|
@@ -23113,7 +23113,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
23113
23113
|
});
|
|
23114
23114
|
}, "guardTagCreation");
|
|
23115
23115
|
|
|
23116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23116
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
23117
23117
|
var invalid = /* @__PURE__ */ __name((message3) => {
|
|
23118
23118
|
throw new CliError("validation_error", message3);
|
|
23119
23119
|
}, "invalid");
|
|
@@ -23190,7 +23190,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
23190
23190
|
};
|
|
23191
23191
|
}, "createTagRedirectIndex");
|
|
23192
23192
|
|
|
23193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
23194
23194
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
23195
23195
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
23196
23196
|
if (!row2)
|
|
@@ -23218,7 +23218,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
23218
23218
|
return snapshot2;
|
|
23219
23219
|
}, "tagRedirectSnapshot");
|
|
23220
23220
|
|
|
23221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
23222
23222
|
import { createHash as createHash2 } from "node:crypto";
|
|
23223
23223
|
var TASK_KEY_PREFIXES = {
|
|
23224
23224
|
question: "Q",
|
|
@@ -23246,7 +23246,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
23246
23246
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
23247
23247
|
}, "taskAccountOf");
|
|
23248
23248
|
|
|
23249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
23250
23250
|
var toMs = /* @__PURE__ */ __name((iso17) => {
|
|
23251
23251
|
if (iso17 === null || iso17 === void 0)
|
|
23252
23252
|
return null;
|
|
@@ -23260,7 +23260,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
23260
23260
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
23261
23261
|
var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
23262
23262
|
|
|
23263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
23264
23264
|
var TAG_KINDS = ["tag", "topic"];
|
|
23265
23265
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
23266
23266
|
var TAG_TYPE = {
|
|
@@ -23463,7 +23463,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
23463
23463
|
return result;
|
|
23464
23464
|
}, "tagsOf");
|
|
23465
23465
|
|
|
23466
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23466
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
23467
23467
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
23468
23468
|
var SPEECH = speech("att");
|
|
23469
23469
|
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");
|
|
@@ -23953,7 +23953,7 @@ var FIELD_COMPILERS = {
|
|
|
23953
23953
|
subject
|
|
23954
23954
|
};
|
|
23955
23955
|
|
|
23956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
23957
23957
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
23958
23958
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
23959
23959
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -23969,7 +23969,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
23969
23969
|
};
|
|
23970
23970
|
}, "placeOf");
|
|
23971
23971
|
|
|
23972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
23973
23973
|
var DRAIN_ON_WRITE = 500;
|
|
23974
23974
|
var METHOD = "rules";
|
|
23975
23975
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -24135,7 +24135,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
24135
24135
|
return queued.length;
|
|
24136
24136
|
}, "drainMentions");
|
|
24137
24137
|
|
|
24138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
24139
24139
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
24140
24140
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
24141
24141
|
if (!exists2)
|
|
@@ -24143,7 +24143,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
24143
24143
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
24144
24144
|
}, "indexRow");
|
|
24145
24145
|
|
|
24146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
24147
24147
|
var INDEX = "message_stems";
|
|
24148
24148
|
var SETTING2 = "searchStemmers";
|
|
24149
24149
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -24265,7 +24265,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
24265
24265
|
};
|
|
24266
24266
|
}, "stemmerCache");
|
|
24267
24267
|
|
|
24268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
24269
24269
|
var rehearsal = new AsyncLocalStorage();
|
|
24270
24270
|
var SQLITE_BUSY = 5;
|
|
24271
24271
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
@@ -24408,7 +24408,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
24408
24408
|
}
|
|
24409
24409
|
}, "read");
|
|
24410
24410
|
|
|
24411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
24412
24412
|
var FOLDED = [
|
|
24413
24413
|
{ table: "tasks", column: "title" },
|
|
24414
24414
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -24445,7 +24445,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
24445
24445
|
return filled2;
|
|
24446
24446
|
}, "fillFolded");
|
|
24447
24447
|
|
|
24448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
24449
24449
|
import { createHash as createHash3 } from "node:crypto";
|
|
24450
24450
|
var CHUNK_CHARS = 1200;
|
|
24451
24451
|
var CHUNK_OVERLAP = 150;
|
|
@@ -24550,7 +24550,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
24550
24550
|
return chunks2;
|
|
24551
24551
|
}, "cutChunks");
|
|
24552
24552
|
|
|
24553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24553
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
24554
24554
|
var DAY = 864e5;
|
|
24555
24555
|
var CURRENCY = [
|
|
24556
24556
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -24676,7 +24676,7 @@ var dueDayOf = /* @__PURE__ */ __name((text7, createdMs) => {
|
|
|
24676
24676
|
return best?.day ?? null;
|
|
24677
24677
|
}, "dueDayOf");
|
|
24678
24678
|
|
|
24679
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24679
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
24680
24680
|
var DAY2 = 864e5;
|
|
24681
24681
|
var STOP_WORDS = new Set([
|
|
24682
24682
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -24831,7 +24831,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
24831
24831
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
24832
24832
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
24833
24833
|
|
|
24834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
24835
24835
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
24836
24836
|
coalesce(CASE k.chunkable_type
|
|
24837
24837
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -24973,7 +24973,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
24973
24973
|
}, "dropUnusedVectors");
|
|
24974
24974
|
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");
|
|
24975
24975
|
|
|
24976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
24977
24977
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
24978
24978
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
24979
24979
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -25248,7 +25248,7 @@ var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.ma
|
|
|
25248
25248
|
Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
|
|
25249
25249
|
])), "vectorCounts");
|
|
25250
25250
|
|
|
25251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
25252
25252
|
var DOCUMENT_PICTURE = "document_picture";
|
|
25253
25253
|
var SCAN_PAGE2 = 5e3;
|
|
25254
25254
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -25311,12 +25311,12 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
25311
25311
|
}, "nearestPictures")
|
|
25312
25312
|
}), "documentPicturesOver");
|
|
25313
25313
|
|
|
25314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
|
|
25315
25315
|
var noteIndexText = /* @__PURE__ */ __name((title2, text7) => title2 ? `${title2}
|
|
25316
25316
|
|
|
25317
25317
|
${text7}` : text7, "noteIndexText");
|
|
25318
25318
|
|
|
25319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25319
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
|
|
25320
25320
|
var ENRICHMENT_SUBJECTS = ["document", "note", "email"];
|
|
25321
25321
|
var ENRICHMENT_POSITION = 1e6;
|
|
25322
25322
|
var EMAIL_ENRICHMENT = "email_enrichment";
|
|
@@ -25410,7 +25410,7 @@ var enrichmentsOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
|
25410
25410
|
}), "clear")
|
|
25411
25411
|
}), "enrichmentsOver");
|
|
25412
25412
|
|
|
25413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
25414
25414
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
25415
25415
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
25416
25416
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -25486,7 +25486,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
25486
25486
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
25487
25487
|
var bound2 = /* @__PURE__ */ __name(({ sql: text7, params }) => sql.join(text7.split("?").map((part2, at2) => at2 < params.length ? sql`${sql.raw(part2)}${params[at2]}` : sql.raw(part2)), sql``), "bound");
|
|
25488
25488
|
|
|
25489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
25490
25490
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
25491
25491
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
25492
25492
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -25576,7 +25576,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
25576
25576
|
});
|
|
25577
25577
|
}, "linkMeeting");
|
|
25578
25578
|
|
|
25579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-titles.js
|
|
25580
25580
|
var MAX_TITLE = 120;
|
|
25581
25581
|
var placeholderTitleOf = /* @__PURE__ */ __name((row2) => `${String(row2.type)} \u2014 ${String(row2.source_locator ?? "")}`, "placeholderTitleOf");
|
|
25582
25582
|
var PLACEHOLDER_TITLE_SQL = "title = type || ' \u2014 ' || coalesce(source_locator, '')";
|
|
@@ -25638,7 +25638,7 @@ var fillFoundTaskTitles = /* @__PURE__ */ __name((database, warn, { batch = 500
|
|
|
25638
25638
|
}
|
|
25639
25639
|
}, "fillFoundTaskTitles");
|
|
25640
25640
|
|
|
25641
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25641
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
25642
25642
|
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), ''))";
|
|
25643
25643
|
var UNSEARCHED_EVENT_TYPES = [
|
|
25644
25644
|
"working-location",
|
|
@@ -25885,7 +25885,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
25885
25885
|
return true;
|
|
25886
25886
|
}, "resetNoteIndex");
|
|
25887
25887
|
|
|
25888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
25889
25889
|
var keyOf2 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
25890
25890
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names2) => {
|
|
25891
25891
|
for (const key2 of new Set(names2.filter((name) => !!name?.trim()).map(keyOf2))) {
|
|
@@ -25904,7 +25904,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names2) => {
|
|
|
25904
25904
|
}
|
|
25905
25905
|
}, "resolvePersonLinks");
|
|
25906
25906
|
|
|
25907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
25908
25908
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
25909
25909
|
id: integer("id").primaryKey(),
|
|
25910
25910
|
name: text("name").notNull().unique(),
|
|
@@ -25913,7 +25913,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
25913
25913
|
updatedAt: integer("updated_at").notNull()
|
|
25914
25914
|
});
|
|
25915
25915
|
|
|
25916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
|
|
25917
25917
|
var linkRevisions = sqliteTable("link_revisions", {
|
|
25918
25918
|
id: integer("id").primaryKey(),
|
|
25919
25919
|
linkId: integer("link_id").notNull(),
|
|
@@ -25925,7 +25925,7 @@ var linkRevisions = sqliteTable("link_revisions", {
|
|
|
25925
25925
|
createdAt: integer("created_at").notNull()
|
|
25926
25926
|
}, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
|
|
25927
25927
|
|
|
25928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
25929
25929
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
25930
25930
|
sourceKey: text("source_key").notNull(),
|
|
25931
25931
|
collection: text("collection").notNull(),
|
|
@@ -25935,13 +25935,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
25935
25935
|
createdAt: integer("created_at").notNull()
|
|
25936
25936
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
25937
25937
|
|
|
25938
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
25939
25939
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
25940
25940
|
id: integer("id").notNull(),
|
|
25941
25941
|
indexableType: text("indexable_type").notNull()
|
|
25942
25942
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
25943
25943
|
|
|
25944
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
25945
25945
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
25946
25946
|
id: integer("id").primaryKey(),
|
|
25947
25947
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -25961,7 +25961,7 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
25961
25961
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
25962
25962
|
]);
|
|
25963
25963
|
|
|
25964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
|
|
25965
25965
|
var enrichments = sqliteTable("enrichments", {
|
|
25966
25966
|
subjectType: text("subject_type").notNull(),
|
|
25967
25967
|
subjectId: integer("subject_id").notNull(),
|
|
@@ -25973,7 +25973,7 @@ var enrichments = sqliteTable("enrichments", {
|
|
|
25973
25973
|
createdAt: integer("created_at").notNull()
|
|
25974
25974
|
}, (table) => [primaryKey({ columns: [table.subjectType, table.subjectId] })]);
|
|
25975
25975
|
|
|
25976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/templates.js
|
|
25977
25977
|
var templates = sqliteTable("templates", {
|
|
25978
25978
|
key: text("key").notNull(),
|
|
25979
25979
|
channel: text("channel").notNull(),
|
|
@@ -25995,7 +25995,7 @@ var templatesHistory = sqliteTable("templates_history", {
|
|
|
25995
25995
|
index("templates_history_by_key_channel_language_id").on(table.key, table.channel, table.language, table.id)
|
|
25996
25996
|
]);
|
|
25997
25997
|
|
|
25998
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
|
|
25999
25999
|
var links = sqliteTable("links", {
|
|
26000
26000
|
id: integer("id").primaryKey(),
|
|
26001
26001
|
fromType: text("from_type").notNull(),
|
|
@@ -26026,7 +26026,7 @@ var links = sqliteTable("links", {
|
|
|
26026
26026
|
index("links_by_to_type_to_id").on(table.toType, table.toId)
|
|
26027
26027
|
]);
|
|
26028
26028
|
|
|
26029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
26030
26030
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
26031
26031
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
26032
26032
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -26052,7 +26052,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
26052
26052
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
26053
26053
|
]);
|
|
26054
26054
|
|
|
26055
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26055
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
26056
26056
|
var accounts = sqliteTable("accounts", {
|
|
26057
26057
|
id: integer("id").primaryKey(),
|
|
26058
26058
|
provider: text("provider").notNull(),
|
|
@@ -28062,7 +28062,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
28062
28062
|
at: integer("at").notNull()
|
|
28063
28063
|
});
|
|
28064
28064
|
|
|
28065
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
28066
28066
|
var contactsOf = /* @__PURE__ */ __name(({ phones: phones2, emails: emails3 }) => {
|
|
28067
28067
|
if (phones2 === void 0 && emails3 === void 0)
|
|
28068
28068
|
return void 0;
|
|
@@ -28308,7 +28308,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
28308
28308
|
}, "meetingIdentityPk");
|
|
28309
28309
|
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");
|
|
28310
28310
|
|
|
28311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
28312
28312
|
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");
|
|
28313
28313
|
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
28314
28314
|
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
@@ -28323,7 +28323,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
|
28323
28323
|
var separated = /* @__PURE__ */ __name((context, one2, other) => one2 !== other && apart(context, { identities: identitiesOf(context, one2), person: one2 }, { identities: identitiesOf(context, other), person: other }), "separated");
|
|
28324
28324
|
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
28325
28325
|
|
|
28326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
28327
28327
|
var MESSAGE_FIELDS = {
|
|
28328
28328
|
pk: messages.id,
|
|
28329
28329
|
nativeId: messages.externalId,
|
|
@@ -28503,7 +28503,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
28503
28503
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
28504
28504
|
}), "chatActivity");
|
|
28505
28505
|
|
|
28506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
28507
28507
|
var HIT_FIELDS = {
|
|
28508
28508
|
...MESSAGE_FIELDS,
|
|
28509
28509
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -28602,7 +28602,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
28602
28602
|
};
|
|
28603
28603
|
}, "directReplies");
|
|
28604
28604
|
|
|
28605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28605
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
28606
28606
|
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");
|
|
28607
28607
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
28608
28608
|
const found2 = identityRow(context, ref3);
|
|
@@ -28815,11 +28815,11 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
28815
28815
|
}, "mentioning");
|
|
28816
28816
|
var escaped = /* @__PURE__ */ __name((text7) => text7.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
28817
28817
|
|
|
28818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
28819
28819
|
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");
|
|
28820
28820
|
var oneLine = /* @__PURE__ */ __name((text7) => singleLine(text7.replace(/\s+/g, " ").trim()), "oneLine");
|
|
28821
28821
|
|
|
28822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-accounts.js
|
|
28823
28823
|
var accountKeys = /* @__PURE__ */ __name((database, ids2) => {
|
|
28824
28824
|
const unique2 = [...new Set(ids2)];
|
|
28825
28825
|
if (unique2.length === 0)
|
|
@@ -28908,7 +28908,7 @@ var refEndsOf = /* @__PURE__ */ __name((database, text7) => {
|
|
|
28908
28908
|
}, "refEndsOf");
|
|
28909
28909
|
var refAccountsOf = /* @__PURE__ */ __name((database, text7) => refEndsOf(database, text7)?.flat(), "refAccountsOf");
|
|
28910
28910
|
|
|
28911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
28912
28912
|
var EXCERPT_CHARS = 280;
|
|
28913
28913
|
var TITLE_CHARS = 120;
|
|
28914
28914
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -29332,7 +29332,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
29332
29332
|
ends: /* @__PURE__ */ __name(async (text7) => refEndsOf(context.database, text7), "ends")
|
|
29333
29333
|
}), "refsStoreOver");
|
|
29334
29334
|
|
|
29335
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
29336
29336
|
var sourceOf3 = /* @__PURE__ */ __name((read3, ref3) => ({
|
|
29337
29337
|
ref: ref3,
|
|
29338
29338
|
kind: read3.kind,
|
|
@@ -29370,7 +29370,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
29370
29370
|
});
|
|
29371
29371
|
}, "evidenceSourcesOf");
|
|
29372
29372
|
|
|
29373
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
29374
29374
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
29375
29375
|
var MAX_TEXT_CHARS = 2e6;
|
|
29376
29376
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -29396,7 +29396,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
29396
29396
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
29397
29397
|
}, "pdfPreviewLimits");
|
|
29398
29398
|
|
|
29399
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29399
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
29400
29400
|
import { randomBytes } from "node:crypto";
|
|
29401
29401
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
29402
29402
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -29409,7 +29409,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
29409
29409
|
return time3 + random;
|
|
29410
29410
|
}, "ulid");
|
|
29411
29411
|
|
|
29412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
29413
29413
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
29414
29414
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
29415
29415
|
if (!meta && !sections?.length)
|
|
@@ -29430,7 +29430,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
29430
29430
|
return typeof language === "string" && language !== "" ? language : null;
|
|
29431
29431
|
}, "languageOf");
|
|
29432
29432
|
|
|
29433
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
29434
29434
|
var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
29435
29435
|
var objectOf = /* @__PURE__ */ __name((value) => {
|
|
29436
29436
|
if (isObject2(value))
|
|
@@ -29673,7 +29673,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
29673
29673
|
};
|
|
29674
29674
|
}, "filesStoreOver");
|
|
29675
29675
|
|
|
29676
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29676
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
29677
29677
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
29678
29678
|
entity: "document",
|
|
29679
29679
|
backend: "sql",
|
|
@@ -29719,7 +29719,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
29719
29719
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
29720
29720
|
}, "importedDocumentWhere");
|
|
29721
29721
|
|
|
29722
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29722
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
29723
29723
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
29724
29724
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
29725
29725
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -29727,7 +29727,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
29727
29727
|
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);
|
|
29728
29728
|
}, "reviewLink");
|
|
29729
29729
|
|
|
29730
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/link-row.js
|
|
29731
29731
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
29732
29732
|
var thingRef = /* @__PURE__ */ __name((database, type, id2) => type == null || id2 == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? null, "thingRef");
|
|
29733
29733
|
var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
@@ -29760,7 +29760,7 @@ var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
|
29760
29760
|
};
|
|
29761
29761
|
}, "linkOf");
|
|
29762
29762
|
|
|
29763
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29763
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
29764
29764
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
29765
29765
|
const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
|
|
29766
29766
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -29781,7 +29781,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
29781
29781
|
return changed;
|
|
29782
29782
|
}, "dateFileNotes");
|
|
29783
29783
|
|
|
29784
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
29785
29785
|
var textOf2 = /* @__PURE__ */ __name((text7, what, max = 1e5, allowEmpty = false) => {
|
|
29786
29786
|
const value = text7.trim();
|
|
29787
29787
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -29794,7 +29794,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
29794
29794
|
return value;
|
|
29795
29795
|
}, "oneOf");
|
|
29796
29796
|
|
|
29797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29797
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
29798
29798
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
29799
29799
|
var RELATIONSHIPS = RELATION_KINDS.map(linkKind).join(", ");
|
|
29800
29800
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
@@ -30309,10 +30309,10 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30309
30309
|
};
|
|
30310
30310
|
}, "notesStoreOver");
|
|
30311
30311
|
|
|
30312
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/rows-page.js
|
|
30313
30313
|
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");
|
|
30314
30314
|
|
|
30315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
30316
30316
|
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";
|
|
30317
30317
|
var iso5 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
30318
30318
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -30577,7 +30577,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30577
30577
|
};
|
|
30578
30578
|
}, "memoriesStoreOver");
|
|
30579
30579
|
|
|
30580
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30580
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
30581
30581
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
30582
30582
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
30583
30583
|
throw new CliError(code, message3, { reason });
|
|
@@ -30725,7 +30725,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
30725
30725
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly: ownerOnly2, linkedId, ...decisionsOver(context) };
|
|
30726
30726
|
}, "reviewedRowsOver");
|
|
30727
30727
|
|
|
30728
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
30729
30729
|
var MAX_LINES = 500;
|
|
30730
30730
|
var PARENTS = {
|
|
30731
30731
|
invoice: {
|
|
@@ -30825,7 +30825,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
30825
30825
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
30826
30826
|
}, "moneyLinesOver");
|
|
30827
30827
|
|
|
30828
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
30829
30829
|
var COUNTED = {
|
|
30830
30830
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
30831
30831
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -30900,7 +30900,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
30900
30900
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
30901
30901
|
}, "refundRulesOver");
|
|
30902
30902
|
|
|
30903
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
30904
30904
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
30905
30905
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
30906
30906
|
var PAID = netPaidSql("i.id");
|
|
@@ -31304,7 +31304,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31304
31304
|
};
|
|
31305
31305
|
}, "financeStoreOver");
|
|
31306
31306
|
|
|
31307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
31308
31308
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
31309
31309
|
throw new CliError("validation_error", message3, { reason });
|
|
31310
31310
|
}, "refuse");
|
|
@@ -31382,7 +31382,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
31382
31382
|
};
|
|
31383
31383
|
}, "paymentEntriesOver");
|
|
31384
31384
|
|
|
31385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
31386
31386
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
31387
31387
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
31388
31388
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -31409,7 +31409,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
31409
31409
|
return valid;
|
|
31410
31410
|
}, "validateEvidenceFindings");
|
|
31411
31411
|
|
|
31412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
31413
31413
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
31414
31414
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
31415
31415
|
var iso7 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31603,7 +31603,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31603
31603
|
};
|
|
31604
31604
|
}, "proposedActionsStoreOver");
|
|
31605
31605
|
|
|
31606
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31606
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-proposals.js
|
|
31607
31607
|
var CONFIRMED = "proposal";
|
|
31608
31608
|
var refOf = /* @__PURE__ */ __name(({ database }, pk) => {
|
|
31609
31609
|
const row2 = database.prepare("SELECT provider, external_id FROM identities WHERE id = ?").get(pk);
|
|
@@ -31953,7 +31953,7 @@ var identityLinkRows = /* @__PURE__ */ __name((context, { person: person2, statu
|
|
|
31953
31953
|
return { items, hasMore: rows.length > limit };
|
|
31954
31954
|
}, "identityLinkRows");
|
|
31955
31955
|
|
|
31956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-merges.js
|
|
31957
31957
|
var mergeId = /* @__PURE__ */ __name((to, from2) => `merge:${to}-${from2}`, "mergeId");
|
|
31958
31958
|
var parseMergeId = /* @__PURE__ */ __name((id2) => {
|
|
31959
31959
|
const found2 = /^merge:([1-9]\d*)-([1-9]\d*)$/.exec(id2.trim());
|
|
@@ -32056,7 +32056,7 @@ var split = /* @__PURE__ */ __name((context, uid, refs, by) => {
|
|
|
32056
32056
|
return recordOf(context, alone);
|
|
32057
32057
|
}, "split");
|
|
32058
32058
|
|
|
32059
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-split-proposals.js
|
|
32060
32060
|
var refOf2 = /* @__PURE__ */ __name(({ provider, id: id2 }) => `${provider}:${id2}`, "refOf");
|
|
32061
32061
|
var keyOf3 = /* @__PURE__ */ __name((split2, person2, identities2) => `${split2} ${person2} ${[...identities2].sort().join(" ")}`, "keyOf");
|
|
32062
32062
|
var planOf = /* @__PURE__ */ __name((context, input) => {
|
|
@@ -32233,7 +32233,7 @@ var forgetErasedSplits = /* @__PURE__ */ __name((database) => {
|
|
|
32233
32233
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
32234
32234
|
}, "forgetErasedSplits");
|
|
32235
32235
|
|
|
32236
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/test-data.js
|
|
32237
32237
|
var SEED_PEOPLE = [
|
|
32238
32238
|
{ name: "Owner", username: "owner" },
|
|
32239
32239
|
{ name: "Ann Lee", username: "ann" },
|
|
@@ -32250,7 +32250,7 @@ var RESERVED_ADDRESS_GLOBS = [
|
|
|
32250
32250
|
];
|
|
32251
32251
|
var SEED_ID_GLOBS = ["person-[0-9]*"];
|
|
32252
32252
|
|
|
32253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/test-people.js
|
|
32254
32254
|
var TEST_DATA_KIND = "test_data";
|
|
32255
32255
|
var globs = /* @__PURE__ */ __name((column2, patterns) => patterns.map((pattern) => `${column2} GLOB '${pattern}'`).join(" OR "), "globs");
|
|
32256
32256
|
var SURE = `(${globs("i.external_id", SEED_ID_GLOBS)} OR ${globs("lower(i.email)", RESERVED_ADDRESS_GLOBS)})`;
|
|
@@ -32319,7 +32319,7 @@ var forgetErasedTestData = /* @__PURE__ */ __name((database) => {
|
|
|
32319
32319
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
32320
32320
|
}, "forgetErasedTestData");
|
|
32321
32321
|
|
|
32322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
32323
32323
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null, startScope) => Number(orm.insert(accounts).values({
|
|
32324
32324
|
provider,
|
|
32325
32325
|
externalId: account,
|
|
@@ -32520,7 +32520,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
32520
32520
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
32521
32521
|
}, "dropOrphanPeople");
|
|
32522
32522
|
|
|
32523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
32524
32524
|
var HISTORY_KEY = "$history";
|
|
32525
32525
|
var objectOf2 = /* @__PURE__ */ __name((text7) => {
|
|
32526
32526
|
if (typeof text7 !== "string")
|
|
@@ -32596,7 +32596,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
32596
32596
|
return rest;
|
|
32597
32597
|
}, "withoutHistory");
|
|
32598
32598
|
|
|
32599
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32599
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
32600
32600
|
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");
|
|
32601
32601
|
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");
|
|
32602
32602
|
var setChatScope = /* @__PURE__ */ __name((context, accountKey, chatId, scope3) => {
|
|
@@ -32894,7 +32894,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
32894
32894
|
}
|
|
32895
32895
|
}, "replaceAutoTags");
|
|
32896
32896
|
|
|
32897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32897
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-tokens.js
|
|
32898
32898
|
var BOT_TOKEN = /(?<!\d)(\d{6,12}):[A-Za-z0-9_-]{30,40}(?![A-Za-z0-9_-])/g;
|
|
32899
32899
|
var MAY_HOLD = "*[0-9][0-9][0-9][0-9][0-9][0-9]:*";
|
|
32900
32900
|
var MASKED_THROUGH = "bot_tokens_masked_through";
|
|
@@ -32934,7 +32934,7 @@ var maskStoredBotTokens = /* @__PURE__ */ __name((context) => {
|
|
|
32934
32934
|
}, "maskStoredBotTokens");
|
|
32935
32935
|
var masks = /* @__PURE__ */ __name((value) => value != null && withoutBotTokens(String(value)) !== value, "masks");
|
|
32936
32936
|
|
|
32937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32937
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
32938
32938
|
import { createHash as createHash4 } from "node:crypto";
|
|
32939
32939
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
32940
32940
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -33032,7 +33032,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
33032
33032
|
return { source: source2, query, chat: chat2, senders, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
33033
33033
|
}, "contextEvidenceRequest");
|
|
33034
33034
|
|
|
33035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
33036
33036
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
33037
33037
|
var ACTIVITY = `
|
|
33038
33038
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -33162,7 +33162,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
33162
33162
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
33163
33163
|
}), "mailActivity");
|
|
33164
33164
|
|
|
33165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
33166
33166
|
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");
|
|
33167
33167
|
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;
|
|
33168
33168
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -33303,7 +33303,7 @@ var mailOwnText = /* @__PURE__ */ __name((body2) => {
|
|
|
33303
33303
|
return text7 || body2.trim();
|
|
33304
33304
|
}, "mailOwnText");
|
|
33305
33305
|
|
|
33306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
33307
33307
|
var titleOf2 = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
33308
33308
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
33309
33309
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
@@ -33416,7 +33416,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
33416
33416
|
return emails3 + threads;
|
|
33417
33417
|
}, "drainEmailIndex");
|
|
33418
33418
|
|
|
33419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
33420
33420
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
33421
33421
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
33422
33422
|
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,
|
|
@@ -33514,7 +33514,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
33514
33514
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
33515
33515
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
33516
33516
|
|
|
33517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
33518
33518
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
33519
33519
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
33520
33520
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -33564,7 +33564,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
33564
33564
|
return threads.length;
|
|
33565
33565
|
}, "markEmailsRestored");
|
|
33566
33566
|
|
|
33567
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
33568
33568
|
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
|
|
33569
33569
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
33570
33570
|
WHERE p.account_id = ?
|
|
@@ -33624,7 +33624,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
33624
33624
|
}, "indexedMailPieces");
|
|
33625
33625
|
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");
|
|
33626
33626
|
|
|
33627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
33628
33628
|
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");
|
|
33629
33629
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
33630
33630
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -33691,7 +33691,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
33691
33691
|
}
|
|
33692
33692
|
}), "mailRulesOver");
|
|
33693
33693
|
|
|
33694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
33695
33695
|
function checkMeetingCancelled(signal) {
|
|
33696
33696
|
if (!signal?.aborted)
|
|
33697
33697
|
return;
|
|
@@ -33702,7 +33702,7 @@ function checkMeetingCancelled(signal) {
|
|
|
33702
33702
|
}
|
|
33703
33703
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
33704
33704
|
|
|
33705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
33706
33706
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
33707
33707
|
id: Number(row2.id),
|
|
33708
33708
|
accountId: Number(row2.account_id),
|
|
@@ -33752,7 +33752,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
33752
33752
|
createdAt: Number(row2.created_at)
|
|
33753
33753
|
}), "transcriptRowOf");
|
|
33754
33754
|
|
|
33755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
33756
33756
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
33757
33757
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
33758
33758
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -33919,7 +33919,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33919
33919
|
}
|
|
33920
33920
|
}), "meetingReadsOver");
|
|
33921
33921
|
|
|
33922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33922
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
33923
33923
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
33924
33924
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
33925
33925
|
const params = [input.accountId];
|
|
@@ -33962,7 +33962,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
33962
33962
|
return { clauses, params };
|
|
33963
33963
|
}, "meetingSelectionSql");
|
|
33964
33964
|
|
|
33965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33965
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
33966
33966
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
33967
33967
|
async meetingChatLines(input) {
|
|
33968
33968
|
checkMeetingCancelled(input.signal);
|
|
@@ -33990,7 +33990,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33990
33990
|
}
|
|
33991
33991
|
}), "meetingChatLinesOver");
|
|
33992
33992
|
|
|
33993
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
33994
33994
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
33995
33995
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
33996
33996
|
}, "missing");
|
|
@@ -34113,7 +34113,7 @@ function meetingContextLinksOver(context) {
|
|
|
34113
34113
|
}
|
|
34114
34114
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
34115
34115
|
|
|
34116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34116
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-documents.js
|
|
34117
34117
|
var TRANSCRIPT_ROLE = "transcript";
|
|
34118
34118
|
var roleOf3 = /* @__PURE__ */ __name((value) => MEETING_DOCUMENT_ROLES.find((role) => role === value), "roleOf");
|
|
34119
34119
|
var attach = /* @__PURE__ */ __name((database, meetingId, fileId, role, metadata3, listed, now2) => {
|
|
@@ -34187,7 +34187,7 @@ var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
34187
34187
|
};
|
|
34188
34188
|
}, "meetingTranscriptDocumentsOver");
|
|
34189
34189
|
|
|
34190
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34190
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
34191
34191
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
34192
34192
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
34193
34193
|
var summaryOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -34216,7 +34216,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
34216
34216
|
return row2 ? summaryText(summaryOf2(row2)) : null;
|
|
34217
34217
|
}, "indexedText");
|
|
34218
34218
|
|
|
34219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34219
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
34220
34220
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
34221
34221
|
var meetingCurrentIndexRows = `
|
|
34222
34222
|
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
|
|
@@ -34247,7 +34247,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
34247
34247
|
}, "invalidateMeetingStems");
|
|
34248
34248
|
var meetingStemmableText = /* @__PURE__ */ __name((text7) => text7.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
34249
34249
|
|
|
34250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
34251
34251
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
34252
34252
|
return {
|
|
34253
34253
|
async indexSearch(original) {
|
|
@@ -34315,10 +34315,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
34315
34315
|
}
|
|
34316
34316
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
34317
34317
|
|
|
34318
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34318
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
34319
34319
|
import { createHash as createHash5 } from "node:crypto";
|
|
34320
34320
|
|
|
34321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34321
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/lucene/plain.js
|
|
34322
34322
|
var REPAIRED = /* @__PURE__ */ new Set([
|
|
34323
34323
|
"query.invalid-syntax",
|
|
34324
34324
|
"query.unclosed-literal",
|
|
@@ -34461,7 +34461,7 @@ var plainQuery = /* @__PURE__ */ __name((text7, fields4 = SEARCH_FIELDS) => {
|
|
|
34461
34461
|
return text7;
|
|
34462
34462
|
}, "plainQuery");
|
|
34463
34463
|
|
|
34464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
34465
34465
|
var SHORTEST_CORRECTION = 3;
|
|
34466
34466
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
34467
34467
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -34508,7 +34508,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words4) => {
|
|
|
34508
34508
|
return corrections;
|
|
34509
34509
|
}, "correctWords");
|
|
34510
34510
|
|
|
34511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
34512
34512
|
var SHORTEST_GARBLED = 4;
|
|
34513
34513
|
var MOST_WIDENED = 64;
|
|
34514
34514
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -34600,7 +34600,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
34600
34600
|
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));
|
|
34601
34601
|
}, "widenWords");
|
|
34602
34602
|
|
|
34603
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
34604
34604
|
import { readFileSync } from "node:fs";
|
|
34605
34605
|
var loaded;
|
|
34606
34606
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -34659,7 +34659,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
34659
34659
|
return false;
|
|
34660
34660
|
}, "knownRussianWord");
|
|
34661
34661
|
|
|
34662
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34662
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
34663
34663
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
34664
34664
|
var MOST_WORDS = 128;
|
|
34665
34665
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -34915,7 +34915,7 @@ var matchedMeetingWords = /* @__PURE__ */ __name((tree, text7, stemmer2) => {
|
|
|
34915
34915
|
return [...found2];
|
|
34916
34916
|
}, "matchedMeetingWords");
|
|
34917
34917
|
|
|
34918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
34919
34919
|
var fail = /* @__PURE__ */ __name((message3) => {
|
|
34920
34920
|
throw new CliError("validation_error", message3);
|
|
34921
34921
|
}, "fail");
|
|
@@ -35099,7 +35099,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
35099
35099
|
}
|
|
35100
35100
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
35101
35101
|
|
|
35102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
35103
35103
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35104
35104
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
35105
35105
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -35131,7 +35131,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35131
35131
|
}
|
|
35132
35132
|
}), "meetingLanguagesOver");
|
|
35133
35133
|
|
|
35134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
35135
35135
|
import { createHash as createHash6 } from "node:crypto";
|
|
35136
35136
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
35137
35137
|
if (value === void 0)
|
|
@@ -35224,7 +35224,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
35224
35224
|
}
|
|
35225
35225
|
}), "meetingParticipantSearchOver");
|
|
35226
35226
|
|
|
35227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
35228
35228
|
var preparationQueries = {
|
|
35229
35229
|
participants: {
|
|
35230
35230
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -35274,7 +35274,7 @@ var preparationQueries = {
|
|
|
35274
35274
|
}
|
|
35275
35275
|
};
|
|
35276
35276
|
|
|
35277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35277
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
35278
35278
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35279
35279
|
async preparationContext(original) {
|
|
35280
35280
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -35315,7 +35315,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35315
35315
|
}
|
|
35316
35316
|
}), "meetingPreparationContextOver");
|
|
35317
35317
|
|
|
35318
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35318
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
35319
35319
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
35320
35320
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
35321
35321
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -35329,7 +35329,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
35329
35329
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
35330
35330
|
)`, "preparationSubjects");
|
|
35331
35331
|
|
|
35332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
35333
35333
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35334
35334
|
async preparationKnowledge(original) {
|
|
35335
35335
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -35374,7 +35374,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
35374
35374
|
}
|
|
35375
35375
|
}), "meetingPreparationKnowledgeOver");
|
|
35376
35376
|
|
|
35377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
35378
35378
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35379
35379
|
async preparationNotes(original) {
|
|
35380
35380
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -35427,7 +35427,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35427
35427
|
}
|
|
35428
35428
|
}), "meetingPreparationNotesOver");
|
|
35429
35429
|
|
|
35430
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
35431
35431
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35432
35432
|
async relatedHistory(original) {
|
|
35433
35433
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -35498,7 +35498,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35498
35498
|
}
|
|
35499
35499
|
}), "meetingRelatedHistoryOver");
|
|
35500
35500
|
|
|
35501
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
35502
35502
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
35503
35503
|
var text3 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
35504
35504
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -35579,7 +35579,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35579
35579
|
}
|
|
35580
35580
|
}), "meetingReviewOver");
|
|
35581
35581
|
|
|
35582
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
35583
35583
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
35584
35584
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
35585
35585
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -35633,7 +35633,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35633
35633
|
}
|
|
35634
35634
|
}), "meetingSeriesHistoryOver");
|
|
35635
35635
|
|
|
35636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
35637
35637
|
var MOST_ROWS = 5e5;
|
|
35638
35638
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
35639
35639
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -35702,7 +35702,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35702
35702
|
}
|
|
35703
35703
|
}), "meetingStatsOver");
|
|
35704
35704
|
|
|
35705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
|
|
35706
35706
|
var CYRILLIC_TO_LATIN = {
|
|
35707
35707
|
\u0430: "a",
|
|
35708
35708
|
\u0431: "b",
|
|
@@ -35924,7 +35924,7 @@ for (const [full, short] of Object.entries(SHORT_FORMS))
|
|
|
35924
35924
|
}
|
|
35925
35925
|
var fullNames = /* @__PURE__ */ __name((skeleton) => [skeleton, ...FULL_NAMES.get(skeleton) ?? []], "fullNames");
|
|
35926
35926
|
|
|
35927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35927
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/name-traces.js
|
|
35928
35928
|
var peopleByNameKey = /* @__PURE__ */ __name((database) => {
|
|
35929
35929
|
const found2 = /* @__PURE__ */ new Map();
|
|
35930
35930
|
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()) {
|
|
@@ -36040,7 +36040,7 @@ function* sharedTraces(database, a, b, name, except) {
|
|
|
36040
36040
|
}
|
|
36041
36041
|
__name(sharedTraces, "sharedTraces");
|
|
36042
36042
|
|
|
36043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-matcher.js
|
|
36044
36044
|
var spellingsOf = /* @__PURE__ */ __name((value) => [value, value.slice(1)], "spellingsOf");
|
|
36045
36045
|
var PERSON_BY = {
|
|
36046
36046
|
// UNION, not OR: each branch reads its own index.
|
|
@@ -36063,7 +36063,7 @@ var personsByIdentifiers = /* @__PURE__ */ __name((database, ids2) => {
|
|
|
36063
36063
|
return [...found2].sort((a, b) => a - b);
|
|
36064
36064
|
}, "personsByIdentifiers");
|
|
36065
36065
|
|
|
36066
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36066
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-match-scan.js
|
|
36067
36067
|
var BY = "rule";
|
|
36068
36068
|
var RULE2 = { bot: "rule", kind: "rule" };
|
|
36069
36069
|
var MOST_SHARING = 6;
|
|
@@ -36510,7 +36510,7 @@ var linkPhones = /* @__PURE__ */ __name((context, identities2) => {
|
|
|
36510
36510
|
return pass.result;
|
|
36511
36511
|
}, "linkPhones");
|
|
36512
36512
|
|
|
36513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
36514
36514
|
var CURSOR_KEY = "meetings";
|
|
36515
36515
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
36516
36516
|
id: Number(row2.id),
|
|
@@ -37098,7 +37098,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37098
37098
|
};
|
|
37099
37099
|
}, "meetingStoreOver");
|
|
37100
37100
|
|
|
37101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37101
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
37102
37102
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
37103
37103
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
37104
37104
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -37124,7 +37124,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder2) => {
|
|
|
37124
37124
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder2))).run();
|
|
37125
37125
|
}, "release");
|
|
37126
37126
|
|
|
37127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
37128
37128
|
var THREAD_COLUMNS = {
|
|
37129
37129
|
subject: {
|
|
37130
37130
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -37141,7 +37141,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
37141
37141
|
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);
|
|
37142
37142
|
}, "threadRows");
|
|
37143
37143
|
|
|
37144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37144
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
37145
37145
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
37146
37146
|
id: `email:${place.emailId}`,
|
|
37147
37147
|
chatId: place.threadExternalId,
|
|
@@ -37683,7 +37683,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
37683
37683
|
}
|
|
37684
37684
|
}), "mailStoreOver");
|
|
37685
37685
|
|
|
37686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
37687
37687
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
37688
37688
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
37689
37689
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -37773,7 +37773,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
37773
37773
|
}, "knownWord");
|
|
37774
37774
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
37775
37775
|
|
|
37776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
37777
37777
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
37778
37778
|
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");
|
|
37779
37779
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -37859,7 +37859,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
37859
37859
|
return found2;
|
|
37860
37860
|
}, "spokenTranscripts");
|
|
37861
37861
|
|
|
37862
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
37863
37863
|
var startOf = /* @__PURE__ */ __name((node) => node.operator === "wildcard" && node.implicit ? /^([\p{L}\p{N}]+)\*$/u.exec(normalize(node.value))?.[1] : void 0, "startOf");
|
|
37864
37864
|
var matchOf = /* @__PURE__ */ __name((node) => {
|
|
37865
37865
|
const start = startOf(node);
|
|
@@ -37917,7 +37917,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
37917
37917
|
});
|
|
37918
37918
|
}, "placeHits");
|
|
37919
37919
|
|
|
37920
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37920
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
37921
37921
|
var GROUPS = {
|
|
37922
37922
|
chat: {
|
|
37923
37923
|
key: "m.chat_id",
|
|
@@ -37939,7 +37939,7 @@ var GROUPS = {
|
|
|
37939
37939
|
}
|
|
37940
37940
|
};
|
|
37941
37941
|
|
|
37942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
37943
37943
|
var MESSAGES2 = {
|
|
37944
37944
|
rows: "messages",
|
|
37945
37945
|
threads: "chats",
|
|
@@ -38432,7 +38432,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
38432
38432
|
};
|
|
38433
38433
|
}, "runCompiled");
|
|
38434
38434
|
|
|
38435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
38436
38436
|
function invalidMetadata() {
|
|
38437
38437
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
38438
38438
|
}
|
|
@@ -38534,7 +38534,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
38534
38534
|
};
|
|
38535
38535
|
}), "counterTargets");
|
|
38536
38536
|
|
|
38537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
38538
38538
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
38539
38539
|
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,
|
|
38540
38540
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -38653,7 +38653,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
38653
38653
|
}));
|
|
38654
38654
|
}, "attachmentViews");
|
|
38655
38655
|
|
|
38656
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
38657
38657
|
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");
|
|
38658
38658
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text7, source2) => {
|
|
38659
38659
|
const { orm, database, now: now2 } = context;
|
|
@@ -38691,7 +38691,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
38691
38691
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
38692
38692
|
}, "intoVoiceAttachment");
|
|
38693
38693
|
|
|
38694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
38695
38695
|
var FIELDS = [
|
|
38696
38696
|
"threadExternalId",
|
|
38697
38697
|
"senderIdentityId",
|
|
@@ -39010,7 +39010,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
39010
39010
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
39011
39011
|
}, "writeDerivedReactions");
|
|
39012
39012
|
|
|
39013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39013
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
39014
39014
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
39015
39015
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
39016
39016
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -39031,7 +39031,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
39031
39031
|
};
|
|
39032
39032
|
}, "keysOver");
|
|
39033
39033
|
|
|
39034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
39035
39035
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
39036
39036
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
39037
39037
|
if (!row2)
|
|
@@ -39078,7 +39078,7 @@ var forgetProfile = /* @__PURE__ */ __name((database, app, profile, now2) => {
|
|
|
39078
39078
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
39079
39079
|
}, "forgetProfile");
|
|
39080
39080
|
|
|
39081
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39081
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
39082
39082
|
var ACCOUNT_REASON = "an account you connected, under another name: a mailbox or messenger you read may be someone else's";
|
|
39083
39083
|
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");
|
|
39084
39084
|
var ownersName = /* @__PURE__ */ __name((name, owner, alone) => {
|
|
@@ -39137,7 +39137,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
39137
39137
|
return personOf2(context, ref3);
|
|
39138
39138
|
}, "linkToOwner");
|
|
39139
39139
|
|
|
39140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
39141
39141
|
var PROVIDERS_SETTING = "providers";
|
|
39142
39142
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
39143
39143
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -39185,7 +39185,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
39185
39185
|
});
|
|
39186
39186
|
}, "registerProvider");
|
|
39187
39187
|
|
|
39188
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
39189
39189
|
var DAY3 = 864e5;
|
|
39190
39190
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
39191
39191
|
var TEXT_LIMIT = 20;
|
|
@@ -39383,7 +39383,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
39383
39383
|
};
|
|
39384
39384
|
}, "taskSimilarityOver");
|
|
39385
39385
|
|
|
39386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
39387
39387
|
var SETTING3 = "taskCategories";
|
|
39388
39388
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
39389
39389
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -39402,7 +39402,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
39402
39402
|
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);
|
|
39403
39403
|
}, "saveTaskCategories");
|
|
39404
39404
|
|
|
39405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39405
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
39406
39406
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
39407
39407
|
var ALLOWED = "taskAgentClose";
|
|
39408
39408
|
var MIN = "taskAgentCloseMin";
|
|
@@ -39458,7 +39458,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
39458
39458
|
];
|
|
39459
39459
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
39460
39460
|
|
|
39461
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
39462
39462
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
39463
39463
|
var KEY = "taskFirstPassPerChat";
|
|
39464
39464
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -39478,7 +39478,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
39478
39478
|
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);
|
|
39479
39479
|
}, "saveFirstPassPerChat");
|
|
39480
39480
|
|
|
39481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39481
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
39482
39482
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
39483
39483
|
var EXTERNAL_ID_CHARS = 200;
|
|
39484
39484
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -39505,7 +39505,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
39505
39505
|
return text7;
|
|
39506
39506
|
}, "sourceUrlOf");
|
|
39507
39507
|
|
|
39508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
39509
39509
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
39510
39510
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
39511
39511
|
name,
|
|
@@ -39757,7 +39757,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
39757
39757
|
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 ?`;
|
|
39758
39758
|
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");
|
|
39759
39759
|
|
|
39760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
39761
39761
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
39762
39762
|
if (row2.author_type == null)
|
|
39763
39763
|
return null;
|
|
@@ -39785,7 +39785,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
39785
39785
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
39786
39786
|
}, "addComment");
|
|
39787
39787
|
|
|
39788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
39789
39789
|
var TASK_RELATION_KINDS = [
|
|
39790
39790
|
"blocked-by",
|
|
39791
39791
|
"follow-up-of",
|
|
@@ -39915,7 +39915,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
39915
39915
|
};
|
|
39916
39916
|
}, "taskRelationsStoreOver");
|
|
39917
39917
|
|
|
39918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
39919
39919
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
39920
39920
|
var TASK_EVENT_KINDS = [
|
|
39921
39921
|
"created",
|
|
@@ -40474,7 +40474,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
40474
40474
|
};
|
|
40475
40475
|
}, "workTasksOver");
|
|
40476
40476
|
|
|
40477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40477
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
40478
40478
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
40479
40479
|
const { database, now: now2 } = context;
|
|
40480
40480
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -40523,7 +40523,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
40523
40523
|
};
|
|
40524
40524
|
}, "taskCloseOver");
|
|
40525
40525
|
|
|
40526
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
40527
40527
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
40528
40528
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
40529
40529
|
const { database, now: now2 } = context;
|
|
@@ -40742,7 +40742,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
40742
40742
|
};
|
|
40743
40743
|
}, "taskPairsOver");
|
|
40744
40744
|
|
|
40745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40745
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
40746
40746
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
40747
40747
|
var TASK_STATS_SQL = {
|
|
40748
40748
|
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"),
|
|
@@ -40781,7 +40781,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
40781
40781
|
}, "statNames")
|
|
40782
40782
|
}), "taskStatsOver");
|
|
40783
40783
|
|
|
40784
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
40785
40785
|
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";
|
|
40786
40786
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
40787
40787
|
const key2 = inboxKey(account);
|
|
@@ -40997,7 +40997,7 @@ var oneOf4 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
40997
40997
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
40998
40998
|
}, "oneOf");
|
|
40999
40999
|
|
|
41000
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
41001
41001
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
41002
41002
|
const { database } = context;
|
|
41003
41003
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -41067,7 +41067,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
41067
41067
|
};
|
|
41068
41068
|
}, "accountsStoreOver");
|
|
41069
41069
|
|
|
41070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
41071
41071
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
41072
41072
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
41073
41073
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -41091,7 +41091,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
41091
41091
|
})), "keepDownloads");
|
|
41092
41092
|
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");
|
|
41093
41093
|
|
|
41094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
41095
41095
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
41096
41096
|
const { database } = context;
|
|
41097
41097
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -41148,7 +41148,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
41148
41148
|
}, "keepAttachmentText")
|
|
41149
41149
|
}), "attachmentsStoreOver");
|
|
41150
41150
|
|
|
41151
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
41152
41152
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
41153
41153
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
41154
41154
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -41333,7 +41333,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
41333
41333
|
return done;
|
|
41334
41334
|
}, "rekeyChats");
|
|
41335
41335
|
|
|
41336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41336
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
41337
41337
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
41338
41338
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
41339
41339
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -41391,7 +41391,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
41391
41391
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
41392
41392
|
}, "chatCoverage");
|
|
41393
41393
|
|
|
41394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41394
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
41395
41395
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
41396
41396
|
const { database } = context;
|
|
41397
41397
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -41540,7 +41540,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
41540
41540
|
};
|
|
41541
41541
|
}, "chatsStoreOver");
|
|
41542
41542
|
|
|
41543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41543
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
41544
41544
|
import { createHash as createHash7 } from "node:crypto";
|
|
41545
41545
|
var BATCH_CONTEXT = 50;
|
|
41546
41546
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -41678,7 +41678,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
41678
41678
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
41679
41679
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
41680
41680
|
|
|
41681
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41681
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
41682
41682
|
import { setTimeout } from "node:timers/promises";
|
|
41683
41683
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
41684
41684
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -41990,7 +41990,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
41990
41990
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
41991
41991
|
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");
|
|
41992
41992
|
|
|
41993
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
41994
41994
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
41995
41995
|
const { database } = context;
|
|
41996
41996
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -42097,7 +42097,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42097
42097
|
};
|
|
42098
42098
|
}, "conversationsStoreOver");
|
|
42099
42099
|
|
|
42100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42100
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
42101
42101
|
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";
|
|
42102
42102
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
42103
42103
|
const { database } = context;
|
|
@@ -42122,7 +42122,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42122
42122
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
42123
42123
|
}), "countersStoreOver");
|
|
42124
42124
|
|
|
42125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42125
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
42126
42126
|
var MENTION_STATUSES = ["found", "linked", "proposed", "dismissed"];
|
|
42127
42127
|
var MENTION_QUERY = defineQuery({
|
|
42128
42128
|
entity: "mention",
|
|
@@ -42341,7 +42341,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
42341
42341
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
42342
42342
|
}, "listPlaces");
|
|
42343
42343
|
|
|
42344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
42345
42345
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
42346
42346
|
const { database } = context;
|
|
42347
42347
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -42376,7 +42376,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42376
42376
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
42377
42377
|
}), "mentionsStoreOver");
|
|
42378
42378
|
|
|
42379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
42380
42380
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
42381
42381
|
var MUTED_NOW = "(coalesce(c.muted,0)=1 AND (c.muted_until IS NULL OR c.muted_until>?))";
|
|
42382
42382
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2, now2) => {
|
|
@@ -42475,7 +42475,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
42475
42475
|
});
|
|
42476
42476
|
}, "waitingChats");
|
|
42477
42477
|
|
|
42478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-activity-counts.js
|
|
42479
42479
|
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 = ?`;
|
|
42480
42480
|
var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since, until, now: now2 }) => {
|
|
42481
42481
|
const statement = database.prepare(SQL);
|
|
@@ -42495,7 +42495,7 @@ var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since
|
|
|
42495
42495
|
return found2;
|
|
42496
42496
|
}, "chatActivityCounts");
|
|
42497
42497
|
|
|
42498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
42499
42499
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
42500
42500
|
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");
|
|
42501
42501
|
const rows = messageId === void 0 ? read3.all(chatKey) : read3.all(chatKey, messageId);
|
|
@@ -42510,7 +42510,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
42510
42510
|
}));
|
|
42511
42511
|
}, "documentLinkMessages");
|
|
42512
42512
|
|
|
42513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
42514
42514
|
var stemmerFor = stemmerCache();
|
|
42515
42515
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
42516
42516
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -42554,7 +42554,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
42554
42554
|
});
|
|
42555
42555
|
}, "laterSharingRare");
|
|
42556
42556
|
|
|
42557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
42558
42558
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
42559
42559
|
const { database } = context;
|
|
42560
42560
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -42695,7 +42695,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42695
42695
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
42696
42696
|
}), "messagesStoreOver");
|
|
42697
42697
|
|
|
42698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/person-kinds.js
|
|
42699
42699
|
var PERSON_KINDS = ["person", "organization", "automated", "stranger", "unsorted", "test"];
|
|
42700
42700
|
var AUTOMATED_WORDS = /* @__PURE__ */ new Set([
|
|
42701
42701
|
"noreply",
|
|
@@ -42758,7 +42758,7 @@ var isCompanyName = /* @__PURE__ */ __name((name) => {
|
|
|
42758
42758
|
return wordsOf3(name.replaceAll(".", "")).some((word2) => LEGAL_FORMS.has(word2) || COMPANY_WORDS.has(word2));
|
|
42759
42759
|
}, "isCompanyName");
|
|
42760
42760
|
|
|
42761
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-ties.js
|
|
42762
42762
|
var SMALL_GROUP_MEMBERS = 10;
|
|
42763
42763
|
var PERSON_TIES = ["chat", "small-group", "mail", "meeting", "crm", "phone-book"];
|
|
42764
42764
|
var ALWAYS_SHOWN = ["owner", "added", "task"];
|
|
@@ -42813,7 +42813,7 @@ var shownReasons = /* @__PURE__ */ __name((database, people2) => {
|
|
|
42813
42813
|
return new Map([...found2].map(([person2, reasons]) => [person2, ORDER.filter((one2) => reasons.has(one2))]));
|
|
42814
42814
|
}, "shownReasons");
|
|
42815
42815
|
|
|
42816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/people-list.js
|
|
42817
42817
|
var PEOPLE_SORTS = ["interactions", "recent", "name", "tasks"];
|
|
42818
42818
|
var MIN_QUERY = 3;
|
|
42819
42819
|
var ftsPhrase = /* @__PURE__ */ __name((text7) => `"${text7.replaceAll('"', '""')}"`, "ftsPhrase");
|
|
@@ -43159,7 +43159,7 @@ var similarPeople = /* @__PURE__ */ __name((database, typed, limit) => {
|
|
|
43159
43159
|
return withLastContact(database, rows).map((person2, at2) => ({ ...person2, sameName: same[at2] === true }));
|
|
43160
43160
|
}, "similarPeople");
|
|
43161
43161
|
|
|
43162
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-doubts.js
|
|
43163
43163
|
var DOUBT_REASONS = ["owner-other-name", "test-data", "shared-address", "mixed-names"];
|
|
43164
43164
|
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";
|
|
43165
43165
|
var text4 = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? value : null, "text");
|
|
@@ -43415,7 +43415,7 @@ var markTestData = /* @__PURE__ */ __name((context, uid, by) => {
|
|
|
43415
43415
|
return { person: `person:${person2}`, identities: identities2 };
|
|
43416
43416
|
}, "markTestData");
|
|
43417
43417
|
|
|
43418
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
43419
43419
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
43420
43420
|
var IN_SCOPES = "IN (SELECT value FROM json_each(?))";
|
|
43421
43421
|
var projectScope = /* @__PURE__ */ __name((id2) => `(SELECT p.scope FROM main.projects p WHERE p.id=${id2})`, "projectScope");
|
|
@@ -43484,7 +43484,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
43484
43484
|
});
|
|
43485
43485
|
}, "personPreparation");
|
|
43486
43486
|
|
|
43487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
43488
43488
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
43489
43489
|
const id2 = Number(uid);
|
|
43490
43490
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -43492,7 +43492,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
43492
43492
|
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)));
|
|
43493
43493
|
}, "personSeenInAccounts");
|
|
43494
43494
|
|
|
43495
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43495
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
43496
43496
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
43497
43497
|
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);
|
|
43498
43498
|
if (!row2)
|
|
@@ -43559,7 +43559,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
43559
43559
|
return { id: id2, personId, removed: true };
|
|
43560
43560
|
}, "removeNote");
|
|
43561
43561
|
|
|
43562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
43563
43563
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
43564
43564
|
const { database } = context;
|
|
43565
43565
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -43686,13 +43686,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
43686
43686
|
};
|
|
43687
43687
|
}, "peopleStoreOver");
|
|
43688
43688
|
|
|
43689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
43690
43690
|
import { createHash as createHash9 } from "node:crypto";
|
|
43691
43691
|
|
|
43692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
43693
43693
|
import { createHash as createHash8 } from "node:crypto";
|
|
43694
43694
|
|
|
43695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
43696
43696
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
43697
43697
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
43698
43698
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -43914,7 +43914,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
43914
43914
|
};
|
|
43915
43915
|
}, "rankReplyGraph");
|
|
43916
43916
|
|
|
43917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
43918
43918
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
43919
43919
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
43920
43920
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -44088,7 +44088,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
44088
44088
|
return { items, evidence, summary, graph: graph.quality };
|
|
44089
44089
|
}, "calculateAdminStatistics");
|
|
44090
44090
|
|
|
44091
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44091
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
44092
44092
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
44093
44093
|
const dates = [];
|
|
44094
44094
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -44110,7 +44110,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
44110
44110
|
return dates[0].node.resolution.date;
|
|
44111
44111
|
}, "rankingContextRange");
|
|
44112
44112
|
|
|
44113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
44114
44114
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
44115
44115
|
let counts;
|
|
44116
44116
|
try {
|
|
@@ -44405,7 +44405,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
44405
44405
|
});
|
|
44406
44406
|
}, "rankQuery");
|
|
44407
44407
|
|
|
44408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
44409
44409
|
function fail2(message3, reason = "query.too-large") {
|
|
44410
44410
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
44411
44411
|
}
|
|
@@ -44582,7 +44582,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
44582
44582
|
return result;
|
|
44583
44583
|
}), "adminStatisticsQuery");
|
|
44584
44584
|
|
|
44585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
44586
44586
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
44587
44587
|
if (!execution.accounts.length)
|
|
44588
44588
|
return { conversations: [], chats: [] };
|
|
@@ -44600,7 +44600,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
44600
44600
|
return { conversations: conversations2, chats: chats2 };
|
|
44601
44601
|
}, "conversationEligibility");
|
|
44602
44602
|
|
|
44603
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
44604
44604
|
import { createHash as createHash10 } from "node:crypto";
|
|
44605
44605
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
44606
44606
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -44750,7 +44750,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
44750
44750
|
return result;
|
|
44751
44751
|
}, "rankingEvidence");
|
|
44752
44752
|
|
|
44753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
44754
44754
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
44755
44755
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
44756
44756
|
if (execution.corpus === "mail")
|
|
@@ -44771,7 +44771,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
44771
44771
|
};
|
|
44772
44772
|
}, "queriesStoreOver");
|
|
44773
44773
|
|
|
44774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44774
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
44775
44775
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
44776
44776
|
const { database, now: now2 } = context;
|
|
44777
44777
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -44810,10 +44810,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
44810
44810
|
}));
|
|
44811
44811
|
}, "chatEventsOf");
|
|
44812
44812
|
|
|
44813
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44813
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
44814
44814
|
import { createHash as createHash11 } from "node:crypto";
|
|
44815
44815
|
|
|
44816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
44817
44817
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
44818
44818
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
44819
44819
|
timeZone: zone,
|
|
@@ -44833,7 +44833,7 @@ var weekKey = /* @__PURE__ */ __name((day2) => {
|
|
|
44833
44833
|
return date3.toISOString().slice(0, 10);
|
|
44834
44834
|
}, "weekKey");
|
|
44835
44835
|
|
|
44836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
44837
44837
|
var RETENTION_TOLERANCE = 864e5;
|
|
44838
44838
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
44839
44839
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -44887,7 +44887,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
44887
44887
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
44888
44888
|
}, "retentionCohorts");
|
|
44889
44889
|
|
|
44890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
44891
44891
|
var iso10 = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString(), "iso");
|
|
44892
44892
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
44893
44893
|
validateRetentionOptions(options);
|
|
@@ -45018,7 +45018,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
45018
45018
|
};
|
|
45019
45019
|
}, "retentionQuery");
|
|
45020
45020
|
|
|
45021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
45022
45022
|
var iso11 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
45023
45023
|
var marksOf = /* @__PURE__ */ __name(({ isBot: isBot2, flagged, deleted, hasPhoto }) => ({
|
|
45024
45024
|
...isBot2 === void 0 ? {} : { bot: isBot2 },
|
|
@@ -45147,7 +45147,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
45147
45147
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
45148
45148
|
})), "trackedChats");
|
|
45149
45149
|
|
|
45150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
45151
45151
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45152
45152
|
const { database } = context;
|
|
45153
45153
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -45203,7 +45203,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45203
45203
|
};
|
|
45204
45204
|
}, "rosterStoreOver");
|
|
45205
45205
|
|
|
45206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45206
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
45207
45207
|
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");
|
|
45208
45208
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
45209
45209
|
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 ?`);
|
|
@@ -45227,7 +45227,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
45227
45227
|
}
|
|
45228
45228
|
}, "backfillNormalized");
|
|
45229
45229
|
|
|
45230
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
45231
45231
|
var INDEX2 = "message_words";
|
|
45232
45232
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
45233
45233
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -45354,7 +45354,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
45354
45354
|
});
|
|
45355
45355
|
}, "resetSearchIndex");
|
|
45356
45356
|
|
|
45357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
45358
45358
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
45359
45359
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
45360
45360
|
const before2 = stemsState(database);
|
|
@@ -45449,7 +45449,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
45449
45449
|
return resetStems(database, { now: now2 });
|
|
45450
45450
|
}, "followDefaultStemmers");
|
|
45451
45451
|
|
|
45452
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45452
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
45453
45453
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
45454
45454
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
45455
45455
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -45471,7 +45471,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
45471
45471
|
});
|
|
45472
45472
|
}, "termCandidates");
|
|
45473
45473
|
|
|
45474
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45474
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
45475
45475
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45476
45476
|
const { database } = context;
|
|
45477
45477
|
const stemmerFor2 = stemmerCache();
|
|
@@ -45495,7 +45495,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45495
45495
|
};
|
|
45496
45496
|
}, "searchIndexStoreOver");
|
|
45497
45497
|
|
|
45498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
45499
45499
|
var HISTORY_KEPT = 1e3;
|
|
45500
45500
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
45501
45501
|
var COLUMNS6 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -45565,7 +45565,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
45565
45565
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
45566
45566
|
}, "clearHistory");
|
|
45567
45567
|
|
|
45568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45568
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
45569
45569
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45570
45570
|
const { database } = context;
|
|
45571
45571
|
return {
|
|
@@ -45589,7 +45589,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45589
45589
|
};
|
|
45590
45590
|
}, "searchesStoreOver");
|
|
45591
45591
|
|
|
45592
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45592
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
45593
45593
|
import { createHash as createHash12 } from "node:crypto";
|
|
45594
45594
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
45595
45595
|
var TEXT_COLUMNS = "kind = ?, title = ?, file_name = ?, extension = ?, url = ?, mime = ?, size = ?, content_hash = ?, body = ?, extraction = ?, metadata = ?, language = ?";
|
|
@@ -45831,7 +45831,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
45831
45831
|
};
|
|
45832
45832
|
}, "addedSourcesOver");
|
|
45833
45833
|
|
|
45834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
45835
45835
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
45836
45836
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
45837
45837
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -45879,7 +45879,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
45879
45879
|
};
|
|
45880
45880
|
}, "agentActionsStoreOver");
|
|
45881
45881
|
|
|
45882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/base-suggest.js
|
|
45883
45883
|
var baseSettingKey = /* @__PURE__ */ __name((kind3) => `stages.base.${kind3}`, "baseSettingKey");
|
|
45884
45884
|
var storedPipeline = /* @__PURE__ */ __name((value) => {
|
|
45885
45885
|
if (typeof value !== "string")
|
|
@@ -45925,7 +45925,7 @@ var suggestBaseStages = /* @__PURE__ */ __name((database, kind3, pipelines2, { o
|
|
|
45925
45925
|
}
|
|
45926
45926
|
}, "suggestBaseStages");
|
|
45927
45927
|
|
|
45928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
45929
45929
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
45930
45930
|
var SOURCE = "crm";
|
|
45931
45931
|
var crmIdentityId = /* @__PURE__ */ __name((key2, externalId, type = "contact") => `${idPart(key2.account)}/${type}/${idPart(externalId)}`, "crmIdentityId");
|
|
@@ -46056,7 +46056,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
46056
46056
|
return { savePipeline, saveItemRow };
|
|
46057
46057
|
}, "crmRowsOver");
|
|
46058
46058
|
|
|
46059
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activities.js
|
|
46060
46060
|
var ACTIVITY_RECORD = "crm.activity";
|
|
46061
46061
|
var MOST_BODY = 2e4;
|
|
46062
46062
|
var MOST_SUBJECT = 500;
|
|
@@ -46136,7 +46136,7 @@ var crmActivitiesOver = /* @__PURE__ */ __name((context) => {
|
|
|
46136
46136
|
return { save: save2, of };
|
|
46137
46137
|
}, "crmActivitiesOver");
|
|
46138
46138
|
|
|
46139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
46140
46140
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
46141
46141
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, cutoff) => {
|
|
46142
46142
|
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);
|
|
@@ -46153,7 +46153,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, cuto
|
|
|
46153
46153
|
});
|
|
46154
46154
|
}, "stageAmountsOf");
|
|
46155
46155
|
|
|
46156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
46157
46157
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
46158
46158
|
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");
|
|
46159
46159
|
var MAX_STAGES = 30;
|
|
@@ -46632,7 +46632,7 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46632
46632
|
};
|
|
46633
46633
|
}, "dealsStoreOver");
|
|
46634
46634
|
|
|
46635
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
46636
46636
|
var KEY2 = "ownerLanguages";
|
|
46637
46637
|
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(" "));
|
|
46638
46638
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -46662,7 +46662,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
46662
46662
|
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);
|
|
46663
46663
|
}, "saveOwnerLanguages");
|
|
46664
46664
|
|
|
46665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46665
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/base-stages.js
|
|
46666
46666
|
var OUTCOMES = {
|
|
46667
46667
|
lead: ["open", "open", "open", "won", "lost"],
|
|
46668
46668
|
deal: ["open", "open", "open", "open", "won", "lost"]
|
|
@@ -46995,7 +46995,7 @@ var baseStagesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46995
46995
|
};
|
|
46996
46996
|
}, "baseStagesStoreOver");
|
|
46997
46997
|
|
|
46998
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
46999
46999
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
47000
47000
|
}) => {
|
|
47001
47001
|
const { database, now: now2 } = context;
|
|
@@ -47054,7 +47054,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
47054
47054
|
};
|
|
47055
47055
|
}, "botUpdateStoreOver");
|
|
47056
47056
|
|
|
47057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
47058
47058
|
var IMPORTER = { bot: "import" };
|
|
47059
47059
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
47060
47060
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -47099,7 +47099,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
47099
47099
|
};
|
|
47100
47100
|
}), "moneyLinesOf");
|
|
47101
47101
|
|
|
47102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
47103
47103
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
47104
47104
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
47105
47105
|
var listOf2 = /* @__PURE__ */ __name((list2) => {
|
|
@@ -47183,7 +47183,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
47183
47183
|
};
|
|
47184
47184
|
}, "relationRolesOver");
|
|
47185
47185
|
|
|
47186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
47187
47187
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
47188
47188
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
47189
47189
|
var CRM_SCOPES = ["mine", "all"];
|
|
@@ -47378,7 +47378,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
47378
47378
|
return [{ setting: String(row2.key), value: settingValue(database, parsed4.key, parsed4.name) }];
|
|
47379
47379
|
}), "crmSettingsOf");
|
|
47380
47380
|
|
|
47381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
47382
47382
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
47383
47383
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
47384
47384
|
id: link3.id,
|
|
@@ -47738,7 +47738,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
47738
47738
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
47739
47739
|
}, "decidedOrigin");
|
|
47740
47740
|
|
|
47741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47741
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
47742
47742
|
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");
|
|
47743
47743
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
47744
47744
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" }, onOutcome } = {}) => {
|
|
@@ -47876,7 +47876,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
47876
47876
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
47877
47877
|
}), "relationsStoreOver");
|
|
47878
47878
|
|
|
47879
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relationships.js
|
|
47880
47880
|
var importSource = /* @__PURE__ */ __name((provider) => `import:${provider}`, "importSource");
|
|
47881
47881
|
var noRelationships = /* @__PURE__ */ __name(() => ({
|
|
47882
47882
|
added: 0,
|
|
@@ -48066,7 +48066,7 @@ var recordRelationshipsOver = /* @__PURE__ */ __name((context) => {
|
|
|
48066
48066
|
return { report, placeOf: placeOf2, withdrawFrom };
|
|
48067
48067
|
}, "recordRelationshipsOver");
|
|
48068
48068
|
|
|
48069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
48070
48070
|
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";
|
|
48071
48071
|
var DAY_MS2 = 864e5;
|
|
48072
48072
|
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");
|
|
@@ -48225,7 +48225,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48225
48225
|
};
|
|
48226
48226
|
}, "contractsStoreOver");
|
|
48227
48227
|
|
|
48228
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48228
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
48229
48229
|
var BUSINESS_FIND_MAX = 2001;
|
|
48230
48230
|
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");
|
|
48231
48231
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
@@ -48330,7 +48330,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
48330
48330
|
};
|
|
48331
48331
|
}, "businessSearchOver");
|
|
48332
48332
|
|
|
48333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
48334
48334
|
var DAY4 = 864e5;
|
|
48335
48335
|
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}')`;
|
|
48336
48336
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -48440,7 +48440,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
48440
48440
|
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);
|
|
48441
48441
|
}, "listEvents");
|
|
48442
48442
|
|
|
48443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
48444
48444
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
48445
48445
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
48446
48446
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -48497,7 +48497,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
48497
48497
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
48498
48498
|
}, "forgetCalendarRows");
|
|
48499
48499
|
|
|
48500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
48501
48501
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
48502
48502
|
id: Number(row2.id),
|
|
48503
48503
|
accountId: Number(row2.account_id),
|
|
@@ -49100,7 +49100,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49100
49100
|
};
|
|
49101
49101
|
}, "eventStoreOver");
|
|
49102
49102
|
|
|
49103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
49104
49104
|
var CATALOG_QUERY = defineQuery({
|
|
49105
49105
|
entity: "document",
|
|
49106
49106
|
backend: "sql",
|
|
@@ -49342,7 +49342,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
49342
49342
|
};
|
|
49343
49343
|
}, "catalogStoreOver");
|
|
49344
49344
|
|
|
49345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
49346
49346
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
49347
49347
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
49348
49348
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -49355,7 +49355,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
49355
49355
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
49356
49356
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
49357
49357
|
|
|
49358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
49359
49359
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
49360
49360
|
const { source: source2, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
49361
49361
|
signal?.throwIfAborted();
|
|
@@ -49454,7 +49454,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
49454
49454
|
});
|
|
49455
49455
|
}, "readMeetingContextEvidence");
|
|
49456
49456
|
|
|
49457
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
49458
49458
|
var corpora = {
|
|
49459
49459
|
message: {
|
|
49460
49460
|
table: "messages",
|
|
@@ -49693,7 +49693,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
49693
49693
|
}
|
|
49694
49694
|
}), "contextRecordsOver");
|
|
49695
49695
|
|
|
49696
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49696
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-contacts.js
|
|
49697
49697
|
var PLACEHOLDER = /(?:^|\s)null(?:\s+#\d+)?(?=\s|$)/gi;
|
|
49698
49698
|
var withoutPlaceholder = /* @__PURE__ */ __name((name) => name.replace(PLACEHOLDER, " ").replace(/\s+/g, " ").trim() || null, "withoutPlaceholder");
|
|
49699
49699
|
var DryRun = class extends Error {
|
|
@@ -49770,7 +49770,7 @@ var removeCrmContacts = /* @__PURE__ */ __name((context, key2, { users, before:
|
|
|
49770
49770
|
}
|
|
49771
49771
|
}, "removeCrmContacts");
|
|
49772
49772
|
|
|
49773
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-stage-entries.js
|
|
49774
49774
|
var STAGE_ENTRY_RECORD = "crm.stage-entry";
|
|
49775
49775
|
var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
49776
49776
|
const { database, now: now2 } = context;
|
|
@@ -49817,7 +49817,7 @@ var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
49817
49817
|
return { save: save2, pending, handled };
|
|
49818
49818
|
}, "crmStageEntriesOver");
|
|
49819
49819
|
|
|
49820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
49821
49821
|
var PENDING = "crm:pending-relations";
|
|
49822
49822
|
var PENDING_DAYS = 30;
|
|
49823
49823
|
var PENDING_MOST = 5e3;
|
|
@@ -50326,10 +50326,10 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
50326
50326
|
};
|
|
50327
50327
|
}, "crmCopiesOver");
|
|
50328
50328
|
|
|
50329
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
50330
50330
|
import { createHash as createHash13, randomBytes as randomBytes2 } from "node:crypto";
|
|
50331
50331
|
|
|
50332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
50333
50333
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
50334
50334
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
50335
50335
|
var CALLBACK_PREFIX = "wcr1:";
|
|
@@ -50343,7 +50343,7 @@ var callbackDataOf = /* @__PURE__ */ __name((token) => {
|
|
|
50343
50343
|
}, "callbackDataOf");
|
|
50344
50344
|
var parseCallbackData = /* @__PURE__ */ __name((data) => typeof data === "string" ? CALLBACK.exec(data)?.[1] : void 0, "parseCallbackData");
|
|
50345
50345
|
|
|
50346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
50347
50347
|
var digestOf = /* @__PURE__ */ __name((token) => createHash13("sha256").update(token).digest("hex"), "digestOf");
|
|
50348
50348
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
50349
50349
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -50442,7 +50442,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
50442
50442
|
};
|
|
50443
50443
|
}, "decisionRequestStoreOver");
|
|
50444
50444
|
|
|
50445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50445
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
50446
50446
|
var NOTE_FIELDS = [
|
|
50447
50447
|
"text",
|
|
50448
50448
|
"exact",
|
|
@@ -50883,7 +50883,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
50883
50883
|
};
|
|
50884
50884
|
}, "noteSearchOver");
|
|
50885
50885
|
|
|
50886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
50887
50887
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
50888
50888
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
50889
50889
|
var EVENT_CORPUS = {
|
|
@@ -51015,7 +51015,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
51015
51015
|
};
|
|
51016
51016
|
}, "eventSearchOver");
|
|
51017
51017
|
|
|
51018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
51019
51019
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
51020
51020
|
try {
|
|
51021
51021
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -51027,7 +51027,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
51027
51027
|
}
|
|
51028
51028
|
}, "calendarMoment");
|
|
51029
51029
|
|
|
51030
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51030
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
51031
51031
|
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";
|
|
51032
51032
|
var iso13 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
51033
51033
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -51250,7 +51250,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51250
51250
|
};
|
|
51251
51251
|
}, "factsStoreOver");
|
|
51252
51252
|
|
|
51253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
51254
51254
|
var invalid2 = /* @__PURE__ */ __name((message3) => {
|
|
51255
51255
|
throw new CliError("validation_error", message3);
|
|
51256
51256
|
}, "invalid");
|
|
@@ -51418,7 +51418,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
51418
51418
|
return { snapshot: snapshot2, snapshotParts, previous, settle, keepWaiting, named: named3, sameDecision, create };
|
|
51419
51419
|
}, "findingsCoreOver");
|
|
51420
51420
|
|
|
51421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51421
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
51422
51422
|
var stale = /* @__PURE__ */ __name(() => {
|
|
51423
51423
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
51424
51424
|
reason: "evidence-findings.stale"
|
|
@@ -51682,7 +51682,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51682
51682
|
};
|
|
51683
51683
|
}, "evidenceFindingsStoreOver");
|
|
51684
51684
|
|
|
51685
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51685
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
51686
51686
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
51687
51687
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
51688
51688
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -51736,7 +51736,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
51736
51736
|
}, "forPerson")
|
|
51737
51737
|
}), "involvementStoreOver");
|
|
51738
51738
|
|
|
51739
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51739
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
51740
51740
|
var LABELLED = {
|
|
51741
51741
|
note: "note",
|
|
51742
51742
|
document: "document",
|
|
@@ -51748,7 +51748,7 @@ var LABELLED = {
|
|
|
51748
51748
|
account: "folder"
|
|
51749
51749
|
};
|
|
51750
51750
|
|
|
51751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
51752
51752
|
import { createHash as createHash14 } from "node:crypto";
|
|
51753
51753
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
51754
51754
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -51834,7 +51834,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
51834
51834
|
};
|
|
51835
51835
|
}, "meetingProjectsStoreOver");
|
|
51836
51836
|
|
|
51837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
51838
51838
|
var ORGANIZATIONS_QUERY = {
|
|
51839
51839
|
entity: "organization",
|
|
51840
51840
|
backend: "sql",
|
|
@@ -51875,7 +51875,7 @@ var REMINDERS_QUERY = {
|
|
|
51875
51875
|
})
|
|
51876
51876
|
};
|
|
51877
51877
|
|
|
51878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-categories.js
|
|
51879
51879
|
var OWN2 = "(SELECT id FROM organizations WHERE deleted_at IS NULL AND json_extract(metadata, '$.own') = 1)";
|
|
51880
51880
|
var EMPLOYED = "('employee', 'contractor', 'founder')";
|
|
51881
51881
|
var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now2) => {
|
|
@@ -51896,7 +51896,7 @@ var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now
|
|
|
51896
51896
|
return { sql: `EXISTS (SELECT 1 FROM links l WHERE ${where} AND ${usable})`, params: keys };
|
|
51897
51897
|
}, "categorySql");
|
|
51898
51898
|
|
|
51899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
51900
51900
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
51901
51901
|
id: String(row2.id),
|
|
51902
51902
|
ref: `organization:${row2.id}`,
|
|
@@ -51941,7 +51941,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
51941
51941
|
}), "setOwnOrganization")
|
|
51942
51942
|
}), "organizationsStoreOver");
|
|
51943
51943
|
|
|
51944
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
51945
51945
|
var KINDS = RELATION_KINDS.map(linkKind).join(", ");
|
|
51946
51946
|
var ACCOUNT_ENDS = [
|
|
51947
51947
|
["deal", "deals"],
|
|
@@ -52092,13 +52092,13 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
52092
52092
|
__name(proposalItem, "proposalItem");
|
|
52093
52093
|
}, "relationListOver");
|
|
52094
52094
|
|
|
52095
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
52096
52096
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
52097
52097
|
...relationListOver(context),
|
|
52098
52098
|
...relationRolesOver(context)
|
|
52099
52099
|
}), "relationReadsOver");
|
|
52100
52100
|
|
|
52101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52101
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
52102
52102
|
var TABLES5 = { memory: "memories", fact: "facts" };
|
|
52103
52103
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
52104
52104
|
var DEFAULT_LIMIT = 500;
|
|
@@ -52341,16 +52341,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52341
52341
|
};
|
|
52342
52342
|
}, "sourceReviewStoreOver");
|
|
52343
52343
|
|
|
52344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
52345
52345
|
import { createHash as createHash17 } from "node:crypto";
|
|
52346
52346
|
|
|
52347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
52348
52348
|
import { createHash as createHash16 } from "node:crypto";
|
|
52349
52349
|
|
|
52350
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
52351
52351
|
import { createHash as createHash15 } from "node:crypto";
|
|
52352
52352
|
|
|
52353
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
52354
52354
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
52355
52355
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
52356
52356
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -52401,7 +52401,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
52401
52401
|
return input;
|
|
52402
52402
|
}, "consolidationApplyInput");
|
|
52403
52403
|
|
|
52404
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52404
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
52405
52405
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
52406
52406
|
id: String(row2.id),
|
|
52407
52407
|
sourceId: String(row2.source_id),
|
|
@@ -52476,7 +52476,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
52476
52476
|
}, { beforeCommit: check3 });
|
|
52477
52477
|
}, "applyTagConsolidation");
|
|
52478
52478
|
|
|
52479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
52480
52480
|
var selections = [
|
|
52481
52481
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
52482
52482
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -52620,7 +52620,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
52620
52620
|
};
|
|
52621
52621
|
}, "previewRows");
|
|
52622
52622
|
|
|
52623
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
52624
52624
|
var kinds = ["project", "tag", "topic"];
|
|
52625
52625
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
52626
52626
|
if (signal?.aborted)
|
|
@@ -52884,7 +52884,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52884
52884
|
};
|
|
52885
52885
|
}, "vocabularyStoreOver");
|
|
52886
52886
|
|
|
52887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52887
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
52888
52888
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
52889
52889
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
52890
52890
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -53435,7 +53435,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
53435
53435
|
return key2.padEnd(3, "X");
|
|
53436
53436
|
}, "projectKey");
|
|
53437
53437
|
|
|
53438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53438
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
53439
53439
|
var DAY5 = 864e5;
|
|
53440
53440
|
var SETTING5 = "logs_pruned_at";
|
|
53441
53441
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -53462,7 +53462,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
53462
53462
|
};
|
|
53463
53463
|
}, "logPruner");
|
|
53464
53464
|
|
|
53465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53465
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
53466
53466
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
53467
53467
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
53468
53468
|
var invalid4 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -53821,7 +53821,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
53821
53821
|
}, "checkMailFindings");
|
|
53822
53822
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
53823
53823
|
|
|
53824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
53825
53825
|
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";
|
|
53826
53826
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
53827
53827
|
const { database, now: now2 } = context;
|
|
@@ -54036,7 +54036,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54036
54036
|
};
|
|
54037
54037
|
}, "ordersStoreOver");
|
|
54038
54038
|
|
|
54039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
54040
54040
|
var MAIL_EDITS = {
|
|
54041
54041
|
task: ["title", "type", "reason", "commitment", "project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence"],
|
|
54042
54042
|
fact: ["statement", "type", "reason", "subject", "project"],
|
|
@@ -54525,7 +54525,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
54525
54525
|
};
|
|
54526
54526
|
}, "mailFindingsStoreOver");
|
|
54527
54527
|
|
|
54528
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54528
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
54529
54529
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
54530
54530
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
54531
54531
|
reason: "meeting-findings.stale"
|
|
@@ -54738,7 +54738,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54738
54738
|
};
|
|
54739
54739
|
}, "meetingFindingsStoreOver");
|
|
54740
54740
|
|
|
54741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54741
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
54742
54742
|
var RANK_BATCH = 512;
|
|
54743
54743
|
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";
|
|
54744
54744
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -55009,7 +55009,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
55009
55009
|
}
|
|
55010
55010
|
}), "meetingVectorsOver");
|
|
55011
55011
|
|
|
55012
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55012
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
55013
55013
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
55014
55014
|
var TEXTS = {
|
|
55015
55015
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -55110,7 +55110,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55110
55110
|
};
|
|
55111
55111
|
}, "sourceMentionStoreOver");
|
|
55112
55112
|
|
|
55113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
55114
55114
|
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";
|
|
55115
55115
|
var MAX_SPLITS = 100;
|
|
55116
55116
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -55344,11 +55344,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55344
55344
|
};
|
|
55345
55345
|
}, "transactionsStoreOver");
|
|
55346
55346
|
|
|
55347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
55348
55348
|
import { accessSync, constants, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
55349
55349
|
import { dirname as dirname2 } from "node:path";
|
|
55350
55350
|
|
|
55351
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
55352
55352
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
55353
55353
|
var CLIENTS_SETTING = "clients";
|
|
55354
55354
|
var coreVersion = (() => {
|
|
@@ -55409,7 +55409,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
55409
55409
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
55410
55410
|
}, "refusalAdvice");
|
|
55411
55411
|
|
|
55412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
55413
55413
|
var GENERATED = [
|
|
55414
55414
|
{
|
|
55415
55415
|
"name": "20261010184427_initial",
|
|
@@ -56763,7 +56763,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
56763
56763
|
}
|
|
56764
56764
|
];
|
|
56765
56765
|
|
|
56766
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56766
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
56767
56767
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
56768
56768
|
import { basename, dirname, join as join3, parse } from "node:path";
|
|
56769
56769
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -56996,7 +56996,7 @@ var rollBack2 = /* @__PURE__ */ __name((database, path) => {
|
|
|
56996
56996
|
return { ...result, foreignKeyViolations };
|
|
56997
56997
|
}, "rollBack");
|
|
56998
56998
|
|
|
56999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
57000
57000
|
var V31_TABLES = [
|
|
57001
57001
|
"accounts",
|
|
57002
57002
|
"account_identities",
|
|
@@ -57161,7 +57161,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
57161
57161
|
return migrations;
|
|
57162
57162
|
}, "generatedMigrations");
|
|
57163
57163
|
|
|
57164
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57164
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
57165
57165
|
var MIGRATIONS = generatedMigrations();
|
|
57166
57166
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
57167
57167
|
version INTEGER PRIMARY KEY,
|
|
@@ -57258,7 +57258,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
57258
57258
|
}
|
|
57259
57259
|
}, "migrate");
|
|
57260
57260
|
|
|
57261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
57262
57262
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
57263
57263
|
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 ?");
|
|
57264
57264
|
if (pending.get(0, 1) === void 0)
|
|
@@ -57280,7 +57280,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
57280
57280
|
}
|
|
57281
57281
|
}, "fillJoinKeys");
|
|
57282
57282
|
|
|
57283
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
57284
57284
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
57285
57285
|
refuseOwnerStoreInTests(path);
|
|
57286
57286
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -57294,8 +57294,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
57294
57294
|
}, "openSqlite");
|
|
57295
57295
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
57296
57296
|
quietSqliteWarning();
|
|
57297
|
-
const { drizzle } = await import("./node-
|
|
57298
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
57297
|
+
const { drizzle } = await import("./node-42G4RGMW.js");
|
|
57298
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-KQZM5M3N.js");
|
|
57299
57299
|
const client = await nodeClient(path, { readOnly });
|
|
57300
57300
|
try {
|
|
57301
57301
|
if (!readOnly)
|
|
@@ -57309,8 +57309,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
57309
57309
|
}
|
|
57310
57310
|
}, "openUnderNode");
|
|
57311
57311
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
57312
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
57313
|
-
const { drizzle } = await import("./bun-
|
|
57312
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-FPVHKI24.js");
|
|
57313
|
+
const { drizzle } = await import("./bun-RDYA5FCZ.js");
|
|
57314
57314
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
57315
57315
|
try {
|
|
57316
57316
|
if (!readOnly)
|
|
@@ -57324,7 +57324,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
57324
57324
|
}
|
|
57325
57325
|
}, "openUnderBun");
|
|
57326
57326
|
|
|
57327
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
57328
57328
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
57329
57329
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
57330
57330
|
try {
|
|
@@ -57392,7 +57392,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
57392
57392
|
});
|
|
57393
57393
|
}, "movePaymentFacts");
|
|
57394
57394
|
|
|
57395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
57396
57396
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
57397
57397
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
57398
57398
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -57410,7 +57410,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
57410
57410
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
57411
57411
|
}, "assertReadCompatible");
|
|
57412
57412
|
|
|
57413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
57414
57414
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
57415
57415
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
57416
57416
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -57456,7 +57456,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
57456
57456
|
});
|
|
57457
57457
|
}, "moveSuggestedLinks");
|
|
57458
57458
|
|
|
57459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
57460
57460
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
57461
57461
|
var TEST_PROVIDER = "chat";
|
|
57462
57462
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -57477,7 +57477,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
57477
57477
|
}
|
|
57478
57478
|
}, "purgeTestAccounts");
|
|
57479
57479
|
|
|
57480
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
57481
57481
|
var BACKFILL_ON_OPEN = 5e3;
|
|
57482
57482
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
57483
57483
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -57589,7 +57589,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
57589
57589
|
}
|
|
57590
57590
|
}, "openStoreContext");
|
|
57591
57591
|
|
|
57592
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57592
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
57593
57593
|
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";
|
|
57594
57594
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
57595
57595
|
const { database, now: now2 } = context;
|
|
@@ -57697,13 +57697,13 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57697
57697
|
};
|
|
57698
57698
|
}, "productsStoreOver");
|
|
57699
57699
|
|
|
57700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57700
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
57701
57701
|
import { createHash as createHash19 } from "node:crypto";
|
|
57702
57702
|
|
|
57703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
57704
57704
|
import { createHash as createHash18 } from "node:crypto";
|
|
57705
57705
|
|
|
57706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
57707
57707
|
var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
57708
57708
|
var ref = text5(2048);
|
|
57709
57709
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -57773,7 +57773,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
57773
57773
|
}))
|
|
57774
57774
|
});
|
|
57775
57775
|
|
|
57776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
57777
57777
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
57778
57778
|
var invalid7 = /* @__PURE__ */ __name((field4) => {
|
|
57779
57779
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -57906,7 +57906,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
57906
57906
|
return createHash18("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
57907
57907
|
}, "projectAnnotationsFingerprint");
|
|
57908
57908
|
|
|
57909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57909
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
57910
57910
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
57911
57911
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
57912
57912
|
var targetSchema = strictObject({
|
|
@@ -58013,7 +58013,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
58013
58013
|
}, "planBoundProjectAnnotations");
|
|
58014
58014
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
58015
58015
|
|
|
58016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58016
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
58017
58017
|
import { createHash as createHash20 } from "node:crypto";
|
|
58018
58018
|
var text6 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
58019
58019
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -58107,7 +58107,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
58107
58107
|
})).digest("hex");
|
|
58108
58108
|
}, "projectAnnotationSnapshotFingerprint");
|
|
58109
58109
|
|
|
58110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
58111
58111
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
58112
58112
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
58113
58113
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -58124,7 +58124,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
58124
58124
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
58125
58125
|
}, "projectAnnotationRequest");
|
|
58126
58126
|
|
|
58127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
58128
58128
|
var SnapshotBudget = class {
|
|
58129
58129
|
static {
|
|
58130
58130
|
__name(this, "SnapshotBudget");
|
|
@@ -58150,13 +58150,13 @@ var SnapshotBudget = class {
|
|
|
58150
58150
|
}
|
|
58151
58151
|
};
|
|
58152
58152
|
|
|
58153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
58154
58154
|
import { createHash as createHash22 } from "node:crypto";
|
|
58155
58155
|
|
|
58156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
58157
58157
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
58158
58158
|
|
|
58159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
58160
58160
|
import { createHash as createHash21 } from "node:crypto";
|
|
58161
58161
|
var invalid9 = /* @__PURE__ */ __name(() => {
|
|
58162
58162
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -58299,7 +58299,7 @@ var ProjectSnapshotSources = class {
|
|
|
58299
58299
|
}
|
|
58300
58300
|
};
|
|
58301
58301
|
|
|
58302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58302
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
58303
58303
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
58304
58304
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
58305
58305
|
}, "unsupported");
|
|
@@ -58477,7 +58477,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
58477
58477
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
58478
58478
|
}), "projectAnnotationSnapshot");
|
|
58479
58479
|
|
|
58480
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
58481
58481
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
58482
58482
|
const current2 = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
58483
58483
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -58539,7 +58539,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
58539
58539
|
};
|
|
58540
58540
|
}), "previewAnnotationSnapshot");
|
|
58541
58541
|
|
|
58542
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58542
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
58543
58543
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
58544
58544
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
58545
58545
|
if (link3.kind === "evidence" && to)
|
|
@@ -58606,7 +58606,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
58606
58606
|
return mappings;
|
|
58607
58607
|
}, "restoreAnnotationRecords");
|
|
58608
58608
|
|
|
58609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58609
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
58610
58610
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
58611
58611
|
async preview(request) {
|
|
58612
58612
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -58636,7 +58636,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
58636
58636
|
}
|
|
58637
58637
|
}), "projectAnnotationStoreOver");
|
|
58638
58638
|
|
|
58639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
58640
58640
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
58641
58641
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
58642
58642
|
const sql2 = /* @__PURE__ */ __name((text7) => database.prepare(text7), "sql");
|
|
@@ -58707,7 +58707,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
58707
58707
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
58708
58708
|
}, "recordRelationsOver");
|
|
58709
58709
|
|
|
58710
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58710
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
58711
58711
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
58712
58712
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
58713
58713
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -58761,7 +58761,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
58761
58761
|
return { pointedAt, remap };
|
|
58762
58762
|
}, "recordRemapOver");
|
|
58763
58763
|
|
|
58764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58764
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
58765
58765
|
var runs = 0;
|
|
58766
58766
|
var PAGE = 500;
|
|
58767
58767
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -58974,7 +58974,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
58974
58974
|
return pointerOf("records", index2, "fields", key2);
|
|
58975
58975
|
}, "waitingPointer");
|
|
58976
58976
|
|
|
58977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
58978
58978
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
58979
58979
|
var SCHEME = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
58980
58980
|
var ORG_EMAIL = "org-email";
|
|
@@ -59140,7 +59140,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
59140
59140
|
]);
|
|
59141
59141
|
}, "renameMade");
|
|
59142
59142
|
|
|
59143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59143
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
59144
59144
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
59145
59145
|
name: given(fields4, "name"),
|
|
59146
59146
|
unit: given(fields4, "unit"),
|
|
@@ -59263,7 +59263,7 @@ var DIRECT_PROJECTORS = {
|
|
|
59263
59263
|
lead: dealProjector("lead")
|
|
59264
59264
|
};
|
|
59265
59265
|
|
|
59266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-document.js
|
|
59267
59267
|
var TEXT_ONLY = { storage: "text", localPath: null };
|
|
59268
59268
|
var textOf7 = /* @__PURE__ */ __name(({ fields: fields4, externalId }) => {
|
|
59269
59269
|
const text7 = String(fields4.text ?? "");
|
|
@@ -59332,7 +59332,7 @@ var DOCUMENT_PROJECTORS = {
|
|
|
59332
59332
|
}
|
|
59333
59333
|
};
|
|
59334
59334
|
|
|
59335
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
59336
59336
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
59337
59337
|
const importer = authorActor(context, IMPORTER).actor;
|
|
59338
59338
|
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;
|
|
@@ -59542,7 +59542,7 @@ var MONEY_PROJECTORS = {
|
|
|
59542
59542
|
}
|
|
59543
59543
|
};
|
|
59544
59544
|
|
|
59545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
59546
59546
|
var CALLS_CALENDAR = "calls";
|
|
59547
59547
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
59548
59548
|
if (!isImportedProvider(source2.provider))
|
|
@@ -59717,7 +59717,7 @@ var PHONE_PROJECTORS = {
|
|
|
59717
59717
|
}
|
|
59718
59718
|
};
|
|
59719
59719
|
|
|
59720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
59721
59721
|
var RECORD_PROJECTORS = {
|
|
59722
59722
|
...MONEY_PROJECTORS,
|
|
59723
59723
|
...DIRECT_PROJECTORS,
|
|
@@ -59728,7 +59728,7 @@ var RECORD_PROJECTORS = {
|
|
|
59728
59728
|
project: null
|
|
59729
59729
|
};
|
|
59730
59730
|
|
|
59731
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59731
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
59732
59732
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
59733
59733
|
const sql2 = /* @__PURE__ */ __name((text7) => database.prepare(text7), "sql");
|
|
59734
59734
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -59790,7 +59790,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
59790
59790
|
return { settle, checkShares };
|
|
59791
59791
|
}, "recordSettlingOver");
|
|
59792
59792
|
|
|
59793
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
59794
59794
|
import { createHash as createHash23 } from "node:crypto";
|
|
59795
59795
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
59796
59796
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -59806,7 +59806,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
59806
59806
|
return { stamp, untouched };
|
|
59807
59807
|
}, "importStampsOver");
|
|
59808
59808
|
|
|
59809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
59810
59810
|
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";
|
|
59811
59811
|
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";
|
|
59812
59812
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -60043,7 +60043,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60043
60043
|
};
|
|
60044
60044
|
}, "subscriptionsStoreOver");
|
|
60045
60045
|
|
|
60046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
60047
60047
|
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";
|
|
60048
60048
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
60049
60049
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -60168,7 +60168,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60168
60168
|
};
|
|
60169
60169
|
}, "walletsStoreOver");
|
|
60170
60170
|
|
|
60171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
60172
60172
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
60173
60173
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
60174
60174
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -60427,7 +60427,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
60427
60427
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
60428
60428
|
}, "recordWritesOver");
|
|
60429
60429
|
|
|
60430
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
60431
60431
|
var LIMIT = 1e3;
|
|
60432
60432
|
var iso16 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
60433
60433
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -60651,7 +60651,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60651
60651
|
};
|
|
60652
60652
|
}, "recordStoreOver");
|
|
60653
60653
|
|
|
60654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60654
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/templates.js
|
|
60655
60655
|
var templateOf = /* @__PURE__ */ __name((row2) => ({
|
|
60656
60656
|
key: row2.key,
|
|
60657
60657
|
channel: row2.channel,
|
|
@@ -60706,7 +60706,7 @@ var storedTemplateBodies = /* @__PURE__ */ __name((database, key2, language) =>
|
|
|
60706
60706
|
return Object.fromEntries(rows.map((row2) => [row2.channel, row2.body]));
|
|
60707
60707
|
}, "storedTemplateBodies");
|
|
60708
60708
|
|
|
60709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
60710
60710
|
var refusalOf2 = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
60711
60711
|
var wrapped2 = /* @__PURE__ */ new WeakMap();
|
|
60712
60712
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -60741,7 +60741,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
60741
60741
|
return proxy;
|
|
60742
60742
|
}, "storeErrors");
|
|
60743
60743
|
|
|
60744
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60744
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
60745
60745
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
60746
60746
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
60747
60747
|
let merged2 = { from: from2, to };
|
|
@@ -60754,7 +60754,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
60754
60754
|
}, "markRange");
|
|
60755
60755
|
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");
|
|
60756
60756
|
|
|
60757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
60758
60758
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
60759
60759
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
60760
60760
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -60775,7 +60775,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
60775
60775
|
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);
|
|
60776
60776
|
}, "setTaskAnalysisMark");
|
|
60777
60777
|
|
|
60778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
60779
60779
|
var keyOf6 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
60780
60780
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
60781
60781
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf6(account));
|
|
@@ -60785,7 +60785,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
60785
60785
|
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);
|
|
60786
60786
|
}, "setTaskRulesStop");
|
|
60787
60787
|
|
|
60788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
60789
60789
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
60790
60790
|
const { database } = context;
|
|
60791
60791
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -60844,7 +60844,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60844
60844
|
};
|
|
60845
60845
|
}, "syncStoreOver");
|
|
60846
60846
|
|
|
60847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60847
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
60848
60848
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
60849
60849
|
const { database } = context;
|
|
60850
60850
|
return {
|
|
@@ -60866,7 +60866,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60866
60866
|
};
|
|
60867
60867
|
}, "tagsStoreOver");
|
|
60868
60868
|
|
|
60869
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60869
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
60870
60870
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
60871
60871
|
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
|
|
60872
60872
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -60993,7 +60993,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
60993
60993
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
60994
60994
|
}, "savePictureChunks");
|
|
60995
60995
|
|
|
60996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
60997
60997
|
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,
|
|
60998
60998
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
60999
60999
|
FROM messages m
|
|
@@ -61082,7 +61082,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
61082
61082
|
return plain2(best(found2));
|
|
61083
61083
|
}, "nearestMessages");
|
|
61084
61084
|
|
|
61085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61085
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
61086
61086
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
61087
61087
|
const { database } = context;
|
|
61088
61088
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -61341,7 +61341,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
61341
61341
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
61342
61342
|
}), "vectorsStoreOver");
|
|
61343
61343
|
|
|
61344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
61345
61345
|
import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
61346
61346
|
import { dirname as dirname3, join as join4 } from "node:path";
|
|
61347
61347
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -61429,10 +61429,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
61429
61429
|
}
|
|
61430
61430
|
}, "lastBackup");
|
|
61431
61431
|
|
|
61432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
61433
61433
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
61434
61434
|
|
|
61435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
61436
61436
|
var COUNTED_TABLES = [
|
|
61437
61437
|
"accounts",
|
|
61438
61438
|
"chats",
|
|
@@ -61517,7 +61517,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
61517
61517
|
};
|
|
61518
61518
|
}, "storeContents");
|
|
61519
61519
|
|
|
61520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
61521
61521
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
61522
61522
|
const context = await openStoreContext(options);
|
|
61523
61523
|
try {
|