@wirecat/cli-memo 0.131.59 → 0.131.60
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/dist/bin/memo.js +2 -2
- package/dist/bundle/{all-profiles-LHATPBN3.js → all-profiles-NUBT2FJI.js} +5 -5
- package/dist/bundle/{anthropic-ZCFY7X3V.js → anthropic-QNTKWSQT.js} +3 -3
- package/dist/bundle/{app-server-LMNKI46N.js → app-server-6TXXVCSE.js} +35 -35
- package/dist/bundle/auto-4VLWHDG7.js +86 -0
- package/dist/bundle/{bun-Z5XDW2UR.js → bun-3NYKD7YB.js} +2 -2
- package/dist/bundle/{bun-sqlite-GC55XSRP.js → bun-sqlite-IIJSZ5I2.js} +2 -2
- package/dist/bundle/{chunk-ZELDY6H4.js → chunk-25N2ZCXV.js} +2 -2
- package/dist/bundle/{chunk-7H45WVOV.js → chunk-3M237SBK.js} +5 -5
- package/dist/bundle/{chunk-SK3GNZFF.js → chunk-4II6DM7L.js} +10 -10
- package/dist/bundle/{chunk-GKRSFUAN.js → chunk-4RSPI6OR.js} +1 -1
- package/dist/bundle/{chunk-KG6HO3XP.js → chunk-4VAKZH56.js} +2 -2
- package/dist/bundle/{chunk-3L6SQL6I.js → chunk-636FK3A6.js} +1 -1
- package/dist/bundle/{chunk-CQ7NDIKS.js → chunk-67CIUJO6.js} +1 -1
- package/dist/bundle/{chunk-7FAFZQYC.js → chunk-67L6BQOD.js} +4 -4
- package/dist/bundle/{chunk-5QRRSPCL.js → chunk-6NYZ32K5.js} +2 -2
- package/dist/bundle/{chunk-MF3B3UAK.js → chunk-AEATD5XH.js} +21 -21
- package/dist/bundle/{chunk-BIKOHAZH.js → chunk-B6R7O3U5.js} +1 -1
- package/dist/bundle/{chunk-7FY7DHFV.js → chunk-BYIKFYRY.js} +2 -2
- package/dist/bundle/{chunk-XGR7ND66.js → chunk-BZZRBJ2C.js} +28 -28
- package/dist/bundle/{chunk-SJAX32ZF.js → chunk-CZPAYIQR.js} +1 -1
- package/dist/bundle/{chunk-ENVEZQ2F.js → chunk-CZUMANL4.js} +4 -4
- package/dist/bundle/{chunk-ABLNLLM6.js → chunk-DZKTPOTJ.js} +31 -31
- package/dist/bundle/{chunk-PPZCQ6DC.js → chunk-EMU7UIUA.js} +2 -2
- package/dist/bundle/{chunk-CBNN7VP2.js → chunk-FH56EHWA.js} +6 -6
- package/dist/bundle/{chunk-BFDN7ZRX.js → chunk-FXXXBLZD.js} +5 -5
- package/dist/bundle/{chunk-MTIAWKHJ.js → chunk-G6P5NWIZ.js} +1 -1
- package/dist/bundle/{chunk-7IMLRFCG.js → chunk-GGGIUXKD.js} +3 -3
- package/dist/bundle/{chunk-UTCOTLJP.js → chunk-GLPSPFTP.js} +4 -4
- package/dist/bundle/{chunk-IKMCUKAE.js → chunk-HF2W6622.js} +4 -4
- package/dist/bundle/{chunk-M4C4PD6O.js → chunk-IJKXX7LB.js} +1 -1
- package/dist/bundle/{chunk-ROYHEBF4.js → chunk-KMA63WO5.js} +4 -4
- package/dist/bundle/{chunk-NQBV7NNO.js → chunk-KOBVPWMU.js} +49 -49
- package/dist/bundle/{chunk-JCHC5EEV.js → chunk-L3G5UY2P.js} +4 -4
- package/dist/bundle/{chunk-W6HT56DV.js → chunk-LXQ56N66.js} +8 -8
- package/dist/bundle/{chunk-FHTIB66O.js → chunk-LZFQZOAL.js} +256 -256
- package/dist/bundle/{chunk-775KV34P.js → chunk-LZQ7QENQ.js} +62 -62
- package/dist/bundle/{chunk-M36WYT62.js → chunk-MCPHBBJL.js} +1 -1
- package/dist/bundle/{chunk-TWHA3OB2.js → chunk-MV6M3VR3.js} +9 -9
- package/dist/bundle/{chunk-HBY2VTP6.js → chunk-MYVP4IFW.js} +3 -3
- package/dist/bundle/{chunk-EXIFPE4R.js → chunk-ND2PQA4X.js} +2 -2
- package/dist/bundle/{chunk-FYG52VXO.js → chunk-NMWIWQ7J.js} +1 -1
- package/dist/bundle/{chunk-N57QFHPJ.js → chunk-NSEX4YST.js} +7 -7
- package/dist/bundle/{chunk-PQEJBESM.js → chunk-NX4XCS64.js} +21 -21
- package/dist/bundle/{chunk-MIJKJNIA.js → chunk-NXV3USUU.js} +3 -3
- package/dist/bundle/{chunk-UQWLLRYP.js → chunk-O55ELCFO.js} +1 -1
- package/dist/bundle/{chunk-YA7YYH3E.js → chunk-PMGGNQHL.js} +1 -1
- package/dist/bundle/{chunk-3HX5I5KX.js → chunk-PNIAEDGJ.js} +332 -332
- package/dist/bundle/{chunk-A6HTI2EV.js → chunk-RC2NAT7T.js} +12 -12
- package/dist/bundle/{chunk-4JBR277T.js → chunk-RU34XFKL.js} +1 -1
- package/dist/bundle/{chunk-HPMEODWD.js → chunk-S2VXXF4H.js} +2 -2
- package/dist/bundle/{chunk-SB44NDKV.js → chunk-S56CC44R.js} +7 -7
- package/dist/bundle/{chunk-AQ44SSA2.js → chunk-SSKSRETJ.js} +9 -9
- package/dist/bundle/{chunk-LWVCZPQF.js → chunk-SU2EPGGH.js} +12 -12
- package/dist/bundle/{chunk-WJ3VJYM4.js → chunk-SYJMQIIJ.js} +2 -2
- package/dist/bundle/{chunk-2ALNQ3ZG.js → chunk-TLZEAHCB.js} +5 -5
- package/dist/bundle/{chunk-V5E55COY.js → chunk-VGLDBSGN.js} +5 -5
- package/dist/bundle/{chunk-WFF7X6LI.js → chunk-VUJANY4X.js} +6 -6
- package/dist/bundle/{chunk-OD5IBWOB.js → chunk-WUOQ7CQU.js} +4 -4
- package/dist/bundle/{chunk-UTLAFKFU.js → chunk-XBSLZQY4.js} +272 -270
- package/dist/bundle/{chunk-IRFXP5R5.js → chunk-XW4NE2NW.js} +1 -1
- package/dist/bundle/{chunk-PPJXTU54.js → chunk-XXZ3WQSW.js} +150 -150
- package/dist/bundle/{chunk-YO4PT3MD.js → chunk-YXBMP74S.js} +1 -1
- package/dist/bundle/{chunk-Z2R4SK5Q.js → chunk-Z3SASH3J.js} +1 -1
- package/dist/bundle/{command-contract-XKSGEPXG.js → command-contract-KE77NBYG.js} +11 -11
- package/dist/bundle/{decode-6PPIALX2.js → decode-AD352TI2.js} +2 -2
- package/dist/bundle/{echarts-XQ7T6SKK.js → echarts-VCQEG6RB.js} +2 -2
- package/dist/bundle/{embed-W56IWO4I.js → embed-A2YCI5TM.js} +3 -3
- package/dist/bundle/{embedder-IWJHHYLE.js → embedder-G35OKUR5.js} +6 -6
- package/dist/bundle/{entry-OZSQA6IT.js → entry-3Y2C4AAL.js} +4 -4
- package/dist/bundle/failure-GHNN2IIX.js +66 -0
- package/dist/bundle/{first-run-LT5QD4MA.js → first-run-RDQFQ5MD.js} +5 -5
- package/dist/bundle/{first-screen-IMWQP24U.js → first-screen-XWHL4AEK.js} +12 -12
- package/dist/bundle/{instructions-DHUIJMK4.js → instructions-VWX5TPRM.js} +1 -1
- package/dist/bundle/{mcp-3X7LMJSZ.js → mcp-JHDRZPSO.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-BSK32EM3.js → node-OCRAUHTJ.js} +2 -2
- package/dist/bundle/{node-sqlite-SYF7X36U.js → node-sqlite-UIZIEENG.js} +3 -3
- package/dist/bundle/{oauth-ZEWUPRPD.js → oauth-WZOYRQA4.js} +4 -4
- package/dist/bundle/{open-4EKQE47K.js → open-ITE5EG22.js} +2 -2
- package/dist/bundle/{openai-UGNJPON6.js → openai-S4TD7H5G.js} +7 -7
- package/dist/bundle/{process-KQ5PLFEX.js → process-Z7OS65OQ.js} +1 -1
- package/dist/bundle/{program-WSVJK4LB.js → program-PYCRRMXK.js} +55 -55
- package/dist/bundle/{prompt-KA6BE6HG.js → prompt-NW2KOEQS.js} +2 -2
- package/dist/bundle/{recognize-ZM75USNS.js → recognize-65IM7MS4.js} +1 -1
- package/dist/bundle/{remote-I5MIVEGH.js → remote-4EOO533Z.js} +4 -4
- package/dist/bundle/{rerank-46KI3363.js → rerank-LKRFHRN6.js} +4 -4
- package/dist/bundle/{serve-QE4CSBAB.js → serve-SIB2TBOF.js} +6 -6
- package/dist/bundle/server-DO3J7CR5.js +48 -0
- package/dist/bundle/{server-EFNICTJC.js → server-JZAL3SRH.js} +50 -50
- package/dist/bundle/server-NQLMHLMU.js +61 -0
- package/dist/bundle/{state-2W2BFTG7.js → state-245GTWCO.js} +3 -3
- package/dist/bundle/{store-M4Q4BIDW.js → store-2QSJI77T.js} +9 -9
- package/dist/bundle/store-maintenance-command-F7FSHWHW.js +48 -0
- package/dist/bundle/update-NENHRNFS.js +69 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/auto-MWAOY7KC.js +0 -86
- package/dist/bundle/failure-2V4YXERK.js +0 -66
- package/dist/bundle/server-J3VKU7NQ.js +0 -48
- package/dist/bundle/server-MLOQ4RS7.js +0 -61
- package/dist/bundle/store-maintenance-command-KYCDTJQ2.js +0 -48
- package/dist/bundle/update-JEYA6GXL.js +0 -69
- /package/dist/bundle/{chunk-DZ2GIEEY.js → chunk-GK2FRFM6.js} +0 -0
|
@@ -136,12 +136,12 @@ import {
|
|
|
136
136
|
walkQuery,
|
|
137
137
|
walletLine,
|
|
138
138
|
zonedMoment
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-LZQ7QENQ.js";
|
|
140
140
|
import {
|
|
141
141
|
holdsCredential,
|
|
142
142
|
secretNamed,
|
|
143
143
|
sqliteCode
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-4VAKZH56.js";
|
|
145
145
|
import {
|
|
146
146
|
DEFAULT_STEMMERS,
|
|
147
147
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -154,27 +154,27 @@ import {
|
|
|
154
154
|
fold,
|
|
155
155
|
normalize,
|
|
156
156
|
parseStemmers
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-S56CC44R.js";
|
|
158
158
|
import {
|
|
159
159
|
DEFAULT_TASK_CATEGORIES,
|
|
160
160
|
sharedConfigPath,
|
|
161
161
|
storedTaskCategories,
|
|
162
162
|
taskCategoriesReader
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-KMA63WO5.js";
|
|
164
164
|
import {
|
|
165
165
|
refuseOwnerStoreInTests,
|
|
166
166
|
storePath
|
|
167
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-4RSPI6OR.js";
|
|
168
168
|
import {
|
|
169
169
|
quietSqliteWarning,
|
|
170
170
|
storeCapable
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-VGLDBSGN.js";
|
|
172
172
|
import {
|
|
173
173
|
PRAGMAS,
|
|
174
174
|
TIME_LIMIT_FUNCTION,
|
|
175
175
|
TimeLimitReached,
|
|
176
176
|
isQueryOnly
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-NMWIWQ7J.js";
|
|
178
178
|
import {
|
|
179
179
|
array,
|
|
180
180
|
boolean,
|
|
@@ -225,7 +225,7 @@ import {
|
|
|
225
225
|
sql,
|
|
226
226
|
sqliteTable,
|
|
227
227
|
text
|
|
228
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-RU34XFKL.js";
|
|
229
229
|
import {
|
|
230
230
|
__commonJS,
|
|
231
231
|
__name,
|
|
@@ -9969,7 +9969,7 @@ var require_cjs = __commonJS({
|
|
|
9969
9969
|
}
|
|
9970
9970
|
});
|
|
9971
9971
|
|
|
9972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
9973
9973
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
9974
9974
|
const methods = whole;
|
|
9975
9975
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10097,7 +10097,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10097
10097
|
};
|
|
10098
10098
|
}, "bindAccount");
|
|
10099
10099
|
|
|
10100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10100
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
10101
10101
|
var SCHEME = "msg:";
|
|
10102
10102
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat: chat2, message: message3 }) => SCHEME + [provider, account, chat2, message3].map(encodeURIComponent).join("/"), "formatLocator");
|
|
10103
10103
|
var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -10111,7 +10111,7 @@ var parseLocator = /* @__PURE__ */ __name((reference2) => {
|
|
|
10111
10111
|
return { provider, account, chat: chat2, message: message3 };
|
|
10112
10112
|
}, "parseLocator");
|
|
10113
10113
|
|
|
10114
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
10115
10115
|
var SIMPLE_REFERENCES = [
|
|
10116
10116
|
"note",
|
|
10117
10117
|
"document",
|
|
@@ -10267,7 +10267,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text7) => {
|
|
|
10267
10267
|
return match !== null && byPrefix.has(match[1]);
|
|
10268
10268
|
}, "looksLikeReference");
|
|
10269
10269
|
|
|
10270
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10270
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
10271
10271
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
|
|
10272
10272
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
10273
10273
|
var PROVIDERS = [
|
|
@@ -10430,7 +10430,7 @@ var holdsKind = /* @__PURE__ */ __name((provider, kind4) => kindsIn(provider).in
|
|
|
10430
10430
|
var holdsKindOf = /* @__PURE__ */ __name((provider, kind4) => kindIn(provider) === void 0 ? kind4 === "messages" : holdsKind(provider, kind4), "holdsKindOf");
|
|
10431
10431
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
10432
10432
|
|
|
10433
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
10434
10434
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
10435
10435
|
var inSource = /* @__PURE__ */ __name((source2, provider) => source2 === "all" || source2 === "bots" && isBotProvider(provider) || source2 === "personal" && !isBotProvider(provider) || source2 === provider || providerNamed(source2)?.name === provider || isKind(source2) && holdsKindOf(provider, source2), "inSource");
|
|
10436
10436
|
var fail = /* @__PURE__ */ __name((message3) => {
|
|
@@ -10453,7 +10453,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
10453
10453
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
10454
10454
|
}, "sourceOf");
|
|
10455
10455
|
|
|
10456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10456
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
10457
10457
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
10458
10458
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
10459
10459
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -10651,7 +10651,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf2 = (kind4)
|
|
|
10651
10651
|
return { accounts: [...chosen.values()], skipped };
|
|
10652
10652
|
}, "fitting");
|
|
10653
10653
|
|
|
10654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10654
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10655
10655
|
var IndexBuilderOn = class {
|
|
10656
10656
|
static {
|
|
10657
10657
|
__name(this, "IndexBuilderOn");
|
|
@@ -10846,7 +10846,7 @@ function alias(table, alias2) {
|
|
|
10846
10846
|
}
|
|
10847
10847
|
__name(alias, "alias");
|
|
10848
10848
|
|
|
10849
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/record-fields.js
|
|
10850
10850
|
var DECIMAL_PATTERN = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
10851
10851
|
var SIGNED_DECIMAL = "^-?[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
10852
10852
|
var DAY = "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
|
|
@@ -10965,7 +10965,7 @@ var fieldError = /* @__PURE__ */ __name((schema, value, at = []) => {
|
|
|
10965
10965
|
return void 0;
|
|
10966
10966
|
}, "fieldError");
|
|
10967
10967
|
|
|
10968
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/record-types.js
|
|
10969
10969
|
var kept = /* @__PURE__ */ __name((description) => ({ description }), "kept");
|
|
10970
10970
|
var PARTY = ["person", "organization"];
|
|
10971
10971
|
var ORGANIZATION = ["organization"];
|
|
@@ -11338,7 +11338,7 @@ var hasV1Roles = /* @__PURE__ */ __name((type) => rolesOf2(type).some(([, role])
|
|
|
11338
11338
|
var IDENTITY_TYPES = RECORD_ENTITY_TYPES.filter((type) => RECORD_TYPES[type].review === "identity");
|
|
11339
11339
|
var article = /* @__PURE__ */ __name((word2) => /^[aeiou]/.test(word2) ? "an" : "a", "article");
|
|
11340
11340
|
|
|
11341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11341
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
11342
11342
|
var ENTITY_TABLES = {
|
|
11343
11343
|
...RECORD_TABLES,
|
|
11344
11344
|
account: "accounts",
|
|
@@ -11376,14 +11376,14 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
11376
11376
|
return { table, pointer, type, count, known: known2 };
|
|
11377
11377
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
11378
11378
|
|
|
11379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/source-review.js
|
|
11380
11380
|
var SOURCE_REVIEW_KIND = "memory_source_review";
|
|
11381
11381
|
var SOURCE_REVIEW_CAUSES = ["changed", "outdated", "deleted", "contradicted"];
|
|
11382
11382
|
var ERASED_TEXT = "[source erased]";
|
|
11383
11383
|
var severity = /* @__PURE__ */ __name((cause) => SOURCE_REVIEW_CAUSES.indexOf(cause), "severity");
|
|
11384
11384
|
var graver = /* @__PURE__ */ __name((a, b) => severity(b) > severity(a) ? b : a, "graver");
|
|
11385
11385
|
|
|
11386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
11387
11387
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
11388
11388
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
11389
11389
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -11440,7 +11440,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
11440
11440
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
11441
11441
|
}, "proposedBySql");
|
|
11442
11442
|
|
|
11443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
|
|
11444
11444
|
var TABLES = { memory: "memories", fact: "facts" };
|
|
11445
11445
|
var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
|
|
11446
11446
|
var KEPT = 20;
|
|
@@ -11535,7 +11535,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
|
|
|
11535
11535
|
return scrubbed;
|
|
11536
11536
|
}, "scrubSourceReviews");
|
|
11537
11537
|
|
|
11538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
11539
11539
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
11540
11540
|
var REFERABLE = {
|
|
11541
11541
|
...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
|
|
@@ -11695,7 +11695,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
11695
11695
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
11696
11696
|
}, "taskIdOf");
|
|
11697
11697
|
|
|
11698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
|
|
11699
11699
|
var QUOTE_LIMIT = 500;
|
|
11700
11700
|
var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
|
|
11701
11701
|
var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
|
|
@@ -11973,7 +11973,7 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at) => {
|
|
|
11973
11973
|
database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
|
|
11974
11974
|
}, "deleteDocumentRow");
|
|
11975
11975
|
|
|
11976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
11977
11977
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
11978
11978
|
id: integer("id").primaryKey(),
|
|
11979
11979
|
name: text("name").notNull().unique(),
|
|
@@ -11982,7 +11982,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
11982
11982
|
updatedAt: integer("updated_at").notNull()
|
|
11983
11983
|
});
|
|
11984
11984
|
|
|
11985
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11985
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
|
|
11986
11986
|
var linkRevisions = sqliteTable("link_revisions", {
|
|
11987
11987
|
id: integer("id").primaryKey(),
|
|
11988
11988
|
linkId: integer("link_id").notNull(),
|
|
@@ -11994,7 +11994,7 @@ var linkRevisions = sqliteTable("link_revisions", {
|
|
|
11994
11994
|
createdAt: integer("created_at").notNull()
|
|
11995
11995
|
}, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
|
|
11996
11996
|
|
|
11997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
11998
11998
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
11999
11999
|
sourceKey: text("source_key").notNull(),
|
|
12000
12000
|
collection: text("collection").notNull(),
|
|
@@ -12004,13 +12004,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
12004
12004
|
createdAt: integer("created_at").notNull()
|
|
12005
12005
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
12006
12006
|
|
|
12007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12007
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
12008
12008
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
12009
12009
|
id: integer("id").notNull(),
|
|
12010
12010
|
indexableType: text("indexable_type").notNull()
|
|
12011
12011
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
12012
12012
|
|
|
12013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12013
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
12014
12014
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
12015
12015
|
id: integer("id").primaryKey(),
|
|
12016
12016
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -12030,7 +12030,7 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
12030
12030
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
12031
12031
|
]);
|
|
12032
12032
|
|
|
12033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12033
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
|
|
12034
12034
|
var links = sqliteTable("links", {
|
|
12035
12035
|
id: integer("id").primaryKey(),
|
|
12036
12036
|
fromType: text("from_type").notNull(),
|
|
@@ -12061,7 +12061,7 @@ var links = sqliteTable("links", {
|
|
|
12061
12061
|
index("links_by_to_type_to_id").on(table.toType, table.toId)
|
|
12062
12062
|
]);
|
|
12063
12063
|
|
|
12064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
12065
12065
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
12066
12066
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
12067
12067
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -12087,7 +12087,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
12087
12087
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
12088
12088
|
]);
|
|
12089
12089
|
|
|
12090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12090
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
12091
12091
|
var accounts = sqliteTable("accounts", {
|
|
12092
12092
|
id: integer("id").primaryKey(),
|
|
12093
12093
|
provider: text("provider").notNull(),
|
|
@@ -14083,10 +14083,10 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
14083
14083
|
at: integer("at").notNull()
|
|
14084
14084
|
});
|
|
14085
14085
|
|
|
14086
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14086
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
14087
14087
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
14088
14088
|
|
|
14089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
14090
14090
|
var ARMS = [
|
|
14091
14091
|
[
|
|
14092
14092
|
"message",
|
|
@@ -14214,7 +14214,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
14214
14214
|
return recomputed;
|
|
14215
14215
|
}, "drainInvolvementQueue");
|
|
14216
14216
|
|
|
14217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
14218
14218
|
import { domainToUnicode } from "node:url";
|
|
14219
14219
|
|
|
14220
14220
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -24236,7 +24236,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
24236
24236
|
}, "oa");
|
|
24237
24237
|
var na = { parse: O, get: aa, isValid: oa };
|
|
24238
24238
|
|
|
24239
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
24240
24240
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
24241
24241
|
var ID = /^[\w-]{10,}$/;
|
|
24242
24242
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -24278,7 +24278,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text7) => [...text7.matchAll(L
|
|
|
24278
24278
|
return { url, documentId: googleDocumentId(url) };
|
|
24279
24279
|
}), "googleDocumentLinks");
|
|
24280
24280
|
|
|
24281
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
24282
24282
|
var PHONE_PLANS = [
|
|
24283
24283
|
{
|
|
24284
24284
|
country: "us",
|
|
@@ -24658,7 +24658,7 @@ var PHONE_PLANS = [
|
|
|
24658
24658
|
}
|
|
24659
24659
|
];
|
|
24660
24660
|
|
|
24661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
24662
24662
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
24663
24663
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
24664
24664
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -24699,7 +24699,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
24699
24699
|
return void 0;
|
|
24700
24700
|
}, "nationalPhone");
|
|
24701
24701
|
|
|
24702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24702
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
24703
24703
|
var BEFORE = [
|
|
24704
24704
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
24705
24705
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -24959,7 +24959,7 @@ var findPlaces = /* @__PURE__ */ __name((text7) => {
|
|
|
24959
24959
|
return found2.sort((a, b) => a.start - b.start);
|
|
24960
24960
|
}, "findPlaces");
|
|
24961
24961
|
|
|
24962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24962
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
24963
24963
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
24964
24964
|
var MENTION_VERSIONS = {
|
|
24965
24965
|
phone: 1,
|
|
@@ -25149,7 +25149,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
25149
25149
|
};
|
|
25150
25150
|
}, "typedPhone");
|
|
25151
25151
|
|
|
25152
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25152
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
25153
25153
|
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";
|
|
25154
25154
|
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";
|
|
25155
25155
|
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";
|
|
@@ -25157,7 +25157,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
25157
25157
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
25158
25158
|
var NAME_WORDS = WORDS.split(" ");
|
|
25159
25159
|
|
|
25160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25160
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
25161
25161
|
var LATIN_TO_CYRILLIC = {
|
|
25162
25162
|
shch: "\u0449",
|
|
25163
25163
|
sch: "\u0449",
|
|
@@ -25365,7 +25365,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text7, stem, taken) => {
|
|
|
25365
25365
|
return found2;
|
|
25366
25366
|
}, "findUnknownNames");
|
|
25367
25367
|
|
|
25368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
25369
25369
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
25370
25370
|
"webpage",
|
|
25371
25371
|
"share",
|
|
@@ -25405,7 +25405,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
|
|
|
25405
25405
|
});
|
|
25406
25406
|
}, "matchDownloads");
|
|
25407
25407
|
|
|
25408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
25409
25409
|
var QUERY_VERSION = 1;
|
|
25410
25410
|
var QUERY_LIMITS2 = {
|
|
25411
25411
|
...QUERY_LIMITS,
|
|
@@ -25441,7 +25441,7 @@ function exhausted(budget) {
|
|
|
25441
25441
|
}
|
|
25442
25442
|
__name(exhausted, "exhausted");
|
|
25443
25443
|
|
|
25444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
25445
25445
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
25446
25446
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
25447
25447
|
kind: "char",
|
|
@@ -25841,7 +25841,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
25841
25841
|
return out;
|
|
25842
25842
|
}, "foldRegex");
|
|
25843
25843
|
|
|
25844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25844
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
25845
25845
|
var PRESET_VERSION = 1;
|
|
25846
25846
|
var PRESETS = {
|
|
25847
25847
|
password: {
|
|
@@ -25895,7 +25895,7 @@ var PRESETS = {
|
|
|
25895
25895
|
}
|
|
25896
25896
|
};
|
|
25897
25897
|
|
|
25898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25898
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
25899
25899
|
var FIELD_VERSION = 2;
|
|
25900
25900
|
var UNITS = {
|
|
25901
25901
|
"": 1,
|
|
@@ -26356,12 +26356,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
|
|
|
26356
26356
|
return validateFields(parsed3.output);
|
|
26357
26357
|
}, "validateAst");
|
|
26358
26358
|
|
|
26359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
26360
26360
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
26361
26361
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
26362
26362
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
26363
26363
|
|
|
26364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
26365
26365
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
26366
26366
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
26367
26367
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -26385,7 +26385,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
26385
26385
|
};
|
|
26386
26386
|
}, "linkMatch");
|
|
26387
26387
|
|
|
26388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
26389
26389
|
var SETTING = "phoneCountries";
|
|
26390
26390
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
26391
26391
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -26416,7 +26416,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
26416
26416
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
26417
26417
|
}, "valueMatch");
|
|
26418
26418
|
|
|
26419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
26420
26420
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
26421
26421
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
26422
26422
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -26444,7 +26444,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
26444
26444
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
26445
26445
|
}, "vocabularySimilarity");
|
|
26446
26446
|
|
|
26447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
26448
26448
|
import { createHash } from "node:crypto";
|
|
26449
26449
|
var folded3 = /* @__PURE__ */ __name((name) => {
|
|
26450
26450
|
try {
|
|
@@ -26510,7 +26510,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind4, by, options
|
|
|
26510
26510
|
});
|
|
26511
26511
|
}, "guardTagCreation");
|
|
26512
26512
|
|
|
26513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
26514
26514
|
var invalid2 = /* @__PURE__ */ __name((message3) => {
|
|
26515
26515
|
throw new CliError("validation_error", message3);
|
|
26516
26516
|
}, "invalid");
|
|
@@ -26587,7 +26587,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
26587
26587
|
};
|
|
26588
26588
|
}, "createTagRedirectIndex");
|
|
26589
26589
|
|
|
26590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
26591
26591
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
26592
26592
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
26593
26593
|
if (!row2)
|
|
@@ -26615,7 +26615,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
26615
26615
|
return snapshot2;
|
|
26616
26616
|
}, "tagRedirectSnapshot");
|
|
26617
26617
|
|
|
26618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26618
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
26619
26619
|
import { createHash as createHash2 } from "node:crypto";
|
|
26620
26620
|
var TASK_KEY_PREFIXES = {
|
|
26621
26621
|
question: "Q",
|
|
@@ -26643,7 +26643,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
26643
26643
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
26644
26644
|
}, "taskAccountOf");
|
|
26645
26645
|
|
|
26646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
26647
26647
|
var toMs = /* @__PURE__ */ __name((iso16) => {
|
|
26648
26648
|
if (iso16 === null || iso16 === void 0)
|
|
26649
26649
|
return null;
|
|
@@ -26657,7 +26657,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
26657
26657
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
26658
26658
|
var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
26659
26659
|
|
|
26660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26660
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
26661
26661
|
var TAG_KINDS = ["tag", "topic"];
|
|
26662
26662
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
26663
26663
|
var TAG_TYPE = {
|
|
@@ -26860,7 +26860,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
26860
26860
|
return result;
|
|
26861
26861
|
}, "tagsOf");
|
|
26862
26862
|
|
|
26863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
26864
26864
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
26865
26865
|
var SPEECH = speech("att");
|
|
26866
26866
|
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");
|
|
@@ -27224,7 +27224,7 @@ var FIELD_COMPILERS = {
|
|
|
27224
27224
|
subject
|
|
27225
27225
|
};
|
|
27226
27226
|
|
|
27227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
27228
27228
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
27229
27229
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
27230
27230
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -27240,7 +27240,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
27240
27240
|
};
|
|
27241
27241
|
}, "placeOf");
|
|
27242
27242
|
|
|
27243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
27244
27244
|
var DRAIN_ON_WRITE = 500;
|
|
27245
27245
|
var METHOD = "rules";
|
|
27246
27246
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -27403,7 +27403,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
27403
27403
|
return queued.length;
|
|
27404
27404
|
}, "drainMentions");
|
|
27405
27405
|
|
|
27406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
27407
27407
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
27408
27408
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
27409
27409
|
if (!exists2)
|
|
@@ -27411,7 +27411,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
27411
27411
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
27412
27412
|
}, "indexRow");
|
|
27413
27413
|
|
|
27414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
27415
27415
|
var INDEX = "message_stems";
|
|
27416
27416
|
var SETTING2 = "searchStemmers";
|
|
27417
27417
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -27533,7 +27533,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
27533
27533
|
};
|
|
27534
27534
|
}, "stemmerCache");
|
|
27535
27535
|
|
|
27536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
27537
27537
|
var rehearsal = new AsyncLocalStorage();
|
|
27538
27538
|
var SQLITE_BUSY = 5;
|
|
27539
27539
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
@@ -27667,7 +27667,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
27667
27667
|
}
|
|
27668
27668
|
}, "read");
|
|
27669
27669
|
|
|
27670
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27670
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
27671
27671
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
27672
27672
|
coalesce(CASE k.chunkable_type
|
|
27673
27673
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -27809,7 +27809,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
27809
27809
|
}, "dropUnusedVectors");
|
|
27810
27810
|
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");
|
|
27811
27811
|
|
|
27812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
27813
27813
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null) => Number(orm.insert(accounts).values({ provider, externalId: account, name, scope: scope3 ?? "personal", createdAt: now2(), updatedAt: now2() }).onConflictDoUpdate({
|
|
27814
27814
|
target: [accounts.provider, accounts.externalId],
|
|
27815
27815
|
set: {
|
|
@@ -27940,7 +27940,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
27940
27940
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
27941
27941
|
}, "dropOrphanPeople");
|
|
27942
27942
|
|
|
27943
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
27944
27944
|
var FOLDED = [
|
|
27945
27945
|
{ table: "tasks", column: "title" },
|
|
27946
27946
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -27977,7 +27977,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
27977
27977
|
return filled2;
|
|
27978
27978
|
}, "fillFolded");
|
|
27979
27979
|
|
|
27980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
27981
27981
|
var HISTORY_KEY = "$history";
|
|
27982
27982
|
var objectOf2 = /* @__PURE__ */ __name((text7) => {
|
|
27983
27983
|
if (typeof text7 !== "string")
|
|
@@ -28053,7 +28053,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
28053
28053
|
return rest;
|
|
28054
28054
|
}, "withoutHistory");
|
|
28055
28055
|
|
|
28056
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
28057
28057
|
import { createHash as createHash3 } from "node:crypto";
|
|
28058
28058
|
var CHUNK_CHARS = 1200;
|
|
28059
28059
|
var CHUNK_OVERLAP = 150;
|
|
@@ -28158,7 +28158,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
28158
28158
|
return chunks2;
|
|
28159
28159
|
}, "cutChunks");
|
|
28160
28160
|
|
|
28161
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
28162
28162
|
var DAY2 = 864e5;
|
|
28163
28163
|
var CURRENCY = [
|
|
28164
28164
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -28284,7 +28284,7 @@ var dueDayOf = /* @__PURE__ */ __name((text7, createdMs) => {
|
|
|
28284
28284
|
return best?.day ?? null;
|
|
28285
28285
|
}, "dueDayOf");
|
|
28286
28286
|
|
|
28287
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28287
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
28288
28288
|
var DAY3 = 864e5;
|
|
28289
28289
|
var STOP_WORDS = new Set([
|
|
28290
28290
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -28439,7 +28439,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
28439
28439
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
28440
28440
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
28441
28441
|
|
|
28442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
28443
28443
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
28444
28444
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
28445
28445
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -28714,7 +28714,7 @@ var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.ma
|
|
|
28714
28714
|
Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
|
|
28715
28715
|
])), "vectorCounts");
|
|
28716
28716
|
|
|
28717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
28718
28718
|
var DOCUMENT_PICTURE = "document_picture";
|
|
28719
28719
|
var SCAN_PAGE2 = 5e3;
|
|
28720
28720
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -28777,7 +28777,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
28777
28777
|
}, "nearestPictures")
|
|
28778
28778
|
}), "documentPicturesOver");
|
|
28779
28779
|
|
|
28780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
28781
28781
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
28782
28782
|
const literal5 = escaped2 ?? plain2 ?? "";
|
|
28783
28783
|
return wildcard ?? (/[*?[]/u.test(literal5) ? `[${literal5}]` : literal5);
|
|
@@ -28842,7 +28842,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
28842
28842
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
28843
28843
|
var bound2 = /* @__PURE__ */ __name(({ sql: text7, params }) => sql.join(text7.split("?").map((part2, at) => at < params.length ? sql`${sql.raw(part2)}${params[at]}` : sql.raw(part2)), sql``), "bound");
|
|
28844
28844
|
|
|
28845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
28846
28846
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
28847
28847
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
28848
28848
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -28932,7 +28932,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
28932
28932
|
});
|
|
28933
28933
|
}, "linkMeeting");
|
|
28934
28934
|
|
|
28935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28935
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
28936
28936
|
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), ''))";
|
|
28937
28937
|
var UNSEARCHED_EVENT_TYPES = [
|
|
28938
28938
|
"working-location",
|
|
@@ -29164,7 +29164,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
29164
29164
|
return true;
|
|
29165
29165
|
}, "resetNoteIndex");
|
|
29166
29166
|
|
|
29167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29167
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
29168
29168
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
29169
29169
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
29170
29170
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -29183,7 +29183,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
29183
29183
|
}
|
|
29184
29184
|
}, "resolvePersonLinks");
|
|
29185
29185
|
|
|
29186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
29187
29187
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
29188
29188
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
29189
29189
|
find: orm.select({
|
|
@@ -29408,7 +29408,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
29408
29408
|
}, "meetingIdentityPk");
|
|
29409
29409
|
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");
|
|
29410
29410
|
|
|
29411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
29412
29412
|
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");
|
|
29413
29413
|
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");
|
|
29414
29414
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -29696,7 +29696,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
29696
29696
|
}
|
|
29697
29697
|
}, "replaceAutoTags");
|
|
29698
29698
|
|
|
29699
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29699
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
29700
29700
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
29701
29701
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
29702
29702
|
var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
|
|
@@ -29715,7 +29715,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
29715
29715
|
return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
|
|
29716
29716
|
}, "counterFreshness");
|
|
29717
29717
|
|
|
29718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29718
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
29719
29719
|
import { createHash as createHash4 } from "node:crypto";
|
|
29720
29720
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
29721
29721
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -29813,7 +29813,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
29813
29813
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
29814
29814
|
}, "contextEvidenceRequest");
|
|
29815
29815
|
|
|
29816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
29817
29817
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
29818
29818
|
var ACTIVITY = `
|
|
29819
29819
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -29943,7 +29943,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
29943
29943
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
29944
29944
|
}), "mailActivity");
|
|
29945
29945
|
|
|
29946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
29947
29947
|
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");
|
|
29948
29948
|
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;
|
|
29949
29949
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -30084,7 +30084,7 @@ var mailOwnText = /* @__PURE__ */ __name((body2) => {
|
|
|
30084
30084
|
return text7 || body2.trim();
|
|
30085
30085
|
}, "mailOwnText");
|
|
30086
30086
|
|
|
30087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
30088
30088
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
30089
30089
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
30090
30090
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
|
|
@@ -30194,7 +30194,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
30194
30194
|
return emails3 + threads;
|
|
30195
30195
|
}, "drainEmailIndex");
|
|
30196
30196
|
|
|
30197
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
30198
30198
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
30199
30199
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
30200
30200
|
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,
|
|
@@ -30292,7 +30292,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
30292
30292
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
30293
30293
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
30294
30294
|
|
|
30295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
30296
30296
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
30297
30297
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
30298
30298
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -30342,7 +30342,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
30342
30342
|
return threads.length;
|
|
30343
30343
|
}, "markEmailsRestored");
|
|
30344
30344
|
|
|
30345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
30346
30346
|
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
|
|
30347
30347
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
30348
30348
|
WHERE p.account_id = ?
|
|
@@ -30402,7 +30402,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
30402
30402
|
}, "indexedMailPieces");
|
|
30403
30403
|
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");
|
|
30404
30404
|
|
|
30405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30405
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
30406
30406
|
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");
|
|
30407
30407
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
30408
30408
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -30469,7 +30469,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
30469
30469
|
}
|
|
30470
30470
|
}), "mailRulesOver");
|
|
30471
30471
|
|
|
30472
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
30473
30473
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
30474
30474
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
30475
30475
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -30477,7 +30477,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
30477
30477
|
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);
|
|
30478
30478
|
}, "reviewLink");
|
|
30479
30479
|
|
|
30480
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
30481
30481
|
function checkMeetingCancelled(signal) {
|
|
30482
30482
|
if (!signal?.aborted)
|
|
30483
30483
|
return;
|
|
@@ -30488,7 +30488,7 @@ function checkMeetingCancelled(signal) {
|
|
|
30488
30488
|
}
|
|
30489
30489
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
30490
30490
|
|
|
30491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30491
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
30492
30492
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
30493
30493
|
id: Number(row2.id),
|
|
30494
30494
|
accountId: Number(row2.account_id),
|
|
@@ -30538,7 +30538,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
30538
30538
|
createdAt: Number(row2.created_at)
|
|
30539
30539
|
}), "transcriptRowOf");
|
|
30540
30540
|
|
|
30541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
30542
30542
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
30543
30543
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
30544
30544
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -30705,7 +30705,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30705
30705
|
}
|
|
30706
30706
|
}), "meetingReadsOver");
|
|
30707
30707
|
|
|
30708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
30709
30709
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
30710
30710
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
30711
30711
|
const params = [input.accountId];
|
|
@@ -30748,7 +30748,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
30748
30748
|
return { clauses, params };
|
|
30749
30749
|
}, "meetingSelectionSql");
|
|
30750
30750
|
|
|
30751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
30752
30752
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30753
30753
|
async meetingChatLines(input) {
|
|
30754
30754
|
checkMeetingCancelled(input.signal);
|
|
@@ -30776,7 +30776,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30776
30776
|
}
|
|
30777
30777
|
}), "meetingChatLinesOver");
|
|
30778
30778
|
|
|
30779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30779
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
30780
30780
|
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");
|
|
30781
30781
|
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
30782
30782
|
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
@@ -30791,7 +30791,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
|
30791
30791
|
var separated = /* @__PURE__ */ __name((context, one2, other) => one2 !== other && apart(context, { identities: identitiesOf(context, one2), person: one2 }, { identities: identitiesOf(context, other), person: other }), "separated");
|
|
30792
30792
|
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
30793
30793
|
|
|
30794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30794
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
30795
30795
|
var MESSAGE_FIELDS = {
|
|
30796
30796
|
pk: messages.id,
|
|
30797
30797
|
nativeId: messages.externalId,
|
|
@@ -30962,7 +30962,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
30962
30962
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
30963
30963
|
}), "chatActivity");
|
|
30964
30964
|
|
|
30965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30965
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
30966
30966
|
var HIT_FIELDS = {
|
|
30967
30967
|
...MESSAGE_FIELDS,
|
|
30968
30968
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -31061,7 +31061,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
31061
31061
|
};
|
|
31062
31062
|
}, "directReplies");
|
|
31063
31063
|
|
|
31064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
31065
31065
|
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");
|
|
31066
31066
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
31067
31067
|
const found2 = identityRow(context, ref3);
|
|
@@ -31195,7 +31195,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
31195
31195
|
}, "mentioning");
|
|
31196
31196
|
var escaped = /* @__PURE__ */ __name((text7) => text7.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
31197
31197
|
|
|
31198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
31199
31199
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
31200
31200
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
31201
31201
|
}, "missing");
|
|
@@ -31317,7 +31317,7 @@ function meetingContextLinksOver(context) {
|
|
|
31317
31317
|
}
|
|
31318
31318
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
31319
31319
|
|
|
31320
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31320
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
31321
31321
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
31322
31322
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
31323
31323
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -31346,7 +31346,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
31346
31346
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
31347
31347
|
}, "indexedText");
|
|
31348
31348
|
|
|
31349
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31349
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
31350
31350
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
31351
31351
|
var meetingCurrentIndexRows = `
|
|
31352
31352
|
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
|
|
@@ -31377,7 +31377,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
31377
31377
|
}, "invalidateMeetingStems");
|
|
31378
31378
|
var meetingStemmableText = /* @__PURE__ */ __name((text7) => text7.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
31379
31379
|
|
|
31380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31380
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
31381
31381
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
31382
31382
|
return {
|
|
31383
31383
|
async indexSearch(original) {
|
|
@@ -31445,10 +31445,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
31445
31445
|
}
|
|
31446
31446
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
31447
31447
|
|
|
31448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
31449
31449
|
import { createHash as createHash5 } from "node:crypto";
|
|
31450
31450
|
|
|
31451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/lucene/plain.js
|
|
31452
31452
|
var REPAIRED = /* @__PURE__ */ new Set([
|
|
31453
31453
|
"query.invalid-syntax",
|
|
31454
31454
|
"query.unclosed-literal",
|
|
@@ -31555,7 +31555,7 @@ var plainQuery = /* @__PURE__ */ __name((text7, fields4 = SEARCH_FIELDS) => {
|
|
|
31555
31555
|
return text7;
|
|
31556
31556
|
}, "plainQuery");
|
|
31557
31557
|
|
|
31558
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
31559
31559
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
31560
31560
|
const padded = ` ${term} `;
|
|
31561
31561
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -31564,7 +31564,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
31564
31564
|
return [...pieces];
|
|
31565
31565
|
}, "trigrams");
|
|
31566
31566
|
|
|
31567
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
31568
31568
|
var SHORTEST_CORRECTION = 3;
|
|
31569
31569
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
31570
31570
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -31611,7 +31611,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
31611
31611
|
return corrections;
|
|
31612
31612
|
}, "correctWords");
|
|
31613
31613
|
|
|
31614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31614
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
31615
31615
|
var SHORTEST_GARBLED = 4;
|
|
31616
31616
|
var MOST_WIDENED = 64;
|
|
31617
31617
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -31703,7 +31703,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
31703
31703
|
return found2.map((words3) => words3.sort((a, b) => a.distance - b.distance || b.docs - a.docs || a.term.localeCompare(b.term)).slice(0, MOST_WIDENED).map((word2) => word2.term));
|
|
31704
31704
|
}, "widenWords");
|
|
31705
31705
|
|
|
31706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
31707
31707
|
import { readFileSync } from "node:fs";
|
|
31708
31708
|
var loaded;
|
|
31709
31709
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -31762,7 +31762,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
31762
31762
|
return false;
|
|
31763
31763
|
}, "knownRussianWord");
|
|
31764
31764
|
|
|
31765
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
31766
31766
|
var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
31767
31767
|
var MOST_WORDS = 128;
|
|
31768
31768
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -31989,7 +31989,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text7, stemmer) => {
|
|
|
31989
31989
|
return check3(tree);
|
|
31990
31990
|
}, "matchMeetingText");
|
|
31991
31991
|
|
|
31992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
31993
31993
|
var fail3 = /* @__PURE__ */ __name((message3) => {
|
|
31994
31994
|
throw new CliError("validation_error", message3);
|
|
31995
31995
|
}, "fail");
|
|
@@ -32171,7 +32171,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
32171
32171
|
}
|
|
32172
32172
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
32173
32173
|
|
|
32174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
32175
32175
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32176
32176
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
32177
32177
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -32203,7 +32203,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32203
32203
|
}
|
|
32204
32204
|
}), "meetingLanguagesOver");
|
|
32205
32205
|
|
|
32206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32206
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
32207
32207
|
import { createHash as createHash6 } from "node:crypto";
|
|
32208
32208
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
32209
32209
|
if (value === void 0)
|
|
@@ -32293,7 +32293,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
32293
32293
|
}
|
|
32294
32294
|
}), "meetingParticipantSearchOver");
|
|
32295
32295
|
|
|
32296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32296
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
32297
32297
|
var preparationQueries = {
|
|
32298
32298
|
participants: {
|
|
32299
32299
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -32343,7 +32343,7 @@ var preparationQueries = {
|
|
|
32343
32343
|
}
|
|
32344
32344
|
};
|
|
32345
32345
|
|
|
32346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
32347
32347
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32348
32348
|
async preparationContext(original) {
|
|
32349
32349
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -32384,7 +32384,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32384
32384
|
}
|
|
32385
32385
|
}), "meetingPreparationContextOver");
|
|
32386
32386
|
|
|
32387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
32388
32388
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
32389
32389
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
32390
32390
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -32398,7 +32398,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
32398
32398
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
32399
32399
|
)`, "preparationSubjects");
|
|
32400
32400
|
|
|
32401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
32402
32402
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32403
32403
|
async preparationKnowledge(original) {
|
|
32404
32404
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -32443,7 +32443,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
32443
32443
|
}
|
|
32444
32444
|
}), "meetingPreparationKnowledgeOver");
|
|
32445
32445
|
|
|
32446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32446
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
32447
32447
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32448
32448
|
async preparationNotes(original) {
|
|
32449
32449
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -32496,7 +32496,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32496
32496
|
}
|
|
32497
32497
|
}), "meetingPreparationNotesOver");
|
|
32498
32498
|
|
|
32499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
32500
32500
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32501
32501
|
async relatedHistory(original) {
|
|
32502
32502
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -32567,7 +32567,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32567
32567
|
}
|
|
32568
32568
|
}), "meetingRelatedHistoryOver");
|
|
32569
32569
|
|
|
32570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
32571
32571
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
32572
32572
|
var text3 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
32573
32573
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -32648,7 +32648,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32648
32648
|
}
|
|
32649
32649
|
}), "meetingReviewOver");
|
|
32650
32650
|
|
|
32651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32651
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
32652
32652
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
32653
32653
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
32654
32654
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -32702,7 +32702,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32702
32702
|
}
|
|
32703
32703
|
}), "meetingSeriesHistoryOver");
|
|
32704
32704
|
|
|
32705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
32706
32706
|
var MOST_ROWS = 5e5;
|
|
32707
32707
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
32708
32708
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -32771,7 +32771,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32771
32771
|
}
|
|
32772
32772
|
}), "meetingStatsOver");
|
|
32773
32773
|
|
|
32774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32774
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
32775
32775
|
var CURSOR_KEY = "meetings";
|
|
32776
32776
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
32777
32777
|
id: Number(row2.id),
|
|
@@ -33340,7 +33340,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33340
33340
|
};
|
|
33341
33341
|
}, "meetingStoreOver");
|
|
33342
33342
|
|
|
33343
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33343
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
33344
33344
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
33345
33345
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
33346
33346
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -33366,7 +33366,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
33366
33366
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
33367
33367
|
}, "release");
|
|
33368
33368
|
|
|
33369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
33370
33370
|
var THREAD_COLUMNS = {
|
|
33371
33371
|
subject: {
|
|
33372
33372
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -33383,7 +33383,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
33383
33383
|
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);
|
|
33384
33384
|
}, "threadRows");
|
|
33385
33385
|
|
|
33386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
33387
33387
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
33388
33388
|
id: `email:${place.emailId}`,
|
|
33389
33389
|
chatId: place.threadExternalId,
|
|
@@ -33921,7 +33921,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
33921
33921
|
}
|
|
33922
33922
|
}), "mailStoreOver");
|
|
33923
33923
|
|
|
33924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
33925
33925
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
33926
33926
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
33927
33927
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -34011,7 +34011,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
34011
34011
|
}, "knownWord");
|
|
34012
34012
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
34013
34013
|
|
|
34014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
34015
34015
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
34016
34016
|
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");
|
|
34017
34017
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -34097,7 +34097,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
34097
34097
|
return found2;
|
|
34098
34098
|
}, "spokenTranscripts");
|
|
34099
34099
|
|
|
34100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34100
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
34101
34101
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
34102
34102
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
34103
34103
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -34144,7 +34144,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
34144
34144
|
});
|
|
34145
34145
|
}, "placeHits");
|
|
34146
34146
|
|
|
34147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
34148
34148
|
var GROUPS = {
|
|
34149
34149
|
chat: {
|
|
34150
34150
|
key: "m.chat_id",
|
|
@@ -34166,7 +34166,7 @@ var GROUPS = {
|
|
|
34166
34166
|
}
|
|
34167
34167
|
};
|
|
34168
34168
|
|
|
34169
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
34170
34170
|
var MESSAGES2 = {
|
|
34171
34171
|
rows: "messages",
|
|
34172
34172
|
threads: "chats",
|
|
@@ -34649,7 +34649,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
34649
34649
|
};
|
|
34650
34650
|
}, "runCompiled");
|
|
34651
34651
|
|
|
34652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
34653
34653
|
function invalidMetadata() {
|
|
34654
34654
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
34655
34655
|
}
|
|
@@ -34751,7 +34751,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
34751
34751
|
};
|
|
34752
34752
|
}), "counterTargets");
|
|
34753
34753
|
|
|
34754
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34754
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
34755
34755
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind4) => `'${kind4}'`).join(",");
|
|
34756
34756
|
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,
|
|
34757
34757
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -34870,7 +34870,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
34870
34870
|
}));
|
|
34871
34871
|
}, "attachmentViews");
|
|
34872
34872
|
|
|
34873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
34874
34874
|
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");
|
|
34875
34875
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text7, source2) => {
|
|
34876
34876
|
const { orm, database, now: now2 } = context;
|
|
@@ -34908,7 +34908,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
34908
34908
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
34909
34909
|
}, "intoVoiceAttachment");
|
|
34910
34910
|
|
|
34911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
34912
34912
|
var FIELDS = [
|
|
34913
34913
|
"threadExternalId",
|
|
34914
34914
|
"senderIdentityId",
|
|
@@ -35226,7 +35226,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
35226
35226
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
35227
35227
|
}, "writeDerivedReactions");
|
|
35228
35228
|
|
|
35229
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35229
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
35230
35230
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
35231
35231
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
35232
35232
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -35247,7 +35247,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
35247
35247
|
};
|
|
35248
35248
|
}, "keysOver");
|
|
35249
35249
|
|
|
35250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
35251
35251
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
35252
35252
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
35253
35253
|
if (!row2)
|
|
@@ -35282,7 +35282,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
35282
35282
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
35283
35283
|
}, "saveProfile");
|
|
35284
35284
|
|
|
35285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35285
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
35286
35286
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
35287
35287
|
const owner = ownerPerson(context.database).id;
|
|
35288
35288
|
const strays = context.database.prepare("SELECT DISTINCT l.person_id AS person FROM identity_links l JOIN identities i ON i.id = l.identity_id JOIN accounts a ON a.provider = i.provider AND a.external_id = i.external_id WHERE l.person_id <> ?").all(owner);
|
|
@@ -35304,7 +35304,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
35304
35304
|
return personOf(context, ref3);
|
|
35305
35305
|
}, "linkToOwner");
|
|
35306
35306
|
|
|
35307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
35308
35308
|
var PROVIDERS_SETTING = "providers";
|
|
35309
35309
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
35310
35310
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -35352,7 +35352,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
35352
35352
|
});
|
|
35353
35353
|
}, "registerProvider");
|
|
35354
35354
|
|
|
35355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
35356
35356
|
var DAY4 = 864e5;
|
|
35357
35357
|
var RECENTLY_CLOSED_MS = 14 * DAY4;
|
|
35358
35358
|
var TEXT_LIMIT = 20;
|
|
@@ -35551,7 +35551,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
35551
35551
|
};
|
|
35552
35552
|
}, "taskSimilarityOver");
|
|
35553
35553
|
|
|
35554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
35555
35555
|
var SETTING3 = "taskCategories";
|
|
35556
35556
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
35557
35557
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -35570,7 +35570,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
35570
35570
|
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);
|
|
35571
35571
|
}, "saveTaskCategories");
|
|
35572
35572
|
|
|
35573
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35573
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
35574
35574
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
35575
35575
|
var ALLOWED = "taskAgentClose";
|
|
35576
35576
|
var MIN = "taskAgentCloseMin";
|
|
@@ -35626,10 +35626,10 @@ var SUGGESTION_COLUMNS = [
|
|
|
35626
35626
|
];
|
|
35627
35627
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
35628
35628
|
|
|
35629
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35629
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
35630
35630
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
35631
35631
|
|
|
35632
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
35633
35633
|
var TASK_CLOSE_KIND = "task_close";
|
|
35634
35634
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
35635
35635
|
var isOwnerOnlyKind = /* @__PURE__ */ __name((kind4) => kind4 === MAIL_FINDINGS_KIND || kind4 === MEETING_FINDINGS_KIND || kind4 === TASK_CLOSE_KIND || kind4 === SOURCE_REVIEW_KIND, "isOwnerOnlyKind");
|
|
@@ -35677,7 +35677,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
35677
35677
|
}, "assertMayDecide");
|
|
35678
35678
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
35679
35679
|
|
|
35680
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
35681
35681
|
var PROFILE_PLACEHOLDER = "<profile>";
|
|
35682
35682
|
var oneLine = /* @__PURE__ */ __name((text7) => singleLine(text7.replace(/\s+/g, " ").trim()), "oneLine");
|
|
35683
35683
|
var openKind = /* @__PURE__ */ __name((kind4) => kind4 === "email" ? "message" : kind4 === "email_thread" ? "chat" : kind4 === "unknown" ? void 0 : kind4, "openKind");
|
|
@@ -35738,7 +35738,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
|
|
|
35738
35738
|
return `${WORDS2[summary.kind]} ${named3}${notes2 === "" ? "" : ` (${notes2})`}`;
|
|
35739
35739
|
}, "refLabel");
|
|
35740
35740
|
|
|
35741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35741
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
35742
35742
|
var EXCERPT_CHARS = 280;
|
|
35743
35743
|
var TITLE_CHARS = 120;
|
|
35744
35744
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -36160,7 +36160,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
36160
36160
|
summaries: /* @__PURE__ */ __name(async (texts2, options) => refSummariesOf(context.database, texts2, { ...options, now: context.now() }), "summaries")
|
|
36161
36161
|
}), "refsStoreOver");
|
|
36162
36162
|
|
|
36163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
36164
36164
|
var sourceOf3 = /* @__PURE__ */ __name((read3, ref3) => ({
|
|
36165
36165
|
ref: ref3,
|
|
36166
36166
|
kind: read3.kind,
|
|
@@ -36198,7 +36198,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
36198
36198
|
});
|
|
36199
36199
|
}, "evidenceSourcesOf");
|
|
36200
36200
|
|
|
36201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
36202
36202
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
36203
36203
|
var MAX_TEXT_CHARS = 2e6;
|
|
36204
36204
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -36224,7 +36224,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
36224
36224
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
36225
36225
|
}, "pdfPreviewLimits");
|
|
36226
36226
|
|
|
36227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
36228
36228
|
import { randomBytes } from "node:crypto";
|
|
36229
36229
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
36230
36230
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -36237,7 +36237,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
36237
36237
|
return time3 + random;
|
|
36238
36238
|
}, "ulid");
|
|
36239
36239
|
|
|
36240
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36240
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
36241
36241
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
36242
36242
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
36243
36243
|
if (!meta && !sections?.length)
|
|
@@ -36258,7 +36258,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
36258
36258
|
return typeof language === "string" && language !== "" ? language : null;
|
|
36259
36259
|
}, "languageOf");
|
|
36260
36260
|
|
|
36261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
36262
36262
|
var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
36263
36263
|
var objectOf3 = /* @__PURE__ */ __name((value) => {
|
|
36264
36264
|
if (isObject2(value))
|
|
@@ -36501,7 +36501,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
36501
36501
|
};
|
|
36502
36502
|
}, "filesStoreOver");
|
|
36503
36503
|
|
|
36504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
36505
36505
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
36506
36506
|
entity: "document",
|
|
36507
36507
|
backend: "sql",
|
|
@@ -36547,7 +36547,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
36547
36547
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
36548
36548
|
}, "importedDocumentWhere");
|
|
36549
36549
|
|
|
36550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
36551
36551
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
36552
36552
|
const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
|
|
36553
36553
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -36568,7 +36568,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
36568
36568
|
return changed;
|
|
36569
36569
|
}, "dateFileNotes");
|
|
36570
36570
|
|
|
36571
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
36572
36572
|
var textOf2 = /* @__PURE__ */ __name((text7, what, max = 1e5, allowEmpty = false) => {
|
|
36573
36573
|
const value = text7.trim();
|
|
36574
36574
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -36581,7 +36581,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
36581
36581
|
return value;
|
|
36582
36582
|
}, "oneOf");
|
|
36583
36583
|
|
|
36584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36584
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
36585
36585
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
36586
36586
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
36587
36587
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso3(value), "optionalIso");
|
|
@@ -37114,7 +37114,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37114
37114
|
};
|
|
37115
37115
|
}, "notesStoreOver");
|
|
37116
37116
|
|
|
37117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
37118
37118
|
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";
|
|
37119
37119
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
37120
37120
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -37373,7 +37373,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37373
37373
|
};
|
|
37374
37374
|
}, "memoriesStoreOver");
|
|
37375
37375
|
|
|
37376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
37377
37377
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
37378
37378
|
var KEY = "taskFirstPassPerChat";
|
|
37379
37379
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -37393,7 +37393,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
37393
37393
|
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);
|
|
37394
37394
|
}, "saveFirstPassPerChat");
|
|
37395
37395
|
|
|
37396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
37397
37397
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
37398
37398
|
var EXTERNAL_ID_CHARS = 200;
|
|
37399
37399
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -37420,7 +37420,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
37420
37420
|
return text7;
|
|
37421
37421
|
}, "sourceUrlOf");
|
|
37422
37422
|
|
|
37423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
37424
37424
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
37425
37425
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
37426
37426
|
name,
|
|
@@ -37643,7 +37643,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
37643
37643
|
return root === void 0 ? void 0 : { ...query, root };
|
|
37644
37644
|
}, "withoutField");
|
|
37645
37645
|
|
|
37646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
37647
37647
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
37648
37648
|
if (row2.author_type == null)
|
|
37649
37649
|
return null;
|
|
@@ -37671,7 +37671,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
37671
37671
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
37672
37672
|
}, "addComment");
|
|
37673
37673
|
|
|
37674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37674
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
37675
37675
|
var TASK_RELATION_KINDS = [
|
|
37676
37676
|
"blocked-by",
|
|
37677
37677
|
"follow-up-of",
|
|
@@ -37801,7 +37801,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
37801
37801
|
};
|
|
37802
37802
|
}, "taskRelationsStoreOver");
|
|
37803
37803
|
|
|
37804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
37805
37805
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
37806
37806
|
var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
37807
37807
|
var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind4, changes, at) => {
|
|
@@ -38330,7 +38330,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
38330
38330
|
};
|
|
38331
38331
|
}, "workTasksOver");
|
|
38332
38332
|
|
|
38333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
38334
38334
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
38335
38335
|
const { database, now: now2 } = context;
|
|
38336
38336
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -38379,7 +38379,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
38379
38379
|
};
|
|
38380
38380
|
}, "taskCloseOver");
|
|
38381
38381
|
|
|
38382
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38382
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
38383
38383
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
38384
38384
|
const { database, now: now2 } = context;
|
|
38385
38385
|
const required3 = /* @__PURE__ */ __name((id2) => {
|
|
@@ -38597,7 +38597,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
38597
38597
|
};
|
|
38598
38598
|
}, "taskPairsOver");
|
|
38599
38599
|
|
|
38600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38600
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
38601
38601
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
38602
38602
|
var TASK_STATS_SQL = {
|
|
38603
38603
|
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 ? BOARD_SCOPE : ACCOUNT_SCOPE}${filter} ORDER BY t.created_at, t.id`, "rows"),
|
|
@@ -38636,7 +38636,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
38636
38636
|
}, "statNames")
|
|
38637
38637
|
}), "taskStatsOver");
|
|
38638
38638
|
|
|
38639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
38640
38640
|
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";
|
|
38641
38641
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
38642
38642
|
const key2 = inboxKey(account);
|
|
@@ -38843,7 +38843,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
38843
38843
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
38844
38844
|
}, "oneOf");
|
|
38845
38845
|
|
|
38846
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
38847
38847
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
38848
38848
|
const { database } = context;
|
|
38849
38849
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -38888,7 +38888,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
38888
38888
|
};
|
|
38889
38889
|
}, "accountsStoreOver");
|
|
38890
38890
|
|
|
38891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
38892
38892
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
38893
38893
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
38894
38894
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -38912,7 +38912,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
38912
38912
|
})), "keepDownloads");
|
|
38913
38913
|
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");
|
|
38914
38914
|
|
|
38915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38915
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
38916
38916
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
38917
38917
|
const { database } = context;
|
|
38918
38918
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -38969,7 +38969,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
38969
38969
|
}, "keepAttachmentText")
|
|
38970
38970
|
}), "attachmentsStoreOver");
|
|
38971
38971
|
|
|
38972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
38973
38973
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
38974
38974
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
38975
38975
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -39154,7 +39154,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
39154
39154
|
return done;
|
|
39155
39155
|
}, "rekeyChats");
|
|
39156
39156
|
|
|
39157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
39158
39158
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
39159
39159
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
39160
39160
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -39212,7 +39212,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
39212
39212
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
39213
39213
|
}, "chatCoverage");
|
|
39214
39214
|
|
|
39215
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39215
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
39216
39216
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
39217
39217
|
const { database } = context;
|
|
39218
39218
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -39347,7 +39347,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39347
39347
|
};
|
|
39348
39348
|
}, "chatsStoreOver");
|
|
39349
39349
|
|
|
39350
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
39351
39351
|
import { createHash as createHash7 } from "node:crypto";
|
|
39352
39352
|
var BATCH_CONTEXT = 50;
|
|
39353
39353
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -39485,7 +39485,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
39485
39485
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
39486
39486
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
39487
39487
|
|
|
39488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39488
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
39489
39489
|
import { setTimeout } from "node:timers/promises";
|
|
39490
39490
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
39491
39491
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -39797,7 +39797,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
39797
39797
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
39798
39798
|
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");
|
|
39799
39799
|
|
|
39800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
39801
39801
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
39802
39802
|
const { database } = context;
|
|
39803
39803
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -39904,7 +39904,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39904
39904
|
};
|
|
39905
39905
|
}, "conversationsStoreOver");
|
|
39906
39906
|
|
|
39907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
39908
39908
|
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";
|
|
39909
39909
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
39910
39910
|
const { database } = context;
|
|
@@ -39929,7 +39929,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
39929
39929
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
39930
39930
|
}), "countersStoreOver");
|
|
39931
39931
|
|
|
39932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
39933
39933
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
39934
39934
|
var MENTION_QUERY = defineQuery({
|
|
39935
39935
|
entity: "mention",
|
|
@@ -40145,7 +40145,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
40145
40145
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
40146
40146
|
}, "listPlaces");
|
|
40147
40147
|
|
|
40148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
40149
40149
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
40150
40150
|
const { database } = context;
|
|
40151
40151
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -40180,7 +40180,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
40180
40180
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
40181
40181
|
}), "mentionsStoreOver");
|
|
40182
40182
|
|
|
40183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
40184
40184
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
40185
40185
|
const read3 = database.prepare("SELECT m.id, m.external_id, m.text, m.sent_at, m.sender_name, coalesce(m.sender_chat_external_id, i.external_id) AS sender_id FROM messages m LEFT JOIN identities i ON i.id = m.sender_identity_id WHERE m.chat_id = ? AND m.deleted_at IS NULL AND (m.text LIKE '%google.com%' OR m.text LIKE '%forms.gle%') " + (messageId === void 0 ? "" : "AND m.external_id = ? ") + "ORDER BY m.sent_at DESC, m.id DESC");
|
|
40186
40186
|
const rows = messageId === void 0 ? read3.all(chatKey) : read3.all(chatKey, messageId);
|
|
@@ -40195,7 +40195,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
40195
40195
|
}));
|
|
40196
40196
|
}, "documentLinkMessages");
|
|
40197
40197
|
|
|
40198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
40199
40199
|
var stemmerFor = stemmerCache();
|
|
40200
40200
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
40201
40201
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -40239,7 +40239,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
40239
40239
|
});
|
|
40240
40240
|
}, "laterSharingRare");
|
|
40241
40241
|
|
|
40242
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
40243
40243
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
40244
40244
|
const { database } = context;
|
|
40245
40245
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -40374,7 +40374,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
40374
40374
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
40375
40375
|
}), "messagesStoreOver");
|
|
40376
40376
|
|
|
40377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
40378
40378
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
40379
40379
|
var iso6 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
40380
40380
|
var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -40431,7 +40431,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
40431
40431
|
});
|
|
40432
40432
|
}, "personPreparation");
|
|
40433
40433
|
|
|
40434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40434
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
40435
40435
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
40436
40436
|
const id2 = Number(uid);
|
|
40437
40437
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -40439,7 +40439,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
40439
40439
|
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(id2, JSON.stringify(accountIds)));
|
|
40440
40440
|
}, "personSeenInAccounts");
|
|
40441
40441
|
|
|
40442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
40443
40443
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
40444
40444
|
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);
|
|
40445
40445
|
if (!row2)
|
|
@@ -40506,7 +40506,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
40506
40506
|
return { id: id2, personId, removed: true };
|
|
40507
40507
|
}, "removeNote");
|
|
40508
40508
|
|
|
40509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40509
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
40510
40510
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
40511
40511
|
const { database } = context;
|
|
40512
40512
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -40591,13 +40591,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
40591
40591
|
};
|
|
40592
40592
|
}, "peopleStoreOver");
|
|
40593
40593
|
|
|
40594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
40595
40595
|
import { createHash as createHash9 } from "node:crypto";
|
|
40596
40596
|
|
|
40597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40597
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
40598
40598
|
import { createHash as createHash8 } from "node:crypto";
|
|
40599
40599
|
|
|
40600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40600
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
40601
40601
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
40602
40602
|
var AUTHOR_MEASURES = [
|
|
40603
40603
|
"messages",
|
|
@@ -40737,7 +40737,7 @@ var withoutUrls = /* @__PURE__ */ __name((text7) => text7.replace(/\S+/gu, (toke
|
|
|
40737
40737
|
var rankingWords = /* @__PURE__ */ __name((text7) => withoutUrls(text7).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
40738
40738
|
var rankingQuestion = /* @__PURE__ */ __name((text7) => withoutUrls(text7).includes("?"), "rankingQuestion");
|
|
40739
40739
|
|
|
40740
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40740
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
40741
40741
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
40742
40742
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
40743
40743
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -40959,7 +40959,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
40959
40959
|
};
|
|
40960
40960
|
}, "rankReplyGraph");
|
|
40961
40961
|
|
|
40962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40962
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
40963
40963
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
40964
40964
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
40965
40965
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -41133,7 +41133,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
41133
41133
|
return { items, evidence, summary, graph: graph.quality };
|
|
41134
41134
|
}, "calculateAdminStatistics");
|
|
41135
41135
|
|
|
41136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
41137
41137
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
41138
41138
|
const dates = [];
|
|
41139
41139
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -41155,7 +41155,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
41155
41155
|
return dates[0].node.resolution.date;
|
|
41156
41156
|
}, "rankingContextRange");
|
|
41157
41157
|
|
|
41158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
41159
41159
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
41160
41160
|
let counts;
|
|
41161
41161
|
try {
|
|
@@ -41450,7 +41450,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
41450
41450
|
});
|
|
41451
41451
|
}, "rankQuery");
|
|
41452
41452
|
|
|
41453
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41453
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
41454
41454
|
function fail4(message3, reason = "query.too-large") {
|
|
41455
41455
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
41456
41456
|
}
|
|
@@ -41627,7 +41627,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
41627
41627
|
return result;
|
|
41628
41628
|
}), "adminStatisticsQuery");
|
|
41629
41629
|
|
|
41630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
41631
41631
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
41632
41632
|
if (!execution.accounts.length)
|
|
41633
41633
|
return { conversations: [], chats: [] };
|
|
@@ -41645,7 +41645,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
41645
41645
|
return { conversations: conversations2, chats: chats2 };
|
|
41646
41646
|
}, "conversationEligibility");
|
|
41647
41647
|
|
|
41648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
41649
41649
|
import { createHash as createHash10 } from "node:crypto";
|
|
41650
41650
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
41651
41651
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -41795,7 +41795,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
41795
41795
|
return result;
|
|
41796
41796
|
}, "rankingEvidence");
|
|
41797
41797
|
|
|
41798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41798
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
41799
41799
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
41800
41800
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2) => {
|
|
41801
41801
|
const params = [...scope3.accounts.flatMap(({ provider, account }) => [provider, account]), ...kinds2];
|
|
@@ -41889,7 +41889,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
41889
41889
|
});
|
|
41890
41890
|
}, "waitingChats");
|
|
41891
41891
|
|
|
41892
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
41893
41893
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
41894
41894
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
41895
41895
|
if (execution.corpus === "mail")
|
|
@@ -41910,7 +41910,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
41910
41910
|
};
|
|
41911
41911
|
}, "queriesStoreOver");
|
|
41912
41912
|
|
|
41913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41913
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
41914
41914
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
41915
41915
|
const { database, now: now2 } = context;
|
|
41916
41916
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -41949,10 +41949,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
41949
41949
|
}));
|
|
41950
41950
|
}, "chatEventsOf");
|
|
41951
41951
|
|
|
41952
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
41953
41953
|
import { createHash as createHash11 } from "node:crypto";
|
|
41954
41954
|
|
|
41955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
41956
41956
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
41957
41957
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
41958
41958
|
timeZone: zone,
|
|
@@ -41972,7 +41972,7 @@ var weekKey = /* @__PURE__ */ __name((day3) => {
|
|
|
41972
41972
|
return date3.toISOString().slice(0, 10);
|
|
41973
41973
|
}, "weekKey");
|
|
41974
41974
|
|
|
41975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
41976
41976
|
var RETENTION_TOLERANCE = 864e5;
|
|
41977
41977
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
41978
41978
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -42026,7 +42026,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
42026
42026
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
42027
42027
|
}, "retentionCohorts");
|
|
42028
42028
|
|
|
42029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
42030
42030
|
var iso7 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
42031
42031
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
42032
42032
|
validateRetentionOptions(options);
|
|
@@ -42157,7 +42157,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
42157
42157
|
};
|
|
42158
42158
|
}, "retentionQuery");
|
|
42159
42159
|
|
|
42160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42160
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
42161
42161
|
var iso8 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
42162
42162
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
42163
42163
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -42288,7 +42288,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
42288
42288
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
42289
42289
|
})), "trackedChats");
|
|
42290
42290
|
|
|
42291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42291
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
42292
42292
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
42293
42293
|
const { database } = context;
|
|
42294
42294
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -42344,7 +42344,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42344
42344
|
};
|
|
42345
42345
|
}, "rosterStoreOver");
|
|
42346
42346
|
|
|
42347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
42348
42348
|
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");
|
|
42349
42349
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
42350
42350
|
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 ?`);
|
|
@@ -42368,7 +42368,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
42368
42368
|
}
|
|
42369
42369
|
}, "backfillNormalized");
|
|
42370
42370
|
|
|
42371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42371
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
42372
42372
|
var INDEX2 = "message_words";
|
|
42373
42373
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
42374
42374
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -42495,7 +42495,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
42495
42495
|
});
|
|
42496
42496
|
}, "resetSearchIndex");
|
|
42497
42497
|
|
|
42498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
42499
42499
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
42500
42500
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
42501
42501
|
const before2 = stemsState(database);
|
|
@@ -42590,7 +42590,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
42590
42590
|
return resetStems(database, { now: now2 });
|
|
42591
42591
|
}, "followDefaultStemmers");
|
|
42592
42592
|
|
|
42593
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42593
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
42594
42594
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
42595
42595
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
42596
42596
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -42612,7 +42612,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
42612
42612
|
});
|
|
42613
42613
|
}, "termCandidates");
|
|
42614
42614
|
|
|
42615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42615
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
42616
42616
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
42617
42617
|
const { database } = context;
|
|
42618
42618
|
const stemmerFor2 = stemmerCache();
|
|
@@ -42636,7 +42636,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42636
42636
|
};
|
|
42637
42637
|
}, "searchIndexStoreOver");
|
|
42638
42638
|
|
|
42639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
42640
42640
|
var HISTORY_KEPT = 1e3;
|
|
42641
42641
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
42642
42642
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -42705,7 +42705,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
42705
42705
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
42706
42706
|
}, "clearHistory");
|
|
42707
42707
|
|
|
42708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
42709
42709
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
42710
42710
|
const { database } = context;
|
|
42711
42711
|
return {
|
|
@@ -42729,7 +42729,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42729
42729
|
};
|
|
42730
42730
|
}, "searchesStoreOver");
|
|
42731
42731
|
|
|
42732
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
42733
42733
|
import { createHash as createHash12 } from "node:crypto";
|
|
42734
42734
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
42735
42735
|
var sha256 = /* @__PURE__ */ __name((value) => createHash12("sha256").update(value).digest("hex"), "sha256");
|
|
@@ -42909,7 +42909,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
42909
42909
|
};
|
|
42910
42910
|
}, "addedSourcesOver");
|
|
42911
42911
|
|
|
42912
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42912
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
42913
42913
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
42914
42914
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
42915
42915
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -42952,7 +42952,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
42952
42952
|
};
|
|
42953
42953
|
}, "agentActionsStoreOver");
|
|
42954
42954
|
|
|
42955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
42956
42956
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
42957
42957
|
}) => {
|
|
42958
42958
|
const { database, now: now2 } = context;
|
|
@@ -43011,7 +43011,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
43011
43011
|
};
|
|
43012
43012
|
}, "botUpdateStoreOver");
|
|
43013
43013
|
|
|
43014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
43015
43015
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
43016
43016
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
43017
43017
|
throw new CliError(code, message3, { reason });
|
|
@@ -43159,7 +43159,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
43159
43159
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly, linkedId, ...decisionsOver(context) };
|
|
43160
43160
|
}, "reviewedRowsOver");
|
|
43161
43161
|
|
|
43162
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
43163
43163
|
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";
|
|
43164
43164
|
var DAY_MS = 864e5;
|
|
43165
43165
|
var deadlineOf = /* @__PURE__ */ __name((expiration, days) => expiration === null || days === null ? null : new Date(Date.parse(`${expiration}T00:00:00Z`) - days * DAY_MS).toISOString().slice(0, 10), "deadlineOf");
|
|
@@ -43308,7 +43308,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43308
43308
|
};
|
|
43309
43309
|
}, "contractsStoreOver");
|
|
43310
43310
|
|
|
43311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
43312
43312
|
var BUSINESS_FIND_MAX = 2001;
|
|
43313
43313
|
var party = /* @__PURE__ */ __name((kind4, id2, as) => `LEFT JOIN persons ${as}p ON ${kind4} = 'person' AND ${as}p.id = ${id2} AND ${as}p.owner = 0 LEFT JOIN organizations ${as}o ON ${kind4} = 'organization' AND ${as}o.id = ${id2} LEFT JOIN projects ${as}j ON ${kind4} = 'project' AND ${as}j.id = ${id2}`, "party");
|
|
43314
43314
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
@@ -43412,7 +43412,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
43412
43412
|
};
|
|
43413
43413
|
}, "businessSearchOver");
|
|
43414
43414
|
|
|
43415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43415
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
43416
43416
|
var DAY5 = 864e5;
|
|
43417
43417
|
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}')`;
|
|
43418
43418
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -43522,7 +43522,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
43522
43522
|
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);
|
|
43523
43523
|
}, "listEvents");
|
|
43524
43524
|
|
|
43525
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
43526
43526
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
43527
43527
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
43528
43528
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -43579,7 +43579,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
43579
43579
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
43580
43580
|
}, "forgetCalendarRows");
|
|
43581
43581
|
|
|
43582
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
43583
43583
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
43584
43584
|
id: Number(row2.id),
|
|
43585
43585
|
accountId: Number(row2.account_id),
|
|
@@ -44182,7 +44182,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
44182
44182
|
};
|
|
44183
44183
|
}, "eventStoreOver");
|
|
44184
44184
|
|
|
44185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44185
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
44186
44186
|
var CATALOG_QUERY = defineQuery({
|
|
44187
44187
|
entity: "document",
|
|
44188
44188
|
backend: "sql",
|
|
@@ -44424,7 +44424,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
44424
44424
|
};
|
|
44425
44425
|
}, "catalogStoreOver");
|
|
44426
44426
|
|
|
44427
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
44428
44428
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
44429
44429
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
44430
44430
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -44437,7 +44437,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
44437
44437
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
44438
44438
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
44439
44439
|
|
|
44440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44440
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
44441
44441
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
44442
44442
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
44443
44443
|
signal?.throwIfAborted();
|
|
@@ -44536,7 +44536,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
44536
44536
|
});
|
|
44537
44537
|
}, "readMeetingContextEvidence");
|
|
44538
44538
|
|
|
44539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44539
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
44540
44540
|
var corpora = {
|
|
44541
44541
|
message: {
|
|
44542
44542
|
table: "messages",
|
|
@@ -44775,10 +44775,10 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
44775
44775
|
}
|
|
44776
44776
|
}), "contextRecordsOver");
|
|
44777
44777
|
|
|
44778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/crm.js
|
|
44779
44779
|
var isItemKind = /* @__PURE__ */ __name((kind4) => kind4 === "deal" || kind4 === "lead", "isItemKind");
|
|
44780
44780
|
|
|
44781
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
44782
44782
|
import { createHash as createHash13 } from "node:crypto";
|
|
44783
44783
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
44784
44784
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -45122,7 +45122,7 @@ var fieldReferences = /* @__PURE__ */ __name((record4, options = {}) => {
|
|
|
45122
45122
|
return found2;
|
|
45123
45123
|
}, "fieldReferences");
|
|
45124
45124
|
|
|
45125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45125
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
45126
45126
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
45127
45127
|
var SOURCE = "crm";
|
|
45128
45128
|
var crmIdentityId = /* @__PURE__ */ __name((key2, externalId, type = "contact") => `${idPart(key2.account)}/${type}/${idPart(externalId)}`, "crmIdentityId");
|
|
@@ -45251,7 +45251,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
45251
45251
|
return { savePipeline, saveItemRow };
|
|
45252
45252
|
}, "crmRowsOver");
|
|
45253
45253
|
|
|
45254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
45255
45255
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
45256
45256
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
45257
45257
|
var crmSettingKey = /* @__PURE__ */ __name((key2, name) => `crm.${key2.provider}:${key2.account}.${name}`, "crmSettingKey");
|
|
@@ -45314,7 +45314,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
45314
45314
|
];
|
|
45315
45315
|
}), "crmSettingsOf");
|
|
45316
45316
|
|
|
45317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
45318
45318
|
var MAX_LINES = 500;
|
|
45319
45319
|
var PARENTS = {
|
|
45320
45320
|
invoice: {
|
|
@@ -45414,7 +45414,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
45414
45414
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
45415
45415
|
}, "moneyLinesOver");
|
|
45416
45416
|
|
|
45417
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
45418
45418
|
var COUNTED = {
|
|
45419
45419
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
45420
45420
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -45489,7 +45489,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
45489
45489
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
45490
45490
|
}, "refundRulesOver");
|
|
45491
45491
|
|
|
45492
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
45493
45493
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
45494
45494
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
45495
45495
|
var PAID = netPaidSql("i.id");
|
|
@@ -45887,7 +45887,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45887
45887
|
};
|
|
45888
45888
|
}, "financeStoreOver");
|
|
45889
45889
|
|
|
45890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
45891
45891
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
45892
45892
|
throw new CliError("validation_error", message3, { reason });
|
|
45893
45893
|
}, "refuse");
|
|
@@ -45965,7 +45965,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
45965
45965
|
};
|
|
45966
45966
|
}, "paymentEntriesOver");
|
|
45967
45967
|
|
|
45968
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
45969
45969
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
45970
45970
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
45971
45971
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -45991,7 +45991,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
45991
45991
|
return valid;
|
|
45992
45992
|
}, "validateEvidenceFindings");
|
|
45993
45993
|
|
|
45994
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45994
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
45995
45995
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
45996
45996
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
45997
45997
|
var iso10 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -46172,7 +46172,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46172
46172
|
};
|
|
46173
46173
|
}, "proposedActionsStoreOver");
|
|
46174
46174
|
|
|
46175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
46176
46176
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
46177
46177
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
46178
46178
|
var listOf = /* @__PURE__ */ __name((list2) => {
|
|
@@ -46244,7 +46244,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
46244
46244
|
};
|
|
46245
46245
|
}, "relationRolesOver");
|
|
46246
46246
|
|
|
46247
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46247
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
46248
46248
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
46249
46249
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
46250
46250
|
id: link3.id,
|
|
@@ -46563,7 +46563,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
46563
46563
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
46564
46564
|
}, "decidedOrigin");
|
|
46565
46565
|
|
|
46566
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
46567
46567
|
var KEYED = "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'partner-of') AND to_id IS NOT NULL";
|
|
46568
46568
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
46569
46569
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" } } = {}) => {
|
|
@@ -46669,7 +46669,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
46669
46669
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
46670
46670
|
}), "relationsStoreOver");
|
|
46671
46671
|
|
|
46672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46672
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
46673
46673
|
var PENDING = "crm:pending-relations";
|
|
46674
46674
|
var PENDING_DAYS = 30;
|
|
46675
46675
|
var PENDING_MOST = 5e3;
|
|
@@ -47147,7 +47147,7 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
47147
47147
|
};
|
|
47148
47148
|
}, "crmCopiesOver");
|
|
47149
47149
|
|
|
47150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
47151
47151
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
47152
47152
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind4, stageIds, cutoff) => {
|
|
47153
47153
|
const rows = database.prepare(`SELECT stage_id, currency, count(*) AS items, coalesce(sum(amount), 0) AS units FROM ${TABLES3[kind4]} WHERE stage_id IN (${stageIds.map(() => "?").join(", ") || "NULL"}) AND deleted_at IS NULL AND (? IS NULL OR created_at >= ?) GROUP BY stage_id, currency ORDER BY currency`).all(...stageIds, cutoff, cutoff);
|
|
@@ -47164,7 +47164,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind4, stageIds, cuto
|
|
|
47164
47164
|
});
|
|
47165
47165
|
}, "stageAmountsOf");
|
|
47166
47166
|
|
|
47167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47167
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
47168
47168
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
47169
47169
|
var itemsSql = /* @__PURE__ */ __name((kind4) => `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 FROM ${TABLES4[kind4]} 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`, "itemsSql");
|
|
47170
47170
|
var MAX_STAGES = 30;
|
|
@@ -47505,16 +47505,16 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47505
47505
|
};
|
|
47506
47506
|
}, "dealsStoreOver");
|
|
47507
47507
|
|
|
47508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
47509
47509
|
import { createHash as createHash14, randomBytes as randomBytes2 } from "node:crypto";
|
|
47510
47510
|
|
|
47511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
47512
47512
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
47513
47513
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
47514
47514
|
var TOKEN2 = /^[A-Za-z0-9_-]{21}[AQgw]$/;
|
|
47515
47515
|
var isDecisionToken = /* @__PURE__ */ __name((value) => typeof value === "string" && TOKEN2.test(value), "isDecisionToken");
|
|
47516
47516
|
|
|
47517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
47518
47518
|
var digestOf = /* @__PURE__ */ __name((token) => createHash14("sha256").update(token).digest("hex"), "digestOf");
|
|
47519
47519
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
47520
47520
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -47610,7 +47610,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
47610
47610
|
};
|
|
47611
47611
|
}, "decisionRequestStoreOver");
|
|
47612
47612
|
|
|
47613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47613
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
47614
47614
|
var NOTE_FIELDS = [
|
|
47615
47615
|
"text",
|
|
47616
47616
|
"exact",
|
|
@@ -48040,7 +48040,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
48040
48040
|
};
|
|
48041
48041
|
}, "noteSearchOver");
|
|
48042
48042
|
|
|
48043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
48044
48044
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
48045
48045
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
48046
48046
|
var EVENT_CORPUS = {
|
|
@@ -48172,7 +48172,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
48172
48172
|
};
|
|
48173
48173
|
}, "eventSearchOver");
|
|
48174
48174
|
|
|
48175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
48176
48176
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
48177
48177
|
try {
|
|
48178
48178
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -48184,7 +48184,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
48184
48184
|
}
|
|
48185
48185
|
}, "calendarMoment");
|
|
48186
48186
|
|
|
48187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
48188
48188
|
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";
|
|
48189
48189
|
var iso12 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
48190
48190
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -48404,7 +48404,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48404
48404
|
};
|
|
48405
48405
|
}, "factsStoreOver");
|
|
48406
48406
|
|
|
48407
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48407
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
48408
48408
|
var invalid5 = /* @__PURE__ */ __name((message3) => {
|
|
48409
48409
|
throw new CliError("validation_error", message3);
|
|
48410
48410
|
}, "invalid");
|
|
@@ -48508,7 +48508,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind4) => {
|
|
|
48508
48508
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes, create };
|
|
48509
48509
|
}, "findingsCoreOver");
|
|
48510
48510
|
|
|
48511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
48512
48512
|
var stale = /* @__PURE__ */ __name(() => {
|
|
48513
48513
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
48514
48514
|
reason: "evidence-findings.stale"
|
|
@@ -48689,7 +48689,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48689
48689
|
};
|
|
48690
48690
|
}, "evidenceFindingsStoreOver");
|
|
48691
48691
|
|
|
48692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
48693
48693
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
48694
48694
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
48695
48695
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -48742,7 +48742,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
48742
48742
|
}, "forPerson")
|
|
48743
48743
|
}), "involvementStoreOver");
|
|
48744
48744
|
|
|
48745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48745
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
48746
48746
|
var LABELLED = {
|
|
48747
48747
|
note: "note",
|
|
48748
48748
|
document: "document",
|
|
@@ -48754,7 +48754,7 @@ var LABELLED = {
|
|
|
48754
48754
|
account: "folder"
|
|
48755
48755
|
};
|
|
48756
48756
|
|
|
48757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
48758
48758
|
import { createHash as createHash15 } from "node:crypto";
|
|
48759
48759
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
48760
48760
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -48840,7 +48840,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
48840
48840
|
};
|
|
48841
48841
|
}, "meetingProjectsStoreOver");
|
|
48842
48842
|
|
|
48843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48843
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
48844
48844
|
var ORGANIZATIONS_QUERY = {
|
|
48845
48845
|
entity: "organization",
|
|
48846
48846
|
backend: "sql",
|
|
@@ -48881,7 +48881,7 @@ var REMINDERS_QUERY = {
|
|
|
48881
48881
|
})
|
|
48882
48882
|
};
|
|
48883
48883
|
|
|
48884
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
48885
48885
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
48886
48886
|
id: String(row2.id),
|
|
48887
48887
|
ref: `organization:${row2.id}`,
|
|
@@ -48923,7 +48923,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
48923
48923
|
}), "setOwnOrganization")
|
|
48924
48924
|
}), "organizationsStoreOver");
|
|
48925
48925
|
|
|
48926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
48927
48927
|
var KINDS2 = RELATION_KINDS.map(linkKind).join(", ");
|
|
48928
48928
|
var typeOfRef = /* @__PURE__ */ __name((column2) => `substr(${column2}, 1, instr(${column2}, ':') - 1)`, "typeOfRef");
|
|
48929
48929
|
var idOfRef = /* @__PURE__ */ __name((column2) => `CAST(substr(${column2}, instr(${column2}, ':') + 1) AS INTEGER)`, "idOfRef");
|
|
@@ -49048,13 +49048,13 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
49048
49048
|
__name(proposalItem, "proposalItem");
|
|
49049
49049
|
}, "relationListOver");
|
|
49050
49050
|
|
|
49051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
49052
49052
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
49053
49053
|
...relationListOver(context),
|
|
49054
49054
|
...relationRolesOver(context)
|
|
49055
49055
|
}), "relationReadsOver");
|
|
49056
49056
|
|
|
49057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
49058
49058
|
var TABLES5 = { memory: "memories", fact: "facts" };
|
|
49059
49059
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
49060
49060
|
var DEFAULT_LIMIT = 500;
|
|
@@ -49242,16 +49242,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49242
49242
|
};
|
|
49243
49243
|
}, "sourceReviewStoreOver");
|
|
49244
49244
|
|
|
49245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49245
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
49246
49246
|
import { createHash as createHash18 } from "node:crypto";
|
|
49247
49247
|
|
|
49248
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49248
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
49249
49249
|
import { createHash as createHash17 } from "node:crypto";
|
|
49250
49250
|
|
|
49251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
49252
49252
|
import { createHash as createHash16 } from "node:crypto";
|
|
49253
49253
|
|
|
49254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
49255
49255
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
49256
49256
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
49257
49257
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -49302,7 +49302,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
49302
49302
|
return input;
|
|
49303
49303
|
}, "consolidationApplyInput");
|
|
49304
49304
|
|
|
49305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
49306
49306
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
49307
49307
|
id: String(row2.id),
|
|
49308
49308
|
sourceId: String(row2.source_id),
|
|
@@ -49377,7 +49377,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
49377
49377
|
}, { beforeCommit: check3 });
|
|
49378
49378
|
}, "applyTagConsolidation");
|
|
49379
49379
|
|
|
49380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49380
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
49381
49381
|
var selections = [
|
|
49382
49382
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
49383
49383
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -49521,7 +49521,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
49521
49521
|
};
|
|
49522
49522
|
}, "previewRows");
|
|
49523
49523
|
|
|
49524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49524
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
49525
49525
|
var kinds = ["project", "tag", "topic"];
|
|
49526
49526
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
49527
49527
|
if (signal?.aborted)
|
|
@@ -49785,7 +49785,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49785
49785
|
};
|
|
49786
49786
|
}, "vocabularyStoreOver");
|
|
49787
49787
|
|
|
49788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
49789
49789
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
49790
49790
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
49791
49791
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -50331,7 +50331,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
50331
50331
|
return key2.padEnd(3, "X");
|
|
50332
50332
|
}, "projectKey");
|
|
50333
50333
|
|
|
50334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
50335
50335
|
var DAY6 = 864e5;
|
|
50336
50336
|
var SETTING4 = "logs_pruned_at";
|
|
50337
50337
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY6, botUpdatePayloadsMs: 30 * DAY6 };
|
|
@@ -50358,7 +50358,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
50358
50358
|
};
|
|
50359
50359
|
}, "logPruner");
|
|
50360
50360
|
|
|
50361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
50362
50362
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
50363
50363
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
50364
50364
|
var invalid7 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -50734,7 +50734,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
50734
50734
|
}, "checkMailFindings");
|
|
50735
50735
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
50736
50736
|
|
|
50737
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
50738
50738
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
50739
50739
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
50740
50740
|
var WEIGHTS = {
|
|
@@ -50867,7 +50867,7 @@ var scoreGroup = /* @__PURE__ */ __name((items, context) => {
|
|
|
50867
50867
|
return { score: kept2.reduce((sum, signal) => sum + WEIGHTS[signal], 0), signals: kept2 };
|
|
50868
50868
|
}, "scoreGroup");
|
|
50869
50869
|
|
|
50870
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50870
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
50871
50871
|
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";
|
|
50872
50872
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
50873
50873
|
const { database, now: now2 } = context;
|
|
@@ -51075,7 +51075,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51075
51075
|
};
|
|
51076
51076
|
}, "ordersStoreOver");
|
|
51077
51077
|
|
|
51078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
51079
51079
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
51080
51080
|
throw new CliError("validation_error", "mail findings cite mail that changed since it was read; stage a new batch", {
|
|
51081
51081
|
reason: "mail-findings.stale"
|
|
@@ -51532,7 +51532,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
51532
51532
|
};
|
|
51533
51533
|
}, "mailFindingsStoreOver");
|
|
51534
51534
|
|
|
51535
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
51536
51536
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
51537
51537
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
51538
51538
|
reason: "meeting-findings.stale"
|
|
@@ -51700,7 +51700,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51700
51700
|
};
|
|
51701
51701
|
}, "meetingFindingsStoreOver");
|
|
51702
51702
|
|
|
51703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
51704
51704
|
var RANK_BATCH = 512;
|
|
51705
51705
|
var LIVE4 = "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";
|
|
51706
51706
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -51971,7 +51971,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
51971
51971
|
}
|
|
51972
51972
|
}), "meetingVectorsOver");
|
|
51973
51973
|
|
|
51974
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
51975
51975
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
51976
51976
|
var TEXTS = {
|
|
51977
51977
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -52072,7 +52072,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52072
52072
|
};
|
|
52073
52073
|
}, "sourceMentionStoreOver");
|
|
52074
52074
|
|
|
52075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
52076
52076
|
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";
|
|
52077
52077
|
var MAX_SPLITS = 100;
|
|
52078
52078
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -52303,11 +52303,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52303
52303
|
};
|
|
52304
52304
|
}, "transactionsStoreOver");
|
|
52305
52305
|
|
|
52306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
52307
52307
|
import { accessSync, constants, existsSync, mkdirSync as mkdirSync2, statSync, writeFileSync as writeFileSync2 } from "node:fs";
|
|
52308
52308
|
import { dirname as dirname2 } from "node:path";
|
|
52309
52309
|
|
|
52310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52310
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
52311
52311
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
52312
52312
|
var CLIENTS_SETTING = "clients";
|
|
52313
52313
|
var coreVersion = (() => {
|
|
@@ -52365,7 +52365,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
52365
52365
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
52366
52366
|
}, "refusalAdvice");
|
|
52367
52367
|
|
|
52368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
52369
52369
|
var GENERATED = [
|
|
52370
52370
|
{
|
|
52371
52371
|
"name": "20261010184427_initial",
|
|
@@ -53578,7 +53578,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
53578
53578
|
}
|
|
53579
53579
|
];
|
|
53580
53580
|
|
|
53581
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53581
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
53582
53582
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
53583
53583
|
import { basename, dirname, join as join2, parse } from "node:path";
|
|
53584
53584
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -53811,7 +53811,7 @@ var rollBack = /* @__PURE__ */ __name((database, path) => {
|
|
|
53811
53811
|
return { ...result, foreignKeyViolations };
|
|
53812
53812
|
}, "rollBack");
|
|
53813
53813
|
|
|
53814
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53814
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
53815
53815
|
var V31_TABLES = [
|
|
53816
53816
|
"accounts",
|
|
53817
53817
|
"account_identities",
|
|
@@ -53965,7 +53965,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
53965
53965
|
return migrations;
|
|
53966
53966
|
}, "generatedMigrations");
|
|
53967
53967
|
|
|
53968
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
53969
53969
|
var MIGRATIONS = generatedMigrations();
|
|
53970
53970
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
53971
53971
|
version INTEGER PRIMARY KEY,
|
|
@@ -54044,7 +54044,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
54044
54044
|
}
|
|
54045
54045
|
}, "migrate");
|
|
54046
54046
|
|
|
54047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
54048
54048
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
54049
54049
|
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 ?");
|
|
54050
54050
|
if (pending.get(0, 1) === void 0)
|
|
@@ -54066,7 +54066,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
54066
54066
|
}
|
|
54067
54067
|
}, "fillJoinKeys");
|
|
54068
54068
|
|
|
54069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
54070
54070
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
54071
54071
|
refuseOwnerStoreInTests(path);
|
|
54072
54072
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -54080,8 +54080,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
54080
54080
|
}, "openSqlite");
|
|
54081
54081
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
54082
54082
|
quietSqliteWarning();
|
|
54083
|
-
const { drizzle } = await import("./node-
|
|
54084
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
54083
|
+
const { drizzle } = await import("./node-OCRAUHTJ.js");
|
|
54084
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-UIZIEENG.js");
|
|
54085
54085
|
const client = await nodeClient(path, { readOnly });
|
|
54086
54086
|
try {
|
|
54087
54087
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -54091,8 +54091,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
54091
54091
|
}
|
|
54092
54092
|
}, "openUnderNode");
|
|
54093
54093
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
54094
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
54095
|
-
const { drizzle } = await import("./bun-
|
|
54094
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-IIJSZ5I2.js");
|
|
54095
|
+
const { drizzle } = await import("./bun-3NYKD7YB.js");
|
|
54096
54096
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
54097
54097
|
try {
|
|
54098
54098
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -54102,7 +54102,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
54102
54102
|
}
|
|
54103
54103
|
}, "openUnderBun");
|
|
54104
54104
|
|
|
54105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
54106
54106
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
54107
54107
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
54108
54108
|
try {
|
|
@@ -54170,7 +54170,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
54170
54170
|
});
|
|
54171
54171
|
}, "movePaymentFacts");
|
|
54172
54172
|
|
|
54173
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54173
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
54174
54174
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
54175
54175
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
54176
54176
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -54188,7 +54188,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
54188
54188
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
54189
54189
|
}, "assertReadCompatible");
|
|
54190
54190
|
|
|
54191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
54192
54192
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
54193
54193
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
54194
54194
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -54234,7 +54234,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
54234
54234
|
});
|
|
54235
54235
|
}, "moveSuggestedLinks");
|
|
54236
54236
|
|
|
54237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
54238
54238
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
54239
54239
|
var TEST_PROVIDER = "chat";
|
|
54240
54240
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -54255,7 +54255,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
54255
54255
|
}
|
|
54256
54256
|
}, "purgeTestAccounts");
|
|
54257
54257
|
|
|
54258
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54258
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
54259
54259
|
var BACKFILL_ON_OPEN = 5e3;
|
|
54260
54260
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
54261
54261
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -54353,7 +54353,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
54353
54353
|
}
|
|
54354
54354
|
}, "openStoreContext");
|
|
54355
54355
|
|
|
54356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
54357
54357
|
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";
|
|
54358
54358
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
54359
54359
|
const { database, now: now2 } = context;
|
|
@@ -54459,10 +54459,10 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54459
54459
|
};
|
|
54460
54460
|
}, "productsStoreOver");
|
|
54461
54461
|
|
|
54462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54462
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
54463
54463
|
import { createHash as createHash19 } from "node:crypto";
|
|
54464
54464
|
|
|
54465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54465
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
54466
54466
|
var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
54467
54467
|
var ref = text5(2048);
|
|
54468
54468
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -54532,7 +54532,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
54532
54532
|
}))
|
|
54533
54533
|
});
|
|
54534
54534
|
|
|
54535
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
54536
54536
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
54537
54537
|
var invalid10 = /* @__PURE__ */ __name((field4) => {
|
|
54538
54538
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -54636,7 +54636,7 @@ var validateProjectAnnotationsGraph = /* @__PURE__ */ __name((manifest, addition
|
|
|
54636
54636
|
invalid10("external.unused");
|
|
54637
54637
|
}, "validateProjectAnnotationsGraph");
|
|
54638
54638
|
|
|
54639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
54640
54640
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
54641
54641
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
54642
54642
|
var targetSchema = strictObject({
|
|
@@ -54742,7 +54742,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
54742
54742
|
};
|
|
54743
54743
|
}, "planBoundProjectAnnotations");
|
|
54744
54744
|
|
|
54745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54745
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
54746
54746
|
import { createHash as createHash20 } from "node:crypto";
|
|
54747
54747
|
var text6 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
54748
54748
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -54836,7 +54836,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
54836
54836
|
})).digest("hex");
|
|
54837
54837
|
}, "projectAnnotationSnapshotFingerprint");
|
|
54838
54838
|
|
|
54839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
54840
54840
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
54841
54841
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
54842
54842
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -54853,7 +54853,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
54853
54853
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
54854
54854
|
}, "projectAnnotationRequest");
|
|
54855
54855
|
|
|
54856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
54857
54857
|
var SnapshotBudget = class {
|
|
54858
54858
|
static {
|
|
54859
54859
|
__name(this, "SnapshotBudget");
|
|
@@ -54879,13 +54879,13 @@ var SnapshotBudget = class {
|
|
|
54879
54879
|
}
|
|
54880
54880
|
};
|
|
54881
54881
|
|
|
54882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
54883
54883
|
import { createHash as createHash22 } from "node:crypto";
|
|
54884
54884
|
|
|
54885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54885
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
54886
54886
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
54887
54887
|
|
|
54888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
54889
54889
|
import { createHash as createHash21 } from "node:crypto";
|
|
54890
54890
|
var invalid12 = /* @__PURE__ */ __name(() => {
|
|
54891
54891
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -55028,7 +55028,7 @@ var ProjectSnapshotSources = class {
|
|
|
55028
55028
|
}
|
|
55029
55029
|
};
|
|
55030
55030
|
|
|
55031
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55031
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
55032
55032
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
55033
55033
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
55034
55034
|
}, "unsupported");
|
|
@@ -55206,7 +55206,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
55206
55206
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
55207
55207
|
}), "projectAnnotationSnapshot");
|
|
55208
55208
|
|
|
55209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55209
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
55210
55210
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
55211
55211
|
const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
55212
55212
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -55268,7 +55268,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
55268
55268
|
};
|
|
55269
55269
|
}), "previewAnnotationSnapshot");
|
|
55270
55270
|
|
|
55271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
55272
55272
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
55273
55273
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
55274
55274
|
if (link3.kind === "evidence" && to)
|
|
@@ -55335,7 +55335,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
55335
55335
|
return mappings;
|
|
55336
55336
|
}, "restoreAnnotationRecords");
|
|
55337
55337
|
|
|
55338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
55339
55339
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
55340
55340
|
async preview(request) {
|
|
55341
55341
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -55365,7 +55365,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
55365
55365
|
}
|
|
55366
55366
|
}), "projectAnnotationStoreOver");
|
|
55367
55367
|
|
|
55368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
55369
55369
|
var IMPORTER = { bot: "import" };
|
|
55370
55370
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
55371
55371
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -55410,7 +55410,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
55410
55410
|
};
|
|
55411
55411
|
}), "moneyLinesOf");
|
|
55412
55412
|
|
|
55413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
55414
55414
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
55415
55415
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
55416
55416
|
const sql2 = /* @__PURE__ */ __name((text7) => database.prepare(text7), "sql");
|
|
@@ -55481,7 +55481,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
55481
55481
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
55482
55482
|
}, "recordRelationsOver");
|
|
55483
55483
|
|
|
55484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55484
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
55485
55485
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
55486
55486
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
55487
55487
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -55535,7 +55535,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
55535
55535
|
return { pointedAt, remap };
|
|
55536
55536
|
}, "recordRemapOver");
|
|
55537
55537
|
|
|
55538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
55539
55539
|
var runs = 0;
|
|
55540
55540
|
var PAGE = 500;
|
|
55541
55541
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -55695,7 +55695,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
55695
55695
|
return pointerOf("records", index2, "fields", key2);
|
|
55696
55696
|
}, "waitingPointer");
|
|
55697
55697
|
|
|
55698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
55699
55699
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
55700
55700
|
var SCHEME2 = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
55701
55701
|
var ORG_EMAIL = "org-email";
|
|
@@ -55883,7 +55883,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
55883
55883
|
]);
|
|
55884
55884
|
}, "renameMade");
|
|
55885
55885
|
|
|
55886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
55887
55887
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
55888
55888
|
name: given(fields4, "name"),
|
|
55889
55889
|
unit: given(fields4, "unit"),
|
|
@@ -56006,7 +56006,7 @@ var DIRECT_PROJECTORS = {
|
|
|
56006
56006
|
lead: dealProjector("lead")
|
|
56007
56007
|
};
|
|
56008
56008
|
|
|
56009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
56010
56010
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
56011
56011
|
const importer = authorActor(context, IMPORTER).actor;
|
|
56012
56012
|
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;
|
|
@@ -56216,7 +56216,7 @@ var MONEY_PROJECTORS = {
|
|
|
56216
56216
|
}
|
|
56217
56217
|
};
|
|
56218
56218
|
|
|
56219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56219
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
56220
56220
|
var CALLS_CALENDAR = "calls";
|
|
56221
56221
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
56222
56222
|
if (!isImportedProvider(source2.provider))
|
|
@@ -56391,7 +56391,7 @@ var PHONE_PROJECTORS = {
|
|
|
56391
56391
|
}
|
|
56392
56392
|
};
|
|
56393
56393
|
|
|
56394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56394
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
56395
56395
|
var RECORD_PROJECTORS = {
|
|
56396
56396
|
...MONEY_PROJECTORS,
|
|
56397
56397
|
...DIRECT_PROJECTORS,
|
|
@@ -56401,7 +56401,7 @@ var RECORD_PROJECTORS = {
|
|
|
56401
56401
|
project: null
|
|
56402
56402
|
};
|
|
56403
56403
|
|
|
56404
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56404
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
56405
56405
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
56406
56406
|
const sql2 = /* @__PURE__ */ __name((text7) => database.prepare(text7), "sql");
|
|
56407
56407
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -56463,7 +56463,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
56463
56463
|
return { settle, checkShares };
|
|
56464
56464
|
}, "recordSettlingOver");
|
|
56465
56465
|
|
|
56466
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56466
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
56467
56467
|
import { createHash as createHash23 } from "node:crypto";
|
|
56468
56468
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
56469
56469
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -56479,7 +56479,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
56479
56479
|
return { stamp, untouched };
|
|
56480
56480
|
}, "importStampsOver");
|
|
56481
56481
|
|
|
56482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56482
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
56483
56483
|
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";
|
|
56484
56484
|
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";
|
|
56485
56485
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -56710,7 +56710,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56710
56710
|
};
|
|
56711
56711
|
}, "subscriptionsStoreOver");
|
|
56712
56712
|
|
|
56713
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
56714
56714
|
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";
|
|
56715
56715
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
56716
56716
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -56832,7 +56832,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56832
56832
|
};
|
|
56833
56833
|
}, "walletsStoreOver");
|
|
56834
56834
|
|
|
56835
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
56836
56836
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
56837
56837
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
56838
56838
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -57089,7 +57089,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
57089
57089
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
57090
57090
|
}, "recordWritesOver");
|
|
57091
57091
|
|
|
57092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
57093
57093
|
var LIMIT = 1e3;
|
|
57094
57094
|
var iso15 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
57095
57095
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -57294,7 +57294,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57294
57294
|
};
|
|
57295
57295
|
}, "recordStoreOver");
|
|
57296
57296
|
|
|
57297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
57298
57298
|
var refusalOf = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
57299
57299
|
var wrapped = /* @__PURE__ */ new WeakMap();
|
|
57300
57300
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -57329,7 +57329,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
57329
57329
|
return proxy;
|
|
57330
57330
|
}, "storeErrors");
|
|
57331
57331
|
|
|
57332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
57333
57333
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
57334
57334
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
57335
57335
|
let merged = { from: from2, to };
|
|
@@ -57342,7 +57342,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
57342
57342
|
}, "markRange");
|
|
57343
57343
|
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");
|
|
57344
57344
|
|
|
57345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
57346
57346
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
57347
57347
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
57348
57348
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -57363,7 +57363,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
57363
57363
|
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);
|
|
57364
57364
|
}, "setTaskAnalysisMark");
|
|
57365
57365
|
|
|
57366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57366
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
57367
57367
|
var keyOf5 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
57368
57368
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
57369
57369
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf5(account));
|
|
@@ -57373,7 +57373,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
57373
57373
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf5(account), JSON.stringify(until), now2);
|
|
57374
57374
|
}, "setTaskRulesStop");
|
|
57375
57375
|
|
|
57376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
57377
57377
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
57378
57378
|
const { database } = context;
|
|
57379
57379
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -57432,7 +57432,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57432
57432
|
};
|
|
57433
57433
|
}, "syncStoreOver");
|
|
57434
57434
|
|
|
57435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
57436
57436
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
57437
57437
|
const { database } = context;
|
|
57438
57438
|
return {
|
|
@@ -57454,7 +57454,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57454
57454
|
};
|
|
57455
57455
|
}, "tagsStoreOver");
|
|
57456
57456
|
|
|
57457
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
57458
57458
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
57459
57459
|
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
|
|
57460
57460
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -57581,7 +57581,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
57581
57581
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
57582
57582
|
}, "savePictureChunks");
|
|
57583
57583
|
|
|
57584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57584
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
57585
57585
|
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,
|
|
57586
57586
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
57587
57587
|
FROM messages m
|
|
@@ -57670,7 +57670,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
57670
57670
|
return plain2(best(found2));
|
|
57671
57671
|
}, "nearestMessages");
|
|
57672
57672
|
|
|
57673
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57673
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
57674
57674
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
57675
57675
|
const { database } = context;
|
|
57676
57676
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -57929,7 +57929,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
57929
57929
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
57930
57930
|
}), "vectorsStoreOver");
|
|
57931
57931
|
|
|
57932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
57933
57933
|
import { existsSync as existsSync2, readFileSync as readFileSync4 } from "node:fs";
|
|
57934
57934
|
import { dirname as dirname3, join as join3 } from "node:path";
|
|
57935
57935
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -58017,10 +58017,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
58017
58017
|
}
|
|
58018
58018
|
}, "lastBackup");
|
|
58019
58019
|
|
|
58020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
58021
58021
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
58022
58022
|
|
|
58023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58023
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
58024
58024
|
var KEY4 = "ownerLanguages";
|
|
58025
58025
|
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(" "));
|
|
58026
58026
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -58050,7 +58050,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
58050
58050
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(KEY4, JSON.stringify(languages), now2);
|
|
58051
58051
|
}, "saveOwnerLanguages");
|
|
58052
58052
|
|
|
58053
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
58054
58054
|
var COUNTED_TABLES = [
|
|
58055
58055
|
"accounts",
|
|
58056
58056
|
"chats",
|
|
@@ -58135,7 +58135,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
58135
58135
|
};
|
|
58136
58136
|
}, "storeContents");
|
|
58137
58137
|
|
|
58138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.611.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_019e5129f390ba1047db736f75b19440/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
58139
58139
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
58140
58140
|
const context = await openStoreContext(options);
|
|
58141
58141
|
try {
|