@wirecat/cli-memo 0.131.39 → 0.131.40
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-5CXMPAOF.js → all-profiles-QFW2NKJY.js} +5 -5
- package/dist/bundle/{anthropic-KJECM7MD.js → anthropic-IARLHPYJ.js} +3 -3
- package/dist/bundle/{app-server-ZO7Z7RMA.js → app-server-L4N5IWJF.js} +35 -35
- package/dist/bundle/auto-24I3FBUW.js +86 -0
- package/dist/bundle/{bun-V2HGEGFF.js → bun-NWKIEX53.js} +2 -2
- package/dist/bundle/{bun-sqlite-DSFSAFNQ.js → bun-sqlite-HORFVNNY.js} +2 -2
- package/dist/bundle/{chunk-P357OGUL.js → chunk-2SZEKYBN.js} +1 -1
- package/dist/bundle/{chunk-P3QBCCBA.js → chunk-2YJBI3NK.js} +1 -1
- package/dist/bundle/{chunk-QAFJG52K.js → chunk-4EZK5PGX.js} +1 -1
- package/dist/bundle/{chunk-PWVNSJBL.js → chunk-5G3NNIJQ.js} +10 -10
- package/dist/bundle/{chunk-7DMTHV2P.js → chunk-5HSR6U4Z.js} +1 -1
- package/dist/bundle/{chunk-WDDYMCLD.js → chunk-5HXLRQ4Q.js} +43 -43
- package/dist/bundle/{chunk-LXNWBHCK.js → chunk-6E4DCMJ5.js} +4 -4
- package/dist/bundle/{chunk-EY42TTWE.js → chunk-6RAU7FD2.js} +11 -11
- package/dist/bundle/{chunk-QL2YLPB5.js → chunk-756VKGKO.js} +2 -2
- package/dist/bundle/{chunk-DZBNKSE2.js → chunk-A7M74RZH.js} +352 -358
- package/dist/bundle/{chunk-QMDVWF3C.js → chunk-A7MXWBIX.js} +2 -2
- package/dist/bundle/{chunk-UECWAAZ3.js → chunk-ADMB7OK5.js} +4 -4
- package/dist/bundle/{chunk-4GA7IMXD.js → chunk-AKSNCK5L.js} +257 -257
- package/dist/bundle/{chunk-4MFNKTQQ.js → chunk-ASVVDNAS.js} +3 -3
- package/dist/bundle/{chunk-CHAA2BOM.js → chunk-ATR65D7K.js} +8 -8
- package/dist/bundle/{chunk-HB3YU52J.js → chunk-B4XRE67Q.js} +10 -9
- package/dist/bundle/{chunk-XED6NO7E.js → chunk-BWNNUEHG.js} +1 -1
- package/dist/bundle/{chunk-BHBLLZAO.js → chunk-CB34NXQP.js} +89 -74
- package/dist/bundle/{chunk-KBDZG6XU.js → chunk-DNZH53VQ.js} +3 -3
- package/dist/bundle/{chunk-H4DBYU2J.js → chunk-EGQCBZVM.js} +2 -2
- package/dist/bundle/{chunk-552IRBSA.js → chunk-EGRI2NUT.js} +4 -4
- package/dist/bundle/{chunk-TSGJRL2S.js → chunk-EIFPQD57.js} +1 -1
- package/dist/bundle/{chunk-G35CZBBF.js → chunk-EQQWJM6B.js} +5 -5
- package/dist/bundle/{chunk-WJCBQFEM.js → chunk-FBREYLY5.js} +1 -1
- package/dist/bundle/{chunk-H4GQZLTW.js → chunk-FTX3OPWV.js} +27 -27
- package/dist/bundle/{chunk-7VBSW2RI.js → chunk-G3IO2TLK.js} +5 -5
- package/dist/bundle/{chunk-AKLFOL4C.js → chunk-JGDZ3G4P.js} +3 -3
- package/dist/bundle/{chunk-5I75PUEK.js → chunk-KAU67PDK.js} +197 -164
- package/dist/bundle/{chunk-ZQTFPZ36.js → chunk-KGXVJO2V.js} +5 -5
- package/dist/bundle/{chunk-TOZ2COFV.js → chunk-KWGNPUIV.js} +7 -7
- package/dist/bundle/{chunk-JQSFIPWA.js → chunk-LL5HPYW5.js} +7 -7
- package/dist/bundle/{chunk-QZABT7XH.js → chunk-LXQQ7Q34.js} +9 -9
- package/dist/bundle/{chunk-WBWFH7ZT.js → chunk-M7UHHXSH.js} +1 -1
- package/dist/bundle/{chunk-QUJXYDYY.js → chunk-MLHRER2H.js} +2 -2
- package/dist/bundle/{chunk-U5B2ORUM.js → chunk-NCC3RXUX.js} +3 -3
- package/dist/bundle/{chunk-SANEKFUF.js → chunk-OGHWLR5E.js} +1 -1
- package/dist/bundle/{chunk-S7W5GFOI.js → chunk-OSDA5EZW.js} +283 -271
- package/dist/bundle/{chunk-Q3O7N35U.js → chunk-OZF7QBTS.js} +2 -2
- package/dist/bundle/{chunk-OJBM56FX.js → chunk-PAE2NZ7S.js} +20 -20
- package/dist/bundle/{chunk-GANKKP5F.js → chunk-QR5KWOZ2.js} +4 -4
- package/dist/bundle/{chunk-72DBFKCI.js → chunk-RZ3UQFLE.js} +1 -1
- package/dist/bundle/{chunk-Q35DHKBZ.js → chunk-SRYOICSG.js} +1 -1
- package/dist/bundle/{chunk-YFBNICKS.js → chunk-THIXDXP3.js} +2 -2
- package/dist/bundle/{chunk-SB7V3HFM.js → chunk-TWC6UJD2.js} +12 -12
- package/dist/bundle/{chunk-RBLUTSSL.js → chunk-U5WIWLWM.js} +6 -6
- package/dist/bundle/{chunk-GRTELFME.js → chunk-UEG3BDCX.js} +4 -4
- package/dist/bundle/{chunk-EP5U5WCQ.js → chunk-UGHYNVWQ.js} +1 -1
- package/dist/bundle/{chunk-O6ZLAFWQ.js → chunk-W3SMUCMB.js} +1 -1
- package/dist/bundle/{chunk-CQJO22KN.js → chunk-WAZWM4KZ.js} +20 -20
- package/dist/bundle/{chunk-AX6AMVVY.js → chunk-WHWACGZX.js} +7 -7
- package/dist/bundle/{chunk-DMY2YVJ7.js → chunk-WU6PDHXY.js} +5 -5
- package/dist/bundle/{chunk-UIUMG7AY.js → chunk-XAWB4WEC.js} +1 -1
- package/dist/bundle/{chunk-6BJPSIFE.js → chunk-XF7TG5VK.js} +38 -35
- package/dist/bundle/{chunk-ER7SUNTY.js → chunk-XV7M6VWX.js} +4 -4
- package/dist/bundle/{chunk-3ZEH35NH.js → chunk-YWWTEWX3.js} +1 -1
- package/dist/bundle/{chunk-B2YW6VOA.js → chunk-Z6OKSDP3.js} +1 -1
- package/dist/bundle/{chunk-D7JMUN36.js → chunk-ZH43Q2JO.js} +2 -2
- package/dist/bundle/{command-contract-JXLIGF3U.js → command-contract-ZRJPMWWI.js} +11 -11
- package/dist/bundle/{decode-HXMDIZKS.js → decode-MDCEP64X.js} +2 -2
- package/dist/bundle/{echarts-MRWQC3FY.js → echarts-RFIQAWMT.js} +2 -2
- package/dist/bundle/{embed-IEJFYZ7N.js → embed-443F7XR4.js} +3 -3
- package/dist/bundle/{embedder-N2TXC47Z.js → embedder-VRDPZFWC.js} +6 -6
- package/dist/bundle/{entry-VX4RACD7.js → entry-36KBOBA4.js} +4 -4
- package/dist/bundle/failure-QKFNHYKC.js +66 -0
- package/dist/bundle/{first-run-2GXQUNFV.js → first-run-CYZSGJTG.js} +5 -5
- package/dist/bundle/{first-screen-JRKMDJPK.js → first-screen-UY54KNVU.js} +12 -12
- package/dist/bundle/{instructions-FR4H42RI.js → instructions-RI2WFMBA.js} +1 -1
- package/dist/bundle/{mcp-IP3FEW24.js → mcp-DHX4GF3A.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-QWBBKDHE.js → node-H7LWGE5H.js} +2 -2
- package/dist/bundle/{node-sqlite-GKJHUPHC.js → node-sqlite-N4POELFM.js} +3 -3
- package/dist/bundle/{oauth-ZQ7B32ZI.js → oauth-OOUASPSL.js} +4 -4
- package/dist/bundle/{open-TDGXVXNV.js → open-2T52CQDG.js} +2 -2
- package/dist/bundle/{openai-3T4YGUZM.js → openai-76CJYDRJ.js} +7 -7
- package/dist/bundle/{process-OBTDURL4.js → process-7YATIAKW.js} +1 -1
- package/dist/bundle/{program-6UJEO4TI.js → program-O4I2BGM2.js} +56 -56
- package/dist/bundle/{prompt-JZIIKSM4.js → prompt-MHD5EI75.js} +2 -2
- package/dist/bundle/{recognize-47F6WJYE.js → recognize-ARCD7XPJ.js} +1 -1
- package/dist/bundle/{remote-NHSYSI2S.js → remote-OQ7TUXN3.js} +4 -4
- package/dist/bundle/{rerank-HONNCBTA.js → rerank-422D4DZR.js} +4 -4
- package/dist/bundle/{serve-63BFDEQS.js → serve-ZOT62JRM.js} +6 -6
- package/dist/bundle/server-EISBI6O6.js +61 -0
- package/dist/bundle/{server-QWJPOH7K.js → server-HAZC3T7X.js} +50 -50
- package/dist/bundle/server-NNQ3YRBV.js +48 -0
- package/dist/bundle/{state-ZLODXERO.js → state-KBW7BI2G.js} +3 -3
- package/dist/bundle/{store-Q36VLED7.js → store-KZY5FZPD.js} +9 -9
- package/dist/bundle/store-maintenance-command-ZFQOMCLZ.js +48 -0
- package/dist/bundle/update-SAX5XN2C.js +69 -0
- package/dist/knowledge/project-status-command.js +1 -1
- package/dist/knowledge/project-status-command.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/skills/mail-triage/SKILL.md +2 -2
- package/dist/bundle/auto-MA47DOER.js +0 -86
- package/dist/bundle/failure-LU3CYK3U.js +0 -66
- package/dist/bundle/server-I6M5QH5W.js +0 -48
- package/dist/bundle/server-XYUNBCYP.js +0 -61
- package/dist/bundle/store-maintenance-command-EM53HVOY.js +0 -48
- package/dist/bundle/update-UKMV74FK.js +0 -69
- /package/dist/bundle/{chunk-TYQAAHHM.js → chunk-5VKETWNU.js} +0 -0
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
findingFingerprint,
|
|
44
44
|
findingHash,
|
|
45
45
|
findingId,
|
|
46
|
+
findingNeeds,
|
|
46
47
|
findingText,
|
|
47
48
|
formatDecimal,
|
|
48
49
|
formatMeetingReference,
|
|
@@ -98,11 +99,11 @@ import {
|
|
|
98
99
|
validateQuery,
|
|
99
100
|
walkQuery,
|
|
100
101
|
zonedMoment
|
|
101
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-CB34NXQP.js";
|
|
102
103
|
import {
|
|
103
104
|
holdsCredential,
|
|
104
105
|
secretNamed
|
|
105
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-4EZK5PGX.js";
|
|
106
107
|
import {
|
|
107
108
|
DEFAULT_STEMMERS,
|
|
108
109
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -115,26 +116,26 @@ import {
|
|
|
115
116
|
fold,
|
|
116
117
|
normalize,
|
|
117
118
|
parseStemmers
|
|
118
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-KWGNPUIV.js";
|
|
119
120
|
import {
|
|
120
121
|
DEFAULT_TASK_CATEGORIES,
|
|
121
122
|
sharedConfigPath,
|
|
122
123
|
storedTaskCategories,
|
|
123
124
|
taskCategoriesReader
|
|
124
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-UEG3BDCX.js";
|
|
125
126
|
import {
|
|
126
127
|
refuseOwnerStoreInTests,
|
|
127
128
|
storePath
|
|
128
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-XAWB4WEC.js";
|
|
129
130
|
import {
|
|
130
131
|
quietSqliteWarning,
|
|
131
132
|
storeCapable
|
|
132
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-EQQWJM6B.js";
|
|
133
134
|
import {
|
|
134
135
|
PRAGMAS,
|
|
135
136
|
TIME_LIMIT_FUNCTION,
|
|
136
137
|
TimeLimitReached
|
|
137
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-BWNNUEHG.js";
|
|
138
139
|
import {
|
|
139
140
|
array,
|
|
140
141
|
boolean,
|
|
@@ -184,7 +185,7 @@ import {
|
|
|
184
185
|
sql,
|
|
185
186
|
sqliteTable,
|
|
186
187
|
text
|
|
187
|
-
} from "./chunk-
|
|
188
|
+
} from "./chunk-EIFPQD57.js";
|
|
188
189
|
import {
|
|
189
190
|
__commonJS,
|
|
190
191
|
__name,
|
|
@@ -9928,7 +9929,7 @@ var require_cjs = __commonJS({
|
|
|
9928
9929
|
}
|
|
9929
9930
|
});
|
|
9930
9931
|
|
|
9931
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
9932
9933
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
9933
9934
|
const methods = whole;
|
|
9934
9935
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10056,7 +10057,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10056
10057
|
};
|
|
10057
10058
|
}, "bindAccount");
|
|
10058
10059
|
|
|
10059
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10060
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
10060
10061
|
var SCHEME = "msg:";
|
|
10061
10062
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat: chat2, message: message2 }) => SCHEME + [provider, account, chat2, message2].map(encodeURIComponent).join("/"), "formatLocator");
|
|
10062
10063
|
var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -10070,7 +10071,7 @@ var parseLocator = /* @__PURE__ */ __name((reference2) => {
|
|
|
10070
10071
|
return { provider, account, chat: chat2, message: message2 };
|
|
10071
10072
|
}, "parseLocator");
|
|
10072
10073
|
|
|
10073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10074
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
10074
10075
|
var SIMPLE_REFERENCES = [
|
|
10075
10076
|
"note",
|
|
10076
10077
|
"document",
|
|
@@ -10218,7 +10219,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text6) => {
|
|
|
10218
10219
|
return match !== null && byPrefix.has(match[1]);
|
|
10219
10220
|
}, "looksLikeReference");
|
|
10220
10221
|
|
|
10221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
10222
10223
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
|
|
10223
10224
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
10224
10225
|
var PROVIDERS = [
|
|
@@ -10334,7 +10335,7 @@ var providerNamed = /* @__PURE__ */ __name((word2) => {
|
|
|
10334
10335
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
10335
10336
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
10336
10337
|
|
|
10337
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
10338
10339
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
10339
10340
|
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");
|
|
10340
10341
|
var fail = /* @__PURE__ */ __name((message2) => {
|
|
@@ -10357,7 +10358,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
10357
10358
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
10358
10359
|
}, "sourceOf");
|
|
10359
10360
|
|
|
10360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
10361
10362
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
10362
10363
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
10363
10364
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -10544,7 +10545,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf2 = (kind4)
|
|
|
10544
10545
|
return { accounts: [...chosen.values()], skipped };
|
|
10545
10546
|
}, "fitting");
|
|
10546
10547
|
|
|
10547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10548
10549
|
var IndexBuilderOn = class {
|
|
10549
10550
|
static {
|
|
10550
10551
|
__name(this, "IndexBuilderOn");
|
|
@@ -10739,7 +10740,7 @@ function alias(table, alias2) {
|
|
|
10739
10740
|
}
|
|
10740
10741
|
__name(alias, "alias");
|
|
10741
10742
|
|
|
10742
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10743
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10743
10744
|
var ENTITY_TABLES = {
|
|
10744
10745
|
account: "accounts",
|
|
10745
10746
|
attachment: "attachments",
|
|
@@ -10782,7 +10783,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10782
10783
|
return { table, pointer, type, count, known: known2 };
|
|
10783
10784
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
10784
10785
|
|
|
10785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
10786
10787
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
10787
10788
|
id: integer("id").primaryKey(),
|
|
10788
10789
|
name: text("name").notNull().unique(),
|
|
@@ -10791,7 +10792,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
10791
10792
|
updatedAt: integer("updated_at").notNull()
|
|
10792
10793
|
});
|
|
10793
10794
|
|
|
10794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10795
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
10795
10796
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
10796
10797
|
sourceKey: text("source_key").notNull(),
|
|
10797
10798
|
collection: text("collection").notNull(),
|
|
@@ -10801,13 +10802,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
10801
10802
|
createdAt: integer("created_at").notNull()
|
|
10802
10803
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
10803
10804
|
|
|
10804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
10805
10806
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
10806
10807
|
id: integer("id").notNull(),
|
|
10807
10808
|
indexableType: text("indexable_type").notNull()
|
|
10808
10809
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
10809
10810
|
|
|
10810
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10811
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
10811
10812
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
10812
10813
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
10813
10814
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -10833,7 +10834,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
10833
10834
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
10834
10835
|
]);
|
|
10835
10836
|
|
|
10836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
10837
10838
|
var accounts = sqliteTable("accounts", {
|
|
10838
10839
|
id: integer("id").primaryKey(),
|
|
10839
10840
|
provider: text("provider").notNull(),
|
|
@@ -12500,7 +12501,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
12500
12501
|
at: integer("at").notNull()
|
|
12501
12502
|
});
|
|
12502
12503
|
|
|
12503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
12504
12505
|
var ARMS = [
|
|
12505
12506
|
[
|
|
12506
12507
|
"message",
|
|
@@ -12627,7 +12628,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
12627
12628
|
return recomputed;
|
|
12628
12629
|
}, "drainInvolvementQueue");
|
|
12629
12630
|
|
|
12630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12631
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
12631
12632
|
import { domainToUnicode } from "node:url";
|
|
12632
12633
|
|
|
12633
12634
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -22649,7 +22650,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
22649
22650
|
}, "oa");
|
|
22650
22651
|
var na = { parse: O, get: aa, isValid: oa };
|
|
22651
22652
|
|
|
22652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
22653
22654
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
22654
22655
|
var ID = /^[\w-]{10,}$/;
|
|
22655
22656
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -22690,7 +22691,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text6) => [...text6.matchAll(L
|
|
|
22690
22691
|
return { url, documentId: googleDocumentId(url) };
|
|
22691
22692
|
}), "googleDocumentLinks");
|
|
22692
22693
|
|
|
22693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
22694
22695
|
var PHONE_PLANS = [
|
|
22695
22696
|
{
|
|
22696
22697
|
country: "us",
|
|
@@ -23070,7 +23071,7 @@ var PHONE_PLANS = [
|
|
|
23070
23071
|
}
|
|
23071
23072
|
];
|
|
23072
23073
|
|
|
23073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23074
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
23074
23075
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
23075
23076
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
23076
23077
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -23111,7 +23112,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
23111
23112
|
return void 0;
|
|
23112
23113
|
}, "nationalPhone");
|
|
23113
23114
|
|
|
23114
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
23115
23116
|
var BEFORE = [
|
|
23116
23117
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
23117
23118
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -23371,7 +23372,7 @@ var findPlaces = /* @__PURE__ */ __name((text6) => {
|
|
|
23371
23372
|
return found2.sort((a, b) => a.start - b.start);
|
|
23372
23373
|
}, "findPlaces");
|
|
23373
23374
|
|
|
23374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
23375
23376
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
23376
23377
|
var MENTION_VERSIONS = {
|
|
23377
23378
|
phone: 1,
|
|
@@ -23561,7 +23562,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
23561
23562
|
};
|
|
23562
23563
|
}, "typedPhone");
|
|
23563
23564
|
|
|
23564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23565
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
23565
23566
|
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";
|
|
23566
23567
|
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";
|
|
23567
23568
|
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";
|
|
@@ -23569,7 +23570,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
23569
23570
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
23570
23571
|
var NAME_WORDS = WORDS.split(" ");
|
|
23571
23572
|
|
|
23572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23573
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
23573
23574
|
var LATIN_TO_CYRILLIC = {
|
|
23574
23575
|
shch: "\u0449",
|
|
23575
23576
|
sch: "\u0449",
|
|
@@ -23777,7 +23778,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text6, stem, taken) => {
|
|
|
23777
23778
|
return found2;
|
|
23778
23779
|
}, "findUnknownNames");
|
|
23779
23780
|
|
|
23780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
23781
23782
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
23782
23783
|
"webpage",
|
|
23783
23784
|
"share",
|
|
@@ -23817,7 +23818,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
|
23817
23818
|
});
|
|
23818
23819
|
}, "matchDownloads");
|
|
23819
23820
|
|
|
23820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
23821
23822
|
var QUERY_VERSION = 1;
|
|
23822
23823
|
var QUERY_LIMITS2 = {
|
|
23823
23824
|
...QUERY_LIMITS,
|
|
@@ -23853,7 +23854,7 @@ function exhausted(budget) {
|
|
|
23853
23854
|
}
|
|
23854
23855
|
__name(exhausted, "exhausted");
|
|
23855
23856
|
|
|
23856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23857
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
23857
23858
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
23858
23859
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
23859
23860
|
kind: "char",
|
|
@@ -24253,7 +24254,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
24253
24254
|
return out;
|
|
24254
24255
|
}, "foldRegex");
|
|
24255
24256
|
|
|
24256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
24257
24258
|
var PRESET_VERSION = 1;
|
|
24258
24259
|
var PRESETS = {
|
|
24259
24260
|
password: {
|
|
@@ -24307,7 +24308,7 @@ var PRESETS = {
|
|
|
24307
24308
|
}
|
|
24308
24309
|
};
|
|
24309
24310
|
|
|
24310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
24311
24312
|
var FIELD_VERSION = 2;
|
|
24312
24313
|
var UNITS = {
|
|
24313
24314
|
"": 1,
|
|
@@ -24768,12 +24769,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
|
|
|
24768
24769
|
return validateFields(parsed3.output);
|
|
24769
24770
|
}, "validateAst");
|
|
24770
24771
|
|
|
24771
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24772
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
24772
24773
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
24773
24774
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
24774
24775
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
24775
24776
|
|
|
24776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
24777
24778
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
24778
24779
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
24779
24780
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -24797,7 +24798,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
24797
24798
|
};
|
|
24798
24799
|
}, "linkMatch");
|
|
24799
24800
|
|
|
24800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
24801
24802
|
var SETTING = "phoneCountries";
|
|
24802
24803
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
24803
24804
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -24828,7 +24829,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
24828
24829
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
24829
24830
|
}, "valueMatch");
|
|
24830
24831
|
|
|
24831
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24832
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
24832
24833
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
24833
24834
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
24834
24835
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -24856,7 +24857,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
24856
24857
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
24857
24858
|
}, "vocabularySimilarity");
|
|
24858
24859
|
|
|
24859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
24860
24861
|
import { createHash } from "node:crypto";
|
|
24861
24862
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
24862
24863
|
try {
|
|
@@ -24922,7 +24923,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind4, by, options
|
|
|
24922
24923
|
});
|
|
24923
24924
|
}, "guardTagCreation");
|
|
24924
24925
|
|
|
24925
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
24926
24927
|
var invalid2 = /* @__PURE__ */ __name((message2) => {
|
|
24927
24928
|
throw new CliError("validation_error", message2);
|
|
24928
24929
|
}, "invalid");
|
|
@@ -24999,7 +25000,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
24999
25000
|
};
|
|
25000
25001
|
}, "createTagRedirectIndex");
|
|
25001
25002
|
|
|
25002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
25003
25004
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
25004
25005
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
25005
25006
|
if (!row2)
|
|
@@ -25027,7 +25028,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
25027
25028
|
return snapshot2;
|
|
25028
25029
|
}, "tagRedirectSnapshot");
|
|
25029
25030
|
|
|
25030
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25031
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
25031
25032
|
import { createHash as createHash2 } from "node:crypto";
|
|
25032
25033
|
var TASK_KEY_PREFIXES = {
|
|
25033
25034
|
question: "Q",
|
|
@@ -25055,7 +25056,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
25055
25056
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
25056
25057
|
}, "taskAccountOf");
|
|
25057
25058
|
|
|
25058
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
25059
25060
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
25060
25061
|
var REFERABLE = {
|
|
25061
25062
|
note: { tombstone: true },
|
|
@@ -25220,7 +25221,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
25220
25221
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
25221
25222
|
}, "taskIdOf");
|
|
25222
25223
|
|
|
25223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25224
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
25224
25225
|
var toMs = /* @__PURE__ */ __name((iso13) => {
|
|
25225
25226
|
if (iso13 === null || iso13 === void 0)
|
|
25226
25227
|
return null;
|
|
@@ -25234,7 +25235,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
25234
25235
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
25235
25236
|
var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
25236
25237
|
|
|
25237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25238
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
25238
25239
|
var TAG_KINDS = ["tag", "topic"];
|
|
25239
25240
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
25240
25241
|
var TAG_TYPE = {
|
|
@@ -25437,7 +25438,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
25437
25438
|
return result;
|
|
25438
25439
|
}, "tagsOf");
|
|
25439
25440
|
|
|
25440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25441
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
25441
25442
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
25442
25443
|
var SPEECH = speech("att");
|
|
25443
25444
|
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");
|
|
@@ -25801,7 +25802,7 @@ var FIELD_COMPILERS = {
|
|
|
25801
25802
|
subject
|
|
25802
25803
|
};
|
|
25803
25804
|
|
|
25804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
25805
25806
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
25806
25807
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
25807
25808
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -25817,7 +25818,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
25817
25818
|
};
|
|
25818
25819
|
}, "placeOf");
|
|
25819
25820
|
|
|
25820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
25821
25822
|
var DRAIN_ON_WRITE = 500;
|
|
25822
25823
|
var METHOD = "rules";
|
|
25823
25824
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -25980,7 +25981,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
25980
25981
|
return queued.length;
|
|
25981
25982
|
}, "drainMentions");
|
|
25982
25983
|
|
|
25983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25984
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
25984
25985
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
25985
25986
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
25986
25987
|
if (!exists2)
|
|
@@ -25988,7 +25989,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
25988
25989
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
25989
25990
|
}, "indexRow");
|
|
25990
25991
|
|
|
25991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
25992
25993
|
var INDEX = "message_stems";
|
|
25993
25994
|
var SETTING2 = "searchStemmers";
|
|
25994
25995
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -26110,7 +26111,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
26110
26111
|
};
|
|
26111
26112
|
}, "stemmerCache");
|
|
26112
26113
|
|
|
26113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
26114
26115
|
var SQLITE_BUSY = 5;
|
|
26115
26116
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
26116
26117
|
var isBusy = /* @__PURE__ */ __name((error) => {
|
|
@@ -26205,7 +26206,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
26205
26206
|
}
|
|
26206
26207
|
}, "read");
|
|
26207
26208
|
|
|
26208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26209
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
26209
26210
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
26210
26211
|
coalesce(CASE k.chunkable_type
|
|
26211
26212
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -26347,7 +26348,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
26347
26348
|
}, "dropUnusedVectors");
|
|
26348
26349
|
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");
|
|
26349
26350
|
|
|
26350
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
26351
26352
|
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({
|
|
26352
26353
|
target: [accounts.provider, accounts.externalId],
|
|
26353
26354
|
set: {
|
|
@@ -26456,7 +26457,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
26456
26457
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
26457
26458
|
}, "dropOrphanPeople");
|
|
26458
26459
|
|
|
26459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
26460
26461
|
var FOLDED = [
|
|
26461
26462
|
{ table: "tasks", column: "title" },
|
|
26462
26463
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -26493,7 +26494,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
26493
26494
|
return filled2;
|
|
26494
26495
|
}, "fillFolded");
|
|
26495
26496
|
|
|
26496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26497
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
26497
26498
|
var HISTORY_KEY = "$history";
|
|
26498
26499
|
var objectOf = /* @__PURE__ */ __name((text6) => {
|
|
26499
26500
|
if (typeof text6 !== "string")
|
|
@@ -26569,7 +26570,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
26569
26570
|
return rest;
|
|
26570
26571
|
}, "withoutHistory");
|
|
26571
26572
|
|
|
26572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26573
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
26573
26574
|
import { createHash as createHash3 } from "node:crypto";
|
|
26574
26575
|
var CHUNK_CHARS = 1200;
|
|
26575
26576
|
var CHUNK_OVERLAP = 150;
|
|
@@ -26674,7 +26675,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
26674
26675
|
return chunks2;
|
|
26675
26676
|
}, "cutChunks");
|
|
26676
26677
|
|
|
26677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26678
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
26678
26679
|
var DAY = 864e5;
|
|
26679
26680
|
var CURRENCY = [
|
|
26680
26681
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -26800,7 +26801,7 @@ var dueDayOf = /* @__PURE__ */ __name((text6, createdMs) => {
|
|
|
26800
26801
|
return best?.day ?? null;
|
|
26801
26802
|
}, "dueDayOf");
|
|
26802
26803
|
|
|
26803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
26804
26805
|
var DAY2 = 864e5;
|
|
26805
26806
|
var STOP_WORDS = new Set([
|
|
26806
26807
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -26955,7 +26956,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
26955
26956
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
26956
26957
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
26957
26958
|
|
|
26958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26959
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
26959
26960
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
26960
26961
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
26961
26962
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -27226,7 +27227,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
|
|
|
27226
27227
|
};
|
|
27227
27228
|
}, "readiness");
|
|
27228
27229
|
|
|
27229
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
27230
27231
|
var DOCUMENT_PICTURE = "document_picture";
|
|
27231
27232
|
var SCAN_PAGE2 = 5e3;
|
|
27232
27233
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -27289,7 +27290,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
27289
27290
|
}, "nearestPictures")
|
|
27290
27291
|
}), "documentPicturesOver");
|
|
27291
27292
|
|
|
27292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
27293
27294
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
27294
27295
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
27295
27296
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -27354,7 +27355,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
27354
27355
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
27355
27356
|
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");
|
|
27356
27357
|
|
|
27357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
27358
27359
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
27359
27360
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
27360
27361
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -27444,7 +27445,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
27444
27445
|
});
|
|
27445
27446
|
}, "linkMeeting");
|
|
27446
27447
|
|
|
27447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
27448
27449
|
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), ''))";
|
|
27449
27450
|
var UNSEARCHED_EVENT_TYPES = [
|
|
27450
27451
|
"working-location",
|
|
@@ -27674,7 +27675,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
27674
27675
|
return true;
|
|
27675
27676
|
}, "resetNoteIndex");
|
|
27676
27677
|
|
|
27677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27678
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
27678
27679
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
27679
27680
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
27680
27681
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -27693,7 +27694,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
27693
27694
|
}
|
|
27694
27695
|
}, "resolvePersonLinks");
|
|
27695
27696
|
|
|
27696
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27697
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
27697
27698
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
27698
27699
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
27699
27700
|
find: orm.select({
|
|
@@ -27918,7 +27919,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
27918
27919
|
}, "meetingIdentityPk");
|
|
27919
27920
|
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");
|
|
27920
27921
|
|
|
27921
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27922
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
27922
27923
|
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");
|
|
27923
27924
|
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");
|
|
27924
27925
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -28198,7 +28199,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
28198
28199
|
}
|
|
28199
28200
|
}, "replaceAutoTags");
|
|
28200
28201
|
|
|
28201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
28202
28203
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
28203
28204
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
28204
28205
|
var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
|
|
@@ -28217,7 +28218,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
28217
28218
|
return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
|
|
28218
28219
|
}, "counterFreshness");
|
|
28219
28220
|
|
|
28220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
28221
28222
|
import { createHash as createHash4 } from "node:crypto";
|
|
28222
28223
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
28223
28224
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -28315,7 +28316,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
28315
28316
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
28316
28317
|
}, "contextEvidenceRequest");
|
|
28317
28318
|
|
|
28318
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28319
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
28319
28320
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
28320
28321
|
var ACTIVITY = `
|
|
28321
28322
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -28432,7 +28433,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
28432
28433
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
28433
28434
|
}), "mailActivity");
|
|
28434
28435
|
|
|
28435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
28436
28437
|
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");
|
|
28437
28438
|
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;
|
|
28438
28439
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -28573,7 +28574,7 @@ var mailOwnText = /* @__PURE__ */ __name((body2) => {
|
|
|
28573
28574
|
return text6 || body2.trim();
|
|
28574
28575
|
}, "mailOwnText");
|
|
28575
28576
|
|
|
28576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
28577
28578
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
28578
28579
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
28579
28580
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
|
|
@@ -28683,7 +28684,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
28683
28684
|
return emails3 + threads;
|
|
28684
28685
|
}, "drainEmailIndex");
|
|
28685
28686
|
|
|
28686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28687
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
28687
28688
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
28688
28689
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
28689
28690
|
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,
|
|
@@ -28781,7 +28782,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
28781
28782
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
28782
28783
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
28783
28784
|
|
|
28784
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28785
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
28785
28786
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
28786
28787
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
28787
28788
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -28831,7 +28832,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
28831
28832
|
return threads.length;
|
|
28832
28833
|
}, "markEmailsRestored");
|
|
28833
28834
|
|
|
28834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
28835
28836
|
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");
|
|
28836
28837
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
28837
28838
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -28898,7 +28899,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
28898
28899
|
}
|
|
28899
28900
|
}), "mailRulesOver");
|
|
28900
28901
|
|
|
28901
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28902
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
28902
28903
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
28903
28904
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
28904
28905
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -28906,7 +28907,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
28906
28907
|
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);
|
|
28907
28908
|
}, "reviewLink");
|
|
28908
28909
|
|
|
28909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
28910
28911
|
function checkMeetingCancelled(signal) {
|
|
28911
28912
|
if (!signal?.aborted)
|
|
28912
28913
|
return;
|
|
@@ -28917,7 +28918,7 @@ function checkMeetingCancelled(signal) {
|
|
|
28917
28918
|
}
|
|
28918
28919
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
28919
28920
|
|
|
28920
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28921
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
28921
28922
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
28922
28923
|
id: Number(row2.id),
|
|
28923
28924
|
accountId: Number(row2.account_id),
|
|
@@ -28967,7 +28968,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
28967
28968
|
createdAt: Number(row2.created_at)
|
|
28968
28969
|
}), "transcriptRowOf");
|
|
28969
28970
|
|
|
28970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28971
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
28971
28972
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
28972
28973
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
28973
28974
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -29134,7 +29135,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
29134
29135
|
}
|
|
29135
29136
|
}), "meetingReadsOver");
|
|
29136
29137
|
|
|
29137
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
29138
29139
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
29139
29140
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
29140
29141
|
const params = [input.accountId];
|
|
@@ -29177,7 +29178,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
29177
29178
|
return { clauses, params };
|
|
29178
29179
|
}, "meetingSelectionSql");
|
|
29179
29180
|
|
|
29180
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29181
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
29181
29182
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
29182
29183
|
async meetingChatLines(input) {
|
|
29183
29184
|
checkMeetingCancelled(input.signal);
|
|
@@ -29205,7 +29206,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
29205
29206
|
}
|
|
29206
29207
|
}), "meetingChatLinesOver");
|
|
29207
29208
|
|
|
29208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29209
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
29209
29210
|
var MESSAGE_FIELDS = {
|
|
29210
29211
|
pk: messages.id,
|
|
29211
29212
|
nativeId: messages.externalId,
|
|
@@ -29376,7 +29377,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
29376
29377
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
29377
29378
|
}), "chatActivity");
|
|
29378
29379
|
|
|
29379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29380
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
29380
29381
|
var HIT_FIELDS = {
|
|
29381
29382
|
...MESSAGE_FIELDS,
|
|
29382
29383
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -29475,7 +29476,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
29475
29476
|
};
|
|
29476
29477
|
}, "directReplies");
|
|
29477
29478
|
|
|
29478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
29479
29480
|
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");
|
|
29480
29481
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
29481
29482
|
const found2 = identityRow(context, ref3);
|
|
@@ -29606,7 +29607,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
29606
29607
|
}, "mentioning");
|
|
29607
29608
|
var escaped = /* @__PURE__ */ __name((text6) => text6.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
29608
29609
|
|
|
29609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
29610
29611
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
29611
29612
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
29612
29613
|
}, "missing");
|
|
@@ -29728,7 +29729,7 @@ function meetingContextLinksOver(context) {
|
|
|
29728
29729
|
}
|
|
29729
29730
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
29730
29731
|
|
|
29731
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
29732
29733
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
29733
29734
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
29734
29735
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -29757,7 +29758,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
29757
29758
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
29758
29759
|
}, "indexedText");
|
|
29759
29760
|
|
|
29760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
29761
29762
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
29762
29763
|
var meetingCurrentIndexRows = `
|
|
29763
29764
|
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
|
|
@@ -29788,7 +29789,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
29788
29789
|
}, "invalidateMeetingStems");
|
|
29789
29790
|
var meetingStemmableText = /* @__PURE__ */ __name((text6) => text6.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
29790
29791
|
|
|
29791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29792
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
29792
29793
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
29793
29794
|
return {
|
|
29794
29795
|
async indexSearch(original) {
|
|
@@ -29856,10 +29857,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
29856
29857
|
}
|
|
29857
29858
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
29858
29859
|
|
|
29859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
29860
29861
|
import { createHash as createHash5 } from "node:crypto";
|
|
29861
29862
|
|
|
29862
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
29863
29864
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
29864
29865
|
const padded = ` ${term} `;
|
|
29865
29866
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -29868,7 +29869,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
29868
29869
|
return [...pieces];
|
|
29869
29870
|
}, "trigrams");
|
|
29870
29871
|
|
|
29871
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
29872
29873
|
var SHORTEST_CORRECTION = 3;
|
|
29873
29874
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
29874
29875
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -29915,7 +29916,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
29915
29916
|
return corrections;
|
|
29916
29917
|
}, "correctWords");
|
|
29917
29918
|
|
|
29918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
29919
29920
|
var SHORTEST_GARBLED = 4;
|
|
29920
29921
|
var MOST_WIDENED = 64;
|
|
29921
29922
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -30007,7 +30008,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
30007
30008
|
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));
|
|
30008
30009
|
}, "widenWords");
|
|
30009
30010
|
|
|
30010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30011
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
30011
30012
|
import { readFileSync } from "node:fs";
|
|
30012
30013
|
var loaded;
|
|
30013
30014
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -30066,7 +30067,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
30066
30067
|
return false;
|
|
30067
30068
|
}, "knownRussianWord");
|
|
30068
30069
|
|
|
30069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
30070
30071
|
var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
30071
30072
|
var MOST_WORDS = 128;
|
|
30072
30073
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -30293,7 +30294,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text6, stemmer) => {
|
|
|
30293
30294
|
return check3(tree);
|
|
30294
30295
|
}, "matchMeetingText");
|
|
30295
30296
|
|
|
30296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
30297
30298
|
var fail3 = /* @__PURE__ */ __name((message2) => {
|
|
30298
30299
|
throw new CliError("validation_error", message2);
|
|
30299
30300
|
}, "fail");
|
|
@@ -30475,7 +30476,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
30475
30476
|
}
|
|
30476
30477
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
30477
30478
|
|
|
30478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
30479
30480
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30480
30481
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
30481
30482
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -30507,7 +30508,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30507
30508
|
}
|
|
30508
30509
|
}), "meetingLanguagesOver");
|
|
30509
30510
|
|
|
30510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
30511
30512
|
import { createHash as createHash6 } from "node:crypto";
|
|
30512
30513
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
30513
30514
|
if (value === void 0)
|
|
@@ -30597,7 +30598,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
30597
30598
|
}
|
|
30598
30599
|
}), "meetingParticipantSearchOver");
|
|
30599
30600
|
|
|
30600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30601
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
30601
30602
|
var preparationQueries = {
|
|
30602
30603
|
participants: {
|
|
30603
30604
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -30647,7 +30648,7 @@ var preparationQueries = {
|
|
|
30647
30648
|
}
|
|
30648
30649
|
};
|
|
30649
30650
|
|
|
30650
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30651
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
30651
30652
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30652
30653
|
async preparationContext(original) {
|
|
30653
30654
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -30688,7 +30689,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30688
30689
|
}
|
|
30689
30690
|
}), "meetingPreparationContextOver");
|
|
30690
30691
|
|
|
30691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
30692
30693
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
30693
30694
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
30694
30695
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -30702,7 +30703,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
30702
30703
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
30703
30704
|
)`, "preparationSubjects");
|
|
30704
30705
|
|
|
30705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
30706
30707
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30707
30708
|
async preparationKnowledge(original) {
|
|
30708
30709
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -30747,7 +30748,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
30747
30748
|
}
|
|
30748
30749
|
}), "meetingPreparationKnowledgeOver");
|
|
30749
30750
|
|
|
30750
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
30751
30752
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30752
30753
|
async preparationNotes(original) {
|
|
30753
30754
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -30800,7 +30801,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30800
30801
|
}
|
|
30801
30802
|
}), "meetingPreparationNotesOver");
|
|
30802
30803
|
|
|
30803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
30804
30805
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30805
30806
|
async relatedHistory(original) {
|
|
30806
30807
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -30871,7 +30872,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30871
30872
|
}
|
|
30872
30873
|
}), "meetingRelatedHistoryOver");
|
|
30873
30874
|
|
|
30874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30875
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
30875
30876
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
30876
30877
|
var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
30877
30878
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -30952,7 +30953,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30952
30953
|
}
|
|
30953
30954
|
}), "meetingReviewOver");
|
|
30954
30955
|
|
|
30955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
30956
30957
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
30957
30958
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
30958
30959
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -31006,7 +31007,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31006
31007
|
}
|
|
31007
31008
|
}), "meetingSeriesHistoryOver");
|
|
31008
31009
|
|
|
31009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31010
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
31010
31011
|
var MOST_ROWS = 5e5;
|
|
31011
31012
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
31012
31013
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -31075,7 +31076,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31075
31076
|
}
|
|
31076
31077
|
}), "meetingStatsOver");
|
|
31077
31078
|
|
|
31078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
31079
31080
|
var CURSOR_KEY = "meetings";
|
|
31080
31081
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
31081
31082
|
id: Number(row2.id),
|
|
@@ -31644,7 +31645,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31644
31645
|
};
|
|
31645
31646
|
}, "meetingStoreOver");
|
|
31646
31647
|
|
|
31647
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
31648
31649
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
31649
31650
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
31650
31651
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -31670,7 +31671,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
31670
31671
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
31671
31672
|
}, "release");
|
|
31672
31673
|
|
|
31673
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31674
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
31674
31675
|
var THREAD_COLUMNS = {
|
|
31675
31676
|
subject: {
|
|
31676
31677
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -31687,7 +31688,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
31687
31688
|
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);
|
|
31688
31689
|
}, "threadRows");
|
|
31689
31690
|
|
|
31690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31691
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
31691
31692
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
31692
31693
|
id: `email:${place.emailId}`,
|
|
31693
31694
|
chatId: place.threadExternalId,
|
|
@@ -32243,7 +32244,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
32243
32244
|
}
|
|
32244
32245
|
}), "mailStoreOver");
|
|
32245
32246
|
|
|
32246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32247
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
32247
32248
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
32248
32249
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
32249
32250
|
var folded4 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -32333,7 +32334,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
32333
32334
|
}, "knownWord");
|
|
32334
32335
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
32335
32336
|
|
|
32336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32337
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
32337
32338
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
32338
32339
|
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");
|
|
32339
32340
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -32419,7 +32420,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
32419
32420
|
return found2;
|
|
32420
32421
|
}, "spokenTranscripts");
|
|
32421
32422
|
|
|
32422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
32423
32424
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
32424
32425
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
32425
32426
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -32466,7 +32467,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
32466
32467
|
});
|
|
32467
32468
|
}, "placeHits");
|
|
32468
32469
|
|
|
32469
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32470
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
32470
32471
|
var GROUPS = {
|
|
32471
32472
|
chat: {
|
|
32472
32473
|
key: "m.chat_id",
|
|
@@ -32488,7 +32489,7 @@ var GROUPS = {
|
|
|
32488
32489
|
}
|
|
32489
32490
|
};
|
|
32490
32491
|
|
|
32491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
32492
32493
|
var MESSAGES2 = {
|
|
32493
32494
|
rows: "messages",
|
|
32494
32495
|
threads: "chats",
|
|
@@ -32971,7 +32972,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
32971
32972
|
};
|
|
32972
32973
|
}, "runCompiled");
|
|
32973
32974
|
|
|
32974
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
32975
32976
|
function invalidMetadata() {
|
|
32976
32977
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
32977
32978
|
}
|
|
@@ -33073,7 +33074,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
33073
33074
|
};
|
|
33074
33075
|
}), "counterTargets");
|
|
33075
33076
|
|
|
33076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
33077
33078
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind4) => `'${kind4}'`).join(",");
|
|
33078
33079
|
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,
|
|
33079
33080
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -33192,7 +33193,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
33192
33193
|
}));
|
|
33193
33194
|
}, "attachmentViews");
|
|
33194
33195
|
|
|
33195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
33196
33197
|
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");
|
|
33197
33198
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text6, source2) => {
|
|
33198
33199
|
const { orm, database, now: now2 } = context;
|
|
@@ -33230,7 +33231,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
33230
33231
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
33231
33232
|
}, "intoVoiceAttachment");
|
|
33232
33233
|
|
|
33233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33234
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
33234
33235
|
var FIELDS = [
|
|
33235
33236
|
"threadExternalId",
|
|
33236
33237
|
"senderIdentityId",
|
|
@@ -33547,7 +33548,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
33547
33548
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
33548
33549
|
}, "writeDerivedReactions");
|
|
33549
33550
|
|
|
33550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33551
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
33551
33552
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
33552
33553
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
33553
33554
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -33568,7 +33569,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
33568
33569
|
};
|
|
33569
33570
|
}, "keysOver");
|
|
33570
33571
|
|
|
33571
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
33572
33573
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
33573
33574
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
33574
33575
|
if (!row2)
|
|
@@ -33603,7 +33604,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
33603
33604
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
33604
33605
|
}, "saveProfile");
|
|
33605
33606
|
|
|
33606
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
33607
33608
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
33608
33609
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
33609
33610
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -33660,7 +33661,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
33660
33661
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
33661
33662
|
}, "proposedBySql");
|
|
33662
33663
|
|
|
33663
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33664
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
33664
33665
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
33665
33666
|
const owner = ownerPerson(context.database).id;
|
|
33666
33667
|
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);
|
|
@@ -33681,7 +33682,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
33681
33682
|
return personOf(context, ref3);
|
|
33682
33683
|
}, "linkToOwner");
|
|
33683
33684
|
|
|
33684
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33685
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
33685
33686
|
var PROVIDERS_SETTING = "providers";
|
|
33686
33687
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
33687
33688
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -33716,7 +33717,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
33716
33717
|
});
|
|
33717
33718
|
}, "registerProvider");
|
|
33718
33719
|
|
|
33719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
33720
33721
|
var DAY3 = 864e5;
|
|
33721
33722
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
33722
33723
|
var TEXT_LIMIT = 20;
|
|
@@ -33915,7 +33916,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
33915
33916
|
};
|
|
33916
33917
|
}, "taskSimilarityOver");
|
|
33917
33918
|
|
|
33918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
33919
33920
|
var SETTING3 = "taskCategories";
|
|
33920
33921
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
33921
33922
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -33934,7 +33935,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
33934
33935
|
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);
|
|
33935
33936
|
}, "saveTaskCategories");
|
|
33936
33937
|
|
|
33937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
33938
33939
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
33939
33940
|
var ALLOWED = "taskAgentClose";
|
|
33940
33941
|
var MIN = "taskAgentCloseMin";
|
|
@@ -33990,10 +33991,10 @@ var SUGGESTION_COLUMNS = [
|
|
|
33990
33991
|
];
|
|
33991
33992
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
33992
33993
|
|
|
33993
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33994
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
33994
33995
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
33995
33996
|
|
|
33996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
33997
33998
|
var TASK_CLOSE_KIND = "task_close";
|
|
33998
33999
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
33999
34000
|
var isOwnerOnlyKind = /* @__PURE__ */ __name((kind4) => kind4 === MAIL_FINDINGS_KIND || kind4 === MEETING_FINDINGS_KIND || kind4 === TASK_CLOSE_KIND, "isOwnerOnlyKind");
|
|
@@ -34041,7 +34042,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
34041
34042
|
}, "assertMayDecide");
|
|
34042
34043
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
34043
34044
|
|
|
34044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
34045
34046
|
var PROFILE_PLACEHOLDER = "<profile>";
|
|
34046
34047
|
var oneLine = /* @__PURE__ */ __name((text6) => singleLine(text6.replace(/\s+/g, " ").trim()), "oneLine");
|
|
34047
34048
|
var openKind = /* @__PURE__ */ __name((kind4) => kind4 === "email" ? "message" : kind4 === "email_thread" ? "chat" : kind4 === "unknown" ? void 0 : kind4, "openKind");
|
|
@@ -34094,7 +34095,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
|
|
|
34094
34095
|
return `${WORDS2[summary.kind]} ${named3}${notes2 === "" ? "" : ` (${notes2})`}`;
|
|
34095
34096
|
}, "refLabel");
|
|
34096
34097
|
|
|
34097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
34098
34099
|
var EXCERPT_CHARS = 280;
|
|
34099
34100
|
var TITLE_CHARS = 120;
|
|
34100
34101
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -34455,7 +34456,7 @@ var refReadsOf = /* @__PURE__ */ __name((database, texts2, { excerpt = false } =
|
|
|
34455
34456
|
var summaryOf2 = /* @__PURE__ */ __name(({ sender, excerpt, ...summary }, withExcerpt) => withExcerpt ? { ...summary, excerpt } : summary, "summaryOf");
|
|
34456
34457
|
var refSummariesOf = /* @__PURE__ */ __name((database, texts2, options = {}) => new Map([...refReadsOf(database, texts2, options)].map(([text6, read2]) => [text6, summaryOf2(read2, options.excerpt === true)])), "refSummariesOf");
|
|
34457
34458
|
|
|
34458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
34459
34460
|
var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
|
|
34460
34461
|
ref: ref3,
|
|
34461
34462
|
kind: read2.kind,
|
|
@@ -34491,7 +34492,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
34491
34492
|
});
|
|
34492
34493
|
}, "evidenceSourcesOf");
|
|
34493
34494
|
|
|
34494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34495
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
34495
34496
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
34496
34497
|
var MAX_TEXT_CHARS = 2e6;
|
|
34497
34498
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -34517,7 +34518,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
34517
34518
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
34518
34519
|
}, "pdfPreviewLimits");
|
|
34519
34520
|
|
|
34520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34521
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
34521
34522
|
import { randomBytes } from "node:crypto";
|
|
34522
34523
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
34523
34524
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -34530,7 +34531,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
34530
34531
|
return time3 + random;
|
|
34531
34532
|
}, "ulid");
|
|
34532
34533
|
|
|
34533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34534
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
34534
34535
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
34535
34536
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
34536
34537
|
if (!meta && !sections?.length)
|
|
@@ -34551,7 +34552,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
34551
34552
|
return typeof language === "string" && language !== "" ? language : null;
|
|
34552
34553
|
}, "languageOf");
|
|
34553
34554
|
|
|
34554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34555
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
34555
34556
|
var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
34556
34557
|
var objectOf2 = /* @__PURE__ */ __name((value) => {
|
|
34557
34558
|
if (isObject(value))
|
|
@@ -34794,7 +34795,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
34794
34795
|
};
|
|
34795
34796
|
}, "filesStoreOver");
|
|
34796
34797
|
|
|
34797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34798
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
34798
34799
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
34799
34800
|
entity: "document",
|
|
34800
34801
|
backend: "sql",
|
|
@@ -34840,7 +34841,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
34840
34841
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
34841
34842
|
}, "importedDocumentWhere");
|
|
34842
34843
|
|
|
34843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34844
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
34844
34845
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
34845
34846
|
var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
34846
34847
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
|
|
@@ -35366,7 +35367,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35366
35367
|
};
|
|
35367
35368
|
}, "notesStoreOver");
|
|
35368
35369
|
|
|
35369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
35370
35371
|
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";
|
|
35371
35372
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
35372
35373
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -35588,7 +35589,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35588
35589
|
};
|
|
35589
35590
|
}, "memoriesStoreOver");
|
|
35590
35591
|
|
|
35591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35592
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
35592
35593
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
35593
35594
|
var KEY = "taskFirstPassPerChat";
|
|
35594
35595
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -35608,7 +35609,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
35608
35609
|
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);
|
|
35609
35610
|
}, "saveFirstPassPerChat");
|
|
35610
35611
|
|
|
35611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
35612
35613
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
35613
35614
|
var EXTERNAL_ID_CHARS = 200;
|
|
35614
35615
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -35635,7 +35636,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
35635
35636
|
return text6;
|
|
35636
35637
|
}, "sourceUrlOf");
|
|
35637
35638
|
|
|
35638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
35639
35640
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
35640
35641
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
35641
35642
|
name,
|
|
@@ -35858,7 +35859,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
35858
35859
|
return root === void 0 ? void 0 : { ...query, root };
|
|
35859
35860
|
}, "withoutField");
|
|
35860
35861
|
|
|
35861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
35862
35863
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
35863
35864
|
if (row2.author_type == null)
|
|
35864
35865
|
return null;
|
|
@@ -35886,7 +35887,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
35886
35887
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
35887
35888
|
}, "addComment");
|
|
35888
35889
|
|
|
35889
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
35890
35891
|
var TASK_RELATION_KINDS = [
|
|
35891
35892
|
"blocked-by",
|
|
35892
35893
|
"follow-up-of",
|
|
@@ -36016,7 +36017,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
36016
36017
|
};
|
|
36017
36018
|
}, "taskRelationsStoreOver");
|
|
36018
36019
|
|
|
36019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
36020
36021
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
36021
36022
|
var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
36022
36023
|
var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind4, changes, at) => {
|
|
@@ -36545,7 +36546,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
36545
36546
|
};
|
|
36546
36547
|
}, "workTasksOver");
|
|
36547
36548
|
|
|
36548
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
36549
36550
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
36550
36551
|
const { database, now: now2 } = context;
|
|
36551
36552
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -36594,7 +36595,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
36594
36595
|
};
|
|
36595
36596
|
}, "taskCloseOver");
|
|
36596
36597
|
|
|
36597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
36598
36599
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
36599
36600
|
const { database, now: now2 } = context;
|
|
36600
36601
|
const required3 = /* @__PURE__ */ __name((id2) => {
|
|
@@ -36812,7 +36813,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
36812
36813
|
};
|
|
36813
36814
|
}, "taskPairsOver");
|
|
36814
36815
|
|
|
36815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
36816
36817
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
36817
36818
|
var TASK_STATS_SQL = {
|
|
36818
36819
|
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"),
|
|
@@ -36851,7 +36852,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
36851
36852
|
}, "statNames")
|
|
36852
36853
|
}), "taskStatsOver");
|
|
36853
36854
|
|
|
36854
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36855
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
36855
36856
|
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";
|
|
36856
36857
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
36857
36858
|
const key2 = inboxKey(account);
|
|
@@ -37058,7 +37059,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
37058
37059
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
37059
37060
|
}, "oneOf");
|
|
37060
37061
|
|
|
37061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37062
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
37062
37063
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
37063
37064
|
const { database } = context;
|
|
37064
37065
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -37103,7 +37104,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
37103
37104
|
};
|
|
37104
37105
|
}, "accountsStoreOver");
|
|
37105
37106
|
|
|
37106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
37107
37108
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
37108
37109
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
37109
37110
|
const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -37127,7 +37128,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
37127
37128
|
})), "keepDownloads");
|
|
37128
37129
|
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");
|
|
37129
37130
|
|
|
37130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37131
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
37131
37132
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
37132
37133
|
const { database } = context;
|
|
37133
37134
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -37184,7 +37185,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
37184
37185
|
}, "keepAttachmentText")
|
|
37185
37186
|
}), "attachmentsStoreOver");
|
|
37186
37187
|
|
|
37187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
37188
37189
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
37189
37190
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
37190
37191
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -37364,7 +37365,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
37364
37365
|
return done;
|
|
37365
37366
|
}, "rekeyChats");
|
|
37366
37367
|
|
|
37367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
37368
37369
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
37369
37370
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
37370
37371
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -37422,7 +37423,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
37422
37423
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
37423
37424
|
}, "chatCoverage");
|
|
37424
37425
|
|
|
37425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37426
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
37426
37427
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
37427
37428
|
const { database } = context;
|
|
37428
37429
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -37557,7 +37558,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37557
37558
|
};
|
|
37558
37559
|
}, "chatsStoreOver");
|
|
37559
37560
|
|
|
37560
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
37561
37562
|
import { createHash as createHash7 } from "node:crypto";
|
|
37562
37563
|
var BATCH_CONTEXT = 50;
|
|
37563
37564
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -37695,7 +37696,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
37695
37696
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
37696
37697
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
37697
37698
|
|
|
37698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37699
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
37699
37700
|
import { setTimeout } from "node:timers/promises";
|
|
37700
37701
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
37701
37702
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -38007,7 +38008,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
38007
38008
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
38008
38009
|
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");
|
|
38009
38010
|
|
|
38010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38011
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
38011
38012
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
38012
38013
|
const { database } = context;
|
|
38013
38014
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -38114,7 +38115,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
38114
38115
|
};
|
|
38115
38116
|
}, "conversationsStoreOver");
|
|
38116
38117
|
|
|
38117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38118
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
38118
38119
|
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";
|
|
38119
38120
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
38120
38121
|
const { database } = context;
|
|
@@ -38139,7 +38140,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
38139
38140
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
38140
38141
|
}), "countersStoreOver");
|
|
38141
38142
|
|
|
38142
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38143
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
38143
38144
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
38144
38145
|
var MENTION_QUERY = defineQuery({
|
|
38145
38146
|
entity: "mention",
|
|
@@ -38355,7 +38356,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
38355
38356
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
38356
38357
|
}, "listPlaces");
|
|
38357
38358
|
|
|
38358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
38359
38360
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
38360
38361
|
const { database } = context;
|
|
38361
38362
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -38390,7 +38391,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
38390
38391
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
38391
38392
|
}), "mentionsStoreOver");
|
|
38392
38393
|
|
|
38393
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38394
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
38394
38395
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
38395
38396
|
const read2 = database.prepare("SELECT m.id, m.external_id, m.text, m.sent_at, m.sender_name, coalesce(m.sender_chat_external_id, i.external_id) AS sender_id FROM messages m LEFT JOIN identities i ON i.id = m.sender_identity_id WHERE m.chat_id = ? AND m.deleted_at IS NULL AND (m.text LIKE '%google.com%' OR m.text LIKE '%forms.gle%') " + (messageId === void 0 ? "" : "AND m.external_id = ? ") + "ORDER BY m.sent_at DESC, m.id DESC");
|
|
38396
38397
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -38405,7 +38406,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
38405
38406
|
}));
|
|
38406
38407
|
}, "documentLinkMessages");
|
|
38407
38408
|
|
|
38408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
38409
38410
|
var stemmerFor = stemmerCache();
|
|
38410
38411
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
38411
38412
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -38449,7 +38450,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
38449
38450
|
});
|
|
38450
38451
|
}, "laterSharingRare");
|
|
38451
38452
|
|
|
38452
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38453
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
38453
38454
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
38454
38455
|
const { database } = context;
|
|
38455
38456
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -38584,7 +38585,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
38584
38585
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
38585
38586
|
}), "messagesStoreOver");
|
|
38586
38587
|
|
|
38587
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38588
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
38588
38589
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
38589
38590
|
var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
38590
38591
|
var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -38641,7 +38642,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
|
|
|
38641
38642
|
});
|
|
38642
38643
|
}, "personPreparation");
|
|
38643
38644
|
|
|
38644
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38645
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
38645
38646
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
38646
38647
|
const id2 = Number(uid);
|
|
38647
38648
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -38649,7 +38650,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
38649
38650
|
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)));
|
|
38650
38651
|
}, "personSeenInAccounts");
|
|
38651
38652
|
|
|
38652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
38653
38654
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
38654
38655
|
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);
|
|
38655
38656
|
if (!row2)
|
|
@@ -38715,7 +38716,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
38715
38716
|
return { id: id2, personId, removed: true };
|
|
38716
38717
|
}, "removeNote");
|
|
38717
38718
|
|
|
38718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38719
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
38719
38720
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
38720
38721
|
const { database } = context;
|
|
38721
38722
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -38800,13 +38801,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
38800
38801
|
};
|
|
38801
38802
|
}, "peopleStoreOver");
|
|
38802
38803
|
|
|
38803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
38804
38805
|
import { createHash as createHash9 } from "node:crypto";
|
|
38805
38806
|
|
|
38806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38807
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
38807
38808
|
import { createHash as createHash8 } from "node:crypto";
|
|
38808
38809
|
|
|
38809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38810
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
38810
38811
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
38811
38812
|
var AUTHOR_MEASURES = [
|
|
38812
38813
|
"messages",
|
|
@@ -38946,7 +38947,7 @@ var withoutUrls = /* @__PURE__ */ __name((text6) => text6.replace(/\S+/gu, (toke
|
|
|
38946
38947
|
var rankingWords = /* @__PURE__ */ __name((text6) => withoutUrls(text6).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
38947
38948
|
var rankingQuestion = /* @__PURE__ */ __name((text6) => withoutUrls(text6).includes("?"), "rankingQuestion");
|
|
38948
38949
|
|
|
38949
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38950
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
38950
38951
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
38951
38952
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
38952
38953
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -39168,7 +39169,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
39168
39169
|
};
|
|
39169
39170
|
}, "rankReplyGraph");
|
|
39170
39171
|
|
|
39171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
39172
39173
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
39173
39174
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
39174
39175
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -39342,7 +39343,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
39342
39343
|
return { items, evidence, summary, graph: graph.quality };
|
|
39343
39344
|
}, "calculateAdminStatistics");
|
|
39344
39345
|
|
|
39345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
39346
39347
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
39347
39348
|
const dates = [];
|
|
39348
39349
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -39364,7 +39365,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
39364
39365
|
return dates[0].node.resolution.date;
|
|
39365
39366
|
}, "rankingContextRange");
|
|
39366
39367
|
|
|
39367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
39368
39369
|
var reactionCounts = /* @__PURE__ */ __name((stored3) => {
|
|
39369
39370
|
let counts;
|
|
39370
39371
|
try {
|
|
@@ -39659,7 +39660,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
39659
39660
|
});
|
|
39660
39661
|
}, "rankQuery");
|
|
39661
39662
|
|
|
39662
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
39663
39664
|
function fail4(message2, reason = "query.too-large") {
|
|
39664
39665
|
throw new CliError("validation_error", message2, { reason, complete: false });
|
|
39665
39666
|
}
|
|
@@ -39836,7 +39837,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
39836
39837
|
return result;
|
|
39837
39838
|
}), "adminStatisticsQuery");
|
|
39838
39839
|
|
|
39839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
39840
39841
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
39841
39842
|
if (!execution.accounts.length)
|
|
39842
39843
|
return { conversations: [], chats: [] };
|
|
@@ -39854,7 +39855,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
39854
39855
|
return { conversations: conversations2, chats: chats2 };
|
|
39855
39856
|
}, "conversationEligibility");
|
|
39856
39857
|
|
|
39857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39858
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
39858
39859
|
import { createHash as createHash10 } from "node:crypto";
|
|
39859
39860
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
39860
39861
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -40004,7 +40005,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
40004
40005
|
return result;
|
|
40005
40006
|
}, "rankingEvidence");
|
|
40006
40007
|
|
|
40007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
40008
40009
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
40009
40010
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2) => {
|
|
40010
40011
|
const params = [...scope3.accounts.flatMap(({ provider, account }) => [provider, account]), ...kinds2];
|
|
@@ -40098,7 +40099,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
40098
40099
|
});
|
|
40099
40100
|
}, "waitingChats");
|
|
40100
40101
|
|
|
40101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
40102
40103
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
40103
40104
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
40104
40105
|
if (execution.corpus === "mail")
|
|
@@ -40119,7 +40120,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
40119
40120
|
};
|
|
40120
40121
|
}, "queriesStoreOver");
|
|
40121
40122
|
|
|
40122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
40123
40124
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
40124
40125
|
const { database, now: now2 } = context;
|
|
40125
40126
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -40158,10 +40159,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
40158
40159
|
}));
|
|
40159
40160
|
}, "chatEventsOf");
|
|
40160
40161
|
|
|
40161
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
40162
40163
|
import { createHash as createHash11 } from "node:crypto";
|
|
40163
40164
|
|
|
40164
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
40165
40166
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
40166
40167
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
40167
40168
|
timeZone: zone,
|
|
@@ -40181,7 +40182,7 @@ var weekKey = /* @__PURE__ */ __name((day) => {
|
|
|
40181
40182
|
return date3.toISOString().slice(0, 10);
|
|
40182
40183
|
}, "weekKey");
|
|
40183
40184
|
|
|
40184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40185
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
40185
40186
|
var RETENTION_TOLERANCE = 864e5;
|
|
40186
40187
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
40187
40188
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -40235,7 +40236,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
40235
40236
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
40236
40237
|
}, "retentionCohorts");
|
|
40237
40238
|
|
|
40238
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
40239
40240
|
var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
40240
40241
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
40241
40242
|
validateRetentionOptions(options);
|
|
@@ -40366,7 +40367,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
40366
40367
|
};
|
|
40367
40368
|
}, "retentionQuery");
|
|
40368
40369
|
|
|
40369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
40370
40371
|
var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
40371
40372
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
40372
40373
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -40497,7 +40498,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
40497
40498
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
40498
40499
|
})), "trackedChats");
|
|
40499
40500
|
|
|
40500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
40501
40502
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
40502
40503
|
const { database } = context;
|
|
40503
40504
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -40553,7 +40554,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
40553
40554
|
};
|
|
40554
40555
|
}, "rosterStoreOver");
|
|
40555
40556
|
|
|
40556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
40557
40558
|
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");
|
|
40558
40559
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
40559
40560
|
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 ?`);
|
|
@@ -40577,7 +40578,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
40577
40578
|
}
|
|
40578
40579
|
}, "backfillNormalized");
|
|
40579
40580
|
|
|
40580
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40581
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
40581
40582
|
var INDEX2 = "message_words";
|
|
40582
40583
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
40583
40584
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -40704,7 +40705,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
40704
40705
|
});
|
|
40705
40706
|
}, "resetSearchIndex");
|
|
40706
40707
|
|
|
40707
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
40708
40709
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
40709
40710
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
40710
40711
|
const before2 = stemsState(database);
|
|
@@ -40799,7 +40800,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
40799
40800
|
return resetStems(database, { now: now2 });
|
|
40800
40801
|
}, "followDefaultStemmers");
|
|
40801
40802
|
|
|
40802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40803
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
40803
40804
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
40804
40805
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
40805
40806
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -40821,7 +40822,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
40821
40822
|
});
|
|
40822
40823
|
}, "termCandidates");
|
|
40823
40824
|
|
|
40824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
40825
40826
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
40826
40827
|
const { database } = context;
|
|
40827
40828
|
const stemmerFor2 = stemmerCache();
|
|
@@ -40843,7 +40844,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
40843
40844
|
};
|
|
40844
40845
|
}, "searchIndexStoreOver");
|
|
40845
40846
|
|
|
40846
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40847
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
40847
40848
|
var HISTORY_KEPT = 1e3;
|
|
40848
40849
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
40849
40850
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -40912,7 +40913,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
40912
40913
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
40913
40914
|
}, "clearHistory");
|
|
40914
40915
|
|
|
40915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
40916
40917
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
40917
40918
|
const { database } = context;
|
|
40918
40919
|
return {
|
|
@@ -40936,7 +40937,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
40936
40937
|
};
|
|
40937
40938
|
}, "searchesStoreOver");
|
|
40938
40939
|
|
|
40939
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
40940
40941
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
40941
40942
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
40942
40943
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -40979,7 +40980,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
40979
40980
|
};
|
|
40980
40981
|
}, "agentActionsStoreOver");
|
|
40981
40982
|
|
|
40982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40983
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
40983
40984
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
40984
40985
|
}) => {
|
|
40985
40986
|
const { database, now: now2 } = context;
|
|
@@ -41038,7 +41039,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
41038
41039
|
};
|
|
41039
41040
|
}, "botUpdateStoreOver");
|
|
41040
41041
|
|
|
41041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
41042
41043
|
var DAY4 = 864e5;
|
|
41043
41044
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
41044
41045
|
if (filter.accountIds !== void 0 && filter.accountId !== void 0)
|
|
@@ -41147,7 +41148,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
41147
41148
|
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);
|
|
41148
41149
|
}, "listEvents");
|
|
41149
41150
|
|
|
41150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
41151
41152
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
41152
41153
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
41153
41154
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -41202,7 +41203,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
41202
41203
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
41203
41204
|
}, "forgetCalendarRows");
|
|
41204
41205
|
|
|
41205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41206
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
41206
41207
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
41207
41208
|
id: Number(row2.id),
|
|
41208
41209
|
accountId: Number(row2.account_id),
|
|
@@ -41789,7 +41790,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
41789
41790
|
};
|
|
41790
41791
|
}, "eventStoreOver");
|
|
41791
41792
|
|
|
41792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
41793
41794
|
var CATALOG_QUERY = defineQuery({
|
|
41794
41795
|
entity: "document",
|
|
41795
41796
|
backend: "sql",
|
|
@@ -42031,7 +42032,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
42031
42032
|
};
|
|
42032
42033
|
}, "catalogStoreOver");
|
|
42033
42034
|
|
|
42034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
42035
42036
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
42036
42037
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
42037
42038
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -42044,7 +42045,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
42044
42045
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
42045
42046
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
42046
42047
|
|
|
42047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
42048
42049
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
42049
42050
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
42050
42051
|
signal?.throwIfAborted();
|
|
@@ -42143,7 +42144,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
42143
42144
|
});
|
|
42144
42145
|
}, "readMeetingContextEvidence");
|
|
42145
42146
|
|
|
42146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
42147
42148
|
var corpora = {
|
|
42148
42149
|
message: {
|
|
42149
42150
|
table: "messages",
|
|
@@ -42382,7 +42383,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
42382
42383
|
}
|
|
42383
42384
|
}), "contextRecordsOver");
|
|
42384
42385
|
|
|
42385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
42386
42387
|
var NOTE_FIELDS = [
|
|
42387
42388
|
"text",
|
|
42388
42389
|
"exact",
|
|
@@ -42812,7 +42813,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
42812
42813
|
};
|
|
42813
42814
|
}, "noteSearchOver");
|
|
42814
42815
|
|
|
42815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
42816
42817
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
42817
42818
|
var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
42818
42819
|
var EVENT_CORPUS = {
|
|
@@ -42944,7 +42945,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
42944
42945
|
};
|
|
42945
42946
|
}, "eventSearchOver");
|
|
42946
42947
|
|
|
42947
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42948
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
42948
42949
|
var refuse = /* @__PURE__ */ __name((message2, reason, code = "validation_error") => {
|
|
42949
42950
|
throw new CliError(code, message2, { reason });
|
|
42950
42951
|
}, "refuse");
|
|
@@ -43279,7 +43280,7 @@ var financeOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
43279
43280
|
const by = proposedBySql("i.author_type", "i.author_id", filter.proposedBy);
|
|
43280
43281
|
const status = filter.status === void 0 ? null : oneOf4(filter.status, INVOICE_STATUSES, "a status");
|
|
43281
43282
|
const review = filter.review === void 0 ? null : oneOf4(filter.review, FINANCE_REVIEWS, "a review");
|
|
43282
|
-
return database.prepare(`${INVOICES} WHERE i.deleted_at IS NULL AND (? IS NULL OR i.direction = ?) AND (? IS NULL OR i.status = ?) AND (? IS NULL OR i.review = ?) AND (? IS NULL OR i.project_id = ?) AND (? IS NULL OR (i.counterparty_type = ? AND i.counterparty_id = ?)) ${filter.open ? "AND i.status IN ('issued', 'partly_paid') " : ""}AND ${by.sql} ORDER BY i.created_at DESC, i.id DESC LIMIT ?`).all(filter.direction ?? null, filter.direction ?? null, status, status, review, review, project2, project2, counterparty?.type ?? null, counterparty?.type ?? null, counterparty?.id ?? null, ...by.params, limitOf2(filter.limit)).map(invoiceOf2);
|
|
43283
|
+
return database.prepare(`${INVOICES} WHERE i.deleted_at IS NULL AND (? IS NULL OR i.direction = ?) AND (? IS NULL OR i.status = ?) AND (? IS NULL OR i.review = ?) AND (? IS NULL OR i.project_id = ?) AND (? IS NULL OR (i.counterparty_type = ? AND i.counterparty_id = ?)) AND (? IS NULL OR i.number = ?) ${filter.open ? "AND i.status IN ('issued', 'partly_paid') " : ""}AND ${by.sql} ORDER BY i.created_at DESC, i.id DESC LIMIT ?`).all(filter.direction ?? null, filter.direction ?? null, status, status, review, review, project2, project2, counterparty?.type ?? null, counterparty?.type ?? null, counterparty?.id ?? null, filter.number ?? null, filter.number ?? null, ...by.params, limitOf2(filter.limit)).map(invoiceOf2);
|
|
43283
43284
|
}, "invoices"),
|
|
43284
43285
|
issueInvoice: /* @__PURE__ */ __name((reference2, by) => {
|
|
43285
43286
|
ownerOnly(by, "issues an invoice");
|
|
@@ -43405,7 +43406,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43405
43406
|
};
|
|
43406
43407
|
}, "financeStoreOver");
|
|
43407
43408
|
|
|
43408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
43409
43410
|
var refuse2 = /* @__PURE__ */ __name((message2, reason) => {
|
|
43410
43411
|
throw new CliError("validation_error", message2, { reason });
|
|
43411
43412
|
}, "refuse");
|
|
@@ -43483,7 +43484,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
43483
43484
|
};
|
|
43484
43485
|
}, "paymentEntriesOver");
|
|
43485
43486
|
|
|
43486
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
43487
43488
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
43488
43489
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
43489
43490
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -43509,7 +43510,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
43509
43510
|
return valid;
|
|
43510
43511
|
}, "validateEvidenceFindings");
|
|
43511
43512
|
|
|
43512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
43513
43514
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
43514
43515
|
try {
|
|
43515
43516
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -43521,7 +43522,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
43521
43522
|
}
|
|
43522
43523
|
}, "calendarMoment");
|
|
43523
43524
|
|
|
43524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
43525
43526
|
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";
|
|
43526
43527
|
var iso9 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
43527
43528
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -43730,7 +43731,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43730
43731
|
};
|
|
43731
43732
|
}, "factsStoreOver");
|
|
43732
43733
|
|
|
43733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43734
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
43734
43735
|
var invalid4 = /* @__PURE__ */ __name((message2) => {
|
|
43735
43736
|
throw new CliError("validation_error", message2);
|
|
43736
43737
|
}, "invalid");
|
|
@@ -43834,7 +43835,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind4) => {
|
|
|
43834
43835
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes, create };
|
|
43835
43836
|
}, "findingsCoreOver");
|
|
43836
43837
|
|
|
43837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43838
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
43838
43839
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
43839
43840
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
43840
43841
|
var iso10 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -43999,7 +44000,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43999
44000
|
};
|
|
44000
44001
|
}, "proposedActionsStoreOver");
|
|
44001
44002
|
|
|
44002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
44003
44004
|
var stale = /* @__PURE__ */ __name(() => {
|
|
44004
44005
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
44005
44006
|
reason: "evidence-findings.stale"
|
|
@@ -44180,7 +44181,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
44180
44181
|
};
|
|
44181
44182
|
}, "evidenceFindingsStoreOver");
|
|
44182
44183
|
|
|
44183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44184
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
44184
44185
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
44185
44186
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
44186
44187
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -44233,7 +44234,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
44233
44234
|
}, "forPerson")
|
|
44234
44235
|
}), "involvementStoreOver");
|
|
44235
44236
|
|
|
44236
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
44237
44238
|
import { createHash as createHash12 } from "node:crypto";
|
|
44238
44239
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
44239
44240
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -44319,7 +44320,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
44319
44320
|
};
|
|
44320
44321
|
}, "meetingProjectsStoreOver");
|
|
44321
44322
|
|
|
44322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44323
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
44323
44324
|
var ORGANIZATIONS_QUERY = {
|
|
44324
44325
|
entity: "organization",
|
|
44325
44326
|
backend: "sql",
|
|
@@ -44360,7 +44361,7 @@ var REMINDERS_QUERY = {
|
|
|
44360
44361
|
})
|
|
44361
44362
|
};
|
|
44362
44363
|
|
|
44363
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
44364
44365
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
44365
44366
|
id: String(row2.id),
|
|
44366
44367
|
ref: `organization:${row2.id}`,
|
|
@@ -44393,7 +44394,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
44393
44394
|
}), "updateOrganization")
|
|
44394
44395
|
}), "organizationsStoreOver");
|
|
44395
44396
|
|
|
44396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44397
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
44397
44398
|
var relationOf = /* @__PURE__ */ __name((link3) => ({
|
|
44398
44399
|
id: link3.id,
|
|
44399
44400
|
from: link3.from,
|
|
@@ -44619,16 +44620,16 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
44619
44620
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
44620
44621
|
}, "decidedOrigin");
|
|
44621
44622
|
|
|
44622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
44623
44624
|
import { createHash as createHash15 } from "node:crypto";
|
|
44624
44625
|
|
|
44625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44626
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
44626
44627
|
import { createHash as createHash14 } from "node:crypto";
|
|
44627
44628
|
|
|
44628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44629
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
44629
44630
|
import { createHash as createHash13 } from "node:crypto";
|
|
44630
44631
|
|
|
44631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
44632
44633
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
44633
44634
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
44634
44635
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -44679,7 +44680,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
44679
44680
|
return input;
|
|
44680
44681
|
}, "consolidationApplyInput");
|
|
44681
44682
|
|
|
44682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44683
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
44683
44684
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
44684
44685
|
id: String(row2.id),
|
|
44685
44686
|
sourceId: String(row2.source_id),
|
|
@@ -44754,7 +44755,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
44754
44755
|
}, { beforeCommit: check3 });
|
|
44755
44756
|
}, "applyTagConsolidation");
|
|
44756
44757
|
|
|
44757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44758
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
44758
44759
|
var selections = [
|
|
44759
44760
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
44760
44761
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -44898,7 +44899,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
44898
44899
|
};
|
|
44899
44900
|
}, "previewRows");
|
|
44900
44901
|
|
|
44901
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44902
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
44902
44903
|
var kinds = ["project", "tag", "topic"];
|
|
44903
44904
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
44904
44905
|
if (signal?.aborted)
|
|
@@ -45162,7 +45163,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45162
45163
|
};
|
|
45163
45164
|
}, "vocabularyStoreOver");
|
|
45164
45165
|
|
|
45165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
45166
45167
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
45167
45168
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
45168
45169
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -45703,7 +45704,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
45703
45704
|
return key2.padEnd(3, "X");
|
|
45704
45705
|
}, "projectKey");
|
|
45705
45706
|
|
|
45706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45707
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
45707
45708
|
var DAY5 = 864e5;
|
|
45708
45709
|
var SETTING4 = "logs_pruned_at";
|
|
45709
45710
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -45730,7 +45731,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
45730
45731
|
};
|
|
45731
45732
|
}, "logPruner");
|
|
45732
45733
|
|
|
45733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45734
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
45734
45735
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
45735
45736
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
45736
45737
|
var invalid6 = /* @__PURE__ */ __name((message2) => {
|
|
@@ -45753,6 +45754,65 @@ var RULES = {
|
|
|
45753
45754
|
anySubject: true,
|
|
45754
45755
|
inboxTasks: true
|
|
45755
45756
|
};
|
|
45757
|
+
var MAIL_FINDING_FIELDS = {
|
|
45758
|
+
task: {
|
|
45759
|
+
needs: ["type", "title", "reason", "commitment"],
|
|
45760
|
+
may: ["project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence", "externalId", "sourceUrl"]
|
|
45761
|
+
},
|
|
45762
|
+
task_update: { needs: ["task", "change", "reason"], may: ["dueAt", "detail"] },
|
|
45763
|
+
fact: { needs: ["type", "statement", "reason"], may: ["subject", "project"] },
|
|
45764
|
+
memory: { needs: ["memoryKind", "scope", "body", "reason"], may: ["subject", "project"] },
|
|
45765
|
+
link: { needs: ["from", "to", "reason"], may: [] },
|
|
45766
|
+
new_contact: { needs: ["address", "name", "reason"], may: [] },
|
|
45767
|
+
invoice: {
|
|
45768
|
+
needs: ["direction", "currency", "lines", "reason"],
|
|
45769
|
+
may: [
|
|
45770
|
+
"counterparty",
|
|
45771
|
+
"counterpartyName",
|
|
45772
|
+
"counterpartyEmail",
|
|
45773
|
+
"total",
|
|
45774
|
+
"number",
|
|
45775
|
+
"issueDate",
|
|
45776
|
+
"dueDate",
|
|
45777
|
+
"project"
|
|
45778
|
+
]
|
|
45779
|
+
},
|
|
45780
|
+
payment: {
|
|
45781
|
+
needs: ["direction", "amount", "currency", "date", "reason"],
|
|
45782
|
+
may: [
|
|
45783
|
+
"payer",
|
|
45784
|
+
"payerName",
|
|
45785
|
+
"payerEmail",
|
|
45786
|
+
"payee",
|
|
45787
|
+
"payeeName",
|
|
45788
|
+
"payeeEmail",
|
|
45789
|
+
"reference",
|
|
45790
|
+
"allocations",
|
|
45791
|
+
"project"
|
|
45792
|
+
]
|
|
45793
|
+
},
|
|
45794
|
+
order: {
|
|
45795
|
+
needs: ["purpose", "supplierName", "reason"],
|
|
45796
|
+
may: [
|
|
45797
|
+
"customer",
|
|
45798
|
+
"customerName",
|
|
45799
|
+
"customerEmail",
|
|
45800
|
+
"supplier",
|
|
45801
|
+
"number",
|
|
45802
|
+
"total",
|
|
45803
|
+
"currency",
|
|
45804
|
+
"status",
|
|
45805
|
+
"orderDate",
|
|
45806
|
+
"fulfilledDate",
|
|
45807
|
+
"invoice",
|
|
45808
|
+
"payment",
|
|
45809
|
+
"project",
|
|
45810
|
+
"sourceUrl"
|
|
45811
|
+
]
|
|
45812
|
+
},
|
|
45813
|
+
order_update: { needs: ["supplierName", "number", "status", "reason"], may: ["date"] }
|
|
45814
|
+
};
|
|
45815
|
+
var MAIL_FINDING_KINDS = Object.keys(MAIL_FINDING_FIELDS);
|
|
45756
45816
|
var typeOf2 = /* @__PURE__ */ __name((reference2) => {
|
|
45757
45817
|
try {
|
|
45758
45818
|
const parsed3 = parseReference(reference2);
|
|
@@ -45781,22 +45841,18 @@ var optional = /* @__PURE__ */ __name((key2, value, read2) => value === void 0 ?
|
|
|
45781
45841
|
var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
45782
45842
|
if (!raw || typeof raw !== "object")
|
|
45783
45843
|
return invalid6("a finding is an object");
|
|
45784
|
-
if (raw.kind
|
|
45785
|
-
return
|
|
45844
|
+
if (!MAIL_FINDING_KINDS.includes(raw.kind))
|
|
45845
|
+
return invalid6(`a mail finding is a ${MAIL_FINDING_KINDS.join(", ")}`);
|
|
45846
|
+
const { needs, may } = MAIL_FINDING_FIELDS[raw.kind];
|
|
45847
|
+
findingFields(raw, ["id", "kind", ...needs, ...may, "evidence"], RULES.singular);
|
|
45848
|
+
findingNeeds(raw, needs, RULES.singular);
|
|
45849
|
+
if (raw.kind === "fact") {
|
|
45850
|
+
const { reason, ...fact } = raw;
|
|
45851
|
+
return { ...validateFinding(fact, RULES, ids), reason: findingText(reason, 2e3) };
|
|
45852
|
+
}
|
|
45786
45853
|
if (raw.kind === "task") {
|
|
45787
45854
|
const { externalId, sourceUrl, ...task } = raw;
|
|
45788
|
-
|
|
45789
|
-
try {
|
|
45790
|
-
checked = validateFinding(task, RULES, ids);
|
|
45791
|
-
} catch (error) {
|
|
45792
|
-
if (!isCliError(error) || error.details.reason !== "finding.unknown-field")
|
|
45793
|
-
throw error;
|
|
45794
|
-
const allowed = [...error.details.allowed, "external_id", "source_url"];
|
|
45795
|
-
throw new CliError("validation_error", error.message.replace(/; it takes .*$/, `; it takes ${allowed.join(", ")}`), {
|
|
45796
|
-
...error.details,
|
|
45797
|
-
allowed
|
|
45798
|
-
});
|
|
45799
|
-
}
|
|
45855
|
+
const checked = validateFinding(task, RULES, ids);
|
|
45800
45856
|
return {
|
|
45801
45857
|
...checked,
|
|
45802
45858
|
...optional("externalId", externalId, (value) => {
|
|
@@ -45831,7 +45887,6 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
45831
45887
|
}, "party");
|
|
45832
45888
|
switch (raw.kind) {
|
|
45833
45889
|
case "task_update": {
|
|
45834
|
-
findingFields(raw, ["id", "kind", "task", "change", "dueAt", "detail", "reason", "evidence"], RULES.singular);
|
|
45835
45890
|
const task = reference2(raw.task, /^task:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/, "a task update's task");
|
|
45836
45891
|
const change = raw.change;
|
|
45837
45892
|
if (change !== "close" && change !== "due" && change !== "detail")
|
|
@@ -45852,7 +45907,6 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
45852
45907
|
};
|
|
45853
45908
|
}
|
|
45854
45909
|
case "memory": {
|
|
45855
|
-
findingFields(raw, ["id", "kind", "memoryKind", "scope", "body", "subject", "project", "evidence"], RULES.singular);
|
|
45856
45910
|
if (!MEMORY_KINDS.includes(raw.memoryKind))
|
|
45857
45911
|
return invalid6(`a memory's memory_kind is ${MEMORY_KINDS.join(", ")}`);
|
|
45858
45912
|
if (!MEMORY_SCOPES.includes(raw.scope))
|
|
@@ -45867,11 +45921,11 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
45867
45921
|
body: findingText(raw.body, 2e4),
|
|
45868
45922
|
...raw.subject === void 0 ? {} : { subject: reference2(raw.subject, /^(person|organization|project):[1-9]\d*$/, "a memory's subject") },
|
|
45869
45923
|
...raw.project === void 0 ? {} : { project: reference2(raw.project, /^project:[1-9]\d*$/, "a project") },
|
|
45924
|
+
reason: findingText(raw.reason, 2e3),
|
|
45870
45925
|
evidence
|
|
45871
45926
|
};
|
|
45872
45927
|
}
|
|
45873
45928
|
case "link": {
|
|
45874
|
-
findingFields(raw, ["id", "kind", "from", "to", "reason", "evidence"], RULES.singular);
|
|
45875
45929
|
const from2 = findingText(raw.from, 400);
|
|
45876
45930
|
const to = findingText(raw.to, 80);
|
|
45877
45931
|
const wanted = LINKS[typeOf2(from2) ?? ""];
|
|
@@ -45880,7 +45934,6 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
45880
45934
|
return { id: id2, kind: "link", from: from2, to, reason: findingText(raw.reason, 2e3), evidence };
|
|
45881
45935
|
}
|
|
45882
45936
|
case "new_contact": {
|
|
45883
|
-
findingFields(raw, ["id", "kind", "address", "name", "reason", "evidence"], RULES.singular);
|
|
45884
45937
|
const address = findingText(raw.address, 320).toLowerCase();
|
|
45885
45938
|
if (!ADDRESS.test(address))
|
|
45886
45939
|
return invalid6("a new contact's address is an email address");
|
|
@@ -45889,28 +45942,11 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
45889
45942
|
kind: "new_contact",
|
|
45890
45943
|
address,
|
|
45891
45944
|
name: findingText(raw.name, 200),
|
|
45892
|
-
|
|
45945
|
+
reason: findingText(raw.reason, 2e3),
|
|
45893
45946
|
evidence
|
|
45894
45947
|
};
|
|
45895
45948
|
}
|
|
45896
45949
|
case "invoice": {
|
|
45897
|
-
findingFields(raw, [
|
|
45898
|
-
"id",
|
|
45899
|
-
"kind",
|
|
45900
|
-
"direction",
|
|
45901
|
-
"counterparty",
|
|
45902
|
-
"counterpartyName",
|
|
45903
|
-
"counterpartyEmail",
|
|
45904
|
-
"currency",
|
|
45905
|
-
"lines",
|
|
45906
|
-
"total",
|
|
45907
|
-
"number",
|
|
45908
|
-
"issueDate",
|
|
45909
|
-
"dueDate",
|
|
45910
|
-
"project",
|
|
45911
|
-
"reason",
|
|
45912
|
-
"evidence"
|
|
45913
|
-
], RULES.singular);
|
|
45914
45950
|
if (!Array.isArray(raw.lines) || raw.lines.length < 1 || raw.lines.length > 50)
|
|
45915
45951
|
return invalid6("an invoice finding has 1\u201350 lines");
|
|
45916
45952
|
const lines = raw.lines.map((line) => {
|
|
@@ -45942,25 +45978,6 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
45942
45978
|
};
|
|
45943
45979
|
}
|
|
45944
45980
|
case "payment": {
|
|
45945
|
-
findingFields(raw, [
|
|
45946
|
-
"id",
|
|
45947
|
-
"kind",
|
|
45948
|
-
"direction",
|
|
45949
|
-
"payer",
|
|
45950
|
-
"payerName",
|
|
45951
|
-
"payerEmail",
|
|
45952
|
-
"payee",
|
|
45953
|
-
"payeeName",
|
|
45954
|
-
"payeeEmail",
|
|
45955
|
-
"amount",
|
|
45956
|
-
"currency",
|
|
45957
|
-
"date",
|
|
45958
|
-
"reference",
|
|
45959
|
-
"allocations",
|
|
45960
|
-
"project",
|
|
45961
|
-
"reason",
|
|
45962
|
-
"evidence"
|
|
45963
|
-
], RULES.singular);
|
|
45964
45981
|
let allocations;
|
|
45965
45982
|
if (raw.allocations !== void 0) {
|
|
45966
45983
|
if (!Array.isArray(raw.allocations) || raw.allocations.length < 1 || raw.allocations.length > 8)
|
|
@@ -45993,28 +46010,6 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
45993
46010
|
};
|
|
45994
46011
|
}
|
|
45995
46012
|
case "order": {
|
|
45996
|
-
findingFields(raw, [
|
|
45997
|
-
"id",
|
|
45998
|
-
"kind",
|
|
45999
|
-
"purpose",
|
|
46000
|
-
"customer",
|
|
46001
|
-
"customerName",
|
|
46002
|
-
"customerEmail",
|
|
46003
|
-
"supplier",
|
|
46004
|
-
"supplierName",
|
|
46005
|
-
"number",
|
|
46006
|
-
"total",
|
|
46007
|
-
"currency",
|
|
46008
|
-
"status",
|
|
46009
|
-
"orderDate",
|
|
46010
|
-
"fulfilledDate",
|
|
46011
|
-
"invoice",
|
|
46012
|
-
"payment",
|
|
46013
|
-
"project",
|
|
46014
|
-
"sourceUrl",
|
|
46015
|
-
"reason",
|
|
46016
|
-
"evidence"
|
|
46017
|
-
], RULES.singular);
|
|
46018
46013
|
return {
|
|
46019
46014
|
id: id2,
|
|
46020
46015
|
kind: "order",
|
|
@@ -46037,7 +46032,6 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
46037
46032
|
};
|
|
46038
46033
|
}
|
|
46039
46034
|
case "order_update": {
|
|
46040
|
-
findingFields(raw, ["id", "kind", "supplierName", "number", "status", "date", "reason", "evidence"], RULES.singular);
|
|
46041
46035
|
const status = oneOf7(raw.status, ORDER_STATUSES, "an order update's status");
|
|
46042
46036
|
if (raw.date !== void 0 && status !== "delivered")
|
|
46043
46037
|
return invalid6("only a delivered order update gives date");
|
|
@@ -46053,7 +46047,7 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
46053
46047
|
};
|
|
46054
46048
|
}
|
|
46055
46049
|
default:
|
|
46056
|
-
return invalid6(
|
|
46050
|
+
return invalid6(`a mail finding is a ${MAIL_FINDING_KINDS.join(", ")}`);
|
|
46057
46051
|
}
|
|
46058
46052
|
}, "one");
|
|
46059
46053
|
var KEY2 = /^[a-z0-9][a-z0-9-]{0,39}:[1-9]\d*(-r[1-9]\d*)?$/;
|
|
@@ -46096,7 +46090,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
46096
46090
|
}, "checkMailFindings");
|
|
46097
46091
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
46098
46092
|
|
|
46099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
46100
46094
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
46101
46095
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
46102
46096
|
var WEIGHTS = {
|
|
@@ -46229,7 +46223,7 @@ var scoreGroup = /* @__PURE__ */ __name((items, context) => {
|
|
|
46229
46223
|
return { score: kept.reduce((sum, signal) => sum + WEIGHTS[signal], 0), signals: kept };
|
|
46230
46224
|
}, "scoreGroup");
|
|
46231
46225
|
|
|
46232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
46233
46227
|
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";
|
|
46234
46228
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
46235
46229
|
const { database, now: now2 } = context;
|
|
@@ -46381,7 +46375,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46381
46375
|
};
|
|
46382
46376
|
}, "ordersStoreOver");
|
|
46383
46377
|
|
|
46384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46378
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
46385
46379
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
46386
46380
|
throw new CliError("validation_error", "mail findings cite mail that changed since it was read; stage a new batch", {
|
|
46387
46381
|
reason: "mail-findings.stale"
|
|
@@ -46838,7 +46832,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
46838
46832
|
};
|
|
46839
46833
|
}, "mailFindingsStoreOver");
|
|
46840
46834
|
|
|
46841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
46842
46836
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
46843
46837
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
46844
46838
|
reason: "meeting-findings.stale"
|
|
@@ -47006,7 +47000,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47006
47000
|
};
|
|
47007
47001
|
}, "meetingFindingsStoreOver");
|
|
47008
47002
|
|
|
47009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
47010
47004
|
var RANK_BATCH = 512;
|
|
47011
47005
|
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";
|
|
47012
47006
|
var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -47277,7 +47271,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
47277
47271
|
}
|
|
47278
47272
|
}), "meetingVectorsOver");
|
|
47279
47273
|
|
|
47280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47274
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
47281
47275
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
47282
47276
|
var TEXTS = {
|
|
47283
47277
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -47378,11 +47372,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47378
47372
|
};
|
|
47379
47373
|
}, "sourceMentionStoreOver");
|
|
47380
47374
|
|
|
47381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
47382
47376
|
import { mkdirSync, statSync, writeFileSync } from "node:fs";
|
|
47383
47377
|
import { dirname } from "node:path";
|
|
47384
47378
|
|
|
47385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
47386
47380
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
47387
47381
|
var CLIENTS_SETTING = "clients";
|
|
47388
47382
|
var coreVersion = (() => {
|
|
@@ -47440,7 +47434,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
47440
47434
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
47441
47435
|
}, "refusalAdvice");
|
|
47442
47436
|
|
|
47443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47437
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
47444
47438
|
var GENERATED = [
|
|
47445
47439
|
{
|
|
47446
47440
|
"name": "20261010184427_initial",
|
|
@@ -48443,7 +48437,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
48443
48437
|
}
|
|
48444
48438
|
];
|
|
48445
48439
|
|
|
48446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48440
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
48447
48441
|
var MANIFEST = [
|
|
48448
48442
|
{ name: "20261010184427_initial", version: 1, minCompatible: 1 },
|
|
48449
48443
|
{ name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
|
|
@@ -48535,7 +48529,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
48535
48529
|
return migrations;
|
|
48536
48530
|
}, "generatedMigrations");
|
|
48537
48531
|
|
|
48538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48532
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
48539
48533
|
var MIGRATIONS = generatedMigrations();
|
|
48540
48534
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
48541
48535
|
version INTEGER PRIMARY KEY,
|
|
@@ -48588,7 +48582,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
48588
48582
|
}
|
|
48589
48583
|
}, "migrate");
|
|
48590
48584
|
|
|
48591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
48592
48586
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
48593
48587
|
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 ?");
|
|
48594
48588
|
if (pending.get(0, 1) === void 0)
|
|
@@ -48610,7 +48604,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
48610
48604
|
}
|
|
48611
48605
|
}, "fillJoinKeys");
|
|
48612
48606
|
|
|
48613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
48614
48608
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
48615
48609
|
refuseOwnerStoreInTests(path);
|
|
48616
48610
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -48624,8 +48618,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
48624
48618
|
}, "openSqlite");
|
|
48625
48619
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
48626
48620
|
quietSqliteWarning();
|
|
48627
|
-
const { drizzle } = await import("./node-
|
|
48628
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
48621
|
+
const { drizzle } = await import("./node-H7LWGE5H.js");
|
|
48622
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-N4POELFM.js");
|
|
48629
48623
|
const client = await nodeClient(path, { readOnly });
|
|
48630
48624
|
try {
|
|
48631
48625
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -48635,8 +48629,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
48635
48629
|
}
|
|
48636
48630
|
}, "openUnderNode");
|
|
48637
48631
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
48638
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
48639
|
-
const { drizzle } = await import("./bun-
|
|
48632
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-HORFVNNY.js");
|
|
48633
|
+
const { drizzle } = await import("./bun-NWKIEX53.js");
|
|
48640
48634
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
48641
48635
|
try {
|
|
48642
48636
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -48646,7 +48640,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
48646
48640
|
}
|
|
48647
48641
|
}, "openUnderBun");
|
|
48648
48642
|
|
|
48649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
48650
48644
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
48651
48645
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
48652
48646
|
try {
|
|
@@ -48714,7 +48708,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
48714
48708
|
});
|
|
48715
48709
|
}, "movePaymentFacts");
|
|
48716
48710
|
|
|
48717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48711
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
48718
48712
|
var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
48719
48713
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
48720
48714
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -48729,7 +48723,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
48729
48723
|
throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
|
|
48730
48724
|
}, "assertReadCompatible");
|
|
48731
48725
|
|
|
48732
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
48733
48727
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
48734
48728
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
48735
48729
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -48775,7 +48769,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
48775
48769
|
});
|
|
48776
48770
|
}, "moveSuggestedLinks");
|
|
48777
48771
|
|
|
48778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48772
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
48779
48773
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
48780
48774
|
var TEST_PROVIDER = "chat";
|
|
48781
48775
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -48796,7 +48790,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
48796
48790
|
}
|
|
48797
48791
|
}, "purgeTestAccounts");
|
|
48798
48792
|
|
|
48799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
48800
48794
|
var BACKFILL_ON_OPEN = 5e3;
|
|
48801
48795
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
48802
48796
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -48861,10 +48855,10 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
|
|
|
48861
48855
|
}
|
|
48862
48856
|
}, "openStoreContext");
|
|
48863
48857
|
|
|
48864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48858
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
48865
48859
|
import { createHash as createHash16 } from "node:crypto";
|
|
48866
48860
|
|
|
48867
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
48868
48862
|
var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
48869
48863
|
var ref = text4(2048);
|
|
48870
48864
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -48930,7 +48924,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
48930
48924
|
}))
|
|
48931
48925
|
});
|
|
48932
48926
|
|
|
48933
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48927
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
48934
48928
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
48935
48929
|
var invalid9 = /* @__PURE__ */ __name((field4) => {
|
|
48936
48930
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -49034,7 +49028,7 @@ var validateProjectAnnotationsGraph = /* @__PURE__ */ __name((manifest, addition
|
|
|
49034
49028
|
invalid9("external.unused");
|
|
49035
49029
|
}, "validateProjectAnnotationsGraph");
|
|
49036
49030
|
|
|
49037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49031
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
49038
49032
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
49039
49033
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
49040
49034
|
var targetSchema = strictObject({
|
|
@@ -49140,7 +49134,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
49140
49134
|
};
|
|
49141
49135
|
}, "planBoundProjectAnnotations");
|
|
49142
49136
|
|
|
49143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
49144
49138
|
import { createHash as createHash17 } from "node:crypto";
|
|
49145
49139
|
var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
49146
49140
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -49234,7 +49228,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
49234
49228
|
})).digest("hex");
|
|
49235
49229
|
}, "projectAnnotationSnapshotFingerprint");
|
|
49236
49230
|
|
|
49237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
49238
49232
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
49239
49233
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
49240
49234
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -49251,7 +49245,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
49251
49245
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
49252
49246
|
}, "projectAnnotationRequest");
|
|
49253
49247
|
|
|
49254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49248
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
49255
49249
|
var SnapshotBudget = class {
|
|
49256
49250
|
static {
|
|
49257
49251
|
__name(this, "SnapshotBudget");
|
|
@@ -49277,13 +49271,13 @@ var SnapshotBudget = class {
|
|
|
49277
49271
|
}
|
|
49278
49272
|
};
|
|
49279
49273
|
|
|
49280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49274
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
49281
49275
|
import { createHash as createHash19 } from "node:crypto";
|
|
49282
49276
|
|
|
49283
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49277
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
49284
49278
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
49285
49279
|
|
|
49286
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
49287
49281
|
import { createHash as createHash18 } from "node:crypto";
|
|
49288
49282
|
var invalid11 = /* @__PURE__ */ __name(() => {
|
|
49289
49283
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -49426,7 +49420,7 @@ var ProjectSnapshotSources = class {
|
|
|
49426
49420
|
}
|
|
49427
49421
|
};
|
|
49428
49422
|
|
|
49429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
49430
49424
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
49431
49425
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
49432
49426
|
}, "unsupported");
|
|
@@ -49597,7 +49591,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
49597
49591
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
49598
49592
|
}), "projectAnnotationSnapshot");
|
|
49599
49593
|
|
|
49600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
49601
49595
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
49602
49596
|
const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
49603
49597
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -49659,7 +49653,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
49659
49653
|
};
|
|
49660
49654
|
}), "previewAnnotationSnapshot");
|
|
49661
49655
|
|
|
49662
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
49663
49657
|
var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
|
|
49664
49658
|
const mappings = { ...bindings };
|
|
49665
49659
|
const resolve = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -49701,7 +49695,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
49701
49695
|
return mappings;
|
|
49702
49696
|
}, "restoreAnnotationRecords");
|
|
49703
49697
|
|
|
49704
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
49705
49699
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
49706
49700
|
async preview(request) {
|
|
49707
49701
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -49731,7 +49725,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
49731
49725
|
}
|
|
49732
49726
|
}), "projectAnnotationStoreOver");
|
|
49733
49727
|
|
|
49734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
49735
49729
|
import { createHash as createHash20 } from "node:crypto";
|
|
49736
49730
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
49737
49731
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -49963,7 +49957,7 @@ var envelopeOfJsonl = /* @__PURE__ */ __name((text6) => {
|
|
|
49963
49957
|
return isObject2(header) ? { ...header, records: records2 } : header;
|
|
49964
49958
|
}, "envelopeOfJsonl");
|
|
49965
49959
|
|
|
49966
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49960
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
49967
49961
|
var PROJECTED = {
|
|
49968
49962
|
invoice: { roles: ["issuer", "counterparty", "project"], many: [] },
|
|
49969
49963
|
payment: { roles: ["payer", "payee", "project", "settles"], many: ["settles"] }
|
|
@@ -50376,7 +50370,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50376
50370
|
};
|
|
50377
50371
|
}, "recordStoreOver");
|
|
50378
50372
|
|
|
50379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
50380
50374
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
50381
50375
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
50382
50376
|
let merged = { from: from2, to };
|
|
@@ -50389,7 +50383,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
50389
50383
|
}, "markRange");
|
|
50390
50384
|
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");
|
|
50391
50385
|
|
|
50392
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
50393
50387
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
50394
50388
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
50395
50389
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -50410,7 +50404,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
50410
50404
|
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);
|
|
50411
50405
|
}, "setTaskAnalysisMark");
|
|
50412
50406
|
|
|
50413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50407
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
50414
50408
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
50415
50409
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
50416
50410
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
|
|
@@ -50420,7 +50414,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
50420
50414
|
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);
|
|
50421
50415
|
}, "setTaskRulesStop");
|
|
50422
50416
|
|
|
50423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
50424
50418
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
50425
50419
|
const { database } = context;
|
|
50426
50420
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -50479,7 +50473,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50479
50473
|
};
|
|
50480
50474
|
}, "syncStoreOver");
|
|
50481
50475
|
|
|
50482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50476
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
50483
50477
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
50484
50478
|
const { database } = context;
|
|
50485
50479
|
return {
|
|
@@ -50501,7 +50495,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50501
50495
|
};
|
|
50502
50496
|
}, "tagsStoreOver");
|
|
50503
50497
|
|
|
50504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
50505
50499
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
50506
50500
|
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
|
|
50507
50501
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -50628,7 +50622,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
50628
50622
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
50629
50623
|
}, "savePictureChunks");
|
|
50630
50624
|
|
|
50631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
50632
50626
|
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,
|
|
50633
50627
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
50634
50628
|
FROM messages m
|
|
@@ -50717,7 +50711,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
50717
50711
|
return plain2(best(found2));
|
|
50718
50712
|
}, "nearestMessages");
|
|
50719
50713
|
|
|
50720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
50721
50715
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
50722
50716
|
const { database } = context;
|
|
50723
50717
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -50975,7 +50969,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
50975
50969
|
embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
|
|
50976
50970
|
}), "vectorsStoreOver");
|
|
50977
50971
|
|
|
50978
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
50979
50973
|
import { existsSync, readFileSync as readFileSync4 } from "node:fs";
|
|
50980
50974
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
50981
50975
|
var BOOKKEEPING = ["schema_migrations", "store_settings"];
|
|
@@ -51063,10 +51057,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
51063
51057
|
}
|
|
51064
51058
|
}, "lastBackup");
|
|
51065
51059
|
|
|
51066
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51060
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
51067
51061
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
51068
51062
|
|
|
51069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
51070
51064
|
var COUNTED_TABLES = [
|
|
51071
51065
|
"accounts",
|
|
51072
51066
|
"chats",
|
|
@@ -51151,7 +51145,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
51151
51145
|
};
|
|
51152
51146
|
}, "storeContents");
|
|
51153
51147
|
|
|
51154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
51155
51149
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
51156
51150
|
const context = await openStoreContext(options);
|
|
51157
51151
|
try {
|