@wirecat/cli-memo 0.131.51 → 0.131.52
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-3R3VE3W2.js → all-profiles-ZFVBLT2D.js} +5 -5
- package/dist/bundle/{anthropic-QVYJRACM.js → anthropic-UG2YHOT7.js} +3 -3
- package/dist/bundle/{app-server-T3D2PIGZ.js → app-server-AQYA4TB6.js} +35 -35
- package/dist/bundle/auto-2AY6K6DI.js +86 -0
- package/dist/bundle/{bun-DTDD2OHK.js → bun-QJUFWKEZ.js} +2 -2
- package/dist/bundle/{bun-sqlite-DWICJAH3.js → bun-sqlite-GWVRHYF4.js} +2 -2
- package/dist/bundle/{chunk-SXVPRYEF.js → chunk-2CBOPOC7.js} +15 -12
- package/dist/bundle/{chunk-ECLBZGWI.js → chunk-2GEV2TXW.js} +3 -3
- package/dist/bundle/{chunk-PX2B5ZRL.js → chunk-3O46NA2H.js} +102 -60
- package/dist/bundle/{chunk-6MEVHKIO.js → chunk-4ISZPK6D.js} +1 -1
- package/dist/bundle/{chunk-JBSMBHTM.js → chunk-55GFDV24.js} +5 -5
- package/dist/bundle/{chunk-QIFK3EZM.js → chunk-5WT6SEXS.js} +25 -9
- package/dist/bundle/{chunk-4MWP6Z3W.js → chunk-65576OCE.js} +1 -1
- package/dist/bundle/{chunk-5ZGOT57S.js → chunk-6BVWU2UM.js} +2 -2
- package/dist/bundle/{chunk-REROHDUR.js → chunk-6GF4TIVM.js} +1 -1
- package/dist/bundle/{chunk-RL2DSQCD.js → chunk-6PQIXQFD.js} +8 -8
- package/dist/bundle/{chunk-PWYCF76F.js → chunk-6ZQK3L35.js} +2 -2
- package/dist/bundle/{chunk-E3WIMCV5.js → chunk-7SVHEGRO.js} +1 -1
- package/dist/bundle/{chunk-XN5YDZY7.js → chunk-A36ASW3I.js} +1 -1
- package/dist/bundle/{chunk-ZC2LNXGO.js → chunk-A7DXLOMS.js} +1 -1
- package/dist/bundle/{chunk-6O37NSG6.js → chunk-AGOUP5AH.js} +4 -4
- package/dist/bundle/{chunk-OBVKXHOH.js → chunk-AU5GAMGM.js} +413 -357
- package/dist/bundle/{chunk-H65NWA3X.js → chunk-EEEZGK2J.js} +1 -1
- package/dist/bundle/{chunk-O5Z74SBZ.js → chunk-EKQNL6VJ.js} +23 -21
- package/dist/bundle/{chunk-7C3MP5LH.js → chunk-EQUPZVV6.js} +5 -5
- package/dist/bundle/{chunk-LYUVULFK.js → chunk-ERZBEQAY.js} +267 -259
- package/dist/bundle/{chunk-HRLQQLVD.js → chunk-ETYAJPIT.js} +20 -20
- package/dist/bundle/{chunk-GSCGRBEQ.js → chunk-FWCFEJWD.js} +173 -153
- package/dist/bundle/{chunk-E7TMOUWZ.js → chunk-G4Z4WSIG.js} +1 -1
- package/dist/bundle/{chunk-56BBTOS2.js → chunk-G52Y3KOO.js} +1 -1
- package/dist/bundle/{chunk-GBWOMPZ7.js → chunk-G7K4J3NS.js} +3 -3
- package/dist/bundle/{chunk-ROP27ZJU.js → chunk-GJWNHWG7.js} +31 -31
- package/dist/bundle/{chunk-4A6JOJLR.js → chunk-I4LXP4HQ.js} +4 -4
- package/dist/bundle/{chunk-XGNNI3S3.js → chunk-IALGFO44.js} +2 -2
- package/dist/bundle/{chunk-MVV32ZTO.js → chunk-IKG2OPHU.js} +7 -15
- package/dist/bundle/{chunk-JCNBJ3FN.js → chunk-KGPD3OCD.js} +170 -57
- package/dist/bundle/{chunk-PNNM72BO.js → chunk-LUHMRW3P.js} +7 -4
- package/dist/bundle/{chunk-YPLKNKAD.js → chunk-LX65W7IK.js} +4 -4
- package/dist/bundle/{chunk-OJFRMK2W.js → chunk-M64NVDB4.js} +3 -3
- package/dist/bundle/{chunk-5JY464PN.js → chunk-MICF3K6S.js} +12 -12
- package/dist/bundle/{chunk-AEVTXHTY.js → chunk-N5J6GT7C.js} +4 -4
- package/dist/bundle/{chunk-4RHIJMRX.js → chunk-NIUWQP7F.js} +30 -28
- package/dist/bundle/{chunk-O5UP2KZL.js → chunk-NNUP36UQ.js} +1 -1
- package/dist/bundle/{chunk-UDAATSWZ.js → chunk-NOEXRGYH.js} +10 -10
- package/dist/bundle/{chunk-CZOBBAXM.js → chunk-NUQ3N3V3.js} +7 -7
- package/dist/bundle/{chunk-ETD2DRJD.js → chunk-NZKDNBYE.js} +6 -6
- package/dist/bundle/{chunk-CPLYNBAJ.js → chunk-OIPJYDLZ.js} +1 -1
- package/dist/bundle/{chunk-526KVXRI.js → chunk-OWS67HTV.js} +2 -2
- package/dist/bundle/{chunk-FZ4GVE36.js → chunk-PBM5GH7S.js} +2 -2
- package/dist/bundle/{chunk-4GWFRZ2U.js → chunk-PKVXZZTM.js} +58 -1
- package/dist/bundle/{chunk-QFC7V5VW.js → chunk-RYY4YRKQ.js} +5 -5
- package/dist/bundle/{chunk-WPW6ULD7.js → chunk-S7X5ZMQN.js} +2 -2
- package/dist/bundle/{chunk-BUHTAMPF.js → chunk-TM6R3Z45.js} +1 -1
- package/dist/bundle/{chunk-H7RSMNHL.js → chunk-TQS6ZKC3.js} +483 -402
- package/dist/bundle/{chunk-V3TELYLZ.js → chunk-U4ZD5SYO.js} +1 -1
- package/dist/bundle/{chunk-N3UA5PO4.js → chunk-U6E3BGHO.js} +9 -9
- package/dist/bundle/{chunk-FJ3DAE4M.js → chunk-VOWEZBOJ.js} +1 -1
- package/dist/bundle/{chunk-3OL3QRFS.js → chunk-X6XIW76O.js} +5 -5
- package/dist/bundle/{chunk-JINNS3FI.js → chunk-XIHQOSCT.js} +1 -1
- package/dist/bundle/{chunk-UQ2OA6EM.js → chunk-ZKXIZD4C.js} +4 -4
- package/dist/bundle/{chunk-AWLAMVNY.js → chunk-ZVJAZXME.js} +4 -4
- package/dist/bundle/{chunk-66A646SL.js → chunk-ZVR6S4XB.js} +7 -7
- package/dist/bundle/{chunk-YZB5IL4L.js → chunk-ZYQEWB6P.js} +2 -2
- package/dist/bundle/{command-contract-OTVOQLZS.js → command-contract-7AADJ3UC.js} +11 -11
- package/dist/bundle/{decode-ISKRNDDM.js → decode-XMIBTI5O.js} +2 -2
- package/dist/bundle/{echarts-TINXXXCB.js → echarts-W7DPDJA5.js} +2 -2
- package/dist/bundle/{embed-R2KJDGEX.js → embed-EP3KKO6Y.js} +3 -3
- package/dist/bundle/{embedder-X2Y5RLKE.js → embedder-ENGCALJ7.js} +6 -6
- package/dist/bundle/{entry-2MUKT36Z.js → entry-BGSKREOS.js} +4 -4
- package/dist/bundle/failure-ZKQVXWAB.js +66 -0
- package/dist/bundle/{first-run-6BSAM4BD.js → first-run-4EBMV2EM.js} +5 -5
- package/dist/bundle/{first-screen-ALXB4ONR.js → first-screen-2TM3BF2Y.js} +12 -12
- package/dist/bundle/{instructions-E5NBM2NJ.js → instructions-A42XETMK.js} +1 -1
- package/dist/bundle/{mcp-YUPBMZPV.js → mcp-5LAWRSJK.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-NBHZ4XWV.js → node-IRL66JK2.js} +2 -2
- package/dist/bundle/{node-sqlite-3CBWCPNC.js → node-sqlite-SOGTH72B.js} +3 -3
- package/dist/bundle/{oauth-L5XC2THD.js → oauth-RB5W3AC7.js} +4 -4
- package/dist/bundle/{open-WR6QQPVB.js → open-552EJ4JC.js} +2 -2
- package/dist/bundle/{openai-MCPELYCJ.js → openai-ZLOHEEDH.js} +7 -7
- package/dist/bundle/{process-EAEC2FBD.js → process-46SUXGWW.js} +1 -1
- package/dist/bundle/{program-WKKBFQIW.js → program-ZLWKMT65.js} +59 -57
- package/dist/bundle/{prompt-M4Z35LQ5.js → prompt-2NHJSYKX.js} +2 -2
- package/dist/bundle/{recognize-VT6NKW6D.js → recognize-2LDM6KHL.js} +1 -1
- package/dist/bundle/{remote-6QTPH5PJ.js → remote-DBYHHENF.js} +4 -4
- package/dist/bundle/{rerank-MJYLXZ4K.js → rerank-N5T2TIIY.js} +4 -4
- package/dist/bundle/{serve-KQ6OL3OH.js → serve-S6B54R2F.js} +6 -6
- package/dist/bundle/server-KZZHFPTZ.js +61 -0
- package/dist/bundle/{server-UJIH2SBV.js → server-QH6AKPRV.js} +50 -50
- package/dist/bundle/server-WAIPBBM7.js +48 -0
- package/dist/bundle/{state-2PDCOSJN.js → state-ZXZGIIJW.js} +3 -3
- package/dist/bundle/{store-SXYAS5EI.js → store-PNJNDMQ4.js} +9 -9
- package/dist/bundle/store-maintenance-command-2ZVV3DGA.js +48 -0
- package/dist/bundle/update-6HXLLGTQ.js +69 -0
- package/dist/doctor/command.d.ts +30 -0
- package/dist/doctor/command.d.ts.map +1 -1
- package/dist/doctor/command.js +1 -1
- package/dist/doctor/command.js.map +1 -1
- package/dist/failure.js +2 -2
- package/dist/failure.js.map +1 -1
- package/dist/knowledge/relationships-scan.d.ts.map +1 -1
- package/dist/knowledge/relationships-scan.js +4 -3
- package/dist/knowledge/relationships-scan.js.map +1 -1
- package/dist/run/import.d.ts.map +1 -1
- package/dist/run/import.js +3 -2
- package/dist/run/import.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/auto-XJCSM7WE.js +0 -86
- package/dist/bundle/failure-KYUARIL2.js +0 -66
- package/dist/bundle/server-AVAJTC5G.js +0 -61
- package/dist/bundle/server-QAFF3RP5.js +0 -48
- package/dist/bundle/store-maintenance-command-ARTXRVYD.js +0 -48
- package/dist/bundle/update-MOZKRB2Z.js +0 -69
- /package/dist/bundle/{chunk-4ZSY3MKL.js → chunk-DPRGC5YX.js} +0 -0
|
@@ -82,6 +82,7 @@ import {
|
|
|
82
82
|
queryAstSchema,
|
|
83
83
|
queryError,
|
|
84
84
|
queryFieldsOf,
|
|
85
|
+
refuseDamagedStore,
|
|
85
86
|
reminder,
|
|
86
87
|
scaleOf,
|
|
87
88
|
settledStatus,
|
|
@@ -102,11 +103,12 @@ import {
|
|
|
102
103
|
validateQuery,
|
|
103
104
|
walkQuery,
|
|
104
105
|
zonedMoment
|
|
105
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-KGPD3OCD.js";
|
|
106
107
|
import {
|
|
107
108
|
holdsCredential,
|
|
108
|
-
secretNamed
|
|
109
|
-
|
|
109
|
+
secretNamed,
|
|
110
|
+
sqliteCode
|
|
111
|
+
} from "./chunk-PKVXZZTM.js";
|
|
110
112
|
import {
|
|
111
113
|
DEFAULT_STEMMERS,
|
|
112
114
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -119,27 +121,27 @@ import {
|
|
|
119
121
|
fold,
|
|
120
122
|
normalize,
|
|
121
123
|
parseStemmers
|
|
122
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-NUQ3N3V3.js";
|
|
123
125
|
import {
|
|
124
126
|
DEFAULT_TASK_CATEGORIES,
|
|
125
127
|
sharedConfigPath,
|
|
126
128
|
storedTaskCategories,
|
|
127
129
|
taskCategoriesReader
|
|
128
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-ZVJAZXME.js";
|
|
129
131
|
import {
|
|
130
132
|
refuseOwnerStoreInTests,
|
|
131
133
|
storePath
|
|
132
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-65576OCE.js";
|
|
133
135
|
import {
|
|
134
136
|
quietSqliteWarning,
|
|
135
137
|
storeCapable
|
|
136
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-X6XIW76O.js";
|
|
137
139
|
import {
|
|
138
140
|
PRAGMAS,
|
|
139
141
|
TIME_LIMIT_FUNCTION,
|
|
140
142
|
TimeLimitReached,
|
|
141
143
|
isQueryOnly
|
|
142
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-A36ASW3I.js";
|
|
143
145
|
import {
|
|
144
146
|
array,
|
|
145
147
|
boolean,
|
|
@@ -189,7 +191,7 @@ import {
|
|
|
189
191
|
sql,
|
|
190
192
|
sqliteTable,
|
|
191
193
|
text
|
|
192
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-TM6R3Z45.js";
|
|
193
195
|
import {
|
|
194
196
|
__commonJS,
|
|
195
197
|
__name,
|
|
@@ -9933,7 +9935,7 @@ var require_cjs = __commonJS({
|
|
|
9933
9935
|
}
|
|
9934
9936
|
});
|
|
9935
9937
|
|
|
9936
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
9937
9939
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
9938
9940
|
const methods = whole;
|
|
9939
9941
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10061,7 +10063,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10061
10063
|
};
|
|
10062
10064
|
}, "bindAccount");
|
|
10063
10065
|
|
|
10064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10066
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
10065
10067
|
var SCHEME = "msg:";
|
|
10066
10068
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat: chat2, message: message2 }) => SCHEME + [provider, account, chat2, message2].map(encodeURIComponent).join("/"), "formatLocator");
|
|
10067
10069
|
var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -10075,7 +10077,7 @@ var parseLocator = /* @__PURE__ */ __name((reference2) => {
|
|
|
10075
10077
|
return { provider, account, chat: chat2, message: message2 };
|
|
10076
10078
|
}, "parseLocator");
|
|
10077
10079
|
|
|
10078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
10079
10081
|
var SIMPLE_REFERENCES = [
|
|
10080
10082
|
"note",
|
|
10081
10083
|
"document",
|
|
@@ -10226,7 +10228,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text6) => {
|
|
|
10226
10228
|
return match !== null && byPrefix.has(match[1]);
|
|
10227
10229
|
}, "looksLikeReference");
|
|
10228
10230
|
|
|
10229
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
10230
10232
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
|
|
10231
10233
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
10232
10234
|
var PROVIDERS = [
|
|
@@ -10342,7 +10344,7 @@ var providerNamed = /* @__PURE__ */ __name((word2) => {
|
|
|
10342
10344
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
10343
10345
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
10344
10346
|
|
|
10345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
10346
10348
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
10347
10349
|
var inSource = /* @__PURE__ */ __name((source2, provider) => source2 === "all" || source2 === "bots" && isBotProvider(provider) || source2 === "personal" && !isBotProvider(provider) || source2 === provider || providerNamed(source2)?.name === provider || isKind(source2) && kindOf(provider) === source2, "inSource");
|
|
10348
10350
|
var fail = /* @__PURE__ */ __name((message2) => {
|
|
@@ -10365,7 +10367,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
10365
10367
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
10366
10368
|
}, "sourceOf");
|
|
10367
10369
|
|
|
10368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
10369
10371
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
10370
10372
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
10371
10373
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -10553,7 +10555,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf2 = (kind4)
|
|
|
10553
10555
|
return { accounts: [...chosen.values()], skipped };
|
|
10554
10556
|
}, "fitting");
|
|
10555
10557
|
|
|
10556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10557
10559
|
var IndexBuilderOn = class {
|
|
10558
10560
|
static {
|
|
10559
10561
|
__name(this, "IndexBuilderOn");
|
|
@@ -10748,7 +10750,7 @@ function alias(table, alias2) {
|
|
|
10748
10750
|
}
|
|
10749
10751
|
__name(alias, "alias");
|
|
10750
10752
|
|
|
10751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10752
10754
|
var ENTITY_TABLES = {
|
|
10753
10755
|
account: "accounts",
|
|
10754
10756
|
attachment: "attachments",
|
|
@@ -10794,7 +10796,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10794
10796
|
return { table, pointer, type, count, known: known2 };
|
|
10795
10797
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
10796
10798
|
|
|
10797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10799
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
10798
10800
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
10799
10801
|
id: integer("id").primaryKey(),
|
|
10800
10802
|
name: text("name").notNull().unique(),
|
|
@@ -10803,7 +10805,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
10803
10805
|
updatedAt: integer("updated_at").notNull()
|
|
10804
10806
|
});
|
|
10805
10807
|
|
|
10806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
10807
10809
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
10808
10810
|
sourceKey: text("source_key").notNull(),
|
|
10809
10811
|
collection: text("collection").notNull(),
|
|
@@ -10813,13 +10815,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
10813
10815
|
createdAt: integer("created_at").notNull()
|
|
10814
10816
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
10815
10817
|
|
|
10816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
10817
10819
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
10818
10820
|
id: integer("id").notNull(),
|
|
10819
10821
|
indexableType: text("indexable_type").notNull()
|
|
10820
10822
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
10821
10823
|
|
|
10822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
10823
10825
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
10824
10826
|
id: integer("id").primaryKey(),
|
|
10825
10827
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -10839,7 +10841,7 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
10839
10841
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
10840
10842
|
]);
|
|
10841
10843
|
|
|
10842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10844
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
10843
10845
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
10844
10846
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
10845
10847
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -10865,7 +10867,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
10865
10867
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
10866
10868
|
]);
|
|
10867
10869
|
|
|
10868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10870
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
10869
10871
|
var accounts = sqliteTable("accounts", {
|
|
10870
10872
|
id: integer("id").primaryKey(),
|
|
10871
10873
|
provider: text("provider").notNull(),
|
|
@@ -12651,7 +12653,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
12651
12653
|
at: integer("at").notNull()
|
|
12652
12654
|
});
|
|
12653
12655
|
|
|
12654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
12655
12657
|
var ARMS = [
|
|
12656
12658
|
[
|
|
12657
12659
|
"message",
|
|
@@ -12778,7 +12780,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
12778
12780
|
return recomputed;
|
|
12779
12781
|
}, "drainInvolvementQueue");
|
|
12780
12782
|
|
|
12781
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
12782
12784
|
import { domainToUnicode } from "node:url";
|
|
12783
12785
|
|
|
12784
12786
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -22800,7 +22802,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
22800
22802
|
}, "oa");
|
|
22801
22803
|
var na = { parse: O, get: aa, isValid: oa };
|
|
22802
22804
|
|
|
22803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
22804
22806
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
22805
22807
|
var ID = /^[\w-]{10,}$/;
|
|
22806
22808
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -22841,7 +22843,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text6) => [...text6.matchAll(L
|
|
|
22841
22843
|
return { url, documentId: googleDocumentId(url) };
|
|
22842
22844
|
}), "googleDocumentLinks");
|
|
22843
22845
|
|
|
22844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
22845
22847
|
var PHONE_PLANS = [
|
|
22846
22848
|
{
|
|
22847
22849
|
country: "us",
|
|
@@ -23221,7 +23223,7 @@ var PHONE_PLANS = [
|
|
|
23221
23223
|
}
|
|
23222
23224
|
];
|
|
23223
23225
|
|
|
23224
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
23225
23227
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
23226
23228
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
23227
23229
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -23262,7 +23264,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
23262
23264
|
return void 0;
|
|
23263
23265
|
}, "nationalPhone");
|
|
23264
23266
|
|
|
23265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
23266
23268
|
var BEFORE = [
|
|
23267
23269
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
23268
23270
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -23522,7 +23524,7 @@ var findPlaces = /* @__PURE__ */ __name((text6) => {
|
|
|
23522
23524
|
return found2.sort((a, b) => a.start - b.start);
|
|
23523
23525
|
}, "findPlaces");
|
|
23524
23526
|
|
|
23525
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
23526
23528
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
23527
23529
|
var MENTION_VERSIONS = {
|
|
23528
23530
|
phone: 1,
|
|
@@ -23712,7 +23714,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
23712
23714
|
};
|
|
23713
23715
|
}, "typedPhone");
|
|
23714
23716
|
|
|
23715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
23716
23718
|
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";
|
|
23717
23719
|
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";
|
|
23718
23720
|
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";
|
|
@@ -23720,7 +23722,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
23720
23722
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
23721
23723
|
var NAME_WORDS = WORDS.split(" ");
|
|
23722
23724
|
|
|
23723
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
23724
23726
|
var LATIN_TO_CYRILLIC = {
|
|
23725
23727
|
shch: "\u0449",
|
|
23726
23728
|
sch: "\u0449",
|
|
@@ -23928,7 +23930,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text6, stem, taken) => {
|
|
|
23928
23930
|
return found2;
|
|
23929
23931
|
}, "findUnknownNames");
|
|
23930
23932
|
|
|
23931
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
23932
23934
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
23933
23935
|
"webpage",
|
|
23934
23936
|
"share",
|
|
@@ -23968,7 +23970,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
|
23968
23970
|
});
|
|
23969
23971
|
}, "matchDownloads");
|
|
23970
23972
|
|
|
23971
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23973
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
23972
23974
|
var QUERY_VERSION = 1;
|
|
23973
23975
|
var QUERY_LIMITS2 = {
|
|
23974
23976
|
...QUERY_LIMITS,
|
|
@@ -24004,7 +24006,7 @@ function exhausted(budget) {
|
|
|
24004
24006
|
}
|
|
24005
24007
|
__name(exhausted, "exhausted");
|
|
24006
24008
|
|
|
24007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
24008
24010
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
24009
24011
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
24010
24012
|
kind: "char",
|
|
@@ -24404,7 +24406,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
24404
24406
|
return out;
|
|
24405
24407
|
}, "foldRegex");
|
|
24406
24408
|
|
|
24407
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
24408
24410
|
var PRESET_VERSION = 1;
|
|
24409
24411
|
var PRESETS = {
|
|
24410
24412
|
password: {
|
|
@@ -24458,7 +24460,7 @@ var PRESETS = {
|
|
|
24458
24460
|
}
|
|
24459
24461
|
};
|
|
24460
24462
|
|
|
24461
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
24462
24464
|
var FIELD_VERSION = 2;
|
|
24463
24465
|
var UNITS = {
|
|
24464
24466
|
"": 1,
|
|
@@ -24919,12 +24921,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
|
|
|
24919
24921
|
return validateFields(parsed3.output);
|
|
24920
24922
|
}, "validateAst");
|
|
24921
24923
|
|
|
24922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
24923
24925
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
24924
24926
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
24925
24927
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
24926
24928
|
|
|
24927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
24928
24930
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
24929
24931
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
24930
24932
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -24948,7 +24950,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
24948
24950
|
};
|
|
24949
24951
|
}, "linkMatch");
|
|
24950
24952
|
|
|
24951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24953
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
24952
24954
|
var SETTING = "phoneCountries";
|
|
24953
24955
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
24954
24956
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -24979,7 +24981,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
24979
24981
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
24980
24982
|
}, "valueMatch");
|
|
24981
24983
|
|
|
24982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24984
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
24983
24985
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
24984
24986
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
24985
24987
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -25007,7 +25009,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
25007
25009
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
25008
25010
|
}, "vocabularySimilarity");
|
|
25009
25011
|
|
|
25010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25012
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
25011
25013
|
import { createHash } from "node:crypto";
|
|
25012
25014
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
25013
25015
|
try {
|
|
@@ -25073,7 +25075,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind4, by, options
|
|
|
25073
25075
|
});
|
|
25074
25076
|
}, "guardTagCreation");
|
|
25075
25077
|
|
|
25076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
25077
25079
|
var invalid2 = /* @__PURE__ */ __name((message2) => {
|
|
25078
25080
|
throw new CliError("validation_error", message2);
|
|
25079
25081
|
}, "invalid");
|
|
@@ -25150,7 +25152,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
25150
25152
|
};
|
|
25151
25153
|
}, "createTagRedirectIndex");
|
|
25152
25154
|
|
|
25153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
25154
25156
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
25155
25157
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
25156
25158
|
if (!row2)
|
|
@@ -25178,7 +25180,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
25178
25180
|
return snapshot2;
|
|
25179
25181
|
}, "tagRedirectSnapshot");
|
|
25180
25182
|
|
|
25181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
25182
25184
|
import { createHash as createHash2 } from "node:crypto";
|
|
25183
25185
|
var TASK_KEY_PREFIXES = {
|
|
25184
25186
|
question: "Q",
|
|
@@ -25206,7 +25208,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
25206
25208
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
25207
25209
|
}, "taskAccountOf");
|
|
25208
25210
|
|
|
25209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
25210
25212
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
25211
25213
|
var REFERABLE = {
|
|
25212
25214
|
note: { tombstone: true },
|
|
@@ -25374,7 +25376,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
25374
25376
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
25375
25377
|
}, "taskIdOf");
|
|
25376
25378
|
|
|
25377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
25378
25380
|
var toMs = /* @__PURE__ */ __name((iso14) => {
|
|
25379
25381
|
if (iso14 === null || iso14 === void 0)
|
|
25380
25382
|
return null;
|
|
@@ -25388,7 +25390,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
25388
25390
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
25389
25391
|
var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
25390
25392
|
|
|
25391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
25392
25394
|
var TAG_KINDS = ["tag", "topic"];
|
|
25393
25395
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
25394
25396
|
var TAG_TYPE = {
|
|
@@ -25591,7 +25593,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
25591
25593
|
return result;
|
|
25592
25594
|
}, "tagsOf");
|
|
25593
25595
|
|
|
25594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25596
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
25595
25597
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
25596
25598
|
var SPEECH = speech("att");
|
|
25597
25599
|
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");
|
|
@@ -25602,7 +25604,7 @@ var ftsMatch = /* @__PURE__ */ __name((node) => {
|
|
|
25602
25604
|
const words3 = node.slop === void 0 ? [] : text6.match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [];
|
|
25603
25605
|
return words3.length > 1 ? nearMatch(words3, node.slop) : quoted(text6);
|
|
25604
25606
|
}, "ftsMatch");
|
|
25605
|
-
var nearMatch = /* @__PURE__ */ __name((words3,
|
|
25607
|
+
var nearMatch = /* @__PURE__ */ __name((words3, apart2) => `NEAR(${words3.map(quoted).join(" ")}, ${apart2})`, "nearMatch");
|
|
25606
25608
|
var combine = /* @__PURE__ */ __name((parts2, operator) => ({
|
|
25607
25609
|
sql: parts2.length ? `(${parts2.map(({ sql: sql2 }) => sql2).join(` ${operator} `)})` : operator === "AND" ? "1" : "0",
|
|
25608
25610
|
params: parts2.flatMap(({ params }) => params),
|
|
@@ -25649,7 +25651,7 @@ var stemMatch = /* @__PURE__ */ __name((stemmer, node) => {
|
|
|
25649
25651
|
const sequences = stemmer.stemSequences(node.value).filter((sequence) => sequence.length);
|
|
25650
25652
|
return sequences.length ? sequences.map((sequence) => sequence.length > 1 ? nearMatch(sequence, node.slop) : quoted(sequence.join(""))).join(" OR ") : void 0;
|
|
25651
25653
|
}, "stemMatch");
|
|
25652
|
-
var near = /* @__PURE__ */ __name((sequence, wanted,
|
|
25654
|
+
var near = /* @__PURE__ */ __name((sequence, wanted, apart2) => {
|
|
25653
25655
|
const events3 = sequence.flatMap((stem, index2) => wanted.includes(stem) ? [{ index: index2, stem }] : []);
|
|
25654
25656
|
const held = /* @__PURE__ */ new Map();
|
|
25655
25657
|
const distinct = new Set(wanted).size;
|
|
@@ -25658,7 +25660,7 @@ var near = /* @__PURE__ */ __name((sequence, wanted, apart) => {
|
|
|
25658
25660
|
held.set(event.stem, (held.get(event.stem) ?? 0) + 1);
|
|
25659
25661
|
while (held.size === distinct) {
|
|
25660
25662
|
const first = events3[left];
|
|
25661
|
-
if (event.index - first.index + 1 - distinct <=
|
|
25663
|
+
if (event.index - first.index + 1 - distinct <= apart2)
|
|
25662
25664
|
return true;
|
|
25663
25665
|
const count = (held.get(first.stem) ?? 1) - 1;
|
|
25664
25666
|
if (count)
|
|
@@ -25955,7 +25957,7 @@ var FIELD_COMPILERS = {
|
|
|
25955
25957
|
subject
|
|
25956
25958
|
};
|
|
25957
25959
|
|
|
25958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25960
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
25959
25961
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
25960
25962
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
25961
25963
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -25971,7 +25973,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
25971
25973
|
};
|
|
25972
25974
|
}, "placeOf");
|
|
25973
25975
|
|
|
25974
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
25975
25977
|
var DRAIN_ON_WRITE = 500;
|
|
25976
25978
|
var METHOD = "rules";
|
|
25977
25979
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -26134,7 +26136,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
26134
26136
|
return queued.length;
|
|
26135
26137
|
}, "drainMentions");
|
|
26136
26138
|
|
|
26137
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
26138
26140
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
26139
26141
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
26140
26142
|
if (!exists2)
|
|
@@ -26142,7 +26144,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
26142
26144
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
26143
26145
|
}, "indexRow");
|
|
26144
26146
|
|
|
26145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
26146
26148
|
var INDEX = "message_stems";
|
|
26147
26149
|
var SETTING2 = "searchStemmers";
|
|
26148
26150
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -26264,14 +26266,10 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
26264
26266
|
};
|
|
26265
26267
|
}, "stemmerCache");
|
|
26266
26268
|
|
|
26267
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
26268
26270
|
var SQLITE_BUSY = 5;
|
|
26269
26271
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
26270
|
-
var isBusy = /* @__PURE__ */ __name((error) =>
|
|
26271
|
-
const { errcode, errno } = error ?? {};
|
|
26272
|
-
const code = errcode ?? errno;
|
|
26273
|
-
return typeof code === "number" && (code & 255) === SQLITE_BUSY;
|
|
26274
|
-
}, "isBusy");
|
|
26272
|
+
var isBusy = /* @__PURE__ */ __name((error) => sqliteCode(error) === SQLITE_BUSY, "isBusy");
|
|
26275
26273
|
var beginImmediate = /* @__PURE__ */ __name((database) => {
|
|
26276
26274
|
const timeout = Number(database.prepare("PRAGMA busy_timeout").get()?.timeout ?? 0);
|
|
26277
26275
|
const deadline = Date.now() + timeout;
|
|
@@ -26359,7 +26357,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
26359
26357
|
}
|
|
26360
26358
|
}, "read");
|
|
26361
26359
|
|
|
26362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
26363
26361
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
26364
26362
|
coalesce(CASE k.chunkable_type
|
|
26365
26363
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -26501,7 +26499,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
26501
26499
|
}, "dropUnusedVectors");
|
|
26502
26500
|
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");
|
|
26503
26501
|
|
|
26504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
26505
26503
|
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({
|
|
26506
26504
|
target: [accounts.provider, accounts.externalId],
|
|
26507
26505
|
set: {
|
|
@@ -26611,7 +26609,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
26611
26609
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
26612
26610
|
}, "dropOrphanPeople");
|
|
26613
26611
|
|
|
26614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
26615
26613
|
var FOLDED = [
|
|
26616
26614
|
{ table: "tasks", column: "title" },
|
|
26617
26615
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -26648,7 +26646,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
26648
26646
|
return filled2;
|
|
26649
26647
|
}, "fillFolded");
|
|
26650
26648
|
|
|
26651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
26652
26650
|
var HISTORY_KEY = "$history";
|
|
26653
26651
|
var objectOf = /* @__PURE__ */ __name((text6) => {
|
|
26654
26652
|
if (typeof text6 !== "string")
|
|
@@ -26724,7 +26722,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
26724
26722
|
return rest;
|
|
26725
26723
|
}, "withoutHistory");
|
|
26726
26724
|
|
|
26727
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
26728
26726
|
import { createHash as createHash3 } from "node:crypto";
|
|
26729
26727
|
var CHUNK_CHARS = 1200;
|
|
26730
26728
|
var CHUNK_OVERLAP = 150;
|
|
@@ -26829,7 +26827,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
26829
26827
|
return chunks2;
|
|
26830
26828
|
}, "cutChunks");
|
|
26831
26829
|
|
|
26832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26830
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
26833
26831
|
var DAY = 864e5;
|
|
26834
26832
|
var CURRENCY = [
|
|
26835
26833
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -26955,7 +26953,7 @@ var dueDayOf = /* @__PURE__ */ __name((text6, createdMs) => {
|
|
|
26955
26953
|
return best?.day ?? null;
|
|
26956
26954
|
}, "dueDayOf");
|
|
26957
26955
|
|
|
26958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
26959
26957
|
var DAY2 = 864e5;
|
|
26960
26958
|
var STOP_WORDS = new Set([
|
|
26961
26959
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -27110,7 +27108,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
27110
27108
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
27111
27109
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
27112
27110
|
|
|
27113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
27114
27112
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
27115
27113
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
27116
27114
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -27381,7 +27379,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
|
|
|
27381
27379
|
};
|
|
27382
27380
|
}, "readiness");
|
|
27383
27381
|
|
|
27384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27382
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
27385
27383
|
var DOCUMENT_PICTURE = "document_picture";
|
|
27386
27384
|
var SCAN_PAGE2 = 5e3;
|
|
27387
27385
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -27444,7 +27442,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
27444
27442
|
}, "nearestPictures")
|
|
27445
27443
|
}), "documentPicturesOver");
|
|
27446
27444
|
|
|
27447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27445
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
27448
27446
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
27449
27447
|
const literal5 = escaped2 ?? plain2 ?? "";
|
|
27450
27448
|
return wildcard ?? (/[*?[]/u.test(literal5) ? `[${literal5}]` : literal5);
|
|
@@ -27509,7 +27507,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
27509
27507
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
27510
27508
|
var bound2 = /* @__PURE__ */ __name(({ sql: text6, params }) => sql.join(text6.split("?").map((part, at) => at < params.length ? sql`${sql.raw(part)}${params[at]}` : sql.raw(part)), sql``), "bound");
|
|
27511
27509
|
|
|
27512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
27513
27511
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
27514
27512
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
27515
27513
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -27599,7 +27597,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
27599
27597
|
});
|
|
27600
27598
|
}, "linkMeeting");
|
|
27601
27599
|
|
|
27602
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27600
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
27603
27601
|
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), ''))";
|
|
27604
27602
|
var UNSEARCHED_EVENT_TYPES = [
|
|
27605
27603
|
"working-location",
|
|
@@ -27831,7 +27829,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
27831
27829
|
return true;
|
|
27832
27830
|
}, "resetNoteIndex");
|
|
27833
27831
|
|
|
27834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27832
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
27835
27833
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
27836
27834
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
27837
27835
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -27850,7 +27848,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
27850
27848
|
}
|
|
27851
27849
|
}, "resolvePersonLinks");
|
|
27852
27850
|
|
|
27853
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27851
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
27854
27852
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
27855
27853
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
27856
27854
|
find: orm.select({
|
|
@@ -28075,7 +28073,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
28075
28073
|
}, "meetingIdentityPk");
|
|
28076
28074
|
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");
|
|
28077
28075
|
|
|
28078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
28079
28077
|
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");
|
|
28080
28078
|
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");
|
|
28081
28079
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -28355,7 +28353,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
28355
28353
|
}
|
|
28356
28354
|
}, "replaceAutoTags");
|
|
28357
28355
|
|
|
28358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
28359
28357
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
28360
28358
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
28361
28359
|
var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
|
|
@@ -28374,7 +28372,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
28374
28372
|
return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
|
|
28375
28373
|
}, "counterFreshness");
|
|
28376
28374
|
|
|
28377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
28378
28376
|
import { createHash as createHash4 } from "node:crypto";
|
|
28379
28377
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
28380
28378
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -28472,7 +28470,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
28472
28470
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
28473
28471
|
}, "contextEvidenceRequest");
|
|
28474
28472
|
|
|
28475
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28473
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
28476
28474
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
28477
28475
|
var ACTIVITY = `
|
|
28478
28476
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -28602,7 +28600,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
28602
28600
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
28603
28601
|
}), "mailActivity");
|
|
28604
28602
|
|
|
28605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
28606
28604
|
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");
|
|
28607
28605
|
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;
|
|
28608
28606
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -28743,7 +28741,7 @@ var mailOwnText = /* @__PURE__ */ __name((body2) => {
|
|
|
28743
28741
|
return text6 || body2.trim();
|
|
28744
28742
|
}, "mailOwnText");
|
|
28745
28743
|
|
|
28746
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28744
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
28747
28745
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
28748
28746
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
28749
28747
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
|
|
@@ -28853,7 +28851,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
28853
28851
|
return emails3 + threads;
|
|
28854
28852
|
}, "drainEmailIndex");
|
|
28855
28853
|
|
|
28856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
28857
28855
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
28858
28856
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
28859
28857
|
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,
|
|
@@ -28951,7 +28949,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
28951
28949
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
28952
28950
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
28953
28951
|
|
|
28954
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
28955
28953
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
28956
28954
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
28957
28955
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -29001,7 +28999,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
29001
28999
|
return threads.length;
|
|
29002
29000
|
}, "markEmailsRestored");
|
|
29003
29001
|
|
|
29004
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29002
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
29005
29003
|
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
|
|
29006
29004
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
29007
29005
|
WHERE p.account_id = ?
|
|
@@ -29061,7 +29059,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
29061
29059
|
}, "indexedMailPieces");
|
|
29062
29060
|
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");
|
|
29063
29061
|
|
|
29064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29062
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
29065
29063
|
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");
|
|
29066
29064
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
29067
29065
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -29128,7 +29126,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
29128
29126
|
}
|
|
29129
29127
|
}), "mailRulesOver");
|
|
29130
29128
|
|
|
29131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
29132
29130
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
29133
29131
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
29134
29132
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -29136,7 +29134,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
29136
29134
|
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);
|
|
29137
29135
|
}, "reviewLink");
|
|
29138
29136
|
|
|
29139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
29140
29138
|
function checkMeetingCancelled(signal) {
|
|
29141
29139
|
if (!signal?.aborted)
|
|
29142
29140
|
return;
|
|
@@ -29147,7 +29145,7 @@ function checkMeetingCancelled(signal) {
|
|
|
29147
29145
|
}
|
|
29148
29146
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
29149
29147
|
|
|
29150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
29151
29149
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
29152
29150
|
id: Number(row2.id),
|
|
29153
29151
|
accountId: Number(row2.account_id),
|
|
@@ -29197,7 +29195,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
29197
29195
|
createdAt: Number(row2.created_at)
|
|
29198
29196
|
}), "transcriptRowOf");
|
|
29199
29197
|
|
|
29200
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
29201
29199
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
29202
29200
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
29203
29201
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -29364,7 +29362,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
29364
29362
|
}
|
|
29365
29363
|
}), "meetingReadsOver");
|
|
29366
29364
|
|
|
29367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
29368
29366
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
29369
29367
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
29370
29368
|
const params = [input.accountId];
|
|
@@ -29407,7 +29405,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
29407
29405
|
return { clauses, params };
|
|
29408
29406
|
}, "meetingSelectionSql");
|
|
29409
29407
|
|
|
29410
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
29411
29409
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
29412
29410
|
async meetingChatLines(input) {
|
|
29413
29411
|
checkMeetingCancelled(input.signal);
|
|
@@ -29435,7 +29433,22 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
29435
29433
|
}
|
|
29436
29434
|
}), "meetingChatLinesOver");
|
|
29437
29435
|
|
|
29438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
29437
|
+
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");
|
|
29438
|
+
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
29439
|
+
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
29440
|
+
OR EXISTS (SELECT 1 FROM identity_link_events held WHERE held.to_person_id = moved.from_person_id
|
|
29441
|
+
AND held.identity_id IN (SELECT value FROM json_each(?))))`;
|
|
29442
|
+
var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
29443
|
+
const ids = /* @__PURE__ */ __name((side) => JSON.stringify(side.identities), "ids");
|
|
29444
|
+
const person2 = /* @__PURE__ */ __name((side) => JSON.stringify(side.person === void 0 ? [] : [side.person]), "person");
|
|
29445
|
+
return database.prepare(`SELECT 1 FROM identity_link_events moved WHERE moved.author = 'owner'
|
|
29446
|
+
AND ((${MOVED_AWAY}) OR (${MOVED_AWAY})) LIMIT 1`).get(ids(one2), person2(other), ids(other), ids(other), person2(one2), ids(one2)) !== void 0;
|
|
29447
|
+
}, "apart");
|
|
29448
|
+
var separated = /* @__PURE__ */ __name((context, one2, other) => one2 !== other && apart(context, { identities: identitiesOf(context, one2), person: one2 }, { identities: identitiesOf(context, other), person: other }), "separated");
|
|
29449
|
+
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
29450
|
+
|
|
29451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
29439
29452
|
var MESSAGE_FIELDS = {
|
|
29440
29453
|
pk: messages.id,
|
|
29441
29454
|
nativeId: messages.externalId,
|
|
@@ -29606,7 +29619,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
29606
29619
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
29607
29620
|
}), "chatActivity");
|
|
29608
29621
|
|
|
29609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
29610
29623
|
var HIT_FIELDS = {
|
|
29611
29624
|
...MESSAGE_FIELDS,
|
|
29612
29625
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -29705,7 +29718,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
29705
29718
|
};
|
|
29706
29719
|
}, "directReplies");
|
|
29707
29720
|
|
|
29708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29721
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
29709
29722
|
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");
|
|
29710
29723
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
29711
29724
|
const found2 = identityRow(context, ref3);
|
|
@@ -29728,14 +29741,18 @@ var recordOf2 = /* @__PURE__ */ __name(({ orm }, personPk) => {
|
|
|
29728
29741
|
linkedBy: identityLinks.author,
|
|
29729
29742
|
linkedAt: identityLinks.createdAt
|
|
29730
29743
|
}).from(identityLinks).innerJoin(identities, eq(identities.id, identityLinks.identityId)).where(eq(identityLinks.personId, personPk)).orderBy(identities.provider, identities.externalId).all();
|
|
29731
|
-
const seen = orm.select({ identityPk: accountIdentities.identityId, account: accounts.externalId }).from(accountIdentities).innerJoin(accounts, eq(accounts.id, accountIdentities.accountId)).where(inArray(accountIdentities.identityId, rows.map((row2) => row2.pk))).all();
|
|
29732
|
-
const
|
|
29733
|
-
|
|
29734
|
-
|
|
29735
|
-
|
|
29736
|
-
|
|
29737
|
-
|
|
29738
|
-
|
|
29744
|
+
const seen = orm.select({ identityPk: accountIdentities.identityId, account: accounts.externalId, scope: accounts.scope }).from(accountIdentities).innerJoin(accounts, eq(accounts.id, accountIdentities.accountId)).where(inArray(accountIdentities.identityId, rows.map((row2) => row2.pk))).all();
|
|
29745
|
+
const identitiesOf2 = rows.map(({ pk, isBot, linkedAt, ...row2 }) => {
|
|
29746
|
+
const seenIn = seen.filter((one2) => one2.identityPk === pk).map(({ account, scope: scope3 }) => ({ account, scope: scope3 }));
|
|
29747
|
+
return {
|
|
29748
|
+
...row2,
|
|
29749
|
+
isBot: isBot === null ? null : isBot === 1,
|
|
29750
|
+
accounts: seenIn.map((one2) => one2.account),
|
|
29751
|
+
seenIn,
|
|
29752
|
+
linkedAt: new Date(linkedAt).toISOString()
|
|
29753
|
+
};
|
|
29754
|
+
});
|
|
29755
|
+
return { uid: String(person2.id), name: person2.name, identities: identitiesOf2 };
|
|
29739
29756
|
}, "recordOf");
|
|
29740
29757
|
var personByUid = /* @__PURE__ */ __name((context, uid) => {
|
|
29741
29758
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(Number(uid)))
|
|
@@ -29754,6 +29771,10 @@ var move = /* @__PURE__ */ __name((context, identityPk2, from2, to, { method, by
|
|
|
29754
29771
|
}, "move");
|
|
29755
29772
|
var linkIdentityToPerson = /* @__PURE__ */ __name((context, identityPk2, target, options) => {
|
|
29756
29773
|
const found2 = context.orm.select({ personId: identityLinks.personId }).from(identityLinks).where(eq(identityLinks.identityId, identityPk2)).get();
|
|
29774
|
+
if (options.by !== "owner" && found2?.personId !== target && identitySeparated(context, identityPk2, target))
|
|
29775
|
+
throw new CliError("conflict", "the owner separated this identity from that person; only the owner links it again", {
|
|
29776
|
+
reason: "identity.separated"
|
|
29777
|
+
});
|
|
29757
29778
|
if (found2) {
|
|
29758
29779
|
move(context, identityPk2, found2.personId, target, options);
|
|
29759
29780
|
return;
|
|
@@ -29792,11 +29813,6 @@ var mergePerson = /* @__PURE__ */ __name((context, from2, to, options) => {
|
|
|
29792
29813
|
for (const { identityPk: identityPk2 } of together)
|
|
29793
29814
|
move(context, identityPk2, from2, to, options);
|
|
29794
29815
|
}, "mergePerson");
|
|
29795
|
-
var separatedByOwner = /* @__PURE__ */ __name(({ database }, one2, other) => database.prepare(`SELECT 1 FROM identity_link_events moved
|
|
29796
|
-
JOIN identity_link_events held ON held.to_person_id = moved.from_person_id
|
|
29797
|
-
WHERE moved.author = 'owner' AND ((moved.identity_id = ? AND held.identity_id = ?)
|
|
29798
|
-
OR (moved.identity_id = ? AND held.identity_id = ?))
|
|
29799
|
-
LIMIT 1`).get(one2, other, other, one2) !== void 0, "separatedByOwner");
|
|
29800
29816
|
var joinByAddress = /* @__PURE__ */ __name((context, ref3, address, by) => {
|
|
29801
29817
|
const key2 = address.trim().toLowerCase();
|
|
29802
29818
|
if (!/^[^\s@]+@[^\s@]+$/.test(key2) || ref3.provider === "email")
|
|
@@ -29807,7 +29823,7 @@ var joinByAddress = /* @__PURE__ */ __name((context, ref3, address, by) => {
|
|
|
29807
29823
|
if (!mail)
|
|
29808
29824
|
identityOf(context, "email", key2, null);
|
|
29809
29825
|
const contact = required(context, { provider: "email", id: mail ? String(mail.external_id) : key2 });
|
|
29810
|
-
if (contact.personPk === found2.personPk ||
|
|
29826
|
+
if (contact.personPk === found2.personPk || separated(context, found2.personPk, contact.personPk))
|
|
29811
29827
|
return;
|
|
29812
29828
|
mergePerson(context, found2.personPk, contact.personPk, { method: "same-email", by });
|
|
29813
29829
|
resolvePersonLinks(context.database, recordOf2(context, contact.personPk).identities.flatMap(({ name, username }) => [name, username]));
|
|
@@ -29836,7 +29852,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
29836
29852
|
}, "mentioning");
|
|
29837
29853
|
var escaped = /* @__PURE__ */ __name((text6) => text6.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
29838
29854
|
|
|
29839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29855
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
29840
29856
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
29841
29857
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
29842
29858
|
}, "missing");
|
|
@@ -29958,7 +29974,7 @@ function meetingContextLinksOver(context) {
|
|
|
29958
29974
|
}
|
|
29959
29975
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
29960
29976
|
|
|
29961
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
29962
29978
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
29963
29979
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
29964
29980
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -29987,7 +30003,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
29987
30003
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
29988
30004
|
}, "indexedText");
|
|
29989
30005
|
|
|
29990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
29991
30007
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
29992
30008
|
var meetingCurrentIndexRows = `
|
|
29993
30009
|
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
|
|
@@ -30018,7 +30034,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
30018
30034
|
}, "invalidateMeetingStems");
|
|
30019
30035
|
var meetingStemmableText = /* @__PURE__ */ __name((text6) => text6.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
30020
30036
|
|
|
30021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30037
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
30022
30038
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
30023
30039
|
return {
|
|
30024
30040
|
async indexSearch(original) {
|
|
@@ -30086,10 +30102,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
30086
30102
|
}
|
|
30087
30103
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
30088
30104
|
|
|
30089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
30090
30106
|
import { createHash as createHash5 } from "node:crypto";
|
|
30091
30107
|
|
|
30092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30108
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/lucene/plain.js
|
|
30093
30109
|
var REPAIRED = /* @__PURE__ */ new Set([
|
|
30094
30110
|
"query.invalid-syntax",
|
|
30095
30111
|
"query.unclosed-literal",
|
|
@@ -30194,7 +30210,7 @@ var plainQuery = /* @__PURE__ */ __name((text6, fields4 = SEARCH_FIELDS) => {
|
|
|
30194
30210
|
return text6;
|
|
30195
30211
|
}, "plainQuery");
|
|
30196
30212
|
|
|
30197
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
30198
30214
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
30199
30215
|
const padded = ` ${term} `;
|
|
30200
30216
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -30203,7 +30219,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
30203
30219
|
return [...pieces];
|
|
30204
30220
|
}, "trigrams");
|
|
30205
30221
|
|
|
30206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
30207
30223
|
var SHORTEST_CORRECTION = 3;
|
|
30208
30224
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
30209
30225
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -30250,7 +30266,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
30250
30266
|
return corrections;
|
|
30251
30267
|
}, "correctWords");
|
|
30252
30268
|
|
|
30253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
30254
30270
|
var SHORTEST_GARBLED = 4;
|
|
30255
30271
|
var MOST_WIDENED = 64;
|
|
30256
30272
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -30342,7 +30358,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
30342
30358
|
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));
|
|
30343
30359
|
}, "widenWords");
|
|
30344
30360
|
|
|
30345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
30346
30362
|
import { readFileSync } from "node:fs";
|
|
30347
30363
|
var loaded;
|
|
30348
30364
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -30401,7 +30417,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
30401
30417
|
return false;
|
|
30402
30418
|
}, "knownRussianWord");
|
|
30403
30419
|
|
|
30404
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
30405
30421
|
var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
30406
30422
|
var MOST_WORDS = 128;
|
|
30407
30423
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -30628,7 +30644,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text6, stemmer) => {
|
|
|
30628
30644
|
return check3(tree);
|
|
30629
30645
|
}, "matchMeetingText");
|
|
30630
30646
|
|
|
30631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30647
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
30632
30648
|
var fail3 = /* @__PURE__ */ __name((message2) => {
|
|
30633
30649
|
throw new CliError("validation_error", message2);
|
|
30634
30650
|
}, "fail");
|
|
@@ -30810,7 +30826,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
30810
30826
|
}
|
|
30811
30827
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
30812
30828
|
|
|
30813
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30829
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
30814
30830
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30815
30831
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
30816
30832
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -30842,7 +30858,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30842
30858
|
}
|
|
30843
30859
|
}), "meetingLanguagesOver");
|
|
30844
30860
|
|
|
30845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
30846
30862
|
import { createHash as createHash6 } from "node:crypto";
|
|
30847
30863
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
30848
30864
|
if (value === void 0)
|
|
@@ -30932,7 +30948,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
30932
30948
|
}
|
|
30933
30949
|
}), "meetingParticipantSearchOver");
|
|
30934
30950
|
|
|
30935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30951
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
30936
30952
|
var preparationQueries = {
|
|
30937
30953
|
participants: {
|
|
30938
30954
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -30982,7 +30998,7 @@ var preparationQueries = {
|
|
|
30982
30998
|
}
|
|
30983
30999
|
};
|
|
30984
31000
|
|
|
30985
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31001
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
30986
31002
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30987
31003
|
async preparationContext(original) {
|
|
30988
31004
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -31023,7 +31039,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31023
31039
|
}
|
|
31024
31040
|
}), "meetingPreparationContextOver");
|
|
31025
31041
|
|
|
31026
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
31027
31043
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
31028
31044
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
31029
31045
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -31037,7 +31053,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
31037
31053
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
31038
31054
|
)`, "preparationSubjects");
|
|
31039
31055
|
|
|
31040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
31041
31057
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
31042
31058
|
async preparationKnowledge(original) {
|
|
31043
31059
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -31082,7 +31098,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
31082
31098
|
}
|
|
31083
31099
|
}), "meetingPreparationKnowledgeOver");
|
|
31084
31100
|
|
|
31085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31101
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
31086
31102
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
31087
31103
|
async preparationNotes(original) {
|
|
31088
31104
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -31135,7 +31151,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31135
31151
|
}
|
|
31136
31152
|
}), "meetingPreparationNotesOver");
|
|
31137
31153
|
|
|
31138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31154
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
31139
31155
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
31140
31156
|
async relatedHistory(original) {
|
|
31141
31157
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -31206,7 +31222,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31206
31222
|
}
|
|
31207
31223
|
}), "meetingRelatedHistoryOver");
|
|
31208
31224
|
|
|
31209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
31210
31226
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
31211
31227
|
var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
31212
31228
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -31287,7 +31303,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31287
31303
|
}
|
|
31288
31304
|
}), "meetingReviewOver");
|
|
31289
31305
|
|
|
31290
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
31291
31307
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
31292
31308
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
31293
31309
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -31341,7 +31357,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31341
31357
|
}
|
|
31342
31358
|
}), "meetingSeriesHistoryOver");
|
|
31343
31359
|
|
|
31344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
31345
31361
|
var MOST_ROWS = 5e5;
|
|
31346
31362
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
31347
31363
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -31410,7 +31426,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31410
31426
|
}
|
|
31411
31427
|
}), "meetingStatsOver");
|
|
31412
31428
|
|
|
31413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31429
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
31414
31430
|
var CURSOR_KEY = "meetings";
|
|
31415
31431
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
31416
31432
|
id: Number(row2.id),
|
|
@@ -31979,7 +31995,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31979
31995
|
};
|
|
31980
31996
|
}, "meetingStoreOver");
|
|
31981
31997
|
|
|
31982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
31983
31999
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
31984
32000
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
31985
32001
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -32005,7 +32021,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
32005
32021
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
32006
32022
|
}, "release");
|
|
32007
32023
|
|
|
32008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32024
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
32009
32025
|
var THREAD_COLUMNS = {
|
|
32010
32026
|
subject: {
|
|
32011
32027
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -32022,7 +32038,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
32022
32038
|
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);
|
|
32023
32039
|
}, "threadRows");
|
|
32024
32040
|
|
|
32025
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32041
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
32026
32042
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
32027
32043
|
id: `email:${place.emailId}`,
|
|
32028
32044
|
chatId: place.threadExternalId,
|
|
@@ -32560,7 +32576,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
32560
32576
|
}
|
|
32561
32577
|
}), "mailStoreOver");
|
|
32562
32578
|
|
|
32563
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
32564
32580
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
32565
32581
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
32566
32582
|
var folded4 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -32650,7 +32666,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
32650
32666
|
}, "knownWord");
|
|
32651
32667
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
32652
32668
|
|
|
32653
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32669
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
32654
32670
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
32655
32671
|
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");
|
|
32656
32672
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -32736,7 +32752,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
32736
32752
|
return found2;
|
|
32737
32753
|
}, "spokenTranscripts");
|
|
32738
32754
|
|
|
32739
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
32740
32756
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
32741
32757
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
32742
32758
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -32783,7 +32799,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
32783
32799
|
});
|
|
32784
32800
|
}, "placeHits");
|
|
32785
32801
|
|
|
32786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
32787
32803
|
var GROUPS = {
|
|
32788
32804
|
chat: {
|
|
32789
32805
|
key: "m.chat_id",
|
|
@@ -32805,7 +32821,7 @@ var GROUPS = {
|
|
|
32805
32821
|
}
|
|
32806
32822
|
};
|
|
32807
32823
|
|
|
32808
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
32809
32825
|
var MESSAGES2 = {
|
|
32810
32826
|
rows: "messages",
|
|
32811
32827
|
threads: "chats",
|
|
@@ -33288,7 +33304,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
33288
33304
|
};
|
|
33289
33305
|
}, "runCompiled");
|
|
33290
33306
|
|
|
33291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
33292
33308
|
function invalidMetadata() {
|
|
33293
33309
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
33294
33310
|
}
|
|
@@ -33390,7 +33406,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
33390
33406
|
};
|
|
33391
33407
|
}), "counterTargets");
|
|
33392
33408
|
|
|
33393
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
33394
33410
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind4) => `'${kind4}'`).join(",");
|
|
33395
33411
|
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,
|
|
33396
33412
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -33509,7 +33525,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
33509
33525
|
}));
|
|
33510
33526
|
}, "attachmentViews");
|
|
33511
33527
|
|
|
33512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33528
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
33513
33529
|
var transcript = /* @__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");
|
|
33514
33530
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text6, source2) => {
|
|
33515
33531
|
const { orm, database, now: now2 } = context;
|
|
@@ -33547,7 +33563,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
33547
33563
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
33548
33564
|
}, "intoVoiceAttachment");
|
|
33549
33565
|
|
|
33550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
33551
33567
|
var FIELDS = [
|
|
33552
33568
|
"threadExternalId",
|
|
33553
33569
|
"senderIdentityId",
|
|
@@ -33864,7 +33880,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
33864
33880
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
33865
33881
|
}, "writeDerivedReactions");
|
|
33866
33882
|
|
|
33867
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
33868
33884
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
33869
33885
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
33870
33886
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -33885,7 +33901,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
33885
33901
|
};
|
|
33886
33902
|
}, "keysOver");
|
|
33887
33903
|
|
|
33888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33904
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
33889
33905
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
33890
33906
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
33891
33907
|
if (!row2)
|
|
@@ -33920,7 +33936,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
33920
33936
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
33921
33937
|
}, "saveProfile");
|
|
33922
33938
|
|
|
33923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
33924
33940
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
33925
33941
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
33926
33942
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -33977,17 +33993,18 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
33977
33993
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
33978
33994
|
}, "proposedBySql");
|
|
33979
33995
|
|
|
33980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
33981
33997
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
33982
33998
|
const owner = ownerPerson(context.database).id;
|
|
33983
33999
|
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);
|
|
33984
34000
|
if (strays.length === 0)
|
|
33985
34001
|
return 0;
|
|
33986
|
-
write(context.database, () => {
|
|
33987
|
-
|
|
33988
|
-
|
|
34002
|
+
return write(context.database, () => {
|
|
34003
|
+
const joining = strays.map(({ person: person2 }) => Number(person2)).filter((person2) => !separated(context, person2, owner));
|
|
34004
|
+
for (const person2 of joining)
|
|
34005
|
+
mergePerson(context, person2, owner, { method: "account", by: "rules" });
|
|
34006
|
+
return joining.length;
|
|
33989
34007
|
});
|
|
33990
|
-
return strays.length;
|
|
33991
34008
|
}, "linkOwnIdentities");
|
|
33992
34009
|
var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
33993
34010
|
const owner = ownerPerson(context.database).id;
|
|
@@ -33998,7 +34015,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
33998
34015
|
return personOf(context, ref3);
|
|
33999
34016
|
}, "linkToOwner");
|
|
34000
34017
|
|
|
34001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
34002
34019
|
var PROVIDERS_SETTING = "providers";
|
|
34003
34020
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
34004
34021
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -34033,7 +34050,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
34033
34050
|
});
|
|
34034
34051
|
}, "registerProvider");
|
|
34035
34052
|
|
|
34036
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
34037
34054
|
var DAY3 = 864e5;
|
|
34038
34055
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
34039
34056
|
var TEXT_LIMIT = 20;
|
|
@@ -34232,7 +34249,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
34232
34249
|
};
|
|
34233
34250
|
}, "taskSimilarityOver");
|
|
34234
34251
|
|
|
34235
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
34236
34253
|
var SETTING3 = "taskCategories";
|
|
34237
34254
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
34238
34255
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -34251,7 +34268,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
34251
34268
|
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);
|
|
34252
34269
|
}, "saveTaskCategories");
|
|
34253
34270
|
|
|
34254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
34255
34272
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
34256
34273
|
var ALLOWED = "taskAgentClose";
|
|
34257
34274
|
var MIN = "taskAgentCloseMin";
|
|
@@ -34307,10 +34324,10 @@ var SUGGESTION_COLUMNS = [
|
|
|
34307
34324
|
];
|
|
34308
34325
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
34309
34326
|
|
|
34310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
34311
34328
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
34312
34329
|
|
|
34313
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
34314
34331
|
var TASK_CLOSE_KIND = "task_close";
|
|
34315
34332
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
34316
34333
|
var isOwnerOnlyKind = /* @__PURE__ */ __name((kind4) => kind4 === MAIL_FINDINGS_KIND || kind4 === MEETING_FINDINGS_KIND || kind4 === TASK_CLOSE_KIND, "isOwnerOnlyKind");
|
|
@@ -34358,7 +34375,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
34358
34375
|
}, "assertMayDecide");
|
|
34359
34376
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
34360
34377
|
|
|
34361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34378
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/deals.js
|
|
34362
34379
|
var DEAL_KINDS = ["deal", "lead"];
|
|
34363
34380
|
var DEAL_STATUSES = ["open", "won", "lost"];
|
|
34364
34381
|
var STAGE_OUTCOMES = DEAL_STATUSES;
|
|
@@ -34368,7 +34385,7 @@ var dealLine = /* @__PURE__ */ __name((deal) => {
|
|
|
34368
34385
|
return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
|
|
34369
34386
|
}, "dealLine");
|
|
34370
34387
|
|
|
34371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
34372
34389
|
var PROFILE_PLACEHOLDER = "<profile>";
|
|
34373
34390
|
var oneLine = /* @__PURE__ */ __name((text6) => singleLine(text6.replace(/\s+/g, " ").trim()), "oneLine");
|
|
34374
34391
|
var openKind = /* @__PURE__ */ __name((kind4) => kind4 === "email" ? "message" : kind4 === "email_thread" ? "chat" : kind4 === "unknown" ? void 0 : kind4, "openKind");
|
|
@@ -34424,7 +34441,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
|
|
|
34424
34441
|
return `${WORDS2[summary.kind]} ${named3}${notes2 === "" ? "" : ` (${notes2})`}`;
|
|
34425
34442
|
}, "refLabel");
|
|
34426
34443
|
|
|
34427
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
34428
34445
|
var EXCERPT_CHARS = 280;
|
|
34429
34446
|
var TITLE_CHARS = 120;
|
|
34430
34447
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -34797,7 +34814,7 @@ var refReadsOf = /* @__PURE__ */ __name((database, texts2, { excerpt = false } =
|
|
|
34797
34814
|
var summaryOf2 = /* @__PURE__ */ __name(({ sender, excerpt, ...summary }, withExcerpt) => withExcerpt ? { ...summary, excerpt } : summary, "summaryOf");
|
|
34798
34815
|
var refSummariesOf = /* @__PURE__ */ __name((database, texts2, options = {}) => new Map([...refReadsOf(database, texts2, options)].map(([text6, read3]) => [text6, summaryOf2(read3, options.excerpt === true)])), "refSummariesOf");
|
|
34799
34816
|
|
|
34800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34817
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
34801
34818
|
var sourceOf3 = /* @__PURE__ */ __name((read3, ref3) => ({
|
|
34802
34819
|
ref: ref3,
|
|
34803
34820
|
kind: read3.kind,
|
|
@@ -34833,7 +34850,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
34833
34850
|
});
|
|
34834
34851
|
}, "evidenceSourcesOf");
|
|
34835
34852
|
|
|
34836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34853
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
34837
34854
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
34838
34855
|
var MAX_TEXT_CHARS = 2e6;
|
|
34839
34856
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -34859,7 +34876,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
34859
34876
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
34860
34877
|
}, "pdfPreviewLimits");
|
|
34861
34878
|
|
|
34862
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
34863
34880
|
import { randomBytes } from "node:crypto";
|
|
34864
34881
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
34865
34882
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -34872,7 +34889,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
34872
34889
|
return time3 + random;
|
|
34873
34890
|
}, "ulid");
|
|
34874
34891
|
|
|
34875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
34876
34893
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
34877
34894
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
34878
34895
|
if (!meta && !sections?.length)
|
|
@@ -34893,7 +34910,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
34893
34910
|
return typeof language === "string" && language !== "" ? language : null;
|
|
34894
34911
|
}, "languageOf");
|
|
34895
34912
|
|
|
34896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34913
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
34897
34914
|
var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
34898
34915
|
var objectOf2 = /* @__PURE__ */ __name((value) => {
|
|
34899
34916
|
if (isObject(value))
|
|
@@ -35136,7 +35153,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
35136
35153
|
};
|
|
35137
35154
|
}, "filesStoreOver");
|
|
35138
35155
|
|
|
35139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
35140
35157
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
35141
35158
|
entity: "document",
|
|
35142
35159
|
backend: "sql",
|
|
@@ -35182,7 +35199,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
35182
35199
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
35183
35200
|
}, "importedDocumentWhere");
|
|
35184
35201
|
|
|
35185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
35186
35203
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
35187
35204
|
const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
|
|
35188
35205
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -35203,7 +35220,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
35203
35220
|
return changed;
|
|
35204
35221
|
}, "dateFileNotes");
|
|
35205
35222
|
|
|
35206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
35207
35224
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
35208
35225
|
var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
35209
35226
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
|
|
@@ -35732,7 +35749,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35732
35749
|
};
|
|
35733
35750
|
}, "notesStoreOver");
|
|
35734
35751
|
|
|
35735
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35752
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
35736
35753
|
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";
|
|
35737
35754
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
35738
35755
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -35954,7 +35971,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35954
35971
|
};
|
|
35955
35972
|
}, "memoriesStoreOver");
|
|
35956
35973
|
|
|
35957
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
35958
35975
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
35959
35976
|
var KEY = "taskFirstPassPerChat";
|
|
35960
35977
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -35974,7 +35991,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
35974
35991
|
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);
|
|
35975
35992
|
}, "saveFirstPassPerChat");
|
|
35976
35993
|
|
|
35977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35994
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
35978
35995
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
35979
35996
|
var EXTERNAL_ID_CHARS = 200;
|
|
35980
35997
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -36001,7 +36018,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
36001
36018
|
return text6;
|
|
36002
36019
|
}, "sourceUrlOf");
|
|
36003
36020
|
|
|
36004
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
36005
36022
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
36006
36023
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
36007
36024
|
name,
|
|
@@ -36224,7 +36241,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
36224
36241
|
return root === void 0 ? void 0 : { ...query, root };
|
|
36225
36242
|
}, "withoutField");
|
|
36226
36243
|
|
|
36227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36244
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
36228
36245
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
36229
36246
|
if (row2.author_type == null)
|
|
36230
36247
|
return null;
|
|
@@ -36252,7 +36269,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
36252
36269
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
36253
36270
|
}, "addComment");
|
|
36254
36271
|
|
|
36255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36272
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
36256
36273
|
var TASK_RELATION_KINDS = [
|
|
36257
36274
|
"blocked-by",
|
|
36258
36275
|
"follow-up-of",
|
|
@@ -36382,7 +36399,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
36382
36399
|
};
|
|
36383
36400
|
}, "taskRelationsStoreOver");
|
|
36384
36401
|
|
|
36385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
36386
36403
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
36387
36404
|
var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
36388
36405
|
var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind4, changes, at) => {
|
|
@@ -36911,7 +36928,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
36911
36928
|
};
|
|
36912
36929
|
}, "workTasksOver");
|
|
36913
36930
|
|
|
36914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
36915
36932
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
36916
36933
|
const { database, now: now2 } = context;
|
|
36917
36934
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -36960,7 +36977,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
36960
36977
|
};
|
|
36961
36978
|
}, "taskCloseOver");
|
|
36962
36979
|
|
|
36963
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
36964
36981
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
36965
36982
|
const { database, now: now2 } = context;
|
|
36966
36983
|
const required3 = /* @__PURE__ */ __name((id2) => {
|
|
@@ -37178,7 +37195,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
37178
37195
|
};
|
|
37179
37196
|
}, "taskPairsOver");
|
|
37180
37197
|
|
|
37181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
37182
37199
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
37183
37200
|
var TASK_STATS_SQL = {
|
|
37184
37201
|
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"),
|
|
@@ -37217,7 +37234,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
37217
37234
|
}, "statNames")
|
|
37218
37235
|
}), "taskStatsOver");
|
|
37219
37236
|
|
|
37220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
37221
37238
|
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";
|
|
37222
37239
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
37223
37240
|
const key2 = inboxKey(account);
|
|
@@ -37424,7 +37441,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
37424
37441
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
37425
37442
|
}, "oneOf");
|
|
37426
37443
|
|
|
37427
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
37428
37445
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
37429
37446
|
const { database } = context;
|
|
37430
37447
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -37469,7 +37486,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
37469
37486
|
};
|
|
37470
37487
|
}, "accountsStoreOver");
|
|
37471
37488
|
|
|
37472
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
37473
37490
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
37474
37491
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
37475
37492
|
const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -37493,7 +37510,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
37493
37510
|
})), "keepDownloads");
|
|
37494
37511
|
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");
|
|
37495
37512
|
|
|
37496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
37497
37514
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
37498
37515
|
const { database } = context;
|
|
37499
37516
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -37550,7 +37567,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
37550
37567
|
}, "keepAttachmentText")
|
|
37551
37568
|
}), "attachmentsStoreOver");
|
|
37552
37569
|
|
|
37553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
37554
37571
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
37555
37572
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
37556
37573
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -37730,7 +37747,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
37730
37747
|
return done;
|
|
37731
37748
|
}, "rekeyChats");
|
|
37732
37749
|
|
|
37733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
37734
37751
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
37735
37752
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
37736
37753
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -37788,7 +37805,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
37788
37805
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
37789
37806
|
}, "chatCoverage");
|
|
37790
37807
|
|
|
37791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
37792
37809
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
37793
37810
|
const { database } = context;
|
|
37794
37811
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -37923,7 +37940,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37923
37940
|
};
|
|
37924
37941
|
}, "chatsStoreOver");
|
|
37925
37942
|
|
|
37926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
37927
37944
|
import { createHash as createHash7 } from "node:crypto";
|
|
37928
37945
|
var BATCH_CONTEXT = 50;
|
|
37929
37946
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -38061,7 +38078,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
38061
38078
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
38062
38079
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
38063
38080
|
|
|
38064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38081
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
38065
38082
|
import { setTimeout } from "node:timers/promises";
|
|
38066
38083
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
38067
38084
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -38373,7 +38390,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
38373
38390
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
38374
38391
|
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");
|
|
38375
38392
|
|
|
38376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
38377
38394
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
38378
38395
|
const { database } = context;
|
|
38379
38396
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -38480,7 +38497,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
38480
38497
|
};
|
|
38481
38498
|
}, "conversationsStoreOver");
|
|
38482
38499
|
|
|
38483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
38484
38501
|
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";
|
|
38485
38502
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
38486
38503
|
const { database } = context;
|
|
@@ -38505,7 +38522,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
38505
38522
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
38506
38523
|
}), "countersStoreOver");
|
|
38507
38524
|
|
|
38508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
38509
38526
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
38510
38527
|
var MENTION_QUERY = defineQuery({
|
|
38511
38528
|
entity: "mention",
|
|
@@ -38721,7 +38738,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
38721
38738
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
38722
38739
|
}, "listPlaces");
|
|
38723
38740
|
|
|
38724
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38741
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
38725
38742
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
38726
38743
|
const { database } = context;
|
|
38727
38744
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -38756,7 +38773,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
38756
38773
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
38757
38774
|
}), "mentionsStoreOver");
|
|
38758
38775
|
|
|
38759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
38760
38777
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
38761
38778
|
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");
|
|
38762
38779
|
const rows = messageId === void 0 ? read3.all(chatKey) : read3.all(chatKey, messageId);
|
|
@@ -38771,7 +38788,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
38771
38788
|
}));
|
|
38772
38789
|
}, "documentLinkMessages");
|
|
38773
38790
|
|
|
38774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
38775
38792
|
var stemmerFor = stemmerCache();
|
|
38776
38793
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
38777
38794
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -38815,7 +38832,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
38815
38832
|
});
|
|
38816
38833
|
}, "laterSharingRare");
|
|
38817
38834
|
|
|
38818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
38819
38836
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
38820
38837
|
const { database } = context;
|
|
38821
38838
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -38950,7 +38967,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
38950
38967
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
38951
38968
|
}), "messagesStoreOver");
|
|
38952
38969
|
|
|
38953
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
38954
38971
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
38955
38972
|
var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
38956
38973
|
var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -39007,7 +39024,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
|
|
|
39007
39024
|
});
|
|
39008
39025
|
}, "personPreparation");
|
|
39009
39026
|
|
|
39010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39027
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
39011
39028
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
39012
39029
|
const id2 = Number(uid);
|
|
39013
39030
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -39015,7 +39032,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
39015
39032
|
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)));
|
|
39016
39033
|
}, "personSeenInAccounts");
|
|
39017
39034
|
|
|
39018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
39019
39036
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
39020
39037
|
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);
|
|
39021
39038
|
if (!row2)
|
|
@@ -39081,7 +39098,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
39081
39098
|
return { id: id2, personId, removed: true };
|
|
39082
39099
|
}, "removeNote");
|
|
39083
39100
|
|
|
39084
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39101
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
39085
39102
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
39086
39103
|
const { database } = context;
|
|
39087
39104
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -39166,13 +39183,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
39166
39183
|
};
|
|
39167
39184
|
}, "peopleStoreOver");
|
|
39168
39185
|
|
|
39169
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
39170
39187
|
import { createHash as createHash9 } from "node:crypto";
|
|
39171
39188
|
|
|
39172
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
39173
39190
|
import { createHash as createHash8 } from "node:crypto";
|
|
39174
39191
|
|
|
39175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39192
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
39176
39193
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
39177
39194
|
var AUTHOR_MEASURES = [
|
|
39178
39195
|
"messages",
|
|
@@ -39312,7 +39329,7 @@ var withoutUrls = /* @__PURE__ */ __name((text6) => text6.replace(/\S+/gu, (toke
|
|
|
39312
39329
|
var rankingWords = /* @__PURE__ */ __name((text6) => withoutUrls(text6).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
39313
39330
|
var rankingQuestion = /* @__PURE__ */ __name((text6) => withoutUrls(text6).includes("?"), "rankingQuestion");
|
|
39314
39331
|
|
|
39315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
39316
39333
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
39317
39334
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
39318
39335
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -39534,7 +39551,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
39534
39551
|
};
|
|
39535
39552
|
}, "rankReplyGraph");
|
|
39536
39553
|
|
|
39537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
39538
39555
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
39539
39556
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
39540
39557
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -39708,7 +39725,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
39708
39725
|
return { items, evidence, summary, graph: graph.quality };
|
|
39709
39726
|
}, "calculateAdminStatistics");
|
|
39710
39727
|
|
|
39711
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
39712
39729
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
39713
39730
|
const dates = [];
|
|
39714
39731
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -39730,7 +39747,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
39730
39747
|
return dates[0].node.resolution.date;
|
|
39731
39748
|
}, "rankingContextRange");
|
|
39732
39749
|
|
|
39733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
39734
39751
|
var reactionCounts = /* @__PURE__ */ __name((stored3) => {
|
|
39735
39752
|
let counts;
|
|
39736
39753
|
try {
|
|
@@ -40025,7 +40042,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
40025
40042
|
});
|
|
40026
40043
|
}, "rankQuery");
|
|
40027
40044
|
|
|
40028
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
40029
40046
|
function fail4(message2, reason = "query.too-large") {
|
|
40030
40047
|
throw new CliError("validation_error", message2, { reason, complete: false });
|
|
40031
40048
|
}
|
|
@@ -40202,7 +40219,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
40202
40219
|
return result;
|
|
40203
40220
|
}), "adminStatisticsQuery");
|
|
40204
40221
|
|
|
40205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
40206
40223
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
40207
40224
|
if (!execution.accounts.length)
|
|
40208
40225
|
return { conversations: [], chats: [] };
|
|
@@ -40220,7 +40237,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
40220
40237
|
return { conversations: conversations2, chats: chats2 };
|
|
40221
40238
|
}, "conversationEligibility");
|
|
40222
40239
|
|
|
40223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40240
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
40224
40241
|
import { createHash as createHash10 } from "node:crypto";
|
|
40225
40242
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
40226
40243
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -40370,7 +40387,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
40370
40387
|
return result;
|
|
40371
40388
|
}, "rankingEvidence");
|
|
40372
40389
|
|
|
40373
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40390
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
40374
40391
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
40375
40392
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2) => {
|
|
40376
40393
|
const params = [...scope3.accounts.flatMap(({ provider, account }) => [provider, account]), ...kinds2];
|
|
@@ -40464,7 +40481,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
40464
40481
|
});
|
|
40465
40482
|
}, "waitingChats");
|
|
40466
40483
|
|
|
40467
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40484
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
40468
40485
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
40469
40486
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
40470
40487
|
if (execution.corpus === "mail")
|
|
@@ -40485,7 +40502,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
40485
40502
|
};
|
|
40486
40503
|
}, "queriesStoreOver");
|
|
40487
40504
|
|
|
40488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
40489
40506
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
40490
40507
|
const { database, now: now2 } = context;
|
|
40491
40508
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -40524,10 +40541,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
40524
40541
|
}));
|
|
40525
40542
|
}, "chatEventsOf");
|
|
40526
40543
|
|
|
40527
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
40528
40545
|
import { createHash as createHash11 } from "node:crypto";
|
|
40529
40546
|
|
|
40530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
40531
40548
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
40532
40549
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
40533
40550
|
timeZone: zone,
|
|
@@ -40547,7 +40564,7 @@ var weekKey = /* @__PURE__ */ __name((day2) => {
|
|
|
40547
40564
|
return date3.toISOString().slice(0, 10);
|
|
40548
40565
|
}, "weekKey");
|
|
40549
40566
|
|
|
40550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
40551
40568
|
var RETENTION_TOLERANCE = 864e5;
|
|
40552
40569
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
40553
40570
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -40601,7 +40618,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
40601
40618
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
40602
40619
|
}, "retentionCohorts");
|
|
40603
40620
|
|
|
40604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40621
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
40605
40622
|
var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
40606
40623
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
40607
40624
|
validateRetentionOptions(options);
|
|
@@ -40732,7 +40749,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
40732
40749
|
};
|
|
40733
40750
|
}, "retentionQuery");
|
|
40734
40751
|
|
|
40735
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40752
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
40736
40753
|
var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
40737
40754
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
40738
40755
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -40863,7 +40880,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
40863
40880
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
40864
40881
|
})), "trackedChats");
|
|
40865
40882
|
|
|
40866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
40867
40884
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
40868
40885
|
const { database } = context;
|
|
40869
40886
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -40919,7 +40936,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
40919
40936
|
};
|
|
40920
40937
|
}, "rosterStoreOver");
|
|
40921
40938
|
|
|
40922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
40923
40940
|
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");
|
|
40924
40941
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
40925
40942
|
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 ?`);
|
|
@@ -40943,7 +40960,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
40943
40960
|
}
|
|
40944
40961
|
}, "backfillNormalized");
|
|
40945
40962
|
|
|
40946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
40947
40964
|
var INDEX2 = "message_words";
|
|
40948
40965
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
40949
40966
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -41070,7 +41087,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
41070
41087
|
});
|
|
41071
41088
|
}, "resetSearchIndex");
|
|
41072
41089
|
|
|
41073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41090
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
41074
41091
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
41075
41092
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
41076
41093
|
const before2 = stemsState(database);
|
|
@@ -41165,7 +41182,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
41165
41182
|
return resetStems(database, { now: now2 });
|
|
41166
41183
|
}, "followDefaultStemmers");
|
|
41167
41184
|
|
|
41168
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41185
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
41169
41186
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
41170
41187
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
41171
41188
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -41187,7 +41204,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
41187
41204
|
});
|
|
41188
41205
|
}, "termCandidates");
|
|
41189
41206
|
|
|
41190
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
41191
41208
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
41192
41209
|
const { database } = context;
|
|
41193
41210
|
const stemmerFor2 = stemmerCache();
|
|
@@ -41211,7 +41228,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
41211
41228
|
};
|
|
41212
41229
|
}, "searchIndexStoreOver");
|
|
41213
41230
|
|
|
41214
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
41215
41232
|
var HISTORY_KEPT = 1e3;
|
|
41216
41233
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
41217
41234
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -41280,7 +41297,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
41280
41297
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
41281
41298
|
}, "clearHistory");
|
|
41282
41299
|
|
|
41283
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41300
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
41284
41301
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
41285
41302
|
const { database } = context;
|
|
41286
41303
|
return {
|
|
@@ -41304,7 +41321,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
41304
41321
|
};
|
|
41305
41322
|
}, "searchesStoreOver");
|
|
41306
41323
|
|
|
41307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
41308
41325
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
41309
41326
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
41310
41327
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -41347,7 +41364,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
41347
41364
|
};
|
|
41348
41365
|
}, "agentActionsStoreOver");
|
|
41349
41366
|
|
|
41350
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
41351
41368
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
41352
41369
|
}) => {
|
|
41353
41370
|
const { database, now: now2 } = context;
|
|
@@ -41406,7 +41423,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
41406
41423
|
};
|
|
41407
41424
|
}, "botUpdateStoreOver");
|
|
41408
41425
|
|
|
41409
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41426
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
41410
41427
|
var DAY4 = 864e5;
|
|
41411
41428
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
41412
41429
|
if (filter.accountIds !== void 0 && filter.accountId !== void 0)
|
|
@@ -41515,7 +41532,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
41515
41532
|
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);
|
|
41516
41533
|
}, "listEvents");
|
|
41517
41534
|
|
|
41518
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
41519
41536
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
41520
41537
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
41521
41538
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -41570,7 +41587,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
41570
41587
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
41571
41588
|
}, "forgetCalendarRows");
|
|
41572
41589
|
|
|
41573
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
41574
41591
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
41575
41592
|
id: Number(row2.id),
|
|
41576
41593
|
accountId: Number(row2.account_id),
|
|
@@ -42157,7 +42174,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42157
42174
|
};
|
|
42158
42175
|
}, "eventStoreOver");
|
|
42159
42176
|
|
|
42160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42177
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
42161
42178
|
var CATALOG_QUERY = defineQuery({
|
|
42162
42179
|
entity: "document",
|
|
42163
42180
|
backend: "sql",
|
|
@@ -42399,7 +42416,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
42399
42416
|
};
|
|
42400
42417
|
}, "catalogStoreOver");
|
|
42401
42418
|
|
|
42402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
42403
42420
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
42404
42421
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
42405
42422
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -42412,7 +42429,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
42412
42429
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
42413
42430
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
42414
42431
|
|
|
42415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
42416
42433
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
42417
42434
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
42418
42435
|
signal?.throwIfAborted();
|
|
@@ -42511,7 +42528,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
42511
42528
|
});
|
|
42512
42529
|
}, "readMeetingContextEvidence");
|
|
42513
42530
|
|
|
42514
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
42515
42532
|
var corpora = {
|
|
42516
42533
|
message: {
|
|
42517
42534
|
table: "messages",
|
|
@@ -42750,13 +42767,39 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
42750
42767
|
}
|
|
42751
42768
|
}), "contextRecordsOver");
|
|
42752
42769
|
|
|
42753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42770
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
42754
42771
|
import { createHash as createHash12 } from "node:crypto";
|
|
42772
|
+
|
|
42773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/record-types.js
|
|
42774
|
+
var RECORD_ENTITY_TYPES = ["invoice", "payment", "person", "organization", "project"];
|
|
42775
|
+
var RECORD_TYPES = {
|
|
42776
|
+
invoice: {
|
|
42777
|
+
table: "invoices",
|
|
42778
|
+
review: "proposal",
|
|
42779
|
+
roles: { issuer: {}, counterparty: {}, project: {} }
|
|
42780
|
+
},
|
|
42781
|
+
payment: {
|
|
42782
|
+
table: "payments",
|
|
42783
|
+
review: "proposal",
|
|
42784
|
+
roles: { payer: {}, payee: {}, project: {}, settles: { many: true, amount: true } }
|
|
42785
|
+
},
|
|
42786
|
+
person: { table: "persons", review: "identity", roles: {} },
|
|
42787
|
+
organization: { table: "organizations", review: "identity", roles: {} },
|
|
42788
|
+
project: { table: "projects", review: "identity", roles: {} }
|
|
42789
|
+
};
|
|
42790
|
+
var WORD_BODY = "[a-z0-9][a-z0-9_-]{0,62}";
|
|
42791
|
+
var TYPE_PATTERN = `^(${RECORD_ENTITY_TYPES.join("|")}|custom:${WORD_BODY})$`;
|
|
42792
|
+
var TYPE_RULE = `a type is one of ${RECORD_ENTITY_TYPES.join(", ")} or custom:<name>`;
|
|
42793
|
+
var rolesOf = /* @__PURE__ */ __name((type) => Object.entries(RECORD_TYPES[type].roles), "rolesOf");
|
|
42794
|
+
var roleNames = /* @__PURE__ */ __name((types, keep) => [
|
|
42795
|
+
...new Set(types.flatMap((type) => rolesOf(type).flatMap(([name, role]) => keep(role) ? [name] : [])))
|
|
42796
|
+
], "roleNames");
|
|
42797
|
+
var AMOUNT_ROLES = roleNames(RECORD_ENTITY_TYPES, (role) => role.amount);
|
|
42798
|
+
|
|
42799
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
42755
42800
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
42756
42801
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
42757
|
-
var
|
|
42758
|
-
var WORD4 = "^[a-z0-9][a-z0-9_-]{0,62}$";
|
|
42759
|
-
var TYPE = "^(invoice|payment|person|organization|project|custom:[a-z0-9][a-z0-9_-]{0,62})$";
|
|
42802
|
+
var WORD4 = `^${WORD_BODY}$`;
|
|
42760
42803
|
var MAX_ID = 512;
|
|
42761
42804
|
var MAX_FIELDS_BYTES = 65536;
|
|
42762
42805
|
var MAX_RELATIONS = 100;
|
|
@@ -42790,7 +42833,7 @@ var RECORDS_ENVELOPE_SCHEMA = {
|
|
|
42790
42833
|
additionalProperties: false,
|
|
42791
42834
|
properties: {
|
|
42792
42835
|
key: { type: "string", minLength: 1, maxLength: MAX_ID },
|
|
42793
|
-
type: { type: "string", pattern:
|
|
42836
|
+
type: { type: "string", pattern: TYPE_PATTERN },
|
|
42794
42837
|
external_id: { type: "string", minLength: 1, maxLength: MAX_ID },
|
|
42795
42838
|
operation: { enum: [...RECORD_OPERATIONS] },
|
|
42796
42839
|
fields: {
|
|
@@ -42807,7 +42850,7 @@ var RECORDS_ENVELOPE_SCHEMA = {
|
|
|
42807
42850
|
additionalProperties: false,
|
|
42808
42851
|
properties: {
|
|
42809
42852
|
role: { type: "string", pattern: WORD4 },
|
|
42810
|
-
type: { type: "string", pattern:
|
|
42853
|
+
type: { type: "string", pattern: TYPE_PATTERN },
|
|
42811
42854
|
external_id: { type: "string", minLength: 1, maxLength: MAX_ID },
|
|
42812
42855
|
amount: {
|
|
42813
42856
|
type: "string",
|
|
@@ -42819,7 +42862,7 @@ var RECORDS_ENVELOPE_SCHEMA = {
|
|
|
42819
42862
|
}
|
|
42820
42863
|
};
|
|
42821
42864
|
var wordPattern = new RegExp(WORD4);
|
|
42822
|
-
var typePattern = new RegExp(
|
|
42865
|
+
var typePattern = new RegExp(TYPE_PATTERN);
|
|
42823
42866
|
var decimalPattern = new RegExp(DECIMAL);
|
|
42824
42867
|
var isObject2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isObject");
|
|
42825
42868
|
var escapePointer = /* @__PURE__ */ __name((segment) => String(segment).replaceAll("~", "~0").replaceAll("/", "~1"), "escapePointer");
|
|
@@ -42863,13 +42906,13 @@ var relationErrors = /* @__PURE__ */ __name((relations, at) => {
|
|
|
42863
42906
|
if (typeof relation.role !== "string" || !wordPattern.test(relation.role))
|
|
42864
42907
|
return [invalid4([...here, "role"], "a role is lowercase letters, digits, - and _")];
|
|
42865
42908
|
if (typeof relation.type !== "string" || !typePattern.test(relation.type))
|
|
42866
|
-
return [invalid4([...here, "type"],
|
|
42909
|
+
return [invalid4([...here, "type"], TYPE_RULE)];
|
|
42867
42910
|
if (!idText(relation.external_id))
|
|
42868
42911
|
return [invalid4([...here, "external_id"], `an external id takes 1\u2013${MAX_ID} characters`)];
|
|
42869
42912
|
if (relation.amount !== void 0 && (typeof relation.amount !== "string" || !decimalPattern.test(relation.amount)))
|
|
42870
42913
|
return [invalid4([...here, "amount"], 'an amount is a decimal string, such as "13000.00"')];
|
|
42871
|
-
if (relation.amount !== void 0 && relation.role
|
|
42872
|
-
return [invalid4([...here, "amount"],
|
|
42914
|
+
if (relation.amount !== void 0 && !AMOUNT_ROLES.includes(relation.role))
|
|
42915
|
+
return [invalid4([...here, "amount"], `only a ${AMOUNT_ROLES.join(" or ")} relation carries an amount`)];
|
|
42873
42916
|
return [];
|
|
42874
42917
|
});
|
|
42875
42918
|
}, "relationErrors");
|
|
@@ -42890,9 +42933,7 @@ var recordErrors = /* @__PURE__ */ __name((record4, index2) => {
|
|
|
42890
42933
|
if (!idText(record4.key))
|
|
42891
42934
|
return [invalid4([...at, "key"], `a key takes 1\u2013${MAX_ID} characters`)];
|
|
42892
42935
|
if (typeof record4.type !== "string" || !typePattern.test(record4.type))
|
|
42893
|
-
return withKey([
|
|
42894
|
-
invalid4([...at, "type"], `a type is one of ${RECORD_ENTITY_TYPES.join(", ")} or custom:<name>`, "record.type")
|
|
42895
|
-
]);
|
|
42936
|
+
return withKey([invalid4([...at, "type"], TYPE_RULE, "record.type")]);
|
|
42896
42937
|
if (!idText(record4.external_id))
|
|
42897
42938
|
return withKey([invalid4([...at, "external_id"], `an external id takes 1\u2013${MAX_ID} characters`)]);
|
|
42898
42939
|
if (!RECORD_OPERATIONS.includes(record4.operation))
|
|
@@ -42982,7 +43023,7 @@ var envelopeOfJsonl = /* @__PURE__ */ __name((text6) => {
|
|
|
42982
43023
|
return isObject2(header) ? { ...header, records: records2 } : header;
|
|
42983
43024
|
}, "envelopeOfJsonl");
|
|
42984
43025
|
|
|
42985
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43026
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
42986
43027
|
var TABLES = { deal: "deals", lead: "leads" };
|
|
42987
43028
|
var SOURCE = "crm";
|
|
42988
43029
|
var crmIdentityId = /* @__PURE__ */ __name((key2, externalId, type = "contact") => `${key2.account}/${type}/${externalId}`, "crmIdentityId");
|
|
@@ -43257,7 +43298,11 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
43257
43298
|
};
|
|
43258
43299
|
}, "crmCopiesOver");
|
|
43259
43300
|
|
|
43260
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43301
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
43302
|
+
var FINANCE_TYPES = ["invoice", "payment"];
|
|
43303
|
+
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
43304
|
+
var article = /* @__PURE__ */ __name((word2) => /^[aeiou]/.test(word2) ? "an" : "a", "article");
|
|
43305
|
+
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
43261
43306
|
var refuse = /* @__PURE__ */ __name((message2, reason, code = "validation_error") => {
|
|
43262
43307
|
throw new CliError(code, message2, { reason });
|
|
43263
43308
|
}, "refuse");
|
|
@@ -43499,10 +43544,10 @@ var financeOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
43499
43544
|
}, "coveredElsewhere");
|
|
43500
43545
|
const decide2 = /* @__PURE__ */ __name((reference2, by, reason, confirm) => {
|
|
43501
43546
|
const thing = requiredThing(database, reference2, "the proposal");
|
|
43502
|
-
if (thing.type
|
|
43503
|
-
return refuse(`${reference2} is not
|
|
43547
|
+
if (!isFinanceType(thing.type))
|
|
43548
|
+
return refuse(`${reference2} is not ${prefixesText(FINANCE_TYPES)}`, "finance.ref");
|
|
43504
43549
|
const type = thing.type;
|
|
43505
|
-
const table = type
|
|
43550
|
+
const table = RECORD_TYPES[type].table;
|
|
43506
43551
|
const row2 = rowOf2(reference2, type);
|
|
43507
43552
|
const ref3 = `${type}:${row2.id}`;
|
|
43508
43553
|
assertMayDecide({ id: ref3, proposedBy: proposerOf(database, row2.author_type, row2.author_id), ownerOnly: true }, by, context.decisions);
|
|
@@ -43718,7 +43763,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43718
43763
|
};
|
|
43719
43764
|
}, "financeStoreOver");
|
|
43720
43765
|
|
|
43721
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43766
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
43722
43767
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
43723
43768
|
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 ${TABLES2[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");
|
|
43724
43769
|
var MAX_STAGES = 30;
|
|
@@ -44058,16 +44103,16 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
44058
44103
|
};
|
|
44059
44104
|
}, "dealsStoreOver");
|
|
44060
44105
|
|
|
44061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44106
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
44062
44107
|
import { createHash as createHash13, randomBytes as randomBytes2 } from "node:crypto";
|
|
44063
44108
|
|
|
44064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
44065
44110
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
44066
44111
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
44067
44112
|
var TOKEN2 = /^[A-Za-z0-9_-]{21}[AQgw]$/;
|
|
44068
44113
|
var isDecisionToken = /* @__PURE__ */ __name((value) => typeof value === "string" && TOKEN2.test(value), "isDecisionToken");
|
|
44069
44114
|
|
|
44070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
44071
44116
|
var digestOf = /* @__PURE__ */ __name((token) => createHash13("sha256").update(token).digest("hex"), "digestOf");
|
|
44072
44117
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
44073
44118
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -44163,7 +44208,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
44163
44208
|
};
|
|
44164
44209
|
}, "decisionRequestStoreOver");
|
|
44165
44210
|
|
|
44166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
44167
44212
|
var NOTE_FIELDS = [
|
|
44168
44213
|
"text",
|
|
44169
44214
|
"exact",
|
|
@@ -44593,7 +44638,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
44593
44638
|
};
|
|
44594
44639
|
}, "noteSearchOver");
|
|
44595
44640
|
|
|
44596
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44641
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
44597
44642
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
44598
44643
|
var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
44599
44644
|
var EVENT_CORPUS = {
|
|
@@ -44725,7 +44770,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
44725
44770
|
};
|
|
44726
44771
|
}, "eventSearchOver");
|
|
44727
44772
|
|
|
44728
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
44729
44774
|
var refuse2 = /* @__PURE__ */ __name((message2, reason) => {
|
|
44730
44775
|
throw new CliError("validation_error", message2, { reason });
|
|
44731
44776
|
}, "refuse");
|
|
@@ -44803,7 +44848,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
44803
44848
|
};
|
|
44804
44849
|
}, "paymentEntriesOver");
|
|
44805
44850
|
|
|
44806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44851
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
44807
44852
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
44808
44853
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
44809
44854
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -44829,7 +44874,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
44829
44874
|
return valid;
|
|
44830
44875
|
}, "validateEvidenceFindings");
|
|
44831
44876
|
|
|
44832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
44833
44878
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
44834
44879
|
try {
|
|
44835
44880
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -44841,7 +44886,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
44841
44886
|
}
|
|
44842
44887
|
}, "calendarMoment");
|
|
44843
44888
|
|
|
44844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44889
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
44845
44890
|
var NAMED3 = "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";
|
|
44846
44891
|
var iso10 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
44847
44892
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -45050,7 +45095,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45050
45095
|
};
|
|
45051
45096
|
}, "factsStoreOver");
|
|
45052
45097
|
|
|
45053
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
45054
45099
|
var invalid5 = /* @__PURE__ */ __name((message2) => {
|
|
45055
45100
|
throw new CliError("validation_error", message2);
|
|
45056
45101
|
}, "invalid");
|
|
@@ -45154,7 +45199,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind4) => {
|
|
|
45154
45199
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes, create };
|
|
45155
45200
|
}, "findingsCoreOver");
|
|
45156
45201
|
|
|
45157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
45158
45203
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
45159
45204
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
45160
45205
|
var iso11 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -45319,7 +45364,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45319
45364
|
};
|
|
45320
45365
|
}, "proposedActionsStoreOver");
|
|
45321
45366
|
|
|
45322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
45323
45368
|
var stale = /* @__PURE__ */ __name(() => {
|
|
45324
45369
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
45325
45370
|
reason: "evidence-findings.stale"
|
|
@@ -45500,7 +45545,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45500
45545
|
};
|
|
45501
45546
|
}, "evidenceFindingsStoreOver");
|
|
45502
45547
|
|
|
45503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
45504
45549
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
45505
45550
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
45506
45551
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -45553,7 +45598,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
45553
45598
|
}, "forPerson")
|
|
45554
45599
|
}), "involvementStoreOver");
|
|
45555
45600
|
|
|
45556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45601
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
45557
45602
|
import { createHash as createHash14 } from "node:crypto";
|
|
45558
45603
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
45559
45604
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -45639,7 +45684,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
45639
45684
|
};
|
|
45640
45685
|
}, "meetingProjectsStoreOver");
|
|
45641
45686
|
|
|
45642
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45687
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
45643
45688
|
var ORGANIZATIONS_QUERY = {
|
|
45644
45689
|
entity: "organization",
|
|
45645
45690
|
backend: "sql",
|
|
@@ -45680,7 +45725,7 @@ var REMINDERS_QUERY = {
|
|
|
45680
45725
|
})
|
|
45681
45726
|
};
|
|
45682
45727
|
|
|
45683
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
45684
45729
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
45685
45730
|
id: String(row2.id),
|
|
45686
45731
|
ref: `organization:${row2.id}`,
|
|
@@ -45713,7 +45758,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
45713
45758
|
}), "updateOrganization")
|
|
45714
45759
|
}), "organizationsStoreOver");
|
|
45715
45760
|
|
|
45716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
45717
45762
|
var relationOf = /* @__PURE__ */ __name((link3) => ({
|
|
45718
45763
|
id: link3.id,
|
|
45719
45764
|
from: link3.from,
|
|
@@ -45939,16 +45984,16 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
45939
45984
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
45940
45985
|
}, "decidedOrigin");
|
|
45941
45986
|
|
|
45942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45987
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
45943
45988
|
import { createHash as createHash17 } from "node:crypto";
|
|
45944
45989
|
|
|
45945
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
45946
45991
|
import { createHash as createHash16 } from "node:crypto";
|
|
45947
45992
|
|
|
45948
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
45949
45994
|
import { createHash as createHash15 } from "node:crypto";
|
|
45950
45995
|
|
|
45951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
45952
45997
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
45953
45998
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
45954
45999
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -45999,7 +46044,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
45999
46044
|
return input;
|
|
46000
46045
|
}, "consolidationApplyInput");
|
|
46001
46046
|
|
|
46002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
46003
46048
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
46004
46049
|
id: String(row2.id),
|
|
46005
46050
|
sourceId: String(row2.source_id),
|
|
@@ -46074,7 +46119,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
46074
46119
|
}, { beforeCommit: check3 });
|
|
46075
46120
|
}, "applyTagConsolidation");
|
|
46076
46121
|
|
|
46077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
46078
46123
|
var selections = [
|
|
46079
46124
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
46080
46125
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -46218,7 +46263,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
46218
46263
|
};
|
|
46219
46264
|
}, "previewRows");
|
|
46220
46265
|
|
|
46221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
46222
46267
|
var kinds = ["project", "tag", "topic"];
|
|
46223
46268
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
46224
46269
|
if (signal?.aborted)
|
|
@@ -46482,7 +46527,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46482
46527
|
};
|
|
46483
46528
|
}, "vocabularyStoreOver");
|
|
46484
46529
|
|
|
46485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
46486
46531
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
46487
46532
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
46488
46533
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -47023,7 +47068,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
47023
47068
|
return key2.padEnd(3, "X");
|
|
47024
47069
|
}, "projectKey");
|
|
47025
47070
|
|
|
47026
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
47027
47072
|
var DAY5 = 864e5;
|
|
47028
47073
|
var SETTING4 = "logs_pruned_at";
|
|
47029
47074
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -47050,7 +47095,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
47050
47095
|
};
|
|
47051
47096
|
}, "logPruner");
|
|
47052
47097
|
|
|
47053
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
47054
47099
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
47055
47100
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
47056
47101
|
var invalid7 = /* @__PURE__ */ __name((message2) => {
|
|
@@ -47426,7 +47471,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
47426
47471
|
}, "checkMailFindings");
|
|
47427
47472
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
47428
47473
|
|
|
47429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47474
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
47430
47475
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
47431
47476
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
47432
47477
|
var WEIGHTS = {
|
|
@@ -47559,7 +47604,7 @@ var scoreGroup = /* @__PURE__ */ __name((items, context) => {
|
|
|
47559
47604
|
return { score: kept.reduce((sum, signal) => sum + WEIGHTS[signal], 0), signals: kept };
|
|
47560
47605
|
}, "scoreGroup");
|
|
47561
47606
|
|
|
47562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
47563
47608
|
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";
|
|
47564
47609
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
47565
47610
|
const { database, now: now2 } = context;
|
|
@@ -47711,7 +47756,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47711
47756
|
};
|
|
47712
47757
|
}, "ordersStoreOver");
|
|
47713
47758
|
|
|
47714
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47759
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
47715
47760
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
47716
47761
|
throw new CliError("validation_error", "mail findings cite mail that changed since it was read; stage a new batch", {
|
|
47717
47762
|
reason: "mail-findings.stale"
|
|
@@ -48168,7 +48213,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
48168
48213
|
};
|
|
48169
48214
|
}, "mailFindingsStoreOver");
|
|
48170
48215
|
|
|
48171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
48172
48217
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
48173
48218
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
48174
48219
|
reason: "meeting-findings.stale"
|
|
@@ -48336,7 +48381,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48336
48381
|
};
|
|
48337
48382
|
}, "meetingFindingsStoreOver");
|
|
48338
48383
|
|
|
48339
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48384
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
48340
48385
|
var RANK_BATCH = 512;
|
|
48341
48386
|
var LIVE3 = "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";
|
|
48342
48387
|
var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -48607,7 +48652,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
48607
48652
|
}
|
|
48608
48653
|
}), "meetingVectorsOver");
|
|
48609
48654
|
|
|
48610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
48611
48656
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
48612
48657
|
var TEXTS = {
|
|
48613
48658
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -48708,11 +48753,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48708
48753
|
};
|
|
48709
48754
|
}, "sourceMentionStoreOver");
|
|
48710
48755
|
|
|
48711
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
48712
48757
|
import { accessSync, constants, existsSync, mkdirSync as mkdirSync2, statSync, writeFileSync as writeFileSync2 } from "node:fs";
|
|
48713
48758
|
import { dirname as dirname2 } from "node:path";
|
|
48714
48759
|
|
|
48715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
48716
48761
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
48717
48762
|
var CLIENTS_SETTING = "clients";
|
|
48718
48763
|
var coreVersion = (() => {
|
|
@@ -48770,7 +48815,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
48770
48815
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
48771
48816
|
}, "refusalAdvice");
|
|
48772
48817
|
|
|
48773
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
48774
48819
|
var GENERATED = [
|
|
48775
48820
|
{
|
|
48776
48821
|
"name": "20261010184427_initial",
|
|
@@ -49849,7 +49894,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
49849
49894
|
}
|
|
49850
49895
|
];
|
|
49851
49896
|
|
|
49852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49897
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
49853
49898
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
49854
49899
|
import { basename, dirname, join as join2, parse } from "node:path";
|
|
49855
49900
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -50082,7 +50127,7 @@ var rollBack = /* @__PURE__ */ __name((database, path) => {
|
|
|
50082
50127
|
return { ...result, foreignKeyViolations };
|
|
50083
50128
|
}, "rollBack");
|
|
50084
50129
|
|
|
50085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50130
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
50086
50131
|
var V31_TABLES = [
|
|
50087
50132
|
"accounts",
|
|
50088
50133
|
"account_identities",
|
|
@@ -50230,7 +50275,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
50230
50275
|
return migrations;
|
|
50231
50276
|
}, "generatedMigrations");
|
|
50232
50277
|
|
|
50233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
50234
50279
|
var MIGRATIONS = generatedMigrations();
|
|
50235
50280
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
50236
50281
|
version INTEGER PRIMARY KEY,
|
|
@@ -50309,7 +50354,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
50309
50354
|
}
|
|
50310
50355
|
}, "migrate");
|
|
50311
50356
|
|
|
50312
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
50313
50358
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
50314
50359
|
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 ?");
|
|
50315
50360
|
if (pending.get(0, 1) === void 0)
|
|
@@ -50331,7 +50376,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
50331
50376
|
}
|
|
50332
50377
|
}, "fillJoinKeys");
|
|
50333
50378
|
|
|
50334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
50335
50380
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
50336
50381
|
refuseOwnerStoreInTests(path);
|
|
50337
50382
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -50345,8 +50390,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
50345
50390
|
}, "openSqlite");
|
|
50346
50391
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
50347
50392
|
quietSqliteWarning();
|
|
50348
|
-
const { drizzle } = await import("./node-
|
|
50349
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
50393
|
+
const { drizzle } = await import("./node-IRL66JK2.js");
|
|
50394
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-SOGTH72B.js");
|
|
50350
50395
|
const client = await nodeClient(path, { readOnly });
|
|
50351
50396
|
try {
|
|
50352
50397
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -50356,8 +50401,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
50356
50401
|
}
|
|
50357
50402
|
}, "openUnderNode");
|
|
50358
50403
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
50359
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
50360
|
-
const { drizzle } = await import("./bun-
|
|
50404
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-GWVRHYF4.js");
|
|
50405
|
+
const { drizzle } = await import("./bun-QJUFWKEZ.js");
|
|
50361
50406
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
50362
50407
|
try {
|
|
50363
50408
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -50367,7 +50412,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
50367
50412
|
}
|
|
50368
50413
|
}, "openUnderBun");
|
|
50369
50414
|
|
|
50370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50415
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
50371
50416
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
50372
50417
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
50373
50418
|
try {
|
|
@@ -50435,7 +50480,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
50435
50480
|
});
|
|
50436
50481
|
}, "movePaymentFacts");
|
|
50437
50482
|
|
|
50438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
50439
50484
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
50440
50485
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
50441
50486
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -50453,7 +50498,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
50453
50498
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
50454
50499
|
}, "assertReadCompatible");
|
|
50455
50500
|
|
|
50456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
50457
50502
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
50458
50503
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
50459
50504
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -50499,7 +50544,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
50499
50544
|
});
|
|
50500
50545
|
}, "moveSuggestedLinks");
|
|
50501
50546
|
|
|
50502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
50503
50548
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
50504
50549
|
var TEST_PROVIDER = "chat";
|
|
50505
50550
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -50520,7 +50565,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
50520
50565
|
}
|
|
50521
50566
|
}, "purgeTestAccounts");
|
|
50522
50567
|
|
|
50523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50568
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
50524
50569
|
var BACKFILL_ON_OPEN = 5e3;
|
|
50525
50570
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
50526
50571
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -50570,8 +50615,10 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
50570
50615
|
if (readOnly) {
|
|
50571
50616
|
if (!statSync(file, { throwIfNoEntry: false })?.isFile())
|
|
50572
50617
|
throw new CliError("not_found", "The store does not exist as a file; read-only opening does not create it");
|
|
50573
|
-
} else
|
|
50618
|
+
} else {
|
|
50574
50619
|
createWritable(file);
|
|
50620
|
+
refuseDamagedStore(file, command);
|
|
50621
|
+
}
|
|
50575
50622
|
const opened = readOnly ? await openReadable(file, options) : await openSqlite(file, { readOnly });
|
|
50576
50623
|
const database = opened.database;
|
|
50577
50624
|
try {
|
|
@@ -50616,10 +50663,10 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
50616
50663
|
}
|
|
50617
50664
|
}, "openStoreContext");
|
|
50618
50665
|
|
|
50619
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50666
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
50620
50667
|
import { createHash as createHash18 } from "node:crypto";
|
|
50621
50668
|
|
|
50622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50669
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
50623
50670
|
var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
50624
50671
|
var ref = text4(2048);
|
|
50625
50672
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -50685,7 +50732,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
50685
50732
|
}))
|
|
50686
50733
|
});
|
|
50687
50734
|
|
|
50688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50735
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
50689
50736
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
50690
50737
|
var invalid10 = /* @__PURE__ */ __name((field4) => {
|
|
50691
50738
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -50789,7 +50836,7 @@ var validateProjectAnnotationsGraph = /* @__PURE__ */ __name((manifest, addition
|
|
|
50789
50836
|
invalid10("external.unused");
|
|
50790
50837
|
}, "validateProjectAnnotationsGraph");
|
|
50791
50838
|
|
|
50792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
50793
50840
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
50794
50841
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
50795
50842
|
var targetSchema = strictObject({
|
|
@@ -50895,7 +50942,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
50895
50942
|
};
|
|
50896
50943
|
}, "planBoundProjectAnnotations");
|
|
50897
50944
|
|
|
50898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50945
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
50899
50946
|
import { createHash as createHash19 } from "node:crypto";
|
|
50900
50947
|
var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
50901
50948
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -50989,7 +51036,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
50989
51036
|
})).digest("hex");
|
|
50990
51037
|
}, "projectAnnotationSnapshotFingerprint");
|
|
50991
51038
|
|
|
50992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
50993
51040
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
50994
51041
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
50995
51042
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -51006,7 +51053,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
51006
51053
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
51007
51054
|
}, "projectAnnotationRequest");
|
|
51008
51055
|
|
|
51009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
51010
51057
|
var SnapshotBudget = class {
|
|
51011
51058
|
static {
|
|
51012
51059
|
__name(this, "SnapshotBudget");
|
|
@@ -51032,13 +51079,13 @@ var SnapshotBudget = class {
|
|
|
51032
51079
|
}
|
|
51033
51080
|
};
|
|
51034
51081
|
|
|
51035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51082
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
51036
51083
|
import { createHash as createHash21 } from "node:crypto";
|
|
51037
51084
|
|
|
51038
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51085
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
51039
51086
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
51040
51087
|
|
|
51041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
51042
51089
|
import { createHash as createHash20 } from "node:crypto";
|
|
51043
51090
|
var invalid12 = /* @__PURE__ */ __name(() => {
|
|
51044
51091
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -51181,7 +51228,7 @@ var ProjectSnapshotSources = class {
|
|
|
51181
51228
|
}
|
|
51182
51229
|
};
|
|
51183
51230
|
|
|
51184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
51185
51232
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
51186
51233
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
51187
51234
|
}, "unsupported");
|
|
@@ -51352,7 +51399,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
51352
51399
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
51353
51400
|
}), "projectAnnotationSnapshot");
|
|
51354
51401
|
|
|
51355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
51356
51403
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
51357
51404
|
const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
51358
51405
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -51414,7 +51461,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
51414
51461
|
};
|
|
51415
51462
|
}), "previewAnnotationSnapshot");
|
|
51416
51463
|
|
|
51417
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
51418
51465
|
var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
|
|
51419
51466
|
const mappings = { ...bindings };
|
|
51420
51467
|
const resolve = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -51456,7 +51503,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
51456
51503
|
return mappings;
|
|
51457
51504
|
}, "restoreAnnotationRecords");
|
|
51458
51505
|
|
|
51459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
51460
51507
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
51461
51508
|
async preview(request) {
|
|
51462
51509
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -51486,25 +51533,11 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
51486
51533
|
}
|
|
51487
51534
|
}), "projectAnnotationStoreOver");
|
|
51488
51535
|
|
|
51489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51490
|
-
var PROJECTED = {
|
|
51491
|
-
invoice: { roles: ["issuer", "counterparty", "project"], many: [] },
|
|
51492
|
-
payment: { roles: ["payer", "payee", "project", "settles"], many: ["settles"] }
|
|
51493
|
-
};
|
|
51494
|
-
var isProjected = /* @__PURE__ */ __name((type) => type === "invoice" || type === "payment", "isProjected");
|
|
51536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
51495
51537
|
var IMPORTER = { bot: "import" };
|
|
51496
|
-
var REFERENCE_FIELDS = ["issuer", "counterparty", "project", "payer", "payee"];
|
|
51497
51538
|
var refusal = /* @__PURE__ */ __name((message2, code, at) => {
|
|
51498
51539
|
throw new CliError("validation_error", message2, { reason: code, ...at === void 0 ? {} : { at } });
|
|
51499
51540
|
}, "refusal");
|
|
51500
|
-
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
51501
|
-
const reason = error.details?.reason;
|
|
51502
|
-
if (typeof reason === "string")
|
|
51503
|
-
return reason;
|
|
51504
|
-
return error.code === "not_found" ? "record.reference-not-found" : "record.entity";
|
|
51505
|
-
}, "codeOf");
|
|
51506
|
-
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => relation.role !== "settles")), "unsettled");
|
|
51507
|
-
var iso13 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
51508
51541
|
var stringField = /* @__PURE__ */ __name((fields4, name) => {
|
|
51509
51542
|
const value = fields4[name];
|
|
51510
51543
|
if (value === void 0 || value === null)
|
|
@@ -51513,6 +51546,11 @@ var stringField = /* @__PURE__ */ __name((fields4, name) => {
|
|
|
51513
51546
|
return refusal(`fields.${name} is text`, "record.invalid");
|
|
51514
51547
|
return value;
|
|
51515
51548
|
}, "stringField");
|
|
51549
|
+
var written = /* @__PURE__ */ __name((source2) => ({
|
|
51550
|
+
by: IMPORTER,
|
|
51551
|
+
source: `import:${source2.provider}`,
|
|
51552
|
+
reason: `imported from ${source2.provider} account ${source2.account}, batch ${source2.batch_id}`
|
|
51553
|
+
}), "written");
|
|
51516
51554
|
var invoiceOf = /* @__PURE__ */ __name((fields4, related, source2) => {
|
|
51517
51555
|
if (!Array.isArray(fields4.lines) || fields4.lines.some((line) => typeof line !== "object" || line === null))
|
|
51518
51556
|
return refusal("an invoice's fields.lines is a list of lines", "record.invalid");
|
|
@@ -51550,11 +51588,27 @@ var paymentOf2 = /* @__PURE__ */ __name((fields4, related, source2) => {
|
|
|
51550
51588
|
reference: stringField(fields4, "reference")
|
|
51551
51589
|
};
|
|
51552
51590
|
}, "paymentOf");
|
|
51553
|
-
var
|
|
51554
|
-
|
|
51555
|
-
|
|
51556
|
-
|
|
51557
|
-
|
|
51591
|
+
var RECORD_PROJECTORS = {
|
|
51592
|
+
invoice: /* @__PURE__ */ __name((fields4, { related }, source2, { finance }) => finance.addInvoice(invoiceOf(fields4, related, source2)).ref, "invoice"),
|
|
51593
|
+
payment: /* @__PURE__ */ __name((fields4, { related, shares }, source2, { finance, settle }) => settle(finance.addPayment(paymentOf2(fields4, related, source2)), shares), "payment"),
|
|
51594
|
+
person: null,
|
|
51595
|
+
organization: null,
|
|
51596
|
+
project: null
|
|
51597
|
+
};
|
|
51598
|
+
var PROJECTED_TYPES = RECORD_ENTITY_TYPES.filter((type) => RECORD_PROJECTORS[type] !== null);
|
|
51599
|
+
var isProjected = /* @__PURE__ */ __name((type) => PROJECTED_TYPES.includes(type), "isProjected");
|
|
51600
|
+
var FIELD_REFERENCE_ROLES = roleNames(PROJECTED_TYPES, (role) => !role.many);
|
|
51601
|
+
|
|
51602
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
51603
|
+
var PROJECTED_TYPES_SQL = PROJECTED_TYPES.map((type) => `'${type}'`).join(", ");
|
|
51604
|
+
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
51605
|
+
const reason = error.details?.reason;
|
|
51606
|
+
if (typeof reason === "string")
|
|
51607
|
+
return reason;
|
|
51608
|
+
return error.code === "not_found" ? "record.reference-not-found" : "record.entity";
|
|
51609
|
+
}, "codeOf");
|
|
51610
|
+
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => relation.role !== "settles")), "unsettled");
|
|
51611
|
+
var iso13 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
51558
51612
|
var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
51559
51613
|
const { database, now: now2 } = context;
|
|
51560
51614
|
const finance = financeOperationsOver(context);
|
|
@@ -51569,14 +51623,16 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51569
51623
|
}, "sql");
|
|
51570
51624
|
const entityRef = /* @__PURE__ */ __name((type, id2) => type == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? `${String(type)}:${String(id2)}`, "entityRef");
|
|
51571
51625
|
const relatedOf = /* @__PURE__ */ __name((recordId, type) => {
|
|
51572
|
-
const
|
|
51626
|
+
const roles = rolesOf(type);
|
|
51627
|
+
const known2 = roles.map(([name]) => name);
|
|
51628
|
+
const many = roles.flatMap(([name, role]) => role.many ? [name] : []);
|
|
51573
51629
|
const rows = sql2("SELECT rr.role, rr.amount, t.entity_type, t.entity_id FROM record_relations rr LEFT JOIN records t ON t.id = rr.target_id AND t.deleted_at IS NULL WHERE rr.record_id = ? ORDER BY rr.id").all(recordId);
|
|
51574
51630
|
const related = /* @__PURE__ */ new Map();
|
|
51575
51631
|
const shares = [];
|
|
51576
51632
|
const missing4 = /* @__PURE__ */ new Set();
|
|
51577
51633
|
for (const row2 of rows) {
|
|
51578
51634
|
const role = String(row2.role);
|
|
51579
|
-
if (!
|
|
51635
|
+
if (!known2.includes(role))
|
|
51580
51636
|
continue;
|
|
51581
51637
|
const ref3 = entityRef(row2.entity_type, row2.entity_id);
|
|
51582
51638
|
if (ref3 === null)
|
|
@@ -51597,9 +51653,9 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51597
51653
|
if (missing4.length > 0)
|
|
51598
51654
|
return { missing: missing4 };
|
|
51599
51655
|
const fields4 = JSON.parse(String(row2.fields));
|
|
51600
|
-
for (const name of
|
|
51656
|
+
for (const name of FIELD_REFERENCE_ROLES)
|
|
51601
51657
|
stringField(fields4, name);
|
|
51602
|
-
const ref3 = type
|
|
51658
|
+
const ref3 = RECORD_PROJECTORS[type](fields4, { related, shares }, source2, { finance, settle });
|
|
51603
51659
|
const entity = requiredThing(database, ref3);
|
|
51604
51660
|
sql2("UPDATE records SET entity_type = ?, entity_id = ?, projected_fingerprint = fingerprint WHERE id = ?").run(entity.type, entity.id, Number(row2.id));
|
|
51605
51661
|
return { proposed: ref3, missing: [] };
|
|
@@ -51672,7 +51728,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51672
51728
|
const completeDependents = /* @__PURE__ */ __name((target, source2, proposed, laterErrors) => {
|
|
51673
51729
|
const queue = [target];
|
|
51674
51730
|
while (queue.length > 0) {
|
|
51675
|
-
const rows = sql2(
|
|
51731
|
+
const rows = sql2(`SELECT DISTINCT r.* FROM record_relations rr JOIN records r ON r.id = rr.record_id WHERE rr.target_id = ? AND r.entity_id IS NULL AND r.deleted_at IS NULL AND r.type IN (${PROJECTED_TYPES_SQL})`).all(queue.shift());
|
|
51676
51732
|
for (const row2 of rows) {
|
|
51677
51733
|
try {
|
|
51678
51734
|
const done = write(database, () => project2(row2, source2));
|
|
@@ -51870,7 +51926,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51870
51926
|
return read(database, () => {
|
|
51871
51927
|
if (findAccountPk(context, { provider, account }) === void 0)
|
|
51872
51928
|
return [];
|
|
51873
|
-
const rows = database.prepare(`${SELECT2}WHERE a.provider = ? AND a.external_id = ? AND (? IS NULL OR r.type = ?) AND (? IS NULL OR (r.entity_id IS NULL AND r.deleted_at IS NULL AND r.type IN (
|
|
51929
|
+
const rows = database.prepare(`${SELECT2}WHERE a.provider = ? AND a.external_id = ? AND (? IS NULL OR r.type = ?) AND (? IS NULL OR (r.entity_id IS NULL AND r.deleted_at IS NULL AND r.type IN (${PROJECTED_TYPES_SQL}))) AND (? IS NULL OR (r.entity_id IS NOT NULL AND (r.deleted_at IS NOT NULL OR r.projected_fingerprint IS NOT r.fingerprint))) ORDER BY r.updated_at DESC, r.id DESC LIMIT ?`).all(provider, account, type ?? null, type ?? null, waiting ? 1 : null, flagged ? 1 : null, limit);
|
|
51874
51930
|
return rows.map(sourceRecordOf);
|
|
51875
51931
|
});
|
|
51876
51932
|
}, "list"),
|
|
@@ -51899,7 +51955,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51899
51955
|
};
|
|
51900
51956
|
}, "recordStoreOver");
|
|
51901
51957
|
|
|
51902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
51903
51959
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
51904
51960
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
51905
51961
|
let merged = { from: from2, to };
|
|
@@ -51912,7 +51968,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
51912
51968
|
}, "markRange");
|
|
51913
51969
|
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");
|
|
51914
51970
|
|
|
51915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51971
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
51916
51972
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
51917
51973
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
51918
51974
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -51933,7 +51989,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
51933
51989
|
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);
|
|
51934
51990
|
}, "setTaskAnalysisMark");
|
|
51935
51991
|
|
|
51936
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
51937
51993
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
51938
51994
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
51939
51995
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
|
|
@@ -51943,7 +51999,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
51943
51999
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf4(account), JSON.stringify(until), now2);
|
|
51944
52000
|
}, "setTaskRulesStop");
|
|
51945
52001
|
|
|
51946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52002
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
51947
52003
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
51948
52004
|
const { database } = context;
|
|
51949
52005
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -52002,7 +52058,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52002
52058
|
};
|
|
52003
52059
|
}, "syncStoreOver");
|
|
52004
52060
|
|
|
52005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
52006
52062
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
52007
52063
|
const { database } = context;
|
|
52008
52064
|
return {
|
|
@@ -52024,7 +52080,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52024
52080
|
};
|
|
52025
52081
|
}, "tagsStoreOver");
|
|
52026
52082
|
|
|
52027
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52083
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
52028
52084
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
52029
52085
|
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
|
|
52030
52086
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -52151,7 +52207,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
52151
52207
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
52152
52208
|
}, "savePictureChunks");
|
|
52153
52209
|
|
|
52154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
52155
52211
|
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,
|
|
52156
52212
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
52157
52213
|
FROM messages m
|
|
@@ -52240,7 +52296,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
52240
52296
|
return plain2(best(found2));
|
|
52241
52297
|
}, "nearestMessages");
|
|
52242
52298
|
|
|
52243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
52244
52300
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
52245
52301
|
const { database } = context;
|
|
52246
52302
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -52498,7 +52554,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
52498
52554
|
embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
|
|
52499
52555
|
}), "vectorsStoreOver");
|
|
52500
52556
|
|
|
52501
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
52502
52558
|
import { existsSync as existsSync2, readFileSync as readFileSync4 } from "node:fs";
|
|
52503
52559
|
import { dirname as dirname3, join as join3 } from "node:path";
|
|
52504
52560
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -52586,10 +52642,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
52586
52642
|
}
|
|
52587
52643
|
}, "lastBackup");
|
|
52588
52644
|
|
|
52589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52645
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
52590
52646
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
52591
52647
|
|
|
52592
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
52593
52649
|
var COUNTED_TABLES = [
|
|
52594
52650
|
"accounts",
|
|
52595
52651
|
"chats",
|
|
@@ -52674,7 +52730,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
52674
52730
|
};
|
|
52675
52731
|
}, "storeContents");
|
|
52676
52732
|
|
|
52677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52733
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
52678
52734
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
52679
52735
|
const context = await openStoreContext(options);
|
|
52680
52736
|
try {
|