@wirecat/drive-cli 0.67.0 → 0.68.0
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/drive.js +2 -2
- package/dist/bundle/{all-profiles-DVZUVAPQ.js → all-profiles-BU6XUFUP.js} +7 -7
- package/dist/bundle/{anthropic-Y45C45O2.js → anthropic-ZP5B7S2Z.js} +2 -2
- package/dist/bundle/{app-server-GTXUOUGD.js → app-server-EB4DH6T7.js} +49 -45
- package/dist/bundle/{bun-QVJV76QJ.js → bun-PWMM6L45.js} +2 -2
- package/dist/bundle/{bun-sqlite-CC7PIAMH.js → bun-sqlite-6VPR2SVC.js} +3 -3
- package/dist/bundle/{chunk-JO7BJYAP.js → chunk-2UHQVRH2.js} +15 -15
- package/dist/bundle/{chunk-NFIR346J.js → chunk-2VYEGKQ3.js} +1 -1
- package/dist/bundle/{chunk-MEY7URZZ.js → chunk-43NEDPXB.js} +4 -4
- package/dist/bundle/{chunk-YVUAG7RF.js → chunk-5G2BY4B6.js} +15 -15
- package/dist/bundle/{chunk-T2VAEDJS.js → chunk-5W65QTYS.js} +3 -3
- package/dist/bundle/{chunk-LSAIXPAX.js → chunk-6HFZZ2PW.js} +1 -1
- package/dist/bundle/{chunk-AJ3DFPRT.js → chunk-6QR7NKMG.js} +1 -1
- package/dist/bundle/{chunk-NWYVOHIX.js → chunk-6WAC2LOS.js} +459 -419
- package/dist/bundle/{chunk-HJF2QGOX.js → chunk-74NCZKRW.js} +29 -16
- package/dist/bundle/{chunk-4VH7M2OD.js → chunk-7A77GYCE.js} +2 -2
- package/dist/bundle/{chunk-2PIA45FC.js → chunk-7BXVI7XF.js} +1 -1
- package/dist/bundle/{chunk-ETAFFY3J.js → chunk-7TNQZKRD.js} +52 -52
- package/dist/bundle/{chunk-E3XA56TS.js → chunk-AIEMFRBU.js} +1 -1
- package/dist/bundle/{chunk-EXWOOST5.js → chunk-AXYG2DDY.js} +111 -83
- package/dist/bundle/{chunk-LXRBTXCZ.js → chunk-BXHFJTU5.js} +2 -2
- package/dist/bundle/{chunk-OOBSSU2G.js → chunk-CK2SQ2CE.js} +14 -13
- package/dist/bundle/{chunk-MF46W7PQ.js → chunk-CMWFYZ45.js} +1 -1
- package/dist/bundle/{chunk-4G7WQNG7.js → chunk-CRIEW4FP.js} +1 -1
- package/dist/bundle/{chunk-RC72RU66.js → chunk-CVAJMRRD.js} +5 -5
- package/dist/bundle/{chunk-YI4DXASF.js → chunk-DIZBJLPM.js} +36 -32
- package/dist/bundle/{chunk-FS2PG2PE.js → chunk-DU23ET2O.js} +18 -18
- package/dist/bundle/{chunk-JY2GZDJL.js → chunk-DYLYH7VE.js} +3 -3
- package/dist/bundle/{chunk-C72WYRXD.js → chunk-EEE4H2PA.js} +10 -10
- package/dist/bundle/{chunk-2MEVCMBW.js → chunk-EOC7RHJ2.js} +3 -3
- package/dist/bundle/{chunk-ZH4H5XTA.js → chunk-EXWZCI5G.js} +1 -1
- package/dist/bundle/{chunk-VZ5KETIX.js → chunk-F7KAMSXA.js} +2 -2
- package/dist/bundle/{chunk-SJE7UGOW.js → chunk-FAMXUI2X.js} +4 -4
- package/dist/bundle/{chunk-IRULPE5M.js → chunk-GTLXBAJV.js} +297 -281
- package/dist/bundle/{chunk-UFNE57VY.js → chunk-IVOG6T6P.js} +2 -2
- package/dist/bundle/{chunk-MBLB4TQI.js → chunk-J5LXL435.js} +18 -18
- package/dist/bundle/{chunk-XZCF5XU7.js → chunk-JMZQBRRZ.js} +5 -5
- package/dist/bundle/{chunk-PDHN4GHU.js → chunk-JZ3MT7IE.js} +1 -1
- package/dist/bundle/{chunk-P6A77LMP.js → chunk-KPKIHJIT.js} +5 -7
- package/dist/bundle/{chunk-2Y3YBDZX.js → chunk-MLSXHTUB.js} +137 -135
- package/dist/bundle/{chunk-ZEPDEFVT.js → chunk-MOKEB656.js} +1 -1
- package/dist/bundle/{chunk-BHSLMJF7.js → chunk-MWCPKUU4.js} +4 -4
- package/dist/bundle/{chunk-ULH3TNUP.js → chunk-NV75QPML.js} +4 -4
- package/dist/bundle/{chunk-CWDC6QJM.js → chunk-O7T3WGCV.js} +4 -4
- package/dist/bundle/{chunk-JJHDV32D.js → chunk-PGPHEC2X.js} +1 -1
- package/dist/bundle/{chunk-AAZPDWRD.js → chunk-PJ3FKBXG.js} +1 -1
- package/dist/bundle/{chunk-MEQNAZ6R.js → chunk-PWIEOATY.js} +5 -5
- package/dist/bundle/{chunk-6ERQE4FS.js → chunk-Q6BD6RUH.js} +40 -40
- package/dist/bundle/{chunk-3RG6LL25.js → chunk-QKY24RWV.js} +10 -10
- package/dist/bundle/{chunk-ABJQ6IDU.js → chunk-QRSPFCRY.js} +16 -16
- package/dist/bundle/{chunk-U2ERT45N.js → chunk-QTRYJZL7.js} +4 -4
- package/dist/bundle/{chunk-SXJDCRXE.js → chunk-QVJMFZFW.js} +1 -1
- package/dist/bundle/{chunk-WBKYZZQT.js → chunk-QWGEOQHA.js} +1 -1
- package/dist/bundle/{chunk-AZKFZ7J7.js → chunk-R5FTCNLJ.js} +1 -1
- package/dist/bundle/{chunk-DAFKV6DJ.js → chunk-RT5NT62B.js} +12 -12
- package/dist/bundle/{chunk-UOAHZV3K.js → chunk-SOS4U2RF.js} +18 -18
- package/dist/bundle/{chunk-ZU5VQYNY.js → chunk-TI2OANJZ.js} +1 -1
- package/dist/bundle/{chunk-5DMPGTNR.js → chunk-U52QE4QV.js} +2 -2
- package/dist/bundle/{chunk-JLUQZZ26.js → chunk-UFPRP7MG.js} +7 -7
- package/dist/bundle/{chunk-WWW7YTFG.js → chunk-UIKVP23D.js} +1 -1
- package/dist/bundle/{chunk-WKIQKGOF.js → chunk-ULNN3LCY.js} +26 -24
- package/dist/bundle/{chunk-5TSILGTO.js → chunk-UUQJVKPB.js} +323 -323
- package/dist/bundle/{chunk-7AZCAUST.js → chunk-UYBLNGZ2.js} +1 -1
- package/dist/bundle/{chunk-V7E25BUU.js → chunk-WCNTDETD.js} +2 -2
- package/dist/bundle/{chunk-ZK46UHDP.js → chunk-WGX4DZPW.js} +2 -2
- package/dist/bundle/{chunk-7J2IP3WL.js → chunk-WUFZGPXX.js} +6 -6
- package/dist/bundle/{chunk-Y5WSRG3F.js → chunk-YUGTJBV3.js} +2 -2
- package/dist/bundle/{chunk-JCNEPYQZ.js → chunk-YYIWPH53.js} +12 -12
- package/dist/bundle/{chunk-RLH6BOEG.js → chunk-Z5BMYI2V.js} +5 -5
- package/dist/bundle/{chunk-FOMQ4MG3.js → chunk-ZAIE3G5I.js} +2 -2
- package/dist/bundle/{chunk-QOKPRFHM.js → chunk-ZSVMZH5O.js} +2 -2
- package/dist/bundle/{chunk-JEMBW6IO.js → chunk-ZVQDOKDY.js} +1 -1
- package/dist/bundle/{cli-U4LSBYDV.js → cli-L7P36YUH.js} +50 -50
- package/dist/bundle/{command-contract-UU5T24ZZ.js → command-contract-EYFGMKIG.js} +16 -16
- package/dist/bundle/{command-server-entry-PK6FBUPO.js → command-server-entry-H3VGPOLJ.js} +23 -23
- package/dist/bundle/{decode-3ZE6NBKV.js → decode-JEU6JWCV.js} +2 -2
- package/dist/bundle/drive.js +3 -3
- package/dist/bundle/{echarts-6FWNCNXK.js → echarts-SDZA2SWG.js} +2 -2
- package/dist/bundle/{embed-DGYBBZUW.js → embed-WUKOASQG.js} +3 -3
- package/dist/bundle/{embedder-O7A6VMWI.js → embedder-UBRAXRDZ.js} +6 -6
- package/dist/bundle/{entry-CDJ2QSU2.js → entry-C4NUQFTF.js} +6 -6
- package/dist/bundle/{first-run-UOQW7DN5.js → first-run-PKHBS7B4.js} +5 -5
- package/dist/bundle/{first-screen-SNDV4YKF.js → first-screen-QOVOM4BF.js} +17 -17
- package/dist/bundle/{google-HPX52KMC.js → google-XXHSMTVK.js} +14 -14
- package/dist/bundle/{google-api-HIMN4XL5.js → google-api-SQQ4BSNR.js} +51 -51
- package/dist/bundle/{grants-RO42I6E4.js → grants-2U4JVT6O.js} +56 -56
- package/dist/bundle/{identity-NFGHDPLL.js → identity-SRL6RSU2.js} +1 -1
- package/dist/bundle/{instructions-6JAQYCM6.js → instructions-7T6JJIFS.js} +1 -1
- package/dist/bundle/{login-RZOQN63N.js → login-N243GGEE.js} +56 -56
- package/dist/bundle/{node-KSIX3GIH.js → node-BZDMUFTW.js} +2 -2
- package/dist/bundle/{node-sqlite-4FJ6WJXN.js → node-sqlite-SZQCCMV2.js} +4 -4
- package/dist/bundle/{oauth-BKZAMFKK.js → oauth-CMAFXX6A.js} +4 -4
- package/dist/bundle/{open-4AQJGH42.js → open-RVTPKDA3.js} +2 -2
- package/dist/bundle/{openai-24F2OX55.js → openai-6NN63BMH.js} +13 -13
- package/dist/bundle/{process-7NOA2T7H.js → process-756VBE7E.js} +1 -1
- package/dist/bundle/{program-7JHMLDEX.js → program-B4QBJYB5.js} +78 -75
- package/dist/bundle/{prompt-NM66MAZ4.js → prompt-HGP2DSRW.js} +2 -2
- package/dist/bundle/{recognize-DBKV2JYZ.js → recognize-26SHB7HI.js} +1 -1
- package/dist/bundle/{remote-ABWUTBVB.js → remote-Z4PWHZ5N.js} +7 -7
- package/dist/bundle/{rerank-FQAU4ENY.js → rerank-QHJZJK3Q.js} +4 -4
- package/dist/bundle/{serve-QLJG4QZD.js → serve-MYJW5IEM.js} +6 -6
- package/dist/bundle/server-HBZPIHDX.js +74 -0
- package/dist/bundle/{server-VGZNK5XD.js → server-XFW3V7CR.js} +38 -36
- package/dist/bundle/{services-5KARVUHK.js → services-IQG2RVTO.js} +25 -25
- package/dist/bundle/{sqlite-runtime-ILF6EFQJ.js → sqlite-runtime-X4GB5PBV.js} +3 -3
- package/dist/bundle/{state-R2M56GPU.js → state-ATQK2X3W.js} +3 -3
- package/dist/bundle/{store-2OBVMUQL.js → store-MEHEUOJH.js} +11 -11
- package/dist/bundle/{store-DA4K7HWW.js → store-QUBUPK6F.js} +13 -13
- package/dist/bundle/store-maintenance-command-33ULVDWY.js +65 -0
- package/dist/bundle/tokens-A2GP4F34.js +111 -0
- package/dist/policy.d.ts +2 -0
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +3 -2
- package/dist/policy.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +3 -2
- package/dist/program.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/server-NUBLY5SV.js +0 -74
- package/dist/bundle/store-maintenance-command-KSIPI5B5.js +0 -65
- package/dist/bundle/tokens-VQDGSHRB.js +0 -111
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
googleDocumentId,
|
|
6
6
|
googleDocumentLinks,
|
|
7
7
|
trimUrl
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BXHFJTU5.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_STEMMERS,
|
|
11
11
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -18,11 +18,11 @@ import {
|
|
|
18
18
|
fold,
|
|
19
19
|
normalize,
|
|
20
20
|
parseStemmers
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-UFPRP7MG.js";
|
|
22
22
|
import {
|
|
23
23
|
quietSqliteWarning,
|
|
24
24
|
storeCapable
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-CVAJMRRD.js";
|
|
26
26
|
import {
|
|
27
27
|
ACCOUNT_GROUPS,
|
|
28
28
|
ADDED_ACCOUNT,
|
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
KEYED,
|
|
48
48
|
LINK_KINDS,
|
|
49
49
|
LINK_ORIGINS,
|
|
50
|
+
MEETING_DOCUMENT_ROLES,
|
|
50
51
|
MEETING_FIELD_NAMES,
|
|
51
52
|
MEETING_FINDINGS_KIND,
|
|
52
53
|
MEMORY_KINDS,
|
|
@@ -190,7 +191,7 @@ import {
|
|
|
190
191
|
validateMeetingSeriesHistory,
|
|
191
192
|
validatePayment,
|
|
192
193
|
walletLine
|
|
193
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-AXYG2DDY.js";
|
|
194
195
|
import {
|
|
195
196
|
OPERATORS_BY_TYPE,
|
|
196
197
|
QUERY_LIMITS,
|
|
@@ -210,16 +211,16 @@ import {
|
|
|
210
211
|
import {
|
|
211
212
|
holdsCredential,
|
|
212
213
|
secretNamed
|
|
213
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-QWGEOQHA.js";
|
|
214
215
|
import {
|
|
215
216
|
sqliteCode
|
|
216
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-UYBLNGZ2.js";
|
|
217
218
|
import {
|
|
218
219
|
DEFAULT_TASK_CATEGORIES,
|
|
219
220
|
sharedConfigPath,
|
|
220
221
|
storedTaskCategories,
|
|
221
222
|
taskCategoriesReader
|
|
222
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-PWIEOATY.js";
|
|
223
224
|
import {
|
|
224
225
|
SQLiteTable,
|
|
225
226
|
TableAliasProxyHandler,
|
|
@@ -244,17 +245,17 @@ import {
|
|
|
244
245
|
sql,
|
|
245
246
|
sqliteTable,
|
|
246
247
|
text
|
|
247
|
-
} from "./chunk-
|
|
248
|
+
} from "./chunk-QVJMFZFW.js";
|
|
248
249
|
import {
|
|
249
250
|
PRAGMAS,
|
|
250
251
|
TIME_LIMIT_FUNCTION,
|
|
251
252
|
TimeLimitReached,
|
|
252
253
|
isQueryOnly
|
|
253
|
-
} from "./chunk-
|
|
254
|
+
} from "./chunk-ZVQDOKDY.js";
|
|
254
255
|
import {
|
|
255
256
|
refuseOwnerStoreInTests,
|
|
256
257
|
storePath
|
|
257
|
-
} from "./chunk-
|
|
258
|
+
} from "./chunk-CRIEW4FP.js";
|
|
258
259
|
import {
|
|
259
260
|
resolveFrom
|
|
260
261
|
} from "./chunk-Y5E2WNWB.js";
|
|
@@ -10026,7 +10027,7 @@ var require_cjs = __commonJS({
|
|
|
10026
10027
|
}
|
|
10027
10028
|
});
|
|
10028
10029
|
|
|
10029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10030
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
10030
10031
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
10031
10032
|
const methods = whole;
|
|
10032
10033
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10154,7 +10155,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10154
10155
|
};
|
|
10155
10156
|
}, "bindAccount");
|
|
10156
10157
|
|
|
10157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10158
10159
|
var IndexBuilderOn = class {
|
|
10159
10160
|
static {
|
|
10160
10161
|
__name(this, "IndexBuilderOn");
|
|
@@ -10349,7 +10350,7 @@ function alias(table, alias2) {
|
|
|
10349
10350
|
}
|
|
10350
10351
|
__name(alias, "alias");
|
|
10351
10352
|
|
|
10352
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/record-fields.js
|
|
10353
10354
|
var DECIMAL_PATTERN = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
10354
10355
|
var SIGNED_DECIMAL = "^-?[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
10355
10356
|
var DAY = "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
|
|
@@ -10468,7 +10469,7 @@ var fieldError = /* @__PURE__ */ __name((schema, value, at2 = []) => {
|
|
|
10468
10469
|
return void 0;
|
|
10469
10470
|
}, "fieldError");
|
|
10470
10471
|
|
|
10471
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/record-types.js
|
|
10472
10473
|
var kept = /* @__PURE__ */ __name((description) => ({ description }), "kept");
|
|
10473
10474
|
var PARTY = ["person", "organization"];
|
|
10474
10475
|
var ORGANIZATION = ["organization"];
|
|
@@ -10863,7 +10864,7 @@ var hasV1Roles = /* @__PURE__ */ __name((type) => rolesOf2(type).some(([, role])
|
|
|
10863
10864
|
var IDENTITY_TYPES = RECORD_ENTITY_TYPES.filter((type) => RECORD_TYPES[type].review === "identity");
|
|
10864
10865
|
var article = /* @__PURE__ */ __name((word2) => /^[aeiou]/.test(word2) ? "an" : "a", "article");
|
|
10865
10866
|
|
|
10866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10867
10868
|
var ENTITY_TABLES = {
|
|
10868
10869
|
...RECORD_TABLES,
|
|
10869
10870
|
account: "accounts",
|
|
@@ -10902,7 +10903,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10902
10903
|
return { table, pointer, type, count: count2, known: known2 };
|
|
10903
10904
|
}).filter(({ count: count2 }) => count2 > 0)), "orphanPointers");
|
|
10904
10905
|
|
|
10905
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10906
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
10906
10907
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
10907
10908
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
10908
10909
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -10959,7 +10960,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
10959
10960
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
10960
10961
|
}, "proposedBySql");
|
|
10961
10962
|
|
|
10962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
|
|
10963
10964
|
var TABLES = { memory: "memories", fact: "facts" };
|
|
10964
10965
|
var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
|
|
10965
10966
|
var KEPT = 20;
|
|
@@ -11054,7 +11055,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
|
|
|
11054
11055
|
return scrubbed;
|
|
11055
11056
|
}, "scrubSourceReviews");
|
|
11056
11057
|
|
|
11057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
11058
11059
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
11059
11060
|
var REFERABLE = {
|
|
11060
11061
|
...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
|
|
@@ -11214,7 +11215,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
11214
11215
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
11215
11216
|
}, "taskIdOf");
|
|
11216
11217
|
|
|
11217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
|
|
11218
11219
|
var QUOTE_LIMIT = 500;
|
|
11219
11220
|
var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
|
|
11220
11221
|
var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
|
|
@@ -11493,11 +11494,11 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at2) => {
|
|
|
11493
11494
|
database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
|
|
11494
11495
|
}, "deleteDocumentRow");
|
|
11495
11496
|
|
|
11496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11497
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/identity-links.js
|
|
11497
11498
|
var IDENTITY_LINK_KIND = "identity_link";
|
|
11498
11499
|
var IDENTITY_LINK_SIGNALS = ["agent", "phone", "email", "guest-email", "name", "account"];
|
|
11499
11500
|
|
|
11500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/merged-persons.js
|
|
11501
11502
|
var SEPARATIONS = ["unlink", "split", "undo-merge"];
|
|
11502
11503
|
var mergeSql = /* @__PURE__ */ __name((event2) => `(${event2}.from_person_id IS NOT NULL AND ${event2}.from_person_id <> ${event2}.to_person_id AND ${event2}.method NOT IN (${SEPARATIONS.map((method) => `'${method}'`).join(", ")}) AND NOT EXISTS (SELECT 1 FROM identity_link_events stay WHERE stay.to_person_id = ${event2}.from_person_id AND stay.identity_id <> ${event2}.identity_id AND stay.id < ${event2}.id AND stay.id = (SELECT max(s.id) FROM identity_link_events s WHERE s.identity_id = stay.identity_id AND s.id < ${event2}.id) AND NOT EXISTS (SELECT 1 FROM identity_link_events went WHERE went.identity_id = stay.identity_id AND went.from_person_id = ${event2}.from_person_id AND went.to_person_id = ${event2}.to_person_id AND went.id = (SELECT min(w.id) FROM identity_link_events w WHERE w.identity_id = stay.identity_id AND w.id > ${event2}.id))))`, "mergeSql");
|
|
11503
11504
|
var mergedAwaySql = /* @__PURE__ */ __name((person2) => `(${person2}.owner = 0 AND NOT EXISTS (SELECT 1 FROM identity_links ml WHERE ml.person_id = ${person2}.id) AND EXISTS (SELECT 1 FROM identity_link_events me WHERE me.from_person_id = ${person2}.id AND ${mergeSql("me")}))`, "mergedAwaySql");
|
|
@@ -11529,7 +11530,7 @@ var samePersons = /* @__PURE__ */ __name((database, pk) => {
|
|
|
11529
11530
|
}, "samePersons");
|
|
11530
11531
|
var idsOf = /* @__PURE__ */ __name((database, type, id2) => JSON.stringify(type === "person" ? samePersons(database, id2) : [id2]), "idsOf");
|
|
11531
11532
|
|
|
11532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-link-rows.js
|
|
11533
11534
|
var pairOf = /* @__PURE__ */ __name((a, b) => [Number(a), Number(b)].sort((x, y) => x - y).join("-"), "pairOf");
|
|
11534
11535
|
var pkOf = /* @__PURE__ */ __name((database, ref3) => {
|
|
11535
11536
|
const at2 = ref3.indexOf(":");
|
|
@@ -11636,13 +11637,13 @@ var forgetErasedLinks = /* @__PURE__ */ __name((database) => {
|
|
|
11636
11637
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
11637
11638
|
}, "forgetErasedLinks");
|
|
11638
11639
|
|
|
11639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11640
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/identity-splits.js
|
|
11640
11641
|
var IDENTITY_SPLIT_KIND = "identity_split";
|
|
11641
11642
|
|
|
11642
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
11643
11644
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
11644
11645
|
|
|
11645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
11646
11647
|
var TASK_CLOSE_KIND = "task_close";
|
|
11647
11648
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
11648
11649
|
var isOwnerOnlyKind = /* @__PURE__ */ __name((kind3) => kind3 === MAIL_FINDINGS_KIND || kind3 === MEETING_FINDINGS_KIND || kind3 === TASK_CLOSE_KIND || kind3 === SOURCE_REVIEW_KIND || kind3 === IDENTITY_LINK_KIND || kind3 === IDENTITY_SPLIT_KIND, "isOwnerOnlyKind");
|
|
@@ -11690,7 +11691,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
11690
11691
|
}, "assertMayDecide");
|
|
11691
11692
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
11692
11693
|
|
|
11693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/addresses.js
|
|
11694
11695
|
var EMAIL_ADDRESS = /^[^\s@]+@[^\s@]+\.[^\s@]+$/u;
|
|
11695
11696
|
var isEmailAddress = /* @__PURE__ */ __name((value) => EMAIL_ADDRESS.test(value), "isEmailAddress");
|
|
11696
11697
|
var ROLE_ADDRESS_WORDS = {
|
|
@@ -11752,7 +11753,7 @@ var PERSON_LIKE = /* @__PURE__ */ new Set(["hr"]);
|
|
|
11752
11753
|
var isPersonLikeRoleAddress = /* @__PURE__ */ __name((address) => PERSON_LIKE.has(localWord(address)), "isPersonLikeRoleAddress");
|
|
11753
11754
|
var isNoReplyAddress = /* @__PURE__ */ __name((address) => NO_REPLY.has(localWord(address)), "isNoReplyAddress");
|
|
11754
11755
|
|
|
11755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
11756
11757
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
11757
11758
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
11758
11759
|
var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
@@ -11782,7 +11783,7 @@ var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
|
11782
11783
|
]);
|
|
11783
11784
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
11784
11785
|
|
|
11785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/address-organization.js
|
|
11786
11787
|
var BY_ADDRESS = "SELECT DISTINCT o.id FROM organizations o JOIN organization_identities oi ON oi.organization_id = o.id JOIN identities i ON i.id = oi.identity_id WHERE o.deleted_at IS NULL AND i.provider = 'email' AND ";
|
|
11787
11788
|
var idsOf2 = /* @__PURE__ */ __name((rows) => rows.map((row2) => Number(row2.id)), "idsOf");
|
|
11788
11789
|
var holdAddress = /* @__PURE__ */ __name(({ database, now: now2 }, organization2, email, { method, author }) => {
|
|
@@ -11807,7 +11808,7 @@ var organizationOfAddress = /* @__PURE__ */ __name((context, { name, email, meth
|
|
|
11807
11808
|
return id2;
|
|
11808
11809
|
}, "organizationOfAddress");
|
|
11809
11810
|
|
|
11810
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11811
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
11811
11812
|
var PHONE_PLANS = [
|
|
11812
11813
|
{
|
|
11813
11814
|
country: "us",
|
|
@@ -12187,7 +12188,7 @@ var PHONE_PLANS = [
|
|
|
12187
12188
|
}
|
|
12188
12189
|
];
|
|
12189
12190
|
|
|
12190
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
12191
12192
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
12192
12193
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
12193
12194
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -12262,10 +12263,10 @@ var storedPhone = /* @__PURE__ */ __name((raw, provider) => {
|
|
|
12262
12263
|
return found2 ? `+${found2[1]}` : void 0;
|
|
12263
12264
|
}, "storedPhone");
|
|
12264
12265
|
|
|
12265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
12266
12267
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
12267
12268
|
|
|
12268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/journal.js
|
|
12269
12270
|
import { existsSync, statSync } from "node:fs";
|
|
12270
12271
|
var watched = /* @__PURE__ */ new WeakMap();
|
|
12271
12272
|
var walInode = /* @__PURE__ */ __name((store) => statSync(`${store}-wal`, { throwIfNoEntry: false })?.ino, "walInode");
|
|
@@ -12291,7 +12292,7 @@ var checkJournal = /* @__PURE__ */ __name((database) => {
|
|
|
12291
12292
|
throw new CliError("conflict", "the store's journal file was deleted or replaced by another program while this command had the store open, so nothing more is written; `store recover` says what to do", { reason: "store.journal-replaced" });
|
|
12292
12293
|
}, "checkJournal");
|
|
12293
12294
|
|
|
12294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/write-events.js
|
|
12295
12296
|
var WRITE = /^\s*(?:WITH\b[\s\S]*?\)\s*)?(INSERT|REPLACE|UPDATE|DELETE)\b(?:\s+OR\s+[A-Za-z]+)?\s+(?:INTO\s+|FROM\s+)?(?:("?)(\w+)\2\.)?["`[]?(\w+)/i;
|
|
12296
12297
|
var writeTarget = /* @__PURE__ */ __name((sql2) => {
|
|
12297
12298
|
const match = WRITE.exec(sql2);
|
|
@@ -12371,7 +12372,7 @@ var committedWrites = /* @__PURE__ */ __name((database) => {
|
|
|
12371
12372
|
}, "committedWrites");
|
|
12372
12373
|
var droppedWrites = /* @__PURE__ */ __name((database) => tallies.get(database)?.pending.clear(), "droppedWrites");
|
|
12373
12374
|
|
|
12374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
12375
12376
|
var ARMS = [
|
|
12376
12377
|
[
|
|
12377
12378
|
"message",
|
|
@@ -12499,7 +12500,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
12499
12500
|
return recomputed;
|
|
12500
12501
|
}, "drainInvolvementQueue");
|
|
12501
12502
|
|
|
12502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
12503
12504
|
import { domainToUnicode } from "node:url";
|
|
12504
12505
|
|
|
12505
12506
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -22521,7 +22522,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
22521
22522
|
}, "oa");
|
|
22522
22523
|
var na = { parse: O, get: aa, isValid: oa };
|
|
22523
22524
|
|
|
22524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
22525
22526
|
var BEFORE = [
|
|
22526
22527
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
22527
22528
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -22781,7 +22782,7 @@ var findPlaces = /* @__PURE__ */ __name((text8) => {
|
|
|
22781
22782
|
return found2.sort((a, b) => a.start - b.start);
|
|
22782
22783
|
}, "findPlaces");
|
|
22783
22784
|
|
|
22784
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22785
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
22785
22786
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
22786
22787
|
var MENTION_VERSIONS = {
|
|
22787
22788
|
phone: 1,
|
|
@@ -22957,7 +22958,7 @@ var exactlyOne = /* @__PURE__ */ __name((text8, options) => {
|
|
|
22957
22958
|
return one2 && one2.start === 0 && one2.end === text8.length ? one2.value : void 0;
|
|
22958
22959
|
}, "exactlyOne");
|
|
22959
22960
|
|
|
22960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22961
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
22961
22962
|
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";
|
|
22962
22963
|
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";
|
|
22963
22964
|
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";
|
|
@@ -22965,7 +22966,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
22965
22966
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
22966
22967
|
var NAME_WORDS = WORDS.split(" ");
|
|
22967
22968
|
|
|
22968
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22969
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
22969
22970
|
var LATIN_TO_CYRILLIC = {
|
|
22970
22971
|
shch: "\u0449",
|
|
22971
22972
|
sch: "\u0449",
|
|
@@ -23173,7 +23174,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text8, stem, taken) => {
|
|
|
23173
23174
|
return found2;
|
|
23174
23175
|
}, "findUnknownNames");
|
|
23175
23176
|
|
|
23176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23177
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
23177
23178
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
23178
23179
|
"webpage",
|
|
23179
23180
|
"share",
|
|
@@ -23214,7 +23215,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
|
|
|
23214
23215
|
});
|
|
23215
23216
|
}, "matchDownloads");
|
|
23216
23217
|
|
|
23217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
23218
23219
|
var QUERY_VERSION = 1;
|
|
23219
23220
|
var QUERY_LIMITS2 = {
|
|
23220
23221
|
...QUERY_LIMITS,
|
|
@@ -23259,7 +23260,7 @@ function tooWideTerm([term], budget) {
|
|
|
23259
23260
|
}
|
|
23260
23261
|
__name(tooWideTerm, "tooWideTerm");
|
|
23261
23262
|
|
|
23262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
23263
23264
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
23264
23265
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
23265
23266
|
kind: "char",
|
|
@@ -23659,7 +23660,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
23659
23660
|
return out;
|
|
23660
23661
|
}, "foldRegex");
|
|
23661
23662
|
|
|
23662
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
23663
23664
|
var PRESET_VERSION = 1;
|
|
23664
23665
|
var PRESETS = {
|
|
23665
23666
|
password: {
|
|
@@ -23713,7 +23714,7 @@ var PRESETS = {
|
|
|
23713
23714
|
}
|
|
23714
23715
|
};
|
|
23715
23716
|
|
|
23716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
23717
23718
|
var FIELD_VERSION = 2;
|
|
23718
23719
|
var UNITS = {
|
|
23719
23720
|
"": 1,
|
|
@@ -24293,12 +24294,12 @@ var QUERY_OPERATORS = [
|
|
|
24293
24294
|
{ name: "boost / minimum / intervals", example: "invoice^2", semantics: "query.unsupported-operator" }
|
|
24294
24295
|
];
|
|
24295
24296
|
|
|
24296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
24297
24298
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
24298
24299
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
24299
24300
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
24300
24301
|
|
|
24301
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24302
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
24302
24303
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
24303
24304
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
24304
24305
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -24322,7 +24323,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
24322
24323
|
};
|
|
24323
24324
|
}, "linkMatch");
|
|
24324
24325
|
|
|
24325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
24326
24327
|
var SETTING = "phoneCountries";
|
|
24327
24328
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
24328
24329
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -24353,7 +24354,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
24353
24354
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
24354
24355
|
}, "valueMatch");
|
|
24355
24356
|
|
|
24356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
24357
24358
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
24358
24359
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
24359
24360
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -24381,7 +24382,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
24381
24382
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
24382
24383
|
}, "vocabularySimilarity");
|
|
24383
24384
|
|
|
24384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
24385
24386
|
import { createHash } from "node:crypto";
|
|
24386
24387
|
var folded3 = /* @__PURE__ */ __name((name) => {
|
|
24387
24388
|
try {
|
|
@@ -24447,7 +24448,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
24447
24448
|
});
|
|
24448
24449
|
}, "guardTagCreation");
|
|
24449
24450
|
|
|
24450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
24451
24452
|
var invalid = /* @__PURE__ */ __name((message3) => {
|
|
24452
24453
|
throw new CliError("validation_error", message3);
|
|
24453
24454
|
}, "invalid");
|
|
@@ -24524,7 +24525,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
24524
24525
|
};
|
|
24525
24526
|
}, "createTagRedirectIndex");
|
|
24526
24527
|
|
|
24527
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24528
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
24528
24529
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
24529
24530
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
24530
24531
|
if (!row2)
|
|
@@ -24552,7 +24553,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
24552
24553
|
return snapshot2;
|
|
24553
24554
|
}, "tagRedirectSnapshot");
|
|
24554
24555
|
|
|
24555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
24556
24557
|
import { createHash as createHash2 } from "node:crypto";
|
|
24557
24558
|
var TASK_KEY_PREFIXES = {
|
|
24558
24559
|
question: "Q",
|
|
@@ -24580,7 +24581,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
24580
24581
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
24581
24582
|
}, "taskAccountOf");
|
|
24582
24583
|
|
|
24583
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24584
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
24584
24585
|
var toMs = /* @__PURE__ */ __name((iso17) => {
|
|
24585
24586
|
if (iso17 === null || iso17 === void 0)
|
|
24586
24587
|
return null;
|
|
@@ -24594,7 +24595,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
24594
24595
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
24595
24596
|
var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
24596
24597
|
|
|
24597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
24598
24599
|
var TAG_KINDS = ["tag", "topic"];
|
|
24599
24600
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
24600
24601
|
var TAG_TYPE = {
|
|
@@ -24797,7 +24798,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
24797
24798
|
return result;
|
|
24798
24799
|
}, "tagsOf");
|
|
24799
24800
|
|
|
24800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
24801
24802
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
24802
24803
|
var SPEECH = speech("att");
|
|
24803
24804
|
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");
|
|
@@ -25287,7 +25288,7 @@ var FIELD_COMPILERS = {
|
|
|
25287
25288
|
subject
|
|
25288
25289
|
};
|
|
25289
25290
|
|
|
25290
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25291
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
25291
25292
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
25292
25293
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
25293
25294
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -25303,7 +25304,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
25303
25304
|
};
|
|
25304
25305
|
}, "placeOf");
|
|
25305
25306
|
|
|
25306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
25307
25308
|
var DRAIN_ON_WRITE = 500;
|
|
25308
25309
|
var METHOD = "rules";
|
|
25309
25310
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -25469,7 +25470,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
25469
25470
|
return queued.length;
|
|
25470
25471
|
}, "drainMentions");
|
|
25471
25472
|
|
|
25472
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25473
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
25473
25474
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
25474
25475
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
25475
25476
|
if (!exists2)
|
|
@@ -25477,7 +25478,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
25477
25478
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
25478
25479
|
}, "indexRow");
|
|
25479
25480
|
|
|
25480
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25481
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
25481
25482
|
var INDEX = "message_stems";
|
|
25482
25483
|
var SETTING2 = "searchStemmers";
|
|
25483
25484
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -25599,7 +25600,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
25599
25600
|
};
|
|
25600
25601
|
}, "stemmerCache");
|
|
25601
25602
|
|
|
25602
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
25603
25604
|
var rehearsal = new AsyncLocalStorage();
|
|
25604
25605
|
var SQLITE_BUSY = 5;
|
|
25605
25606
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
@@ -25742,7 +25743,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
25742
25743
|
}
|
|
25743
25744
|
}, "read");
|
|
25744
25745
|
|
|
25745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25746
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
25746
25747
|
var FOLDED = [
|
|
25747
25748
|
{ table: "tasks", column: "title" },
|
|
25748
25749
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -25779,7 +25780,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
25779
25780
|
return filled2;
|
|
25780
25781
|
}, "fillFolded");
|
|
25781
25782
|
|
|
25782
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
25783
25784
|
import { createHash as createHash3 } from "node:crypto";
|
|
25784
25785
|
var CHUNK_CHARS = 1200;
|
|
25785
25786
|
var CHUNK_OVERLAP = 150;
|
|
@@ -25884,7 +25885,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
25884
25885
|
return chunks2;
|
|
25885
25886
|
}, "cutChunks");
|
|
25886
25887
|
|
|
25887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
25888
25889
|
var DAY2 = 864e5;
|
|
25889
25890
|
var CURRENCY = [
|
|
25890
25891
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -26010,7 +26011,7 @@ var dueDayOf = /* @__PURE__ */ __name((text8, createdMs) => {
|
|
|
26010
26011
|
return best?.day ?? null;
|
|
26011
26012
|
}, "dueDayOf");
|
|
26012
26013
|
|
|
26013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
26014
26015
|
var DAY3 = 864e5;
|
|
26015
26016
|
var STOP_WORDS = new Set([
|
|
26016
26017
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -26165,7 +26166,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
26165
26166
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
26166
26167
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
26167
26168
|
|
|
26168
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
26169
26170
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
26170
26171
|
coalesce(CASE k.chunkable_type
|
|
26171
26172
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -26307,7 +26308,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
26307
26308
|
}, "dropUnusedVectors");
|
|
26308
26309
|
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");
|
|
26309
26310
|
|
|
26310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
26311
26312
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
26312
26313
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
26313
26314
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -26582,7 +26583,7 @@ var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.ma
|
|
|
26582
26583
|
Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
|
|
26583
26584
|
])), "vectorCounts");
|
|
26584
26585
|
|
|
26585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26586
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
26586
26587
|
var DOCUMENT_PICTURE = "document_picture";
|
|
26587
26588
|
var SCAN_PAGE2 = 5e3;
|
|
26588
26589
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -26645,12 +26646,12 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
26645
26646
|
}, "nearestPictures")
|
|
26646
26647
|
}), "documentPicturesOver");
|
|
26647
26648
|
|
|
26648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
|
|
26649
26650
|
var noteIndexText = /* @__PURE__ */ __name((title2, text8) => title2 ? `${title2}
|
|
26650
26651
|
|
|
26651
26652
|
${text8}` : text8, "noteIndexText");
|
|
26652
26653
|
|
|
26653
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26654
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
|
|
26654
26655
|
var ENRICHMENT_SUBJECTS = ["document", "note", "email"];
|
|
26655
26656
|
var ENRICHMENT_POSITION = 1e6;
|
|
26656
26657
|
var EMAIL_ENRICHMENT = "email_enrichment";
|
|
@@ -26744,7 +26745,7 @@ var enrichmentsOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
|
26744
26745
|
}), "clear")
|
|
26745
26746
|
}), "enrichmentsOver");
|
|
26746
26747
|
|
|
26747
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26748
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
26748
26749
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
26749
26750
|
const literal5 = escaped2 ?? plain2 ?? "";
|
|
26750
26751
|
return wildcard ?? (/[*?[]/u.test(literal5) ? `[${literal5}]` : literal5);
|
|
@@ -26820,7 +26821,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
26820
26821
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
26821
26822
|
var bound2 = /* @__PURE__ */ __name(({ sql: text8, params }) => sql.join(text8.split("?").map((part2, at2) => at2 < params.length ? sql`${sql.raw(part2)}${params[at2]}` : sql.raw(part2)), sql``), "bound");
|
|
26822
26823
|
|
|
26823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
26824
26825
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
26825
26826
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
26826
26827
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -26910,7 +26911,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
26910
26911
|
});
|
|
26911
26912
|
}, "linkMeeting");
|
|
26912
26913
|
|
|
26913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/task-titles.js
|
|
26914
26915
|
var MAX_TITLE = 120;
|
|
26915
26916
|
var placeholderTitleOf = /* @__PURE__ */ __name((row2) => `${String(row2.type)} \u2014 ${String(row2.source_locator ?? "")}`, "placeholderTitleOf");
|
|
26916
26917
|
var PLACEHOLDER_TITLE_SQL = "title = type || ' \u2014 ' || coalesce(source_locator, '')";
|
|
@@ -26972,7 +26973,7 @@ var fillFoundTaskTitles = /* @__PURE__ */ __name((database, warn, { batch = 500
|
|
|
26972
26973
|
}
|
|
26973
26974
|
}, "fillFoundTaskTitles");
|
|
26974
26975
|
|
|
26975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
26976
26977
|
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), ''))";
|
|
26977
26978
|
var UNSEARCHED_EVENT_TYPES = [
|
|
26978
26979
|
"working-location",
|
|
@@ -27219,7 +27220,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
27219
27220
|
return true;
|
|
27220
27221
|
}, "resetNoteIndex");
|
|
27221
27222
|
|
|
27222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
27223
27224
|
var keyOf2 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
27224
27225
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names2) => {
|
|
27225
27226
|
for (const key2 of new Set(names2.filter((name) => !!name?.trim()).map(keyOf2))) {
|
|
@@ -27238,7 +27239,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names2) => {
|
|
|
27238
27239
|
}
|
|
27239
27240
|
}, "resolvePersonLinks");
|
|
27240
27241
|
|
|
27241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
27242
27243
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
27243
27244
|
id: integer("id").primaryKey(),
|
|
27244
27245
|
name: text("name").notNull().unique(),
|
|
@@ -27247,7 +27248,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
27247
27248
|
updatedAt: integer("updated_at").notNull()
|
|
27248
27249
|
});
|
|
27249
27250
|
|
|
27250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
|
|
27251
27252
|
var linkRevisions = sqliteTable("link_revisions", {
|
|
27252
27253
|
id: integer("id").primaryKey(),
|
|
27253
27254
|
linkId: integer("link_id").notNull(),
|
|
@@ -27259,7 +27260,7 @@ var linkRevisions = sqliteTable("link_revisions", {
|
|
|
27259
27260
|
createdAt: integer("created_at").notNull()
|
|
27260
27261
|
}, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
|
|
27261
27262
|
|
|
27262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
27263
27264
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
27264
27265
|
sourceKey: text("source_key").notNull(),
|
|
27265
27266
|
collection: text("collection").notNull(),
|
|
@@ -27269,13 +27270,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
27269
27270
|
createdAt: integer("created_at").notNull()
|
|
27270
27271
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
27271
27272
|
|
|
27272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27273
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
27273
27274
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
27274
27275
|
id: integer("id").notNull(),
|
|
27275
27276
|
indexableType: text("indexable_type").notNull()
|
|
27276
27277
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
27277
27278
|
|
|
27278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27279
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
27279
27280
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
27280
27281
|
id: integer("id").primaryKey(),
|
|
27281
27282
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -27295,7 +27296,7 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
27295
27296
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
27296
27297
|
]);
|
|
27297
27298
|
|
|
27298
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
|
|
27299
27300
|
var enrichments = sqliteTable("enrichments", {
|
|
27300
27301
|
subjectType: text("subject_type").notNull(),
|
|
27301
27302
|
subjectId: integer("subject_id").notNull(),
|
|
@@ -27307,7 +27308,7 @@ var enrichments = sqliteTable("enrichments", {
|
|
|
27307
27308
|
createdAt: integer("created_at").notNull()
|
|
27308
27309
|
}, (table) => [primaryKey({ columns: [table.subjectType, table.subjectId] })]);
|
|
27309
27310
|
|
|
27310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/templates.js
|
|
27311
27312
|
var templates = sqliteTable("templates", {
|
|
27312
27313
|
key: text("key").notNull(),
|
|
27313
27314
|
channel: text("channel").notNull(),
|
|
@@ -27329,7 +27330,7 @@ var templatesHistory = sqliteTable("templates_history", {
|
|
|
27329
27330
|
index("templates_history_by_key_channel_language_id").on(table.key, table.channel, table.language, table.id)
|
|
27330
27331
|
]);
|
|
27331
27332
|
|
|
27332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
|
|
27333
27334
|
var links = sqliteTable("links", {
|
|
27334
27335
|
id: integer("id").primaryKey(),
|
|
27335
27336
|
fromType: text("from_type").notNull(),
|
|
@@ -27360,7 +27361,7 @@ var links = sqliteTable("links", {
|
|
|
27360
27361
|
index("links_by_to_type_to_id").on(table.toType, table.toId)
|
|
27361
27362
|
]);
|
|
27362
27363
|
|
|
27363
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
27364
27365
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
27365
27366
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
27366
27367
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -27386,7 +27387,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
27386
27387
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
27387
27388
|
]);
|
|
27388
27389
|
|
|
27389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27390
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
27390
27391
|
var accounts = sqliteTable("accounts", {
|
|
27391
27392
|
id: integer("id").primaryKey(),
|
|
27392
27393
|
provider: text("provider").notNull(),
|
|
@@ -29396,7 +29397,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
29396
29397
|
at: integer("at").notNull()
|
|
29397
29398
|
});
|
|
29398
29399
|
|
|
29399
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29400
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
29400
29401
|
var contactsOf = /* @__PURE__ */ __name(({ phones: phones2, emails: emails3 }) => {
|
|
29401
29402
|
if (phones2 === void 0 && emails3 === void 0)
|
|
29402
29403
|
return void 0;
|
|
@@ -29642,7 +29643,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
29642
29643
|
}, "meetingIdentityPk");
|
|
29643
29644
|
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");
|
|
29644
29645
|
|
|
29645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
29646
29647
|
var TAKES = {
|
|
29647
29648
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
29648
29649
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -29702,7 +29703,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference2, scope3, profilesOn
|
|
|
29702
29703
|
throw wrongAccount(reference2, scope3, profiles);
|
|
29703
29704
|
}, "ensureAccount");
|
|
29704
29705
|
|
|
29705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
29706
29707
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
29707
29708
|
const padded = ` ${term} `;
|
|
29708
29709
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -29711,7 +29712,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
29711
29712
|
return [...pieces];
|
|
29712
29713
|
}, "trigrams");
|
|
29713
29714
|
|
|
29714
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
29715
29716
|
var isId = /* @__PURE__ */ __name((reference2) => /^-?\d+$/.test(reference2.trim()), "isId");
|
|
29716
29717
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
|
|
29717
29718
|
var pickChat = /* @__PURE__ */ __name((reference2, chats2) => {
|
|
@@ -29782,7 +29783,7 @@ ${lines}`, { candidates });
|
|
|
29782
29783
|
}, "ambiguous");
|
|
29783
29784
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
29784
29785
|
|
|
29785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/display-names.js
|
|
29786
29787
|
var QUOTES = [
|
|
29787
29788
|
['"', '"'],
|
|
29788
29789
|
["'", "'"],
|
|
@@ -29840,7 +29841,7 @@ var nameKey = /* @__PURE__ */ __name((name) => {
|
|
|
29840
29841
|
}, "nameKey");
|
|
29841
29842
|
var isReadable = /* @__PURE__ */ __name((shown2) => shown2 !== null && READABLE.test(shown2), "isReadable");
|
|
29842
29843
|
|
|
29843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29844
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
29844
29845
|
var identitiesOf = /* @__PURE__ */ __name(({ database }, person2) => database.prepare("SELECT identity_id AS pk FROM identity_links WHERE person_id = ?").all(person2).map(({ pk }) => Number(pk)), "identitiesOf");
|
|
29845
29846
|
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
29846
29847
|
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
@@ -29855,7 +29856,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
|
29855
29856
|
var separated = /* @__PURE__ */ __name((context, one2, other) => one2 !== other && apart(context, { identities: identitiesOf(context, one2), person: one2 }, { identities: identitiesOf(context, other), person: other }), "separated");
|
|
29856
29857
|
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
29857
29858
|
|
|
29858
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29859
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
29859
29860
|
var MESSAGE_FIELDS = {
|
|
29860
29861
|
pk: messages.id,
|
|
29861
29862
|
nativeId: messages.externalId,
|
|
@@ -30035,7 +30036,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
30035
30036
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
30036
30037
|
}), "chatActivity");
|
|
30037
30038
|
|
|
30038
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
30039
30040
|
var HIT_FIELDS = {
|
|
30040
30041
|
...MESSAGE_FIELDS,
|
|
30041
30042
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -30134,7 +30135,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
30134
30135
|
};
|
|
30135
30136
|
}, "directReplies");
|
|
30136
30137
|
|
|
30137
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
30138
30139
|
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");
|
|
30139
30140
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
30140
30141
|
const found2 = identityRow(context, ref3);
|
|
@@ -30347,7 +30348,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
30347
30348
|
}, "mentioning");
|
|
30348
30349
|
var escaped = /* @__PURE__ */ __name((text8) => text8.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
30349
30350
|
|
|
30350
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
30351
30352
|
var PROFILE_PLACEHOLDER = "<profile>";
|
|
30352
30353
|
var unregistered = /* @__PURE__ */ __name((provider) => `no CLI has registered ${provider} in this store yet; run its CLI once`, "unregistered");
|
|
30353
30354
|
var profilesOn = /* @__PURE__ */ __name((profiles, app, key2) => Object.entries(profiles[app] ?? {}).filter(([, saved]) => saved.provider === key2.provider && saved.account === key2.account).map(([name]) => name), "profilesOn");
|
|
@@ -30446,7 +30447,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
|
|
|
30446
30447
|
return `${WORDS2[summary.kind]} ${named2}${notes2 === "" ? "" : ` (${notes2})`}`;
|
|
30447
30448
|
}, "refLabel");
|
|
30448
30449
|
|
|
30449
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-accounts.js
|
|
30450
30451
|
var accountKeys = /* @__PURE__ */ __name((database, ids2) => {
|
|
30451
30452
|
const unique2 = [...new Set(ids2)];
|
|
30452
30453
|
if (unique2.length === 0)
|
|
@@ -30535,7 +30536,7 @@ var refEndsOf = /* @__PURE__ */ __name((database, text8) => {
|
|
|
30535
30536
|
}, "refEndsOf");
|
|
30536
30537
|
var refAccountsOf = /* @__PURE__ */ __name((database, text8) => refEndsOf(database, text8)?.flat(), "refAccountsOf");
|
|
30537
30538
|
|
|
30538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30539
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
30539
30540
|
var EXCERPT_CHARS = 280;
|
|
30540
30541
|
var TITLE_CHARS = 120;
|
|
30541
30542
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -30959,7 +30960,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
30959
30960
|
ends: /* @__PURE__ */ __name(async (text8) => refEndsOf(context.database, text8), "ends")
|
|
30960
30961
|
}), "refsStoreOver");
|
|
30961
30962
|
|
|
30962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
30963
30964
|
var sourceOf3 = /* @__PURE__ */ __name((read3, ref3) => ({
|
|
30964
30965
|
ref: ref3,
|
|
30965
30966
|
kind: read3.kind,
|
|
@@ -30997,7 +30998,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
30997
30998
|
});
|
|
30998
30999
|
}, "evidenceSourcesOf");
|
|
30999
31000
|
|
|
31000
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31001
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
31001
31002
|
import { randomBytes } from "node:crypto";
|
|
31002
31003
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
31003
31004
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -31010,7 +31011,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
31010
31011
|
return time3 + random;
|
|
31011
31012
|
}, "ulid");
|
|
31012
31013
|
|
|
31013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
31014
31015
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
31015
31016
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
31016
31017
|
if (!meta && !sections?.length)
|
|
@@ -31031,7 +31032,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
31031
31032
|
return typeof language === "string" && language !== "" ? language : null;
|
|
31032
31033
|
}, "languageOf");
|
|
31033
31034
|
|
|
31034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
31035
31036
|
var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
31036
31037
|
var objectOf2 = /* @__PURE__ */ __name((value) => {
|
|
31037
31038
|
if (isObject2(value))
|
|
@@ -31274,7 +31275,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
31274
31275
|
};
|
|
31275
31276
|
}, "filesStoreOver");
|
|
31276
31277
|
|
|
31277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
31278
31279
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
31279
31280
|
entity: "document",
|
|
31280
31281
|
backend: "sql",
|
|
@@ -31320,7 +31321,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
31320
31321
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
31321
31322
|
}, "importedDocumentWhere");
|
|
31322
31323
|
|
|
31323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
31324
31325
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
31325
31326
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
31326
31327
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -31328,7 +31329,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
31328
31329
|
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);
|
|
31329
31330
|
}, "reviewLink");
|
|
31330
31331
|
|
|
31331
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/link-row.js
|
|
31332
31333
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
31333
31334
|
var thingRef = /* @__PURE__ */ __name((database, type, id2) => type == null || id2 == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? null, "thingRef");
|
|
31334
31335
|
var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
@@ -31361,7 +31362,7 @@ var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
|
31361
31362
|
};
|
|
31362
31363
|
}, "linkOf");
|
|
31363
31364
|
|
|
31364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
31365
31366
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
31366
31367
|
const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
|
|
31367
31368
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -31382,7 +31383,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
31382
31383
|
return changed;
|
|
31383
31384
|
}, "dateFileNotes");
|
|
31384
31385
|
|
|
31385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
31386
31387
|
var textOf2 = /* @__PURE__ */ __name((text8, what, max = 1e5, allowEmpty = false) => {
|
|
31387
31388
|
const value = text8.trim();
|
|
31388
31389
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -31395,7 +31396,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
31395
31396
|
return value;
|
|
31396
31397
|
}, "oneOf");
|
|
31397
31398
|
|
|
31398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31399
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
31399
31400
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
31400
31401
|
var RELATIONSHIPS = RELATION_KINDS.map(linkKind).join(", ");
|
|
31401
31402
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31910,10 +31911,10 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31910
31911
|
};
|
|
31911
31912
|
}, "notesStoreOver");
|
|
31912
31913
|
|
|
31913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/rows-page.js
|
|
31914
31915
|
var pageOfRows = /* @__PURE__ */ __name((rows, limit, offset = 0) => rows.length > limit ? { items: rows.slice(0, limit), hasMore: true, nextOffset: offset + limit } : { items: rows, hasMore: false }, "pageOfRows");
|
|
31915
31916
|
|
|
31916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
31917
31918
|
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";
|
|
31918
31919
|
var iso5 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
31919
31920
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -32178,7 +32179,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32178
32179
|
};
|
|
32179
32180
|
}, "memoriesStoreOver");
|
|
32180
32181
|
|
|
32181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
32182
32183
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
32183
32184
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
32184
32185
|
throw new CliError(code, message3, { reason });
|
|
@@ -32326,7 +32327,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
32326
32327
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly: ownerOnly2, linkedId, ...decisionsOver(context) };
|
|
32327
32328
|
}, "reviewedRowsOver");
|
|
32328
32329
|
|
|
32329
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
32330
32331
|
var MAX_LINES = 500;
|
|
32331
32332
|
var PARENTS = {
|
|
32332
32333
|
invoice: {
|
|
@@ -32426,7 +32427,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
32426
32427
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
32427
32428
|
}, "moneyLinesOver");
|
|
32428
32429
|
|
|
32429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
32430
32431
|
var COUNTED = {
|
|
32431
32432
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
32432
32433
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -32501,7 +32502,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
32501
32502
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
32502
32503
|
}, "refundRulesOver");
|
|
32503
32504
|
|
|
32504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
32505
32506
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
32506
32507
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
32507
32508
|
var PAID = netPaidSql("i.id");
|
|
@@ -32905,7 +32906,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32905
32906
|
};
|
|
32906
32907
|
}, "financeStoreOver");
|
|
32907
32908
|
|
|
32908
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32909
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
32909
32910
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
32910
32911
|
throw new CliError("validation_error", message3, { reason });
|
|
32911
32912
|
}, "refuse");
|
|
@@ -32983,7 +32984,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
32983
32984
|
};
|
|
32984
32985
|
}, "paymentEntriesOver");
|
|
32985
32986
|
|
|
32986
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32987
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
32987
32988
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
32988
32989
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
32989
32990
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -33010,7 +33011,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
33010
33011
|
return valid;
|
|
33011
33012
|
}, "validateEvidenceFindings");
|
|
33012
33013
|
|
|
33013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
33014
33015
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
33015
33016
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
33016
33017
|
var iso7 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -33204,7 +33205,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33204
33205
|
};
|
|
33205
33206
|
}, "proposedActionsStoreOver");
|
|
33206
33207
|
|
|
33207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-proposals.js
|
|
33208
33209
|
var CONFIRMED = "proposal";
|
|
33209
33210
|
var refOf = /* @__PURE__ */ __name(({ database }, pk) => {
|
|
33210
33211
|
const row2 = database.prepare("SELECT provider, external_id FROM identities WHERE id = ?").get(pk);
|
|
@@ -33554,7 +33555,7 @@ var identityLinkRows = /* @__PURE__ */ __name((context, { person: person2, statu
|
|
|
33554
33555
|
return { items, hasMore: rows.length > limit };
|
|
33555
33556
|
}, "identityLinkRows");
|
|
33556
33557
|
|
|
33557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/person-merges.js
|
|
33558
33559
|
var mergeId = /* @__PURE__ */ __name((to, from2) => `merge:${to}-${from2}`, "mergeId");
|
|
33559
33560
|
var parseMergeId = /* @__PURE__ */ __name((id2) => {
|
|
33560
33561
|
const found2 = /^merge:([1-9]\d*)-([1-9]\d*)$/.exec(id2.trim());
|
|
@@ -33657,7 +33658,7 @@ var split = /* @__PURE__ */ __name((context, uid, refs, by) => {
|
|
|
33657
33658
|
return recordOf(context, alone);
|
|
33658
33659
|
}, "split");
|
|
33659
33660
|
|
|
33660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-split-proposals.js
|
|
33661
33662
|
var refOf2 = /* @__PURE__ */ __name(({ provider, id: id2 }) => `${provider}:${id2}`, "refOf");
|
|
33662
33663
|
var keyOf3 = /* @__PURE__ */ __name((split2, person2, identities2) => `${split2} ${person2} ${[...identities2].sort().join(" ")}`, "keyOf");
|
|
33663
33664
|
var planOf = /* @__PURE__ */ __name((context, input) => {
|
|
@@ -33834,7 +33835,7 @@ var forgetErasedSplits = /* @__PURE__ */ __name((database) => {
|
|
|
33834
33835
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
33835
33836
|
}, "forgetErasedSplits");
|
|
33836
33837
|
|
|
33837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33838
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/test-data.js
|
|
33838
33839
|
var SEED_PEOPLE = [
|
|
33839
33840
|
{ name: "Owner", username: "owner" },
|
|
33840
33841
|
{ name: "Ann Lee", username: "ann" },
|
|
@@ -33851,7 +33852,7 @@ var RESERVED_ADDRESS_GLOBS = [
|
|
|
33851
33852
|
];
|
|
33852
33853
|
var SEED_ID_GLOBS = ["person-[0-9]*"];
|
|
33853
33854
|
|
|
33854
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33855
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/test-people.js
|
|
33855
33856
|
var TEST_DATA_KIND = "test_data";
|
|
33856
33857
|
var globs = /* @__PURE__ */ __name((column2, patterns) => patterns.map((pattern) => `${column2} GLOB '${pattern}'`).join(" OR "), "globs");
|
|
33857
33858
|
var SURE = `(${globs("i.external_id", SEED_ID_GLOBS)} OR ${globs("lower(i.email)", RESERVED_ADDRESS_GLOBS)})`;
|
|
@@ -33920,7 +33921,7 @@ var forgetErasedTestData = /* @__PURE__ */ __name((database) => {
|
|
|
33920
33921
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
33921
33922
|
}, "forgetErasedTestData");
|
|
33922
33923
|
|
|
33923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
33924
33925
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null, startScope) => Number(orm.insert(accounts).values({
|
|
33925
33926
|
provider,
|
|
33926
33927
|
externalId: account,
|
|
@@ -34121,7 +34122,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
34121
34122
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
34122
34123
|
}, "dropOrphanPeople");
|
|
34123
34124
|
|
|
34124
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34125
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
34125
34126
|
var HISTORY_KEY = "$history";
|
|
34126
34127
|
var objectOf3 = /* @__PURE__ */ __name((text8) => {
|
|
34127
34128
|
if (typeof text8 !== "string")
|
|
@@ -34197,7 +34198,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
34197
34198
|
return rest;
|
|
34198
34199
|
}, "withoutHistory");
|
|
34199
34200
|
|
|
34200
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
34201
34202
|
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");
|
|
34202
34203
|
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");
|
|
34203
34204
|
var setChatScope = /* @__PURE__ */ __name((context, accountKey, chatId, scope3) => {
|
|
@@ -34495,7 +34496,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
34495
34496
|
}
|
|
34496
34497
|
}, "replaceAutoTags");
|
|
34497
34498
|
|
|
34498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
34499
34500
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
34500
34501
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
34501
34502
|
var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
|
|
@@ -34514,7 +34515,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
34514
34515
|
return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
|
|
34515
34516
|
}, "counterFreshness");
|
|
34516
34517
|
|
|
34517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34518
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-tokens.js
|
|
34518
34519
|
var BOT_TOKEN = /(?<!\d)(\d{6,12}):[A-Za-z0-9_-]{30,40}(?![A-Za-z0-9_-])/g;
|
|
34519
34520
|
var MAY_HOLD = "*[0-9][0-9][0-9][0-9][0-9][0-9]:*";
|
|
34520
34521
|
var MASKED_THROUGH = "bot_tokens_masked_through";
|
|
@@ -34554,7 +34555,7 @@ var maskStoredBotTokens = /* @__PURE__ */ __name((context) => {
|
|
|
34554
34555
|
}, "maskStoredBotTokens");
|
|
34555
34556
|
var masks = /* @__PURE__ */ __name((value) => value != null && withoutBotTokens(String(value)) !== value, "masks");
|
|
34556
34557
|
|
|
34557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
34558
34559
|
import { createHash as createHash4 } from "node:crypto";
|
|
34559
34560
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
34560
34561
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -34652,7 +34653,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
34652
34653
|
return { source: source2, query, chat: chat2, senders, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
34653
34654
|
}, "contextEvidenceRequest");
|
|
34654
34655
|
|
|
34655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
34656
34657
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
34657
34658
|
var ACTIVITY = `
|
|
34658
34659
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -34782,7 +34783,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
34782
34783
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
34783
34784
|
}), "mailActivity");
|
|
34784
34785
|
|
|
34785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
34786
34787
|
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");
|
|
34787
34788
|
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;
|
|
34788
34789
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -34863,7 +34864,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
34863
34864
|
return withoutSignOff(withoutGreeting(kept2)).join("\n").trim();
|
|
34864
34865
|
}, "mailCore");
|
|
34865
34866
|
|
|
34866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
34867
34868
|
var titleOf2 = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
34868
34869
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
34869
34870
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
@@ -34976,7 +34977,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
34976
34977
|
return emails3 + threads;
|
|
34977
34978
|
}, "drainEmailIndex");
|
|
34978
34979
|
|
|
34979
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
34980
34981
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
34981
34982
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
34982
34983
|
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,
|
|
@@ -35074,7 +35075,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
35074
35075
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
35075
35076
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
35076
35077
|
|
|
35077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
35078
35079
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
35079
35080
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
35080
35081
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -35124,7 +35125,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
35124
35125
|
return threads.length;
|
|
35125
35126
|
}, "markEmailsRestored");
|
|
35126
35127
|
|
|
35127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35128
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
35128
35129
|
var MAIL_PIECE_ROWS = `SELECT p.id, p.content_hash AS hash, p.type, p.owner, p.position, p.email_id AS email, v.vector
|
|
35129
35130
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
35130
35131
|
WHERE p.account_id = ?
|
|
@@ -35184,7 +35185,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
35184
35185
|
}, "indexedMailPieces");
|
|
35185
35186
|
var nearestMailPieces = /* @__PURE__ */ __name((database, model, query, filter, depth) => (filter.threadExternalId === void 0 ? indexedMailPieces(database, model, query, filter, depth) : void 0) ?? scannedMailPieces(database, model, query, filter), "nearestMailPieces");
|
|
35186
35187
|
|
|
35187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
35188
35189
|
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");
|
|
35189
35190
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
35190
35191
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -35251,7 +35252,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
35251
35252
|
}
|
|
35252
35253
|
}), "mailRulesOver");
|
|
35253
35254
|
|
|
35254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35255
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
35255
35256
|
function checkMeetingCancelled(signal) {
|
|
35256
35257
|
if (!signal?.aborted)
|
|
35257
35258
|
return;
|
|
@@ -35262,7 +35263,7 @@ function checkMeetingCancelled(signal) {
|
|
|
35262
35263
|
}
|
|
35263
35264
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
35264
35265
|
|
|
35265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
35266
35267
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
35267
35268
|
id: Number(row2.id),
|
|
35268
35269
|
accountId: Number(row2.account_id),
|
|
@@ -35312,7 +35313,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
35312
35313
|
createdAt: Number(row2.created_at)
|
|
35313
35314
|
}), "transcriptRowOf");
|
|
35314
35315
|
|
|
35315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35316
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
35316
35317
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
35317
35318
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
35318
35319
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -35479,7 +35480,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35479
35480
|
}
|
|
35480
35481
|
}), "meetingReadsOver");
|
|
35481
35482
|
|
|
35482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
35483
35484
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
35484
35485
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
35485
35486
|
const params = [input.accountId];
|
|
@@ -35522,7 +35523,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
35522
35523
|
return { clauses, params };
|
|
35523
35524
|
}, "meetingSelectionSql");
|
|
35524
35525
|
|
|
35525
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
35526
35527
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35527
35528
|
async meetingChatLines(input) {
|
|
35528
35529
|
checkMeetingCancelled(input.signal);
|
|
@@ -35550,7 +35551,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35550
35551
|
}
|
|
35551
35552
|
}), "meetingChatLinesOver");
|
|
35552
35553
|
|
|
35553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
35554
35555
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
35555
35556
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
35556
35557
|
}, "missing");
|
|
@@ -35673,7 +35674,81 @@ function meetingContextLinksOver(context) {
|
|
|
35673
35674
|
}
|
|
35674
35675
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
35675
35676
|
|
|
35676
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35677
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-documents.js
|
|
35678
|
+
var TRANSCRIPT_ROLE = "transcript";
|
|
35679
|
+
var roleOf3 = /* @__PURE__ */ __name((value) => MEETING_DOCUMENT_ROLES.find((role) => role === value), "roleOf");
|
|
35680
|
+
var attach = /* @__PURE__ */ __name((database, meetingId, fileId, role, metadata3, listed, now2) => {
|
|
35681
|
+
const target = driveFileTarget(fileId);
|
|
35682
|
+
const held = database.prepare("SELECT id, to_id, role, metadata FROM links WHERE from_type = 'meeting' AND from_id = ? AND kind = 'attached' AND target_text = ?").get(meetingId, target);
|
|
35683
|
+
if (!held) {
|
|
35684
|
+
database.prepare(`INSERT INTO links (from_type, from_id, to_type, to_id, kind, source, target_text, role, metadata, confirmed,
|
|
35685
|
+
author, created_at, updated_at) VALUES ('meeting', ?, 'document', ?, 'attached', 'meeting', ?, ?, ?, 1, 'rule',
|
|
35686
|
+
?, ?)`).run(meetingId, driveDocumentOf(database, fileId), target, role, metadata3, now2, now2);
|
|
35687
|
+
return;
|
|
35688
|
+
}
|
|
35689
|
+
const document = held.to_id == null ? driveDocumentOf(database, fileId) : int(held.to_id);
|
|
35690
|
+
const nextRole = listed ? role : str(held.role);
|
|
35691
|
+
const nextMetadata = listed ? metadata3 : str(held.metadata);
|
|
35692
|
+
database.prepare("UPDATE links SET to_id = ?, role = ?, metadata = ?, updated_at = ? WHERE id = ? AND (to_id IS NOT ? OR role IS NOT ? OR metadata IS NOT ?)").run(document, nextRole, nextMetadata, now2, Number(held.id), document, nextRole, nextMetadata);
|
|
35693
|
+
}, "attach");
|
|
35694
|
+
var attachListedDocument = /* @__PURE__ */ __name((database, meetingId, { fileId, role, title: title2 }, now2) => {
|
|
35695
|
+
const file = fileId.trim();
|
|
35696
|
+
if (file)
|
|
35697
|
+
attach(database, meetingId, file, role, JSON.stringify({ listed: true, ...title2 ? { title: title2 } : {} }), true, now2);
|
|
35698
|
+
}, "attachListedDocument");
|
|
35699
|
+
var attachTranscriptFile = /* @__PURE__ */ __name((database, meetingId, fileId, source2, now2, replaces) => {
|
|
35700
|
+
const file = fileId.trim();
|
|
35701
|
+
if (!file)
|
|
35702
|
+
return;
|
|
35703
|
+
if (replaces)
|
|
35704
|
+
database.prepare("DELETE FROM links WHERE from_type = 'meeting' AND from_id = ? AND kind = 'attached' AND role = ? AND target_text <> ? AND json_extract(metadata, '$.source') = ? AND json_extract(metadata, '$.listed') IS NULL").run(meetingId, TRANSCRIPT_ROLE, driveFileTarget(file), source2);
|
|
35705
|
+
attach(database, meetingId, file, TRANSCRIPT_ROLE, JSON.stringify({ source: source2 }), false, now2);
|
|
35706
|
+
}, "attachTranscriptFile");
|
|
35707
|
+
var meetingDocumentsOf = /* @__PURE__ */ __name((database, meetingId) => database.prepare("SELECT l.target_text, l.role, l.metadata, CASE WHEN d.deleted_at IS NULL THEN l.to_id END AS to_id FROM links l LEFT JOIN documents d ON d.id = l.to_id WHERE l.from_type = 'meeting' AND l.from_id = ? AND l.kind = 'attached' AND l.to_type = 'document' ORDER BY l.id").all(meetingId).flatMap((row2) => {
|
|
35708
|
+
const role = roleOf3(row2.role);
|
|
35709
|
+
return role === void 0 ? [] : [
|
|
35710
|
+
{
|
|
35711
|
+
fileId: String(row2.target_text).slice(driveFileTarget("").length),
|
|
35712
|
+
role,
|
|
35713
|
+
title: str(fromJson(row2.metadata)?.title),
|
|
35714
|
+
documentId: int(row2.to_id)
|
|
35715
|
+
}
|
|
35716
|
+
];
|
|
35717
|
+
}), "meetingDocumentsOf");
|
|
35718
|
+
var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
35719
|
+
const meetingsOf = /* @__PURE__ */ __name((documentIds, roles) => read(database, () => {
|
|
35720
|
+
const rows = database.prepare(`SELECT l.to_id AS document_id, l.from_id AS meeting_id, m.account_id, l.role FROM links l
|
|
35721
|
+
JOIN meetings m ON m.id = l.from_id
|
|
35722
|
+
WHERE l.kind = 'attached' AND l.from_type = 'meeting' AND l.to_type = 'document'
|
|
35723
|
+
AND l.role IN (SELECT value FROM json_each(?)) AND m.deleted_at IS NULL
|
|
35724
|
+
AND l.to_id IN (SELECT value FROM json_each(?))
|
|
35725
|
+
ORDER BY l.role = ? DESC, l.id`).all(JSON.stringify(roles), JSON.stringify(documentIds), TRANSCRIPT_ROLE);
|
|
35726
|
+
const found2 = /* @__PURE__ */ new Map();
|
|
35727
|
+
for (const row2 of rows) {
|
|
35728
|
+
const role = roleOf3(row2.role);
|
|
35729
|
+
if (role !== void 0 && !found2.has(Number(row2.document_id)))
|
|
35730
|
+
found2.set(Number(row2.document_id), {
|
|
35731
|
+
meetingId: Number(row2.meeting_id),
|
|
35732
|
+
accountId: Number(row2.account_id),
|
|
35733
|
+
role
|
|
35734
|
+
});
|
|
35735
|
+
}
|
|
35736
|
+
return found2;
|
|
35737
|
+
}), "meetingsOf");
|
|
35738
|
+
return {
|
|
35739
|
+
async transcriptMeetings(documentIds) {
|
|
35740
|
+
if (!documentIds.length)
|
|
35741
|
+
return /* @__PURE__ */ new Map();
|
|
35742
|
+
const found2 = await meetingsOf(documentIds, [TRANSCRIPT_ROLE]);
|
|
35743
|
+
return new Map([...found2].map(([document, { meetingId }]) => [document, meetingId]));
|
|
35744
|
+
},
|
|
35745
|
+
async documentMeetings(documentIds) {
|
|
35746
|
+
return documentIds.length ? meetingsOf(documentIds, MEETING_DOCUMENT_ROLES) : /* @__PURE__ */ new Map();
|
|
35747
|
+
}
|
|
35748
|
+
};
|
|
35749
|
+
}, "meetingTranscriptDocumentsOver");
|
|
35750
|
+
|
|
35751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
35677
35752
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
35678
35753
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
35679
35754
|
var summaryOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -35702,7 +35777,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
35702
35777
|
return row2 ? summaryText(summaryOf2(row2)) : null;
|
|
35703
35778
|
}, "indexedText");
|
|
35704
35779
|
|
|
35705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
35706
35781
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
35707
35782
|
var meetingCurrentIndexRows = `
|
|
35708
35783
|
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
|
|
@@ -35733,7 +35808,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
35733
35808
|
}, "invalidateMeetingStems");
|
|
35734
35809
|
var meetingStemmableText = /* @__PURE__ */ __name((text8) => text8.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
35735
35810
|
|
|
35736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35811
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
35737
35812
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
35738
35813
|
return {
|
|
35739
35814
|
async indexSearch(original) {
|
|
@@ -35801,10 +35876,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
35801
35876
|
}
|
|
35802
35877
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
35803
35878
|
|
|
35804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
35805
35880
|
import { createHash as createHash5 } from "node:crypto";
|
|
35806
35881
|
|
|
35807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/lucene/plain.js
|
|
35808
35883
|
var REPAIRED = /* @__PURE__ */ new Set([
|
|
35809
35884
|
"query.invalid-syntax",
|
|
35810
35885
|
"query.unclosed-literal",
|
|
@@ -35947,7 +36022,7 @@ var plainQuery = /* @__PURE__ */ __name((text8, fields4 = SEARCH_FIELDS) => {
|
|
|
35947
36022
|
return text8;
|
|
35948
36023
|
}, "plainQuery");
|
|
35949
36024
|
|
|
35950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36025
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
35951
36026
|
var SHORTEST_CORRECTION = 3;
|
|
35952
36027
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
35953
36028
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -35994,7 +36069,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words4) => {
|
|
|
35994
36069
|
return corrections;
|
|
35995
36070
|
}, "correctWords");
|
|
35996
36071
|
|
|
35997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
35998
36073
|
var SHORTEST_GARBLED = 4;
|
|
35999
36074
|
var MOST_WIDENED = 64;
|
|
36000
36075
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -36086,7 +36161,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
36086
36161
|
return found2.map((words4) => words4.sort((a, b) => a.distance - b.distance || b.docs - a.docs || a.term.localeCompare(b.term)).slice(0, MOST_WIDENED).map((word2) => word2.term));
|
|
36087
36162
|
}, "widenWords");
|
|
36088
36163
|
|
|
36089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36164
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
36090
36165
|
import { readFileSync } from "node:fs";
|
|
36091
36166
|
var loaded;
|
|
36092
36167
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -36145,7 +36220,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
36145
36220
|
return false;
|
|
36146
36221
|
}, "knownRussianWord");
|
|
36147
36222
|
|
|
36148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
36149
36224
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
36150
36225
|
var MOST_WORDS = 128;
|
|
36151
36226
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -36401,7 +36476,7 @@ var matchedMeetingWords = /* @__PURE__ */ __name((tree, text8, stemmer2) => {
|
|
|
36401
36476
|
return [...found2];
|
|
36402
36477
|
}, "matchedMeetingWords");
|
|
36403
36478
|
|
|
36404
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
36405
36480
|
var fail = /* @__PURE__ */ __name((message3) => {
|
|
36406
36481
|
throw new CliError("validation_error", message3);
|
|
36407
36482
|
}, "fail");
|
|
@@ -36585,7 +36660,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
36585
36660
|
}
|
|
36586
36661
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
36587
36662
|
|
|
36588
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
36589
36664
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36590
36665
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
36591
36666
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -36617,7 +36692,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36617
36692
|
}
|
|
36618
36693
|
}), "meetingLanguagesOver");
|
|
36619
36694
|
|
|
36620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
36621
36696
|
import { createHash as createHash6 } from "node:crypto";
|
|
36622
36697
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
36623
36698
|
if (value === void 0)
|
|
@@ -36710,7 +36785,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
36710
36785
|
}
|
|
36711
36786
|
}), "meetingParticipantSearchOver");
|
|
36712
36787
|
|
|
36713
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
36714
36789
|
var preparationQueries = {
|
|
36715
36790
|
participants: {
|
|
36716
36791
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -36760,7 +36835,7 @@ var preparationQueries = {
|
|
|
36760
36835
|
}
|
|
36761
36836
|
};
|
|
36762
36837
|
|
|
36763
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36838
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
36764
36839
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36765
36840
|
async preparationContext(original) {
|
|
36766
36841
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -36801,7 +36876,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36801
36876
|
}
|
|
36802
36877
|
}), "meetingPreparationContextOver");
|
|
36803
36878
|
|
|
36804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
36805
36880
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
36806
36881
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
36807
36882
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -36815,7 +36890,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
36815
36890
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
36816
36891
|
)`, "preparationSubjects");
|
|
36817
36892
|
|
|
36818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
36819
36894
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36820
36895
|
async preparationKnowledge(original) {
|
|
36821
36896
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -36860,7 +36935,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
36860
36935
|
}
|
|
36861
36936
|
}), "meetingPreparationKnowledgeOver");
|
|
36862
36937
|
|
|
36863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
36864
36939
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36865
36940
|
async preparationNotes(original) {
|
|
36866
36941
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -36913,7 +36988,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36913
36988
|
}
|
|
36914
36989
|
}), "meetingPreparationNotesOver");
|
|
36915
36990
|
|
|
36916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36991
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
36917
36992
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36918
36993
|
async relatedHistory(original) {
|
|
36919
36994
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -36984,7 +37059,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36984
37059
|
}
|
|
36985
37060
|
}), "meetingRelatedHistoryOver");
|
|
36986
37061
|
|
|
36987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37062
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
36988
37063
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
36989
37064
|
var text4 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
36990
37065
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -37065,7 +37140,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
37065
37140
|
}
|
|
37066
37141
|
}), "meetingReviewOver");
|
|
37067
37142
|
|
|
37068
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37143
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
37069
37144
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
37070
37145
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
37071
37146
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -37119,7 +37194,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
37119
37194
|
}
|
|
37120
37195
|
}), "meetingSeriesHistoryOver");
|
|
37121
37196
|
|
|
37122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
37123
37198
|
var MOST_ROWS = 5e5;
|
|
37124
37199
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
37125
37200
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -37188,45 +37263,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
37188
37263
|
}
|
|
37189
37264
|
}), "meetingStatsOver");
|
|
37190
37265
|
|
|
37191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37192
|
-
var TRANSCRIPT_ROLE = "transcript";
|
|
37193
|
-
var attachTranscriptDocument = /* @__PURE__ */ __name((database, meetingId, fileId, now2, replaces) => {
|
|
37194
|
-
const file = fileId.trim();
|
|
37195
|
-
if (!file)
|
|
37196
|
-
return;
|
|
37197
|
-
const target = driveFileTarget(file);
|
|
37198
|
-
if (replaces)
|
|
37199
|
-
database.prepare("DELETE FROM links WHERE from_type = 'meeting' AND from_id = ? AND kind = 'attached' AND role = ? AND target_text <> ?").run(meetingId, TRANSCRIPT_ROLE, target);
|
|
37200
|
-
const held = database.prepare("SELECT id, to_id FROM links WHERE from_type = 'meeting' AND from_id = ? AND kind = 'attached' AND target_text = ?").get(meetingId, target);
|
|
37201
|
-
if (!held) {
|
|
37202
|
-
database.prepare(`INSERT INTO links (from_type, from_id, to_type, to_id, kind, source, target_text, role, confirmed, author,
|
|
37203
|
-
created_at, updated_at) VALUES ('meeting', ?, 'document', ?, 'attached', 'meeting', ?, ?, 1, 'rule', ?, ?)`).run(meetingId, driveDocumentOf(database, file), target, TRANSCRIPT_ROLE, now2, now2);
|
|
37204
|
-
return;
|
|
37205
|
-
}
|
|
37206
|
-
if (held.to_id != null)
|
|
37207
|
-
return;
|
|
37208
|
-
const document = driveDocumentOf(database, file);
|
|
37209
|
-
if (document !== null)
|
|
37210
|
-
database.prepare("UPDATE links SET to_id = ?, updated_at = ? WHERE id = ?").run(document, now2, Number(held.id));
|
|
37211
|
-
}, "attachTranscriptDocument");
|
|
37212
|
-
var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
37213
|
-
async transcriptMeetings(documentIds) {
|
|
37214
|
-
if (!documentIds.length)
|
|
37215
|
-
return /* @__PURE__ */ new Map();
|
|
37216
|
-
return read(database, () => {
|
|
37217
|
-
const rows = database.prepare(`SELECT l.to_id AS document_id, l.from_id AS meeting_id FROM links l JOIN meetings m ON m.id = l.from_id
|
|
37218
|
-
WHERE l.kind = 'attached' AND l.from_type = 'meeting' AND l.to_type = 'document' AND l.role = ?
|
|
37219
|
-
AND m.deleted_at IS NULL AND l.to_id IN (SELECT value FROM json_each(?)) ORDER BY l.id`).all(TRANSCRIPT_ROLE, JSON.stringify(documentIds));
|
|
37220
|
-
const found2 = /* @__PURE__ */ new Map();
|
|
37221
|
-
for (const row2 of rows)
|
|
37222
|
-
if (!found2.has(Number(row2.document_id)))
|
|
37223
|
-
found2.set(Number(row2.document_id), Number(row2.meeting_id));
|
|
37224
|
-
return found2;
|
|
37225
|
-
});
|
|
37226
|
-
}
|
|
37227
|
-
}), "meetingTranscriptDocumentsOver");
|
|
37228
|
-
|
|
37229
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
|
|
37266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
|
|
37230
37267
|
var CYRILLIC_TO_LATIN = {
|
|
37231
37268
|
\u0430: "a",
|
|
37232
37269
|
\u0431: "b",
|
|
@@ -37448,7 +37485,7 @@ for (const [full, short] of Object.entries(SHORT_FORMS))
|
|
|
37448
37485
|
}
|
|
37449
37486
|
var fullNames = /* @__PURE__ */ __name((skeleton) => [skeleton, ...FULL_NAMES.get(skeleton) ?? []], "fullNames");
|
|
37450
37487
|
|
|
37451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37488
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/name-traces.js
|
|
37452
37489
|
var peopleByNameKey = /* @__PURE__ */ __name((database) => {
|
|
37453
37490
|
const found2 = /* @__PURE__ */ new Map();
|
|
37454
37491
|
for (const row2 of database.prepare("SELECT p.id, p.name FROM persons p WHERE p.owner = 0 AND p.name IS NOT NULL AND EXISTS (SELECT 1 FROM identity_links l WHERE l.person_id = p.id) ORDER BY p.id").all()) {
|
|
@@ -37564,7 +37601,7 @@ function* sharedTraces(database, a, b, name, except) {
|
|
|
37564
37601
|
}
|
|
37565
37602
|
__name(sharedTraces, "sharedTraces");
|
|
37566
37603
|
|
|
37567
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37604
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/person-matcher.js
|
|
37568
37605
|
var spellingsOf = /* @__PURE__ */ __name((value) => [value, value.slice(1)], "spellingsOf");
|
|
37569
37606
|
var PERSON_BY = {
|
|
37570
37607
|
// UNION, not OR: each branch reads its own index.
|
|
@@ -37587,7 +37624,7 @@ var personsByIdentifiers = /* @__PURE__ */ __name((database, ids2) => {
|
|
|
37587
37624
|
return [...found2].sort((a, b) => a - b);
|
|
37588
37625
|
}, "personsByIdentifiers");
|
|
37589
37626
|
|
|
37590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/person-match-scan.js
|
|
37591
37628
|
var BY = "rule";
|
|
37592
37629
|
var RULE = { bot: "rule", kind: "rule" };
|
|
37593
37630
|
var MOST_SHARING = 6;
|
|
@@ -38034,7 +38071,7 @@ var linkPhones = /* @__PURE__ */ __name((context, identities2) => {
|
|
|
38034
38071
|
return pass.result;
|
|
38035
38072
|
}, "linkPhones");
|
|
38036
38073
|
|
|
38037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38074
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
38038
38075
|
var CURSOR_KEY = "meetings";
|
|
38039
38076
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
38040
38077
|
id: Number(row2.id),
|
|
@@ -38125,7 +38162,8 @@ var details = /* @__PURE__ */ __name((database, id2) => {
|
|
|
38125
38162
|
transcripts: database.prepare("SELECT * FROM meeting_transcripts WHERE meeting_id = ? ORDER BY id").all(id2).map((t) => ({ transcript: transcriptOf(t), rows: rowsOf.all(Number(t.id)).map(transcriptRowOf) })),
|
|
38126
38163
|
chat: database.prepare("SELECT * FROM meeting_chat_messages WHERE meeting_id = ? ORDER BY id").all(id2).map(chatOf2),
|
|
38127
38164
|
summaries: database.prepare("SELECT * FROM meeting_summaries WHERE meeting_id = ? ORDER BY id").all(id2).map(summaryOf2),
|
|
38128
|
-
attachments: database.prepare("SELECT * FROM attachments WHERE attachable_type = 'meeting' AND attachable_id = ? ORDER BY position").all(id2).map(attachmentOf)
|
|
38165
|
+
attachments: database.prepare("SELECT * FROM attachments WHERE attachable_type = 'meeting' AND attachable_id = ? ORDER BY position").all(id2).map(attachmentOf),
|
|
38166
|
+
documents: meetingDocumentsOf(database, id2)
|
|
38129
38167
|
};
|
|
38130
38168
|
}, "details");
|
|
38131
38169
|
var upsert = /* @__PURE__ */ __name((database, table, key2, values, now2) => {
|
|
@@ -38298,6 +38336,8 @@ var save = /* @__PURE__ */ __name((context, input) => {
|
|
|
38298
38336
|
}, now2);
|
|
38299
38337
|
for (const a of input.attachments ?? [])
|
|
38300
38338
|
saveAttachment(database, "meeting", meetingId, a, now2);
|
|
38339
|
+
for (const document of input.documents ?? [])
|
|
38340
|
+
attachListedDocument(database, meetingId, document, now2);
|
|
38301
38341
|
return meetingId;
|
|
38302
38342
|
}, "save");
|
|
38303
38343
|
var saveTranscripts = /* @__PURE__ */ __name((database, meetingId, transcripts, participantId, now2) => {
|
|
@@ -38312,7 +38352,7 @@ var saveTranscripts = /* @__PURE__ */ __name((database, meetingId, transcripts,
|
|
|
38312
38352
|
for (const { rows, driveFileId, ...t } of transcripts) {
|
|
38313
38353
|
const replayed = t.contentHash !== null && Boolean(sameContent.get(meetingId, t.source, t.contentHash));
|
|
38314
38354
|
if (driveFileId !== void 0)
|
|
38315
|
-
|
|
38355
|
+
attachTranscriptFile(database, meetingId, driveFileId, t.source, now2, !replayed);
|
|
38316
38356
|
if (replayed) {
|
|
38317
38357
|
counts.replayedTranscripts++;
|
|
38318
38358
|
continue;
|
|
@@ -38619,7 +38659,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
38619
38659
|
};
|
|
38620
38660
|
}, "meetingStoreOver");
|
|
38621
38661
|
|
|
38622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38662
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
38623
38663
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
38624
38664
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
38625
38665
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -38645,7 +38685,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder2) => {
|
|
|
38645
38685
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder2))).run();
|
|
38646
38686
|
}, "release");
|
|
38647
38687
|
|
|
38648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38688
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
38649
38689
|
var THREAD_COLUMNS = {
|
|
38650
38690
|
subject: {
|
|
38651
38691
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -38662,7 +38702,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
38662
38702
|
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);
|
|
38663
38703
|
}, "threadRows");
|
|
38664
38704
|
|
|
38665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
38666
38706
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
38667
38707
|
id: `email:${place.emailId}`,
|
|
38668
38708
|
chatId: place.threadExternalId,
|
|
@@ -39204,7 +39244,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
39204
39244
|
}
|
|
39205
39245
|
}), "mailStoreOver");
|
|
39206
39246
|
|
|
39207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39247
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
39208
39248
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
39209
39249
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
39210
39250
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -39294,7 +39334,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
39294
39334
|
}, "knownWord");
|
|
39295
39335
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
39296
39336
|
|
|
39297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39337
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
39298
39338
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
39299
39339
|
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");
|
|
39300
39340
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -39380,7 +39420,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
39380
39420
|
return found2;
|
|
39381
39421
|
}, "spokenTranscripts");
|
|
39382
39422
|
|
|
39383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
39384
39424
|
var startOf = /* @__PURE__ */ __name((node) => node.operator === "wildcard" && node.implicit ? /^([\p{L}\p{N}]+)\*$/u.exec(normalize(node.value))?.[1] : void 0, "startOf");
|
|
39385
39425
|
var matchOf = /* @__PURE__ */ __name((node) => {
|
|
39386
39426
|
const start = startOf(node);
|
|
@@ -39438,7 +39478,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
39438
39478
|
});
|
|
39439
39479
|
}, "placeHits");
|
|
39440
39480
|
|
|
39441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39481
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
39442
39482
|
var GROUPS = {
|
|
39443
39483
|
chat: {
|
|
39444
39484
|
key: "m.chat_id",
|
|
@@ -39460,7 +39500,7 @@ var GROUPS = {
|
|
|
39460
39500
|
}
|
|
39461
39501
|
};
|
|
39462
39502
|
|
|
39463
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
39464
39504
|
var MESSAGES2 = {
|
|
39465
39505
|
rows: "messages",
|
|
39466
39506
|
threads: "chats",
|
|
@@ -39953,7 +39993,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
39953
39993
|
};
|
|
39954
39994
|
}, "runCompiled");
|
|
39955
39995
|
|
|
39956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
39957
39997
|
function invalidMetadata() {
|
|
39958
39998
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
39959
39999
|
}
|
|
@@ -40055,7 +40095,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
40055
40095
|
};
|
|
40056
40096
|
}), "counterTargets");
|
|
40057
40097
|
|
|
40058
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
40059
40099
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
40060
40100
|
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,
|
|
40061
40101
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -40174,7 +40214,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
40174
40214
|
}));
|
|
40175
40215
|
}, "attachmentViews");
|
|
40176
40216
|
|
|
40177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
40178
40218
|
var transcript2 = /* @__PURE__ */ __name(({ orm }, chatKey, messageId) => orm.select({ text: messageTranscripts.text, source: messageTranscripts.source }).from(messageTranscripts).where(and(eq(messageTranscripts.chatId, chatKey), eq(messageTranscripts.messageExternalId, messageId))).get(), "transcript");
|
|
40179
40219
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text8, source2) => {
|
|
40180
40220
|
const { orm, database, now: now2 } = context;
|
|
@@ -40212,7 +40252,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
40212
40252
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
40213
40253
|
}, "intoVoiceAttachment");
|
|
40214
40254
|
|
|
40215
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40255
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
40216
40256
|
var FIELDS = [
|
|
40217
40257
|
"threadExternalId",
|
|
40218
40258
|
"senderIdentityId",
|
|
@@ -40531,7 +40571,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
40531
40571
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
40532
40572
|
}, "writeDerivedReactions");
|
|
40533
40573
|
|
|
40534
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40574
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
40535
40575
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
40536
40576
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
40537
40577
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -40552,7 +40592,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
40552
40592
|
};
|
|
40553
40593
|
}, "keysOver");
|
|
40554
40594
|
|
|
40555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40595
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
40556
40596
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
40557
40597
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
40558
40598
|
if (!row2)
|
|
@@ -40599,7 +40639,7 @@ var forgetProfile = /* @__PURE__ */ __name((database, app, profile, now2) => {
|
|
|
40599
40639
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
40600
40640
|
}, "forgetProfile");
|
|
40601
40641
|
|
|
40602
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40642
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
40603
40643
|
var ACCOUNT_REASON = "an account you connected, under another name: a mailbox or messenger you read may be someone else's";
|
|
40604
40644
|
var ownerNames = /* @__PURE__ */ __name(({ database }, owner) => database.prepare("SELECT i.name FROM identity_links l JOIN identities i ON i.id = l.identity_id WHERE l.person_id = ?").all(owner).map(({ name }) => new Set(nameSkeletons(displayName(typeof name === "string" ? name : null)))).filter((words4) => words4.size > 0), "ownerNames");
|
|
40605
40645
|
var ownersName = /* @__PURE__ */ __name((name, owner, alone) => {
|
|
@@ -40658,7 +40698,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
40658
40698
|
return personOf2(context, ref3);
|
|
40659
40699
|
}, "linkToOwner");
|
|
40660
40700
|
|
|
40661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40701
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
40662
40702
|
var PROVIDERS_SETTING = "providers";
|
|
40663
40703
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
40664
40704
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -40706,7 +40746,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
40706
40746
|
});
|
|
40707
40747
|
}, "registerProvider");
|
|
40708
40748
|
|
|
40709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40749
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
40710
40750
|
var DAY4 = 864e5;
|
|
40711
40751
|
var RECENTLY_CLOSED_MS = 14 * DAY4;
|
|
40712
40752
|
var TEXT_LIMIT = 20;
|
|
@@ -40904,7 +40944,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
40904
40944
|
};
|
|
40905
40945
|
}, "taskSimilarityOver");
|
|
40906
40946
|
|
|
40907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40947
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
40908
40948
|
var SETTING3 = "taskCategories";
|
|
40909
40949
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
40910
40950
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -40923,7 +40963,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
40923
40963
|
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);
|
|
40924
40964
|
}, "saveTaskCategories");
|
|
40925
40965
|
|
|
40926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40966
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
40927
40967
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
40928
40968
|
var ALLOWED = "taskAgentClose";
|
|
40929
40969
|
var MIN = "taskAgentCloseMin";
|
|
@@ -40979,7 +41019,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
40979
41019
|
];
|
|
40980
41020
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
40981
41021
|
|
|
40982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41022
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
40983
41023
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
40984
41024
|
var KEY = "taskFirstPassPerChat";
|
|
40985
41025
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -40999,7 +41039,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
40999
41039
|
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);
|
|
41000
41040
|
}, "saveFirstPassPerChat");
|
|
41001
41041
|
|
|
41002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
41003
41043
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
41004
41044
|
var EXTERNAL_ID_CHARS = 200;
|
|
41005
41045
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -41026,7 +41066,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
41026
41066
|
return text8;
|
|
41027
41067
|
}, "sourceUrlOf");
|
|
41028
41068
|
|
|
41029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
41030
41070
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
41031
41071
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
41032
41072
|
name,
|
|
@@ -41278,7 +41318,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
41278
41318
|
var TASK_PEOPLE = `WITH merged AS (SELECT json_extract(value, '$[0]') AS id, json_extract(value, '$[1]') AS now FROM json_each(?)), counts AS (SELECT coalesce(m.now, a.assignee_id) AS person, count(DISTINCT t.id) AS n FROM task_assignments a JOIN tasks t ON t.id = a.task_id AND t.deleted_at IS NULL LEFT JOIN merged m ON m.id = a.assignee_id WHERE a.assignee_type = 'person' GROUP BY 1) SELECT p.id, p.name, p.owner, coalesce(c.n, 0) AS n FROM persons p LEFT JOIN counts c ON c.person = p.id WHERE NOT ${mergedAwaySql("p")} ORDER BY p.owner DESC, n DESC, p.name IS NULL, p.name COLLATE NOCASE, p.id LIMIT ?`;
|
|
41279
41319
|
var mergedAssignees = /* @__PURE__ */ __name((database) => JSON.stringify(database.prepare(`SELECT DISTINCT a.assignee_id AS id FROM task_assignments a JOIN persons p ON p.id = a.assignee_id WHERE a.assignee_type = 'person' AND ${mergedAwaySql("p")}`).all().map(({ id: id2 }) => [Number(id2), currentPerson(database, Number(id2))])), "mergedAssignees");
|
|
41280
41320
|
|
|
41281
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41321
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
41282
41322
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
41283
41323
|
if (row2.author_type == null)
|
|
41284
41324
|
return null;
|
|
@@ -41306,7 +41346,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
41306
41346
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
41307
41347
|
}, "addComment");
|
|
41308
41348
|
|
|
41309
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41349
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
41310
41350
|
var TASK_RELATION_KINDS = [
|
|
41311
41351
|
"blocked-by",
|
|
41312
41352
|
"follow-up-of",
|
|
@@ -41436,7 +41476,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
41436
41476
|
};
|
|
41437
41477
|
}, "taskRelationsStoreOver");
|
|
41438
41478
|
|
|
41439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
41440
41480
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
41441
41481
|
var TASK_EVENT_KINDS = [
|
|
41442
41482
|
"created",
|
|
@@ -41995,7 +42035,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
41995
42035
|
};
|
|
41996
42036
|
}, "workTasksOver");
|
|
41997
42037
|
|
|
41998
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
41999
42039
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
42000
42040
|
const { database, now: now2 } = context;
|
|
42001
42041
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -42044,7 +42084,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
42044
42084
|
};
|
|
42045
42085
|
}, "taskCloseOver");
|
|
42046
42086
|
|
|
42047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
42048
42088
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
42049
42089
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
42050
42090
|
const { database, now: now2 } = context;
|
|
@@ -42263,7 +42303,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
42263
42303
|
};
|
|
42264
42304
|
}, "taskPairsOver");
|
|
42265
42305
|
|
|
42266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
42267
42307
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
42268
42308
|
var TASK_STATS_SQL = {
|
|
42269
42309
|
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 ? PROJECT_SCOPE : ACCOUNT_SCOPE}${filter} ORDER BY t.created_at, t.id`, "rows"),
|
|
@@ -42302,7 +42342,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
42302
42342
|
}, "statNames")
|
|
42303
42343
|
}), "taskStatsOver");
|
|
42304
42344
|
|
|
42305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
42306
42346
|
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";
|
|
42307
42347
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
42308
42348
|
const key2 = inboxKey(account);
|
|
@@ -42518,7 +42558,7 @@ var oneOf4 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
42518
42558
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
42519
42559
|
}, "oneOf");
|
|
42520
42560
|
|
|
42521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
42522
42562
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
42523
42563
|
const { database } = context;
|
|
42524
42564
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -42588,7 +42628,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
42588
42628
|
};
|
|
42589
42629
|
}, "accountsStoreOver");
|
|
42590
42630
|
|
|
42591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42631
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
42592
42632
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
42593
42633
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
42594
42634
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -42612,7 +42652,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
42612
42652
|
})), "keepDownloads");
|
|
42613
42653
|
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");
|
|
42614
42654
|
|
|
42615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
42616
42656
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
42617
42657
|
const { database } = context;
|
|
42618
42658
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -42669,7 +42709,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42669
42709
|
}, "keepAttachmentText")
|
|
42670
42710
|
}), "attachmentsStoreOver");
|
|
42671
42711
|
|
|
42672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42712
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
42673
42713
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
42674
42714
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
42675
42715
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -42854,7 +42894,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
42854
42894
|
return done;
|
|
42855
42895
|
}, "rekeyChats");
|
|
42856
42896
|
|
|
42857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42897
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
42858
42898
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
42859
42899
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
42860
42900
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -42912,7 +42952,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
42912
42952
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
42913
42953
|
}, "chatCoverage");
|
|
42914
42954
|
|
|
42915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
42916
42956
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
42917
42957
|
const { database } = context;
|
|
42918
42958
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -43061,7 +43101,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43061
43101
|
};
|
|
43062
43102
|
}, "chatsStoreOver");
|
|
43063
43103
|
|
|
43064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
43065
43105
|
import { createHash as createHash7 } from "node:crypto";
|
|
43066
43106
|
var BATCH_CONTEXT = 50;
|
|
43067
43107
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -43199,7 +43239,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
43199
43239
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
43200
43240
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
43201
43241
|
|
|
43202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
43203
43243
|
import { setTimeout } from "node:timers/promises";
|
|
43204
43244
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
43205
43245
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -43511,7 +43551,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
43511
43551
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
43512
43552
|
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");
|
|
43513
43553
|
|
|
43514
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
43515
43555
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
43516
43556
|
const { database } = context;
|
|
43517
43557
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -43618,7 +43658,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43618
43658
|
};
|
|
43619
43659
|
}, "conversationsStoreOver");
|
|
43620
43660
|
|
|
43621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
43622
43662
|
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";
|
|
43623
43663
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
43624
43664
|
const { database } = context;
|
|
@@ -43643,7 +43683,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
43643
43683
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
43644
43684
|
}), "countersStoreOver");
|
|
43645
43685
|
|
|
43646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
43647
43687
|
var MENTION_STATUSES = ["found", "linked", "proposed", "dismissed"];
|
|
43648
43688
|
var MENTION_QUERY = defineQuery({
|
|
43649
43689
|
entity: "mention",
|
|
@@ -43862,7 +43902,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
43862
43902
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
43863
43903
|
}, "listPlaces");
|
|
43864
43904
|
|
|
43865
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
43866
43906
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
43867
43907
|
const { database } = context;
|
|
43868
43908
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -43897,7 +43937,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
43897
43937
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
43898
43938
|
}), "mentionsStoreOver");
|
|
43899
43939
|
|
|
43900
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
43901
43941
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
43902
43942
|
var MUTED_NOW = "(coalesce(c.muted,0)=1 AND (c.muted_until IS NULL OR c.muted_until>?))";
|
|
43903
43943
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2, now2) => {
|
|
@@ -43996,7 +44036,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
43996
44036
|
});
|
|
43997
44037
|
}, "waitingChats");
|
|
43998
44038
|
|
|
43999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-activity-counts.js
|
|
44000
44040
|
var SQL = `SELECT coalesce(nullif(trim(c.title), ''), (SELECT sender_name FROM messages WHERE chat_id = c.id AND outgoing = 0 AND deleted_at IS NULL ORDER BY sent_at DESC LIMIT 1)) AS title, ${MUTED_NOW} AS muted, w.messages, w.sent, (SELECT max(sent_at) FROM messages WHERE chat_id = c.id AND deleted_at IS NULL AND sent_at < ?) AS last FROM chats c, (SELECT count(*) AS messages, coalesce(sum(outgoing = 1), 0) AS sent FROM messages WHERE chat_id = ? AND deleted_at IS NULL AND sent_at >= ? AND sent_at < ?) w WHERE c.id = ?`;
|
|
44001
44041
|
var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since, until, now: now2 }) => {
|
|
44002
44042
|
const statement = database.prepare(SQL);
|
|
@@ -44016,7 +44056,7 @@ var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since
|
|
|
44016
44056
|
return found2;
|
|
44017
44057
|
}, "chatActivityCounts");
|
|
44018
44058
|
|
|
44019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
44020
44060
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
44021
44061
|
const read3 = database.prepare("SELECT m.id, m.external_id, m.text, m.sent_at, m.sender_name, coalesce(m.sender_chat_external_id, i.external_id) AS sender_id FROM messages m LEFT JOIN identities i ON i.id = m.sender_identity_id WHERE m.chat_id = ? AND m.deleted_at IS NULL AND (m.text LIKE '%google.com%' OR m.text LIKE '%forms.gle%') " + (messageId === void 0 ? "" : "AND m.external_id = ? ") + "ORDER BY m.sent_at DESC, m.id DESC");
|
|
44022
44062
|
const rows = messageId === void 0 ? read3.all(chatKey) : read3.all(chatKey, messageId);
|
|
@@ -44031,7 +44071,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
44031
44071
|
}));
|
|
44032
44072
|
}, "documentLinkMessages");
|
|
44033
44073
|
|
|
44034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44074
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
44035
44075
|
var stemmerFor = stemmerCache();
|
|
44036
44076
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
44037
44077
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -44075,7 +44115,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
44075
44115
|
});
|
|
44076
44116
|
}, "laterSharingRare");
|
|
44077
44117
|
|
|
44078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44118
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
44079
44119
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
44080
44120
|
const { database } = context;
|
|
44081
44121
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -44216,7 +44256,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
44216
44256
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
44217
44257
|
}), "messagesStoreOver");
|
|
44218
44258
|
|
|
44219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44259
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/person-kinds.js
|
|
44220
44260
|
var PERSON_KINDS = ["person", "organization", "automated", "stranger", "unsorted", "test"];
|
|
44221
44261
|
var AUTOMATED_WORDS = /* @__PURE__ */ new Set([
|
|
44222
44262
|
"noreply",
|
|
@@ -44279,7 +44319,7 @@ var isCompanyName = /* @__PURE__ */ __name((name) => {
|
|
|
44279
44319
|
return wordsOf3(name.replaceAll(".", "")).some((word2) => LEGAL_FORMS.has(word2) || COMPANY_WORDS.has(word2));
|
|
44280
44320
|
}, "isCompanyName");
|
|
44281
44321
|
|
|
44282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/person-ties.js
|
|
44283
44323
|
var SMALL_GROUP_MEMBERS = 10;
|
|
44284
44324
|
var PERSON_TIES = ["chat", "small-group", "mail", "meeting", "crm", "phone-book"];
|
|
44285
44325
|
var ALWAYS_SHOWN = ["owner", "added", "task"];
|
|
@@ -44334,7 +44374,7 @@ var shownReasons = /* @__PURE__ */ __name((database, people2) => {
|
|
|
44334
44374
|
return new Map([...found2].map(([person2, reasons]) => [person2, ORDER.filter((one2) => reasons.has(one2))]));
|
|
44335
44375
|
}, "shownReasons");
|
|
44336
44376
|
|
|
44337
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/people-list.js
|
|
44338
44378
|
var PEOPLE_SORTS = ["interactions", "recent", "name", "tasks"];
|
|
44339
44379
|
var MIN_QUERY = 3;
|
|
44340
44380
|
var ftsPhrase = /* @__PURE__ */ __name((text8) => `"${text8.replaceAll('"', '""')}"`, "ftsPhrase");
|
|
@@ -44680,7 +44720,7 @@ var similarPeople = /* @__PURE__ */ __name((database, typed, limit) => {
|
|
|
44680
44720
|
return withLastContact(database, rows).map((person2, at2) => ({ ...person2, sameName: same[at2] === true }));
|
|
44681
44721
|
}, "similarPeople");
|
|
44682
44722
|
|
|
44683
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44723
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/person-doubts.js
|
|
44684
44724
|
var DOUBT_REASONS = ["owner-other-name", "test-data", "shared-address", "mixed-names"];
|
|
44685
44725
|
var COLUMNS5 = "l.person_id AS person, p.owner, p.name AS person_name, i.id AS pk, i.provider, i.external_id, i.name, i.phone, i.email, i.username, l.method, l.author, l.created_at, EXISTS (SELECT 1 FROM accounts a WHERE a.provider = i.provider AND a.external_id = i.external_id) AS account FROM identity_links l JOIN identities i ON i.id = l.identity_id JOIN persons p ON p.id = l.person_id";
|
|
44686
44726
|
var text5 = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? value : null, "text");
|
|
@@ -44936,7 +44976,7 @@ var markTestData = /* @__PURE__ */ __name((context, uid, by) => {
|
|
|
44936
44976
|
return { person: `person:${person2}`, identities: identities2 };
|
|
44937
44977
|
}, "markTestData");
|
|
44938
44978
|
|
|
44939
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44979
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
44940
44980
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
44941
44981
|
var IN_SCOPES = "IN (SELECT value FROM json_each(?))";
|
|
44942
44982
|
var projectScope = /* @__PURE__ */ __name((id2) => `(SELECT p.scope FROM main.projects p WHERE p.id=${id2})`, "projectScope");
|
|
@@ -45005,7 +45045,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
45005
45045
|
});
|
|
45006
45046
|
}, "personPreparation");
|
|
45007
45047
|
|
|
45008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
45009
45049
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
45010
45050
|
const id2 = Number(uid);
|
|
45011
45051
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -45013,7 +45053,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
45013
45053
|
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(currentPerson(database, id2), JSON.stringify(accountIds)));
|
|
45014
45054
|
}, "personSeenInAccounts");
|
|
45015
45055
|
|
|
45016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
45017
45057
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
45018
45058
|
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);
|
|
45019
45059
|
if (!row2)
|
|
@@ -45080,7 +45120,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
45080
45120
|
return { id: id2, personId, removed: true };
|
|
45081
45121
|
}, "removeNote");
|
|
45082
45122
|
|
|
45083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
45084
45124
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
45085
45125
|
const { database } = context;
|
|
45086
45126
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -45207,13 +45247,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
45207
45247
|
};
|
|
45208
45248
|
}, "peopleStoreOver");
|
|
45209
45249
|
|
|
45210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
45211
45251
|
import { createHash as createHash9 } from "node:crypto";
|
|
45212
45252
|
|
|
45213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
45214
45254
|
import { createHash as createHash8 } from "node:crypto";
|
|
45215
45255
|
|
|
45216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
45217
45257
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
45218
45258
|
var AUTHOR_MEASURES = [
|
|
45219
45259
|
"messages",
|
|
@@ -45353,7 +45393,7 @@ var withoutUrls = /* @__PURE__ */ __name((text8) => text8.replace(/\S+/gu, (toke
|
|
|
45353
45393
|
var rankingWords = /* @__PURE__ */ __name((text8) => withoutUrls(text8).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
45354
45394
|
var rankingQuestion = /* @__PURE__ */ __name((text8) => withoutUrls(text8).includes("?"), "rankingQuestion");
|
|
45355
45395
|
|
|
45356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
45357
45397
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
45358
45398
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
45359
45399
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -45575,7 +45615,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
45575
45615
|
};
|
|
45576
45616
|
}, "rankReplyGraph");
|
|
45577
45617
|
|
|
45578
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45618
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
45579
45619
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
45580
45620
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
45581
45621
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -45749,7 +45789,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
45749
45789
|
return { items, evidence, summary, graph: graph.quality };
|
|
45750
45790
|
}, "calculateAdminStatistics");
|
|
45751
45791
|
|
|
45752
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45792
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
45753
45793
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
45754
45794
|
const dates = [];
|
|
45755
45795
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -45771,7 +45811,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
45771
45811
|
return dates[0].node.resolution.date;
|
|
45772
45812
|
}, "rankingContextRange");
|
|
45773
45813
|
|
|
45774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45814
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
45775
45815
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
45776
45816
|
let counts;
|
|
45777
45817
|
try {
|
|
@@ -46066,7 +46106,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
46066
46106
|
});
|
|
46067
46107
|
}, "rankQuery");
|
|
46068
46108
|
|
|
46069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
46070
46110
|
function fail2(message3, reason = "query.too-large") {
|
|
46071
46111
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
46072
46112
|
}
|
|
@@ -46243,7 +46283,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
46243
46283
|
return result;
|
|
46244
46284
|
}), "adminStatisticsQuery");
|
|
46245
46285
|
|
|
46246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
46247
46287
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
46248
46288
|
if (!execution.accounts.length)
|
|
46249
46289
|
return { conversations: [], chats: [] };
|
|
@@ -46261,7 +46301,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
46261
46301
|
return { conversations: conversations2, chats: chats2 };
|
|
46262
46302
|
}, "conversationEligibility");
|
|
46263
46303
|
|
|
46264
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46304
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
46265
46305
|
import { createHash as createHash10 } from "node:crypto";
|
|
46266
46306
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
46267
46307
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -46411,7 +46451,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
46411
46451
|
return result;
|
|
46412
46452
|
}, "rankingEvidence");
|
|
46413
46453
|
|
|
46414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46454
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
46415
46455
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
46416
46456
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
46417
46457
|
if (execution.corpus === "mail")
|
|
@@ -46432,7 +46472,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
46432
46472
|
};
|
|
46433
46473
|
}, "queriesStoreOver");
|
|
46434
46474
|
|
|
46435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46475
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
46436
46476
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
46437
46477
|
const { database, now: now2 } = context;
|
|
46438
46478
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -46471,10 +46511,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
46471
46511
|
}));
|
|
46472
46512
|
}, "chatEventsOf");
|
|
46473
46513
|
|
|
46474
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
46475
46515
|
import { createHash as createHash11 } from "node:crypto";
|
|
46476
46516
|
|
|
46477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
46478
46518
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
46479
46519
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
46480
46520
|
timeZone: zone,
|
|
@@ -46494,7 +46534,7 @@ var weekKey = /* @__PURE__ */ __name((day3) => {
|
|
|
46494
46534
|
return date3.toISOString().slice(0, 10);
|
|
46495
46535
|
}, "weekKey");
|
|
46496
46536
|
|
|
46497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
46498
46538
|
var RETENTION_TOLERANCE = 864e5;
|
|
46499
46539
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
46500
46540
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -46548,7 +46588,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
46548
46588
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
46549
46589
|
}, "retentionCohorts");
|
|
46550
46590
|
|
|
46551
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
46552
46592
|
var iso10 = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString(), "iso");
|
|
46553
46593
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
46554
46594
|
validateRetentionOptions(options);
|
|
@@ -46679,7 +46719,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
46679
46719
|
};
|
|
46680
46720
|
}, "retentionQuery");
|
|
46681
46721
|
|
|
46682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46722
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
46683
46723
|
var iso11 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
46684
46724
|
var marksOf = /* @__PURE__ */ __name(({ isBot: isBot2, flagged, deleted, hasPhoto }) => ({
|
|
46685
46725
|
...isBot2 === void 0 ? {} : { bot: isBot2 },
|
|
@@ -46808,7 +46848,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
46808
46848
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
46809
46849
|
})), "trackedChats");
|
|
46810
46850
|
|
|
46811
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46851
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
46812
46852
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
46813
46853
|
const { database } = context;
|
|
46814
46854
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -46864,7 +46904,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46864
46904
|
};
|
|
46865
46905
|
}, "rosterStoreOver");
|
|
46866
46906
|
|
|
46867
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
46868
46908
|
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");
|
|
46869
46909
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
46870
46910
|
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 ?`);
|
|
@@ -46888,7 +46928,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
46888
46928
|
}
|
|
46889
46929
|
}, "backfillNormalized");
|
|
46890
46930
|
|
|
46891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
46892
46932
|
var INDEX2 = "message_words";
|
|
46893
46933
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
46894
46934
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -47015,7 +47055,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
47015
47055
|
});
|
|
47016
47056
|
}, "resetSearchIndex");
|
|
47017
47057
|
|
|
47018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
47019
47059
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
47020
47060
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
47021
47061
|
const before2 = stemsState(database);
|
|
@@ -47110,7 +47150,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
47110
47150
|
return resetStems(database, { now: now2 });
|
|
47111
47151
|
}, "followDefaultStemmers");
|
|
47112
47152
|
|
|
47113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
47114
47154
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
47115
47155
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
47116
47156
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -47132,7 +47172,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
47132
47172
|
});
|
|
47133
47173
|
}, "termCandidates");
|
|
47134
47174
|
|
|
47135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
47136
47176
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
47137
47177
|
const { database } = context;
|
|
47138
47178
|
const stemmerFor2 = stemmerCache();
|
|
@@ -47156,7 +47196,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47156
47196
|
};
|
|
47157
47197
|
}, "searchIndexStoreOver");
|
|
47158
47198
|
|
|
47159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47199
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
47160
47200
|
var HISTORY_KEPT = 1e3;
|
|
47161
47201
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
47162
47202
|
var COLUMNS6 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -47226,7 +47266,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
47226
47266
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
47227
47267
|
}, "clearHistory");
|
|
47228
47268
|
|
|
47229
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
47230
47270
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
47231
47271
|
const { database } = context;
|
|
47232
47272
|
return {
|
|
@@ -47250,7 +47290,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47250
47290
|
};
|
|
47251
47291
|
}, "searchesStoreOver");
|
|
47252
47292
|
|
|
47253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
47254
47294
|
import { createHash as createHash12 } from "node:crypto";
|
|
47255
47295
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
47256
47296
|
var TEXT_COLUMNS = "kind = ?, title = ?, file_name = ?, extension = ?, url = ?, mime = ?, size = ?, content_hash = ?, body = ?, extraction = ?, metadata = ?, language = ?";
|
|
@@ -47492,7 +47532,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
47492
47532
|
};
|
|
47493
47533
|
}, "addedSourcesOver");
|
|
47494
47534
|
|
|
47495
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
47496
47536
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
47497
47537
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
47498
47538
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -47540,7 +47580,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
47540
47580
|
};
|
|
47541
47581
|
}, "agentActionsStoreOver");
|
|
47542
47582
|
|
|
47543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47583
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/base-suggest.js
|
|
47544
47584
|
var baseSettingKey = /* @__PURE__ */ __name((kind3) => `stages.base.${kind3}`, "baseSettingKey");
|
|
47545
47585
|
var storedPipeline = /* @__PURE__ */ __name((value) => {
|
|
47546
47586
|
if (typeof value !== "string")
|
|
@@ -47586,7 +47626,7 @@ var suggestBaseStages = /* @__PURE__ */ __name((database, kind3, pipelines2, { o
|
|
|
47586
47626
|
}
|
|
47587
47627
|
}, "suggestBaseStages");
|
|
47588
47628
|
|
|
47589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47629
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
47590
47630
|
import { createHash as createHash13 } from "node:crypto";
|
|
47591
47631
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
47592
47632
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -47917,7 +47957,7 @@ var fieldReferences = /* @__PURE__ */ __name((record4, options = {}) => {
|
|
|
47917
47957
|
return found2;
|
|
47918
47958
|
}, "fieldReferences");
|
|
47919
47959
|
|
|
47920
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47960
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
47921
47961
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
47922
47962
|
var SOURCE = "crm";
|
|
47923
47963
|
var crmIdentityId = /* @__PURE__ */ __name((key2, externalId, type = "contact") => `${idPart(key2.account)}/${type}/${idPart(externalId)}`, "crmIdentityId");
|
|
@@ -48048,7 +48088,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
48048
48088
|
return { savePipeline, saveItemRow };
|
|
48049
48089
|
}, "crmRowsOver");
|
|
48050
48090
|
|
|
48051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48091
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activities.js
|
|
48052
48092
|
var ACTIVITY_RECORD = "crm.activity";
|
|
48053
48093
|
var MOST_BODY = 2e4;
|
|
48054
48094
|
var MOST_SUBJECT = 500;
|
|
@@ -48128,7 +48168,7 @@ var crmActivitiesOver = /* @__PURE__ */ __name((context) => {
|
|
|
48128
48168
|
return { save: save2, of };
|
|
48129
48169
|
}, "crmActivitiesOver");
|
|
48130
48170
|
|
|
48131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
48132
48172
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
48133
48173
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, cutoff) => {
|
|
48134
48174
|
const rows = database.prepare(`SELECT stage_id, currency, count(*) AS items, coalesce(sum(amount), 0) AS units FROM ${TABLES3[kind3]} WHERE stage_id IN (${stageIds.map(() => "?").join(", ") || "NULL"}) AND deleted_at IS NULL AND (? IS NULL OR created_at >= ?) GROUP BY stage_id, currency ORDER BY currency`).all(...stageIds, cutoff, cutoff);
|
|
@@ -48145,7 +48185,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, cuto
|
|
|
48145
48185
|
});
|
|
48146
48186
|
}, "stageAmountsOf");
|
|
48147
48187
|
|
|
48148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
48149
48189
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
48150
48190
|
var itemsSql = /* @__PURE__ */ __name((kind3) => `SELECT d.*, s.name AS stage_name, s.pipeline_id, p.name AS pipeline_name, b.name AS author_name, b.kind AS author_kind, a.provider AS account_provider, a.external_id AS account_external_id, bs.id AS base_stage_ref_id, bs.name AS base_stage_name FROM ${TABLES4[kind3]} d JOIN pipeline_stages s ON s.id = d.stage_id JOIN pipelines p ON p.id = s.pipeline_id LEFT JOIN bots b ON d.author_type = 'bot' AND b.id = d.author_id LEFT JOIN accounts a ON a.id = d.account_id LEFT JOIN pipeline_stages bs ON s.base_confirmed = 1 AND bs.id = s.base_stage_id`, "itemsSql");
|
|
48151
48191
|
var MAX_STAGES = 30;
|
|
@@ -48624,7 +48664,7 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48624
48664
|
};
|
|
48625
48665
|
}, "dealsStoreOver");
|
|
48626
48666
|
|
|
48627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48667
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
48628
48668
|
var KEY2 = "ownerLanguages";
|
|
48629
48669
|
var ISO_639_1 = new Set("aa ab ae af ak am an ar as av ay az ba be bg bi bm bn bo br bs ca ce ch co cr cs cu cv cy da de dv dz ee el en eo es et eu fa ff fi fj fo fr fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mr ms mt my na nb nd ne ng nl nn no nr nv ny oc oj om or os pa pi pl ps pt qu rm rn ro ru rw sa sc sd se sg si sk sl sm sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zu".split(" "));
|
|
48630
48670
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -48654,7 +48694,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
48654
48694
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(KEY2, JSON.stringify(languages), now2);
|
|
48655
48695
|
}, "saveOwnerLanguages");
|
|
48656
48696
|
|
|
48657
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48697
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/base-stages.js
|
|
48658
48698
|
var OUTCOMES = {
|
|
48659
48699
|
lead: ["open", "open", "open", "won", "lost"],
|
|
48660
48700
|
deal: ["open", "open", "open", "open", "won", "lost"]
|
|
@@ -48987,7 +49027,7 @@ var baseStagesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48987
49027
|
};
|
|
48988
49028
|
}, "baseStagesStoreOver");
|
|
48989
49029
|
|
|
48990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49030
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
48991
49031
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
48992
49032
|
}) => {
|
|
48993
49033
|
const { database, now: now2 } = context;
|
|
@@ -49046,7 +49086,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
49046
49086
|
};
|
|
49047
49087
|
}, "botUpdateStoreOver");
|
|
49048
49088
|
|
|
49049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
49050
49090
|
var IMPORTER = { bot: "import" };
|
|
49051
49091
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
49052
49092
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -49091,7 +49131,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
49091
49131
|
};
|
|
49092
49132
|
}), "moneyLinesOf");
|
|
49093
49133
|
|
|
49094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/relation-role-labels.js
|
|
49095
49135
|
var label = /* @__PURE__ */ __name((en, ru, es) => ({ en, ru, es }), "label");
|
|
49096
49136
|
var ROLE_LABELS = {
|
|
49097
49137
|
organization: {
|
|
@@ -49132,7 +49172,7 @@ var ROLE_LABELS = {
|
|
|
49132
49172
|
}
|
|
49133
49173
|
};
|
|
49134
49174
|
|
|
49135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
49136
49176
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
49137
49177
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
49138
49178
|
var listOf2 = /* @__PURE__ */ __name((list2) => {
|
|
@@ -49216,7 +49256,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
49216
49256
|
};
|
|
49217
49257
|
}, "relationRolesOver");
|
|
49218
49258
|
|
|
49219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49259
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
49220
49260
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
49221
49261
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
49222
49262
|
var CRM_SCOPES = ["mine", "all"];
|
|
@@ -49411,7 +49451,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
49411
49451
|
return [{ setting: String(row2.key), value: settingValue(database, parsed4.key, parsed4.name) }];
|
|
49412
49452
|
}), "crmSettingsOf");
|
|
49413
49453
|
|
|
49414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49454
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
49415
49455
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
49416
49456
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
49417
49457
|
id: link3.id,
|
|
@@ -49742,7 +49782,7 @@ var positionOf = /* @__PURE__ */ __name((position2) => {
|
|
|
49742
49782
|
var changesOf = /* @__PURE__ */ __name((input) => {
|
|
49743
49783
|
const changes = {};
|
|
49744
49784
|
if (input.role !== void 0)
|
|
49745
|
-
changes.role = input.role === null ? null :
|
|
49785
|
+
changes.role = input.role === null ? null : roleOf4(input.role);
|
|
49746
49786
|
if (input.purpose !== void 0)
|
|
49747
49787
|
changes.purpose = input.purpose === null ? null : purposeOf(input.purpose);
|
|
49748
49788
|
if (input.position !== void 0)
|
|
@@ -49759,7 +49799,7 @@ var changesOf = /* @__PURE__ */ __name((input) => {
|
|
|
49759
49799
|
throw new CliError("validation_error", "a relationship update sets a role, a role note, an engagement level, a purpose, a position or its dates");
|
|
49760
49800
|
return changes;
|
|
49761
49801
|
}, "changesOf");
|
|
49762
|
-
var
|
|
49802
|
+
var roleOf4 = /* @__PURE__ */ __name((role) => {
|
|
49763
49803
|
const value = role.trim();
|
|
49764
49804
|
if (!value || value.length > 200)
|
|
49765
49805
|
throw new CliError("validation_error", "a role takes 1\u2013200 characters");
|
|
@@ -49771,7 +49811,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
49771
49811
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
49772
49812
|
}, "decidedOrigin");
|
|
49773
49813
|
|
|
49774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49814
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
49775
49815
|
var keyOf4 = /* @__PURE__ */ __name((kind3, fromType, fromId, toType, toId, role) => `${String(kind3)}|${String(fromType)}:${String(fromId)}|${String(toType)}:${String(toId)}|${role == null ? "" : String(role)}`, "keyOf");
|
|
49776
49816
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
49777
49817
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" }, onOutcome } = {}) => {
|
|
@@ -49909,7 +49949,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
49909
49949
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
49910
49950
|
}), "relationsStoreOver");
|
|
49911
49951
|
|
|
49912
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relationships.js
|
|
49913
49953
|
var importSource = /* @__PURE__ */ __name((provider) => `import:${provider}`, "importSource");
|
|
49914
49954
|
var noRelationships = /* @__PURE__ */ __name(() => ({
|
|
49915
49955
|
added: 0,
|
|
@@ -50099,7 +50139,7 @@ var recordRelationshipsOver = /* @__PURE__ */ __name((context) => {
|
|
|
50099
50139
|
return { report, placeOf: placeOf2, withdrawFrom };
|
|
50100
50140
|
}, "recordRelationshipsOver");
|
|
50101
50141
|
|
|
50102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
50103
50143
|
var CONTRACTS = "SELECT k.*, b.name AS author_name, b.kind AS author_kind FROM contracts k LEFT JOIN bots b ON k.author_type = 'bot' AND b.id = k.author_id";
|
|
50104
50144
|
var DAY_MS2 = 864e5;
|
|
50105
50145
|
var deadlineOf = /* @__PURE__ */ __name((expiration, days) => expiration === null || days === null ? null : new Date(Date.parse(`${expiration}T00:00:00Z`) - days * DAY_MS2).toISOString().slice(0, 10), "deadlineOf");
|
|
@@ -50258,7 +50298,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50258
50298
|
};
|
|
50259
50299
|
}, "contractsStoreOver");
|
|
50260
50300
|
|
|
50261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50301
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
50262
50302
|
var BUSINESS_FIND_MAX = 2001;
|
|
50263
50303
|
var party2 = /* @__PURE__ */ __name((kind3, id2, as) => `LEFT JOIN persons ${as}p ON ${kind3} = 'person' AND ${as}p.id = ${id2} AND ${as}p.owner = 0 LEFT JOIN organizations ${as}o ON ${kind3} = 'organization' AND ${as}o.id = ${id2} LEFT JOIN projects ${as}j ON ${kind3} = 'project' AND ${as}j.id = ${id2}`, "party");
|
|
50264
50304
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
@@ -50363,7 +50403,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
50363
50403
|
};
|
|
50364
50404
|
}, "businessSearchOver");
|
|
50365
50405
|
|
|
50366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
50367
50407
|
var DAY5 = 864e5;
|
|
50368
50408
|
var COUNTERPART_LINK = `EXISTS (SELECT 1 FROM links l WHERE l.from_type = 'event' AND l.from_id = e.id AND l.to_type = 'person' AND l.to_id = ? AND l.kind = ${linkKind("related-to")} AND l.role = '${COUNTERPART_ROLE}')`;
|
|
50369
50409
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -50473,7 +50513,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
50473
50513
|
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);
|
|
50474
50514
|
}, "listEvents");
|
|
50475
50515
|
|
|
50476
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
50477
50517
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
50478
50518
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
50479
50519
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -50530,7 +50570,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
50530
50570
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
50531
50571
|
}, "forgetCalendarRows");
|
|
50532
50572
|
|
|
50533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50573
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
50534
50574
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
50535
50575
|
id: Number(row2.id),
|
|
50536
50576
|
accountId: Number(row2.account_id),
|
|
@@ -51133,7 +51173,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51133
51173
|
};
|
|
51134
51174
|
}, "eventStoreOver");
|
|
51135
51175
|
|
|
51136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
51137
51177
|
var CATALOG_QUERY = defineQuery({
|
|
51138
51178
|
entity: "document",
|
|
51139
51179
|
backend: "sql",
|
|
@@ -51375,7 +51415,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
51375
51415
|
};
|
|
51376
51416
|
}, "catalogStoreOver");
|
|
51377
51417
|
|
|
51378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
51379
51419
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
51380
51420
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
51381
51421
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -51388,7 +51428,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
51388
51428
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
51389
51429
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
51390
51430
|
|
|
51391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51431
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
51392
51432
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
51393
51433
|
const { source: source2, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
51394
51434
|
signal?.throwIfAborted();
|
|
@@ -51487,7 +51527,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
51487
51527
|
});
|
|
51488
51528
|
}, "readMeetingContextEvidence");
|
|
51489
51529
|
|
|
51490
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
51491
51531
|
var corpora = {
|
|
51492
51532
|
message: {
|
|
51493
51533
|
table: "messages",
|
|
@@ -51726,7 +51766,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
51726
51766
|
}
|
|
51727
51767
|
}), "contextRecordsOver");
|
|
51728
51768
|
|
|
51729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51769
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-contacts.js
|
|
51730
51770
|
var PLACEHOLDER = /(?:^|\s)null(?:\s+#\d+)?(?=\s|$)/gi;
|
|
51731
51771
|
var withoutPlaceholder = /* @__PURE__ */ __name((name) => name.replace(PLACEHOLDER, " ").replace(/\s+/g, " ").trim() || null, "withoutPlaceholder");
|
|
51732
51772
|
var DryRun = class extends Error {
|
|
@@ -51803,7 +51843,7 @@ var removeCrmContacts = /* @__PURE__ */ __name((context, key2, { users, before:
|
|
|
51803
51843
|
}
|
|
51804
51844
|
}, "removeCrmContacts");
|
|
51805
51845
|
|
|
51806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-stage-entries.js
|
|
51807
51847
|
var STAGE_ENTRY_RECORD = "crm.stage-entry";
|
|
51808
51848
|
var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
51809
51849
|
const { database, now: now2 } = context;
|
|
@@ -51850,7 +51890,7 @@ var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
51850
51890
|
return { save: save2, pending, handled };
|
|
51851
51891
|
}, "crmStageEntriesOver");
|
|
51852
51892
|
|
|
51853
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
51854
51894
|
var PENDING = "crm:pending-relations";
|
|
51855
51895
|
var PENDING_DAYS = 30;
|
|
51856
51896
|
var PENDING_MOST = 5e3;
|
|
@@ -52359,10 +52399,10 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
52359
52399
|
};
|
|
52360
52400
|
}, "crmCopiesOver");
|
|
52361
52401
|
|
|
52362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
52363
52403
|
import { createHash as createHash14, randomBytes as randomBytes2 } from "node:crypto";
|
|
52364
52404
|
|
|
52365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52405
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
52366
52406
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
52367
52407
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
52368
52408
|
var CALLBACK_PREFIX = "wcr1:";
|
|
@@ -52376,7 +52416,7 @@ var callbackDataOf = /* @__PURE__ */ __name((token) => {
|
|
|
52376
52416
|
}, "callbackDataOf");
|
|
52377
52417
|
var parseCallbackData = /* @__PURE__ */ __name((data) => typeof data === "string" ? CALLBACK.exec(data)?.[1] : void 0, "parseCallbackData");
|
|
52378
52418
|
|
|
52379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
52380
52420
|
var digestOf = /* @__PURE__ */ __name((token) => createHash14("sha256").update(token).digest("hex"), "digestOf");
|
|
52381
52421
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
52382
52422
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -52475,7 +52515,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
52475
52515
|
};
|
|
52476
52516
|
}, "decisionRequestStoreOver");
|
|
52477
52517
|
|
|
52478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52518
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
52479
52519
|
var NOTE_FIELDS = [
|
|
52480
52520
|
"text",
|
|
52481
52521
|
"exact",
|
|
@@ -52916,7 +52956,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
52916
52956
|
};
|
|
52917
52957
|
}, "noteSearchOver");
|
|
52918
52958
|
|
|
52919
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52959
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
52920
52960
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
52921
52961
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
52922
52962
|
var EVENT_CORPUS = {
|
|
@@ -53048,7 +53088,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
53048
53088
|
};
|
|
53049
53089
|
}, "eventSearchOver");
|
|
53050
53090
|
|
|
53051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53091
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
53052
53092
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
53053
53093
|
try {
|
|
53054
53094
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -53060,7 +53100,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
53060
53100
|
}
|
|
53061
53101
|
}, "calendarMoment");
|
|
53062
53102
|
|
|
53063
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
53064
53104
|
var NAMED4 = "SELECT f.*, b.name AS author_name, b.kind AS author_kind FROM facts f LEFT JOIN bots b ON f.author_type = 'bot' AND b.id = f.author_id";
|
|
53065
53105
|
var iso13 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
53066
53106
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -53283,7 +53323,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
53283
53323
|
};
|
|
53284
53324
|
}, "factsStoreOver");
|
|
53285
53325
|
|
|
53286
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
53287
53327
|
var invalid4 = /* @__PURE__ */ __name((message3) => {
|
|
53288
53328
|
throw new CliError("validation_error", message3);
|
|
53289
53329
|
}, "invalid");
|
|
@@ -53451,7 +53491,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
53451
53491
|
return { snapshot: snapshot2, snapshotParts, previous, settle, keepWaiting, named: named2, sameDecision, create };
|
|
53452
53492
|
}, "findingsCoreOver");
|
|
53453
53493
|
|
|
53454
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53494
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
53455
53495
|
var stale = /* @__PURE__ */ __name(() => {
|
|
53456
53496
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
53457
53497
|
reason: "evidence-findings.stale"
|
|
@@ -53715,7 +53755,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
53715
53755
|
};
|
|
53716
53756
|
}, "evidenceFindingsStoreOver");
|
|
53717
53757
|
|
|
53718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53758
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
53719
53759
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
53720
53760
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
53721
53761
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -53769,7 +53809,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
53769
53809
|
}, "forPerson")
|
|
53770
53810
|
}), "involvementStoreOver");
|
|
53771
53811
|
|
|
53772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
53773
53813
|
var LABELLED = {
|
|
53774
53814
|
note: "note",
|
|
53775
53815
|
document: "document",
|
|
@@ -53781,7 +53821,7 @@ var LABELLED = {
|
|
|
53781
53821
|
account: "folder"
|
|
53782
53822
|
};
|
|
53783
53823
|
|
|
53784
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
53785
53825
|
import { createHash as createHash15 } from "node:crypto";
|
|
53786
53826
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
53787
53827
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -53867,7 +53907,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
53867
53907
|
};
|
|
53868
53908
|
}, "meetingProjectsStoreOver");
|
|
53869
53909
|
|
|
53870
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
53871
53911
|
var ORGANIZATIONS_QUERY = {
|
|
53872
53912
|
entity: "organization",
|
|
53873
53913
|
backend: "sql",
|
|
@@ -53908,7 +53948,7 @@ var REMINDERS_QUERY = {
|
|
|
53908
53948
|
})
|
|
53909
53949
|
};
|
|
53910
53950
|
|
|
53911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53951
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-categories.js
|
|
53912
53952
|
var OWN2 = "(SELECT id FROM organizations WHERE deleted_at IS NULL AND json_extract(metadata, '$.own') = 1)";
|
|
53913
53953
|
var EMPLOYED = "('employee', 'contractor', 'founder')";
|
|
53914
53954
|
var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now2) => {
|
|
@@ -53929,7 +53969,7 @@ var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now
|
|
|
53929
53969
|
return { sql: `EXISTS (SELECT 1 FROM links l WHERE ${where} AND ${usable})`, params: keys };
|
|
53930
53970
|
}, "categorySql");
|
|
53931
53971
|
|
|
53932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
53933
53973
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
53934
53974
|
id: String(row2.id),
|
|
53935
53975
|
ref: `organization:${row2.id}`,
|
|
@@ -53974,7 +54014,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
53974
54014
|
}), "setOwnOrganization")
|
|
53975
54015
|
}), "organizationsStoreOver");
|
|
53976
54016
|
|
|
53977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
53978
54018
|
var KINDS = RELATION_KINDS.map(linkKind).join(", ");
|
|
53979
54019
|
var ACCOUNT_ENDS = [
|
|
53980
54020
|
["deal", "deals"],
|
|
@@ -54076,14 +54116,14 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
54076
54116
|
return { items, hasMore: rows.length > limit };
|
|
54077
54117
|
}, "listRelations")
|
|
54078
54118
|
};
|
|
54079
|
-
function
|
|
54119
|
+
function roleOf5(kind3, from2, to, role) {
|
|
54080
54120
|
const fromThing = thingOf(database, from2);
|
|
54081
54121
|
const toThing = thingOf(database, to);
|
|
54082
54122
|
const roleList = fromThing && toThing && roleListOf(kind3, fromThing.type, toThing.type) || null;
|
|
54083
54123
|
const custom = role !== null && roleList !== null && !ROLE_LISTS[roleList].includes(role) && !ownerRolesOf(database, roleList).some(({ id: id2 }) => id2 === role);
|
|
54084
54124
|
return { roleList, custom };
|
|
54085
54125
|
}
|
|
54086
|
-
__name(
|
|
54126
|
+
__name(roleOf5, "roleOf");
|
|
54087
54127
|
function linkItem(id2, at2) {
|
|
54088
54128
|
const link3 = linkOf(database, database.prepare("SELECT * FROM links WHERE id = ?").get(id2));
|
|
54089
54129
|
if (!link3.from || !link3.to)
|
|
@@ -54092,7 +54132,7 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
54092
54132
|
return {
|
|
54093
54133
|
...relation,
|
|
54094
54134
|
source: "link",
|
|
54095
|
-
...
|
|
54135
|
+
...roleOf5(relation.kind, relation.from, relation.to, relation.role)
|
|
54096
54136
|
};
|
|
54097
54137
|
}
|
|
54098
54138
|
__name(linkItem, "linkItem");
|
|
@@ -54119,19 +54159,19 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
54119
54159
|
endsAt: iso17(payload.endsAt),
|
|
54120
54160
|
createdAt: action.createdAt,
|
|
54121
54161
|
source: "proposal",
|
|
54122
|
-
...
|
|
54162
|
+
...roleOf5(payload.kind, payload.from, payload.to, payload.role ?? null)
|
|
54123
54163
|
};
|
|
54124
54164
|
}
|
|
54125
54165
|
__name(proposalItem, "proposalItem");
|
|
54126
54166
|
}, "relationListOver");
|
|
54127
54167
|
|
|
54128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54168
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
54129
54169
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
54130
54170
|
...relationListOver(context),
|
|
54131
54171
|
...relationRolesOver(context)
|
|
54132
54172
|
}), "relationReadsOver");
|
|
54133
54173
|
|
|
54134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
54135
54175
|
var TABLES5 = { memory: "memories", fact: "facts" };
|
|
54136
54176
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
54137
54177
|
var DEFAULT_LIMIT = 500;
|
|
@@ -54374,16 +54414,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54374
54414
|
};
|
|
54375
54415
|
}, "sourceReviewStoreOver");
|
|
54376
54416
|
|
|
54377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
54378
54418
|
import { createHash as createHash18 } from "node:crypto";
|
|
54379
54419
|
|
|
54380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
54381
54421
|
import { createHash as createHash17 } from "node:crypto";
|
|
54382
54422
|
|
|
54383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
54384
54424
|
import { createHash as createHash16 } from "node:crypto";
|
|
54385
54425
|
|
|
54386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54426
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
54387
54427
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
54388
54428
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
54389
54429
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -54434,7 +54474,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
54434
54474
|
return input;
|
|
54435
54475
|
}, "consolidationApplyInput");
|
|
54436
54476
|
|
|
54437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54477
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
54438
54478
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
54439
54479
|
id: String(row2.id),
|
|
54440
54480
|
sourceId: String(row2.source_id),
|
|
@@ -54509,7 +54549,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
54509
54549
|
}, { beforeCommit: check3 });
|
|
54510
54550
|
}, "applyTagConsolidation");
|
|
54511
54551
|
|
|
54512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54552
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
54513
54553
|
var selections = [
|
|
54514
54554
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
54515
54555
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -54653,7 +54693,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
54653
54693
|
};
|
|
54654
54694
|
}, "previewRows");
|
|
54655
54695
|
|
|
54656
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54696
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
54657
54697
|
var kinds = ["project", "tag", "topic"];
|
|
54658
54698
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
54659
54699
|
if (signal?.aborted)
|
|
@@ -54917,7 +54957,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54917
54957
|
};
|
|
54918
54958
|
}, "vocabularyStoreOver");
|
|
54919
54959
|
|
|
54920
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54960
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
54921
54961
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
54922
54962
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
54923
54963
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -55468,7 +55508,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
55468
55508
|
return key2.padEnd(3, "X");
|
|
55469
55509
|
}, "projectKey");
|
|
55470
55510
|
|
|
55471
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
55472
55512
|
var DAY6 = 864e5;
|
|
55473
55513
|
var SETTING5 = "logs_pruned_at";
|
|
55474
55514
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY6, botUpdatePayloadsMs: 30 * DAY6 };
|
|
@@ -55495,7 +55535,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
55495
55535
|
};
|
|
55496
55536
|
}, "logPruner");
|
|
55497
55537
|
|
|
55498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
55499
55539
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
55500
55540
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
55501
55541
|
var invalid6 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -55871,7 +55911,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
55871
55911
|
}, "checkMailFindings");
|
|
55872
55912
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
55873
55913
|
|
|
55874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
55875
55915
|
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";
|
|
55876
55916
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
55877
55917
|
const { database, now: now2 } = context;
|
|
@@ -56086,7 +56126,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56086
56126
|
};
|
|
56087
56127
|
}, "ordersStoreOver");
|
|
56088
56128
|
|
|
56089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
56090
56130
|
var MAIL_EDITS = {
|
|
56091
56131
|
task: ["title", "type", "reason", "commitment", "project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence"],
|
|
56092
56132
|
fact: ["statement", "type", "reason", "subject", "project"],
|
|
@@ -56575,7 +56615,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
56575
56615
|
};
|
|
56576
56616
|
}, "mailFindingsStoreOver");
|
|
56577
56617
|
|
|
56578
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56618
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
56579
56619
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
56580
56620
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
56581
56621
|
reason: "meeting-findings.stale"
|
|
@@ -56788,7 +56828,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56788
56828
|
};
|
|
56789
56829
|
}, "meetingFindingsStoreOver");
|
|
56790
56830
|
|
|
56791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
56792
56832
|
var RANK_BATCH = 512;
|
|
56793
56833
|
var LIVE5 = "FROM chunks k JOIN meeting_transcripts t ON k.chunkable_type = 'meeting_transcript' AND t.id = k.chunkable_id JOIN meetings m ON m.id = t.meeting_id WHERE m.account_id = ? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL";
|
|
56794
56834
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -57059,7 +57099,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
57059
57099
|
}
|
|
57060
57100
|
}), "meetingVectorsOver");
|
|
57061
57101
|
|
|
57062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
57063
57103
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
57064
57104
|
var TEXTS = {
|
|
57065
57105
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -57160,7 +57200,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57160
57200
|
};
|
|
57161
57201
|
}, "sourceMentionStoreOver");
|
|
57162
57202
|
|
|
57163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
57164
57204
|
var TRANSACTIONS = "SELECT t.*, w.name AS wallet_name, b.name AS author_name, b.kind AS author_kind, (SELECT coalesce(sum(amount), 0) FROM transaction_splits WHERE transaction_id = t.id) AS split FROM financial_transactions t JOIN financial_accounts w ON w.id = t.financial_account_id LEFT JOIN bots b ON t.author_type = 'bot' AND b.id = t.author_id";
|
|
57165
57205
|
var MAX_SPLITS = 100;
|
|
57166
57206
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -57394,11 +57434,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57394
57434
|
};
|
|
57395
57435
|
}, "transactionsStoreOver");
|
|
57396
57436
|
|
|
57397
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57437
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
57398
57438
|
import { accessSync, constants, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
57399
57439
|
import { dirname as dirname2 } from "node:path";
|
|
57400
57440
|
|
|
57401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57441
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
57402
57442
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
57403
57443
|
var CLIENTS_SETTING = "clients";
|
|
57404
57444
|
var coreVersion = (() => {
|
|
@@ -57459,7 +57499,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
57459
57499
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
57460
57500
|
}, "refusalAdvice");
|
|
57461
57501
|
|
|
57462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
57463
57503
|
var GENERATED = [
|
|
57464
57504
|
{
|
|
57465
57505
|
"name": "20261010184427_initial",
|
|
@@ -58813,7 +58853,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
58813
58853
|
}
|
|
58814
58854
|
];
|
|
58815
58855
|
|
|
58816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
58817
58857
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
58818
58858
|
import { basename, dirname, join as join3, parse } from "node:path";
|
|
58819
58859
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -58844,7 +58884,7 @@ var tableBytes = /* @__PURE__ */ __name((database, tables) => {
|
|
|
58844
58884
|
}
|
|
58845
58885
|
}, "tableBytes");
|
|
58846
58886
|
var stampOf = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString().replace(/[:.]/g, "-"), "stampOf");
|
|
58847
|
-
var
|
|
58887
|
+
var attach2 = /* @__PURE__ */ __name((database, path) => database.prepare(`ATTACH DATABASE ? AS ${SCHEMA}`).run(path), "attach");
|
|
58848
58888
|
var takeRollbackCopy = /* @__PURE__ */ __name((database, { from: from2, to, tables, at: at2 }, { store, freeBytes = freeBytesOf, warn = /* @__PURE__ */ __name((line) => process.stderr.write(`${line}
|
|
58849
58889
|
`), "warn") }) => {
|
|
58850
58890
|
const dir = join3(dirname(store), "backups");
|
|
@@ -58861,7 +58901,7 @@ var takeRollbackCopy = /* @__PURE__ */ __name((database, { from: from2, to, tabl
|
|
|
58861
58901
|
}
|
|
58862
58902
|
path = join3(dir, `${parse(store).name}-rollback-schema-${from2}-${stampOf(at2)}.db`);
|
|
58863
58903
|
writeFileSync(path, "", { flag: "wx", mode: 384 });
|
|
58864
|
-
|
|
58904
|
+
attach2(database, path);
|
|
58865
58905
|
try {
|
|
58866
58906
|
database.exec("BEGIN IMMEDIATE");
|
|
58867
58907
|
try {
|
|
@@ -59002,7 +59042,7 @@ var restoreRows = /* @__PURE__ */ __name((database, table) => {
|
|
|
59002
59042
|
database.exec(`INSERT INTO main.${quote2(table)} (${into}) SELECT ${from2} FROM ${SCHEMA}.${quote2(table)}`);
|
|
59003
59043
|
}, "restoreRows");
|
|
59004
59044
|
var rollBack2 = /* @__PURE__ */ __name((database, path) => {
|
|
59005
|
-
|
|
59045
|
+
attach2(database, path);
|
|
59006
59046
|
let result;
|
|
59007
59047
|
try {
|
|
59008
59048
|
if (!tableIn(database, SCHEMA, "rollback_meta"))
|
|
@@ -59046,7 +59086,7 @@ var rollBack2 = /* @__PURE__ */ __name((database, path) => {
|
|
|
59046
59086
|
return { ...result, foreignKeyViolations };
|
|
59047
59087
|
}, "rollBack");
|
|
59048
59088
|
|
|
59049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
59050
59090
|
var V31_TABLES = [
|
|
59051
59091
|
"accounts",
|
|
59052
59092
|
"account_identities",
|
|
@@ -59211,7 +59251,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
59211
59251
|
return migrations;
|
|
59212
59252
|
}, "generatedMigrations");
|
|
59213
59253
|
|
|
59214
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
59215
59255
|
var MIGRATIONS = generatedMigrations();
|
|
59216
59256
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
59217
59257
|
version INTEGER PRIMARY KEY,
|
|
@@ -59308,7 +59348,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
59308
59348
|
}
|
|
59309
59349
|
}, "migrate");
|
|
59310
59350
|
|
|
59311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
59312
59352
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
59313
59353
|
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 ?");
|
|
59314
59354
|
if (pending.get(0, 1) === void 0)
|
|
@@ -59330,7 +59370,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
59330
59370
|
}
|
|
59331
59371
|
}, "fillJoinKeys");
|
|
59332
59372
|
|
|
59333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
59334
59374
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
59335
59375
|
refuseOwnerStoreInTests(path);
|
|
59336
59376
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -59344,8 +59384,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
59344
59384
|
}, "openSqlite");
|
|
59345
59385
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
59346
59386
|
quietSqliteWarning();
|
|
59347
|
-
const { drizzle } = await import("./node-
|
|
59348
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
59387
|
+
const { drizzle } = await import("./node-BZDMUFTW.js");
|
|
59388
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-SZQCCMV2.js");
|
|
59349
59389
|
const client = await nodeClient(path, { readOnly });
|
|
59350
59390
|
try {
|
|
59351
59391
|
if (!readOnly)
|
|
@@ -59359,8 +59399,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
59359
59399
|
}
|
|
59360
59400
|
}, "openUnderNode");
|
|
59361
59401
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
59362
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
59363
|
-
const { drizzle } = await import("./bun-
|
|
59402
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-6VPR2SVC.js");
|
|
59403
|
+
const { drizzle } = await import("./bun-PWMM6L45.js");
|
|
59364
59404
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
59365
59405
|
try {
|
|
59366
59406
|
if (!readOnly)
|
|
@@ -59374,7 +59414,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
59374
59414
|
}
|
|
59375
59415
|
}, "openUnderBun");
|
|
59376
59416
|
|
|
59377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
59378
59418
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
59379
59419
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
59380
59420
|
try {
|
|
@@ -59442,7 +59482,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
59442
59482
|
});
|
|
59443
59483
|
}, "movePaymentFacts");
|
|
59444
59484
|
|
|
59445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59485
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
59446
59486
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
59447
59487
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
59448
59488
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -59460,7 +59500,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
59460
59500
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
59461
59501
|
}, "assertReadCompatible");
|
|
59462
59502
|
|
|
59463
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
59464
59504
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
59465
59505
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
59466
59506
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -59506,7 +59546,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
59506
59546
|
});
|
|
59507
59547
|
}, "moveSuggestedLinks");
|
|
59508
59548
|
|
|
59509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
59510
59550
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
59511
59551
|
var TEST_PROVIDER = "chat";
|
|
59512
59552
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -59527,7 +59567,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
59527
59567
|
}
|
|
59528
59568
|
}, "purgeTestAccounts");
|
|
59529
59569
|
|
|
59530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
59531
59571
|
var BACKFILL_ON_OPEN = 5e3;
|
|
59532
59572
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
59533
59573
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -59639,7 +59679,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
59639
59679
|
}
|
|
59640
59680
|
}, "openStoreContext");
|
|
59641
59681
|
|
|
59642
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59682
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
59643
59683
|
var PRODUCTS = "SELECT c.*, b.name AS author_name, b.kind AS author_kind FROM catalog_items c LEFT JOIN bots b ON c.author_type = 'bot' AND b.id = c.author_id";
|
|
59644
59684
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
59645
59685
|
const { database, now: now2 } = context;
|
|
@@ -59747,13 +59787,13 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
59747
59787
|
};
|
|
59748
59788
|
}, "productsStoreOver");
|
|
59749
59789
|
|
|
59750
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59790
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
59751
59791
|
import { createHash as createHash20 } from "node:crypto";
|
|
59752
59792
|
|
|
59753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
59754
59794
|
import { createHash as createHash19 } from "node:crypto";
|
|
59755
59795
|
|
|
59756
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
59757
59797
|
var text6 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
59758
59798
|
var ref = text6(2048);
|
|
59759
59799
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -59823,7 +59863,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
59823
59863
|
}))
|
|
59824
59864
|
});
|
|
59825
59865
|
|
|
59826
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59866
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
59827
59867
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
59828
59868
|
var invalid9 = /* @__PURE__ */ __name((field4) => {
|
|
59829
59869
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -59956,7 +59996,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
59956
59996
|
return createHash19("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
59957
59997
|
}, "projectAnnotationsFingerprint");
|
|
59958
59998
|
|
|
59959
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
59960
60000
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
59961
60001
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
59962
60002
|
var targetSchema = strictObject({
|
|
@@ -60063,7 +60103,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
60063
60103
|
}, "planBoundProjectAnnotations");
|
|
60064
60104
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
60065
60105
|
|
|
60066
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60106
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
60067
60107
|
import { createHash as createHash21 } from "node:crypto";
|
|
60068
60108
|
var text7 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
60069
60109
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -60157,7 +60197,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
60157
60197
|
})).digest("hex");
|
|
60158
60198
|
}, "projectAnnotationSnapshotFingerprint");
|
|
60159
60199
|
|
|
60160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
60161
60201
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
60162
60202
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
60163
60203
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -60174,7 +60214,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
60174
60214
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
60175
60215
|
}, "projectAnnotationRequest");
|
|
60176
60216
|
|
|
60177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
60178
60218
|
var SnapshotBudget = class {
|
|
60179
60219
|
static {
|
|
60180
60220
|
__name(this, "SnapshotBudget");
|
|
@@ -60200,13 +60240,13 @@ var SnapshotBudget = class {
|
|
|
60200
60240
|
}
|
|
60201
60241
|
};
|
|
60202
60242
|
|
|
60203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
60204
60244
|
import { createHash as createHash23 } from "node:crypto";
|
|
60205
60245
|
|
|
60206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60246
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
60207
60247
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
60208
60248
|
|
|
60209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
60210
60250
|
import { createHash as createHash22 } from "node:crypto";
|
|
60211
60251
|
var invalid11 = /* @__PURE__ */ __name(() => {
|
|
60212
60252
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -60349,7 +60389,7 @@ var ProjectSnapshotSources = class {
|
|
|
60349
60389
|
}
|
|
60350
60390
|
};
|
|
60351
60391
|
|
|
60352
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
60353
60393
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
60354
60394
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
60355
60395
|
}, "unsupported");
|
|
@@ -60527,7 +60567,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
60527
60567
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
60528
60568
|
}), "projectAnnotationSnapshot");
|
|
60529
60569
|
|
|
60530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
60531
60571
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
60532
60572
|
const current2 = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
60533
60573
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -60589,7 +60629,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
60589
60629
|
};
|
|
60590
60630
|
}), "previewAnnotationSnapshot");
|
|
60591
60631
|
|
|
60592
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
60593
60633
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
60594
60634
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
60595
60635
|
if (link3.kind === "evidence" && to)
|
|
@@ -60656,7 +60696,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
60656
60696
|
return mappings;
|
|
60657
60697
|
}, "restoreAnnotationRecords");
|
|
60658
60698
|
|
|
60659
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60699
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
60660
60700
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
60661
60701
|
async preview(request) {
|
|
60662
60702
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -60686,7 +60726,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
60686
60726
|
}
|
|
60687
60727
|
}), "projectAnnotationStoreOver");
|
|
60688
60728
|
|
|
60689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
60690
60730
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
60691
60731
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
60692
60732
|
const sql2 = /* @__PURE__ */ __name((text8) => database.prepare(text8), "sql");
|
|
@@ -60757,7 +60797,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
60757
60797
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
60758
60798
|
}, "recordRelationsOver");
|
|
60759
60799
|
|
|
60760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
60761
60801
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
60762
60802
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
60763
60803
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -60811,7 +60851,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
60811
60851
|
return { pointedAt, remap };
|
|
60812
60852
|
}, "recordRemapOver");
|
|
60813
60853
|
|
|
60814
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
60815
60855
|
var runs = 0;
|
|
60816
60856
|
var PAGE = 500;
|
|
60817
60857
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -61024,7 +61064,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
61024
61064
|
return pointerOf("records", index2, "fields", key2);
|
|
61025
61065
|
}, "waitingPointer");
|
|
61026
61066
|
|
|
61027
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
61028
61068
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
61029
61069
|
var SCHEME = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
61030
61070
|
var ORG_EMAIL = "org-email";
|
|
@@ -61190,7 +61230,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
61190
61230
|
]);
|
|
61191
61231
|
}, "renameMade");
|
|
61192
61232
|
|
|
61193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
61194
61234
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
61195
61235
|
name: given2(fields4, "name"),
|
|
61196
61236
|
unit: given2(fields4, "unit"),
|
|
@@ -61313,7 +61353,7 @@ var DIRECT_PROJECTORS = {
|
|
|
61313
61353
|
lead: dealProjector("lead")
|
|
61314
61354
|
};
|
|
61315
61355
|
|
|
61316
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-document.js
|
|
61317
61357
|
var TEXT_ONLY = { storage: "text", localPath: null };
|
|
61318
61358
|
var textOf7 = /* @__PURE__ */ __name(({ fields: fields4, externalId }) => {
|
|
61319
61359
|
const text8 = String(fields4.text ?? "");
|
|
@@ -61382,7 +61422,7 @@ var DOCUMENT_PROJECTORS = {
|
|
|
61382
61422
|
}
|
|
61383
61423
|
};
|
|
61384
61424
|
|
|
61385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
61386
61426
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
61387
61427
|
const importer = authorActor(context, IMPORTER).actor;
|
|
61388
61428
|
return context.database.prepare("SELECT 1 FROM payment_allocations WHERE payment_id = ? AND NOT (author_type = ? AND author_id = ?) LIMIT 1").get(paymentId, importer.type, importer.id) !== void 0;
|
|
@@ -61592,7 +61632,7 @@ var MONEY_PROJECTORS = {
|
|
|
61592
61632
|
}
|
|
61593
61633
|
};
|
|
61594
61634
|
|
|
61595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
61596
61636
|
var CALLS_CALENDAR = "calls";
|
|
61597
61637
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
61598
61638
|
if (!isImportedProvider(source2.provider))
|
|
@@ -61767,7 +61807,7 @@ var PHONE_PROJECTORS = {
|
|
|
61767
61807
|
}
|
|
61768
61808
|
};
|
|
61769
61809
|
|
|
61770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61810
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
61771
61811
|
var RECORD_PROJECTORS = {
|
|
61772
61812
|
...MONEY_PROJECTORS,
|
|
61773
61813
|
...DIRECT_PROJECTORS,
|
|
@@ -61778,7 +61818,7 @@ var RECORD_PROJECTORS = {
|
|
|
61778
61818
|
project: null
|
|
61779
61819
|
};
|
|
61780
61820
|
|
|
61781
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
61782
61822
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
61783
61823
|
const sql2 = /* @__PURE__ */ __name((text8) => database.prepare(text8), "sql");
|
|
61784
61824
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -61840,7 +61880,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
61840
61880
|
return { settle, checkShares };
|
|
61841
61881
|
}, "recordSettlingOver");
|
|
61842
61882
|
|
|
61843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
61844
61884
|
import { createHash as createHash24 } from "node:crypto";
|
|
61845
61885
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
61846
61886
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -61856,7 +61896,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
61856
61896
|
return { stamp, untouched };
|
|
61857
61897
|
}, "importStampsOver");
|
|
61858
61898
|
|
|
61859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
61860
61900
|
var SUBSCRIPTIONS = "SELECT s.*, b.name AS author_name, b.kind AS author_kind FROM subscriptions s LEFT JOIN bots b ON s.author_type = 'bot' AND b.id = s.author_id";
|
|
61861
61901
|
var PRICES = "SELECT p.*, b.name AS author_name, b.kind AS author_kind FROM subscription_prices p LEFT JOIN bots b ON p.author_type = 'bot' AND b.id = p.author_id";
|
|
61862
61902
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -62093,7 +62133,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62093
62133
|
};
|
|
62094
62134
|
}, "subscriptionsStoreOver");
|
|
62095
62135
|
|
|
62096
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
62097
62137
|
var WALLETS = "SELECT w.*, b.name AS author_name, b.kind AS author_kind FROM financial_accounts w LEFT JOIN bots b ON w.author_type = 'bot' AND b.id = w.author_id";
|
|
62098
62138
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
62099
62139
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -62218,7 +62258,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62218
62258
|
};
|
|
62219
62259
|
}, "walletsStoreOver");
|
|
62220
62260
|
|
|
62221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
62222
62262
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
62223
62263
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
62224
62264
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -62477,7 +62517,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
62477
62517
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
62478
62518
|
}, "recordWritesOver");
|
|
62479
62519
|
|
|
62480
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
62481
62521
|
var LIMIT = 1e3;
|
|
62482
62522
|
var iso16 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
62483
62523
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -62701,7 +62741,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62701
62741
|
};
|
|
62702
62742
|
}, "recordStoreOver");
|
|
62703
62743
|
|
|
62704
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62744
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/templates.js
|
|
62705
62745
|
var templateOf = /* @__PURE__ */ __name((row2) => ({
|
|
62706
62746
|
key: row2.key,
|
|
62707
62747
|
channel: row2.channel,
|
|
@@ -62756,7 +62796,7 @@ var storedTemplateBodies = /* @__PURE__ */ __name((database, key2, language) =>
|
|
|
62756
62796
|
return Object.fromEntries(rows.map((row2) => [row2.channel, row2.body]));
|
|
62757
62797
|
}, "storedTemplateBodies");
|
|
62758
62798
|
|
|
62759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62799
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
62760
62800
|
var refusalOf2 = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
62761
62801
|
var wrapped2 = /* @__PURE__ */ new WeakMap();
|
|
62762
62802
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -62791,7 +62831,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
62791
62831
|
return proxy;
|
|
62792
62832
|
}, "storeErrors");
|
|
62793
62833
|
|
|
62794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
62795
62835
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
62796
62836
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
62797
62837
|
let merged2 = { from: from2, to };
|
|
@@ -62804,7 +62844,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
62804
62844
|
}, "markRange");
|
|
62805
62845
|
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");
|
|
62806
62846
|
|
|
62807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62847
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
62808
62848
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
62809
62849
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
62810
62850
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -62825,7 +62865,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
62825
62865
|
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);
|
|
62826
62866
|
}, "setTaskAnalysisMark");
|
|
62827
62867
|
|
|
62828
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62868
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
62829
62869
|
var keyOf6 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
62830
62870
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
62831
62871
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf6(account));
|
|
@@ -62835,7 +62875,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
62835
62875
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf6(account), JSON.stringify(until), now2);
|
|
62836
62876
|
}, "setTaskRulesStop");
|
|
62837
62877
|
|
|
62838
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
62839
62879
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
62840
62880
|
const { database } = context;
|
|
62841
62881
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -62894,7 +62934,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62894
62934
|
};
|
|
62895
62935
|
}, "syncStoreOver");
|
|
62896
62936
|
|
|
62897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62937
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
62898
62938
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
62899
62939
|
const { database } = context;
|
|
62900
62940
|
return {
|
|
@@ -62916,7 +62956,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62916
62956
|
};
|
|
62917
62957
|
}, "tagsStoreOver");
|
|
62918
62958
|
|
|
62919
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62959
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
62920
62960
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
62921
62961
|
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
|
|
62922
62962
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -63043,7 +63083,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
63043
63083
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
63044
63084
|
}, "savePictureChunks");
|
|
63045
63085
|
|
|
63046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63086
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
63047
63087
|
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,
|
|
63048
63088
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
63049
63089
|
FROM messages m
|
|
@@ -63132,7 +63172,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
63132
63172
|
return plain2(best(found2));
|
|
63133
63173
|
}, "nearestMessages");
|
|
63134
63174
|
|
|
63135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
63136
63176
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
63137
63177
|
const { database } = context;
|
|
63138
63178
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -63391,7 +63431,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
63391
63431
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
63392
63432
|
}), "vectorsStoreOver");
|
|
63393
63433
|
|
|
63394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63434
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
63395
63435
|
import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
63396
63436
|
import { dirname as dirname3, join as join4 } from "node:path";
|
|
63397
63437
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -63479,10 +63519,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
63479
63519
|
}
|
|
63480
63520
|
}, "lastBackup");
|
|
63481
63521
|
|
|
63482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
63483
63523
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
63484
63524
|
|
|
63485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
63486
63526
|
var COUNTED_TABLES = [
|
|
63487
63527
|
"accounts",
|
|
63488
63528
|
"chats",
|
|
@@ -63567,7 +63607,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
63567
63607
|
};
|
|
63568
63608
|
}, "storeContents");
|
|
63569
63609
|
|
|
63570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
63571
63611
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
63572
63612
|
const context = await openStoreContext(options);
|
|
63573
63613
|
try {
|