@wirecat/attio-cli 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +6 -5
- package/contracts/wirecat.json +20 -2
- package/dist/bin/attio.js +2 -2
- package/dist/bundle/agent-DYTWDBTT.js +37 -0
- package/dist/bundle/{all-profiles-C2NMRQPE.js → all-profiles-LZDKPHN2.js} +10 -10
- package/dist/bundle/{anthropic-KOU2ILDK.js → anthropic-BF72H77D.js} +5 -5
- package/dist/bundle/{app-server-TINV4NNY.js → app-server-H57FZJX5.js} +61 -61
- package/dist/bundle/attio.js +11 -11
- package/dist/bundle/{bun-GVNM6IWY.js → bun-WO77T4LG.js} +2 -2
- package/dist/bundle/{bun-sqlite-IF6B3EQI.js → bun-sqlite-2BP7JDVO.js} +6 -6
- package/dist/bundle/{chunk-RCKRXBJF.js → chunk-2E6JGBM5.js} +14 -14
- package/dist/bundle/{chunk-VJ4CPL6F.js → chunk-34FJ26K2.js} +2 -2
- package/dist/bundle/{chunk-CBPL3GID.js → chunk-3I2FGNWO.js} +1 -1
- package/dist/bundle/{chunk-ICUXAOEM.js → chunk-3NVOKVRY.js} +380 -295
- package/dist/bundle/{chunk-KD4EUUER.js → chunk-3YFDZSM3.js} +1 -1
- package/dist/bundle/{chunk-ZPSH27BB.js → chunk-4SMGM2Q6.js} +4 -4
- package/dist/bundle/{chunk-MMGCGPKM.js → chunk-4STBJZR4.js} +26 -26
- package/dist/bundle/{chunk-ZMJZQGCN.js → chunk-5K3FGXZH.js} +1 -1
- package/dist/bundle/{chunk-IPHUAWFG.js → chunk-6ALPRBNV.js} +3 -3
- package/dist/bundle/{chunk-RK4GN2II.js → chunk-6NDJDDSQ.js} +35 -35
- package/dist/bundle/{chunk-PWUQC2GI.js → chunk-6SK3YB2B.js} +12 -12
- package/dist/bundle/{chunk-ETSOG6TZ.js → chunk-76RRELCU.js} +418 -396
- package/dist/bundle/{chunk-HQJ2TABD.js → chunk-7MXCUMHG.js} +1 -1
- package/dist/bundle/{chunk-WIYAMDPP.js → chunk-7ZUOI3HY.js} +3 -3
- package/dist/bundle/{chunk-RRH7UK7L.js → chunk-AMUONYQR.js} +2 -2
- package/dist/bundle/{chunk-MCQOXTAL.js → chunk-ASCUOOLO.js} +1 -1
- package/dist/bundle/{chunk-5DCRHSBI.js → chunk-BUGROVF3.js} +2 -2
- package/dist/bundle/{chunk-QNQ2OF24.js → chunk-CHZ26CW5.js} +56 -56
- package/dist/bundle/{chunk-KB3YJJPN.js → chunk-CMO5ND3Y.js} +34 -34
- package/dist/bundle/{chunk-WBEZZGZE.js → chunk-DF2IIO32.js} +158 -158
- package/dist/bundle/{chunk-HLLRNP2G.js → chunk-DQ6P3R4B.js} +3 -3
- package/dist/bundle/{chunk-XHIVZPQ2.js → chunk-DSRXCLPO.js} +1 -1
- package/dist/bundle/{chunk-4HQDT5PF.js → chunk-EEPE3SOW.js} +5 -5
- package/dist/bundle/{chunk-SBRFKB77.js → chunk-EQGXEKSV.js} +7 -7
- package/dist/bundle/{chunk-DW3V7GTY.js → chunk-EQXT7KO4.js} +6 -6
- package/dist/bundle/{chunk-MXDIXBIV.js → chunk-ERW2WOJT.js} +1 -1
- package/dist/bundle/{chunk-5ETXE5KF.js → chunk-ESH2QGCA.js} +7 -7
- package/dist/bundle/{chunk-4EYKJLWI.js → chunk-G3JTLVVL.js} +7 -7
- package/dist/bundle/{chunk-JKCXDIGC.js → chunk-G6FQMVKW.js} +3 -3
- package/dist/bundle/{chunk-LWUJZ2E3.js → chunk-GBZ6JUXU.js} +2 -2
- package/dist/bundle/{chunk-5WAGTWCS.js → chunk-GLHFJPYS.js} +3 -3
- package/dist/bundle/{chunk-LB6D4QF2.js → chunk-GW4G5KLS.js} +8 -8
- package/dist/bundle/{chunk-V5K3M7FE.js → chunk-H7QDPW3D.js} +1 -1
- package/dist/bundle/{chunk-6B5PSQQ7.js → chunk-HG7FT3H3.js} +7 -7
- package/dist/bundle/{chunk-6L5EUGLP.js → chunk-I3WS6V5H.js} +8 -8
- package/dist/bundle/{chunk-BHNFRL3H.js → chunk-IDU4ESRZ.js} +1 -1
- package/dist/bundle/{chunk-OPXCRQTV.js → chunk-IXCIQ7FZ.js} +4 -4
- package/dist/bundle/{chunk-MZNRIH3T.js → chunk-J5P5VSRG.js} +8 -8
- package/dist/bundle/{chunk-NEFILPPV.js → chunk-JA26HG7T.js} +8 -8
- package/dist/bundle/{chunk-V6EVJXLO.js → chunk-JSTBW7F4.js} +6 -6
- package/dist/bundle/{chunk-QCEEPJNN.js → chunk-KHDXRFJZ.js} +8 -8
- package/dist/bundle/{chunk-2P7ENEQ7.js → chunk-L5WS6CYZ.js} +2 -2
- package/dist/bundle/{chunk-MYVWV5L5.js → chunk-LWJ4ZGUM.js} +13 -13
- package/dist/bundle/{chunk-PKNFA5TU.js → chunk-MC2RQ2OB.js} +1 -1
- package/dist/bundle/{chunk-QG4WCLGB.js → chunk-MNQACPXG.js} +25 -25
- package/dist/bundle/{chunk-IGALQ74S.js → chunk-MOSH2KPD.js} +10 -10
- package/dist/bundle/{chunk-A7YQTQ5U.js → chunk-MRREDVPY.js} +13 -13
- package/dist/bundle/{chunk-7NFEMS4A.js → chunk-MT2ZUZRA.js} +6 -6
- package/dist/bundle/{chunk-FJV3MO57.js → chunk-O4A33Y54.js} +2 -2
- package/dist/bundle/{chunk-V2R2BJJU.js → chunk-OBXDRUO4.js} +1 -1
- package/dist/bundle/{chunk-4XHWGJXT.js → chunk-OFR3YYT6.js} +1 -1
- package/dist/bundle/{chunk-VL25A6V2.js → chunk-P4U6AGWD.js} +2 -2
- package/dist/bundle/{chunk-4QE4L7UL.js → chunk-PMP37KLR.js} +3 -3
- package/dist/bundle/{chunk-JZMGOVCZ.js → chunk-Q3JCUUOR.js} +3 -3
- package/dist/bundle/{chunk-IYMWUL6E.js → chunk-Q7BSTQ3T.js} +1 -1
- package/dist/bundle/{chunk-DVN54VPI.js → chunk-QLHDUYGE.js} +1 -1
- package/dist/bundle/{chunk-2H2MWGBD.js → chunk-RU5J7DWY.js} +9 -9
- package/dist/bundle/{chunk-JTOKDROB.js → chunk-S7K2XFQB.js} +6 -6
- package/dist/bundle/{chunk-6BVPS2YY.js → chunk-SQHDE3TC.js} +4 -4
- package/dist/bundle/{chunk-WRJGITBX.js → chunk-TF7ZGCOK.js} +3 -3
- package/dist/bundle/{chunk-SP6DPFZ4.js → chunk-V6BTAILB.js} +61 -61
- package/dist/bundle/{chunk-PO6PLQYL.js → chunk-VDMIJ3JW.js} +3 -3
- package/dist/bundle/{chunk-YKN4Y35P.js → chunk-VW5F6FK3.js} +4 -4
- package/dist/bundle/{chunk-V6ALLFEE.js → chunk-W6F2CQZ6.js} +17 -17
- package/dist/bundle/{chunk-S7WJXELM.js → chunk-WARIIYSW.js} +2 -2
- package/dist/bundle/{chunk-ARRQVUJ2.js → chunk-WK7GLHHL.js} +5 -5
- package/dist/bundle/{chunk-XTQIXZVM.js → chunk-X5S5KUSU.js} +19 -19
- package/dist/bundle/{chunk-O6CVJGGL.js → chunk-X6R74TWX.js} +4 -4
- package/dist/bundle/{chunk-AEPOHR4Z.js → chunk-XXLQNHKF.js} +2 -2
- package/dist/bundle/{chunk-2343HKEW.js → chunk-XXOTX4M3.js} +7 -7
- package/dist/bundle/{chunk-TWCVCW5T.js → chunk-ZDBTYBFR.js} +3 -3
- package/dist/bundle/{chunk-SWJDLFDM.js → chunk-ZGADZ4CH.js} +14 -14
- package/dist/bundle/command-contract-7M6EPH3D.js +37 -0
- package/dist/bundle/{command-server-entry-4XR4GDS7.js → command-server-entry-MNVPYQZ3.js} +25 -25
- package/dist/bundle/{decode-24EITKP4.js → decode-MQNKNXLK.js} +5 -5
- package/dist/bundle/{definitions-HU62PG4L.js → definitions-FODOIPM2.js} +20 -5
- package/dist/bundle/{dispatch-VE6CXCJW.js → dispatch-TAQ7635E.js} +8 -8
- package/dist/bundle/{dist-ZSNEZYVF.js → dist-EM7KLEG4.js} +1 -1
- package/dist/bundle/{echarts-LEVLEF7L.js → echarts-6ZSUNO4L.js} +2 -2
- package/dist/bundle/{embed-G6FGY3VZ.js → embed-PHCCJJ5Z.js} +6 -6
- package/dist/bundle/{embedder-B6LNMXZZ.js → embedder-WLZZQTKZ.js} +9 -9
- package/dist/bundle/{failure-ASVFQXMF.js → failure-MR2XVHFP.js} +2 -2
- package/dist/bundle/{first-run-NVXVVALW.js → first-run-64LREHSV.js} +12 -12
- package/dist/bundle/first-screen-YSCAZIYJ.js +37 -0
- package/dist/bundle/{instructions-F3KPYMJK.js → instructions-22GCKNR5.js} +1 -1
- package/dist/bundle/{mcp-BUCB5ZPE.js → mcp-CNV7F2XZ.js} +2 -2
- package/dist/bundle/meeting-combined-YX3T5WJD.js +24 -0
- package/dist/bundle/{meeting-model-GJPAIUQL.js → meeting-model-JWDTCGLZ.js} +11 -11
- package/dist/bundle/{meeting-semantic-YWY645AH.js → meeting-semantic-375GYPZQ.js} +6 -6
- package/dist/bundle/{node-WVUZSDLD.js → node-ITDTNRRZ.js} +2 -2
- package/dist/bundle/{node-sqlite-V4NNKABG.js → node-sqlite-IRAGRMEZ.js} +7 -7
- package/dist/bundle/{oauth-7CENTQIN.js → oauth-CACOQJEL.js} +7 -7
- package/dist/bundle/{open-OLTONZBG.js → open-HU4KHKDR.js} +5 -5
- package/dist/bundle/{openai-M6ES74YN.js → openai-JQUPAVKX.js} +15 -15
- package/dist/bundle/{process-VFIFK5KO.js → process-QS5OHEUK.js} +1 -1
- package/dist/bundle/{program-N72VUDXM.js → program-QLCUCR76.js} +376 -366
- package/dist/bundle/{prompt-TNWPBEBB.js → prompt-VA5MKXJU.js} +5 -5
- package/dist/bundle/{recognize-PV2WOUWS.js → recognize-JGA5IVKC.js} +4 -4
- package/dist/bundle/{remote-3F6JACS5.js → remote-NPY2KZQ4.js} +9 -9
- package/dist/bundle/{rerank-33C67PIV.js → rerank-4H2QR4XU.js} +7 -7
- package/dist/bundle/{schemas-RLDEALIJ.js → schemas-THAI3G5S.js} +6 -6
- package/dist/bundle/{serve-3DEMACSQ.js → serve-UH46SZQG.js} +9 -9
- package/dist/bundle/{server-LIBRGMUZ.js → server-6H7JS6SU.js} +53 -53
- package/dist/bundle/server-SR52KBL3.js +79 -0
- package/dist/bundle/{sqlite-runtime-SMAREHYG.js → sqlite-runtime-EJWEUTBR.js} +6 -6
- package/dist/bundle/{state-WPHAVJIU.js → state-34B6AUQZ.js} +6 -6
- package/dist/bundle/{store-A7V4FEXE.js → store-3R4ILTCJ.js} +18 -18
- package/dist/bundle/{store-PMAPJNXT.js → store-XSE35P3U.js} +20 -20
- package/dist/bundle/store-maintenance-command-ABJARLI4.js +66 -0
- package/dist/bundle/surface-NOTIEJB5.js +65 -0
- package/dist/generated/definitions.d.ts.map +1 -1
- package/dist/generated/definitions.js +15 -0
- package/dist/generated/definitions.js.map +1 -1
- package/dist/generated/schemas.js +5 -5
- package/dist/generated/schemas.js.map +1 -1
- package/dist/generated/types.d.ts +15 -5
- package/dist/generated/types.d.ts.map +1 -1
- package/dist/generated/wirecat-config.d.ts.map +1 -1
- package/dist/generated/wirecat-config.js +5 -0
- package/dist/generated/wirecat-config.js.map +1 -1
- package/dist/identity.js +1 -1
- package/dist/identity.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/agent-KLBL3FYD.js +0 -37
- package/dist/bundle/command-contract-3FR7BK72.js +0 -37
- package/dist/bundle/first-screen-N3IPK5AT.js +0 -37
- package/dist/bundle/meeting-combined-7FREWXMB.js +0 -24
- package/dist/bundle/server-AAK2HWQM.js +0 -79
- package/dist/bundle/store-maintenance-command-QHRHAEYN.js +0 -66
- package/dist/bundle/surface-MN4RTNYW.js +0 -65
- package/dist/commands/comments.d.ts +0 -3
- package/dist/commands/comments.d.ts.map +0 -1
- package/dist/commands/comments.js +0 -114
- package/dist/commands/comments.js.map +0 -1
- package/dist/sample/comments.d.ts +0 -61
- package/dist/sample/comments.d.ts.map +0 -1
- package/dist/sample/comments.js +0 -39
- package/dist/sample/comments.js.map +0 -1
- package/dist/sample/records.d.ts +0 -16
- package/dist/sample/records.d.ts.map +0 -1
- package/dist/sample/records.js +0 -22
- package/dist/sample/records.js.map +0 -1
- package/dist/sample/transport.d.ts +0 -42
- package/dist/sample/transport.d.ts.map +0 -1
- package/dist/sample/transport.js +0 -153
- package/dist/sample/transport.js.map +0 -1
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
analyzerIdentity,
|
|
11
11
|
createStemmer,
|
|
12
12
|
parseStemmers
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GW4G5KLS.js";
|
|
14
14
|
import {
|
|
15
15
|
calendarMoment,
|
|
16
16
|
dayIn
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Q3JCUUOR.js";
|
|
18
18
|
import {
|
|
19
19
|
PRESENCE,
|
|
20
20
|
QUERY_LIMITS,
|
|
@@ -26,12 +26,12 @@ import {
|
|
|
26
26
|
plainQuery,
|
|
27
27
|
searchError,
|
|
28
28
|
tooWideTerm
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-G3JTLVVL.js";
|
|
30
30
|
import {
|
|
31
31
|
NORMALIZER_VERSION,
|
|
32
32
|
fold,
|
|
33
33
|
normalize
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-QLHDUYGE.js";
|
|
35
35
|
import {
|
|
36
36
|
ACCOUNT_GROUPS,
|
|
37
37
|
ADDED_ACCOUNT,
|
|
@@ -157,14 +157,14 @@ import {
|
|
|
157
157
|
usableLinkSql,
|
|
158
158
|
useStoredProviders,
|
|
159
159
|
walletLine
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-6NDJDDSQ.js";
|
|
161
161
|
import {
|
|
162
162
|
sqliteCode
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-GLHFJPYS.js";
|
|
164
164
|
import {
|
|
165
165
|
normalizeTag,
|
|
166
166
|
tagOf
|
|
167
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-O4A33Y54.js";
|
|
168
168
|
import {
|
|
169
169
|
CHAT_MESSAGES_READ,
|
|
170
170
|
FACT_TYPES,
|
|
@@ -220,27 +220,27 @@ import {
|
|
|
220
220
|
validateQuery,
|
|
221
221
|
walkQuery,
|
|
222
222
|
zonedMoment
|
|
223
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-V6BTAILB.js";
|
|
224
224
|
import {
|
|
225
225
|
DEFAULT_TASK_CATEGORIES,
|
|
226
226
|
sharedConfigPath,
|
|
227
227
|
storedTaskCategories,
|
|
228
228
|
taskCategoriesReader
|
|
229
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-EQGXEKSV.js";
|
|
230
230
|
import {
|
|
231
231
|
refuseOwnerStoreInTests,
|
|
232
232
|
storePath
|
|
233
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-34FJ26K2.js";
|
|
234
234
|
import {
|
|
235
235
|
quietSqliteWarning,
|
|
236
236
|
storeCapable
|
|
237
|
-
} from "./chunk-
|
|
237
|
+
} from "./chunk-S7K2XFQB.js";
|
|
238
238
|
import {
|
|
239
239
|
PRAGMAS,
|
|
240
240
|
TIME_LIMIT_FUNCTION,
|
|
241
241
|
TimeLimitReached,
|
|
242
242
|
isQueryOnly
|
|
243
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-MC2RQ2OB.js";
|
|
244
244
|
import {
|
|
245
245
|
array,
|
|
246
246
|
boolean,
|
|
@@ -266,7 +266,7 @@ import {
|
|
|
266
266
|
CliError,
|
|
267
267
|
isCliError,
|
|
268
268
|
singleLine
|
|
269
|
-
} from "./chunk-
|
|
269
|
+
} from "./chunk-BUGROVF3.js";
|
|
270
270
|
import {
|
|
271
271
|
SQLiteTable,
|
|
272
272
|
TableAliasProxyHandler,
|
|
@@ -291,7 +291,7 @@ import {
|
|
|
291
291
|
sql,
|
|
292
292
|
sqliteTable,
|
|
293
293
|
text
|
|
294
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-OFR3YYT6.js";
|
|
295
295
|
import {
|
|
296
296
|
__commonJS,
|
|
297
297
|
__name,
|
|
@@ -10035,7 +10035,7 @@ var require_cjs = __commonJS({
|
|
|
10035
10035
|
}
|
|
10036
10036
|
});
|
|
10037
10037
|
|
|
10038
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
10039
10039
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
10040
10040
|
const methods = whole;
|
|
10041
10041
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10163,7 +10163,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10163
10163
|
};
|
|
10164
10164
|
}, "bindAccount");
|
|
10165
10165
|
|
|
10166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10167
10167
|
var IndexBuilderOn = class {
|
|
10168
10168
|
static {
|
|
10169
10169
|
__name(this, "IndexBuilderOn");
|
|
@@ -10358,7 +10358,7 @@ function alias(table, alias2) {
|
|
|
10358
10358
|
}
|
|
10359
10359
|
__name(alias, "alias");
|
|
10360
10360
|
|
|
10361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/record-fields.js
|
|
10362
10362
|
var DECIMAL_PATTERN = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
10363
10363
|
var SIGNED_DECIMAL = "^-?[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
10364
10364
|
var DAY = "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
|
|
@@ -10408,7 +10408,7 @@ var arrayOf = /* @__PURE__ */ __name((item, maxItems, description) => ({
|
|
|
10408
10408
|
}), "arrayOf");
|
|
10409
10409
|
var isObject = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isObject");
|
|
10410
10410
|
|
|
10411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/record-types.js
|
|
10412
10412
|
var kept = /* @__PURE__ */ __name((description) => ({ description }), "kept");
|
|
10413
10413
|
var PARTY = ["person", "organization"];
|
|
10414
10414
|
var ORGANIZATION = ["organization"];
|
|
@@ -10803,7 +10803,7 @@ var hasV1Roles = /* @__PURE__ */ __name((type) => rolesOf2(type).some(([, role])
|
|
|
10803
10803
|
var IDENTITY_TYPES = RECORD_ENTITY_TYPES.filter((type) => RECORD_TYPES[type].review === "identity");
|
|
10804
10804
|
var article = /* @__PURE__ */ __name((word2) => /^[aeiou]/.test(word2) ? "an" : "a", "article");
|
|
10805
10805
|
|
|
10806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10807
10807
|
var ENTITY_TABLES = {
|
|
10808
10808
|
...RECORD_TABLES,
|
|
10809
10809
|
account: "accounts",
|
|
@@ -10842,7 +10842,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10842
10842
|
return { table, pointer, type, count: count2, known: known2 };
|
|
10843
10843
|
}).filter(({ count: count2 }) => count2 > 0)), "orphanPointers");
|
|
10844
10844
|
|
|
10845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/identity-links.js
|
|
10846
10846
|
var IDENTITY_LINK_KIND = "identity_link";
|
|
10847
10847
|
var IDENTITY_LINK_SIGNALS = ["agent", "phone", "email", "guest-email", "name", "account"];
|
|
10848
10848
|
var LINK_WEAKNESSES = [
|
|
@@ -10855,7 +10855,7 @@ var LINK_WEAKNESSES = [
|
|
|
10855
10855
|
"not-own-number"
|
|
10856
10856
|
];
|
|
10857
10857
|
|
|
10858
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10858
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/merged-persons.js
|
|
10859
10859
|
var SEPARATIONS = ["unlink", "split", "undo-merge"];
|
|
10860
10860
|
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");
|
|
10861
10861
|
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");
|
|
@@ -10887,7 +10887,7 @@ var samePersons = /* @__PURE__ */ __name((database, pk) => {
|
|
|
10887
10887
|
}, "samePersons");
|
|
10888
10888
|
var idsOf = /* @__PURE__ */ __name((database, type, id2) => JSON.stringify(type === "person" ? samePersons(database, id2) : [id2]), "idsOf");
|
|
10889
10889
|
|
|
10890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-link-rows.js
|
|
10891
10891
|
var pairOf = /* @__PURE__ */ __name((a, b) => [Number(a), Number(b)].sort((x, y) => x - y).join("-"), "pairOf");
|
|
10892
10892
|
var pkOf = /* @__PURE__ */ __name((database, ref3) => {
|
|
10893
10893
|
const at2 = ref3.indexOf(":");
|
|
@@ -10994,13 +10994,13 @@ var forgetErasedLinks = /* @__PURE__ */ __name((database) => {
|
|
|
10994
10994
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
10995
10995
|
}, "forgetErasedLinks");
|
|
10996
10996
|
|
|
10997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/identity-splits.js
|
|
10998
10998
|
var IDENTITY_SPLIT_KIND = "identity_split";
|
|
10999
10999
|
|
|
11000
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
11001
11001
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
11002
11002
|
|
|
11003
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
11004
11004
|
var TASK_CLOSE_KIND = "task_close";
|
|
11005
11005
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
11006
11006
|
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");
|
|
@@ -11048,7 +11048,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
11048
11048
|
}, "assertMayDecide");
|
|
11049
11049
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
11050
11050
|
|
|
11051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/addresses.js
|
|
11052
11052
|
var EMAIL_ADDRESS = /^[^\s@]+@[^\s@]+\.[^\s@]+$/u;
|
|
11053
11053
|
var isEmailAddress = /* @__PURE__ */ __name((value) => EMAIL_ADDRESS.test(value), "isEmailAddress");
|
|
11054
11054
|
var ROLE_ADDRESS_WORDS = {
|
|
@@ -11110,7 +11110,7 @@ var PERSON_LIKE = /* @__PURE__ */ new Set(["hr"]);
|
|
|
11110
11110
|
var isPersonLikeRoleAddress = /* @__PURE__ */ __name((address) => PERSON_LIKE.has(localWord(address)), "isPersonLikeRoleAddress");
|
|
11111
11111
|
var isNoReplyAddress = /* @__PURE__ */ __name((address) => NO_REPLY.has(localWord(address)), "isNoReplyAddress");
|
|
11112
11112
|
|
|
11113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
11114
11114
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
11115
11115
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
11116
11116
|
var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
@@ -11140,7 +11140,7 @@ var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
|
11140
11140
|
]);
|
|
11141
11141
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
11142
11142
|
|
|
11143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11143
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/address-organization.js
|
|
11144
11144
|
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 ";
|
|
11145
11145
|
var idsOf2 = /* @__PURE__ */ __name((rows) => rows.map((row2) => Number(row2.id)), "idsOf");
|
|
11146
11146
|
var holdAddress = /* @__PURE__ */ __name(({ database, now: now2 }, organization2, email, { method, author }) => {
|
|
@@ -11165,7 +11165,7 @@ var organizationOfAddress = /* @__PURE__ */ __name((context, { name, email, meth
|
|
|
11165
11165
|
return id2;
|
|
11166
11166
|
}, "organizationOfAddress");
|
|
11167
11167
|
|
|
11168
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11168
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
11169
11169
|
var PHONE_PLANS = [
|
|
11170
11170
|
{
|
|
11171
11171
|
country: "us",
|
|
@@ -11545,7 +11545,7 @@ var PHONE_PLANS = [
|
|
|
11545
11545
|
}
|
|
11546
11546
|
];
|
|
11547
11547
|
|
|
11548
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
11549
11549
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
11550
11550
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
11551
11551
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -11620,10 +11620,10 @@ var storedPhone = /* @__PURE__ */ __name((raw, provider) => {
|
|
|
11620
11620
|
return found2 ? `+${found2[1]}` : void 0;
|
|
11621
11621
|
}, "storedPhone");
|
|
11622
11622
|
|
|
11623
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
11624
11624
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
11625
11625
|
|
|
11626
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11626
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/journal.js
|
|
11627
11627
|
import { existsSync, statSync } from "node:fs";
|
|
11628
11628
|
var watched = /* @__PURE__ */ new WeakMap();
|
|
11629
11629
|
var walInode = /* @__PURE__ */ __name((store) => statSync(`${store}-wal`, { throwIfNoEntry: false })?.ino, "walInode");
|
|
@@ -11649,7 +11649,7 @@ var checkJournal = /* @__PURE__ */ __name((database) => {
|
|
|
11649
11649
|
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" });
|
|
11650
11650
|
}, "checkJournal");
|
|
11651
11651
|
|
|
11652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/write-events.js
|
|
11653
11653
|
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;
|
|
11654
11654
|
var writeTarget = /* @__PURE__ */ __name((sql2) => {
|
|
11655
11655
|
const match = WRITE.exec(sql2);
|
|
@@ -11729,7 +11729,7 @@ var committedWrites = /* @__PURE__ */ __name((database) => {
|
|
|
11729
11729
|
}, "committedWrites");
|
|
11730
11730
|
var droppedWrites = /* @__PURE__ */ __name((database) => tallies.get(database)?.pending.clear(), "droppedWrites");
|
|
11731
11731
|
|
|
11732
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
11733
11733
|
var ARMS = [
|
|
11734
11734
|
[
|
|
11735
11735
|
"message",
|
|
@@ -11857,7 +11857,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
11857
11857
|
return recomputed;
|
|
11858
11858
|
}, "drainInvolvementQueue");
|
|
11859
11859
|
|
|
11860
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
11861
11861
|
import { domainToUnicode } from "node:url";
|
|
11862
11862
|
|
|
11863
11863
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -21879,7 +21879,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
21879
21879
|
}, "oa");
|
|
21880
21880
|
var na = { parse: O, get: aa, isValid: oa };
|
|
21881
21881
|
|
|
21882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
21883
21883
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
21884
21884
|
var ID = /^[\w-]{10,}$/;
|
|
21885
21885
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -21921,7 +21921,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text9) => [...text9.matchAll(L
|
|
|
21921
21921
|
return { url, documentId: googleDocumentId(url) };
|
|
21922
21922
|
}), "googleDocumentLinks");
|
|
21923
21923
|
|
|
21924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
21925
21925
|
var BEFORE = [
|
|
21926
21926
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
21927
21927
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -22181,7 +22181,7 @@ var findPlaces = /* @__PURE__ */ __name((text9) => {
|
|
|
22181
22181
|
return found2.sort((a, b) => a.start - b.start);
|
|
22182
22182
|
}, "findPlaces");
|
|
22183
22183
|
|
|
22184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22184
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
22185
22185
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
22186
22186
|
var MENTION_VERSIONS = {
|
|
22187
22187
|
phone: 1,
|
|
@@ -22357,7 +22357,7 @@ var exactlyOne = /* @__PURE__ */ __name((text9, options) => {
|
|
|
22357
22357
|
return one2 && one2.start === 0 && one2.end === text9.length ? one2.value : void 0;
|
|
22358
22358
|
}, "exactlyOne");
|
|
22359
22359
|
|
|
22360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
22361
22361
|
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";
|
|
22362
22362
|
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";
|
|
22363
22363
|
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";
|
|
@@ -22365,7 +22365,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
22365
22365
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
22366
22366
|
var NAME_WORDS = WORDS.split(" ");
|
|
22367
22367
|
|
|
22368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
22369
22369
|
var LATIN_TO_CYRILLIC = {
|
|
22370
22370
|
shch: "\u0449",
|
|
22371
22371
|
sch: "\u0449",
|
|
@@ -22573,7 +22573,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text9, stem, taken) => {
|
|
|
22573
22573
|
return found2;
|
|
22574
22574
|
}, "findUnknownNames");
|
|
22575
22575
|
|
|
22576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22576
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
22577
22577
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
22578
22578
|
"webpage",
|
|
22579
22579
|
"share",
|
|
@@ -22614,7 +22614,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
|
|
|
22614
22614
|
});
|
|
22615
22615
|
}, "matchDownloads");
|
|
22616
22616
|
|
|
22617
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22617
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
22618
22618
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
22619
22619
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
22620
22620
|
kind: "char",
|
|
@@ -23014,7 +23014,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
23014
23014
|
return out;
|
|
23015
23015
|
}, "foldRegex");
|
|
23016
23016
|
|
|
23017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
23018
23018
|
var PRESET_VERSION = 1;
|
|
23019
23019
|
var PRESETS = {
|
|
23020
23020
|
password: {
|
|
@@ -23068,12 +23068,12 @@ var PRESETS = {
|
|
|
23068
23068
|
}
|
|
23069
23069
|
};
|
|
23070
23070
|
|
|
23071
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
23072
23072
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
23073
23073
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
23074
23074
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
23075
23075
|
|
|
23076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
23077
23077
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
23078
23078
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
23079
23079
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -23097,7 +23097,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
23097
23097
|
};
|
|
23098
23098
|
}, "linkMatch");
|
|
23099
23099
|
|
|
23100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23100
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
23101
23101
|
var SETTING = "phoneCountries";
|
|
23102
23102
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
23103
23103
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -23128,7 +23128,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
23128
23128
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
23129
23129
|
}, "valueMatch");
|
|
23130
23130
|
|
|
23131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23131
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
23132
23132
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
23133
23133
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
23134
23134
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -23156,7 +23156,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
23156
23156
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
23157
23157
|
}, "vocabularySimilarity");
|
|
23158
23158
|
|
|
23159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
23160
23160
|
import { createHash } from "node:crypto";
|
|
23161
23161
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
23162
23162
|
try {
|
|
@@ -23222,7 +23222,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
23222
23222
|
});
|
|
23223
23223
|
}, "guardTagCreation");
|
|
23224
23224
|
|
|
23225
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
23226
23226
|
var invalid = /* @__PURE__ */ __name((message3) => {
|
|
23227
23227
|
throw new CliError("validation_error", message3);
|
|
23228
23228
|
}, "invalid");
|
|
@@ -23299,7 +23299,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
23299
23299
|
};
|
|
23300
23300
|
}, "createTagRedirectIndex");
|
|
23301
23301
|
|
|
23302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23302
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
23303
23303
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
23304
23304
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
23305
23305
|
if (!row2)
|
|
@@ -23327,7 +23327,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
23327
23327
|
return snapshot2;
|
|
23328
23328
|
}, "tagRedirectSnapshot");
|
|
23329
23329
|
|
|
23330
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
23331
23331
|
import { createHash as createHash2 } from "node:crypto";
|
|
23332
23332
|
var TASK_KEY_PREFIXES = {
|
|
23333
23333
|
question: "Q",
|
|
@@ -23355,7 +23355,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
23355
23355
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
23356
23356
|
}, "taskAccountOf");
|
|
23357
23357
|
|
|
23358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
23359
23359
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
23360
23360
|
var REFERABLE = {
|
|
23361
23361
|
...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
|
|
@@ -23519,7 +23519,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
23519
23519
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
23520
23520
|
}, "taskIdOf");
|
|
23521
23521
|
|
|
23522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
23523
23523
|
var toMs = /* @__PURE__ */ __name((iso17) => {
|
|
23524
23524
|
if (iso17 === null || iso17 === void 0)
|
|
23525
23525
|
return null;
|
|
@@ -23533,7 +23533,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
23533
23533
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
23534
23534
|
var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
23535
23535
|
|
|
23536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
23537
23537
|
var TAG_KINDS = ["tag", "topic"];
|
|
23538
23538
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
23539
23539
|
var TAG_TYPE = {
|
|
@@ -23736,7 +23736,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
23736
23736
|
return result;
|
|
23737
23737
|
}, "tagsOf");
|
|
23738
23738
|
|
|
23739
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23739
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/trigram-match.js
|
|
23740
23740
|
var MOST_YO_SPELLINGS = 64;
|
|
23741
23741
|
var yoSpellings = /* @__PURE__ */ __name((run) => {
|
|
23742
23742
|
let spellings2 = [""];
|
|
@@ -23758,7 +23758,7 @@ var anyCaseGlob = /* @__PURE__ */ __name((word2) => `*${[...word2.normalize("NFC
|
|
|
23758
23758
|
return forms2.size === 1 ? c : `[${[...forms2].join("")}]`;
|
|
23759
23759
|
}).join("")}*`, "anyCaseGlob");
|
|
23760
23760
|
|
|
23761
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
23762
23762
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
23763
23763
|
var SPEECH = speech("att");
|
|
23764
23764
|
var mentionText = /* @__PURE__ */ __name((alias2) => `CASE WHEN coalesce(json_extract(${alias2}.contact, '$.phone'), '') <> '' THEN 'phone: ' || json_extract(${alias2}.contact, '$.phone') ELSE ${alias2}.text END`, "mentionText");
|
|
@@ -24246,7 +24246,7 @@ var FIELD_COMPILERS = {
|
|
|
24246
24246
|
subject
|
|
24247
24247
|
};
|
|
24248
24248
|
|
|
24249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
24250
24250
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
24251
24251
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
24252
24252
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -24262,7 +24262,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
24262
24262
|
};
|
|
24263
24263
|
}, "placeOf");
|
|
24264
24264
|
|
|
24265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
24266
24266
|
var DRAIN_ON_WRITE = 500;
|
|
24267
24267
|
var METHOD = "rules";
|
|
24268
24268
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -24428,7 +24428,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
24428
24428
|
return queued.length;
|
|
24429
24429
|
}, "drainMentions");
|
|
24430
24430
|
|
|
24431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24431
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
24432
24432
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
24433
24433
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
24434
24434
|
if (!exists2)
|
|
@@ -24436,7 +24436,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
24436
24436
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
24437
24437
|
}, "indexRow");
|
|
24438
24438
|
|
|
24439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
24440
24440
|
var INDEX = "message_stems";
|
|
24441
24441
|
var SETTING2 = "searchStemmers";
|
|
24442
24442
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -24562,7 +24562,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
24562
24562
|
};
|
|
24563
24563
|
}, "stemmerCache");
|
|
24564
24564
|
|
|
24565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24565
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
24566
24566
|
var rehearsal = new AsyncLocalStorage();
|
|
24567
24567
|
var SQLITE_BUSY = 5;
|
|
24568
24568
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
@@ -24705,7 +24705,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
24705
24705
|
}
|
|
24706
24706
|
}, "read");
|
|
24707
24707
|
|
|
24708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
24709
24709
|
var FOLDED = [
|
|
24710
24710
|
{ table: "tasks", column: "title" },
|
|
24711
24711
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -24742,7 +24742,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
24742
24742
|
return filled;
|
|
24743
24743
|
}, "fillFolded");
|
|
24744
24744
|
|
|
24745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24745
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
24746
24746
|
import { createHash as createHash3 } from "node:crypto";
|
|
24747
24747
|
var CHUNK_CHARS = 1200;
|
|
24748
24748
|
var CHUNK_OVERLAP = 150;
|
|
@@ -24847,7 +24847,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
24847
24847
|
return chunks2;
|
|
24848
24848
|
}, "cutChunks");
|
|
24849
24849
|
|
|
24850
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24850
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
24851
24851
|
var DAY2 = 864e5;
|
|
24852
24852
|
var CURRENCY = [
|
|
24853
24853
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -24973,7 +24973,7 @@ var dueDayOf = /* @__PURE__ */ __name((text9, createdMs) => {
|
|
|
24973
24973
|
return best?.day ?? null;
|
|
24974
24974
|
}, "dueDayOf");
|
|
24975
24975
|
|
|
24976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
24977
24977
|
var DAY3 = 864e5;
|
|
24978
24978
|
var STOP_WORDS = new Set([
|
|
24979
24979
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -25128,7 +25128,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
25128
25128
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
25129
25129
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
25130
25130
|
|
|
25131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25131
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
25132
25132
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
25133
25133
|
coalesce(CASE k.chunkable_type
|
|
25134
25134
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -25270,7 +25270,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
25270
25270
|
}, "dropUnusedVectors");
|
|
25271
25271
|
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");
|
|
25272
25272
|
|
|
25273
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25273
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
25274
25274
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
25275
25275
|
r.last_message_id, r.text_start, r.text_end FROM conversations c
|
|
25276
25276
|
CROSS JOIN chunks k ON k.chunkable_type = 'conversation' AND k.chunkable_id = c.id
|
|
@@ -25308,14 +25308,18 @@ var chunkFreshness = /* @__PURE__ */ __name(({ orm }, { conversationPk, firstMes
|
|
|
25308
25308
|
}, "chunkFreshness");
|
|
25309
25309
|
var purgeVectorHashes = /* @__PURE__ */ __name((context, hashes) => {
|
|
25310
25310
|
const { orm } = context;
|
|
25311
|
-
|
|
25311
|
+
const unique2 = new Set(hashes);
|
|
25312
|
+
if (unique2.size === 0)
|
|
25313
|
+
return;
|
|
25314
|
+
const models = orm.all(sql`SELECT DISTINCT model FROM embeddings`).map(({ model }) => model);
|
|
25315
|
+
for (const hash2 of unique2) {
|
|
25312
25316
|
let offset = 0;
|
|
25313
25317
|
let valid = false;
|
|
25314
25318
|
for (; ; ) {
|
|
25315
25319
|
const candidates = orm.all(sql`SELECT k.chunkable_id AS conversation, r.first_message_id AS first,
|
|
25316
25320
|
r.last_message_id AS last, r.text_start AS start, r.text_end AS end
|
|
25317
25321
|
FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
25318
|
-
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
25322
|
+
JOIN conversations c ON +k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
25319
25323
|
JOIN conversation_state s ON s.chat_id = c.chat_id AND s.current_build = c.build
|
|
25320
25324
|
WHERE k.content_hash = ${hash2} ORDER BY k.chunkable_id, k.position LIMIT 100 OFFSET ${offset}`);
|
|
25321
25325
|
valid = candidates.some(({ conversation: conversation2, first, last, start, end }) => {
|
|
@@ -25331,8 +25335,9 @@ var purgeVectorHashes = /* @__PURE__ */ __name((context, hashes) => {
|
|
|
25331
25335
|
}
|
|
25332
25336
|
}
|
|
25333
25337
|
if (!valid)
|
|
25334
|
-
|
|
25335
|
-
|
|
25338
|
+
for (const model of models)
|
|
25339
|
+
orm.run(sql`DELETE FROM embeddings WHERE model = ${model} AND content_hash = ${hash2}
|
|
25340
|
+
AND NOT EXISTS (SELECT 1 FROM chunks WHERE content_hash = ${hash2} AND chunkable_type <> 'conversation')`);
|
|
25336
25341
|
}
|
|
25337
25342
|
}, "purgeVectorHashes");
|
|
25338
25343
|
var purgeVectorsOf = /* @__PURE__ */ __name((context, messagePk) => {
|
|
@@ -25402,7 +25407,7 @@ var dot = /* @__PURE__ */ __name((query, blob2) => {
|
|
|
25402
25407
|
}, "dot");
|
|
25403
25408
|
var nearestChunks = /* @__PURE__ */ __name((context, accountPk2, filter) => {
|
|
25404
25409
|
const { orm } = context;
|
|
25405
|
-
const { chatKey, model, since, limit, query, exclude, conversations: conversations2, scope: scope3, projectId: projectId2, before: before2, personId } = filter;
|
|
25410
|
+
const { chatKey, model, since, limit, query, exclude, conversations: conversations2, scope: scope3, projectId: projectId2, before: before2, personId, fromOwner } = filter;
|
|
25406
25411
|
const rows = /* @__PURE__ */ __name((page3) => orm.all(
|
|
25407
25412
|
// CROSS JOIN keeps the chunks first, so each page walks their key; led by the vectors, SQLite re-read and
|
|
25408
25413
|
// sorted every one of them per page — 1.3 s against 140 ms at 42k chunks (bench/embeddings/README.md).
|
|
@@ -25418,6 +25423,7 @@ var nearestChunks = /* @__PURE__ */ __name((context, accountPk2, filter) => {
|
|
|
25418
25423
|
${projectId2 === void 0 ? sql`` : sql`AND k.project_id=${projectId2}`}
|
|
25419
25424
|
${before2 === void 0 ? sql`` : sql`AND k.occurred_at < ${before2}`}
|
|
25420
25425
|
${personId === void 0 ? sql`` : sql`AND EXISTS (SELECT 1 FROM conversation_messages pcm JOIN messages pm ON pm.id=pcm.message_id JOIN identity_links pil ON pil.identity_id=pm.sender_identity_id WHERE pcm.conversation_id=c.id AND pil.person_id=${personId})`}
|
|
25426
|
+
${fromOwner ? sql`AND EXISTS (SELECT 1 FROM conversation_messages om JOIN messages m ON m.id = om.message_id WHERE om.conversation_id = c.id AND m.outgoing = 1 AND m.id BETWEEN r.first_message_id AND r.last_message_id)` : sql``}
|
|
25421
25427
|
${chatKey === void 0 ? sql`AND ch.searchable = 1` : sql`AND c.chat_id = ${chatKey}`}
|
|
25422
25428
|
${since === void 0 ? sql`` : sql`AND k.occurred_at >= ${since}`}
|
|
25423
25429
|
${exclude === void 0 ? sql`` : sql`AND c.id <> ${exclude}`}
|
|
@@ -25444,7 +25450,7 @@ var nearestChunks = /* @__PURE__ */ __name((context, accountPk2, filter) => {
|
|
|
25444
25450
|
}, "keepBest");
|
|
25445
25451
|
const ranked = /* @__PURE__ */ __name((found2) => found2.sort((a, b) => b.score - a.score).slice(0, limit), "ranked");
|
|
25446
25452
|
const plain2 = /* @__PURE__ */ __name((found2) => found2.map(({ id: _, ...chunk }) => chunk), "plain");
|
|
25447
|
-
const indexable = personId === void 0 && projectId2 === void 0 && scope3 === void 0 && conversations2 === void 0;
|
|
25453
|
+
const indexable = personId === void 0 && projectId2 === void 0 && scope3 === void 0 && conversations2 === void 0 && !fromOwner;
|
|
25448
25454
|
const indexed = indexable && searchIndex(context.database, model, {
|
|
25449
25455
|
kind: "conversation",
|
|
25450
25456
|
account: accountPk2,
|
|
@@ -25462,6 +25468,21 @@ var nearestChunks = /* @__PURE__ */ __name((context, accountPk2, filter) => {
|
|
|
25462
25468
|
});
|
|
25463
25469
|
if (indexed)
|
|
25464
25470
|
return plain2(indexed);
|
|
25471
|
+
if (fromOwner) {
|
|
25472
|
+
const ids3 = orm.all(sql`SELECT DISTINCT k.id FROM messages m
|
|
25473
|
+
JOIN conversation_messages om ON om.message_id = m.id
|
|
25474
|
+
JOIN conversations c ON c.id = om.conversation_id
|
|
25475
|
+
JOIN conversation_state s ON s.chat_id = c.chat_id AND s.current_build = c.build
|
|
25476
|
+
JOIN chats ch ON ch.id = c.chat_id
|
|
25477
|
+
JOIN chunks k ON k.chunkable_type = 'conversation' AND k.chunkable_id = c.id
|
|
25478
|
+
JOIN chunk_messages r ON r.chunk_id = k.id AND m.id BETWEEN r.first_message_id AND r.last_message_id
|
|
25479
|
+
WHERE m.outgoing = 1 AND ch.account_id = ${accountPk2}
|
|
25480
|
+
${chatKey === void 0 ? sql`AND ch.searchable = 1` : sql`AND c.chat_id = ${chatKey}`}`).map(({ id: id2 }) => id2);
|
|
25481
|
+
const best2 = /* @__PURE__ */ new Map();
|
|
25482
|
+
for (const row2 of rows({ ids: ids3 }))
|
|
25483
|
+
keepBest(best2, row2);
|
|
25484
|
+
return plain2(ranked([...best2.values()]));
|
|
25485
|
+
}
|
|
25465
25486
|
const best = /* @__PURE__ */ new Map();
|
|
25466
25487
|
let after2 = { conversation: 0, ordinal: -1 };
|
|
25467
25488
|
for (; ; ) {
|
|
@@ -25594,7 +25615,7 @@ var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.ma
|
|
|
25594
25615
|
Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
|
|
25595
25616
|
])), "vectorCounts");
|
|
25596
25617
|
|
|
25597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25618
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
25598
25619
|
var DOCUMENT_PICTURE = "document_picture";
|
|
25599
25620
|
var SCAN_PAGE2 = 5e3;
|
|
25600
25621
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -25657,12 +25678,12 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
25657
25678
|
}, "nearestPictures")
|
|
25658
25679
|
}), "documentPicturesOver");
|
|
25659
25680
|
|
|
25660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25681
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
|
|
25661
25682
|
var noteIndexText = /* @__PURE__ */ __name((title2, text9) => title2 ? `${title2}
|
|
25662
25683
|
|
|
25663
25684
|
${text9}` : text9, "noteIndexText");
|
|
25664
25685
|
|
|
25665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
|
|
25666
25687
|
var ENRICHMENT_SUBJECTS = ["document", "note", "email"];
|
|
25667
25688
|
var ENRICHMENT_POSITION = 1e6;
|
|
25668
25689
|
var EMAIL_ENRICHMENT = "email_enrichment";
|
|
@@ -25756,7 +25777,7 @@ var enrichmentsOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
|
25756
25777
|
}), "clear")
|
|
25757
25778
|
}), "enrichmentsOver");
|
|
25758
25779
|
|
|
25759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
25760
25781
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
25761
25782
|
const literal5 = escaped2 ?? plain2 ?? "";
|
|
25762
25783
|
return wildcard ?? (/[*?[]/u.test(literal5) ? `[${literal5}]` : literal5);
|
|
@@ -25832,7 +25853,7 @@ var compile = /* @__PURE__ */ __name((node, columns2, options) => {
|
|
|
25832
25853
|
var queryFilter = /* @__PURE__ */ __name((ast, columns2, options) => compile(ast.root, columns2, options), "queryFilter");
|
|
25833
25854
|
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");
|
|
25834
25855
|
|
|
25835
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
25836
25857
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
25837
25858
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
25838
25859
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -25922,7 +25943,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
25922
25943
|
});
|
|
25923
25944
|
}, "linkMeeting");
|
|
25924
25945
|
|
|
25925
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/task-titles.js
|
|
25926
25947
|
var MAX_TITLE = 120;
|
|
25927
25948
|
var placeholderTitleOf = /* @__PURE__ */ __name((row2) => `${String(row2.type)} \u2014 ${String(row2.source_locator ?? "")}`, "placeholderTitleOf");
|
|
25928
25949
|
var PLACEHOLDER_TITLE_SQL = "title = type || ' \u2014 ' || coalesce(source_locator, '')";
|
|
@@ -25984,7 +26005,7 @@ var fillFoundTaskTitles = /* @__PURE__ */ __name((database, warn, { batch = 500
|
|
|
25984
26005
|
}
|
|
25985
26006
|
}, "fillFoundTaskTitles");
|
|
25986
26007
|
|
|
25987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
25988
26009
|
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), ''))";
|
|
25989
26010
|
var UNSEARCHED_EVENT_TYPES = [
|
|
25990
26011
|
"working-location",
|
|
@@ -26231,7 +26252,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
26231
26252
|
return true;
|
|
26232
26253
|
}, "resetNoteIndex");
|
|
26233
26254
|
|
|
26234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26255
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
26235
26256
|
var keyOf2 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
26236
26257
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
26237
26258
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf2))) {
|
|
@@ -26250,7 +26271,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
26250
26271
|
}
|
|
26251
26272
|
}, "resolvePersonLinks");
|
|
26252
26273
|
|
|
26253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26274
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
26254
26275
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
26255
26276
|
id: integer("id").primaryKey(),
|
|
26256
26277
|
name: text("name").notNull().unique(),
|
|
@@ -26259,7 +26280,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
26259
26280
|
updatedAt: integer("updated_at").notNull()
|
|
26260
26281
|
});
|
|
26261
26282
|
|
|
26262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
|
|
26263
26284
|
var linkRevisions = sqliteTable("link_revisions", {
|
|
26264
26285
|
id: integer("id").primaryKey(),
|
|
26265
26286
|
linkId: integer("link_id").notNull(),
|
|
@@ -26271,7 +26292,7 @@ var linkRevisions = sqliteTable("link_revisions", {
|
|
|
26271
26292
|
createdAt: integer("created_at").notNull()
|
|
26272
26293
|
}, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
|
|
26273
26294
|
|
|
26274
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
26275
26296
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
26276
26297
|
sourceKey: text("source_key").notNull(),
|
|
26277
26298
|
collection: text("collection").notNull(),
|
|
@@ -26281,13 +26302,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
26281
26302
|
createdAt: integer("created_at").notNull()
|
|
26282
26303
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
26283
26304
|
|
|
26284
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
26285
26306
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
26286
26307
|
id: integer("id").notNull(),
|
|
26287
26308
|
indexableType: text("indexable_type").notNull()
|
|
26288
26309
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
26289
26310
|
|
|
26290
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
26291
26312
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
26292
26313
|
id: integer("id").primaryKey(),
|
|
26293
26314
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -26307,7 +26328,7 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
26307
26328
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
26308
26329
|
]);
|
|
26309
26330
|
|
|
26310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26331
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
|
|
26311
26332
|
var enrichments = sqliteTable("enrichments", {
|
|
26312
26333
|
subjectType: text("subject_type").notNull(),
|
|
26313
26334
|
subjectId: integer("subject_id").notNull(),
|
|
@@ -26319,7 +26340,7 @@ var enrichments = sqliteTable("enrichments", {
|
|
|
26319
26340
|
createdAt: integer("created_at").notNull()
|
|
26320
26341
|
}, (table) => [primaryKey({ columns: [table.subjectType, table.subjectId] })]);
|
|
26321
26342
|
|
|
26322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26343
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/templates.js
|
|
26323
26344
|
var templates = sqliteTable("templates", {
|
|
26324
26345
|
key: text("key").notNull(),
|
|
26325
26346
|
channel: text("channel").notNull(),
|
|
@@ -26341,7 +26362,7 @@ var templatesHistory = sqliteTable("templates_history", {
|
|
|
26341
26362
|
index("templates_history_by_key_channel_language_id").on(table.key, table.channel, table.language, table.id)
|
|
26342
26363
|
]);
|
|
26343
26364
|
|
|
26344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
|
|
26345
26366
|
var links = sqliteTable("links", {
|
|
26346
26367
|
id: integer("id").primaryKey(),
|
|
26347
26368
|
fromType: text("from_type").notNull(),
|
|
@@ -26372,7 +26393,7 @@ var links = sqliteTable("links", {
|
|
|
26372
26393
|
index("links_by_to_type_to_id").on(table.toType, table.toId)
|
|
26373
26394
|
]);
|
|
26374
26395
|
|
|
26375
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
26376
26397
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
26377
26398
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
26378
26399
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -26398,7 +26419,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
26398
26419
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
26399
26420
|
]);
|
|
26400
26421
|
|
|
26401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26422
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
26402
26423
|
var accounts = sqliteTable("accounts", {
|
|
26403
26424
|
id: integer("id").primaryKey(),
|
|
26404
26425
|
provider: text("provider").notNull(),
|
|
@@ -28481,7 +28502,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
28481
28502
|
at: integer("at").notNull()
|
|
28482
28503
|
});
|
|
28483
28504
|
|
|
28484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
28485
28506
|
var contactsOf = /* @__PURE__ */ __name(({ phones: phones2, emails: emails3 }) => {
|
|
28486
28507
|
if (phones2 === void 0 && emails3 === void 0)
|
|
28487
28508
|
return void 0;
|
|
@@ -28727,7 +28748,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
28727
28748
|
}, "meetingIdentityPk");
|
|
28728
28749
|
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");
|
|
28729
28750
|
|
|
28730
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
28731
28752
|
var TAKES = {
|
|
28732
28753
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
28733
28754
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -28787,7 +28808,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference2, scope3, profilesOn
|
|
|
28787
28808
|
throw wrongAccount(reference2, scope3, profiles);
|
|
28788
28809
|
}, "ensureAccount");
|
|
28789
28810
|
|
|
28790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28811
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
28791
28812
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
28792
28813
|
const padded = ` ${term} `;
|
|
28793
28814
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -28796,7 +28817,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
28796
28817
|
return [...pieces];
|
|
28797
28818
|
}, "trigrams");
|
|
28798
28819
|
|
|
28799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
28800
28821
|
var isId = /* @__PURE__ */ __name((reference2) => /^-?\d+$/.test(reference2.trim()), "isId");
|
|
28801
28822
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
|
|
28802
28823
|
var pickChat = /* @__PURE__ */ __name((reference2, chats2) => {
|
|
@@ -28867,7 +28888,7 @@ ${lines}`, { candidates });
|
|
|
28867
28888
|
}, "ambiguous");
|
|
28868
28889
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
28869
28890
|
|
|
28870
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/display-names.js
|
|
28871
28892
|
var QUOTES = [
|
|
28872
28893
|
['"', '"'],
|
|
28873
28894
|
["'", "'"],
|
|
@@ -28925,7 +28946,7 @@ var nameKey = /* @__PURE__ */ __name((name) => {
|
|
|
28925
28946
|
}, "nameKey");
|
|
28926
28947
|
var isReadable = /* @__PURE__ */ __name((shown2) => shown2 !== null && READABLE.test(shown2), "isReadable");
|
|
28927
28948
|
|
|
28928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28949
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
28929
28950
|
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");
|
|
28930
28951
|
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
28931
28952
|
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
@@ -28940,7 +28961,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
|
28940
28961
|
var separated = /* @__PURE__ */ __name((context, one2, other) => one2 !== other && apart(context, { identities: identitiesOf(context, one2), person: one2 }, { identities: identitiesOf(context, other), person: other }), "separated");
|
|
28941
28962
|
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
28942
28963
|
|
|
28943
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
28944
28965
|
var MESSAGE_FIELDS = {
|
|
28945
28966
|
pk: messages.id,
|
|
28946
28967
|
nativeId: messages.externalId,
|
|
@@ -29120,7 +29141,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
29120
29141
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
29121
29142
|
}), "chatActivity");
|
|
29122
29143
|
|
|
29123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29144
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
29124
29145
|
var HIT_FIELDS = {
|
|
29125
29146
|
...MESSAGE_FIELDS,
|
|
29126
29147
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -29221,7 +29242,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
29221
29242
|
};
|
|
29222
29243
|
}, "directReplies");
|
|
29223
29244
|
|
|
29224
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29245
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
29225
29246
|
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");
|
|
29226
29247
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
29227
29248
|
const found2 = identityRow(context, ref3);
|
|
@@ -29434,7 +29455,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
29434
29455
|
}, "mentioning");
|
|
29435
29456
|
var escaped = /* @__PURE__ */ __name((text9) => text9.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
29436
29457
|
|
|
29437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29458
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
29438
29459
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
29439
29460
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
29440
29461
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -29491,7 +29512,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
29491
29512
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
29492
29513
|
}, "proposedBySql");
|
|
29493
29514
|
|
|
29494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
|
|
29495
29516
|
var TABLES = { memory: "memories", fact: "facts" };
|
|
29496
29517
|
var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
|
|
29497
29518
|
var KEPT = 20;
|
|
@@ -29586,7 +29607,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
|
|
|
29586
29607
|
return scrubbed;
|
|
29587
29608
|
}, "scrubSourceReviews");
|
|
29588
29609
|
|
|
29589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
|
|
29590
29611
|
var QUOTE_LIMIT = 500;
|
|
29591
29612
|
var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
|
|
29592
29613
|
var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
|
|
@@ -29865,11 +29886,11 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at2) => {
|
|
|
29865
29886
|
database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
|
|
29866
29887
|
}, "deleteDocumentRow");
|
|
29867
29888
|
|
|
29868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29889
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
29869
29890
|
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");
|
|
29870
29891
|
var oneLine = /* @__PURE__ */ __name((text9) => singleLine(text9.replace(/\s+/g, " ").trim()), "oneLine");
|
|
29871
29892
|
|
|
29872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-accounts.js
|
|
29873
29894
|
var accountKeys = /* @__PURE__ */ __name((database, ids3) => {
|
|
29874
29895
|
const unique2 = [...new Set(ids3)];
|
|
29875
29896
|
if (unique2.length === 0)
|
|
@@ -29958,7 +29979,7 @@ var refEndsOf = /* @__PURE__ */ __name((database, text9) => {
|
|
|
29958
29979
|
}, "refEndsOf");
|
|
29959
29980
|
var refAccountsOf = /* @__PURE__ */ __name((database, text9) => refEndsOf(database, text9)?.flat(), "refAccountsOf");
|
|
29960
29981
|
|
|
29961
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29982
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
29962
29983
|
var EXCERPT_CHARS = 280;
|
|
29963
29984
|
var TITLE_CHARS = 120;
|
|
29964
29985
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -30382,7 +30403,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
30382
30403
|
ends: /* @__PURE__ */ __name(async (text9) => refEndsOf(context.database, text9), "ends")
|
|
30383
30404
|
}), "refsStoreOver");
|
|
30384
30405
|
|
|
30385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
30386
30407
|
var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
|
|
30387
30408
|
ref: ref3,
|
|
30388
30409
|
kind: read2.kind,
|
|
@@ -30420,7 +30441,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
30420
30441
|
});
|
|
30421
30442
|
}, "evidenceSourcesOf");
|
|
30422
30443
|
|
|
30423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
30424
30445
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
30425
30446
|
var MAX_TEXT_CHARS = 2e6;
|
|
30426
30447
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -30446,7 +30467,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
30446
30467
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
30447
30468
|
}, "pdfPreviewLimits");
|
|
30448
30469
|
|
|
30449
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30470
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
30450
30471
|
import { randomBytes } from "node:crypto";
|
|
30451
30472
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
30452
30473
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -30459,7 +30480,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
30459
30480
|
return time3 + random;
|
|
30460
30481
|
}, "ulid");
|
|
30461
30482
|
|
|
30462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
30463
30484
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
30464
30485
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
30465
30486
|
if (!meta && !sections?.length)
|
|
@@ -30480,11 +30501,11 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
30480
30501
|
return typeof language === "string" && language !== "" ? language : null;
|
|
30481
30502
|
}, "languageOf");
|
|
30482
30503
|
|
|
30483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/file-note.js
|
|
30484
30505
|
var LIVE3 = "f.deleted_at IS NULL AND d.deleted_at IS NULL AND coalesce(json_extract(d.metadata, '$.catalog.active'), 1)=1";
|
|
30485
30506
|
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");
|
|
30486
30507
|
|
|
30487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
30488
30509
|
var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
30489
30510
|
var objectOf2 = /* @__PURE__ */ __name((value) => {
|
|
30490
30511
|
if (isObject2(value))
|
|
@@ -30731,7 +30752,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
30731
30752
|
};
|
|
30732
30753
|
}, "filesStoreOver");
|
|
30733
30754
|
|
|
30734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
30735
30756
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
30736
30757
|
entity: "document",
|
|
30737
30758
|
backend: "sql",
|
|
@@ -30777,7 +30798,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
30777
30798
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns2, { zone: timezoneOf() });
|
|
30778
30799
|
}, "importedDocumentWhere");
|
|
30779
30800
|
|
|
30780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
30781
30802
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
30782
30803
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
30783
30804
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -30785,7 +30806,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
30785
30806
|
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);
|
|
30786
30807
|
}, "reviewLink");
|
|
30787
30808
|
|
|
30788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/link-row.js
|
|
30789
30810
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
30790
30811
|
var thingRef = /* @__PURE__ */ __name((database, type, id2) => type == null || id2 == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? null, "thingRef");
|
|
30791
30812
|
var hasBothEnds = /* @__PURE__ */ __name((link3) => link3.from !== null && link3.to !== null, "hasBothEnds");
|
|
@@ -30819,7 +30840,7 @@ var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
|
30819
30840
|
};
|
|
30820
30841
|
}, "linkOf");
|
|
30821
30842
|
|
|
30822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30843
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
30823
30844
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
30824
30845
|
const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
|
|
30825
30846
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -30840,7 +30861,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
30840
30861
|
return changed;
|
|
30841
30862
|
}, "dateFileNotes");
|
|
30842
30863
|
|
|
30843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
30844
30865
|
var textOf2 = /* @__PURE__ */ __name((text9, what, max = 1e5, allowEmpty = false) => {
|
|
30845
30866
|
const value = text9.trim();
|
|
30846
30867
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -30853,7 +30874,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
30853
30874
|
return value;
|
|
30854
30875
|
}, "oneOf");
|
|
30855
30876
|
|
|
30856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
30857
30878
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
30858
30879
|
var RELATIONSHIPS = RELATION_KINDS.map(linkKind).join(", ");
|
|
30859
30880
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31375,10 +31396,10 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31375
31396
|
};
|
|
31376
31397
|
}, "notesStoreOver");
|
|
31377
31398
|
|
|
31378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31399
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/rows-page.js
|
|
31379
31400
|
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");
|
|
31380
31401
|
|
|
31381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
31382
31403
|
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";
|
|
31383
31404
|
var iso5 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
31384
31405
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -31643,7 +31664,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31643
31664
|
};
|
|
31644
31665
|
}, "memoriesStoreOver");
|
|
31645
31666
|
|
|
31646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31667
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
31647
31668
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
31648
31669
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
31649
31670
|
throw new CliError(code, message3, { reason });
|
|
@@ -31791,7 +31812,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
31791
31812
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly: ownerOnly2, linkedId, ...decisionsOver(context) };
|
|
31792
31813
|
}, "reviewedRowsOver");
|
|
31793
31814
|
|
|
31794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31815
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
31795
31816
|
var MAX_LINES = 500;
|
|
31796
31817
|
var PARENTS = {
|
|
31797
31818
|
invoice: {
|
|
@@ -31891,7 +31912,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
31891
31912
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
31892
31913
|
}, "moneyLinesOver");
|
|
31893
31914
|
|
|
31894
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31915
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
31895
31916
|
var COUNTED = {
|
|
31896
31917
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
31897
31918
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -31966,7 +31987,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
31966
31987
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
31967
31988
|
}, "refundRulesOver");
|
|
31968
31989
|
|
|
31969
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
31970
31991
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
31971
31992
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
31972
31993
|
var PAID = netPaidSql("i.id");
|
|
@@ -32370,7 +32391,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32370
32391
|
};
|
|
32371
32392
|
}, "financeStoreOver");
|
|
32372
32393
|
|
|
32373
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32394
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
32374
32395
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
32375
32396
|
throw new CliError("validation_error", message3, { reason });
|
|
32376
32397
|
}, "refuse");
|
|
@@ -32448,7 +32469,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
32448
32469
|
};
|
|
32449
32470
|
}, "paymentEntriesOver");
|
|
32450
32471
|
|
|
32451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
32452
32473
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
32453
32474
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
32454
32475
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -32475,7 +32496,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
32475
32496
|
return valid;
|
|
32476
32497
|
}, "validateEvidenceFindings");
|
|
32477
32498
|
|
|
32478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
32479
32500
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
32480
32501
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
32481
32502
|
var iso7 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -32669,7 +32690,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32669
32690
|
};
|
|
32670
32691
|
}, "proposedActionsStoreOver");
|
|
32671
32692
|
|
|
32672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32693
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-proposals.js
|
|
32673
32694
|
var CONFIRMED = "proposal";
|
|
32674
32695
|
var refOf = /* @__PURE__ */ __name(({ database }, pk) => {
|
|
32675
32696
|
const row2 = database.prepare("SELECT provider, external_id FROM identities WHERE id = ?").get(pk);
|
|
@@ -33021,7 +33042,7 @@ var identityLinkRows = /* @__PURE__ */ __name((context, { person: person2, statu
|
|
|
33021
33042
|
return { items, hasMore: rows.length > limit };
|
|
33022
33043
|
}, "identityLinkRows");
|
|
33023
33044
|
|
|
33024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/person-merges.js
|
|
33025
33046
|
var mergeId = /* @__PURE__ */ __name((to, from2) => `merge:${to}-${from2}`, "mergeId");
|
|
33026
33047
|
var parseMergeId = /* @__PURE__ */ __name((id2) => {
|
|
33027
33048
|
const found2 = /^merge:([1-9]\d*)-([1-9]\d*)$/.exec(id2.trim());
|
|
@@ -33124,7 +33145,7 @@ var split = /* @__PURE__ */ __name((context, uid, refs, by) => {
|
|
|
33124
33145
|
return recordOf(context, alone);
|
|
33125
33146
|
}, "split");
|
|
33126
33147
|
|
|
33127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-split-proposals.js
|
|
33128
33149
|
var refOf2 = /* @__PURE__ */ __name(({ provider, id: id2 }) => `${provider}:${id2}`, "refOf");
|
|
33129
33150
|
var keyOf3 = /* @__PURE__ */ __name((split2, person2, identities2) => `${split2} ${person2} ${[...identities2].sort().join(" ")}`, "keyOf");
|
|
33130
33151
|
var planOf = /* @__PURE__ */ __name((context, input) => {
|
|
@@ -33301,7 +33322,7 @@ var forgetErasedSplits = /* @__PURE__ */ __name((database) => {
|
|
|
33301
33322
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
33302
33323
|
}, "forgetErasedSplits");
|
|
33303
33324
|
|
|
33304
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/test-data.js
|
|
33305
33326
|
var SEED_PEOPLE = [
|
|
33306
33327
|
{ name: "Owner", username: "owner" },
|
|
33307
33328
|
{ name: "Ann Lee", username: "ann" },
|
|
@@ -33318,7 +33339,7 @@ var RESERVED_ADDRESS_GLOBS = [
|
|
|
33318
33339
|
];
|
|
33319
33340
|
var SEED_ID_GLOBS = ["person-[0-9]*"];
|
|
33320
33341
|
|
|
33321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33342
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/test-people.js
|
|
33322
33343
|
var TEST_DATA_KIND = "test_data";
|
|
33323
33344
|
var globs = /* @__PURE__ */ __name((column2, patterns) => patterns.map((pattern) => `${column2} GLOB '${pattern}'`).join(" OR "), "globs");
|
|
33324
33345
|
var SURE = `(${globs("i.external_id", SEED_ID_GLOBS)} OR ${globs("lower(i.email)", RESERVED_ADDRESS_GLOBS)})`;
|
|
@@ -33387,7 +33408,7 @@ var forgetErasedTestData = /* @__PURE__ */ __name((database) => {
|
|
|
33387
33408
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
33388
33409
|
}, "forgetErasedTestData");
|
|
33389
33410
|
|
|
33390
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
33391
33412
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null, startScope) => Number(orm.insert(accounts).values({
|
|
33392
33413
|
provider,
|
|
33393
33414
|
externalId: account,
|
|
@@ -33481,7 +33502,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
33481
33502
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
33482
33503
|
}, "dropOrphanPeople");
|
|
33483
33504
|
|
|
33484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
33485
33506
|
var HISTORY_KEY = "$history";
|
|
33486
33507
|
var objectOf3 = /* @__PURE__ */ __name((text9) => {
|
|
33487
33508
|
if (typeof text9 !== "string")
|
|
@@ -33557,7 +33578,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
33557
33578
|
return rest;
|
|
33558
33579
|
}, "withoutHistory");
|
|
33559
33580
|
|
|
33560
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33581
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
33561
33582
|
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");
|
|
33562
33583
|
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");
|
|
33563
33584
|
var setChatScope = /* @__PURE__ */ __name((context, accountKey, chatId, scope3) => {
|
|
@@ -33855,7 +33876,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
33855
33876
|
}
|
|
33856
33877
|
}, "replaceAutoTags");
|
|
33857
33878
|
|
|
33858
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
33859
33880
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
33860
33881
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
33861
33882
|
var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
|
|
@@ -33874,7 +33895,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
33874
33895
|
return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
|
|
33875
33896
|
}, "counterFreshness");
|
|
33876
33897
|
|
|
33877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33898
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-tokens.js
|
|
33878
33899
|
var BOT_TOKEN = /(?<!\d)(\d{6,12}):[A-Za-z0-9_-]{30,40}(?![A-Za-z0-9_-])/g;
|
|
33879
33900
|
var MAY_HOLD = "*[0-9][0-9][0-9][0-9][0-9][0-9]:*";
|
|
33880
33901
|
var MASKED_THROUGH = "bot_tokens_masked_through";
|
|
@@ -33914,7 +33935,7 @@ var maskStoredBotTokens = /* @__PURE__ */ __name((context) => {
|
|
|
33914
33935
|
}, "maskStoredBotTokens");
|
|
33915
33936
|
var masks = /* @__PURE__ */ __name((value) => value != null && withoutBotTokens(String(value)) !== value, "masks");
|
|
33916
33937
|
|
|
33917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
33918
33939
|
import { createHash as createHash4 } from "node:crypto";
|
|
33919
33940
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
33920
33941
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -34012,7 +34033,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
34012
34033
|
return { source: source2, query, chat: chat2, senders, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
34013
34034
|
}, "contextEvidenceRequest");
|
|
34014
34035
|
|
|
34015
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
34016
34037
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
34017
34038
|
var ACTIVITY = `
|
|
34018
34039
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -34142,7 +34163,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
34142
34163
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
34143
34164
|
}), "mailActivity");
|
|
34144
34165
|
|
|
34145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
34146
34167
|
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");
|
|
34147
34168
|
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;
|
|
34148
34169
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -34223,7 +34244,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
34223
34244
|
return withoutSignOff(withoutGreeting(kept2)).join("\n").trim();
|
|
34224
34245
|
}, "mailCore");
|
|
34225
34246
|
|
|
34226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34247
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
34227
34248
|
var titleOf2 = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
34228
34249
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
34229
34250
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
@@ -34336,7 +34357,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
34336
34357
|
return emails3 + threads;
|
|
34337
34358
|
}, "drainEmailIndex");
|
|
34338
34359
|
|
|
34339
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
34340
34361
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
34341
34362
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
34342
34363
|
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,
|
|
@@ -34434,7 +34455,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
34434
34455
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
34435
34456
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
34436
34457
|
|
|
34437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34458
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
34438
34459
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
34439
34460
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
34440
34461
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -34484,7 +34505,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
34484
34505
|
return threads.length;
|
|
34485
34506
|
}, "markEmailsRestored");
|
|
34486
34507
|
|
|
34487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
34488
34509
|
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
|
|
34489
34510
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
34490
34511
|
WHERE p.account_id = ?
|
|
@@ -34544,7 +34565,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
34544
34565
|
}, "indexedMailPieces");
|
|
34545
34566
|
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");
|
|
34546
34567
|
|
|
34547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34568
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
34548
34569
|
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");
|
|
34549
34570
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
34550
34571
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -34611,7 +34632,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
34611
34632
|
}
|
|
34612
34633
|
}), "mailRulesOver");
|
|
34613
34634
|
|
|
34614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
34615
34636
|
function checkMeetingCancelled(signal) {
|
|
34616
34637
|
if (!signal?.aborted)
|
|
34617
34638
|
return;
|
|
@@ -34622,7 +34643,7 @@ function checkMeetingCancelled(signal) {
|
|
|
34622
34643
|
}
|
|
34623
34644
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
34624
34645
|
|
|
34625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
34626
34647
|
var managerOf = /* @__PURE__ */ __name((database, meetingId) => {
|
|
34627
34648
|
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);
|
|
34628
34649
|
if (!found2)
|
|
@@ -34687,7 +34708,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
34687
34708
|
createdAt: Number(row2.created_at)
|
|
34688
34709
|
}), "transcriptRowOf");
|
|
34689
34710
|
|
|
34690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34711
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
34691
34712
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
34692
34713
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
34693
34714
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -34854,7 +34875,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34854
34875
|
}
|
|
34855
34876
|
}), "meetingReadsOver");
|
|
34856
34877
|
|
|
34857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
34858
34879
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
34859
34880
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
34860
34881
|
const params = [input.accountId];
|
|
@@ -34897,7 +34918,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
34897
34918
|
return { clauses, params };
|
|
34898
34919
|
}, "meetingSelectionSql");
|
|
34899
34920
|
|
|
34900
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34921
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-calls.js
|
|
34901
34922
|
var MOST_CALLS = 2e5;
|
|
34902
34923
|
var parsed3 = /* @__PURE__ */ __name((value) => {
|
|
34903
34924
|
if (typeof value !== "string")
|
|
@@ -34952,7 +34973,7 @@ var meetingCallsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34952
34973
|
}
|
|
34953
34974
|
}), "meetingCallsOver");
|
|
34954
34975
|
|
|
34955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
34956
34977
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34957
34978
|
async meetingChatLines(input) {
|
|
34958
34979
|
checkMeetingCancelled(input.signal);
|
|
@@ -34980,7 +35001,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34980
35001
|
}
|
|
34981
35002
|
}), "meetingChatLinesOver");
|
|
34982
35003
|
|
|
34983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35004
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
34984
35005
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
34985
35006
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
34986
35007
|
}, "missing");
|
|
@@ -35103,7 +35124,7 @@ function meetingContextLinksOver(context) {
|
|
|
35103
35124
|
}
|
|
35104
35125
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
35105
35126
|
|
|
35106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-documents.js
|
|
35107
35128
|
var TRANSCRIPT_ROLE = "transcript";
|
|
35108
35129
|
var roleOf3 = /* @__PURE__ */ __name((value) => MEETING_DOCUMENT_ROLES.find((role) => role === value), "roleOf");
|
|
35109
35130
|
var attach = /* @__PURE__ */ __name((database, meetingId, fileId, role, metadata3, listed, now2) => {
|
|
@@ -35177,7 +35198,7 @@ var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
35177
35198
|
};
|
|
35178
35199
|
}, "meetingTranscriptDocumentsOver");
|
|
35179
35200
|
|
|
35180
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
35181
35202
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
35182
35203
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
35183
35204
|
var summaryOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -35206,7 +35227,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
35206
35227
|
return row2 ? summaryText(summaryOf2(row2)) : null;
|
|
35207
35228
|
}, "indexedText");
|
|
35208
35229
|
|
|
35209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
35210
35231
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
35211
35232
|
var meetingCurrentIndexRows = `
|
|
35212
35233
|
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
|
|
@@ -35237,7 +35258,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
35237
35258
|
}, "invalidateMeetingStems");
|
|
35238
35259
|
var meetingStemmableText = /* @__PURE__ */ __name((text9) => text9.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
35239
35260
|
|
|
35240
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
35241
35262
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
35242
35263
|
return {
|
|
35243
35264
|
async indexSearch(original) {
|
|
@@ -35305,10 +35326,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
35305
35326
|
}
|
|
35306
35327
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
35307
35328
|
|
|
35308
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
35309
35330
|
import { createHash as createHash5 } from "node:crypto";
|
|
35310
35331
|
|
|
35311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
35312
35333
|
var SHORTEST_CORRECTION = 3;
|
|
35313
35334
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
35314
35335
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -35355,7 +35376,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words4) => {
|
|
|
35355
35376
|
return corrections;
|
|
35356
35377
|
}, "correctWords");
|
|
35357
35378
|
|
|
35358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
35359
35380
|
var SHORTEST_GARBLED = 4;
|
|
35360
35381
|
var MOST_WIDENED = 64;
|
|
35361
35382
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -35447,7 +35468,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
35447
35468
|
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));
|
|
35448
35469
|
}, "widenWords");
|
|
35449
35470
|
|
|
35450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
35451
35472
|
import { readFileSync } from "node:fs";
|
|
35452
35473
|
var loaded;
|
|
35453
35474
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -35506,7 +35527,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
35506
35527
|
return false;
|
|
35507
35528
|
}, "knownRussianWord");
|
|
35508
35529
|
|
|
35509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
35510
35531
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
35511
35532
|
var MOST_WORDS = 128;
|
|
35512
35533
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -35762,7 +35783,7 @@ var matchedMeetingWords = /* @__PURE__ */ __name((tree, text9, stemmer2) => {
|
|
|
35762
35783
|
return [...found2];
|
|
35763
35784
|
}, "matchedMeetingWords");
|
|
35764
35785
|
|
|
35765
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
35766
35787
|
var fail = /* @__PURE__ */ __name((message3) => {
|
|
35767
35788
|
throw new CliError("validation_error", message3);
|
|
35768
35789
|
}, "fail");
|
|
@@ -35946,7 +35967,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
35946
35967
|
}
|
|
35947
35968
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
35948
35969
|
|
|
35949
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
35950
35971
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35951
35972
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
35952
35973
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -35978,7 +35999,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35978
35999
|
}
|
|
35979
36000
|
}), "meetingLanguagesOver");
|
|
35980
36001
|
|
|
35981
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36002
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
35982
36003
|
import { createHash as createHash6 } from "node:crypto";
|
|
35983
36004
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
35984
36005
|
if (value === void 0)
|
|
@@ -36071,7 +36092,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
36071
36092
|
}
|
|
36072
36093
|
}), "meetingParticipantSearchOver");
|
|
36073
36094
|
|
|
36074
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
36075
36096
|
var preparationQueries = {
|
|
36076
36097
|
participants: {
|
|
36077
36098
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -36121,7 +36142,7 @@ var preparationQueries = {
|
|
|
36121
36142
|
}
|
|
36122
36143
|
};
|
|
36123
36144
|
|
|
36124
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
36125
36146
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36126
36147
|
async preparationContext(original) {
|
|
36127
36148
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -36162,7 +36183,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36162
36183
|
}
|
|
36163
36184
|
}), "meetingPreparationContextOver");
|
|
36164
36185
|
|
|
36165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
36166
36187
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
36167
36188
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
36168
36189
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -36176,7 +36197,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
36176
36197
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
36177
36198
|
)`, "preparationSubjects");
|
|
36178
36199
|
|
|
36179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
36180
36201
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36181
36202
|
async preparationKnowledge(original) {
|
|
36182
36203
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -36221,7 +36242,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
36221
36242
|
}
|
|
36222
36243
|
}), "meetingPreparationKnowledgeOver");
|
|
36223
36244
|
|
|
36224
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36245
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
36225
36246
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36226
36247
|
async preparationNotes(original) {
|
|
36227
36248
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -36274,7 +36295,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36274
36295
|
}
|
|
36275
36296
|
}), "meetingPreparationNotesOver");
|
|
36276
36297
|
|
|
36277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
36278
36299
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36279
36300
|
async relatedHistory(original) {
|
|
36280
36301
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -36345,7 +36366,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36345
36366
|
}
|
|
36346
36367
|
}), "meetingRelatedHistoryOver");
|
|
36347
36368
|
|
|
36348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
36349
36370
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
36350
36371
|
var text4 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
36351
36372
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -36426,7 +36447,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36426
36447
|
}
|
|
36427
36448
|
}), "meetingReviewOver");
|
|
36428
36449
|
|
|
36429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
36430
36451
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
36431
36452
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
36432
36453
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -36480,7 +36501,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36480
36501
|
}
|
|
36481
36502
|
}), "meetingSeriesHistoryOver");
|
|
36482
36503
|
|
|
36483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
36484
36505
|
var MOST_ROWS = 5e5;
|
|
36485
36506
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
36486
36507
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -36549,7 +36570,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36549
36570
|
}
|
|
36550
36571
|
}), "meetingStatsOver");
|
|
36551
36572
|
|
|
36552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36573
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
|
|
36553
36574
|
var CYRILLIC_TO_LATIN = {
|
|
36554
36575
|
\u0430: "a",
|
|
36555
36576
|
\u0431: "b",
|
|
@@ -36771,7 +36792,7 @@ for (const [full, short] of Object.entries(SHORT_FORMS))
|
|
|
36771
36792
|
}
|
|
36772
36793
|
var fullNames = /* @__PURE__ */ __name((skeleton) => [skeleton, ...FULL_NAMES.get(skeleton) ?? []], "fullNames");
|
|
36773
36794
|
|
|
36774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36795
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/name-traces.js
|
|
36775
36796
|
var peopleByNameKey = /* @__PURE__ */ __name((database) => {
|
|
36776
36797
|
const found2 = /* @__PURE__ */ new Map();
|
|
36777
36798
|
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()) {
|
|
@@ -36887,7 +36908,7 @@ function* sharedTraces(database, a, b, name, except) {
|
|
|
36887
36908
|
}
|
|
36888
36909
|
__name(sharedTraces, "sharedTraces");
|
|
36889
36910
|
|
|
36890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/person-matcher.js
|
|
36891
36912
|
var spellingsOf = /* @__PURE__ */ __name((value) => [value, value.slice(1)], "spellingsOf");
|
|
36892
36913
|
var PERSON_BY = {
|
|
36893
36914
|
// UNION, not OR: each branch reads its own index.
|
|
@@ -36910,7 +36931,7 @@ var personsByIdentifiers = /* @__PURE__ */ __name((database, ids3) => {
|
|
|
36910
36931
|
return [...found2].sort((a, b) => a - b);
|
|
36911
36932
|
}, "personsByIdentifiers");
|
|
36912
36933
|
|
|
36913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36934
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/person-match-scan.js
|
|
36914
36935
|
var BY = "rule";
|
|
36915
36936
|
var RULE = { bot: "rule", kind: "rule" };
|
|
36916
36937
|
var MOST_SHARING = 6;
|
|
@@ -37359,7 +37380,7 @@ var linkPhones = /* @__PURE__ */ __name((context, identities2) => {
|
|
|
37359
37380
|
return pass.result;
|
|
37360
37381
|
}, "linkPhones");
|
|
37361
37382
|
|
|
37362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37383
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
37363
37384
|
var CURSOR_KEY = "meetings";
|
|
37364
37385
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
37365
37386
|
id: Number(row2.id),
|
|
@@ -37966,7 +37987,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37966
37987
|
};
|
|
37967
37988
|
}, "meetingStoreOver");
|
|
37968
37989
|
|
|
37969
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
37970
37991
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
37971
37992
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
37972
37993
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -37992,7 +38013,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder2) => {
|
|
|
37992
38013
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder2))).run();
|
|
37993
38014
|
}, "release");
|
|
37994
38015
|
|
|
37995
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38016
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
37996
38017
|
var THREAD_COLUMNS = {
|
|
37997
38018
|
subject: {
|
|
37998
38019
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -38009,7 +38030,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
38009
38030
|
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);
|
|
38010
38031
|
}, "threadRows");
|
|
38011
38032
|
|
|
38012
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38033
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
38013
38034
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
38014
38035
|
id: `email:${place.emailId}`,
|
|
38015
38036
|
chatId: place.threadExternalId,
|
|
@@ -38551,7 +38572,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
38551
38572
|
}
|
|
38552
38573
|
}), "mailStoreOver");
|
|
38553
38574
|
|
|
38554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
38555
38576
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
38556
38577
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
38557
38578
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -38641,7 +38662,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
38641
38662
|
}, "knownWord");
|
|
38642
38663
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
38643
38664
|
|
|
38644
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38665
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
38645
38666
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
38646
38667
|
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");
|
|
38647
38668
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -38727,7 +38748,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
38727
38748
|
return found2;
|
|
38728
38749
|
}, "spokenTranscripts");
|
|
38729
38750
|
|
|
38730
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
38731
38752
|
var startOf = /* @__PURE__ */ __name((node) => node.operator === "wildcard" && node.implicit ? /^([\p{L}\p{N}]+)\*$/u.exec(normalize(node.value))?.[1] : void 0, "startOf");
|
|
38732
38753
|
var matchOf = /* @__PURE__ */ __name((node) => {
|
|
38733
38754
|
const start = startOf(node);
|
|
@@ -38785,7 +38806,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
38785
38806
|
});
|
|
38786
38807
|
}, "placeHits");
|
|
38787
38808
|
|
|
38788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
38789
38810
|
var GROUPS = {
|
|
38790
38811
|
chat: {
|
|
38791
38812
|
key: "m.chat_id",
|
|
@@ -38807,7 +38828,7 @@ var GROUPS = {
|
|
|
38807
38828
|
}
|
|
38808
38829
|
};
|
|
38809
38830
|
|
|
38810
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
38811
38832
|
var MESSAGES = {
|
|
38812
38833
|
rows: "messages",
|
|
38813
38834
|
threads: "chats",
|
|
@@ -39303,7 +39324,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
39303
39324
|
};
|
|
39304
39325
|
}, "runCompiled");
|
|
39305
39326
|
|
|
39306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
39307
39328
|
function invalidMetadata() {
|
|
39308
39329
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
39309
39330
|
}
|
|
@@ -39405,7 +39426,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
39405
39426
|
};
|
|
39406
39427
|
}), "counterTargets");
|
|
39407
39428
|
|
|
39408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39429
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
39409
39430
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
39410
39431
|
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,
|
|
39411
39432
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -39524,7 +39545,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
39524
39545
|
}));
|
|
39525
39546
|
}, "attachmentViews");
|
|
39526
39547
|
|
|
39527
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
39528
39549
|
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");
|
|
39529
39550
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text9, source2) => {
|
|
39530
39551
|
const { orm, database, now: now2 } = context;
|
|
@@ -39562,7 +39583,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
39562
39583
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
39563
39584
|
}, "intoVoiceAttachment");
|
|
39564
39585
|
|
|
39565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39586
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
39566
39587
|
var FIELDS = [
|
|
39567
39588
|
"threadExternalId",
|
|
39568
39589
|
"senderIdentityId",
|
|
@@ -39886,7 +39907,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
39886
39907
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
39887
39908
|
}, "writeDerivedReactions");
|
|
39888
39909
|
|
|
39889
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
39890
39911
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
39891
39912
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
39892
39913
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -39907,7 +39928,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
39907
39928
|
};
|
|
39908
39929
|
}, "keysOver");
|
|
39909
39930
|
|
|
39910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
39911
39932
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
39912
39933
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
39913
39934
|
if (!row2)
|
|
@@ -39954,7 +39975,7 @@ var forgetProfile = /* @__PURE__ */ __name((database, app, profile, now2) => {
|
|
|
39954
39975
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
39955
39976
|
}, "forgetProfile");
|
|
39956
39977
|
|
|
39957
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
39958
39979
|
var DAY4 = 864e5;
|
|
39959
39980
|
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}')`;
|
|
39960
39981
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -40070,7 +40091,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
40070
40091
|
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);
|
|
40071
40092
|
}, "listEvents");
|
|
40072
40093
|
|
|
40073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
40074
40095
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
40075
40096
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey, now: now2 }, refresh) => {
|
|
40076
40097
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -40127,7 +40148,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
40127
40148
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
40128
40149
|
}, "forgetCalendarRows");
|
|
40129
40150
|
|
|
40130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
40131
40152
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
40132
40153
|
id: Number(row2.id),
|
|
40133
40154
|
accountId: Number(row2.account_id),
|
|
@@ -40730,7 +40751,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
40730
40751
|
};
|
|
40731
40752
|
}, "eventStoreOver");
|
|
40732
40753
|
|
|
40733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40754
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/account-purge.js
|
|
40734
40755
|
var purgeAccount = /* @__PURE__ */ __name((context, accountKey) => {
|
|
40735
40756
|
const { orm, database, now: now2 } = context;
|
|
40736
40757
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -40847,7 +40868,7 @@ var purgeCrmCopies = /* @__PURE__ */ __name((database, accountKey) => {
|
|
|
40847
40868
|
run("DELETE FROM pipelines WHERE account_id = ?", accountKey);
|
|
40848
40869
|
}, "purgeCrmCopies");
|
|
40849
40870
|
|
|
40850
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40871
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
40851
40872
|
var ACCOUNT_REASON = "an account you connected, under another name: a mailbox or messenger you read may be someone else's";
|
|
40852
40873
|
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");
|
|
40853
40874
|
var ownersName = /* @__PURE__ */ __name((name, owner, alone) => {
|
|
@@ -40906,7 +40927,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
40906
40927
|
return personOf2(context, ref3);
|
|
40907
40928
|
}, "linkToOwner");
|
|
40908
40929
|
|
|
40909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
40910
40931
|
var PROVIDERS_SETTING = "providers";
|
|
40911
40932
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
40912
40933
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -40954,7 +40975,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
40954
40975
|
});
|
|
40955
40976
|
}, "registerProvider");
|
|
40956
40977
|
|
|
40957
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
40958
40979
|
var DAY5 = 864e5;
|
|
40959
40980
|
var RECENTLY_CLOSED_MS = 14 * DAY5;
|
|
40960
40981
|
var TEXT_LIMIT = 20;
|
|
@@ -41152,7 +41173,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
41152
41173
|
};
|
|
41153
41174
|
}, "taskSimilarityOver");
|
|
41154
41175
|
|
|
41155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
41156
41177
|
var SETTING3 = "taskCategories";
|
|
41157
41178
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
41158
41179
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -41171,7 +41192,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
41171
41192
|
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);
|
|
41172
41193
|
}, "saveTaskCategories");
|
|
41173
41194
|
|
|
41174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
41175
41196
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
41176
41197
|
var ALLOWED = "taskAgentClose";
|
|
41177
41198
|
var MIN = "taskAgentCloseMin";
|
|
@@ -41227,7 +41248,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
41227
41248
|
];
|
|
41228
41249
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
41229
41250
|
|
|
41230
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
41231
41252
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
41232
41253
|
var KEY = "taskFirstPassPerChat";
|
|
41233
41254
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -41247,7 +41268,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
41247
41268
|
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);
|
|
41248
41269
|
}, "saveFirstPassPerChat");
|
|
41249
41270
|
|
|
41250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
41251
41272
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
41252
41273
|
var EXTERNAL_ID_CHARS = 200;
|
|
41253
41274
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -41274,7 +41295,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
41274
41295
|
return text9;
|
|
41275
41296
|
}, "sourceUrlOf");
|
|
41276
41297
|
|
|
41277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
41278
41299
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
41279
41300
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
41280
41301
|
name,
|
|
@@ -41526,7 +41547,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
41526
41547
|
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 ?`;
|
|
41527
41548
|
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");
|
|
41528
41549
|
|
|
41529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
41530
41551
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
41531
41552
|
if (row2.author_type == null)
|
|
41532
41553
|
return null;
|
|
@@ -41554,7 +41575,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
41554
41575
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
41555
41576
|
}, "addComment");
|
|
41556
41577
|
|
|
41557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41578
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
41558
41579
|
var TASK_RELATION_KINDS = [
|
|
41559
41580
|
"blocked-by",
|
|
41560
41581
|
"follow-up-of",
|
|
@@ -41684,7 +41705,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record3) => {
|
|
|
41684
41705
|
};
|
|
41685
41706
|
}, "taskRelationsStoreOver");
|
|
41686
41707
|
|
|
41687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
41688
41709
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
41689
41710
|
var TASK_EVENT_KINDS = [
|
|
41690
41711
|
"created",
|
|
@@ -42243,7 +42264,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
42243
42264
|
};
|
|
42244
42265
|
}, "workTasksOver");
|
|
42245
42266
|
|
|
42246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
42247
42268
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
42248
42269
|
const { database, now: now2 } = context;
|
|
42249
42270
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -42292,7 +42313,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
42292
42313
|
};
|
|
42293
42314
|
}, "taskCloseOver");
|
|
42294
42315
|
|
|
42295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42316
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
42296
42317
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
42297
42318
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
42298
42319
|
const { database, now: now2 } = context;
|
|
@@ -42511,7 +42532,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
42511
42532
|
};
|
|
42512
42533
|
}, "taskPairsOver");
|
|
42513
42534
|
|
|
42514
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
42515
42536
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
42516
42537
|
var TASK_STATS_SQL = {
|
|
42517
42538
|
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"),
|
|
@@ -42550,7 +42571,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
42550
42571
|
}, "statNames")
|
|
42551
42572
|
}), "taskStatsOver");
|
|
42552
42573
|
|
|
42553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42574
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
42554
42575
|
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";
|
|
42555
42576
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
42556
42577
|
const key2 = inboxKey(account);
|
|
@@ -42766,7 +42787,7 @@ var oneOf4 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
42766
42787
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
42767
42788
|
}, "oneOf");
|
|
42768
42789
|
|
|
42769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42790
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
42770
42791
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
42771
42792
|
const { database } = context;
|
|
42772
42793
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -42836,7 +42857,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
42836
42857
|
};
|
|
42837
42858
|
}, "accountsStoreOver");
|
|
42838
42859
|
|
|
42839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
42840
42861
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
42841
42862
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
42842
42863
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -42860,7 +42881,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
42860
42881
|
})), "keepDownloads");
|
|
42861
42882
|
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");
|
|
42862
42883
|
|
|
42863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
42864
42885
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
42865
42886
|
const { database } = context;
|
|
42866
42887
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -42917,7 +42938,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42917
42938
|
}, "keepAttachmentText")
|
|
42918
42939
|
}), "attachmentsStoreOver");
|
|
42919
42940
|
|
|
42920
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42941
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
42921
42942
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
42922
42943
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
42923
42944
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -43102,7 +43123,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
43102
43123
|
return done;
|
|
43103
43124
|
}, "rekeyChats");
|
|
43104
43125
|
|
|
43105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
43106
43127
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
43107
43128
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
43108
43129
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -43160,7 +43181,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
43160
43181
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
43161
43182
|
}, "chatCoverage");
|
|
43162
43183
|
|
|
43163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43184
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
43164
43185
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
43165
43186
|
const { database } = context;
|
|
43166
43187
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -43309,7 +43330,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43309
43330
|
};
|
|
43310
43331
|
}, "chatsStoreOver");
|
|
43311
43332
|
|
|
43312
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
43313
43334
|
import { createHash as createHash7 } from "node:crypto";
|
|
43314
43335
|
var BATCH_CONTEXT = 50;
|
|
43315
43336
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -43449,7 +43470,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
43449
43470
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
43450
43471
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
43451
43472
|
|
|
43452
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43473
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
43453
43474
|
import { setTimeout } from "node:timers/promises";
|
|
43454
43475
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
43455
43476
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -43761,7 +43782,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
43761
43782
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
43762
43783
|
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");
|
|
43763
43784
|
|
|
43764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43785
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
43765
43786
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
43766
43787
|
const { database } = context;
|
|
43767
43788
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -43868,7 +43889,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43868
43889
|
};
|
|
43869
43890
|
}, "conversationsStoreOver");
|
|
43870
43891
|
|
|
43871
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
43872
43893
|
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";
|
|
43873
43894
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
43874
43895
|
const { database } = context;
|
|
@@ -43893,7 +43914,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
43893
43914
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
43894
43915
|
}), "countersStoreOver");
|
|
43895
43916
|
|
|
43896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
43897
43918
|
var MENTION_STATUSES = ["found", "linked", "proposed", "dismissed"];
|
|
43898
43919
|
var MENTION_QUERY = defineQuery({
|
|
43899
43920
|
entity: "mention",
|
|
@@ -44112,7 +44133,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
44112
44133
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
44113
44134
|
}, "listPlaces");
|
|
44114
44135
|
|
|
44115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
44116
44137
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
44117
44138
|
const { database } = context;
|
|
44118
44139
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -44147,7 +44168,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
44147
44168
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
44148
44169
|
}), "mentionsStoreOver");
|
|
44149
44170
|
|
|
44150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
44151
44172
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
44152
44173
|
var MUTED_NOW = "(coalesce(c.muted,0)=1 AND (c.muted_until IS NULL OR c.muted_until>?))";
|
|
44153
44174
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2, now2) => {
|
|
@@ -44246,7 +44267,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
44246
44267
|
});
|
|
44247
44268
|
}, "waitingChats");
|
|
44248
44269
|
|
|
44249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44270
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-activity-counts.js
|
|
44250
44271
|
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 = ?`;
|
|
44251
44272
|
var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since, until, now: now2 }) => {
|
|
44252
44273
|
const statement = database.prepare(SQL);
|
|
@@ -44266,7 +44287,7 @@ var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since
|
|
|
44266
44287
|
return found2;
|
|
44267
44288
|
}, "chatActivityCounts");
|
|
44268
44289
|
|
|
44269
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
44270
44291
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
44271
44292
|
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");
|
|
44272
44293
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -44281,7 +44302,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
44281
44302
|
}));
|
|
44282
44303
|
}, "documentLinkMessages");
|
|
44283
44304
|
|
|
44284
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
44285
44306
|
var stemmerFor = stemmerCache();
|
|
44286
44307
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
44287
44308
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -44325,7 +44346,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
44325
44346
|
});
|
|
44326
44347
|
}, "laterSharingRare");
|
|
44327
44348
|
|
|
44328
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44349
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
44329
44350
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
44330
44351
|
const { database } = context;
|
|
44331
44352
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -44466,7 +44487,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
44466
44487
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
44467
44488
|
}), "messagesStoreOver");
|
|
44468
44489
|
|
|
44469
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44490
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-links.js
|
|
44470
44491
|
var AGENT_METHOD = "agent";
|
|
44471
44492
|
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");
|
|
44472
44493
|
var weaknessOf = /* @__PURE__ */ __name((context, kind3, value, holders, sides, others) => {
|
|
@@ -44610,7 +44631,7 @@ var agentMerges = /* @__PURE__ */ __name((context, { limit, offset }) => {
|
|
|
44610
44631
|
return { items: found2.slice(offset, offset + limit), hasMore: found2.length > offset + limit };
|
|
44611
44632
|
}, "agentMerges");
|
|
44612
44633
|
|
|
44613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44634
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-rekey.js
|
|
44614
44635
|
var quoted2 = /* @__PURE__ */ __name((name) => `"${name.replace(/"/g, '""')}"`, "quoted");
|
|
44615
44636
|
var columnsOf3 = /* @__PURE__ */ __name((database, table) => database.prepare("SELECT name, pk, type FROM pragma_table_info(?)").all(table), "columnsOf");
|
|
44616
44637
|
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
|
|
@@ -44754,7 +44775,7 @@ var rekeyIdentities = /* @__PURE__ */ __name((context, provider, pairs, { lockMs
|
|
|
44754
44775
|
return done;
|
|
44755
44776
|
}, "rekeyIdentities");
|
|
44756
44777
|
|
|
44757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/person-kinds.js
|
|
44758
44779
|
var PERSON_KINDS = ["person", "organization", "automated", "stranger", "unsorted", "test"];
|
|
44759
44780
|
var AUTOMATED_WORDS = /* @__PURE__ */ new Set([
|
|
44760
44781
|
"noreply",
|
|
@@ -44817,7 +44838,7 @@ var isCompanyName = /* @__PURE__ */ __name((name) => {
|
|
|
44817
44838
|
return wordsOf3(name.replaceAll(".", "")).some((word2) => LEGAL_FORMS.has(word2) || COMPANY_WORDS.has(word2));
|
|
44818
44839
|
}, "isCompanyName");
|
|
44819
44840
|
|
|
44820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44841
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/person-ties.js
|
|
44821
44842
|
var SMALL_GROUP_MEMBERS = 10;
|
|
44822
44843
|
var PERSON_TIES = ["chat", "small-group", "mail", "meeting", "crm", "phone-book"];
|
|
44823
44844
|
var ALWAYS_SHOWN = ["owner", "added", "task"];
|
|
@@ -44872,7 +44893,7 @@ var shownReasons = /* @__PURE__ */ __name((database, people2) => {
|
|
|
44872
44893
|
return new Map([...found2].map(([person2, reasons]) => [person2, ORDER.filter((one2) => reasons.has(one2))]));
|
|
44873
44894
|
}, "shownReasons");
|
|
44874
44895
|
|
|
44875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44896
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/people-list.js
|
|
44876
44897
|
var PEOPLE_SORTS = ["interactions", "recent", "name", "tasks"];
|
|
44877
44898
|
var MIN_QUERY = 3;
|
|
44878
44899
|
var matching2 = /* @__PURE__ */ __name((query) => {
|
|
@@ -45217,7 +45238,7 @@ var similarPeople = /* @__PURE__ */ __name((database, typed, limit) => {
|
|
|
45217
45238
|
return withLastContact(database, rows).map((person2, at2) => ({ ...person2, sameName: same[at2] === true }));
|
|
45218
45239
|
}, "similarPeople");
|
|
45219
45240
|
|
|
45220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45241
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/person-doubts.js
|
|
45221
45242
|
var DOUBT_REASONS = ["owner-other-name", "test-data", "shared-address", "mixed-names"];
|
|
45222
45243
|
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";
|
|
45223
45244
|
var text5 = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? value : null, "text");
|
|
@@ -45473,7 +45494,7 @@ var markTestData = /* @__PURE__ */ __name((context, uid, by) => {
|
|
|
45473
45494
|
return { person: `person:${person2}`, identities: identities2 };
|
|
45474
45495
|
}, "markTestData");
|
|
45475
45496
|
|
|
45476
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45497
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
45477
45498
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
45478
45499
|
var IN_SCOPES = "IN (SELECT value FROM json_each(?))";
|
|
45479
45500
|
var projectScope = /* @__PURE__ */ __name((id2) => `(SELECT p.scope FROM main.projects p WHERE p.id=${id2})`, "projectScope");
|
|
@@ -45542,7 +45563,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
45542
45563
|
});
|
|
45543
45564
|
}, "personPreparation");
|
|
45544
45565
|
|
|
45545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
45546
45567
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
45547
45568
|
const id2 = Number(uid);
|
|
45548
45569
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -45550,7 +45571,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
45550
45571
|
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)));
|
|
45551
45572
|
}, "personSeenInAccounts");
|
|
45552
45573
|
|
|
45553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45574
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
45554
45575
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
45555
45576
|
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);
|
|
45556
45577
|
if (!row2)
|
|
@@ -45617,7 +45638,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
45617
45638
|
return { id: id2, personId, removed: true };
|
|
45618
45639
|
}, "removeNote");
|
|
45619
45640
|
|
|
45620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45641
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
45621
45642
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
45622
45643
|
const { database } = context;
|
|
45623
45644
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -45760,13 +45781,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
45760
45781
|
};
|
|
45761
45782
|
}, "peopleStoreOver");
|
|
45762
45783
|
|
|
45763
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
45764
45785
|
import { createHash as createHash9 } from "node:crypto";
|
|
45765
45786
|
|
|
45766
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45787
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
45767
45788
|
import { createHash as createHash8 } from "node:crypto";
|
|
45768
45789
|
|
|
45769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45790
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
45770
45791
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
45771
45792
|
var AUTHOR_MEASURES = [
|
|
45772
45793
|
"messages",
|
|
@@ -45906,7 +45927,7 @@ var withoutUrls = /* @__PURE__ */ __name((text9) => text9.replace(/\S+/gu, (toke
|
|
|
45906
45927
|
var rankingWords = /* @__PURE__ */ __name((text9) => withoutUrls(text9).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
45907
45928
|
var rankingQuestion = /* @__PURE__ */ __name((text9) => withoutUrls(text9).includes("?"), "rankingQuestion");
|
|
45908
45929
|
|
|
45909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
45910
45931
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
45911
45932
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
45912
45933
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -46128,7 +46149,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
46128
46149
|
};
|
|
46129
46150
|
}, "rankReplyGraph");
|
|
46130
46151
|
|
|
46131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46152
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
46132
46153
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
46133
46154
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
46134
46155
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -46302,7 +46323,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
46302
46323
|
return { items, evidence, summary, graph: graph.quality };
|
|
46303
46324
|
}, "calculateAdminStatistics");
|
|
46304
46325
|
|
|
46305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
46306
46327
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
46307
46328
|
const dates = [];
|
|
46308
46329
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -46324,7 +46345,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
46324
46345
|
return dates[0].node.resolution.date;
|
|
46325
46346
|
}, "rankingContextRange");
|
|
46326
46347
|
|
|
46327
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46348
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
46328
46349
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
46329
46350
|
let counts;
|
|
46330
46351
|
try {
|
|
@@ -46619,7 +46640,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
46619
46640
|
});
|
|
46620
46641
|
}, "rankQuery");
|
|
46621
46642
|
|
|
46622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
46623
46644
|
function fail2(message3, reason = "query.too-large") {
|
|
46624
46645
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
46625
46646
|
}
|
|
@@ -46796,7 +46817,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
46796
46817
|
return result;
|
|
46797
46818
|
}), "adminStatisticsQuery");
|
|
46798
46819
|
|
|
46799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
46800
46821
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
46801
46822
|
if (!execution.accounts.length)
|
|
46802
46823
|
return { conversations: [], chats: [] };
|
|
@@ -46814,7 +46835,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
46814
46835
|
return { conversations: conversations2, chats: chats2 };
|
|
46815
46836
|
}, "conversationEligibility");
|
|
46816
46837
|
|
|
46817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46838
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
46818
46839
|
import { createHash as createHash10 } from "node:crypto";
|
|
46819
46840
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
46820
46841
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -46964,7 +46985,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
46964
46985
|
return result;
|
|
46965
46986
|
}, "rankingEvidence");
|
|
46966
46987
|
|
|
46967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46988
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
46968
46989
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
46969
46990
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
46970
46991
|
if (execution.corpus === "mail")
|
|
@@ -46985,7 +47006,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
46985
47006
|
};
|
|
46986
47007
|
}, "queriesStoreOver");
|
|
46987
47008
|
|
|
46988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
46989
47010
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
46990
47011
|
const { database, now: now2 } = context;
|
|
46991
47012
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -47024,10 +47045,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
47024
47045
|
}));
|
|
47025
47046
|
}, "chatEventsOf");
|
|
47026
47047
|
|
|
47027
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
47028
47049
|
import { createHash as createHash11 } from "node:crypto";
|
|
47029
47050
|
|
|
47030
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
47031
47052
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
47032
47053
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
47033
47054
|
timeZone: zone,
|
|
@@ -47047,7 +47068,7 @@ var weekKey = /* @__PURE__ */ __name((day3) => {
|
|
|
47047
47068
|
return date3.toISOString().slice(0, 10);
|
|
47048
47069
|
}, "weekKey");
|
|
47049
47070
|
|
|
47050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
47051
47072
|
var RETENTION_TOLERANCE = 864e5;
|
|
47052
47073
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
47053
47074
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -47101,7 +47122,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
47101
47122
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
47102
47123
|
}, "retentionCohorts");
|
|
47103
47124
|
|
|
47104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47125
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
47105
47126
|
var iso10 = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString(), "iso");
|
|
47106
47127
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
47107
47128
|
validateRetentionOptions(options);
|
|
@@ -47232,7 +47253,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
47232
47253
|
};
|
|
47233
47254
|
}, "retentionQuery");
|
|
47234
47255
|
|
|
47235
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
47236
47257
|
var iso11 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
47237
47258
|
var marksOf = /* @__PURE__ */ __name(({ isBot: isBot2, flagged, deleted, hasPhoto }) => ({
|
|
47238
47259
|
...isBot2 === void 0 ? {} : { bot: isBot2 },
|
|
@@ -47361,7 +47382,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
47361
47382
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
47362
47383
|
})), "trackedChats");
|
|
47363
47384
|
|
|
47364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
47365
47386
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
47366
47387
|
const { database } = context;
|
|
47367
47388
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -47417,7 +47438,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47417
47438
|
};
|
|
47418
47439
|
}, "rosterStoreOver");
|
|
47419
47440
|
|
|
47420
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47441
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
47421
47442
|
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");
|
|
47422
47443
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
47423
47444
|
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 ?`);
|
|
@@ -47441,7 +47462,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
47441
47462
|
}
|
|
47442
47463
|
}, "backfillNormalized");
|
|
47443
47464
|
|
|
47444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47465
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
47445
47466
|
var INDEX2 = "message_words";
|
|
47446
47467
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
47447
47468
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -47568,7 +47589,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
47568
47589
|
});
|
|
47569
47590
|
}, "resetSearchIndex");
|
|
47570
47591
|
|
|
47571
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47592
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
47572
47593
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
47573
47594
|
const filled = { stemmed: 0, drained: 0 };
|
|
47574
47595
|
const before2 = stemsState(database);
|
|
@@ -47663,7 +47684,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
47663
47684
|
return resetStems(database, { now: now2 });
|
|
47664
47685
|
}, "followDefaultStemmers");
|
|
47665
47686
|
|
|
47666
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47687
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
47667
47688
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
47668
47689
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms) => {
|
|
47669
47690
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -47685,7 +47706,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
47685
47706
|
});
|
|
47686
47707
|
}, "termCandidates");
|
|
47687
47708
|
|
|
47688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
47689
47710
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
47690
47711
|
const { database } = context;
|
|
47691
47712
|
const stemmerFor2 = stemmerCache();
|
|
@@ -47710,7 +47731,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47710
47731
|
};
|
|
47711
47732
|
}, "searchIndexStoreOver");
|
|
47712
47733
|
|
|
47713
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47734
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
47714
47735
|
var HISTORY_KEPT = 1e3;
|
|
47715
47736
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
47716
47737
|
var COLUMNS6 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -47780,7 +47801,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
47780
47801
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
47781
47802
|
}, "clearHistory");
|
|
47782
47803
|
|
|
47783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
47784
47805
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
47785
47806
|
const { database } = context;
|
|
47786
47807
|
return {
|
|
@@ -47804,7 +47825,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47804
47825
|
};
|
|
47805
47826
|
}, "searchesStoreOver");
|
|
47806
47827
|
|
|
47807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
47808
47829
|
import { createHash as createHash12 } from "node:crypto";
|
|
47809
47830
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
47810
47831
|
var TEXT_COLUMNS = "kind = ?, title = ?, file_name = ?, extension = ?, url = ?, mime = ?, size = ?, content_hash = ?, body = ?, extraction = ?, metadata = ?, language = ?";
|
|
@@ -48046,7 +48067,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
48046
48067
|
};
|
|
48047
48068
|
}, "addedSourcesOver");
|
|
48048
48069
|
|
|
48049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
48050
48071
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
48051
48072
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
48052
48073
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -48094,7 +48115,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
48094
48115
|
};
|
|
48095
48116
|
}, "agentActionsStoreOver");
|
|
48096
48117
|
|
|
48097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48118
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/base-suggest.js
|
|
48098
48119
|
var baseSettingKey = /* @__PURE__ */ __name((kind3) => `stages.base.${kind3}`, "baseSettingKey");
|
|
48099
48120
|
var storedPipeline = /* @__PURE__ */ __name((value) => {
|
|
48100
48121
|
if (typeof value !== "string")
|
|
@@ -48140,11 +48161,11 @@ var suggestBaseStages = /* @__PURE__ */ __name((database, kind3, pipelines2, { o
|
|
|
48140
48161
|
}
|
|
48141
48162
|
}, "suggestBaseStages");
|
|
48142
48163
|
|
|
48143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48164
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/copy-viewer.js
|
|
48144
48165
|
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");
|
|
48145
48166
|
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");
|
|
48146
48167
|
|
|
48147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48168
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
48148
48169
|
import { createHash as createHash13 } from "node:crypto";
|
|
48149
48170
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
48150
48171
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -48285,7 +48306,7 @@ var fieldReferences = /* @__PURE__ */ __name((record3, options = {}) => {
|
|
|
48285
48306
|
return found2;
|
|
48286
48307
|
}, "fieldReferences");
|
|
48287
48308
|
|
|
48288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
48289
48310
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
48290
48311
|
var MONEY_REFUSALS = ["money.currency", "money.amount"];
|
|
48291
48312
|
var amountFault = /* @__PURE__ */ __name((item, code) => {
|
|
@@ -48457,7 +48478,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
48457
48478
|
return { savePipeline, saveItemRow };
|
|
48458
48479
|
}, "crmRowsOver");
|
|
48459
48480
|
|
|
48460
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48481
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activities.js
|
|
48461
48482
|
var ACTIVITY_RECORD = "crm.activity";
|
|
48462
48483
|
var forgetActivitiesOn = /* @__PURE__ */ __name((database, accountId, kind3, externalIds, at2) => {
|
|
48463
48484
|
const removed = "rr.target_type = ? AND rr.target_external_id IN (SELECT value FROM json_each(?))";
|
|
@@ -48645,7 +48666,7 @@ var seenSql = /* @__PURE__ */ __name((viewer) => {
|
|
|
48645
48666
|
};
|
|
48646
48667
|
}, "seenSql");
|
|
48647
48668
|
|
|
48648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48669
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-stage-entries.js
|
|
48649
48670
|
var STAGE_ENTRY_RECORD = "crm.stage-entry";
|
|
48650
48671
|
var STAGE_ENTRY_DAYS = 90;
|
|
48651
48672
|
var STAGE_TASK_DAYS = 7;
|
|
@@ -48713,7 +48734,7 @@ var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
48713
48734
|
return { save: save2, pending, handled, expire };
|
|
48714
48735
|
}, "crmStageEntriesOver");
|
|
48715
48736
|
|
|
48716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
48717
48738
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
48718
48739
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, { since, until }, viewer) => {
|
|
48719
48740
|
const seen = viewerSql("d", viewer);
|
|
@@ -48731,7 +48752,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, { si
|
|
|
48731
48752
|
});
|
|
48732
48753
|
}, "stageAmountsOf");
|
|
48733
48754
|
|
|
48734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/pipeline-period.js
|
|
48735
48756
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
48736
48757
|
var DAY7 = 864e5;
|
|
48737
48758
|
var LOST_REASONS = 10;
|
|
@@ -48888,7 +48909,7 @@ var pipelinePeriod = /* @__PURE__ */ __name((context, pipeline, window, zone, vi
|
|
|
48888
48909
|
};
|
|
48889
48910
|
}, "pipelinePeriod");
|
|
48890
48911
|
|
|
48891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48912
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
48892
48913
|
var TABLES5 = { deal: "deals", lead: "leads" };
|
|
48893
48914
|
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");
|
|
48894
48915
|
var MAX_STAGES = 30;
|
|
@@ -49361,7 +49382,7 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49361
49382
|
};
|
|
49362
49383
|
}, "dealsStoreOver");
|
|
49363
49384
|
|
|
49364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
49365
49386
|
var KEY2 = "ownerLanguages";
|
|
49366
49387
|
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(" "));
|
|
49367
49388
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -49391,7 +49412,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
49391
49412
|
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);
|
|
49392
49413
|
}, "saveOwnerLanguages");
|
|
49393
49414
|
|
|
49394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49415
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/base-stages.js
|
|
49395
49416
|
var OUTCOMES = {
|
|
49396
49417
|
lead: ["open", "open", "open", "won", "lost"],
|
|
49397
49418
|
deal: ["open", "open", "open", "open", "won", "lost"]
|
|
@@ -49724,7 +49745,7 @@ var baseStagesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49724
49745
|
};
|
|
49725
49746
|
}, "baseStagesStoreOver");
|
|
49726
49747
|
|
|
49727
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49748
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
49728
49749
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
49729
49750
|
}) => {
|
|
49730
49751
|
const { database, now: now2 } = context;
|
|
@@ -49783,7 +49804,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
49783
49804
|
};
|
|
49784
49805
|
}, "botUpdateStoreOver");
|
|
49785
49806
|
|
|
49786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49807
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
49787
49808
|
var IMPORTER = { bot: "import" };
|
|
49788
49809
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
49789
49810
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -49828,7 +49849,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
49828
49849
|
};
|
|
49829
49850
|
}), "moneyLinesOf");
|
|
49830
49851
|
|
|
49831
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/relation-role-labels.js
|
|
49832
49853
|
var label = /* @__PURE__ */ __name((en, ru, es) => ({ en, ru, es }), "label");
|
|
49833
49854
|
var ROLE_LABELS = {
|
|
49834
49855
|
organization: {
|
|
@@ -49869,7 +49890,7 @@ var ROLE_LABELS = {
|
|
|
49869
49890
|
}
|
|
49870
49891
|
};
|
|
49871
49892
|
|
|
49872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
49873
49894
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
49874
49895
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
49875
49896
|
var listOf2 = /* @__PURE__ */ __name((list2) => {
|
|
@@ -49953,7 +49974,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
49953
49974
|
};
|
|
49954
49975
|
}, "relationRolesOver");
|
|
49955
49976
|
|
|
49956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
49957
49978
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
49958
49979
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
49959
49980
|
var CRM_SCOPES = ["mine", "all"];
|
|
@@ -50184,7 +50205,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
50184
50205
|
return [{ setting: String(row2.key), value: settingValue(database, parsed5.key, parsed5.name) }];
|
|
50185
50206
|
}), "crmSettingsOf");
|
|
50186
50207
|
|
|
50187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
50188
50209
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
50189
50210
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
50190
50211
|
id: link3.id,
|
|
@@ -50544,7 +50565,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
50544
50565
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
50545
50566
|
}, "decidedOrigin");
|
|
50546
50567
|
|
|
50547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50568
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
50548
50569
|
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");
|
|
50549
50570
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
50550
50571
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" }, onOutcome } = {}) => {
|
|
@@ -50682,7 +50703,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
50682
50703
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
50683
50704
|
}), "relationsStoreOver");
|
|
50684
50705
|
|
|
50685
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relationships.js
|
|
50686
50707
|
var importSource = /* @__PURE__ */ __name((provider) => `import:${provider}`, "importSource");
|
|
50687
50708
|
var noRelationships = /* @__PURE__ */ __name(() => ({
|
|
50688
50709
|
added: 0,
|
|
@@ -50872,7 +50893,7 @@ var recordRelationshipsOver = /* @__PURE__ */ __name((context) => {
|
|
|
50872
50893
|
return { report, placeOf: placeOf2, withdrawFrom };
|
|
50873
50894
|
}, "recordRelationshipsOver");
|
|
50874
50895
|
|
|
50875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50896
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
50876
50897
|
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";
|
|
50877
50898
|
var DAY_MS2 = 864e5;
|
|
50878
50899
|
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");
|
|
@@ -51031,7 +51052,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51031
51052
|
};
|
|
51032
51053
|
}, "contractsStoreOver");
|
|
51033
51054
|
|
|
51034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51055
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
51035
51056
|
var BUSINESS_FIND_MAX = 2001;
|
|
51036
51057
|
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");
|
|
51037
51058
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
@@ -51136,7 +51157,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
51136
51157
|
};
|
|
51137
51158
|
}, "businessSearchOver");
|
|
51138
51159
|
|
|
51139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51160
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
51140
51161
|
var CATALOG_QUERY = defineQuery({
|
|
51141
51162
|
entity: "document",
|
|
51142
51163
|
backend: "sql",
|
|
@@ -51369,7 +51390,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
51369
51390
|
};
|
|
51370
51391
|
}, "catalogStoreOver");
|
|
51371
51392
|
|
|
51372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
51373
51394
|
var remote = /* @__PURE__ */ __name(() => `CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source') IN (${documentAccountProvidersSql()}) ELSE 0 END`, "remote");
|
|
51374
51395
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${remote()}) THEN
|
|
51375
51396
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -51382,7 +51403,7 @@ var contextDocumentTimeKind = /* @__PURE__ */ __name(() => `CASE WHEN (${remoteT
|
|
|
51382
51403
|
THEN 'source-modified' ELSE 'stored-update' END`, "contextDocumentTimeKind");
|
|
51383
51404
|
var contextDocumentUrl = /* @__PURE__ */ __name(() => `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`, "contextDocumentUrl");
|
|
51384
51405
|
|
|
51385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
51386
51407
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
51387
51408
|
const { source: source2, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
51388
51409
|
signal?.throwIfAborted();
|
|
@@ -51481,7 +51502,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
51481
51502
|
});
|
|
51482
51503
|
}, "readMeetingContextEvidence");
|
|
51483
51504
|
|
|
51484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
51485
51506
|
var corpora = {
|
|
51486
51507
|
message: {
|
|
51487
51508
|
table: "messages",
|
|
@@ -51726,7 +51747,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
51726
51747
|
}
|
|
51727
51748
|
}), "contextRecordsOver");
|
|
51728
51749
|
|
|
51729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-changes.js
|
|
51730
51751
|
var CRM_CHANGES = [
|
|
51731
51752
|
"created",
|
|
51732
51753
|
"moved",
|
|
@@ -51869,7 +51890,7 @@ var crmReadsOver = /* @__PURE__ */ __name((context) => {
|
|
|
51869
51890
|
};
|
|
51870
51891
|
}, "crmReadsOver");
|
|
51871
51892
|
|
|
51872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-contacts.js
|
|
51873
51894
|
var PLACEHOLDER = /(?:^|\s)null(?:\s+#\d+)?(?=\s|$)/gi;
|
|
51874
51895
|
var withoutPlaceholder = /* @__PURE__ */ __name((name) => name.replace(PLACEHOLDER, " ").replace(/\s+/g, " ").trim() || null, "withoutPlaceholder");
|
|
51875
51896
|
var DryRun = class extends Error {
|
|
@@ -51948,7 +51969,7 @@ var removeCrmContacts = /* @__PURE__ */ __name((context, key2, { users, before:
|
|
|
51948
51969
|
}
|
|
51949
51970
|
}, "removeCrmContacts");
|
|
51950
51971
|
|
|
51951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
51952
51973
|
var PENDING = "crm:pending-relations";
|
|
51953
51974
|
var PENDING_DAYS = 30;
|
|
51954
51975
|
var PENDING_MOST = 5e3;
|
|
@@ -52503,7 +52524,7 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
52503
52524
|
};
|
|
52504
52525
|
}, "crmCopiesOver");
|
|
52505
52526
|
|
|
52506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-files.js
|
|
52507
52528
|
import { sep } from "node:path";
|
|
52508
52529
|
var MOST = 500;
|
|
52509
52530
|
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");
|
|
@@ -52628,10 +52649,10 @@ var crmFilesOver = /* @__PURE__ */ __name((context) => {
|
|
|
52628
52649
|
};
|
|
52629
52650
|
}, "crmFilesOver");
|
|
52630
52651
|
|
|
52631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
52632
52653
|
import { createHash as createHash14, randomBytes as randomBytes2 } from "node:crypto";
|
|
52633
52654
|
|
|
52634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
52635
52656
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
52636
52657
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
52637
52658
|
var CALLBACK_PREFIX = "wcr1:";
|
|
@@ -52645,7 +52666,7 @@ var callbackDataOf = /* @__PURE__ */ __name((token) => {
|
|
|
52645
52666
|
}, "callbackDataOf");
|
|
52646
52667
|
var parseCallbackData = /* @__PURE__ */ __name((data) => typeof data === "string" ? CALLBACK.exec(data)?.[1] : void 0, "parseCallbackData");
|
|
52647
52668
|
|
|
52648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52669
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
52649
52670
|
var digestOf = /* @__PURE__ */ __name((token) => createHash14("sha256").update(token).digest("hex"), "digestOf");
|
|
52650
52671
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
52651
52672
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -52744,7 +52765,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
52744
52765
|
};
|
|
52745
52766
|
}, "decisionRequestStoreOver");
|
|
52746
52767
|
|
|
52747
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52768
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-listing.js
|
|
52748
52769
|
var MEETING_ROW_KINDS = ["meeting", "call", "event"];
|
|
52749
52770
|
var DAY9 = 864e5;
|
|
52750
52771
|
var JOINED = `(SELECT ce.event_id FROM calendar_entries ce JOIN events je ON je.id = ce.event_id
|
|
@@ -53131,7 +53152,7 @@ var meetingListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
53131
53152
|
};
|
|
53132
53153
|
}, "meetingListingOver");
|
|
53133
53154
|
|
|
53134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/document-listing.js
|
|
53135
53156
|
var DOCUMENT_KINDS = [
|
|
53136
53157
|
"transcript",
|
|
53137
53158
|
"doc",
|
|
@@ -53368,7 +53389,7 @@ var documentListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
53368
53389
|
};
|
|
53369
53390
|
}, "documentListingOver");
|
|
53370
53391
|
|
|
53371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
53372
53393
|
var NOTE_FIELDS = [
|
|
53373
53394
|
"text",
|
|
53374
53395
|
"exact",
|
|
@@ -53865,7 +53886,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
53865
53886
|
};
|
|
53866
53887
|
}, "noteSearchOver");
|
|
53867
53888
|
|
|
53868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53889
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
53869
53890
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
53870
53891
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
53871
53892
|
var EVENT_CORPUS = {
|
|
@@ -54005,7 +54026,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
54005
54026
|
};
|
|
54006
54027
|
}, "eventSearchOver");
|
|
54007
54028
|
|
|
54008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
54009
54030
|
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";
|
|
54010
54031
|
var iso13 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
54011
54032
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -54268,7 +54289,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54268
54289
|
};
|
|
54269
54290
|
}, "factsStoreOver");
|
|
54270
54291
|
|
|
54271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
54272
54293
|
var invalid5 = /* @__PURE__ */ __name((message3) => {
|
|
54273
54294
|
throw new CliError("validation_error", message3);
|
|
54274
54295
|
}, "invalid");
|
|
@@ -54436,7 +54457,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
54436
54457
|
return { snapshot: snapshot2, snapshotParts, previous, settle, keepWaiting, named: named2, sameDecision, create };
|
|
54437
54458
|
}, "findingsCoreOver");
|
|
54438
54459
|
|
|
54439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
54440
54461
|
var stale = /* @__PURE__ */ __name(() => {
|
|
54441
54462
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
54442
54463
|
reason: "evidence-findings.stale"
|
|
@@ -54700,7 +54721,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54700
54721
|
};
|
|
54701
54722
|
}, "evidenceFindingsStoreOver");
|
|
54702
54723
|
|
|
54703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54724
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
54704
54725
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
54705
54726
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
54706
54727
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -54754,7 +54775,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
54754
54775
|
}, "forPerson")
|
|
54755
54776
|
}), "involvementStoreOver");
|
|
54756
54777
|
|
|
54757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
54758
54779
|
var LABELLED = {
|
|
54759
54780
|
note: "note",
|
|
54760
54781
|
document: "document",
|
|
@@ -54767,7 +54788,7 @@ var LABELLED = {
|
|
|
54767
54788
|
};
|
|
54768
54789
|
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");
|
|
54769
54790
|
|
|
54770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
54771
54792
|
import { createHash as createHash15 } from "node:crypto";
|
|
54772
54793
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
54773
54794
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -54853,7 +54874,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
54853
54874
|
};
|
|
54854
54875
|
}, "meetingProjectsStoreOver");
|
|
54855
54876
|
|
|
54856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
54857
54878
|
var ORGANIZATIONS_QUERY = {
|
|
54858
54879
|
entity: "organization",
|
|
54859
54880
|
backend: "sql",
|
|
@@ -54894,7 +54915,7 @@ var REMINDERS_QUERY = {
|
|
|
54894
54915
|
})
|
|
54895
54916
|
};
|
|
54896
54917
|
|
|
54897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-categories.js
|
|
54898
54919
|
var OWN2 = "(SELECT id FROM organizations WHERE deleted_at IS NULL AND json_extract(metadata, '$.own') = 1)";
|
|
54899
54920
|
var EMPLOYED = "('employee', 'contractor', 'founder')";
|
|
54900
54921
|
var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now2) => {
|
|
@@ -54915,7 +54936,7 @@ var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now
|
|
|
54915
54936
|
return { sql: `EXISTS (SELECT 1 FROM links l WHERE ${where} AND ${usable})`, params: keys };
|
|
54916
54937
|
}, "categorySql");
|
|
54917
54938
|
|
|
54918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
54919
54940
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
54920
54941
|
id: String(row2.id),
|
|
54921
54942
|
ref: `organization:${row2.id}`,
|
|
@@ -54960,7 +54981,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
54960
54981
|
}), "setOwnOrganization")
|
|
54961
54982
|
}), "organizationsStoreOver");
|
|
54962
54983
|
|
|
54963
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54984
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
54964
54985
|
var KINDS = RELATION_KINDS.map(linkKind).join(", ");
|
|
54965
54986
|
var ACCOUNT_ENDS = [
|
|
54966
54987
|
["deal", "deals"],
|
|
@@ -55123,13 +55144,13 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
55123
55144
|
__name(proposalItem, "proposalItem");
|
|
55124
55145
|
}, "relationListOver");
|
|
55125
55146
|
|
|
55126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
55127
55148
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
55128
55149
|
...relationListOver(context),
|
|
55129
55150
|
...relationRolesOver(context)
|
|
55130
55151
|
}), "relationReadsOver");
|
|
55131
55152
|
|
|
55132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
55133
55154
|
var TABLES6 = { memory: "memories", fact: "facts" };
|
|
55134
55155
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
55135
55156
|
var DEFAULT_LIMIT = 500;
|
|
@@ -55372,16 +55393,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55372
55393
|
};
|
|
55373
55394
|
}, "sourceReviewStoreOver");
|
|
55374
55395
|
|
|
55375
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
55376
55397
|
import { createHash as createHash18 } from "node:crypto";
|
|
55377
55398
|
|
|
55378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55399
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
55379
55400
|
import { createHash as createHash17 } from "node:crypto";
|
|
55380
55401
|
|
|
55381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
55382
55403
|
import { createHash as createHash16 } from "node:crypto";
|
|
55383
55404
|
|
|
55384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55405
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
55385
55406
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
55386
55407
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
55387
55408
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -55432,7 +55453,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
55432
55453
|
return input;
|
|
55433
55454
|
}, "consolidationApplyInput");
|
|
55434
55455
|
|
|
55435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55456
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
55436
55457
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
55437
55458
|
id: String(row2.id),
|
|
55438
55459
|
sourceId: String(row2.source_id),
|
|
@@ -55507,7 +55528,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
55507
55528
|
}, { beforeCommit: check3 });
|
|
55508
55529
|
}, "applyTagConsolidation");
|
|
55509
55530
|
|
|
55510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
55511
55532
|
var selections = [
|
|
55512
55533
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
55513
55534
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -55651,7 +55672,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
55651
55672
|
};
|
|
55652
55673
|
}, "previewRows");
|
|
55653
55674
|
|
|
55654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
55655
55676
|
var kinds = ["project", "tag", "topic"];
|
|
55656
55677
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
55657
55678
|
if (signal?.aborted)
|
|
@@ -55915,7 +55936,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55915
55936
|
};
|
|
55916
55937
|
}, "vocabularyStoreOver");
|
|
55917
55938
|
|
|
55918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
55919
55940
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
55920
55941
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
55921
55942
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -56469,7 +56490,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
56469
56490
|
return key2.padEnd(3, "X");
|
|
56470
56491
|
}, "projectKey");
|
|
56471
56492
|
|
|
56472
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
56473
56494
|
var DAY10 = 864e5;
|
|
56474
56495
|
var SETTING5 = "logs_pruned_at";
|
|
56475
56496
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY10, botUpdatePayloadsMs: 30 * DAY10 };
|
|
@@ -56496,7 +56517,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
56496
56517
|
};
|
|
56497
56518
|
}, "logPruner");
|
|
56498
56519
|
|
|
56499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
56500
56521
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
56501
56522
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
56502
56523
|
var invalid7 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -56855,7 +56876,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
56855
56876
|
}, "checkMailFindings");
|
|
56856
56877
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
56857
56878
|
|
|
56858
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
56859
56880
|
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";
|
|
56860
56881
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
56861
56882
|
const { database, now: now2 } = context;
|
|
@@ -57070,7 +57091,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57070
57091
|
};
|
|
57071
57092
|
}, "ordersStoreOver");
|
|
57072
57093
|
|
|
57073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
57074
57095
|
var MAIL_EDITS = {
|
|
57075
57096
|
task: ["title", "type", "reason", "commitment", "project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence"],
|
|
57076
57097
|
fact: ["statement", "type", "reason", "subject", "project"],
|
|
@@ -57559,7 +57580,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
57559
57580
|
};
|
|
57560
57581
|
}, "mailFindingsStoreOver");
|
|
57561
57582
|
|
|
57562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57583
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
57563
57584
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
57564
57585
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
57565
57586
|
reason: "meeting-findings.stale"
|
|
@@ -57772,7 +57793,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57772
57793
|
};
|
|
57773
57794
|
}, "meetingFindingsStoreOver");
|
|
57774
57795
|
|
|
57775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
57776
57797
|
var RANK_BATCH = 512;
|
|
57777
57798
|
var LIVE6 = "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";
|
|
57778
57799
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -58043,7 +58064,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
58043
58064
|
}
|
|
58044
58065
|
}), "meetingVectorsOver");
|
|
58045
58066
|
|
|
58046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
58047
58068
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
58048
58069
|
var TEXTS = {
|
|
58049
58070
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -58144,7 +58165,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
58144
58165
|
};
|
|
58145
58166
|
}, "sourceMentionStoreOver");
|
|
58146
58167
|
|
|
58147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58168
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
58148
58169
|
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";
|
|
58149
58170
|
var MAX_SPLITS = 100;
|
|
58150
58171
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -58378,11 +58399,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
58378
58399
|
};
|
|
58379
58400
|
}, "transactionsStoreOver");
|
|
58380
58401
|
|
|
58381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
58382
58403
|
import { accessSync, constants, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
58383
58404
|
import { dirname as dirname2 } from "node:path";
|
|
58384
58405
|
|
|
58385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
58386
58407
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
58387
58408
|
var CLIENTS_SETTING = "clients";
|
|
58388
58409
|
var coreVersion = (() => {
|
|
@@ -58443,7 +58464,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
58443
58464
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
58444
58465
|
}, "refusalAdvice");
|
|
58445
58466
|
|
|
58446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58467
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
58447
58468
|
var GENERATED = [
|
|
58448
58469
|
{
|
|
58449
58470
|
"name": "20261010184427_initial",
|
|
@@ -59860,7 +59881,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
59860
59881
|
}
|
|
59861
59882
|
];
|
|
59862
59883
|
|
|
59863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
59864
59885
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
59865
59886
|
import { basename, dirname, join as join3, parse } from "node:path";
|
|
59866
59887
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -60093,7 +60114,7 @@ var rollBack2 = /* @__PURE__ */ __name((database, path) => {
|
|
|
60093
60114
|
return { ...result, foreignKeyViolations };
|
|
60094
60115
|
}, "rollBack");
|
|
60095
60116
|
|
|
60096
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
60097
60118
|
var V31_TABLES = [
|
|
60098
60119
|
"accounts",
|
|
60099
60120
|
"account_identities",
|
|
@@ -60265,7 +60286,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
60265
60286
|
return migrations;
|
|
60266
60287
|
}, "generatedMigrations");
|
|
60267
60288
|
|
|
60268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
60269
60290
|
var MIGRATIONS = generatedMigrations();
|
|
60270
60291
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
60271
60292
|
version INTEGER PRIMARY KEY,
|
|
@@ -60362,7 +60383,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
60362
60383
|
}
|
|
60363
60384
|
}, "migrate");
|
|
60364
60385
|
|
|
60365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
60366
60387
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
60367
60388
|
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 ?");
|
|
60368
60389
|
if (pending.get(0, 1) === void 0)
|
|
@@ -60384,7 +60405,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
60384
60405
|
}
|
|
60385
60406
|
}, "fillJoinKeys");
|
|
60386
60407
|
|
|
60387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
60388
60409
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
60389
60410
|
refuseOwnerStoreInTests(path);
|
|
60390
60411
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -60398,8 +60419,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
60398
60419
|
}, "openSqlite");
|
|
60399
60420
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
60400
60421
|
quietSqliteWarning();
|
|
60401
|
-
const { drizzle } = await import("./node-
|
|
60402
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
60422
|
+
const { drizzle } = await import("./node-ITDTNRRZ.js");
|
|
60423
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-IRAGRMEZ.js");
|
|
60403
60424
|
const client = await nodeClient(path, { readOnly });
|
|
60404
60425
|
try {
|
|
60405
60426
|
if (!readOnly)
|
|
@@ -60413,8 +60434,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
60413
60434
|
}
|
|
60414
60435
|
}, "openUnderNode");
|
|
60415
60436
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
60416
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
60417
|
-
const { drizzle } = await import("./bun-
|
|
60437
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-2BP7JDVO.js");
|
|
60438
|
+
const { drizzle } = await import("./bun-WO77T4LG.js");
|
|
60418
60439
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
60419
60440
|
try {
|
|
60420
60441
|
if (!readOnly)
|
|
@@ -60428,7 +60449,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
60428
60449
|
}
|
|
60429
60450
|
}, "openUnderBun");
|
|
60430
60451
|
|
|
60431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60452
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
60432
60453
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
60433
60454
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
60434
60455
|
try {
|
|
@@ -60496,7 +60517,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
60496
60517
|
});
|
|
60497
60518
|
}, "movePaymentFacts");
|
|
60498
60519
|
|
|
60499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
60500
60521
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
60501
60522
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
60502
60523
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -60514,7 +60535,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
60514
60535
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
60515
60536
|
}, "assertReadCompatible");
|
|
60516
60537
|
|
|
60517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
60518
60539
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
60519
60540
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
60520
60541
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -60560,7 +60581,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
60560
60581
|
});
|
|
60561
60582
|
}, "moveSuggestedLinks");
|
|
60562
60583
|
|
|
60563
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60584
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
60564
60585
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
60565
60586
|
var TEST_PROVIDER = "chat";
|
|
60566
60587
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -60581,7 +60602,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
60581
60602
|
}
|
|
60582
60603
|
}, "purgeTestAccounts");
|
|
60583
60604
|
|
|
60584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60605
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
60585
60606
|
var BACKFILL_ON_OPEN = 5e3;
|
|
60586
60607
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
60587
60608
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -60693,7 +60714,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
60693
60714
|
}
|
|
60694
60715
|
}, "openStoreContext");
|
|
60695
60716
|
|
|
60696
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
60697
60718
|
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";
|
|
60698
60719
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
60699
60720
|
const { database, now: now2 } = context;
|
|
@@ -60801,13 +60822,13 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60801
60822
|
};
|
|
60802
60823
|
}, "productsStoreOver");
|
|
60803
60824
|
|
|
60804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
60805
60826
|
import { createHash as createHash20 } from "node:crypto";
|
|
60806
60827
|
|
|
60807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
60808
60829
|
import { createHash as createHash19 } from "node:crypto";
|
|
60809
60830
|
|
|
60810
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
60811
60832
|
var text7 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
60812
60833
|
var ref = text7(2048);
|
|
60813
60834
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -60877,7 +60898,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
60877
60898
|
}))
|
|
60878
60899
|
});
|
|
60879
60900
|
|
|
60880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60901
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
60881
60902
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
60882
60903
|
var invalid10 = /* @__PURE__ */ __name((field4) => {
|
|
60883
60904
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -61010,7 +61031,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
61010
61031
|
return createHash19("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
61011
61032
|
}, "projectAnnotationsFingerprint");
|
|
61012
61033
|
|
|
61013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
61014
61035
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
61015
61036
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
61016
61037
|
var targetSchema = strictObject({
|
|
@@ -61117,7 +61138,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
61117
61138
|
}, "planBoundProjectAnnotations");
|
|
61118
61139
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
61119
61140
|
|
|
61120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61141
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
61121
61142
|
import { createHash as createHash21 } from "node:crypto";
|
|
61122
61143
|
var text8 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
61123
61144
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -61211,7 +61232,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
61211
61232
|
})).digest("hex");
|
|
61212
61233
|
}, "projectAnnotationSnapshotFingerprint");
|
|
61213
61234
|
|
|
61214
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61235
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
61215
61236
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
61216
61237
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
61217
61238
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -61228,7 +61249,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
61228
61249
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
61229
61250
|
}, "projectAnnotationRequest");
|
|
61230
61251
|
|
|
61231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
61232
61253
|
var SnapshotBudget = class {
|
|
61233
61254
|
static {
|
|
61234
61255
|
__name(this, "SnapshotBudget");
|
|
@@ -61254,13 +61275,13 @@ var SnapshotBudget = class {
|
|
|
61254
61275
|
}
|
|
61255
61276
|
};
|
|
61256
61277
|
|
|
61257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
61258
61279
|
import { createHash as createHash23 } from "node:crypto";
|
|
61259
61280
|
|
|
61260
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
61261
61282
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
61262
61283
|
|
|
61263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
61264
61285
|
import { createHash as createHash22 } from "node:crypto";
|
|
61265
61286
|
var invalid12 = /* @__PURE__ */ __name(() => {
|
|
61266
61287
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -61403,7 +61424,7 @@ var ProjectSnapshotSources = class {
|
|
|
61403
61424
|
}
|
|
61404
61425
|
};
|
|
61405
61426
|
|
|
61406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
61407
61428
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
61408
61429
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
61409
61430
|
}, "unsupported");
|
|
@@ -61581,7 +61602,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
61581
61602
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
61582
61603
|
}), "projectAnnotationSnapshot");
|
|
61583
61604
|
|
|
61584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61605
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
61585
61606
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
61586
61607
|
const current2 = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
61587
61608
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -61643,7 +61664,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
61643
61664
|
};
|
|
61644
61665
|
}), "previewAnnotationSnapshot");
|
|
61645
61666
|
|
|
61646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61667
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
61647
61668
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
61648
61669
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
61649
61670
|
if (link3.kind === "evidence" && to)
|
|
@@ -61710,7 +61731,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
61710
61731
|
return mappings;
|
|
61711
61732
|
}, "restoreAnnotationRecords");
|
|
61712
61733
|
|
|
61713
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61734
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
61714
61735
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
61715
61736
|
async preview(request) {
|
|
61716
61737
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -61740,7 +61761,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
61740
61761
|
}
|
|
61741
61762
|
}), "projectAnnotationStoreOver");
|
|
61742
61763
|
|
|
61743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61764
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
61744
61765
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
61745
61766
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
61746
61767
|
const sql2 = /* @__PURE__ */ __name((text9) => database.prepare(text9), "sql");
|
|
@@ -61811,7 +61832,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
61811
61832
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
61812
61833
|
}, "recordRelationsOver");
|
|
61813
61834
|
|
|
61814
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
61815
61836
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
61816
61837
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
61817
61838
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -61865,7 +61886,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
61865
61886
|
return { pointedAt, remap };
|
|
61866
61887
|
}, "recordRemapOver");
|
|
61867
61888
|
|
|
61868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61889
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
61869
61890
|
var runs = 0;
|
|
61870
61891
|
var PAGE = 500;
|
|
61871
61892
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -62078,7 +62099,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
62078
62099
|
return pointerOf("records", index2, "fields", key2);
|
|
62079
62100
|
}, "waitingPointer");
|
|
62080
62101
|
|
|
62081
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
62082
62103
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
62083
62104
|
var SCHEME = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
62084
62105
|
var ORG_EMAIL = "org-email";
|
|
@@ -62244,7 +62265,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
62244
62265
|
]);
|
|
62245
62266
|
}, "renameMade");
|
|
62246
62267
|
|
|
62247
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
62248
62269
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
62249
62270
|
name: given2(fields4, "name"),
|
|
62250
62271
|
unit: given2(fields4, "unit"),
|
|
@@ -62367,7 +62388,7 @@ var DIRECT_PROJECTORS = {
|
|
|
62367
62388
|
lead: dealProjector("lead")
|
|
62368
62389
|
};
|
|
62369
62390
|
|
|
62370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-document.js
|
|
62371
62392
|
var TEXT_ONLY = { storage: "text", localPath: null };
|
|
62372
62393
|
var textOf7 = /* @__PURE__ */ __name(({ fields: fields4, externalId }) => {
|
|
62373
62394
|
const text9 = String(fields4.text ?? "");
|
|
@@ -62436,7 +62457,7 @@ var DOCUMENT_PROJECTORS = {
|
|
|
62436
62457
|
}
|
|
62437
62458
|
};
|
|
62438
62459
|
|
|
62439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
62440
62461
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
62441
62462
|
const importer = authorActor(context, IMPORTER).actor;
|
|
62442
62463
|
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;
|
|
@@ -62646,7 +62667,7 @@ var MONEY_PROJECTORS = {
|
|
|
62646
62667
|
}
|
|
62647
62668
|
};
|
|
62648
62669
|
|
|
62649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62670
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
62650
62671
|
var CALLS_CALENDAR = "calls";
|
|
62651
62672
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
62652
62673
|
if (!isImportedProvider(source2.provider))
|
|
@@ -62821,7 +62842,7 @@ var PHONE_PROJECTORS = {
|
|
|
62821
62842
|
}
|
|
62822
62843
|
};
|
|
62823
62844
|
|
|
62824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
62825
62846
|
var RECORD_PROJECTORS = {
|
|
62826
62847
|
...MONEY_PROJECTORS,
|
|
62827
62848
|
...DIRECT_PROJECTORS,
|
|
@@ -62832,7 +62853,7 @@ var RECORD_PROJECTORS = {
|
|
|
62832
62853
|
project: null
|
|
62833
62854
|
};
|
|
62834
62855
|
|
|
62835
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
62836
62857
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
62837
62858
|
const sql2 = /* @__PURE__ */ __name((text9) => database.prepare(text9), "sql");
|
|
62838
62859
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -62894,7 +62915,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
62894
62915
|
return { settle, checkShares };
|
|
62895
62916
|
}, "recordSettlingOver");
|
|
62896
62917
|
|
|
62897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
62898
62919
|
import { createHash as createHash24 } from "node:crypto";
|
|
62899
62920
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
62900
62921
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -62910,7 +62931,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
62910
62931
|
return { stamp, untouched };
|
|
62911
62932
|
}, "importStampsOver");
|
|
62912
62933
|
|
|
62913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62934
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
62914
62935
|
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";
|
|
62915
62936
|
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";
|
|
62916
62937
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -63147,7 +63168,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
63147
63168
|
};
|
|
63148
63169
|
}, "subscriptionsStoreOver");
|
|
63149
63170
|
|
|
63150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
63151
63172
|
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";
|
|
63152
63173
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
63153
63174
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -63272,7 +63293,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
63272
63293
|
};
|
|
63273
63294
|
}, "walletsStoreOver");
|
|
63274
63295
|
|
|
63275
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63296
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
63276
63297
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
63277
63298
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
63278
63299
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -63531,7 +63552,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
63531
63552
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
63532
63553
|
}, "recordWritesOver");
|
|
63533
63554
|
|
|
63534
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63555
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
63535
63556
|
var LIMIT = 1e3;
|
|
63536
63557
|
var iso16 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
63537
63558
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -63755,7 +63776,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
63755
63776
|
};
|
|
63756
63777
|
}, "recordStoreOver");
|
|
63757
63778
|
|
|
63758
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63779
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/templates.js
|
|
63759
63780
|
var templateOf = /* @__PURE__ */ __name((row2) => ({
|
|
63760
63781
|
key: row2.key,
|
|
63761
63782
|
channel: row2.channel,
|
|
@@ -63810,12 +63831,12 @@ var storedTemplateBodies = /* @__PURE__ */ __name((database, key2, language) =>
|
|
|
63810
63831
|
return Object.fromEntries(rows.map((row2) => [row2.channel, row2.body]));
|
|
63811
63832
|
}, "storedTemplateBodies");
|
|
63812
63833
|
|
|
63813
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/domain/tracker.js
|
|
63814
63835
|
var trackerTitleOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "issue" ? record3.title : kind3 === "comment" ? record3.body.split("\n")[0]?.slice(0, 120) || "(comment)" : record3.name, "trackerTitleOf");
|
|
63815
63836
|
var trackerBodyOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "comment" ? record3.body : kind3 === "issue" || kind3 === "project" ? record3.description : null, "trackerBodyOf");
|
|
63816
63837
|
var trackerParentOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "comment" ? record3.issue : kind3 === "state" || kind3 === "label" ? record3.team : kind3 === "issue" ? record3.team : null, "trackerParentOf");
|
|
63817
63838
|
|
|
63818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/tracker.js
|
|
63819
63840
|
var MOST2 = 500;
|
|
63820
63841
|
var itemOf = /* @__PURE__ */ __name((row2) => ({
|
|
63821
63842
|
kind: String(row2.kind),
|
|
@@ -63985,7 +64006,7 @@ var trackerStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
63985
64006
|
};
|
|
63986
64007
|
}, "trackerStoreOver");
|
|
63987
64008
|
|
|
63988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
63989
64010
|
var refusalOf2 = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
63990
64011
|
var wrapped2 = /* @__PURE__ */ new WeakMap();
|
|
63991
64012
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -64020,7 +64041,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
64020
64041
|
return proxy;
|
|
64021
64042
|
}, "storeErrors");
|
|
64022
64043
|
|
|
64023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64044
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
64024
64045
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
64025
64046
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
64026
64047
|
let merged2 = { from: from2, to };
|
|
@@ -64033,7 +64054,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
64033
64054
|
}, "markRange");
|
|
64034
64055
|
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");
|
|
64035
64056
|
|
|
64036
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
64037
64058
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
64038
64059
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
64039
64060
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -64054,7 +64075,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
64054
64075
|
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);
|
|
64055
64076
|
}, "setTaskAnalysisMark");
|
|
64056
64077
|
|
|
64057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
64058
64079
|
var keyOf6 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
64059
64080
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
64060
64081
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf6(account));
|
|
@@ -64064,7 +64085,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
64064
64085
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf6(account), JSON.stringify(until), now2);
|
|
64065
64086
|
}, "setTaskRulesStop");
|
|
64066
64087
|
|
|
64067
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
64068
64089
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
64069
64090
|
const { database } = context;
|
|
64070
64091
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -64123,7 +64144,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
64123
64144
|
};
|
|
64124
64145
|
}, "syncStoreOver");
|
|
64125
64146
|
|
|
64126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
64127
64148
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
64128
64149
|
const { database } = context;
|
|
64129
64150
|
return {
|
|
@@ -64145,7 +64166,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
64145
64166
|
};
|
|
64146
64167
|
}, "tagsStoreOver");
|
|
64147
64168
|
|
|
64148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
64149
64170
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
64150
64171
|
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
|
|
64151
64172
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -64272,7 +64293,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
64272
64293
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
64273
64294
|
}, "savePictureChunks");
|
|
64274
64295
|
|
|
64275
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64296
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
64276
64297
|
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,
|
|
64277
64298
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
64278
64299
|
FROM messages m
|
|
@@ -64361,7 +64382,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
64361
64382
|
return plain2(best(found2));
|
|
64362
64383
|
}, "nearestMessages");
|
|
64363
64384
|
|
|
64364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
64365
64386
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
64366
64387
|
const { database } = context;
|
|
64367
64388
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -64520,12 +64541,12 @@ var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
|
64520
64541
|
});
|
|
64521
64542
|
return cleared;
|
|
64522
64543
|
}, "clearVectors"),
|
|
64523
|
-
nearestConversations: /* @__PURE__ */ __name(async (key2, { chatId, model, since, limit, query, exclude, conversations: conversations2, scope: scope3, projectId: projectId2, personId, before: before2 }) => {
|
|
64544
|
+
nearestConversations: /* @__PURE__ */ __name(async (key2, { chatId, model, since, limit, query, exclude, conversations: conversations2, scope: scope3, projectId: projectId2, personId, before: before2, fromOwner }) => {
|
|
64524
64545
|
const accountPk2 = findAccountPk2(key2);
|
|
64525
64546
|
if (accountPk2 === void 0)
|
|
64526
64547
|
return [];
|
|
64527
64548
|
const chatKey = chatId === void 0 ? void 0 : chatKeyOf(key2, chatId);
|
|
64528
|
-
const mailToo = key2.provider === "email" && conversations2 === void 0 && scope3 === void 0 && projectId2 === void 0 && personId === void 0 && before2 === void 0;
|
|
64549
|
+
const mailToo = key2.provider === "email" && conversations2 === void 0 && scope3 === void 0 && projectId2 === void 0 && personId === void 0 && before2 === void 0 && !fromOwner;
|
|
64529
64550
|
const mailHits = /* @__PURE__ */ __name(async () => mailToo ? (await mail().nearest(model, query, {
|
|
64530
64551
|
accountId: accountPk2,
|
|
64531
64552
|
limit,
|
|
@@ -64550,7 +64571,8 @@ var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
|
64550
64571
|
...scope3 === void 0 ? {} : { scope: scope3 },
|
|
64551
64572
|
...projectId2 === void 0 ? {} : { projectId: Number(projectId2) },
|
|
64552
64573
|
...personId === void 0 ? {} : { personId: Number(personId) },
|
|
64553
|
-
...before2 === void 0 ? {} : { before: Date.parse(before2) }
|
|
64574
|
+
...before2 === void 0 ? {} : { before: Date.parse(before2) },
|
|
64575
|
+
...fromOwner ? { fromOwner } : {}
|
|
64554
64576
|
});
|
|
64555
64577
|
const found2 = summariesOf(context, accountPk2, nearest2.map(({ conversationPk }) => conversationPk));
|
|
64556
64578
|
const ids3 = messageIds(context, nearest2.flatMap(({ firstMessagePk, lastMessagePk }) => [firstMessagePk, lastMessagePk]));
|
|
@@ -64624,7 +64646,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
64624
64646
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
64625
64647
|
}), "vectorsStoreOver");
|
|
64626
64648
|
|
|
64627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
64628
64650
|
import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
64629
64651
|
import { dirname as dirname3, join as join4 } from "node:path";
|
|
64630
64652
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -64712,10 +64734,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
64712
64734
|
}
|
|
64713
64735
|
}, "lastBackup");
|
|
64714
64736
|
|
|
64715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
64716
64738
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
64717
64739
|
|
|
64718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64740
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
64719
64741
|
var COUNTED_TABLES = [
|
|
64720
64742
|
"accounts",
|
|
64721
64743
|
"chats",
|
|
@@ -64800,7 +64822,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
64800
64822
|
};
|
|
64801
64823
|
}, "storeContents");
|
|
64802
64824
|
|
|
64803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.703.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_5630bd43f49d4f78ecc9c491970e88a0/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
64804
64826
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
64805
64827
|
const context = await openStoreContext(options);
|
|
64806
64828
|
try {
|