@wirecat/cli-memo 0.131.39 → 0.131.41
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-ZTYUFM24.js} +5 -5
- package/dist/bundle/{anthropic-KJECM7MD.js → anthropic-BLXCM7J2.js} +3 -3
- package/dist/bundle/{app-server-ZO7Z7RMA.js → app-server-MXYDSTTW.js} +35 -35
- package/dist/bundle/auto-2RK6FE5A.js +86 -0
- package/dist/bundle/{bun-V2HGEGFF.js → bun-GFMA4TKJ.js} +2 -2
- package/dist/bundle/{bun-sqlite-DSFSAFNQ.js → bun-sqlite-3V6EB3XP.js} +2 -2
- package/dist/bundle/{chunk-H4GQZLTW.js → chunk-2E4N5DVE.js} +27 -27
- package/dist/bundle/{chunk-72DBFKCI.js → chunk-2G66FZPO.js} +1 -1
- package/dist/bundle/{chunk-3ZEH35NH.js → chunk-2O2BSM4K.js} +1 -1
- package/dist/bundle/{chunk-4MFNKTQQ.js → chunk-3MVDNB6Y.js} +3 -3
- package/dist/bundle/{chunk-WBWFH7ZT.js → chunk-5KL7T2EP.js} +1 -1
- package/dist/bundle/{chunk-AKLFOL4C.js → chunk-6V6VCYOS.js} +3 -3
- package/dist/bundle/{chunk-P3QBCCBA.js → chunk-776YSJJY.js} +1 -1
- package/dist/bundle/{chunk-DMY2YVJ7.js → chunk-7AS5QFWJ.js} +5 -5
- package/dist/bundle/{chunk-GANKKP5F.js → chunk-7EOGXNLO.js} +4 -4
- package/dist/bundle/{chunk-Q3O7N35U.js → chunk-7GEK5BE5.js} +2 -2
- package/dist/bundle/{chunk-BHBLLZAO.js → chunk-A6HC2DWU.js} +90 -74
- package/dist/bundle/{chunk-CQJO22KN.js → chunk-ARNYYXLO.js} +20 -20
- package/dist/bundle/{chunk-UECWAAZ3.js → chunk-AYOFFZMO.js} +4 -4
- package/dist/bundle/{chunk-EP5U5WCQ.js → chunk-B5LF2FVU.js} +1 -1
- package/dist/bundle/{chunk-LXNWBHCK.js → chunk-BA3HPVBN.js} +4 -4
- package/dist/bundle/{chunk-4GA7IMXD.js → chunk-BFN5KXGH.js} +257 -257
- package/dist/bundle/{chunk-YFBNICKS.js → chunk-BJWDBPLF.js} +2 -2
- package/dist/bundle/{chunk-7VBSW2RI.js → chunk-DYSWDGOU.js} +5 -5
- package/dist/bundle/{chunk-G35CZBBF.js → chunk-F3OGJQWY.js} +5 -5
- package/dist/bundle/{chunk-UIUMG7AY.js → chunk-FVN42IND.js} +1 -1
- package/dist/bundle/{chunk-D7JMUN36.js → chunk-G6EOW6PY.js} +2 -2
- package/dist/bundle/{chunk-O6ZLAFWQ.js → chunk-IJJ4OEXK.js} +1 -1
- package/dist/bundle/{chunk-WDDYMCLD.js → chunk-IJS2X4AZ.js} +43 -43
- package/dist/bundle/{chunk-GRTELFME.js → chunk-ISVO2PHD.js} +4 -4
- package/dist/bundle/{chunk-CHAA2BOM.js → chunk-J364I2EL.js} +8 -8
- package/dist/bundle/{chunk-AX6AMVVY.js → chunk-JO3FC5B4.js} +7 -7
- package/dist/bundle/{chunk-QMDVWF3C.js → chunk-LGILT5CA.js} +2 -2
- package/dist/bundle/{chunk-EY42TTWE.js → chunk-LLL4RBDU.js} +11 -11
- package/dist/bundle/{chunk-7DMTHV2P.js → chunk-N2EY7NT3.js} +1 -1
- package/dist/bundle/{chunk-SB7V3HFM.js → chunk-NFN3JTGD.js} +12 -12
- package/dist/bundle/{chunk-WJCBQFEM.js → chunk-NKKC6SLX.js} +1 -1
- package/dist/bundle/{chunk-QZABT7XH.js → chunk-NP7Y3JQ7.js} +9 -9
- package/dist/bundle/{chunk-552IRBSA.js → chunk-NYNUDUFA.js} +4 -4
- package/dist/bundle/{chunk-QL2YLPB5.js → chunk-OLVBY6N6.js} +2 -2
- package/dist/bundle/{chunk-JQSFIPWA.js → chunk-ONJAEHOD.js} +7 -7
- package/dist/bundle/{chunk-U5B2ORUM.js → chunk-OY2CMEUW.js} +3 -3
- package/dist/bundle/{chunk-HB3YU52J.js → chunk-PPSIMMJM.js} +10 -9
- package/dist/bundle/{chunk-QUJXYDYY.js → chunk-QCE6BNKK.js} +2 -2
- package/dist/bundle/{chunk-PWVNSJBL.js → chunk-QUA7EHLA.js} +10 -10
- package/dist/bundle/{chunk-ER7SUNTY.js → chunk-RMJLG2D6.js} +4 -4
- package/dist/bundle/{chunk-OJBM56FX.js → chunk-RMMYPYNA.js} +20 -20
- package/dist/bundle/{chunk-Q35DHKBZ.js → chunk-RNINC74Q.js} +1 -1
- package/dist/bundle/{chunk-H4DBYU2J.js → chunk-RZUSWGAC.js} +2 -2
- package/dist/bundle/{chunk-S7W5GFOI.js → chunk-S7TVQ7ES.js} +305 -283
- package/dist/bundle/{chunk-KBDZG6XU.js → chunk-SCIU5WHL.js} +3 -3
- package/dist/bundle/{chunk-XED6NO7E.js → chunk-UA2H5FRV.js} +1 -1
- package/dist/bundle/{chunk-6BJPSIFE.js → chunk-ULDE2Y7M.js} +39 -35
- package/dist/bundle/{chunk-DZBNKSE2.js → chunk-V5TOZXBU.js} +371 -358
- package/dist/bundle/{chunk-TSGJRL2S.js → chunk-VF24JTL4.js} +1 -1
- package/dist/bundle/{chunk-B2YW6VOA.js → chunk-VT4PCMY2.js} +1 -1
- package/dist/bundle/{chunk-ZQTFPZ36.js → chunk-WFME7ILV.js} +5 -5
- package/dist/bundle/{chunk-SANEKFUF.js → chunk-WG3JJ7D5.js} +1 -1
- package/dist/bundle/{chunk-QAFJG52K.js → chunk-XXDWCZRM.js} +1 -1
- package/dist/bundle/{chunk-TOZ2COFV.js → chunk-Y4B4273X.js} +7 -7
- package/dist/bundle/{chunk-RBLUTSSL.js → chunk-Y7XDV4GQ.js} +6 -6
- package/dist/bundle/{chunk-5I75PUEK.js → chunk-YNYOWOKD.js} +208 -166
- package/dist/bundle/{chunk-P357OGUL.js → chunk-ZETAM63O.js} +1 -1
- package/dist/bundle/{command-contract-JXLIGF3U.js → command-contract-KCV6NNGF.js} +11 -11
- package/dist/bundle/{decode-HXMDIZKS.js → decode-SU7TIUXV.js} +2 -2
- package/dist/bundle/{echarts-MRWQC3FY.js → echarts-CJG2WVOX.js} +2 -2
- package/dist/bundle/{embed-IEJFYZ7N.js → embed-IBURCPTK.js} +3 -3
- package/dist/bundle/{embedder-N2TXC47Z.js → embedder-SK773RJG.js} +6 -6
- package/dist/bundle/{entry-VX4RACD7.js → entry-6WOJUMZN.js} +4 -4
- package/dist/bundle/failure-4N6GOEGN.js +66 -0
- package/dist/bundle/{first-run-2GXQUNFV.js → first-run-CMSDLJGE.js} +5 -5
- package/dist/bundle/{first-screen-JRKMDJPK.js → first-screen-6IZLOQ3Q.js} +12 -12
- package/dist/bundle/{instructions-FR4H42RI.js → instructions-RHGGUIBR.js} +1 -1
- package/dist/bundle/{mcp-IP3FEW24.js → mcp-HBKMY35O.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-QWBBKDHE.js → node-NBXEN7JU.js} +2 -2
- package/dist/bundle/{node-sqlite-GKJHUPHC.js → node-sqlite-WAGIYOYR.js} +3 -3
- package/dist/bundle/{oauth-ZQ7B32ZI.js → oauth-INSEXJD2.js} +4 -4
- package/dist/bundle/{open-TDGXVXNV.js → open-LXFV2C67.js} +2 -2
- package/dist/bundle/{openai-3T4YGUZM.js → openai-OCWAXC7E.js} +7 -7
- package/dist/bundle/{process-OBTDURL4.js → process-MRPJP32M.js} +1 -1
- package/dist/bundle/{program-6UJEO4TI.js → program-XKO4X6BB.js} +91 -69
- package/dist/bundle/{prompt-JZIIKSM4.js → prompt-ROLOHFNO.js} +2 -2
- package/dist/bundle/{recognize-47F6WJYE.js → recognize-63ZLC4DN.js} +1 -1
- package/dist/bundle/{remote-NHSYSI2S.js → remote-J4ZBFG3Y.js} +4 -4
- package/dist/bundle/{rerank-HONNCBTA.js → rerank-HUQCCGYO.js} +4 -4
- package/dist/bundle/{serve-63BFDEQS.js → serve-MFJYL4AB.js} +6 -6
- package/dist/bundle/{server-QWJPOH7K.js → server-2JQ5K33G.js} +50 -50
- package/dist/bundle/server-RKPGL53W.js +48 -0
- package/dist/bundle/server-ZN2KC4EE.js +61 -0
- package/dist/bundle/{state-ZLODXERO.js → state-AV5MO77W.js} +3 -3
- package/dist/bundle/{store-Q36VLED7.js → store-H4HCVN4H.js} +9 -9
- package/dist/bundle/store-maintenance-command-4GYOMUXE.js +48 -0
- package/dist/bundle/update-ATXEHV72.js +69 -0
- package/dist/finance/finance.d.ts +1 -1
- package/dist/finance/finance.d.ts.map +1 -1
- package/dist/finance/finance.js +2 -0
- package/dist/finance/finance.js.map +1 -1
- package/dist/knowledge/project-status-command.js +1 -1
- package/dist/knowledge/project-status-command.js.map +1 -1
- package/dist/mail/findings-command.d.ts.map +1 -1
- package/dist/mail/findings-command.js +9 -13
- package/dist/mail/findings-command.js.map +1 -1
- package/dist/review/command.d.ts +40 -0
- package/dist/review/command.d.ts.map +1 -1
- package/dist/review/command.js +25 -1
- package/dist/review/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 +8 -9
- 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-VVDYRHYP.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,
|
|
@@ -82,6 +83,7 @@ import {
|
|
|
82
83
|
reminder,
|
|
83
84
|
scaleOf,
|
|
84
85
|
settledStatus,
|
|
86
|
+
snakeCase,
|
|
85
87
|
tagOf,
|
|
86
88
|
timezoneOf,
|
|
87
89
|
transcriptLanguage,
|
|
@@ -98,11 +100,11 @@ import {
|
|
|
98
100
|
validateQuery,
|
|
99
101
|
walkQuery,
|
|
100
102
|
zonedMoment
|
|
101
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-A6HC2DWU.js";
|
|
102
104
|
import {
|
|
103
105
|
holdsCredential,
|
|
104
106
|
secretNamed
|
|
105
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-XXDWCZRM.js";
|
|
106
108
|
import {
|
|
107
109
|
DEFAULT_STEMMERS,
|
|
108
110
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -115,26 +117,26 @@ import {
|
|
|
115
117
|
fold,
|
|
116
118
|
normalize,
|
|
117
119
|
parseStemmers
|
|
118
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-Y4B4273X.js";
|
|
119
121
|
import {
|
|
120
122
|
DEFAULT_TASK_CATEGORIES,
|
|
121
123
|
sharedConfigPath,
|
|
122
124
|
storedTaskCategories,
|
|
123
125
|
taskCategoriesReader
|
|
124
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-ISVO2PHD.js";
|
|
125
127
|
import {
|
|
126
128
|
refuseOwnerStoreInTests,
|
|
127
129
|
storePath
|
|
128
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-FVN42IND.js";
|
|
129
131
|
import {
|
|
130
132
|
quietSqliteWarning,
|
|
131
133
|
storeCapable
|
|
132
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-F3OGJQWY.js";
|
|
133
135
|
import {
|
|
134
136
|
PRAGMAS,
|
|
135
137
|
TIME_LIMIT_FUNCTION,
|
|
136
138
|
TimeLimitReached
|
|
137
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-UA2H5FRV.js";
|
|
138
140
|
import {
|
|
139
141
|
array,
|
|
140
142
|
boolean,
|
|
@@ -184,7 +186,7 @@ import {
|
|
|
184
186
|
sql,
|
|
185
187
|
sqliteTable,
|
|
186
188
|
text
|
|
187
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-VF24JTL4.js";
|
|
188
190
|
import {
|
|
189
191
|
__commonJS,
|
|
190
192
|
__name,
|
|
@@ -9928,7 +9930,7 @@ var require_cjs = __commonJS({
|
|
|
9928
9930
|
}
|
|
9929
9931
|
});
|
|
9930
9932
|
|
|
9931
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
9932
9934
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
9933
9935
|
const methods = whole;
|
|
9934
9936
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10056,7 +10058,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10056
10058
|
};
|
|
10057
10059
|
}, "bindAccount");
|
|
10058
10060
|
|
|
10059
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
10060
10062
|
var SCHEME = "msg:";
|
|
10061
10063
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat: chat2, message: message2 }) => SCHEME + [provider, account, chat2, message2].map(encodeURIComponent).join("/"), "formatLocator");
|
|
10062
10064
|
var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -10070,7 +10072,7 @@ var parseLocator = /* @__PURE__ */ __name((reference2) => {
|
|
|
10070
10072
|
return { provider, account, chat: chat2, message: message2 };
|
|
10071
10073
|
}, "parseLocator");
|
|
10072
10074
|
|
|
10073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
10074
10076
|
var SIMPLE_REFERENCES = [
|
|
10075
10077
|
"note",
|
|
10076
10078
|
"document",
|
|
@@ -10218,7 +10220,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text6) => {
|
|
|
10218
10220
|
return match !== null && byPrefix.has(match[1]);
|
|
10219
10221
|
}, "looksLikeReference");
|
|
10220
10222
|
|
|
10221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
10222
10224
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
|
|
10223
10225
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
10224
10226
|
var PROVIDERS = [
|
|
@@ -10334,7 +10336,7 @@ var providerNamed = /* @__PURE__ */ __name((word2) => {
|
|
|
10334
10336
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
10335
10337
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
10336
10338
|
|
|
10337
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10339
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
10338
10340
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
10339
10341
|
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
10342
|
var fail = /* @__PURE__ */ __name((message2) => {
|
|
@@ -10357,7 +10359,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
10357
10359
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
10358
10360
|
}, "sourceOf");
|
|
10359
10361
|
|
|
10360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10362
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
10361
10363
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
10362
10364
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
10363
10365
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -10544,7 +10546,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf2 = (kind4)
|
|
|
10544
10546
|
return { accounts: [...chosen.values()], skipped };
|
|
10545
10547
|
}, "fitting");
|
|
10546
10548
|
|
|
10547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10548
10550
|
var IndexBuilderOn = class {
|
|
10549
10551
|
static {
|
|
10550
10552
|
__name(this, "IndexBuilderOn");
|
|
@@ -10739,7 +10741,7 @@ function alias(table, alias2) {
|
|
|
10739
10741
|
}
|
|
10740
10742
|
__name(alias, "alias");
|
|
10741
10743
|
|
|
10742
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10744
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10743
10745
|
var ENTITY_TABLES = {
|
|
10744
10746
|
account: "accounts",
|
|
10745
10747
|
attachment: "attachments",
|
|
@@ -10782,7 +10784,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10782
10784
|
return { table, pointer, type, count, known: known2 };
|
|
10783
10785
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
10784
10786
|
|
|
10785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10787
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
10786
10788
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
10787
10789
|
id: integer("id").primaryKey(),
|
|
10788
10790
|
name: text("name").notNull().unique(),
|
|
@@ -10791,7 +10793,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
10791
10793
|
updatedAt: integer("updated_at").notNull()
|
|
10792
10794
|
});
|
|
10793
10795
|
|
|
10794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
10795
10797
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
10796
10798
|
sourceKey: text("source_key").notNull(),
|
|
10797
10799
|
collection: text("collection").notNull(),
|
|
@@ -10801,13 +10803,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
10801
10803
|
createdAt: integer("created_at").notNull()
|
|
10802
10804
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
10803
10805
|
|
|
10804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
10805
10807
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
10806
10808
|
id: integer("id").notNull(),
|
|
10807
10809
|
indexableType: text("indexable_type").notNull()
|
|
10808
10810
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
10809
10811
|
|
|
10810
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
10811
10813
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
10812
10814
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
10813
10815
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -10833,7 +10835,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
10833
10835
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
10834
10836
|
]);
|
|
10835
10837
|
|
|
10836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10838
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
10837
10839
|
var accounts = sqliteTable("accounts", {
|
|
10838
10840
|
id: integer("id").primaryKey(),
|
|
10839
10841
|
provider: text("provider").notNull(),
|
|
@@ -12500,7 +12502,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
12500
12502
|
at: integer("at").notNull()
|
|
12501
12503
|
});
|
|
12502
12504
|
|
|
12503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
12504
12506
|
var ARMS = [
|
|
12505
12507
|
[
|
|
12506
12508
|
"message",
|
|
@@ -12627,7 +12629,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
12627
12629
|
return recomputed;
|
|
12628
12630
|
}, "drainInvolvementQueue");
|
|
12629
12631
|
|
|
12630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
12631
12633
|
import { domainToUnicode } from "node:url";
|
|
12632
12634
|
|
|
12633
12635
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -22649,7 +22651,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
22649
22651
|
}, "oa");
|
|
22650
22652
|
var na = { parse: O, get: aa, isValid: oa };
|
|
22651
22653
|
|
|
22652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22654
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
22653
22655
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
22654
22656
|
var ID = /^[\w-]{10,}$/;
|
|
22655
22657
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -22690,7 +22692,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text6) => [...text6.matchAll(L
|
|
|
22690
22692
|
return { url, documentId: googleDocumentId(url) };
|
|
22691
22693
|
}), "googleDocumentLinks");
|
|
22692
22694
|
|
|
22693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
22694
22696
|
var PHONE_PLANS = [
|
|
22695
22697
|
{
|
|
22696
22698
|
country: "us",
|
|
@@ -23070,7 +23072,7 @@ var PHONE_PLANS = [
|
|
|
23070
23072
|
}
|
|
23071
23073
|
];
|
|
23072
23074
|
|
|
23073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
23074
23076
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
23075
23077
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
23076
23078
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -23111,7 +23113,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
23111
23113
|
return void 0;
|
|
23112
23114
|
}, "nationalPhone");
|
|
23113
23115
|
|
|
23114
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23116
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
23115
23117
|
var BEFORE = [
|
|
23116
23118
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
23117
23119
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -23371,7 +23373,7 @@ var findPlaces = /* @__PURE__ */ __name((text6) => {
|
|
|
23371
23373
|
return found2.sort((a, b) => a.start - b.start);
|
|
23372
23374
|
}, "findPlaces");
|
|
23373
23375
|
|
|
23374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
23375
23377
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
23376
23378
|
var MENTION_VERSIONS = {
|
|
23377
23379
|
phone: 1,
|
|
@@ -23561,7 +23563,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
23561
23563
|
};
|
|
23562
23564
|
}, "typedPhone");
|
|
23563
23565
|
|
|
23564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
23565
23567
|
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
23568
|
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
23569
|
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 +23571,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
23569
23571
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
23570
23572
|
var NAME_WORDS = WORDS.split(" ");
|
|
23571
23573
|
|
|
23572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23574
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
23573
23575
|
var LATIN_TO_CYRILLIC = {
|
|
23574
23576
|
shch: "\u0449",
|
|
23575
23577
|
sch: "\u0449",
|
|
@@ -23777,7 +23779,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text6, stem, taken) => {
|
|
|
23777
23779
|
return found2;
|
|
23778
23780
|
}, "findUnknownNames");
|
|
23779
23781
|
|
|
23780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23782
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
23781
23783
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
23782
23784
|
"webpage",
|
|
23783
23785
|
"share",
|
|
@@ -23817,7 +23819,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
|
23817
23819
|
});
|
|
23818
23820
|
}, "matchDownloads");
|
|
23819
23821
|
|
|
23820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
23821
23823
|
var QUERY_VERSION = 1;
|
|
23822
23824
|
var QUERY_LIMITS2 = {
|
|
23823
23825
|
...QUERY_LIMITS,
|
|
@@ -23853,7 +23855,7 @@ function exhausted(budget) {
|
|
|
23853
23855
|
}
|
|
23854
23856
|
__name(exhausted, "exhausted");
|
|
23855
23857
|
|
|
23856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23858
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
23857
23859
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
23858
23860
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
23859
23861
|
kind: "char",
|
|
@@ -24253,7 +24255,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
24253
24255
|
return out;
|
|
24254
24256
|
}, "foldRegex");
|
|
24255
24257
|
|
|
24256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24258
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
24257
24259
|
var PRESET_VERSION = 1;
|
|
24258
24260
|
var PRESETS = {
|
|
24259
24261
|
password: {
|
|
@@ -24307,7 +24309,7 @@ var PRESETS = {
|
|
|
24307
24309
|
}
|
|
24308
24310
|
};
|
|
24309
24311
|
|
|
24310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
24311
24313
|
var FIELD_VERSION = 2;
|
|
24312
24314
|
var UNITS = {
|
|
24313
24315
|
"": 1,
|
|
@@ -24768,12 +24770,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
|
|
|
24768
24770
|
return validateFields(parsed3.output);
|
|
24769
24771
|
}, "validateAst");
|
|
24770
24772
|
|
|
24771
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
24772
24774
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
24773
24775
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
24774
24776
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
24775
24777
|
|
|
24776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
24777
24779
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
24778
24780
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
24779
24781
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -24797,7 +24799,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
24797
24799
|
};
|
|
24798
24800
|
}, "linkMatch");
|
|
24799
24801
|
|
|
24800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
24801
24803
|
var SETTING = "phoneCountries";
|
|
24802
24804
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
24803
24805
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -24828,7 +24830,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
24828
24830
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
24829
24831
|
}, "valueMatch");
|
|
24830
24832
|
|
|
24831
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24833
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
24832
24834
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
24833
24835
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
24834
24836
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -24856,7 +24858,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
24856
24858
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
24857
24859
|
}, "vocabularySimilarity");
|
|
24858
24860
|
|
|
24859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
24860
24862
|
import { createHash } from "node:crypto";
|
|
24861
24863
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
24862
24864
|
try {
|
|
@@ -24922,7 +24924,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind4, by, options
|
|
|
24922
24924
|
});
|
|
24923
24925
|
}, "guardTagCreation");
|
|
24924
24926
|
|
|
24925
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24927
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
24926
24928
|
var invalid2 = /* @__PURE__ */ __name((message2) => {
|
|
24927
24929
|
throw new CliError("validation_error", message2);
|
|
24928
24930
|
}, "invalid");
|
|
@@ -24999,7 +25001,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
24999
25001
|
};
|
|
25000
25002
|
}, "createTagRedirectIndex");
|
|
25001
25003
|
|
|
25002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25004
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
25003
25005
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
25004
25006
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
25005
25007
|
if (!row2)
|
|
@@ -25027,7 +25029,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
25027
25029
|
return snapshot2;
|
|
25028
25030
|
}, "tagRedirectSnapshot");
|
|
25029
25031
|
|
|
25030
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
25031
25033
|
import { createHash as createHash2 } from "node:crypto";
|
|
25032
25034
|
var TASK_KEY_PREFIXES = {
|
|
25033
25035
|
question: "Q",
|
|
@@ -25055,7 +25057,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
25055
25057
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
25056
25058
|
}, "taskAccountOf");
|
|
25057
25059
|
|
|
25058
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25060
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
25059
25061
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
25060
25062
|
var REFERABLE = {
|
|
25061
25063
|
note: { tombstone: true },
|
|
@@ -25220,7 +25222,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
25220
25222
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
25221
25223
|
}, "taskIdOf");
|
|
25222
25224
|
|
|
25223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
25224
25226
|
var toMs = /* @__PURE__ */ __name((iso13) => {
|
|
25225
25227
|
if (iso13 === null || iso13 === void 0)
|
|
25226
25228
|
return null;
|
|
@@ -25234,7 +25236,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
25234
25236
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
25235
25237
|
var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
25236
25238
|
|
|
25237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
25238
25240
|
var TAG_KINDS = ["tag", "topic"];
|
|
25239
25241
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
25240
25242
|
var TAG_TYPE = {
|
|
@@ -25437,7 +25439,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
25437
25439
|
return result;
|
|
25438
25440
|
}, "tagsOf");
|
|
25439
25441
|
|
|
25440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
25441
25443
|
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
25444
|
var SPEECH = speech("att");
|
|
25443
25445
|
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 +25803,7 @@ var FIELD_COMPILERS = {
|
|
|
25801
25803
|
subject
|
|
25802
25804
|
};
|
|
25803
25805
|
|
|
25804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
25805
25807
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
25806
25808
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
25807
25809
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -25817,7 +25819,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
25817
25819
|
};
|
|
25818
25820
|
}, "placeOf");
|
|
25819
25821
|
|
|
25820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
25821
25823
|
var DRAIN_ON_WRITE = 500;
|
|
25822
25824
|
var METHOD = "rules";
|
|
25823
25825
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -25980,7 +25982,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
25980
25982
|
return queued.length;
|
|
25981
25983
|
}, "drainMentions");
|
|
25982
25984
|
|
|
25983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25985
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
25984
25986
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
25985
25987
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
25986
25988
|
if (!exists2)
|
|
@@ -25988,7 +25990,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
25988
25990
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
25989
25991
|
}, "indexRow");
|
|
25990
25992
|
|
|
25991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
25992
25994
|
var INDEX = "message_stems";
|
|
25993
25995
|
var SETTING2 = "searchStemmers";
|
|
25994
25996
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -26110,7 +26112,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
26110
26112
|
};
|
|
26111
26113
|
}, "stemmerCache");
|
|
26112
26114
|
|
|
26113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
26114
26116
|
var SQLITE_BUSY = 5;
|
|
26115
26117
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
26116
26118
|
var isBusy = /* @__PURE__ */ __name((error) => {
|
|
@@ -26205,7 +26207,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
26205
26207
|
}
|
|
26206
26208
|
}, "read");
|
|
26207
26209
|
|
|
26208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
26209
26211
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
26210
26212
|
coalesce(CASE k.chunkable_type
|
|
26211
26213
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -26347,7 +26349,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
26347
26349
|
}, "dropUnusedVectors");
|
|
26348
26350
|
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
26351
|
|
|
26350
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26352
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
26351
26353
|
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
26354
|
target: [accounts.provider, accounts.externalId],
|
|
26353
26355
|
set: {
|
|
@@ -26456,7 +26458,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
26456
26458
|
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
26459
|
}, "dropOrphanPeople");
|
|
26458
26460
|
|
|
26459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
26460
26462
|
var FOLDED = [
|
|
26461
26463
|
{ table: "tasks", column: "title" },
|
|
26462
26464
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -26493,7 +26495,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
26493
26495
|
return filled2;
|
|
26494
26496
|
}, "fillFolded");
|
|
26495
26497
|
|
|
26496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
26497
26499
|
var HISTORY_KEY = "$history";
|
|
26498
26500
|
var objectOf = /* @__PURE__ */ __name((text6) => {
|
|
26499
26501
|
if (typeof text6 !== "string")
|
|
@@ -26569,7 +26571,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
26569
26571
|
return rest;
|
|
26570
26572
|
}, "withoutHistory");
|
|
26571
26573
|
|
|
26572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26574
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
26573
26575
|
import { createHash as createHash3 } from "node:crypto";
|
|
26574
26576
|
var CHUNK_CHARS = 1200;
|
|
26575
26577
|
var CHUNK_OVERLAP = 150;
|
|
@@ -26674,7 +26676,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
26674
26676
|
return chunks2;
|
|
26675
26677
|
}, "cutChunks");
|
|
26676
26678
|
|
|
26677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26679
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
26678
26680
|
var DAY = 864e5;
|
|
26679
26681
|
var CURRENCY = [
|
|
26680
26682
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -26800,7 +26802,7 @@ var dueDayOf = /* @__PURE__ */ __name((text6, createdMs) => {
|
|
|
26800
26802
|
return best?.day ?? null;
|
|
26801
26803
|
}, "dueDayOf");
|
|
26802
26804
|
|
|
26803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
26804
26806
|
var DAY2 = 864e5;
|
|
26805
26807
|
var STOP_WORDS = new Set([
|
|
26806
26808
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -26955,7 +26957,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
26955
26957
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
26956
26958
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
26957
26959
|
|
|
26958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26960
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
26959
26961
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
26960
26962
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
26961
26963
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -27226,7 +27228,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
|
|
|
27226
27228
|
};
|
|
27227
27229
|
}, "readiness");
|
|
27228
27230
|
|
|
27229
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
27230
27232
|
var DOCUMENT_PICTURE = "document_picture";
|
|
27231
27233
|
var SCAN_PAGE2 = 5e3;
|
|
27232
27234
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -27289,7 +27291,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
27289
27291
|
}, "nearestPictures")
|
|
27290
27292
|
}), "documentPicturesOver");
|
|
27291
27293
|
|
|
27292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27294
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
27293
27295
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
27294
27296
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
27295
27297
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -27354,7 +27356,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
27354
27356
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
27355
27357
|
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
27358
|
|
|
27357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
27358
27360
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
27359
27361
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
27360
27362
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -27444,7 +27446,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
27444
27446
|
});
|
|
27445
27447
|
}, "linkMeeting");
|
|
27446
27448
|
|
|
27447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27449
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
27448
27450
|
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
27451
|
var UNSEARCHED_EVENT_TYPES = [
|
|
27450
27452
|
"working-location",
|
|
@@ -27674,7 +27676,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
27674
27676
|
return true;
|
|
27675
27677
|
}, "resetNoteIndex");
|
|
27676
27678
|
|
|
27677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27679
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
27678
27680
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
27679
27681
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
27680
27682
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -27693,7 +27695,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
27693
27695
|
}
|
|
27694
27696
|
}, "resolvePersonLinks");
|
|
27695
27697
|
|
|
27696
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
27697
27699
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
27698
27700
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
27699
27701
|
find: orm.select({
|
|
@@ -27918,7 +27920,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
27918
27920
|
}, "meetingIdentityPk");
|
|
27919
27921
|
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
27922
|
|
|
27921
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27923
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
27922
27924
|
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
27925
|
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
27926
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -28198,7 +28200,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
28198
28200
|
}
|
|
28199
28201
|
}, "replaceAutoTags");
|
|
28200
28202
|
|
|
28201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
28202
28204
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
28203
28205
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
28204
28206
|
var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
|
|
@@ -28217,7 +28219,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
28217
28219
|
return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
|
|
28218
28220
|
}, "counterFreshness");
|
|
28219
28221
|
|
|
28220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
28221
28223
|
import { createHash as createHash4 } from "node:crypto";
|
|
28222
28224
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
28223
28225
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -28315,7 +28317,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
28315
28317
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
28316
28318
|
}, "contextEvidenceRequest");
|
|
28317
28319
|
|
|
28318
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28320
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
28319
28321
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
28320
28322
|
var ACTIVITY = `
|
|
28321
28323
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -28432,7 +28434,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
28432
28434
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
28433
28435
|
}), "mailActivity");
|
|
28434
28436
|
|
|
28435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28437
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
28436
28438
|
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
28439
|
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
28440
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -28573,7 +28575,7 @@ var mailOwnText = /* @__PURE__ */ __name((body2) => {
|
|
|
28573
28575
|
return text6 || body2.trim();
|
|
28574
28576
|
}, "mailOwnText");
|
|
28575
28577
|
|
|
28576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28578
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
28577
28579
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
28578
28580
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
28579
28581
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
|
|
@@ -28683,7 +28685,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
28683
28685
|
return emails3 + threads;
|
|
28684
28686
|
}, "drainEmailIndex");
|
|
28685
28687
|
|
|
28686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28688
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
28687
28689
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
28688
28690
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
28689
28691
|
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 +28783,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
28781
28783
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
28782
28784
|
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
28785
|
|
|
28784
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
28785
28787
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
28786
28788
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
28787
28789
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -28831,7 +28833,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
28831
28833
|
return threads.length;
|
|
28832
28834
|
}, "markEmailsRestored");
|
|
28833
28835
|
|
|
28834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
28835
28837
|
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
28838
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
28837
28839
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -28898,7 +28900,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
28898
28900
|
}
|
|
28899
28901
|
}), "mailRulesOver");
|
|
28900
28902
|
|
|
28901
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
28902
28904
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
28903
28905
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
28904
28906
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -28906,7 +28908,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
28906
28908
|
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
28909
|
}, "reviewLink");
|
|
28908
28910
|
|
|
28909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
28910
28912
|
function checkMeetingCancelled(signal) {
|
|
28911
28913
|
if (!signal?.aborted)
|
|
28912
28914
|
return;
|
|
@@ -28917,7 +28919,7 @@ function checkMeetingCancelled(signal) {
|
|
|
28917
28919
|
}
|
|
28918
28920
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
28919
28921
|
|
|
28920
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28922
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
28921
28923
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
28922
28924
|
id: Number(row2.id),
|
|
28923
28925
|
accountId: Number(row2.account_id),
|
|
@@ -28967,7 +28969,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
28967
28969
|
createdAt: Number(row2.created_at)
|
|
28968
28970
|
}), "transcriptRowOf");
|
|
28969
28971
|
|
|
28970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
28971
28973
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
28972
28974
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
28973
28975
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -29134,7 +29136,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
29134
29136
|
}
|
|
29135
29137
|
}), "meetingReadsOver");
|
|
29136
29138
|
|
|
29137
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
29138
29140
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
29139
29141
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
29140
29142
|
const params = [input.accountId];
|
|
@@ -29177,7 +29179,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
29177
29179
|
return { clauses, params };
|
|
29178
29180
|
}, "meetingSelectionSql");
|
|
29179
29181
|
|
|
29180
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
29181
29183
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
29182
29184
|
async meetingChatLines(input) {
|
|
29183
29185
|
checkMeetingCancelled(input.signal);
|
|
@@ -29205,7 +29207,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
29205
29207
|
}
|
|
29206
29208
|
}), "meetingChatLinesOver");
|
|
29207
29209
|
|
|
29208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
29209
29211
|
var MESSAGE_FIELDS = {
|
|
29210
29212
|
pk: messages.id,
|
|
29211
29213
|
nativeId: messages.externalId,
|
|
@@ -29376,7 +29378,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
29376
29378
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
29377
29379
|
}), "chatActivity");
|
|
29378
29380
|
|
|
29379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
29380
29382
|
var HIT_FIELDS = {
|
|
29381
29383
|
...MESSAGE_FIELDS,
|
|
29382
29384
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -29475,7 +29477,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
29475
29477
|
};
|
|
29476
29478
|
}, "directReplies");
|
|
29477
29479
|
|
|
29478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
29479
29481
|
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
29482
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
29481
29483
|
const found2 = identityRow(context, ref3);
|
|
@@ -29606,7 +29608,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
29606
29608
|
}, "mentioning");
|
|
29607
29609
|
var escaped = /* @__PURE__ */ __name((text6) => text6.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
29608
29610
|
|
|
29609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
29610
29612
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
29611
29613
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
29612
29614
|
}, "missing");
|
|
@@ -29728,7 +29730,7 @@ function meetingContextLinksOver(context) {
|
|
|
29728
29730
|
}
|
|
29729
29731
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
29730
29732
|
|
|
29731
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29733
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
29732
29734
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
29733
29735
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
29734
29736
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -29757,7 +29759,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
29757
29759
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
29758
29760
|
}, "indexedText");
|
|
29759
29761
|
|
|
29760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
29761
29763
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
29762
29764
|
var meetingCurrentIndexRows = `
|
|
29763
29765
|
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 +29790,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
29788
29790
|
}, "invalidateMeetingStems");
|
|
29789
29791
|
var meetingStemmableText = /* @__PURE__ */ __name((text6) => text6.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
29790
29792
|
|
|
29791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
29792
29794
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
29793
29795
|
return {
|
|
29794
29796
|
async indexSearch(original) {
|
|
@@ -29856,10 +29858,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
29856
29858
|
}
|
|
29857
29859
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
29858
29860
|
|
|
29859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
29860
29862
|
import { createHash as createHash5 } from "node:crypto";
|
|
29861
29863
|
|
|
29862
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
29863
29865
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
29864
29866
|
const padded = ` ${term} `;
|
|
29865
29867
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -29868,7 +29870,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
29868
29870
|
return [...pieces];
|
|
29869
29871
|
}, "trigrams");
|
|
29870
29872
|
|
|
29871
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
29872
29874
|
var SHORTEST_CORRECTION = 3;
|
|
29873
29875
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
29874
29876
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -29915,7 +29917,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
29915
29917
|
return corrections;
|
|
29916
29918
|
}, "correctWords");
|
|
29917
29919
|
|
|
29918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29920
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
29919
29921
|
var SHORTEST_GARBLED = 4;
|
|
29920
29922
|
var MOST_WIDENED = 64;
|
|
29921
29923
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -30007,7 +30009,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
30007
30009
|
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
30010
|
}, "widenWords");
|
|
30009
30011
|
|
|
30010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30012
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
30011
30013
|
import { readFileSync } from "node:fs";
|
|
30012
30014
|
var loaded;
|
|
30013
30015
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -30066,7 +30068,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
30066
30068
|
return false;
|
|
30067
30069
|
}, "knownRussianWord");
|
|
30068
30070
|
|
|
30069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
30070
30072
|
var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
30071
30073
|
var MOST_WORDS = 128;
|
|
30072
30074
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -30293,7 +30295,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text6, stemmer) => {
|
|
|
30293
30295
|
return check3(tree);
|
|
30294
30296
|
}, "matchMeetingText");
|
|
30295
30297
|
|
|
30296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
30297
30299
|
var fail3 = /* @__PURE__ */ __name((message2) => {
|
|
30298
30300
|
throw new CliError("validation_error", message2);
|
|
30299
30301
|
}, "fail");
|
|
@@ -30475,7 +30477,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
30475
30477
|
}
|
|
30476
30478
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
30477
30479
|
|
|
30478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
30479
30481
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30480
30482
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
30481
30483
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -30507,7 +30509,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30507
30509
|
}
|
|
30508
30510
|
}), "meetingLanguagesOver");
|
|
30509
30511
|
|
|
30510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
30511
30513
|
import { createHash as createHash6 } from "node:crypto";
|
|
30512
30514
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
30513
30515
|
if (value === void 0)
|
|
@@ -30597,7 +30599,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
30597
30599
|
}
|
|
30598
30600
|
}), "meetingParticipantSearchOver");
|
|
30599
30601
|
|
|
30600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30602
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
30601
30603
|
var preparationQueries = {
|
|
30602
30604
|
participants: {
|
|
30603
30605
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -30647,7 +30649,7 @@ var preparationQueries = {
|
|
|
30647
30649
|
}
|
|
30648
30650
|
};
|
|
30649
30651
|
|
|
30650
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
30651
30653
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30652
30654
|
async preparationContext(original) {
|
|
30653
30655
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -30688,7 +30690,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30688
30690
|
}
|
|
30689
30691
|
}), "meetingPreparationContextOver");
|
|
30690
30692
|
|
|
30691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30693
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
30692
30694
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
30693
30695
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
30694
30696
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -30702,7 +30704,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
30702
30704
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
30703
30705
|
)`, "preparationSubjects");
|
|
30704
30706
|
|
|
30705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30707
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
30706
30708
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30707
30709
|
async preparationKnowledge(original) {
|
|
30708
30710
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -30747,7 +30749,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
30747
30749
|
}
|
|
30748
30750
|
}), "meetingPreparationKnowledgeOver");
|
|
30749
30751
|
|
|
30750
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30752
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
30751
30753
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30752
30754
|
async preparationNotes(original) {
|
|
30753
30755
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -30800,7 +30802,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30800
30802
|
}
|
|
30801
30803
|
}), "meetingPreparationNotesOver");
|
|
30802
30804
|
|
|
30803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
30804
30806
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
30805
30807
|
async relatedHistory(original) {
|
|
30806
30808
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -30871,7 +30873,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30871
30873
|
}
|
|
30872
30874
|
}), "meetingRelatedHistoryOver");
|
|
30873
30875
|
|
|
30874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30876
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
30875
30877
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
30876
30878
|
var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
30877
30879
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -30952,7 +30954,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30952
30954
|
}
|
|
30953
30955
|
}), "meetingReviewOver");
|
|
30954
30956
|
|
|
30955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
30956
30958
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
30957
30959
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
30958
30960
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -31006,7 +31008,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31006
31008
|
}
|
|
31007
31009
|
}), "meetingSeriesHistoryOver");
|
|
31008
31010
|
|
|
31009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31011
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
31010
31012
|
var MOST_ROWS = 5e5;
|
|
31011
31013
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
31012
31014
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -31075,7 +31077,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31075
31077
|
}
|
|
31076
31078
|
}), "meetingStatsOver");
|
|
31077
31079
|
|
|
31078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
31079
31081
|
var CURSOR_KEY = "meetings";
|
|
31080
31082
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
31081
31083
|
id: Number(row2.id),
|
|
@@ -31644,7 +31646,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31644
31646
|
};
|
|
31645
31647
|
}, "meetingStoreOver");
|
|
31646
31648
|
|
|
31647
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
31648
31650
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
31649
31651
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
31650
31652
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -31670,7 +31672,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
31670
31672
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
31671
31673
|
}, "release");
|
|
31672
31674
|
|
|
31673
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
31674
31676
|
var THREAD_COLUMNS = {
|
|
31675
31677
|
subject: {
|
|
31676
31678
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -31687,7 +31689,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
31687
31689
|
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
31690
|
}, "threadRows");
|
|
31689
31691
|
|
|
31690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
31691
31693
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
31692
31694
|
id: `email:${place.emailId}`,
|
|
31693
31695
|
chatId: place.threadExternalId,
|
|
@@ -32243,7 +32245,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
32243
32245
|
}
|
|
32244
32246
|
}), "mailStoreOver");
|
|
32245
32247
|
|
|
32246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32248
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
32247
32249
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
32248
32250
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
32249
32251
|
var folded4 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -32333,7 +32335,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
32333
32335
|
}, "knownWord");
|
|
32334
32336
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
32335
32337
|
|
|
32336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
32337
32339
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
32338
32340
|
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
32341
|
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 +32421,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
32419
32421
|
return found2;
|
|
32420
32422
|
}, "spokenTranscripts");
|
|
32421
32423
|
|
|
32422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
32423
32425
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
32424
32426
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
32425
32427
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -32466,7 +32468,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
32466
32468
|
});
|
|
32467
32469
|
}, "placeHits");
|
|
32468
32470
|
|
|
32469
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
32470
32472
|
var GROUPS = {
|
|
32471
32473
|
chat: {
|
|
32472
32474
|
key: "m.chat_id",
|
|
@@ -32488,7 +32490,7 @@ var GROUPS = {
|
|
|
32488
32490
|
}
|
|
32489
32491
|
};
|
|
32490
32492
|
|
|
32491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
32492
32494
|
var MESSAGES2 = {
|
|
32493
32495
|
rows: "messages",
|
|
32494
32496
|
threads: "chats",
|
|
@@ -32971,7 +32973,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
32971
32973
|
};
|
|
32972
32974
|
}, "runCompiled");
|
|
32973
32975
|
|
|
32974
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
32975
32977
|
function invalidMetadata() {
|
|
32976
32978
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
32977
32979
|
}
|
|
@@ -33073,7 +33075,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
33073
33075
|
};
|
|
33074
33076
|
}), "counterTargets");
|
|
33075
33077
|
|
|
33076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
33077
33079
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind4) => `'${kind4}'`).join(",");
|
|
33078
33080
|
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
33081
|
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 +33194,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
33192
33194
|
}));
|
|
33193
33195
|
}, "attachmentViews");
|
|
33194
33196
|
|
|
33195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
33196
33198
|
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
33199
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text6, source2) => {
|
|
33198
33200
|
const { orm, database, now: now2 } = context;
|
|
@@ -33230,7 +33232,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
33230
33232
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
33231
33233
|
}, "intoVoiceAttachment");
|
|
33232
33234
|
|
|
33233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33235
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
33234
33236
|
var FIELDS = [
|
|
33235
33237
|
"threadExternalId",
|
|
33236
33238
|
"senderIdentityId",
|
|
@@ -33547,7 +33549,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
33547
33549
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
33548
33550
|
}, "writeDerivedReactions");
|
|
33549
33551
|
|
|
33550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33552
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
33551
33553
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
33552
33554
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
33553
33555
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -33568,7 +33570,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
33568
33570
|
};
|
|
33569
33571
|
}, "keysOver");
|
|
33570
33572
|
|
|
33571
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33573
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
33572
33574
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
33573
33575
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
33574
33576
|
if (!row2)
|
|
@@ -33603,7 +33605,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
33603
33605
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
33604
33606
|
}, "saveProfile");
|
|
33605
33607
|
|
|
33606
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
33607
33609
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
33608
33610
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
33609
33611
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -33660,7 +33662,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
33660
33662
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
33661
33663
|
}, "proposedBySql");
|
|
33662
33664
|
|
|
33663
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33665
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
33664
33666
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
33665
33667
|
const owner = ownerPerson(context.database).id;
|
|
33666
33668
|
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 +33683,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
33681
33683
|
return personOf(context, ref3);
|
|
33682
33684
|
}, "linkToOwner");
|
|
33683
33685
|
|
|
33684
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
33685
33687
|
var PROVIDERS_SETTING = "providers";
|
|
33686
33688
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
33687
33689
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -33716,7 +33718,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
33716
33718
|
});
|
|
33717
33719
|
}, "registerProvider");
|
|
33718
33720
|
|
|
33719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33721
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
33720
33722
|
var DAY3 = 864e5;
|
|
33721
33723
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
33722
33724
|
var TEXT_LIMIT = 20;
|
|
@@ -33915,7 +33917,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
33915
33917
|
};
|
|
33916
33918
|
}, "taskSimilarityOver");
|
|
33917
33919
|
|
|
33918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33920
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
33919
33921
|
var SETTING3 = "taskCategories";
|
|
33920
33922
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
33921
33923
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -33934,7 +33936,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
33934
33936
|
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
33937
|
}, "saveTaskCategories");
|
|
33936
33938
|
|
|
33937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
33938
33940
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
33939
33941
|
var ALLOWED = "taskAgentClose";
|
|
33940
33942
|
var MIN = "taskAgentCloseMin";
|
|
@@ -33990,10 +33992,10 @@ var SUGGESTION_COLUMNS = [
|
|
|
33990
33992
|
];
|
|
33991
33993
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
33992
33994
|
|
|
33993
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33995
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
33994
33996
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
33995
33997
|
|
|
33996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
33997
33999
|
var TASK_CLOSE_KIND = "task_close";
|
|
33998
34000
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
33999
34001
|
var isOwnerOnlyKind = /* @__PURE__ */ __name((kind4) => kind4 === MAIL_FINDINGS_KIND || kind4 === MEETING_FINDINGS_KIND || kind4 === TASK_CLOSE_KIND, "isOwnerOnlyKind");
|
|
@@ -34041,7 +34043,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
34041
34043
|
}, "assertMayDecide");
|
|
34042
34044
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
34043
34045
|
|
|
34044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
34045
34047
|
var PROFILE_PLACEHOLDER = "<profile>";
|
|
34046
34048
|
var oneLine = /* @__PURE__ */ __name((text6) => singleLine(text6.replace(/\s+/g, " ").trim()), "oneLine");
|
|
34047
34049
|
var openKind = /* @__PURE__ */ __name((kind4) => kind4 === "email" ? "message" : kind4 === "email_thread" ? "chat" : kind4 === "unknown" ? void 0 : kind4, "openKind");
|
|
@@ -34094,7 +34096,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
|
|
|
34094
34096
|
return `${WORDS2[summary.kind]} ${named3}${notes2 === "" ? "" : ` (${notes2})`}`;
|
|
34095
34097
|
}, "refLabel");
|
|
34096
34098
|
|
|
34097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
34098
34100
|
var EXCERPT_CHARS = 280;
|
|
34099
34101
|
var TITLE_CHARS = 120;
|
|
34100
34102
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -34455,7 +34457,7 @@ var refReadsOf = /* @__PURE__ */ __name((database, texts2, { excerpt = false } =
|
|
|
34455
34457
|
var summaryOf2 = /* @__PURE__ */ __name(({ sender, excerpt, ...summary }, withExcerpt) => withExcerpt ? { ...summary, excerpt } : summary, "summaryOf");
|
|
34456
34458
|
var refSummariesOf = /* @__PURE__ */ __name((database, texts2, options = {}) => new Map([...refReadsOf(database, texts2, options)].map(([text6, read2]) => [text6, summaryOf2(read2, options.excerpt === true)])), "refSummariesOf");
|
|
34457
34459
|
|
|
34458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
34459
34461
|
var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
|
|
34460
34462
|
ref: ref3,
|
|
34461
34463
|
kind: read2.kind,
|
|
@@ -34491,7 +34493,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
34491
34493
|
});
|
|
34492
34494
|
}, "evidenceSourcesOf");
|
|
34493
34495
|
|
|
34494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
34495
34497
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
34496
34498
|
var MAX_TEXT_CHARS = 2e6;
|
|
34497
34499
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -34517,7 +34519,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
34517
34519
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
34518
34520
|
}, "pdfPreviewLimits");
|
|
34519
34521
|
|
|
34520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
34521
34523
|
import { randomBytes } from "node:crypto";
|
|
34522
34524
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
34523
34525
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -34530,7 +34532,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
34530
34532
|
return time3 + random;
|
|
34531
34533
|
}, "ulid");
|
|
34532
34534
|
|
|
34533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
34534
34536
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
34535
34537
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
34536
34538
|
if (!meta && !sections?.length)
|
|
@@ -34551,7 +34553,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
34551
34553
|
return typeof language === "string" && language !== "" ? language : null;
|
|
34552
34554
|
}, "languageOf");
|
|
34553
34555
|
|
|
34554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
34555
34557
|
var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
34556
34558
|
var objectOf2 = /* @__PURE__ */ __name((value) => {
|
|
34557
34559
|
if (isObject(value))
|
|
@@ -34794,7 +34796,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
34794
34796
|
};
|
|
34795
34797
|
}, "filesStoreOver");
|
|
34796
34798
|
|
|
34797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34799
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
34798
34800
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
34799
34801
|
entity: "document",
|
|
34800
34802
|
backend: "sql",
|
|
@@ -34840,7 +34842,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
34840
34842
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
34841
34843
|
}, "importedDocumentWhere");
|
|
34842
34844
|
|
|
34843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
34844
34846
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
34845
34847
|
var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
34846
34848
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
|
|
@@ -35366,7 +35368,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35366
35368
|
};
|
|
35367
35369
|
}, "notesStoreOver");
|
|
35368
35370
|
|
|
35369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35371
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
35370
35372
|
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
35373
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
35372
35374
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -35588,7 +35590,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35588
35590
|
};
|
|
35589
35591
|
}, "memoriesStoreOver");
|
|
35590
35592
|
|
|
35591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35593
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
35592
35594
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
35593
35595
|
var KEY = "taskFirstPassPerChat";
|
|
35594
35596
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -35608,7 +35610,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
35608
35610
|
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
35611
|
}, "saveFirstPassPerChat");
|
|
35610
35612
|
|
|
35611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35613
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
35612
35614
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
35613
35615
|
var EXTERNAL_ID_CHARS = 200;
|
|
35614
35616
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -35635,7 +35637,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
35635
35637
|
return text6;
|
|
35636
35638
|
}, "sourceUrlOf");
|
|
35637
35639
|
|
|
35638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35640
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
35639
35641
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
35640
35642
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
35641
35643
|
name,
|
|
@@ -35858,7 +35860,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
35858
35860
|
return root === void 0 ? void 0 : { ...query, root };
|
|
35859
35861
|
}, "withoutField");
|
|
35860
35862
|
|
|
35861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
35862
35864
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
35863
35865
|
if (row2.author_type == null)
|
|
35864
35866
|
return null;
|
|
@@ -35886,7 +35888,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
35886
35888
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
35887
35889
|
}, "addComment");
|
|
35888
35890
|
|
|
35889
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
35890
35892
|
var TASK_RELATION_KINDS = [
|
|
35891
35893
|
"blocked-by",
|
|
35892
35894
|
"follow-up-of",
|
|
@@ -36016,7 +36018,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
36016
36018
|
};
|
|
36017
36019
|
}, "taskRelationsStoreOver");
|
|
36018
36020
|
|
|
36019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
36020
36022
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
36021
36023
|
var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
36022
36024
|
var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind4, changes, at) => {
|
|
@@ -36545,7 +36547,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
36545
36547
|
};
|
|
36546
36548
|
}, "workTasksOver");
|
|
36547
36549
|
|
|
36548
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
36549
36551
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
36550
36552
|
const { database, now: now2 } = context;
|
|
36551
36553
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -36594,7 +36596,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
36594
36596
|
};
|
|
36595
36597
|
}, "taskCloseOver");
|
|
36596
36598
|
|
|
36597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36599
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
36598
36600
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
36599
36601
|
const { database, now: now2 } = context;
|
|
36600
36602
|
const required3 = /* @__PURE__ */ __name((id2) => {
|
|
@@ -36812,7 +36814,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
36812
36814
|
};
|
|
36813
36815
|
}, "taskPairsOver");
|
|
36814
36816
|
|
|
36815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36817
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
36816
36818
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
36817
36819
|
var TASK_STATS_SQL = {
|
|
36818
36820
|
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 +36853,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
36851
36853
|
}, "statNames")
|
|
36852
36854
|
}), "taskStatsOver");
|
|
36853
36855
|
|
|
36854
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
36855
36857
|
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
36858
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
36857
36859
|
const key2 = inboxKey(account);
|
|
@@ -37058,7 +37060,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
37058
37060
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
37059
37061
|
}, "oneOf");
|
|
37060
37062
|
|
|
37061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
37062
37064
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
37063
37065
|
const { database } = context;
|
|
37064
37066
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -37103,7 +37105,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
37103
37105
|
};
|
|
37104
37106
|
}, "accountsStoreOver");
|
|
37105
37107
|
|
|
37106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37108
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
37107
37109
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
37108
37110
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
37109
37111
|
const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -37127,7 +37129,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
37127
37129
|
})), "keepDownloads");
|
|
37128
37130
|
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
37131
|
|
|
37130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37132
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
37131
37133
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
37132
37134
|
const { database } = context;
|
|
37133
37135
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -37184,7 +37186,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
37184
37186
|
}, "keepAttachmentText")
|
|
37185
37187
|
}), "attachmentsStoreOver");
|
|
37186
37188
|
|
|
37187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
37188
37190
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
37189
37191
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
37190
37192
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -37364,7 +37366,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
37364
37366
|
return done;
|
|
37365
37367
|
}, "rekeyChats");
|
|
37366
37368
|
|
|
37367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
37368
37370
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
37369
37371
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
37370
37372
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -37422,7 +37424,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
37422
37424
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
37423
37425
|
}, "chatCoverage");
|
|
37424
37426
|
|
|
37425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
37426
37428
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
37427
37429
|
const { database } = context;
|
|
37428
37430
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -37557,7 +37559,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37557
37559
|
};
|
|
37558
37560
|
}, "chatsStoreOver");
|
|
37559
37561
|
|
|
37560
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
37561
37563
|
import { createHash as createHash7 } from "node:crypto";
|
|
37562
37564
|
var BATCH_CONTEXT = 50;
|
|
37563
37565
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -37695,7 +37697,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
37695
37697
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
37696
37698
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
37697
37699
|
|
|
37698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37700
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
37699
37701
|
import { setTimeout } from "node:timers/promises";
|
|
37700
37702
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
37701
37703
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -38007,7 +38009,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
38007
38009
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
38008
38010
|
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
38011
|
|
|
38010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38012
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
38011
38013
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
38012
38014
|
const { database } = context;
|
|
38013
38015
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -38114,7 +38116,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
38114
38116
|
};
|
|
38115
38117
|
}, "conversationsStoreOver");
|
|
38116
38118
|
|
|
38117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38119
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
38118
38120
|
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
38121
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
38120
38122
|
const { database } = context;
|
|
@@ -38139,7 +38141,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
38139
38141
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
38140
38142
|
}), "countersStoreOver");
|
|
38141
38143
|
|
|
38142
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38144
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
38143
38145
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
38144
38146
|
var MENTION_QUERY = defineQuery({
|
|
38145
38147
|
entity: "mention",
|
|
@@ -38355,7 +38357,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
38355
38357
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
38356
38358
|
}, "listPlaces");
|
|
38357
38359
|
|
|
38358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
38359
38361
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
38360
38362
|
const { database } = context;
|
|
38361
38363
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -38390,7 +38392,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
38390
38392
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
38391
38393
|
}), "mentionsStoreOver");
|
|
38392
38394
|
|
|
38393
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
38394
38396
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
38395
38397
|
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
38398
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -38405,7 +38407,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
38405
38407
|
}));
|
|
38406
38408
|
}, "documentLinkMessages");
|
|
38407
38409
|
|
|
38408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38410
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
38409
38411
|
var stemmerFor = stemmerCache();
|
|
38410
38412
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
38411
38413
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -38449,7 +38451,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
38449
38451
|
});
|
|
38450
38452
|
}, "laterSharingRare");
|
|
38451
38453
|
|
|
38452
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38454
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
38453
38455
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
38454
38456
|
const { database } = context;
|
|
38455
38457
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -38584,7 +38586,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
38584
38586
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
38585
38587
|
}), "messagesStoreOver");
|
|
38586
38588
|
|
|
38587
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
38588
38590
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
38589
38591
|
var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
38590
38592
|
var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -38641,7 +38643,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
|
|
|
38641
38643
|
});
|
|
38642
38644
|
}, "personPreparation");
|
|
38643
38645
|
|
|
38644
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
38645
38647
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
38646
38648
|
const id2 = Number(uid);
|
|
38647
38649
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -38649,7 +38651,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
38649
38651
|
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
38652
|
}, "personSeenInAccounts");
|
|
38651
38653
|
|
|
38652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38654
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
38653
38655
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
38654
38656
|
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
38657
|
if (!row2)
|
|
@@ -38715,7 +38717,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
38715
38717
|
return { id: id2, personId, removed: true };
|
|
38716
38718
|
}, "removeNote");
|
|
38717
38719
|
|
|
38718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
38719
38721
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
38720
38722
|
const { database } = context;
|
|
38721
38723
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -38800,13 +38802,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
38800
38802
|
};
|
|
38801
38803
|
}, "peopleStoreOver");
|
|
38802
38804
|
|
|
38803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
38804
38806
|
import { createHash as createHash9 } from "node:crypto";
|
|
38805
38807
|
|
|
38806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
38807
38809
|
import { createHash as createHash8 } from "node:crypto";
|
|
38808
38810
|
|
|
38809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38811
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
38810
38812
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
38811
38813
|
var AUTHOR_MEASURES = [
|
|
38812
38814
|
"messages",
|
|
@@ -38946,7 +38948,7 @@ var withoutUrls = /* @__PURE__ */ __name((text6) => text6.replace(/\S+/gu, (toke
|
|
|
38946
38948
|
var rankingWords = /* @__PURE__ */ __name((text6) => withoutUrls(text6).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
38947
38949
|
var rankingQuestion = /* @__PURE__ */ __name((text6) => withoutUrls(text6).includes("?"), "rankingQuestion");
|
|
38948
38950
|
|
|
38949
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38951
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
38950
38952
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
38951
38953
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
38952
38954
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -39168,7 +39170,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
39168
39170
|
};
|
|
39169
39171
|
}, "rankReplyGraph");
|
|
39170
39172
|
|
|
39171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39173
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
39172
39174
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
39173
39175
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
39174
39176
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -39342,7 +39344,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
39342
39344
|
return { items, evidence, summary, graph: graph.quality };
|
|
39343
39345
|
}, "calculateAdminStatistics");
|
|
39344
39346
|
|
|
39345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
39346
39348
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
39347
39349
|
const dates = [];
|
|
39348
39350
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -39364,7 +39366,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
39364
39366
|
return dates[0].node.resolution.date;
|
|
39365
39367
|
}, "rankingContextRange");
|
|
39366
39368
|
|
|
39367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
39368
39370
|
var reactionCounts = /* @__PURE__ */ __name((stored3) => {
|
|
39369
39371
|
let counts;
|
|
39370
39372
|
try {
|
|
@@ -39659,7 +39661,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
39659
39661
|
});
|
|
39660
39662
|
}, "rankQuery");
|
|
39661
39663
|
|
|
39662
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39664
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
39663
39665
|
function fail4(message2, reason = "query.too-large") {
|
|
39664
39666
|
throw new CliError("validation_error", message2, { reason, complete: false });
|
|
39665
39667
|
}
|
|
@@ -39836,7 +39838,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
39836
39838
|
return result;
|
|
39837
39839
|
}), "adminStatisticsQuery");
|
|
39838
39840
|
|
|
39839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39841
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
39840
39842
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
39841
39843
|
if (!execution.accounts.length)
|
|
39842
39844
|
return { conversations: [], chats: [] };
|
|
@@ -39854,7 +39856,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
39854
39856
|
return { conversations: conversations2, chats: chats2 };
|
|
39855
39857
|
}, "conversationEligibility");
|
|
39856
39858
|
|
|
39857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39859
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
39858
39860
|
import { createHash as createHash10 } from "node:crypto";
|
|
39859
39861
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
39860
39862
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -40004,7 +40006,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
40004
40006
|
return result;
|
|
40005
40007
|
}, "rankingEvidence");
|
|
40006
40008
|
|
|
40007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
40008
40010
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
40009
40011
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2) => {
|
|
40010
40012
|
const params = [...scope3.accounts.flatMap(({ provider, account }) => [provider, account]), ...kinds2];
|
|
@@ -40098,7 +40100,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
40098
40100
|
});
|
|
40099
40101
|
}, "waitingChats");
|
|
40100
40102
|
|
|
40101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
40102
40104
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
40103
40105
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
40104
40106
|
if (execution.corpus === "mail")
|
|
@@ -40119,7 +40121,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
40119
40121
|
};
|
|
40120
40122
|
}, "queriesStoreOver");
|
|
40121
40123
|
|
|
40122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40124
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
40123
40125
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
40124
40126
|
const { database, now: now2 } = context;
|
|
40125
40127
|
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 +40160,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
40158
40160
|
}));
|
|
40159
40161
|
}, "chatEventsOf");
|
|
40160
40162
|
|
|
40161
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
40162
40164
|
import { createHash as createHash11 } from "node:crypto";
|
|
40163
40165
|
|
|
40164
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
40165
40167
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
40166
40168
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
40167
40169
|
timeZone: zone,
|
|
@@ -40181,7 +40183,7 @@ var weekKey = /* @__PURE__ */ __name((day) => {
|
|
|
40181
40183
|
return date3.toISOString().slice(0, 10);
|
|
40182
40184
|
}, "weekKey");
|
|
40183
40185
|
|
|
40184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
40185
40187
|
var RETENTION_TOLERANCE = 864e5;
|
|
40186
40188
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
40187
40189
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -40235,7 +40237,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
40235
40237
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
40236
40238
|
}, "retentionCohorts");
|
|
40237
40239
|
|
|
40238
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40240
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
40239
40241
|
var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
40240
40242
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
40241
40243
|
validateRetentionOptions(options);
|
|
@@ -40366,7 +40368,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
40366
40368
|
};
|
|
40367
40369
|
}, "retentionQuery");
|
|
40368
40370
|
|
|
40369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40371
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
40370
40372
|
var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
40371
40373
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
40372
40374
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -40497,7 +40499,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
40497
40499
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
40498
40500
|
})), "trackedChats");
|
|
40499
40501
|
|
|
40500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
40501
40503
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
40502
40504
|
const { database } = context;
|
|
40503
40505
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -40553,7 +40555,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
40553
40555
|
};
|
|
40554
40556
|
}, "rosterStoreOver");
|
|
40555
40557
|
|
|
40556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
40557
40559
|
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
40560
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
40559
40561
|
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 +40579,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
40577
40579
|
}
|
|
40578
40580
|
}, "backfillNormalized");
|
|
40579
40581
|
|
|
40580
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
40581
40583
|
var INDEX2 = "message_words";
|
|
40582
40584
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
40583
40585
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -40704,7 +40706,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
40704
40706
|
});
|
|
40705
40707
|
}, "resetSearchIndex");
|
|
40706
40708
|
|
|
40707
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
40708
40710
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
40709
40711
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
40710
40712
|
const before2 = stemsState(database);
|
|
@@ -40799,7 +40801,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
40799
40801
|
return resetStems(database, { now: now2 });
|
|
40800
40802
|
}, "followDefaultStemmers");
|
|
40801
40803
|
|
|
40802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
40803
40805
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
40804
40806
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
40805
40807
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -40821,7 +40823,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
40821
40823
|
});
|
|
40822
40824
|
}, "termCandidates");
|
|
40823
40825
|
|
|
40824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
40825
40827
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
40826
40828
|
const { database } = context;
|
|
40827
40829
|
const stemmerFor2 = stemmerCache();
|
|
@@ -40843,7 +40845,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
40843
40845
|
};
|
|
40844
40846
|
}, "searchIndexStoreOver");
|
|
40845
40847
|
|
|
40846
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40848
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
40847
40849
|
var HISTORY_KEPT = 1e3;
|
|
40848
40850
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
40849
40851
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -40912,7 +40914,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
40912
40914
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
40913
40915
|
}, "clearHistory");
|
|
40914
40916
|
|
|
40915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
40916
40918
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
40917
40919
|
const { database } = context;
|
|
40918
40920
|
return {
|
|
@@ -40936,7 +40938,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
40936
40938
|
};
|
|
40937
40939
|
}, "searchesStoreOver");
|
|
40938
40940
|
|
|
40939
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40941
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
40940
40942
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
40941
40943
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
40942
40944
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -40979,7 +40981,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
40979
40981
|
};
|
|
40980
40982
|
}, "agentActionsStoreOver");
|
|
40981
40983
|
|
|
40982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40984
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
40983
40985
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
40984
40986
|
}) => {
|
|
40985
40987
|
const { database, now: now2 } = context;
|
|
@@ -41038,7 +41040,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
41038
41040
|
};
|
|
41039
41041
|
}, "botUpdateStoreOver");
|
|
41040
41042
|
|
|
41041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
41042
41044
|
var DAY4 = 864e5;
|
|
41043
41045
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
41044
41046
|
if (filter.accountIds !== void 0 && filter.accountId !== void 0)
|
|
@@ -41147,7 +41149,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
41147
41149
|
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
41150
|
}, "listEvents");
|
|
41149
41151
|
|
|
41150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41152
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
41151
41153
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
41152
41154
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
41153
41155
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -41202,7 +41204,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
41202
41204
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
41203
41205
|
}, "forgetCalendarRows");
|
|
41204
41206
|
|
|
41205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
41206
41208
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
41207
41209
|
id: Number(row2.id),
|
|
41208
41210
|
accountId: Number(row2.account_id),
|
|
@@ -41789,7 +41791,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
41789
41791
|
};
|
|
41790
41792
|
}, "eventStoreOver");
|
|
41791
41793
|
|
|
41792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41794
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
41793
41795
|
var CATALOG_QUERY = defineQuery({
|
|
41794
41796
|
entity: "document",
|
|
41795
41797
|
backend: "sql",
|
|
@@ -42031,7 +42033,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
42031
42033
|
};
|
|
42032
42034
|
}, "catalogStoreOver");
|
|
42033
42035
|
|
|
42034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
42035
42037
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
42036
42038
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
42037
42039
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -42044,7 +42046,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
42044
42046
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
42045
42047
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
42046
42048
|
|
|
42047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42049
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
42048
42050
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
42049
42051
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
42050
42052
|
signal?.throwIfAborted();
|
|
@@ -42143,7 +42145,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
42143
42145
|
});
|
|
42144
42146
|
}, "readMeetingContextEvidence");
|
|
42145
42147
|
|
|
42146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
42147
42149
|
var corpora = {
|
|
42148
42150
|
message: {
|
|
42149
42151
|
table: "messages",
|
|
@@ -42382,7 +42384,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
42382
42384
|
}
|
|
42383
42385
|
}), "contextRecordsOver");
|
|
42384
42386
|
|
|
42385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
42386
42388
|
var NOTE_FIELDS = [
|
|
42387
42389
|
"text",
|
|
42388
42390
|
"exact",
|
|
@@ -42812,7 +42814,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
42812
42814
|
};
|
|
42813
42815
|
}, "noteSearchOver");
|
|
42814
42816
|
|
|
42815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42817
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
42816
42818
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
42817
42819
|
var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
42818
42820
|
var EVENT_CORPUS = {
|
|
@@ -42944,7 +42946,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
42944
42946
|
};
|
|
42945
42947
|
}, "eventSearchOver");
|
|
42946
42948
|
|
|
42947
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42949
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
42948
42950
|
var refuse = /* @__PURE__ */ __name((message2, reason, code = "validation_error") => {
|
|
42949
42951
|
throw new CliError(code, message2, { reason });
|
|
42950
42952
|
}, "refuse");
|
|
@@ -43279,7 +43281,7 @@ var financeOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
43279
43281
|
const by = proposedBySql("i.author_type", "i.author_id", filter.proposedBy);
|
|
43280
43282
|
const status = filter.status === void 0 ? null : oneOf4(filter.status, INVOICE_STATUSES, "a status");
|
|
43281
43283
|
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);
|
|
43284
|
+
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
43285
|
}, "invoices"),
|
|
43284
43286
|
issueInvoice: /* @__PURE__ */ __name((reference2, by) => {
|
|
43285
43287
|
ownerOnly(by, "issues an invoice");
|
|
@@ -43405,7 +43407,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43405
43407
|
};
|
|
43406
43408
|
}, "financeStoreOver");
|
|
43407
43409
|
|
|
43408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43410
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
43409
43411
|
var refuse2 = /* @__PURE__ */ __name((message2, reason) => {
|
|
43410
43412
|
throw new CliError("validation_error", message2, { reason });
|
|
43411
43413
|
}, "refuse");
|
|
@@ -43483,7 +43485,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
43483
43485
|
};
|
|
43484
43486
|
}, "paymentEntriesOver");
|
|
43485
43487
|
|
|
43486
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43488
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
43487
43489
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
43488
43490
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
43489
43491
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -43509,7 +43511,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
43509
43511
|
return valid;
|
|
43510
43512
|
}, "validateEvidenceFindings");
|
|
43511
43513
|
|
|
43512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
43513
43515
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
43514
43516
|
try {
|
|
43515
43517
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -43521,7 +43523,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
43521
43523
|
}
|
|
43522
43524
|
}, "calendarMoment");
|
|
43523
43525
|
|
|
43524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
43525
43527
|
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
43528
|
var iso9 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
43527
43529
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -43730,7 +43732,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43730
43732
|
};
|
|
43731
43733
|
}, "factsStoreOver");
|
|
43732
43734
|
|
|
43733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43735
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
43734
43736
|
var invalid4 = /* @__PURE__ */ __name((message2) => {
|
|
43735
43737
|
throw new CliError("validation_error", message2);
|
|
43736
43738
|
}, "invalid");
|
|
@@ -43834,7 +43836,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind4) => {
|
|
|
43834
43836
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes, create };
|
|
43835
43837
|
}, "findingsCoreOver");
|
|
43836
43838
|
|
|
43837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
43838
43840
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
43839
43841
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
43840
43842
|
var iso10 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -43999,7 +44001,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43999
44001
|
};
|
|
44000
44002
|
}, "proposedActionsStoreOver");
|
|
44001
44003
|
|
|
44002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44004
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
44003
44005
|
var stale = /* @__PURE__ */ __name(() => {
|
|
44004
44006
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
44005
44007
|
reason: "evidence-findings.stale"
|
|
@@ -44180,7 +44182,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
44180
44182
|
};
|
|
44181
44183
|
}, "evidenceFindingsStoreOver");
|
|
44182
44184
|
|
|
44183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44185
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
44184
44186
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
44185
44187
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
44186
44188
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -44233,7 +44235,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
44233
44235
|
}, "forPerson")
|
|
44234
44236
|
}), "involvementStoreOver");
|
|
44235
44237
|
|
|
44236
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44238
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
44237
44239
|
import { createHash as createHash12 } from "node:crypto";
|
|
44238
44240
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
44239
44241
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -44319,7 +44321,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
44319
44321
|
};
|
|
44320
44322
|
}, "meetingProjectsStoreOver");
|
|
44321
44323
|
|
|
44322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
44323
44325
|
var ORGANIZATIONS_QUERY = {
|
|
44324
44326
|
entity: "organization",
|
|
44325
44327
|
backend: "sql",
|
|
@@ -44360,7 +44362,7 @@ var REMINDERS_QUERY = {
|
|
|
44360
44362
|
})
|
|
44361
44363
|
};
|
|
44362
44364
|
|
|
44363
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
44364
44366
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
44365
44367
|
id: String(row2.id),
|
|
44366
44368
|
ref: `organization:${row2.id}`,
|
|
@@ -44393,7 +44395,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
44393
44395
|
}), "updateOrganization")
|
|
44394
44396
|
}), "organizationsStoreOver");
|
|
44395
44397
|
|
|
44396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
44397
44399
|
var relationOf = /* @__PURE__ */ __name((link3) => ({
|
|
44398
44400
|
id: link3.id,
|
|
44399
44401
|
from: link3.from,
|
|
@@ -44619,16 +44621,16 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
44619
44621
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
44620
44622
|
}, "decidedOrigin");
|
|
44621
44623
|
|
|
44622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
44623
44625
|
import { createHash as createHash15 } from "node:crypto";
|
|
44624
44626
|
|
|
44625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
44626
44628
|
import { createHash as createHash14 } from "node:crypto";
|
|
44627
44629
|
|
|
44628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
44629
44631
|
import { createHash as createHash13 } from "node:crypto";
|
|
44630
44632
|
|
|
44631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
44632
44634
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
44633
44635
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
44634
44636
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -44679,7 +44681,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
44679
44681
|
return input;
|
|
44680
44682
|
}, "consolidationApplyInput");
|
|
44681
44683
|
|
|
44682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44684
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
44683
44685
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
44684
44686
|
id: String(row2.id),
|
|
44685
44687
|
sourceId: String(row2.source_id),
|
|
@@ -44754,7 +44756,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
44754
44756
|
}, { beforeCommit: check3 });
|
|
44755
44757
|
}, "applyTagConsolidation");
|
|
44756
44758
|
|
|
44757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44759
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
44758
44760
|
var selections = [
|
|
44759
44761
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
44760
44762
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -44898,7 +44900,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
44898
44900
|
};
|
|
44899
44901
|
}, "previewRows");
|
|
44900
44902
|
|
|
44901
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
44902
44904
|
var kinds = ["project", "tag", "topic"];
|
|
44903
44905
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
44904
44906
|
if (signal?.aborted)
|
|
@@ -45162,7 +45164,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45162
45164
|
};
|
|
45163
45165
|
}, "vocabularyStoreOver");
|
|
45164
45166
|
|
|
45165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45167
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
45166
45168
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
45167
45169
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
45168
45170
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -45703,7 +45705,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
45703
45705
|
return key2.padEnd(3, "X");
|
|
45704
45706
|
}, "projectKey");
|
|
45705
45707
|
|
|
45706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
45707
45709
|
var DAY5 = 864e5;
|
|
45708
45710
|
var SETTING4 = "logs_pruned_at";
|
|
45709
45711
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -45730,7 +45732,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
45730
45732
|
};
|
|
45731
45733
|
}, "logPruner");
|
|
45732
45734
|
|
|
45733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45735
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
45734
45736
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
45735
45737
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
45736
45738
|
var invalid6 = /* @__PURE__ */ __name((message2) => {
|
|
@@ -45753,6 +45755,82 @@ var RULES = {
|
|
|
45753
45755
|
anySubject: true,
|
|
45754
45756
|
inboxTasks: true
|
|
45755
45757
|
};
|
|
45758
|
+
var MAIL_FINDING_FIELDS = {
|
|
45759
|
+
task: {
|
|
45760
|
+
needs: ["type", "title", "reason", "commitment"],
|
|
45761
|
+
may: ["project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence", "externalId", "sourceUrl"]
|
|
45762
|
+
},
|
|
45763
|
+
task_update: { needs: ["task", "change", "reason"], may: ["dueAt", "detail"] },
|
|
45764
|
+
fact: { needs: ["type", "statement", "reason"], may: ["subject", "project"] },
|
|
45765
|
+
memory: { needs: ["memoryKind", "scope", "body", "reason"], may: ["subject", "project"] },
|
|
45766
|
+
link: { needs: ["from", "to", "reason"], may: [] },
|
|
45767
|
+
new_contact: { needs: ["address", "name", "reason"], may: [] },
|
|
45768
|
+
invoice: {
|
|
45769
|
+
needs: ["direction", "currency", "lines", "reason"],
|
|
45770
|
+
may: [
|
|
45771
|
+
"counterparty",
|
|
45772
|
+
"counterpartyName",
|
|
45773
|
+
"counterpartyEmail",
|
|
45774
|
+
"total",
|
|
45775
|
+
"number",
|
|
45776
|
+
"issueDate",
|
|
45777
|
+
"dueDate",
|
|
45778
|
+
"project"
|
|
45779
|
+
]
|
|
45780
|
+
},
|
|
45781
|
+
payment: {
|
|
45782
|
+
needs: ["direction", "amount", "currency", "date", "reason"],
|
|
45783
|
+
may: [
|
|
45784
|
+
"payer",
|
|
45785
|
+
"payerName",
|
|
45786
|
+
"payerEmail",
|
|
45787
|
+
"payee",
|
|
45788
|
+
"payeeName",
|
|
45789
|
+
"payeeEmail",
|
|
45790
|
+
"reference",
|
|
45791
|
+
"allocations",
|
|
45792
|
+
"project"
|
|
45793
|
+
]
|
|
45794
|
+
},
|
|
45795
|
+
order: {
|
|
45796
|
+
needs: ["purpose", "supplierName", "reason"],
|
|
45797
|
+
may: [
|
|
45798
|
+
"customer",
|
|
45799
|
+
"customerName",
|
|
45800
|
+
"customerEmail",
|
|
45801
|
+
"supplier",
|
|
45802
|
+
"number",
|
|
45803
|
+
"total",
|
|
45804
|
+
"currency",
|
|
45805
|
+
"status",
|
|
45806
|
+
"orderDate",
|
|
45807
|
+
"fulfilledDate",
|
|
45808
|
+
"invoice",
|
|
45809
|
+
"payment",
|
|
45810
|
+
"project",
|
|
45811
|
+
"sourceUrl"
|
|
45812
|
+
]
|
|
45813
|
+
},
|
|
45814
|
+
order_update: { needs: ["supplierName", "number", "status", "reason"], may: ["date"] }
|
|
45815
|
+
};
|
|
45816
|
+
var MAIL_FINDING_KINDS = Object.keys(MAIL_FINDING_FIELDS);
|
|
45817
|
+
var VALUES = {
|
|
45818
|
+
task: { type: ["bug", "feature", "chore"], commitment: ["explicit", "inferred"] },
|
|
45819
|
+
task_update: { change: ["close", "due", "detail"] },
|
|
45820
|
+
memory: { memoryKind: MEMORY_KINDS, scope: MEMORY_SCOPES },
|
|
45821
|
+
invoice: { direction: INVOICE_DIRECTIONS },
|
|
45822
|
+
payment: { direction: MONEY_DIRECTIONS },
|
|
45823
|
+
order: { purpose: ORDER_PURPOSES, status: ORDER_STATUSES },
|
|
45824
|
+
order_update: { status: ORDER_STATUSES }
|
|
45825
|
+
};
|
|
45826
|
+
var mailFindingFieldsHelp = /* @__PURE__ */ __name(() => MAIL_FINDING_KINDS.map((kind4) => {
|
|
45827
|
+
const { needs, may } = MAIL_FINDING_FIELDS[kind4];
|
|
45828
|
+
const named3 = /* @__PURE__ */ __name((field4) => {
|
|
45829
|
+
const values = VALUES[kind4]?.[field4];
|
|
45830
|
+
return values ? `${snakeCase(field4)} ${values.join("|")}` : snakeCase(field4);
|
|
45831
|
+
}, "named");
|
|
45832
|
+
return ` ${kind4}: ${needs.map(named3).join(", ")}${may.length ? `; optional ${may.map(named3).join(", ")}` : ""}`;
|
|
45833
|
+
}).join("\n"), "mailFindingFieldsHelp");
|
|
45756
45834
|
var typeOf2 = /* @__PURE__ */ __name((reference2) => {
|
|
45757
45835
|
try {
|
|
45758
45836
|
const parsed3 = parseReference(reference2);
|
|
@@ -45781,22 +45859,18 @@ var optional = /* @__PURE__ */ __name((key2, value, read2) => value === void 0 ?
|
|
|
45781
45859
|
var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
45782
45860
|
if (!raw || typeof raw !== "object")
|
|
45783
45861
|
return invalid6("a finding is an object");
|
|
45784
|
-
if (raw.kind
|
|
45785
|
-
return
|
|
45862
|
+
if (!MAIL_FINDING_KINDS.includes(raw.kind))
|
|
45863
|
+
return invalid6(`a mail finding is a ${MAIL_FINDING_KINDS.join(", ")}`);
|
|
45864
|
+
const { needs, may } = MAIL_FINDING_FIELDS[raw.kind];
|
|
45865
|
+
findingFields(raw, ["id", "kind", ...needs, ...may, "evidence"], RULES.singular);
|
|
45866
|
+
findingNeeds(raw, needs, RULES.singular);
|
|
45867
|
+
if (raw.kind === "fact") {
|
|
45868
|
+
const { reason, ...fact } = raw;
|
|
45869
|
+
return { ...validateFinding(fact, RULES, ids), reason: findingText(reason, 2e3) };
|
|
45870
|
+
}
|
|
45786
45871
|
if (raw.kind === "task") {
|
|
45787
45872
|
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
|
-
}
|
|
45873
|
+
const checked = validateFinding(task, RULES, ids);
|
|
45800
45874
|
return {
|
|
45801
45875
|
...checked,
|
|
45802
45876
|
...optional("externalId", externalId, (value) => {
|
|
@@ -45831,7 +45905,6 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
45831
45905
|
}, "party");
|
|
45832
45906
|
switch (raw.kind) {
|
|
45833
45907
|
case "task_update": {
|
|
45834
|
-
findingFields(raw, ["id", "kind", "task", "change", "dueAt", "detail", "reason", "evidence"], RULES.singular);
|
|
45835
45908
|
const task = reference2(raw.task, /^task:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/, "a task update's task");
|
|
45836
45909
|
const change = raw.change;
|
|
45837
45910
|
if (change !== "close" && change !== "due" && change !== "detail")
|
|
@@ -45852,7 +45925,6 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
45852
45925
|
};
|
|
45853
45926
|
}
|
|
45854
45927
|
case "memory": {
|
|
45855
|
-
findingFields(raw, ["id", "kind", "memoryKind", "scope", "body", "subject", "project", "evidence"], RULES.singular);
|
|
45856
45928
|
if (!MEMORY_KINDS.includes(raw.memoryKind))
|
|
45857
45929
|
return invalid6(`a memory's memory_kind is ${MEMORY_KINDS.join(", ")}`);
|
|
45858
45930
|
if (!MEMORY_SCOPES.includes(raw.scope))
|
|
@@ -45867,11 +45939,11 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
45867
45939
|
body: findingText(raw.body, 2e4),
|
|
45868
45940
|
...raw.subject === void 0 ? {} : { subject: reference2(raw.subject, /^(person|organization|project):[1-9]\d*$/, "a memory's subject") },
|
|
45869
45941
|
...raw.project === void 0 ? {} : { project: reference2(raw.project, /^project:[1-9]\d*$/, "a project") },
|
|
45942
|
+
reason: findingText(raw.reason, 2e3),
|
|
45870
45943
|
evidence
|
|
45871
45944
|
};
|
|
45872
45945
|
}
|
|
45873
45946
|
case "link": {
|
|
45874
|
-
findingFields(raw, ["id", "kind", "from", "to", "reason", "evidence"], RULES.singular);
|
|
45875
45947
|
const from2 = findingText(raw.from, 400);
|
|
45876
45948
|
const to = findingText(raw.to, 80);
|
|
45877
45949
|
const wanted = LINKS[typeOf2(from2) ?? ""];
|
|
@@ -45880,7 +45952,6 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
45880
45952
|
return { id: id2, kind: "link", from: from2, to, reason: findingText(raw.reason, 2e3), evidence };
|
|
45881
45953
|
}
|
|
45882
45954
|
case "new_contact": {
|
|
45883
|
-
findingFields(raw, ["id", "kind", "address", "name", "reason", "evidence"], RULES.singular);
|
|
45884
45955
|
const address = findingText(raw.address, 320).toLowerCase();
|
|
45885
45956
|
if (!ADDRESS.test(address))
|
|
45886
45957
|
return invalid6("a new contact's address is an email address");
|
|
@@ -45889,28 +45960,11 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
45889
45960
|
kind: "new_contact",
|
|
45890
45961
|
address,
|
|
45891
45962
|
name: findingText(raw.name, 200),
|
|
45892
|
-
|
|
45963
|
+
reason: findingText(raw.reason, 2e3),
|
|
45893
45964
|
evidence
|
|
45894
45965
|
};
|
|
45895
45966
|
}
|
|
45896
45967
|
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
45968
|
if (!Array.isArray(raw.lines) || raw.lines.length < 1 || raw.lines.length > 50)
|
|
45915
45969
|
return invalid6("an invoice finding has 1\u201350 lines");
|
|
45916
45970
|
const lines = raw.lines.map((line) => {
|
|
@@ -45942,25 +45996,6 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
45942
45996
|
};
|
|
45943
45997
|
}
|
|
45944
45998
|
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
45999
|
let allocations;
|
|
45965
46000
|
if (raw.allocations !== void 0) {
|
|
45966
46001
|
if (!Array.isArray(raw.allocations) || raw.allocations.length < 1 || raw.allocations.length > 8)
|
|
@@ -45993,28 +46028,6 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
45993
46028
|
};
|
|
45994
46029
|
}
|
|
45995
46030
|
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
46031
|
return {
|
|
46019
46032
|
id: id2,
|
|
46020
46033
|
kind: "order",
|
|
@@ -46037,7 +46050,6 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
46037
46050
|
};
|
|
46038
46051
|
}
|
|
46039
46052
|
case "order_update": {
|
|
46040
|
-
findingFields(raw, ["id", "kind", "supplierName", "number", "status", "date", "reason", "evidence"], RULES.singular);
|
|
46041
46053
|
const status = oneOf7(raw.status, ORDER_STATUSES, "an order update's status");
|
|
46042
46054
|
if (raw.date !== void 0 && status !== "delivered")
|
|
46043
46055
|
return invalid6("only a delivered order update gives date");
|
|
@@ -46053,7 +46065,7 @@ var one = /* @__PURE__ */ __name((raw, ids) => {
|
|
|
46053
46065
|
};
|
|
46054
46066
|
}
|
|
46055
46067
|
default:
|
|
46056
|
-
return invalid6(
|
|
46068
|
+
return invalid6(`a mail finding is a ${MAIL_FINDING_KINDS.join(", ")}`);
|
|
46057
46069
|
}
|
|
46058
46070
|
}, "one");
|
|
46059
46071
|
var KEY2 = /^[a-z0-9][a-z0-9-]{0,39}:[1-9]\d*(-r[1-9]\d*)?$/;
|
|
@@ -46096,7 +46108,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
46096
46108
|
}, "checkMailFindings");
|
|
46097
46109
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
46098
46110
|
|
|
46099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
46100
46112
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
46101
46113
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
46102
46114
|
var WEIGHTS = {
|
|
@@ -46229,7 +46241,7 @@ var scoreGroup = /* @__PURE__ */ __name((items, context) => {
|
|
|
46229
46241
|
return { score: kept.reduce((sum, signal) => sum + WEIGHTS[signal], 0), signals: kept };
|
|
46230
46242
|
}, "scoreGroup");
|
|
46231
46243
|
|
|
46232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46244
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
46233
46245
|
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
46246
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
46235
46247
|
const { database, now: now2 } = context;
|
|
@@ -46381,7 +46393,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46381
46393
|
};
|
|
46382
46394
|
}, "ordersStoreOver");
|
|
46383
46395
|
|
|
46384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
46385
46397
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
46386
46398
|
throw new CliError("validation_error", "mail findings cite mail that changed since it was read; stage a new batch", {
|
|
46387
46399
|
reason: "mail-findings.stale"
|
|
@@ -46838,7 +46850,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
46838
46850
|
};
|
|
46839
46851
|
}, "mailFindingsStoreOver");
|
|
46840
46852
|
|
|
46841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46853
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
46842
46854
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
46843
46855
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
46844
46856
|
reason: "meeting-findings.stale"
|
|
@@ -47006,7 +47018,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47006
47018
|
};
|
|
47007
47019
|
}, "meetingFindingsStoreOver");
|
|
47008
47020
|
|
|
47009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
47010
47022
|
var RANK_BATCH = 512;
|
|
47011
47023
|
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
47024
|
var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -47277,7 +47289,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
47277
47289
|
}
|
|
47278
47290
|
}), "meetingVectorsOver");
|
|
47279
47291
|
|
|
47280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
47281
47293
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
47282
47294
|
var TEXTS = {
|
|
47283
47295
|
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 +47390,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47378
47390
|
};
|
|
47379
47391
|
}, "sourceMentionStoreOver");
|
|
47380
47392
|
|
|
47381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
47382
47394
|
import { mkdirSync, statSync, writeFileSync } from "node:fs";
|
|
47383
47395
|
import { dirname } from "node:path";
|
|
47384
47396
|
|
|
47385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47397
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
47386
47398
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
47387
47399
|
var CLIENTS_SETTING = "clients";
|
|
47388
47400
|
var coreVersion = (() => {
|
|
@@ -47440,7 +47452,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
47440
47452
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
47441
47453
|
}, "refusalAdvice");
|
|
47442
47454
|
|
|
47443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47455
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
47444
47456
|
var GENERATED = [
|
|
47445
47457
|
{
|
|
47446
47458
|
"name": "20261010184427_initial",
|
|
@@ -48443,7 +48455,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
48443
48455
|
}
|
|
48444
48456
|
];
|
|
48445
48457
|
|
|
48446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48458
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
48447
48459
|
var MANIFEST = [
|
|
48448
48460
|
{ name: "20261010184427_initial", version: 1, minCompatible: 1 },
|
|
48449
48461
|
{ name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
|
|
@@ -48535,7 +48547,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
48535
48547
|
return migrations;
|
|
48536
48548
|
}, "generatedMigrations");
|
|
48537
48549
|
|
|
48538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
48539
48551
|
var MIGRATIONS = generatedMigrations();
|
|
48540
48552
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
48541
48553
|
version INTEGER PRIMARY KEY,
|
|
@@ -48588,7 +48600,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
48588
48600
|
}
|
|
48589
48601
|
}, "migrate");
|
|
48590
48602
|
|
|
48591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
48592
48604
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
48593
48605
|
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
48606
|
if (pending.get(0, 1) === void 0)
|
|
@@ -48610,7 +48622,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
48610
48622
|
}
|
|
48611
48623
|
}, "fillJoinKeys");
|
|
48612
48624
|
|
|
48613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
48614
48626
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
48615
48627
|
refuseOwnerStoreInTests(path);
|
|
48616
48628
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -48624,8 +48636,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
48624
48636
|
}, "openSqlite");
|
|
48625
48637
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
48626
48638
|
quietSqliteWarning();
|
|
48627
|
-
const { drizzle } = await import("./node-
|
|
48628
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
48639
|
+
const { drizzle } = await import("./node-NBXEN7JU.js");
|
|
48640
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-WAGIYOYR.js");
|
|
48629
48641
|
const client = await nodeClient(path, { readOnly });
|
|
48630
48642
|
try {
|
|
48631
48643
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -48635,8 +48647,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
48635
48647
|
}
|
|
48636
48648
|
}, "openUnderNode");
|
|
48637
48649
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
48638
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
48639
|
-
const { drizzle } = await import("./bun-
|
|
48650
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-3V6EB3XP.js");
|
|
48651
|
+
const { drizzle } = await import("./bun-GFMA4TKJ.js");
|
|
48640
48652
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
48641
48653
|
try {
|
|
48642
48654
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -48646,7 +48658,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
48646
48658
|
}
|
|
48647
48659
|
}, "openUnderBun");
|
|
48648
48660
|
|
|
48649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
48650
48662
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
48651
48663
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
48652
48664
|
try {
|
|
@@ -48714,7 +48726,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
48714
48726
|
});
|
|
48715
48727
|
}, "movePaymentFacts");
|
|
48716
48728
|
|
|
48717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
48718
48730
|
var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
48719
48731
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
48720
48732
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -48729,7 +48741,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
48729
48741
|
throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
|
|
48730
48742
|
}, "assertReadCompatible");
|
|
48731
48743
|
|
|
48732
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48744
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
48733
48745
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
48734
48746
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
48735
48747
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -48775,7 +48787,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
48775
48787
|
});
|
|
48776
48788
|
}, "moveSuggestedLinks");
|
|
48777
48789
|
|
|
48778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48790
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
48779
48791
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
48780
48792
|
var TEST_PROVIDER = "chat";
|
|
48781
48793
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -48796,7 +48808,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
48796
48808
|
}
|
|
48797
48809
|
}, "purgeTestAccounts");
|
|
48798
48810
|
|
|
48799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48811
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
48800
48812
|
var BACKFILL_ON_OPEN = 5e3;
|
|
48801
48813
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
48802
48814
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -48861,10 +48873,10 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
|
|
|
48861
48873
|
}
|
|
48862
48874
|
}, "openStoreContext");
|
|
48863
48875
|
|
|
48864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48876
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
48865
48877
|
import { createHash as createHash16 } from "node:crypto";
|
|
48866
48878
|
|
|
48867
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
48868
48880
|
var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
48869
48881
|
var ref = text4(2048);
|
|
48870
48882
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -48930,7 +48942,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
48930
48942
|
}))
|
|
48931
48943
|
});
|
|
48932
48944
|
|
|
48933
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48945
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
48934
48946
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
48935
48947
|
var invalid9 = /* @__PURE__ */ __name((field4) => {
|
|
48936
48948
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -49034,7 +49046,7 @@ var validateProjectAnnotationsGraph = /* @__PURE__ */ __name((manifest, addition
|
|
|
49034
49046
|
invalid9("external.unused");
|
|
49035
49047
|
}, "validateProjectAnnotationsGraph");
|
|
49036
49048
|
|
|
49037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49049
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
49038
49050
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
49039
49051
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
49040
49052
|
var targetSchema = strictObject({
|
|
@@ -49140,7 +49152,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
49140
49152
|
};
|
|
49141
49153
|
}, "planBoundProjectAnnotations");
|
|
49142
49154
|
|
|
49143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
49144
49156
|
import { createHash as createHash17 } from "node:crypto";
|
|
49145
49157
|
var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
49146
49158
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -49234,7 +49246,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
49234
49246
|
})).digest("hex");
|
|
49235
49247
|
}, "projectAnnotationSnapshotFingerprint");
|
|
49236
49248
|
|
|
49237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
49238
49250
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
49239
49251
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
49240
49252
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -49251,7 +49263,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
49251
49263
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
49252
49264
|
}, "projectAnnotationRequest");
|
|
49253
49265
|
|
|
49254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
49255
49267
|
var SnapshotBudget = class {
|
|
49256
49268
|
static {
|
|
49257
49269
|
__name(this, "SnapshotBudget");
|
|
@@ -49277,13 +49289,13 @@ var SnapshotBudget = class {
|
|
|
49277
49289
|
}
|
|
49278
49290
|
};
|
|
49279
49291
|
|
|
49280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
49281
49293
|
import { createHash as createHash19 } from "node:crypto";
|
|
49282
49294
|
|
|
49283
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
49284
49296
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
49285
49297
|
|
|
49286
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
49287
49299
|
import { createHash as createHash18 } from "node:crypto";
|
|
49288
49300
|
var invalid11 = /* @__PURE__ */ __name(() => {
|
|
49289
49301
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -49426,7 +49438,7 @@ var ProjectSnapshotSources = class {
|
|
|
49426
49438
|
}
|
|
49427
49439
|
};
|
|
49428
49440
|
|
|
49429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49441
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
49430
49442
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
49431
49443
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
49432
49444
|
}, "unsupported");
|
|
@@ -49597,7 +49609,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
49597
49609
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
49598
49610
|
}), "projectAnnotationSnapshot");
|
|
49599
49611
|
|
|
49600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
49601
49613
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
49602
49614
|
const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
49603
49615
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -49659,7 +49671,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
49659
49671
|
};
|
|
49660
49672
|
}), "previewAnnotationSnapshot");
|
|
49661
49673
|
|
|
49662
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49674
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
49663
49675
|
var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
|
|
49664
49676
|
const mappings = { ...bindings };
|
|
49665
49677
|
const resolve = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -49701,7 +49713,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
49701
49713
|
return mappings;
|
|
49702
49714
|
}, "restoreAnnotationRecords");
|
|
49703
49715
|
|
|
49704
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
49705
49717
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
49706
49718
|
async preview(request) {
|
|
49707
49719
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -49731,7 +49743,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
49731
49743
|
}
|
|
49732
49744
|
}), "projectAnnotationStoreOver");
|
|
49733
49745
|
|
|
49734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49746
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
49735
49747
|
import { createHash as createHash20 } from "node:crypto";
|
|
49736
49748
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
49737
49749
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -49963,7 +49975,7 @@ var envelopeOfJsonl = /* @__PURE__ */ __name((text6) => {
|
|
|
49963
49975
|
return isObject2(header) ? { ...header, records: records2 } : header;
|
|
49964
49976
|
}, "envelopeOfJsonl");
|
|
49965
49977
|
|
|
49966
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
49967
49979
|
var PROJECTED = {
|
|
49968
49980
|
invoice: { roles: ["issuer", "counterparty", "project"], many: [] },
|
|
49969
49981
|
payment: { roles: ["payer", "payee", "project", "settles"], many: ["settles"] }
|
|
@@ -50376,7 +50388,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50376
50388
|
};
|
|
50377
50389
|
}, "recordStoreOver");
|
|
50378
50390
|
|
|
50379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
50380
50392
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
50381
50393
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
50382
50394
|
let merged = { from: from2, to };
|
|
@@ -50389,7 +50401,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
50389
50401
|
}, "markRange");
|
|
50390
50402
|
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
50403
|
|
|
50392
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50404
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
50393
50405
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
50394
50406
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
50395
50407
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -50410,7 +50422,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
50410
50422
|
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
50423
|
}, "setTaskAnalysisMark");
|
|
50412
50424
|
|
|
50413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
50414
50426
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
50415
50427
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
50416
50428
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
|
|
@@ -50420,7 +50432,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
50420
50432
|
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
50433
|
}, "setTaskRulesStop");
|
|
50422
50434
|
|
|
50423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
50424
50436
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
50425
50437
|
const { database } = context;
|
|
50426
50438
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -50479,7 +50491,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50479
50491
|
};
|
|
50480
50492
|
}, "syncStoreOver");
|
|
50481
50493
|
|
|
50482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50494
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
50483
50495
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
50484
50496
|
const { database } = context;
|
|
50485
50497
|
return {
|
|
@@ -50501,7 +50513,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50501
50513
|
};
|
|
50502
50514
|
}, "tagsStoreOver");
|
|
50503
50515
|
|
|
50504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
50505
50517
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
50506
50518
|
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
50519
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -50628,7 +50640,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
50628
50640
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
50629
50641
|
}, "savePictureChunks");
|
|
50630
50642
|
|
|
50631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
50632
50644
|
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
50645
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
50634
50646
|
FROM messages m
|
|
@@ -50717,7 +50729,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
50717
50729
|
return plain2(best(found2));
|
|
50718
50730
|
}, "nearestMessages");
|
|
50719
50731
|
|
|
50720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
50721
50733
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
50722
50734
|
const { database } = context;
|
|
50723
50735
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -50975,7 +50987,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
50975
50987
|
embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
|
|
50976
50988
|
}), "vectorsStoreOver");
|
|
50977
50989
|
|
|
50978
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
50979
50991
|
import { existsSync, readFileSync as readFileSync4 } from "node:fs";
|
|
50980
50992
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
50981
50993
|
var BOOKKEEPING = ["schema_migrations", "store_settings"];
|
|
@@ -51063,10 +51075,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
51063
51075
|
}
|
|
51064
51076
|
}, "lastBackup");
|
|
51065
51077
|
|
|
51066
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
51067
51079
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
51068
51080
|
|
|
51069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51081
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
51070
51082
|
var COUNTED_TABLES = [
|
|
51071
51083
|
"accounts",
|
|
51072
51084
|
"chats",
|
|
@@ -51151,7 +51163,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
51151
51163
|
};
|
|
51152
51164
|
}, "storeContents");
|
|
51153
51165
|
|
|
51154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
51155
51167
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
51156
51168
|
const context = await openStoreContext(options);
|
|
51157
51169
|
try {
|
|
@@ -51503,6 +51515,7 @@ export {
|
|
|
51503
51515
|
ORGANIZATION_KINDS,
|
|
51504
51516
|
PROJECT_TYPES,
|
|
51505
51517
|
SCOPES,
|
|
51518
|
+
mailFindingFieldsHelp,
|
|
51506
51519
|
validateMailFindings,
|
|
51507
51520
|
registrableOf,
|
|
51508
51521
|
scoreGroup,
|