@wirecat/mail-cli 0.30.0 → 0.32.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 +27 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-523GLORJ.js → all-profiles-OTCWJSJS.js} +19 -29
- package/dist/bundle/{anthropic-KKYGROQR.js → anthropic-GUXHDK32.js} +2 -2
- package/dist/bundle/{app-server-RJR7U5NT.js → app-server-GX7DOE4O.js} +45 -60
- package/dist/bundle/{bun-EBQHHLKR.js → bun-V5QLYBZU.js} +2 -2
- package/dist/bundle/{bun-sqlite-LTG2RRSL.js → bun-sqlite-AXD5CCO3.js} +3 -3
- package/dist/bundle/{chunk-L2D5QYI3.js → chunk-2IYAZRTC.js} +2 -2
- package/dist/bundle/{chunk-ONA3UI3R.js → chunk-2UMEZY6D.js} +2 -2
- package/dist/bundle/{chunk-XGEPAJBY.js → chunk-3URYKAJP.js} +1 -1
- package/dist/bundle/{chunk-SPWKGRTO.js → chunk-4YNUQGDP.js} +1 -1
- package/dist/bundle/{chunk-MVDP7VL6.js → chunk-6SJ7HHAE.js} +1 -1
- package/dist/bundle/{chunk-T7A6HSBF.js → chunk-6TRKNME5.js} +1 -1
- package/dist/bundle/{chunk-YNI57LTZ.js → chunk-6XNTELM5.js} +1 -1
- package/dist/bundle/{chunk-NMN7RTX5.js → chunk-7GW4D3OW.js} +19 -18
- package/dist/bundle/{chunk-3HCEKXXB.js → chunk-AJY2IT25.js} +6 -6
- package/dist/bundle/{chunk-KE2RQUQO.js → chunk-ANYADN3S.js} +17 -17
- package/dist/bundle/{chunk-FL2TKSZY.js → chunk-CAQ5GW3A.js} +1 -1
- package/dist/bundle/{chunk-SNZFQ5SS.js → chunk-CD3TAITM.js} +14 -2
- package/dist/bundle/{chunk-54JKDFOV.js → chunk-FA3B2DHZ.js} +1 -1
- package/dist/bundle/{chunk-Q23EEGPC.js → chunk-GDDCKTBR.js} +1 -1
- package/dist/bundle/{chunk-HVJ2WQI7.js → chunk-GPOTPA3S.js} +10 -10
- package/dist/bundle/{chunk-S2KKQA7O.js → chunk-GSXCMQWV.js} +41 -49
- package/dist/bundle/{chunk-GXKFRZUP.js → chunk-HFA6AZWA.js} +3 -3
- package/dist/bundle/{chunk-DBI22GQL.js → chunk-HUWQ7LXZ.js} +506 -338
- package/dist/bundle/{chunk-5X5A3CAX.js → chunk-IBCGCYRU.js} +1 -1
- package/dist/bundle/{chunk-4F7WQHDO.js → chunk-IVD3JTN5.js} +1 -1
- package/dist/bundle/{chunk-IIV43UIC.js → chunk-JRGPPS6H.js} +12 -12
- package/dist/bundle/{chunk-3ECFSRLQ.js → chunk-JUS4Y4BW.js} +3 -3
- package/dist/bundle/{chunk-F22PLRCG.js → chunk-KLFF54AF.js} +7 -7
- package/dist/bundle/{chunk-J5PUHGK2.js → chunk-KLGZX6QT.js} +1 -1
- package/dist/bundle/{chunk-CWAA73PJ.js → chunk-LVFI3TCG.js} +5 -5
- package/dist/bundle/{chunk-GDFJKUMK.js → chunk-LVJWN2PR.js} +6 -6
- package/dist/bundle/{chunk-E2SL7HIZ.js → chunk-MENP3FF5.js} +11 -12
- package/dist/bundle/{chunk-HZUUVNWC.js → chunk-MHXZ62CU.js} +1 -1
- package/dist/bundle/{chunk-B3NXAN6J.js → chunk-MSK7RNOM.js} +149 -148
- package/dist/bundle/{chunk-D3J4T5OZ.js → chunk-MT2WDBG2.js} +12 -12
- package/dist/bundle/{chunk-2M7PPII5.js → chunk-MVMNZ3Q3.js} +745 -336
- package/dist/bundle/{chunk-ZG2XBWFT.js → chunk-NMN5JUYL.js} +3 -3
- package/dist/bundle/{chunk-JKWNPRZD.js → chunk-O7OP5NQO.js} +1 -1
- package/dist/bundle/{chunk-NV2REPY6.js → chunk-OUM4ZO53.js} +1 -1
- package/dist/bundle/{chunk-KIZYN3NG.js → chunk-PALY5PGE.js} +5 -5
- package/dist/bundle/{chunk-LM4K6K2R.js → chunk-PCMQYGEM.js} +4 -4
- package/dist/bundle/{chunk-GCSFZTRI.js → chunk-PCWAZVAD.js} +30 -5
- package/dist/bundle/{chunk-6C7SA4LD.js → chunk-QHXOXYAT.js} +57 -54
- package/dist/bundle/{chunk-WXQK5RO5.js → chunk-RNBG75HW.js} +33 -23
- package/dist/bundle/{chunk-TIMBTN5Z.js → chunk-SDAYOJLL.js} +5 -5
- package/dist/bundle/{chunk-LN2LWPN2.js → chunk-SEJBS7SI.js} +1 -1
- package/dist/bundle/{chunk-U7VYDTXN.js → chunk-SWXKS7JK.js} +16 -16
- package/dist/bundle/{chunk-R3IFRHZ2.js → chunk-SZZJOSIS.js} +2 -2
- package/dist/bundle/{chunk-WHS3CTTM.js → chunk-T577U52I.js} +7 -7
- package/dist/bundle/{chunk-SN5V6CKH.js → chunk-TDTCCHAI.js} +98 -6
- package/dist/bundle/{chunk-FYXGD6R6.js → chunk-TWHIZJAZ.js} +2 -2
- package/dist/bundle/{chunk-K5FTIIYR.js → chunk-U346WBJ5.js} +4 -4
- package/dist/bundle/{chunk-MP572GP7.js → chunk-U57QRUP7.js} +2 -2
- package/dist/bundle/{chunk-YMJXGIYG.js → chunk-U7RLFLTM.js} +23 -23
- package/dist/bundle/{chunk-ENKZEQ4Y.js → chunk-WNGMI6AZ.js} +2 -2
- package/dist/bundle/{chunk-BOGGQOVO.js → chunk-WQOGHND4.js} +1 -1
- package/dist/bundle/{chunk-A3YXTDTP.js → chunk-XXXVVNGI.js} +18 -15
- package/dist/bundle/{chunk-RLPWLGP6.js → chunk-Z6OKVD3R.js} +7 -7
- package/dist/bundle/{chunk-QGIQ62KV.js → chunk-ZAD7K4TI.js} +382 -366
- package/dist/bundle/{chunk-26H2HVJD.js → chunk-ZDP6A2VL.js} +2 -2
- package/dist/bundle/{command-contract-ETECA2AC.js → command-contract-DZ6XRIOI.js} +15 -15
- package/dist/bundle/{command-server-entry-BFXRYTBC.js → command-server-entry-BVXOPKXH.js} +21 -21
- package/dist/bundle/{decode-4QRYNPD5.js → decode-STN3EHT7.js} +2 -2
- package/dist/bundle/{dist-MHJPECI4.js → dist-B2JWWTNN.js} +15 -11
- package/dist/bundle/{echarts-EJXBKCJT.js → echarts-QIXLXS3G.js} +2 -2
- package/dist/bundle/{embed-46WZZMUQ.js → embed-4NC4ELYP.js} +3 -3
- package/dist/bundle/{embedder-56WHJKJE.js → embedder-HBRDIFQC.js} +6 -6
- package/dist/bundle/{first-run-CATDBOBV.js → first-run-6QF67AAZ.js} +6 -6
- package/dist/bundle/first-screen-LXSZMK2P.js +34 -0
- package/dist/bundle/{instructions-Z7GVGWXS.js → instructions-MD2RZT5Z.js} +1 -1
- package/dist/bundle/mail.js +2 -2
- package/dist/bundle/{node-L2PVEW3N.js → node-IEVT2FSJ.js} +2 -2
- package/dist/bundle/{node-sqlite-RIGII7U7.js → node-sqlite-EOTTDMOG.js} +4 -4
- package/dist/bundle/{oauth-OWT6NYRS.js → oauth-A5BEFGCI.js} +4 -4
- package/dist/bundle/{open-D3SPYL7O.js → open-HWN2EZYG.js} +2 -2
- package/dist/bundle/{openai-IPTZDMFD.js → openai-PJKJ4CIU.js} +12 -12
- package/dist/bundle/{process-MNZTQ2DA.js → process-6Q23D3TO.js} +1 -1
- package/dist/bundle/{program-QCHTCOCR.js → program-WR43NPAV.js} +523 -454
- package/dist/bundle/{prompt-BN6AKRWN.js → prompt-E7Q2662O.js} +2 -2
- package/dist/bundle/{recognize-I5TH7OEW.js → recognize-4F4PIL4B.js} +1 -1
- package/dist/bundle/{remote-R324LAUL.js → remote-RGJXO7XK.js} +6 -6
- package/dist/bundle/{rerank-ZMGZCUJV.js → rerank-EDY7PHMG.js} +4 -4
- package/dist/bundle/{serve-YUFZSNJC.js → serve-Q4XF6ID2.js} +6 -6
- package/dist/bundle/server-2Y5NSP2U.js +67 -0
- package/dist/bundle/{server-54ULZ3RA.js → server-5I72DSDF.js} +43 -41
- package/dist/bundle/{sqlite-runtime-AYQTUQXM.js → sqlite-runtime-PU3Z2H7C.js} +3 -3
- package/dist/bundle/{state-PHEBOYYI.js → state-CWSXJBU2.js} +3 -3
- package/dist/bundle/{store-NGX3A5XT.js → store-KQPKS3PX.js} +15 -15
- package/dist/bundle/{store-4PHDSXEV.js → store-ZAMKKM2A.js} +13 -13
- package/dist/bundle/store-maintenance-command-PMTTDR6J.js +58 -0
- package/dist/commands/rules.d.ts.map +1 -1
- package/dist/commands/rules.js +73 -22
- package/dist/commands/rules.js.map +1 -1
- package/dist/mail/rules/apply.d.ts.map +1 -1
- package/dist/mail/rules/apply.js +1 -9
- package/dist/mail/rules/apply.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/chunk-IJONJTST.js +0 -76
- package/dist/bundle/first-screen-WCDR3QUR.js +0 -34
- package/dist/bundle/server-UD75CYDG.js +0 -68
- package/dist/bundle/store-maintenance-command-WHBIV6HC.js +0 -58
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
typedPhone,
|
|
59
59
|
validCounter,
|
|
60
60
|
wildcardPattern
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-ANYADN3S.js";
|
|
62
62
|
import {
|
|
63
63
|
ACCOUNT_GROUPS,
|
|
64
64
|
CATEGORIES,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
runEvent,
|
|
97
97
|
severity,
|
|
98
98
|
sourceOf2 as sourceOf
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-U7RLFLTM.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-MVMNZ3Q3.js";
|
|
244
244
|
import {
|
|
245
245
|
sqliteCode
|
|
246
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-O7OP5NQO.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-KLFF54AF.js";
|
|
257
257
|
import {
|
|
258
258
|
NORMALIZER_VERSION,
|
|
259
259
|
fold,
|
|
260
260
|
normalize
|
|
261
|
-
} from "./chunk-
|
|
261
|
+
} from "./chunk-4YNUQGDP.js";
|
|
262
262
|
import {
|
|
263
263
|
DEFAULT_TASK_CATEGORIES,
|
|
264
264
|
sharedConfigPath,
|
|
265
265
|
storedTaskCategories,
|
|
266
266
|
taskCategoriesReader
|
|
267
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-PALY5PGE.js";
|
|
268
268
|
import {
|
|
269
269
|
refuseOwnerStoreInTests,
|
|
270
270
|
storePath
|
|
271
|
-
} from "./chunk-
|
|
271
|
+
} from "./chunk-FA3B2DHZ.js";
|
|
272
272
|
import {
|
|
273
273
|
quietSqliteWarning,
|
|
274
274
|
storeCapable
|
|
275
|
-
} from "./chunk-
|
|
275
|
+
} from "./chunk-SDAYOJLL.js";
|
|
276
276
|
import {
|
|
277
277
|
PRAGMAS,
|
|
278
278
|
TIME_LIMIT_FUNCTION,
|
|
279
279
|
TimeLimitReached,
|
|
280
280
|
isQueryOnly
|
|
281
|
-
} from "./chunk-
|
|
281
|
+
} from "./chunk-OUM4ZO53.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-3URYKAJP.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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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 = {
|
|
@@ -23444,7 +23444,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
23444
23444
|
...filter.where ? [filter.where] : [],
|
|
23445
23445
|
...filter.source === void 0 ? [] : [{ sql: filter.source === "auto" ? "x.auto = 1" : "(x.auto = 0 OR x.source = 'owner')", params: [] }]
|
|
23446
23446
|
];
|
|
23447
|
-
const rows = database.prepare(`SELECT * FROM (SELECT tag,type,min(created_at) AS created_at,chat_id,chat_title,person_id,name,name_folded,message_id,CASE WHEN max(source='owner') THEN 'owner' ELSE min(source) END AS source,target_id,tag_id,task_id,tag_type,max(auto) AS auto FROM (SELECT u.*, CASE u.type WHEN 'identity' THEN 'contact' WHEN 'email_thread' THEN 'chat' WHEN 'email' THEN 'message' ELSE u.type END AS tag_type, (u.type = 'chat' AND EXISTS (SELECT 1 FROM canonical_auto_tag_claims ac JOIN resolved_tags rt ON rt.id=ac.tag_id WHERE ac.chat_id = u.target_id AND rt.canonical_id = u.tag_id)) AS auto FROM (${union}) u) GROUP BY tag,type,target_id) x WHERE ${where.length === 0 ? "1" : where.map(({ sql: sql2 }) => `(${sql2})`).join(" AND ")} ORDER BY x.tag, x.type, x.created_at, x.chat_id, x.person_id, x.message_id` + (filter.window ? " LIMIT ? OFFSET ?" : "")).all(...chosen.flatMap(({ params }) => selectedTag === void 0 ? params : [...params, selectedTag]), ...where.flatMap(({ params }) => params), ...filter.window ? [filter.window.limit, filter.window.offset] : []);
|
|
23447
|
+
const rows = database.prepare(`SELECT * FROM (SELECT tag,type,min(created_at) AS created_at,chat_id,chat_title,person_id,name,name_folded,message_id,CASE WHEN max(source='owner') THEN 'owner' ELSE min(source) END AS source,target_id,tag_id,task_id,tag_type,max(auto) AS auto FROM (SELECT u.*, CASE u.type WHEN 'identity' THEN 'contact' WHEN 'email_thread' THEN 'chat' WHEN 'email' THEN 'message' ELSE u.type END AS tag_type, (u.type = 'chat' AND EXISTS (SELECT 1 FROM canonical_auto_tag_claims ac JOIN resolved_tags rt ON rt.id=ac.tag_id WHERE ac.chat_id = u.target_id AND rt.canonical_id = u.tag_id)) AS auto FROM (${union}) u) GROUP BY tag,type,target_id) x WHERE ${where.length === 0 ? "1" : where.map(({ sql: sql2 }) => `(${sql2})`).join(" AND ")} ORDER BY x.tag, x.type, x.created_at, x.chat_id, x.person_id, x.message_id, x.target_id` + (filter.window ? " LIMIT ? OFFSET ?" : "")).all(...chosen.flatMap(({ params }) => selectedTag === void 0 ? params : [...params, selectedTag]), ...where.flatMap(({ params }) => params), ...filter.window ? [filter.window.limit, filter.window.offset] : []);
|
|
23448
23448
|
const result = rows.map((row2) => {
|
|
23449
23449
|
const type = TAG_TYPE[String(row2.type)];
|
|
23450
23450
|
const chatId = row2.chat_id == null ? void 0 : String(row2.chat_id);
|
|
@@ -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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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,11 +23969,11 @@ 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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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) => {
|
|
23976
|
-
const chat2 = database.prepare("SELECT 'linked' AS status, 'chat' AS target_type, id AS target_id, 'rules' AS author FROM chats WHERE (? IS NOT NULL AND lower(username) = lower(?)) OR external_id = ? ORDER BY id LIMIT 1");
|
|
23976
|
+
const chat2 = database.prepare("SELECT 'linked' AS status, 'chat' AS target_type, c.id AS target_id, 'rules' AS author FROM chats c JOIN accounts a ON a.id = c.account_id WHERE a.provider = 'telegram' AND ((? IS NOT NULL AND lower(c.username) = lower(?)) OR c.external_id = ?) ORDER BY c.id LIMIT 1");
|
|
23977
23977
|
const account = database.prepare("SELECT 'linked' AS status, 'identity' AS target_type, id AS target_id, 'rules' AS author FROM identities WHERE provider = 'telegram' AND lower(username) = lower(?) ORDER BY id LIMIT 1");
|
|
23978
23978
|
return (value) => {
|
|
23979
23979
|
const target = telegramTarget(value);
|
|
@@ -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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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);
|
|
@@ -25451,7 +25451,7 @@ var leaf = /* @__PURE__ */ __name((node, columns2, options) => {
|
|
|
25451
25451
|
}
|
|
25452
25452
|
case "time": {
|
|
25453
25453
|
const range = node.operator === "range" ? [node.value, node.upper ?? "*", node.lower_inclusive ?? true, node.upper_inclusive ?? true] : [node.value, node.value, true, true];
|
|
25454
|
-
const { lower, upper, lower_inclusive, upper_inclusive } = dateRange(range[0], range[1], range[2], range[3], options.zone
|
|
25454
|
+
const { lower, upper, lower_inclusive, upper_inclusive } = dateRange(range[0], range[1], range[2], range[3], timezoneOf(options.zone), node.span, options.now);
|
|
25455
25455
|
return all([
|
|
25456
25456
|
{ sql: `${sql2} IS NOT NULL`, params: [] },
|
|
25457
25457
|
...lower === void 0 ? [] : [{ sql: `${sql2} ${lower_inclusive ? ">=" : ">"} ?`, params: [lower] }],
|
|
@@ -25486,7 +25486,7 @@ var compile = /* @__PURE__ */ __name((node, columns2, options) => {
|
|
|
25486
25486
|
var queryFilter = /* @__PURE__ */ __name((ast, columns2, options = {}) => compile(ast.root, columns2, 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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-accounts.js
|
|
28823
28823
|
var accountKeys = /* @__PURE__ */ __name((database, ids3) => {
|
|
28824
28824
|
const unique2 = [...new Set(ids3)];
|
|
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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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))
|
|
@@ -29677,7 +29677,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
29677
29677
|
};
|
|
29678
29678
|
}, "filesStoreOver");
|
|
29679
29679
|
|
|
29680
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
29681
29681
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
29682
29682
|
entity: "document",
|
|
29683
29683
|
backend: "sql",
|
|
@@ -29723,7 +29723,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
29723
29723
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns2);
|
|
29724
29724
|
}, "importedDocumentWhere");
|
|
29725
29725
|
|
|
29726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
29727
29727
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
29728
29728
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
29729
29729
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -29731,7 +29731,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
29731
29731
|
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);
|
|
29732
29732
|
}, "reviewLink");
|
|
29733
29733
|
|
|
29734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29734
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/link-row.js
|
|
29735
29735
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
29736
29736
|
var thingRef = /* @__PURE__ */ __name((database, type, id2) => type == null || id2 == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? null, "thingRef");
|
|
29737
29737
|
var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
@@ -29764,7 +29764,7 @@ var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
|
29764
29764
|
};
|
|
29765
29765
|
}, "linkOf");
|
|
29766
29766
|
|
|
29767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
29768
29768
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
29769
29769
|
const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
|
|
29770
29770
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -29785,7 +29785,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
29785
29785
|
return changed;
|
|
29786
29786
|
}, "dateFileNotes");
|
|
29787
29787
|
|
|
29788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
29789
29789
|
var textOf2 = /* @__PURE__ */ __name((text7, what, max = 1e5, allowEmpty = false) => {
|
|
29790
29790
|
const value = text7.trim();
|
|
29791
29791
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -29798,7 +29798,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
29798
29798
|
return value;
|
|
29799
29799
|
}, "oneOf");
|
|
29800
29800
|
|
|
29801
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
29802
29802
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
29803
29803
|
var RELATIONSHIPS = RELATION_KINDS.map(linkKind).join(", ");
|
|
29804
29804
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
@@ -30313,10 +30313,10 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30313
30313
|
};
|
|
30314
30314
|
}, "notesStoreOver");
|
|
30315
30315
|
|
|
30316
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30316
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/rows-page.js
|
|
30317
30317
|
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");
|
|
30318
30318
|
|
|
30319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30319
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
30320
30320
|
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";
|
|
30321
30321
|
var iso5 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
30322
30322
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -30581,7 +30581,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30581
30581
|
};
|
|
30582
30582
|
}, "memoriesStoreOver");
|
|
30583
30583
|
|
|
30584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30584
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
30585
30585
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
30586
30586
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
30587
30587
|
throw new CliError(code, message3, { reason });
|
|
@@ -30729,7 +30729,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
30729
30729
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly: ownerOnly2, linkedId, ...decisionsOver(context) };
|
|
30730
30730
|
}, "reviewedRowsOver");
|
|
30731
30731
|
|
|
30732
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
30733
30733
|
var MAX_LINES = 500;
|
|
30734
30734
|
var PARENTS = {
|
|
30735
30735
|
invoice: {
|
|
@@ -30829,7 +30829,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
30829
30829
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
30830
30830
|
}, "moneyLinesOver");
|
|
30831
30831
|
|
|
30832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30832
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
30833
30833
|
var COUNTED = {
|
|
30834
30834
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
30835
30835
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -30904,7 +30904,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
30904
30904
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
30905
30905
|
}, "refundRulesOver");
|
|
30906
30906
|
|
|
30907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
30908
30908
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
30909
30909
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
30910
30910
|
var PAID = netPaidSql("i.id");
|
|
@@ -31308,7 +31308,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31308
31308
|
};
|
|
31309
31309
|
}, "financeStoreOver");
|
|
31310
31310
|
|
|
31311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
31312
31312
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
31313
31313
|
throw new CliError("validation_error", message3, { reason });
|
|
31314
31314
|
}, "refuse");
|
|
@@ -31386,7 +31386,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
31386
31386
|
};
|
|
31387
31387
|
}, "paymentEntriesOver");
|
|
31388
31388
|
|
|
31389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
31390
31390
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
31391
31391
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
31392
31392
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -31413,7 +31413,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
31413
31413
|
return valid;
|
|
31414
31414
|
}, "validateEvidenceFindings");
|
|
31415
31415
|
|
|
31416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31416
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
31417
31417
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
31418
31418
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
31419
31419
|
var iso7 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31607,7 +31607,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31607
31607
|
};
|
|
31608
31608
|
}, "proposedActionsStoreOver");
|
|
31609
31609
|
|
|
31610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-proposals.js
|
|
31611
31611
|
var CONFIRMED = "proposal";
|
|
31612
31612
|
var refOf = /* @__PURE__ */ __name(({ database }, pk) => {
|
|
31613
31613
|
const row2 = database.prepare("SELECT provider, external_id FROM identities WHERE id = ?").get(pk);
|
|
@@ -31957,7 +31957,7 @@ var identityLinkRows = /* @__PURE__ */ __name((context, { person: person2, statu
|
|
|
31957
31957
|
return { items, hasMore: rows.length > limit };
|
|
31958
31958
|
}, "identityLinkRows");
|
|
31959
31959
|
|
|
31960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31960
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-merges.js
|
|
31961
31961
|
var mergeId = /* @__PURE__ */ __name((to, from2) => `merge:${to}-${from2}`, "mergeId");
|
|
31962
31962
|
var parseMergeId = /* @__PURE__ */ __name((id2) => {
|
|
31963
31963
|
const found2 = /^merge:([1-9]\d*)-([1-9]\d*)$/.exec(id2.trim());
|
|
@@ -32060,7 +32060,7 @@ var split = /* @__PURE__ */ __name((context, uid, refs, by) => {
|
|
|
32060
32060
|
return recordOf(context, alone);
|
|
32061
32061
|
}, "split");
|
|
32062
32062
|
|
|
32063
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-split-proposals.js
|
|
32064
32064
|
var refOf2 = /* @__PURE__ */ __name(({ provider, id: id2 }) => `${provider}:${id2}`, "refOf");
|
|
32065
32065
|
var keyOf3 = /* @__PURE__ */ __name((split2, person2, identities2) => `${split2} ${person2} ${[...identities2].sort().join(" ")}`, "keyOf");
|
|
32066
32066
|
var planOf = /* @__PURE__ */ __name((context, input) => {
|
|
@@ -32237,7 +32237,7 @@ var forgetErasedSplits = /* @__PURE__ */ __name((database) => {
|
|
|
32237
32237
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
32238
32238
|
}, "forgetErasedSplits");
|
|
32239
32239
|
|
|
32240
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32240
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/test-data.js
|
|
32241
32241
|
var SEED_PEOPLE = [
|
|
32242
32242
|
{ name: "Owner", username: "owner" },
|
|
32243
32243
|
{ name: "Ann Lee", username: "ann" },
|
|
@@ -32254,7 +32254,7 @@ var RESERVED_ADDRESS_GLOBS = [
|
|
|
32254
32254
|
];
|
|
32255
32255
|
var SEED_ID_GLOBS = ["person-[0-9]*"];
|
|
32256
32256
|
|
|
32257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/test-people.js
|
|
32258
32258
|
var TEST_DATA_KIND = "test_data";
|
|
32259
32259
|
var globs = /* @__PURE__ */ __name((column2, patterns) => patterns.map((pattern) => `${column2} GLOB '${pattern}'`).join(" OR "), "globs");
|
|
32260
32260
|
var SURE = `(${globs("i.external_id", SEED_ID_GLOBS)} OR ${globs("lower(i.email)", RESERVED_ADDRESS_GLOBS)})`;
|
|
@@ -32323,7 +32323,7 @@ var forgetErasedTestData = /* @__PURE__ */ __name((database) => {
|
|
|
32323
32323
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
32324
32324
|
}, "forgetErasedTestData");
|
|
32325
32325
|
|
|
32326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
32327
32327
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null, startScope) => Number(orm.insert(accounts).values({
|
|
32328
32328
|
provider,
|
|
32329
32329
|
externalId: account,
|
|
@@ -32524,7 +32524,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
32524
32524
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
32525
32525
|
}, "dropOrphanPeople");
|
|
32526
32526
|
|
|
32527
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
32528
32528
|
var HISTORY_KEY = "$history";
|
|
32529
32529
|
var objectOf2 = /* @__PURE__ */ __name((text7) => {
|
|
32530
32530
|
if (typeof text7 !== "string")
|
|
@@ -32600,7 +32600,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
32600
32600
|
return rest;
|
|
32601
32601
|
}, "withoutHistory");
|
|
32602
32602
|
|
|
32603
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
32604
32604
|
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");
|
|
32605
32605
|
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");
|
|
32606
32606
|
var setChatScope = /* @__PURE__ */ __name((context, accountKey, chatId, scope3) => {
|
|
@@ -32898,7 +32898,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
32898
32898
|
}
|
|
32899
32899
|
}, "replaceAutoTags");
|
|
32900
32900
|
|
|
32901
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32901
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-tokens.js
|
|
32902
32902
|
var BOT_TOKEN = /(?<!\d)(\d{6,12}):[A-Za-z0-9_-]{30,40}(?![A-Za-z0-9_-])/g;
|
|
32903
32903
|
var MAY_HOLD = "*[0-9][0-9][0-9][0-9][0-9][0-9]:*";
|
|
32904
32904
|
var MASKED_THROUGH = "bot_tokens_masked_through";
|
|
@@ -32938,7 +32938,7 @@ var maskStoredBotTokens = /* @__PURE__ */ __name((context) => {
|
|
|
32938
32938
|
}, "maskStoredBotTokens");
|
|
32939
32939
|
var masks = /* @__PURE__ */ __name((value) => value != null && withoutBotTokens(String(value)) !== value, "masks");
|
|
32940
32940
|
|
|
32941
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32941
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
32942
32942
|
import { createHash as createHash4 } from "node:crypto";
|
|
32943
32943
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
32944
32944
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -33036,7 +33036,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
33036
33036
|
return { source: source2, query, chat: chat2, senders, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
33037
33037
|
}, "contextEvidenceRequest");
|
|
33038
33038
|
|
|
33039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
33040
33040
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
33041
33041
|
var ACTIVITY = `
|
|
33042
33042
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -33166,7 +33166,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
33166
33166
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
33167
33167
|
}), "mailActivity");
|
|
33168
33168
|
|
|
33169
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
33170
33170
|
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");
|
|
33171
33171
|
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;
|
|
33172
33172
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -33307,7 +33307,7 @@ var mailOwnText = /* @__PURE__ */ __name((body2) => {
|
|
|
33307
33307
|
return text7 || body2.trim();
|
|
33308
33308
|
}, "mailOwnText");
|
|
33309
33309
|
|
|
33310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33310
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
33311
33311
|
var titleOf2 = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
33312
33312
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
33313
33313
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
@@ -33420,7 +33420,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
33420
33420
|
return emails3 + threads;
|
|
33421
33421
|
}, "drainEmailIndex");
|
|
33422
33422
|
|
|
33423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
33424
33424
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
33425
33425
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
33426
33426
|
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,
|
|
@@ -33518,7 +33518,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
33518
33518
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
33519
33519
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
33520
33520
|
|
|
33521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33521
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
33522
33522
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
33523
33523
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
33524
33524
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -33568,7 +33568,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
33568
33568
|
return threads.length;
|
|
33569
33569
|
}, "markEmailsRestored");
|
|
33570
33570
|
|
|
33571
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
33572
33572
|
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
|
|
33573
33573
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
33574
33574
|
WHERE p.account_id = ?
|
|
@@ -33628,7 +33628,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
33628
33628
|
}, "indexedMailPieces");
|
|
33629
33629
|
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");
|
|
33630
33630
|
|
|
33631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33631
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
33632
33632
|
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");
|
|
33633
33633
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
33634
33634
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -33695,7 +33695,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
33695
33695
|
}
|
|
33696
33696
|
}), "mailRulesOver");
|
|
33697
33697
|
|
|
33698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
33699
33699
|
function checkMeetingCancelled(signal) {
|
|
33700
33700
|
if (!signal?.aborted)
|
|
33701
33701
|
return;
|
|
@@ -33706,7 +33706,7 @@ function checkMeetingCancelled(signal) {
|
|
|
33706
33706
|
}
|
|
33707
33707
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
33708
33708
|
|
|
33709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
33710
33710
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
33711
33711
|
id: Number(row2.id),
|
|
33712
33712
|
accountId: Number(row2.account_id),
|
|
@@ -33756,7 +33756,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
33756
33756
|
createdAt: Number(row2.created_at)
|
|
33757
33757
|
}), "transcriptRowOf");
|
|
33758
33758
|
|
|
33759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33759
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
33760
33760
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
33761
33761
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
33762
33762
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -33923,7 +33923,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33923
33923
|
}
|
|
33924
33924
|
}), "meetingReadsOver");
|
|
33925
33925
|
|
|
33926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
33927
33927
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
33928
33928
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
33929
33929
|
const params = [input.accountId];
|
|
@@ -33966,7 +33966,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
33966
33966
|
return { clauses, params };
|
|
33967
33967
|
}, "meetingSelectionSql");
|
|
33968
33968
|
|
|
33969
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33969
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
33970
33970
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
33971
33971
|
async meetingChatLines(input) {
|
|
33972
33972
|
checkMeetingCancelled(input.signal);
|
|
@@ -33994,7 +33994,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33994
33994
|
}
|
|
33995
33995
|
}), "meetingChatLinesOver");
|
|
33996
33996
|
|
|
33997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
33998
33998
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
33999
33999
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
34000
34000
|
}, "missing");
|
|
@@ -34117,7 +34117,7 @@ function meetingContextLinksOver(context) {
|
|
|
34117
34117
|
}
|
|
34118
34118
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
34119
34119
|
|
|
34120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-documents.js
|
|
34121
34121
|
var TRANSCRIPT_ROLE = "transcript";
|
|
34122
34122
|
var roleOf3 = /* @__PURE__ */ __name((value) => MEETING_DOCUMENT_ROLES.find((role) => role === value), "roleOf");
|
|
34123
34123
|
var attach = /* @__PURE__ */ __name((database, meetingId, fileId, role, metadata3, listed, now2) => {
|
|
@@ -34191,7 +34191,7 @@ var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
34191
34191
|
};
|
|
34192
34192
|
}, "meetingTranscriptDocumentsOver");
|
|
34193
34193
|
|
|
34194
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34194
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
34195
34195
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
34196
34196
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
34197
34197
|
var summaryOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -34220,7 +34220,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
34220
34220
|
return row2 ? summaryText(summaryOf2(row2)) : null;
|
|
34221
34221
|
}, "indexedText");
|
|
34222
34222
|
|
|
34223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
34224
34224
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
34225
34225
|
var meetingCurrentIndexRows = `
|
|
34226
34226
|
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
|
|
@@ -34251,7 +34251,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
34251
34251
|
}, "invalidateMeetingStems");
|
|
34252
34252
|
var meetingStemmableText = /* @__PURE__ */ __name((text7) => text7.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
34253
34253
|
|
|
34254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
34255
34255
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
34256
34256
|
return {
|
|
34257
34257
|
async indexSearch(original) {
|
|
@@ -34319,10 +34319,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
34319
34319
|
}
|
|
34320
34320
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
34321
34321
|
|
|
34322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
34323
34323
|
import { createHash as createHash5 } from "node:crypto";
|
|
34324
34324
|
|
|
34325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/lucene/plain.js
|
|
34326
34326
|
var REPAIRED = /* @__PURE__ */ new Set([
|
|
34327
34327
|
"query.invalid-syntax",
|
|
34328
34328
|
"query.unclosed-literal",
|
|
@@ -34465,7 +34465,7 @@ var plainQuery = /* @__PURE__ */ __name((text7, fields4 = SEARCH_FIELDS) => {
|
|
|
34465
34465
|
return text7;
|
|
34466
34466
|
}, "plainQuery");
|
|
34467
34467
|
|
|
34468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34468
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
34469
34469
|
var SHORTEST_CORRECTION = 3;
|
|
34470
34470
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
34471
34471
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -34512,7 +34512,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words4) => {
|
|
|
34512
34512
|
return corrections;
|
|
34513
34513
|
}, "correctWords");
|
|
34514
34514
|
|
|
34515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
34516
34516
|
var SHORTEST_GARBLED = 4;
|
|
34517
34517
|
var MOST_WIDENED = 64;
|
|
34518
34518
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -34604,7 +34604,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
34604
34604
|
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));
|
|
34605
34605
|
}, "widenWords");
|
|
34606
34606
|
|
|
34607
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
34608
34608
|
import { readFileSync } from "node:fs";
|
|
34609
34609
|
var loaded;
|
|
34610
34610
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -34663,7 +34663,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
34663
34663
|
return false;
|
|
34664
34664
|
}, "knownRussianWord");
|
|
34665
34665
|
|
|
34666
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34666
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
34667
34667
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
34668
34668
|
var MOST_WORDS = 128;
|
|
34669
34669
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -34919,7 +34919,7 @@ var matchedMeetingWords = /* @__PURE__ */ __name((tree, text7, stemmer2) => {
|
|
|
34919
34919
|
return [...found2];
|
|
34920
34920
|
}, "matchedMeetingWords");
|
|
34921
34921
|
|
|
34922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34922
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
34923
34923
|
var fail = /* @__PURE__ */ __name((message3) => {
|
|
34924
34924
|
throw new CliError("validation_error", message3);
|
|
34925
34925
|
}, "fail");
|
|
@@ -35103,7 +35103,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
35103
35103
|
}
|
|
35104
35104
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
35105
35105
|
|
|
35106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35106
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
35107
35107
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35108
35108
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
35109
35109
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -35135,7 +35135,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35135
35135
|
}
|
|
35136
35136
|
}), "meetingLanguagesOver");
|
|
35137
35137
|
|
|
35138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
35139
35139
|
import { createHash as createHash6 } from "node:crypto";
|
|
35140
35140
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
35141
35141
|
if (value === void 0)
|
|
@@ -35228,7 +35228,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
35228
35228
|
}
|
|
35229
35229
|
}), "meetingParticipantSearchOver");
|
|
35230
35230
|
|
|
35231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
35232
35232
|
var preparationQueries = {
|
|
35233
35233
|
participants: {
|
|
35234
35234
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -35278,7 +35278,7 @@ var preparationQueries = {
|
|
|
35278
35278
|
}
|
|
35279
35279
|
};
|
|
35280
35280
|
|
|
35281
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
35282
35282
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35283
35283
|
async preparationContext(original) {
|
|
35284
35284
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -35319,7 +35319,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35319
35319
|
}
|
|
35320
35320
|
}), "meetingPreparationContextOver");
|
|
35321
35321
|
|
|
35322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
35323
35323
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
35324
35324
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
35325
35325
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -35333,7 +35333,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
35333
35333
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
35334
35334
|
)`, "preparationSubjects");
|
|
35335
35335
|
|
|
35336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35336
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
35337
35337
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35338
35338
|
async preparationKnowledge(original) {
|
|
35339
35339
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -35378,7 +35378,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
35378
35378
|
}
|
|
35379
35379
|
}), "meetingPreparationKnowledgeOver");
|
|
35380
35380
|
|
|
35381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
35382
35382
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35383
35383
|
async preparationNotes(original) {
|
|
35384
35384
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -35431,7 +35431,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35431
35431
|
}
|
|
35432
35432
|
}), "meetingPreparationNotesOver");
|
|
35433
35433
|
|
|
35434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35434
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
35435
35435
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35436
35436
|
async relatedHistory(original) {
|
|
35437
35437
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -35502,7 +35502,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35502
35502
|
}
|
|
35503
35503
|
}), "meetingRelatedHistoryOver");
|
|
35504
35504
|
|
|
35505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
35506
35506
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
35507
35507
|
var text3 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
35508
35508
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -35583,7 +35583,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35583
35583
|
}
|
|
35584
35584
|
}), "meetingReviewOver");
|
|
35585
35585
|
|
|
35586
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35586
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
35587
35587
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
35588
35588
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
35589
35589
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -35637,7 +35637,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35637
35637
|
}
|
|
35638
35638
|
}), "meetingSeriesHistoryOver");
|
|
35639
35639
|
|
|
35640
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35640
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
35641
35641
|
var MOST_ROWS = 5e5;
|
|
35642
35642
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
35643
35643
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -35706,7 +35706,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35706
35706
|
}
|
|
35707
35707
|
}), "meetingStatsOver");
|
|
35708
35708
|
|
|
35709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
|
|
35710
35710
|
var CYRILLIC_TO_LATIN = {
|
|
35711
35711
|
\u0430: "a",
|
|
35712
35712
|
\u0431: "b",
|
|
@@ -35928,7 +35928,7 @@ for (const [full, short] of Object.entries(SHORT_FORMS))
|
|
|
35928
35928
|
}
|
|
35929
35929
|
var fullNames = /* @__PURE__ */ __name((skeleton) => [skeleton, ...FULL_NAMES.get(skeleton) ?? []], "fullNames");
|
|
35930
35930
|
|
|
35931
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/name-traces.js
|
|
35932
35932
|
var peopleByNameKey = /* @__PURE__ */ __name((database) => {
|
|
35933
35933
|
const found2 = /* @__PURE__ */ new Map();
|
|
35934
35934
|
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()) {
|
|
@@ -36044,7 +36044,7 @@ function* sharedTraces(database, a, b, name, except) {
|
|
|
36044
36044
|
}
|
|
36045
36045
|
__name(sharedTraces, "sharedTraces");
|
|
36046
36046
|
|
|
36047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-matcher.js
|
|
36048
36048
|
var spellingsOf = /* @__PURE__ */ __name((value) => [value, value.slice(1)], "spellingsOf");
|
|
36049
36049
|
var PERSON_BY = {
|
|
36050
36050
|
// UNION, not OR: each branch reads its own index.
|
|
@@ -36067,7 +36067,7 @@ var personsByIdentifiers = /* @__PURE__ */ __name((database, ids3) => {
|
|
|
36067
36067
|
return [...found2].sort((a, b) => a - b);
|
|
36068
36068
|
}, "personsByIdentifiers");
|
|
36069
36069
|
|
|
36070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-match-scan.js
|
|
36071
36071
|
var BY = "rule";
|
|
36072
36072
|
var RULE2 = { bot: "rule", kind: "rule" };
|
|
36073
36073
|
var MOST_SHARING = 6;
|
|
@@ -36514,7 +36514,7 @@ var linkPhones = /* @__PURE__ */ __name((context, identities2) => {
|
|
|
36514
36514
|
return pass.result;
|
|
36515
36515
|
}, "linkPhones");
|
|
36516
36516
|
|
|
36517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
36518
36518
|
var CURSOR_KEY = "meetings";
|
|
36519
36519
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
36520
36520
|
id: Number(row2.id),
|
|
@@ -36866,6 +36866,7 @@ var MEETING_COLUMNS = {
|
|
|
36866
36866
|
ended_at: { type: "time", sql: "ended_at" },
|
|
36867
36867
|
duration_ms: { type: "num", sql: "duration_ms" },
|
|
36868
36868
|
participants_count: { type: "num", sql: "participants_count" },
|
|
36869
|
+
provider_id: { type: "kw", sql: "external_id" },
|
|
36869
36870
|
created_at: { type: "time", sql: "created_at" },
|
|
36870
36871
|
updated_at: { type: "time", sql: "updated_at" }
|
|
36871
36872
|
};
|
|
@@ -36888,8 +36889,14 @@ var filtered = /* @__PURE__ */ __name((filter = {}) => {
|
|
|
36888
36889
|
add2("started_at >= ?", filter.since);
|
|
36889
36890
|
if (filter.until !== void 0)
|
|
36890
36891
|
add2("started_at <= ?", filter.until);
|
|
36892
|
+
if (filter.ids !== void 0)
|
|
36893
|
+
add2("id IN (SELECT value FROM json_each(?))", JSON.stringify(filter.ids));
|
|
36891
36894
|
if (filter.query !== void 0) {
|
|
36892
|
-
const compiled = queryFilter(filter.query, MEETING_COLUMNS, {
|
|
36895
|
+
const compiled = queryFilter(filter.query, MEETING_COLUMNS, {
|
|
36896
|
+
command: "meetings list",
|
|
36897
|
+
...filter.timezone === void 0 ? {} : { zone: filter.timezone },
|
|
36898
|
+
...filter.now === void 0 ? {} : { now: filter.now }
|
|
36899
|
+
});
|
|
36893
36900
|
where.push(`(${compiled.sql})`);
|
|
36894
36901
|
params.push(...compiled.params);
|
|
36895
36902
|
}
|
|
@@ -37062,6 +37069,10 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37062
37069
|
async meeting(id2) {
|
|
37063
37070
|
return details(database, id2);
|
|
37064
37071
|
},
|
|
37072
|
+
async meetingByExternalId(accountId, externalId) {
|
|
37073
|
+
const row2 = database.prepare("SELECT id FROM meetings WHERE account_id = ? AND external_id = ?").get(accountId, externalId);
|
|
37074
|
+
return row2 ? details(database, Number(row2.id)) : null;
|
|
37075
|
+
},
|
|
37065
37076
|
async participants(query, accountId) {
|
|
37066
37077
|
return participants2(database, query, accountId);
|
|
37067
37078
|
},
|
|
@@ -37102,7 +37113,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37102
37113
|
};
|
|
37103
37114
|
}, "meetingStoreOver");
|
|
37104
37115
|
|
|
37105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37116
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
37106
37117
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
37107
37118
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
37108
37119
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -37128,7 +37139,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder2) => {
|
|
|
37128
37139
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder2))).run();
|
|
37129
37140
|
}, "release");
|
|
37130
37141
|
|
|
37131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
37132
37143
|
var THREAD_COLUMNS = {
|
|
37133
37144
|
subject: {
|
|
37134
37145
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -37145,7 +37156,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
37145
37156
|
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);
|
|
37146
37157
|
}, "threadRows");
|
|
37147
37158
|
|
|
37148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
37149
37160
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
37150
37161
|
id: `email:${place.emailId}`,
|
|
37151
37162
|
chatId: place.threadExternalId,
|
|
@@ -37687,7 +37698,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
37687
37698
|
}
|
|
37688
37699
|
}), "mailStoreOver");
|
|
37689
37700
|
|
|
37690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37701
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
37691
37702
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
37692
37703
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
37693
37704
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -37777,7 +37788,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
37777
37788
|
}, "knownWord");
|
|
37778
37789
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
37779
37790
|
|
|
37780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
37781
37792
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
37782
37793
|
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");
|
|
37783
37794
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -37863,7 +37874,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
37863
37874
|
return found2;
|
|
37864
37875
|
}, "spokenTranscripts");
|
|
37865
37876
|
|
|
37866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
37867
37878
|
var startOf = /* @__PURE__ */ __name((node) => node.operator === "wildcard" && node.implicit ? /^([\p{L}\p{N}]+)\*$/u.exec(normalize(node.value))?.[1] : void 0, "startOf");
|
|
37868
37879
|
var matchOf = /* @__PURE__ */ __name((node) => {
|
|
37869
37880
|
const start = startOf(node);
|
|
@@ -37921,7 +37932,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
37921
37932
|
});
|
|
37922
37933
|
}, "placeHits");
|
|
37923
37934
|
|
|
37924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37935
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
37925
37936
|
var GROUPS = {
|
|
37926
37937
|
chat: {
|
|
37927
37938
|
key: "m.chat_id",
|
|
@@ -37943,7 +37954,7 @@ var GROUPS = {
|
|
|
37943
37954
|
}
|
|
37944
37955
|
};
|
|
37945
37956
|
|
|
37946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
37947
37958
|
var MESSAGES2 = {
|
|
37948
37959
|
rows: "messages",
|
|
37949
37960
|
threads: "chats",
|
|
@@ -38436,7 +38447,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
38436
38447
|
};
|
|
38437
38448
|
}, "runCompiled");
|
|
38438
38449
|
|
|
38439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
38440
38451
|
function invalidMetadata() {
|
|
38441
38452
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
38442
38453
|
}
|
|
@@ -38538,7 +38549,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
38538
38549
|
};
|
|
38539
38550
|
}), "counterTargets");
|
|
38540
38551
|
|
|
38541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38552
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
38542
38553
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
38543
38554
|
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,
|
|
38544
38555
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -38657,7 +38668,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
38657
38668
|
}));
|
|
38658
38669
|
}, "attachmentViews");
|
|
38659
38670
|
|
|
38660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
38661
38672
|
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");
|
|
38662
38673
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text7, source2) => {
|
|
38663
38674
|
const { orm, database, now: now2 } = context;
|
|
@@ -38695,7 +38706,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
38695
38706
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
38696
38707
|
}, "intoVoiceAttachment");
|
|
38697
38708
|
|
|
38698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
38699
38710
|
var FIELDS = [
|
|
38700
38711
|
"threadExternalId",
|
|
38701
38712
|
"senderIdentityId",
|
|
@@ -38805,6 +38816,11 @@ var upsertMessage = /* @__PURE__ */ __name((context, key2, accountKey, chatKey,
|
|
|
38805
38816
|
} else {
|
|
38806
38817
|
pk = found2.pk;
|
|
38807
38818
|
const edit = message3.editedAt !== null;
|
|
38819
|
+
const stale4 = !revived && found2.editedAt !== null && (fields4.editedAt !== null ? Number(fields4.editedAt) < found2.editedAt : seenAt !== void 0 && seenAt < found2.editedAt);
|
|
38820
|
+
if (stale4) {
|
|
38821
|
+
fields4.editedAt = null;
|
|
38822
|
+
fields4.normalizedText = null;
|
|
38823
|
+
}
|
|
38808
38824
|
if (edit) {
|
|
38809
38825
|
const incoming = Number(fields4.sentAt);
|
|
38810
38826
|
if (found2.sentAt > 0 && (incoming <= 0 || found2.sentAt < incoming))
|
|
@@ -38826,7 +38842,7 @@ var upsertMessage = /* @__PURE__ */ __name((context, key2, accountKey, chatKey,
|
|
|
38826
38842
|
}
|
|
38827
38843
|
}
|
|
38828
38844
|
statements.update.run({ ...fields4, pk });
|
|
38829
|
-
if (found2.text !== message3.text && !revived) {
|
|
38845
|
+
if (found2.text !== message3.text && !revived && !stale4) {
|
|
38830
38846
|
orm.insert(messageRevisions).values({ messageId: pk, text: found2.text, editedAt: found2.editedAt, createdAt: now2() }).run();
|
|
38831
38847
|
orm.update(messages).set({ text: message3.text }).where(eq(messages.id, pk)).run();
|
|
38832
38848
|
purgeVectorsOf(context, pk);
|
|
@@ -39014,7 +39030,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
39014
39030
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
39015
39031
|
}, "writeDerivedReactions");
|
|
39016
39032
|
|
|
39017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39033
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
39018
39034
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
39019
39035
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
39020
39036
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -39035,7 +39051,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
39035
39051
|
};
|
|
39036
39052
|
}, "keysOver");
|
|
39037
39053
|
|
|
39038
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39054
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
39039
39055
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
39040
39056
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
39041
39057
|
if (!row2)
|
|
@@ -39082,7 +39098,7 @@ var forgetProfile = /* @__PURE__ */ __name((database, app, profile, now2) => {
|
|
|
39082
39098
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
39083
39099
|
}, "forgetProfile");
|
|
39084
39100
|
|
|
39085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39101
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
39086
39102
|
var ACCOUNT_REASON = "an account you connected, under another name: a mailbox or messenger you read may be someone else's";
|
|
39087
39103
|
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");
|
|
39088
39104
|
var ownersName = /* @__PURE__ */ __name((name, owner, alone) => {
|
|
@@ -39141,7 +39157,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
39141
39157
|
return personOf2(context, ref3);
|
|
39142
39158
|
}, "linkToOwner");
|
|
39143
39159
|
|
|
39144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39160
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
39145
39161
|
var PROVIDERS_SETTING = "providers";
|
|
39146
39162
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
39147
39163
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -39189,7 +39205,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
39189
39205
|
});
|
|
39190
39206
|
}, "registerProvider");
|
|
39191
39207
|
|
|
39192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
39193
39209
|
var DAY3 = 864e5;
|
|
39194
39210
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
39195
39211
|
var TEXT_LIMIT = 20;
|
|
@@ -39387,7 +39403,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
39387
39403
|
};
|
|
39388
39404
|
}, "taskSimilarityOver");
|
|
39389
39405
|
|
|
39390
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
39391
39407
|
var SETTING3 = "taskCategories";
|
|
39392
39408
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
39393
39409
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -39406,7 +39422,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
39406
39422
|
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);
|
|
39407
39423
|
}, "saveTaskCategories");
|
|
39408
39424
|
|
|
39409
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
39410
39426
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
39411
39427
|
var ALLOWED = "taskAgentClose";
|
|
39412
39428
|
var MIN = "taskAgentCloseMin";
|
|
@@ -39462,7 +39478,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
39462
39478
|
];
|
|
39463
39479
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
39464
39480
|
|
|
39465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39481
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
39466
39482
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
39467
39483
|
var KEY = "taskFirstPassPerChat";
|
|
39468
39484
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -39482,7 +39498,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
39482
39498
|
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);
|
|
39483
39499
|
}, "saveFirstPassPerChat");
|
|
39484
39500
|
|
|
39485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
39486
39502
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
39487
39503
|
var EXTERNAL_ID_CHARS = 200;
|
|
39488
39504
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -39509,7 +39525,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
39509
39525
|
return text7;
|
|
39510
39526
|
}, "sourceUrlOf");
|
|
39511
39527
|
|
|
39512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39528
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
39513
39529
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
39514
39530
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
39515
39531
|
name,
|
|
@@ -39761,7 +39777,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
39761
39777
|
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 ?`;
|
|
39762
39778
|
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");
|
|
39763
39779
|
|
|
39764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
39765
39781
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
39766
39782
|
if (row2.author_type == null)
|
|
39767
39783
|
return null;
|
|
@@ -39789,7 +39805,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
39789
39805
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
39790
39806
|
}, "addComment");
|
|
39791
39807
|
|
|
39792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
39793
39809
|
var TASK_RELATION_KINDS = [
|
|
39794
39810
|
"blocked-by",
|
|
39795
39811
|
"follow-up-of",
|
|
@@ -39919,7 +39935,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
39919
39935
|
};
|
|
39920
39936
|
}, "taskRelationsStoreOver");
|
|
39921
39937
|
|
|
39922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
39923
39939
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
39924
39940
|
var TASK_EVENT_KINDS = [
|
|
39925
39941
|
"created",
|
|
@@ -40478,7 +40494,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
40478
40494
|
};
|
|
40479
40495
|
}, "workTasksOver");
|
|
40480
40496
|
|
|
40481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40497
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
40482
40498
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
40483
40499
|
const { database, now: now2 } = context;
|
|
40484
40500
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -40527,7 +40543,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
40527
40543
|
};
|
|
40528
40544
|
}, "taskCloseOver");
|
|
40529
40545
|
|
|
40530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40546
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
40531
40547
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
40532
40548
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
40533
40549
|
const { database, now: now2 } = context;
|
|
@@ -40746,7 +40762,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
40746
40762
|
};
|
|
40747
40763
|
}, "taskPairsOver");
|
|
40748
40764
|
|
|
40749
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
40750
40766
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
40751
40767
|
var TASK_STATS_SQL = {
|
|
40752
40768
|
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"),
|
|
@@ -40785,7 +40801,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
40785
40801
|
}, "statNames")
|
|
40786
40802
|
}), "taskStatsOver");
|
|
40787
40803
|
|
|
40788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
40789
40805
|
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";
|
|
40790
40806
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
40791
40807
|
const key2 = inboxKey(account);
|
|
@@ -41001,7 +41017,7 @@ var oneOf4 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
41001
41017
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
41002
41018
|
}, "oneOf");
|
|
41003
41019
|
|
|
41004
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
41005
41021
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
41006
41022
|
const { database } = context;
|
|
41007
41023
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -41071,7 +41087,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
41071
41087
|
};
|
|
41072
41088
|
}, "accountsStoreOver");
|
|
41073
41089
|
|
|
41074
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41090
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
41075
41091
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
41076
41092
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
41077
41093
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -41095,7 +41111,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
41095
41111
|
})), "keepDownloads");
|
|
41096
41112
|
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");
|
|
41097
41113
|
|
|
41098
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
41099
41115
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
41100
41116
|
const { database } = context;
|
|
41101
41117
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -41152,7 +41168,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
41152
41168
|
}, "keepAttachmentText")
|
|
41153
41169
|
}), "attachmentsStoreOver");
|
|
41154
41170
|
|
|
41155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
41156
41172
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
41157
41173
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
41158
41174
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -41337,7 +41353,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
41337
41353
|
return done;
|
|
41338
41354
|
}, "rekeyChats");
|
|
41339
41355
|
|
|
41340
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
41341
41357
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
41342
41358
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
41343
41359
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -41395,7 +41411,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
41395
41411
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
41396
41412
|
}, "chatCoverage");
|
|
41397
41413
|
|
|
41398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
41399
41415
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
41400
41416
|
const { database } = context;
|
|
41401
41417
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -41544,7 +41560,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
41544
41560
|
};
|
|
41545
41561
|
}, "chatsStoreOver");
|
|
41546
41562
|
|
|
41547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41563
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
41548
41564
|
import { createHash as createHash7 } from "node:crypto";
|
|
41549
41565
|
var BATCH_CONTEXT = 50;
|
|
41550
41566
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -41682,7 +41698,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
41682
41698
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
41683
41699
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
41684
41700
|
|
|
41685
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41701
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
41686
41702
|
import { setTimeout } from "node:timers/promises";
|
|
41687
41703
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
41688
41704
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -41994,7 +42010,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
41994
42010
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
41995
42011
|
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");
|
|
41996
42012
|
|
|
41997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42013
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
41998
42014
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
41999
42015
|
const { database } = context;
|
|
42000
42016
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -42101,7 +42117,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42101
42117
|
};
|
|
42102
42118
|
}, "conversationsStoreOver");
|
|
42103
42119
|
|
|
42104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
42105
42121
|
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";
|
|
42106
42122
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
42107
42123
|
const { database } = context;
|
|
@@ -42126,7 +42142,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42126
42142
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
42127
42143
|
}), "countersStoreOver");
|
|
42128
42144
|
|
|
42129
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
42130
42146
|
var MENTION_STATUSES = ["found", "linked", "proposed", "dismissed"];
|
|
42131
42147
|
var MENTION_QUERY = defineQuery({
|
|
42132
42148
|
entity: "mention",
|
|
@@ -42345,7 +42361,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
42345
42361
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
42346
42362
|
}, "listPlaces");
|
|
42347
42363
|
|
|
42348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
42349
42365
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
42350
42366
|
const { database } = context;
|
|
42351
42367
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -42380,7 +42396,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42380
42396
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
42381
42397
|
}), "mentionsStoreOver");
|
|
42382
42398
|
|
|
42383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42399
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
42384
42400
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
42385
42401
|
var MUTED_NOW = "(coalesce(c.muted,0)=1 AND (c.muted_until IS NULL OR c.muted_until>?))";
|
|
42386
42402
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2, now2) => {
|
|
@@ -42479,7 +42495,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
42479
42495
|
});
|
|
42480
42496
|
}, "waitingChats");
|
|
42481
42497
|
|
|
42482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-activity-counts.js
|
|
42483
42499
|
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 = ?`;
|
|
42484
42500
|
var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since, until, now: now2 }) => {
|
|
42485
42501
|
const statement = database.prepare(SQL);
|
|
@@ -42499,7 +42515,7 @@ var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since
|
|
|
42499
42515
|
return found2;
|
|
42500
42516
|
}, "chatActivityCounts");
|
|
42501
42517
|
|
|
42502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42518
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
42503
42519
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
42504
42520
|
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");
|
|
42505
42521
|
const rows = messageId === void 0 ? read3.all(chatKey) : read3.all(chatKey, messageId);
|
|
@@ -42514,7 +42530,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
42514
42530
|
}));
|
|
42515
42531
|
}, "documentLinkMessages");
|
|
42516
42532
|
|
|
42517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
42518
42534
|
var stemmerFor = stemmerCache();
|
|
42519
42535
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
42520
42536
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -42558,7 +42574,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
42558
42574
|
});
|
|
42559
42575
|
}, "laterSharingRare");
|
|
42560
42576
|
|
|
42561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
42562
42578
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
42563
42579
|
const { database } = context;
|
|
42564
42580
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -42699,7 +42715,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42699
42715
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
42700
42716
|
}), "messagesStoreOver");
|
|
42701
42717
|
|
|
42702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42718
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/person-kinds.js
|
|
42703
42719
|
var PERSON_KINDS = ["person", "organization", "automated", "stranger", "unsorted", "test"];
|
|
42704
42720
|
var AUTOMATED_WORDS = /* @__PURE__ */ new Set([
|
|
42705
42721
|
"noreply",
|
|
@@ -42762,7 +42778,7 @@ var isCompanyName = /* @__PURE__ */ __name((name) => {
|
|
|
42762
42778
|
return wordsOf3(name.replaceAll(".", "")).some((word2) => LEGAL_FORMS.has(word2) || COMPANY_WORDS.has(word2));
|
|
42763
42779
|
}, "isCompanyName");
|
|
42764
42780
|
|
|
42765
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-ties.js
|
|
42766
42782
|
var SMALL_GROUP_MEMBERS = 10;
|
|
42767
42783
|
var PERSON_TIES = ["chat", "small-group", "mail", "meeting", "crm", "phone-book"];
|
|
42768
42784
|
var ALWAYS_SHOWN = ["owner", "added", "task"];
|
|
@@ -42817,7 +42833,7 @@ var shownReasons = /* @__PURE__ */ __name((database, people2) => {
|
|
|
42817
42833
|
return new Map([...found2].map(([person2, reasons]) => [person2, ORDER.filter((one2) => reasons.has(one2))]));
|
|
42818
42834
|
}, "shownReasons");
|
|
42819
42835
|
|
|
42820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/people-list.js
|
|
42821
42837
|
var PEOPLE_SORTS = ["interactions", "recent", "name", "tasks"];
|
|
42822
42838
|
var MIN_QUERY = 3;
|
|
42823
42839
|
var ftsPhrase = /* @__PURE__ */ __name((text7) => `"${text7.replaceAll('"', '""')}"`, "ftsPhrase");
|
|
@@ -43163,7 +43179,7 @@ var similarPeople = /* @__PURE__ */ __name((database, typed, limit) => {
|
|
|
43163
43179
|
return withLastContact(database, rows).map((person2, at2) => ({ ...person2, sameName: same[at2] === true }));
|
|
43164
43180
|
}, "similarPeople");
|
|
43165
43181
|
|
|
43166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-doubts.js
|
|
43167
43183
|
var DOUBT_REASONS = ["owner-other-name", "test-data", "shared-address", "mixed-names"];
|
|
43168
43184
|
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";
|
|
43169
43185
|
var text4 = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? value : null, "text");
|
|
@@ -43419,7 +43435,7 @@ var markTestData = /* @__PURE__ */ __name((context, uid, by) => {
|
|
|
43419
43435
|
return { person: `person:${person2}`, identities: identities2 };
|
|
43420
43436
|
}, "markTestData");
|
|
43421
43437
|
|
|
43422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43438
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
43423
43439
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
43424
43440
|
var IN_SCOPES = "IN (SELECT value FROM json_each(?))";
|
|
43425
43441
|
var projectScope = /* @__PURE__ */ __name((id2) => `(SELECT p.scope FROM main.projects p WHERE p.id=${id2})`, "projectScope");
|
|
@@ -43488,7 +43504,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
43488
43504
|
});
|
|
43489
43505
|
}, "personPreparation");
|
|
43490
43506
|
|
|
43491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
43492
43508
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
43493
43509
|
const id2 = Number(uid);
|
|
43494
43510
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -43496,7 +43512,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
43496
43512
|
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)));
|
|
43497
43513
|
}, "personSeenInAccounts");
|
|
43498
43514
|
|
|
43499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
43500
43516
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
43501
43517
|
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);
|
|
43502
43518
|
if (!row2)
|
|
@@ -43563,7 +43579,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
43563
43579
|
return { id: id2, personId, removed: true };
|
|
43564
43580
|
}, "removeNote");
|
|
43565
43581
|
|
|
43566
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
43567
43583
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
43568
43584
|
const { database } = context;
|
|
43569
43585
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -43690,13 +43706,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
43690
43706
|
};
|
|
43691
43707
|
}, "peopleStoreOver");
|
|
43692
43708
|
|
|
43693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
43694
43710
|
import { createHash as createHash9 } from "node:crypto";
|
|
43695
43711
|
|
|
43696
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43712
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
43697
43713
|
import { createHash as createHash8 } from "node:crypto";
|
|
43698
43714
|
|
|
43699
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
43700
43716
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
43701
43717
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
43702
43718
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -43918,7 +43934,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
43918
43934
|
};
|
|
43919
43935
|
}, "rankReplyGraph");
|
|
43920
43936
|
|
|
43921
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43937
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
43922
43938
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
43923
43939
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
43924
43940
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -44092,7 +44108,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
44092
44108
|
return { items, evidence, summary, graph: graph.quality };
|
|
44093
44109
|
}, "calculateAdminStatistics");
|
|
44094
44110
|
|
|
44095
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
44096
44112
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
44097
44113
|
const dates = [];
|
|
44098
44114
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -44114,7 +44130,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
44114
44130
|
return dates[0].node.resolution.date;
|
|
44115
44131
|
}, "rankingContextRange");
|
|
44116
44132
|
|
|
44117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44133
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
44118
44134
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
44119
44135
|
let counts;
|
|
44120
44136
|
try {
|
|
@@ -44409,7 +44425,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
44409
44425
|
});
|
|
44410
44426
|
}, "rankQuery");
|
|
44411
44427
|
|
|
44412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44428
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
44413
44429
|
function fail2(message3, reason = "query.too-large") {
|
|
44414
44430
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
44415
44431
|
}
|
|
@@ -44586,7 +44602,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
44586
44602
|
return result;
|
|
44587
44603
|
}), "adminStatisticsQuery");
|
|
44588
44604
|
|
|
44589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44605
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
44590
44606
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
44591
44607
|
if (!execution.accounts.length)
|
|
44592
44608
|
return { conversations: [], chats: [] };
|
|
@@ -44604,7 +44620,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
44604
44620
|
return { conversations: conversations2, chats: chats2 };
|
|
44605
44621
|
}, "conversationEligibility");
|
|
44606
44622
|
|
|
44607
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
44608
44624
|
import { createHash as createHash10 } from "node:crypto";
|
|
44609
44625
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
44610
44626
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -44754,7 +44770,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
44754
44770
|
return result;
|
|
44755
44771
|
}, "rankingEvidence");
|
|
44756
44772
|
|
|
44757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
44758
44774
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
44759
44775
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
44760
44776
|
if (execution.corpus === "mail")
|
|
@@ -44775,7 +44791,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
44775
44791
|
};
|
|
44776
44792
|
}, "queriesStoreOver");
|
|
44777
44793
|
|
|
44778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44794
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
44779
44795
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
44780
44796
|
const { database, now: now2 } = context;
|
|
44781
44797
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -44814,10 +44830,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
44814
44830
|
}));
|
|
44815
44831
|
}, "chatEventsOf");
|
|
44816
44832
|
|
|
44817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44833
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
44818
44834
|
import { createHash as createHash11 } from "node:crypto";
|
|
44819
44835
|
|
|
44820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
44821
44837
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
44822
44838
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
44823
44839
|
timeZone: zone,
|
|
@@ -44837,7 +44853,7 @@ var weekKey = /* @__PURE__ */ __name((day2) => {
|
|
|
44837
44853
|
return date3.toISOString().slice(0, 10);
|
|
44838
44854
|
}, "weekKey");
|
|
44839
44855
|
|
|
44840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
44841
44857
|
var RETENTION_TOLERANCE = 864e5;
|
|
44842
44858
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
44843
44859
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -44891,7 +44907,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
44891
44907
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
44892
44908
|
}, "retentionCohorts");
|
|
44893
44909
|
|
|
44894
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
44895
44911
|
var iso10 = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString(), "iso");
|
|
44896
44912
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
44897
44913
|
validateRetentionOptions(options);
|
|
@@ -45022,7 +45038,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
45022
45038
|
};
|
|
45023
45039
|
}, "retentionQuery");
|
|
45024
45040
|
|
|
45025
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45041
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
45026
45042
|
var iso11 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
45027
45043
|
var marksOf = /* @__PURE__ */ __name(({ isBot: isBot2, flagged, deleted, hasPhoto }) => ({
|
|
45028
45044
|
...isBot2 === void 0 ? {} : { bot: isBot2 },
|
|
@@ -45151,7 +45167,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
45151
45167
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
45152
45168
|
})), "trackedChats");
|
|
45153
45169
|
|
|
45154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45170
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
45155
45171
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45156
45172
|
const { database } = context;
|
|
45157
45173
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -45207,7 +45223,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45207
45223
|
};
|
|
45208
45224
|
}, "rosterStoreOver");
|
|
45209
45225
|
|
|
45210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
45211
45227
|
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");
|
|
45212
45228
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
45213
45229
|
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 ?`);
|
|
@@ -45231,7 +45247,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
45231
45247
|
}
|
|
45232
45248
|
}, "backfillNormalized");
|
|
45233
45249
|
|
|
45234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
45235
45251
|
var INDEX2 = "message_words";
|
|
45236
45252
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
45237
45253
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -45358,7 +45374,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
45358
45374
|
});
|
|
45359
45375
|
}, "resetSearchIndex");
|
|
45360
45376
|
|
|
45361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
45362
45378
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
45363
45379
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
45364
45380
|
const before2 = stemsState(database);
|
|
@@ -45453,7 +45469,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
45453
45469
|
return resetStems(database, { now: now2 });
|
|
45454
45470
|
}, "followDefaultStemmers");
|
|
45455
45471
|
|
|
45456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
45457
45473
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
45458
45474
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
45459
45475
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -45475,7 +45491,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
45475
45491
|
});
|
|
45476
45492
|
}, "termCandidates");
|
|
45477
45493
|
|
|
45478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45494
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
45479
45495
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45480
45496
|
const { database } = context;
|
|
45481
45497
|
const stemmerFor2 = stemmerCache();
|
|
@@ -45499,7 +45515,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45499
45515
|
};
|
|
45500
45516
|
}, "searchIndexStoreOver");
|
|
45501
45517
|
|
|
45502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45518
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
45503
45519
|
var HISTORY_KEPT = 1e3;
|
|
45504
45520
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
45505
45521
|
var COLUMNS6 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -45569,7 +45585,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
45569
45585
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
45570
45586
|
}, "clearHistory");
|
|
45571
45587
|
|
|
45572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45588
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
45573
45589
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45574
45590
|
const { database } = context;
|
|
45575
45591
|
return {
|
|
@@ -45593,7 +45609,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45593
45609
|
};
|
|
45594
45610
|
}, "searchesStoreOver");
|
|
45595
45611
|
|
|
45596
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
45597
45613
|
import { createHash as createHash12 } from "node:crypto";
|
|
45598
45614
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
45599
45615
|
var TEXT_COLUMNS = "kind = ?, title = ?, file_name = ?, extension = ?, url = ?, mime = ?, size = ?, content_hash = ?, body = ?, extraction = ?, metadata = ?, language = ?";
|
|
@@ -45835,7 +45851,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
45835
45851
|
};
|
|
45836
45852
|
}, "addedSourcesOver");
|
|
45837
45853
|
|
|
45838
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
45839
45855
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
45840
45856
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
45841
45857
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -45883,7 +45899,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
45883
45899
|
};
|
|
45884
45900
|
}, "agentActionsStoreOver");
|
|
45885
45901
|
|
|
45886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45902
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/base-suggest.js
|
|
45887
45903
|
var baseSettingKey = /* @__PURE__ */ __name((kind3) => `stages.base.${kind3}`, "baseSettingKey");
|
|
45888
45904
|
var storedPipeline = /* @__PURE__ */ __name((value) => {
|
|
45889
45905
|
if (typeof value !== "string")
|
|
@@ -45929,7 +45945,7 @@ var suggestBaseStages = /* @__PURE__ */ __name((database, kind3, pipelines2, { o
|
|
|
45929
45945
|
}
|
|
45930
45946
|
}, "suggestBaseStages");
|
|
45931
45947
|
|
|
45932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45948
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
45933
45949
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
45934
45950
|
var SOURCE = "crm";
|
|
45935
45951
|
var crmIdentityId = /* @__PURE__ */ __name((key2, externalId, type = "contact") => `${idPart(key2.account)}/${type}/${idPart(externalId)}`, "crmIdentityId");
|
|
@@ -46060,7 +46076,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
46060
46076
|
return { savePipeline, saveItemRow };
|
|
46061
46077
|
}, "crmRowsOver");
|
|
46062
46078
|
|
|
46063
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activities.js
|
|
46064
46080
|
var ACTIVITY_RECORD = "crm.activity";
|
|
46065
46081
|
var MOST_BODY = 2e4;
|
|
46066
46082
|
var MOST_SUBJECT = 500;
|
|
@@ -46140,7 +46156,7 @@ var crmActivitiesOver = /* @__PURE__ */ __name((context) => {
|
|
|
46140
46156
|
return { save: save2, of };
|
|
46141
46157
|
}, "crmActivitiesOver");
|
|
46142
46158
|
|
|
46143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
46144
46160
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
46145
46161
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, cutoff) => {
|
|
46146
46162
|
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);
|
|
@@ -46157,7 +46173,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, cuto
|
|
|
46157
46173
|
});
|
|
46158
46174
|
}, "stageAmountsOf");
|
|
46159
46175
|
|
|
46160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
46161
46177
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
46162
46178
|
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");
|
|
46163
46179
|
var MAX_STAGES = 30;
|
|
@@ -46636,7 +46652,7 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46636
46652
|
};
|
|
46637
46653
|
}, "dealsStoreOver");
|
|
46638
46654
|
|
|
46639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
46640
46656
|
var KEY2 = "ownerLanguages";
|
|
46641
46657
|
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(" "));
|
|
46642
46658
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -46666,7 +46682,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
46666
46682
|
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);
|
|
46667
46683
|
}, "saveOwnerLanguages");
|
|
46668
46684
|
|
|
46669
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46685
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/base-stages.js
|
|
46670
46686
|
var OUTCOMES = {
|
|
46671
46687
|
lead: ["open", "open", "open", "won", "lost"],
|
|
46672
46688
|
deal: ["open", "open", "open", "open", "won", "lost"]
|
|
@@ -46999,7 +47015,7 @@ var baseStagesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46999
47015
|
};
|
|
47000
47016
|
}, "baseStagesStoreOver");
|
|
47001
47017
|
|
|
47002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
47003
47019
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
47004
47020
|
}) => {
|
|
47005
47021
|
const { database, now: now2 } = context;
|
|
@@ -47058,7 +47074,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
47058
47074
|
};
|
|
47059
47075
|
}, "botUpdateStoreOver");
|
|
47060
47076
|
|
|
47061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
47062
47078
|
var IMPORTER = { bot: "import" };
|
|
47063
47079
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
47064
47080
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -47103,7 +47119,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
47103
47119
|
};
|
|
47104
47120
|
}), "moneyLinesOf");
|
|
47105
47121
|
|
|
47106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
47107
47123
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
47108
47124
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
47109
47125
|
var listOf2 = /* @__PURE__ */ __name((list2) => {
|
|
@@ -47187,7 +47203,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
47187
47203
|
};
|
|
47188
47204
|
}, "relationRolesOver");
|
|
47189
47205
|
|
|
47190
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47206
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
47191
47207
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
47192
47208
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
47193
47209
|
var CRM_SCOPES = ["mine", "all"];
|
|
@@ -47382,7 +47398,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
47382
47398
|
return [{ setting: String(row2.key), value: settingValue(database, parsed4.key, parsed4.name) }];
|
|
47383
47399
|
}), "crmSettingsOf");
|
|
47384
47400
|
|
|
47385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
47386
47402
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
47387
47403
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
47388
47404
|
id: link3.id,
|
|
@@ -47742,7 +47758,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
47742
47758
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
47743
47759
|
}, "decidedOrigin");
|
|
47744
47760
|
|
|
47745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
47746
47762
|
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");
|
|
47747
47763
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
47748
47764
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" }, onOutcome } = {}) => {
|
|
@@ -47880,7 +47896,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
47880
47896
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
47881
47897
|
}), "relationsStoreOver");
|
|
47882
47898
|
|
|
47883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relationships.js
|
|
47884
47900
|
var importSource = /* @__PURE__ */ __name((provider) => `import:${provider}`, "importSource");
|
|
47885
47901
|
var noRelationships = /* @__PURE__ */ __name(() => ({
|
|
47886
47902
|
added: 0,
|
|
@@ -48070,7 +48086,7 @@ var recordRelationshipsOver = /* @__PURE__ */ __name((context) => {
|
|
|
48070
48086
|
return { report, placeOf: placeOf2, withdrawFrom };
|
|
48071
48087
|
}, "recordRelationshipsOver");
|
|
48072
48088
|
|
|
48073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
48074
48090
|
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";
|
|
48075
48091
|
var DAY_MS2 = 864e5;
|
|
48076
48092
|
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");
|
|
@@ -48229,7 +48245,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48229
48245
|
};
|
|
48230
48246
|
}, "contractsStoreOver");
|
|
48231
48247
|
|
|
48232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48248
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
48233
48249
|
var BUSINESS_FIND_MAX = 2001;
|
|
48234
48250
|
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");
|
|
48235
48251
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
@@ -48334,7 +48350,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
48334
48350
|
};
|
|
48335
48351
|
}, "businessSearchOver");
|
|
48336
48352
|
|
|
48337
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
48338
48354
|
var DAY4 = 864e5;
|
|
48339
48355
|
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}')`;
|
|
48340
48356
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -48450,7 +48466,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
48450
48466
|
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);
|
|
48451
48467
|
}, "listEvents");
|
|
48452
48468
|
|
|
48453
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48469
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
48454
48470
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
48455
48471
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
48456
48472
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -48507,7 +48523,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
48507
48523
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
48508
48524
|
}, "forgetCalendarRows");
|
|
48509
48525
|
|
|
48510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
48511
48527
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
48512
48528
|
id: Number(row2.id),
|
|
48513
48529
|
accountId: Number(row2.account_id),
|
|
@@ -49110,7 +49126,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49110
49126
|
};
|
|
49111
49127
|
}, "eventStoreOver");
|
|
49112
49128
|
|
|
49113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
49114
49130
|
var CATALOG_QUERY = defineQuery({
|
|
49115
49131
|
entity: "document",
|
|
49116
49132
|
backend: "sql",
|
|
@@ -49352,7 +49368,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
49352
49368
|
};
|
|
49353
49369
|
}, "catalogStoreOver");
|
|
49354
49370
|
|
|
49355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49371
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
49356
49372
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
49357
49373
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
49358
49374
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -49365,7 +49381,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
49365
49381
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
49366
49382
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
49367
49383
|
|
|
49368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49384
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
49369
49385
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
49370
49386
|
const { source: source2, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
49371
49387
|
signal?.throwIfAborted();
|
|
@@ -49464,7 +49480,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
49464
49480
|
});
|
|
49465
49481
|
}, "readMeetingContextEvidence");
|
|
49466
49482
|
|
|
49467
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
49468
49484
|
var corpora = {
|
|
49469
49485
|
message: {
|
|
49470
49486
|
table: "messages",
|
|
@@ -49703,7 +49719,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
49703
49719
|
}
|
|
49704
49720
|
}), "contextRecordsOver");
|
|
49705
49721
|
|
|
49706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49722
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-contacts.js
|
|
49707
49723
|
var PLACEHOLDER = /(?:^|\s)null(?:\s+#\d+)?(?=\s|$)/gi;
|
|
49708
49724
|
var withoutPlaceholder = /* @__PURE__ */ __name((name) => name.replace(PLACEHOLDER, " ").replace(/\s+/g, " ").trim() || null, "withoutPlaceholder");
|
|
49709
49725
|
var DryRun = class extends Error {
|
|
@@ -49780,7 +49796,7 @@ var removeCrmContacts = /* @__PURE__ */ __name((context, key2, { users, before:
|
|
|
49780
49796
|
}
|
|
49781
49797
|
}, "removeCrmContacts");
|
|
49782
49798
|
|
|
49783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49799
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-stage-entries.js
|
|
49784
49800
|
var STAGE_ENTRY_RECORD = "crm.stage-entry";
|
|
49785
49801
|
var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
49786
49802
|
const { database, now: now2 } = context;
|
|
@@ -49827,7 +49843,7 @@ var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
49827
49843
|
return { save: save2, pending, handled };
|
|
49828
49844
|
}, "crmStageEntriesOver");
|
|
49829
49845
|
|
|
49830
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
49831
49847
|
var PENDING = "crm:pending-relations";
|
|
49832
49848
|
var PENDING_DAYS = 30;
|
|
49833
49849
|
var PENDING_MOST = 5e3;
|
|
@@ -50336,10 +50352,10 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
50336
50352
|
};
|
|
50337
50353
|
}, "crmCopiesOver");
|
|
50338
50354
|
|
|
50339
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
50340
50356
|
import { createHash as createHash13, randomBytes as randomBytes2 } from "node:crypto";
|
|
50341
50357
|
|
|
50342
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
50343
50359
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
50344
50360
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
50345
50361
|
var CALLBACK_PREFIX = "wcr1:";
|
|
@@ -50353,7 +50369,7 @@ var callbackDataOf = /* @__PURE__ */ __name((token) => {
|
|
|
50353
50369
|
}, "callbackDataOf");
|
|
50354
50370
|
var parseCallbackData = /* @__PURE__ */ __name((data) => typeof data === "string" ? CALLBACK.exec(data)?.[1] : void 0, "parseCallbackData");
|
|
50355
50371
|
|
|
50356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
50357
50373
|
var digestOf = /* @__PURE__ */ __name((token) => createHash13("sha256").update(token).digest("hex"), "digestOf");
|
|
50358
50374
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
50359
50375
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -50452,7 +50468,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
50452
50468
|
};
|
|
50453
50469
|
}, "decisionRequestStoreOver");
|
|
50454
50470
|
|
|
50455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-listing.js
|
|
50456
50472
|
var MEETING_ROW_KINDS = ["meeting", "call", "event"];
|
|
50457
50473
|
var DAY5 = 864e5;
|
|
50458
50474
|
var JOINED = `(SELECT ce.event_id FROM calendar_entries ce JOIN events je ON je.id = ce.event_id
|
|
@@ -50813,7 +50829,7 @@ var meetingListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
50813
50829
|
};
|
|
50814
50830
|
}, "meetingListingOver");
|
|
50815
50831
|
|
|
50816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50832
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/document-listing.js
|
|
50817
50833
|
var DOCUMENT_KINDS = [
|
|
50818
50834
|
"transcript",
|
|
50819
50835
|
"doc",
|
|
@@ -51050,7 +51066,7 @@ var documentListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
51050
51066
|
};
|
|
51051
51067
|
}, "documentListingOver");
|
|
51052
51068
|
|
|
51053
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
51054
51070
|
var NOTE_FIELDS = [
|
|
51055
51071
|
"text",
|
|
51056
51072
|
"exact",
|
|
@@ -51491,7 +51507,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
51491
51507
|
};
|
|
51492
51508
|
}, "noteSearchOver");
|
|
51493
51509
|
|
|
51494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
51495
51511
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
51496
51512
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
51497
51513
|
var EVENT_CORPUS = {
|
|
@@ -51623,7 +51639,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
51623
51639
|
};
|
|
51624
51640
|
}, "eventSearchOver");
|
|
51625
51641
|
|
|
51626
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51642
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
51627
51643
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
51628
51644
|
try {
|
|
51629
51645
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -51635,7 +51651,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
51635
51651
|
}
|
|
51636
51652
|
}, "calendarMoment");
|
|
51637
51653
|
|
|
51638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51654
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
51639
51655
|
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";
|
|
51640
51656
|
var iso13 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
51641
51657
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -51858,7 +51874,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51858
51874
|
};
|
|
51859
51875
|
}, "factsStoreOver");
|
|
51860
51876
|
|
|
51861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
51862
51878
|
var invalid4 = /* @__PURE__ */ __name((message3) => {
|
|
51863
51879
|
throw new CliError("validation_error", message3);
|
|
51864
51880
|
}, "invalid");
|
|
@@ -52026,7 +52042,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
52026
52042
|
return { snapshot: snapshot2, snapshotParts, previous, settle, keepWaiting, named: named3, sameDecision, create };
|
|
52027
52043
|
}, "findingsCoreOver");
|
|
52028
52044
|
|
|
52029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
52030
52046
|
var stale = /* @__PURE__ */ __name(() => {
|
|
52031
52047
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
52032
52048
|
reason: "evidence-findings.stale"
|
|
@@ -52290,7 +52306,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52290
52306
|
};
|
|
52291
52307
|
}, "evidenceFindingsStoreOver");
|
|
52292
52308
|
|
|
52293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
52294
52310
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
52295
52311
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
52296
52312
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -52344,7 +52360,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
52344
52360
|
}, "forPerson")
|
|
52345
52361
|
}), "involvementStoreOver");
|
|
52346
52362
|
|
|
52347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
52348
52364
|
var LABELLED = {
|
|
52349
52365
|
note: "note",
|
|
52350
52366
|
document: "document",
|
|
@@ -52356,7 +52372,7 @@ var LABELLED = {
|
|
|
52356
52372
|
account: "folder"
|
|
52357
52373
|
};
|
|
52358
52374
|
|
|
52359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
52360
52376
|
import { createHash as createHash14 } from "node:crypto";
|
|
52361
52377
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
52362
52378
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -52442,7 +52458,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
52442
52458
|
};
|
|
52443
52459
|
}, "meetingProjectsStoreOver");
|
|
52444
52460
|
|
|
52445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
52446
52462
|
var ORGANIZATIONS_QUERY = {
|
|
52447
52463
|
entity: "organization",
|
|
52448
52464
|
backend: "sql",
|
|
@@ -52483,7 +52499,7 @@ var REMINDERS_QUERY = {
|
|
|
52483
52499
|
})
|
|
52484
52500
|
};
|
|
52485
52501
|
|
|
52486
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-categories.js
|
|
52487
52503
|
var OWN2 = "(SELECT id FROM organizations WHERE deleted_at IS NULL AND json_extract(metadata, '$.own') = 1)";
|
|
52488
52504
|
var EMPLOYED = "('employee', 'contractor', 'founder')";
|
|
52489
52505
|
var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now2) => {
|
|
@@ -52504,7 +52520,7 @@ var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now
|
|
|
52504
52520
|
return { sql: `EXISTS (SELECT 1 FROM links l WHERE ${where} AND ${usable})`, params: keys };
|
|
52505
52521
|
}, "categorySql");
|
|
52506
52522
|
|
|
52507
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
52508
52524
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
52509
52525
|
id: String(row2.id),
|
|
52510
52526
|
ref: `organization:${row2.id}`,
|
|
@@ -52549,7 +52565,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
52549
52565
|
}), "setOwnOrganization")
|
|
52550
52566
|
}), "organizationsStoreOver");
|
|
52551
52567
|
|
|
52552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52568
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
52553
52569
|
var KINDS = RELATION_KINDS.map(linkKind).join(", ");
|
|
52554
52570
|
var ACCOUNT_ENDS = [
|
|
52555
52571
|
["deal", "deals"],
|
|
@@ -52700,13 +52716,13 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
52700
52716
|
__name(proposalItem, "proposalItem");
|
|
52701
52717
|
}, "relationListOver");
|
|
52702
52718
|
|
|
52703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52719
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
52704
52720
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
52705
52721
|
...relationListOver(context),
|
|
52706
52722
|
...relationRolesOver(context)
|
|
52707
52723
|
}), "relationReadsOver");
|
|
52708
52724
|
|
|
52709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
52710
52726
|
var TABLES5 = { memory: "memories", fact: "facts" };
|
|
52711
52727
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
52712
52728
|
var DEFAULT_LIMIT = 500;
|
|
@@ -52949,16 +52965,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52949
52965
|
};
|
|
52950
52966
|
}, "sourceReviewStoreOver");
|
|
52951
52967
|
|
|
52952
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
52953
52969
|
import { createHash as createHash17 } from "node:crypto";
|
|
52954
52970
|
|
|
52955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52971
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
52956
52972
|
import { createHash as createHash16 } from "node:crypto";
|
|
52957
52973
|
|
|
52958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
52959
52975
|
import { createHash as createHash15 } from "node:crypto";
|
|
52960
52976
|
|
|
52961
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
52962
52978
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
52963
52979
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
52964
52980
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -53009,7 +53025,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
53009
53025
|
return input;
|
|
53010
53026
|
}, "consolidationApplyInput");
|
|
53011
53027
|
|
|
53012
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53028
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
53013
53029
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
53014
53030
|
id: String(row2.id),
|
|
53015
53031
|
sourceId: String(row2.source_id),
|
|
@@ -53084,7 +53100,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
53084
53100
|
}, { beforeCommit: check3 });
|
|
53085
53101
|
}, "applyTagConsolidation");
|
|
53086
53102
|
|
|
53087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
53088
53104
|
var selections = [
|
|
53089
53105
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
53090
53106
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -53228,7 +53244,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
53228
53244
|
};
|
|
53229
53245
|
}, "previewRows");
|
|
53230
53246
|
|
|
53231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53247
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
53232
53248
|
var kinds = ["project", "tag", "topic"];
|
|
53233
53249
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
53234
53250
|
if (signal?.aborted)
|
|
@@ -53492,7 +53508,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
53492
53508
|
};
|
|
53493
53509
|
}, "vocabularyStoreOver");
|
|
53494
53510
|
|
|
53495
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
53496
53512
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
53497
53513
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
53498
53514
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -54043,7 +54059,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
54043
54059
|
return key2.padEnd(3, "X");
|
|
54044
54060
|
}, "projectKey");
|
|
54045
54061
|
|
|
54046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54062
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
54047
54063
|
var DAY6 = 864e5;
|
|
54048
54064
|
var SETTING5 = "logs_pruned_at";
|
|
54049
54065
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY6, botUpdatePayloadsMs: 30 * DAY6 };
|
|
@@ -54070,7 +54086,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
54070
54086
|
};
|
|
54071
54087
|
}, "logPruner");
|
|
54072
54088
|
|
|
54073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
54074
54090
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
54075
54091
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
54076
54092
|
var invalid6 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -54429,7 +54445,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
54429
54445
|
}, "checkMailFindings");
|
|
54430
54446
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
54431
54447
|
|
|
54432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
54433
54449
|
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";
|
|
54434
54450
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
54435
54451
|
const { database, now: now2 } = context;
|
|
@@ -54644,7 +54660,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54644
54660
|
};
|
|
54645
54661
|
}, "ordersStoreOver");
|
|
54646
54662
|
|
|
54647
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
54648
54664
|
var MAIL_EDITS = {
|
|
54649
54665
|
task: ["title", "type", "reason", "commitment", "project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence"],
|
|
54650
54666
|
fact: ["statement", "type", "reason", "subject", "project"],
|
|
@@ -55133,7 +55149,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
55133
55149
|
};
|
|
55134
55150
|
}, "mailFindingsStoreOver");
|
|
55135
55151
|
|
|
55136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55152
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
55137
55153
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
55138
55154
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
55139
55155
|
reason: "meeting-findings.stale"
|
|
@@ -55346,7 +55362,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55346
55362
|
};
|
|
55347
55363
|
}, "meetingFindingsStoreOver");
|
|
55348
55364
|
|
|
55349
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
55350
55366
|
var RANK_BATCH = 512;
|
|
55351
55367
|
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";
|
|
55352
55368
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -55617,7 +55633,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
55617
55633
|
}
|
|
55618
55634
|
}), "meetingVectorsOver");
|
|
55619
55635
|
|
|
55620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
55621
55637
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
55622
55638
|
var TEXTS = {
|
|
55623
55639
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -55718,7 +55734,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55718
55734
|
};
|
|
55719
55735
|
}, "sourceMentionStoreOver");
|
|
55720
55736
|
|
|
55721
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
55722
55738
|
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";
|
|
55723
55739
|
var MAX_SPLITS = 100;
|
|
55724
55740
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -55952,11 +55968,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55952
55968
|
};
|
|
55953
55969
|
}, "transactionsStoreOver");
|
|
55954
55970
|
|
|
55955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55971
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
55956
55972
|
import { accessSync, constants, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
55957
55973
|
import { dirname as dirname2 } from "node:path";
|
|
55958
55974
|
|
|
55959
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
55960
55976
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
55961
55977
|
var CLIENTS_SETTING = "clients";
|
|
55962
55978
|
var coreVersion = (() => {
|
|
@@ -56017,7 +56033,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
56017
56033
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
56018
56034
|
}, "refusalAdvice");
|
|
56019
56035
|
|
|
56020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
56021
56037
|
var GENERATED = [
|
|
56022
56038
|
{
|
|
56023
56039
|
"name": "20261010184427_initial",
|
|
@@ -57371,7 +57387,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
57371
57387
|
}
|
|
57372
57388
|
];
|
|
57373
57389
|
|
|
57374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57390
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
57375
57391
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
57376
57392
|
import { basename, dirname, join as join3, parse } from "node:path";
|
|
57377
57393
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -57604,7 +57620,7 @@ var rollBack2 = /* @__PURE__ */ __name((database, path) => {
|
|
|
57604
57620
|
return { ...result, foreignKeyViolations };
|
|
57605
57621
|
}, "rollBack");
|
|
57606
57622
|
|
|
57607
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
57608
57624
|
var V31_TABLES = [
|
|
57609
57625
|
"accounts",
|
|
57610
57626
|
"account_identities",
|
|
@@ -57769,7 +57785,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
57769
57785
|
return migrations;
|
|
57770
57786
|
}, "generatedMigrations");
|
|
57771
57787
|
|
|
57772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
57773
57789
|
var MIGRATIONS = generatedMigrations();
|
|
57774
57790
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
57775
57791
|
version INTEGER PRIMARY KEY,
|
|
@@ -57866,7 +57882,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
57866
57882
|
}
|
|
57867
57883
|
}, "migrate");
|
|
57868
57884
|
|
|
57869
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57885
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
57870
57886
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
57871
57887
|
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 ?");
|
|
57872
57888
|
if (pending.get(0, 1) === void 0)
|
|
@@ -57888,7 +57904,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
57888
57904
|
}
|
|
57889
57905
|
}, "fillJoinKeys");
|
|
57890
57906
|
|
|
57891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
57892
57908
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
57893
57909
|
refuseOwnerStoreInTests(path);
|
|
57894
57910
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -57902,8 +57918,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
57902
57918
|
}, "openSqlite");
|
|
57903
57919
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
57904
57920
|
quietSqliteWarning();
|
|
57905
|
-
const { drizzle } = await import("./node-
|
|
57906
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
57921
|
+
const { drizzle } = await import("./node-IEVT2FSJ.js");
|
|
57922
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-EOTTDMOG.js");
|
|
57907
57923
|
const client = await nodeClient(path, { readOnly });
|
|
57908
57924
|
try {
|
|
57909
57925
|
if (!readOnly)
|
|
@@ -57917,8 +57933,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
57917
57933
|
}
|
|
57918
57934
|
}, "openUnderNode");
|
|
57919
57935
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
57920
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
57921
|
-
const { drizzle } = await import("./bun-
|
|
57936
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-AXD5CCO3.js");
|
|
57937
|
+
const { drizzle } = await import("./bun-V5QLYBZU.js");
|
|
57922
57938
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
57923
57939
|
try {
|
|
57924
57940
|
if (!readOnly)
|
|
@@ -57932,7 +57948,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
57932
57948
|
}
|
|
57933
57949
|
}, "openUnderBun");
|
|
57934
57950
|
|
|
57935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57951
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
57936
57952
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
57937
57953
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
57938
57954
|
try {
|
|
@@ -58000,7 +58016,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
58000
58016
|
});
|
|
58001
58017
|
}, "movePaymentFacts");
|
|
58002
58018
|
|
|
58003
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
58004
58020
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
58005
58021
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
58006
58022
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -58018,7 +58034,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
58018
58034
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
58019
58035
|
}, "assertReadCompatible");
|
|
58020
58036
|
|
|
58021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58037
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
58022
58038
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
58023
58039
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
58024
58040
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -58064,7 +58080,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
58064
58080
|
});
|
|
58065
58081
|
}, "moveSuggestedLinks");
|
|
58066
58082
|
|
|
58067
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58083
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
58068
58084
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
58069
58085
|
var TEST_PROVIDER = "chat";
|
|
58070
58086
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -58085,7 +58101,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
58085
58101
|
}
|
|
58086
58102
|
}, "purgeTestAccounts");
|
|
58087
58103
|
|
|
58088
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
58089
58105
|
var BACKFILL_ON_OPEN = 5e3;
|
|
58090
58106
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
58091
58107
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -58197,7 +58213,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
58197
58213
|
}
|
|
58198
58214
|
}, "openStoreContext");
|
|
58199
58215
|
|
|
58200
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
58201
58217
|
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";
|
|
58202
58218
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
58203
58219
|
const { database, now: now2 } = context;
|
|
@@ -58305,13 +58321,13 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
58305
58321
|
};
|
|
58306
58322
|
}, "productsStoreOver");
|
|
58307
58323
|
|
|
58308
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
58309
58325
|
import { createHash as createHash19 } from "node:crypto";
|
|
58310
58326
|
|
|
58311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
58312
58328
|
import { createHash as createHash18 } from "node:crypto";
|
|
58313
58329
|
|
|
58314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
58315
58331
|
var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
58316
58332
|
var ref = text5(2048);
|
|
58317
58333
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -58381,7 +58397,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
58381
58397
|
}))
|
|
58382
58398
|
});
|
|
58383
58399
|
|
|
58384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58400
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
58385
58401
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
58386
58402
|
var invalid9 = /* @__PURE__ */ __name((field4) => {
|
|
58387
58403
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -58514,7 +58530,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
58514
58530
|
return createHash18("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
58515
58531
|
}, "projectAnnotationsFingerprint");
|
|
58516
58532
|
|
|
58517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
58518
58534
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
58519
58535
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
58520
58536
|
var targetSchema = strictObject({
|
|
@@ -58621,7 +58637,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
58621
58637
|
}, "planBoundProjectAnnotations");
|
|
58622
58638
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
58623
58639
|
|
|
58624
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58640
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
58625
58641
|
import { createHash as createHash20 } from "node:crypto";
|
|
58626
58642
|
var text6 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
58627
58643
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -58715,7 +58731,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
58715
58731
|
})).digest("hex");
|
|
58716
58732
|
}, "projectAnnotationSnapshotFingerprint");
|
|
58717
58733
|
|
|
58718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58734
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
58719
58735
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
58720
58736
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
58721
58737
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -58732,7 +58748,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
58732
58748
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
58733
58749
|
}, "projectAnnotationRequest");
|
|
58734
58750
|
|
|
58735
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
58736
58752
|
var SnapshotBudget = class {
|
|
58737
58753
|
static {
|
|
58738
58754
|
__name(this, "SnapshotBudget");
|
|
@@ -58758,13 +58774,13 @@ var SnapshotBudget = class {
|
|
|
58758
58774
|
}
|
|
58759
58775
|
};
|
|
58760
58776
|
|
|
58761
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
58762
58778
|
import { createHash as createHash22 } from "node:crypto";
|
|
58763
58779
|
|
|
58764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
58765
58781
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
58766
58782
|
|
|
58767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
58768
58784
|
import { createHash as createHash21 } from "node:crypto";
|
|
58769
58785
|
var invalid11 = /* @__PURE__ */ __name(() => {
|
|
58770
58786
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -58907,7 +58923,7 @@ var ProjectSnapshotSources = class {
|
|
|
58907
58923
|
}
|
|
58908
58924
|
};
|
|
58909
58925
|
|
|
58910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
58911
58927
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
58912
58928
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
58913
58929
|
}, "unsupported");
|
|
@@ -59085,7 +59101,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
59085
59101
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
59086
59102
|
}), "projectAnnotationSnapshot");
|
|
59087
59103
|
|
|
59088
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
59089
59105
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
59090
59106
|
const current2 = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
59091
59107
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -59147,7 +59163,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
59147
59163
|
};
|
|
59148
59164
|
}), "previewAnnotationSnapshot");
|
|
59149
59165
|
|
|
59150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
59151
59167
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
59152
59168
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
59153
59169
|
if (link3.kind === "evidence" && to)
|
|
@@ -59214,7 +59230,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
59214
59230
|
return mappings;
|
|
59215
59231
|
}, "restoreAnnotationRecords");
|
|
59216
59232
|
|
|
59217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
59218
59234
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
59219
59235
|
async preview(request) {
|
|
59220
59236
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -59244,7 +59260,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
59244
59260
|
}
|
|
59245
59261
|
}), "projectAnnotationStoreOver");
|
|
59246
59262
|
|
|
59247
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
59248
59264
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
59249
59265
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
59250
59266
|
const sql2 = /* @__PURE__ */ __name((text7) => database.prepare(text7), "sql");
|
|
@@ -59315,7 +59331,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
59315
59331
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
59316
59332
|
}, "recordRelationsOver");
|
|
59317
59333
|
|
|
59318
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
59319
59335
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
59320
59336
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
59321
59337
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -59369,7 +59385,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
59369
59385
|
return { pointedAt, remap };
|
|
59370
59386
|
}, "recordRemapOver");
|
|
59371
59387
|
|
|
59372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
59373
59389
|
var runs = 0;
|
|
59374
59390
|
var PAGE = 500;
|
|
59375
59391
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -59582,7 +59598,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
59582
59598
|
return pointerOf("records", index2, "fields", key2);
|
|
59583
59599
|
}, "waitingPointer");
|
|
59584
59600
|
|
|
59585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59601
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
59586
59602
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
59587
59603
|
var SCHEME = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
59588
59604
|
var ORG_EMAIL = "org-email";
|
|
@@ -59748,7 +59764,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
59748
59764
|
]);
|
|
59749
59765
|
}, "renameMade");
|
|
59750
59766
|
|
|
59751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
59752
59768
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
59753
59769
|
name: given(fields4, "name"),
|
|
59754
59770
|
unit: given(fields4, "unit"),
|
|
@@ -59871,7 +59887,7 @@ var DIRECT_PROJECTORS = {
|
|
|
59871
59887
|
lead: dealProjector("lead")
|
|
59872
59888
|
};
|
|
59873
59889
|
|
|
59874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-document.js
|
|
59875
59891
|
var TEXT_ONLY = { storage: "text", localPath: null };
|
|
59876
59892
|
var textOf7 = /* @__PURE__ */ __name(({ fields: fields4, externalId }) => {
|
|
59877
59893
|
const text7 = String(fields4.text ?? "");
|
|
@@ -59940,7 +59956,7 @@ var DOCUMENT_PROJECTORS = {
|
|
|
59940
59956
|
}
|
|
59941
59957
|
};
|
|
59942
59958
|
|
|
59943
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59959
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
59944
59960
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
59945
59961
|
const importer = authorActor(context, IMPORTER).actor;
|
|
59946
59962
|
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;
|
|
@@ -60150,7 +60166,7 @@ var MONEY_PROJECTORS = {
|
|
|
60150
60166
|
}
|
|
60151
60167
|
};
|
|
60152
60168
|
|
|
60153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
60154
60170
|
var CALLS_CALENDAR = "calls";
|
|
60155
60171
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
60156
60172
|
if (!isImportedProvider(source2.provider))
|
|
@@ -60325,7 +60341,7 @@ var PHONE_PROJECTORS = {
|
|
|
60325
60341
|
}
|
|
60326
60342
|
};
|
|
60327
60343
|
|
|
60328
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
60329
60345
|
var RECORD_PROJECTORS = {
|
|
60330
60346
|
...MONEY_PROJECTORS,
|
|
60331
60347
|
...DIRECT_PROJECTORS,
|
|
@@ -60336,7 +60352,7 @@ var RECORD_PROJECTORS = {
|
|
|
60336
60352
|
project: null
|
|
60337
60353
|
};
|
|
60338
60354
|
|
|
60339
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
60340
60356
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
60341
60357
|
const sql2 = /* @__PURE__ */ __name((text7) => database.prepare(text7), "sql");
|
|
60342
60358
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -60398,7 +60414,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
60398
60414
|
return { settle, checkShares };
|
|
60399
60415
|
}, "recordSettlingOver");
|
|
60400
60416
|
|
|
60401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
60402
60418
|
import { createHash as createHash23 } from "node:crypto";
|
|
60403
60419
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
60404
60420
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -60414,7 +60430,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
60414
60430
|
return { stamp, untouched };
|
|
60415
60431
|
}, "importStampsOver");
|
|
60416
60432
|
|
|
60417
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
60418
60434
|
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";
|
|
60419
60435
|
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";
|
|
60420
60436
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -60651,7 +60667,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60651
60667
|
};
|
|
60652
60668
|
}, "subscriptionsStoreOver");
|
|
60653
60669
|
|
|
60654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60670
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
60655
60671
|
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";
|
|
60656
60672
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
60657
60673
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -60776,7 +60792,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60776
60792
|
};
|
|
60777
60793
|
}, "walletsStoreOver");
|
|
60778
60794
|
|
|
60779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60795
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
60780
60796
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
60781
60797
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
60782
60798
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -61035,7 +61051,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
61035
61051
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
61036
61052
|
}, "recordWritesOver");
|
|
61037
61053
|
|
|
61038
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61054
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
61039
61055
|
var LIMIT = 1e3;
|
|
61040
61056
|
var iso16 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
61041
61057
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -61259,7 +61275,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
61259
61275
|
};
|
|
61260
61276
|
}, "recordStoreOver");
|
|
61261
61277
|
|
|
61262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/templates.js
|
|
61263
61279
|
var templateOf = /* @__PURE__ */ __name((row2) => ({
|
|
61264
61280
|
key: row2.key,
|
|
61265
61281
|
channel: row2.channel,
|
|
@@ -61314,7 +61330,7 @@ var storedTemplateBodies = /* @__PURE__ */ __name((database, key2, language) =>
|
|
|
61314
61330
|
return Object.fromEntries(rows.map((row2) => [row2.channel, row2.body]));
|
|
61315
61331
|
}, "storedTemplateBodies");
|
|
61316
61332
|
|
|
61317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
61318
61334
|
var refusalOf2 = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
61319
61335
|
var wrapped2 = /* @__PURE__ */ new WeakMap();
|
|
61320
61336
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -61349,7 +61365,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
61349
61365
|
return proxy;
|
|
61350
61366
|
}, "storeErrors");
|
|
61351
61367
|
|
|
61352
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
61353
61369
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
61354
61370
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
61355
61371
|
let merged2 = { from: from2, to };
|
|
@@ -61362,7 +61378,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
61362
61378
|
}, "markRange");
|
|
61363
61379
|
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");
|
|
61364
61380
|
|
|
61365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
61366
61382
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
61367
61383
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
61368
61384
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -61383,7 +61399,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
61383
61399
|
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);
|
|
61384
61400
|
}, "setTaskAnalysisMark");
|
|
61385
61401
|
|
|
61386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
61387
61403
|
var keyOf6 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
61388
61404
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
61389
61405
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf6(account));
|
|
@@ -61393,7 +61409,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
61393
61409
|
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);
|
|
61394
61410
|
}, "setTaskRulesStop");
|
|
61395
61411
|
|
|
61396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
61397
61413
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
61398
61414
|
const { database } = context;
|
|
61399
61415
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -61452,7 +61468,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
61452
61468
|
};
|
|
61453
61469
|
}, "syncStoreOver");
|
|
61454
61470
|
|
|
61455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
61456
61472
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
61457
61473
|
const { database } = context;
|
|
61458
61474
|
return {
|
|
@@ -61474,7 +61490,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
61474
61490
|
};
|
|
61475
61491
|
}, "tagsStoreOver");
|
|
61476
61492
|
|
|
61477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
61478
61494
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
61479
61495
|
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
|
|
61480
61496
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -61601,7 +61617,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
61601
61617
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
61602
61618
|
}, "savePictureChunks");
|
|
61603
61619
|
|
|
61604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
61605
61621
|
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,
|
|
61606
61622
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
61607
61623
|
FROM messages m
|
|
@@ -61690,7 +61706,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
61690
61706
|
return plain2(best(found2));
|
|
61691
61707
|
}, "nearestMessages");
|
|
61692
61708
|
|
|
61693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
61694
61710
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
61695
61711
|
const { database } = context;
|
|
61696
61712
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -61949,7 +61965,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
61949
61965
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
61950
61966
|
}), "vectorsStoreOver");
|
|
61951
61967
|
|
|
61952
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
61953
61969
|
import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
61954
61970
|
import { dirname as dirname3, join as join4 } from "node:path";
|
|
61955
61971
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -62037,10 +62053,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
62037
62053
|
}
|
|
62038
62054
|
}, "lastBackup");
|
|
62039
62055
|
|
|
62040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
62041
62057
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
62042
62058
|
|
|
62043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
62044
62060
|
var COUNTED_TABLES = [
|
|
62045
62061
|
"accounts",
|
|
62046
62062
|
"chats",
|
|
@@ -62125,7 +62141,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
62125
62141
|
};
|
|
62126
62142
|
}, "storeContents");
|
|
62127
62143
|
|
|
62128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62144
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
62129
62145
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
62130
62146
|
const context = await openStoreContext(options);
|
|
62131
62147
|
try {
|