@wirecat/cli-memo 0.131.60 → 0.131.61
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-NUBT2FJI.js → all-profiles-WPBMSWJF.js} +5 -5
- package/dist/bundle/{anthropic-QNTKWSQT.js → anthropic-FZRVISSX.js} +7 -5
- package/dist/bundle/{app-server-6TXXVCSE.js → app-server-QGIZPU4R.js} +35 -35
- package/dist/bundle/auto-5VPCO4DD.js +85 -0
- package/dist/bundle/{bun-3NYKD7YB.js → bun-AO76624P.js} +2 -2
- package/dist/bundle/{bun-sqlite-IIJSZ5I2.js → bun-sqlite-HYBE66QU.js} +2 -2
- package/dist/bundle/{chunk-XBSLZQY4.js → chunk-233N77WN.js} +1283 -797
- package/dist/bundle/{chunk-25N2ZCXV.js → chunk-2Q55K5HY.js} +2 -2
- package/dist/bundle/{chunk-RC2NAT7T.js → chunk-2UXFM5GE.js} +12 -12
- package/dist/bundle/{chunk-EMU7UIUA.js → chunk-2VMZLQ5K.js} +2 -2
- package/dist/bundle/{chunk-LXQ56N66.js → chunk-35OBIX5A.js} +8 -8
- package/dist/bundle/{chunk-HF2W6622.js → chunk-37ILRM2G.js} +4 -4
- package/dist/bundle/{chunk-L3G5UY2P.js → chunk-3FDJSMLJ.js} +4 -4
- package/dist/bundle/{chunk-TLZEAHCB.js → chunk-3FPF5DBU.js} +5 -5
- package/dist/bundle/{chunk-B6R7O3U5.js → chunk-4HLYKLGJ.js} +1 -1
- package/dist/bundle/{chunk-O55ELCFO.js → chunk-4WKZ3UIZ.js} +1 -1
- package/dist/bundle/{chunk-LZFQZOAL.js → chunk-5SD4CV2D.js} +354 -266
- package/dist/bundle/{chunk-RU34XFKL.js → chunk-5ZVWDMDT.js} +1 -1
- package/dist/bundle/{chunk-NSEX4YST.js → chunk-6AEQACVV.js} +7 -7
- package/dist/bundle/{chunk-PNIAEDGJ.js → chunk-6NHJ4TTJ.js} +515 -356
- package/dist/bundle/{chunk-67L6BQOD.js → chunk-6YK3RZZJ.js} +4 -4
- package/dist/bundle/{chunk-SYJMQIIJ.js → chunk-7CKXTTZG.js} +2 -2
- package/dist/bundle/{chunk-NX4XCS64.js → chunk-7DPHHUSZ.js} +21 -21
- package/dist/bundle/{chunk-BYIKFYRY.js → chunk-7E46JN6V.js} +2 -2
- package/dist/bundle/{chunk-SU2EPGGH.js → chunk-7ETYPYIN.js} +12 -12
- package/dist/bundle/{chunk-6NYZ32K5.js → chunk-7NKBX7FC.js} +2 -2
- package/dist/bundle/{chunk-67CIUJO6.js → chunk-B4VCZOLF.js} +1 -1
- package/dist/bundle/{chunk-3M237SBK.js → chunk-CTRVHHBK.js} +5 -5
- package/dist/bundle/{chunk-4RSPI6OR.js → chunk-D4PK5OXW.js} +1 -1
- package/dist/bundle/{chunk-NXV3USUU.js → chunk-ETYD55QD.js} +3 -3
- package/dist/bundle/{chunk-DZKTPOTJ.js → chunk-F6E7DSJO.js} +31 -31
- package/dist/bundle/{chunk-CZUMANL4.js → chunk-HLTGPK6P.js} +4 -4
- package/dist/bundle/{chunk-VGLDBSGN.js → chunk-I6LNI45S.js} +5 -5
- package/dist/bundle/{chunk-MYVP4IFW.js → chunk-IZZU4NS6.js} +3 -3
- package/dist/bundle/{chunk-FH56EHWA.js → chunk-JAJSTFBB.js} +6 -6
- package/dist/bundle/{chunk-AEATD5XH.js → chunk-K6FQVROA.js} +21 -21
- package/dist/bundle/{chunk-WUOQ7CQU.js → chunk-KGZM5WYK.js} +4 -4
- package/dist/bundle/{chunk-FXXXBLZD.js → chunk-KZRBIHQL.js} +5 -5
- package/dist/bundle/{chunk-MV6M3VR3.js → chunk-LIW42UCX.js} +9 -9
- package/dist/bundle/{chunk-SSKSRETJ.js → chunk-MQCBJGXA.js} +10 -9
- package/dist/bundle/{chunk-XXZ3WQSW.js → chunk-OEPBIWHI.js} +150 -150
- package/dist/bundle/{chunk-MCPHBBJL.js → chunk-OFERGS4J.js} +23 -1
- package/dist/bundle/{chunk-GGGIUXKD.js → chunk-OIHKFGHK.js} +3 -3
- package/dist/bundle/{chunk-KMA63WO5.js → chunk-OQSOQYSQ.js} +4 -4
- package/dist/bundle/{chunk-VUJANY4X.js → chunk-OWVHNTY6.js} +6 -6
- package/dist/bundle/{chunk-PMGGNQHL.js → chunk-PSYZ33UQ.js} +1 -1
- package/dist/bundle/{chunk-Z3SASH3J.js → chunk-R7ZD7TNI.js} +1 -1
- package/dist/bundle/{chunk-LZQ7QENQ.js → chunk-RRHSJ7CR.js} +62 -62
- package/dist/bundle/{chunk-S2VXXF4H.js → chunk-RRPUM4RS.js} +2 -2
- package/dist/bundle/{chunk-S56CC44R.js → chunk-RT476OFI.js} +7 -7
- package/dist/bundle/{chunk-G6P5NWIZ.js → chunk-SSX6S3EG.js} +1 -1
- package/dist/bundle/{chunk-NMWIWQ7J.js → chunk-STXMSLU6.js} +1 -1
- package/dist/bundle/{chunk-CZPAYIQR.js → chunk-UTSMQ7KI.js} +1 -1
- package/dist/bundle/{chunk-BZZRBJ2C.js → chunk-UTUUXAPS.js} +28 -28
- package/dist/bundle/{chunk-ND2PQA4X.js → chunk-WFDGEREJ.js} +2 -2
- package/dist/bundle/{chunk-XW4NE2NW.js → chunk-WMRR2SNG.js} +1 -1
- package/dist/bundle/{chunk-GLPSPFTP.js → chunk-XT7EJLA4.js} +4 -4
- package/dist/bundle/{chunk-4II6DM7L.js → chunk-XU7UER3B.js} +10 -10
- package/dist/bundle/{chunk-636FK3A6.js → chunk-XYFYZP2N.js} +1 -1
- package/dist/bundle/{chunk-IJKXX7LB.js → chunk-Y264FW55.js} +1 -1
- package/dist/bundle/{chunk-4VAKZH56.js → chunk-YRHLPKTG.js} +2 -2
- package/dist/bundle/{chunk-KOBVPWMU.js → chunk-YVCNJKDA.js} +210 -364
- package/dist/bundle/{command-contract-KE77NBYG.js → command-contract-4TGN6GSP.js} +11 -11
- package/dist/bundle/{decode-AD352TI2.js → decode-S3PPQHID.js} +2 -2
- package/dist/bundle/{echarts-VCQEG6RB.js → echarts-AH6U7X2S.js} +2 -2
- package/dist/bundle/{embed-A2YCI5TM.js → embed-4NSZECMB.js} +3 -3
- package/dist/bundle/{embedder-G35OKUR5.js → embedder-EGRA7YEY.js} +6 -6
- package/dist/bundle/{entry-3Y2C4AAL.js → entry-O3V72WZP.js} +4 -4
- package/dist/bundle/failure-CFGWWTV5.js +65 -0
- package/dist/bundle/{first-run-RDQFQ5MD.js → first-run-S7RRDIGX.js} +5 -5
- package/dist/bundle/{first-screen-XWHL4AEK.js → first-screen-YKJAQUVE.js} +12 -12
- package/dist/bundle/{instructions-VWX5TPRM.js → instructions-ETUUZKBM.js} +1 -1
- package/dist/bundle/{mcp-JHDRZPSO.js → mcp-J3K7RC5W.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-OCRAUHTJ.js → node-O4XVOEGO.js} +2 -2
- package/dist/bundle/{node-sqlite-UIZIEENG.js → node-sqlite-PC3K43U7.js} +3 -3
- package/dist/bundle/{oauth-WZOYRQA4.js → oauth-MBJUEG2Z.js} +4 -4
- package/dist/bundle/{open-ITE5EG22.js → open-5FAYV6JM.js} +2 -2
- package/dist/bundle/{openai-S4TD7H5G.js → openai-57CRSGLH.js} +7 -7
- package/dist/bundle/{process-Z7OS65OQ.js → process-NAW4COYH.js} +1 -1
- package/dist/bundle/{program-PYCRRMXK.js → program-CFJAGFYD.js} +158 -71
- package/dist/bundle/{prompt-NW2KOEQS.js → prompt-FT2MMVS7.js} +2 -2
- package/dist/bundle/{recognize-65IM7MS4.js → recognize-PEYPOI3Q.js} +1 -1
- package/dist/bundle/{remote-4EOO533Z.js → remote-FQAXACFW.js} +4 -4
- package/dist/bundle/{rerank-LKRFHRN6.js → rerank-4KEB4X6T.js} +4 -4
- package/dist/bundle/{serve-SIB2TBOF.js → serve-LCTIHO37.js} +6 -6
- package/dist/bundle/server-AQTWRRAJ.js +61 -0
- package/dist/bundle/server-JIFODLCU.js +48 -0
- package/dist/bundle/{server-JZAL3SRH.js → server-XQLRMM73.js} +49 -50
- package/dist/bundle/{state-245GTWCO.js → state-YF4M4RHC.js} +3 -3
- package/dist/bundle/{store-2QSJI77T.js → store-EQEMYMCC.js} +11 -9
- package/dist/bundle/store-maintenance-command-7IC3LTYY.js +47 -0
- package/dist/bundle/update-T237KLFA.js +68 -0
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +6 -0
- package/dist/examples.js.map +1 -1
- package/dist/models/command.d.ts +2 -2
- package/dist/models/command.d.ts.map +1 -1
- package/dist/models/command.js +4 -1
- package/dist/models/command.js.map +1 -1
- package/dist/notes/embed.d.ts +25 -2
- package/dist/notes/embed.d.ts.map +1 -1
- package/dist/notes/embed.js +80 -6
- package/dist/notes/embed.js.map +1 -1
- package/dist/program.d.ts +4 -2
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +3 -3
- package/dist/program.js.map +1 -1
- package/dist/run/import.d.ts +5 -3
- package/dist/run/import.d.ts.map +1 -1
- package/dist/run/import.js +17 -4
- package/dist/run/import.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/auto-4VLWHDG7.js +0 -86
- package/dist/bundle/chunk-YXBMP74S.js +0 -33
- package/dist/bundle/failure-GHNN2IIX.js +0 -66
- package/dist/bundle/server-DO3J7CR5.js +0 -48
- package/dist/bundle/server-NQLMHLMU.js +0 -61
- package/dist/bundle/store-maintenance-command-F7FSHWHW.js +0 -48
- package/dist/bundle/update-NENHRNFS.js +0 -69
- /package/dist/bundle/{chunk-GK2FRFM6.js → chunk-GFNWVGLD.js} +0 -0
|
@@ -136,12 +136,12 @@ import {
|
|
|
136
136
|
walkQuery,
|
|
137
137
|
walletLine,
|
|
138
138
|
zonedMoment
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-RRHSJ7CR.js";
|
|
140
140
|
import {
|
|
141
141
|
holdsCredential,
|
|
142
142
|
secretNamed,
|
|
143
143
|
sqliteCode
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-YRHLPKTG.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-RT476OFI.js";
|
|
158
158
|
import {
|
|
159
159
|
DEFAULT_TASK_CATEGORIES,
|
|
160
160
|
sharedConfigPath,
|
|
161
161
|
storedTaskCategories,
|
|
162
162
|
taskCategoriesReader
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-OQSOQYSQ.js";
|
|
164
164
|
import {
|
|
165
165
|
refuseOwnerStoreInTests,
|
|
166
166
|
storePath
|
|
167
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-D4PK5OXW.js";
|
|
168
168
|
import {
|
|
169
169
|
quietSqliteWarning,
|
|
170
170
|
storeCapable
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-I6LNI45S.js";
|
|
172
172
|
import {
|
|
173
173
|
PRAGMAS,
|
|
174
174
|
TIME_LIMIT_FUNCTION,
|
|
175
175
|
TimeLimitReached,
|
|
176
176
|
isQueryOnly
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-STXMSLU6.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-5ZVWDMDT.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.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/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.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/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.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/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.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/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.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/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.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/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.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/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.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/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.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/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.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
11342
11342
|
var ENTITY_TABLES = {
|
|
11343
11343
|
...RECORD_TABLES,
|
|
11344
11344
|
account: "accounts",
|
|
@@ -11350,6 +11350,7 @@ var ENTITY_TABLES = {
|
|
|
11350
11350
|
document: "documents",
|
|
11351
11351
|
document_picture: "documents",
|
|
11352
11352
|
email: "emails",
|
|
11353
|
+
email_enrichment: "emails",
|
|
11353
11354
|
email_thread: "email_threads",
|
|
11354
11355
|
event: "events",
|
|
11355
11356
|
event_series: "event_series",
|
|
@@ -11376,14 +11377,14 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
11376
11377
|
return { table, pointer, type, count, known: known2 };
|
|
11377
11378
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
11378
11379
|
|
|
11379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11380
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/source-review.js
|
|
11380
11381
|
var SOURCE_REVIEW_KIND = "memory_source_review";
|
|
11381
11382
|
var SOURCE_REVIEW_CAUSES = ["changed", "outdated", "deleted", "contradicted"];
|
|
11382
11383
|
var ERASED_TEXT = "[source erased]";
|
|
11383
11384
|
var severity = /* @__PURE__ */ __name((cause) => SOURCE_REVIEW_CAUSES.indexOf(cause), "severity");
|
|
11384
11385
|
var graver = /* @__PURE__ */ __name((a, b) => severity(b) > severity(a) ? b : a, "graver");
|
|
11385
11386
|
|
|
11386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
11387
11388
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
11388
11389
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
11389
11390
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -11440,7 +11441,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
11440
11441
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
11441
11442
|
}, "proposedBySql");
|
|
11442
11443
|
|
|
11443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
|
|
11444
11445
|
var TABLES = { memory: "memories", fact: "facts" };
|
|
11445
11446
|
var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
|
|
11446
11447
|
var KEPT = 20;
|
|
@@ -11535,7 +11536,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
|
|
|
11535
11536
|
return scrubbed;
|
|
11536
11537
|
}, "scrubSourceReviews");
|
|
11537
11538
|
|
|
11538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11539
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
11539
11540
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
11540
11541
|
var REFERABLE = {
|
|
11541
11542
|
...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
|
|
@@ -11695,7 +11696,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
11695
11696
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
11696
11697
|
}, "taskIdOf");
|
|
11697
11698
|
|
|
11698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11699
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
|
|
11699
11700
|
var QUOTE_LIMIT = 500;
|
|
11700
11701
|
var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
|
|
11701
11702
|
var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
|
|
@@ -11973,7 +11974,7 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at) => {
|
|
|
11973
11974
|
database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
|
|
11974
11975
|
}, "deleteDocumentRow");
|
|
11975
11976
|
|
|
11976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
11977
11978
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
11978
11979
|
id: integer("id").primaryKey(),
|
|
11979
11980
|
name: text("name").notNull().unique(),
|
|
@@ -11982,7 +11983,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
11982
11983
|
updatedAt: integer("updated_at").notNull()
|
|
11983
11984
|
});
|
|
11984
11985
|
|
|
11985
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11986
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
|
|
11986
11987
|
var linkRevisions = sqliteTable("link_revisions", {
|
|
11987
11988
|
id: integer("id").primaryKey(),
|
|
11988
11989
|
linkId: integer("link_id").notNull(),
|
|
@@ -11994,7 +11995,7 @@ var linkRevisions = sqliteTable("link_revisions", {
|
|
|
11994
11995
|
createdAt: integer("created_at").notNull()
|
|
11995
11996
|
}, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
|
|
11996
11997
|
|
|
11997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
11998
11999
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
11999
12000
|
sourceKey: text("source_key").notNull(),
|
|
12000
12001
|
collection: text("collection").notNull(),
|
|
@@ -12004,13 +12005,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
12004
12005
|
createdAt: integer("created_at").notNull()
|
|
12005
12006
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
12006
12007
|
|
|
12007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
12008
12009
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
12009
12010
|
id: integer("id").notNull(),
|
|
12010
12011
|
indexableType: text("indexable_type").notNull()
|
|
12011
12012
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
12012
12013
|
|
|
12013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
12014
12015
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
12015
12016
|
id: integer("id").primaryKey(),
|
|
12016
12017
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -12030,7 +12031,19 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
12030
12031
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
12031
12032
|
]);
|
|
12032
12033
|
|
|
12033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
|
|
12035
|
+
var enrichments = sqliteTable("enrichments", {
|
|
12036
|
+
subjectType: text("subject_type").notNull(),
|
|
12037
|
+
subjectId: integer("subject_id").notNull(),
|
|
12038
|
+
sourceHash: text("source_hash").notNull(),
|
|
12039
|
+
provider: text("provider").notNull(),
|
|
12040
|
+
model: text("model").notNull(),
|
|
12041
|
+
text: text("text").notNull(),
|
|
12042
|
+
tokens: integer("tokens").notNull(),
|
|
12043
|
+
createdAt: integer("created_at").notNull()
|
|
12044
|
+
}, (table) => [primaryKey({ columns: [table.subjectType, table.subjectId] })]);
|
|
12045
|
+
|
|
12046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
|
|
12034
12047
|
var links = sqliteTable("links", {
|
|
12035
12048
|
id: integer("id").primaryKey(),
|
|
12036
12049
|
fromType: text("from_type").notNull(),
|
|
@@ -12061,7 +12074,7 @@ var links = sqliteTable("links", {
|
|
|
12061
12074
|
index("links_by_to_type_to_id").on(table.toType, table.toId)
|
|
12062
12075
|
]);
|
|
12063
12076
|
|
|
12064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
12065
12078
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
12066
12079
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
12067
12080
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -12087,7 +12100,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
12087
12100
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
12088
12101
|
]);
|
|
12089
12102
|
|
|
12090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
12091
12104
|
var accounts = sqliteTable("accounts", {
|
|
12092
12105
|
id: integer("id").primaryKey(),
|
|
12093
12106
|
provider: text("provider").notNull(),
|
|
@@ -14083,10 +14096,10 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
14083
14096
|
at: integer("at").notNull()
|
|
14084
14097
|
});
|
|
14085
14098
|
|
|
14086
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
14087
14100
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
14088
14101
|
|
|
14089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
14090
14103
|
var ARMS = [
|
|
14091
14104
|
[
|
|
14092
14105
|
"message",
|
|
@@ -14214,7 +14227,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
14214
14227
|
return recomputed;
|
|
14215
14228
|
}, "drainInvolvementQueue");
|
|
14216
14229
|
|
|
14217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
14218
14231
|
import { domainToUnicode } from "node:url";
|
|
14219
14232
|
|
|
14220
14233
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -24236,7 +24249,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
24236
24249
|
}, "oa");
|
|
24237
24250
|
var na = { parse: O, get: aa, isValid: oa };
|
|
24238
24251
|
|
|
24239
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
24240
24253
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
24241
24254
|
var ID = /^[\w-]{10,}$/;
|
|
24242
24255
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -24278,7 +24291,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text7) => [...text7.matchAll(L
|
|
|
24278
24291
|
return { url, documentId: googleDocumentId(url) };
|
|
24279
24292
|
}), "googleDocumentLinks");
|
|
24280
24293
|
|
|
24281
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24294
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
24282
24295
|
var PHONE_PLANS = [
|
|
24283
24296
|
{
|
|
24284
24297
|
country: "us",
|
|
@@ -24658,7 +24671,7 @@ var PHONE_PLANS = [
|
|
|
24658
24671
|
}
|
|
24659
24672
|
];
|
|
24660
24673
|
|
|
24661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24674
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
24662
24675
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
24663
24676
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
24664
24677
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -24699,7 +24712,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
24699
24712
|
return void 0;
|
|
24700
24713
|
}, "nationalPhone");
|
|
24701
24714
|
|
|
24702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
24703
24716
|
var BEFORE = [
|
|
24704
24717
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
24705
24718
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -24959,7 +24972,7 @@ var findPlaces = /* @__PURE__ */ __name((text7) => {
|
|
|
24959
24972
|
return found2.sort((a, b) => a.start - b.start);
|
|
24960
24973
|
}, "findPlaces");
|
|
24961
24974
|
|
|
24962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
24963
24976
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
24964
24977
|
var MENTION_VERSIONS = {
|
|
24965
24978
|
phone: 1,
|
|
@@ -25149,7 +25162,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
25149
25162
|
};
|
|
25150
25163
|
}, "typedPhone");
|
|
25151
25164
|
|
|
25152
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
25153
25166
|
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
25167
|
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
25168
|
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 +25170,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
25157
25170
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
25158
25171
|
var NAME_WORDS = WORDS.split(" ");
|
|
25159
25172
|
|
|
25160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25173
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
25161
25174
|
var LATIN_TO_CYRILLIC = {
|
|
25162
25175
|
shch: "\u0449",
|
|
25163
25176
|
sch: "\u0449",
|
|
@@ -25365,7 +25378,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text7, stem, taken) => {
|
|
|
25365
25378
|
return found2;
|
|
25366
25379
|
}, "findUnknownNames");
|
|
25367
25380
|
|
|
25368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
25369
25382
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
25370
25383
|
"webpage",
|
|
25371
25384
|
"share",
|
|
@@ -25405,7 +25418,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
|
|
|
25405
25418
|
});
|
|
25406
25419
|
}, "matchDownloads");
|
|
25407
25420
|
|
|
25408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25421
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
25409
25422
|
var QUERY_VERSION = 1;
|
|
25410
25423
|
var QUERY_LIMITS2 = {
|
|
25411
25424
|
...QUERY_LIMITS,
|
|
@@ -25441,7 +25454,7 @@ function exhausted(budget) {
|
|
|
25441
25454
|
}
|
|
25442
25455
|
__name(exhausted, "exhausted");
|
|
25443
25456
|
|
|
25444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
25445
25458
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
25446
25459
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
25447
25460
|
kind: "char",
|
|
@@ -25841,7 +25854,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
25841
25854
|
return out;
|
|
25842
25855
|
}, "foldRegex");
|
|
25843
25856
|
|
|
25844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25857
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
25845
25858
|
var PRESET_VERSION = 1;
|
|
25846
25859
|
var PRESETS = {
|
|
25847
25860
|
password: {
|
|
@@ -25895,7 +25908,7 @@ var PRESETS = {
|
|
|
25895
25908
|
}
|
|
25896
25909
|
};
|
|
25897
25910
|
|
|
25898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
25899
25912
|
var FIELD_VERSION = 2;
|
|
25900
25913
|
var UNITS = {
|
|
25901
25914
|
"": 1,
|
|
@@ -26356,12 +26369,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
|
|
|
26356
26369
|
return validateFields(parsed3.output);
|
|
26357
26370
|
}, "validateAst");
|
|
26358
26371
|
|
|
26359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
26360
26373
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
26361
26374
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
26362
26375
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
26363
26376
|
|
|
26364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
26365
26378
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
26366
26379
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
26367
26380
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -26385,7 +26398,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
26385
26398
|
};
|
|
26386
26399
|
}, "linkMatch");
|
|
26387
26400
|
|
|
26388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
26389
26402
|
var SETTING = "phoneCountries";
|
|
26390
26403
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
26391
26404
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -26416,7 +26429,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
26416
26429
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
26417
26430
|
}, "valueMatch");
|
|
26418
26431
|
|
|
26419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
26420
26433
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
26421
26434
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
26422
26435
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -26444,7 +26457,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
26444
26457
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
26445
26458
|
}, "vocabularySimilarity");
|
|
26446
26459
|
|
|
26447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
26448
26461
|
import { createHash } from "node:crypto";
|
|
26449
26462
|
var folded3 = /* @__PURE__ */ __name((name) => {
|
|
26450
26463
|
try {
|
|
@@ -26510,7 +26523,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind4, by, options
|
|
|
26510
26523
|
});
|
|
26511
26524
|
}, "guardTagCreation");
|
|
26512
26525
|
|
|
26513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
26514
26527
|
var invalid2 = /* @__PURE__ */ __name((message3) => {
|
|
26515
26528
|
throw new CliError("validation_error", message3);
|
|
26516
26529
|
}, "invalid");
|
|
@@ -26587,7 +26600,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
26587
26600
|
};
|
|
26588
26601
|
}, "createTagRedirectIndex");
|
|
26589
26602
|
|
|
26590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
26591
26604
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
26592
26605
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
26593
26606
|
if (!row2)
|
|
@@ -26615,7 +26628,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
26615
26628
|
return snapshot2;
|
|
26616
26629
|
}, "tagRedirectSnapshot");
|
|
26617
26630
|
|
|
26618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26631
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
26619
26632
|
import { createHash as createHash2 } from "node:crypto";
|
|
26620
26633
|
var TASK_KEY_PREFIXES = {
|
|
26621
26634
|
question: "Q",
|
|
@@ -26643,7 +26656,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
26643
26656
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
26644
26657
|
}, "taskAccountOf");
|
|
26645
26658
|
|
|
26646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
26647
26660
|
var toMs = /* @__PURE__ */ __name((iso16) => {
|
|
26648
26661
|
if (iso16 === null || iso16 === void 0)
|
|
26649
26662
|
return null;
|
|
@@ -26657,7 +26670,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
26657
26670
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
26658
26671
|
var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
26659
26672
|
|
|
26660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26673
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
26661
26674
|
var TAG_KINDS = ["tag", "topic"];
|
|
26662
26675
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
26663
26676
|
var TAG_TYPE = {
|
|
@@ -26860,7 +26873,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
26860
26873
|
return result;
|
|
26861
26874
|
}, "tagsOf");
|
|
26862
26875
|
|
|
26863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26876
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
26864
26877
|
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
26878
|
var SPEECH = speech("att");
|
|
26866
26879
|
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 +27237,7 @@ var FIELD_COMPILERS = {
|
|
|
27224
27237
|
subject
|
|
27225
27238
|
};
|
|
27226
27239
|
|
|
27227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27240
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
27228
27241
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
27229
27242
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
27230
27243
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -27240,7 +27253,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
27240
27253
|
};
|
|
27241
27254
|
}, "placeOf");
|
|
27242
27255
|
|
|
27243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
27244
27257
|
var DRAIN_ON_WRITE = 500;
|
|
27245
27258
|
var METHOD = "rules";
|
|
27246
27259
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -27403,7 +27416,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
27403
27416
|
return queued.length;
|
|
27404
27417
|
}, "drainMentions");
|
|
27405
27418
|
|
|
27406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
27407
27420
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
27408
27421
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
27409
27422
|
if (!exists2)
|
|
@@ -27411,7 +27424,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
27411
27424
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
27412
27425
|
}, "indexRow");
|
|
27413
27426
|
|
|
27414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
27415
27428
|
var INDEX = "message_stems";
|
|
27416
27429
|
var SETTING2 = "searchStemmers";
|
|
27417
27430
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -27533,7 +27546,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
27533
27546
|
};
|
|
27534
27547
|
}, "stemmerCache");
|
|
27535
27548
|
|
|
27536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
27537
27550
|
var rehearsal = new AsyncLocalStorage();
|
|
27538
27551
|
var SQLITE_BUSY = 5;
|
|
27539
27552
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
@@ -27667,7 +27680,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
27667
27680
|
}
|
|
27668
27681
|
}, "read");
|
|
27669
27682
|
|
|
27670
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27683
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
27671
27684
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
27672
27685
|
coalesce(CASE k.chunkable_type
|
|
27673
27686
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -27809,7 +27822,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
27809
27822
|
}, "dropUnusedVectors");
|
|
27810
27823
|
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
27824
|
|
|
27812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
27813
27826
|
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
27827
|
target: [accounts.provider, accounts.externalId],
|
|
27815
27828
|
set: {
|
|
@@ -27940,7 +27953,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
27940
27953
|
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
27954
|
}, "dropOrphanPeople");
|
|
27942
27955
|
|
|
27943
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
27944
27957
|
var FOLDED = [
|
|
27945
27958
|
{ table: "tasks", column: "title" },
|
|
27946
27959
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -27977,7 +27990,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
27977
27990
|
return filled2;
|
|
27978
27991
|
}, "fillFolded");
|
|
27979
27992
|
|
|
27980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
27981
27994
|
var HISTORY_KEY = "$history";
|
|
27982
27995
|
var objectOf2 = /* @__PURE__ */ __name((text7) => {
|
|
27983
27996
|
if (typeof text7 !== "string")
|
|
@@ -28053,7 +28066,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
28053
28066
|
return rest;
|
|
28054
28067
|
}, "withoutHistory");
|
|
28055
28068
|
|
|
28056
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
28057
28070
|
import { createHash as createHash3 } from "node:crypto";
|
|
28058
28071
|
var CHUNK_CHARS = 1200;
|
|
28059
28072
|
var CHUNK_OVERLAP = 150;
|
|
@@ -28158,7 +28171,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
28158
28171
|
return chunks2;
|
|
28159
28172
|
}, "cutChunks");
|
|
28160
28173
|
|
|
28161
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
28162
28175
|
var DAY2 = 864e5;
|
|
28163
28176
|
var CURRENCY = [
|
|
28164
28177
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -28284,7 +28297,7 @@ var dueDayOf = /* @__PURE__ */ __name((text7, createdMs) => {
|
|
|
28284
28297
|
return best?.day ?? null;
|
|
28285
28298
|
}, "dueDayOf");
|
|
28286
28299
|
|
|
28287
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28300
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
28288
28301
|
var DAY3 = 864e5;
|
|
28289
28302
|
var STOP_WORDS = new Set([
|
|
28290
28303
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -28439,7 +28452,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
28439
28452
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
28440
28453
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
28441
28454
|
|
|
28442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28455
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
28443
28456
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
28444
28457
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
28445
28458
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -28714,7 +28727,7 @@ var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.ma
|
|
|
28714
28727
|
Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
|
|
28715
28728
|
])), "vectorCounts");
|
|
28716
28729
|
|
|
28717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
28718
28731
|
var DOCUMENT_PICTURE = "document_picture";
|
|
28719
28732
|
var SCAN_PAGE2 = 5e3;
|
|
28720
28733
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -28777,7 +28790,106 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
28777
28790
|
}, "nearestPictures")
|
|
28778
28791
|
}), "documentPicturesOver");
|
|
28779
28792
|
|
|
28780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
|
|
28794
|
+
var noteIndexText = /* @__PURE__ */ __name((title, text7) => title ? `${title}
|
|
28795
|
+
|
|
28796
|
+
${text7}` : text7, "noteIndexText");
|
|
28797
|
+
|
|
28798
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
|
|
28799
|
+
var ENRICHMENT_SUBJECTS = ["document", "note", "email"];
|
|
28800
|
+
var ENRICHMENT_POSITION = 1e6;
|
|
28801
|
+
var EMAIL_ENRICHMENT = "email_enrichment";
|
|
28802
|
+
var LIVE2 = {
|
|
28803
|
+
document: "SELECT d.id, d.title, coalesce(d.body, '') AS body, coalesce(d.external_updated_at, d.updated_at) AS at FROM documents d WHERE d.deleted_at IS NULL AND coalesce(json_extract(d.metadata, '$.catalog.active'), 1) = 1",
|
|
28804
|
+
note: "SELECT n.id, n.title, coalesce(n.body, '') AS body, n.updated_at AS at FROM notes n WHERE n.deleted_at IS NULL",
|
|
28805
|
+
email: "SELECT e.id, e.subject AS title, coalesce(e.body_text, '') AS body, coalesce(e.sent_at, e.received_at) AS at FROM emails e WHERE e.deleted_at IS NULL"
|
|
28806
|
+
};
|
|
28807
|
+
var QUEUES = {
|
|
28808
|
+
document: "INSERT OR IGNORE INTO document_index_pending (indexable_type, id) VALUES ('document', ?)",
|
|
28809
|
+
note: "INSERT OR IGNORE INTO note_index_pending (indexable_type, id) VALUES ('note', ?)",
|
|
28810
|
+
email: "INSERT OR IGNORE INTO email_index_pending (indexable_type, id) VALUES ('email', ?)"
|
|
28811
|
+
};
|
|
28812
|
+
var currentEnrichment = /* @__PURE__ */ __name((database, type, id2, indexed) => {
|
|
28813
|
+
if (!ENRICHMENT_SUBJECTS.includes(type))
|
|
28814
|
+
return void 0;
|
|
28815
|
+
const row2 = database.prepare("SELECT text, source_hash FROM enrichments WHERE subject_type = ? AND subject_id = ?").get(type, id2);
|
|
28816
|
+
return row2 && String(row2.source_hash) === chunkHash(indexed) ? String(row2.text) : void 0;
|
|
28817
|
+
}, "currentEnrichment");
|
|
28818
|
+
var enrichmentText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
28819
|
+
const row2 = database.prepare("SELECT text FROM enrichments WHERE subject_type = ? AND subject_id = ?").get(type === EMAIL_ENRICHMENT ? "email" : type, id2);
|
|
28820
|
+
return row2 === void 0 ? void 0 : String(row2.text);
|
|
28821
|
+
}, "enrichmentText");
|
|
28822
|
+
var scan = /* @__PURE__ */ __name(function* (database, type, only) {
|
|
28823
|
+
const held = new Map(database.prepare("SELECT subject_id AS id, source_hash AS hash FROM enrichments WHERE subject_type = ?").all(type).map((row2) => [Number(row2.id), String(row2.hash)]));
|
|
28824
|
+
for (const row2 of database.prepare(`${LIVE2[type]} ORDER BY 1`).all()) {
|
|
28825
|
+
const id2 = Number(row2.id);
|
|
28826
|
+
if (only && !only.has(id2))
|
|
28827
|
+
continue;
|
|
28828
|
+
const title = row2.title == null ? null : String(row2.title);
|
|
28829
|
+
const text7 = noteIndexText(title, String(row2.body));
|
|
28830
|
+
if (!text7.trim())
|
|
28831
|
+
continue;
|
|
28832
|
+
const hash2 = chunkHash(text7);
|
|
28833
|
+
yield { type, id: id2, text: text7, at: row2.at == null ? null : Number(row2.at), hash: hash2, enriched: held.get(id2) === hash2 };
|
|
28834
|
+
}
|
|
28835
|
+
}, "scan");
|
|
28836
|
+
var enrichmentsOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
28837
|
+
pending: /* @__PURE__ */ __name(async (limit, { types = ENRICHMENT_SUBJECTS, only } = {}) => {
|
|
28838
|
+
const found2 = [];
|
|
28839
|
+
for (const type of types) {
|
|
28840
|
+
const ids = only ? new Set(only.filter((one2) => one2.type === type).map((one2) => one2.id)) : void 0;
|
|
28841
|
+
if (ids?.size === 0)
|
|
28842
|
+
continue;
|
|
28843
|
+
for (const { enriched, ...candidate } of scan(database, type, ids)) {
|
|
28844
|
+
if (found2.length >= limit)
|
|
28845
|
+
return found2;
|
|
28846
|
+
if (!enriched)
|
|
28847
|
+
found2.push(candidate);
|
|
28848
|
+
}
|
|
28849
|
+
}
|
|
28850
|
+
return found2;
|
|
28851
|
+
}, "pending"),
|
|
28852
|
+
counts: /* @__PURE__ */ __name(async () => {
|
|
28853
|
+
const counts = {
|
|
28854
|
+
records: 0,
|
|
28855
|
+
enriched: 0,
|
|
28856
|
+
pendingChars: 0,
|
|
28857
|
+
pendingByType: { document: 0, note: 0, email: 0 }
|
|
28858
|
+
};
|
|
28859
|
+
for (const type of ENRICHMENT_SUBJECTS)
|
|
28860
|
+
for (const one2 of scan(database, type)) {
|
|
28861
|
+
counts.records += 1;
|
|
28862
|
+
if (one2.enriched)
|
|
28863
|
+
counts.enriched += 1;
|
|
28864
|
+
else {
|
|
28865
|
+
counts.pendingChars += one2.text.length;
|
|
28866
|
+
counts.pendingByType[type] += 1;
|
|
28867
|
+
}
|
|
28868
|
+
}
|
|
28869
|
+
return counts;
|
|
28870
|
+
}, "counts"),
|
|
28871
|
+
save: /* @__PURE__ */ __name(async (rows) => write(database, () => {
|
|
28872
|
+
const upsert2 = database.prepare(`INSERT INTO enrichments (subject_type, subject_id, source_hash, provider, model, text, tokens, created_at)
|
|
28873
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
28874
|
+
ON CONFLICT (subject_type, subject_id) DO UPDATE SET source_hash = excluded.source_hash,
|
|
28875
|
+
provider = excluded.provider, model = excluded.model, text = excluded.text, tokens = excluded.tokens,
|
|
28876
|
+
created_at = excluded.created_at`);
|
|
28877
|
+
const at = now2();
|
|
28878
|
+
for (const row2 of rows) {
|
|
28879
|
+
upsert2.run(row2.type, row2.id, row2.hash, row2.provider, row2.model, row2.text, row2.tokens, at);
|
|
28880
|
+
database.prepare(QUEUES[row2.type]).run(row2.id);
|
|
28881
|
+
}
|
|
28882
|
+
}), "save"),
|
|
28883
|
+
clear: /* @__PURE__ */ __name(async () => write(database, () => {
|
|
28884
|
+
const rows = database.prepare("SELECT subject_type AS type, subject_id AS id FROM enrichments").all();
|
|
28885
|
+
for (const row2 of rows)
|
|
28886
|
+
database.prepare(QUEUES[row2.type]).run(Number(row2.id));
|
|
28887
|
+
database.prepare("DELETE FROM enrichments").run();
|
|
28888
|
+
return rows.length;
|
|
28889
|
+
}), "clear")
|
|
28890
|
+
}), "enrichmentsOver");
|
|
28891
|
+
|
|
28892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
28781
28893
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
28782
28894
|
const literal5 = escaped2 ?? plain2 ?? "";
|
|
28783
28895
|
return wildcard ?? (/[*?[]/u.test(literal5) ? `[${literal5}]` : literal5);
|
|
@@ -28842,7 +28954,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
28842
28954
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
28843
28955
|
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
28956
|
|
|
28845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
28846
28958
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
28847
28959
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
28848
28960
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -28932,7 +29044,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
28932
29044
|
});
|
|
28933
29045
|
}, "linkMeeting");
|
|
28934
29046
|
|
|
28935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
28936
29048
|
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
29049
|
var UNSEARCHED_EVENT_TYPES = [
|
|
28938
29050
|
"working-location",
|
|
@@ -28995,9 +29107,6 @@ var CORPORA = {
|
|
|
28995
29107
|
read: `SELECT e.title, ${EVENT_TEXT} AS body, ${EVENT_LIVE} AS live, coalesce((SELECT a.scope FROM calendar_entries ce JOIN calendars c ON c.id = ce.calendar_id JOIN accounts a ON a.id = c.account_id WHERE ce.event_id = e.id LIMIT 1), 'personal') AS scope, (SELECT c.account_id FROM calendar_entries ce JOIN calendars c ON c.id = ce.calendar_id WHERE ce.event_id = e.id AND ce.deleted_at IS NULL ORDER BY ce.id LIMIT 1) AS account_id FROM events e WHERE e.id = ?`
|
|
28996
29108
|
}
|
|
28997
29109
|
};
|
|
28998
|
-
var noteIndexText = /* @__PURE__ */ __name((title, text7) => title ? `${title}
|
|
28999
|
-
|
|
29000
|
-
${text7}` : text7, "noteIndexText");
|
|
29001
29110
|
var queuedAs = /* @__PURE__ */ __name((corpus) => corpus.queued ?? corpus.type, "queuedAs");
|
|
29002
29111
|
var hasTrigrams = /* @__PURE__ */ __name((corpus) => corpus.type === "note" || corpus.type === "document", "hasTrigrams");
|
|
29003
29112
|
var holdingText = /* @__PURE__ */ __name((type, column2, search2) => {
|
|
@@ -29080,27 +29189,44 @@ var writer2 = /* @__PURE__ */ __name((database, corpus, stemmer) => {
|
|
|
29080
29189
|
stems: database.prepare(`INSERT INTO ${corpus.type}_stems (rowid, stems, scope) VALUES (?, ?, ?)`),
|
|
29081
29190
|
trigrams: hasTrigrams(corpus) ? database.prepare(`INSERT INTO ${corpus.type}_trigrams (rowid, text) VALUES (?, ?)`) : null,
|
|
29082
29191
|
chunk: database.prepare("INSERT INTO chunks (chunkable_type, chunkable_id, position, start_offset, end_offset, content_hash, scope, account_id, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"),
|
|
29083
|
-
dequeue: database.prepare(`DELETE FROM ${corpus.type}_index_pending WHERE indexable_type = ? AND id = ?`)
|
|
29192
|
+
dequeue: database.prepare(`DELETE FROM ${corpus.type}_index_pending WHERE indexable_type = ? AND id = ?`),
|
|
29193
|
+
emailAt: database.prepare("SELECT coalesce(received_at, sent_at) AS at FROM emails WHERE id = ?")
|
|
29084
29194
|
};
|
|
29195
|
+
const enrichedType = corpus.type === "email" ? EMAIL_ENRICHMENT : corpus.type;
|
|
29085
29196
|
return (id2) => {
|
|
29086
29197
|
const row2 = read3.get(id2);
|
|
29087
|
-
const before2 =
|
|
29198
|
+
const before2 = [
|
|
29199
|
+
...oldHashes.all(corpus.type, id2).map((hash2) => String(hash2.hash)),
|
|
29200
|
+
...corpus.type === "email" ? oldHashes.all(EMAIL_ENRICHMENT, id2).map((hash2) => String(hash2.hash)) : []
|
|
29201
|
+
];
|
|
29088
29202
|
statements.dropWords.run(id2);
|
|
29089
29203
|
statements.dropStems.run(id2);
|
|
29090
29204
|
statements.dropTrigrams?.run(id2);
|
|
29091
29205
|
statements.dropChunks.run(corpus.type, id2);
|
|
29206
|
+
if (corpus.type === "email")
|
|
29207
|
+
statements.dropChunks.run(EMAIL_ENRICHMENT, id2);
|
|
29092
29208
|
const live2 = row2 !== void 0 && Number(row2.live) === 1;
|
|
29093
29209
|
const text7 = live2 ? noteIndexText(row2.title == null ? null : String(row2.title), String(row2.body)) : "";
|
|
29094
29210
|
const scope3 = live2 ? String(row2.scope ?? "personal") : "";
|
|
29211
|
+
const enrichment = text7.trim() ? currentEnrichment(database, corpus.type, id2, text7) : void 0;
|
|
29095
29212
|
const terms2 = corpus.terms && text7 ? corpus.terms(text7, stemmer) : void 0;
|
|
29096
29213
|
const words3 = terms2 ? terms2.words : normalize(text7);
|
|
29097
29214
|
if (words3 !== "") {
|
|
29098
29215
|
statements.words.run(id2, words3, scope3);
|
|
29099
29216
|
statements.trigrams?.run(id2, words3);
|
|
29100
29217
|
}
|
|
29101
|
-
const stems = terms2 ? terms2.stems : text7 ? stemmer.indexText(
|
|
29218
|
+
const stems = terms2 ? terms2.stems : text7 ? stemmer.indexText(enrichment ? `${text7}
|
|
29219
|
+
|
|
29220
|
+
${enrichment}` : text7) : "";
|
|
29102
29221
|
if (stems !== "")
|
|
29103
29222
|
statements.stems.run(id2, stems, scope3);
|
|
29223
|
+
if (enrichment) {
|
|
29224
|
+
const at = Date.now();
|
|
29225
|
+
const occurred = corpus.type === "email" ? int(statements.emailAt.get(id2)?.at) : null;
|
|
29226
|
+
statements.chunk.run(enrichedType, id2, corpus.type === "email" ? 0 : ENRICHMENT_POSITION, 0, 0, chunkHash(enrichment), scope3, int(row2?.account_id), at, at);
|
|
29227
|
+
if (occurred !== null && occurred !== void 0)
|
|
29228
|
+
database.prepare("UPDATE chunks SET occurred_at = ? WHERE chunkable_type = ? AND chunkable_id = ?").run(occurred, EMAIL_ENRICHMENT, id2);
|
|
29229
|
+
}
|
|
29104
29230
|
if (text7.trim() && corpus.pieces !== false) {
|
|
29105
29231
|
const at = Date.now();
|
|
29106
29232
|
const sections = row2?.metadata == null ? [] : storedSections(String(row2.metadata));
|
|
@@ -29164,7 +29290,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
29164
29290
|
return true;
|
|
29165
29291
|
}, "resetNoteIndex");
|
|
29166
29292
|
|
|
29167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
29168
29294
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
29169
29295
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
29170
29296
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -29183,7 +29309,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
29183
29309
|
}
|
|
29184
29310
|
}, "resolvePersonLinks");
|
|
29185
29311
|
|
|
29186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
29187
29313
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
29188
29314
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
29189
29315
|
find: orm.select({
|
|
@@ -29408,7 +29534,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
29408
29534
|
}, "meetingIdentityPk");
|
|
29409
29535
|
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
29536
|
|
|
29411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
29412
29538
|
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
29539
|
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
29540
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -29696,7 +29822,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
29696
29822
|
}
|
|
29697
29823
|
}, "replaceAutoTags");
|
|
29698
29824
|
|
|
29699
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
29700
29826
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
29701
29827
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
29702
29828
|
var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
|
|
@@ -29715,7 +29841,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
29715
29841
|
return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
|
|
29716
29842
|
}, "counterFreshness");
|
|
29717
29843
|
|
|
29718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29844
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
29719
29845
|
import { createHash as createHash4 } from "node:crypto";
|
|
29720
29846
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
29721
29847
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -29813,7 +29939,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
29813
29939
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
29814
29940
|
}, "contextEvidenceRequest");
|
|
29815
29941
|
|
|
29816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
29817
29943
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
29818
29944
|
var ACTIVITY = `
|
|
29819
29945
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -29943,7 +30069,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
29943
30069
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
29944
30070
|
}), "mailActivity");
|
|
29945
30071
|
|
|
29946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
29947
30073
|
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
30074
|
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
30075
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -30084,15 +30210,17 @@ var mailOwnText = /* @__PURE__ */ __name((body2) => {
|
|
|
30084
30210
|
return text7 || body2.trim();
|
|
30085
30211
|
}, "mailOwnText");
|
|
30086
30212
|
|
|
30087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
30088
30214
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
30089
30215
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
30090
|
-
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
30216
|
+
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
30217
|
+
CASE k.chunkable_type WHEN 'email_enrichment' THEN k.chunkable_id ELSE a.attachable_id END AS email_id,
|
|
30091
30218
|
CASE k.chunkable_type WHEN 'email_thread' THEN k.chunkable_id
|
|
30092
|
-
ELSE (SELECT email_thread_id FROM emails
|
|
30219
|
+
ELSE (SELECT email_thread_id FROM emails
|
|
30220
|
+
WHERE id = CASE k.chunkable_type WHEN 'email_enrichment' THEN k.chunkable_id ELSE a.attachable_id END) END AS thread_id
|
|
30093
30221
|
FROM chunks k LEFT JOIN attachments a ON k.chunkable_type = 'attachment' AND a.id = k.chunkable_id
|
|
30094
30222
|
AND a.attachable_type = 'email'
|
|
30095
|
-
WHERE k.chunkable_type
|
|
30223
|
+
WHERE k.chunkable_type IN ('email_thread', 'email_enrichment') OR a.id IS NOT NULL) p`;
|
|
30096
30224
|
var threadText = /* @__PURE__ */ __name((database, threadId) => {
|
|
30097
30225
|
const rows = database.prepare(`SELECT id, subject, coalesce(body_text, '') AS body, coalesce(from_name, from_address) AS sender,
|
|
30098
30226
|
coalesce(received_at, sent_at) AS at
|
|
@@ -30194,7 +30322,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
30194
30322
|
return emails3 + threads;
|
|
30195
30323
|
}, "drainEmailIndex");
|
|
30196
30324
|
|
|
30197
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
30198
30326
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
30199
30327
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
30200
30328
|
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 +30420,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
30292
30420
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
30293
30421
|
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
30422
|
|
|
30295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
30296
30424
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
30297
30425
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
30298
30426
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -30342,7 +30470,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
30342
30470
|
return threads.length;
|
|
30343
30471
|
}, "markEmailsRestored");
|
|
30344
30472
|
|
|
30345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30473
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
30346
30474
|
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
30475
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
30348
30476
|
WHERE p.account_id = ?
|
|
@@ -30378,7 +30506,7 @@ var scannedMailPieces = /* @__PURE__ */ __name((database, model, query, filter)
|
|
|
30378
30506
|
var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter, depth) => {
|
|
30379
30507
|
const candidates = database.prepare(`${MAIL_PIECE_ROWS} AND p.id IN (SELECT value FROM json_each(?)) ORDER BY p.id`);
|
|
30380
30508
|
const merged = /* @__PURE__ */ new Map();
|
|
30381
|
-
for (const kind4 of ["email_thread", "attachment"]) {
|
|
30509
|
+
for (const kind4 of ["email_thread", "attachment", "email_enrichment"]) {
|
|
30382
30510
|
const found2 = searchIndex(database, model, { kind: kind4, account: filter.accountId, ...filter.since === void 0 ? {} : { since: filter.since } }, query, depth, (near2) => {
|
|
30383
30511
|
const hashes = new Map(near2.map(({ id: id2, hash: hash2 }) => [id2, hash2]));
|
|
30384
30512
|
const best = /* @__PURE__ */ new Map();
|
|
@@ -30402,7 +30530,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
30402
30530
|
}, "indexedMailPieces");
|
|
30403
30531
|
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
30532
|
|
|
30405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
30406
30534
|
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
30535
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
30408
30536
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -30469,7 +30597,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
30469
30597
|
}
|
|
30470
30598
|
}), "mailRulesOver");
|
|
30471
30599
|
|
|
30472
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30600
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
30473
30601
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
30474
30602
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
30475
30603
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -30477,7 +30605,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
30477
30605
|
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
30606
|
}, "reviewLink");
|
|
30479
30607
|
|
|
30480
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
30481
30609
|
function checkMeetingCancelled(signal) {
|
|
30482
30610
|
if (!signal?.aborted)
|
|
30483
30611
|
return;
|
|
@@ -30488,7 +30616,7 @@ function checkMeetingCancelled(signal) {
|
|
|
30488
30616
|
}
|
|
30489
30617
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
30490
30618
|
|
|
30491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30619
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
30492
30620
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
30493
30621
|
id: Number(row2.id),
|
|
30494
30622
|
accountId: Number(row2.account_id),
|
|
@@ -30538,7 +30666,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
30538
30666
|
createdAt: Number(row2.created_at)
|
|
30539
30667
|
}), "transcriptRowOf");
|
|
30540
30668
|
|
|
30541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30669
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
30542
30670
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
30543
30671
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
30544
30672
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -30705,7 +30833,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30705
30833
|
}
|
|
30706
30834
|
}), "meetingReadsOver");
|
|
30707
30835
|
|
|
30708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
30709
30837
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
30710
30838
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
30711
30839
|
const params = [input.accountId];
|
|
@@ -30748,7 +30876,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
30748
30876
|
return { clauses, params };
|
|
30749
30877
|
}, "meetingSelectionSql");
|
|
30750
30878
|
|
|
30751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
30752
30880
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30753
30881
|
async meetingChatLines(input) {
|
|
30754
30882
|
checkMeetingCancelled(input.signal);
|
|
@@ -30776,7 +30904,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30776
30904
|
}
|
|
30777
30905
|
}), "meetingChatLinesOver");
|
|
30778
30906
|
|
|
30779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
30780
30908
|
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
30909
|
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
30782
30910
|
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
@@ -30791,7 +30919,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
|
30791
30919
|
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
30920
|
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
30793
30921
|
|
|
30794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30922
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
30795
30923
|
var MESSAGE_FIELDS = {
|
|
30796
30924
|
pk: messages.id,
|
|
30797
30925
|
nativeId: messages.externalId,
|
|
@@ -30962,7 +31090,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
30962
31090
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
30963
31091
|
}), "chatActivity");
|
|
30964
31092
|
|
|
30965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
30966
31094
|
var HIT_FIELDS = {
|
|
30967
31095
|
...MESSAGE_FIELDS,
|
|
30968
31096
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -31061,7 +31189,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
31061
31189
|
};
|
|
31062
31190
|
}, "directReplies");
|
|
31063
31191
|
|
|
31064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31192
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
31065
31193
|
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
31194
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
31067
31195
|
const found2 = identityRow(context, ref3);
|
|
@@ -31195,7 +31323,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
31195
31323
|
}, "mentioning");
|
|
31196
31324
|
var escaped = /* @__PURE__ */ __name((text7) => text7.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
31197
31325
|
|
|
31198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
31199
31327
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
31200
31328
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
31201
31329
|
}, "missing");
|
|
@@ -31317,7 +31445,7 @@ function meetingContextLinksOver(context) {
|
|
|
31317
31445
|
}
|
|
31318
31446
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
31319
31447
|
|
|
31320
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
31321
31449
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
31322
31450
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
31323
31451
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -31346,7 +31474,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
31346
31474
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
31347
31475
|
}, "indexedText");
|
|
31348
31476
|
|
|
31349
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31477
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
31350
31478
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
31351
31479
|
var meetingCurrentIndexRows = `
|
|
31352
31480
|
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 +31505,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
31377
31505
|
}, "invalidateMeetingStems");
|
|
31378
31506
|
var meetingStemmableText = /* @__PURE__ */ __name((text7) => text7.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
31379
31507
|
|
|
31380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
31381
31509
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
31382
31510
|
return {
|
|
31383
31511
|
async indexSearch(original) {
|
|
@@ -31445,10 +31573,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
31445
31573
|
}
|
|
31446
31574
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
31447
31575
|
|
|
31448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31576
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
31449
31577
|
import { createHash as createHash5 } from "node:crypto";
|
|
31450
31578
|
|
|
31451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/search/lucene/plain.js
|
|
31452
31580
|
var REPAIRED = /* @__PURE__ */ new Set([
|
|
31453
31581
|
"query.invalid-syntax",
|
|
31454
31582
|
"query.unclosed-literal",
|
|
@@ -31555,7 +31683,7 @@ var plainQuery = /* @__PURE__ */ __name((text7, fields4 = SEARCH_FIELDS) => {
|
|
|
31555
31683
|
return text7;
|
|
31556
31684
|
}, "plainQuery");
|
|
31557
31685
|
|
|
31558
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
31559
31687
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
31560
31688
|
const padded = ` ${term} `;
|
|
31561
31689
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -31564,7 +31692,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
31564
31692
|
return [...pieces];
|
|
31565
31693
|
}, "trigrams");
|
|
31566
31694
|
|
|
31567
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
31568
31696
|
var SHORTEST_CORRECTION = 3;
|
|
31569
31697
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
31570
31698
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -31611,7 +31739,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
31611
31739
|
return corrections;
|
|
31612
31740
|
}, "correctWords");
|
|
31613
31741
|
|
|
31614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31742
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
31615
31743
|
var SHORTEST_GARBLED = 4;
|
|
31616
31744
|
var MOST_WIDENED = 64;
|
|
31617
31745
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -31703,7 +31831,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
31703
31831
|
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
31832
|
}, "widenWords");
|
|
31705
31833
|
|
|
31706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
31707
31835
|
import { readFileSync } from "node:fs";
|
|
31708
31836
|
var loaded;
|
|
31709
31837
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -31762,7 +31890,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
31762
31890
|
return false;
|
|
31763
31891
|
}, "knownRussianWord");
|
|
31764
31892
|
|
|
31765
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
31766
31894
|
var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
31767
31895
|
var MOST_WORDS = 128;
|
|
31768
31896
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -31989,7 +32117,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text7, stemmer) => {
|
|
|
31989
32117
|
return check3(tree);
|
|
31990
32118
|
}, "matchMeetingText");
|
|
31991
32119
|
|
|
31992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
31993
32121
|
var fail3 = /* @__PURE__ */ __name((message3) => {
|
|
31994
32122
|
throw new CliError("validation_error", message3);
|
|
31995
32123
|
}, "fail");
|
|
@@ -32171,7 +32299,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
32171
32299
|
}
|
|
32172
32300
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
32173
32301
|
|
|
32174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32302
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
32175
32303
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32176
32304
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
32177
32305
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -32203,7 +32331,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32203
32331
|
}
|
|
32204
32332
|
}), "meetingLanguagesOver");
|
|
32205
32333
|
|
|
32206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
32207
32335
|
import { createHash as createHash6 } from "node:crypto";
|
|
32208
32336
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
32209
32337
|
if (value === void 0)
|
|
@@ -32293,7 +32421,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
32293
32421
|
}
|
|
32294
32422
|
}), "meetingParticipantSearchOver");
|
|
32295
32423
|
|
|
32296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
32297
32425
|
var preparationQueries = {
|
|
32298
32426
|
participants: {
|
|
32299
32427
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -32343,7 +32471,7 @@ var preparationQueries = {
|
|
|
32343
32471
|
}
|
|
32344
32472
|
};
|
|
32345
32473
|
|
|
32346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32474
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
32347
32475
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32348
32476
|
async preparationContext(original) {
|
|
32349
32477
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -32384,7 +32512,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32384
32512
|
}
|
|
32385
32513
|
}), "meetingPreparationContextOver");
|
|
32386
32514
|
|
|
32387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
32388
32516
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
32389
32517
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
32390
32518
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -32398,7 +32526,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
32398
32526
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
32399
32527
|
)`, "preparationSubjects");
|
|
32400
32528
|
|
|
32401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32529
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
32402
32530
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32403
32531
|
async preparationKnowledge(original) {
|
|
32404
32532
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -32443,7 +32571,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
32443
32571
|
}
|
|
32444
32572
|
}), "meetingPreparationKnowledgeOver");
|
|
32445
32573
|
|
|
32446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32574
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
32447
32575
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32448
32576
|
async preparationNotes(original) {
|
|
32449
32577
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -32496,7 +32624,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32496
32624
|
}
|
|
32497
32625
|
}), "meetingPreparationNotesOver");
|
|
32498
32626
|
|
|
32499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
32500
32628
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32501
32629
|
async relatedHistory(original) {
|
|
32502
32630
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -32567,7 +32695,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32567
32695
|
}
|
|
32568
32696
|
}), "meetingRelatedHistoryOver");
|
|
32569
32697
|
|
|
32570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
32571
32699
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
32572
32700
|
var text3 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
32573
32701
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -32648,7 +32776,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32648
32776
|
}
|
|
32649
32777
|
}), "meetingReviewOver");
|
|
32650
32778
|
|
|
32651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32779
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
32652
32780
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
32653
32781
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
32654
32782
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -32702,7 +32830,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32702
32830
|
}
|
|
32703
32831
|
}), "meetingSeriesHistoryOver");
|
|
32704
32832
|
|
|
32705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32833
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
32706
32834
|
var MOST_ROWS = 5e5;
|
|
32707
32835
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
32708
32836
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -32771,7 +32899,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32771
32899
|
}
|
|
32772
32900
|
}), "meetingStatsOver");
|
|
32773
32901
|
|
|
32774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32902
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
32775
32903
|
var CURSOR_KEY = "meetings";
|
|
32776
32904
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
32777
32905
|
id: Number(row2.id),
|
|
@@ -33340,7 +33468,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33340
33468
|
};
|
|
33341
33469
|
}, "meetingStoreOver");
|
|
33342
33470
|
|
|
33343
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
33344
33472
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
33345
33473
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
33346
33474
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -33366,7 +33494,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
33366
33494
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
33367
33495
|
}, "release");
|
|
33368
33496
|
|
|
33369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33497
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
33370
33498
|
var THREAD_COLUMNS = {
|
|
33371
33499
|
subject: {
|
|
33372
33500
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -33383,7 +33511,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
33383
33511
|
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
33512
|
}, "threadRows");
|
|
33385
33513
|
|
|
33386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
33387
33515
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
33388
33516
|
id: `email:${place.emailId}`,
|
|
33389
33517
|
chatId: place.threadExternalId,
|
|
@@ -33865,6 +33993,10 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
33865
33993
|
const piece = threads.get(owner)?.[Number(row2.position)];
|
|
33866
33994
|
return piece && piece.hash === row2.hash ? [{ hash: piece.hash, text: piece.text }] : [];
|
|
33867
33995
|
}
|
|
33996
|
+
if (type === EMAIL_ENRICHMENT) {
|
|
33997
|
+
const text8 = enrichmentText(database, type, owner);
|
|
33998
|
+
return text8 === void 0 ? [] : [{ hash: String(row2.hash), text: text8 }];
|
|
33999
|
+
}
|
|
33868
34000
|
const text7 = str(file.get(owner)?.text);
|
|
33869
34001
|
return text7 == null ? [] : [{ hash: String(row2.hash), text: text7.slice(Number(row2.start), Number(row2.end)) }];
|
|
33870
34002
|
});
|
|
@@ -33921,7 +34053,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
33921
34053
|
}
|
|
33922
34054
|
}), "mailStoreOver");
|
|
33923
34055
|
|
|
33924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
33925
34057
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
33926
34058
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
33927
34059
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -34011,7 +34143,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
34011
34143
|
}, "knownWord");
|
|
34012
34144
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
34013
34145
|
|
|
34014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
34015
34147
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
34016
34148
|
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
34149
|
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 +34229,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
34097
34229
|
return found2;
|
|
34098
34230
|
}, "spokenTranscripts");
|
|
34099
34231
|
|
|
34100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
34101
34233
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
34102
34234
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
34103
34235
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -34144,7 +34276,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
34144
34276
|
});
|
|
34145
34277
|
}, "placeHits");
|
|
34146
34278
|
|
|
34147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34279
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
34148
34280
|
var GROUPS = {
|
|
34149
34281
|
chat: {
|
|
34150
34282
|
key: "m.chat_id",
|
|
@@ -34166,7 +34298,7 @@ var GROUPS = {
|
|
|
34166
34298
|
}
|
|
34167
34299
|
};
|
|
34168
34300
|
|
|
34169
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34301
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
34170
34302
|
var MESSAGES2 = {
|
|
34171
34303
|
rows: "messages",
|
|
34172
34304
|
threads: "chats",
|
|
@@ -34649,7 +34781,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
34649
34781
|
};
|
|
34650
34782
|
}, "runCompiled");
|
|
34651
34783
|
|
|
34652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
34653
34785
|
function invalidMetadata() {
|
|
34654
34786
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
34655
34787
|
}
|
|
@@ -34751,7 +34883,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
34751
34883
|
};
|
|
34752
34884
|
}), "counterTargets");
|
|
34753
34885
|
|
|
34754
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
34755
34887
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind4) => `'${kind4}'`).join(",");
|
|
34756
34888
|
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
34889
|
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 +35002,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
34870
35002
|
}));
|
|
34871
35003
|
}, "attachmentViews");
|
|
34872
35004
|
|
|
34873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35005
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
34874
35006
|
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
35007
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text7, source2) => {
|
|
34876
35008
|
const { orm, database, now: now2 } = context;
|
|
@@ -34908,7 +35040,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
34908
35040
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
34909
35041
|
}, "intoVoiceAttachment");
|
|
34910
35042
|
|
|
34911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
34912
35044
|
var FIELDS = [
|
|
34913
35045
|
"threadExternalId",
|
|
34914
35046
|
"senderIdentityId",
|
|
@@ -35226,7 +35358,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
35226
35358
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
35227
35359
|
}, "writeDerivedReactions");
|
|
35228
35360
|
|
|
35229
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
35230
35362
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
35231
35363
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
35232
35364
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -35247,7 +35379,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
35247
35379
|
};
|
|
35248
35380
|
}, "keysOver");
|
|
35249
35381
|
|
|
35250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35382
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
35251
35383
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
35252
35384
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
35253
35385
|
if (!row2)
|
|
@@ -35282,7 +35414,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
35282
35414
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
35283
35415
|
}, "saveProfile");
|
|
35284
35416
|
|
|
35285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
35286
35418
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
35287
35419
|
const owner = ownerPerson(context.database).id;
|
|
35288
35420
|
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 +35436,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
35304
35436
|
return personOf(context, ref3);
|
|
35305
35437
|
}, "linkToOwner");
|
|
35306
35438
|
|
|
35307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
35308
35440
|
var PROVIDERS_SETTING = "providers";
|
|
35309
35441
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
35310
35442
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -35352,7 +35484,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
35352
35484
|
});
|
|
35353
35485
|
}, "registerProvider");
|
|
35354
35486
|
|
|
35355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
35356
35488
|
var DAY4 = 864e5;
|
|
35357
35489
|
var RECENTLY_CLOSED_MS = 14 * DAY4;
|
|
35358
35490
|
var TEXT_LIMIT = 20;
|
|
@@ -35551,7 +35683,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
35551
35683
|
};
|
|
35552
35684
|
}, "taskSimilarityOver");
|
|
35553
35685
|
|
|
35554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
35555
35687
|
var SETTING3 = "taskCategories";
|
|
35556
35688
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
35557
35689
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -35570,7 +35702,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
35570
35702
|
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
35703
|
}, "saveTaskCategories");
|
|
35572
35704
|
|
|
35573
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
35574
35706
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
35575
35707
|
var ALLOWED = "taskAgentClose";
|
|
35576
35708
|
var MIN = "taskAgentCloseMin";
|
|
@@ -35626,10 +35758,10 @@ var SUGGESTION_COLUMNS = [
|
|
|
35626
35758
|
];
|
|
35627
35759
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
35628
35760
|
|
|
35629
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
35630
35762
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
35631
35763
|
|
|
35632
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35764
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
35633
35765
|
var TASK_CLOSE_KIND = "task_close";
|
|
35634
35766
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
35635
35767
|
var isOwnerOnlyKind = /* @__PURE__ */ __name((kind4) => kind4 === MAIL_FINDINGS_KIND || kind4 === MEETING_FINDINGS_KIND || kind4 === TASK_CLOSE_KIND || kind4 === SOURCE_REVIEW_KIND, "isOwnerOnlyKind");
|
|
@@ -35677,7 +35809,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
35677
35809
|
}, "assertMayDecide");
|
|
35678
35810
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
35679
35811
|
|
|
35680
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
35681
35813
|
var PROFILE_PLACEHOLDER = "<profile>";
|
|
35682
35814
|
var oneLine = /* @__PURE__ */ __name((text7) => singleLine(text7.replace(/\s+/g, " ").trim()), "oneLine");
|
|
35683
35815
|
var openKind = /* @__PURE__ */ __name((kind4) => kind4 === "email" ? "message" : kind4 === "email_thread" ? "chat" : kind4 === "unknown" ? void 0 : kind4, "openKind");
|
|
@@ -35738,7 +35870,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
|
|
|
35738
35870
|
return `${WORDS2[summary.kind]} ${named3}${notes2 === "" ? "" : ` (${notes2})`}`;
|
|
35739
35871
|
}, "refLabel");
|
|
35740
35872
|
|
|
35741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
35742
35874
|
var EXCERPT_CHARS = 280;
|
|
35743
35875
|
var TITLE_CHARS = 120;
|
|
35744
35876
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -36160,7 +36292,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
36160
36292
|
summaries: /* @__PURE__ */ __name(async (texts2, options) => refSummariesOf(context.database, texts2, { ...options, now: context.now() }), "summaries")
|
|
36161
36293
|
}), "refsStoreOver");
|
|
36162
36294
|
|
|
36163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
36164
36296
|
var sourceOf3 = /* @__PURE__ */ __name((read3, ref3) => ({
|
|
36165
36297
|
ref: ref3,
|
|
36166
36298
|
kind: read3.kind,
|
|
@@ -36198,7 +36330,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
36198
36330
|
});
|
|
36199
36331
|
}, "evidenceSourcesOf");
|
|
36200
36332
|
|
|
36201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
36202
36334
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
36203
36335
|
var MAX_TEXT_CHARS = 2e6;
|
|
36204
36336
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -36224,7 +36356,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
36224
36356
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
36225
36357
|
}, "pdfPreviewLimits");
|
|
36226
36358
|
|
|
36227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
36228
36360
|
import { randomBytes } from "node:crypto";
|
|
36229
36361
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
36230
36362
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -36237,7 +36369,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
36237
36369
|
return time3 + random;
|
|
36238
36370
|
}, "ulid");
|
|
36239
36371
|
|
|
36240
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
36241
36373
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
36242
36374
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
36243
36375
|
if (!meta && !sections?.length)
|
|
@@ -36258,7 +36390,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
36258
36390
|
return typeof language === "string" && language !== "" ? language : null;
|
|
36259
36391
|
}, "languageOf");
|
|
36260
36392
|
|
|
36261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
36262
36394
|
var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
36263
36395
|
var objectOf3 = /* @__PURE__ */ __name((value) => {
|
|
36264
36396
|
if (isObject2(value))
|
|
@@ -36501,7 +36633,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
36501
36633
|
};
|
|
36502
36634
|
}, "filesStoreOver");
|
|
36503
36635
|
|
|
36504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
36505
36637
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
36506
36638
|
entity: "document",
|
|
36507
36639
|
backend: "sql",
|
|
@@ -36547,7 +36679,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
36547
36679
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
36548
36680
|
}, "importedDocumentWhere");
|
|
36549
36681
|
|
|
36550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36682
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
36551
36683
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
36552
36684
|
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
36685
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -36568,7 +36700,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
36568
36700
|
return changed;
|
|
36569
36701
|
}, "dateFileNotes");
|
|
36570
36702
|
|
|
36571
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
36572
36704
|
var textOf2 = /* @__PURE__ */ __name((text7, what, max = 1e5, allowEmpty = false) => {
|
|
36573
36705
|
const value = text7.trim();
|
|
36574
36706
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -36581,7 +36713,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
36581
36713
|
return value;
|
|
36582
36714
|
}, "oneOf");
|
|
36583
36715
|
|
|
36584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
36585
36717
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
36586
36718
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
36587
36719
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso3(value), "optionalIso");
|
|
@@ -37114,7 +37246,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37114
37246
|
};
|
|
37115
37247
|
}, "notesStoreOver");
|
|
37116
37248
|
|
|
37117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
37118
37250
|
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
37251
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
37120
37252
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -37373,7 +37505,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37373
37505
|
};
|
|
37374
37506
|
}, "memoriesStoreOver");
|
|
37375
37507
|
|
|
37376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
37377
37509
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
37378
37510
|
var KEY = "taskFirstPassPerChat";
|
|
37379
37511
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -37393,7 +37525,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
37393
37525
|
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
37526
|
}, "saveFirstPassPerChat");
|
|
37395
37527
|
|
|
37396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37528
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
37397
37529
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
37398
37530
|
var EXTERNAL_ID_CHARS = 200;
|
|
37399
37531
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -37420,7 +37552,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
37420
37552
|
return text7;
|
|
37421
37553
|
}, "sourceUrlOf");
|
|
37422
37554
|
|
|
37423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37555
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
37424
37556
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
37425
37557
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
37426
37558
|
name,
|
|
@@ -37643,7 +37775,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
37643
37775
|
return root === void 0 ? void 0 : { ...query, root };
|
|
37644
37776
|
}, "withoutField");
|
|
37645
37777
|
|
|
37646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
37647
37779
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
37648
37780
|
if (row2.author_type == null)
|
|
37649
37781
|
return null;
|
|
@@ -37671,7 +37803,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
37671
37803
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
37672
37804
|
}, "addComment");
|
|
37673
37805
|
|
|
37674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
37675
37807
|
var TASK_RELATION_KINDS = [
|
|
37676
37808
|
"blocked-by",
|
|
37677
37809
|
"follow-up-of",
|
|
@@ -37801,7 +37933,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
37801
37933
|
};
|
|
37802
37934
|
}, "taskRelationsStoreOver");
|
|
37803
37935
|
|
|
37804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
37805
37937
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
37806
37938
|
var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
37807
37939
|
var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind4, changes, at) => {
|
|
@@ -38330,7 +38462,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
38330
38462
|
};
|
|
38331
38463
|
}, "workTasksOver");
|
|
38332
38464
|
|
|
38333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38465
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
38334
38466
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
38335
38467
|
const { database, now: now2 } = context;
|
|
38336
38468
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -38379,7 +38511,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
38379
38511
|
};
|
|
38380
38512
|
}, "taskCloseOver");
|
|
38381
38513
|
|
|
38382
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
38383
38515
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
38384
38516
|
const { database, now: now2 } = context;
|
|
38385
38517
|
const required3 = /* @__PURE__ */ __name((id2) => {
|
|
@@ -38597,7 +38729,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
38597
38729
|
};
|
|
38598
38730
|
}, "taskPairsOver");
|
|
38599
38731
|
|
|
38600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
38601
38733
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
38602
38734
|
var TASK_STATS_SQL = {
|
|
38603
38735
|
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 +38768,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
38636
38768
|
}, "statNames")
|
|
38637
38769
|
}), "taskStatsOver");
|
|
38638
38770
|
|
|
38639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38771
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
38640
38772
|
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
38773
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
38642
38774
|
const key2 = inboxKey(account);
|
|
@@ -38843,7 +38975,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
38843
38975
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
38844
38976
|
}, "oneOf");
|
|
38845
38977
|
|
|
38846
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
38847
38979
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
38848
38980
|
const { database } = context;
|
|
38849
38981
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -38888,7 +39020,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
38888
39020
|
};
|
|
38889
39021
|
}, "accountsStoreOver");
|
|
38890
39022
|
|
|
38891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39023
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
38892
39024
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
38893
39025
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
38894
39026
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -38912,7 +39044,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
38912
39044
|
})), "keepDownloads");
|
|
38913
39045
|
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
39046
|
|
|
38915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
38916
39048
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
38917
39049
|
const { database } = context;
|
|
38918
39050
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -38969,7 +39101,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
38969
39101
|
}, "keepAttachmentText")
|
|
38970
39102
|
}), "attachmentsStoreOver");
|
|
38971
39103
|
|
|
38972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
38973
39105
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
38974
39106
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
38975
39107
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -39154,7 +39286,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
39154
39286
|
return done;
|
|
39155
39287
|
}, "rekeyChats");
|
|
39156
39288
|
|
|
39157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
39158
39290
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
39159
39291
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
39160
39292
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -39212,7 +39344,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
39212
39344
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
39213
39345
|
}, "chatCoverage");
|
|
39214
39346
|
|
|
39215
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
39216
39348
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
39217
39349
|
const { database } = context;
|
|
39218
39350
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -39347,7 +39479,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39347
39479
|
};
|
|
39348
39480
|
}, "chatsStoreOver");
|
|
39349
39481
|
|
|
39350
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39482
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
39351
39483
|
import { createHash as createHash7 } from "node:crypto";
|
|
39352
39484
|
var BATCH_CONTEXT = 50;
|
|
39353
39485
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -39485,7 +39617,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
39485
39617
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
39486
39618
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
39487
39619
|
|
|
39488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
39489
39621
|
import { setTimeout } from "node:timers/promises";
|
|
39490
39622
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
39491
39623
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -39797,7 +39929,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
39797
39929
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
39798
39930
|
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
39931
|
|
|
39800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
39801
39933
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
39802
39934
|
const { database } = context;
|
|
39803
39935
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -39904,7 +40036,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39904
40036
|
};
|
|
39905
40037
|
}, "conversationsStoreOver");
|
|
39906
40038
|
|
|
39907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
39908
40040
|
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
40041
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
39910
40042
|
const { database } = context;
|
|
@@ -39929,7 +40061,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
39929
40061
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
39930
40062
|
}), "countersStoreOver");
|
|
39931
40063
|
|
|
39932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
39933
40065
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
39934
40066
|
var MENTION_QUERY = defineQuery({
|
|
39935
40067
|
entity: "mention",
|
|
@@ -40145,7 +40277,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
40145
40277
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
40146
40278
|
}, "listPlaces");
|
|
40147
40279
|
|
|
40148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
40149
40281
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
40150
40282
|
const { database } = context;
|
|
40151
40283
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -40180,7 +40312,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
40180
40312
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
40181
40313
|
}), "mentionsStoreOver");
|
|
40182
40314
|
|
|
40183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
40184
40316
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
40185
40317
|
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
40318
|
const rows = messageId === void 0 ? read3.all(chatKey) : read3.all(chatKey, messageId);
|
|
@@ -40195,7 +40327,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
40195
40327
|
}));
|
|
40196
40328
|
}, "documentLinkMessages");
|
|
40197
40329
|
|
|
40198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
40199
40331
|
var stemmerFor = stemmerCache();
|
|
40200
40332
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
40201
40333
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -40239,7 +40371,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
40239
40371
|
});
|
|
40240
40372
|
}, "laterSharingRare");
|
|
40241
40373
|
|
|
40242
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
40243
40375
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
40244
40376
|
const { database } = context;
|
|
40245
40377
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -40374,7 +40506,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
40374
40506
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
40375
40507
|
}), "messagesStoreOver");
|
|
40376
40508
|
|
|
40377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40509
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
40378
40510
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
40379
40511
|
var iso6 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
40380
40512
|
var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -40431,7 +40563,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
40431
40563
|
});
|
|
40432
40564
|
}, "personPreparation");
|
|
40433
40565
|
|
|
40434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
40435
40567
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
40436
40568
|
const id2 = Number(uid);
|
|
40437
40569
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -40439,7 +40571,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
40439
40571
|
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
40572
|
}, "personSeenInAccounts");
|
|
40441
40573
|
|
|
40442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40574
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
40443
40575
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
40444
40576
|
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
40577
|
if (!row2)
|
|
@@ -40506,7 +40638,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
40506
40638
|
return { id: id2, personId, removed: true };
|
|
40507
40639
|
}, "removeNote");
|
|
40508
40640
|
|
|
40509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40641
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
40510
40642
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
40511
40643
|
const { database } = context;
|
|
40512
40644
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -40591,13 +40723,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
40591
40723
|
};
|
|
40592
40724
|
}, "peopleStoreOver");
|
|
40593
40725
|
|
|
40594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
40595
40727
|
import { createHash as createHash9 } from "node:crypto";
|
|
40596
40728
|
|
|
40597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
40598
40730
|
import { createHash as createHash8 } from "node:crypto";
|
|
40599
40731
|
|
|
40600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
40601
40733
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
40602
40734
|
var AUTHOR_MEASURES = [
|
|
40603
40735
|
"messages",
|
|
@@ -40737,7 +40869,7 @@ var withoutUrls = /* @__PURE__ */ __name((text7) => text7.replace(/\S+/gu, (toke
|
|
|
40737
40869
|
var rankingWords = /* @__PURE__ */ __name((text7) => withoutUrls(text7).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
40738
40870
|
var rankingQuestion = /* @__PURE__ */ __name((text7) => withoutUrls(text7).includes("?"), "rankingQuestion");
|
|
40739
40871
|
|
|
40740
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
40741
40873
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
40742
40874
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
40743
40875
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -40959,7 +41091,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
40959
41091
|
};
|
|
40960
41092
|
}, "rankReplyGraph");
|
|
40961
41093
|
|
|
40962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
40963
41095
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
40964
41096
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
40965
41097
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -41133,7 +41265,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
41133
41265
|
return { items, evidence, summary, graph: graph.quality };
|
|
41134
41266
|
}, "calculateAdminStatistics");
|
|
41135
41267
|
|
|
41136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
41137
41269
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
41138
41270
|
const dates = [];
|
|
41139
41271
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -41155,7 +41287,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
41155
41287
|
return dates[0].node.resolution.date;
|
|
41156
41288
|
}, "rankingContextRange");
|
|
41157
41289
|
|
|
41158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
41159
41291
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
41160
41292
|
let counts;
|
|
41161
41293
|
try {
|
|
@@ -41450,7 +41582,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
41450
41582
|
});
|
|
41451
41583
|
}, "rankQuery");
|
|
41452
41584
|
|
|
41453
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
41454
41586
|
function fail4(message3, reason = "query.too-large") {
|
|
41455
41587
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
41456
41588
|
}
|
|
@@ -41627,7 +41759,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
41627
41759
|
return result;
|
|
41628
41760
|
}), "adminStatisticsQuery");
|
|
41629
41761
|
|
|
41630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
41631
41763
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
41632
41764
|
if (!execution.accounts.length)
|
|
41633
41765
|
return { conversations: [], chats: [] };
|
|
@@ -41645,7 +41777,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
41645
41777
|
return { conversations: conversations2, chats: chats2 };
|
|
41646
41778
|
}, "conversationEligibility");
|
|
41647
41779
|
|
|
41648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
41649
41781
|
import { createHash as createHash10 } from "node:crypto";
|
|
41650
41782
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
41651
41783
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -41795,7 +41927,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
41795
41927
|
return result;
|
|
41796
41928
|
}, "rankingEvidence");
|
|
41797
41929
|
|
|
41798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
41799
41931
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
41800
41932
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2) => {
|
|
41801
41933
|
const params = [...scope3.accounts.flatMap(({ provider, account }) => [provider, account]), ...kinds2];
|
|
@@ -41889,7 +42021,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
41889
42021
|
});
|
|
41890
42022
|
}, "waitingChats");
|
|
41891
42023
|
|
|
41892
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42024
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
41893
42025
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
41894
42026
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
41895
42027
|
if (execution.corpus === "mail")
|
|
@@ -41910,7 +42042,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
41910
42042
|
};
|
|
41911
42043
|
}, "queriesStoreOver");
|
|
41912
42044
|
|
|
41913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
41914
42046
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
41915
42047
|
const { database, now: now2 } = context;
|
|
41916
42048
|
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 +42081,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
41949
42081
|
}));
|
|
41950
42082
|
}, "chatEventsOf");
|
|
41951
42083
|
|
|
41952
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
41953
42085
|
import { createHash as createHash11 } from "node:crypto";
|
|
41954
42086
|
|
|
41955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
41956
42088
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
41957
42089
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
41958
42090
|
timeZone: zone,
|
|
@@ -41972,7 +42104,7 @@ var weekKey = /* @__PURE__ */ __name((day3) => {
|
|
|
41972
42104
|
return date3.toISOString().slice(0, 10);
|
|
41973
42105
|
}, "weekKey");
|
|
41974
42106
|
|
|
41975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
41976
42108
|
var RETENTION_TOLERANCE = 864e5;
|
|
41977
42109
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
41978
42110
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -42026,7 +42158,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
42026
42158
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
42027
42159
|
}, "retentionCohorts");
|
|
42028
42160
|
|
|
42029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
42030
42162
|
var iso7 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
42031
42163
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
42032
42164
|
validateRetentionOptions(options);
|
|
@@ -42157,7 +42289,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
42157
42289
|
};
|
|
42158
42290
|
}, "retentionQuery");
|
|
42159
42291
|
|
|
42160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
42161
42293
|
var iso8 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
42162
42294
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
42163
42295
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -42288,7 +42420,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
42288
42420
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
42289
42421
|
})), "trackedChats");
|
|
42290
42422
|
|
|
42291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
42292
42424
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
42293
42425
|
const { database } = context;
|
|
42294
42426
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -42344,7 +42476,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42344
42476
|
};
|
|
42345
42477
|
}, "rosterStoreOver");
|
|
42346
42478
|
|
|
42347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
42348
42480
|
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
42481
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
42350
42482
|
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 +42500,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
42368
42500
|
}
|
|
42369
42501
|
}, "backfillNormalized");
|
|
42370
42502
|
|
|
42371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
42372
42504
|
var INDEX2 = "message_words";
|
|
42373
42505
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
42374
42506
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -42495,7 +42627,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
42495
42627
|
});
|
|
42496
42628
|
}, "resetSearchIndex");
|
|
42497
42629
|
|
|
42498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
42499
42631
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
42500
42632
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
42501
42633
|
const before2 = stemsState(database);
|
|
@@ -42590,7 +42722,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
42590
42722
|
return resetStems(database, { now: now2 });
|
|
42591
42723
|
}, "followDefaultStemmers");
|
|
42592
42724
|
|
|
42593
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
42594
42726
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
42595
42727
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
42596
42728
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -42612,7 +42744,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
42612
42744
|
});
|
|
42613
42745
|
}, "termCandidates");
|
|
42614
42746
|
|
|
42615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42747
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
42616
42748
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
42617
42749
|
const { database } = context;
|
|
42618
42750
|
const stemmerFor2 = stemmerCache();
|
|
@@ -42636,7 +42768,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42636
42768
|
};
|
|
42637
42769
|
}, "searchIndexStoreOver");
|
|
42638
42770
|
|
|
42639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42771
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
42640
42772
|
var HISTORY_KEPT = 1e3;
|
|
42641
42773
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
42642
42774
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -42705,7 +42837,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
42705
42837
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
42706
42838
|
}, "clearHistory");
|
|
42707
42839
|
|
|
42708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
42709
42841
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
42710
42842
|
const { database } = context;
|
|
42711
42843
|
return {
|
|
@@ -42729,7 +42861,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42729
42861
|
};
|
|
42730
42862
|
}, "searchesStoreOver");
|
|
42731
42863
|
|
|
42732
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
42733
42865
|
import { createHash as createHash12 } from "node:crypto";
|
|
42734
42866
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
42735
42867
|
var sha256 = /* @__PURE__ */ __name((value) => createHash12("sha256").update(value).digest("hex"), "sha256");
|
|
@@ -42909,7 +43041,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
42909
43041
|
};
|
|
42910
43042
|
}, "addedSourcesOver");
|
|
42911
43043
|
|
|
42912
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43044
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
42913
43045
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
42914
43046
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
42915
43047
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -42952,7 +43084,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
42952
43084
|
};
|
|
42953
43085
|
}, "agentActionsStoreOver");
|
|
42954
43086
|
|
|
42955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
42956
43088
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
42957
43089
|
}) => {
|
|
42958
43090
|
const { database, now: now2 } = context;
|
|
@@ -43011,7 +43143,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
43011
43143
|
};
|
|
43012
43144
|
}, "botUpdateStoreOver");
|
|
43013
43145
|
|
|
43014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
43015
43147
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
43016
43148
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
43017
43149
|
throw new CliError(code, message3, { reason });
|
|
@@ -43159,7 +43291,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
43159
43291
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly, linkedId, ...decisionsOver(context) };
|
|
43160
43292
|
}, "reviewedRowsOver");
|
|
43161
43293
|
|
|
43162
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43294
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
43163
43295
|
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
43296
|
var DAY_MS = 864e5;
|
|
43165
43297
|
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,20 +43440,20 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43308
43440
|
};
|
|
43309
43441
|
}, "contractsStoreOver");
|
|
43310
43442
|
|
|
43311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
43312
43444
|
var BUSINESS_FIND_MAX = 2001;
|
|
43313
43445
|
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
43446
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
43315
|
-
var
|
|
43316
|
-
var DECIDED = `${
|
|
43447
|
+
var LIVE3 = "x.deleted_at IS NULL";
|
|
43448
|
+
var DECIDED = `${LIVE3} AND x.review <> 'rejected'`;
|
|
43317
43449
|
var SEARCHED = {
|
|
43318
43450
|
invoice: `SELECT x.id, x.review, x.source, x.updated_at, x.number AS f1, ${partyName("c")} AS f2 FROM invoices x ${party("x.counterparty_type", "x.counterparty_id", "c")} WHERE ${DECIDED}`,
|
|
43319
43451
|
payment: `SELECT x.id, x.review, x.source, x.updated_at, x.reference AS f1, ${partyName("r")} AS f2, ${partyName("e")} AS f3 FROM payments x ${party("x.payer_type", "x.payer_id", "r")} ${party("x.payee_type", "x.payee_id", "e")} WHERE ${DECIDED}`,
|
|
43320
43452
|
order: `SELECT x.id, x.review, x.source, x.updated_at, x.number AS f1, x.supplier_name AS f2, (SELECT group_concat(description, char(10)) FROM order_lines WHERE order_id = x.id) AS f3 FROM orders x WHERE ${DECIDED}`,
|
|
43321
43453
|
contract: `SELECT x.id, x.review, x.source, x.updated_at, x.name AS f1, x.number AS f2 FROM contracts x WHERE ${DECIDED}`,
|
|
43322
43454
|
subscription: `SELECT x.id, x.review, x.source, x.updated_at, x.name AS f1 FROM subscriptions x WHERE ${DECIDED}`,
|
|
43323
|
-
product: `SELECT x.id, 'confirmed' AS review, x.source, x.updated_at, x.name AS f1, x.sku AS f2 FROM catalog_items x WHERE ${
|
|
43324
|
-
wallet: `SELECT x.id, 'confirmed' AS review, x.source, x.updated_at, x.name AS f1, x.institution AS f2 FROM financial_accounts x WHERE ${
|
|
43455
|
+
product: `SELECT x.id, 'confirmed' AS review, x.source, x.updated_at, x.name AS f1, x.sku AS f2 FROM catalog_items x WHERE ${LIVE3}`,
|
|
43456
|
+
wallet: `SELECT x.id, 'confirmed' AS review, x.source, x.updated_at, x.name AS f1, x.institution AS f2 FROM financial_accounts x WHERE ${LIVE3}`
|
|
43325
43457
|
};
|
|
43326
43458
|
var FIELDS2 = ["f1", "f2", "f3"];
|
|
43327
43459
|
var TEXT_CHARS = 240;
|
|
@@ -43412,7 +43544,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
43412
43544
|
};
|
|
43413
43545
|
}, "businessSearchOver");
|
|
43414
43546
|
|
|
43415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
43416
43548
|
var DAY5 = 864e5;
|
|
43417
43549
|
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
43550
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -43522,7 +43654,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
43522
43654
|
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
43655
|
}, "listEvents");
|
|
43524
43656
|
|
|
43525
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43657
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
43526
43658
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
43527
43659
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
43528
43660
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -43579,7 +43711,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
43579
43711
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
43580
43712
|
}, "forgetCalendarRows");
|
|
43581
43713
|
|
|
43582
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
43583
43715
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
43584
43716
|
id: Number(row2.id),
|
|
43585
43717
|
accountId: Number(row2.account_id),
|
|
@@ -44182,7 +44314,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
44182
44314
|
};
|
|
44183
44315
|
}, "eventStoreOver");
|
|
44184
44316
|
|
|
44185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
44186
44318
|
var CATALOG_QUERY = defineQuery({
|
|
44187
44319
|
entity: "document",
|
|
44188
44320
|
backend: "sql",
|
|
@@ -44424,7 +44556,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
44424
44556
|
};
|
|
44425
44557
|
}, "catalogStoreOver");
|
|
44426
44558
|
|
|
44427
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44559
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
44428
44560
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
44429
44561
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
44430
44562
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -44437,7 +44569,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
44437
44569
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
44438
44570
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
44439
44571
|
|
|
44440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
44441
44573
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
44442
44574
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
44443
44575
|
signal?.throwIfAborted();
|
|
@@ -44536,7 +44668,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
44536
44668
|
});
|
|
44537
44669
|
}, "readMeetingContextEvidence");
|
|
44538
44670
|
|
|
44539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
44540
44672
|
var corpora = {
|
|
44541
44673
|
message: {
|
|
44542
44674
|
table: "messages",
|
|
@@ -44775,10 +44907,10 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
44775
44907
|
}
|
|
44776
44908
|
}), "contextRecordsOver");
|
|
44777
44909
|
|
|
44778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/crm.js
|
|
44779
44911
|
var isItemKind = /* @__PURE__ */ __name((kind4) => kind4 === "deal" || kind4 === "lead", "isItemKind");
|
|
44780
44912
|
|
|
44781
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44913
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
44782
44914
|
import { createHash as createHash13 } from "node:crypto";
|
|
44783
44915
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
44784
44916
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -45122,7 +45254,7 @@ var fieldReferences = /* @__PURE__ */ __name((record4, options = {}) => {
|
|
|
45122
45254
|
return found2;
|
|
45123
45255
|
}, "fieldReferences");
|
|
45124
45256
|
|
|
45125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
45126
45258
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
45127
45259
|
var SOURCE = "crm";
|
|
45128
45260
|
var crmIdentityId = /* @__PURE__ */ __name((key2, externalId, type = "contact") => `${idPart(key2.account)}/${type}/${idPart(externalId)}`, "crmIdentityId");
|
|
@@ -45251,7 +45383,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
45251
45383
|
return { savePipeline, saveItemRow };
|
|
45252
45384
|
}, "crmRowsOver");
|
|
45253
45385
|
|
|
45254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
45255
45387
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
45256
45388
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
45257
45389
|
var crmSettingKey = /* @__PURE__ */ __name((key2, name) => `crm.${key2.provider}:${key2.account}.${name}`, "crmSettingKey");
|
|
@@ -45314,7 +45446,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
45314
45446
|
];
|
|
45315
45447
|
}), "crmSettingsOf");
|
|
45316
45448
|
|
|
45317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45449
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
45318
45450
|
var MAX_LINES = 500;
|
|
45319
45451
|
var PARENTS = {
|
|
45320
45452
|
invoice: {
|
|
@@ -45414,7 +45546,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
45414
45546
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
45415
45547
|
}, "moneyLinesOver");
|
|
45416
45548
|
|
|
45417
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
45418
45550
|
var COUNTED = {
|
|
45419
45551
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
45420
45552
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -45489,7 +45621,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
45489
45621
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
45490
45622
|
}, "refundRulesOver");
|
|
45491
45623
|
|
|
45492
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
45493
45625
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
45494
45626
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
45495
45627
|
var PAID = netPaidSql("i.id");
|
|
@@ -45887,7 +46019,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45887
46019
|
};
|
|
45888
46020
|
}, "financeStoreOver");
|
|
45889
46021
|
|
|
45890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46022
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
45891
46023
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
45892
46024
|
throw new CliError("validation_error", message3, { reason });
|
|
45893
46025
|
}, "refuse");
|
|
@@ -45965,7 +46097,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
45965
46097
|
};
|
|
45966
46098
|
}, "paymentEntriesOver");
|
|
45967
46099
|
|
|
45968
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46100
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
45969
46101
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
45970
46102
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
45971
46103
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -45991,7 +46123,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
45991
46123
|
return valid;
|
|
45992
46124
|
}, "validateEvidenceFindings");
|
|
45993
46125
|
|
|
45994
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
45995
46127
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
45996
46128
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
45997
46129
|
var iso10 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -46172,7 +46304,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46172
46304
|
};
|
|
46173
46305
|
}, "proposedActionsStoreOver");
|
|
46174
46306
|
|
|
46175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
46176
46308
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
46177
46309
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
46178
46310
|
var listOf = /* @__PURE__ */ __name((list2) => {
|
|
@@ -46244,7 +46376,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
46244
46376
|
};
|
|
46245
46377
|
}, "relationRolesOver");
|
|
46246
46378
|
|
|
46247
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
46248
46380
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
46249
46381
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
46250
46382
|
id: link3.id,
|
|
@@ -46563,7 +46695,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
46563
46695
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
46564
46696
|
}, "decidedOrigin");
|
|
46565
46697
|
|
|
46566
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
46567
46699
|
var KEYED = "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'partner-of') AND to_id IS NOT NULL";
|
|
46568
46700
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
46569
46701
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" } } = {}) => {
|
|
@@ -46669,7 +46801,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
46669
46801
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
46670
46802
|
}), "relationsStoreOver");
|
|
46671
46803
|
|
|
46672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
46673
46805
|
var PENDING = "crm:pending-relations";
|
|
46674
46806
|
var PENDING_DAYS = 30;
|
|
46675
46807
|
var PENDING_MOST = 5e3;
|
|
@@ -47147,7 +47279,7 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
47147
47279
|
};
|
|
47148
47280
|
}, "crmCopiesOver");
|
|
47149
47281
|
|
|
47150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47282
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
47151
47283
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
47152
47284
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind4, stageIds, cutoff) => {
|
|
47153
47285
|
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 +47296,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind4, stageIds, cuto
|
|
|
47164
47296
|
});
|
|
47165
47297
|
}, "stageAmountsOf");
|
|
47166
47298
|
|
|
47167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
47168
47300
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
47169
47301
|
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
47302
|
var MAX_STAGES = 30;
|
|
@@ -47505,16 +47637,16 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47505
47637
|
};
|
|
47506
47638
|
}, "dealsStoreOver");
|
|
47507
47639
|
|
|
47508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47640
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
47509
47641
|
import { createHash as createHash14, randomBytes as randomBytes2 } from "node:crypto";
|
|
47510
47642
|
|
|
47511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
47512
47644
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
47513
47645
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
47514
47646
|
var TOKEN2 = /^[A-Za-z0-9_-]{21}[AQgw]$/;
|
|
47515
47647
|
var isDecisionToken = /* @__PURE__ */ __name((value) => typeof value === "string" && TOKEN2.test(value), "isDecisionToken");
|
|
47516
47648
|
|
|
47517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
47518
47650
|
var digestOf = /* @__PURE__ */ __name((token) => createHash14("sha256").update(token).digest("hex"), "digestOf");
|
|
47519
47651
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
47520
47652
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -47610,7 +47742,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
47610
47742
|
};
|
|
47611
47743
|
}, "decisionRequestStoreOver");
|
|
47612
47744
|
|
|
47613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47745
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
47614
47746
|
var NOTE_FIELDS = [
|
|
47615
47747
|
"text",
|
|
47616
47748
|
"exact",
|
|
@@ -47888,7 +48020,7 @@ var searchCorpus = /* @__PURE__ */ __name((context, query, corpus) => {
|
|
|
47888
48020
|
});
|
|
47889
48021
|
}, "searchCorpus");
|
|
47890
48022
|
var SCAN_PAGE3 = 5e3;
|
|
47891
|
-
var
|
|
48023
|
+
var LIVE4 = "((k.chunkable_type = 'document' AND EXISTS (SELECT 1 FROM documents d WHERE d.id = k.chunkable_id AND d.deleted_at IS NULL AND coalesce(json_extract(d.metadata, '$.catalog.active'), 1)=1 AND (? IS NULL OR d.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))))) OR (k.chunkable_type = 'note' AND ? IS NULL AND EXISTS (SELECT 1 FROM notes n WHERE n.id = k.chunkable_id AND n.deleted_at IS NULL)))";
|
|
47892
48024
|
var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
47893
48025
|
const { database } = context;
|
|
47894
48026
|
const stemmerFor2 = stemmerCache();
|
|
@@ -47901,7 +48033,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
47901
48033
|
const folders = folderIds?.length ? JSON.stringify(folderIds) : null;
|
|
47902
48034
|
const types = source2 === void 0 ? ["document", "note"] : source2 === "file" ? ["document"] : ["note"];
|
|
47903
48035
|
return {
|
|
47904
|
-
sql: ` AND k.chunkable_type IN (${types.map(() => "?").join(", ")}) AND ${
|
|
48036
|
+
sql: ` AND k.chunkable_type IN (${types.map(() => "?").join(", ")}) AND ${LIVE4}`,
|
|
47905
48037
|
params: [...types, folders, folders, withInternal ? null : folders]
|
|
47906
48038
|
};
|
|
47907
48039
|
}, "live");
|
|
@@ -47928,11 +48060,17 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
47928
48060
|
}
|
|
47929
48061
|
return texts2.get(owner);
|
|
47930
48062
|
}, "textOf");
|
|
47931
|
-
return database.prepare(`SELECT k.content_hash AS hash, min(k.chunkable_type || ':' || k.chunkable_id) AS owner, k.start_offset AS start, k.end_offset AS end
|
|
48063
|
+
return database.prepare(`SELECT k.content_hash AS hash, min(k.chunkable_type || ':' || k.chunkable_id) AS owner, k.start_offset AS start, k.end_offset AS end,
|
|
48064
|
+
k.position
|
|
47932
48065
|
FROM chunks k
|
|
47933
48066
|
WHERE k.content_hash > ?${scope3.sql}
|
|
47934
48067
|
AND NOT EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ? AND v.content_hash = k.content_hash)
|
|
47935
48068
|
GROUP BY k.content_hash ORDER BY k.content_hash LIMIT ?`).all(after2 ?? "", ...scope3.params, model, limit).flatMap((row2) => {
|
|
48069
|
+
if (Number(row2.position) === ENRICHMENT_POSITION) {
|
|
48070
|
+
const [type, id2] = String(row2.owner).split(":");
|
|
48071
|
+
const text8 = enrichmentText(database, String(type), Number(id2));
|
|
48072
|
+
return text8 === void 0 ? [] : [{ hash: String(row2.hash), text: text8 }];
|
|
48073
|
+
}
|
|
47936
48074
|
const text7 = textOf7(String(row2.owner));
|
|
47937
48075
|
return text7 === void 0 ? [] : [{ hash: String(row2.hash), text: text7.slice(Number(row2.start), Number(row2.end)) }];
|
|
47938
48076
|
});
|
|
@@ -48040,7 +48178,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
48040
48178
|
};
|
|
48041
48179
|
}, "noteSearchOver");
|
|
48042
48180
|
|
|
48043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48181
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
48044
48182
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
48045
48183
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
48046
48184
|
var EVENT_CORPUS = {
|
|
@@ -48172,7 +48310,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
48172
48310
|
};
|
|
48173
48311
|
}, "eventSearchOver");
|
|
48174
48312
|
|
|
48175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48313
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
48176
48314
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
48177
48315
|
try {
|
|
48178
48316
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -48184,7 +48322,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
48184
48322
|
}
|
|
48185
48323
|
}, "calendarMoment");
|
|
48186
48324
|
|
|
48187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
48188
48326
|
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
48327
|
var iso12 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
48190
48328
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -48404,7 +48542,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48404
48542
|
};
|
|
48405
48543
|
}, "factsStoreOver");
|
|
48406
48544
|
|
|
48407
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
48408
48546
|
var invalid5 = /* @__PURE__ */ __name((message3) => {
|
|
48409
48547
|
throw new CliError("validation_error", message3);
|
|
48410
48548
|
}, "invalid");
|
|
@@ -48508,7 +48646,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind4) => {
|
|
|
48508
48646
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes, create };
|
|
48509
48647
|
}, "findingsCoreOver");
|
|
48510
48648
|
|
|
48511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
48512
48650
|
var stale = /* @__PURE__ */ __name(() => {
|
|
48513
48651
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
48514
48652
|
reason: "evidence-findings.stale"
|
|
@@ -48689,7 +48827,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48689
48827
|
};
|
|
48690
48828
|
}, "evidenceFindingsStoreOver");
|
|
48691
48829
|
|
|
48692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48830
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
48693
48831
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
48694
48832
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
48695
48833
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -48742,7 +48880,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
48742
48880
|
}, "forPerson")
|
|
48743
48881
|
}), "involvementStoreOver");
|
|
48744
48882
|
|
|
48745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
48746
48884
|
var LABELLED = {
|
|
48747
48885
|
note: "note",
|
|
48748
48886
|
document: "document",
|
|
@@ -48754,7 +48892,7 @@ var LABELLED = {
|
|
|
48754
48892
|
account: "folder"
|
|
48755
48893
|
};
|
|
48756
48894
|
|
|
48757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48895
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
48758
48896
|
import { createHash as createHash15 } from "node:crypto";
|
|
48759
48897
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
48760
48898
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -48840,7 +48978,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
48840
48978
|
};
|
|
48841
48979
|
}, "meetingProjectsStoreOver");
|
|
48842
48980
|
|
|
48843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48981
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
48844
48982
|
var ORGANIZATIONS_QUERY = {
|
|
48845
48983
|
entity: "organization",
|
|
48846
48984
|
backend: "sql",
|
|
@@ -48881,7 +49019,7 @@ var REMINDERS_QUERY = {
|
|
|
48881
49019
|
})
|
|
48882
49020
|
};
|
|
48883
49021
|
|
|
48884
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49022
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
48885
49023
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
48886
49024
|
id: String(row2.id),
|
|
48887
49025
|
ref: `organization:${row2.id}`,
|
|
@@ -48923,7 +49061,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
48923
49061
|
}), "setOwnOrganization")
|
|
48924
49062
|
}), "organizationsStoreOver");
|
|
48925
49063
|
|
|
48926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
48927
49065
|
var KINDS2 = RELATION_KINDS.map(linkKind).join(", ");
|
|
48928
49066
|
var typeOfRef = /* @__PURE__ */ __name((column2) => `substr(${column2}, 1, instr(${column2}, ':') - 1)`, "typeOfRef");
|
|
48929
49067
|
var idOfRef = /* @__PURE__ */ __name((column2) => `CAST(substr(${column2}, instr(${column2}, ':') + 1) AS INTEGER)`, "idOfRef");
|
|
@@ -49048,13 +49186,13 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
49048
49186
|
__name(proposalItem, "proposalItem");
|
|
49049
49187
|
}, "relationListOver");
|
|
49050
49188
|
|
|
49051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
49052
49190
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
49053
49191
|
...relationListOver(context),
|
|
49054
49192
|
...relationRolesOver(context)
|
|
49055
49193
|
}), "relationReadsOver");
|
|
49056
49194
|
|
|
49057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
49058
49196
|
var TABLES5 = { memory: "memories", fact: "facts" };
|
|
49059
49197
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
49060
49198
|
var DEFAULT_LIMIT = 500;
|
|
@@ -49242,16 +49380,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49242
49380
|
};
|
|
49243
49381
|
}, "sourceReviewStoreOver");
|
|
49244
49382
|
|
|
49245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49383
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
49246
49384
|
import { createHash as createHash18 } from "node:crypto";
|
|
49247
49385
|
|
|
49248
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
49249
49387
|
import { createHash as createHash17 } from "node:crypto";
|
|
49250
49388
|
|
|
49251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
49252
49390
|
import { createHash as createHash16 } from "node:crypto";
|
|
49253
49391
|
|
|
49254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
49255
49393
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
49256
49394
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
49257
49395
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -49302,7 +49440,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
49302
49440
|
return input;
|
|
49303
49441
|
}, "consolidationApplyInput");
|
|
49304
49442
|
|
|
49305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
49306
49444
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
49307
49445
|
id: String(row2.id),
|
|
49308
49446
|
sourceId: String(row2.source_id),
|
|
@@ -49377,7 +49515,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
49377
49515
|
}, { beforeCommit: check3 });
|
|
49378
49516
|
}, "applyTagConsolidation");
|
|
49379
49517
|
|
|
49380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49518
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
49381
49519
|
var selections = [
|
|
49382
49520
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
49383
49521
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -49521,7 +49659,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
49521
49659
|
};
|
|
49522
49660
|
}, "previewRows");
|
|
49523
49661
|
|
|
49524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49662
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
49525
49663
|
var kinds = ["project", "tag", "topic"];
|
|
49526
49664
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
49527
49665
|
if (signal?.aborted)
|
|
@@ -49785,7 +49923,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49785
49923
|
};
|
|
49786
49924
|
}, "vocabularyStoreOver");
|
|
49787
49925
|
|
|
49788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
49789
49927
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
49790
49928
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
49791
49929
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -50331,7 +50469,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
50331
50469
|
return key2.padEnd(3, "X");
|
|
50332
50470
|
}, "projectKey");
|
|
50333
50471
|
|
|
50334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
50335
50473
|
var DAY6 = 864e5;
|
|
50336
50474
|
var SETTING4 = "logs_pruned_at";
|
|
50337
50475
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY6, botUpdatePayloadsMs: 30 * DAY6 };
|
|
@@ -50358,7 +50496,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
50358
50496
|
};
|
|
50359
50497
|
}, "logPruner");
|
|
50360
50498
|
|
|
50361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
50362
50500
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
50363
50501
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
50364
50502
|
var invalid7 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -50734,7 +50872,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
50734
50872
|
}, "checkMailFindings");
|
|
50735
50873
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
50736
50874
|
|
|
50737
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50875
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
50738
50876
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
50739
50877
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
50740
50878
|
var WEIGHTS = {
|
|
@@ -50867,7 +51005,7 @@ var scoreGroup = /* @__PURE__ */ __name((items, context) => {
|
|
|
50867
51005
|
return { score: kept2.reduce((sum, signal) => sum + WEIGHTS[signal], 0), signals: kept2 };
|
|
50868
51006
|
}, "scoreGroup");
|
|
50869
51007
|
|
|
50870
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
50871
51009
|
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
51010
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
50873
51011
|
const { database, now: now2 } = context;
|
|
@@ -51075,7 +51213,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51075
51213
|
};
|
|
51076
51214
|
}, "ordersStoreOver");
|
|
51077
51215
|
|
|
51078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
51079
51217
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
51080
51218
|
throw new CliError("validation_error", "mail findings cite mail that changed since it was read; stage a new batch", {
|
|
51081
51219
|
reason: "mail-findings.stale"
|
|
@@ -51532,7 +51670,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
51532
51670
|
};
|
|
51533
51671
|
}, "mailFindingsStoreOver");
|
|
51534
51672
|
|
|
51535
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51673
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
51536
51674
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
51537
51675
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
51538
51676
|
reason: "meeting-findings.stale"
|
|
@@ -51700,9 +51838,9 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51700
51838
|
};
|
|
51701
51839
|
}, "meetingFindingsStoreOver");
|
|
51702
51840
|
|
|
51703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51841
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
51704
51842
|
var RANK_BATCH = 512;
|
|
51705
|
-
var
|
|
51843
|
+
var LIVE5 = "FROM chunks k JOIN meeting_transcripts t ON k.chunkable_type = 'meeting_transcript' AND t.id = k.chunkable_id JOIN meetings m ON m.id = t.meeting_id WHERE m.account_id = ? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL";
|
|
51706
51844
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
51707
51845
|
positiveReadInteger(value, name);
|
|
51708
51846
|
if (value > max)
|
|
@@ -51788,7 +51926,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
51788
51926
|
throw new CliError("validation_error", "Vector save exceeds its batch or 16 MiB payload budget");
|
|
51789
51927
|
return write(context.database, () => {
|
|
51790
51928
|
const unique2 = new Map(rows.map((row2) => [row2.hash, row2]));
|
|
51791
|
-
const current = context.database.prepare(`SELECT DISTINCT k.content_hash ${
|
|
51929
|
+
const current = context.database.prepare(`SELECT DISTINCT k.content_hash ${LIVE5} AND k.content_hash IN (SELECT value FROM json_each(?))`).all(input.accountId, JSON.stringify([...unique2.keys()]));
|
|
51792
51930
|
const available = new Set(current.map((row2) => String(row2.content_hash)));
|
|
51793
51931
|
const selected = [...unique2.values()].filter((row2) => available.has(row2.hash) && !context.database.prepare("SELECT 1 FROM embeddings WHERE model=? AND content_hash=?").get(model, row2.hash));
|
|
51794
51932
|
input.signal?.throwIfAborted();
|
|
@@ -51845,7 +51983,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
51845
51983
|
if (input.afterHash !== void 0 && !/^[a-f0-9]{64}$/.test(input.afterHash))
|
|
51846
51984
|
throw new CliError("validation_error", "afterHash must be a content hash");
|
|
51847
51985
|
return read(context.database, () => {
|
|
51848
|
-
const rows = context.database.prepare(`SELECT k.* ${
|
|
51986
|
+
const rows = context.database.prepare(`SELECT k.* ${LIVE5} AND k.content_hash > ? AND NOT EXISTS (SELECT 1 FROM embeddings e WHERE e.model=? AND e.content_hash=k.content_hash) GROUP BY k.content_hash ORDER BY k.content_hash LIMIT ?`).all(input.accountId, input.afterHash ?? "", model, limit + 1);
|
|
51849
51987
|
const load = textLoader(context, input);
|
|
51850
51988
|
const items = rows.slice(0, limit).map((row2) => ({
|
|
51851
51989
|
hash: String(row2.content_hash),
|
|
@@ -51865,13 +52003,13 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
51865
52003
|
if (input.afterChunkId !== void 0)
|
|
51866
52004
|
positiveReadInteger(input.afterChunkId, "afterChunkId");
|
|
51867
52005
|
return read(context.database, () => {
|
|
51868
|
-
const selectedSql = `${
|
|
52006
|
+
const selectedSql = `${LIVE5.replace(" WHERE", " JOIN embeddings e ON e.content_hash=k.content_hash AND e.model=? WHERE")} AND k.id>? ORDER BY k.id LIMIT ?`;
|
|
51869
52007
|
const params = [model, input.accountId, input.afterChunkId ?? 0, maxChunks + 1];
|
|
51870
52008
|
const preflight = context.database.prepare(`SELECT coalesce(sum(n),0) AS bytes, coalesce(sum(bad),0) AS bad FROM (SELECT length(e.vector) AS n, (e.dims != ? OR length(e.vector) != ?) AS bad ${selectedSql})`).get(query.length, query.length * 4, ...params);
|
|
51871
52009
|
if (Number(preflight?.bad ?? 0) || Number(preflight?.bytes ?? 0) > 16 * 1024 * 1024)
|
|
51872
52010
|
throw new CliError("validation_error", "Stored vectors exceed the dimension or 16 MiB scan budget");
|
|
51873
52011
|
input.signal?.throwIfAborted();
|
|
51874
|
-
const rows = context.database.prepare(`SELECT k.*,e.dims,e.vector ${
|
|
52012
|
+
const rows = context.database.prepare(`SELECT k.*,e.dims,e.vector ${LIVE5.replace(" WHERE", " JOIN embeddings e ON e.content_hash=k.content_hash AND e.model=? WHERE")} AND k.id>? ORDER BY k.id LIMIT ?`).all(model, input.accountId, input.afterChunkId ?? 0, maxChunks + 1);
|
|
51875
52013
|
const selected = rows.slice(0, maxChunks);
|
|
51876
52014
|
const load = textLoader(context, input);
|
|
51877
52015
|
const items = selected.map((row2) => {
|
|
@@ -51966,12 +52104,12 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
51966
52104
|
async status(input) {
|
|
51967
52105
|
scope2(input);
|
|
51968
52106
|
modelOf(input.model);
|
|
51969
|
-
const row2 = context.database.prepare(`SELECT count(DISTINCT k.content_hash) AS chunks,count(DISTINCT CASE WHEN EXISTS (SELECT 1 FROM embeddings e WHERE e.model=? AND e.content_hash=k.content_hash) THEN k.content_hash END) AS embedded ${
|
|
52107
|
+
const row2 = context.database.prepare(`SELECT count(DISTINCT k.content_hash) AS chunks,count(DISTINCT CASE WHEN EXISTS (SELECT 1 FROM embeddings e WHERE e.model=? AND e.content_hash=k.content_hash) THEN k.content_hash END) AS embedded ${LIVE5}`).get(input.model, input.accountId);
|
|
51970
52108
|
return { chunks: Number(row2?.chunks ?? 0), embedded: Number(row2?.embedded ?? 0) };
|
|
51971
52109
|
}
|
|
51972
52110
|
}), "meetingVectorsOver");
|
|
51973
52111
|
|
|
51974
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
51975
52113
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
51976
52114
|
var TEXTS = {
|
|
51977
52115
|
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 +52210,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52072
52210
|
};
|
|
52073
52211
|
}, "sourceMentionStoreOver");
|
|
52074
52212
|
|
|
52075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
52076
52214
|
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
52215
|
var MAX_SPLITS = 100;
|
|
52078
52216
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -52303,11 +52441,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52303
52441
|
};
|
|
52304
52442
|
}, "transactionsStoreOver");
|
|
52305
52443
|
|
|
52306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
52307
52445
|
import { accessSync, constants, existsSync, mkdirSync as mkdirSync2, statSync, writeFileSync as writeFileSync2 } from "node:fs";
|
|
52308
52446
|
import { dirname as dirname2 } from "node:path";
|
|
52309
52447
|
|
|
52310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
52311
52449
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
52312
52450
|
var CLIENTS_SETTING = "clients";
|
|
52313
52451
|
var coreVersion = (() => {
|
|
@@ -52365,7 +52503,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
52365
52503
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
52366
52504
|
}, "refusalAdvice");
|
|
52367
52505
|
|
|
52368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
52369
52507
|
var GENERATED = [
|
|
52370
52508
|
{
|
|
52371
52509
|
"name": "20261010184427_initial",
|
|
@@ -53575,10 +53713,24 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
53575
53713
|
"CREATE TRIGGER payment_allocations_refund_bd BEFORE DELETE ON payment_allocations\n WHEN (SELECT refund_of IS NOT NULL AND review = 'confirmed' AND deleted_at IS NULL FROM payments WHERE id = old.payment_id)\n AND (SELECT review FROM invoices WHERE id = old.invoice_id) <> 'rejected'\n AND (SELECT coalesce(sum(CASE WHEN np.refund_of IS NULL THEN na.amount ELSE -na.amount END), 0) FROM payment_allocations na JOIN payments np ON np.id = na.payment_id WHERE na.invoice_id = old.invoice_id AND np.review = 'confirmed' AND np.deleted_at IS NULL) + old.amount\n > (SELECT total FROM invoices WHERE id = old.invoice_id) BEGIN\n SELECT RAISE(ABORT, 'payment_allocations: taking a refund''s share back would pay the invoice beyond its total');\nEND;",
|
|
53576
53714
|
"-- A void invoice keeps what was settled on it; a rejected one lets its allocations go, as reject sets review first.\nCREATE TRIGGER payment_allocations_void_bd BEFORE DELETE ON payment_allocations\n WHEN (SELECT status = 'void' AND review <> 'rejected' FROM invoices WHERE id = old.invoice_id) BEGIN\n SELECT RAISE(ABORT, 'payment_allocations: a void invoice keeps its allocations');\nEND;"
|
|
53577
53715
|
]
|
|
53716
|
+
},
|
|
53717
|
+
{
|
|
53718
|
+
"name": "20261108104659_version-58-enrichments",
|
|
53719
|
+
"statements": [
|
|
53720
|
+
"CREATE TABLE `enrichments` (\n `subject_type` text NOT NULL,\n `subject_id` integer NOT NULL,\n `source_hash` text NOT NULL,\n `provider` text NOT NULL,\n `model` text NOT NULL,\n `text` text NOT NULL,\n `tokens` integer NOT NULL,\n `created_at` integer NOT NULL,\n CONSTRAINT `enrichments_pk` PRIMARY KEY(`subject_type`, `subject_id`)\n);"
|
|
53721
|
+
]
|
|
53722
|
+
},
|
|
53723
|
+
{
|
|
53724
|
+
"name": "20261108104701_version-58-enrichments-deletes",
|
|
53725
|
+
"statements": [
|
|
53726
|
+
"CREATE TRIGGER enrichments_document_gone AFTER DELETE ON documents BEGIN\n DELETE FROM enrichments WHERE subject_type = 'document' AND subject_id = OLD.id;\nEND;",
|
|
53727
|
+
"CREATE TRIGGER enrichments_note_gone AFTER DELETE ON notes BEGIN\n DELETE FROM enrichments WHERE subject_type = 'note' AND subject_id = OLD.id;\nEND;",
|
|
53728
|
+
"CREATE TRIGGER enrichments_email_gone AFTER DELETE ON emails BEGIN\n DELETE FROM enrichments WHERE subject_type = 'email' AND subject_id = OLD.id;\n DELETE FROM chunks WHERE chunkable_type = 'email_enrichment' AND chunkable_id = OLD.id;\nEND;"
|
|
53729
|
+
]
|
|
53578
53730
|
}
|
|
53579
53731
|
];
|
|
53580
53732
|
|
|
53581
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53733
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
53582
53734
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
53583
53735
|
import { basename, dirname, join as join2, parse } from "node:path";
|
|
53584
53736
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -53811,7 +53963,7 @@ var rollBack = /* @__PURE__ */ __name((database, path) => {
|
|
|
53811
53963
|
return { ...result, foreignKeyViolations };
|
|
53812
53964
|
}, "rollBack");
|
|
53813
53965
|
|
|
53814
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53966
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
53815
53967
|
var V31_TABLES = [
|
|
53816
53968
|
"accounts",
|
|
53817
53969
|
"account_identities",
|
|
@@ -53929,7 +54081,9 @@ var MANIFEST = [
|
|
|
53929
54081
|
{ name: "20261107162448_version-56-relationship-links-history", version: 56, minCompatible: 56, tables: V56_TABLES },
|
|
53930
54082
|
{ name: "20261107163245_version-56-relationship-links-key", version: 56, minCompatible: 56, tables: V56_TABLES },
|
|
53931
54083
|
{ name: "20261108010753_version-57-business", version: 57, minCompatible: 56 },
|
|
53932
|
-
{ name: "20261108010754_version-57-business-rules", version: 57, minCompatible: 56 }
|
|
54084
|
+
{ name: "20261108010754_version-57-business-rules", version: 57, minCompatible: 56 },
|
|
54085
|
+
{ name: "20261108104659_version-58-enrichments", version: 58, minCompatible: 56 },
|
|
54086
|
+
{ name: "20261108104701_version-58-enrichments-deletes", version: 58, minCompatible: 56 }
|
|
53933
54087
|
];
|
|
53934
54088
|
var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated = GENERATED) => {
|
|
53935
54089
|
const migrations = [];
|
|
@@ -53965,7 +54119,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
53965
54119
|
return migrations;
|
|
53966
54120
|
}, "generatedMigrations");
|
|
53967
54121
|
|
|
53968
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
53969
54123
|
var MIGRATIONS = generatedMigrations();
|
|
53970
54124
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
53971
54125
|
version INTEGER PRIMARY KEY,
|
|
@@ -54044,7 +54198,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
54044
54198
|
}
|
|
54045
54199
|
}, "migrate");
|
|
54046
54200
|
|
|
54047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
54048
54202
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
54049
54203
|
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
54204
|
if (pending.get(0, 1) === void 0)
|
|
@@ -54066,7 +54220,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
54066
54220
|
}
|
|
54067
54221
|
}, "fillJoinKeys");
|
|
54068
54222
|
|
|
54069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
54070
54224
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
54071
54225
|
refuseOwnerStoreInTests(path);
|
|
54072
54226
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -54080,8 +54234,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
54080
54234
|
}, "openSqlite");
|
|
54081
54235
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
54082
54236
|
quietSqliteWarning();
|
|
54083
|
-
const { drizzle } = await import("./node-
|
|
54084
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
54237
|
+
const { drizzle } = await import("./node-O4XVOEGO.js");
|
|
54238
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-PC3K43U7.js");
|
|
54085
54239
|
const client = await nodeClient(path, { readOnly });
|
|
54086
54240
|
try {
|
|
54087
54241
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -54091,8 +54245,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
54091
54245
|
}
|
|
54092
54246
|
}, "openUnderNode");
|
|
54093
54247
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
54094
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
54095
|
-
const { drizzle } = await import("./bun-
|
|
54248
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-HYBE66QU.js");
|
|
54249
|
+
const { drizzle } = await import("./bun-AO76624P.js");
|
|
54096
54250
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
54097
54251
|
try {
|
|
54098
54252
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -54102,7 +54256,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
54102
54256
|
}
|
|
54103
54257
|
}, "openUnderBun");
|
|
54104
54258
|
|
|
54105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54259
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
54106
54260
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
54107
54261
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
54108
54262
|
try {
|
|
@@ -54170,7 +54324,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
54170
54324
|
});
|
|
54171
54325
|
}, "movePaymentFacts");
|
|
54172
54326
|
|
|
54173
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
54174
54328
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
54175
54329
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
54176
54330
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -54188,7 +54342,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
54188
54342
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
54189
54343
|
}, "assertReadCompatible");
|
|
54190
54344
|
|
|
54191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
54192
54346
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
54193
54347
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
54194
54348
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -54234,7 +54388,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
54234
54388
|
});
|
|
54235
54389
|
}, "moveSuggestedLinks");
|
|
54236
54390
|
|
|
54237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
54238
54392
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
54239
54393
|
var TEST_PROVIDER = "chat";
|
|
54240
54394
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -54255,7 +54409,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
54255
54409
|
}
|
|
54256
54410
|
}, "purgeTestAccounts");
|
|
54257
54411
|
|
|
54258
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
54259
54413
|
var BACKFILL_ON_OPEN = 5e3;
|
|
54260
54414
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
54261
54415
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -54353,7 +54507,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
54353
54507
|
}
|
|
54354
54508
|
}, "openStoreContext");
|
|
54355
54509
|
|
|
54356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
54357
54511
|
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
54512
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
54359
54513
|
const { database, now: now2 } = context;
|
|
@@ -54459,10 +54613,10 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54459
54613
|
};
|
|
54460
54614
|
}, "productsStoreOver");
|
|
54461
54615
|
|
|
54462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54616
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
54463
54617
|
import { createHash as createHash19 } from "node:crypto";
|
|
54464
54618
|
|
|
54465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54619
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
54466
54620
|
var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
54467
54621
|
var ref = text5(2048);
|
|
54468
54622
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -54532,7 +54686,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
54532
54686
|
}))
|
|
54533
54687
|
});
|
|
54534
54688
|
|
|
54535
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
54536
54690
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
54537
54691
|
var invalid10 = /* @__PURE__ */ __name((field4) => {
|
|
54538
54692
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -54636,7 +54790,7 @@ var validateProjectAnnotationsGraph = /* @__PURE__ */ __name((manifest, addition
|
|
|
54636
54790
|
invalid10("external.unused");
|
|
54637
54791
|
}, "validateProjectAnnotationsGraph");
|
|
54638
54792
|
|
|
54639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
54640
54794
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
54641
54795
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
54642
54796
|
var targetSchema = strictObject({
|
|
@@ -54742,7 +54896,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
54742
54896
|
};
|
|
54743
54897
|
}, "planBoundProjectAnnotations");
|
|
54744
54898
|
|
|
54745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
54746
54900
|
import { createHash as createHash20 } from "node:crypto";
|
|
54747
54901
|
var text6 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
54748
54902
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -54836,7 +54990,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
54836
54990
|
})).digest("hex");
|
|
54837
54991
|
}, "projectAnnotationSnapshotFingerprint");
|
|
54838
54992
|
|
|
54839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
54840
54994
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
54841
54995
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
54842
54996
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -54853,7 +55007,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
54853
55007
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
54854
55008
|
}, "projectAnnotationRequest");
|
|
54855
55009
|
|
|
54856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55010
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
54857
55011
|
var SnapshotBudget = class {
|
|
54858
55012
|
static {
|
|
54859
55013
|
__name(this, "SnapshotBudget");
|
|
@@ -54879,13 +55033,13 @@ var SnapshotBudget = class {
|
|
|
54879
55033
|
}
|
|
54880
55034
|
};
|
|
54881
55035
|
|
|
54882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
54883
55037
|
import { createHash as createHash22 } from "node:crypto";
|
|
54884
55038
|
|
|
54885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
54886
55040
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
54887
55041
|
|
|
54888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
54889
55043
|
import { createHash as createHash21 } from "node:crypto";
|
|
54890
55044
|
var invalid12 = /* @__PURE__ */ __name(() => {
|
|
54891
55045
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -55028,7 +55182,7 @@ var ProjectSnapshotSources = class {
|
|
|
55028
55182
|
}
|
|
55029
55183
|
};
|
|
55030
55184
|
|
|
55031
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55185
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
55032
55186
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
55033
55187
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
55034
55188
|
}, "unsupported");
|
|
@@ -55206,7 +55360,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
55206
55360
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
55207
55361
|
}), "projectAnnotationSnapshot");
|
|
55208
55362
|
|
|
55209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
55210
55364
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
55211
55365
|
const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
55212
55366
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -55268,7 +55422,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
55268
55422
|
};
|
|
55269
55423
|
}), "previewAnnotationSnapshot");
|
|
55270
55424
|
|
|
55271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
55272
55426
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
55273
55427
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
55274
55428
|
if (link3.kind === "evidence" && to)
|
|
@@ -55335,7 +55489,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
55335
55489
|
return mappings;
|
|
55336
55490
|
}, "restoreAnnotationRecords");
|
|
55337
55491
|
|
|
55338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
55339
55493
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
55340
55494
|
async preview(request) {
|
|
55341
55495
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -55365,7 +55519,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
55365
55519
|
}
|
|
55366
55520
|
}), "projectAnnotationStoreOver");
|
|
55367
55521
|
|
|
55368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
55369
55523
|
var IMPORTER = { bot: "import" };
|
|
55370
55524
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
55371
55525
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -55410,7 +55564,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
55410
55564
|
};
|
|
55411
55565
|
}), "moneyLinesOf");
|
|
55412
55566
|
|
|
55413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
55414
55568
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
55415
55569
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
55416
55570
|
const sql2 = /* @__PURE__ */ __name((text7) => database.prepare(text7), "sql");
|
|
@@ -55481,7 +55635,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
55481
55635
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
55482
55636
|
}, "recordRelationsOver");
|
|
55483
55637
|
|
|
55484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55638
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
55485
55639
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
55486
55640
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
55487
55641
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -55535,7 +55689,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
55535
55689
|
return { pointedAt, remap };
|
|
55536
55690
|
}, "recordRemapOver");
|
|
55537
55691
|
|
|
55538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
55539
55693
|
var runs = 0;
|
|
55540
55694
|
var PAGE = 500;
|
|
55541
55695
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -55695,7 +55849,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
55695
55849
|
return pointerOf("records", index2, "fields", key2);
|
|
55696
55850
|
}, "waitingPointer");
|
|
55697
55851
|
|
|
55698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
55699
55853
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
55700
55854
|
var SCHEME2 = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
55701
55855
|
var ORG_EMAIL = "org-email";
|
|
@@ -55883,7 +56037,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
55883
56037
|
]);
|
|
55884
56038
|
}, "renameMade");
|
|
55885
56039
|
|
|
55886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56040
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
55887
56041
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
55888
56042
|
name: given(fields4, "name"),
|
|
55889
56043
|
unit: given(fields4, "unit"),
|
|
@@ -56006,7 +56160,7 @@ var DIRECT_PROJECTORS = {
|
|
|
56006
56160
|
lead: dealProjector("lead")
|
|
56007
56161
|
};
|
|
56008
56162
|
|
|
56009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
56010
56164
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
56011
56165
|
const importer = authorActor(context, IMPORTER).actor;
|
|
56012
56166
|
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 +56370,7 @@ var MONEY_PROJECTORS = {
|
|
|
56216
56370
|
}
|
|
56217
56371
|
};
|
|
56218
56372
|
|
|
56219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
56220
56374
|
var CALLS_CALENDAR = "calls";
|
|
56221
56375
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
56222
56376
|
if (!isImportedProvider(source2.provider))
|
|
@@ -56391,7 +56545,7 @@ var PHONE_PROJECTORS = {
|
|
|
56391
56545
|
}
|
|
56392
56546
|
};
|
|
56393
56547
|
|
|
56394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
56395
56549
|
var RECORD_PROJECTORS = {
|
|
56396
56550
|
...MONEY_PROJECTORS,
|
|
56397
56551
|
...DIRECT_PROJECTORS,
|
|
@@ -56401,7 +56555,7 @@ var RECORD_PROJECTORS = {
|
|
|
56401
56555
|
project: null
|
|
56402
56556
|
};
|
|
56403
56557
|
|
|
56404
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
56405
56559
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
56406
56560
|
const sql2 = /* @__PURE__ */ __name((text7) => database.prepare(text7), "sql");
|
|
56407
56561
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -56463,7 +56617,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
56463
56617
|
return { settle, checkShares };
|
|
56464
56618
|
}, "recordSettlingOver");
|
|
56465
56619
|
|
|
56466
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
56467
56621
|
import { createHash as createHash23 } from "node:crypto";
|
|
56468
56622
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
56469
56623
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -56479,7 +56633,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
56479
56633
|
return { stamp, untouched };
|
|
56480
56634
|
}, "importStampsOver");
|
|
56481
56635
|
|
|
56482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
56483
56637
|
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
56638
|
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
56639
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -56710,7 +56864,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56710
56864
|
};
|
|
56711
56865
|
}, "subscriptionsStoreOver");
|
|
56712
56866
|
|
|
56713
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
56714
56868
|
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
56869
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
56716
56870
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -56832,7 +56986,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56832
56986
|
};
|
|
56833
56987
|
}, "walletsStoreOver");
|
|
56834
56988
|
|
|
56835
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
56836
56990
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
56837
56991
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
56838
56992
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -57089,7 +57243,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
57089
57243
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
57090
57244
|
}, "recordWritesOver");
|
|
57091
57245
|
|
|
57092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57246
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
57093
57247
|
var LIMIT = 1e3;
|
|
57094
57248
|
var iso15 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
57095
57249
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -57294,7 +57448,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57294
57448
|
};
|
|
57295
57449
|
}, "recordStoreOver");
|
|
57296
57450
|
|
|
57297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
57298
57452
|
var refusalOf = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
57299
57453
|
var wrapped = /* @__PURE__ */ new WeakMap();
|
|
57300
57454
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -57329,7 +57483,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
57329
57483
|
return proxy;
|
|
57330
57484
|
}, "storeErrors");
|
|
57331
57485
|
|
|
57332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
57333
57487
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
57334
57488
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
57335
57489
|
let merged = { from: from2, to };
|
|
@@ -57342,7 +57496,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
57342
57496
|
}, "markRange");
|
|
57343
57497
|
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
57498
|
|
|
57345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
57346
57500
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
57347
57501
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
57348
57502
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -57363,7 +57517,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
57363
57517
|
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
57518
|
}, "setTaskAnalysisMark");
|
|
57365
57519
|
|
|
57366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
57367
57521
|
var keyOf5 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
57368
57522
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
57369
57523
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf5(account));
|
|
@@ -57373,7 +57527,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
57373
57527
|
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
57528
|
}, "setTaskRulesStop");
|
|
57375
57529
|
|
|
57376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
57377
57531
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
57378
57532
|
const { database } = context;
|
|
57379
57533
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -57432,7 +57586,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57432
57586
|
};
|
|
57433
57587
|
}, "syncStoreOver");
|
|
57434
57588
|
|
|
57435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
57436
57590
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
57437
57591
|
const { database } = context;
|
|
57438
57592
|
return {
|
|
@@ -57454,7 +57608,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57454
57608
|
};
|
|
57455
57609
|
}, "tagsStoreOver");
|
|
57456
57610
|
|
|
57457
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
57458
57612
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
57459
57613
|
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
57614
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -57581,7 +57735,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
57581
57735
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
57582
57736
|
}, "savePictureChunks");
|
|
57583
57737
|
|
|
57584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57738
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
57585
57739
|
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
57740
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
57587
57741
|
FROM messages m
|
|
@@ -57670,7 +57824,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
57670
57824
|
return plain2(best(found2));
|
|
57671
57825
|
}, "nearestMessages");
|
|
57672
57826
|
|
|
57673
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57827
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
57674
57828
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
57675
57829
|
const { database } = context;
|
|
57676
57830
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -57929,7 +58083,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
57929
58083
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
57930
58084
|
}), "vectorsStoreOver");
|
|
57931
58085
|
|
|
57932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58086
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
57933
58087
|
import { existsSync as existsSync2, readFileSync as readFileSync4 } from "node:fs";
|
|
57934
58088
|
import { dirname as dirname3, join as join3 } from "node:path";
|
|
57935
58089
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -58017,10 +58171,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
58017
58171
|
}
|
|
58018
58172
|
}, "lastBackup");
|
|
58019
58173
|
|
|
58020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
58021
58175
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
58022
58176
|
|
|
58023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58177
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
58024
58178
|
var KEY4 = "ownerLanguages";
|
|
58025
58179
|
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
58180
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -58050,7 +58204,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
58050
58204
|
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
58205
|
}, "saveOwnerLanguages");
|
|
58052
58206
|
|
|
58053
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
58054
58208
|
var COUNTED_TABLES = [
|
|
58055
58209
|
"accounts",
|
|
58056
58210
|
"chats",
|
|
@@ -58135,7 +58289,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
58135
58289
|
};
|
|
58136
58290
|
}, "storeContents");
|
|
58137
58291
|
|
|
58138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.612.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_2b92b8a5a9536cd50d24d35c3ce22b6a/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
58139
58293
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
58140
58294
|
const context = await openStoreContext(options);
|
|
58141
58295
|
try {
|
|
@@ -58210,7 +58364,11 @@ var storeOver = /* @__PURE__ */ __name((context) => {
|
|
|
58210
58364
|
const proposedActions2 = once3(() => proposedActionsStoreOver(context));
|
|
58211
58365
|
const agentActions2 = once3(() => agentActionsStoreOver(context, pruneLogsWhenDue));
|
|
58212
58366
|
const meetings2 = once3(() => meetingStoreOver(context));
|
|
58367
|
+
const enrichment = once3(() => enrichmentsOver(context));
|
|
58213
58368
|
const store = {
|
|
58369
|
+
get enrichment() {
|
|
58370
|
+
return enrichment();
|
|
58371
|
+
},
|
|
58214
58372
|
get projectAnnotations() {
|
|
58215
58373
|
return projectAnnotations();
|
|
58216
58374
|
},
|
|
@@ -58442,6 +58600,7 @@ export {
|
|
|
58442
58600
|
cutChunks,
|
|
58443
58601
|
amountsOf,
|
|
58444
58602
|
dueDayOf,
|
|
58603
|
+
ENRICHMENT_SUBJECTS,
|
|
58445
58604
|
queryFilter,
|
|
58446
58605
|
CORPORA,
|
|
58447
58606
|
fillTrigrams,
|