@wirecat/mail-cli 0.26.0 → 0.28.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 +21 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-6NXVQLUQ.js → all-profiles-Q4E2LPB4.js} +7 -7
- package/dist/bundle/{anthropic-OLNFE2CL.js → anthropic-S3N4JDJU.js} +2 -2
- package/dist/bundle/{app-server-J76N6XIK.js → app-server-XS7ABUNU.js} +48 -44
- package/dist/bundle/{bun-6PYDHXNR.js → bun-RDYA5FCZ.js} +2 -2
- package/dist/bundle/{bun-sqlite-QD5PFHPS.js → bun-sqlite-FPVHKI24.js} +3 -3
- package/dist/bundle/{chunk-5WROIMUV.js → chunk-2MTIGJHQ.js} +4 -4
- package/dist/bundle/{chunk-OGE7YG4J.js → chunk-3AH7UEM6.js} +1 -1
- package/dist/bundle/{chunk-2E2EV4HD.js → chunk-3RBUACSJ.js} +80 -57
- package/dist/bundle/{chunk-AJ5K74X6.js → chunk-44IAJV2T.js} +16 -16
- package/dist/bundle/{chunk-M7RHPCXM.js → chunk-45ET53MO.js} +2 -2
- package/dist/bundle/{chunk-YXGHC3NP.js → chunk-4CRO7EHW.js} +10 -10
- package/dist/bundle/{chunk-3J2UJFBJ.js → chunk-54ZEOOL7.js} +15 -15
- package/dist/bundle/{chunk-3RY4HC4V.js → chunk-5PDWUD3W.js} +1 -1
- package/dist/bundle/{chunk-RXKIP2ML.js → chunk-5ZJ6IHVE.js} +1 -1
- package/dist/bundle/{chunk-VA4V73SL.js → chunk-6B2BBL35.js} +5 -5
- package/dist/bundle/{chunk-QI6EXKSH.js → chunk-7E4KECG4.js} +1 -1
- package/dist/bundle/{chunk-V4PFD25P.js → chunk-7ESXP4TG.js} +1 -1
- package/dist/bundle/{chunk-CZI45AQM.js → chunk-ATJANIQR.js} +2 -2
- package/dist/bundle/{chunk-76EKZSDK.js → chunk-BDWOTD7E.js} +23 -23
- package/dist/bundle/{chunk-A3EBRXOQ.js → chunk-D4QALV67.js} +1 -1
- package/dist/bundle/{chunk-JVJG54QK.js → chunk-D6VV655V.js} +1 -1
- package/dist/bundle/{chunk-52M5BAEG.js → chunk-DMW6J2P3.js} +1 -1
- package/dist/bundle/{chunk-T7SHPALQ.js → chunk-DZYGVA6V.js} +24 -22
- package/dist/bundle/{chunk-YM345236.js → chunk-EVO4FGYJ.js} +19 -19
- package/dist/bundle/{chunk-HI5XUETY.js → chunk-FHQ32JKS.js} +1 -1
- package/dist/bundle/{chunk-MIWSCTLG.js → chunk-FM4B357N.js} +2 -2
- package/dist/bundle/{chunk-XZ7CQ6NA.js → chunk-FOZXPSHA.js} +3 -3
- package/dist/bundle/{chunk-CFBIPM7T.js → chunk-HFROBAHY.js} +267 -251
- package/dist/bundle/{chunk-DKIVYAXW.js → chunk-HKC6ZJA5.js} +12 -12
- package/dist/bundle/{chunk-XELZCDWE.js → chunk-HYMSFNTS.js} +158 -148
- package/dist/bundle/{chunk-NBJU6MBU.js → chunk-IKTBM64M.js} +7 -7
- package/dist/bundle/{chunk-H2IJQH5X.js → chunk-IUIL6OQY.js} +4 -4
- package/dist/bundle/{chunk-M2LATBP2.js → chunk-IZEK7JI7.js} +2 -2
- package/dist/bundle/{chunk-UNJUCK5R.js → chunk-KBTVVHFP.js} +12 -12
- package/dist/bundle/{chunk-QJGG6QYV.js → chunk-KNTAOY5J.js} +7 -7
- package/dist/bundle/{chunk-BMGRDZM3.js → chunk-KSFPMRH6.js} +1 -1
- package/dist/bundle/{chunk-ZZSZN4CJ.js → chunk-LY2QIBFL.js} +13 -12
- package/dist/bundle/{chunk-GIG7F6UW.js → chunk-MT5KDBOM.js} +5 -5
- package/dist/bundle/{chunk-HNSBXC6U.js → chunk-MVGFB7IS.js} +2 -2
- package/dist/bundle/{chunk-VJPLIXV4.js → chunk-NUHUTJTM.js} +1 -1
- package/dist/bundle/{chunk-EDWJ7IYH.js → chunk-ODPYXNHI.js} +1 -1
- package/dist/bundle/{chunk-2TCS4PLJ.js → chunk-OLTJB5PW.js} +1 -1
- package/dist/bundle/{chunk-LMTQMYUF.js → chunk-P7TVXYJZ.js} +33 -29
- package/dist/bundle/{chunk-66C66FNK.js → chunk-PCYTU7HS.js} +1 -1
- package/dist/bundle/{chunk-VWRT57QU.js → chunk-PIKOQWTL.js} +4 -4
- package/dist/bundle/{chunk-KXASCNOV.js → chunk-PYOM4J73.js} +2 -2
- package/dist/bundle/{chunk-PY2IOVUN.js → chunk-TV6OJBK6.js} +3 -3
- package/dist/bundle/{chunk-4Q6KAV4O.js → chunk-TVMBGHUW.js} +6 -6
- package/dist/bundle/{chunk-3XTKQ5EM.js → chunk-TXDA437R.js} +1 -1
- package/dist/bundle/{chunk-M7ECSGSN.js → chunk-UQZJ2GFQ.js} +4 -6
- package/dist/bundle/{chunk-NMFPK3MU.js → chunk-UUM7AF32.js} +2 -2
- package/dist/bundle/{chunk-BDYQQ6G2.js → chunk-VFRI6RF7.js} +1 -1
- package/dist/bundle/{chunk-M4Y33SJJ.js → chunk-VXHL3XI6.js} +2 -2
- package/dist/bundle/{chunk-A6XETABW.js → chunk-WZNQ2P7H.js} +17 -17
- package/dist/bundle/{chunk-76VSHS5Y.js → chunk-XEMARUGS.js} +7 -7
- package/dist/bundle/{chunk-UE2NKPA4.js → chunk-YAQGWHMH.js} +6 -6
- package/dist/bundle/{chunk-JNKXU7AE.js → chunk-YE464BDT.js} +52 -52
- package/dist/bundle/{chunk-V32L23NN.js → chunk-YSR2XBDO.js} +3 -3
- package/dist/bundle/{chunk-XUJEZ5YF.js → chunk-Z5D6CRY6.js} +5 -5
- package/dist/bundle/{chunk-PJ6YMNJG.js → chunk-ZIFB6KGQ.js} +447 -407
- package/dist/bundle/{chunk-LTZGLOKE.js → chunk-ZPVVSA5R.js} +1 -1
- package/dist/bundle/{command-contract-NNEXHZW5.js → command-contract-4PTK23CK.js} +15 -15
- package/dist/bundle/{command-server-entry-AIBWNC5D.js → command-server-entry-KSAHRZOO.js} +21 -21
- package/dist/bundle/{decode-H7KLRD33.js → decode-SIVT4JWX.js} +2 -2
- package/dist/bundle/{dist-YYSP43J3.js → dist-YWSF5MHP.js} +11 -11
- package/dist/bundle/{echarts-VSD3LS6D.js → echarts-CABLIXX7.js} +2 -2
- package/dist/bundle/{embed-UENZ5HN3.js → embed-OHENS6RB.js} +3 -3
- package/dist/bundle/{embedder-MJMGOJT7.js → embedder-JINT4Y4O.js} +6 -6
- package/dist/bundle/{first-run-HYALREFN.js → first-run-4XEWECC3.js} +6 -6
- package/dist/bundle/first-screen-YI2YNTYY.js +34 -0
- package/dist/bundle/{instructions-WOHRYOLN.js → instructions-3D22PA4T.js} +1 -1
- package/dist/bundle/mail.js +2 -2
- package/dist/bundle/{node-4BRWJJCE.js → node-42G4RGMW.js} +2 -2
- package/dist/bundle/{node-sqlite-D3QESEYQ.js → node-sqlite-KQZM5M3N.js} +4 -4
- package/dist/bundle/{oauth-T7TTOBIZ.js → oauth-7BNCNKQV.js} +4 -4
- package/dist/bundle/{open-6P6627QB.js → open-ULOQOP7K.js} +2 -2
- package/dist/bundle/{openai-FIMCJGAP.js → openai-O5AH6VGT.js} +12 -12
- package/dist/bundle/{process-35IH3WHC.js → process-6D767IDN.js} +1 -1
- package/dist/bundle/{program-IEXB72IK.js → program-UXFXSGIW.js} +400 -380
- package/dist/bundle/{prompt-HFBCPMVL.js → prompt-WN7EBVKT.js} +2 -2
- package/dist/bundle/{recognize-CNL4HJ7Z.js → recognize-IX33XEXZ.js} +1 -1
- package/dist/bundle/{remote-AYGZI7HT.js → remote-22N3FQUC.js} +6 -6
- package/dist/bundle/{rerank-5C2OZZXD.js → rerank-IGX4EFA2.js} +4 -4
- package/dist/bundle/{serve-S6OYBDIB.js → serve-XWIRR2QZ.js} +6 -6
- package/dist/bundle/server-DF2SECWB.js +68 -0
- package/dist/bundle/{server-VKO6E6PI.js → server-OQV2MVCA.js} +37 -35
- package/dist/bundle/{sqlite-runtime-DBTGNTVE.js → sqlite-runtime-WFBTXXXJ.js} +3 -3
- package/dist/bundle/{state-ZQG6AL2Y.js → state-4J5ERHJA.js} +3 -3
- package/dist/bundle/{store-LY4QKTOO.js → store-YRBX7XLM.js} +13 -13
- package/dist/bundle/{store-B7BXWILZ.js → store-YSP2NPRJ.js} +15 -15
- package/dist/bundle/store-maintenance-command-4TW6FABJ.js +58 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/first-screen-GPF5RHBX.js +0 -34
- package/dist/bundle/server-WXSHVDME.js +0 -68
- package/dist/bundle/store-maintenance-command-UR6NQDVV.js +0 -58
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
typedPhone,
|
|
59
59
|
validCounter,
|
|
60
60
|
wildcardPattern
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-WZNQ2P7H.js";
|
|
62
62
|
import {
|
|
63
63
|
ACCOUNT_GROUPS,
|
|
64
64
|
CATEGORIES,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
runEvent,
|
|
97
97
|
severity,
|
|
98
98
|
sourceOf3 as sourceOf
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-BDWOTD7E.js";
|
|
100
100
|
import {
|
|
101
101
|
ADDED_ACCOUNT,
|
|
102
102
|
ADDED_PROVIDER,
|
|
@@ -114,6 +114,7 @@ import {
|
|
|
114
114
|
INVOICE_DIRECTIONS,
|
|
115
115
|
INVOICE_STATUSES,
|
|
116
116
|
KEYED,
|
|
117
|
+
MEETING_DOCUMENT_ROLES,
|
|
117
118
|
MEETING_FIELD_NAMES,
|
|
118
119
|
MEETING_FINDINGS_KIND,
|
|
119
120
|
MONEY_DIRECTIONS,
|
|
@@ -239,10 +240,10 @@ import {
|
|
|
239
240
|
walkQuery,
|
|
240
241
|
walletLine,
|
|
241
242
|
zonedMoment
|
|
242
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-3RBUACSJ.js";
|
|
243
244
|
import {
|
|
244
245
|
sqliteCode
|
|
245
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-NUHUTJTM.js";
|
|
246
247
|
import {
|
|
247
248
|
DEFAULT_STEMMERS,
|
|
248
249
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -252,32 +253,32 @@ import {
|
|
|
252
253
|
analyzerIdentity,
|
|
253
254
|
createStemmer,
|
|
254
255
|
parseStemmers
|
|
255
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-IKTBM64M.js";
|
|
256
257
|
import {
|
|
257
258
|
NORMALIZER_VERSION,
|
|
258
259
|
fold,
|
|
259
260
|
normalize
|
|
260
|
-
} from "./chunk-
|
|
261
|
+
} from "./chunk-D4QALV67.js";
|
|
261
262
|
import {
|
|
262
263
|
DEFAULT_TASK_CATEGORIES,
|
|
263
264
|
sharedConfigPath,
|
|
264
265
|
storedTaskCategories,
|
|
265
266
|
taskCategoriesReader
|
|
266
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-Z5D6CRY6.js";
|
|
267
268
|
import {
|
|
268
269
|
refuseOwnerStoreInTests,
|
|
269
270
|
storePath
|
|
270
|
-
} from "./chunk-
|
|
271
|
+
} from "./chunk-TXDA437R.js";
|
|
271
272
|
import {
|
|
272
273
|
quietSqliteWarning,
|
|
273
274
|
storeCapable
|
|
274
|
-
} from "./chunk-
|
|
275
|
+
} from "./chunk-6B2BBL35.js";
|
|
275
276
|
import {
|
|
276
277
|
PRAGMAS,
|
|
277
278
|
TIME_LIMIT_FUNCTION,
|
|
278
279
|
TimeLimitReached,
|
|
279
280
|
isQueryOnly
|
|
280
|
-
} from "./chunk-
|
|
281
|
+
} from "./chunk-OLTJB5PW.js";
|
|
281
282
|
import {
|
|
282
283
|
array,
|
|
283
284
|
boolean,
|
|
@@ -328,7 +329,7 @@ import {
|
|
|
328
329
|
sql,
|
|
329
330
|
sqliteTable,
|
|
330
331
|
text
|
|
331
|
-
} from "./chunk-
|
|
332
|
+
} from "./chunk-DMW6J2P3.js";
|
|
332
333
|
import {
|
|
333
334
|
__commonJS,
|
|
334
335
|
__name,
|
|
@@ -10072,7 +10073,7 @@ var require_cjs = __commonJS({
|
|
|
10072
10073
|
}
|
|
10073
10074
|
});
|
|
10074
10075
|
|
|
10075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
10076
10077
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
10077
10078
|
const methods = whole;
|
|
10078
10079
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10200,7 +10201,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10200
10201
|
};
|
|
10201
10202
|
}, "bindAccount");
|
|
10202
10203
|
|
|
10203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10204
10205
|
var IndexBuilderOn = class {
|
|
10205
10206
|
static {
|
|
10206
10207
|
__name(this, "IndexBuilderOn");
|
|
@@ -10395,7 +10396,7 @@ function alias(table, alias2) {
|
|
|
10395
10396
|
}
|
|
10396
10397
|
__name(alias, "alias");
|
|
10397
10398
|
|
|
10398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10399
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10399
10400
|
var ENTITY_TABLES = {
|
|
10400
10401
|
...RECORD_TABLES,
|
|
10401
10402
|
account: "accounts",
|
|
@@ -10434,7 +10435,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10434
10435
|
return { table, pointer, type, count: count2, known: known2 };
|
|
10435
10436
|
}).filter(({ count: count2 }) => count2 > 0)), "orphanPointers");
|
|
10436
10437
|
|
|
10437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10438
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
10438
10439
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
10439
10440
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
10440
10441
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -10491,7 +10492,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
10491
10492
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
10492
10493
|
}, "proposedBySql");
|
|
10493
10494
|
|
|
10494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10495
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
|
|
10495
10496
|
var TABLES = { memory: "memories", fact: "facts" };
|
|
10496
10497
|
var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
|
|
10497
10498
|
var KEPT = 20;
|
|
@@ -10586,7 +10587,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
|
|
|
10586
10587
|
return scrubbed;
|
|
10587
10588
|
}, "scrubSourceReviews");
|
|
10588
10589
|
|
|
10589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
10590
10591
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
10591
10592
|
var REFERABLE = {
|
|
10592
10593
|
...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
|
|
@@ -10746,7 +10747,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
10746
10747
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
10747
10748
|
}, "taskIdOf");
|
|
10748
10749
|
|
|
10749
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
|
|
10750
10751
|
var QUOTE_LIMIT = 500;
|
|
10751
10752
|
var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
|
|
10752
10753
|
var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
|
|
@@ -11025,11 +11026,11 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at2) => {
|
|
|
11025
11026
|
database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
|
|
11026
11027
|
}, "deleteDocumentRow");
|
|
11027
11028
|
|
|
11028
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/identity-links.js
|
|
11029
11030
|
var IDENTITY_LINK_KIND = "identity_link";
|
|
11030
11031
|
var IDENTITY_LINK_SIGNALS = ["agent", "phone", "email", "guest-email", "name", "account"];
|
|
11031
11032
|
|
|
11032
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11033
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/merged-persons.js
|
|
11033
11034
|
var SEPARATIONS = ["unlink", "split", "undo-merge"];
|
|
11034
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");
|
|
11035
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");
|
|
@@ -11061,7 +11062,7 @@ var samePersons = /* @__PURE__ */ __name((database, pk) => {
|
|
|
11061
11062
|
}, "samePersons");
|
|
11062
11063
|
var idsOf = /* @__PURE__ */ __name((database, type, id2) => JSON.stringify(type === "person" ? samePersons(database, id2) : [id2]), "idsOf");
|
|
11063
11064
|
|
|
11064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-link-rows.js
|
|
11065
11066
|
var pairOf = /* @__PURE__ */ __name((a, b) => [Number(a), Number(b)].sort((x, y) => x - y).join("-"), "pairOf");
|
|
11066
11067
|
var pkOf = /* @__PURE__ */ __name((database, ref3) => {
|
|
11067
11068
|
const at2 = ref3.indexOf(":");
|
|
@@ -11168,13 +11169,13 @@ var forgetErasedLinks = /* @__PURE__ */ __name((database) => {
|
|
|
11168
11169
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
11169
11170
|
}, "forgetErasedLinks");
|
|
11170
11171
|
|
|
11171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/identity-splits.js
|
|
11172
11173
|
var IDENTITY_SPLIT_KIND = "identity_split";
|
|
11173
11174
|
|
|
11174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
11175
11176
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
11176
11177
|
|
|
11177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11178
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
11178
11179
|
var TASK_CLOSE_KIND = "task_close";
|
|
11179
11180
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
11180
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");
|
|
@@ -11222,7 +11223,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
11222
11223
|
}, "assertMayDecide");
|
|
11223
11224
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
11224
11225
|
|
|
11225
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
11226
11227
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
11227
11228
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
11228
11229
|
var WEIGHTS = {
|
|
@@ -11356,7 +11357,7 @@ var scoreGroup = /* @__PURE__ */ __name((items, context) => {
|
|
|
11356
11357
|
return { score: kept.reduce((sum, signal) => sum + WEIGHTS[signal], 0), signals: kept };
|
|
11357
11358
|
}, "scoreGroup");
|
|
11358
11359
|
|
|
11359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/address-organization.js
|
|
11360
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 ";
|
|
11361
11362
|
var idsOf2 = /* @__PURE__ */ __name((rows) => rows.map((row2) => Number(row2.id)), "idsOf");
|
|
11362
11363
|
var holdAddress = /* @__PURE__ */ __name(({ database, now: now2 }, organization2, email, { method, author }) => {
|
|
@@ -11381,10 +11382,10 @@ var organizationOfAddress = /* @__PURE__ */ __name((context, { name, email, meth
|
|
|
11381
11382
|
return id2;
|
|
11382
11383
|
}, "organizationOfAddress");
|
|
11383
11384
|
|
|
11384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
11385
11386
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
11386
11387
|
|
|
11387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/journal.js
|
|
11388
11389
|
import { existsSync, statSync } from "node:fs";
|
|
11389
11390
|
var watched = /* @__PURE__ */ new WeakMap();
|
|
11390
11391
|
var walInode = /* @__PURE__ */ __name((store) => statSync(`${store}-wal`, { throwIfNoEntry: false })?.ino, "walInode");
|
|
@@ -11410,7 +11411,7 @@ var checkJournal = /* @__PURE__ */ __name((database) => {
|
|
|
11410
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" });
|
|
11411
11412
|
}, "checkJournal");
|
|
11412
11413
|
|
|
11413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/write-events.js
|
|
11414
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;
|
|
11415
11416
|
var writeTarget = /* @__PURE__ */ __name((sql2) => {
|
|
11416
11417
|
const match = WRITE.exec(sql2);
|
|
@@ -11490,7 +11491,7 @@ var committedWrites = /* @__PURE__ */ __name((database) => {
|
|
|
11490
11491
|
}, "committedWrites");
|
|
11491
11492
|
var droppedWrites = /* @__PURE__ */ __name((database) => tallies.get(database)?.pending.clear(), "droppedWrites");
|
|
11492
11493
|
|
|
11493
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11494
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
11494
11495
|
var ARMS = [
|
|
11495
11496
|
[
|
|
11496
11497
|
"message",
|
|
@@ -11618,7 +11619,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
11618
11619
|
return recomputed;
|
|
11619
11620
|
}, "drainInvolvementQueue");
|
|
11620
11621
|
|
|
11621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
11622
11623
|
import { domainToUnicode } from "node:url";
|
|
11623
11624
|
|
|
11624
11625
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -21640,7 +21641,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
21640
21641
|
}, "oa");
|
|
21641
21642
|
var na = { parse: O, get: aa, isValid: oa };
|
|
21642
21643
|
|
|
21643
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21644
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
21644
21645
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
21645
21646
|
var ID = /^[\w-]{10,}$/;
|
|
21646
21647
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -21682,7 +21683,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text7) => [...text7.matchAll(L
|
|
|
21682
21683
|
return { url, documentId: googleDocumentId(url) };
|
|
21683
21684
|
}), "googleDocumentLinks");
|
|
21684
21685
|
|
|
21685
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
21686
21687
|
var BEFORE = [
|
|
21687
21688
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
21688
21689
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -21942,7 +21943,7 @@ var findPlaces = /* @__PURE__ */ __name((text7) => {
|
|
|
21942
21943
|
return found2.sort((a, b) => a.start - b.start);
|
|
21943
21944
|
}, "findPlaces");
|
|
21944
21945
|
|
|
21945
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
21946
21947
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
21947
21948
|
var MENTION_VERSIONS = {
|
|
21948
21949
|
phone: 1,
|
|
@@ -22118,7 +22119,7 @@ var exactlyOne = /* @__PURE__ */ __name((text7, options) => {
|
|
|
22118
22119
|
return one2 && one2.start === 0 && one2.end === text7.length ? one2.value : void 0;
|
|
22119
22120
|
}, "exactlyOne");
|
|
22120
22121
|
|
|
22121
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
22122
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";
|
|
22123
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";
|
|
22124
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";
|
|
@@ -22126,7 +22127,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
22126
22127
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
22127
22128
|
var NAME_WORDS = WORDS.split(" ");
|
|
22128
22129
|
|
|
22129
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22130
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
22130
22131
|
var LATIN_TO_CYRILLIC = {
|
|
22131
22132
|
shch: "\u0449",
|
|
22132
22133
|
sch: "\u0449",
|
|
@@ -22334,7 +22335,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text7, stem, taken) => {
|
|
|
22334
22335
|
return found2;
|
|
22335
22336
|
}, "findUnknownNames");
|
|
22336
22337
|
|
|
22337
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
22338
22339
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
22339
22340
|
"webpage",
|
|
22340
22341
|
"share",
|
|
@@ -22375,7 +22376,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
|
|
|
22375
22376
|
});
|
|
22376
22377
|
}, "matchDownloads");
|
|
22377
22378
|
|
|
22378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
22379
22380
|
var PRESET_VERSION = 1;
|
|
22380
22381
|
var PRESETS = {
|
|
22381
22382
|
password: {
|
|
@@ -22429,7 +22430,7 @@ var PRESETS = {
|
|
|
22429
22430
|
}
|
|
22430
22431
|
};
|
|
22431
22432
|
|
|
22432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
22433
22434
|
var FIELD_VERSION = 2;
|
|
22434
22435
|
var UNITS = {
|
|
22435
22436
|
"": 1,
|
|
@@ -22958,12 +22959,12 @@ var validateAst = /* @__PURE__ */ __name((input, options = {}) => {
|
|
|
22958
22959
|
return validateFields(parsed4.output, options);
|
|
22959
22960
|
}, "validateAst");
|
|
22960
22961
|
|
|
22961
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22962
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
22962
22963
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
22963
22964
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
22964
22965
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
22965
22966
|
|
|
22966
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22967
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
22967
22968
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
22968
22969
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
22969
22970
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -22987,7 +22988,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
22987
22988
|
};
|
|
22988
22989
|
}, "linkMatch");
|
|
22989
22990
|
|
|
22990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22991
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
22991
22992
|
var SETTING = "phoneCountries";
|
|
22992
22993
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
22993
22994
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -23018,7 +23019,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
23018
23019
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
23019
23020
|
}, "valueMatch");
|
|
23020
23021
|
|
|
23021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23022
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
23022
23023
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
23023
23024
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
23024
23025
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -23046,7 +23047,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
23046
23047
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
23047
23048
|
}, "vocabularySimilarity");
|
|
23048
23049
|
|
|
23049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23050
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
23050
23051
|
import { createHash } from "node:crypto";
|
|
23051
23052
|
var folded3 = /* @__PURE__ */ __name((name) => {
|
|
23052
23053
|
try {
|
|
@@ -23112,7 +23113,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
23112
23113
|
});
|
|
23113
23114
|
}, "guardTagCreation");
|
|
23114
23115
|
|
|
23115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23116
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
23116
23117
|
var invalid = /* @__PURE__ */ __name((message3) => {
|
|
23117
23118
|
throw new CliError("validation_error", message3);
|
|
23118
23119
|
}, "invalid");
|
|
@@ -23189,7 +23190,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
23189
23190
|
};
|
|
23190
23191
|
}, "createTagRedirectIndex");
|
|
23191
23192
|
|
|
23192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
23193
23194
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
23194
23195
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
23195
23196
|
if (!row2)
|
|
@@ -23217,7 +23218,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
23217
23218
|
return snapshot2;
|
|
23218
23219
|
}, "tagRedirectSnapshot");
|
|
23219
23220
|
|
|
23220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
23221
23222
|
import { createHash as createHash2 } from "node:crypto";
|
|
23222
23223
|
var TASK_KEY_PREFIXES = {
|
|
23223
23224
|
question: "Q",
|
|
@@ -23245,7 +23246,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
23245
23246
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
23246
23247
|
}, "taskAccountOf");
|
|
23247
23248
|
|
|
23248
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
23249
23250
|
var toMs = /* @__PURE__ */ __name((iso17) => {
|
|
23250
23251
|
if (iso17 === null || iso17 === void 0)
|
|
23251
23252
|
return null;
|
|
@@ -23259,7 +23260,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
23259
23260
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
23260
23261
|
var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
23261
23262
|
|
|
23262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
23263
23264
|
var TAG_KINDS = ["tag", "topic"];
|
|
23264
23265
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
23265
23266
|
var TAG_TYPE = {
|
|
@@ -23462,7 +23463,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
23462
23463
|
return result;
|
|
23463
23464
|
}, "tagsOf");
|
|
23464
23465
|
|
|
23465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23466
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
23466
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");
|
|
23467
23468
|
var SPEECH = speech("att");
|
|
23468
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");
|
|
@@ -23952,7 +23953,7 @@ var FIELD_COMPILERS = {
|
|
|
23952
23953
|
subject
|
|
23953
23954
|
};
|
|
23954
23955
|
|
|
23955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
23956
23957
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
23957
23958
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
23958
23959
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -23968,7 +23969,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
23968
23969
|
};
|
|
23969
23970
|
}, "placeOf");
|
|
23970
23971
|
|
|
23971
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
23972
23973
|
var DRAIN_ON_WRITE = 500;
|
|
23973
23974
|
var METHOD = "rules";
|
|
23974
23975
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -24134,7 +24135,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
24134
24135
|
return queued.length;
|
|
24135
24136
|
}, "drainMentions");
|
|
24136
24137
|
|
|
24137
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
24138
24139
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
24139
24140
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
24140
24141
|
if (!exists2)
|
|
@@ -24142,7 +24143,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
24142
24143
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
24143
24144
|
}, "indexRow");
|
|
24144
24145
|
|
|
24145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
24146
24147
|
var INDEX = "message_stems";
|
|
24147
24148
|
var SETTING2 = "searchStemmers";
|
|
24148
24149
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -24264,7 +24265,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
24264
24265
|
};
|
|
24265
24266
|
}, "stemmerCache");
|
|
24266
24267
|
|
|
24267
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
24268
24269
|
var rehearsal = new AsyncLocalStorage();
|
|
24269
24270
|
var SQLITE_BUSY = 5;
|
|
24270
24271
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
@@ -24407,7 +24408,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
24407
24408
|
}
|
|
24408
24409
|
}, "read");
|
|
24409
24410
|
|
|
24410
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
24411
24412
|
var FOLDED = [
|
|
24412
24413
|
{ table: "tasks", column: "title" },
|
|
24413
24414
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -24444,7 +24445,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
24444
24445
|
return filled2;
|
|
24445
24446
|
}, "fillFolded");
|
|
24446
24447
|
|
|
24447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
24448
24449
|
import { createHash as createHash3 } from "node:crypto";
|
|
24449
24450
|
var CHUNK_CHARS = 1200;
|
|
24450
24451
|
var CHUNK_OVERLAP = 150;
|
|
@@ -24549,7 +24550,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
24549
24550
|
return chunks2;
|
|
24550
24551
|
}, "cutChunks");
|
|
24551
24552
|
|
|
24552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24553
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
24553
24554
|
var DAY = 864e5;
|
|
24554
24555
|
var CURRENCY = [
|
|
24555
24556
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -24675,7 +24676,7 @@ var dueDayOf = /* @__PURE__ */ __name((text7, createdMs) => {
|
|
|
24675
24676
|
return best?.day ?? null;
|
|
24676
24677
|
}, "dueDayOf");
|
|
24677
24678
|
|
|
24678
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24679
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
24679
24680
|
var DAY2 = 864e5;
|
|
24680
24681
|
var STOP_WORDS = new Set([
|
|
24681
24682
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -24830,7 +24831,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
24830
24831
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
24831
24832
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
24832
24833
|
|
|
24833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
24834
24835
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
24835
24836
|
coalesce(CASE k.chunkable_type
|
|
24836
24837
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -24972,7 +24973,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
24972
24973
|
}, "dropUnusedVectors");
|
|
24973
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");
|
|
24974
24975
|
|
|
24975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
24976
24977
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
24977
24978
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
24978
24979
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -25247,7 +25248,7 @@ var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.ma
|
|
|
25247
25248
|
Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
|
|
25248
25249
|
])), "vectorCounts");
|
|
25249
25250
|
|
|
25250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
25251
25252
|
var DOCUMENT_PICTURE = "document_picture";
|
|
25252
25253
|
var SCAN_PAGE2 = 5e3;
|
|
25253
25254
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -25310,12 +25311,12 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
25310
25311
|
}, "nearestPictures")
|
|
25311
25312
|
}), "documentPicturesOver");
|
|
25312
25313
|
|
|
25313
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
|
|
25314
25315
|
var noteIndexText = /* @__PURE__ */ __name((title2, text7) => title2 ? `${title2}
|
|
25315
25316
|
|
|
25316
25317
|
${text7}` : text7, "noteIndexText");
|
|
25317
25318
|
|
|
25318
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25319
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
|
|
25319
25320
|
var ENRICHMENT_SUBJECTS = ["document", "note", "email"];
|
|
25320
25321
|
var ENRICHMENT_POSITION = 1e6;
|
|
25321
25322
|
var EMAIL_ENRICHMENT = "email_enrichment";
|
|
@@ -25409,7 +25410,7 @@ var enrichmentsOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
|
25409
25410
|
}), "clear")
|
|
25410
25411
|
}), "enrichmentsOver");
|
|
25411
25412
|
|
|
25412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
25413
25414
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
25414
25415
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
25415
25416
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -25485,7 +25486,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
25485
25486
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
25486
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");
|
|
25487
25488
|
|
|
25488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
25489
25490
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
25490
25491
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
25491
25492
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -25575,7 +25576,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
25575
25576
|
});
|
|
25576
25577
|
}, "linkMeeting");
|
|
25577
25578
|
|
|
25578
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-titles.js
|
|
25579
25580
|
var MAX_TITLE = 120;
|
|
25580
25581
|
var placeholderTitleOf = /* @__PURE__ */ __name((row2) => `${String(row2.type)} \u2014 ${String(row2.source_locator ?? "")}`, "placeholderTitleOf");
|
|
25581
25582
|
var PLACEHOLDER_TITLE_SQL = "title = type || ' \u2014 ' || coalesce(source_locator, '')";
|
|
@@ -25637,7 +25638,7 @@ var fillFoundTaskTitles = /* @__PURE__ */ __name((database, warn, { batch = 500
|
|
|
25637
25638
|
}
|
|
25638
25639
|
}, "fillFoundTaskTitles");
|
|
25639
25640
|
|
|
25640
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25641
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
25641
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), ''))";
|
|
25642
25643
|
var UNSEARCHED_EVENT_TYPES = [
|
|
25643
25644
|
"working-location",
|
|
@@ -25884,7 +25885,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
25884
25885
|
return true;
|
|
25885
25886
|
}, "resetNoteIndex");
|
|
25886
25887
|
|
|
25887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
25888
25889
|
var keyOf2 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
25889
25890
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names2) => {
|
|
25890
25891
|
for (const key2 of new Set(names2.filter((name) => !!name?.trim()).map(keyOf2))) {
|
|
@@ -25903,7 +25904,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names2) => {
|
|
|
25903
25904
|
}
|
|
25904
25905
|
}, "resolvePersonLinks");
|
|
25905
25906
|
|
|
25906
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
25907
25908
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
25908
25909
|
id: integer("id").primaryKey(),
|
|
25909
25910
|
name: text("name").notNull().unique(),
|
|
@@ -25912,7 +25913,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
25912
25913
|
updatedAt: integer("updated_at").notNull()
|
|
25913
25914
|
});
|
|
25914
25915
|
|
|
25915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
|
|
25916
25917
|
var linkRevisions = sqliteTable("link_revisions", {
|
|
25917
25918
|
id: integer("id").primaryKey(),
|
|
25918
25919
|
linkId: integer("link_id").notNull(),
|
|
@@ -25924,7 +25925,7 @@ var linkRevisions = sqliteTable("link_revisions", {
|
|
|
25924
25925
|
createdAt: integer("created_at").notNull()
|
|
25925
25926
|
}, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
|
|
25926
25927
|
|
|
25927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
25928
25929
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
25929
25930
|
sourceKey: text("source_key").notNull(),
|
|
25930
25931
|
collection: text("collection").notNull(),
|
|
@@ -25934,13 +25935,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
25934
25935
|
createdAt: integer("created_at").notNull()
|
|
25935
25936
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
25936
25937
|
|
|
25937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
25938
25939
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
25939
25940
|
id: integer("id").notNull(),
|
|
25940
25941
|
indexableType: text("indexable_type").notNull()
|
|
25941
25942
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
25942
25943
|
|
|
25943
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
25944
25945
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
25945
25946
|
id: integer("id").primaryKey(),
|
|
25946
25947
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -25960,7 +25961,7 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
25960
25961
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
25961
25962
|
]);
|
|
25962
25963
|
|
|
25963
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
|
|
25964
25965
|
var enrichments = sqliteTable("enrichments", {
|
|
25965
25966
|
subjectType: text("subject_type").notNull(),
|
|
25966
25967
|
subjectId: integer("subject_id").notNull(),
|
|
@@ -25972,7 +25973,7 @@ var enrichments = sqliteTable("enrichments", {
|
|
|
25972
25973
|
createdAt: integer("created_at").notNull()
|
|
25973
25974
|
}, (table) => [primaryKey({ columns: [table.subjectType, table.subjectId] })]);
|
|
25974
25975
|
|
|
25975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/templates.js
|
|
25976
25977
|
var templates = sqliteTable("templates", {
|
|
25977
25978
|
key: text("key").notNull(),
|
|
25978
25979
|
channel: text("channel").notNull(),
|
|
@@ -25994,7 +25995,7 @@ var templatesHistory = sqliteTable("templates_history", {
|
|
|
25994
25995
|
index("templates_history_by_key_channel_language_id").on(table.key, table.channel, table.language, table.id)
|
|
25995
25996
|
]);
|
|
25996
25997
|
|
|
25997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
|
|
25998
25999
|
var links = sqliteTable("links", {
|
|
25999
26000
|
id: integer("id").primaryKey(),
|
|
26000
26001
|
fromType: text("from_type").notNull(),
|
|
@@ -26025,7 +26026,7 @@ var links = sqliteTable("links", {
|
|
|
26025
26026
|
index("links_by_to_type_to_id").on(table.toType, table.toId)
|
|
26026
26027
|
]);
|
|
26027
26028
|
|
|
26028
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
26029
26030
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
26030
26031
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
26031
26032
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -26051,7 +26052,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
26051
26052
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
26052
26053
|
]);
|
|
26053
26054
|
|
|
26054
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26055
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
26055
26056
|
var accounts = sqliteTable("accounts", {
|
|
26056
26057
|
id: integer("id").primaryKey(),
|
|
26057
26058
|
provider: text("provider").notNull(),
|
|
@@ -28061,7 +28062,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
28061
28062
|
at: integer("at").notNull()
|
|
28062
28063
|
});
|
|
28063
28064
|
|
|
28064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
28065
28066
|
var contactsOf = /* @__PURE__ */ __name(({ phones: phones2, emails: emails3 }) => {
|
|
28066
28067
|
if (phones2 === void 0 && emails3 === void 0)
|
|
28067
28068
|
return void 0;
|
|
@@ -28307,7 +28308,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
28307
28308
|
}, "meetingIdentityPk");
|
|
28308
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");
|
|
28309
28310
|
|
|
28310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
28311
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");
|
|
28312
28313
|
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
28313
28314
|
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
@@ -28322,7 +28323,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
|
28322
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");
|
|
28323
28324
|
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
28324
28325
|
|
|
28325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
28326
28327
|
var MESSAGE_FIELDS = {
|
|
28327
28328
|
pk: messages.id,
|
|
28328
28329
|
nativeId: messages.externalId,
|
|
@@ -28502,7 +28503,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
28502
28503
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
28503
28504
|
}), "chatActivity");
|
|
28504
28505
|
|
|
28505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
28506
28507
|
var HIT_FIELDS = {
|
|
28507
28508
|
...MESSAGE_FIELDS,
|
|
28508
28509
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -28601,7 +28602,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
28601
28602
|
};
|
|
28602
28603
|
}, "directReplies");
|
|
28603
28604
|
|
|
28604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28605
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
28605
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");
|
|
28606
28607
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
28607
28608
|
const found2 = identityRow(context, ref3);
|
|
@@ -28814,11 +28815,11 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
28814
28815
|
}, "mentioning");
|
|
28815
28816
|
var escaped = /* @__PURE__ */ __name((text7) => text7.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
28816
28817
|
|
|
28817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
28818
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");
|
|
28819
28820
|
var oneLine = /* @__PURE__ */ __name((text7) => singleLine(text7.replace(/\s+/g, " ").trim()), "oneLine");
|
|
28820
28821
|
|
|
28821
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-accounts.js
|
|
28822
28823
|
var accountKeys = /* @__PURE__ */ __name((database, ids2) => {
|
|
28823
28824
|
const unique2 = [...new Set(ids2)];
|
|
28824
28825
|
if (unique2.length === 0)
|
|
@@ -28907,7 +28908,7 @@ var refEndsOf = /* @__PURE__ */ __name((database, text7) => {
|
|
|
28907
28908
|
}, "refEndsOf");
|
|
28908
28909
|
var refAccountsOf = /* @__PURE__ */ __name((database, text7) => refEndsOf(database, text7)?.flat(), "refAccountsOf");
|
|
28909
28910
|
|
|
28910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
28911
28912
|
var EXCERPT_CHARS = 280;
|
|
28912
28913
|
var TITLE_CHARS = 120;
|
|
28913
28914
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -29331,7 +29332,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
29331
29332
|
ends: /* @__PURE__ */ __name(async (text7) => refEndsOf(context.database, text7), "ends")
|
|
29332
29333
|
}), "refsStoreOver");
|
|
29333
29334
|
|
|
29334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
29335
29336
|
var sourceOf3 = /* @__PURE__ */ __name((read3, ref3) => ({
|
|
29336
29337
|
ref: ref3,
|
|
29337
29338
|
kind: read3.kind,
|
|
@@ -29369,7 +29370,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
29369
29370
|
});
|
|
29370
29371
|
}, "evidenceSourcesOf");
|
|
29371
29372
|
|
|
29372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
29373
29374
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
29374
29375
|
var MAX_TEXT_CHARS = 2e6;
|
|
29375
29376
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -29395,7 +29396,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
29395
29396
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
29396
29397
|
}, "pdfPreviewLimits");
|
|
29397
29398
|
|
|
29398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29399
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
29399
29400
|
import { randomBytes } from "node:crypto";
|
|
29400
29401
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
29401
29402
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -29408,7 +29409,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
29408
29409
|
return time3 + random;
|
|
29409
29410
|
}, "ulid");
|
|
29410
29411
|
|
|
29411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
29412
29413
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
29413
29414
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
29414
29415
|
if (!meta && !sections?.length)
|
|
@@ -29429,7 +29430,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
29429
29430
|
return typeof language === "string" && language !== "" ? language : null;
|
|
29430
29431
|
}, "languageOf");
|
|
29431
29432
|
|
|
29432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
29433
29434
|
var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
29434
29435
|
var objectOf = /* @__PURE__ */ __name((value) => {
|
|
29435
29436
|
if (isObject2(value))
|
|
@@ -29672,7 +29673,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
29672
29673
|
};
|
|
29673
29674
|
}, "filesStoreOver");
|
|
29674
29675
|
|
|
29675
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29676
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
29676
29677
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
29677
29678
|
entity: "document",
|
|
29678
29679
|
backend: "sql",
|
|
@@ -29718,7 +29719,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
29718
29719
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
29719
29720
|
}, "importedDocumentWhere");
|
|
29720
29721
|
|
|
29721
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29722
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
29722
29723
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
29723
29724
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
29724
29725
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -29726,7 +29727,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
29726
29727
|
reason = excluded.reason, updated_at = excluded.updated_at WHERE link_reviews.status = 'open'`).run(linkable.type, linkable.id, entity, JSON.stringify([...candidates].sort((a, b) => a - b)), reason, now2, now2);
|
|
29727
29728
|
}, "reviewLink");
|
|
29728
29729
|
|
|
29729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/link-row.js
|
|
29730
29731
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
29731
29732
|
var thingRef = /* @__PURE__ */ __name((database, type, id2) => type == null || id2 == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? null, "thingRef");
|
|
29732
29733
|
var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
@@ -29759,7 +29760,7 @@ var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
|
29759
29760
|
};
|
|
29760
29761
|
}, "linkOf");
|
|
29761
29762
|
|
|
29762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29763
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
29763
29764
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
29764
29765
|
const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
|
|
29765
29766
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -29780,7 +29781,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
29780
29781
|
return changed;
|
|
29781
29782
|
}, "dateFileNotes");
|
|
29782
29783
|
|
|
29783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
29784
29785
|
var textOf2 = /* @__PURE__ */ __name((text7, what, max = 1e5, allowEmpty = false) => {
|
|
29785
29786
|
const value = text7.trim();
|
|
29786
29787
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -29793,7 +29794,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
29793
29794
|
return value;
|
|
29794
29795
|
}, "oneOf");
|
|
29795
29796
|
|
|
29796
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29797
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
29797
29798
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
29798
29799
|
var RELATIONSHIPS = RELATION_KINDS.map(linkKind).join(", ");
|
|
29799
29800
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
@@ -30308,10 +30309,10 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30308
30309
|
};
|
|
30309
30310
|
}, "notesStoreOver");
|
|
30310
30311
|
|
|
30311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/rows-page.js
|
|
30312
30313
|
var pageOfRows = /* @__PURE__ */ __name((rows, limit, offset = 0) => rows.length > limit ? { items: rows.slice(0, limit), hasMore: true, nextOffset: offset + limit } : { items: rows, hasMore: false }, "pageOfRows");
|
|
30313
30314
|
|
|
30314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
30315
30316
|
var NAMED = "SELECT m.*, b.name AS author_name, b.kind AS author_kind FROM memories m LEFT JOIN bots b ON m.author_type = 'bot' AND b.id = m.author_id";
|
|
30316
30317
|
var iso5 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
30317
30318
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -30576,7 +30577,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30576
30577
|
};
|
|
30577
30578
|
}, "memoriesStoreOver");
|
|
30578
30579
|
|
|
30579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30580
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
30580
30581
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
30581
30582
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
30582
30583
|
throw new CliError(code, message3, { reason });
|
|
@@ -30724,7 +30725,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
30724
30725
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly: ownerOnly2, linkedId, ...decisionsOver(context) };
|
|
30725
30726
|
}, "reviewedRowsOver");
|
|
30726
30727
|
|
|
30727
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
30728
30729
|
var MAX_LINES = 500;
|
|
30729
30730
|
var PARENTS = {
|
|
30730
30731
|
invoice: {
|
|
@@ -30824,7 +30825,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
30824
30825
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
30825
30826
|
}, "moneyLinesOver");
|
|
30826
30827
|
|
|
30827
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
30828
30829
|
var COUNTED = {
|
|
30829
30830
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
30830
30831
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -30899,7 +30900,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
30899
30900
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
30900
30901
|
}, "refundRulesOver");
|
|
30901
30902
|
|
|
30902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
30903
30904
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
30904
30905
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
30905
30906
|
var PAID = netPaidSql("i.id");
|
|
@@ -31303,7 +31304,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31303
31304
|
};
|
|
31304
31305
|
}, "financeStoreOver");
|
|
31305
31306
|
|
|
31306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
31307
31308
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
31308
31309
|
throw new CliError("validation_error", message3, { reason });
|
|
31309
31310
|
}, "refuse");
|
|
@@ -31381,7 +31382,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
31381
31382
|
};
|
|
31382
31383
|
}, "paymentEntriesOver");
|
|
31383
31384
|
|
|
31384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
31385
31386
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
31386
31387
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
31387
31388
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -31408,7 +31409,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
31408
31409
|
return valid;
|
|
31409
31410
|
}, "validateEvidenceFindings");
|
|
31410
31411
|
|
|
31411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
31412
31413
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
31413
31414
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
31414
31415
|
var iso7 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31602,7 +31603,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31602
31603
|
};
|
|
31603
31604
|
}, "proposedActionsStoreOver");
|
|
31604
31605
|
|
|
31605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31606
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-proposals.js
|
|
31606
31607
|
var CONFIRMED = "proposal";
|
|
31607
31608
|
var refOf = /* @__PURE__ */ __name(({ database }, pk) => {
|
|
31608
31609
|
const row2 = database.prepare("SELECT provider, external_id FROM identities WHERE id = ?").get(pk);
|
|
@@ -31952,7 +31953,7 @@ var identityLinkRows = /* @__PURE__ */ __name((context, { person: person2, statu
|
|
|
31952
31953
|
return { items, hasMore: rows.length > limit };
|
|
31953
31954
|
}, "identityLinkRows");
|
|
31954
31955
|
|
|
31955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-merges.js
|
|
31956
31957
|
var mergeId = /* @__PURE__ */ __name((to, from2) => `merge:${to}-${from2}`, "mergeId");
|
|
31957
31958
|
var parseMergeId = /* @__PURE__ */ __name((id2) => {
|
|
31958
31959
|
const found2 = /^merge:([1-9]\d*)-([1-9]\d*)$/.exec(id2.trim());
|
|
@@ -32055,7 +32056,7 @@ var split = /* @__PURE__ */ __name((context, uid, refs, by) => {
|
|
|
32055
32056
|
return recordOf(context, alone);
|
|
32056
32057
|
}, "split");
|
|
32057
32058
|
|
|
32058
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-split-proposals.js
|
|
32059
32060
|
var refOf2 = /* @__PURE__ */ __name(({ provider, id: id2 }) => `${provider}:${id2}`, "refOf");
|
|
32060
32061
|
var keyOf3 = /* @__PURE__ */ __name((split2, person2, identities2) => `${split2} ${person2} ${[...identities2].sort().join(" ")}`, "keyOf");
|
|
32061
32062
|
var planOf = /* @__PURE__ */ __name((context, input) => {
|
|
@@ -32232,7 +32233,7 @@ var forgetErasedSplits = /* @__PURE__ */ __name((database) => {
|
|
|
32232
32233
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
32233
32234
|
}, "forgetErasedSplits");
|
|
32234
32235
|
|
|
32235
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/test-data.js
|
|
32236
32237
|
var SEED_PEOPLE = [
|
|
32237
32238
|
{ name: "Owner", username: "owner" },
|
|
32238
32239
|
{ name: "Ann Lee", username: "ann" },
|
|
@@ -32249,7 +32250,7 @@ var RESERVED_ADDRESS_GLOBS = [
|
|
|
32249
32250
|
];
|
|
32250
32251
|
var SEED_ID_GLOBS = ["person-[0-9]*"];
|
|
32251
32252
|
|
|
32252
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/test-people.js
|
|
32253
32254
|
var TEST_DATA_KIND = "test_data";
|
|
32254
32255
|
var globs = /* @__PURE__ */ __name((column2, patterns) => patterns.map((pattern) => `${column2} GLOB '${pattern}'`).join(" OR "), "globs");
|
|
32255
32256
|
var SURE = `(${globs("i.external_id", SEED_ID_GLOBS)} OR ${globs("lower(i.email)", RESERVED_ADDRESS_GLOBS)})`;
|
|
@@ -32318,7 +32319,7 @@ var forgetErasedTestData = /* @__PURE__ */ __name((database) => {
|
|
|
32318
32319
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
32319
32320
|
}, "forgetErasedTestData");
|
|
32320
32321
|
|
|
32321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
32322
32323
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null, startScope) => Number(orm.insert(accounts).values({
|
|
32323
32324
|
provider,
|
|
32324
32325
|
externalId: account,
|
|
@@ -32519,7 +32520,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
32519
32520
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
32520
32521
|
}, "dropOrphanPeople");
|
|
32521
32522
|
|
|
32522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
32523
32524
|
var HISTORY_KEY = "$history";
|
|
32524
32525
|
var objectOf2 = /* @__PURE__ */ __name((text7) => {
|
|
32525
32526
|
if (typeof text7 !== "string")
|
|
@@ -32595,7 +32596,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
32595
32596
|
return rest;
|
|
32596
32597
|
}, "withoutHistory");
|
|
32597
32598
|
|
|
32598
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32599
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
32599
32600
|
var chatOf = /* @__PURE__ */ __name(({ orm }, accountKey, chatKey) => orm.select({ id: chats.externalId }).from(chats).where(and(eq(chats.id, chatKey), eq(chats.accountId, accountKey))).get()?.id, "chatOf");
|
|
32600
32601
|
var findChatPk = /* @__PURE__ */ __name(({ orm }, accountKey, chatId) => orm.select({ pk: chats.id }).from(chats).where(and(eq(chats.accountId, accountKey), eq(chats.externalId, chatId))).get()?.pk, "findChatPk");
|
|
32601
32602
|
var setChatScope = /* @__PURE__ */ __name((context, accountKey, chatId, scope3) => {
|
|
@@ -32893,7 +32894,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
32893
32894
|
}
|
|
32894
32895
|
}, "replaceAutoTags");
|
|
32895
32896
|
|
|
32896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32897
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-tokens.js
|
|
32897
32898
|
var BOT_TOKEN = /(?<!\d)(\d{6,12}):[A-Za-z0-9_-]{30,40}(?![A-Za-z0-9_-])/g;
|
|
32898
32899
|
var MAY_HOLD = "*[0-9][0-9][0-9][0-9][0-9][0-9]:*";
|
|
32899
32900
|
var MASKED_THROUGH = "bot_tokens_masked_through";
|
|
@@ -32933,7 +32934,7 @@ var maskStoredBotTokens = /* @__PURE__ */ __name((context) => {
|
|
|
32933
32934
|
}, "maskStoredBotTokens");
|
|
32934
32935
|
var masks = /* @__PURE__ */ __name((value) => value != null && withoutBotTokens(String(value)) !== value, "masks");
|
|
32935
32936
|
|
|
32936
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32937
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
32937
32938
|
import { createHash as createHash4 } from "node:crypto";
|
|
32938
32939
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
32939
32940
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -33031,7 +33032,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
33031
33032
|
return { source: source2, query, chat: chat2, senders, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
33032
33033
|
}, "contextEvidenceRequest");
|
|
33033
33034
|
|
|
33034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
33035
33036
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
33036
33037
|
var ACTIVITY = `
|
|
33037
33038
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -33161,7 +33162,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
33161
33162
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
33162
33163
|
}), "mailActivity");
|
|
33163
33164
|
|
|
33164
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
33165
33166
|
var GREETING = new RegExp("^(hi|hello|hey|dear|greetings|good (morning|afternoon|evening)|\u043F\u0440\u0438\u0432\u0435\u0442|\u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439(\u0442\u0435)?|\u0434\u043E\u0431\u0440(\u044B\u0439|\u043E\u0435|\u043E\u0433\u043E) (\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440|\u0443\u0442\u0440\u043E|\u0443\u0442\u0440\u0430|\u0434\u043D\u044F)|hola|buen(os|as) (d\xEDas|dias|tardes|noches)|estimad[oa]s?|querid[oa]s?)(?![\\p{L}\\p{N}])([\\s,]+\\p{L}[\\p{L}.'\u2019-]*){0,3}\\s*[,!.:]?$", "iu");
|
|
33166
33167
|
var SIGN_OFF = /^(best|best regards|best wishes|kind regards|warm regards|regards|thanks|thanks again|thanks a lot|thank you|many thanks|cheers|sincerely|yours|yours truly|yours sincerely|br|с уважением|спасибо|заранее спасибо|всего доброго|всего хорошего|un saludo|saludos|saludos cordiales|atentamente|gracias|muchas gracias)[\s,.!]*$/iu;
|
|
33167
33168
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -33302,7 +33303,7 @@ var mailOwnText = /* @__PURE__ */ __name((body2) => {
|
|
|
33302
33303
|
return text7 || body2.trim();
|
|
33303
33304
|
}, "mailOwnText");
|
|
33304
33305
|
|
|
33305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
33306
33307
|
var titleOf2 = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
33307
33308
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
33308
33309
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
@@ -33415,7 +33416,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
33415
33416
|
return emails3 + threads;
|
|
33416
33417
|
}, "drainEmailIndex");
|
|
33417
33418
|
|
|
33418
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
33419
33420
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
33420
33421
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
33421
33422
|
var folderEmails = /* @__PURE__ */ __name((database, accountId, folder, uidvalidity) => database.prepare(`SELECT l.uid, e.external_id, coalesce(e.received_at, e.sent_at) AS at, e.read, e.flagged,
|
|
@@ -33513,7 +33514,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
33513
33514
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
33514
33515
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
33515
33516
|
|
|
33516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
33517
33518
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
33518
33519
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
33519
33520
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -33563,7 +33564,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
33563
33564
|
return threads.length;
|
|
33564
33565
|
}, "markEmailsRestored");
|
|
33565
33566
|
|
|
33566
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
33567
33568
|
var MAIL_PIECE_ROWS = `SELECT p.id, p.content_hash AS hash, p.type, p.owner, p.position, p.email_id AS email, v.vector
|
|
33568
33569
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
33569
33570
|
WHERE p.account_id = ?
|
|
@@ -33623,7 +33624,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
33623
33624
|
}, "indexedMailPieces");
|
|
33624
33625
|
var nearestMailPieces = /* @__PURE__ */ __name((database, model, query, filter, depth) => (filter.threadExternalId === void 0 ? indexedMailPieces(database, model, query, filter, depth) : void 0) ?? scannedMailPieces(database, model, query, filter), "nearestMailPieces");
|
|
33625
33626
|
|
|
33626
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
33627
33628
|
var sorted = /* @__PURE__ */ __name((value) => Array.isArray(value) ? value.map(sorted) : value !== null && typeof value === "object" ? Object.fromEntries(Object.keys(value).sort().map((key2) => [key2, sorted(value[key2])])) : value, "sorted");
|
|
33628
33629
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
33629
33630
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -33690,7 +33691,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
33690
33691
|
}
|
|
33691
33692
|
}), "mailRulesOver");
|
|
33692
33693
|
|
|
33693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
33694
33695
|
function checkMeetingCancelled(signal) {
|
|
33695
33696
|
if (!signal?.aborted)
|
|
33696
33697
|
return;
|
|
@@ -33701,7 +33702,7 @@ function checkMeetingCancelled(signal) {
|
|
|
33701
33702
|
}
|
|
33702
33703
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
33703
33704
|
|
|
33704
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
33705
33706
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
33706
33707
|
id: Number(row2.id),
|
|
33707
33708
|
accountId: Number(row2.account_id),
|
|
@@ -33751,7 +33752,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
33751
33752
|
createdAt: Number(row2.created_at)
|
|
33752
33753
|
}), "transcriptRowOf");
|
|
33753
33754
|
|
|
33754
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
33755
33756
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
33756
33757
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
33757
33758
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -33918,7 +33919,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33918
33919
|
}
|
|
33919
33920
|
}), "meetingReadsOver");
|
|
33920
33921
|
|
|
33921
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33922
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
33922
33923
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
33923
33924
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
33924
33925
|
const params = [input.accountId];
|
|
@@ -33961,7 +33962,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
33961
33962
|
return { clauses, params };
|
|
33962
33963
|
}, "meetingSelectionSql");
|
|
33963
33964
|
|
|
33964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33965
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
33965
33966
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
33966
33967
|
async meetingChatLines(input) {
|
|
33967
33968
|
checkMeetingCancelled(input.signal);
|
|
@@ -33989,7 +33990,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33989
33990
|
}
|
|
33990
33991
|
}), "meetingChatLinesOver");
|
|
33991
33992
|
|
|
33992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
33993
33994
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
33994
33995
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
33995
33996
|
}, "missing");
|
|
@@ -34112,7 +34113,81 @@ function meetingContextLinksOver(context) {
|
|
|
34112
34113
|
}
|
|
34113
34114
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
34114
34115
|
|
|
34115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34116
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-documents.js
|
|
34117
|
+
var TRANSCRIPT_ROLE = "transcript";
|
|
34118
|
+
var roleOf3 = /* @__PURE__ */ __name((value) => MEETING_DOCUMENT_ROLES.find((role) => role === value), "roleOf");
|
|
34119
|
+
var attach = /* @__PURE__ */ __name((database, meetingId, fileId, role, metadata3, listed, now2) => {
|
|
34120
|
+
const target = driveFileTarget(fileId);
|
|
34121
|
+
const held = database.prepare("SELECT id, to_id, role, metadata FROM links WHERE from_type = 'meeting' AND from_id = ? AND kind = 'attached' AND target_text = ?").get(meetingId, target);
|
|
34122
|
+
if (!held) {
|
|
34123
|
+
database.prepare(`INSERT INTO links (from_type, from_id, to_type, to_id, kind, source, target_text, role, metadata, confirmed,
|
|
34124
|
+
author, created_at, updated_at) VALUES ('meeting', ?, 'document', ?, 'attached', 'meeting', ?, ?, ?, 1, 'rule',
|
|
34125
|
+
?, ?)`).run(meetingId, driveDocumentOf(database, fileId), target, role, metadata3, now2, now2);
|
|
34126
|
+
return;
|
|
34127
|
+
}
|
|
34128
|
+
const document = held.to_id == null ? driveDocumentOf(database, fileId) : int(held.to_id);
|
|
34129
|
+
const nextRole = listed ? role : str(held.role);
|
|
34130
|
+
const nextMetadata = listed ? metadata3 : str(held.metadata);
|
|
34131
|
+
database.prepare("UPDATE links SET to_id = ?, role = ?, metadata = ?, updated_at = ? WHERE id = ? AND (to_id IS NOT ? OR role IS NOT ? OR metadata IS NOT ?)").run(document, nextRole, nextMetadata, now2, Number(held.id), document, nextRole, nextMetadata);
|
|
34132
|
+
}, "attach");
|
|
34133
|
+
var attachListedDocument = /* @__PURE__ */ __name((database, meetingId, { fileId, role, title: title2 }, now2) => {
|
|
34134
|
+
const file = fileId.trim();
|
|
34135
|
+
if (file)
|
|
34136
|
+
attach(database, meetingId, file, role, JSON.stringify({ listed: true, ...title2 ? { title: title2 } : {} }), true, now2);
|
|
34137
|
+
}, "attachListedDocument");
|
|
34138
|
+
var attachTranscriptFile = /* @__PURE__ */ __name((database, meetingId, fileId, source2, now2, replaces) => {
|
|
34139
|
+
const file = fileId.trim();
|
|
34140
|
+
if (!file)
|
|
34141
|
+
return;
|
|
34142
|
+
if (replaces)
|
|
34143
|
+
database.prepare("DELETE FROM links WHERE from_type = 'meeting' AND from_id = ? AND kind = 'attached' AND role = ? AND target_text <> ? AND json_extract(metadata, '$.source') = ? AND json_extract(metadata, '$.listed') IS NULL").run(meetingId, TRANSCRIPT_ROLE, driveFileTarget(file), source2);
|
|
34144
|
+
attach(database, meetingId, file, TRANSCRIPT_ROLE, JSON.stringify({ source: source2 }), false, now2);
|
|
34145
|
+
}, "attachTranscriptFile");
|
|
34146
|
+
var meetingDocumentsOf = /* @__PURE__ */ __name((database, meetingId) => database.prepare("SELECT l.target_text, l.role, l.metadata, CASE WHEN d.deleted_at IS NULL THEN l.to_id END AS to_id FROM links l LEFT JOIN documents d ON d.id = l.to_id WHERE l.from_type = 'meeting' AND l.from_id = ? AND l.kind = 'attached' AND l.to_type = 'document' ORDER BY l.id").all(meetingId).flatMap((row2) => {
|
|
34147
|
+
const role = roleOf3(row2.role);
|
|
34148
|
+
return role === void 0 ? [] : [
|
|
34149
|
+
{
|
|
34150
|
+
fileId: String(row2.target_text).slice(driveFileTarget("").length),
|
|
34151
|
+
role,
|
|
34152
|
+
title: str(fromJson(row2.metadata)?.title),
|
|
34153
|
+
documentId: int(row2.to_id)
|
|
34154
|
+
}
|
|
34155
|
+
];
|
|
34156
|
+
}), "meetingDocumentsOf");
|
|
34157
|
+
var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
34158
|
+
const meetingsOf = /* @__PURE__ */ __name((documentIds, roles) => read(database, () => {
|
|
34159
|
+
const rows = database.prepare(`SELECT l.to_id AS document_id, l.from_id AS meeting_id, m.account_id, l.role FROM links l
|
|
34160
|
+
JOIN meetings m ON m.id = l.from_id
|
|
34161
|
+
WHERE l.kind = 'attached' AND l.from_type = 'meeting' AND l.to_type = 'document'
|
|
34162
|
+
AND l.role IN (SELECT value FROM json_each(?)) AND m.deleted_at IS NULL
|
|
34163
|
+
AND l.to_id IN (SELECT value FROM json_each(?))
|
|
34164
|
+
ORDER BY l.role = ? DESC, l.id`).all(JSON.stringify(roles), JSON.stringify(documentIds), TRANSCRIPT_ROLE);
|
|
34165
|
+
const found2 = /* @__PURE__ */ new Map();
|
|
34166
|
+
for (const row2 of rows) {
|
|
34167
|
+
const role = roleOf3(row2.role);
|
|
34168
|
+
if (role !== void 0 && !found2.has(Number(row2.document_id)))
|
|
34169
|
+
found2.set(Number(row2.document_id), {
|
|
34170
|
+
meetingId: Number(row2.meeting_id),
|
|
34171
|
+
accountId: Number(row2.account_id),
|
|
34172
|
+
role
|
|
34173
|
+
});
|
|
34174
|
+
}
|
|
34175
|
+
return found2;
|
|
34176
|
+
}), "meetingsOf");
|
|
34177
|
+
return {
|
|
34178
|
+
async transcriptMeetings(documentIds) {
|
|
34179
|
+
if (!documentIds.length)
|
|
34180
|
+
return /* @__PURE__ */ new Map();
|
|
34181
|
+
const found2 = await meetingsOf(documentIds, [TRANSCRIPT_ROLE]);
|
|
34182
|
+
return new Map([...found2].map(([document, { meetingId }]) => [document, meetingId]));
|
|
34183
|
+
},
|
|
34184
|
+
async documentMeetings(documentIds) {
|
|
34185
|
+
return documentIds.length ? meetingsOf(documentIds, MEETING_DOCUMENT_ROLES) : /* @__PURE__ */ new Map();
|
|
34186
|
+
}
|
|
34187
|
+
};
|
|
34188
|
+
}, "meetingTranscriptDocumentsOver");
|
|
34189
|
+
|
|
34190
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
34116
34191
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
34117
34192
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
34118
34193
|
var summaryOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -34141,7 +34216,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
34141
34216
|
return row2 ? summaryText(summaryOf2(row2)) : null;
|
|
34142
34217
|
}, "indexedText");
|
|
34143
34218
|
|
|
34144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34219
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
34145
34220
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
34146
34221
|
var meetingCurrentIndexRows = `
|
|
34147
34222
|
SELECT 'meeting_transcript_row' AS indexable_type,r.id,r.id*4+1 AS rid,1 AS live,coalesce(length(CAST(r.text AS BLOB)),0) AS bytes FROM meeting_transcript_rows r JOIN meeting_transcripts t ON t.id=r.meeting_transcript_id JOIN meetings m ON m.id=t.meeting_id WHERE m.account_id=? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL
|
|
@@ -34172,7 +34247,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
34172
34247
|
}, "invalidateMeetingStems");
|
|
34173
34248
|
var meetingStemmableText = /* @__PURE__ */ __name((text7) => text7.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
34174
34249
|
|
|
34175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
34176
34251
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
34177
34252
|
return {
|
|
34178
34253
|
async indexSearch(original) {
|
|
@@ -34240,10 +34315,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
34240
34315
|
}
|
|
34241
34316
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
34242
34317
|
|
|
34243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34318
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
34244
34319
|
import { createHash as createHash5 } from "node:crypto";
|
|
34245
34320
|
|
|
34246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34321
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/lucene/plain.js
|
|
34247
34322
|
var REPAIRED = /* @__PURE__ */ new Set([
|
|
34248
34323
|
"query.invalid-syntax",
|
|
34249
34324
|
"query.unclosed-literal",
|
|
@@ -34386,7 +34461,7 @@ var plainQuery = /* @__PURE__ */ __name((text7, fields4 = SEARCH_FIELDS) => {
|
|
|
34386
34461
|
return text7;
|
|
34387
34462
|
}, "plainQuery");
|
|
34388
34463
|
|
|
34389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
34390
34465
|
var SHORTEST_CORRECTION = 3;
|
|
34391
34466
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
34392
34467
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -34433,7 +34508,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words4) => {
|
|
|
34433
34508
|
return corrections;
|
|
34434
34509
|
}, "correctWords");
|
|
34435
34510
|
|
|
34436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
34437
34512
|
var SHORTEST_GARBLED = 4;
|
|
34438
34513
|
var MOST_WIDENED = 64;
|
|
34439
34514
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -34525,7 +34600,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
34525
34600
|
return found2.map((words4) => words4.sort((a, b) => a.distance - b.distance || b.docs - a.docs || a.term.localeCompare(b.term)).slice(0, MOST_WIDENED).map((word2) => word2.term));
|
|
34526
34601
|
}, "widenWords");
|
|
34527
34602
|
|
|
34528
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
34529
34604
|
import { readFileSync } from "node:fs";
|
|
34530
34605
|
var loaded;
|
|
34531
34606
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -34584,7 +34659,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
34584
34659
|
return false;
|
|
34585
34660
|
}, "knownRussianWord");
|
|
34586
34661
|
|
|
34587
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34662
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
34588
34663
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
34589
34664
|
var MOST_WORDS = 128;
|
|
34590
34665
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -34840,7 +34915,7 @@ var matchedMeetingWords = /* @__PURE__ */ __name((tree, text7, stemmer2) => {
|
|
|
34840
34915
|
return [...found2];
|
|
34841
34916
|
}, "matchedMeetingWords");
|
|
34842
34917
|
|
|
34843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
34844
34919
|
var fail = /* @__PURE__ */ __name((message3) => {
|
|
34845
34920
|
throw new CliError("validation_error", message3);
|
|
34846
34921
|
}, "fail");
|
|
@@ -35024,7 +35099,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
35024
35099
|
}
|
|
35025
35100
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
35026
35101
|
|
|
35027
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
35028
35103
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35029
35104
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
35030
35105
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -35056,7 +35131,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35056
35131
|
}
|
|
35057
35132
|
}), "meetingLanguagesOver");
|
|
35058
35133
|
|
|
35059
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
35060
35135
|
import { createHash as createHash6 } from "node:crypto";
|
|
35061
35136
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
35062
35137
|
if (value === void 0)
|
|
@@ -35149,7 +35224,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
35149
35224
|
}
|
|
35150
35225
|
}), "meetingParticipantSearchOver");
|
|
35151
35226
|
|
|
35152
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
35153
35228
|
var preparationQueries = {
|
|
35154
35229
|
participants: {
|
|
35155
35230
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -35199,7 +35274,7 @@ var preparationQueries = {
|
|
|
35199
35274
|
}
|
|
35200
35275
|
};
|
|
35201
35276
|
|
|
35202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35277
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
35203
35278
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35204
35279
|
async preparationContext(original) {
|
|
35205
35280
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -35240,7 +35315,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35240
35315
|
}
|
|
35241
35316
|
}), "meetingPreparationContextOver");
|
|
35242
35317
|
|
|
35243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35318
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
35244
35319
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
35245
35320
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
35246
35321
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -35254,7 +35329,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
35254
35329
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
35255
35330
|
)`, "preparationSubjects");
|
|
35256
35331
|
|
|
35257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
35258
35333
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35259
35334
|
async preparationKnowledge(original) {
|
|
35260
35335
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -35299,7 +35374,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
35299
35374
|
}
|
|
35300
35375
|
}), "meetingPreparationKnowledgeOver");
|
|
35301
35376
|
|
|
35302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
35303
35378
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35304
35379
|
async preparationNotes(original) {
|
|
35305
35380
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -35352,7 +35427,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35352
35427
|
}
|
|
35353
35428
|
}), "meetingPreparationNotesOver");
|
|
35354
35429
|
|
|
35355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
35356
35431
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35357
35432
|
async relatedHistory(original) {
|
|
35358
35433
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -35423,7 +35498,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35423
35498
|
}
|
|
35424
35499
|
}), "meetingRelatedHistoryOver");
|
|
35425
35500
|
|
|
35426
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
35427
35502
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
35428
35503
|
var text3 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
35429
35504
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -35504,7 +35579,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35504
35579
|
}
|
|
35505
35580
|
}), "meetingReviewOver");
|
|
35506
35581
|
|
|
35507
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
35508
35583
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
35509
35584
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
35510
35585
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -35558,7 +35633,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35558
35633
|
}
|
|
35559
35634
|
}), "meetingSeriesHistoryOver");
|
|
35560
35635
|
|
|
35561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
35562
35637
|
var MOST_ROWS = 5e5;
|
|
35563
35638
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
35564
35639
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -35627,45 +35702,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35627
35702
|
}
|
|
35628
35703
|
}), "meetingStatsOver");
|
|
35629
35704
|
|
|
35630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35631
|
-
var TRANSCRIPT_ROLE = "transcript";
|
|
35632
|
-
var attachTranscriptDocument = /* @__PURE__ */ __name((database, meetingId, fileId, now2, replaces) => {
|
|
35633
|
-
const file = fileId.trim();
|
|
35634
|
-
if (!file)
|
|
35635
|
-
return;
|
|
35636
|
-
const target = driveFileTarget(file);
|
|
35637
|
-
if (replaces)
|
|
35638
|
-
database.prepare("DELETE FROM links WHERE from_type = 'meeting' AND from_id = ? AND kind = 'attached' AND role = ? AND target_text <> ?").run(meetingId, TRANSCRIPT_ROLE, target);
|
|
35639
|
-
const held = database.prepare("SELECT id, to_id FROM links WHERE from_type = 'meeting' AND from_id = ? AND kind = 'attached' AND target_text = ?").get(meetingId, target);
|
|
35640
|
-
if (!held) {
|
|
35641
|
-
database.prepare(`INSERT INTO links (from_type, from_id, to_type, to_id, kind, source, target_text, role, confirmed, author,
|
|
35642
|
-
created_at, updated_at) VALUES ('meeting', ?, 'document', ?, 'attached', 'meeting', ?, ?, 1, 'rule', ?, ?)`).run(meetingId, driveDocumentOf(database, file), target, TRANSCRIPT_ROLE, now2, now2);
|
|
35643
|
-
return;
|
|
35644
|
-
}
|
|
35645
|
-
if (held.to_id != null)
|
|
35646
|
-
return;
|
|
35647
|
-
const document = driveDocumentOf(database, file);
|
|
35648
|
-
if (document !== null)
|
|
35649
|
-
database.prepare("UPDATE links SET to_id = ?, updated_at = ? WHERE id = ?").run(document, now2, Number(held.id));
|
|
35650
|
-
}, "attachTranscriptDocument");
|
|
35651
|
-
var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35652
|
-
async transcriptMeetings(documentIds) {
|
|
35653
|
-
if (!documentIds.length)
|
|
35654
|
-
return /* @__PURE__ */ new Map();
|
|
35655
|
-
return read(database, () => {
|
|
35656
|
-
const rows = database.prepare(`SELECT l.to_id AS document_id, l.from_id AS meeting_id FROM links l JOIN meetings m ON m.id = l.from_id
|
|
35657
|
-
WHERE l.kind = 'attached' AND l.from_type = 'meeting' AND l.to_type = 'document' AND l.role = ?
|
|
35658
|
-
AND m.deleted_at IS NULL AND l.to_id IN (SELECT value FROM json_each(?)) ORDER BY l.id`).all(TRANSCRIPT_ROLE, JSON.stringify(documentIds));
|
|
35659
|
-
const found2 = /* @__PURE__ */ new Map();
|
|
35660
|
-
for (const row2 of rows)
|
|
35661
|
-
if (!found2.has(Number(row2.document_id)))
|
|
35662
|
-
found2.set(Number(row2.document_id), Number(row2.meeting_id));
|
|
35663
|
-
return found2;
|
|
35664
|
-
});
|
|
35665
|
-
}
|
|
35666
|
-
}), "meetingTranscriptDocumentsOver");
|
|
35667
|
-
|
|
35668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
|
|
35705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
|
|
35669
35706
|
var CYRILLIC_TO_LATIN = {
|
|
35670
35707
|
\u0430: "a",
|
|
35671
35708
|
\u0431: "b",
|
|
@@ -35887,7 +35924,7 @@ for (const [full, short] of Object.entries(SHORT_FORMS))
|
|
|
35887
35924
|
}
|
|
35888
35925
|
var fullNames = /* @__PURE__ */ __name((skeleton) => [skeleton, ...FULL_NAMES.get(skeleton) ?? []], "fullNames");
|
|
35889
35926
|
|
|
35890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35927
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/name-traces.js
|
|
35891
35928
|
var peopleByNameKey = /* @__PURE__ */ __name((database) => {
|
|
35892
35929
|
const found2 = /* @__PURE__ */ new Map();
|
|
35893
35930
|
for (const row2 of database.prepare("SELECT p.id, p.name FROM persons p WHERE p.owner = 0 AND p.name IS NOT NULL AND EXISTS (SELECT 1 FROM identity_links l WHERE l.person_id = p.id) ORDER BY p.id").all()) {
|
|
@@ -36003,7 +36040,7 @@ function* sharedTraces(database, a, b, name, except) {
|
|
|
36003
36040
|
}
|
|
36004
36041
|
__name(sharedTraces, "sharedTraces");
|
|
36005
36042
|
|
|
36006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-matcher.js
|
|
36007
36044
|
var spellingsOf = /* @__PURE__ */ __name((value) => [value, value.slice(1)], "spellingsOf");
|
|
36008
36045
|
var PERSON_BY = {
|
|
36009
36046
|
// UNION, not OR: each branch reads its own index.
|
|
@@ -36026,7 +36063,7 @@ var personsByIdentifiers = /* @__PURE__ */ __name((database, ids2) => {
|
|
|
36026
36063
|
return [...found2].sort((a, b) => a - b);
|
|
36027
36064
|
}, "personsByIdentifiers");
|
|
36028
36065
|
|
|
36029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36066
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-match-scan.js
|
|
36030
36067
|
var BY = "rule";
|
|
36031
36068
|
var RULE2 = { bot: "rule", kind: "rule" };
|
|
36032
36069
|
var MOST_SHARING = 6;
|
|
@@ -36473,7 +36510,7 @@ var linkPhones = /* @__PURE__ */ __name((context, identities2) => {
|
|
|
36473
36510
|
return pass.result;
|
|
36474
36511
|
}, "linkPhones");
|
|
36475
36512
|
|
|
36476
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
36477
36514
|
var CURSOR_KEY = "meetings";
|
|
36478
36515
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
36479
36516
|
id: Number(row2.id),
|
|
@@ -36564,7 +36601,8 @@ var details = /* @__PURE__ */ __name((database, id2) => {
|
|
|
36564
36601
|
transcripts: database.prepare("SELECT * FROM meeting_transcripts WHERE meeting_id = ? ORDER BY id").all(id2).map((t) => ({ transcript: transcriptOf(t), rows: rowsOf.all(Number(t.id)).map(transcriptRowOf) })),
|
|
36565
36602
|
chat: database.prepare("SELECT * FROM meeting_chat_messages WHERE meeting_id = ? ORDER BY id").all(id2).map(chatOf2),
|
|
36566
36603
|
summaries: database.prepare("SELECT * FROM meeting_summaries WHERE meeting_id = ? ORDER BY id").all(id2).map(summaryOf2),
|
|
36567
|
-
attachments: database.prepare("SELECT * FROM attachments WHERE attachable_type = 'meeting' AND attachable_id = ? ORDER BY position").all(id2).map(attachmentOf)
|
|
36604
|
+
attachments: database.prepare("SELECT * FROM attachments WHERE attachable_type = 'meeting' AND attachable_id = ? ORDER BY position").all(id2).map(attachmentOf),
|
|
36605
|
+
documents: meetingDocumentsOf(database, id2)
|
|
36568
36606
|
};
|
|
36569
36607
|
}, "details");
|
|
36570
36608
|
var upsert = /* @__PURE__ */ __name((database, table, key2, values, now2) => {
|
|
@@ -36737,6 +36775,8 @@ var save = /* @__PURE__ */ __name((context, input) => {
|
|
|
36737
36775
|
}, now2);
|
|
36738
36776
|
for (const a of input.attachments ?? [])
|
|
36739
36777
|
saveAttachment(database, "meeting", meetingId, a, now2);
|
|
36778
|
+
for (const document of input.documents ?? [])
|
|
36779
|
+
attachListedDocument(database, meetingId, document, now2);
|
|
36740
36780
|
return meetingId;
|
|
36741
36781
|
}, "save");
|
|
36742
36782
|
var saveTranscripts = /* @__PURE__ */ __name((database, meetingId, transcripts, participantId, now2) => {
|
|
@@ -36751,7 +36791,7 @@ var saveTranscripts = /* @__PURE__ */ __name((database, meetingId, transcripts,
|
|
|
36751
36791
|
for (const { rows, driveFileId, ...t } of transcripts) {
|
|
36752
36792
|
const replayed = t.contentHash !== null && Boolean(sameContent.get(meetingId, t.source, t.contentHash));
|
|
36753
36793
|
if (driveFileId !== void 0)
|
|
36754
|
-
|
|
36794
|
+
attachTranscriptFile(database, meetingId, driveFileId, t.source, now2, !replayed);
|
|
36755
36795
|
if (replayed) {
|
|
36756
36796
|
counts.replayedTranscripts++;
|
|
36757
36797
|
continue;
|
|
@@ -37058,7 +37098,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37058
37098
|
};
|
|
37059
37099
|
}, "meetingStoreOver");
|
|
37060
37100
|
|
|
37061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37101
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
37062
37102
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
37063
37103
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
37064
37104
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -37084,7 +37124,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder2) => {
|
|
|
37084
37124
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder2))).run();
|
|
37085
37125
|
}, "release");
|
|
37086
37126
|
|
|
37087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
37088
37128
|
var THREAD_COLUMNS = {
|
|
37089
37129
|
subject: {
|
|
37090
37130
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -37101,7 +37141,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
37101
37141
|
AND (${filter.where?.sql ?? "1"}) ORDER BY coalesce(last_email_at, 0) DESC, id DESC LIMIT ? OFFSET ?`).all(filter.accountId ?? null, filter.accountId ?? null, filter.includeDeleted ? 1 : 0, ...filter.where?.params ?? [], limit, offset);
|
|
37102
37142
|
}, "threadRows");
|
|
37103
37143
|
|
|
37104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37144
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
37105
37145
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
37106
37146
|
id: `email:${place.emailId}`,
|
|
37107
37147
|
chatId: place.threadExternalId,
|
|
@@ -37643,7 +37683,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
37643
37683
|
}
|
|
37644
37684
|
}), "mailStoreOver");
|
|
37645
37685
|
|
|
37646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
37647
37687
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
37648
37688
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
37649
37689
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -37733,7 +37773,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
37733
37773
|
}, "knownWord");
|
|
37734
37774
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
37735
37775
|
|
|
37736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
37737
37777
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
37738
37778
|
var readsTranscripts = /* @__PURE__ */ __name((node) => (node.operator === "term" || node.operator === "phrase") && /[\p{L}\p{N}]/u.test(normalize(node.value)) && (node.field === "transcript" || node.implicit === true && (node.field === "text" || node.field === "exact")), "readsTranscripts");
|
|
37739
37779
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -37819,7 +37859,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
37819
37859
|
return found2;
|
|
37820
37860
|
}, "spokenTranscripts");
|
|
37821
37861
|
|
|
37822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
37823
37863
|
var startOf = /* @__PURE__ */ __name((node) => node.operator === "wildcard" && node.implicit ? /^([\p{L}\p{N}]+)\*$/u.exec(normalize(node.value))?.[1] : void 0, "startOf");
|
|
37824
37864
|
var matchOf = /* @__PURE__ */ __name((node) => {
|
|
37825
37865
|
const start = startOf(node);
|
|
@@ -37877,7 +37917,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
37877
37917
|
});
|
|
37878
37918
|
}, "placeHits");
|
|
37879
37919
|
|
|
37880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37920
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
37881
37921
|
var GROUPS = {
|
|
37882
37922
|
chat: {
|
|
37883
37923
|
key: "m.chat_id",
|
|
@@ -37899,7 +37939,7 @@ var GROUPS = {
|
|
|
37899
37939
|
}
|
|
37900
37940
|
};
|
|
37901
37941
|
|
|
37902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
37903
37943
|
var MESSAGES2 = {
|
|
37904
37944
|
rows: "messages",
|
|
37905
37945
|
threads: "chats",
|
|
@@ -38392,7 +38432,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
38392
38432
|
};
|
|
38393
38433
|
}, "runCompiled");
|
|
38394
38434
|
|
|
38395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
38396
38436
|
function invalidMetadata() {
|
|
38397
38437
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
38398
38438
|
}
|
|
@@ -38494,7 +38534,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
38494
38534
|
};
|
|
38495
38535
|
}), "counterTargets");
|
|
38496
38536
|
|
|
38497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
38498
38538
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
38499
38539
|
var fileAttachments = /* @__PURE__ */ __name(({ database }, accountKey, { chatKey, messageId, beforePk, limit }) => database.prepare(`SELECT att.id AS pk, c.external_id AS chat_id, m.external_id AS message_id, att.position, att.kind, att.name, att.mime,
|
|
38500
38540
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -38613,7 +38653,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
38613
38653
|
}));
|
|
38614
38654
|
}, "attachmentViews");
|
|
38615
38655
|
|
|
38616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
38617
38657
|
var transcript2 = /* @__PURE__ */ __name(({ orm }, chatKey, messageId) => orm.select({ text: messageTranscripts.text, source: messageTranscripts.source }).from(messageTranscripts).where(and(eq(messageTranscripts.chatId, chatKey), eq(messageTranscripts.messageExternalId, messageId))).get(), "transcript");
|
|
38618
38658
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text7, source2) => {
|
|
38619
38659
|
const { orm, database, now: now2 } = context;
|
|
@@ -38651,7 +38691,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
38651
38691
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
38652
38692
|
}, "intoVoiceAttachment");
|
|
38653
38693
|
|
|
38654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
38655
38695
|
var FIELDS = [
|
|
38656
38696
|
"threadExternalId",
|
|
38657
38697
|
"senderIdentityId",
|
|
@@ -38970,7 +39010,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
38970
39010
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
38971
39011
|
}, "writeDerivedReactions");
|
|
38972
39012
|
|
|
38973
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39013
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
38974
39014
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
38975
39015
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
38976
39016
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -38991,7 +39031,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
38991
39031
|
};
|
|
38992
39032
|
}, "keysOver");
|
|
38993
39033
|
|
|
38994
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
38995
39035
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
38996
39036
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
38997
39037
|
if (!row2)
|
|
@@ -39038,7 +39078,7 @@ var forgetProfile = /* @__PURE__ */ __name((database, app, profile, now2) => {
|
|
|
39038
39078
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
39039
39079
|
}, "forgetProfile");
|
|
39040
39080
|
|
|
39041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39081
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
39042
39082
|
var ACCOUNT_REASON = "an account you connected, under another name: a mailbox or messenger you read may be someone else's";
|
|
39043
39083
|
var ownerNames = /* @__PURE__ */ __name(({ database }, owner) => database.prepare("SELECT i.name FROM identity_links l JOIN identities i ON i.id = l.identity_id WHERE l.person_id = ?").all(owner).map(({ name }) => new Set(nameSkeletons(displayName(typeof name === "string" ? name : null)))).filter((words4) => words4.size > 0), "ownerNames");
|
|
39044
39084
|
var ownersName = /* @__PURE__ */ __name((name, owner, alone) => {
|
|
@@ -39097,7 +39137,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
39097
39137
|
return personOf2(context, ref3);
|
|
39098
39138
|
}, "linkToOwner");
|
|
39099
39139
|
|
|
39100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
39101
39141
|
var PROVIDERS_SETTING = "providers";
|
|
39102
39142
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
39103
39143
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -39145,7 +39185,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
39145
39185
|
});
|
|
39146
39186
|
}, "registerProvider");
|
|
39147
39187
|
|
|
39148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
39149
39189
|
var DAY3 = 864e5;
|
|
39150
39190
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
39151
39191
|
var TEXT_LIMIT = 20;
|
|
@@ -39343,7 +39383,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
39343
39383
|
};
|
|
39344
39384
|
}, "taskSimilarityOver");
|
|
39345
39385
|
|
|
39346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
39347
39387
|
var SETTING3 = "taskCategories";
|
|
39348
39388
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
39349
39389
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -39362,7 +39402,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
39362
39402
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(SETTING3, JSON.stringify(categories), now2);
|
|
39363
39403
|
}, "saveTaskCategories");
|
|
39364
39404
|
|
|
39365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39405
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
39366
39406
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
39367
39407
|
var ALLOWED = "taskAgentClose";
|
|
39368
39408
|
var MIN = "taskAgentCloseMin";
|
|
@@ -39418,7 +39458,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
39418
39458
|
];
|
|
39419
39459
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
39420
39460
|
|
|
39421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
39422
39462
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
39423
39463
|
var KEY = "taskFirstPassPerChat";
|
|
39424
39464
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -39438,7 +39478,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
39438
39478
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(KEY, String(value), now2);
|
|
39439
39479
|
}, "saveFirstPassPerChat");
|
|
39440
39480
|
|
|
39441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39481
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
39442
39482
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
39443
39483
|
var EXTERNAL_ID_CHARS = 200;
|
|
39444
39484
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -39465,7 +39505,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
39465
39505
|
return text7;
|
|
39466
39506
|
}, "sourceUrlOf");
|
|
39467
39507
|
|
|
39468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
39469
39509
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
39470
39510
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
39471
39511
|
name,
|
|
@@ -39717,7 +39757,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
39717
39757
|
var TASK_PEOPLE = `WITH merged AS (SELECT json_extract(value, '$[0]') AS id, json_extract(value, '$[1]') AS now FROM json_each(?)), counts AS (SELECT coalesce(m.now, a.assignee_id) AS person, count(DISTINCT t.id) AS n FROM task_assignments a JOIN tasks t ON t.id = a.task_id AND t.deleted_at IS NULL LEFT JOIN merged m ON m.id = a.assignee_id WHERE a.assignee_type = 'person' GROUP BY 1) SELECT p.id, p.name, p.owner, coalesce(c.n, 0) AS n FROM persons p LEFT JOIN counts c ON c.person = p.id WHERE NOT ${mergedAwaySql("p")} ORDER BY p.owner DESC, n DESC, p.name IS NULL, p.name COLLATE NOCASE, p.id LIMIT ?`;
|
|
39718
39758
|
var mergedAssignees = /* @__PURE__ */ __name((database) => JSON.stringify(database.prepare(`SELECT DISTINCT a.assignee_id AS id FROM task_assignments a JOIN persons p ON p.id = a.assignee_id WHERE a.assignee_type = 'person' AND ${mergedAwaySql("p")}`).all().map(({ id: id2 }) => [Number(id2), currentPerson(database, Number(id2))])), "mergedAssignees");
|
|
39719
39759
|
|
|
39720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
39721
39761
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
39722
39762
|
if (row2.author_type == null)
|
|
39723
39763
|
return null;
|
|
@@ -39745,7 +39785,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
39745
39785
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
39746
39786
|
}, "addComment");
|
|
39747
39787
|
|
|
39748
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
39749
39789
|
var TASK_RELATION_KINDS = [
|
|
39750
39790
|
"blocked-by",
|
|
39751
39791
|
"follow-up-of",
|
|
@@ -39875,7 +39915,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
39875
39915
|
};
|
|
39876
39916
|
}, "taskRelationsStoreOver");
|
|
39877
39917
|
|
|
39878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
39879
39919
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
39880
39920
|
var TASK_EVENT_KINDS = [
|
|
39881
39921
|
"created",
|
|
@@ -40434,7 +40474,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
40434
40474
|
};
|
|
40435
40475
|
}, "workTasksOver");
|
|
40436
40476
|
|
|
40437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40477
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
40438
40478
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
40439
40479
|
const { database, now: now2 } = context;
|
|
40440
40480
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -40483,7 +40523,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
40483
40523
|
};
|
|
40484
40524
|
}, "taskCloseOver");
|
|
40485
40525
|
|
|
40486
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
40487
40527
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
40488
40528
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
40489
40529
|
const { database, now: now2 } = context;
|
|
@@ -40702,7 +40742,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
40702
40742
|
};
|
|
40703
40743
|
}, "taskPairsOver");
|
|
40704
40744
|
|
|
40705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40745
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
40706
40746
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
40707
40747
|
var TASK_STATS_SQL = {
|
|
40708
40748
|
rows: /* @__PURE__ */ __name((board, filter) => `SELECT t.source_group, t.source_kind, t.project_id, t.status, t.created_at, t.closed_at FROM tasks t WHERE ${board ? PROJECT_SCOPE : ACCOUNT_SCOPE}${filter} ORDER BY t.created_at, t.id`, "rows"),
|
|
@@ -40741,7 +40781,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
40741
40781
|
}, "statNames")
|
|
40742
40782
|
}), "taskStatsOver");
|
|
40743
40783
|
|
|
40744
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
40745
40785
|
var COLUMNS3 = "t.id AS row_id, t.package_id, t.source_locator, t.source_kind, t.source_group, t.type, t.status, t.close_reason, t.source, t.created_at, t.due_at, t.closed_at, t.closed_by_type, t.closed_by_id, t.key, t.category, t.claimed_by, t.claimed_until, p.name AS account";
|
|
40746
40786
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
40747
40787
|
const key2 = inboxKey(account);
|
|
@@ -40957,7 +40997,7 @@ var oneOf4 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
40957
40997
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
40958
40998
|
}, "oneOf");
|
|
40959
40999
|
|
|
40960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
40961
41001
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
40962
41002
|
const { database } = context;
|
|
40963
41003
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -41027,7 +41067,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
41027
41067
|
};
|
|
41028
41068
|
}, "accountsStoreOver");
|
|
41029
41069
|
|
|
41030
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
41031
41071
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
41032
41072
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
41033
41073
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -41051,7 +41091,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
41051
41091
|
})), "keepDownloads");
|
|
41052
41092
|
var keepProviderRefs = /* @__PURE__ */ __name((context, chatKey, messageId, files2) => updatePlaced(context, chatKey, messageId, files2.filter((file) => Object.keys(file.providerRef).length > 0), (file) => refColumn(file.providerRef)), "keepProviderRefs");
|
|
41053
41093
|
|
|
41054
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
41055
41095
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
41056
41096
|
const { database } = context;
|
|
41057
41097
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -41108,7 +41148,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
41108
41148
|
}, "keepAttachmentText")
|
|
41109
41149
|
}), "attachmentsStoreOver");
|
|
41110
41150
|
|
|
41111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
41112
41152
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
41113
41153
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
41114
41154
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -41293,7 +41333,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
41293
41333
|
return done;
|
|
41294
41334
|
}, "rekeyChats");
|
|
41295
41335
|
|
|
41296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41336
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
41297
41337
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
41298
41338
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
41299
41339
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -41351,7 +41391,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
41351
41391
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
41352
41392
|
}, "chatCoverage");
|
|
41353
41393
|
|
|
41354
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41394
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
41355
41395
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
41356
41396
|
const { database } = context;
|
|
41357
41397
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -41500,7 +41540,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
41500
41540
|
};
|
|
41501
41541
|
}, "chatsStoreOver");
|
|
41502
41542
|
|
|
41503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41543
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
41504
41544
|
import { createHash as createHash7 } from "node:crypto";
|
|
41505
41545
|
var BATCH_CONTEXT = 50;
|
|
41506
41546
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -41638,7 +41678,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
41638
41678
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
41639
41679
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
41640
41680
|
|
|
41641
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41681
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
41642
41682
|
import { setTimeout } from "node:timers/promises";
|
|
41643
41683
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
41644
41684
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -41950,7 +41990,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
41950
41990
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
41951
41991
|
WHERE d.id IN (l.message_id, l.parent_id) AND d.deleted_at > l.created_at)`).map(({ id: id2, parent: parent2 }) => [id2, parent2])), "agentAnswers");
|
|
41952
41992
|
|
|
41953
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
41954
41994
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
41955
41995
|
const { database } = context;
|
|
41956
41996
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -42057,7 +42097,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42057
42097
|
};
|
|
42058
42098
|
}, "conversationsStoreOver");
|
|
42059
42099
|
|
|
42060
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42100
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
42061
42101
|
var LIVE_MESSAGE = "SELECT m.id AS pk FROM messages m JOIN chats c ON c.id=m.chat_id JOIN accounts ac ON ac.id=m.account_id WHERE ac.provider=? AND ac.external_id=? AND c.external_id=? AND m.external_id=? AND m.deleted_at IS NULL";
|
|
42062
42102
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
42063
42103
|
const { database } = context;
|
|
@@ -42082,7 +42122,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42082
42122
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
42083
42123
|
}), "countersStoreOver");
|
|
42084
42124
|
|
|
42085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42125
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
42086
42126
|
var MENTION_STATUSES = ["found", "linked", "proposed", "dismissed"];
|
|
42087
42127
|
var MENTION_QUERY = defineQuery({
|
|
42088
42128
|
entity: "mention",
|
|
@@ -42301,7 +42341,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
42301
42341
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
42302
42342
|
}, "listPlaces");
|
|
42303
42343
|
|
|
42304
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
42305
42345
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
42306
42346
|
const { database } = context;
|
|
42307
42347
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -42336,7 +42376,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42336
42376
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
42337
42377
|
}), "mentionsStoreOver");
|
|
42338
42378
|
|
|
42339
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
42340
42380
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
42341
42381
|
var MUTED_NOW = "(coalesce(c.muted,0)=1 AND (c.muted_until IS NULL OR c.muted_until>?))";
|
|
42342
42382
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2, now2) => {
|
|
@@ -42435,7 +42475,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
42435
42475
|
});
|
|
42436
42476
|
}, "waitingChats");
|
|
42437
42477
|
|
|
42438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-activity-counts.js
|
|
42439
42479
|
var SQL = `SELECT coalesce(nullif(trim(c.title), ''), (SELECT sender_name FROM messages WHERE chat_id = c.id AND outgoing = 0 AND deleted_at IS NULL ORDER BY sent_at DESC LIMIT 1)) AS title, ${MUTED_NOW} AS muted, w.messages, w.sent, (SELECT max(sent_at) FROM messages WHERE chat_id = c.id AND deleted_at IS NULL AND sent_at < ?) AS last FROM chats c, (SELECT count(*) AS messages, coalesce(sum(outgoing = 1), 0) AS sent FROM messages WHERE chat_id = ? AND deleted_at IS NULL AND sent_at >= ? AND sent_at < ?) w WHERE c.id = ?`;
|
|
42440
42480
|
var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since, until, now: now2 }) => {
|
|
42441
42481
|
const statement = database.prepare(SQL);
|
|
@@ -42455,7 +42495,7 @@ var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since
|
|
|
42455
42495
|
return found2;
|
|
42456
42496
|
}, "chatActivityCounts");
|
|
42457
42497
|
|
|
42458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
42459
42499
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
42460
42500
|
const read3 = database.prepare("SELECT m.id, m.external_id, m.text, m.sent_at, m.sender_name, coalesce(m.sender_chat_external_id, i.external_id) AS sender_id FROM messages m LEFT JOIN identities i ON i.id = m.sender_identity_id WHERE m.chat_id = ? AND m.deleted_at IS NULL AND (m.text LIKE '%google.com%' OR m.text LIKE '%forms.gle%') " + (messageId === void 0 ? "" : "AND m.external_id = ? ") + "ORDER BY m.sent_at DESC, m.id DESC");
|
|
42461
42501
|
const rows = messageId === void 0 ? read3.all(chatKey) : read3.all(chatKey, messageId);
|
|
@@ -42470,7 +42510,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
42470
42510
|
}));
|
|
42471
42511
|
}, "documentLinkMessages");
|
|
42472
42512
|
|
|
42473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
42474
42514
|
var stemmerFor = stemmerCache();
|
|
42475
42515
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
42476
42516
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -42514,7 +42554,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
42514
42554
|
});
|
|
42515
42555
|
}, "laterSharingRare");
|
|
42516
42556
|
|
|
42517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
42518
42558
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
42519
42559
|
const { database } = context;
|
|
42520
42560
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -42655,7 +42695,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42655
42695
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
42656
42696
|
}), "messagesStoreOver");
|
|
42657
42697
|
|
|
42658
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/person-kinds.js
|
|
42659
42699
|
var PERSON_KINDS = ["person", "organization", "automated", "stranger", "unsorted", "test"];
|
|
42660
42700
|
var AUTOMATED_WORDS = /* @__PURE__ */ new Set([
|
|
42661
42701
|
"noreply",
|
|
@@ -42718,7 +42758,7 @@ var isCompanyName = /* @__PURE__ */ __name((name) => {
|
|
|
42718
42758
|
return wordsOf3(name.replaceAll(".", "")).some((word2) => LEGAL_FORMS.has(word2) || COMPANY_WORDS.has(word2));
|
|
42719
42759
|
}, "isCompanyName");
|
|
42720
42760
|
|
|
42721
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-ties.js
|
|
42722
42762
|
var SMALL_GROUP_MEMBERS = 10;
|
|
42723
42763
|
var PERSON_TIES = ["chat", "small-group", "mail", "meeting", "crm", "phone-book"];
|
|
42724
42764
|
var ALWAYS_SHOWN = ["owner", "added", "task"];
|
|
@@ -42773,7 +42813,7 @@ var shownReasons = /* @__PURE__ */ __name((database, people2) => {
|
|
|
42773
42813
|
return new Map([...found2].map(([person2, reasons]) => [person2, ORDER.filter((one2) => reasons.has(one2))]));
|
|
42774
42814
|
}, "shownReasons");
|
|
42775
42815
|
|
|
42776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/people-list.js
|
|
42777
42817
|
var PEOPLE_SORTS = ["interactions", "recent", "name", "tasks"];
|
|
42778
42818
|
var MIN_QUERY = 3;
|
|
42779
42819
|
var ftsPhrase = /* @__PURE__ */ __name((text7) => `"${text7.replaceAll('"', '""')}"`, "ftsPhrase");
|
|
@@ -43119,7 +43159,7 @@ var similarPeople = /* @__PURE__ */ __name((database, typed, limit) => {
|
|
|
43119
43159
|
return withLastContact(database, rows).map((person2, at2) => ({ ...person2, sameName: same[at2] === true }));
|
|
43120
43160
|
}, "similarPeople");
|
|
43121
43161
|
|
|
43122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-doubts.js
|
|
43123
43163
|
var DOUBT_REASONS = ["owner-other-name", "test-data", "shared-address", "mixed-names"];
|
|
43124
43164
|
var COLUMNS5 = "l.person_id AS person, p.owner, p.name AS person_name, i.id AS pk, i.provider, i.external_id, i.name, i.phone, i.email, i.username, l.method, l.author, l.created_at, EXISTS (SELECT 1 FROM accounts a WHERE a.provider = i.provider AND a.external_id = i.external_id) AS account FROM identity_links l JOIN identities i ON i.id = l.identity_id JOIN persons p ON p.id = l.person_id";
|
|
43125
43165
|
var text4 = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? value : null, "text");
|
|
@@ -43375,7 +43415,7 @@ var markTestData = /* @__PURE__ */ __name((context, uid, by) => {
|
|
|
43375
43415
|
return { person: `person:${person2}`, identities: identities2 };
|
|
43376
43416
|
}, "markTestData");
|
|
43377
43417
|
|
|
43378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
43379
43419
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
43380
43420
|
var IN_SCOPES = "IN (SELECT value FROM json_each(?))";
|
|
43381
43421
|
var projectScope = /* @__PURE__ */ __name((id2) => `(SELECT p.scope FROM main.projects p WHERE p.id=${id2})`, "projectScope");
|
|
@@ -43444,7 +43484,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
43444
43484
|
});
|
|
43445
43485
|
}, "personPreparation");
|
|
43446
43486
|
|
|
43447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
43448
43488
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
43449
43489
|
const id2 = Number(uid);
|
|
43450
43490
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -43452,7 +43492,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
43452
43492
|
return Boolean(database.prepare("SELECT 1 FROM persons p JOIN identity_links l ON l.person_id=p.id JOIN account_identities a ON a.identity_id=l.identity_id WHERE p.id=? AND a.account_id IN (SELECT value FROM json_each(?)) LIMIT 1").get(currentPerson(database, id2), JSON.stringify(accountIds)));
|
|
43453
43493
|
}, "personSeenInAccounts");
|
|
43454
43494
|
|
|
43455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43495
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
43456
43496
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
43457
43497
|
const row2 = database.prepare("SELECT a.id AS account_id, i.id AS identity_id FROM accounts a JOIN account_identities ai ON ai.account_id=a.id JOIN identities i ON i.id=ai.identity_id WHERE a.provider=? AND a.external_id=? AND i.provider=? AND i.external_id=?").get(key2.provider, key2.account, key2.provider, personId);
|
|
43458
43498
|
if (!row2)
|
|
@@ -43519,7 +43559,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
43519
43559
|
return { id: id2, personId, removed: true };
|
|
43520
43560
|
}, "removeNote");
|
|
43521
43561
|
|
|
43522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
43523
43563
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
43524
43564
|
const { database } = context;
|
|
43525
43565
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -43646,13 +43686,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
43646
43686
|
};
|
|
43647
43687
|
}, "peopleStoreOver");
|
|
43648
43688
|
|
|
43649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
43650
43690
|
import { createHash as createHash9 } from "node:crypto";
|
|
43651
43691
|
|
|
43652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
43653
43693
|
import { createHash as createHash8 } from "node:crypto";
|
|
43654
43694
|
|
|
43655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
43656
43696
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
43657
43697
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
43658
43698
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -43874,7 +43914,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
43874
43914
|
};
|
|
43875
43915
|
}, "rankReplyGraph");
|
|
43876
43916
|
|
|
43877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
43878
43918
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
43879
43919
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
43880
43920
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -44048,7 +44088,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
44048
44088
|
return { items, evidence, summary, graph: graph.quality };
|
|
44049
44089
|
}, "calculateAdminStatistics");
|
|
44050
44090
|
|
|
44051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44091
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
44052
44092
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
44053
44093
|
const dates = [];
|
|
44054
44094
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -44070,7 +44110,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
44070
44110
|
return dates[0].node.resolution.date;
|
|
44071
44111
|
}, "rankingContextRange");
|
|
44072
44112
|
|
|
44073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
44074
44114
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
44075
44115
|
let counts;
|
|
44076
44116
|
try {
|
|
@@ -44365,7 +44405,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
44365
44405
|
});
|
|
44366
44406
|
}, "rankQuery");
|
|
44367
44407
|
|
|
44368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
44369
44409
|
function fail2(message3, reason = "query.too-large") {
|
|
44370
44410
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
44371
44411
|
}
|
|
@@ -44542,7 +44582,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
44542
44582
|
return result;
|
|
44543
44583
|
}), "adminStatisticsQuery");
|
|
44544
44584
|
|
|
44545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
44546
44586
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
44547
44587
|
if (!execution.accounts.length)
|
|
44548
44588
|
return { conversations: [], chats: [] };
|
|
@@ -44560,7 +44600,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
44560
44600
|
return { conversations: conversations2, chats: chats2 };
|
|
44561
44601
|
}, "conversationEligibility");
|
|
44562
44602
|
|
|
44563
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
44564
44604
|
import { createHash as createHash10 } from "node:crypto";
|
|
44565
44605
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
44566
44606
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -44710,7 +44750,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
44710
44750
|
return result;
|
|
44711
44751
|
}, "rankingEvidence");
|
|
44712
44752
|
|
|
44713
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
44714
44754
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
44715
44755
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
44716
44756
|
if (execution.corpus === "mail")
|
|
@@ -44731,7 +44771,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
44731
44771
|
};
|
|
44732
44772
|
}, "queriesStoreOver");
|
|
44733
44773
|
|
|
44734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44774
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
44735
44775
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
44736
44776
|
const { database, now: now2 } = context;
|
|
44737
44777
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -44770,10 +44810,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
44770
44810
|
}));
|
|
44771
44811
|
}, "chatEventsOf");
|
|
44772
44812
|
|
|
44773
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44813
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
44774
44814
|
import { createHash as createHash11 } from "node:crypto";
|
|
44775
44815
|
|
|
44776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
44777
44817
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
44778
44818
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
44779
44819
|
timeZone: zone,
|
|
@@ -44793,7 +44833,7 @@ var weekKey = /* @__PURE__ */ __name((day2) => {
|
|
|
44793
44833
|
return date3.toISOString().slice(0, 10);
|
|
44794
44834
|
}, "weekKey");
|
|
44795
44835
|
|
|
44796
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
44797
44837
|
var RETENTION_TOLERANCE = 864e5;
|
|
44798
44838
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
44799
44839
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -44847,7 +44887,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
44847
44887
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
44848
44888
|
}, "retentionCohorts");
|
|
44849
44889
|
|
|
44850
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
44851
44891
|
var iso10 = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString(), "iso");
|
|
44852
44892
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
44853
44893
|
validateRetentionOptions(options);
|
|
@@ -44978,7 +45018,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
44978
45018
|
};
|
|
44979
45019
|
}, "retentionQuery");
|
|
44980
45020
|
|
|
44981
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
44982
45022
|
var iso11 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
44983
45023
|
var marksOf = /* @__PURE__ */ __name(({ isBot: isBot2, flagged, deleted, hasPhoto }) => ({
|
|
44984
45024
|
...isBot2 === void 0 ? {} : { bot: isBot2 },
|
|
@@ -45107,7 +45147,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
45107
45147
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
45108
45148
|
})), "trackedChats");
|
|
45109
45149
|
|
|
45110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
45111
45151
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45112
45152
|
const { database } = context;
|
|
45113
45153
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -45163,7 +45203,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45163
45203
|
};
|
|
45164
45204
|
}, "rosterStoreOver");
|
|
45165
45205
|
|
|
45166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45206
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
45167
45207
|
var pendingNormalization = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM messages WHERE normalized_text IS NULL AND deleted_at IS NULL").get()?.n), "pendingNormalization");
|
|
45168
45208
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
45169
45209
|
const next = database.prepare(`SELECT id AS pk, text FROM messages WHERE normalized_text IS NULL AND deleted_at IS NULL AND id > ? ORDER BY id LIMIT ?`);
|
|
@@ -45187,7 +45227,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
45187
45227
|
}
|
|
45188
45228
|
}, "backfillNormalized");
|
|
45189
45229
|
|
|
45190
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
45191
45231
|
var INDEX2 = "message_words";
|
|
45192
45232
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
45193
45233
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -45314,7 +45354,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
45314
45354
|
});
|
|
45315
45355
|
}, "resetSearchIndex");
|
|
45316
45356
|
|
|
45317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
45318
45358
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
45319
45359
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
45320
45360
|
const before2 = stemsState(database);
|
|
@@ -45409,7 +45449,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
45409
45449
|
return resetStems(database, { now: now2 });
|
|
45410
45450
|
}, "followDefaultStemmers");
|
|
45411
45451
|
|
|
45412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45452
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
45413
45453
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
45414
45454
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
45415
45455
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -45431,7 +45471,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
45431
45471
|
});
|
|
45432
45472
|
}, "termCandidates");
|
|
45433
45473
|
|
|
45434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45474
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
45435
45475
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45436
45476
|
const { database } = context;
|
|
45437
45477
|
const stemmerFor2 = stemmerCache();
|
|
@@ -45455,7 +45495,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45455
45495
|
};
|
|
45456
45496
|
}, "searchIndexStoreOver");
|
|
45457
45497
|
|
|
45458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
45459
45499
|
var HISTORY_KEPT = 1e3;
|
|
45460
45500
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
45461
45501
|
var COLUMNS6 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -45525,7 +45565,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
45525
45565
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
45526
45566
|
}, "clearHistory");
|
|
45527
45567
|
|
|
45528
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45568
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
45529
45569
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45530
45570
|
const { database } = context;
|
|
45531
45571
|
return {
|
|
@@ -45549,7 +45589,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45549
45589
|
};
|
|
45550
45590
|
}, "searchesStoreOver");
|
|
45551
45591
|
|
|
45552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45592
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
45553
45593
|
import { createHash as createHash12 } from "node:crypto";
|
|
45554
45594
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
45555
45595
|
var TEXT_COLUMNS = "kind = ?, title = ?, file_name = ?, extension = ?, url = ?, mime = ?, size = ?, content_hash = ?, body = ?, extraction = ?, metadata = ?, language = ?";
|
|
@@ -45791,7 +45831,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
45791
45831
|
};
|
|
45792
45832
|
}, "addedSourcesOver");
|
|
45793
45833
|
|
|
45794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
45795
45835
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
45796
45836
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
45797
45837
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -45839,7 +45879,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
45839
45879
|
};
|
|
45840
45880
|
}, "agentActionsStoreOver");
|
|
45841
45881
|
|
|
45842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/base-suggest.js
|
|
45843
45883
|
var baseSettingKey = /* @__PURE__ */ __name((kind3) => `stages.base.${kind3}`, "baseSettingKey");
|
|
45844
45884
|
var storedPipeline = /* @__PURE__ */ __name((value) => {
|
|
45845
45885
|
if (typeof value !== "string")
|
|
@@ -45885,7 +45925,7 @@ var suggestBaseStages = /* @__PURE__ */ __name((database, kind3, pipelines2, { o
|
|
|
45885
45925
|
}
|
|
45886
45926
|
}, "suggestBaseStages");
|
|
45887
45927
|
|
|
45888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
45889
45929
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
45890
45930
|
var SOURCE = "crm";
|
|
45891
45931
|
var crmIdentityId = /* @__PURE__ */ __name((key2, externalId, type = "contact") => `${idPart(key2.account)}/${type}/${idPart(externalId)}`, "crmIdentityId");
|
|
@@ -46016,7 +46056,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
46016
46056
|
return { savePipeline, saveItemRow };
|
|
46017
46057
|
}, "crmRowsOver");
|
|
46018
46058
|
|
|
46019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activities.js
|
|
46020
46060
|
var ACTIVITY_RECORD = "crm.activity";
|
|
46021
46061
|
var MOST_BODY = 2e4;
|
|
46022
46062
|
var MOST_SUBJECT = 500;
|
|
@@ -46096,7 +46136,7 @@ var crmActivitiesOver = /* @__PURE__ */ __name((context) => {
|
|
|
46096
46136
|
return { save: save2, of };
|
|
46097
46137
|
}, "crmActivitiesOver");
|
|
46098
46138
|
|
|
46099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
46100
46140
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
46101
46141
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, cutoff) => {
|
|
46102
46142
|
const rows = database.prepare(`SELECT stage_id, currency, count(*) AS items, coalesce(sum(amount), 0) AS units FROM ${TABLES3[kind3]} WHERE stage_id IN (${stageIds.map(() => "?").join(", ") || "NULL"}) AND deleted_at IS NULL AND (? IS NULL OR created_at >= ?) GROUP BY stage_id, currency ORDER BY currency`).all(...stageIds, cutoff, cutoff);
|
|
@@ -46113,7 +46153,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, cuto
|
|
|
46113
46153
|
});
|
|
46114
46154
|
}, "stageAmountsOf");
|
|
46115
46155
|
|
|
46116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
46117
46157
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
46118
46158
|
var itemsSql = /* @__PURE__ */ __name((kind3) => `SELECT d.*, s.name AS stage_name, s.pipeline_id, p.name AS pipeline_name, b.name AS author_name, b.kind AS author_kind, a.provider AS account_provider, a.external_id AS account_external_id, bs.id AS base_stage_ref_id, bs.name AS base_stage_name FROM ${TABLES4[kind3]} d JOIN pipeline_stages s ON s.id = d.stage_id JOIN pipelines p ON p.id = s.pipeline_id LEFT JOIN bots b ON d.author_type = 'bot' AND b.id = d.author_id LEFT JOIN accounts a ON a.id = d.account_id LEFT JOIN pipeline_stages bs ON s.base_confirmed = 1 AND bs.id = s.base_stage_id`, "itemsSql");
|
|
46119
46159
|
var MAX_STAGES = 30;
|
|
@@ -46592,7 +46632,7 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46592
46632
|
};
|
|
46593
46633
|
}, "dealsStoreOver");
|
|
46594
46634
|
|
|
46595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
46596
46636
|
var KEY2 = "ownerLanguages";
|
|
46597
46637
|
var ISO_639_1 = new Set("aa ab ae af ak am an ar as av ay az ba be bg bi bm bn bo br bs ca ce ch co cr cs cu cv cy da de dv dz ee el en eo es et eu fa ff fi fj fo fr fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mr ms mt my na nb nd ne ng nl nn no nr nv ny oc oj om or os pa pi pl ps pt qu rm rn ro ru rw sa sc sd se sg si sk sl sm sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zu".split(" "));
|
|
46598
46638
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -46622,7 +46662,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
46622
46662
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(KEY2, JSON.stringify(languages), now2);
|
|
46623
46663
|
}, "saveOwnerLanguages");
|
|
46624
46664
|
|
|
46625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46665
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/base-stages.js
|
|
46626
46666
|
var OUTCOMES = {
|
|
46627
46667
|
lead: ["open", "open", "open", "won", "lost"],
|
|
46628
46668
|
deal: ["open", "open", "open", "open", "won", "lost"]
|
|
@@ -46955,7 +46995,7 @@ var baseStagesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46955
46995
|
};
|
|
46956
46996
|
}, "baseStagesStoreOver");
|
|
46957
46997
|
|
|
46958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
46959
46999
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
46960
47000
|
}) => {
|
|
46961
47001
|
const { database, now: now2 } = context;
|
|
@@ -47014,7 +47054,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
47014
47054
|
};
|
|
47015
47055
|
}, "botUpdateStoreOver");
|
|
47016
47056
|
|
|
47017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
47018
47058
|
var IMPORTER = { bot: "import" };
|
|
47019
47059
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
47020
47060
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -47059,7 +47099,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
47059
47099
|
};
|
|
47060
47100
|
}), "moneyLinesOf");
|
|
47061
47101
|
|
|
47062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
47063
47103
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
47064
47104
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
47065
47105
|
var listOf2 = /* @__PURE__ */ __name((list2) => {
|
|
@@ -47143,7 +47183,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
47143
47183
|
};
|
|
47144
47184
|
}, "relationRolesOver");
|
|
47145
47185
|
|
|
47146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
47147
47187
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
47148
47188
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
47149
47189
|
var CRM_SCOPES = ["mine", "all"];
|
|
@@ -47338,7 +47378,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
47338
47378
|
return [{ setting: String(row2.key), value: settingValue(database, parsed4.key, parsed4.name) }];
|
|
47339
47379
|
}), "crmSettingsOf");
|
|
47340
47380
|
|
|
47341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
47342
47382
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
47343
47383
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
47344
47384
|
id: link3.id,
|
|
@@ -47669,7 +47709,7 @@ var positionOf = /* @__PURE__ */ __name((position2) => {
|
|
|
47669
47709
|
var changesOf = /* @__PURE__ */ __name((input) => {
|
|
47670
47710
|
const changes = {};
|
|
47671
47711
|
if (input.role !== void 0)
|
|
47672
|
-
changes.role = input.role === null ? null :
|
|
47712
|
+
changes.role = input.role === null ? null : roleOf4(input.role);
|
|
47673
47713
|
if (input.purpose !== void 0)
|
|
47674
47714
|
changes.purpose = input.purpose === null ? null : purposeOf(input.purpose);
|
|
47675
47715
|
if (input.position !== void 0)
|
|
@@ -47686,7 +47726,7 @@ var changesOf = /* @__PURE__ */ __name((input) => {
|
|
|
47686
47726
|
throw new CliError("validation_error", "a relationship update sets a role, a role note, an engagement level, a purpose, a position or its dates");
|
|
47687
47727
|
return changes;
|
|
47688
47728
|
}, "changesOf");
|
|
47689
|
-
var
|
|
47729
|
+
var roleOf4 = /* @__PURE__ */ __name((role) => {
|
|
47690
47730
|
const value = role.trim();
|
|
47691
47731
|
if (!value || value.length > 200)
|
|
47692
47732
|
throw new CliError("validation_error", "a role takes 1\u2013200 characters");
|
|
@@ -47698,7 +47738,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
47698
47738
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
47699
47739
|
}, "decidedOrigin");
|
|
47700
47740
|
|
|
47701
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47741
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
47702
47742
|
var keyOf4 = /* @__PURE__ */ __name((kind3, fromType, fromId, toType, toId, role) => `${String(kind3)}|${String(fromType)}:${String(fromId)}|${String(toType)}:${String(toId)}|${role == null ? "" : String(role)}`, "keyOf");
|
|
47703
47743
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
47704
47744
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" }, onOutcome } = {}) => {
|
|
@@ -47836,7 +47876,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
47836
47876
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
47837
47877
|
}), "relationsStoreOver");
|
|
47838
47878
|
|
|
47839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relationships.js
|
|
47840
47880
|
var importSource = /* @__PURE__ */ __name((provider) => `import:${provider}`, "importSource");
|
|
47841
47881
|
var noRelationships = /* @__PURE__ */ __name(() => ({
|
|
47842
47882
|
added: 0,
|
|
@@ -48026,7 +48066,7 @@ var recordRelationshipsOver = /* @__PURE__ */ __name((context) => {
|
|
|
48026
48066
|
return { report, placeOf: placeOf2, withdrawFrom };
|
|
48027
48067
|
}, "recordRelationshipsOver");
|
|
48028
48068
|
|
|
48029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
48030
48070
|
var CONTRACTS = "SELECT k.*, b.name AS author_name, b.kind AS author_kind FROM contracts k LEFT JOIN bots b ON k.author_type = 'bot' AND b.id = k.author_id";
|
|
48031
48071
|
var DAY_MS2 = 864e5;
|
|
48032
48072
|
var deadlineOf = /* @__PURE__ */ __name((expiration, days) => expiration === null || days === null ? null : new Date(Date.parse(`${expiration}T00:00:00Z`) - days * DAY_MS2).toISOString().slice(0, 10), "deadlineOf");
|
|
@@ -48185,7 +48225,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48185
48225
|
};
|
|
48186
48226
|
}, "contractsStoreOver");
|
|
48187
48227
|
|
|
48188
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48228
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
48189
48229
|
var BUSINESS_FIND_MAX = 2001;
|
|
48190
48230
|
var party2 = /* @__PURE__ */ __name((kind3, id2, as) => `LEFT JOIN persons ${as}p ON ${kind3} = 'person' AND ${as}p.id = ${id2} AND ${as}p.owner = 0 LEFT JOIN organizations ${as}o ON ${kind3} = 'organization' AND ${as}o.id = ${id2} LEFT JOIN projects ${as}j ON ${kind3} = 'project' AND ${as}j.id = ${id2}`, "party");
|
|
48191
48231
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
@@ -48290,7 +48330,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
48290
48330
|
};
|
|
48291
48331
|
}, "businessSearchOver");
|
|
48292
48332
|
|
|
48293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
48294
48334
|
var DAY4 = 864e5;
|
|
48295
48335
|
var COUNTERPART_LINK = `EXISTS (SELECT 1 FROM links l WHERE l.from_type = 'event' AND l.from_id = e.id AND l.to_type = 'person' AND l.to_id = ? AND l.kind = ${linkKind("related-to")} AND l.role = '${COUNTERPART_ROLE}')`;
|
|
48296
48336
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -48400,7 +48440,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
48400
48440
|
return database.prepare(`SELECT e.* FROM events e WHERE ${clauses.join(" AND ")} ORDER BY ${filter.newest ? "e.starts_at DESC, e.id DESC" : "e.starts_at, e.id"} LIMIT ? OFFSET ?`).all(...params, limit, offset).map(eventOf);
|
|
48401
48441
|
}, "listEvents");
|
|
48402
48442
|
|
|
48403
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
48404
48444
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
48405
48445
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
48406
48446
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -48457,7 +48497,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
48457
48497
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
48458
48498
|
}, "forgetCalendarRows");
|
|
48459
48499
|
|
|
48460
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
48461
48501
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
48462
48502
|
id: Number(row2.id),
|
|
48463
48503
|
accountId: Number(row2.account_id),
|
|
@@ -49060,7 +49100,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49060
49100
|
};
|
|
49061
49101
|
}, "eventStoreOver");
|
|
49062
49102
|
|
|
49063
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
49064
49104
|
var CATALOG_QUERY = defineQuery({
|
|
49065
49105
|
entity: "document",
|
|
49066
49106
|
backend: "sql",
|
|
@@ -49302,7 +49342,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
49302
49342
|
};
|
|
49303
49343
|
}, "catalogStoreOver");
|
|
49304
49344
|
|
|
49305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
49306
49346
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
49307
49347
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
49308
49348
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -49315,7 +49355,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
49315
49355
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
49316
49356
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
49317
49357
|
|
|
49318
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
49319
49359
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
49320
49360
|
const { source: source2, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
49321
49361
|
signal?.throwIfAborted();
|
|
@@ -49414,7 +49454,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
49414
49454
|
});
|
|
49415
49455
|
}, "readMeetingContextEvidence");
|
|
49416
49456
|
|
|
49417
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
49418
49458
|
var corpora = {
|
|
49419
49459
|
message: {
|
|
49420
49460
|
table: "messages",
|
|
@@ -49653,7 +49693,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
49653
49693
|
}
|
|
49654
49694
|
}), "contextRecordsOver");
|
|
49655
49695
|
|
|
49656
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49696
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-contacts.js
|
|
49657
49697
|
var PLACEHOLDER = /(?:^|\s)null(?:\s+#\d+)?(?=\s|$)/gi;
|
|
49658
49698
|
var withoutPlaceholder = /* @__PURE__ */ __name((name) => name.replace(PLACEHOLDER, " ").replace(/\s+/g, " ").trim() || null, "withoutPlaceholder");
|
|
49659
49699
|
var DryRun = class extends Error {
|
|
@@ -49730,7 +49770,7 @@ var removeCrmContacts = /* @__PURE__ */ __name((context, key2, { users, before:
|
|
|
49730
49770
|
}
|
|
49731
49771
|
}, "removeCrmContacts");
|
|
49732
49772
|
|
|
49733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-stage-entries.js
|
|
49734
49774
|
var STAGE_ENTRY_RECORD = "crm.stage-entry";
|
|
49735
49775
|
var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
49736
49776
|
const { database, now: now2 } = context;
|
|
@@ -49777,7 +49817,7 @@ var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
49777
49817
|
return { save: save2, pending, handled };
|
|
49778
49818
|
}, "crmStageEntriesOver");
|
|
49779
49819
|
|
|
49780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
49781
49821
|
var PENDING = "crm:pending-relations";
|
|
49782
49822
|
var PENDING_DAYS = 30;
|
|
49783
49823
|
var PENDING_MOST = 5e3;
|
|
@@ -50286,10 +50326,10 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
50286
50326
|
};
|
|
50287
50327
|
}, "crmCopiesOver");
|
|
50288
50328
|
|
|
50289
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
50290
50330
|
import { createHash as createHash13, randomBytes as randomBytes2 } from "node:crypto";
|
|
50291
50331
|
|
|
50292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
50293
50333
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
50294
50334
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
50295
50335
|
var CALLBACK_PREFIX = "wcr1:";
|
|
@@ -50303,7 +50343,7 @@ var callbackDataOf = /* @__PURE__ */ __name((token) => {
|
|
|
50303
50343
|
}, "callbackDataOf");
|
|
50304
50344
|
var parseCallbackData = /* @__PURE__ */ __name((data) => typeof data === "string" ? CALLBACK.exec(data)?.[1] : void 0, "parseCallbackData");
|
|
50305
50345
|
|
|
50306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
50307
50347
|
var digestOf = /* @__PURE__ */ __name((token) => createHash13("sha256").update(token).digest("hex"), "digestOf");
|
|
50308
50348
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
50309
50349
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -50402,7 +50442,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
50402
50442
|
};
|
|
50403
50443
|
}, "decisionRequestStoreOver");
|
|
50404
50444
|
|
|
50405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50445
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
50406
50446
|
var NOTE_FIELDS = [
|
|
50407
50447
|
"text",
|
|
50408
50448
|
"exact",
|
|
@@ -50843,7 +50883,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
50843
50883
|
};
|
|
50844
50884
|
}, "noteSearchOver");
|
|
50845
50885
|
|
|
50846
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
50847
50887
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
50848
50888
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
50849
50889
|
var EVENT_CORPUS = {
|
|
@@ -50975,7 +51015,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
50975
51015
|
};
|
|
50976
51016
|
}, "eventSearchOver");
|
|
50977
51017
|
|
|
50978
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
50979
51019
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
50980
51020
|
try {
|
|
50981
51021
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -50987,7 +51027,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
50987
51027
|
}
|
|
50988
51028
|
}, "calendarMoment");
|
|
50989
51029
|
|
|
50990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51030
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
50991
51031
|
var NAMED4 = "SELECT f.*, b.name AS author_name, b.kind AS author_kind FROM facts f LEFT JOIN bots b ON f.author_type = 'bot' AND b.id = f.author_id";
|
|
50992
51032
|
var iso13 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
50993
51033
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -51210,7 +51250,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51210
51250
|
};
|
|
51211
51251
|
}, "factsStoreOver");
|
|
51212
51252
|
|
|
51213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
51214
51254
|
var invalid2 = /* @__PURE__ */ __name((message3) => {
|
|
51215
51255
|
throw new CliError("validation_error", message3);
|
|
51216
51256
|
}, "invalid");
|
|
@@ -51378,7 +51418,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
51378
51418
|
return { snapshot: snapshot2, snapshotParts, previous, settle, keepWaiting, named: named3, sameDecision, create };
|
|
51379
51419
|
}, "findingsCoreOver");
|
|
51380
51420
|
|
|
51381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51421
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
51382
51422
|
var stale = /* @__PURE__ */ __name(() => {
|
|
51383
51423
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
51384
51424
|
reason: "evidence-findings.stale"
|
|
@@ -51642,7 +51682,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51642
51682
|
};
|
|
51643
51683
|
}, "evidenceFindingsStoreOver");
|
|
51644
51684
|
|
|
51645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51685
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
51646
51686
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
51647
51687
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
51648
51688
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -51696,7 +51736,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
51696
51736
|
}, "forPerson")
|
|
51697
51737
|
}), "involvementStoreOver");
|
|
51698
51738
|
|
|
51699
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51739
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
51700
51740
|
var LABELLED = {
|
|
51701
51741
|
note: "note",
|
|
51702
51742
|
document: "document",
|
|
@@ -51708,7 +51748,7 @@ var LABELLED = {
|
|
|
51708
51748
|
account: "folder"
|
|
51709
51749
|
};
|
|
51710
51750
|
|
|
51711
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
51712
51752
|
import { createHash as createHash14 } from "node:crypto";
|
|
51713
51753
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
51714
51754
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -51794,7 +51834,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
51794
51834
|
};
|
|
51795
51835
|
}, "meetingProjectsStoreOver");
|
|
51796
51836
|
|
|
51797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
51798
51838
|
var ORGANIZATIONS_QUERY = {
|
|
51799
51839
|
entity: "organization",
|
|
51800
51840
|
backend: "sql",
|
|
@@ -51835,7 +51875,7 @@ var REMINDERS_QUERY = {
|
|
|
51835
51875
|
})
|
|
51836
51876
|
};
|
|
51837
51877
|
|
|
51838
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-categories.js
|
|
51839
51879
|
var OWN2 = "(SELECT id FROM organizations WHERE deleted_at IS NULL AND json_extract(metadata, '$.own') = 1)";
|
|
51840
51880
|
var EMPLOYED = "('employee', 'contractor', 'founder')";
|
|
51841
51881
|
var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now2) => {
|
|
@@ -51856,7 +51896,7 @@ var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now
|
|
|
51856
51896
|
return { sql: `EXISTS (SELECT 1 FROM links l WHERE ${where} AND ${usable})`, params: keys };
|
|
51857
51897
|
}, "categorySql");
|
|
51858
51898
|
|
|
51859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
51860
51900
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
51861
51901
|
id: String(row2.id),
|
|
51862
51902
|
ref: `organization:${row2.id}`,
|
|
@@ -51901,7 +51941,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
51901
51941
|
}), "setOwnOrganization")
|
|
51902
51942
|
}), "organizationsStoreOver");
|
|
51903
51943
|
|
|
51904
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
51905
51945
|
var KINDS = RELATION_KINDS.map(linkKind).join(", ");
|
|
51906
51946
|
var ACCOUNT_ENDS = [
|
|
51907
51947
|
["deal", "deals"],
|
|
@@ -52003,14 +52043,14 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
52003
52043
|
return { items, hasMore: rows.length > limit };
|
|
52004
52044
|
}, "listRelations")
|
|
52005
52045
|
};
|
|
52006
|
-
function
|
|
52046
|
+
function roleOf5(kind3, from2, to, role) {
|
|
52007
52047
|
const fromThing = thingOf(database, from2);
|
|
52008
52048
|
const toThing = thingOf(database, to);
|
|
52009
52049
|
const roleList = fromThing && toThing && roleListOf(kind3, fromThing.type, toThing.type) || null;
|
|
52010
52050
|
const custom = role !== null && roleList !== null && !ROLE_LISTS[roleList].includes(role) && !ownerRolesOf(database, roleList).some(({ id: id2 }) => id2 === role);
|
|
52011
52051
|
return { roleList, custom };
|
|
52012
52052
|
}
|
|
52013
|
-
__name(
|
|
52053
|
+
__name(roleOf5, "roleOf");
|
|
52014
52054
|
function linkItem(id2, at2) {
|
|
52015
52055
|
const link3 = linkOf(database, database.prepare("SELECT * FROM links WHERE id = ?").get(id2));
|
|
52016
52056
|
if (!link3.from || !link3.to)
|
|
@@ -52019,7 +52059,7 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
52019
52059
|
return {
|
|
52020
52060
|
...relation,
|
|
52021
52061
|
source: "link",
|
|
52022
|
-
...
|
|
52062
|
+
...roleOf5(relation.kind, relation.from, relation.to, relation.role)
|
|
52023
52063
|
};
|
|
52024
52064
|
}
|
|
52025
52065
|
__name(linkItem, "linkItem");
|
|
@@ -52046,19 +52086,19 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
52046
52086
|
endsAt: iso17(payload.endsAt),
|
|
52047
52087
|
createdAt: action.createdAt,
|
|
52048
52088
|
source: "proposal",
|
|
52049
|
-
...
|
|
52089
|
+
...roleOf5(payload.kind, payload.from, payload.to, payload.role ?? null)
|
|
52050
52090
|
};
|
|
52051
52091
|
}
|
|
52052
52092
|
__name(proposalItem, "proposalItem");
|
|
52053
52093
|
}, "relationListOver");
|
|
52054
52094
|
|
|
52055
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
52056
52096
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
52057
52097
|
...relationListOver(context),
|
|
52058
52098
|
...relationRolesOver(context)
|
|
52059
52099
|
}), "relationReadsOver");
|
|
52060
52100
|
|
|
52061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52101
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
52062
52102
|
var TABLES5 = { memory: "memories", fact: "facts" };
|
|
52063
52103
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
52064
52104
|
var DEFAULT_LIMIT = 500;
|
|
@@ -52301,16 +52341,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52301
52341
|
};
|
|
52302
52342
|
}, "sourceReviewStoreOver");
|
|
52303
52343
|
|
|
52304
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
52305
52345
|
import { createHash as createHash17 } from "node:crypto";
|
|
52306
52346
|
|
|
52307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
52308
52348
|
import { createHash as createHash16 } from "node:crypto";
|
|
52309
52349
|
|
|
52310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
52311
52351
|
import { createHash as createHash15 } from "node:crypto";
|
|
52312
52352
|
|
|
52313
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
52314
52354
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
52315
52355
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
52316
52356
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -52361,7 +52401,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
52361
52401
|
return input;
|
|
52362
52402
|
}, "consolidationApplyInput");
|
|
52363
52403
|
|
|
52364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52404
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
52365
52405
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
52366
52406
|
id: String(row2.id),
|
|
52367
52407
|
sourceId: String(row2.source_id),
|
|
@@ -52436,7 +52476,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
52436
52476
|
}, { beforeCommit: check3 });
|
|
52437
52477
|
}, "applyTagConsolidation");
|
|
52438
52478
|
|
|
52439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
52440
52480
|
var selections = [
|
|
52441
52481
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
52442
52482
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -52580,7 +52620,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
52580
52620
|
};
|
|
52581
52621
|
}, "previewRows");
|
|
52582
52622
|
|
|
52583
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
52584
52624
|
var kinds = ["project", "tag", "topic"];
|
|
52585
52625
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
52586
52626
|
if (signal?.aborted)
|
|
@@ -52844,7 +52884,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52844
52884
|
};
|
|
52845
52885
|
}, "vocabularyStoreOver");
|
|
52846
52886
|
|
|
52847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52887
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
52848
52888
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
52849
52889
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
52850
52890
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -53395,7 +53435,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
53395
53435
|
return key2.padEnd(3, "X");
|
|
53396
53436
|
}, "projectKey");
|
|
53397
53437
|
|
|
53398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53438
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
53399
53439
|
var DAY5 = 864e5;
|
|
53400
53440
|
var SETTING5 = "logs_pruned_at";
|
|
53401
53441
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -53422,7 +53462,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
53422
53462
|
};
|
|
53423
53463
|
}, "logPruner");
|
|
53424
53464
|
|
|
53425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53465
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
53426
53466
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
53427
53467
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
53428
53468
|
var invalid4 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -53781,7 +53821,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
53781
53821
|
}, "checkMailFindings");
|
|
53782
53822
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
53783
53823
|
|
|
53784
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
53785
53825
|
var ORDERS = "SELECT o.*, b.name AS author_name, b.kind AS author_kind FROM orders o LEFT JOIN bots b ON o.author_type = 'bot' AND b.id = o.author_id";
|
|
53786
53826
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
53787
53827
|
const { database, now: now2 } = context;
|
|
@@ -53996,7 +54036,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
53996
54036
|
};
|
|
53997
54037
|
}, "ordersStoreOver");
|
|
53998
54038
|
|
|
53999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
54000
54040
|
var MAIL_EDITS = {
|
|
54001
54041
|
task: ["title", "type", "reason", "commitment", "project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence"],
|
|
54002
54042
|
fact: ["statement", "type", "reason", "subject", "project"],
|
|
@@ -54485,7 +54525,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
54485
54525
|
};
|
|
54486
54526
|
}, "mailFindingsStoreOver");
|
|
54487
54527
|
|
|
54488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54528
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
54489
54529
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
54490
54530
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
54491
54531
|
reason: "meeting-findings.stale"
|
|
@@ -54698,7 +54738,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54698
54738
|
};
|
|
54699
54739
|
}, "meetingFindingsStoreOver");
|
|
54700
54740
|
|
|
54701
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54741
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
54702
54742
|
var RANK_BATCH = 512;
|
|
54703
54743
|
var LIVE5 = "FROM chunks k JOIN meeting_transcripts t ON k.chunkable_type = 'meeting_transcript' AND t.id = k.chunkable_id JOIN meetings m ON m.id = t.meeting_id WHERE m.account_id = ? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL";
|
|
54704
54744
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -54969,7 +55009,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
54969
55009
|
}
|
|
54970
55010
|
}), "meetingVectorsOver");
|
|
54971
55011
|
|
|
54972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55012
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
54973
55013
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
54974
55014
|
var TEXTS = {
|
|
54975
55015
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -55070,7 +55110,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55070
55110
|
};
|
|
55071
55111
|
}, "sourceMentionStoreOver");
|
|
55072
55112
|
|
|
55073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
55074
55114
|
var TRANSACTIONS = "SELECT t.*, w.name AS wallet_name, b.name AS author_name, b.kind AS author_kind, (SELECT coalesce(sum(amount), 0) FROM transaction_splits WHERE transaction_id = t.id) AS split FROM financial_transactions t JOIN financial_accounts w ON w.id = t.financial_account_id LEFT JOIN bots b ON t.author_type = 'bot' AND b.id = t.author_id";
|
|
55075
55115
|
var MAX_SPLITS = 100;
|
|
55076
55116
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -55304,11 +55344,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55304
55344
|
};
|
|
55305
55345
|
}, "transactionsStoreOver");
|
|
55306
55346
|
|
|
55307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
55308
55348
|
import { accessSync, constants, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
55309
55349
|
import { dirname as dirname2 } from "node:path";
|
|
55310
55350
|
|
|
55311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
55312
55352
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
55313
55353
|
var CLIENTS_SETTING = "clients";
|
|
55314
55354
|
var coreVersion = (() => {
|
|
@@ -55369,7 +55409,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
55369
55409
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
55370
55410
|
}, "refusalAdvice");
|
|
55371
55411
|
|
|
55372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
55373
55413
|
var GENERATED = [
|
|
55374
55414
|
{
|
|
55375
55415
|
"name": "20261010184427_initial",
|
|
@@ -56723,7 +56763,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
56723
56763
|
}
|
|
56724
56764
|
];
|
|
56725
56765
|
|
|
56726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56766
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
56727
56767
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
56728
56768
|
import { basename, dirname, join as join3, parse } from "node:path";
|
|
56729
56769
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -56754,7 +56794,7 @@ var tableBytes = /* @__PURE__ */ __name((database, tables) => {
|
|
|
56754
56794
|
}
|
|
56755
56795
|
}, "tableBytes");
|
|
56756
56796
|
var stampOf = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString().replace(/[:.]/g, "-"), "stampOf");
|
|
56757
|
-
var
|
|
56797
|
+
var attach2 = /* @__PURE__ */ __name((database, path) => database.prepare(`ATTACH DATABASE ? AS ${SCHEMA}`).run(path), "attach");
|
|
56758
56798
|
var takeRollbackCopy = /* @__PURE__ */ __name((database, { from: from2, to, tables, at: at2 }, { store, freeBytes = freeBytesOf, warn = /* @__PURE__ */ __name((line) => process.stderr.write(`${line}
|
|
56759
56799
|
`), "warn") }) => {
|
|
56760
56800
|
const dir = join3(dirname(store), "backups");
|
|
@@ -56771,7 +56811,7 @@ var takeRollbackCopy = /* @__PURE__ */ __name((database, { from: from2, to, tabl
|
|
|
56771
56811
|
}
|
|
56772
56812
|
path = join3(dir, `${parse(store).name}-rollback-schema-${from2}-${stampOf(at2)}.db`);
|
|
56773
56813
|
writeFileSync(path, "", { flag: "wx", mode: 384 });
|
|
56774
|
-
|
|
56814
|
+
attach2(database, path);
|
|
56775
56815
|
try {
|
|
56776
56816
|
database.exec("BEGIN IMMEDIATE");
|
|
56777
56817
|
try {
|
|
@@ -56912,7 +56952,7 @@ var restoreRows = /* @__PURE__ */ __name((database, table) => {
|
|
|
56912
56952
|
database.exec(`INSERT INTO main.${quote2(table)} (${into}) SELECT ${from2} FROM ${SCHEMA}.${quote2(table)}`);
|
|
56913
56953
|
}, "restoreRows");
|
|
56914
56954
|
var rollBack2 = /* @__PURE__ */ __name((database, path) => {
|
|
56915
|
-
|
|
56955
|
+
attach2(database, path);
|
|
56916
56956
|
let result;
|
|
56917
56957
|
try {
|
|
56918
56958
|
if (!tableIn(database, SCHEMA, "rollback_meta"))
|
|
@@ -56956,7 +56996,7 @@ var rollBack2 = /* @__PURE__ */ __name((database, path) => {
|
|
|
56956
56996
|
return { ...result, foreignKeyViolations };
|
|
56957
56997
|
}, "rollBack");
|
|
56958
56998
|
|
|
56959
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
56960
57000
|
var V31_TABLES = [
|
|
56961
57001
|
"accounts",
|
|
56962
57002
|
"account_identities",
|
|
@@ -57121,7 +57161,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
57121
57161
|
return migrations;
|
|
57122
57162
|
}, "generatedMigrations");
|
|
57123
57163
|
|
|
57124
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57164
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
57125
57165
|
var MIGRATIONS = generatedMigrations();
|
|
57126
57166
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
57127
57167
|
version INTEGER PRIMARY KEY,
|
|
@@ -57218,7 +57258,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
57218
57258
|
}
|
|
57219
57259
|
}, "migrate");
|
|
57220
57260
|
|
|
57221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
57222
57262
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
57223
57263
|
const pending = database.prepare("SELECT id, join_url FROM meetings WHERE join_url IS NOT NULL AND join_key IS NULL AND id > ? ORDER BY id LIMIT ?");
|
|
57224
57264
|
if (pending.get(0, 1) === void 0)
|
|
@@ -57240,7 +57280,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
57240
57280
|
}
|
|
57241
57281
|
}, "fillJoinKeys");
|
|
57242
57282
|
|
|
57243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
57244
57284
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
57245
57285
|
refuseOwnerStoreInTests(path);
|
|
57246
57286
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -57254,8 +57294,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
57254
57294
|
}, "openSqlite");
|
|
57255
57295
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
57256
57296
|
quietSqliteWarning();
|
|
57257
|
-
const { drizzle } = await import("./node-
|
|
57258
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
57297
|
+
const { drizzle } = await import("./node-42G4RGMW.js");
|
|
57298
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-KQZM5M3N.js");
|
|
57259
57299
|
const client = await nodeClient(path, { readOnly });
|
|
57260
57300
|
try {
|
|
57261
57301
|
if (!readOnly)
|
|
@@ -57269,8 +57309,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
57269
57309
|
}
|
|
57270
57310
|
}, "openUnderNode");
|
|
57271
57311
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
57272
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
57273
|
-
const { drizzle } = await import("./bun-
|
|
57312
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-FPVHKI24.js");
|
|
57313
|
+
const { drizzle } = await import("./bun-RDYA5FCZ.js");
|
|
57274
57314
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
57275
57315
|
try {
|
|
57276
57316
|
if (!readOnly)
|
|
@@ -57284,7 +57324,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
57284
57324
|
}
|
|
57285
57325
|
}, "openUnderBun");
|
|
57286
57326
|
|
|
57287
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
57288
57328
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
57289
57329
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
57290
57330
|
try {
|
|
@@ -57352,7 +57392,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
57352
57392
|
});
|
|
57353
57393
|
}, "movePaymentFacts");
|
|
57354
57394
|
|
|
57355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
57356
57396
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
57357
57397
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
57358
57398
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -57370,7 +57410,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
57370
57410
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
57371
57411
|
}, "assertReadCompatible");
|
|
57372
57412
|
|
|
57373
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
57374
57414
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
57375
57415
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
57376
57416
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -57416,7 +57456,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
57416
57456
|
});
|
|
57417
57457
|
}, "moveSuggestedLinks");
|
|
57418
57458
|
|
|
57419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
57420
57460
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
57421
57461
|
var TEST_PROVIDER = "chat";
|
|
57422
57462
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -57437,7 +57477,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
57437
57477
|
}
|
|
57438
57478
|
}, "purgeTestAccounts");
|
|
57439
57479
|
|
|
57440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
57441
57481
|
var BACKFILL_ON_OPEN = 5e3;
|
|
57442
57482
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
57443
57483
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -57549,7 +57589,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
57549
57589
|
}
|
|
57550
57590
|
}, "openStoreContext");
|
|
57551
57591
|
|
|
57552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57592
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
57553
57593
|
var PRODUCTS = "SELECT c.*, b.name AS author_name, b.kind AS author_kind FROM catalog_items c LEFT JOIN bots b ON c.author_type = 'bot' AND b.id = c.author_id";
|
|
57554
57594
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
57555
57595
|
const { database, now: now2 } = context;
|
|
@@ -57657,13 +57697,13 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57657
57697
|
};
|
|
57658
57698
|
}, "productsStoreOver");
|
|
57659
57699
|
|
|
57660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57700
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
57661
57701
|
import { createHash as createHash19 } from "node:crypto";
|
|
57662
57702
|
|
|
57663
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
57664
57704
|
import { createHash as createHash18 } from "node:crypto";
|
|
57665
57705
|
|
|
57666
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
57667
57707
|
var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
57668
57708
|
var ref = text5(2048);
|
|
57669
57709
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -57733,7 +57773,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
57733
57773
|
}))
|
|
57734
57774
|
});
|
|
57735
57775
|
|
|
57736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
57737
57777
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
57738
57778
|
var invalid7 = /* @__PURE__ */ __name((field4) => {
|
|
57739
57779
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -57866,7 +57906,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
57866
57906
|
return createHash18("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
57867
57907
|
}, "projectAnnotationsFingerprint");
|
|
57868
57908
|
|
|
57869
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57909
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
57870
57910
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
57871
57911
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
57872
57912
|
var targetSchema = strictObject({
|
|
@@ -57973,7 +58013,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
57973
58013
|
}, "planBoundProjectAnnotations");
|
|
57974
58014
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
57975
58015
|
|
|
57976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58016
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
57977
58017
|
import { createHash as createHash20 } from "node:crypto";
|
|
57978
58018
|
var text6 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
57979
58019
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -58067,7 +58107,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
58067
58107
|
})).digest("hex");
|
|
58068
58108
|
}, "projectAnnotationSnapshotFingerprint");
|
|
58069
58109
|
|
|
58070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
58071
58111
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
58072
58112
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
58073
58113
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -58084,7 +58124,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
58084
58124
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
58085
58125
|
}, "projectAnnotationRequest");
|
|
58086
58126
|
|
|
58087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
58088
58128
|
var SnapshotBudget = class {
|
|
58089
58129
|
static {
|
|
58090
58130
|
__name(this, "SnapshotBudget");
|
|
@@ -58110,13 +58150,13 @@ var SnapshotBudget = class {
|
|
|
58110
58150
|
}
|
|
58111
58151
|
};
|
|
58112
58152
|
|
|
58113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
58114
58154
|
import { createHash as createHash22 } from "node:crypto";
|
|
58115
58155
|
|
|
58116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
58117
58157
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
58118
58158
|
|
|
58119
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
58120
58160
|
import { createHash as createHash21 } from "node:crypto";
|
|
58121
58161
|
var invalid9 = /* @__PURE__ */ __name(() => {
|
|
58122
58162
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -58259,7 +58299,7 @@ var ProjectSnapshotSources = class {
|
|
|
58259
58299
|
}
|
|
58260
58300
|
};
|
|
58261
58301
|
|
|
58262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58302
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
58263
58303
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
58264
58304
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
58265
58305
|
}, "unsupported");
|
|
@@ -58437,7 +58477,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
58437
58477
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
58438
58478
|
}), "projectAnnotationSnapshot");
|
|
58439
58479
|
|
|
58440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
58441
58481
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
58442
58482
|
const current2 = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
58443
58483
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -58499,7 +58539,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
58499
58539
|
};
|
|
58500
58540
|
}), "previewAnnotationSnapshot");
|
|
58501
58541
|
|
|
58502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58542
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
58503
58543
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
58504
58544
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
58505
58545
|
if (link3.kind === "evidence" && to)
|
|
@@ -58566,7 +58606,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
58566
58606
|
return mappings;
|
|
58567
58607
|
}, "restoreAnnotationRecords");
|
|
58568
58608
|
|
|
58569
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58609
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
58570
58610
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
58571
58611
|
async preview(request) {
|
|
58572
58612
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -58596,7 +58636,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
58596
58636
|
}
|
|
58597
58637
|
}), "projectAnnotationStoreOver");
|
|
58598
58638
|
|
|
58599
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
58600
58640
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
58601
58641
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
58602
58642
|
const sql2 = /* @__PURE__ */ __name((text7) => database.prepare(text7), "sql");
|
|
@@ -58667,7 +58707,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
58667
58707
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
58668
58708
|
}, "recordRelationsOver");
|
|
58669
58709
|
|
|
58670
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58710
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
58671
58711
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
58672
58712
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
58673
58713
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -58721,7 +58761,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
58721
58761
|
return { pointedAt, remap };
|
|
58722
58762
|
}, "recordRemapOver");
|
|
58723
58763
|
|
|
58724
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58764
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
58725
58765
|
var runs = 0;
|
|
58726
58766
|
var PAGE = 500;
|
|
58727
58767
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -58934,7 +58974,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
58934
58974
|
return pointerOf("records", index2, "fields", key2);
|
|
58935
58975
|
}, "waitingPointer");
|
|
58936
58976
|
|
|
58937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
58938
58978
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
58939
58979
|
var SCHEME = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
58940
58980
|
var ORG_EMAIL = "org-email";
|
|
@@ -59100,7 +59140,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
59100
59140
|
]);
|
|
59101
59141
|
}, "renameMade");
|
|
59102
59142
|
|
|
59103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59143
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
59104
59144
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
59105
59145
|
name: given(fields4, "name"),
|
|
59106
59146
|
unit: given(fields4, "unit"),
|
|
@@ -59223,7 +59263,7 @@ var DIRECT_PROJECTORS = {
|
|
|
59223
59263
|
lead: dealProjector("lead")
|
|
59224
59264
|
};
|
|
59225
59265
|
|
|
59226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-document.js
|
|
59227
59267
|
var TEXT_ONLY = { storage: "text", localPath: null };
|
|
59228
59268
|
var textOf7 = /* @__PURE__ */ __name(({ fields: fields4, externalId }) => {
|
|
59229
59269
|
const text7 = String(fields4.text ?? "");
|
|
@@ -59292,7 +59332,7 @@ var DOCUMENT_PROJECTORS = {
|
|
|
59292
59332
|
}
|
|
59293
59333
|
};
|
|
59294
59334
|
|
|
59295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
59296
59336
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
59297
59337
|
const importer = authorActor(context, IMPORTER).actor;
|
|
59298
59338
|
return context.database.prepare("SELECT 1 FROM payment_allocations WHERE payment_id = ? AND NOT (author_type = ? AND author_id = ?) LIMIT 1").get(paymentId, importer.type, importer.id) !== void 0;
|
|
@@ -59502,7 +59542,7 @@ var MONEY_PROJECTORS = {
|
|
|
59502
59542
|
}
|
|
59503
59543
|
};
|
|
59504
59544
|
|
|
59505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
59506
59546
|
var CALLS_CALENDAR = "calls";
|
|
59507
59547
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
59508
59548
|
if (!isImportedProvider(source2.provider))
|
|
@@ -59677,7 +59717,7 @@ var PHONE_PROJECTORS = {
|
|
|
59677
59717
|
}
|
|
59678
59718
|
};
|
|
59679
59719
|
|
|
59680
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
59681
59721
|
var RECORD_PROJECTORS = {
|
|
59682
59722
|
...MONEY_PROJECTORS,
|
|
59683
59723
|
...DIRECT_PROJECTORS,
|
|
@@ -59688,7 +59728,7 @@ var RECORD_PROJECTORS = {
|
|
|
59688
59728
|
project: null
|
|
59689
59729
|
};
|
|
59690
59730
|
|
|
59691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59731
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
59692
59732
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
59693
59733
|
const sql2 = /* @__PURE__ */ __name((text7) => database.prepare(text7), "sql");
|
|
59694
59734
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -59750,7 +59790,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
59750
59790
|
return { settle, checkShares };
|
|
59751
59791
|
}, "recordSettlingOver");
|
|
59752
59792
|
|
|
59753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
59754
59794
|
import { createHash as createHash23 } from "node:crypto";
|
|
59755
59795
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
59756
59796
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -59766,7 +59806,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
59766
59806
|
return { stamp, untouched };
|
|
59767
59807
|
}, "importStampsOver");
|
|
59768
59808
|
|
|
59769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
59770
59810
|
var SUBSCRIPTIONS = "SELECT s.*, b.name AS author_name, b.kind AS author_kind FROM subscriptions s LEFT JOIN bots b ON s.author_type = 'bot' AND b.id = s.author_id";
|
|
59771
59811
|
var PRICES = "SELECT p.*, b.name AS author_name, b.kind AS author_kind FROM subscription_prices p LEFT JOIN bots b ON p.author_type = 'bot' AND b.id = p.author_id";
|
|
59772
59812
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -60003,7 +60043,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60003
60043
|
};
|
|
60004
60044
|
}, "subscriptionsStoreOver");
|
|
60005
60045
|
|
|
60006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
60007
60047
|
var WALLETS = "SELECT w.*, b.name AS author_name, b.kind AS author_kind FROM financial_accounts w LEFT JOIN bots b ON w.author_type = 'bot' AND b.id = w.author_id";
|
|
60008
60048
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
60009
60049
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -60128,7 +60168,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60128
60168
|
};
|
|
60129
60169
|
}, "walletsStoreOver");
|
|
60130
60170
|
|
|
60131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
60132
60172
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
60133
60173
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
60134
60174
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -60387,7 +60427,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
60387
60427
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
60388
60428
|
}, "recordWritesOver");
|
|
60389
60429
|
|
|
60390
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
60391
60431
|
var LIMIT = 1e3;
|
|
60392
60432
|
var iso16 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
60393
60433
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -60611,7 +60651,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60611
60651
|
};
|
|
60612
60652
|
}, "recordStoreOver");
|
|
60613
60653
|
|
|
60614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60654
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/templates.js
|
|
60615
60655
|
var templateOf = /* @__PURE__ */ __name((row2) => ({
|
|
60616
60656
|
key: row2.key,
|
|
60617
60657
|
channel: row2.channel,
|
|
@@ -60666,7 +60706,7 @@ var storedTemplateBodies = /* @__PURE__ */ __name((database, key2, language) =>
|
|
|
60666
60706
|
return Object.fromEntries(rows.map((row2) => [row2.channel, row2.body]));
|
|
60667
60707
|
}, "storedTemplateBodies");
|
|
60668
60708
|
|
|
60669
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
60670
60710
|
var refusalOf2 = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
60671
60711
|
var wrapped2 = /* @__PURE__ */ new WeakMap();
|
|
60672
60712
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -60701,7 +60741,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
60701
60741
|
return proxy;
|
|
60702
60742
|
}, "storeErrors");
|
|
60703
60743
|
|
|
60704
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60744
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
60705
60745
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
60706
60746
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
60707
60747
|
let merged2 = { from: from2, to };
|
|
@@ -60714,7 +60754,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
60714
60754
|
}, "markRange");
|
|
60715
60755
|
var ranges = /* @__PURE__ */ __name(({ orm }, chatKey) => orm.select({ from: syncRanges.fromKey, to: syncRanges.toKey }).from(syncRanges).where(eq(syncRanges.chatId, chatKey)).orderBy(syncRanges.fromKey).all(), "ranges");
|
|
60716
60756
|
|
|
60717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
60718
60758
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
60719
60759
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
60720
60760
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -60735,7 +60775,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
60735
60775
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(prefixOf2(account) + chatId, JSON.stringify({ ...saved, checkedAt: checkedAt ?? new Date(now2).toISOString() }), now2);
|
|
60736
60776
|
}, "setTaskAnalysisMark");
|
|
60737
60777
|
|
|
60738
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
60739
60779
|
var keyOf6 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
60740
60780
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
60741
60781
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf6(account));
|
|
@@ -60745,7 +60785,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
60745
60785
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf6(account), JSON.stringify(until), now2);
|
|
60746
60786
|
}, "setTaskRulesStop");
|
|
60747
60787
|
|
|
60748
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
60749
60789
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
60750
60790
|
const { database } = context;
|
|
60751
60791
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -60804,7 +60844,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60804
60844
|
};
|
|
60805
60845
|
}, "syncStoreOver");
|
|
60806
60846
|
|
|
60807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60847
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
60808
60848
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
60809
60849
|
const { database } = context;
|
|
60810
60850
|
return {
|
|
@@ -60826,7 +60866,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60826
60866
|
};
|
|
60827
60867
|
}, "tagsStoreOver");
|
|
60828
60868
|
|
|
60829
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60869
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
60830
60870
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
60831
60871
|
var neighbours = /* @__PURE__ */ __name(({ orm }, chatKey, messagePk, sentAt, { messages: messages2, withinMs }, side) => orm.all(sql`SELECT sender_name AS sender, text, sent_at AS sentAt FROM messages
|
|
60832
60872
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -60953,7 +60993,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
60953
60993
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
60954
60994
|
}, "savePictureChunks");
|
|
60955
60995
|
|
|
60956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
60957
60997
|
var messagesToEmbed = /* @__PURE__ */ __name(({ orm }, accountPk2, { chatKey, model, after: after2, limit }) => orm.all(sql`SELECT m.id AS messagePk, m.text, m.sent_at AS sentAt, k.content_hash AS hash,
|
|
60958
60998
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
60959
60999
|
FROM messages m
|
|
@@ -61042,7 +61082,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
61042
61082
|
return plain2(best(found2));
|
|
61043
61083
|
}, "nearestMessages");
|
|
61044
61084
|
|
|
61045
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61085
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
61046
61086
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
61047
61087
|
const { database } = context;
|
|
61048
61088
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -61301,7 +61341,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
61301
61341
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
61302
61342
|
}), "vectorsStoreOver");
|
|
61303
61343
|
|
|
61304
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
61305
61345
|
import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
61306
61346
|
import { dirname as dirname3, join as join4 } from "node:path";
|
|
61307
61347
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -61389,10 +61429,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
61389
61429
|
}
|
|
61390
61430
|
}, "lastBackup");
|
|
61391
61431
|
|
|
61392
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
61393
61433
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
61394
61434
|
|
|
61395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
61396
61436
|
var COUNTED_TABLES = [
|
|
61397
61437
|
"accounts",
|
|
61398
61438
|
"chats",
|
|
@@ -61477,7 +61517,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
61477
61517
|
};
|
|
61478
61518
|
}, "storeContents");
|
|
61479
61519
|
|
|
61480
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
61481
61521
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
61482
61522
|
const context = await openStoreContext(options);
|
|
61483
61523
|
try {
|