@wirecat/cli-memo 0.131.61 → 0.131.62
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-WPBMSWJF.js → all-profiles-L6EBORCV.js} +5 -5
- package/dist/bundle/{anthropic-FZRVISSX.js → anthropic-42PADP4V.js} +2 -2
- package/dist/bundle/{app-server-QGIZPU4R.js → app-server-QBJG7OGQ.js} +35 -35
- package/dist/bundle/auto-Z4MEU5OY.js +85 -0
- package/dist/bundle/{bun-AO76624P.js → bun-NYSNYHAD.js} +2 -2
- package/dist/bundle/{bun-sqlite-HYBE66QU.js → bun-sqlite-B46U7KI7.js} +2 -2
- package/dist/bundle/{chunk-233N77WN.js → chunk-2UCLF4AO.js} +273 -272
- package/dist/bundle/{chunk-CTRVHHBK.js → chunk-2VDRVJCR.js} +5 -5
- package/dist/bundle/{chunk-YRHLPKTG.js → chunk-2XVXF4RW.js} +2 -2
- package/dist/bundle/{chunk-IZZU4NS6.js → chunk-347UBASY.js} +3 -3
- package/dist/bundle/{chunk-RRHSJ7CR.js → chunk-37E74SKW.js} +62 -62
- package/dist/bundle/{chunk-7DPHHUSZ.js → chunk-3ZXWLFUG.js} +21 -21
- package/dist/bundle/{chunk-WFDGEREJ.js → chunk-4GTZSCUE.js} +2 -2
- package/dist/bundle/{chunk-OFERGS4J.js → chunk-4SUROBD4.js} +2 -2
- package/dist/bundle/{chunk-5ZVWDMDT.js → chunk-5D7BPC33.js} +1 -1
- package/dist/bundle/{chunk-RRPUM4RS.js → chunk-6OZ2WI7Y.js} +2 -2
- package/dist/bundle/{chunk-B4VCZOLF.js → chunk-724DPWN6.js} +1 -1
- package/dist/bundle/{chunk-4WKZ3UIZ.js → chunk-A524HPDV.js} +1 -1
- package/dist/bundle/{chunk-2Q55K5HY.js → chunk-ACG5QN77.js} +2 -2
- package/dist/bundle/{chunk-WMRR2SNG.js → chunk-B3SERZMP.js} +1 -1
- package/dist/bundle/{chunk-SSX6S3EG.js → chunk-DKO7WEXJ.js} +1 -1
- package/dist/bundle/{chunk-YVCNJKDA.js → chunk-E5JQFEIQ.js} +42 -42
- package/dist/bundle/{chunk-LIW42UCX.js → chunk-EGI6JHIA.js} +9 -9
- package/dist/bundle/{chunk-2UXFM5GE.js → chunk-FC5PK6M6.js} +12 -12
- package/dist/bundle/{chunk-6YK3RZZJ.js → chunk-FD3OQYFL.js} +4 -4
- package/dist/bundle/{chunk-HLTGPK6P.js → chunk-FG4Q6T72.js} +4 -4
- package/dist/bundle/{chunk-ETYD55QD.js → chunk-FH4P5UQA.js} +3 -3
- package/dist/bundle/{chunk-7CKXTTZG.js → chunk-FWRBJAQZ.js} +2 -2
- package/dist/bundle/{chunk-F6E7DSJO.js → chunk-H3COKFXP.js} +98 -32
- package/dist/bundle/{chunk-6NHJ4TTJ.js → chunk-HGNWJJDT.js} +336 -335
- package/dist/bundle/{chunk-OQSOQYSQ.js → chunk-HKC7GDJD.js} +4 -4
- package/dist/bundle/{chunk-3FDJSMLJ.js → chunk-HMJ3D7XE.js} +5 -4
- package/dist/bundle/{chunk-XYFYZP2N.js → chunk-I5L7MLZ6.js} +1 -1
- package/dist/bundle/{chunk-3FPF5DBU.js → chunk-K5VF47E2.js} +5 -5
- package/dist/bundle/{chunk-KZRBIHQL.js → chunk-KREN56SX.js} +5 -5
- package/dist/bundle/{chunk-K6FQVROA.js → chunk-LK6D26RK.js} +21 -21
- package/dist/bundle/{chunk-6AEQACVV.js → chunk-MWAXS4BX.js} +7 -7
- package/dist/bundle/{chunk-D4PK5OXW.js → chunk-NZJUMLTD.js} +1 -1
- package/dist/bundle/{chunk-UTUUXAPS.js → chunk-O2NQCWRM.js} +28 -28
- package/dist/bundle/{chunk-35OBIX5A.js → chunk-OXBETHGN.js} +8 -8
- package/dist/bundle/{chunk-OIHKFGHK.js → chunk-PKUBC2ME.js} +3 -3
- package/dist/bundle/{chunk-7ETYPYIN.js → chunk-Q3VEUHC7.js} +12 -12
- package/dist/bundle/{chunk-RT476OFI.js → chunk-RGZUDHAQ.js} +7 -7
- package/dist/bundle/{chunk-UTSMQ7KI.js → chunk-RLX5SC2X.js} +1 -1
- package/dist/bundle/{chunk-PSYZ33UQ.js → chunk-RP6VV35S.js} +1 -1
- package/dist/bundle/{chunk-37ILRM2G.js → chunk-RTLQHLHG.js} +4 -4
- package/dist/bundle/{chunk-4HLYKLGJ.js → chunk-SIBQ34LX.js} +1 -1
- package/dist/bundle/{chunk-JAJSTFBB.js → chunk-SIJA2UYC.js} +6 -6
- package/dist/bundle/{chunk-XT7EJLA4.js → chunk-SJ36WSEI.js} +4 -4
- package/dist/bundle/{chunk-MQCBJGXA.js → chunk-SJ55SMBE.js} +9 -9
- package/dist/bundle/{chunk-I6LNI45S.js → chunk-SOQGV3ZM.js} +5 -5
- package/dist/bundle/{chunk-5SD4CV2D.js → chunk-TBSWOVM3.js} +571 -293
- package/dist/bundle/{chunk-STXMSLU6.js → chunk-TKPIS4G2.js} +1 -1
- package/dist/bundle/{chunk-XU7UER3B.js → chunk-TSKGEK2S.js} +10 -10
- package/dist/bundle/{chunk-2VMZLQ5K.js → chunk-V7TJSYFK.js} +2 -2
- package/dist/bundle/{chunk-KGZM5WYK.js → chunk-VTKLHYCZ.js} +4 -4
- package/dist/bundle/{chunk-7E46JN6V.js → chunk-VX4HNQLN.js} +2 -2
- package/dist/bundle/{chunk-OEPBIWHI.js → chunk-WDWKG7FJ.js} +150 -150
- package/dist/bundle/{chunk-OWVHNTY6.js → chunk-WDZOEBTE.js} +6 -6
- package/dist/bundle/{chunk-7NKBX7FC.js → chunk-XVREIQ2N.js} +2 -2
- package/dist/bundle/{chunk-R7ZD7TNI.js → chunk-XX37LSNV.js} +1 -1
- package/dist/bundle/{chunk-Y264FW55.js → chunk-ZUQXDJ7A.js} +1 -1
- package/dist/bundle/{command-contract-4TGN6GSP.js → command-contract-SIXWLKAS.js} +11 -11
- package/dist/bundle/{decode-S3PPQHID.js → decode-2Z4GCIGA.js} +2 -2
- package/dist/bundle/{echarts-AH6U7X2S.js → echarts-JADCSUD7.js} +2 -2
- package/dist/bundle/{embed-4NSZECMB.js → embed-ZLEPINEK.js} +3 -3
- package/dist/bundle/{embedder-EGRA7YEY.js → embedder-E3DHPZCK.js} +6 -6
- package/dist/bundle/{entry-O3V72WZP.js → entry-SFLEGFSN.js} +4 -4
- package/dist/bundle/failure-B33C3BFU.js +65 -0
- package/dist/bundle/{first-run-S7RRDIGX.js → first-run-ZKDGFY6P.js} +5 -5
- package/dist/bundle/{first-screen-YKJAQUVE.js → first-screen-IQEU7XF2.js} +12 -12
- package/dist/bundle/{instructions-ETUUZKBM.js → instructions-ECXOBMWS.js} +1 -1
- package/dist/bundle/{mcp-J3K7RC5W.js → mcp-Y4XMDC5Q.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-O4XVOEGO.js → node-A6363DJ4.js} +2 -2
- package/dist/bundle/{node-sqlite-PC3K43U7.js → node-sqlite-FA2P77PW.js} +3 -3
- package/dist/bundle/{oauth-MBJUEG2Z.js → oauth-DBGARGR7.js} +4 -4
- package/dist/bundle/{open-5FAYV6JM.js → open-5YYG2VWH.js} +2 -2
- package/dist/bundle/{openai-57CRSGLH.js → openai-BPVP7TZ7.js} +7 -7
- package/dist/bundle/{process-NAW4COYH.js → process-DGPZRHQA.js} +1 -1
- package/dist/bundle/{program-CFJAGFYD.js → program-DSQWICNB.js} +584 -281
- package/dist/bundle/{prompt-FT2MMVS7.js → prompt-NTAZWPWA.js} +2 -2
- package/dist/bundle/{recognize-PEYPOI3Q.js → recognize-OGEP5VD3.js} +1 -1
- package/dist/bundle/{remote-FQAXACFW.js → remote-DER2PFH6.js} +4 -4
- package/dist/bundle/{rerank-4KEB4X6T.js → rerank-PB5ACFHS.js} +4 -4
- package/dist/bundle/{serve-LCTIHO37.js → serve-KNEY4BXK.js} +6 -6
- package/dist/bundle/server-IQILK5YP.js +61 -0
- package/dist/bundle/server-NKI7SVK5.js +48 -0
- package/dist/bundle/{server-XQLRMM73.js → server-ZHFC3PIP.js} +55 -52
- package/dist/bundle/{state-YF4M4RHC.js → state-JMCWHHZM.js} +3 -3
- package/dist/bundle/{store-EQEMYMCC.js → store-6H4FPFTX.js} +9 -9
- package/dist/bundle/store-maintenance-command-IFVWSQMJ.js +47 -0
- package/dist/bundle/update-LR5BVLBD.js +68 -0
- package/dist/config-issues.d.ts +4 -1
- package/dist/config-issues.d.ts.map +1 -1
- package/dist/config-issues.js +6 -2
- package/dist/config-issues.js.map +1 -1
- package/dist/digest/command.d.ts.map +1 -1
- package/dist/digest/command.js +11 -7
- package/dist/digest/command.js.map +1 -1
- package/dist/digest/digest.d.ts +29 -4
- package/dist/digest/digest.d.ts.map +1 -1
- package/dist/digest/digest.js +124 -39
- package/dist/digest/digest.js.map +1 -1
- package/dist/digest/sync-health.d.ts +51 -0
- package/dist/digest/sync-health.d.ts.map +1 -0
- package/dist/digest/sync-health.js +116 -0
- package/dist/digest/sync-health.js.map +1 -0
- package/dist/digest/tasks.d.ts +38 -0
- package/dist/digest/tasks.d.ts.map +1 -0
- package/dist/digest/tasks.js +108 -0
- package/dist/digest/tasks.js.map +1 -0
- package/dist/digest/text.d.ts.map +1 -1
- package/dist/digest/text.js +9 -2
- package/dist/digest/text.js.map +1 -1
- package/dist/knowledge/messenger-sync.d.ts +5 -0
- package/dist/knowledge/messenger-sync.d.ts.map +1 -1
- package/dist/knowledge/messenger-sync.js +12 -9
- package/dist/knowledge/messenger-sync.js.map +1 -1
- package/dist/mcp/catalogue.d.ts.map +1 -1
- package/dist/mcp/catalogue.js +5 -3
- package/dist/mcp/catalogue.js.map +1 -1
- package/dist/mcp/granted.d.ts +13 -0
- package/dist/mcp/granted.d.ts.map +1 -0
- package/dist/mcp/granted.js +19 -0
- package/dist/mcp/granted.js.map +1 -0
- package/dist/search/command.d.ts.map +1 -1
- package/dist/search/command.js +10 -3
- package/dist/search/command.js.map +1 -1
- package/dist/search/lane-gates.d.ts +30 -0
- package/dist/search/lane-gates.d.ts.map +1 -0
- package/dist/search/lane-gates.js +59 -0
- package/dist/search/lane-gates.js.map +1 -0
- package/dist/search/search.d.ts +3 -2
- package/dist/search/search.d.ts.map +1 -1
- package/dist/search/search.js +23 -2
- package/dist/search/search.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/skills/morning-digest/SKILL.md +24 -10
- package/dist/bundle/auto-5VPCO4DD.js +0 -85
- package/dist/bundle/failure-CFGWWTV5.js +0 -65
- package/dist/bundle/server-AQTWRRAJ.js +0 -61
- package/dist/bundle/server-JIFODLCU.js +0 -48
- package/dist/bundle/store-maintenance-command-7IC3LTYY.js +0 -47
- package/dist/bundle/update-T237KLFA.js +0 -68
- /package/dist/bundle/{chunk-GFNWVGLD.js → chunk-C3XNJQD7.js} +0 -0
|
@@ -136,12 +136,12 @@ import {
|
|
|
136
136
|
walkQuery,
|
|
137
137
|
walletLine,
|
|
138
138
|
zonedMoment
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-37E74SKW.js";
|
|
140
140
|
import {
|
|
141
141
|
holdsCredential,
|
|
142
142
|
secretNamed,
|
|
143
143
|
sqliteCode
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-2XVXF4RW.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-RGZUDHAQ.js";
|
|
158
158
|
import {
|
|
159
159
|
DEFAULT_TASK_CATEGORIES,
|
|
160
160
|
sharedConfigPath,
|
|
161
161
|
storedTaskCategories,
|
|
162
162
|
taskCategoriesReader
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-HKC7GDJD.js";
|
|
164
164
|
import {
|
|
165
165
|
refuseOwnerStoreInTests,
|
|
166
166
|
storePath
|
|
167
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-NZJUMLTD.js";
|
|
168
168
|
import {
|
|
169
169
|
quietSqliteWarning,
|
|
170
170
|
storeCapable
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-SOQGV3ZM.js";
|
|
172
172
|
import {
|
|
173
173
|
PRAGMAS,
|
|
174
174
|
TIME_LIMIT_FUNCTION,
|
|
175
175
|
TimeLimitReached,
|
|
176
176
|
isQueryOnly
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-TKPIS4G2.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-5D7BPC33.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.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/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.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/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.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/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.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/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.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/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.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/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.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/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.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/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.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/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.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
11342
11342
|
var ENTITY_TABLES = {
|
|
11343
11343
|
...RECORD_TABLES,
|
|
11344
11344
|
account: "accounts",
|
|
@@ -11377,14 +11377,14 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
11377
11377
|
return { table, pointer, type, count, known: known2 };
|
|
11378
11378
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
11379
11379
|
|
|
11380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11380
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/source-review.js
|
|
11381
11381
|
var SOURCE_REVIEW_KIND = "memory_source_review";
|
|
11382
11382
|
var SOURCE_REVIEW_CAUSES = ["changed", "outdated", "deleted", "contradicted"];
|
|
11383
11383
|
var ERASED_TEXT = "[source erased]";
|
|
11384
11384
|
var severity = /* @__PURE__ */ __name((cause) => SOURCE_REVIEW_CAUSES.indexOf(cause), "severity");
|
|
11385
11385
|
var graver = /* @__PURE__ */ __name((a, b) => severity(b) > severity(a) ? b : a, "graver");
|
|
11386
11386
|
|
|
11387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
11388
11388
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
11389
11389
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
11390
11390
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -11441,7 +11441,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
11441
11441
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
11442
11442
|
}, "proposedBySql");
|
|
11443
11443
|
|
|
11444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
|
|
11445
11445
|
var TABLES = { memory: "memories", fact: "facts" };
|
|
11446
11446
|
var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
|
|
11447
11447
|
var KEPT = 20;
|
|
@@ -11536,7 +11536,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
|
|
|
11536
11536
|
return scrubbed;
|
|
11537
11537
|
}, "scrubSourceReviews");
|
|
11538
11538
|
|
|
11539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11539
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
11540
11540
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
11541
11541
|
var REFERABLE = {
|
|
11542
11542
|
...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
|
|
@@ -11696,7 +11696,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
11696
11696
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
11697
11697
|
}, "taskIdOf");
|
|
11698
11698
|
|
|
11699
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11699
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
|
|
11700
11700
|
var QUOTE_LIMIT = 500;
|
|
11701
11701
|
var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
|
|
11702
11702
|
var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
|
|
@@ -11974,7 +11974,7 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at) => {
|
|
|
11974
11974
|
database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
|
|
11975
11975
|
}, "deleteDocumentRow");
|
|
11976
11976
|
|
|
11977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
11978
11978
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
11979
11979
|
id: integer("id").primaryKey(),
|
|
11980
11980
|
name: text("name").notNull().unique(),
|
|
@@ -11983,7 +11983,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
11983
11983
|
updatedAt: integer("updated_at").notNull()
|
|
11984
11984
|
});
|
|
11985
11985
|
|
|
11986
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11986
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
|
|
11987
11987
|
var linkRevisions = sqliteTable("link_revisions", {
|
|
11988
11988
|
id: integer("id").primaryKey(),
|
|
11989
11989
|
linkId: integer("link_id").notNull(),
|
|
@@ -11995,7 +11995,7 @@ var linkRevisions = sqliteTable("link_revisions", {
|
|
|
11995
11995
|
createdAt: integer("created_at").notNull()
|
|
11996
11996
|
}, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
|
|
11997
11997
|
|
|
11998
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
11999
11999
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
12000
12000
|
sourceKey: text("source_key").notNull(),
|
|
12001
12001
|
collection: text("collection").notNull(),
|
|
@@ -12005,13 +12005,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
12005
12005
|
createdAt: integer("created_at").notNull()
|
|
12006
12006
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
12007
12007
|
|
|
12008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
12009
12009
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
12010
12010
|
id: integer("id").notNull(),
|
|
12011
12011
|
indexableType: text("indexable_type").notNull()
|
|
12012
12012
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
12013
12013
|
|
|
12014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
12015
12015
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
12016
12016
|
id: integer("id").primaryKey(),
|
|
12017
12017
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -12031,7 +12031,7 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
12031
12031
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
12032
12032
|
]);
|
|
12033
12033
|
|
|
12034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
|
|
12035
12035
|
var enrichments = sqliteTable("enrichments", {
|
|
12036
12036
|
subjectType: text("subject_type").notNull(),
|
|
12037
12037
|
subjectId: integer("subject_id").notNull(),
|
|
@@ -12043,7 +12043,7 @@ var enrichments = sqliteTable("enrichments", {
|
|
|
12043
12043
|
createdAt: integer("created_at").notNull()
|
|
12044
12044
|
}, (table) => [primaryKey({ columns: [table.subjectType, table.subjectId] })]);
|
|
12045
12045
|
|
|
12046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
|
|
12047
12047
|
var links = sqliteTable("links", {
|
|
12048
12048
|
id: integer("id").primaryKey(),
|
|
12049
12049
|
fromType: text("from_type").notNull(),
|
|
@@ -12074,7 +12074,7 @@ var links = sqliteTable("links", {
|
|
|
12074
12074
|
index("links_by_to_type_to_id").on(table.toType, table.toId)
|
|
12075
12075
|
]);
|
|
12076
12076
|
|
|
12077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
12078
12078
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
12079
12079
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
12080
12080
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -12100,7 +12100,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
12100
12100
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
12101
12101
|
]);
|
|
12102
12102
|
|
|
12103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
12104
12104
|
var accounts = sqliteTable("accounts", {
|
|
12105
12105
|
id: integer("id").primaryKey(),
|
|
12106
12106
|
provider: text("provider").notNull(),
|
|
@@ -14096,10 +14096,10 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
14096
14096
|
at: integer("at").notNull()
|
|
14097
14097
|
});
|
|
14098
14098
|
|
|
14099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
14100
14100
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
14101
14101
|
|
|
14102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
14103
14103
|
var ARMS = [
|
|
14104
14104
|
[
|
|
14105
14105
|
"message",
|
|
@@ -14227,7 +14227,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
14227
14227
|
return recomputed;
|
|
14228
14228
|
}, "drainInvolvementQueue");
|
|
14229
14229
|
|
|
14230
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
14231
14231
|
import { domainToUnicode } from "node:url";
|
|
14232
14232
|
|
|
14233
14233
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -24249,7 +24249,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
24249
24249
|
}, "oa");
|
|
24250
24250
|
var na = { parse: O, get: aa, isValid: oa };
|
|
24251
24251
|
|
|
24252
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
24253
24253
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
24254
24254
|
var ID = /^[\w-]{10,}$/;
|
|
24255
24255
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -24291,7 +24291,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text7) => [...text7.matchAll(L
|
|
|
24291
24291
|
return { url, documentId: googleDocumentId(url) };
|
|
24292
24292
|
}), "googleDocumentLinks");
|
|
24293
24293
|
|
|
24294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24294
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
24295
24295
|
var PHONE_PLANS = [
|
|
24296
24296
|
{
|
|
24297
24297
|
country: "us",
|
|
@@ -24671,7 +24671,7 @@ var PHONE_PLANS = [
|
|
|
24671
24671
|
}
|
|
24672
24672
|
];
|
|
24673
24673
|
|
|
24674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24674
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
24675
24675
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
24676
24676
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
24677
24677
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -24712,7 +24712,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
24712
24712
|
return void 0;
|
|
24713
24713
|
}, "nationalPhone");
|
|
24714
24714
|
|
|
24715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
24716
24716
|
var BEFORE = [
|
|
24717
24717
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
24718
24718
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -24972,7 +24972,7 @@ var findPlaces = /* @__PURE__ */ __name((text7) => {
|
|
|
24972
24972
|
return found2.sort((a, b) => a.start - b.start);
|
|
24973
24973
|
}, "findPlaces");
|
|
24974
24974
|
|
|
24975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
24976
24976
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
24977
24977
|
var MENTION_VERSIONS = {
|
|
24978
24978
|
phone: 1,
|
|
@@ -25162,7 +25162,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
25162
25162
|
};
|
|
25163
25163
|
}, "typedPhone");
|
|
25164
25164
|
|
|
25165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
25166
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";
|
|
25167
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";
|
|
25168
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";
|
|
@@ -25170,7 +25170,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
25170
25170
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
25171
25171
|
var NAME_WORDS = WORDS.split(" ");
|
|
25172
25172
|
|
|
25173
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25173
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
25174
25174
|
var LATIN_TO_CYRILLIC = {
|
|
25175
25175
|
shch: "\u0449",
|
|
25176
25176
|
sch: "\u0449",
|
|
@@ -25378,7 +25378,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text7, stem, taken) => {
|
|
|
25378
25378
|
return found2;
|
|
25379
25379
|
}, "findUnknownNames");
|
|
25380
25380
|
|
|
25381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
25382
25382
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
25383
25383
|
"webpage",
|
|
25384
25384
|
"share",
|
|
@@ -25418,7 +25418,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
|
|
|
25418
25418
|
});
|
|
25419
25419
|
}, "matchDownloads");
|
|
25420
25420
|
|
|
25421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25421
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
25422
25422
|
var QUERY_VERSION = 1;
|
|
25423
25423
|
var QUERY_LIMITS2 = {
|
|
25424
25424
|
...QUERY_LIMITS,
|
|
@@ -25454,7 +25454,7 @@ function exhausted(budget) {
|
|
|
25454
25454
|
}
|
|
25455
25455
|
__name(exhausted, "exhausted");
|
|
25456
25456
|
|
|
25457
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
25458
25458
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
25459
25459
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
25460
25460
|
kind: "char",
|
|
@@ -25854,7 +25854,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
25854
25854
|
return out;
|
|
25855
25855
|
}, "foldRegex");
|
|
25856
25856
|
|
|
25857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25857
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
25858
25858
|
var PRESET_VERSION = 1;
|
|
25859
25859
|
var PRESETS = {
|
|
25860
25860
|
password: {
|
|
@@ -25908,7 +25908,7 @@ var PRESETS = {
|
|
|
25908
25908
|
}
|
|
25909
25909
|
};
|
|
25910
25910
|
|
|
25911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
25912
25912
|
var FIELD_VERSION = 2;
|
|
25913
25913
|
var UNITS = {
|
|
25914
25914
|
"": 1,
|
|
@@ -26369,12 +26369,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
|
|
|
26369
26369
|
return validateFields(parsed3.output);
|
|
26370
26370
|
}, "validateAst");
|
|
26371
26371
|
|
|
26372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
26373
26373
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
26374
26374
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
26375
26375
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
26376
26376
|
|
|
26377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
26378
26378
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
26379
26379
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
26380
26380
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -26398,7 +26398,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
26398
26398
|
};
|
|
26399
26399
|
}, "linkMatch");
|
|
26400
26400
|
|
|
26401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
26402
26402
|
var SETTING = "phoneCountries";
|
|
26403
26403
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
26404
26404
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -26429,7 +26429,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
26429
26429
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
26430
26430
|
}, "valueMatch");
|
|
26431
26431
|
|
|
26432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
26433
26433
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
26434
26434
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
26435
26435
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -26457,7 +26457,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
26457
26457
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
26458
26458
|
}, "vocabularySimilarity");
|
|
26459
26459
|
|
|
26460
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
26461
26461
|
import { createHash } from "node:crypto";
|
|
26462
26462
|
var folded3 = /* @__PURE__ */ __name((name) => {
|
|
26463
26463
|
try {
|
|
@@ -26523,7 +26523,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind4, by, options
|
|
|
26523
26523
|
});
|
|
26524
26524
|
}, "guardTagCreation");
|
|
26525
26525
|
|
|
26526
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
26527
26527
|
var invalid2 = /* @__PURE__ */ __name((message3) => {
|
|
26528
26528
|
throw new CliError("validation_error", message3);
|
|
26529
26529
|
}, "invalid");
|
|
@@ -26600,7 +26600,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
26600
26600
|
};
|
|
26601
26601
|
}, "createTagRedirectIndex");
|
|
26602
26602
|
|
|
26603
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
26604
26604
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
26605
26605
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
26606
26606
|
if (!row2)
|
|
@@ -26628,7 +26628,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
26628
26628
|
return snapshot2;
|
|
26629
26629
|
}, "tagRedirectSnapshot");
|
|
26630
26630
|
|
|
26631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26631
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
26632
26632
|
import { createHash as createHash2 } from "node:crypto";
|
|
26633
26633
|
var TASK_KEY_PREFIXES = {
|
|
26634
26634
|
question: "Q",
|
|
@@ -26656,7 +26656,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
26656
26656
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
26657
26657
|
}, "taskAccountOf");
|
|
26658
26658
|
|
|
26659
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
26660
26660
|
var toMs = /* @__PURE__ */ __name((iso16) => {
|
|
26661
26661
|
if (iso16 === null || iso16 === void 0)
|
|
26662
26662
|
return null;
|
|
@@ -26670,7 +26670,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
26670
26670
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
26671
26671
|
var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
26672
26672
|
|
|
26673
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26673
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
26674
26674
|
var TAG_KINDS = ["tag", "topic"];
|
|
26675
26675
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
26676
26676
|
var TAG_TYPE = {
|
|
@@ -26873,7 +26873,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
26873
26873
|
return result;
|
|
26874
26874
|
}, "tagsOf");
|
|
26875
26875
|
|
|
26876
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26876
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
26877
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");
|
|
26878
26878
|
var SPEECH = speech("att");
|
|
26879
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");
|
|
@@ -27237,7 +27237,7 @@ var FIELD_COMPILERS = {
|
|
|
27237
27237
|
subject
|
|
27238
27238
|
};
|
|
27239
27239
|
|
|
27240
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27240
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
27241
27241
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
27242
27242
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
27243
27243
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -27253,7 +27253,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
27253
27253
|
};
|
|
27254
27254
|
}, "placeOf");
|
|
27255
27255
|
|
|
27256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
27257
27257
|
var DRAIN_ON_WRITE = 500;
|
|
27258
27258
|
var METHOD = "rules";
|
|
27259
27259
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -27416,7 +27416,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
27416
27416
|
return queued.length;
|
|
27417
27417
|
}, "drainMentions");
|
|
27418
27418
|
|
|
27419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
27420
27420
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
27421
27421
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
27422
27422
|
if (!exists2)
|
|
@@ -27424,7 +27424,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
27424
27424
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
27425
27425
|
}, "indexRow");
|
|
27426
27426
|
|
|
27427
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
27428
27428
|
var INDEX = "message_stems";
|
|
27429
27429
|
var SETTING2 = "searchStemmers";
|
|
27430
27430
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -27546,7 +27546,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
27546
27546
|
};
|
|
27547
27547
|
}, "stemmerCache");
|
|
27548
27548
|
|
|
27549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
27550
27550
|
var rehearsal = new AsyncLocalStorage();
|
|
27551
27551
|
var SQLITE_BUSY = 5;
|
|
27552
27552
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
@@ -27680,7 +27680,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
27680
27680
|
}
|
|
27681
27681
|
}, "read");
|
|
27682
27682
|
|
|
27683
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27683
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
27684
27684
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
27685
27685
|
coalesce(CASE k.chunkable_type
|
|
27686
27686
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -27822,7 +27822,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
27822
27822
|
}, "dropUnusedVectors");
|
|
27823
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");
|
|
27824
27824
|
|
|
27825
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
27826
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({
|
|
27827
27827
|
target: [accounts.provider, accounts.externalId],
|
|
27828
27828
|
set: {
|
|
@@ -27953,7 +27953,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
27953
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));
|
|
27954
27954
|
}, "dropOrphanPeople");
|
|
27955
27955
|
|
|
27956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
27957
27957
|
var FOLDED = [
|
|
27958
27958
|
{ table: "tasks", column: "title" },
|
|
27959
27959
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -27990,7 +27990,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
27990
27990
|
return filled2;
|
|
27991
27991
|
}, "fillFolded");
|
|
27992
27992
|
|
|
27993
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
27994
27994
|
var HISTORY_KEY = "$history";
|
|
27995
27995
|
var objectOf2 = /* @__PURE__ */ __name((text7) => {
|
|
27996
27996
|
if (typeof text7 !== "string")
|
|
@@ -28066,7 +28066,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
28066
28066
|
return rest;
|
|
28067
28067
|
}, "withoutHistory");
|
|
28068
28068
|
|
|
28069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
28070
28070
|
import { createHash as createHash3 } from "node:crypto";
|
|
28071
28071
|
var CHUNK_CHARS = 1200;
|
|
28072
28072
|
var CHUNK_OVERLAP = 150;
|
|
@@ -28171,7 +28171,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
28171
28171
|
return chunks2;
|
|
28172
28172
|
}, "cutChunks");
|
|
28173
28173
|
|
|
28174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
28175
28175
|
var DAY2 = 864e5;
|
|
28176
28176
|
var CURRENCY = [
|
|
28177
28177
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -28297,7 +28297,7 @@ var dueDayOf = /* @__PURE__ */ __name((text7, createdMs) => {
|
|
|
28297
28297
|
return best?.day ?? null;
|
|
28298
28298
|
}, "dueDayOf");
|
|
28299
28299
|
|
|
28300
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28300
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
28301
28301
|
var DAY3 = 864e5;
|
|
28302
28302
|
var STOP_WORDS = new Set([
|
|
28303
28303
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -28452,7 +28452,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
28452
28452
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
28453
28453
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
28454
28454
|
|
|
28455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28455
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
28456
28456
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
28457
28457
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
28458
28458
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -28727,7 +28727,7 @@ var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.ma
|
|
|
28727
28727
|
Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
|
|
28728
28728
|
])), "vectorCounts");
|
|
28729
28729
|
|
|
28730
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
28731
28731
|
var DOCUMENT_PICTURE = "document_picture";
|
|
28732
28732
|
var SCAN_PAGE2 = 5e3;
|
|
28733
28733
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -28790,12 +28790,12 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
28790
28790
|
}, "nearestPictures")
|
|
28791
28791
|
}), "documentPicturesOver");
|
|
28792
28792
|
|
|
28793
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
|
|
28794
28794
|
var noteIndexText = /* @__PURE__ */ __name((title, text7) => title ? `${title}
|
|
28795
28795
|
|
|
28796
28796
|
${text7}` : text7, "noteIndexText");
|
|
28797
28797
|
|
|
28798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28798
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
|
|
28799
28799
|
var ENRICHMENT_SUBJECTS = ["document", "note", "email"];
|
|
28800
28800
|
var ENRICHMENT_POSITION = 1e6;
|
|
28801
28801
|
var EMAIL_ENRICHMENT = "email_enrichment";
|
|
@@ -28889,7 +28889,7 @@ var enrichmentsOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
|
28889
28889
|
}), "clear")
|
|
28890
28890
|
}), "enrichmentsOver");
|
|
28891
28891
|
|
|
28892
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
28893
28893
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
28894
28894
|
const literal5 = escaped2 ?? plain2 ?? "";
|
|
28895
28895
|
return wildcard ?? (/[*?[]/u.test(literal5) ? `[${literal5}]` : literal5);
|
|
@@ -28954,7 +28954,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
28954
28954
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
28955
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");
|
|
28956
28956
|
|
|
28957
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
28958
28958
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
28959
28959
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
28960
28960
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -29044,7 +29044,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
29044
29044
|
});
|
|
29045
29045
|
}, "linkMeeting");
|
|
29046
29046
|
|
|
29047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
29048
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), ''))";
|
|
29049
29049
|
var UNSEARCHED_EVENT_TYPES = [
|
|
29050
29050
|
"working-location",
|
|
@@ -29290,7 +29290,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
29290
29290
|
return true;
|
|
29291
29291
|
}, "resetNoteIndex");
|
|
29292
29292
|
|
|
29293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
29294
29294
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
29295
29295
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
29296
29296
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -29309,7 +29309,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
29309
29309
|
}
|
|
29310
29310
|
}, "resolvePersonLinks");
|
|
29311
29311
|
|
|
29312
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
29313
29313
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
29314
29314
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
29315
29315
|
find: orm.select({
|
|
@@ -29534,7 +29534,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
29534
29534
|
}, "meetingIdentityPk");
|
|
29535
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");
|
|
29536
29536
|
|
|
29537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
29538
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");
|
|
29539
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");
|
|
29540
29540
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -29822,7 +29822,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
29822
29822
|
}
|
|
29823
29823
|
}, "replaceAutoTags");
|
|
29824
29824
|
|
|
29825
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
29826
29826
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
29827
29827
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
29828
29828
|
var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
|
|
@@ -29841,7 +29841,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
29841
29841
|
return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
|
|
29842
29842
|
}, "counterFreshness");
|
|
29843
29843
|
|
|
29844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29844
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
29845
29845
|
import { createHash as createHash4 } from "node:crypto";
|
|
29846
29846
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
29847
29847
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -29939,7 +29939,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
29939
29939
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
29940
29940
|
}, "contextEvidenceRequest");
|
|
29941
29941
|
|
|
29942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
29943
29943
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
29944
29944
|
var ACTIVITY = `
|
|
29945
29945
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -30069,7 +30069,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
30069
30069
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
30070
30070
|
}), "mailActivity");
|
|
30071
30071
|
|
|
30072
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
30073
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");
|
|
30074
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;
|
|
30075
30075
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -30210,7 +30210,7 @@ var mailOwnText = /* @__PURE__ */ __name((body2) => {
|
|
|
30210
30210
|
return text7 || body2.trim();
|
|
30211
30211
|
}, "mailOwnText");
|
|
30212
30212
|
|
|
30213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
30214
30214
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
30215
30215
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
30216
30216
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
@@ -30322,7 +30322,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
30322
30322
|
return emails3 + threads;
|
|
30323
30323
|
}, "drainEmailIndex");
|
|
30324
30324
|
|
|
30325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
30326
30326
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
30327
30327
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
30328
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,
|
|
@@ -30420,7 +30420,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
30420
30420
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
30421
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");
|
|
30422
30422
|
|
|
30423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
30424
30424
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
30425
30425
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
30426
30426
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -30470,7 +30470,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
30470
30470
|
return threads.length;
|
|
30471
30471
|
}, "markEmailsRestored");
|
|
30472
30472
|
|
|
30473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30473
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
30474
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
|
|
30475
30475
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
30476
30476
|
WHERE p.account_id = ?
|
|
@@ -30530,7 +30530,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
30530
30530
|
}, "indexedMailPieces");
|
|
30531
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");
|
|
30532
30532
|
|
|
30533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
30534
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");
|
|
30535
30535
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
30536
30536
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -30597,7 +30597,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
30597
30597
|
}
|
|
30598
30598
|
}), "mailRulesOver");
|
|
30599
30599
|
|
|
30600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30600
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
30601
30601
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
30602
30602
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
30603
30603
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -30605,7 +30605,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
30605
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);
|
|
30606
30606
|
}, "reviewLink");
|
|
30607
30607
|
|
|
30608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
30609
30609
|
function checkMeetingCancelled(signal) {
|
|
30610
30610
|
if (!signal?.aborted)
|
|
30611
30611
|
return;
|
|
@@ -30616,7 +30616,7 @@ function checkMeetingCancelled(signal) {
|
|
|
30616
30616
|
}
|
|
30617
30617
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
30618
30618
|
|
|
30619
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30619
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
30620
30620
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
30621
30621
|
id: Number(row2.id),
|
|
30622
30622
|
accountId: Number(row2.account_id),
|
|
@@ -30666,7 +30666,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
30666
30666
|
createdAt: Number(row2.created_at)
|
|
30667
30667
|
}), "transcriptRowOf");
|
|
30668
30668
|
|
|
30669
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30669
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
30670
30670
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
30671
30671
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
30672
30672
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -30833,7 +30833,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30833
30833
|
}
|
|
30834
30834
|
}), "meetingReadsOver");
|
|
30835
30835
|
|
|
30836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
30837
30837
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
30838
30838
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
30839
30839
|
const params = [input.accountId];
|
|
@@ -30876,7 +30876,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
30876
30876
|
return { clauses, params };
|
|
30877
30877
|
}, "meetingSelectionSql");
|
|
30878
30878
|
|
|
30879
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
30880
30880
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30881
30881
|
async meetingChatLines(input) {
|
|
30882
30882
|
checkMeetingCancelled(input.signal);
|
|
@@ -30904,7 +30904,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30904
30904
|
}
|
|
30905
30905
|
}), "meetingChatLinesOver");
|
|
30906
30906
|
|
|
30907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
30908
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");
|
|
30909
30909
|
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
30910
30910
|
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
@@ -30919,7 +30919,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
|
30919
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");
|
|
30920
30920
|
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
30921
30921
|
|
|
30922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30922
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
30923
30923
|
var MESSAGE_FIELDS = {
|
|
30924
30924
|
pk: messages.id,
|
|
30925
30925
|
nativeId: messages.externalId,
|
|
@@ -31090,7 +31090,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
31090
31090
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
31091
31091
|
}), "chatActivity");
|
|
31092
31092
|
|
|
31093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
31094
31094
|
var HIT_FIELDS = {
|
|
31095
31095
|
...MESSAGE_FIELDS,
|
|
31096
31096
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -31189,7 +31189,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
31189
31189
|
};
|
|
31190
31190
|
}, "directReplies");
|
|
31191
31191
|
|
|
31192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31192
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
31193
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");
|
|
31194
31194
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
31195
31195
|
const found2 = identityRow(context, ref3);
|
|
@@ -31323,7 +31323,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
31323
31323
|
}, "mentioning");
|
|
31324
31324
|
var escaped = /* @__PURE__ */ __name((text7) => text7.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
31325
31325
|
|
|
31326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
31327
31327
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
31328
31328
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
31329
31329
|
}, "missing");
|
|
@@ -31445,7 +31445,7 @@ function meetingContextLinksOver(context) {
|
|
|
31445
31445
|
}
|
|
31446
31446
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
31447
31447
|
|
|
31448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
31449
31449
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
31450
31450
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
31451
31451
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -31474,7 +31474,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
31474
31474
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
31475
31475
|
}, "indexedText");
|
|
31476
31476
|
|
|
31477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31477
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
31478
31478
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
31479
31479
|
var meetingCurrentIndexRows = `
|
|
31480
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
|
|
@@ -31505,7 +31505,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
31505
31505
|
}, "invalidateMeetingStems");
|
|
31506
31506
|
var meetingStemmableText = /* @__PURE__ */ __name((text7) => text7.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
31507
31507
|
|
|
31508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
31509
31509
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
31510
31510
|
return {
|
|
31511
31511
|
async indexSearch(original) {
|
|
@@ -31573,10 +31573,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
31573
31573
|
}
|
|
31574
31574
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
31575
31575
|
|
|
31576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31576
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
31577
31577
|
import { createHash as createHash5 } from "node:crypto";
|
|
31578
31578
|
|
|
31579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/search/lucene/plain.js
|
|
31580
31580
|
var REPAIRED = /* @__PURE__ */ new Set([
|
|
31581
31581
|
"query.invalid-syntax",
|
|
31582
31582
|
"query.unclosed-literal",
|
|
@@ -31683,7 +31683,7 @@ var plainQuery = /* @__PURE__ */ __name((text7, fields4 = SEARCH_FIELDS) => {
|
|
|
31683
31683
|
return text7;
|
|
31684
31684
|
}, "plainQuery");
|
|
31685
31685
|
|
|
31686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
31687
31687
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
31688
31688
|
const padded = ` ${term} `;
|
|
31689
31689
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -31692,7 +31692,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
31692
31692
|
return [...pieces];
|
|
31693
31693
|
}, "trigrams");
|
|
31694
31694
|
|
|
31695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
31696
31696
|
var SHORTEST_CORRECTION = 3;
|
|
31697
31697
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
31698
31698
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -31739,7 +31739,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
31739
31739
|
return corrections;
|
|
31740
31740
|
}, "correctWords");
|
|
31741
31741
|
|
|
31742
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31742
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
31743
31743
|
var SHORTEST_GARBLED = 4;
|
|
31744
31744
|
var MOST_WIDENED = 64;
|
|
31745
31745
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -31831,7 +31831,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
31831
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));
|
|
31832
31832
|
}, "widenWords");
|
|
31833
31833
|
|
|
31834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
31835
31835
|
import { readFileSync } from "node:fs";
|
|
31836
31836
|
var loaded;
|
|
31837
31837
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -31890,7 +31890,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
31890
31890
|
return false;
|
|
31891
31891
|
}, "knownRussianWord");
|
|
31892
31892
|
|
|
31893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
31894
31894
|
var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
31895
31895
|
var MOST_WORDS = 128;
|
|
31896
31896
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -32117,7 +32117,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text7, stemmer) => {
|
|
|
32117
32117
|
return check3(tree);
|
|
32118
32118
|
}, "matchMeetingText");
|
|
32119
32119
|
|
|
32120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
32121
32121
|
var fail3 = /* @__PURE__ */ __name((message3) => {
|
|
32122
32122
|
throw new CliError("validation_error", message3);
|
|
32123
32123
|
}, "fail");
|
|
@@ -32299,7 +32299,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
32299
32299
|
}
|
|
32300
32300
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
32301
32301
|
|
|
32302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32302
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
32303
32303
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32304
32304
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
32305
32305
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -32331,7 +32331,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32331
32331
|
}
|
|
32332
32332
|
}), "meetingLanguagesOver");
|
|
32333
32333
|
|
|
32334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
32335
32335
|
import { createHash as createHash6 } from "node:crypto";
|
|
32336
32336
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
32337
32337
|
if (value === void 0)
|
|
@@ -32421,7 +32421,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
32421
32421
|
}
|
|
32422
32422
|
}), "meetingParticipantSearchOver");
|
|
32423
32423
|
|
|
32424
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
32425
32425
|
var preparationQueries = {
|
|
32426
32426
|
participants: {
|
|
32427
32427
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -32471,7 +32471,7 @@ var preparationQueries = {
|
|
|
32471
32471
|
}
|
|
32472
32472
|
};
|
|
32473
32473
|
|
|
32474
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32474
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
32475
32475
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32476
32476
|
async preparationContext(original) {
|
|
32477
32477
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -32512,7 +32512,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32512
32512
|
}
|
|
32513
32513
|
}), "meetingPreparationContextOver");
|
|
32514
32514
|
|
|
32515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
32516
32516
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
32517
32517
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
32518
32518
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -32526,7 +32526,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
32526
32526
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
32527
32527
|
)`, "preparationSubjects");
|
|
32528
32528
|
|
|
32529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32529
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
32530
32530
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32531
32531
|
async preparationKnowledge(original) {
|
|
32532
32532
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -32571,7 +32571,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
32571
32571
|
}
|
|
32572
32572
|
}), "meetingPreparationKnowledgeOver");
|
|
32573
32573
|
|
|
32574
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32574
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
32575
32575
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32576
32576
|
async preparationNotes(original) {
|
|
32577
32577
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -32624,7 +32624,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32624
32624
|
}
|
|
32625
32625
|
}), "meetingPreparationNotesOver");
|
|
32626
32626
|
|
|
32627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
32628
32628
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
32629
32629
|
async relatedHistory(original) {
|
|
32630
32630
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -32695,7 +32695,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32695
32695
|
}
|
|
32696
32696
|
}), "meetingRelatedHistoryOver");
|
|
32697
32697
|
|
|
32698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
32699
32699
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
32700
32700
|
var text3 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
32701
32701
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -32776,7 +32776,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32776
32776
|
}
|
|
32777
32777
|
}), "meetingReviewOver");
|
|
32778
32778
|
|
|
32779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32779
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
32780
32780
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
32781
32781
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
32782
32782
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -32830,7 +32830,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32830
32830
|
}
|
|
32831
32831
|
}), "meetingSeriesHistoryOver");
|
|
32832
32832
|
|
|
32833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32833
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
32834
32834
|
var MOST_ROWS = 5e5;
|
|
32835
32835
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
32836
32836
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -32899,7 +32899,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
32899
32899
|
}
|
|
32900
32900
|
}), "meetingStatsOver");
|
|
32901
32901
|
|
|
32902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32902
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
32903
32903
|
var CURSOR_KEY = "meetings";
|
|
32904
32904
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
32905
32905
|
id: Number(row2.id),
|
|
@@ -33468,7 +33468,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33468
33468
|
};
|
|
33469
33469
|
}, "meetingStoreOver");
|
|
33470
33470
|
|
|
33471
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
33472
33472
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
33473
33473
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
33474
33474
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -33494,7 +33494,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
33494
33494
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
33495
33495
|
}, "release");
|
|
33496
33496
|
|
|
33497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33497
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
33498
33498
|
var THREAD_COLUMNS = {
|
|
33499
33499
|
subject: {
|
|
33500
33500
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -33511,7 +33511,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
33511
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);
|
|
33512
33512
|
}, "threadRows");
|
|
33513
33513
|
|
|
33514
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
33515
33515
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
33516
33516
|
id: `email:${place.emailId}`,
|
|
33517
33517
|
chatId: place.threadExternalId,
|
|
@@ -34053,7 +34053,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
34053
34053
|
}
|
|
34054
34054
|
}), "mailStoreOver");
|
|
34055
34055
|
|
|
34056
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
34057
34057
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
34058
34058
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
34059
34059
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -34143,7 +34143,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
34143
34143
|
}, "knownWord");
|
|
34144
34144
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
34145
34145
|
|
|
34146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
34147
34147
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
34148
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");
|
|
34149
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
|
|
@@ -34229,7 +34229,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
34229
34229
|
return found2;
|
|
34230
34230
|
}, "spokenTranscripts");
|
|
34231
34231
|
|
|
34232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
34233
34233
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
34234
34234
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
34235
34235
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -34276,7 +34276,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
34276
34276
|
});
|
|
34277
34277
|
}, "placeHits");
|
|
34278
34278
|
|
|
34279
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34279
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
34280
34280
|
var GROUPS = {
|
|
34281
34281
|
chat: {
|
|
34282
34282
|
key: "m.chat_id",
|
|
@@ -34298,7 +34298,7 @@ var GROUPS = {
|
|
|
34298
34298
|
}
|
|
34299
34299
|
};
|
|
34300
34300
|
|
|
34301
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34301
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
34302
34302
|
var MESSAGES2 = {
|
|
34303
34303
|
rows: "messages",
|
|
34304
34304
|
threads: "chats",
|
|
@@ -34781,7 +34781,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
34781
34781
|
};
|
|
34782
34782
|
}, "runCompiled");
|
|
34783
34783
|
|
|
34784
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
34785
34785
|
function invalidMetadata() {
|
|
34786
34786
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
34787
34787
|
}
|
|
@@ -34883,7 +34883,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
34883
34883
|
};
|
|
34884
34884
|
}), "counterTargets");
|
|
34885
34885
|
|
|
34886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
34887
34887
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind4) => `'${kind4}'`).join(",");
|
|
34888
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,
|
|
34889
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
|
|
@@ -35002,7 +35002,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
35002
35002
|
}));
|
|
35003
35003
|
}, "attachmentViews");
|
|
35004
35004
|
|
|
35005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35005
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
35006
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");
|
|
35007
35007
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text7, source2) => {
|
|
35008
35008
|
const { orm, database, now: now2 } = context;
|
|
@@ -35040,7 +35040,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
35040
35040
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
35041
35041
|
}, "intoVoiceAttachment");
|
|
35042
35042
|
|
|
35043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
35044
35044
|
var FIELDS = [
|
|
35045
35045
|
"threadExternalId",
|
|
35046
35046
|
"senderIdentityId",
|
|
@@ -35358,7 +35358,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
35358
35358
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
35359
35359
|
}, "writeDerivedReactions");
|
|
35360
35360
|
|
|
35361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
35362
35362
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
35363
35363
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
35364
35364
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -35379,7 +35379,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
35379
35379
|
};
|
|
35380
35380
|
}, "keysOver");
|
|
35381
35381
|
|
|
35382
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35382
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
35383
35383
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
35384
35384
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
35385
35385
|
if (!row2)
|
|
@@ -35414,7 +35414,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
35414
35414
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
35415
35415
|
}, "saveProfile");
|
|
35416
35416
|
|
|
35417
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
35418
35418
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
35419
35419
|
const owner = ownerPerson(context.database).id;
|
|
35420
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);
|
|
@@ -35436,7 +35436,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
35436
35436
|
return personOf(context, ref3);
|
|
35437
35437
|
}, "linkToOwner");
|
|
35438
35438
|
|
|
35439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
35440
35440
|
var PROVIDERS_SETTING = "providers";
|
|
35441
35441
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
35442
35442
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -35484,7 +35484,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
35484
35484
|
});
|
|
35485
35485
|
}, "registerProvider");
|
|
35486
35486
|
|
|
35487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
35488
35488
|
var DAY4 = 864e5;
|
|
35489
35489
|
var RECENTLY_CLOSED_MS = 14 * DAY4;
|
|
35490
35490
|
var TEXT_LIMIT = 20;
|
|
@@ -35683,7 +35683,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
35683
35683
|
};
|
|
35684
35684
|
}, "taskSimilarityOver");
|
|
35685
35685
|
|
|
35686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
35687
35687
|
var SETTING3 = "taskCategories";
|
|
35688
35688
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
35689
35689
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -35702,7 +35702,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
35702
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);
|
|
35703
35703
|
}, "saveTaskCategories");
|
|
35704
35704
|
|
|
35705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
35706
35706
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
35707
35707
|
var ALLOWED = "taskAgentClose";
|
|
35708
35708
|
var MIN = "taskAgentCloseMin";
|
|
@@ -35758,10 +35758,10 @@ var SUGGESTION_COLUMNS = [
|
|
|
35758
35758
|
];
|
|
35759
35759
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
35760
35760
|
|
|
35761
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
35762
35762
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
35763
35763
|
|
|
35764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35764
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
35765
35765
|
var TASK_CLOSE_KIND = "task_close";
|
|
35766
35766
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
35767
35767
|
var isOwnerOnlyKind = /* @__PURE__ */ __name((kind4) => kind4 === MAIL_FINDINGS_KIND || kind4 === MEETING_FINDINGS_KIND || kind4 === TASK_CLOSE_KIND || kind4 === SOURCE_REVIEW_KIND, "isOwnerOnlyKind");
|
|
@@ -35809,7 +35809,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
35809
35809
|
}, "assertMayDecide");
|
|
35810
35810
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
35811
35811
|
|
|
35812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
35813
35813
|
var PROFILE_PLACEHOLDER = "<profile>";
|
|
35814
35814
|
var oneLine = /* @__PURE__ */ __name((text7) => singleLine(text7.replace(/\s+/g, " ").trim()), "oneLine");
|
|
35815
35815
|
var openKind = /* @__PURE__ */ __name((kind4) => kind4 === "email" ? "message" : kind4 === "email_thread" ? "chat" : kind4 === "unknown" ? void 0 : kind4, "openKind");
|
|
@@ -35870,7 +35870,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
|
|
|
35870
35870
|
return `${WORDS2[summary.kind]} ${named3}${notes2 === "" ? "" : ` (${notes2})`}`;
|
|
35871
35871
|
}, "refLabel");
|
|
35872
35872
|
|
|
35873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
35874
35874
|
var EXCERPT_CHARS = 280;
|
|
35875
35875
|
var TITLE_CHARS = 120;
|
|
35876
35876
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -36292,7 +36292,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
36292
36292
|
summaries: /* @__PURE__ */ __name(async (texts2, options) => refSummariesOf(context.database, texts2, { ...options, now: context.now() }), "summaries")
|
|
36293
36293
|
}), "refsStoreOver");
|
|
36294
36294
|
|
|
36295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
36296
36296
|
var sourceOf3 = /* @__PURE__ */ __name((read3, ref3) => ({
|
|
36297
36297
|
ref: ref3,
|
|
36298
36298
|
kind: read3.kind,
|
|
@@ -36330,7 +36330,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
36330
36330
|
});
|
|
36331
36331
|
}, "evidenceSourcesOf");
|
|
36332
36332
|
|
|
36333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
36334
36334
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
36335
36335
|
var MAX_TEXT_CHARS = 2e6;
|
|
36336
36336
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -36356,7 +36356,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
36356
36356
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
36357
36357
|
}, "pdfPreviewLimits");
|
|
36358
36358
|
|
|
36359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
36360
36360
|
import { randomBytes } from "node:crypto";
|
|
36361
36361
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
36362
36362
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -36369,7 +36369,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
36369
36369
|
return time3 + random;
|
|
36370
36370
|
}, "ulid");
|
|
36371
36371
|
|
|
36372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
36373
36373
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
36374
36374
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
36375
36375
|
if (!meta && !sections?.length)
|
|
@@ -36390,7 +36390,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
36390
36390
|
return typeof language === "string" && language !== "" ? language : null;
|
|
36391
36391
|
}, "languageOf");
|
|
36392
36392
|
|
|
36393
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
36394
36394
|
var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
36395
36395
|
var objectOf3 = /* @__PURE__ */ __name((value) => {
|
|
36396
36396
|
if (isObject2(value))
|
|
@@ -36633,7 +36633,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
36633
36633
|
};
|
|
36634
36634
|
}, "filesStoreOver");
|
|
36635
36635
|
|
|
36636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
36637
36637
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
36638
36638
|
entity: "document",
|
|
36639
36639
|
backend: "sql",
|
|
@@ -36679,7 +36679,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
36679
36679
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
36680
36680
|
}, "importedDocumentWhere");
|
|
36681
36681
|
|
|
36682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36682
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
36683
36683
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
36684
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");
|
|
36685
36685
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -36700,7 +36700,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
36700
36700
|
return changed;
|
|
36701
36701
|
}, "dateFileNotes");
|
|
36702
36702
|
|
|
36703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
36704
36704
|
var textOf2 = /* @__PURE__ */ __name((text7, what, max = 1e5, allowEmpty = false) => {
|
|
36705
36705
|
const value = text7.trim();
|
|
36706
36706
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -36713,7 +36713,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
36713
36713
|
return value;
|
|
36714
36714
|
}, "oneOf");
|
|
36715
36715
|
|
|
36716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
36717
36717
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
36718
36718
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
36719
36719
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso3(value), "optionalIso");
|
|
@@ -37246,7 +37246,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37246
37246
|
};
|
|
37247
37247
|
}, "notesStoreOver");
|
|
37248
37248
|
|
|
37249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
37250
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";
|
|
37251
37251
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
37252
37252
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -37505,7 +37505,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37505
37505
|
};
|
|
37506
37506
|
}, "memoriesStoreOver");
|
|
37507
37507
|
|
|
37508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
37509
37509
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
37510
37510
|
var KEY = "taskFirstPassPerChat";
|
|
37511
37511
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -37525,7 +37525,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
37525
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);
|
|
37526
37526
|
}, "saveFirstPassPerChat");
|
|
37527
37527
|
|
|
37528
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37528
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
37529
37529
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
37530
37530
|
var EXTERNAL_ID_CHARS = 200;
|
|
37531
37531
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -37552,7 +37552,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
37552
37552
|
return text7;
|
|
37553
37553
|
}, "sourceUrlOf");
|
|
37554
37554
|
|
|
37555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37555
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
37556
37556
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
37557
37557
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
37558
37558
|
name,
|
|
@@ -37775,7 +37775,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
37775
37775
|
return root === void 0 ? void 0 : { ...query, root };
|
|
37776
37776
|
}, "withoutField");
|
|
37777
37777
|
|
|
37778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
37779
37779
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
37780
37780
|
if (row2.author_type == null)
|
|
37781
37781
|
return null;
|
|
@@ -37803,7 +37803,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
37803
37803
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
37804
37804
|
}, "addComment");
|
|
37805
37805
|
|
|
37806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
37807
37807
|
var TASK_RELATION_KINDS = [
|
|
37808
37808
|
"blocked-by",
|
|
37809
37809
|
"follow-up-of",
|
|
@@ -37933,7 +37933,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
37933
37933
|
};
|
|
37934
37934
|
}, "taskRelationsStoreOver");
|
|
37935
37935
|
|
|
37936
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
37937
37937
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
37938
37938
|
var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
37939
37939
|
var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind4, changes, at) => {
|
|
@@ -38462,7 +38462,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
38462
38462
|
};
|
|
38463
38463
|
}, "workTasksOver");
|
|
38464
38464
|
|
|
38465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38465
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
38466
38466
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
38467
38467
|
const { database, now: now2 } = context;
|
|
38468
38468
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -38511,7 +38511,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
38511
38511
|
};
|
|
38512
38512
|
}, "taskCloseOver");
|
|
38513
38513
|
|
|
38514
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
38515
38515
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
38516
38516
|
const { database, now: now2 } = context;
|
|
38517
38517
|
const required3 = /* @__PURE__ */ __name((id2) => {
|
|
@@ -38729,7 +38729,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
38729
38729
|
};
|
|
38730
38730
|
}, "taskPairsOver");
|
|
38731
38731
|
|
|
38732
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
38733
38733
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
38734
38734
|
var TASK_STATS_SQL = {
|
|
38735
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"),
|
|
@@ -38768,7 +38768,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
38768
38768
|
}, "statNames")
|
|
38769
38769
|
}), "taskStatsOver");
|
|
38770
38770
|
|
|
38771
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38771
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
38772
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";
|
|
38773
38773
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
38774
38774
|
const key2 = inboxKey(account);
|
|
@@ -38975,7 +38975,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
38975
38975
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
38976
38976
|
}, "oneOf");
|
|
38977
38977
|
|
|
38978
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
38979
38979
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
38980
38980
|
const { database } = context;
|
|
38981
38981
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -39020,7 +39020,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
39020
39020
|
};
|
|
39021
39021
|
}, "accountsStoreOver");
|
|
39022
39022
|
|
|
39023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39023
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
39024
39024
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
39025
39025
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
39026
39026
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -39044,7 +39044,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
39044
39044
|
})), "keepDownloads");
|
|
39045
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");
|
|
39046
39046
|
|
|
39047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
39048
39048
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
39049
39049
|
const { database } = context;
|
|
39050
39050
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -39101,7 +39101,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
39101
39101
|
}, "keepAttachmentText")
|
|
39102
39102
|
}), "attachmentsStoreOver");
|
|
39103
39103
|
|
|
39104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
39105
39105
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
39106
39106
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
39107
39107
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -39286,7 +39286,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
39286
39286
|
return done;
|
|
39287
39287
|
}, "rekeyChats");
|
|
39288
39288
|
|
|
39289
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
39290
39290
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
39291
39291
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
39292
39292
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -39344,7 +39344,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
39344
39344
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
39345
39345
|
}, "chatCoverage");
|
|
39346
39346
|
|
|
39347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
39348
39348
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
39349
39349
|
const { database } = context;
|
|
39350
39350
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -39479,7 +39479,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39479
39479
|
};
|
|
39480
39480
|
}, "chatsStoreOver");
|
|
39481
39481
|
|
|
39482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39482
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
39483
39483
|
import { createHash as createHash7 } from "node:crypto";
|
|
39484
39484
|
var BATCH_CONTEXT = 50;
|
|
39485
39485
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -39617,7 +39617,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
39617
39617
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
39618
39618
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
39619
39619
|
|
|
39620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
39621
39621
|
import { setTimeout } from "node:timers/promises";
|
|
39622
39622
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
39623
39623
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -39929,7 +39929,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
39929
39929
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
39930
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");
|
|
39931
39931
|
|
|
39932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
39933
39933
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
39934
39934
|
const { database } = context;
|
|
39935
39935
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -40036,7 +40036,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
40036
40036
|
};
|
|
40037
40037
|
}, "conversationsStoreOver");
|
|
40038
40038
|
|
|
40039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
40040
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";
|
|
40041
40041
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
40042
40042
|
const { database } = context;
|
|
@@ -40061,7 +40061,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
40061
40061
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
40062
40062
|
}), "countersStoreOver");
|
|
40063
40063
|
|
|
40064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
40065
40065
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
40066
40066
|
var MENTION_QUERY = defineQuery({
|
|
40067
40067
|
entity: "mention",
|
|
@@ -40277,7 +40277,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
40277
40277
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
40278
40278
|
}, "listPlaces");
|
|
40279
40279
|
|
|
40280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
40281
40281
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
40282
40282
|
const { database } = context;
|
|
40283
40283
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -40312,7 +40312,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
40312
40312
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
40313
40313
|
}), "mentionsStoreOver");
|
|
40314
40314
|
|
|
40315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
40316
40316
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
40317
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");
|
|
40318
40318
|
const rows = messageId === void 0 ? read3.all(chatKey) : read3.all(chatKey, messageId);
|
|
@@ -40327,7 +40327,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
40327
40327
|
}));
|
|
40328
40328
|
}, "documentLinkMessages");
|
|
40329
40329
|
|
|
40330
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
40331
40331
|
var stemmerFor = stemmerCache();
|
|
40332
40332
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
40333
40333
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -40371,7 +40371,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
40371
40371
|
});
|
|
40372
40372
|
}, "laterSharingRare");
|
|
40373
40373
|
|
|
40374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
40375
40375
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
40376
40376
|
const { database } = context;
|
|
40377
40377
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -40506,7 +40506,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
40506
40506
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
40507
40507
|
}), "messagesStoreOver");
|
|
40508
40508
|
|
|
40509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40509
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
40510
40510
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
40511
40511
|
var iso6 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
40512
40512
|
var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -40563,7 +40563,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
40563
40563
|
});
|
|
40564
40564
|
}, "personPreparation");
|
|
40565
40565
|
|
|
40566
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
40567
40567
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
40568
40568
|
const id2 = Number(uid);
|
|
40569
40569
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -40571,7 +40571,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
40571
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)));
|
|
40572
40572
|
}, "personSeenInAccounts");
|
|
40573
40573
|
|
|
40574
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40574
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
40575
40575
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
40576
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);
|
|
40577
40577
|
if (!row2)
|
|
@@ -40638,7 +40638,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
40638
40638
|
return { id: id2, personId, removed: true };
|
|
40639
40639
|
}, "removeNote");
|
|
40640
40640
|
|
|
40641
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40641
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
40642
40642
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
40643
40643
|
const { database } = context;
|
|
40644
40644
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -40723,13 +40723,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
40723
40723
|
};
|
|
40724
40724
|
}, "peopleStoreOver");
|
|
40725
40725
|
|
|
40726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
40727
40727
|
import { createHash as createHash9 } from "node:crypto";
|
|
40728
40728
|
|
|
40729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
40730
40730
|
import { createHash as createHash8 } from "node:crypto";
|
|
40731
40731
|
|
|
40732
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
40733
40733
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
40734
40734
|
var AUTHOR_MEASURES = [
|
|
40735
40735
|
"messages",
|
|
@@ -40869,7 +40869,7 @@ var withoutUrls = /* @__PURE__ */ __name((text7) => text7.replace(/\S+/gu, (toke
|
|
|
40869
40869
|
var rankingWords = /* @__PURE__ */ __name((text7) => withoutUrls(text7).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
40870
40870
|
var rankingQuestion = /* @__PURE__ */ __name((text7) => withoutUrls(text7).includes("?"), "rankingQuestion");
|
|
40871
40871
|
|
|
40872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
40873
40873
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
40874
40874
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
40875
40875
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -41091,7 +41091,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
41091
41091
|
};
|
|
41092
41092
|
}, "rankReplyGraph");
|
|
41093
41093
|
|
|
41094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
41095
41095
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
41096
41096
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
41097
41097
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -41265,7 +41265,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
41265
41265
|
return { items, evidence, summary, graph: graph.quality };
|
|
41266
41266
|
}, "calculateAdminStatistics");
|
|
41267
41267
|
|
|
41268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
41269
41269
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
41270
41270
|
const dates = [];
|
|
41271
41271
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -41287,7 +41287,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
41287
41287
|
return dates[0].node.resolution.date;
|
|
41288
41288
|
}, "rankingContextRange");
|
|
41289
41289
|
|
|
41290
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
41291
41291
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
41292
41292
|
let counts;
|
|
41293
41293
|
try {
|
|
@@ -41582,7 +41582,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
41582
41582
|
});
|
|
41583
41583
|
}, "rankQuery");
|
|
41584
41584
|
|
|
41585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
41586
41586
|
function fail4(message3, reason = "query.too-large") {
|
|
41587
41587
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
41588
41588
|
}
|
|
@@ -41759,7 +41759,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
41759
41759
|
return result;
|
|
41760
41760
|
}), "adminStatisticsQuery");
|
|
41761
41761
|
|
|
41762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
41763
41763
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
41764
41764
|
if (!execution.accounts.length)
|
|
41765
41765
|
return { conversations: [], chats: [] };
|
|
@@ -41777,7 +41777,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
41777
41777
|
return { conversations: conversations2, chats: chats2 };
|
|
41778
41778
|
}, "conversationEligibility");
|
|
41779
41779
|
|
|
41780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
41781
41781
|
import { createHash as createHash10 } from "node:crypto";
|
|
41782
41782
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
41783
41783
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -41927,7 +41927,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
41927
41927
|
return result;
|
|
41928
41928
|
}, "rankingEvidence");
|
|
41929
41929
|
|
|
41930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
41931
41931
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
41932
41932
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2) => {
|
|
41933
41933
|
const params = [...scope3.accounts.flatMap(({ provider, account }) => [provider, account]), ...kinds2];
|
|
@@ -42021,7 +42021,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
42021
42021
|
});
|
|
42022
42022
|
}, "waitingChats");
|
|
42023
42023
|
|
|
42024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42024
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
42025
42025
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
42026
42026
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
42027
42027
|
if (execution.corpus === "mail")
|
|
@@ -42042,7 +42042,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
42042
42042
|
};
|
|
42043
42043
|
}, "queriesStoreOver");
|
|
42044
42044
|
|
|
42045
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
42046
42046
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
42047
42047
|
const { database, now: now2 } = context;
|
|
42048
42048
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -42081,10 +42081,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
42081
42081
|
}));
|
|
42082
42082
|
}, "chatEventsOf");
|
|
42083
42083
|
|
|
42084
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
42085
42085
|
import { createHash as createHash11 } from "node:crypto";
|
|
42086
42086
|
|
|
42087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
42088
42088
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
42089
42089
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
42090
42090
|
timeZone: zone,
|
|
@@ -42104,7 +42104,7 @@ var weekKey = /* @__PURE__ */ __name((day3) => {
|
|
|
42104
42104
|
return date3.toISOString().slice(0, 10);
|
|
42105
42105
|
}, "weekKey");
|
|
42106
42106
|
|
|
42107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
42108
42108
|
var RETENTION_TOLERANCE = 864e5;
|
|
42109
42109
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
42110
42110
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -42158,7 +42158,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
42158
42158
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
42159
42159
|
}, "retentionCohorts");
|
|
42160
42160
|
|
|
42161
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
42162
42162
|
var iso7 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
42163
42163
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
42164
42164
|
validateRetentionOptions(options);
|
|
@@ -42289,7 +42289,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
42289
42289
|
};
|
|
42290
42290
|
}, "retentionQuery");
|
|
42291
42291
|
|
|
42292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
42293
42293
|
var iso8 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
42294
42294
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
42295
42295
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -42420,7 +42420,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
42420
42420
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
42421
42421
|
})), "trackedChats");
|
|
42422
42422
|
|
|
42423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
42424
42424
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
42425
42425
|
const { database } = context;
|
|
42426
42426
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -42476,7 +42476,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42476
42476
|
};
|
|
42477
42477
|
}, "rosterStoreOver");
|
|
42478
42478
|
|
|
42479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
42480
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");
|
|
42481
42481
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
42482
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 ?`);
|
|
@@ -42500,7 +42500,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
42500
42500
|
}
|
|
42501
42501
|
}, "backfillNormalized");
|
|
42502
42502
|
|
|
42503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
42504
42504
|
var INDEX2 = "message_words";
|
|
42505
42505
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
42506
42506
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -42627,7 +42627,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
42627
42627
|
});
|
|
42628
42628
|
}, "resetSearchIndex");
|
|
42629
42629
|
|
|
42630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
42631
42631
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
42632
42632
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
42633
42633
|
const before2 = stemsState(database);
|
|
@@ -42722,7 +42722,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
42722
42722
|
return resetStems(database, { now: now2 });
|
|
42723
42723
|
}, "followDefaultStemmers");
|
|
42724
42724
|
|
|
42725
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
42726
42726
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
42727
42727
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
42728
42728
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -42744,7 +42744,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
42744
42744
|
});
|
|
42745
42745
|
}, "termCandidates");
|
|
42746
42746
|
|
|
42747
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42747
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
42748
42748
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
42749
42749
|
const { database } = context;
|
|
42750
42750
|
const stemmerFor2 = stemmerCache();
|
|
@@ -42768,7 +42768,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42768
42768
|
};
|
|
42769
42769
|
}, "searchIndexStoreOver");
|
|
42770
42770
|
|
|
42771
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42771
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
42772
42772
|
var HISTORY_KEPT = 1e3;
|
|
42773
42773
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
42774
42774
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -42837,7 +42837,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
42837
42837
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
42838
42838
|
}, "clearHistory");
|
|
42839
42839
|
|
|
42840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
42841
42841
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
42842
42842
|
const { database } = context;
|
|
42843
42843
|
return {
|
|
@@ -42861,7 +42861,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42861
42861
|
};
|
|
42862
42862
|
}, "searchesStoreOver");
|
|
42863
42863
|
|
|
42864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
42865
42865
|
import { createHash as createHash12 } from "node:crypto";
|
|
42866
42866
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
42867
42867
|
var sha256 = /* @__PURE__ */ __name((value) => createHash12("sha256").update(value).digest("hex"), "sha256");
|
|
@@ -43041,7 +43041,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
43041
43041
|
};
|
|
43042
43042
|
}, "addedSourcesOver");
|
|
43043
43043
|
|
|
43044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43044
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
43045
43045
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
43046
43046
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
43047
43047
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -43084,7 +43084,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
43084
43084
|
};
|
|
43085
43085
|
}, "agentActionsStoreOver");
|
|
43086
43086
|
|
|
43087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
43088
43088
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
43089
43089
|
}) => {
|
|
43090
43090
|
const { database, now: now2 } = context;
|
|
@@ -43143,7 +43143,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
43143
43143
|
};
|
|
43144
43144
|
}, "botUpdateStoreOver");
|
|
43145
43145
|
|
|
43146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
43147
43147
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
43148
43148
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
43149
43149
|
throw new CliError(code, message3, { reason });
|
|
@@ -43291,7 +43291,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
43291
43291
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly, linkedId, ...decisionsOver(context) };
|
|
43292
43292
|
}, "reviewedRowsOver");
|
|
43293
43293
|
|
|
43294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43294
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
43295
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";
|
|
43296
43296
|
var DAY_MS = 864e5;
|
|
43297
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");
|
|
@@ -43440,7 +43440,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43440
43440
|
};
|
|
43441
43441
|
}, "contractsStoreOver");
|
|
43442
43442
|
|
|
43443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
43444
43444
|
var BUSINESS_FIND_MAX = 2001;
|
|
43445
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");
|
|
43446
43446
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
@@ -43544,7 +43544,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
43544
43544
|
};
|
|
43545
43545
|
}, "businessSearchOver");
|
|
43546
43546
|
|
|
43547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
43548
43548
|
var DAY5 = 864e5;
|
|
43549
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}')`;
|
|
43550
43550
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -43654,7 +43654,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
43654
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);
|
|
43655
43655
|
}, "listEvents");
|
|
43656
43656
|
|
|
43657
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43657
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
43658
43658
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
43659
43659
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
43660
43660
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -43711,7 +43711,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
43711
43711
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
43712
43712
|
}, "forgetCalendarRows");
|
|
43713
43713
|
|
|
43714
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
43715
43715
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
43716
43716
|
id: Number(row2.id),
|
|
43717
43717
|
accountId: Number(row2.account_id),
|
|
@@ -44314,7 +44314,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
44314
44314
|
};
|
|
44315
44315
|
}, "eventStoreOver");
|
|
44316
44316
|
|
|
44317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
44318
44318
|
var CATALOG_QUERY = defineQuery({
|
|
44319
44319
|
entity: "document",
|
|
44320
44320
|
backend: "sql",
|
|
@@ -44556,7 +44556,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
44556
44556
|
};
|
|
44557
44557
|
}, "catalogStoreOver");
|
|
44558
44558
|
|
|
44559
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44559
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
44560
44560
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
44561
44561
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
44562
44562
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -44569,7 +44569,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
44569
44569
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
44570
44570
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
44571
44571
|
|
|
44572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
44573
44573
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
44574
44574
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
44575
44575
|
signal?.throwIfAborted();
|
|
@@ -44668,7 +44668,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
44668
44668
|
});
|
|
44669
44669
|
}, "readMeetingContextEvidence");
|
|
44670
44670
|
|
|
44671
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
44672
44672
|
var corpora = {
|
|
44673
44673
|
message: {
|
|
44674
44674
|
table: "messages",
|
|
@@ -44907,10 +44907,10 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
44907
44907
|
}
|
|
44908
44908
|
}), "contextRecordsOver");
|
|
44909
44909
|
|
|
44910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/crm.js
|
|
44911
44911
|
var isItemKind = /* @__PURE__ */ __name((kind4) => kind4 === "deal" || kind4 === "lead", "isItemKind");
|
|
44912
44912
|
|
|
44913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44913
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
44914
44914
|
import { createHash as createHash13 } from "node:crypto";
|
|
44915
44915
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
44916
44916
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -45254,7 +45254,7 @@ var fieldReferences = /* @__PURE__ */ __name((record4, options = {}) => {
|
|
|
45254
45254
|
return found2;
|
|
45255
45255
|
}, "fieldReferences");
|
|
45256
45256
|
|
|
45257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
45258
45258
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
45259
45259
|
var SOURCE = "crm";
|
|
45260
45260
|
var crmIdentityId = /* @__PURE__ */ __name((key2, externalId, type = "contact") => `${idPart(key2.account)}/${type}/${idPart(externalId)}`, "crmIdentityId");
|
|
@@ -45383,7 +45383,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
45383
45383
|
return { savePipeline, saveItemRow };
|
|
45384
45384
|
}, "crmRowsOver");
|
|
45385
45385
|
|
|
45386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
45387
45387
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
45388
45388
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
45389
45389
|
var crmSettingKey = /* @__PURE__ */ __name((key2, name) => `crm.${key2.provider}:${key2.account}.${name}`, "crmSettingKey");
|
|
@@ -45446,7 +45446,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
45446
45446
|
];
|
|
45447
45447
|
}), "crmSettingsOf");
|
|
45448
45448
|
|
|
45449
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45449
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
45450
45450
|
var MAX_LINES = 500;
|
|
45451
45451
|
var PARENTS = {
|
|
45452
45452
|
invoice: {
|
|
@@ -45546,7 +45546,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
45546
45546
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
45547
45547
|
}, "moneyLinesOver");
|
|
45548
45548
|
|
|
45549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
45550
45550
|
var COUNTED = {
|
|
45551
45551
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
45552
45552
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -45621,7 +45621,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
45621
45621
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
45622
45622
|
}, "refundRulesOver");
|
|
45623
45623
|
|
|
45624
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
45625
45625
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
45626
45626
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
45627
45627
|
var PAID = netPaidSql("i.id");
|
|
@@ -46019,7 +46019,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46019
46019
|
};
|
|
46020
46020
|
}, "financeStoreOver");
|
|
46021
46021
|
|
|
46022
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46022
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
46023
46023
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
46024
46024
|
throw new CliError("validation_error", message3, { reason });
|
|
46025
46025
|
}, "refuse");
|
|
@@ -46097,7 +46097,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
46097
46097
|
};
|
|
46098
46098
|
}, "paymentEntriesOver");
|
|
46099
46099
|
|
|
46100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46100
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
46101
46101
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
46102
46102
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
46103
46103
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -46123,7 +46123,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
46123
46123
|
return valid;
|
|
46124
46124
|
}, "validateEvidenceFindings");
|
|
46125
46125
|
|
|
46126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
46127
46127
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
46128
46128
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
46129
46129
|
var iso10 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -46304,7 +46304,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46304
46304
|
};
|
|
46305
46305
|
}, "proposedActionsStoreOver");
|
|
46306
46306
|
|
|
46307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
46308
46308
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
46309
46309
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
46310
46310
|
var listOf = /* @__PURE__ */ __name((list2) => {
|
|
@@ -46376,7 +46376,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
46376
46376
|
};
|
|
46377
46377
|
}, "relationRolesOver");
|
|
46378
46378
|
|
|
46379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
46380
46380
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
46381
46381
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
46382
46382
|
id: link3.id,
|
|
@@ -46695,7 +46695,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
46695
46695
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
46696
46696
|
}, "decidedOrigin");
|
|
46697
46697
|
|
|
46698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
46699
46699
|
var KEYED = "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'partner-of') AND to_id IS NOT NULL";
|
|
46700
46700
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
46701
46701
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" } } = {}) => {
|
|
@@ -46801,7 +46801,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
46801
46801
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
46802
46802
|
}), "relationsStoreOver");
|
|
46803
46803
|
|
|
46804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
46805
46805
|
var PENDING = "crm:pending-relations";
|
|
46806
46806
|
var PENDING_DAYS = 30;
|
|
46807
46807
|
var PENDING_MOST = 5e3;
|
|
@@ -47279,7 +47279,7 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
47279
47279
|
};
|
|
47280
47280
|
}, "crmCopiesOver");
|
|
47281
47281
|
|
|
47282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47282
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
47283
47283
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
47284
47284
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind4, stageIds, cutoff) => {
|
|
47285
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);
|
|
@@ -47296,7 +47296,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind4, stageIds, cuto
|
|
|
47296
47296
|
});
|
|
47297
47297
|
}, "stageAmountsOf");
|
|
47298
47298
|
|
|
47299
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
47300
47300
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
47301
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");
|
|
47302
47302
|
var MAX_STAGES = 30;
|
|
@@ -47637,16 +47637,16 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47637
47637
|
};
|
|
47638
47638
|
}, "dealsStoreOver");
|
|
47639
47639
|
|
|
47640
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47640
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
47641
47641
|
import { createHash as createHash14, randomBytes as randomBytes2 } from "node:crypto";
|
|
47642
47642
|
|
|
47643
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
47644
47644
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
47645
47645
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
47646
47646
|
var TOKEN2 = /^[A-Za-z0-9_-]{21}[AQgw]$/;
|
|
47647
47647
|
var isDecisionToken = /* @__PURE__ */ __name((value) => typeof value === "string" && TOKEN2.test(value), "isDecisionToken");
|
|
47648
47648
|
|
|
47649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
47650
47650
|
var digestOf = /* @__PURE__ */ __name((token) => createHash14("sha256").update(token).digest("hex"), "digestOf");
|
|
47651
47651
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
47652
47652
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -47742,7 +47742,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
47742
47742
|
};
|
|
47743
47743
|
}, "decisionRequestStoreOver");
|
|
47744
47744
|
|
|
47745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47745
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
47746
47746
|
var NOTE_FIELDS = [
|
|
47747
47747
|
"text",
|
|
47748
47748
|
"exact",
|
|
@@ -48178,7 +48178,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
48178
48178
|
};
|
|
48179
48179
|
}, "noteSearchOver");
|
|
48180
48180
|
|
|
48181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48181
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
48182
48182
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
48183
48183
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
48184
48184
|
var EVENT_CORPUS = {
|
|
@@ -48310,7 +48310,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
48310
48310
|
};
|
|
48311
48311
|
}, "eventSearchOver");
|
|
48312
48312
|
|
|
48313
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48313
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
48314
48314
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
48315
48315
|
try {
|
|
48316
48316
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -48322,7 +48322,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
48322
48322
|
}
|
|
48323
48323
|
}, "calendarMoment");
|
|
48324
48324
|
|
|
48325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
48326
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";
|
|
48327
48327
|
var iso12 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
48328
48328
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -48542,7 +48542,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48542
48542
|
};
|
|
48543
48543
|
}, "factsStoreOver");
|
|
48544
48544
|
|
|
48545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
48546
48546
|
var invalid5 = /* @__PURE__ */ __name((message3) => {
|
|
48547
48547
|
throw new CliError("validation_error", message3);
|
|
48548
48548
|
}, "invalid");
|
|
@@ -48646,7 +48646,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind4) => {
|
|
|
48646
48646
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes, create };
|
|
48647
48647
|
}, "findingsCoreOver");
|
|
48648
48648
|
|
|
48649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
48650
48650
|
var stale = /* @__PURE__ */ __name(() => {
|
|
48651
48651
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
48652
48652
|
reason: "evidence-findings.stale"
|
|
@@ -48827,7 +48827,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48827
48827
|
};
|
|
48828
48828
|
}, "evidenceFindingsStoreOver");
|
|
48829
48829
|
|
|
48830
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48830
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
48831
48831
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
48832
48832
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
48833
48833
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -48880,7 +48880,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
48880
48880
|
}, "forPerson")
|
|
48881
48881
|
}), "involvementStoreOver");
|
|
48882
48882
|
|
|
48883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
48884
48884
|
var LABELLED = {
|
|
48885
48885
|
note: "note",
|
|
48886
48886
|
document: "document",
|
|
@@ -48892,7 +48892,7 @@ var LABELLED = {
|
|
|
48892
48892
|
account: "folder"
|
|
48893
48893
|
};
|
|
48894
48894
|
|
|
48895
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48895
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
48896
48896
|
import { createHash as createHash15 } from "node:crypto";
|
|
48897
48897
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
48898
48898
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -48978,7 +48978,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
48978
48978
|
};
|
|
48979
48979
|
}, "meetingProjectsStoreOver");
|
|
48980
48980
|
|
|
48981
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48981
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
48982
48982
|
var ORGANIZATIONS_QUERY = {
|
|
48983
48983
|
entity: "organization",
|
|
48984
48984
|
backend: "sql",
|
|
@@ -49019,7 +49019,7 @@ var REMINDERS_QUERY = {
|
|
|
49019
49019
|
})
|
|
49020
49020
|
};
|
|
49021
49021
|
|
|
49022
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49022
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
49023
49023
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
49024
49024
|
id: String(row2.id),
|
|
49025
49025
|
ref: `organization:${row2.id}`,
|
|
@@ -49061,7 +49061,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
49061
49061
|
}), "setOwnOrganization")
|
|
49062
49062
|
}), "organizationsStoreOver");
|
|
49063
49063
|
|
|
49064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
49065
49065
|
var KINDS2 = RELATION_KINDS.map(linkKind).join(", ");
|
|
49066
49066
|
var typeOfRef = /* @__PURE__ */ __name((column2) => `substr(${column2}, 1, instr(${column2}, ':') - 1)`, "typeOfRef");
|
|
49067
49067
|
var idOfRef = /* @__PURE__ */ __name((column2) => `CAST(substr(${column2}, instr(${column2}, ':') + 1) AS INTEGER)`, "idOfRef");
|
|
@@ -49186,13 +49186,13 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
49186
49186
|
__name(proposalItem, "proposalItem");
|
|
49187
49187
|
}, "relationListOver");
|
|
49188
49188
|
|
|
49189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
49190
49190
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
49191
49191
|
...relationListOver(context),
|
|
49192
49192
|
...relationRolesOver(context)
|
|
49193
49193
|
}), "relationReadsOver");
|
|
49194
49194
|
|
|
49195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
49196
49196
|
var TABLES5 = { memory: "memories", fact: "facts" };
|
|
49197
49197
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
49198
49198
|
var DEFAULT_LIMIT = 500;
|
|
@@ -49380,16 +49380,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49380
49380
|
};
|
|
49381
49381
|
}, "sourceReviewStoreOver");
|
|
49382
49382
|
|
|
49383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49383
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
49384
49384
|
import { createHash as createHash18 } from "node:crypto";
|
|
49385
49385
|
|
|
49386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
49387
49387
|
import { createHash as createHash17 } from "node:crypto";
|
|
49388
49388
|
|
|
49389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
49390
49390
|
import { createHash as createHash16 } from "node:crypto";
|
|
49391
49391
|
|
|
49392
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
49393
49393
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
49394
49394
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
49395
49395
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -49440,7 +49440,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
49440
49440
|
return input;
|
|
49441
49441
|
}, "consolidationApplyInput");
|
|
49442
49442
|
|
|
49443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
49444
49444
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
49445
49445
|
id: String(row2.id),
|
|
49446
49446
|
sourceId: String(row2.source_id),
|
|
@@ -49515,7 +49515,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
49515
49515
|
}, { beforeCommit: check3 });
|
|
49516
49516
|
}, "applyTagConsolidation");
|
|
49517
49517
|
|
|
49518
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49518
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
49519
49519
|
var selections = [
|
|
49520
49520
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
49521
49521
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -49659,7 +49659,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
49659
49659
|
};
|
|
49660
49660
|
}, "previewRows");
|
|
49661
49661
|
|
|
49662
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49662
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
49663
49663
|
var kinds = ["project", "tag", "topic"];
|
|
49664
49664
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
49665
49665
|
if (signal?.aborted)
|
|
@@ -49923,7 +49923,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49923
49923
|
};
|
|
49924
49924
|
}, "vocabularyStoreOver");
|
|
49925
49925
|
|
|
49926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
49927
49927
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
49928
49928
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
49929
49929
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -50469,7 +50469,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
50469
50469
|
return key2.padEnd(3, "X");
|
|
50470
50470
|
}, "projectKey");
|
|
50471
50471
|
|
|
50472
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
50473
50473
|
var DAY6 = 864e5;
|
|
50474
50474
|
var SETTING4 = "logs_pruned_at";
|
|
50475
50475
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY6, botUpdatePayloadsMs: 30 * DAY6 };
|
|
@@ -50496,7 +50496,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
50496
50496
|
};
|
|
50497
50497
|
}, "logPruner");
|
|
50498
50498
|
|
|
50499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
50500
50500
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
50501
50501
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
50502
50502
|
var invalid7 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -50872,7 +50872,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
50872
50872
|
}, "checkMailFindings");
|
|
50873
50873
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
50874
50874
|
|
|
50875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50875
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
50876
50876
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
50877
50877
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
50878
50878
|
var WEIGHTS = {
|
|
@@ -51005,7 +51005,7 @@ var scoreGroup = /* @__PURE__ */ __name((items, context) => {
|
|
|
51005
51005
|
return { score: kept2.reduce((sum, signal) => sum + WEIGHTS[signal], 0), signals: kept2 };
|
|
51006
51006
|
}, "scoreGroup");
|
|
51007
51007
|
|
|
51008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
51009
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";
|
|
51010
51010
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
51011
51011
|
const { database, now: now2 } = context;
|
|
@@ -51213,7 +51213,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51213
51213
|
};
|
|
51214
51214
|
}, "ordersStoreOver");
|
|
51215
51215
|
|
|
51216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
51217
51217
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
51218
51218
|
throw new CliError("validation_error", "mail findings cite mail that changed since it was read; stage a new batch", {
|
|
51219
51219
|
reason: "mail-findings.stale"
|
|
@@ -51670,7 +51670,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
51670
51670
|
};
|
|
51671
51671
|
}, "mailFindingsStoreOver");
|
|
51672
51672
|
|
|
51673
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51673
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
51674
51674
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
51675
51675
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
51676
51676
|
reason: "meeting-findings.stale"
|
|
@@ -51838,7 +51838,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51838
51838
|
};
|
|
51839
51839
|
}, "meetingFindingsStoreOver");
|
|
51840
51840
|
|
|
51841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51841
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
51842
51842
|
var RANK_BATCH = 512;
|
|
51843
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";
|
|
51844
51844
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -52109,7 +52109,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
52109
52109
|
}
|
|
52110
52110
|
}), "meetingVectorsOver");
|
|
52111
52111
|
|
|
52112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
52113
52113
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
52114
52114
|
var TEXTS = {
|
|
52115
52115
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -52210,7 +52210,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52210
52210
|
};
|
|
52211
52211
|
}, "sourceMentionStoreOver");
|
|
52212
52212
|
|
|
52213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
52214
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";
|
|
52215
52215
|
var MAX_SPLITS = 100;
|
|
52216
52216
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -52441,11 +52441,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52441
52441
|
};
|
|
52442
52442
|
}, "transactionsStoreOver");
|
|
52443
52443
|
|
|
52444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
52445
52445
|
import { accessSync, constants, existsSync, mkdirSync as mkdirSync2, statSync, writeFileSync as writeFileSync2 } from "node:fs";
|
|
52446
52446
|
import { dirname as dirname2 } from "node:path";
|
|
52447
52447
|
|
|
52448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
52449
52449
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
52450
52450
|
var CLIENTS_SETTING = "clients";
|
|
52451
52451
|
var coreVersion = (() => {
|
|
@@ -52503,7 +52503,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
52503
52503
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
52504
52504
|
}, "refusalAdvice");
|
|
52505
52505
|
|
|
52506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
52507
52507
|
var GENERATED = [
|
|
52508
52508
|
{
|
|
52509
52509
|
"name": "20261010184427_initial",
|
|
@@ -53730,7 +53730,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
53730
53730
|
}
|
|
53731
53731
|
];
|
|
53732
53732
|
|
|
53733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53733
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
53734
53734
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
53735
53735
|
import { basename, dirname, join as join2, parse } from "node:path";
|
|
53736
53736
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -53963,7 +53963,7 @@ var rollBack = /* @__PURE__ */ __name((database, path) => {
|
|
|
53963
53963
|
return { ...result, foreignKeyViolations };
|
|
53964
53964
|
}, "rollBack");
|
|
53965
53965
|
|
|
53966
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53966
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
53967
53967
|
var V31_TABLES = [
|
|
53968
53968
|
"accounts",
|
|
53969
53969
|
"account_identities",
|
|
@@ -54119,7 +54119,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
54119
54119
|
return migrations;
|
|
54120
54120
|
}, "generatedMigrations");
|
|
54121
54121
|
|
|
54122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
54123
54123
|
var MIGRATIONS = generatedMigrations();
|
|
54124
54124
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
54125
54125
|
version INTEGER PRIMARY KEY,
|
|
@@ -54198,7 +54198,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
54198
54198
|
}
|
|
54199
54199
|
}, "migrate");
|
|
54200
54200
|
|
|
54201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
54202
54202
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
54203
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 ?");
|
|
54204
54204
|
if (pending.get(0, 1) === void 0)
|
|
@@ -54220,7 +54220,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
54220
54220
|
}
|
|
54221
54221
|
}, "fillJoinKeys");
|
|
54222
54222
|
|
|
54223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
54224
54224
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
54225
54225
|
refuseOwnerStoreInTests(path);
|
|
54226
54226
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -54234,8 +54234,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
54234
54234
|
}, "openSqlite");
|
|
54235
54235
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
54236
54236
|
quietSqliteWarning();
|
|
54237
|
-
const { drizzle } = await import("./node-
|
|
54238
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
54237
|
+
const { drizzle } = await import("./node-A6363DJ4.js");
|
|
54238
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-FA2P77PW.js");
|
|
54239
54239
|
const client = await nodeClient(path, { readOnly });
|
|
54240
54240
|
try {
|
|
54241
54241
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -54245,8 +54245,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
54245
54245
|
}
|
|
54246
54246
|
}, "openUnderNode");
|
|
54247
54247
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
54248
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
54249
|
-
const { drizzle } = await import("./bun-
|
|
54248
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-B46U7KI7.js");
|
|
54249
|
+
const { drizzle } = await import("./bun-NYSNYHAD.js");
|
|
54250
54250
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
54251
54251
|
try {
|
|
54252
54252
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -54256,7 +54256,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
54256
54256
|
}
|
|
54257
54257
|
}, "openUnderBun");
|
|
54258
54258
|
|
|
54259
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54259
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
54260
54260
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
54261
54261
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
54262
54262
|
try {
|
|
@@ -54324,7 +54324,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
54324
54324
|
});
|
|
54325
54325
|
}, "movePaymentFacts");
|
|
54326
54326
|
|
|
54327
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
54328
54328
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
54329
54329
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
54330
54330
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -54342,7 +54342,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
54342
54342
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
54343
54343
|
}, "assertReadCompatible");
|
|
54344
54344
|
|
|
54345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
54346
54346
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
54347
54347
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
54348
54348
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -54388,7 +54388,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
54388
54388
|
});
|
|
54389
54389
|
}, "moveSuggestedLinks");
|
|
54390
54390
|
|
|
54391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
54392
54392
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
54393
54393
|
var TEST_PROVIDER = "chat";
|
|
54394
54394
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -54409,7 +54409,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
54409
54409
|
}
|
|
54410
54410
|
}, "purgeTestAccounts");
|
|
54411
54411
|
|
|
54412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
54413
54413
|
var BACKFILL_ON_OPEN = 5e3;
|
|
54414
54414
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
54415
54415
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -54507,7 +54507,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
54507
54507
|
}
|
|
54508
54508
|
}, "openStoreContext");
|
|
54509
54509
|
|
|
54510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
54511
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";
|
|
54512
54512
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
54513
54513
|
const { database, now: now2 } = context;
|
|
@@ -54613,10 +54613,10 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54613
54613
|
};
|
|
54614
54614
|
}, "productsStoreOver");
|
|
54615
54615
|
|
|
54616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54616
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
54617
54617
|
import { createHash as createHash19 } from "node:crypto";
|
|
54618
54618
|
|
|
54619
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54619
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
54620
54620
|
var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
54621
54621
|
var ref = text5(2048);
|
|
54622
54622
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -54686,7 +54686,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
54686
54686
|
}))
|
|
54687
54687
|
});
|
|
54688
54688
|
|
|
54689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
54690
54690
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
54691
54691
|
var invalid10 = /* @__PURE__ */ __name((field4) => {
|
|
54692
54692
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -54790,7 +54790,7 @@ var validateProjectAnnotationsGraph = /* @__PURE__ */ __name((manifest, addition
|
|
|
54790
54790
|
invalid10("external.unused");
|
|
54791
54791
|
}, "validateProjectAnnotationsGraph");
|
|
54792
54792
|
|
|
54793
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
54794
54794
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
54795
54795
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
54796
54796
|
var targetSchema = strictObject({
|
|
@@ -54896,7 +54896,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
54896
54896
|
};
|
|
54897
54897
|
}, "planBoundProjectAnnotations");
|
|
54898
54898
|
|
|
54899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
54900
54900
|
import { createHash as createHash20 } from "node:crypto";
|
|
54901
54901
|
var text6 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
54902
54902
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -54990,7 +54990,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
54990
54990
|
})).digest("hex");
|
|
54991
54991
|
}, "projectAnnotationSnapshotFingerprint");
|
|
54992
54992
|
|
|
54993
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
54994
54994
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
54995
54995
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
54996
54996
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -55007,7 +55007,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
55007
55007
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
55008
55008
|
}, "projectAnnotationRequest");
|
|
55009
55009
|
|
|
55010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55010
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
55011
55011
|
var SnapshotBudget = class {
|
|
55012
55012
|
static {
|
|
55013
55013
|
__name(this, "SnapshotBudget");
|
|
@@ -55033,13 +55033,13 @@ var SnapshotBudget = class {
|
|
|
55033
55033
|
}
|
|
55034
55034
|
};
|
|
55035
55035
|
|
|
55036
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
55037
55037
|
import { createHash as createHash22 } from "node:crypto";
|
|
55038
55038
|
|
|
55039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
55040
55040
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
55041
55041
|
|
|
55042
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
55043
55043
|
import { createHash as createHash21 } from "node:crypto";
|
|
55044
55044
|
var invalid12 = /* @__PURE__ */ __name(() => {
|
|
55045
55045
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -55182,7 +55182,7 @@ var ProjectSnapshotSources = class {
|
|
|
55182
55182
|
}
|
|
55183
55183
|
};
|
|
55184
55184
|
|
|
55185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55185
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
55186
55186
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
55187
55187
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
55188
55188
|
}, "unsupported");
|
|
@@ -55360,7 +55360,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
55360
55360
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
55361
55361
|
}), "projectAnnotationSnapshot");
|
|
55362
55362
|
|
|
55363
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
55364
55364
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
55365
55365
|
const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
55366
55366
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -55422,7 +55422,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
55422
55422
|
};
|
|
55423
55423
|
}), "previewAnnotationSnapshot");
|
|
55424
55424
|
|
|
55425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
55426
55426
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
55427
55427
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
55428
55428
|
if (link3.kind === "evidence" && to)
|
|
@@ -55489,7 +55489,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
55489
55489
|
return mappings;
|
|
55490
55490
|
}, "restoreAnnotationRecords");
|
|
55491
55491
|
|
|
55492
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
55493
55493
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
55494
55494
|
async preview(request) {
|
|
55495
55495
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -55519,7 +55519,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
55519
55519
|
}
|
|
55520
55520
|
}), "projectAnnotationStoreOver");
|
|
55521
55521
|
|
|
55522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
55523
55523
|
var IMPORTER = { bot: "import" };
|
|
55524
55524
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
55525
55525
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -55564,7 +55564,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
55564
55564
|
};
|
|
55565
55565
|
}), "moneyLinesOf");
|
|
55566
55566
|
|
|
55567
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
55568
55568
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
55569
55569
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
55570
55570
|
const sql2 = /* @__PURE__ */ __name((text7) => database.prepare(text7), "sql");
|
|
@@ -55635,7 +55635,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
55635
55635
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
55636
55636
|
}, "recordRelationsOver");
|
|
55637
55637
|
|
|
55638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55638
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
55639
55639
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
55640
55640
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
55641
55641
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -55689,7 +55689,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
55689
55689
|
return { pointedAt, remap };
|
|
55690
55690
|
}, "recordRemapOver");
|
|
55691
55691
|
|
|
55692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
55693
55693
|
var runs = 0;
|
|
55694
55694
|
var PAGE = 500;
|
|
55695
55695
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -55849,7 +55849,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
55849
55849
|
return pointerOf("records", index2, "fields", key2);
|
|
55850
55850
|
}, "waitingPointer");
|
|
55851
55851
|
|
|
55852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
55853
55853
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
55854
55854
|
var SCHEME2 = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
55855
55855
|
var ORG_EMAIL = "org-email";
|
|
@@ -56037,7 +56037,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
56037
56037
|
]);
|
|
56038
56038
|
}, "renameMade");
|
|
56039
56039
|
|
|
56040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56040
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
56041
56041
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
56042
56042
|
name: given(fields4, "name"),
|
|
56043
56043
|
unit: given(fields4, "unit"),
|
|
@@ -56160,7 +56160,7 @@ var DIRECT_PROJECTORS = {
|
|
|
56160
56160
|
lead: dealProjector("lead")
|
|
56161
56161
|
};
|
|
56162
56162
|
|
|
56163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
56164
56164
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
56165
56165
|
const importer = authorActor(context, IMPORTER).actor;
|
|
56166
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;
|
|
@@ -56370,7 +56370,7 @@ var MONEY_PROJECTORS = {
|
|
|
56370
56370
|
}
|
|
56371
56371
|
};
|
|
56372
56372
|
|
|
56373
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
56374
56374
|
var CALLS_CALENDAR = "calls";
|
|
56375
56375
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
56376
56376
|
if (!isImportedProvider(source2.provider))
|
|
@@ -56545,7 +56545,7 @@ var PHONE_PROJECTORS = {
|
|
|
56545
56545
|
}
|
|
56546
56546
|
};
|
|
56547
56547
|
|
|
56548
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
56549
56549
|
var RECORD_PROJECTORS = {
|
|
56550
56550
|
...MONEY_PROJECTORS,
|
|
56551
56551
|
...DIRECT_PROJECTORS,
|
|
@@ -56555,7 +56555,7 @@ var RECORD_PROJECTORS = {
|
|
|
56555
56555
|
project: null
|
|
56556
56556
|
};
|
|
56557
56557
|
|
|
56558
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
56559
56559
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
56560
56560
|
const sql2 = /* @__PURE__ */ __name((text7) => database.prepare(text7), "sql");
|
|
56561
56561
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -56617,7 +56617,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
56617
56617
|
return { settle, checkShares };
|
|
56618
56618
|
}, "recordSettlingOver");
|
|
56619
56619
|
|
|
56620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
56621
56621
|
import { createHash as createHash23 } from "node:crypto";
|
|
56622
56622
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
56623
56623
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -56633,7 +56633,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
56633
56633
|
return { stamp, untouched };
|
|
56634
56634
|
}, "importStampsOver");
|
|
56635
56635
|
|
|
56636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
56637
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";
|
|
56638
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";
|
|
56639
56639
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -56864,7 +56864,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56864
56864
|
};
|
|
56865
56865
|
}, "subscriptionsStoreOver");
|
|
56866
56866
|
|
|
56867
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
56868
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";
|
|
56869
56869
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
56870
56870
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -56986,7 +56986,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56986
56986
|
};
|
|
56987
56987
|
}, "walletsStoreOver");
|
|
56988
56988
|
|
|
56989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
56990
56990
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
56991
56991
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
56992
56992
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -57243,7 +57243,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
57243
57243
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
57244
57244
|
}, "recordWritesOver");
|
|
57245
57245
|
|
|
57246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57246
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
57247
57247
|
var LIMIT = 1e3;
|
|
57248
57248
|
var iso15 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
57249
57249
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -57448,7 +57448,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57448
57448
|
};
|
|
57449
57449
|
}, "recordStoreOver");
|
|
57450
57450
|
|
|
57451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
57452
57452
|
var refusalOf = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
57453
57453
|
var wrapped = /* @__PURE__ */ new WeakMap();
|
|
57454
57454
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -57483,7 +57483,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
57483
57483
|
return proxy;
|
|
57484
57484
|
}, "storeErrors");
|
|
57485
57485
|
|
|
57486
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
57487
57487
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
57488
57488
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
57489
57489
|
let merged = { from: from2, to };
|
|
@@ -57496,7 +57496,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
57496
57496
|
}, "markRange");
|
|
57497
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");
|
|
57498
57498
|
|
|
57499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
57500
57500
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
57501
57501
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
57502
57502
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -57517,7 +57517,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
57517
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);
|
|
57518
57518
|
}, "setTaskAnalysisMark");
|
|
57519
57519
|
|
|
57520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
57521
57521
|
var keyOf5 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
57522
57522
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
57523
57523
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf5(account));
|
|
@@ -57527,7 +57527,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
57527
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);
|
|
57528
57528
|
}, "setTaskRulesStop");
|
|
57529
57529
|
|
|
57530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
57531
57531
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
57532
57532
|
const { database } = context;
|
|
57533
57533
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -57586,7 +57586,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57586
57586
|
};
|
|
57587
57587
|
}, "syncStoreOver");
|
|
57588
57588
|
|
|
57589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
57590
57590
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
57591
57591
|
const { database } = context;
|
|
57592
57592
|
return {
|
|
@@ -57608,7 +57608,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57608
57608
|
};
|
|
57609
57609
|
}, "tagsStoreOver");
|
|
57610
57610
|
|
|
57611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
57612
57612
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
57613
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
|
|
57614
57614
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -57735,7 +57735,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
57735
57735
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
57736
57736
|
}, "savePictureChunks");
|
|
57737
57737
|
|
|
57738
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57738
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
57739
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,
|
|
57740
57740
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
57741
57741
|
FROM messages m
|
|
@@ -57824,7 +57824,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
57824
57824
|
return plain2(best(found2));
|
|
57825
57825
|
}, "nearestMessages");
|
|
57826
57826
|
|
|
57827
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57827
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
57828
57828
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
57829
57829
|
const { database } = context;
|
|
57830
57830
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -58083,7 +58083,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
58083
58083
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
58084
58084
|
}), "vectorsStoreOver");
|
|
58085
58085
|
|
|
58086
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58086
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
58087
58087
|
import { existsSync as existsSync2, readFileSync as readFileSync4 } from "node:fs";
|
|
58088
58088
|
import { dirname as dirname3, join as join3 } from "node:path";
|
|
58089
58089
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -58171,10 +58171,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
58171
58171
|
}
|
|
58172
58172
|
}, "lastBackup");
|
|
58173
58173
|
|
|
58174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
58175
58175
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
58176
58176
|
|
|
58177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58177
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
58178
58178
|
var KEY4 = "ownerLanguages";
|
|
58179
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(" "));
|
|
58180
58180
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -58204,7 +58204,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
58204
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);
|
|
58205
58205
|
}, "saveOwnerLanguages");
|
|
58206
58206
|
|
|
58207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
58208
58208
|
var COUNTED_TABLES = [
|
|
58209
58209
|
"accounts",
|
|
58210
58210
|
"chats",
|
|
@@ -58289,7 +58289,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
58289
58289
|
};
|
|
58290
58290
|
}, "storeContents");
|
|
58291
58291
|
|
|
58292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
58293
58293
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
58294
58294
|
const context = await openStoreContext(options);
|
|
58295
58295
|
try {
|
|
@@ -58546,6 +58546,7 @@ export {
|
|
|
58546
58546
|
isImportedProvider,
|
|
58547
58547
|
holdsKind,
|
|
58548
58548
|
holdsKindOf,
|
|
58549
|
+
kindOf,
|
|
58549
58550
|
isBotProvider,
|
|
58550
58551
|
inSource,
|
|
58551
58552
|
sourceOf,
|