@wirecat/attio-cli 0.5.0 → 0.5.2
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 +16 -0
- package/dist/bin/attio.js +2 -2
- package/dist/bundle/agent-YCPGDAWJ.js +37 -0
- package/dist/bundle/{all-profiles-ZM2ULOTA.js → all-profiles-ONLZNT2O.js} +6 -6
- package/dist/bundle/{anthropic-CIJQLJ7U.js → anthropic-7NHDUCS7.js} +2 -2
- package/dist/bundle/{app-server-56GKE6BE.js → app-server-76UZBJNR.js} +53 -53
- package/dist/bundle/attio.js +2 -2
- package/dist/bundle/{bun-3D6UYEKL.js → bun-3M7LDMJY.js} +2 -2
- package/dist/bundle/{bun-sqlite-TWXFZF7R.js → bun-sqlite-WWPYULNT.js} +3 -3
- package/dist/bundle/{chunk-AXJNIMPZ.js → chunk-2HU7TYQK.js} +1 -1
- package/dist/bundle/{chunk-DYLNV6GY.js → chunk-3MZREGLN.js} +11 -11
- package/dist/bundle/{chunk-Y7SRFHYL.js → chunk-3QYMX2QX.js} +2 -2
- package/dist/bundle/{chunk-HTTGJI6G.js → chunk-3TFPJCTB.js} +23 -23
- package/dist/bundle/{chunk-HU6HKKIH.js → chunk-65OPLJBL.js} +2 -2
- package/dist/bundle/{chunk-4V6ARVEH.js → chunk-6MEPMDWU.js} +183 -159
- package/dist/bundle/{chunk-QWBCCZNQ.js → chunk-6MPA7CKD.js} +2 -2
- package/dist/bundle/{chunk-6ITXXXQN.js → chunk-764RTGNI.js} +2 -2
- package/dist/bundle/{chunk-ZLCTHTOK.js → chunk-7ONN7UCC.js} +1 -1
- package/dist/bundle/{chunk-WZAQ7U2F.js → chunk-A5A2I2DY.js} +1 -1
- package/dist/bundle/{chunk-LTMLSN6W.js → chunk-ABMNYUSQ.js} +11 -11
- package/dist/bundle/{chunk-O3GNIUUI.js → chunk-AYF2JNHE.js} +2 -2
- package/dist/bundle/{chunk-ZNQ3NNAB.js → chunk-BSPMRKPS.js} +5 -5
- package/dist/bundle/{chunk-MOTQBDFB.js → chunk-DOTBJMPB.js} +2 -2
- package/dist/bundle/{chunk-T4SPEBOI.js → chunk-EKRO2AYG.js} +7 -7
- package/dist/bundle/{chunk-DBAZ5TBW.js → chunk-F5IGO45Z.js} +5 -5
- package/dist/bundle/{chunk-EXWFB2XY.js → chunk-FVBZHGFE.js} +1 -1
- package/dist/bundle/{chunk-U6W3NW74.js → chunk-GHT7KPTC.js} +32 -32
- package/dist/bundle/{chunk-JQ5NTPT5.js → chunk-H7RYW7CD.js} +1 -1
- package/dist/bundle/{chunk-CRK3LRCL.js → chunk-HGD4JW37.js} +10 -10
- package/dist/bundle/{chunk-VE6L6TDH.js → chunk-HPYDPVGU.js} +2 -2
- package/dist/bundle/{chunk-V6GEPZWY.js → chunk-J3ZQ4JWD.js} +32 -32
- package/dist/bundle/{chunk-QD7INIE3.js → chunk-JRHDYND7.js} +1 -1
- package/dist/bundle/{chunk-CVHEO4HS.js → chunk-KTGIA7CC.js} +530 -412
- package/dist/bundle/{chunk-YITSNC3D.js → chunk-KWJ4GAYR.js} +3 -3
- package/dist/bundle/{chunk-K45K3AJU.js → chunk-LQDZSJ3V.js} +1 -1
- package/dist/bundle/{chunk-M7UG4UBJ.js → chunk-LSFZSGQK.js} +2 -2
- package/dist/bundle/{chunk-7JUZNTYO.js → chunk-M62QM7VF.js} +9 -9
- package/dist/bundle/{chunk-WQKMBZRF.js → chunk-MFPYCWMY.js} +4 -4
- package/dist/bundle/{chunk-OE3J3P24.js → chunk-MUDJABVF.js} +2 -2
- package/dist/bundle/{chunk-EPLC6LQP.js → chunk-N6VLRVCC.js} +51 -51
- package/dist/bundle/{chunk-4KLCWI57.js → chunk-NCYBA5FH.js} +2 -2
- package/dist/bundle/{chunk-KYGX7XUZ.js → chunk-NGVO2UTA.js} +16 -16
- package/dist/bundle/{chunk-Q5VVEFXR.js → chunk-NN7Z5RK6.js} +7 -7
- package/dist/bundle/{chunk-6ZEG7MR3.js → chunk-NPYPL7FT.js} +1 -1
- package/dist/bundle/{chunk-HNH7EVWO.js → chunk-OLKDUVWD.js} +12 -12
- package/dist/bundle/{chunk-OI4WM2AM.js → chunk-PQHS4Z5G.js} +1 -1
- package/dist/bundle/{chunk-6C6RHNUB.js → chunk-PVZK2COW.js} +4 -4
- package/dist/bundle/{chunk-YSA36HJM.js → chunk-PYFVVNAD.js} +1 -1
- package/dist/bundle/{chunk-X5TBQOYI.js → chunk-PZBQH5B7.js} +2 -2
- package/dist/bundle/{chunk-QDU4MLUN.js → chunk-PZE4D63W.js} +5 -5
- package/dist/bundle/{chunk-TBRD6I2W.js → chunk-QRHPXZST.js} +2 -2
- package/dist/bundle/{chunk-33HYI76J.js → chunk-RDXB7HFB.js} +2 -2
- package/dist/bundle/{chunk-XJ7LTHXM.js → chunk-RUNJPSJ3.js} +324 -280
- package/dist/bundle/{chunk-R5TIPW5A.js → chunk-S3SA2XXD.js} +9 -9
- package/dist/bundle/{chunk-EPWOY5UJ.js → chunk-S552I4P7.js} +1 -1
- package/dist/bundle/{chunk-KNJ5W5ZZ.js → chunk-STEUWWU5.js} +22 -11
- package/dist/bundle/{chunk-GSA2HYGF.js → chunk-T2TW53JB.js} +6 -6
- package/dist/bundle/{chunk-VTAZ4LL7.js → chunk-T3QKHFGB.js} +12 -12
- package/dist/bundle/{chunk-7PXDDBH7.js → chunk-TF33UDFE.js} +1 -1
- package/dist/bundle/{chunk-SQOHCWB2.js → chunk-TL7NUBVM.js} +1 -1
- package/dist/bundle/{chunk-MH55F2Z2.js → chunk-TVDBAZFO.js} +5 -5
- package/dist/bundle/{chunk-XBMJAFXC.js → chunk-U3KTIE6B.js} +1 -1
- package/dist/bundle/{chunk-BMDM6I5G.js → chunk-UFFAPBAP.js} +4 -4
- package/dist/bundle/{chunk-ORMKVY7L.js → chunk-V2AF7BYP.js} +54 -54
- package/dist/bundle/{chunk-CQZREDFS.js → chunk-V6RWAUX7.js} +3 -3
- package/dist/bundle/{chunk-NJSWOZED.js → chunk-VIXMK7ZG.js} +6 -6
- package/dist/bundle/{chunk-QA5WIEW5.js → chunk-VNGG6O5T.js} +5 -5
- package/dist/bundle/{chunk-HMORLIGS.js → chunk-WUECAFAJ.js} +1 -1
- package/dist/bundle/{chunk-46U5WHCF.js → chunk-WVXEVCMY.js} +7 -7
- package/dist/bundle/{chunk-HXHQBYLN.js → chunk-X6NSSCMF.js} +1 -1
- package/dist/bundle/{chunk-MVSBV6U7.js → chunk-Y2HZQMNK.js} +1 -1
- package/dist/bundle/{chunk-OJ7P7IK5.js → chunk-YQNZFXOW.js} +6 -6
- package/dist/bundle/{command-contract-SLVMJ557.js → command-contract-7BABQLZN.js} +15 -15
- package/dist/bundle/{command-server-entry-MIZABAB2.js → command-server-entry-6UEGWYW7.js} +21 -21
- package/dist/bundle/{decode-3K7AMIIK.js → decode-BF2CNTOP.js} +2 -2
- package/dist/bundle/{echarts-HQ3M6PY5.js → echarts-ELZMS7DC.js} +2 -2
- package/dist/bundle/{embed-MYNNE2KU.js → embed-SXU7JVUG.js} +3 -3
- package/dist/bundle/{embedder-MZM52STR.js → embedder-ZVNBHGXC.js} +6 -6
- package/dist/bundle/{first-run-FNH4L2MF.js → first-run-SLIPSHPE.js} +6 -6
- package/dist/bundle/first-screen-UPNPU4MF.js +37 -0
- package/dist/bundle/{instructions-JCYBL6AU.js → instructions-Q6QKH7MV.js} +1 -1
- package/dist/bundle/{meeting-combined-FIPUL6DF.js → meeting-combined-DLXVVC5J.js} +10 -10
- package/dist/bundle/{meeting-model-36UKUPUK.js → meeting-model-XJ6OWIAP.js} +8 -8
- package/dist/bundle/{meeting-semantic-NX6AQT6U.js → meeting-semantic-7TJE4HX6.js} +2 -2
- package/dist/bundle/{node-US26HP3Q.js → node-YNLEE4BB.js} +2 -2
- package/dist/bundle/{node-sqlite-7SJYGLZB.js → node-sqlite-24VK6J3W.js} +4 -4
- package/dist/bundle/{oauth-GMDEZTLF.js → oauth-4TLSBITF.js} +4 -4
- package/dist/bundle/{open-WJINQYGM.js → open-U6M2RLYK.js} +2 -2
- package/dist/bundle/{openai-DNLCKN6O.js → openai-UKD2XQ5J.js} +12 -12
- package/dist/bundle/{process-2TFFZAX6.js → process-UIE2CRFP.js} +1 -1
- package/dist/bundle/{program-Y3GX3KE4.js → program-GF35ICCN.js} +487 -401
- package/dist/bundle/{prompt-OEPGHWMQ.js → prompt-TSDXFP3E.js} +2 -2
- package/dist/bundle/{recognize-7C4PENI6.js → recognize-Y534SZIK.js} +1 -1
- package/dist/bundle/{remote-HNRRZA6M.js → remote-PJNOYKXU.js} +6 -6
- package/dist/bundle/{rerank-JNDOOOIZ.js → rerank-TE4HIS5A.js} +4 -4
- package/dist/bundle/{serve-ATTJW7LZ.js → serve-ZOZWJKHB.js} +6 -6
- package/dist/bundle/{server-OHKISLVN.js → server-3K4IC4OA.js} +45 -45
- package/dist/bundle/server-HPHPHKNF.js +79 -0
- package/dist/bundle/{sqlite-runtime-TEZ56D53.js → sqlite-runtime-6R6CHLEM.js} +3 -3
- package/dist/bundle/{state-SMWKWKIB.js → state-DFAH57DP.js} +3 -3
- package/dist/bundle/{store-YCWZZ3LG.js → store-6B5JF2LC.js} +16 -16
- package/dist/bundle/{store-6SKOO4IN.js → store-LPO5SHGK.js} +14 -14
- package/dist/bundle/store-maintenance-command-UBNM3ADW.js +66 -0
- package/dist/bundle/surface-WQ7UR2NJ.js +65 -0
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +7 -4
- package/dist/hooks.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/agent-EIWQ37E3.js +0 -37
- package/dist/bundle/first-screen-TJE6JEAN.js +0 -37
- package/dist/bundle/server-IMVPAMM6.js +0 -79
- package/dist/bundle/store-maintenance-command-I5BNK4RE.js +0 -66
- package/dist/bundle/surface-NXFOGLLG.js +0 -65
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
analyzerIdentity,
|
|
11
11
|
createStemmer,
|
|
12
12
|
parseStemmers
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EKRO2AYG.js";
|
|
14
14
|
import {
|
|
15
15
|
calendarMoment,
|
|
16
16
|
dayIn
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LSFZSGQK.js";
|
|
18
18
|
import {
|
|
19
19
|
PRESENCE,
|
|
20
20
|
QUERY_LIMITS,
|
|
@@ -28,12 +28,12 @@ import {
|
|
|
28
28
|
searchError,
|
|
29
29
|
sqliteLimit,
|
|
30
30
|
tooWideTerm
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-VIXMK7ZG.js";
|
|
32
32
|
import {
|
|
33
33
|
NORMALIZER_VERSION,
|
|
34
34
|
fold,
|
|
35
35
|
normalize
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-H7RYW7CD.js";
|
|
37
37
|
import {
|
|
38
38
|
ACCOUNT_GROUPS,
|
|
39
39
|
ADDED_ACCOUNT,
|
|
@@ -160,14 +160,14 @@ import {
|
|
|
160
160
|
usableLinkSql,
|
|
161
161
|
useStoredProviders,
|
|
162
162
|
walletLine
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-J3ZQ4JWD.js";
|
|
164
164
|
import {
|
|
165
165
|
sqliteCode
|
|
166
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-QRHPXZST.js";
|
|
167
167
|
import {
|
|
168
168
|
normalizeTag,
|
|
169
169
|
tagOf
|
|
170
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-U3KTIE6B.js";
|
|
171
171
|
import {
|
|
172
172
|
CHAT_MESSAGES_READ,
|
|
173
173
|
FACT_TYPES,
|
|
@@ -223,27 +223,27 @@ import {
|
|
|
223
223
|
validateQuery,
|
|
224
224
|
walkQuery,
|
|
225
225
|
zonedMoment
|
|
226
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-N6VLRVCC.js";
|
|
227
227
|
import {
|
|
228
228
|
DEFAULT_TASK_CATEGORIES,
|
|
229
229
|
sharedConfigPath,
|
|
230
230
|
storedTaskCategories,
|
|
231
231
|
taskCategoriesReader
|
|
232
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-F5IGO45Z.js";
|
|
233
233
|
import {
|
|
234
234
|
refuseOwnerStoreInTests,
|
|
235
235
|
storePath
|
|
236
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-FVBZHGFE.js";
|
|
237
237
|
import {
|
|
238
238
|
quietSqliteWarning,
|
|
239
239
|
storeCapable
|
|
240
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-PZE4D63W.js";
|
|
241
241
|
import {
|
|
242
242
|
PRAGMAS,
|
|
243
243
|
TIME_LIMIT_FUNCTION,
|
|
244
244
|
TimeLimitReached,
|
|
245
245
|
isQueryOnly
|
|
246
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-PQHS4Z5G.js";
|
|
247
247
|
import {
|
|
248
248
|
array,
|
|
249
249
|
boolean,
|
|
@@ -294,7 +294,7 @@ import {
|
|
|
294
294
|
sql,
|
|
295
295
|
sqliteTable,
|
|
296
296
|
text
|
|
297
|
-
} from "./chunk-
|
|
297
|
+
} from "./chunk-2HU7TYQK.js";
|
|
298
298
|
import {
|
|
299
299
|
__commonJS,
|
|
300
300
|
__name,
|
|
@@ -10038,7 +10038,7 @@ var require_cjs = __commonJS({
|
|
|
10038
10038
|
}
|
|
10039
10039
|
});
|
|
10040
10040
|
|
|
10041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10041
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
10042
10042
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
10043
10043
|
const methods = whole;
|
|
10044
10044
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10166,7 +10166,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10166
10166
|
};
|
|
10167
10167
|
}, "bindAccount");
|
|
10168
10168
|
|
|
10169
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10170
10170
|
var IndexBuilderOn = class {
|
|
10171
10171
|
static {
|
|
10172
10172
|
__name(this, "IndexBuilderOn");
|
|
@@ -10361,7 +10361,7 @@ function alias(table, alias2) {
|
|
|
10361
10361
|
}
|
|
10362
10362
|
__name(alias, "alias");
|
|
10363
10363
|
|
|
10364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/record-fields.js
|
|
10365
10365
|
var DECIMAL_PATTERN = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
10366
10366
|
var SIGNED_DECIMAL = "^-?[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
10367
10367
|
var DAY = "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
|
|
@@ -10411,7 +10411,7 @@ var arrayOf = /* @__PURE__ */ __name((item, maxItems, description) => ({
|
|
|
10411
10411
|
}), "arrayOf");
|
|
10412
10412
|
var isObject = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isObject");
|
|
10413
10413
|
|
|
10414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/record-types.js
|
|
10415
10415
|
var kept = /* @__PURE__ */ __name((description) => ({ description }), "kept");
|
|
10416
10416
|
var PARTY = ["person", "organization"];
|
|
10417
10417
|
var ORGANIZATION = ["organization"];
|
|
@@ -10806,7 +10806,7 @@ var hasV1Roles = /* @__PURE__ */ __name((type) => rolesOf2(type).some(([, role])
|
|
|
10806
10806
|
var IDENTITY_TYPES = RECORD_ENTITY_TYPES.filter((type) => RECORD_TYPES[type].review === "identity");
|
|
10807
10807
|
var article = /* @__PURE__ */ __name((word2) => /^[aeiou]/.test(word2) ? "an" : "a", "article");
|
|
10808
10808
|
|
|
10809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10810
10810
|
var ENTITY_TABLES = {
|
|
10811
10811
|
...RECORD_TABLES,
|
|
10812
10812
|
account: "accounts",
|
|
@@ -10846,7 +10846,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10846
10846
|
return { table, pointer, type, count: count3, known: known2 };
|
|
10847
10847
|
}).filter(({ count: count3 }) => count3 > 0)), "orphanPointers");
|
|
10848
10848
|
|
|
10849
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/identity-links.js
|
|
10850
10850
|
var IDENTITY_LINK_KIND = "identity_link";
|
|
10851
10851
|
var IDENTITY_LINK_SIGNALS = ["agent", "phone", "email", "guest-email", "name", "account"];
|
|
10852
10852
|
var LINK_WEAKNESSES = [
|
|
@@ -10859,7 +10859,7 @@ var LINK_WEAKNESSES = [
|
|
|
10859
10859
|
"not-own-number"
|
|
10860
10860
|
];
|
|
10861
10861
|
|
|
10862
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/merged-persons.js
|
|
10863
10863
|
var SEPARATIONS = ["unlink", "split", "undo-merge"];
|
|
10864
10864
|
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");
|
|
10865
10865
|
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");
|
|
@@ -10891,7 +10891,7 @@ var samePersons = /* @__PURE__ */ __name((database, pk) => {
|
|
|
10891
10891
|
}, "samePersons");
|
|
10892
10892
|
var idsOf = /* @__PURE__ */ __name((database, type, id2) => JSON.stringify(type === "person" ? samePersons(database, id2) : [id2]), "idsOf");
|
|
10893
10893
|
|
|
10894
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10894
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-link-rows.js
|
|
10895
10895
|
var pairOf = /* @__PURE__ */ __name((a, b) => [Number(a), Number(b)].sort((x, y) => x - y).join("-"), "pairOf");
|
|
10896
10896
|
var pkOf = /* @__PURE__ */ __name((database, ref3) => {
|
|
10897
10897
|
const at2 = ref3.indexOf(":");
|
|
@@ -10998,13 +10998,13 @@ var forgetErasedLinks = /* @__PURE__ */ __name((database) => {
|
|
|
10998
10998
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
10999
10999
|
}, "forgetErasedLinks");
|
|
11000
11000
|
|
|
11001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11001
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/identity-splits.js
|
|
11002
11002
|
var IDENTITY_SPLIT_KIND = "identity_split";
|
|
11003
11003
|
|
|
11004
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11004
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
11005
11005
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
11006
11006
|
|
|
11007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11007
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
11008
11008
|
var TASK_CLOSE_KIND = "task_close";
|
|
11009
11009
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
11010
11010
|
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");
|
|
@@ -11052,7 +11052,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
11052
11052
|
}, "assertMayDecide");
|
|
11053
11053
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
11054
11054
|
|
|
11055
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11055
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/addresses.js
|
|
11056
11056
|
var EMAIL_ADDRESS = /^[^\s@]+@[^\s@]+\.[^\s@]+$/u;
|
|
11057
11057
|
var isEmailAddress = /* @__PURE__ */ __name((value) => EMAIL_ADDRESS.test(value), "isEmailAddress");
|
|
11058
11058
|
var ROLE_ADDRESS_WORDS = {
|
|
@@ -11114,7 +11114,7 @@ var PERSON_LIKE = /* @__PURE__ */ new Set(["hr"]);
|
|
|
11114
11114
|
var isPersonLikeRoleAddress = /* @__PURE__ */ __name((address) => PERSON_LIKE.has(localWord(address)), "isPersonLikeRoleAddress");
|
|
11115
11115
|
var isNoReplyAddress = /* @__PURE__ */ __name((address) => NO_REPLY.has(localWord(address)), "isNoReplyAddress");
|
|
11116
11116
|
|
|
11117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
11118
11118
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
11119
11119
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
11120
11120
|
var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
@@ -11144,7 +11144,7 @@ var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
|
11144
11144
|
]);
|
|
11145
11145
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
11146
11146
|
|
|
11147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/address-organization.js
|
|
11148
11148
|
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 ";
|
|
11149
11149
|
var idsOf2 = /* @__PURE__ */ __name((rows) => rows.map((row2) => Number(row2.id)), "idsOf");
|
|
11150
11150
|
var holdAddress = /* @__PURE__ */ __name(({ database, now: now2 }, organization2, email, { method, author }) => {
|
|
@@ -11169,7 +11169,7 @@ var organizationOfAddress = /* @__PURE__ */ __name((context, { name, email, meth
|
|
|
11169
11169
|
return id2;
|
|
11170
11170
|
}, "organizationOfAddress");
|
|
11171
11171
|
|
|
11172
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
11173
11173
|
var PHONE_PLANS = [
|
|
11174
11174
|
{
|
|
11175
11175
|
country: "us",
|
|
@@ -11549,7 +11549,7 @@ var PHONE_PLANS = [
|
|
|
11549
11549
|
}
|
|
11550
11550
|
];
|
|
11551
11551
|
|
|
11552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11552
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
11553
11553
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
11554
11554
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
11555
11555
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -11624,10 +11624,10 @@ var storedPhone = /* @__PURE__ */ __name((raw, provider) => {
|
|
|
11624
11624
|
return found2 ? `+${found2[1]}` : void 0;
|
|
11625
11625
|
}, "storedPhone");
|
|
11626
11626
|
|
|
11627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
11628
11628
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
11629
11629
|
|
|
11630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/journal.js
|
|
11631
11631
|
import { existsSync, statSync } from "node:fs";
|
|
11632
11632
|
var watched = /* @__PURE__ */ new WeakMap();
|
|
11633
11633
|
var walInode = /* @__PURE__ */ __name((store) => statSync(`${store}-wal`, { throwIfNoEntry: false })?.ino, "walInode");
|
|
@@ -11653,7 +11653,7 @@ var checkJournal = /* @__PURE__ */ __name((database) => {
|
|
|
11653
11653
|
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" });
|
|
11654
11654
|
}, "checkJournal");
|
|
11655
11655
|
|
|
11656
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/write-events.js
|
|
11657
11657
|
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;
|
|
11658
11658
|
var writeTarget = /* @__PURE__ */ __name((sql2) => {
|
|
11659
11659
|
const match = WRITE.exec(sql2);
|
|
@@ -11733,7 +11733,7 @@ var committedWrites = /* @__PURE__ */ __name((database) => {
|
|
|
11733
11733
|
}, "committedWrites");
|
|
11734
11734
|
var droppedWrites = /* @__PURE__ */ __name((database) => tallies.get(database)?.pending.clear(), "droppedWrites");
|
|
11735
11735
|
|
|
11736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11736
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
11737
11737
|
var ARMS = [
|
|
11738
11738
|
[
|
|
11739
11739
|
"message",
|
|
@@ -11861,7 +11861,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
11861
11861
|
return recomputed;
|
|
11862
11862
|
}, "drainInvolvementQueue");
|
|
11863
11863
|
|
|
11864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
11865
11865
|
import { domainToUnicode } from "node:url";
|
|
11866
11866
|
|
|
11867
11867
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -21883,7 +21883,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
21883
21883
|
}, "oa");
|
|
21884
21884
|
var na = { parse: O, get: aa, isValid: oa };
|
|
21885
21885
|
|
|
21886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
21887
21887
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
21888
21888
|
var ID = /^[\w-]{10,}$/;
|
|
21889
21889
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -21925,7 +21925,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text9) => [...text9.matchAll(L
|
|
|
21925
21925
|
return { url, documentId: googleDocumentId(url) };
|
|
21926
21926
|
}), "googleDocumentLinks");
|
|
21927
21927
|
|
|
21928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
21929
21929
|
var BEFORE = [
|
|
21930
21930
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
21931
21931
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -22185,7 +22185,7 @@ var findPlaces = /* @__PURE__ */ __name((text9) => {
|
|
|
22185
22185
|
return found2.sort((a, b) => a.start - b.start);
|
|
22186
22186
|
}, "findPlaces");
|
|
22187
22187
|
|
|
22188
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
22189
22189
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
22190
22190
|
var MENTION_VERSIONS = {
|
|
22191
22191
|
phone: 1,
|
|
@@ -22361,7 +22361,7 @@ var exactlyOne = /* @__PURE__ */ __name((text9, options) => {
|
|
|
22361
22361
|
return one2 && one2.start === 0 && one2.end === text9.length ? one2.value : void 0;
|
|
22362
22362
|
}, "exactlyOne");
|
|
22363
22363
|
|
|
22364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
22365
22365
|
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";
|
|
22366
22366
|
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";
|
|
22367
22367
|
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";
|
|
@@ -22369,7 +22369,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
22369
22369
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
22370
22370
|
var NAME_WORDS = WORDS.split(" ");
|
|
22371
22371
|
|
|
22372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
22373
22373
|
var LATIN_TO_CYRILLIC = {
|
|
22374
22374
|
shch: "\u0449",
|
|
22375
22375
|
sch: "\u0449",
|
|
@@ -22577,7 +22577,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text9, stem, taken) => {
|
|
|
22577
22577
|
return found2;
|
|
22578
22578
|
}, "findUnknownNames");
|
|
22579
22579
|
|
|
22580
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22580
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
22581
22581
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
22582
22582
|
"webpage",
|
|
22583
22583
|
"share",
|
|
@@ -22618,7 +22618,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
|
|
|
22618
22618
|
});
|
|
22619
22619
|
}, "matchDownloads");
|
|
22620
22620
|
|
|
22621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22621
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
22622
22622
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
22623
22623
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
22624
22624
|
kind: "char",
|
|
@@ -23018,7 +23018,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
23018
23018
|
return out;
|
|
23019
23019
|
}, "foldRegex");
|
|
23020
23020
|
|
|
23021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
23022
23022
|
var PRESET_VERSION = 1;
|
|
23023
23023
|
var PRESETS = {
|
|
23024
23024
|
password: {
|
|
@@ -23072,12 +23072,12 @@ var PRESETS = {
|
|
|
23072
23072
|
}
|
|
23073
23073
|
};
|
|
23074
23074
|
|
|
23075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
23076
23076
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
23077
23077
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
23078
23078
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
23079
23079
|
|
|
23080
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
23081
23081
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
23082
23082
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
23083
23083
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -23101,7 +23101,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
23101
23101
|
};
|
|
23102
23102
|
}, "linkMatch");
|
|
23103
23103
|
|
|
23104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
23105
23105
|
var SETTING = "phoneCountries";
|
|
23106
23106
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
23107
23107
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -23132,7 +23132,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
23132
23132
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
23133
23133
|
}, "valueMatch");
|
|
23134
23134
|
|
|
23135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
23136
23136
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
23137
23137
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
23138
23138
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -23160,7 +23160,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
23160
23160
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
23161
23161
|
}, "vocabularySimilarity");
|
|
23162
23162
|
|
|
23163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
23164
23164
|
import { createHash } from "node:crypto";
|
|
23165
23165
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
23166
23166
|
try {
|
|
@@ -23226,7 +23226,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
23226
23226
|
});
|
|
23227
23227
|
}, "guardTagCreation");
|
|
23228
23228
|
|
|
23229
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23229
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
23230
23230
|
var invalid = /* @__PURE__ */ __name((message3) => {
|
|
23231
23231
|
throw new CliError("validation_error", message3);
|
|
23232
23232
|
}, "invalid");
|
|
@@ -23303,7 +23303,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
23303
23303
|
};
|
|
23304
23304
|
}, "createTagRedirectIndex");
|
|
23305
23305
|
|
|
23306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
23307
23307
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
23308
23308
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
23309
23309
|
if (!row2)
|
|
@@ -23331,7 +23331,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
23331
23331
|
return snapshot2;
|
|
23332
23332
|
}, "tagRedirectSnapshot");
|
|
23333
23333
|
|
|
23334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
23335
23335
|
import { createHash as createHash2 } from "node:crypto";
|
|
23336
23336
|
var TASK_KEY_PREFIXES = {
|
|
23337
23337
|
question: "Q",
|
|
@@ -23359,7 +23359,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
23359
23359
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
23360
23360
|
}, "taskAccountOf");
|
|
23361
23361
|
|
|
23362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23362
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
23363
23363
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
23364
23364
|
var REFERABLE = {
|
|
23365
23365
|
...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
|
|
@@ -23523,7 +23523,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
23523
23523
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
23524
23524
|
}, "taskIdOf");
|
|
23525
23525
|
|
|
23526
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
23527
23527
|
var toMs = /* @__PURE__ */ __name((iso18) => {
|
|
23528
23528
|
if (iso18 === null || iso18 === void 0)
|
|
23529
23529
|
return null;
|
|
@@ -23537,7 +23537,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
23537
23537
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
23538
23538
|
var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
23539
23539
|
|
|
23540
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23540
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
23541
23541
|
var TAG_KINDS = ["tag", "topic"];
|
|
23542
23542
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
23543
23543
|
var TAG_TYPE = {
|
|
@@ -23740,7 +23740,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
23740
23740
|
return result;
|
|
23741
23741
|
}, "tagsOf");
|
|
23742
23742
|
|
|
23743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23743
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/trigram-match.js
|
|
23744
23744
|
var MOST_YO_SPELLINGS = 64;
|
|
23745
23745
|
var yoSpellings = /* @__PURE__ */ __name((run) => {
|
|
23746
23746
|
let spellings2 = [""];
|
|
@@ -23762,7 +23762,7 @@ var anyCaseGlob = /* @__PURE__ */ __name((word2) => `*${[...word2.normalize("NFC
|
|
|
23762
23762
|
return forms2.size === 1 ? c : `[${[...forms2].join("")}]`;
|
|
23763
23763
|
}).join("")}*`, "anyCaseGlob");
|
|
23764
23764
|
|
|
23765
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
23766
23766
|
var MESSAGES = {
|
|
23767
23767
|
rows: "messages",
|
|
23768
23768
|
threads: "chats",
|
|
@@ -24270,7 +24270,7 @@ var FIELD_COMPILERS = {
|
|
|
24270
24270
|
subject
|
|
24271
24271
|
};
|
|
24272
24272
|
|
|
24273
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24273
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
24274
24274
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
24275
24275
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
24276
24276
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -24286,7 +24286,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
24286
24286
|
};
|
|
24287
24287
|
}, "placeOf");
|
|
24288
24288
|
|
|
24289
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
24290
24290
|
var DRAIN_ON_WRITE = 500;
|
|
24291
24291
|
var METHOD = "rules";
|
|
24292
24292
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -24452,7 +24452,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
24452
24452
|
return queued.length;
|
|
24453
24453
|
}, "drainMentions");
|
|
24454
24454
|
|
|
24455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24455
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
24456
24456
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
24457
24457
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
24458
24458
|
if (!exists2)
|
|
@@ -24460,7 +24460,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
24460
24460
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
24461
24461
|
}, "indexRow");
|
|
24462
24462
|
|
|
24463
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
24464
24464
|
var INDEX = "message_stems";
|
|
24465
24465
|
var SETTING2 = "searchStemmers";
|
|
24466
24466
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -24586,7 +24586,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
24586
24586
|
};
|
|
24587
24587
|
}, "stemmerCache");
|
|
24588
24588
|
|
|
24589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
24590
24590
|
var rehearsal = new AsyncLocalStorage();
|
|
24591
24591
|
var SQLITE_BUSY = 5;
|
|
24592
24592
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
@@ -24729,7 +24729,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
24729
24729
|
}
|
|
24730
24730
|
}, "read");
|
|
24731
24731
|
|
|
24732
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
24733
24733
|
var FOLDED = [
|
|
24734
24734
|
{ table: "tasks", column: "title" },
|
|
24735
24735
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -24766,7 +24766,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
24766
24766
|
return filled;
|
|
24767
24767
|
}, "fillFolded");
|
|
24768
24768
|
|
|
24769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24769
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
24770
24770
|
import { createHash as createHash3 } from "node:crypto";
|
|
24771
24771
|
var CHUNK_CHARS = 1200;
|
|
24772
24772
|
var CHUNK_OVERLAP = 150;
|
|
@@ -24871,7 +24871,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
24871
24871
|
return chunks2;
|
|
24872
24872
|
}, "cutChunks");
|
|
24873
24873
|
|
|
24874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24874
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
24875
24875
|
var DAY2 = 864e5;
|
|
24876
24876
|
var CURRENCY = [
|
|
24877
24877
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -24997,7 +24997,7 @@ var dueDayOf = /* @__PURE__ */ __name((text9, createdMs) => {
|
|
|
24997
24997
|
return best?.day ?? null;
|
|
24998
24998
|
}, "dueDayOf");
|
|
24999
24999
|
|
|
25000
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
25001
25001
|
var DAY3 = 864e5;
|
|
25002
25002
|
var STOP_WORDS = new Set([
|
|
25003
25003
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -25152,7 +25152,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
25152
25152
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
25153
25153
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
25154
25154
|
|
|
25155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
25156
25156
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
25157
25157
|
coalesce(CASE k.chunkable_type
|
|
25158
25158
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -25294,7 +25294,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
25294
25294
|
}, "dropUnusedVectors");
|
|
25295
25295
|
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");
|
|
25296
25296
|
|
|
25297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
25298
25298
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
25299
25299
|
r.last_message_id, r.text_start, r.text_end FROM conversations c
|
|
25300
25300
|
CROSS JOIN chunks k ON k.chunkable_type = 'conversation' AND k.chunkable_id = c.id
|
|
@@ -25643,7 +25643,7 @@ var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.ma
|
|
|
25643
25643
|
Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
|
|
25644
25644
|
])), "vectorCounts");
|
|
25645
25645
|
|
|
25646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
25647
25647
|
var DOCUMENT_PICTURE = "document_picture";
|
|
25648
25648
|
var SCAN_PAGE2 = 5e3;
|
|
25649
25649
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -25706,12 +25706,12 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
25706
25706
|
}, "nearestPictures")
|
|
25707
25707
|
}), "documentPicturesOver");
|
|
25708
25708
|
|
|
25709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
|
|
25710
25710
|
var noteIndexText = /* @__PURE__ */ __name((title2, text9) => title2 ? `${title2}
|
|
25711
25711
|
|
|
25712
25712
|
${text9}` : text9, "noteIndexText");
|
|
25713
25713
|
|
|
25714
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
|
|
25715
25715
|
var ENRICHMENT_SUBJECTS = ["document", "note", "email"];
|
|
25716
25716
|
var ENRICHMENT_POSITION = 1e6;
|
|
25717
25717
|
var EMAIL_ENRICHMENT = "email_enrichment";
|
|
@@ -25805,7 +25805,7 @@ var enrichmentsOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
|
25805
25805
|
}), "clear")
|
|
25806
25806
|
}), "enrichmentsOver");
|
|
25807
25807
|
|
|
25808
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
25809
25809
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
25810
25810
|
const literal5 = escaped2 ?? plain2 ?? "";
|
|
25811
25811
|
return wildcard ?? (/[*?[]/u.test(literal5) ? `[${literal5}]` : literal5);
|
|
@@ -25881,7 +25881,7 @@ var compile = /* @__PURE__ */ __name((node, columns2, options) => {
|
|
|
25881
25881
|
var queryFilter = /* @__PURE__ */ __name((ast, columns2, options) => compile(ast.root, columns2, options), "queryFilter");
|
|
25882
25882
|
var bound2 = /* @__PURE__ */ __name(({ sql: text9, params }) => sql.join(text9.split("?").map((part2, at2) => at2 < params.length ? sql`${sql.raw(part2)}${params[at2]}` : sql.raw(part2)), sql``), "bound");
|
|
25883
25883
|
|
|
25884
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
25885
25885
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
25886
25886
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
25887
25887
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -25971,7 +25971,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
25971
25971
|
});
|
|
25972
25972
|
}, "linkMeeting");
|
|
25973
25973
|
|
|
25974
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-titles.js
|
|
25975
25975
|
var MAX_TITLE = 120;
|
|
25976
25976
|
var placeholderTitleOf = /* @__PURE__ */ __name((row2) => `${String(row2.type)} \u2014 ${String(row2.source_locator ?? "")}`, "placeholderTitleOf");
|
|
25977
25977
|
var PLACEHOLDER_TITLE_SQL = "title = type || ' \u2014 ' || coalesce(source_locator, '')";
|
|
@@ -26033,7 +26033,7 @@ var fillFoundTaskTitles = /* @__PURE__ */ __name((database, warn, { batch = 500
|
|
|
26033
26033
|
}
|
|
26034
26034
|
}, "fillFoundTaskTitles");
|
|
26035
26035
|
|
|
26036
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
26037
26037
|
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), ''))";
|
|
26038
26038
|
var UNSEARCHED_EVENT_TYPES = [
|
|
26039
26039
|
"working-location",
|
|
@@ -26280,7 +26280,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
26280
26280
|
return true;
|
|
26281
26281
|
}, "resetNoteIndex");
|
|
26282
26282
|
|
|
26283
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
26284
26284
|
var keyOf2 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
26285
26285
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
26286
26286
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf2))) {
|
|
@@ -26299,7 +26299,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
26299
26299
|
}
|
|
26300
26300
|
}, "resolvePersonLinks");
|
|
26301
26301
|
|
|
26302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26302
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
26303
26303
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
26304
26304
|
id: integer("id").primaryKey(),
|
|
26305
26305
|
name: text("name").notNull().unique(),
|
|
@@ -26308,7 +26308,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
26308
26308
|
updatedAt: integer("updated_at").notNull()
|
|
26309
26309
|
});
|
|
26310
26310
|
|
|
26311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
|
|
26312
26312
|
var linkRevisions = sqliteTable("link_revisions", {
|
|
26313
26313
|
id: integer("id").primaryKey(),
|
|
26314
26314
|
linkId: integer("link_id").notNull(),
|
|
@@ -26320,7 +26320,7 @@ var linkRevisions = sqliteTable("link_revisions", {
|
|
|
26320
26320
|
createdAt: integer("created_at").notNull()
|
|
26321
26321
|
}, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
|
|
26322
26322
|
|
|
26323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26323
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
26324
26324
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
26325
26325
|
sourceKey: text("source_key").notNull(),
|
|
26326
26326
|
collection: text("collection").notNull(),
|
|
@@ -26330,7 +26330,7 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
26330
26330
|
createdAt: integer("created_at").notNull()
|
|
26331
26331
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
26332
26332
|
|
|
26333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-changes.js
|
|
26334
26334
|
var documentChanges = sqliteTable("document_changes", {
|
|
26335
26335
|
id: integer("id").primaryKey(),
|
|
26336
26336
|
accountId: integer("account_id").notNull(),
|
|
@@ -26342,13 +26342,13 @@ var documentChanges = sqliteTable("document_changes", {
|
|
|
26342
26342
|
at: integer("at").notNull()
|
|
26343
26343
|
}, (table) => [index("document_changes_by_account_id_at").on(table.accountId, table.at)]);
|
|
26344
26344
|
|
|
26345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
26346
26346
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
26347
26347
|
id: integer("id").notNull(),
|
|
26348
26348
|
indexableType: text("indexable_type").notNull()
|
|
26349
26349
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
26350
26350
|
|
|
26351
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
26352
26352
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
26353
26353
|
id: integer("id").primaryKey(),
|
|
26354
26354
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -26368,7 +26368,7 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
26368
26368
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
26369
26369
|
]);
|
|
26370
26370
|
|
|
26371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26371
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
|
|
26372
26372
|
var enrichments = sqliteTable("enrichments", {
|
|
26373
26373
|
subjectType: text("subject_type").notNull(),
|
|
26374
26374
|
subjectId: integer("subject_id").notNull(),
|
|
@@ -26380,7 +26380,7 @@ var enrichments = sqliteTable("enrichments", {
|
|
|
26380
26380
|
createdAt: integer("created_at").notNull()
|
|
26381
26381
|
}, (table) => [primaryKey({ columns: [table.subjectType, table.subjectId] })]);
|
|
26382
26382
|
|
|
26383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26383
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/templates.js
|
|
26384
26384
|
var templates = sqliteTable("templates", {
|
|
26385
26385
|
key: text("key").notNull(),
|
|
26386
26386
|
channel: text("channel").notNull(),
|
|
@@ -26402,7 +26402,7 @@ var templatesHistory = sqliteTable("templates_history", {
|
|
|
26402
26402
|
index("templates_history_by_key_channel_language_id").on(table.key, table.channel, table.language, table.id)
|
|
26403
26403
|
]);
|
|
26404
26404
|
|
|
26405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26405
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
|
|
26406
26406
|
var links = sqliteTable("links", {
|
|
26407
26407
|
id: integer("id").primaryKey(),
|
|
26408
26408
|
fromType: text("from_type").notNull(),
|
|
@@ -26433,7 +26433,7 @@ var links = sqliteTable("links", {
|
|
|
26433
26433
|
index("links_by_to_type_to_id").on(table.toType, table.toId)
|
|
26434
26434
|
]);
|
|
26435
26435
|
|
|
26436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
26437
26437
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
26438
26438
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
26439
26439
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -26459,7 +26459,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
26459
26459
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
26460
26460
|
]);
|
|
26461
26461
|
|
|
26462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26462
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
26463
26463
|
var accounts = sqliteTable("accounts", {
|
|
26464
26464
|
id: integer("id").primaryKey(),
|
|
26465
26465
|
provider: text("provider").notNull(),
|
|
@@ -28630,7 +28630,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
28630
28630
|
at: integer("at").notNull()
|
|
28631
28631
|
});
|
|
28632
28632
|
|
|
28633
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
28634
28634
|
var contactsOf = /* @__PURE__ */ __name(({ phones: phones2, emails: emails3 }) => {
|
|
28635
28635
|
if (phones2 === void 0 && emails3 === void 0)
|
|
28636
28636
|
return void 0;
|
|
@@ -28876,7 +28876,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
28876
28876
|
}, "meetingIdentityPk");
|
|
28877
28877
|
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");
|
|
28878
28878
|
|
|
28879
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
28880
28880
|
var TAKES = {
|
|
28881
28881
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
28882
28882
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -28936,7 +28936,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference2, scope3, profilesOn
|
|
|
28936
28936
|
throw wrongAccount(reference2, scope3, profiles);
|
|
28937
28937
|
}, "ensureAccount");
|
|
28938
28938
|
|
|
28939
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
28940
28940
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
28941
28941
|
const padded = ` ${term} `;
|
|
28942
28942
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -28945,7 +28945,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
28945
28945
|
return [...pieces];
|
|
28946
28946
|
}, "trigrams");
|
|
28947
28947
|
|
|
28948
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28948
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
28949
28949
|
var isId = /* @__PURE__ */ __name((reference2) => /^-?\d+$/.test(reference2.trim()), "isId");
|
|
28950
28950
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
|
|
28951
28951
|
var pickChat = /* @__PURE__ */ __name((reference2, chats2) => {
|
|
@@ -29016,7 +29016,7 @@ ${lines}`, { candidates });
|
|
|
29016
29016
|
}, "ambiguous");
|
|
29017
29017
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
29018
29018
|
|
|
29019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/display-names.js
|
|
29020
29020
|
var QUOTES = [
|
|
29021
29021
|
['"', '"'],
|
|
29022
29022
|
["'", "'"],
|
|
@@ -29074,7 +29074,7 @@ var nameKey = /* @__PURE__ */ __name((name) => {
|
|
|
29074
29074
|
}, "nameKey");
|
|
29075
29075
|
var isReadable = /* @__PURE__ */ __name((shown2) => shown2 !== null && READABLE.test(shown2), "isReadable");
|
|
29076
29076
|
|
|
29077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
29078
29078
|
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");
|
|
29079
29079
|
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
29080
29080
|
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
@@ -29089,7 +29089,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
|
29089
29089
|
var separated = /* @__PURE__ */ __name((context, one2, other) => one2 !== other && apart(context, { identities: identitiesOf(context, one2), person: one2 }, { identities: identitiesOf(context, other), person: other }), "separated");
|
|
29090
29090
|
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
29091
29091
|
|
|
29092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
29093
29093
|
var MESSAGE_FIELDS = {
|
|
29094
29094
|
pk: messages.id,
|
|
29095
29095
|
nativeId: messages.externalId,
|
|
@@ -29269,7 +29269,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
29269
29269
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
29270
29270
|
}), "chatActivity");
|
|
29271
29271
|
|
|
29272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29272
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
29273
29273
|
var HIT_FIELDS = {
|
|
29274
29274
|
...MESSAGE_FIELDS,
|
|
29275
29275
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -29370,7 +29370,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
29370
29370
|
};
|
|
29371
29371
|
}, "directReplies");
|
|
29372
29372
|
|
|
29373
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
29374
29374
|
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");
|
|
29375
29375
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
29376
29376
|
const found2 = identityRow(context, ref3);
|
|
@@ -29583,7 +29583,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
29583
29583
|
}, "mentioning");
|
|
29584
29584
|
var escaped = /* @__PURE__ */ __name((text9) => text9.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
29585
29585
|
|
|
29586
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29586
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
29587
29587
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
29588
29588
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
29589
29589
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -29640,7 +29640,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
29640
29640
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
29641
29641
|
}, "proposedBySql");
|
|
29642
29642
|
|
|
29643
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
|
|
29644
29644
|
var TABLES = { memory: "memories", fact: "facts" };
|
|
29645
29645
|
var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
|
|
29646
29646
|
var KEPT = 20;
|
|
@@ -29735,7 +29735,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
|
|
|
29735
29735
|
return scrubbed;
|
|
29736
29736
|
}, "scrubSourceReviews");
|
|
29737
29737
|
|
|
29738
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29738
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
|
|
29739
29739
|
var QUOTE_LIMIT = 500;
|
|
29740
29740
|
var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
|
|
29741
29741
|
var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
|
|
@@ -30014,11 +30014,11 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at2) => {
|
|
|
30014
30014
|
database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
|
|
30015
30015
|
}, "deleteDocumentRow");
|
|
30016
30016
|
|
|
30017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
30018
30018
|
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");
|
|
30019
30019
|
var oneLine = /* @__PURE__ */ __name((text9) => singleLine(text9.replace(/\s+/g, " ").trim()), "oneLine");
|
|
30020
30020
|
|
|
30021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-accounts.js
|
|
30022
30022
|
var accountKeys = /* @__PURE__ */ __name((database, ids3) => {
|
|
30023
30023
|
const unique2 = [...new Set(ids3)];
|
|
30024
30024
|
if (unique2.length === 0)
|
|
@@ -30110,7 +30110,7 @@ var refEndsOf = /* @__PURE__ */ __name((database, text9) => {
|
|
|
30110
30110
|
}, "refEndsOf");
|
|
30111
30111
|
var refAccountsOf = /* @__PURE__ */ __name((database, text9) => refEndsOf(database, text9)?.flat(), "refAccountsOf");
|
|
30112
30112
|
|
|
30113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
30114
30114
|
var EXCERPT_CHARS = 280;
|
|
30115
30115
|
var TITLE_CHARS = 120;
|
|
30116
30116
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -30534,7 +30534,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
30534
30534
|
ends: /* @__PURE__ */ __name(async (text9) => refEndsOf(context.database, text9), "ends")
|
|
30535
30535
|
}), "refsStoreOver");
|
|
30536
30536
|
|
|
30537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
30538
30538
|
var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
|
|
30539
30539
|
ref: ref3,
|
|
30540
30540
|
kind: read2.kind,
|
|
@@ -30572,7 +30572,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
30572
30572
|
});
|
|
30573
30573
|
}, "evidenceSourcesOf");
|
|
30574
30574
|
|
|
30575
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
30576
30576
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
30577
30577
|
var MAX_TEXT_CHARS = 2e6;
|
|
30578
30578
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -30598,7 +30598,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
30598
30598
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
30599
30599
|
}, "pdfPreviewLimits");
|
|
30600
30600
|
|
|
30601
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30601
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
30602
30602
|
import { randomBytes } from "node:crypto";
|
|
30603
30603
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
30604
30604
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -30611,7 +30611,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
30611
30611
|
return time3 + random;
|
|
30612
30612
|
}, "ulid");
|
|
30613
30613
|
|
|
30614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30614
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/document-history.js
|
|
30615
30615
|
var DOCUMENT_REMOVALS = ["deleted", "unavailable", "unsynced"];
|
|
30616
30616
|
var DOCUMENT_EVENTS = ["added", "changed", "restored", ...DOCUMENT_REMOVALS];
|
|
30617
30617
|
var iso3 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -30731,7 +30731,7 @@ var documentHistoryOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
30731
30731
|
};
|
|
30732
30732
|
}, "documentHistoryOver");
|
|
30733
30733
|
|
|
30734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30734
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
30735
30735
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
30736
30736
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
30737
30737
|
if (!meta && !sections?.length)
|
|
@@ -30752,11 +30752,11 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
30752
30752
|
return typeof language === "string" && language !== "" ? language : null;
|
|
30753
30753
|
}, "languageOf");
|
|
30754
30754
|
|
|
30755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/file-note.js
|
|
30756
30756
|
var LIVE3 = "f.deleted_at IS NULL AND d.deleted_at IS NULL AND coalesce(json_extract(d.metadata, '$.catalog.active'), 1)=1";
|
|
30757
30757
|
var fileNoteRow = /* @__PURE__ */ __name((database, account, local, path) => database.prepare(local ? `SELECT d.*, f.account_id AS account_id, f.external_id AS external_id, coalesce(f.external_updated_at, d.external_updated_at) AS external_updated_at FROM files f JOIN documents d ON d.id = f.document_id WHERE f.account_id = ? AND f.external_id = ? AND ${LIVE3} ORDER BY d.created_at, d.id LIMIT 1` : `SELECT d.*, f.account_id AS account_id, coalesce(f.external_updated_at, d.external_updated_at) AS external_updated_at FROM documents d JOIN files f ON f.document_id = d.id AND f.account_id = d.account_id WHERE d.account_id = ? AND d.external_id = ? AND ${LIVE3} LIMIT 1`).get(account, path), "fileNoteRow");
|
|
30758
30758
|
|
|
30759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30759
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/file-note-rekey.js
|
|
30760
30760
|
var CONTENT = ["title", "body", "front_matter", "content_hash", "metadata", "language"];
|
|
30761
30761
|
var documentAt = /* @__PURE__ */ __name((database, folder, path) => {
|
|
30762
30762
|
const place = database.prepare("SELECT document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder'").get(folder, path);
|
|
@@ -30785,7 +30785,7 @@ var foldRekeyed = /* @__PURE__ */ __name((database, folder, from2, target, at2)
|
|
|
30785
30785
|
return true;
|
|
30786
30786
|
}, "foldRekeyed");
|
|
30787
30787
|
|
|
30788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
30789
30789
|
var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
30790
30790
|
var objectOf2 = /* @__PURE__ */ __name((value) => {
|
|
30791
30791
|
if (isObject2(value))
|
|
@@ -31032,7 +31032,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
31032
31032
|
};
|
|
31033
31033
|
}, "filesStoreOver");
|
|
31034
31034
|
|
|
31035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
31036
31036
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
31037
31037
|
entity: "document",
|
|
31038
31038
|
backend: "sql",
|
|
@@ -31078,7 +31078,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
31078
31078
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns2, { zone: timezoneOf() });
|
|
31079
31079
|
}, "importedDocumentWhere");
|
|
31080
31080
|
|
|
31081
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31081
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
31082
31082
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
31083
31083
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
31084
31084
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -31086,7 +31086,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
31086
31086
|
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);
|
|
31087
31087
|
}, "reviewLink");
|
|
31088
31088
|
|
|
31089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/link-row.js
|
|
31090
31090
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
31091
31091
|
var thingRef = /* @__PURE__ */ __name((database, type, id2) => type == null || id2 == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? null, "thingRef");
|
|
31092
31092
|
var hasBothEnds = /* @__PURE__ */ __name((link3) => link3.from !== null && link3.to !== null, "hasBothEnds");
|
|
@@ -31120,7 +31120,7 @@ var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
|
31120
31120
|
};
|
|
31121
31121
|
}, "linkOf");
|
|
31122
31122
|
|
|
31123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
31124
31124
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
31125
31125
|
const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
|
|
31126
31126
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -31141,7 +31141,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
31141
31141
|
return changed;
|
|
31142
31142
|
}, "dateFileNotes");
|
|
31143
31143
|
|
|
31144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31144
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
31145
31145
|
var textOf2 = /* @__PURE__ */ __name((text9, what, max = 1e5, allowEmpty = false) => {
|
|
31146
31146
|
const value = text9.trim();
|
|
31147
31147
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -31154,7 +31154,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
31154
31154
|
return value;
|
|
31155
31155
|
}, "oneOf");
|
|
31156
31156
|
|
|
31157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
31158
31158
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
31159
31159
|
var RELATIONSHIPS = RELATION_KINDS.map(linkKind).join(", ");
|
|
31160
31160
|
var iso5 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31692,10 +31692,10 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31692
31692
|
};
|
|
31693
31693
|
}, "notesStoreOver");
|
|
31694
31694
|
|
|
31695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/rows-page.js
|
|
31696
31696
|
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");
|
|
31697
31697
|
|
|
31698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
31699
31699
|
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";
|
|
31700
31700
|
var iso6 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
31701
31701
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -31879,6 +31879,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31879
31879
|
}
|
|
31880
31880
|
return made;
|
|
31881
31881
|
});
|
|
31882
|
+
drainCorpus(database, CORPORA.memory, stemmerFor2);
|
|
31882
31883
|
return memoryOf(rowOf4(`memory:${id2}`));
|
|
31883
31884
|
}, "addNow");
|
|
31884
31885
|
const confirmNow = /* @__PURE__ */ __name((reference2, by) => write(database, () => {
|
|
@@ -31960,7 +31961,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31960
31961
|
};
|
|
31961
31962
|
}, "memoriesStoreOver");
|
|
31962
31963
|
|
|
31963
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
31964
31965
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
31965
31966
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
31966
31967
|
throw new CliError(code, message3, { reason });
|
|
@@ -32108,7 +32109,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
32108
32109
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly: ownerOnly2, linkedId, ...decisionsOver(context) };
|
|
32109
32110
|
}, "reviewedRowsOver");
|
|
32110
32111
|
|
|
32111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
32112
32113
|
var MAX_LINES = 500;
|
|
32113
32114
|
var PARENTS = {
|
|
32114
32115
|
invoice: {
|
|
@@ -32208,7 +32209,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
32208
32209
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
32209
32210
|
}, "moneyLinesOver");
|
|
32210
32211
|
|
|
32211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
32212
32213
|
var COUNTED = {
|
|
32213
32214
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
32214
32215
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -32283,7 +32284,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
32283
32284
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
32284
32285
|
}, "refundRulesOver");
|
|
32285
32286
|
|
|
32286
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32287
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
32287
32288
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
32288
32289
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
32289
32290
|
var PAID = netPaidSql("i.id");
|
|
@@ -32687,7 +32688,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32687
32688
|
};
|
|
32688
32689
|
}, "financeStoreOver");
|
|
32689
32690
|
|
|
32690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32691
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
32691
32692
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
32692
32693
|
throw new CliError("validation_error", message3, { reason });
|
|
32693
32694
|
}, "refuse");
|
|
@@ -32765,7 +32766,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
32765
32766
|
};
|
|
32766
32767
|
}, "paymentEntriesOver");
|
|
32767
32768
|
|
|
32768
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32769
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
32769
32770
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
32770
32771
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
32771
32772
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -32792,7 +32793,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
32792
32793
|
return valid;
|
|
32793
32794
|
}, "validateEvidenceFindings");
|
|
32794
32795
|
|
|
32795
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
32796
32797
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
32797
32798
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
32798
32799
|
var iso8 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -32986,7 +32987,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32986
32987
|
};
|
|
32987
32988
|
}, "proposedActionsStoreOver");
|
|
32988
32989
|
|
|
32989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-proposals.js
|
|
32990
32991
|
var CONFIRMED = "proposal";
|
|
32991
32992
|
var refOf = /* @__PURE__ */ __name(({ database }, pk) => {
|
|
32992
32993
|
const row2 = database.prepare("SELECT provider, external_id FROM identities WHERE id = ?").get(pk);
|
|
@@ -33338,7 +33339,7 @@ var identityLinkRows = /* @__PURE__ */ __name((context, { person: person2, statu
|
|
|
33338
33339
|
return { items, hasMore: rows.length > limit };
|
|
33339
33340
|
}, "identityLinkRows");
|
|
33340
33341
|
|
|
33341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33342
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-merges.js
|
|
33342
33343
|
var mergeId = /* @__PURE__ */ __name((to, from2) => `merge:${to}-${from2}`, "mergeId");
|
|
33343
33344
|
var parseMergeId = /* @__PURE__ */ __name((id2) => {
|
|
33344
33345
|
const found2 = /^merge:([1-9]\d*)-([1-9]\d*)$/.exec(id2.trim());
|
|
@@ -33441,7 +33442,7 @@ var split = /* @__PURE__ */ __name((context, uid, refs, by) => {
|
|
|
33441
33442
|
return recordOf(context, alone);
|
|
33442
33443
|
}, "split");
|
|
33443
33444
|
|
|
33444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33445
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-split-proposals.js
|
|
33445
33446
|
var refOf2 = /* @__PURE__ */ __name(({ provider, id: id2 }) => `${provider}:${id2}`, "refOf");
|
|
33446
33447
|
var keyOf3 = /* @__PURE__ */ __name((split2, person2, identities2) => `${split2} ${person2} ${[...identities2].sort().join(" ")}`, "keyOf");
|
|
33447
33448
|
var planOf = /* @__PURE__ */ __name((context, input) => {
|
|
@@ -33618,7 +33619,7 @@ var forgetErasedSplits = /* @__PURE__ */ __name((database) => {
|
|
|
33618
33619
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
33619
33620
|
}, "forgetErasedSplits");
|
|
33620
33621
|
|
|
33621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/test-data.js
|
|
33622
33623
|
var SEED_PEOPLE = [
|
|
33623
33624
|
{ name: "Owner", username: "owner" },
|
|
33624
33625
|
{ name: "Ann Lee", username: "ann" },
|
|
@@ -33635,7 +33636,7 @@ var RESERVED_ADDRESS_GLOBS = [
|
|
|
33635
33636
|
];
|
|
33636
33637
|
var SEED_ID_GLOBS = ["person-[0-9]*"];
|
|
33637
33638
|
|
|
33638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/test-people.js
|
|
33639
33640
|
var TEST_DATA_KIND = "test_data";
|
|
33640
33641
|
var globs = /* @__PURE__ */ __name((column2, patterns) => patterns.map((pattern) => `${column2} GLOB '${pattern}'`).join(" OR "), "globs");
|
|
33641
33642
|
var SURE = `(${globs("i.external_id", SEED_ID_GLOBS)} OR ${globs("lower(i.email)", RESERVED_ADDRESS_GLOBS)})`;
|
|
@@ -33704,7 +33705,7 @@ var forgetErasedTestData = /* @__PURE__ */ __name((database) => {
|
|
|
33704
33705
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
33705
33706
|
}, "forgetErasedTestData");
|
|
33706
33707
|
|
|
33707
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
33708
33709
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null, startScope) => Number(orm.insert(accounts).values({
|
|
33709
33710
|
provider,
|
|
33710
33711
|
externalId: account,
|
|
@@ -33798,7 +33799,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
33798
33799
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
33799
33800
|
}, "dropOrphanPeople");
|
|
33800
33801
|
|
|
33801
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
33802
33803
|
var HISTORY_KEY = "$history";
|
|
33803
33804
|
var objectOf3 = /* @__PURE__ */ __name((text9) => {
|
|
33804
33805
|
if (typeof text9 !== "string")
|
|
@@ -33874,7 +33875,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
33874
33875
|
return rest;
|
|
33875
33876
|
}, "withoutHistory");
|
|
33876
33877
|
|
|
33877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
33878
33879
|
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");
|
|
33879
33880
|
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");
|
|
33880
33881
|
var setChatScope = /* @__PURE__ */ __name((context, accountKey, chatId, scope3) => {
|
|
@@ -34172,7 +34173,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
34172
34173
|
}
|
|
34173
34174
|
}, "replaceAutoTags");
|
|
34174
34175
|
|
|
34175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
34176
34177
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
34177
34178
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
34178
34179
|
var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
|
|
@@ -34191,7 +34192,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
34191
34192
|
return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
|
|
34192
34193
|
}, "counterFreshness");
|
|
34193
34194
|
|
|
34194
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-tokens.js
|
|
34195
34196
|
var BOT_TOKEN = /(?<!\d)(\d{6,12}):[A-Za-z0-9_-]{30,40}(?![A-Za-z0-9_-])/g;
|
|
34196
34197
|
var MAY_HOLD = "*[0-9][0-9][0-9][0-9][0-9][0-9]:*";
|
|
34197
34198
|
var MASKED_THROUGH = "bot_tokens_masked_through";
|
|
@@ -34231,7 +34232,7 @@ var maskStoredBotTokens = /* @__PURE__ */ __name((context) => {
|
|
|
34231
34232
|
}, "maskStoredBotTokens");
|
|
34232
34233
|
var masks = /* @__PURE__ */ __name((value) => value != null && withoutBotTokens(String(value)) !== value, "masks");
|
|
34233
34234
|
|
|
34234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34235
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
34235
34236
|
import { createHash as createHash4 } from "node:crypto";
|
|
34236
34237
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
34237
34238
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -34329,7 +34330,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
34329
34330
|
return { source: source2, query, chat: chat2, senders, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
34330
34331
|
}, "contextEvidenceRequest");
|
|
34331
34332
|
|
|
34332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
34333
34334
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
34334
34335
|
var ACTIVITY = `
|
|
34335
34336
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -34459,7 +34460,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
34459
34460
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
34460
34461
|
}), "mailActivity");
|
|
34461
34462
|
|
|
34462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
34463
34464
|
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");
|
|
34464
34465
|
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;
|
|
34465
34466
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -34540,7 +34541,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
34540
34541
|
return withoutSignOff(withoutGreeting(kept2)).join("\n").trim();
|
|
34541
34542
|
}, "mailCore");
|
|
34542
34543
|
|
|
34543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
34544
34545
|
var titleOf2 = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
34545
34546
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
34546
34547
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
@@ -34653,7 +34654,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
34653
34654
|
return emails3 + threads;
|
|
34654
34655
|
}, "drainEmailIndex");
|
|
34655
34656
|
|
|
34656
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34657
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
34657
34658
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
34658
34659
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
34659
34660
|
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,
|
|
@@ -34751,7 +34752,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
34751
34752
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
34752
34753
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
34753
34754
|
|
|
34754
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
34755
34756
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
34756
34757
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
34757
34758
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -34801,7 +34802,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
34801
34802
|
return threads.length;
|
|
34802
34803
|
}, "markEmailsRestored");
|
|
34803
34804
|
|
|
34804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
34805
34806
|
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
|
|
34806
34807
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
34807
34808
|
WHERE p.account_id = ?
|
|
@@ -34861,7 +34862,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
34861
34862
|
}, "indexedMailPieces");
|
|
34862
34863
|
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");
|
|
34863
34864
|
|
|
34864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34865
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
34865
34866
|
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");
|
|
34866
34867
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
34867
34868
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -34928,7 +34929,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
34928
34929
|
}
|
|
34929
34930
|
}), "mailRulesOver");
|
|
34930
34931
|
|
|
34931
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
34932
34933
|
function checkMeetingCancelled(signal) {
|
|
34933
34934
|
if (!signal?.aborted)
|
|
34934
34935
|
return;
|
|
@@ -34939,7 +34940,7 @@ function checkMeetingCancelled(signal) {
|
|
|
34939
34940
|
}
|
|
34940
34941
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
34941
34942
|
|
|
34942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
34943
34944
|
var managerOf = /* @__PURE__ */ __name((database, meetingId) => {
|
|
34944
34945
|
const found2 = database.prepare("SELECT p.display_name, i.name, l.person_id FROM meeting_participants p JOIN identities i ON i.id = p.identity_id LEFT JOIN identity_links l ON l.identity_id = p.identity_id WHERE p.meeting_id = ? AND p.role = 'manager' ORDER BY p.id LIMIT 1").get(meetingId);
|
|
34945
34946
|
if (!found2)
|
|
@@ -35004,7 +35005,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
35004
35005
|
createdAt: Number(row2.created_at)
|
|
35005
35006
|
}), "transcriptRowOf");
|
|
35006
35007
|
|
|
35007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
35008
35009
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
35009
35010
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
35010
35011
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -35171,7 +35172,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35171
35172
|
}
|
|
35172
35173
|
}), "meetingReadsOver");
|
|
35173
35174
|
|
|
35174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
35175
35176
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
35176
35177
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
35177
35178
|
const params = [input.accountId];
|
|
@@ -35214,7 +35215,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
35214
35215
|
return { clauses, params };
|
|
35215
35216
|
}, "meetingSelectionSql");
|
|
35216
35217
|
|
|
35217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-calls.js
|
|
35218
35219
|
var MOST_CALLS = 2e5;
|
|
35219
35220
|
var parsed3 = /* @__PURE__ */ __name((value) => {
|
|
35220
35221
|
if (typeof value !== "string")
|
|
@@ -35269,7 +35270,7 @@ var meetingCallsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35269
35270
|
}
|
|
35270
35271
|
}), "meetingCallsOver");
|
|
35271
35272
|
|
|
35272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35273
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
35273
35274
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35274
35275
|
async meetingChatLines(input) {
|
|
35275
35276
|
checkMeetingCancelled(input.signal);
|
|
@@ -35297,7 +35298,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35297
35298
|
}
|
|
35298
35299
|
}), "meetingChatLinesOver");
|
|
35299
35300
|
|
|
35300
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35301
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
35301
35302
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
35302
35303
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
35303
35304
|
}, "missing");
|
|
@@ -35420,7 +35421,7 @@ function meetingContextLinksOver(context) {
|
|
|
35420
35421
|
}
|
|
35421
35422
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
35422
35423
|
|
|
35423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-documents.js
|
|
35424
35425
|
var TRANSCRIPT_ROLE = "transcript";
|
|
35425
35426
|
var roleOf3 = /* @__PURE__ */ __name((value) => MEETING_DOCUMENT_ROLES.find((role) => role === value), "roleOf");
|
|
35426
35427
|
var attach = /* @__PURE__ */ __name((database, meetingId, fileId, role, metadata3, listed, now2) => {
|
|
@@ -35494,7 +35495,7 @@ var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
35494
35495
|
};
|
|
35495
35496
|
}, "meetingTranscriptDocumentsOver");
|
|
35496
35497
|
|
|
35497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
35498
35499
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
35499
35500
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
35500
35501
|
var summaryOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -35523,7 +35524,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
35523
35524
|
return row2 ? summaryText(summaryOf2(row2)) : null;
|
|
35524
35525
|
}, "indexedText");
|
|
35525
35526
|
|
|
35526
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
35527
35528
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
35528
35529
|
var meetingCurrentIndexRows = `
|
|
35529
35530
|
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
|
|
@@ -35554,7 +35555,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
35554
35555
|
}, "invalidateMeetingStems");
|
|
35555
35556
|
var meetingStemmableText = /* @__PURE__ */ __name((text9) => text9.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
35556
35557
|
|
|
35557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
35558
35559
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
35559
35560
|
return {
|
|
35560
35561
|
async indexSearch(original) {
|
|
@@ -35622,10 +35623,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
35622
35623
|
}
|
|
35623
35624
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
35624
35625
|
|
|
35625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35626
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
35626
35627
|
import { createHash as createHash5 } from "node:crypto";
|
|
35627
35628
|
|
|
35628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35629
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
35629
35630
|
var SHORTEST_CORRECTION = 3;
|
|
35630
35631
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
35631
35632
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -35672,7 +35673,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words4) => {
|
|
|
35672
35673
|
return corrections;
|
|
35673
35674
|
}, "correctWords");
|
|
35674
35675
|
|
|
35675
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35676
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
35676
35677
|
var SHORTEST_GARBLED = 4;
|
|
35677
35678
|
var MOST_WIDENED = 64;
|
|
35678
35679
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -35764,7 +35765,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
35764
35765
|
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));
|
|
35765
35766
|
}, "widenWords");
|
|
35766
35767
|
|
|
35767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35768
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
35768
35769
|
import { readFileSync } from "node:fs";
|
|
35769
35770
|
var loaded;
|
|
35770
35771
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -35823,7 +35824,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
35823
35824
|
return false;
|
|
35824
35825
|
}, "knownRussianWord");
|
|
35825
35826
|
|
|
35826
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35827
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
35827
35828
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
35828
35829
|
var MOST_WORDS = 128;
|
|
35829
35830
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -36079,7 +36080,7 @@ var matchedMeetingWords = /* @__PURE__ */ __name((tree, text9, stemmer2) => {
|
|
|
36079
36080
|
return [...found2];
|
|
36080
36081
|
}, "matchedMeetingWords");
|
|
36081
36082
|
|
|
36082
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36083
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
36083
36084
|
var fail = /* @__PURE__ */ __name((message3) => {
|
|
36084
36085
|
throw new CliError("validation_error", message3);
|
|
36085
36086
|
}, "fail");
|
|
@@ -36263,7 +36264,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
36263
36264
|
}
|
|
36264
36265
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
36265
36266
|
|
|
36266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
36267
36268
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36268
36269
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
36269
36270
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -36295,7 +36296,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36295
36296
|
}
|
|
36296
36297
|
}), "meetingLanguagesOver");
|
|
36297
36298
|
|
|
36298
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
36299
36300
|
import { createHash as createHash6 } from "node:crypto";
|
|
36300
36301
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
36301
36302
|
if (value === void 0)
|
|
@@ -36388,7 +36389,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
36388
36389
|
}
|
|
36389
36390
|
}), "meetingParticipantSearchOver");
|
|
36390
36391
|
|
|
36391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
36392
36393
|
var preparationQueries = {
|
|
36393
36394
|
participants: {
|
|
36394
36395
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -36438,7 +36439,7 @@ var preparationQueries = {
|
|
|
36438
36439
|
}
|
|
36439
36440
|
};
|
|
36440
36441
|
|
|
36441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
36442
36443
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36443
36444
|
async preparationContext(original) {
|
|
36444
36445
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -36479,7 +36480,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36479
36480
|
}
|
|
36480
36481
|
}), "meetingPreparationContextOver");
|
|
36481
36482
|
|
|
36482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
36483
36484
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
36484
36485
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
36485
36486
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -36493,7 +36494,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
36493
36494
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
36494
36495
|
)`, "preparationSubjects");
|
|
36495
36496
|
|
|
36496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36497
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
36497
36498
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36498
36499
|
async preparationKnowledge(original) {
|
|
36499
36500
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -36538,7 +36539,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
36538
36539
|
}
|
|
36539
36540
|
}), "meetingPreparationKnowledgeOver");
|
|
36540
36541
|
|
|
36541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36542
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
36542
36543
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36543
36544
|
async preparationNotes(original) {
|
|
36544
36545
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -36591,7 +36592,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36591
36592
|
}
|
|
36592
36593
|
}), "meetingPreparationNotesOver");
|
|
36593
36594
|
|
|
36594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36595
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
36595
36596
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36596
36597
|
async relatedHistory(original) {
|
|
36597
36598
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -36662,7 +36663,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36662
36663
|
}
|
|
36663
36664
|
}), "meetingRelatedHistoryOver");
|
|
36664
36665
|
|
|
36665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36666
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
36666
36667
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
36667
36668
|
var text4 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
36668
36669
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -36743,7 +36744,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36743
36744
|
}
|
|
36744
36745
|
}), "meetingReviewOver");
|
|
36745
36746
|
|
|
36746
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36747
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
36747
36748
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
36748
36749
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
36749
36750
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -36797,7 +36798,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36797
36798
|
}
|
|
36798
36799
|
}), "meetingSeriesHistoryOver");
|
|
36799
36800
|
|
|
36800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
36801
36802
|
var MOST_ROWS = 5e5;
|
|
36802
36803
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
36803
36804
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -36866,7 +36867,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36866
36867
|
}
|
|
36867
36868
|
}), "meetingStatsOver");
|
|
36868
36869
|
|
|
36869
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36870
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
|
|
36870
36871
|
var CYRILLIC_TO_LATIN = {
|
|
36871
36872
|
\u0430: "a",
|
|
36872
36873
|
\u0431: "b",
|
|
@@ -37088,7 +37089,7 @@ for (const [full, short] of Object.entries(SHORT_FORMS))
|
|
|
37088
37089
|
}
|
|
37089
37090
|
var fullNames = /* @__PURE__ */ __name((skeleton) => [skeleton, ...FULL_NAMES.get(skeleton) ?? []], "fullNames");
|
|
37090
37091
|
|
|
37091
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/name-traces.js
|
|
37092
37093
|
var peopleByNameKey = /* @__PURE__ */ __name((database) => {
|
|
37093
37094
|
const found2 = /* @__PURE__ */ new Map();
|
|
37094
37095
|
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()) {
|
|
@@ -37204,7 +37205,7 @@ function* sharedTraces(database, a, b, name, except) {
|
|
|
37204
37205
|
}
|
|
37205
37206
|
__name(sharedTraces, "sharedTraces");
|
|
37206
37207
|
|
|
37207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-matcher.js
|
|
37208
37209
|
var spellingsOf = /* @__PURE__ */ __name((value) => [value, value.slice(1)], "spellingsOf");
|
|
37209
37210
|
var PERSON_BY = {
|
|
37210
37211
|
// UNION, not OR: each branch reads its own index.
|
|
@@ -37227,7 +37228,7 @@ var personsByIdentifiers = /* @__PURE__ */ __name((database, ids3) => {
|
|
|
37227
37228
|
return [...found2].sort((a, b) => a - b);
|
|
37228
37229
|
}, "personsByIdentifiers");
|
|
37229
37230
|
|
|
37230
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-match-scan.js
|
|
37231
37232
|
var BY = "rule";
|
|
37232
37233
|
var RULE = { bot: "rule", kind: "rule" };
|
|
37233
37234
|
var MOST_SHARING = 6;
|
|
@@ -37676,7 +37677,7 @@ var linkPhones = /* @__PURE__ */ __name((context, identities2) => {
|
|
|
37676
37677
|
return pass.result;
|
|
37677
37678
|
}, "linkPhones");
|
|
37678
37679
|
|
|
37679
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
37680
37681
|
var CURSOR_KEY = "meetings";
|
|
37681
37682
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
37682
37683
|
id: Number(row2.id),
|
|
@@ -38283,7 +38284,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
38283
38284
|
};
|
|
38284
38285
|
}, "meetingStoreOver");
|
|
38285
38286
|
|
|
38286
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38287
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
38287
38288
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
38288
38289
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
38289
38290
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -38309,7 +38310,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder2) => {
|
|
|
38309
38310
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder2))).run();
|
|
38310
38311
|
}, "release");
|
|
38311
38312
|
|
|
38312
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38313
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
38313
38314
|
var THREAD_COLUMNS = {
|
|
38314
38315
|
subject: {
|
|
38315
38316
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -38326,7 +38327,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
38326
38327
|
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);
|
|
38327
38328
|
}, "threadRows");
|
|
38328
38329
|
|
|
38329
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
38330
38331
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
38331
38332
|
id: `email:${place.emailId}`,
|
|
38332
38333
|
chatId: place.threadExternalId,
|
|
@@ -38868,7 +38869,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
38868
38869
|
}
|
|
38869
38870
|
}), "mailStoreOver");
|
|
38870
38871
|
|
|
38871
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
38872
38873
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
38873
38874
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
38874
38875
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -38958,7 +38959,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
38958
38959
|
}, "knownWord");
|
|
38959
38960
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
38960
38961
|
|
|
38961
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38962
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
38962
38963
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
38963
38964
|
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");
|
|
38964
38965
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -39044,7 +39045,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
39044
39045
|
return found2;
|
|
39045
39046
|
}, "spokenTranscripts");
|
|
39046
39047
|
|
|
39047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
39048
39049
|
var startOf = /* @__PURE__ */ __name((node) => node.operator === "wildcard" && node.implicit ? /^([\p{L}\p{N}]+)\*$/u.exec(normalize(node.value))?.[1] : void 0, "startOf");
|
|
39049
39050
|
var matchOf = /* @__PURE__ */ __name((node) => {
|
|
39050
39051
|
const start = startOf(node);
|
|
@@ -39102,7 +39103,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
39102
39103
|
});
|
|
39103
39104
|
}, "placeHits");
|
|
39104
39105
|
|
|
39105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39106
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
39106
39107
|
var GROUPS = {
|
|
39107
39108
|
chat: {
|
|
39108
39109
|
key: "m.chat_id",
|
|
@@ -39124,7 +39125,7 @@ var GROUPS = {
|
|
|
39124
39125
|
}
|
|
39125
39126
|
};
|
|
39126
39127
|
|
|
39127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39128
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/word-rarity.js
|
|
39128
39129
|
var withRarity = /* @__PURE__ */ __name((database, words4, leaves, ranked3) => {
|
|
39129
39130
|
const matches2 = [...new Set(leaves.flatMap(({ fragment }) => fragment.fts ?? []))];
|
|
39130
39131
|
if (!matches2.length)
|
|
@@ -39141,7 +39142,7 @@ var withRarity = /* @__PURE__ */ __name((database, words4, leaves, ranked3) => {
|
|
|
39141
39142
|
}, "withRarity");
|
|
39142
39143
|
var RARITY_ORDER = "coalesce(rarity.score, 0) - 0.2 * coalesce(f.rank, 0) DESC, ";
|
|
39143
39144
|
|
|
39144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
39145
39146
|
var matchQuery = /* @__PURE__ */ __name((context, execution) => runQuery(context, execution), "matchQuery");
|
|
39146
39147
|
var countQuery = /* @__PURE__ */ __name((context, execution, by) => runQuery(context, execution, by), "countQuery");
|
|
39147
39148
|
var queryMessagePks = /* @__PURE__ */ __name((context, execution) => runQuery(context, execution, "pks"), "queryMessagePks");
|
|
@@ -39623,7 +39624,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
39623
39624
|
};
|
|
39624
39625
|
}, "runCompiled");
|
|
39625
39626
|
|
|
39626
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
39627
39628
|
function invalidMetadata() {
|
|
39628
39629
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
39629
39630
|
}
|
|
@@ -39725,7 +39726,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
39725
39726
|
};
|
|
39726
39727
|
}), "counterTargets");
|
|
39727
39728
|
|
|
39728
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
39729
39730
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
39730
39731
|
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,
|
|
39731
39732
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -39844,7 +39845,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
39844
39845
|
}));
|
|
39845
39846
|
}, "attachmentViews");
|
|
39846
39847
|
|
|
39847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39848
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
39848
39849
|
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");
|
|
39849
39850
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text9, source2) => {
|
|
39850
39851
|
const { orm, database, now: now2 } = context;
|
|
@@ -39882,7 +39883,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
39882
39883
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
39883
39884
|
}, "intoVoiceAttachment");
|
|
39884
39885
|
|
|
39885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
39886
39887
|
var FIELDS = [
|
|
39887
39888
|
"threadExternalId",
|
|
39888
39889
|
"senderIdentityId",
|
|
@@ -40206,7 +40207,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
40206
40207
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
40207
40208
|
}, "writeDerivedReactions");
|
|
40208
40209
|
|
|
40209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
40210
40211
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
40211
40212
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
40212
40213
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -40227,7 +40228,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
40227
40228
|
};
|
|
40228
40229
|
}, "keysOver");
|
|
40229
40230
|
|
|
40230
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
40231
40232
|
var unquoted3 = /* @__PURE__ */ __name((value) => {
|
|
40232
40233
|
if (typeof value !== "string")
|
|
40233
40234
|
return value;
|
|
@@ -40285,7 +40286,7 @@ var forgetProfile = /* @__PURE__ */ __name((database, app, profile, now2) => {
|
|
|
40285
40286
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
40286
40287
|
}, "forgetProfile");
|
|
40287
40288
|
|
|
40288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
40289
40290
|
var DAY4 = 864e5;
|
|
40290
40291
|
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}')`;
|
|
40291
40292
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -40401,7 +40402,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
40401
40402
|
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);
|
|
40402
40403
|
}, "listEvents");
|
|
40403
40404
|
|
|
40404
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40405
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
40405
40406
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
40406
40407
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey, now: now2 }, refresh) => {
|
|
40407
40408
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -40458,7 +40459,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
40458
40459
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
40459
40460
|
}, "forgetCalendarRows");
|
|
40460
40461
|
|
|
40461
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40462
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
40462
40463
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
40463
40464
|
id: Number(row2.id),
|
|
40464
40465
|
accountId: Number(row2.account_id),
|
|
@@ -41061,7 +41062,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
41061
41062
|
};
|
|
41062
41063
|
}, "eventStoreOver");
|
|
41063
41064
|
|
|
41064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/erase-plan.js
|
|
41065
41066
|
var AUTHORS = /* @__PURE__ */ new Set(["author", "confirmed_by", "decided_by", "proposed_by", "actor", "closed_by"]);
|
|
41066
41067
|
var LINK_ROWS = /* @__PURE__ */ new Set(["links", "mentions", "task_assignments"]);
|
|
41067
41068
|
var HISTORY = /* @__PURE__ */ new Set(["note_revisions"]);
|
|
@@ -41146,7 +41147,7 @@ var ErasePlan = class {
|
|
|
41146
41147
|
}
|
|
41147
41148
|
};
|
|
41148
41149
|
|
|
41149
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-erase.js
|
|
41150
41151
|
var OWN_ROWS = /* @__PURE__ */ new Set(["organization_identities"]);
|
|
41151
41152
|
var organizationOf = /* @__PURE__ */ __name((database, ref3) => {
|
|
41152
41153
|
const asked = /^(?:organization:)?([1-9]\d*)$/u.exec(ref3.trim())?.[1];
|
|
@@ -41204,7 +41205,7 @@ var eraseImportedOrganizations = /* @__PURE__ */ __name((context, organizations2
|
|
|
41204
41205
|
}
|
|
41205
41206
|
}, "eraseImportedOrganizations");
|
|
41206
41207
|
|
|
41207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-erase.js
|
|
41208
41209
|
var personOf4 = /* @__PURE__ */ __name((context, uid) => {
|
|
41209
41210
|
const asked = /^(?:person:)?([1-9]\d*)$/u.exec(uid.trim())?.[1];
|
|
41210
41211
|
const known2 = asked === void 0 ? void 0 : context.database.prepare("SELECT id FROM persons WHERE id = ?").get(Number(asked));
|
|
@@ -41294,7 +41295,7 @@ var eraseImportedPeople = /* @__PURE__ */ __name((context, people2) => {
|
|
|
41294
41295
|
}
|
|
41295
41296
|
}, "eraseImportedPeople");
|
|
41296
41297
|
|
|
41297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/account-purge.js
|
|
41298
41299
|
var purgeAccount = /* @__PURE__ */ __name((context, accountKey) => {
|
|
41299
41300
|
const { orm, database, now: now2 } = context;
|
|
41300
41301
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -41409,7 +41410,7 @@ var purgeCrmCopies = /* @__PURE__ */ __name((database, accountKey) => {
|
|
|
41409
41410
|
run("DELETE FROM pipelines WHERE account_id = ?", accountKey);
|
|
41410
41411
|
}, "purgeCrmCopies");
|
|
41411
41412
|
|
|
41412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
41413
41414
|
var ACCOUNT_REASON = "an account you connected, under another name: a mailbox or messenger you read may be someone else's";
|
|
41414
41415
|
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");
|
|
41415
41416
|
var ownersName = /* @__PURE__ */ __name((name, owner, alone) => {
|
|
@@ -41468,7 +41469,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
41468
41469
|
return personOf2(context, ref3);
|
|
41469
41470
|
}, "linkToOwner");
|
|
41470
41471
|
|
|
41471
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
41472
41473
|
var PROVIDERS_SETTING = "providers";
|
|
41473
41474
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
41474
41475
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -41516,7 +41517,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
41516
41517
|
});
|
|
41517
41518
|
}, "registerProvider");
|
|
41518
41519
|
|
|
41519
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
41520
41521
|
var DAY5 = 864e5;
|
|
41521
41522
|
var RECENTLY_CLOSED_MS = 14 * DAY5;
|
|
41522
41523
|
var TEXT_LIMIT = 20;
|
|
@@ -41714,7 +41715,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
41714
41715
|
};
|
|
41715
41716
|
}, "taskSimilarityOver");
|
|
41716
41717
|
|
|
41717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41718
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
41718
41719
|
var SETTING3 = "taskCategories";
|
|
41719
41720
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
41720
41721
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -41733,7 +41734,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
41733
41734
|
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);
|
|
41734
41735
|
}, "saveTaskCategories");
|
|
41735
41736
|
|
|
41736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
41737
41738
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
41738
41739
|
var ALLOWED = "taskAgentClose";
|
|
41739
41740
|
var MIN = "taskAgentCloseMin";
|
|
@@ -41789,7 +41790,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
41789
41790
|
];
|
|
41790
41791
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
41791
41792
|
|
|
41792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
41793
41794
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
41794
41795
|
var KEY = "taskFirstPassPerChat";
|
|
41795
41796
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting2 = "task_first_pass_per_chat") => {
|
|
@@ -41809,7 +41810,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
41809
41810
|
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);
|
|
41810
41811
|
}, "saveFirstPassPerChat");
|
|
41811
41812
|
|
|
41812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41813
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
41813
41814
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
41814
41815
|
var EXTERNAL_ID_CHARS = 200;
|
|
41815
41816
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -41836,7 +41837,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
41836
41837
|
return text9;
|
|
41837
41838
|
}, "sourceUrlOf");
|
|
41838
41839
|
|
|
41839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
41840
41841
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
41841
41842
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
41842
41843
|
name,
|
|
@@ -42088,7 +42089,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
42088
42089
|
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 ?`;
|
|
42089
42090
|
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");
|
|
42090
42091
|
|
|
42091
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
42092
42093
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
42093
42094
|
if (row2.author_type == null)
|
|
42094
42095
|
return null;
|
|
@@ -42116,7 +42117,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
42116
42117
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
42117
42118
|
}, "addComment");
|
|
42118
42119
|
|
|
42119
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
42120
42121
|
var TASK_RELATION_KINDS = [
|
|
42121
42122
|
"blocked-by",
|
|
42122
42123
|
"follow-up-of",
|
|
@@ -42246,7 +42247,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record3) => {
|
|
|
42246
42247
|
};
|
|
42247
42248
|
}, "taskRelationsStoreOver");
|
|
42248
42249
|
|
|
42249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
42250
42251
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
42251
42252
|
var TASK_EVENT_KINDS = [
|
|
42252
42253
|
"created",
|
|
@@ -42805,7 +42806,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
42805
42806
|
};
|
|
42806
42807
|
}, "workTasksOver");
|
|
42807
42808
|
|
|
42808
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
42809
42810
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
42810
42811
|
const { database, now: now2 } = context;
|
|
42811
42812
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -42854,7 +42855,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
42854
42855
|
};
|
|
42855
42856
|
}, "taskCloseOver");
|
|
42856
42857
|
|
|
42857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42858
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
42858
42859
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
42859
42860
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
42860
42861
|
const { database, now: now2 } = context;
|
|
@@ -43073,7 +43074,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
43073
43074
|
};
|
|
43074
43075
|
}, "taskPairsOver");
|
|
43075
43076
|
|
|
43076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
43077
43078
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
43078
43079
|
var TASK_STATS_SQL = {
|
|
43079
43080
|
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"),
|
|
@@ -43112,7 +43113,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
43112
43113
|
}, "statNames")
|
|
43113
43114
|
}), "taskStatsOver");
|
|
43114
43115
|
|
|
43115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43116
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
43116
43117
|
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";
|
|
43117
43118
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
43118
43119
|
const key2 = inboxKey(account);
|
|
@@ -43328,7 +43329,7 @@ var oneOf4 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
43328
43329
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
43329
43330
|
}, "oneOf");
|
|
43330
43331
|
|
|
43331
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
43332
43333
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
43333
43334
|
const { database } = context;
|
|
43334
43335
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -43398,7 +43399,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
43398
43399
|
};
|
|
43399
43400
|
}, "accountsStoreOver");
|
|
43400
43401
|
|
|
43401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
43402
43403
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
43403
43404
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
43404
43405
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -43422,7 +43423,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
43422
43423
|
})), "keepDownloads");
|
|
43423
43424
|
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");
|
|
43424
43425
|
|
|
43425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43426
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
43426
43427
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
43427
43428
|
const { database } = context;
|
|
43428
43429
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -43479,7 +43480,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
43479
43480
|
}, "keepAttachmentText")
|
|
43480
43481
|
}), "attachmentsStoreOver");
|
|
43481
43482
|
|
|
43482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
43483
43484
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
43484
43485
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
43485
43486
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -43664,7 +43665,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
43664
43665
|
return done;
|
|
43665
43666
|
}, "rekeyChats");
|
|
43666
43667
|
|
|
43667
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43668
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
43668
43669
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
43669
43670
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
43670
43671
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -43722,7 +43723,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
43722
43723
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
43723
43724
|
}, "chatCoverage");
|
|
43724
43725
|
|
|
43725
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
43726
43727
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
43727
43728
|
const { database } = context;
|
|
43728
43729
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -43871,7 +43872,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43871
43872
|
};
|
|
43872
43873
|
}, "chatsStoreOver");
|
|
43873
43874
|
|
|
43874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43875
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
43875
43876
|
import { createHash as createHash7 } from "node:crypto";
|
|
43876
43877
|
var BATCH_CONTEXT = 50;
|
|
43877
43878
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -44011,7 +44012,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
44011
44012
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
44012
44013
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
44013
44014
|
|
|
44014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44015
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
44015
44016
|
import { setTimeout } from "node:timers/promises";
|
|
44016
44017
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
44017
44018
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -44406,7 +44407,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
44406
44407
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
44407
44408
|
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");
|
|
44408
44409
|
|
|
44409
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44410
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
44410
44411
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
44411
44412
|
const { database } = context;
|
|
44412
44413
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -44527,7 +44528,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
44527
44528
|
};
|
|
44528
44529
|
}, "conversationsStoreOver");
|
|
44529
44530
|
|
|
44530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
44531
44532
|
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";
|
|
44532
44533
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
44533
44534
|
const { database } = context;
|
|
@@ -44552,7 +44553,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
44552
44553
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
44553
44554
|
}), "countersStoreOver");
|
|
44554
44555
|
|
|
44555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
44556
44557
|
var MENTION_STATUSES = ["found", "linked", "proposed", "dismissed"];
|
|
44557
44558
|
var MENTION_QUERY = defineQuery({
|
|
44558
44559
|
entity: "mention",
|
|
@@ -44771,7 +44772,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
44771
44772
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
44772
44773
|
}, "listPlaces");
|
|
44773
44774
|
|
|
44774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
44775
44776
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
44776
44777
|
const { database } = context;
|
|
44777
44778
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -44806,7 +44807,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
44806
44807
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
44807
44808
|
}), "mentionsStoreOver");
|
|
44808
44809
|
|
|
44809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44810
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
44810
44811
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
44811
44812
|
var MUTED_NOW = "(coalesce(c.muted,0)=1 AND (c.muted_until IS NULL OR c.muted_until>?))";
|
|
44812
44813
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2, now2) => {
|
|
@@ -44905,7 +44906,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
44905
44906
|
});
|
|
44906
44907
|
}, "waitingChats");
|
|
44907
44908
|
|
|
44908
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44909
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-activity-counts.js
|
|
44909
44910
|
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 = ?`;
|
|
44910
44911
|
var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since, until, now: now2 }) => {
|
|
44911
44912
|
const statement = database.prepare(SQL);
|
|
@@ -44925,7 +44926,7 @@ var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since
|
|
|
44925
44926
|
return found2;
|
|
44926
44927
|
}, "chatActivityCounts");
|
|
44927
44928
|
|
|
44928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
44929
44930
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
44930
44931
|
const read2 = database.prepare("SELECT m.id, m.external_id, m.text, m.sent_at, m.sender_name, coalesce(m.sender_chat_external_id, i.external_id) AS sender_id FROM messages m LEFT JOIN identities i ON i.id = m.sender_identity_id WHERE m.chat_id = ? AND m.deleted_at IS NULL AND (m.text LIKE '%google.com%' OR m.text LIKE '%forms.gle%') " + (messageId === void 0 ? "" : "AND m.external_id = ? ") + "ORDER BY m.sent_at DESC, m.id DESC");
|
|
44931
44932
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -44940,7 +44941,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
44940
44941
|
}));
|
|
44941
44942
|
}, "documentLinkMessages");
|
|
44942
44943
|
|
|
44943
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
44944
44945
|
var stemmerFor = stemmerCache();
|
|
44945
44946
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
44946
44947
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -44984,7 +44985,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
44984
44985
|
});
|
|
44985
44986
|
}, "laterSharingRare");
|
|
44986
44987
|
|
|
44987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44988
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
44988
44989
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
44989
44990
|
const { database } = context;
|
|
44990
44991
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -45125,7 +45126,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
45125
45126
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
45126
45127
|
}), "messagesStoreOver");
|
|
45127
45128
|
|
|
45128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-links.js
|
|
45129
45130
|
var AGENT_METHOD = "agent";
|
|
45130
45131
|
var personsOf = /* @__PURE__ */ __name(({ database }) => new Map(database.prepare("SELECT identity_id, person_id FROM identity_links").all().map((row2) => [Number(row2.identity_id), Number(row2.person_id)])), "personsOf");
|
|
45131
45132
|
var weaknessOf = /* @__PURE__ */ __name((context, kind3, value, holders, sides, others) => {
|
|
@@ -45269,7 +45270,7 @@ var agentMerges = /* @__PURE__ */ __name((context, { limit, offset }) => {
|
|
|
45269
45270
|
return { items: found2.slice(offset, offset + limit), hasMore: found2.length > offset + limit };
|
|
45270
45271
|
}, "agentMerges");
|
|
45271
45272
|
|
|
45272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45273
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-rekey.js
|
|
45273
45274
|
var quoted2 = /* @__PURE__ */ __name((name) => `"${name.replace(/"/g, '""')}"`, "quoted");
|
|
45274
45275
|
var columnsOf3 = /* @__PURE__ */ __name((database, table) => database.prepare("SELECT name, pk, type FROM pragma_table_info(?)").all(table), "columnsOf");
|
|
45275
45276
|
var foreignKeysTo = /* @__PURE__ */ __name((database, table) => database.prepare(`SELECT m.name AS tbl, f."from" AS col FROM sqlite_master m JOIN pragma_foreign_key_list(m.name) f
|
|
@@ -45413,7 +45414,7 @@ var rekeyIdentities = /* @__PURE__ */ __name((context, provider, pairs, { lockMs
|
|
|
45413
45414
|
return done;
|
|
45414
45415
|
}, "rekeyIdentities");
|
|
45415
45416
|
|
|
45416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/person-kinds.js
|
|
45417
45418
|
var PERSON_KINDS = ["person", "organization", "automated", "stranger", "unsorted", "test"];
|
|
45418
45419
|
var AUTOMATED_WORDS = /* @__PURE__ */ new Set([
|
|
45419
45420
|
"noreply",
|
|
@@ -45476,7 +45477,7 @@ var isCompanyName = /* @__PURE__ */ __name((name) => {
|
|
|
45476
45477
|
return wordsOf3(name.replaceAll(".", "")).some((word2) => LEGAL_FORMS.has(word2) || COMPANY_WORDS.has(word2));
|
|
45477
45478
|
}, "isCompanyName");
|
|
45478
45479
|
|
|
45479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-ties.js
|
|
45480
45481
|
var SMALL_GROUP_MEMBERS = 10;
|
|
45481
45482
|
var PERSON_TIES = ["chat", "small-group", "mail", "meeting", "crm", "phone-book"];
|
|
45482
45483
|
var ALWAYS_SHOWN = ["owner", "added", "task"];
|
|
@@ -45531,7 +45532,7 @@ var shownReasons = /* @__PURE__ */ __name((database, people2) => {
|
|
|
45531
45532
|
return new Map([...found2].map(([person2, reasons]) => [person2, ORDER.filter((one2) => reasons.has(one2))]));
|
|
45532
45533
|
}, "shownReasons");
|
|
45533
45534
|
|
|
45534
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/people-list.js
|
|
45535
45536
|
var PEOPLE_SORTS = ["interactions", "recent", "name", "tasks"];
|
|
45536
45537
|
var MIN_QUERY = 3;
|
|
45537
45538
|
var matching2 = /* @__PURE__ */ __name((query) => {
|
|
@@ -45876,7 +45877,7 @@ var similarPeople = /* @__PURE__ */ __name((database, typed, limit) => {
|
|
|
45876
45877
|
return withLastContact(database, rows).map((person2, at2) => ({ ...person2, sameName: same[at2] === true }));
|
|
45877
45878
|
}, "similarPeople");
|
|
45878
45879
|
|
|
45879
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45880
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-doubts.js
|
|
45880
45881
|
var DOUBT_REASONS = ["owner-other-name", "test-data", "shared-address", "mixed-names"];
|
|
45881
45882
|
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";
|
|
45882
45883
|
var text5 = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? value : null, "text");
|
|
@@ -46132,7 +46133,7 @@ var markTestData = /* @__PURE__ */ __name((context, uid, by) => {
|
|
|
46132
46133
|
return { person: `person:${person2}`, identities: identities2 };
|
|
46133
46134
|
}, "markTestData");
|
|
46134
46135
|
|
|
46135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
46136
46137
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
46137
46138
|
var IN_SCOPES = "IN (SELECT value FROM json_each(?))";
|
|
46138
46139
|
var projectScope = /* @__PURE__ */ __name((id2) => `(SELECT p.scope FROM main.projects p WHERE p.id=${id2})`, "projectScope");
|
|
@@ -46201,7 +46202,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
46201
46202
|
});
|
|
46202
46203
|
}, "personPreparation");
|
|
46203
46204
|
|
|
46204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
46205
46206
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
46206
46207
|
const id2 = Number(uid);
|
|
46207
46208
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -46209,7 +46210,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
46209
46210
|
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)));
|
|
46210
46211
|
}, "personSeenInAccounts");
|
|
46211
46212
|
|
|
46212
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
46213
46214
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
46214
46215
|
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);
|
|
46215
46216
|
if (!row2)
|
|
@@ -46276,7 +46277,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
46276
46277
|
return { id: id2, personId, removed: true };
|
|
46277
46278
|
}, "removeNote");
|
|
46278
46279
|
|
|
46279
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
46280
46281
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
46281
46282
|
const { database } = context;
|
|
46282
46283
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -46420,13 +46421,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
46420
46421
|
};
|
|
46421
46422
|
}, "peopleStoreOver");
|
|
46422
46423
|
|
|
46423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
46424
46425
|
import { createHash as createHash9 } from "node:crypto";
|
|
46425
46426
|
|
|
46426
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
46427
46428
|
import { createHash as createHash8 } from "node:crypto";
|
|
46428
46429
|
|
|
46429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
46430
46431
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
46431
46432
|
var AUTHOR_MEASURES = [
|
|
46432
46433
|
"messages",
|
|
@@ -46566,7 +46567,7 @@ var withoutUrls = /* @__PURE__ */ __name((text9) => text9.replace(/\S+/gu, (toke
|
|
|
46566
46567
|
var rankingWords = /* @__PURE__ */ __name((text9) => withoutUrls(text9).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
46567
46568
|
var rankingQuestion = /* @__PURE__ */ __name((text9) => withoutUrls(text9).includes("?"), "rankingQuestion");
|
|
46568
46569
|
|
|
46569
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
46570
46571
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
46571
46572
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
46572
46573
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -46788,7 +46789,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
46788
46789
|
};
|
|
46789
46790
|
}, "rankReplyGraph");
|
|
46790
46791
|
|
|
46791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46792
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
46792
46793
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
46793
46794
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
46794
46795
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -46962,7 +46963,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
46962
46963
|
return { items, evidence, summary, graph: graph.quality };
|
|
46963
46964
|
}, "calculateAdminStatistics");
|
|
46964
46965
|
|
|
46965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46966
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
46966
46967
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
46967
46968
|
const dates = [];
|
|
46968
46969
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -46984,7 +46985,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
46984
46985
|
return dates[0].node.resolution.date;
|
|
46985
46986
|
}, "rankingContextRange");
|
|
46986
46987
|
|
|
46987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46988
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
46988
46989
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
46989
46990
|
let counts;
|
|
46990
46991
|
try {
|
|
@@ -47279,7 +47280,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
47279
47280
|
});
|
|
47280
47281
|
}, "rankQuery");
|
|
47281
47282
|
|
|
47282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
47283
47284
|
function fail2(message3, reason = "query.too-large") {
|
|
47284
47285
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
47285
47286
|
}
|
|
@@ -47456,7 +47457,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
47456
47457
|
return result;
|
|
47457
47458
|
}), "adminStatisticsQuery");
|
|
47458
47459
|
|
|
47459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
47460
47461
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
47461
47462
|
if (!execution.accounts.length)
|
|
47462
47463
|
return { conversations: [], chats: [] };
|
|
@@ -47474,7 +47475,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
47474
47475
|
return { conversations: conversations2, chats: chats2 };
|
|
47475
47476
|
}, "conversationEligibility");
|
|
47476
47477
|
|
|
47477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
47478
47479
|
import { createHash as createHash10 } from "node:crypto";
|
|
47479
47480
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
47480
47481
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -47624,7 +47625,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
47624
47625
|
return result;
|
|
47625
47626
|
}, "rankingEvidence");
|
|
47626
47627
|
|
|
47627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47628
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
47628
47629
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
47629
47630
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
47630
47631
|
if (execution.corpus === "mail")
|
|
@@ -47645,7 +47646,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
47645
47646
|
};
|
|
47646
47647
|
}, "queriesStoreOver");
|
|
47647
47648
|
|
|
47648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
47649
47650
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
47650
47651
|
const { database, now: now2 } = context;
|
|
47651
47652
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -47684,10 +47685,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
47684
47685
|
}));
|
|
47685
47686
|
}, "chatEventsOf");
|
|
47686
47687
|
|
|
47687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47688
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
47688
47689
|
import { createHash as createHash11 } from "node:crypto";
|
|
47689
47690
|
|
|
47690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47691
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
47691
47692
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
47692
47693
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
47693
47694
|
timeZone: zone,
|
|
@@ -47707,7 +47708,7 @@ var weekKey = /* @__PURE__ */ __name((day3) => {
|
|
|
47707
47708
|
return date3.toISOString().slice(0, 10);
|
|
47708
47709
|
}, "weekKey");
|
|
47709
47710
|
|
|
47710
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47711
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
47711
47712
|
var RETENTION_TOLERANCE = 864e5;
|
|
47712
47713
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
47713
47714
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -47761,7 +47762,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
47761
47762
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
47762
47763
|
}, "retentionCohorts");
|
|
47763
47764
|
|
|
47764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
47765
47766
|
var iso11 = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString(), "iso");
|
|
47766
47767
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
47767
47768
|
validateRetentionOptions(options);
|
|
@@ -47892,7 +47893,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
47892
47893
|
};
|
|
47893
47894
|
}, "retentionQuery");
|
|
47894
47895
|
|
|
47895
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47896
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
47896
47897
|
var iso12 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
47897
47898
|
var marksOf = /* @__PURE__ */ __name(({ isBot: isBot2, flagged, deleted, hasPhoto }) => ({
|
|
47898
47899
|
...isBot2 === void 0 ? {} : { bot: isBot2 },
|
|
@@ -48021,7 +48022,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
48021
48022
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
48022
48023
|
})), "trackedChats");
|
|
48023
48024
|
|
|
48024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48025
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
48025
48026
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
48026
48027
|
const { database } = context;
|
|
48027
48028
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -48077,7 +48078,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48077
48078
|
};
|
|
48078
48079
|
}, "rosterStoreOver");
|
|
48079
48080
|
|
|
48080
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48081
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
48081
48082
|
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");
|
|
48082
48083
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
48083
48084
|
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 ?`);
|
|
@@ -48101,7 +48102,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
48101
48102
|
}
|
|
48102
48103
|
}, "backfillNormalized");
|
|
48103
48104
|
|
|
48104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
48105
48106
|
var INDEX2 = "message_words";
|
|
48106
48107
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
48107
48108
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -48228,7 +48229,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
48228
48229
|
});
|
|
48229
48230
|
}, "resetSearchIndex");
|
|
48230
48231
|
|
|
48231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
48232
48233
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
48233
48234
|
const filled = { stemmed: 0, drained: 0 };
|
|
48234
48235
|
const before2 = stemsState(database);
|
|
@@ -48323,7 +48324,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
48323
48324
|
return resetStems(database, { now: now2 });
|
|
48324
48325
|
}, "followDefaultStemmers");
|
|
48325
48326
|
|
|
48326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
48327
48328
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
48328
48329
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms) => {
|
|
48329
48330
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -48345,7 +48346,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
48345
48346
|
});
|
|
48346
48347
|
}, "termCandidates");
|
|
48347
48348
|
|
|
48348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48349
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
48349
48350
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
48350
48351
|
const { database } = context;
|
|
48351
48352
|
const stemmerFor2 = stemmerCache();
|
|
@@ -48370,7 +48371,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48370
48371
|
};
|
|
48371
48372
|
}, "searchIndexStoreOver");
|
|
48372
48373
|
|
|
48373
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
48374
48375
|
var HISTORY_KEPT = 1e3;
|
|
48375
48376
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
48376
48377
|
var COLUMNS6 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -48440,7 +48441,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
48440
48441
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
48441
48442
|
}, "clearHistory");
|
|
48442
48443
|
|
|
48443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
48444
48445
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
48445
48446
|
const { database } = context;
|
|
48446
48447
|
return {
|
|
@@ -48464,7 +48465,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48464
48465
|
};
|
|
48465
48466
|
}, "searchesStoreOver");
|
|
48466
48467
|
|
|
48467
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48468
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
48468
48469
|
import { createHash as createHash12 } from "node:crypto";
|
|
48469
48470
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
48470
48471
|
var TEXT_COLUMNS = "kind = ?, title = ?, file_name = ?, extension = ?, url = ?, mime = ?, size = ?, content_hash = ?, body = ?, extraction = ?, metadata = ?, language = ?";
|
|
@@ -48706,7 +48707,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
48706
48707
|
};
|
|
48707
48708
|
}, "addedSourcesOver");
|
|
48708
48709
|
|
|
48709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48710
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
48710
48711
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
48711
48712
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
48712
48713
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -48754,7 +48755,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
48754
48755
|
};
|
|
48755
48756
|
}, "agentActionsStoreOver");
|
|
48756
48757
|
|
|
48757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48758
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/base-suggest.js
|
|
48758
48759
|
var baseSettingKey = /* @__PURE__ */ __name((kind3) => `stages.base.${kind3}`, "baseSettingKey");
|
|
48759
48760
|
var storedPipeline = /* @__PURE__ */ __name((value) => {
|
|
48760
48761
|
if (typeof value !== "string")
|
|
@@ -48800,7 +48801,7 @@ var suggestBaseStages = /* @__PURE__ */ __name((database, kind3, pipelines2, { o
|
|
|
48800
48801
|
}
|
|
48801
48802
|
}, "suggestBaseStages");
|
|
48802
48803
|
|
|
48803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/search/respell.js
|
|
48804
48805
|
var LATIN2 = {
|
|
48805
48806
|
\u0430: "a",
|
|
48806
48807
|
\u0431: "b",
|
|
@@ -48840,22 +48841,80 @@ var latinSpellings = /* @__PURE__ */ __name((word2) => {
|
|
|
48840
48841
|
const plain2 = [...normalize(word2)].map((letter) => LATIN2[letter] ?? letter).join("");
|
|
48841
48842
|
return [.../* @__PURE__ */ new Set([plain2, plain2.replaceAll("ks", "x")])];
|
|
48842
48843
|
}, "latinSpellings");
|
|
48844
|
+
var CYRILLIC3 = Object.entries({
|
|
48845
|
+
shch: "\u0449",
|
|
48846
|
+
sch: "\u0449",
|
|
48847
|
+
zh: "\u0436",
|
|
48848
|
+
kh: "\u0445",
|
|
48849
|
+
ts: "\u0446",
|
|
48850
|
+
ch: "\u0447",
|
|
48851
|
+
sh: "\u0448",
|
|
48852
|
+
yu: "\u044E",
|
|
48853
|
+
ya: "\u044F",
|
|
48854
|
+
yo: "\u0435",
|
|
48855
|
+
y: "\u044B",
|
|
48856
|
+
a: "\u0430",
|
|
48857
|
+
b: "\u0431",
|
|
48858
|
+
c: "\u043A",
|
|
48859
|
+
d: "\u0434",
|
|
48860
|
+
e: "\u0435",
|
|
48861
|
+
f: "\u0444",
|
|
48862
|
+
g: "\u0433",
|
|
48863
|
+
h: "\u0445",
|
|
48864
|
+
i: "\u0438",
|
|
48865
|
+
j: "\u0434\u0436",
|
|
48866
|
+
k: "\u043A",
|
|
48867
|
+
l: "\u043B",
|
|
48868
|
+
m: "\u043C",
|
|
48869
|
+
n: "\u043D",
|
|
48870
|
+
o: "\u043E",
|
|
48871
|
+
p: "\u043F",
|
|
48872
|
+
q: "\u043A",
|
|
48873
|
+
r: "\u0440",
|
|
48874
|
+
s: "\u0441",
|
|
48875
|
+
t: "\u0442",
|
|
48876
|
+
u: "\u0443",
|
|
48877
|
+
v: "\u0432",
|
|
48878
|
+
w: "\u0432",
|
|
48879
|
+
x: "\u043A\u0441",
|
|
48880
|
+
z: "\u0437"
|
|
48881
|
+
});
|
|
48882
|
+
var cyrillicSpellings = /* @__PURE__ */ __name((word2) => {
|
|
48883
|
+
const latin = normalize(word2);
|
|
48884
|
+
if (!/^[a-z]+$/.test(latin) || latin.split("y").length > 4)
|
|
48885
|
+
return [];
|
|
48886
|
+
let spellings2 = [""];
|
|
48887
|
+
for (let at2 = 0; at2 < latin.length; ) {
|
|
48888
|
+
const [from2, to] = CYRILLIC3.find(([one2]) => latin.startsWith(one2, at2)) ?? [latin[at2], latin[at2]];
|
|
48889
|
+
const letters = from2 === "y" ? ["\u0438", "\u0439", "\u044B"] : [to];
|
|
48890
|
+
spellings2 = spellings2.flatMap((start) => letters.map((letter) => start + letter));
|
|
48891
|
+
at2 += from2.length;
|
|
48892
|
+
}
|
|
48893
|
+
return spellings2;
|
|
48894
|
+
}, "cyrillicSpellings");
|
|
48843
48895
|
var respelled = /* @__PURE__ */ __name(async (vocabulary, words4) => {
|
|
48844
48896
|
const known2 = await vocabulary.knownTerms(words4);
|
|
48845
48897
|
const found2 = /* @__PURE__ */ new Map();
|
|
48846
48898
|
for (const word2 of words4.filter((one2) => !known2.has(one2))) {
|
|
48847
48899
|
const latin = latinSpellings(word2);
|
|
48848
|
-
|
|
48849
|
-
|
|
48850
|
-
|
|
48851
|
-
|
|
48900
|
+
if (latin.length) {
|
|
48901
|
+
const held3 = await vocabulary.knownTerms(latin);
|
|
48902
|
+
const nearLatin = await correctWords(vocabulary, latin.filter((one2) => !held3.has(one2)));
|
|
48903
|
+
const asLatin = [.../* @__PURE__ */ new Set([...held3, ...[...nearLatin.values()].flat()])];
|
|
48904
|
+
const forms3 = asLatin.length ? asLatin : (await correctWords(vocabulary, [word2])).get(normalize(word2)) ?? [];
|
|
48905
|
+
if (forms3.length)
|
|
48906
|
+
found2.set(word2, forms3);
|
|
48907
|
+
continue;
|
|
48908
|
+
}
|
|
48909
|
+
const held2 = [...await vocabulary.knownTerms(cyrillicSpellings(word2))];
|
|
48910
|
+
const forms2 = held2.length ? held2 : (await correctWords(vocabulary, [word2])).get(normalize(word2)) ?? [];
|
|
48852
48911
|
if (forms2.length)
|
|
48853
48912
|
found2.set(word2, forms2);
|
|
48854
48913
|
}
|
|
48855
48914
|
return found2;
|
|
48856
48915
|
}, "respelled");
|
|
48857
48916
|
|
|
48858
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/search/word-match.js
|
|
48859
48918
|
var TOKEN2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
48860
48919
|
var stemmer = createStemmer(DEFAULT_STEMMERS, { cacheLimit: 2e4 });
|
|
48861
48920
|
var stemsOf2 = /* @__PURE__ */ __name((token) => stemmer.stemSequences(token).flat(), "stemsOf");
|
|
@@ -48875,11 +48934,11 @@ var clauseIn = /* @__PURE__ */ __name((clause, words4, exact) => words4.some((_,
|
|
|
48875
48934
|
return word2 !== void 0 && alternatives.some((probe) => wordMatches(probe, word2, exact));
|
|
48876
48935
|
})), "clauseIn");
|
|
48877
48936
|
|
|
48878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48937
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/copy-viewer.js
|
|
48879
48938
|
var viewerSql = /* @__PURE__ */ __name((alias2, viewer) => viewer === void 0 ? { sql: "1", params: [] } : viewer.assignee === null ? { sql: "0", params: [] } : { sql: `json_extract(${alias2}.metadata, '$.assignee') = ?`, params: [viewer.assignee] }, "viewerSql");
|
|
48880
48939
|
var seenBy = /* @__PURE__ */ __name((viewer, row2) => viewer === void 0 || row2.provider !== viewer.account.provider || row2.account !== viewer.account.account || viewer.assignee !== null && row2.assignee === viewer.assignee, "seenBy");
|
|
48881
48940
|
|
|
48882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48941
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
48883
48942
|
import { createHash as createHash13 } from "node:crypto";
|
|
48884
48943
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
48885
48944
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -49020,7 +49079,7 @@ var fieldReferences = /* @__PURE__ */ __name((record3, options = {}) => {
|
|
|
49020
49079
|
return found2;
|
|
49021
49080
|
}, "fieldReferences");
|
|
49022
49081
|
|
|
49023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49082
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
49024
49083
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
49025
49084
|
var MONEY_REFUSALS = ["money.currency", "money.amount"];
|
|
49026
49085
|
var amountFault = /* @__PURE__ */ __name((item, code) => {
|
|
@@ -49207,7 +49266,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
49207
49266
|
return { savePipeline, saveItemRow };
|
|
49208
49267
|
}, "crmRowsOver");
|
|
49209
49268
|
|
|
49210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activity-chunks.js
|
|
49211
49270
|
var ACTIVITY_RECORD = "crm.activity";
|
|
49212
49271
|
var CRM_ACTIVITY_CHUNK = "crm_activity";
|
|
49213
49272
|
var SHORTEST_EMBEDDED_ACTIVITY = 16;
|
|
@@ -49427,7 +49486,7 @@ var crmActivityChunksOver = /* @__PURE__ */ __name((context) => {
|
|
|
49427
49486
|
};
|
|
49428
49487
|
}, "crmActivityChunksOver");
|
|
49429
49488
|
|
|
49430
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activities.js
|
|
49431
49490
|
var forgetActivitiesOn = /* @__PURE__ */ __name((database, accountId, kind3, externalIds, at2) => {
|
|
49432
49491
|
const removed = "rr.target_type = ? AND rr.target_external_id IN (SELECT value FROM json_each(?))";
|
|
49433
49492
|
const ids3 = JSON.stringify(externalIds);
|
|
@@ -49514,6 +49573,18 @@ var crmActivitiesOver = /* @__PURE__ */ __name((context) => {
|
|
|
49514
49573
|
}
|
|
49515
49574
|
return { saved, outOfScope };
|
|
49516
49575
|
}), "save");
|
|
49576
|
+
const remove = /* @__PURE__ */ __name((key2, externalIds) => write(database, () => {
|
|
49577
|
+
const forgotten = database.prepare("UPDATE records SET deleted_at = ? WHERE account_id = ? AND type = ? AND deleted_at IS NULL AND external_id IN (SELECT value FROM json_each(?)) RETURNING id").all(now2(), accountPk(context, key2), ACTIVITY_RECORD, JSON.stringify(externalIds)).map(({ id: id2 }) => Number(id2));
|
|
49578
|
+
dropCrmActivityChunks(database, forgotten);
|
|
49579
|
+
return forgotten.length;
|
|
49580
|
+
}), "remove");
|
|
49581
|
+
const removeUnlisted = /* @__PURE__ */ __name((key2, seen, { dryRun = false } = {}) => {
|
|
49582
|
+
const accountId = accountPk(context, key2);
|
|
49583
|
+
const live2 = "account_id = ? AND type = ? AND deleted_at IS NULL";
|
|
49584
|
+
const stored4 = Number(database.prepare(`SELECT count(*) AS n FROM records WHERE ${live2}`).get(accountId, ACTIVITY_RECORD)?.n ?? 0);
|
|
49585
|
+
const ids3 = database.prepare(`SELECT external_id FROM records WHERE ${live2} AND external_id NOT IN (SELECT value FROM json_each(?))`).all(accountId, ACTIVITY_RECORD, JSON.stringify(seen)).map(({ external_id }) => String(external_id));
|
|
49586
|
+
return { stored: stored4, unlisted: dryRun || ids3.length === 0 ? ids3.length : remove(key2, ids3) };
|
|
49587
|
+
}, "removeUnlisted");
|
|
49517
49588
|
const of = /* @__PURE__ */ __name((key2, kind3, externalId, limit) => {
|
|
49518
49589
|
const accountId = findAccountPk(context, key2);
|
|
49519
49590
|
if (accountId === void 0)
|
|
@@ -49607,7 +49678,12 @@ var crmActivitiesOver = /* @__PURE__ */ __name((context) => {
|
|
|
49607
49678
|
const where = whereOf(key2, accountId, filter);
|
|
49608
49679
|
return Number(database.prepare("SELECT count(*) AS n FROM records r WHERE r.account_id = ? AND r.type = ? AND r.deleted_at IS NULL " + where.map(({ sql: sql2 }) => `AND ${sql2}`).join(" ")).get(accountId, ACTIVITY_RECORD, ...where.flatMap(({ params }) => params))?.n ?? 0);
|
|
49609
49680
|
}, "count");
|
|
49610
|
-
|
|
49681
|
+
const writes = {
|
|
49682
|
+
saveActivities: /* @__PURE__ */ __name(async (key2, activities) => save2(key2, activities), "saveActivities"),
|
|
49683
|
+
removeActivities: /* @__PURE__ */ __name(async (key2, externalIds) => remove(key2, externalIds), "removeActivities"),
|
|
49684
|
+
removeUnlistedActivities: /* @__PURE__ */ __name(async (key2, seen, options) => removeUnlisted(key2, seen, options), "removeUnlistedActivities")
|
|
49685
|
+
};
|
|
49686
|
+
return { save: save2, writes, of, list: list2, count: count3 };
|
|
49611
49687
|
}, "crmActivitiesOver");
|
|
49612
49688
|
var seenSql = /* @__PURE__ */ __name((viewer) => {
|
|
49613
49689
|
if (viewer.assignee === null)
|
|
@@ -49619,7 +49695,7 @@ var seenSql = /* @__PURE__ */ __name((viewer) => {
|
|
|
49619
49695
|
};
|
|
49620
49696
|
}, "seenSql");
|
|
49621
49697
|
|
|
49622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-stage-entries.js
|
|
49623
49699
|
var STAGE_ENTRY_RECORD = "crm.stage-entry";
|
|
49624
49700
|
var STAGE_ENTRY_DAYS = 90;
|
|
49625
49701
|
var STAGE_TASK_DAYS = 7;
|
|
@@ -49689,7 +49765,7 @@ var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
49689
49765
|
return { save: save2, pending, handled, expire };
|
|
49690
49766
|
}, "crmStageEntriesOver");
|
|
49691
49767
|
|
|
49692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49768
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
49693
49769
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
49694
49770
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, { since, until }, viewer) => {
|
|
49695
49771
|
const seen = viewerSql("d", viewer);
|
|
@@ -49707,7 +49783,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, { si
|
|
|
49707
49783
|
});
|
|
49708
49784
|
}, "stageAmountsOf");
|
|
49709
49785
|
|
|
49710
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/pipeline-period.js
|
|
49711
49787
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
49712
49788
|
var DAY7 = 864e5;
|
|
49713
49789
|
var LOST_REASONS = 10;
|
|
@@ -49864,7 +49940,7 @@ var pipelinePeriod = /* @__PURE__ */ __name((context, pipeline, window, zone, vi
|
|
|
49864
49940
|
};
|
|
49865
49941
|
}, "pipelinePeriod");
|
|
49866
49942
|
|
|
49867
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
49868
49944
|
var TABLES5 = { deal: "deals", lead: "leads" };
|
|
49869
49945
|
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 ${TABLES5[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");
|
|
49870
49946
|
var MAX_STAGES = 30;
|
|
@@ -50347,7 +50423,7 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50347
50423
|
};
|
|
50348
50424
|
}, "dealsStoreOver");
|
|
50349
50425
|
|
|
50350
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50426
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
50351
50427
|
var KEY2 = "ownerLanguages";
|
|
50352
50428
|
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(" "));
|
|
50353
50429
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -50377,7 +50453,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
50377
50453
|
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);
|
|
50378
50454
|
}, "saveOwnerLanguages");
|
|
50379
50455
|
|
|
50380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50456
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/base-stages.js
|
|
50381
50457
|
var OUTCOMES = {
|
|
50382
50458
|
lead: ["open", "open", "open", "won", "lost"],
|
|
50383
50459
|
deal: ["open", "open", "open", "open", "won", "lost"]
|
|
@@ -50710,7 +50786,7 @@ var baseStagesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50710
50786
|
};
|
|
50711
50787
|
}, "baseStagesStoreOver");
|
|
50712
50788
|
|
|
50713
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50789
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
50714
50790
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
50715
50791
|
}) => {
|
|
50716
50792
|
const { database, now: now2 } = context;
|
|
@@ -50769,7 +50845,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
50769
50845
|
};
|
|
50770
50846
|
}, "botUpdateStoreOver");
|
|
50771
50847
|
|
|
50772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50848
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
50773
50849
|
var IMPORTER = { bot: "import" };
|
|
50774
50850
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
50775
50851
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -50814,7 +50890,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
50814
50890
|
};
|
|
50815
50891
|
}), "moneyLinesOf");
|
|
50816
50892
|
|
|
50817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/relation-role-labels.js
|
|
50818
50894
|
var label = /* @__PURE__ */ __name((en, ru, es) => ({ en, ru, es }), "label");
|
|
50819
50895
|
var ROLE_LABELS = {
|
|
50820
50896
|
organization: {
|
|
@@ -50855,7 +50931,7 @@ var ROLE_LABELS = {
|
|
|
50855
50931
|
}
|
|
50856
50932
|
};
|
|
50857
50933
|
|
|
50858
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50934
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
50859
50935
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
50860
50936
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
50861
50937
|
var listOf2 = /* @__PURE__ */ __name((list2) => {
|
|
@@ -50939,7 +51015,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
50939
51015
|
};
|
|
50940
51016
|
}, "relationRolesOver");
|
|
50941
51017
|
|
|
50942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
50943
51019
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
50944
51020
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
50945
51021
|
var CRM_SCOPES = ["mine", "all"];
|
|
@@ -51170,7 +51246,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
51170
51246
|
return [{ setting: String(row2.key), value: settingValue(database, parsed5.key, parsed5.name) }];
|
|
51171
51247
|
}), "crmSettingsOf");
|
|
51172
51248
|
|
|
51173
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
51174
51250
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
51175
51251
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
51176
51252
|
id: link3.id,
|
|
@@ -51530,7 +51606,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
51530
51606
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
51531
51607
|
}, "decidedOrigin");
|
|
51532
51608
|
|
|
51533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51609
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
51534
51610
|
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");
|
|
51535
51611
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
51536
51612
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" }, onOutcome } = {}) => {
|
|
@@ -51668,7 +51744,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
51668
51744
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
51669
51745
|
}), "relationsStoreOver");
|
|
51670
51746
|
|
|
51671
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51747
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relationships.js
|
|
51672
51748
|
var importSource = /* @__PURE__ */ __name((provider) => `import:${provider}`, "importSource");
|
|
51673
51749
|
var noRelationships = /* @__PURE__ */ __name(() => ({
|
|
51674
51750
|
added: 0,
|
|
@@ -51858,7 +51934,7 @@ var recordRelationshipsOver = /* @__PURE__ */ __name((context) => {
|
|
|
51858
51934
|
return { report, placeOf: placeOf2, withdrawFrom };
|
|
51859
51935
|
}, "recordRelationshipsOver");
|
|
51860
51936
|
|
|
51861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51937
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
51862
51938
|
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";
|
|
51863
51939
|
var DAY_MS2 = 864e5;
|
|
51864
51940
|
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");
|
|
@@ -52017,7 +52093,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52017
52093
|
};
|
|
52018
52094
|
}, "contractsStoreOver");
|
|
52019
52095
|
|
|
52020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52096
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
52021
52097
|
var BUSINESS_FIND_MAX = 2001;
|
|
52022
52098
|
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");
|
|
52023
52099
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
@@ -52122,7 +52198,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
52122
52198
|
};
|
|
52123
52199
|
}, "businessSearchOver");
|
|
52124
52200
|
|
|
52125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
52126
52202
|
var CATALOG_QUERY = defineQuery({
|
|
52127
52203
|
entity: "document",
|
|
52128
52204
|
backend: "sql",
|
|
@@ -52355,10 +52431,10 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
52355
52431
|
};
|
|
52356
52432
|
}, "catalogStoreOver");
|
|
52357
52433
|
|
|
52358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52434
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/content.js
|
|
52359
52435
|
import { createHash as createHash14 } from "node:crypto";
|
|
52360
52436
|
|
|
52361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52437
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-files.js
|
|
52362
52438
|
import { sep } from "node:path";
|
|
52363
52439
|
var MOST = 500;
|
|
52364
52440
|
var CURRENTLY = /* @__PURE__ */ __name((table) => `EXISTS (SELECT 1 FROM ${table} r WHERE r.account_id = f.account_id AND r.external_id = f.owner_id AND r.deleted_at IS NULL AND json_extract(r.metadata, '$.assignee') = ?)`, "CURRENTLY");
|
|
@@ -52483,7 +52559,7 @@ var crmFilesOver = /* @__PURE__ */ __name((context) => {
|
|
|
52483
52559
|
};
|
|
52484
52560
|
}, "crmFilesOver");
|
|
52485
52561
|
|
|
52486
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/content.js
|
|
52487
52563
|
var MOST2 = 500;
|
|
52488
52564
|
var TABLE = {
|
|
52489
52565
|
author: "content_authors",
|
|
@@ -52762,7 +52838,7 @@ var contentStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52762
52838
|
};
|
|
52763
52839
|
}, "contentStoreOver");
|
|
52764
52840
|
|
|
52765
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52841
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
52766
52842
|
var remote = /* @__PURE__ */ __name(() => `CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source') IN (${documentAccountProvidersSql()}) ELSE 0 END`, "remote");
|
|
52767
52843
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${remote()}) THEN
|
|
52768
52844
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -52775,7 +52851,7 @@ var contextDocumentTimeKind = /* @__PURE__ */ __name(() => `CASE WHEN (${remoteT
|
|
|
52775
52851
|
THEN 'source-modified' ELSE 'stored-update' END`, "contextDocumentTimeKind");
|
|
52776
52852
|
var contextDocumentUrl = /* @__PURE__ */ __name(() => `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`, "contextDocumentUrl");
|
|
52777
52853
|
|
|
52778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
52779
52855
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
52780
52856
|
const { source: source2, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
52781
52857
|
signal?.throwIfAborted();
|
|
@@ -52874,7 +52950,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
52874
52950
|
});
|
|
52875
52951
|
}, "readMeetingContextEvidence");
|
|
52876
52952
|
|
|
52877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52953
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
52878
52954
|
var corpora = {
|
|
52879
52955
|
message: {
|
|
52880
52956
|
table: "messages",
|
|
@@ -53119,7 +53195,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
53119
53195
|
}
|
|
53120
53196
|
}), "contextRecordsOver");
|
|
53121
53197
|
|
|
53122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-changes.js
|
|
53123
53199
|
var CRM_CHANGES = [
|
|
53124
53200
|
"created",
|
|
53125
53201
|
"moved",
|
|
@@ -53262,7 +53338,7 @@ var crmReadsOver = /* @__PURE__ */ __name((context) => {
|
|
|
53262
53338
|
};
|
|
53263
53339
|
}, "crmReadsOver");
|
|
53264
53340
|
|
|
53265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53341
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-contacts.js
|
|
53266
53342
|
var PLACEHOLDER = /(?:^|\s)null(?:\s+#\d+)?(?=\s|$)/gi;
|
|
53267
53343
|
var withoutPlaceholder = /* @__PURE__ */ __name((name) => name.replace(PLACEHOLDER, " ").replace(/\s+/g, " ").trim() || null, "withoutPlaceholder");
|
|
53268
53344
|
var DryRun = class extends Error {
|
|
@@ -53341,7 +53417,7 @@ var removeCrmContacts = /* @__PURE__ */ __name((context, key2, { users, before:
|
|
|
53341
53417
|
}
|
|
53342
53418
|
}, "removeCrmContacts");
|
|
53343
53419
|
|
|
53344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
53345
53421
|
var PENDING = "crm:pending-relations";
|
|
53346
53422
|
var PENDING_DAYS = 30;
|
|
53347
53423
|
var PENDING_MOST = 5e3;
|
|
@@ -53871,7 +53947,7 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
53871
53947
|
handleStageEntries: /* @__PURE__ */ __name(async (ids3) => stageEntryStore.handled(ids3), "handleStageEntries"),
|
|
53872
53948
|
expireStageEntries: /* @__PURE__ */ __name(async (key2) => stageEntryStore.expire(key2), "expireStageEntries"),
|
|
53873
53949
|
activitiesOn: /* @__PURE__ */ __name(async (key2) => crmActivitiesOn(database, key2), "activitiesOn"),
|
|
53874
|
-
|
|
53950
|
+
...activityStore.writes,
|
|
53875
53951
|
activitiesOf: /* @__PURE__ */ __name(async (key2, kind3, externalId, limit) => activityStore.of(key2, kind3, externalId, limit), "activitiesOf"),
|
|
53876
53952
|
activityChunks: crmActivityChunksOver(context),
|
|
53877
53953
|
...crmReadsOver(context),
|
|
@@ -53894,10 +53970,10 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
53894
53970
|
};
|
|
53895
53971
|
}, "crmCopiesOver");
|
|
53896
53972
|
|
|
53897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53973
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
53898
53974
|
import { createHash as createHash15, randomBytes as randomBytes2 } from "node:crypto";
|
|
53899
53975
|
|
|
53900
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
53901
53977
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
53902
53978
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
53903
53979
|
var CALLBACK_PREFIX = "wcr1:";
|
|
@@ -53911,7 +53987,7 @@ var callbackDataOf = /* @__PURE__ */ __name((token) => {
|
|
|
53911
53987
|
}, "callbackDataOf");
|
|
53912
53988
|
var parseCallbackData = /* @__PURE__ */ __name((data) => typeof data === "string" ? CALLBACK.exec(data)?.[1] : void 0, "parseCallbackData");
|
|
53913
53989
|
|
|
53914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
53915
53991
|
var digestOf = /* @__PURE__ */ __name((token) => createHash15("sha256").update(token).digest("hex"), "digestOf");
|
|
53916
53992
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
53917
53993
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -54010,7 +54086,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
54010
54086
|
};
|
|
54011
54087
|
}, "decisionRequestStoreOver");
|
|
54012
54088
|
|
|
54013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-listing.js
|
|
54014
54090
|
var MEETING_ROW_KINDS = ["meeting", "call", "event"];
|
|
54015
54091
|
var DAY9 = 864e5;
|
|
54016
54092
|
var JOINED = `(SELECT ce.event_id FROM calendar_entries ce JOIN events je ON je.id = ce.event_id
|
|
@@ -54397,7 +54473,7 @@ var meetingListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
54397
54473
|
};
|
|
54398
54474
|
}, "meetingListingOver");
|
|
54399
54475
|
|
|
54400
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54476
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/document-listing.js
|
|
54401
54477
|
var DOCUMENT_KINDS = [
|
|
54402
54478
|
"transcript",
|
|
54403
54479
|
"doc",
|
|
@@ -54634,7 +54710,7 @@ var documentListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
54634
54710
|
};
|
|
54635
54711
|
}, "documentListingOver");
|
|
54636
54712
|
|
|
54637
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
54638
54714
|
var NOTE_FIELDS = [
|
|
54639
54715
|
"text",
|
|
54640
54716
|
"exact",
|
|
@@ -55131,7 +55207,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
55131
55207
|
};
|
|
55132
55208
|
}, "noteSearchOver");
|
|
55133
55209
|
|
|
55134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
55135
55211
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
55136
55212
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
55137
55213
|
var EVENT_CORPUS = {
|
|
@@ -55271,7 +55347,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
55271
55347
|
};
|
|
55272
55348
|
}, "eventSearchOver");
|
|
55273
55349
|
|
|
55274
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
55275
55351
|
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";
|
|
55276
55352
|
var iso14 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
55277
55353
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -55534,7 +55610,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55534
55610
|
};
|
|
55535
55611
|
}, "factsStoreOver");
|
|
55536
55612
|
|
|
55537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55613
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
55538
55614
|
var invalid5 = /* @__PURE__ */ __name((message3) => {
|
|
55539
55615
|
throw new CliError("validation_error", message3);
|
|
55540
55616
|
}, "invalid");
|
|
@@ -55702,7 +55778,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
55702
55778
|
return { snapshot: snapshot2, snapshotParts, previous, settle, keepWaiting, named: named2, sameDecision, create };
|
|
55703
55779
|
}, "findingsCoreOver");
|
|
55704
55780
|
|
|
55705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
55706
55782
|
var stale = /* @__PURE__ */ __name(() => {
|
|
55707
55783
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
55708
55784
|
reason: "evidence-findings.stale"
|
|
@@ -55966,7 +56042,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55966
56042
|
};
|
|
55967
56043
|
}, "evidenceFindingsStoreOver");
|
|
55968
56044
|
|
|
55969
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
55970
56046
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
55971
56047
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
55972
56048
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -56020,7 +56096,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
56020
56096
|
}, "forPerson")
|
|
56021
56097
|
}), "involvementStoreOver");
|
|
56022
56098
|
|
|
56023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
56024
56100
|
var LABELLED = {
|
|
56025
56101
|
note: "note",
|
|
56026
56102
|
document: "document",
|
|
@@ -56033,7 +56109,7 @@ var LABELLED = {
|
|
|
56033
56109
|
};
|
|
56034
56110
|
var accountMeetingTagging = /* @__PURE__ */ __name((alias2) => `(${alias2}.taggable_type <> 'meeting' OR EXISTS (SELECT 1 FROM meetings mt WHERE mt.id = ${alias2}.taggable_id AND mt.deleted_at IS NULL AND (? IS NULL OR mt.account_id = ?)))`, "accountMeetingTagging");
|
|
56035
56111
|
|
|
56036
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
56037
56113
|
import { createHash as createHash16 } from "node:crypto";
|
|
56038
56114
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
56039
56115
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -56119,7 +56195,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
56119
56195
|
};
|
|
56120
56196
|
}, "meetingProjectsStoreOver");
|
|
56121
56197
|
|
|
56122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
56123
56199
|
var ORGANIZATIONS_QUERY = {
|
|
56124
56200
|
entity: "organization",
|
|
56125
56201
|
backend: "sql",
|
|
@@ -56160,7 +56236,7 @@ var REMINDERS_QUERY = {
|
|
|
56160
56236
|
})
|
|
56161
56237
|
};
|
|
56162
56238
|
|
|
56163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-categories.js
|
|
56164
56240
|
var OWN2 = "(SELECT id FROM organizations WHERE deleted_at IS NULL AND json_extract(metadata, '$.own') = 1)";
|
|
56165
56241
|
var EMPLOYED = "('employee', 'contractor', 'founder')";
|
|
56166
56242
|
var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now2) => {
|
|
@@ -56181,7 +56257,7 @@ var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now
|
|
|
56181
56257
|
return { sql: `EXISTS (SELECT 1 FROM links l WHERE ${where} AND ${usable})`, params: keys };
|
|
56182
56258
|
}, "categorySql");
|
|
56183
56259
|
|
|
56184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56260
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
56185
56261
|
var organizationOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
56186
56262
|
id: String(row2.id),
|
|
56187
56263
|
ref: `organization:${row2.id}`,
|
|
@@ -56230,7 +56306,7 @@ var organizationsReadsOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
56230
56306
|
}), "setOwnOrganization")
|
|
56231
56307
|
}), "organizationsReadsOver");
|
|
56232
56308
|
|
|
56233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
56234
56310
|
var KINDS = RELATION_KINDS.map(linkKind).join(", ");
|
|
56235
56311
|
var ACCOUNT_ENDS = [
|
|
56236
56312
|
["deal", "deals"],
|
|
@@ -56393,13 +56469,13 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
56393
56469
|
__name(proposalItem, "proposalItem");
|
|
56394
56470
|
}, "relationListOver");
|
|
56395
56471
|
|
|
56396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
56397
56473
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
56398
56474
|
...relationListOver(context),
|
|
56399
56475
|
...relationRolesOver(context)
|
|
56400
56476
|
}), "relationReadsOver");
|
|
56401
56477
|
|
|
56402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
56403
56479
|
var TABLES6 = { memory: "memories", fact: "facts" };
|
|
56404
56480
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
56405
56481
|
var DEFAULT_LIMIT = 500;
|
|
@@ -56642,16 +56718,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56642
56718
|
};
|
|
56643
56719
|
}, "sourceReviewStoreOver");
|
|
56644
56720
|
|
|
56645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56721
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
56646
56722
|
import { createHash as createHash19 } from "node:crypto";
|
|
56647
56723
|
|
|
56648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56724
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
56649
56725
|
import { createHash as createHash18 } from "node:crypto";
|
|
56650
56726
|
|
|
56651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
56652
56728
|
import { createHash as createHash17 } from "node:crypto";
|
|
56653
56729
|
|
|
56654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
56655
56731
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
56656
56732
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
56657
56733
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -56702,7 +56778,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
56702
56778
|
return input;
|
|
56703
56779
|
}, "consolidationApplyInput");
|
|
56704
56780
|
|
|
56705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
56706
56782
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
56707
56783
|
id: String(row2.id),
|
|
56708
56784
|
sourceId: String(row2.source_id),
|
|
@@ -56777,7 +56853,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
56777
56853
|
}, { beforeCommit: check3 });
|
|
56778
56854
|
}, "applyTagConsolidation");
|
|
56779
56855
|
|
|
56780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
56781
56857
|
var selections = [
|
|
56782
56858
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
56783
56859
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -56921,7 +56997,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
56921
56997
|
};
|
|
56922
56998
|
}, "previewRows");
|
|
56923
56999
|
|
|
56924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
56925
57001
|
var kinds = ["project", "tag", "topic"];
|
|
56926
57002
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
56927
57003
|
if (signal?.aborted)
|
|
@@ -57185,7 +57261,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57185
57261
|
};
|
|
57186
57262
|
}, "vocabularyStoreOver");
|
|
57187
57263
|
|
|
57188
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57264
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
57189
57265
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
57190
57266
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
57191
57267
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -57739,7 +57815,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
57739
57815
|
return key2.padEnd(3, "X");
|
|
57740
57816
|
}, "projectKey");
|
|
57741
57817
|
|
|
57742
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
57743
57819
|
var DAY10 = 864e5;
|
|
57744
57820
|
var SETTING5 = "logs_pruned_at";
|
|
57745
57821
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY10, botUpdatePayloadsMs: 30 * DAY10 };
|
|
@@ -57766,7 +57842,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
57766
57842
|
};
|
|
57767
57843
|
}, "logPruner");
|
|
57768
57844
|
|
|
57769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
57770
57846
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
57771
57847
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
57772
57848
|
var invalid7 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -58125,7 +58201,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
58125
58201
|
}, "checkMailFindings");
|
|
58126
58202
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
58127
58203
|
|
|
58128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
58129
58205
|
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";
|
|
58130
58206
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
58131
58207
|
const { database, now: now2 } = context;
|
|
@@ -58340,7 +58416,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
58340
58416
|
};
|
|
58341
58417
|
}, "ordersStoreOver");
|
|
58342
58418
|
|
|
58343
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
58344
58420
|
var MAIL_EDITS = {
|
|
58345
58421
|
task: ["title", "type", "reason", "commitment", "project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence"],
|
|
58346
58422
|
fact: ["statement", "type", "reason", "subject", "project"],
|
|
@@ -58829,7 +58905,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
58829
58905
|
};
|
|
58830
58906
|
}, "mailFindingsStoreOver");
|
|
58831
58907
|
|
|
58832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58908
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
58833
58909
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
58834
58910
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
58835
58911
|
reason: "meeting-findings.stale"
|
|
@@ -59042,7 +59118,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
59042
59118
|
};
|
|
59043
59119
|
}, "meetingFindingsStoreOver");
|
|
59044
59120
|
|
|
59045
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
59046
59122
|
var RANK_BATCH = 512;
|
|
59047
59123
|
var LIVE7 = "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";
|
|
59048
59124
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -59313,7 +59389,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
59313
59389
|
}
|
|
59314
59390
|
}), "meetingVectorsOver");
|
|
59315
59391
|
|
|
59316
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
59317
59393
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
59318
59394
|
var TEXTS = {
|
|
59319
59395
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -59414,7 +59490,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
59414
59490
|
};
|
|
59415
59491
|
}, "sourceMentionStoreOver");
|
|
59416
59492
|
|
|
59417
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
59418
59494
|
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";
|
|
59419
59495
|
var MAX_SPLITS = 100;
|
|
59420
59496
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -59648,11 +59724,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
59648
59724
|
};
|
|
59649
59725
|
}, "transactionsStoreOver");
|
|
59650
59726
|
|
|
59651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
59652
59728
|
import { accessSync, constants, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
59653
59729
|
import { dirname as dirname2 } from "node:path";
|
|
59654
59730
|
|
|
59655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59731
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
59656
59732
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
59657
59733
|
var CLIENTS_SETTING = "clients";
|
|
59658
59734
|
var coreVersion = (() => {
|
|
@@ -59713,7 +59789,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
59713
59789
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
59714
59790
|
}, "refusalAdvice");
|
|
59715
59791
|
|
|
59716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59792
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
59717
59793
|
var GENERATED = [
|
|
59718
59794
|
{
|
|
59719
59795
|
"name": "20261010184427_initial",
|
|
@@ -61173,7 +61249,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
61173
61249
|
}
|
|
61174
61250
|
];
|
|
61175
61251
|
|
|
61176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
61177
61253
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
61178
61254
|
import { basename, dirname, join as join3, parse } from "node:path";
|
|
61179
61255
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -61406,7 +61482,7 @@ var rollBack2 = /* @__PURE__ */ __name((database, path) => {
|
|
|
61406
61482
|
return { ...result, foreignKeyViolations };
|
|
61407
61483
|
}, "rollBack");
|
|
61408
61484
|
|
|
61409
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61485
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
61410
61486
|
var V31_TABLES = [
|
|
61411
61487
|
"accounts",
|
|
61412
61488
|
"account_identities",
|
|
@@ -61582,7 +61658,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
61582
61658
|
return migrations;
|
|
61583
61659
|
}, "generatedMigrations");
|
|
61584
61660
|
|
|
61585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
61586
61662
|
var MIGRATIONS = generatedMigrations();
|
|
61587
61663
|
var HISTORY2 = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
61588
61664
|
version INTEGER PRIMARY KEY,
|
|
@@ -61679,7 +61755,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
61679
61755
|
}
|
|
61680
61756
|
}, "migrate");
|
|
61681
61757
|
|
|
61682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61758
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
61683
61759
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
61684
61760
|
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 ?");
|
|
61685
61761
|
if (pending.get(0, 1) === void 0)
|
|
@@ -61701,7 +61777,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
61701
61777
|
}
|
|
61702
61778
|
}, "fillJoinKeys");
|
|
61703
61779
|
|
|
61704
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/slow-queries.js
|
|
61705
61781
|
var queryShape = /* @__PURE__ */ __name((sql2) => sql2.replace(/'(?:[^']|'')*'/g, "?").replace(/\b\d+(?:\.\d+)?\b/g, "?").replace(/\s+/g, " ").trim().slice(0, 400), "queryShape");
|
|
61706
61782
|
var rowsOf2 = /* @__PURE__ */ __name((result) => Array.isArray(result) ? result.length : result && typeof result === "object" && "changes" in result ? Number(result.changes) : result === void 0 || result === null ? 0 : 1, "rowsOf");
|
|
61707
61783
|
var timeQueries = /* @__PURE__ */ __name((client, methods) => {
|
|
@@ -61735,7 +61811,7 @@ var timeQueries = /* @__PURE__ */ __name((client, methods) => {
|
|
|
61735
61811
|
return client;
|
|
61736
61812
|
}, "timeQueries");
|
|
61737
61813
|
|
|
61738
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61814
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
61739
61815
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
61740
61816
|
refuseOwnerStoreInTests(path);
|
|
61741
61817
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -61749,8 +61825,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
61749
61825
|
}, "openSqlite");
|
|
61750
61826
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
61751
61827
|
quietSqliteWarning();
|
|
61752
|
-
const { drizzle } = await import("./node-
|
|
61753
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
61828
|
+
const { drizzle } = await import("./node-YNLEE4BB.js");
|
|
61829
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-24VK6J3W.js");
|
|
61754
61830
|
const client = await nodeClient(path, { readOnly });
|
|
61755
61831
|
try {
|
|
61756
61832
|
if (!readOnly)
|
|
@@ -61765,8 +61841,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
61765
61841
|
}
|
|
61766
61842
|
}, "openUnderNode");
|
|
61767
61843
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
61768
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
61769
|
-
const { drizzle } = await import("./bun-
|
|
61844
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-WWPYULNT.js");
|
|
61845
|
+
const { drizzle } = await import("./bun-3M7LDMJY.js");
|
|
61770
61846
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
61771
61847
|
try {
|
|
61772
61848
|
if (!readOnly)
|
|
@@ -61781,7 +61857,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
61781
61857
|
}
|
|
61782
61858
|
}, "openUnderBun");
|
|
61783
61859
|
|
|
61784
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
61785
61861
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
61786
61862
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
61787
61863
|
try {
|
|
@@ -61849,7 +61925,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
61849
61925
|
});
|
|
61850
61926
|
}, "movePaymentFacts");
|
|
61851
61927
|
|
|
61852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
61853
61929
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
61854
61930
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
61855
61931
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -61867,7 +61943,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
61867
61943
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
61868
61944
|
}, "assertReadCompatible");
|
|
61869
61945
|
|
|
61870
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
61871
61947
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
61872
61948
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
61873
61949
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -61913,7 +61989,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
61913
61989
|
});
|
|
61914
61990
|
}, "moveSuggestedLinks");
|
|
61915
61991
|
|
|
61916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
61917
61993
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
61918
61994
|
var TEST_PROVIDER = "chat";
|
|
61919
61995
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -61934,7 +62010,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
61934
62010
|
}
|
|
61935
62011
|
}, "purgeTestAccounts");
|
|
61936
62012
|
|
|
61937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62013
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
61938
62014
|
var BACKFILL_ON_OPEN = 5e3;
|
|
61939
62015
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
61940
62016
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -62046,7 +62122,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
62046
62122
|
}
|
|
62047
62123
|
}, "openStoreContext");
|
|
62048
62124
|
|
|
62049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62125
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
62050
62126
|
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";
|
|
62051
62127
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
62052
62128
|
const { database, now: now2 } = context;
|
|
@@ -62154,13 +62230,13 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62154
62230
|
};
|
|
62155
62231
|
}, "productsStoreOver");
|
|
62156
62232
|
|
|
62157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
62158
62234
|
import { createHash as createHash21 } from "node:crypto";
|
|
62159
62235
|
|
|
62160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
62161
62237
|
import { createHash as createHash20 } from "node:crypto";
|
|
62162
62238
|
|
|
62163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
62164
62240
|
var text7 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
62165
62241
|
var ref = text7(2048);
|
|
62166
62242
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -62230,7 +62306,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
62230
62306
|
}))
|
|
62231
62307
|
});
|
|
62232
62308
|
|
|
62233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
62234
62310
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
62235
62311
|
var invalid10 = /* @__PURE__ */ __name((field4) => {
|
|
62236
62312
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -62363,7 +62439,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json4) => {
|
|
|
62363
62439
|
return createHash20("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
62364
62440
|
}, "projectAnnotationsFingerprint");
|
|
62365
62441
|
|
|
62366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
62367
62443
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
62368
62444
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
62369
62445
|
var targetSchema = strictObject({
|
|
@@ -62470,7 +62546,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
62470
62546
|
}, "planBoundProjectAnnotations");
|
|
62471
62547
|
var planProjectAnnotations = /* @__PURE__ */ __name((json4, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json4), projectAnnotationsFingerprint(json4), target, bindings), "planProjectAnnotations");
|
|
62472
62548
|
|
|
62473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
62474
62550
|
import { createHash as createHash22 } from "node:crypto";
|
|
62475
62551
|
var text8 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
62476
62552
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -62564,7 +62640,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json4) => {
|
|
|
62564
62640
|
})).digest("hex");
|
|
62565
62641
|
}, "projectAnnotationSnapshotFingerprint");
|
|
62566
62642
|
|
|
62567
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
62568
62644
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
62569
62645
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
62570
62646
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -62581,7 +62657,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
62581
62657
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
62582
62658
|
}, "projectAnnotationRequest");
|
|
62583
62659
|
|
|
62584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62660
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
62585
62661
|
var SnapshotBudget = class {
|
|
62586
62662
|
static {
|
|
62587
62663
|
__name(this, "SnapshotBudget");
|
|
@@ -62607,13 +62683,13 @@ var SnapshotBudget = class {
|
|
|
62607
62683
|
}
|
|
62608
62684
|
};
|
|
62609
62685
|
|
|
62610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
62611
62687
|
import { createHash as createHash24 } from "node:crypto";
|
|
62612
62688
|
|
|
62613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
62614
62690
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json4, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json4), projectAnnotationSnapshotFingerprint(json4), target, bindings), "planProjectAnnotationSnapshot");
|
|
62615
62691
|
|
|
62616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
62617
62693
|
import { createHash as createHash23 } from "node:crypto";
|
|
62618
62694
|
var invalid12 = /* @__PURE__ */ __name(() => {
|
|
62619
62695
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -62756,7 +62832,7 @@ var ProjectSnapshotSources = class {
|
|
|
62756
62832
|
}
|
|
62757
62833
|
};
|
|
62758
62834
|
|
|
62759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
62760
62836
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
62761
62837
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
62762
62838
|
}, "unsupported");
|
|
@@ -62934,7 +63010,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
62934
63010
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
62935
63011
|
}), "projectAnnotationSnapshot");
|
|
62936
63012
|
|
|
62937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63013
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
62938
63014
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
62939
63015
|
const current2 = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
62940
63016
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -62996,7 +63072,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
62996
63072
|
};
|
|
62997
63073
|
}), "previewAnnotationSnapshot");
|
|
62998
63074
|
|
|
62999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
63000
63076
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
63001
63077
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
63002
63078
|
if (link3.kind === "evidence" && to)
|
|
@@ -63063,7 +63139,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
63063
63139
|
return mappings;
|
|
63064
63140
|
}, "restoreAnnotationRecords");
|
|
63065
63141
|
|
|
63066
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
63067
63143
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
63068
63144
|
async preview(request) {
|
|
63069
63145
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -63093,7 +63169,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
63093
63169
|
}
|
|
63094
63170
|
}), "projectAnnotationStoreOver");
|
|
63095
63171
|
|
|
63096
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
63097
63173
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
63098
63174
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
63099
63175
|
const sql2 = /* @__PURE__ */ __name((text9) => database.prepare(text9), "sql");
|
|
@@ -63164,7 +63240,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
63164
63240
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
63165
63241
|
}, "recordRelationsOver");
|
|
63166
63242
|
|
|
63167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
63168
63244
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
63169
63245
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
63170
63246
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -63218,7 +63294,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
63218
63294
|
return { pointedAt, remap };
|
|
63219
63295
|
}, "recordRemapOver");
|
|
63220
63296
|
|
|
63221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
63222
63298
|
var runs = 0;
|
|
63223
63299
|
var PAGE = 500;
|
|
63224
63300
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -63431,7 +63507,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
63431
63507
|
return pointerOf("records", index2, "fields", key2);
|
|
63432
63508
|
}, "waitingPointer");
|
|
63433
63509
|
|
|
63434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
63435
63511
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
63436
63512
|
var SCHEME = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
63437
63513
|
var ORG_EMAIL = "org-email";
|
|
@@ -63597,7 +63673,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
63597
63673
|
]);
|
|
63598
63674
|
}, "renameMade");
|
|
63599
63675
|
|
|
63600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63676
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
63601
63677
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
63602
63678
|
name: given2(fields4, "name"),
|
|
63603
63679
|
unit: given2(fields4, "unit"),
|
|
@@ -63720,7 +63796,7 @@ var DIRECT_PROJECTORS = {
|
|
|
63720
63796
|
lead: dealProjector("lead")
|
|
63721
63797
|
};
|
|
63722
63798
|
|
|
63723
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63799
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-document.js
|
|
63724
63800
|
var TEXT_ONLY = { storage: "text", localPath: null };
|
|
63725
63801
|
var textOf8 = /* @__PURE__ */ __name(({ fields: fields4, externalId }) => {
|
|
63726
63802
|
const text9 = String(fields4.text ?? "");
|
|
@@ -63789,7 +63865,7 @@ var DOCUMENT_PROJECTORS = {
|
|
|
63789
63865
|
}
|
|
63790
63866
|
};
|
|
63791
63867
|
|
|
63792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63868
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
63793
63869
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
63794
63870
|
const importer = authorActor(context, IMPORTER).actor;
|
|
63795
63871
|
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;
|
|
@@ -63999,7 +64075,7 @@ var MONEY_PROJECTORS = {
|
|
|
63999
64075
|
}
|
|
64000
64076
|
};
|
|
64001
64077
|
|
|
64002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
64003
64079
|
var CALLS_CALENDAR = "calls";
|
|
64004
64080
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
64005
64081
|
if (!isImportedProvider(source2.provider))
|
|
@@ -64174,7 +64250,7 @@ var PHONE_PROJECTORS = {
|
|
|
64174
64250
|
}
|
|
64175
64251
|
};
|
|
64176
64252
|
|
|
64177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
64178
64254
|
var RECORD_PROJECTORS = {
|
|
64179
64255
|
...MONEY_PROJECTORS,
|
|
64180
64256
|
...DIRECT_PROJECTORS,
|
|
@@ -64185,7 +64261,7 @@ var RECORD_PROJECTORS = {
|
|
|
64185
64261
|
project: null
|
|
64186
64262
|
};
|
|
64187
64263
|
|
|
64188
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64264
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
64189
64265
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
64190
64266
|
const sql2 = /* @__PURE__ */ __name((text9) => database.prepare(text9), "sql");
|
|
64191
64267
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -64247,7 +64323,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
64247
64323
|
return { settle, checkShares };
|
|
64248
64324
|
}, "recordSettlingOver");
|
|
64249
64325
|
|
|
64250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
64251
64327
|
import { createHash as createHash25 } from "node:crypto";
|
|
64252
64328
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
64253
64329
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -64263,7 +64339,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
64263
64339
|
return { stamp, untouched };
|
|
64264
64340
|
}, "importStampsOver");
|
|
64265
64341
|
|
|
64266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64342
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
64267
64343
|
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";
|
|
64268
64344
|
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";
|
|
64269
64345
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -64500,7 +64576,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
64500
64576
|
};
|
|
64501
64577
|
}, "subscriptionsStoreOver");
|
|
64502
64578
|
|
|
64503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
64504
64580
|
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";
|
|
64505
64581
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
64506
64582
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -64625,7 +64701,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
64625
64701
|
};
|
|
64626
64702
|
}, "walletsStoreOver");
|
|
64627
64703
|
|
|
64628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64704
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
64629
64705
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
64630
64706
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
64631
64707
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -64884,7 +64960,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
64884
64960
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
64885
64961
|
}, "recordWritesOver");
|
|
64886
64962
|
|
|
64887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
64888
64964
|
var LIMIT = 1e3;
|
|
64889
64965
|
var iso17 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
64890
64966
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -65108,7 +65184,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
65108
65184
|
};
|
|
65109
65185
|
}, "recordStoreOver");
|
|
65110
65186
|
|
|
65111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/templates.js
|
|
65112
65188
|
var templateOf = /* @__PURE__ */ __name((row2) => ({
|
|
65113
65189
|
key: row2.key,
|
|
65114
65190
|
channel: row2.channel,
|
|
@@ -65163,12 +65239,12 @@ var storedTemplateBodies = /* @__PURE__ */ __name((database, key2, language) =>
|
|
|
65163
65239
|
return Object.fromEntries(rows.map((row2) => [row2.channel, row2.body]));
|
|
65164
65240
|
}, "storedTemplateBodies");
|
|
65165
65241
|
|
|
65166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65167
|
-
var trackerTitleOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "issue" ? record3.title : kind3 === "comment" ? record3.body.split("\n")[0]?.slice(0, 120) || "(comment)" : record3.name, "trackerTitleOf");
|
|
65242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/domain/tracker.js
|
|
65243
|
+
var trackerTitleOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "issue" ? record3.title : kind3 === "comment" ? record3.body.split("\n")[0]?.slice(0, 120) || "(comment)" : kind3 === "sprint" && !record3.name ? `Sprint ${record3.number ?? ""}`.trim() : record3.name, "trackerTitleOf");
|
|
65168
65244
|
var trackerBodyOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "comment" ? record3.body : kind3 === "issue" || kind3 === "project" ? record3.description : null, "trackerBodyOf");
|
|
65169
|
-
var trackerParentOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "comment" ? record3.issue : kind3 === "state" || kind3 === "label" ? record3.team : kind3 === "issue" ? record3.team : null, "trackerParentOf");
|
|
65245
|
+
var trackerParentOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "comment" ? record3.issue : kind3 === "state" || kind3 === "label" || kind3 === "sprint" ? record3.team : kind3 === "issue" ? record3.team : null, "trackerParentOf");
|
|
65170
65246
|
|
|
65171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65247
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tracker-chunks.js
|
|
65172
65248
|
var TRACKER_CHUNK = "tracker_item";
|
|
65173
65249
|
var CHUNKED = /* @__PURE__ */ new Set(["issue", "project", "comment"]);
|
|
65174
65250
|
var CHUNKED_SQL = "('issue', 'project', 'comment')";
|
|
@@ -65397,7 +65473,7 @@ var nearestTrackerItems = /* @__PURE__ */ __name((database, model, query, { acco
|
|
|
65397
65473
|
return plain2(ranked2(best, limit));
|
|
65398
65474
|
}, "nearestTrackerItems");
|
|
65399
65475
|
|
|
65400
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65476
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tracker.js
|
|
65401
65477
|
var MOST3 = 500;
|
|
65402
65478
|
var CANDIDATES = 2e3;
|
|
65403
65479
|
var PAGE2 = 200;
|
|
@@ -65425,7 +65501,13 @@ var resetTrackerItemWords = /* @__PURE__ */ __name((database) => {
|
|
|
65425
65501
|
});
|
|
65426
65502
|
}, "resetTrackerItemWords");
|
|
65427
65503
|
var keyOf6 = /* @__PURE__ */ __name((data) => data == null ? void 0 : JSON.parse(String(data)).key, "keyOf");
|
|
65428
|
-
var ISSUE_FIELDS = { assignee: "assignee", project: "project", state: "state" };
|
|
65504
|
+
var ISSUE_FIELDS = { assignee: "assignee", project: "project", state: "state", sprint: "sprint" };
|
|
65505
|
+
var deleteComments = /* @__PURE__ */ __name((database, accountId, issues, now2) => {
|
|
65506
|
+
if (!issues.length)
|
|
65507
|
+
return;
|
|
65508
|
+
const ids3 = database.prepare("UPDATE tracker_items SET deleted_at = ? WHERE account_id = ? AND kind = 'comment' AND deleted_at IS NULL AND parent_id IN (SELECT value FROM json_each(?)) RETURNING id").all(now2, accountId, JSON.stringify(issues)).map((row2) => Number(row2.id));
|
|
65509
|
+
dropTrackerChunks(database, ids3);
|
|
65510
|
+
}, "deleteComments");
|
|
65429
65511
|
var queryOf = /* @__PURE__ */ __name((words4, exact) => {
|
|
65430
65512
|
const seen = /* @__PURE__ */ new Set();
|
|
65431
65513
|
const clauses = words4.map((word2) => tokensOf2(word2).filter((token) => fold(token))).filter((tokens) => {
|
|
@@ -65455,12 +65537,15 @@ var trackerStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
65455
65537
|
const save2 = /* @__PURE__ */ __name((key2, kind3, records2, now2) => write(database, () => {
|
|
65456
65538
|
const accountId = accountPk(context, key2);
|
|
65457
65539
|
const stored4 = database.prepare("SELECT data, title, body, deleted_at FROM tracker_items WHERE account_id = ? AND kind = ? AND external_id = ?");
|
|
65540
|
+
const issueDeletedAt = database.prepare("SELECT deleted_at FROM tracker_items WHERE account_id = ? AND kind = 'issue' AND external_id = ?");
|
|
65541
|
+
const reviveComments = database.prepare("UPDATE tracker_items SET deleted_at = NULL WHERE account_id = ? AND kind = 'comment' AND parent_id = ? AND deleted_at = ?");
|
|
65542
|
+
let changed = 0;
|
|
65458
65543
|
const scope3 = database.prepare("SELECT scope FROM accounts WHERE id = ?").get(accountId)?.scope;
|
|
65459
65544
|
const chunked = isChunkedTrackerKind(kind3);
|
|
65460
65545
|
const chunk = trackerChunkWriter(database);
|
|
65461
65546
|
const released = [];
|
|
65462
65547
|
const comments = database.prepare("SELECT id, title, body, coalesce(source_updated_at, synced_at) AS at FROM tracker_items WHERE account_id = ? AND kind = 'comment' AND parent_id = ? AND deleted_at IS NULL");
|
|
65463
|
-
const upsert2 = database.prepare("INSERT INTO tracker_items (account_id, kind, external_id, parent_id, title, title_folded, body, normalized_text, data, source_created_at, source_updated_at, archived_at, deleted_at, synced_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
|
|
65548
|
+
const upsert2 = database.prepare("INSERT INTO tracker_items (account_id, kind, external_id, parent_id, title, title_folded, body, normalized_text, data, source_created_at, source_updated_at, archived_at, deleted_at, synced_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (account_id, kind, external_id) DO UPDATE SET parent_id = excluded.parent_id, title = excluded.title, title_folded = excluded.title_folded, body = excluded.body, normalized_text = excluded.normalized_text, data = excluded.data, source_created_at = excluded.source_created_at, source_updated_at = excluded.source_updated_at, archived_at = excluded.archived_at, deleted_at = CASE WHEN excluded.deleted_at IS NULL THEN NULL ELSE coalesce(tracker_items.deleted_at, excluded.deleted_at) END, synced_at = excluded.synced_at RETURNING id, deleted_at");
|
|
65464
65549
|
for (const record3 of records2) {
|
|
65465
65550
|
const before2 = stored4.get(accountId, kind3, record3.externalId);
|
|
65466
65551
|
const merged2 = {
|
|
@@ -65469,7 +65554,24 @@ var trackerStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
65469
65554
|
};
|
|
65470
65555
|
const title2 = trackerTitleOf(kind3, merged2);
|
|
65471
65556
|
const body2 = trackerBodyOf(kind3, merged2) ?? null;
|
|
65472
|
-
const
|
|
65557
|
+
const data = JSON.stringify(merged2);
|
|
65558
|
+
const parentGone = kind3 === "comment" ? issueDeletedAt.get(accountId, merged2.issue ?? null)?.deleted_at : void 0;
|
|
65559
|
+
const deletedAt = merged2.deleted === true ? now2 : parentGone == null ? null : Number(parentGone);
|
|
65560
|
+
const saved = upsert2.get(accountId, kind3, merged2.externalId, trackerParentOf(kind3, merged2) ?? null, title2, fold(title2), body2, normalize([title2, body2].filter(Boolean).join("\n")), data, merged2.createdAt ?? null, merged2.updatedAt ?? null, merged2.archivedAt ?? null, deletedAt, now2);
|
|
65561
|
+
const gone = saved?.deleted_at != null;
|
|
65562
|
+
if (!before2 || before2.data !== data || before2.deleted_at != null !== gone)
|
|
65563
|
+
changed += 1;
|
|
65564
|
+
if (gone) {
|
|
65565
|
+
if (before2?.deleted_at == null) {
|
|
65566
|
+
if (chunked)
|
|
65567
|
+
dropTrackerChunks(database, [Number(saved?.id)]);
|
|
65568
|
+
if (kind3 === "issue")
|
|
65569
|
+
deleteComments(database, accountId, [merged2.externalId], Number(saved?.deleted_at));
|
|
65570
|
+
}
|
|
65571
|
+
continue;
|
|
65572
|
+
}
|
|
65573
|
+
if (kind3 === "issue" && before2?.deleted_at != null)
|
|
65574
|
+
reviveComments.run(accountId, merged2.externalId, Number(before2.deleted_at));
|
|
65473
65575
|
const same = before2?.deleted_at == null && before2?.title === title2 && (before2?.body ?? null) === body2;
|
|
65474
65576
|
if (kind3 === "issue" && (before2?.deleted_at !== null || before2.title !== title2 || keyOf6(before2.data) !== merged2.key))
|
|
65475
65577
|
for (const row2 of comments.all(accountId, merged2.externalId)) {
|
|
@@ -65502,8 +65604,18 @@ var trackerStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
65502
65604
|
released.push(hash2);
|
|
65503
65605
|
}
|
|
65504
65606
|
dropUnusedVectors(database, released);
|
|
65505
|
-
return
|
|
65607
|
+
return changed;
|
|
65506
65608
|
}), "save");
|
|
65609
|
+
const restoreListed = /* @__PURE__ */ __name((accountId, kind3, listed) => {
|
|
65610
|
+
const found2 = database.prepare("SELECT t.id, t.external_id, t.deleted_at FROM tracker_items t WHERE t.account_id = ? AND t.kind = ? AND t.deleted_at IS NOT NULL AND t.external_id IN (SELECT value FROM json_each(?)) AND (t.kind <> 'comment' OR NOT EXISTS (SELECT 1 FROM tracker_items i WHERE i.account_id = t.account_id AND i.kind = 'issue' AND i.external_id = t.parent_id AND i.deleted_at IS NOT NULL))").all(accountId, kind3, JSON.stringify(listed));
|
|
65611
|
+
const restore = database.prepare("UPDATE tracker_items SET deleted_at = NULL, data = CASE WHEN json_extract(data, '$.deleted') IS NULL THEN data ELSE json_set(data, '$.deleted', json('false')) END WHERE id = ?");
|
|
65612
|
+
const comments = database.prepare("UPDATE tracker_items SET deleted_at = NULL WHERE account_id = ? AND kind = 'comment' AND parent_id = ? AND deleted_at = ?");
|
|
65613
|
+
for (const row2 of found2) {
|
|
65614
|
+
restore.run(Number(row2.id));
|
|
65615
|
+
if (kind3 === "issue")
|
|
65616
|
+
comments.run(accountId, String(row2.external_id), Number(row2.deleted_at));
|
|
65617
|
+
}
|
|
65618
|
+
}, "restoreListed");
|
|
65507
65619
|
const removeUnlisted = /* @__PURE__ */ __name((key2, kind3, listed, before2, now2, { dryRun = false } = {}) => {
|
|
65508
65620
|
const accountId = findAccountPk(context, key2);
|
|
65509
65621
|
if (accountId === void 0)
|
|
@@ -65513,17 +65625,23 @@ var trackerStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
65513
65625
|
const mark = database.prepare("UPDATE tracker_items SET deleted_at = ? WHERE id = ?");
|
|
65514
65626
|
let removed = 0;
|
|
65515
65627
|
const marked = [];
|
|
65628
|
+
const issues = [];
|
|
65516
65629
|
for (const row2 of database.prepare("SELECT id, external_id FROM tracker_items WHERE account_id = ? AND kind = ? AND deleted_at IS NULL AND synced_at < ?").all(accountId, kind3, before2)) {
|
|
65517
65630
|
if (keep2.has(String(row2.external_id)))
|
|
65518
65631
|
continue;
|
|
65519
65632
|
if (!dryRun) {
|
|
65520
65633
|
mark.run(now2, Number(row2.id));
|
|
65521
65634
|
marked.push(Number(row2.id));
|
|
65635
|
+
if (kind3 === "issue")
|
|
65636
|
+
issues.push(String(row2.external_id));
|
|
65522
65637
|
}
|
|
65523
65638
|
removed += 1;
|
|
65524
65639
|
}
|
|
65525
65640
|
if (isChunkedTrackerKind(kind3))
|
|
65526
65641
|
dropTrackerChunks(database, marked);
|
|
65642
|
+
deleteComments(database, accountId, issues, now2);
|
|
65643
|
+
if (!dryRun)
|
|
65644
|
+
restoreListed(accountId, kind3, listed);
|
|
65527
65645
|
return removed;
|
|
65528
65646
|
});
|
|
65529
65647
|
}, "removeUnlisted");
|
|
@@ -65682,7 +65800,7 @@ var trackerStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
65682
65800
|
};
|
|
65683
65801
|
}, "trackerStoreOver");
|
|
65684
65802
|
|
|
65685
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65803
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
65686
65804
|
var refusalOf2 = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
65687
65805
|
var wrapped2 = /* @__PURE__ */ new WeakMap();
|
|
65688
65806
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -65717,7 +65835,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
65717
65835
|
return proxy;
|
|
65718
65836
|
}, "storeErrors");
|
|
65719
65837
|
|
|
65720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65838
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
65721
65839
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
65722
65840
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
65723
65841
|
let merged2 = { from: from2, to };
|
|
@@ -65730,7 +65848,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
65730
65848
|
}, "markRange");
|
|
65731
65849
|
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");
|
|
65732
65850
|
|
|
65733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65851
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
65734
65852
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
65735
65853
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
65736
65854
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -65751,7 +65869,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
65751
65869
|
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);
|
|
65752
65870
|
}, "setTaskAnalysisMark");
|
|
65753
65871
|
|
|
65754
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
65755
65873
|
var keyOf7 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
65756
65874
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
65757
65875
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf7(account));
|
|
@@ -65761,7 +65879,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
65761
65879
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf7(account), JSON.stringify(until), now2);
|
|
65762
65880
|
}, "setTaskRulesStop");
|
|
65763
65881
|
|
|
65764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
65765
65883
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
65766
65884
|
const { database } = context;
|
|
65767
65885
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -65820,7 +65938,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
65820
65938
|
};
|
|
65821
65939
|
}, "syncStoreOver");
|
|
65822
65940
|
|
|
65823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65941
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
65824
65942
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
65825
65943
|
const { database } = context;
|
|
65826
65944
|
return {
|
|
@@ -65842,7 +65960,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
65842
65960
|
};
|
|
65843
65961
|
}, "tagsStoreOver");
|
|
65844
65962
|
|
|
65845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
65846
65964
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
65847
65965
|
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
|
|
65848
65966
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -65969,7 +66087,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
65969
66087
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
65970
66088
|
}, "savePictureChunks");
|
|
65971
66089
|
|
|
65972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
66090
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
65973
66091
|
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,
|
|
65974
66092
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
65975
66093
|
FROM messages m
|
|
@@ -66058,7 +66176,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
66058
66176
|
return plain2(best(found2));
|
|
66059
66177
|
}, "nearestMessages");
|
|
66060
66178
|
|
|
66061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
66179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
66062
66180
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
66063
66181
|
const { database } = context;
|
|
66064
66182
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -66322,7 +66440,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
66322
66440
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
66323
66441
|
}), "vectorsStoreOver");
|
|
66324
66442
|
|
|
66325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
66443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
66326
66444
|
import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
66327
66445
|
import { dirname as dirname3, join as join4 } from "node:path";
|
|
66328
66446
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -66410,10 +66528,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
66410
66528
|
}
|
|
66411
66529
|
}, "lastBackup");
|
|
66412
66530
|
|
|
66413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
66531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
66414
66532
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
66415
66533
|
|
|
66416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
66534
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
66417
66535
|
var COUNTED_TABLES = [
|
|
66418
66536
|
"accounts",
|
|
66419
66537
|
"chats",
|
|
@@ -66498,7 +66616,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
66498
66616
|
};
|
|
66499
66617
|
}, "storeContents");
|
|
66500
66618
|
|
|
66501
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
66619
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.751.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_532b02f06c2b2e2f096ad6d107b7f8b7/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
66502
66620
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
66503
66621
|
const context = await openStoreContext(options);
|
|
66504
66622
|
try {
|