@wirecat/bitrix24-cli 0.4.0 → 0.5.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/CHANGELOG.md +78 -0
- package/README.md +84 -9
- package/dist/api-keys.d.ts +18 -13
- package/dist/api-keys.d.ts.map +1 -1
- package/dist/api-keys.js +79 -22
- package/dist/api-keys.js.map +1 -1
- package/dist/bin/b24.js +2 -2
- package/dist/bitrix/errors.js +1 -1
- package/dist/bitrix/errors.js.map +1 -1
- package/dist/bitrix/transport.d.ts +1 -1
- package/dist/bitrix/transport.d.ts.map +1 -1
- package/dist/bitrix/transport.js +20 -6
- package/dist/bitrix/transport.js.map +1 -1
- package/dist/body.d.ts +14 -0
- package/dist/body.d.ts.map +1 -0
- package/dist/body.js +44 -0
- package/dist/body.js.map +1 -0
- package/dist/bundle/{chunk-JAS3OZSP.js → all-profiles-CANIDIDS.js} +12 -7
- package/dist/bundle/{anthropic-QCYLKSJJ.js → anthropic-JUJB4DCF.js} +5 -5
- package/dist/bundle/{app-server-FSLZ2Y6N.js → app-server-3V5Z4PTK.js} +68 -54
- package/dist/bundle/b24.js +18 -12
- package/dist/bundle/{bun-UYRQXF33.js → bun-LKMV5TY7.js} +2 -2
- package/dist/bundle/{bun-sqlite-GXME7EMT.js → bun-sqlite-S56EF74S.js} +3 -3
- package/dist/bundle/{chunk-D2IRPC5I.js → chunk-2I4KWS3H.js} +6 -6
- package/dist/bundle/chunk-36PO5NWY.js +147 -0
- package/dist/bundle/{chunk-COOOXDKZ.js → chunk-42F7Q7V6.js} +3 -3
- package/dist/bundle/{chunk-POUSZWMP.js → chunk-4D3K6GZW.js} +18 -4
- package/dist/bundle/chunk-5D4MJQ6X.js +22 -0
- package/dist/bundle/chunk-5JOPERVF.js +84 -0
- package/dist/bundle/chunk-6A4UPWDC.js +15 -0
- package/dist/bundle/{chunk-O7FVOICH.js → chunk-6MGWIZG4.js} +1 -1
- package/dist/bundle/{chunk-B252WFK7.js → chunk-6YJTNZ7U.js} +13 -13
- package/dist/bundle/{chunk-2D5W4LWL.js → chunk-7FBFJ6B4.js} +4 -2
- package/dist/bundle/chunk-7VCMOTQP.js +55 -0
- package/dist/bundle/{chunk-6BLVBGRK.js → chunk-A5IMMGYU.js} +36 -34
- package/dist/bundle/{chunk-66QLBRIT.js → chunk-ASEHTBNK.js} +1 -1
- package/dist/bundle/{chunk-MY6FAZRA.js → chunk-B6LPJYPQ.js} +2 -2
- package/dist/bundle/{chunk-EQLWU6ZB.js → chunk-BHEE2K6C.js} +7 -7
- package/dist/bundle/chunk-BYZQBE63.js +971 -0
- package/dist/bundle/{chunk-J7OMY6EO.js → chunk-COKGNTDQ.js} +1477 -723
- package/dist/bundle/{chunk-QVZSLBR6.js → chunk-DVFYRQGE.js} +1 -1
- package/dist/bundle/{chunk-Q7Z5IMVY.js → chunk-DVSIBZ3G.js} +1 -1
- package/dist/bundle/chunk-EJEIXC6Y.js +273 -0
- package/dist/bundle/chunk-EYTGCM44.js +130 -0
- package/dist/bundle/{chunk-SBW2Y7AZ.js → chunk-EYYOKT23.js} +26 -26
- package/dist/bundle/{chunk-Y5PPMGCS.js → chunk-FCWPIWSR.js} +2 -2
- package/dist/bundle/{chunk-AOUNT22U.js → chunk-FSWRMQWX.js} +2 -2
- package/dist/bundle/{chunk-ADLS6FVG.js → chunk-FXBHOCJK.js} +1 -1
- package/dist/bundle/chunk-G5MW6RCM.js +723 -0
- package/dist/bundle/{chunk-4OVK5XW2.js → chunk-GLTKRLFT.js} +8 -8
- package/dist/bundle/chunk-GUUZQ7NE.js +581 -0
- package/dist/bundle/{chunk-XOPMSWFC.js → chunk-H6RIPOOI.js} +36 -3
- package/dist/bundle/{chunk-GTMCLOYY.js → chunk-HGFNC4CR.js} +1447 -430
- package/dist/bundle/{chunk-IF27EQN6.js → chunk-IERYD2N2.js} +6 -6
- package/dist/bundle/{chunk-Q4ILKTV4.js → chunk-IGCLMEMB.js} +3 -3
- package/dist/bundle/{chunk-2IZ6GGU2.js → chunk-J7WCSZ2Q.js} +410 -918
- package/dist/bundle/{chunk-CR3TLGM4.js → chunk-JZYHQ4HB.js} +3 -3
- package/dist/bundle/{chunk-XR5SUCAC.js → chunk-K4QM3X5F.js} +4 -4
- package/dist/bundle/{chunk-OWILUBCI.js → chunk-KFSMY7SZ.js} +2 -2
- package/dist/bundle/{chunk-AMVRNYD6.js → chunk-KPEDH5T4.js} +1 -1
- package/dist/bundle/{chunk-NEK7LKC6.js → chunk-KUY7LII2.js} +4 -4
- package/dist/bundle/{chunk-NDSOBIR3.js → chunk-LFXDHLFR.js} +3 -3
- package/dist/bundle/{chunk-ZU4HXKEW.js → chunk-LGLT4JB6.js} +3 -3
- package/dist/bundle/{chunk-EIGPMMGC.js → chunk-LM4OOBAW.js} +3 -3
- package/dist/bundle/chunk-M74BSKMA.js +234 -0
- package/dist/bundle/{chunk-MPI2FDJ4.js → chunk-MMMT6ORT.js} +11 -11
- package/dist/bundle/{chunk-F5NH3UJQ.js → chunk-NGYD6QTE.js} +2 -2
- package/dist/bundle/{chunk-6ERX33NC.js → chunk-NO6QOPVT.js} +10 -19
- package/dist/bundle/chunk-O6XC7DZI.js +804 -0
- package/dist/bundle/chunk-OE3NFB53.js +64 -0
- package/dist/bundle/{chunk-VTIUWHZ3.js → chunk-OUMFNB34.js} +13 -149
- package/dist/bundle/{chunk-VMQL4GNH.js → chunk-P2RQTNVJ.js} +806 -850
- package/dist/bundle/{chunk-XKQZLR2X.js → chunk-PBIBGIZ7.js} +1 -1
- package/dist/bundle/{chunk-YFZXI3NN.js → chunk-Q6VQHTRW.js} +2 -2
- package/dist/bundle/{chunk-OKDC6CLH.js → chunk-QHBCNVUG.js} +5 -5
- package/dist/bundle/{chunk-WJRBX5QB.js → chunk-QNOXAQ6Y.js} +4 -4
- package/dist/bundle/{chunk-GTFRSYYJ.js → chunk-R5F2O5GX.js} +7 -269
- package/dist/bundle/{chunk-OCRCVLZQ.js → chunk-R5PBSKJL.js} +1 -1
- package/dist/bundle/{chunk-JB7OXYAU.js → chunk-RS2BARUU.js} +4 -4
- package/dist/bundle/chunk-TG3DSPT5.js +14 -0
- package/dist/bundle/{chunk-UH56WLDS.js → chunk-U22JMKUO.js} +6 -125
- package/dist/bundle/chunk-U66Q5TVK.js +106 -0
- package/dist/bundle/{chunk-NWKXMMON.js → chunk-UCHMQWON.js} +136 -33
- package/dist/bundle/{chunk-DQIQIZQS.js → chunk-VMJS7FJZ.js} +451 -433
- package/dist/bundle/{chunk-IWEWDVZ6.js → chunk-VMVAQHDC.js} +77 -615
- package/dist/bundle/{chunk-M5XMAUGZ.js → chunk-WWMCJFMT.js} +2 -2
- package/dist/bundle/{chunk-OYLJHX74.js → chunk-XTA5TN3H.js} +1 -1
- package/dist/bundle/{chunk-ELBOQHJA.js → chunk-XUHHBEA7.js} +652 -131
- package/dist/bundle/{chunk-BHZ5VDDY.js → chunk-YDZHO4LT.js} +13 -13
- package/dist/bundle/{chunk-NKLLI4B2.js → chunk-ZKINZFIT.js} +6 -6
- package/dist/bundle/{chunk-GTDOUP6L.js → chunk-ZSQXSIFQ.js} +85 -38
- package/dist/bundle/{chunk-LAYH344Y.js → chunk-ZZEHDIEG.js} +58 -54
- package/dist/bundle/command-contract-OQV6H7SR.js +36 -0
- package/dist/bundle/{decode-IF2F2SFC.js → decode-QSTBX4MG.js} +3 -3
- package/dist/bundle/{echarts-WDDVEJO2.js → echarts-JZELFH2N.js} +2 -2
- package/dist/bundle/{embed-VDUGYEAR.js → embed-4RIW2LVH.js} +4 -4
- package/dist/bundle/{embedder-DUN62H3Z.js → embedder-SW7DTWSL.js} +7 -7
- package/dist/bundle/{first-run-NDGYBQEN.js → first-run-7AISOSOM.js} +8 -8
- package/dist/bundle/first-screen-NMHNFZ2B.js +34 -0
- package/dist/bundle/{instructions-JIIKWS7X.js → instructions-BZE5YUGG.js} +1 -1
- package/dist/bundle/{mcp-33JX6KP4.js → mcp-SDWHDJTY.js} +2 -2
- package/dist/bundle/{node-P4E63KXA.js → node-KM3CUABH.js} +9 -9
- package/dist/bundle/{node-K57WT42O.js → node-LTKZIO4U.js} +2 -2
- package/dist/bundle/{node-sqlite-KS6ORRIG.js → node-sqlite-HQ5PN2RH.js} +4 -4
- package/dist/bundle/{oauth-SLSANN37.js → oauth-UH6FOZQL.js} +5 -5
- package/dist/bundle/{open-WJPHADEX.js → open-TSUP3XGL.js} +3 -3
- package/dist/bundle/{openai-HXB3GTOD.js → openai-GVEE52E3.js} +14 -14
- package/dist/bundle/{process-P73TFAXT.js → process-AGXY76ZE.js} +1 -1
- package/dist/bundle/{program-7BMG5NIN.js → program-BI4A4HFJ.js} +1045 -1048
- package/dist/bundle/{prompt-WDPV37R4.js → prompt-NRSUY7FA.js} +3 -3
- package/dist/bundle/{recognize-CXIFL6IV.js → recognize-NPDPQ6PJ.js} +2 -2
- package/dist/bundle/{remote-Q4VJ4OQW.js → remote-HFASMVLB.js} +5 -5
- package/dist/bundle/{rerank-SUFYK63I.js → rerank-TL6Z6F7K.js} +5 -5
- package/dist/bundle/{chunk-XG6QKS7L.js → serve-VB4DHDZQ.js} +8 -6
- package/dist/bundle/server-T5EDRPJI.js +68 -0
- package/dist/bundle/{chunk-K7XWCZF6.js → server-Z6MW6C37.js} +50 -14
- package/dist/bundle/source-4IGO5J7E.js +237 -0
- package/dist/bundle/sqlite-runtime-YS4POY3W.js +17 -0
- package/dist/bundle/{state-EZCCXQV7.js → state-ISZVVZGR.js} +4 -4
- package/dist/bundle/store-IZJBAKJV.js +58 -0
- package/dist/bundle/{store-MZ7JBYR6.js → store-L76MSQC3.js} +17 -12
- package/dist/bundle/store-PBTIB7BD.js +207 -0
- package/dist/bundle/store-maintenance-command-YFKII7TF.js +58 -0
- package/dist/bundle/writer-3O5EYMFE.js +214 -0
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/api.js +34 -33
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/crm-shared.d.ts +4 -0
- package/dist/commands/crm-shared.d.ts.map +1 -0
- package/dist/commands/crm-shared.js +94 -0
- package/dist/commands/crm-shared.js.map +1 -0
- package/dist/commands/crm-writes.d.ts +0 -1
- package/dist/commands/crm-writes.d.ts.map +1 -1
- package/dist/commands/crm-writes.js +31 -92
- package/dist/commands/crm-writes.js.map +1 -1
- package/dist/commands/crm.d.ts.map +1 -1
- package/dist/commands/crm.js +1 -45
- package/dist/commands/crm.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +1 -0
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/write.d.ts +1 -6
- package/dist/commands/write.d.ts.map +1 -1
- package/dist/commands/write.js +7 -16
- package/dist/commands/write.js.map +1 -1
- package/dist/config.d.ts +0 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +6 -9
- package/dist/config.js.map +1 -1
- package/dist/crm/capabilities.d.ts +7 -0
- package/dist/crm/capabilities.d.ts.map +1 -0
- package/dist/crm/capabilities.js +7 -0
- package/dist/crm/capabilities.js.map +1 -0
- package/dist/crm/conditions.d.ts +1 -1
- package/dist/crm/conditions.d.ts.map +1 -1
- package/dist/crm/conditions.js +3 -5
- package/dist/crm/conditions.js.map +1 -1
- package/dist/crm/custom-query.d.ts +1 -1
- package/dist/crm/custom-query.d.ts.map +1 -1
- package/dist/crm/custom-query.js +2 -2
- package/dist/crm/custom-query.js.map +1 -1
- package/dist/crm/deal.d.ts +4 -28
- package/dist/crm/deal.d.ts.map +1 -1
- package/dist/crm/deal.js +15 -48
- package/dist/crm/deal.js.map +1 -1
- package/dist/crm/fields.d.ts +2 -26
- package/dist/crm/fields.d.ts.map +1 -1
- package/dist/crm/fields.js +2 -67
- package/dist/crm/fields.js.map +1 -1
- package/dist/crm/items.d.ts.map +1 -1
- package/dist/crm/items.js +6 -5
- package/dist/crm/items.js.map +1 -1
- package/dist/crm/lead.d.ts +5 -37
- package/dist/crm/lead.d.ts.map +1 -1
- package/dist/crm/lead.js +15 -61
- package/dist/crm/lead.js.map +1 -1
- package/dist/crm/pipelines.d.ts +5 -0
- package/dist/crm/pipelines.d.ts.map +1 -0
- package/dist/crm/pipelines.js +54 -0
- package/dist/crm/pipelines.js.map +1 -0
- package/dist/crm/product.d.ts.map +1 -1
- package/dist/crm/product.js +2 -2
- package/dist/crm/product.js.map +1 -1
- package/dist/crm/rest3-fields.d.ts +3 -0
- package/dist/crm/rest3-fields.d.ts.map +1 -0
- package/dist/crm/rest3-fields.js +38 -0
- package/dist/crm/rest3-fields.js.map +1 -0
- package/dist/crm/source.d.ts +15 -0
- package/dist/crm/source.d.ts.map +1 -0
- package/dist/crm/source.js +122 -0
- package/dist/crm/source.js.map +1 -0
- package/dist/crm/user.d.ts.map +1 -1
- package/dist/crm/user.js +2 -2
- package/dist/crm/user.js.map +1 -1
- package/dist/crm/values.d.ts +19 -4
- package/dist/crm/values.d.ts.map +1 -1
- package/dist/crm/values.js +28 -2
- package/dist/crm/values.js.map +1 -1
- package/dist/crm/writer.d.ts +9 -0
- package/dist/crm/writer.d.ts.map +1 -0
- package/dist/crm/writer.js +119 -0
- package/dist/crm/writer.js.map +1 -0
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +51 -6
- package/dist/program.js.map +1 -1
- package/dist/store.d.ts +15 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +33 -0
- package/dist/store.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -6
- package/skills/bitrix24-cli/SKILL.md +16 -15
- package/dist/bundle/all-profiles-MBQZCOVK.js +0 -24
- package/dist/bundle/chunk-UCLWWSQK.js +0 -48
- package/dist/bundle/command-contract-UON4EIC4.js +0 -30
- package/dist/bundle/first-screen-QAVKP5RF.js +0 -28
- package/dist/bundle/mcp-57EQ6QJO.js +0 -171
- package/dist/bundle/mcp-PFJER2DE.js +0 -87
- package/dist/bundle/serve-B7PGFOC2.js +0 -19
- package/dist/bundle/server-4DBNJWW6.js +0 -58
- package/dist/bundle/server-OKE7SXJ2.js +0 -45
- package/dist/bundle/store-maintenance-command-T5QZMENJ.js +0 -47
- package/dist/commands/doctor.d.ts +0 -77
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -74
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/fields.d.ts +0 -3
- package/dist/commands/fields.d.ts.map +0 -1
- package/dist/commands/fields.js +0 -45
- package/dist/commands/fields.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -3
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -97
- package/dist/commands/mcp.js.map +0 -1
- package/dist/crm/pipeline.d.ts +0 -17
- package/dist/crm/pipeline.d.ts.map +0 -1
- package/dist/crm/pipeline.js +0 -42
- package/dist/crm/pipeline.js.map +0 -1
- package/dist/crm/stage.d.ts +0 -20
- package/dist/crm/stage.d.ts.map +0 -1
- package/dist/crm/stage.js +0 -65
- package/dist/crm/stage.js.map +0 -1
- package/dist/mcp.d.ts +0 -29
- package/dist/mcp.d.ts.map +0 -1
- package/dist/mcp.js +0 -102
- package/dist/mcp.js.map +0 -1
- /package/dist/bundle/{chunk-NDTJE6JQ.js → chunk-ZQ3GWKDQ.js} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/mcp/stdio-wire.js
|
|
8
8
|
import { PassThrough, Writable } from "node:stream";
|
|
9
9
|
var lineReader = /* @__PURE__ */ __name((onMessage) => {
|
|
10
10
|
let rest = "";
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
CliError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EYYOKT23.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/cli/input-policy.js
|
|
11
11
|
var MAX_BUFFERED_INPUT = 16 * 1024 * 1024;
|
|
12
12
|
var MAX_SECRET_INPUT = 64 * 1024;
|
|
13
13
|
var policies = /* @__PURE__ */ new WeakMap();
|
|
@@ -2,21 +2,21 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
storePath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KFSMY7SZ.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError,
|
|
8
8
|
resolvePaths,
|
|
9
9
|
singleLine
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EYYOKT23.js";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/store/shared-config.js
|
|
16
16
|
import { mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
17
17
|
import { dirname, join, resolve } from "node:path";
|
|
18
18
|
|
|
19
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/domain/task-categories.js
|
|
20
20
|
var DEFAULT_TASK_CATEGORIES = [
|
|
21
21
|
{
|
|
22
22
|
name: "taxes",
|
|
@@ -771,7 +771,7 @@ var storedTaskCategories = /* @__PURE__ */ __name((json) => {
|
|
|
771
771
|
}
|
|
772
772
|
}, "storedTaskCategories");
|
|
773
773
|
|
|
774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
774
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/store/shared-config.js
|
|
775
775
|
var SECTION = "task_categories";
|
|
776
776
|
var sharedConfigPath = /* @__PURE__ */ __name((store, env = process.env) => {
|
|
777
777
|
const paths = resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env });
|
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
wirecatDirectory
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KFSMY7SZ.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EYYOKT23.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/speech/models.js
|
|
14
14
|
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/csukuangfj/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
15
15
|
var gigaam = huggingFace("sherpa-onnx-nemo-transducer-punct-giga-am-v3-russian-2025-12-16", "a6039be7cee829a9044a69ac0ebaf1c191217c97");
|
|
16
16
|
var gigaamCtc = huggingFace("sherpa-onnx-nemo-ctc-punct-giga-am-v3-russian-2025-12-16", "4fb5407ff028a69fec516cdf4c10fac9ddea7c16");
|
|
@@ -137,7 +137,7 @@ var speechModel = /* @__PURE__ */ __name((id) => {
|
|
|
137
137
|
return model;
|
|
138
138
|
}, "speechModel");
|
|
139
139
|
|
|
140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/speech/install.js
|
|
141
141
|
import { createHash, randomUUID } from "node:crypto";
|
|
142
142
|
import { createReadStream, createWriteStream, mkdirSync, statSync } from "node:fs";
|
|
143
143
|
import { rename, rm } from "node:fs/promises";
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
formatMeetingReference,
|
|
5
5
|
moneyLabel,
|
|
6
6
|
parseMeetingReference
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-P2RQTNVJ.js";
|
|
8
8
|
import {
|
|
9
9
|
CliError,
|
|
10
10
|
singleLine
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EYYOKT23.js";
|
|
12
12
|
import {
|
|
13
13
|
__name
|
|
14
14
|
} from "./chunk-ZVVMGPBJ.js";
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/domain/deals.js
|
|
17
17
|
var DEAL_KINDS = ["deal", "lead"];
|
|
18
18
|
var DEAL_STATUSES = ["open", "won", "lost"];
|
|
19
19
|
var STAGE_OUTCOMES = DEAL_STATUSES;
|
|
@@ -23,7 +23,7 @@ var dealLine = /* @__PURE__ */ __name((deal) => {
|
|
|
23
23
|
return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
|
|
24
24
|
}, "dealLine");
|
|
25
25
|
|
|
26
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
27
27
|
var SCHEME = "msg:";
|
|
28
28
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
|
|
29
29
|
var isLocator = /* @__PURE__ */ __name((reference) => reference.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -37,7 +37,7 @@ var parseLocator = /* @__PURE__ */ __name((reference) => {
|
|
|
37
37
|
return { provider, account, chat, message };
|
|
38
38
|
}, "parseLocator");
|
|
39
39
|
|
|
40
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
41
41
|
var SIMPLE_REFERENCES = [
|
|
42
42
|
"note",
|
|
43
43
|
"document",
|
|
@@ -188,7 +188,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text) => {
|
|
|
188
188
|
return match !== null && byPrefix.has(match[1]);
|
|
189
189
|
}, "looksLikeReference");
|
|
190
190
|
|
|
191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
192
192
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
|
|
193
193
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
194
194
|
var PROVIDERS = [
|
|
@@ -304,259 +304,7 @@ var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
|
304
304
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
305
305
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
306
306
|
|
|
307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
308
|
-
import { createHash } from "node:crypto";
|
|
309
|
-
var RECORDS_SCHEMA_VERSION = 1;
|
|
310
|
-
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
311
|
-
var WORD2 = "^[a-z0-9][a-z0-9_-]{0,62}$";
|
|
312
|
-
var TYPE = "^(invoice|payment|person|organization|project|custom:[a-z0-9][a-z0-9_-]{0,62})$";
|
|
313
|
-
var MAX_ID = 512;
|
|
314
|
-
var MAX_RELATIONS = 100;
|
|
315
|
-
var DECIMAL = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
316
|
-
var RECORDS_ENVELOPE_SCHEMA = {
|
|
317
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
318
|
-
title: "WireCat records envelope, version 1",
|
|
319
|
-
description: "Records one source sends to the store. JSONL is the same model: the first line holds schema_version and source, each further line one record.",
|
|
320
|
-
type: "object",
|
|
321
|
-
required: ["schema_version", "source", "records"],
|
|
322
|
-
additionalProperties: false,
|
|
323
|
-
properties: {
|
|
324
|
-
schema_version: { const: RECORDS_SCHEMA_VERSION },
|
|
325
|
-
source: { $ref: "#/$defs/source" },
|
|
326
|
-
records: { type: "array", items: { $ref: "#/$defs/record" } }
|
|
327
|
-
},
|
|
328
|
-
$defs: {
|
|
329
|
-
source: {
|
|
330
|
-
type: "object",
|
|
331
|
-
required: ["provider", "account", "batch_id"],
|
|
332
|
-
additionalProperties: false,
|
|
333
|
-
properties: {
|
|
334
|
-
provider: { type: "string", pattern: WORD2, description: "The system the records come from" },
|
|
335
|
-
account: { type: "string", minLength: 1, maxLength: MAX_ID, description: "The account in that system" },
|
|
336
|
-
batch_id: { type: "string", minLength: 1, maxLength: MAX_ID, description: "This import, for the receipt" }
|
|
337
|
-
}
|
|
338
|
-
},
|
|
339
|
-
record: {
|
|
340
|
-
type: "object",
|
|
341
|
-
required: ["key", "type", "external_id", "operation"],
|
|
342
|
-
additionalProperties: false,
|
|
343
|
-
properties: {
|
|
344
|
-
key: { type: "string", minLength: 1, maxLength: MAX_ID },
|
|
345
|
-
type: { type: "string", pattern: TYPE },
|
|
346
|
-
external_id: { type: "string", minLength: 1, maxLength: MAX_ID },
|
|
347
|
-
operation: { enum: [...RECORD_OPERATIONS] },
|
|
348
|
-
fields: {
|
|
349
|
-
type: "object",
|
|
350
|
-
description: "What the source says, as data: never secrets, never instructions"
|
|
351
|
-
},
|
|
352
|
-
revision: { type: "integer", minimum: 0, maximum: Number.MAX_SAFE_INTEGER },
|
|
353
|
-
relations: { type: "array", maxItems: MAX_RELATIONS, items: { $ref: "#/$defs/relation" } }
|
|
354
|
-
}
|
|
355
|
-
},
|
|
356
|
-
relation: {
|
|
357
|
-
type: "object",
|
|
358
|
-
required: ["role", "type", "external_id"],
|
|
359
|
-
additionalProperties: false,
|
|
360
|
-
properties: {
|
|
361
|
-
role: { type: "string", pattern: WORD2 },
|
|
362
|
-
type: { type: "string", pattern: TYPE },
|
|
363
|
-
external_id: { type: "string", minLength: 1, maxLength: MAX_ID },
|
|
364
|
-
amount: {
|
|
365
|
-
type: "string",
|
|
366
|
-
pattern: DECIMAL,
|
|
367
|
-
description: "A settles relation's share of the payment, a decimal in its currency"
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
};
|
|
373
|
-
var wordPattern = new RegExp(WORD2);
|
|
374
|
-
var typePattern = new RegExp(TYPE);
|
|
375
|
-
var decimalPattern = new RegExp(DECIMAL);
|
|
376
|
-
var isObject = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isObject");
|
|
377
|
-
var escapePointer = /* @__PURE__ */ __name((segment) => String(segment).replaceAll("~", "~0").replaceAll("/", "~1"), "escapePointer");
|
|
378
|
-
var pointerOf = /* @__PURE__ */ __name((...segments) => segments.map((s) => `/${escapePointer(s)}`).join(""), "pointerOf");
|
|
379
|
-
var canonical = /* @__PURE__ */ __name((value) => {
|
|
380
|
-
if (Array.isArray(value))
|
|
381
|
-
return value.map(canonical);
|
|
382
|
-
if (!isObject(value))
|
|
383
|
-
return value;
|
|
384
|
-
return Object.fromEntries(Object.keys(value).sort().map((key) => [key, canonical(value[key])]));
|
|
385
|
-
}, "canonical");
|
|
386
|
-
var recordFingerprint = /* @__PURE__ */ __name((fields, relations) => createHash("sha256").update(JSON.stringify(canonical({
|
|
387
|
-
fields,
|
|
388
|
-
relations: relations.map((relation) => [
|
|
389
|
-
relation.role,
|
|
390
|
-
relation.type,
|
|
391
|
-
relation.external_id,
|
|
392
|
-
...relation.amount === void 0 ? [] : [relation.amount]
|
|
393
|
-
]).sort((a, b) => a.join("\0").localeCompare(b.join("\0")))
|
|
394
|
-
}))).digest("hex"), "recordFingerprint");
|
|
395
|
-
|
|
396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
397
|
-
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
398
|
-
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
399
|
-
var counterObservationTime = /* @__PURE__ */ __name((observation, now) => {
|
|
400
|
-
const at = Date.parse(observation.observedAt);
|
|
401
|
-
if (!validCounter(observation.value) || !Number.isSafeInteger(at) || at < 0 || at > now || !["remote_fetch", "remote_update"].includes(observation.source))
|
|
402
|
-
throw new CliError("validation_error", "counter observation needs a valid value, source and nonfuture observation time");
|
|
403
|
-
if (observation.reactions && (!validCounter(observation.reactions.total) || observation.reactions.total !== observation.value))
|
|
404
|
-
throw new CliError("validation_error", "reaction observation payload and total disagree");
|
|
405
|
-
return at;
|
|
406
|
-
}, "counterObservationTime");
|
|
407
|
-
var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
408
|
-
if (!states.length || states.every((one) => one.freshness === "unknown"))
|
|
409
|
-
return "unknown";
|
|
410
|
-
if (states.some((one) => one.freshness === "unknown"))
|
|
411
|
-
return "partial";
|
|
412
|
-
return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
|
|
413
|
-
}, "counterFreshness");
|
|
414
|
-
|
|
415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
416
|
-
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
417
|
-
var AUTHOR_MEASURES = [
|
|
418
|
-
"messages",
|
|
419
|
-
"words",
|
|
420
|
-
"reactions",
|
|
421
|
-
"replies",
|
|
422
|
-
"answers",
|
|
423
|
-
"answer-time",
|
|
424
|
-
"threads",
|
|
425
|
-
"active-days"
|
|
426
|
-
];
|
|
427
|
-
var CONTEXT = /* @__PURE__ */ new Set([
|
|
428
|
-
"replies",
|
|
429
|
-
"replies-from-others",
|
|
430
|
-
"replies-from-others-per-message",
|
|
431
|
-
"thread-size",
|
|
432
|
-
"threads",
|
|
433
|
-
"answers",
|
|
434
|
-
"answer-time"
|
|
435
|
-
]);
|
|
436
|
-
var needsRankingContext = /* @__PURE__ */ __name((options) => options.components.some((name) => CONTEXT.has(name)), "needsRankingContext");
|
|
437
|
-
var presets = {
|
|
438
|
-
helpful: { answers: 0.5, "replies-from-others": 0.25, reactions: 0.25 },
|
|
439
|
-
active: { "active-days": 0.6, messages: 0.4 },
|
|
440
|
-
engaging: { "reactions-per-message": 0.5, "replies-from-others-per-message": 0.5 }
|
|
441
|
-
};
|
|
442
|
-
function invalid2(message) {
|
|
443
|
-
throw new CliError("validation_error", message, { reason: "ranking.invalid" });
|
|
444
|
-
}
|
|
445
|
-
__name(invalid2, "invalid");
|
|
446
|
-
var rankingOptions = /* @__PURE__ */ __name((target, input) => {
|
|
447
|
-
const measures = target === "messages" ? MESSAGE_MEASURES : AUTHOR_MEASURES;
|
|
448
|
-
const { measure, score, weights: given, minMessages } = input;
|
|
449
|
-
const messageKind = input.messageKind ?? "all";
|
|
450
|
-
if (!["all", "posts", "comments"].includes(messageKind))
|
|
451
|
-
invalid2("message_kind takes all, posts or comments");
|
|
452
|
-
if (target === "messages" && minMessages !== void 0)
|
|
453
|
-
invalid2("min_messages applies to stats contacts top");
|
|
454
|
-
if (minMessages !== void 0 && (!Number.isSafeInteger(minMessages) || minMessages < 1))
|
|
455
|
-
invalid2("min_messages takes a positive integer");
|
|
456
|
-
if (measure !== void 0 && !measures.includes(measure))
|
|
457
|
-
invalid2(`--measure takes ${measures.join(", ")}`);
|
|
458
|
-
if (measure !== void 0 && (score !== void 0 || given !== void 0))
|
|
459
|
-
invalid2("--measure cannot be combined with --score or --weights");
|
|
460
|
-
if (score !== void 0 && !["helpful", "active", "engaging"].includes(score))
|
|
461
|
-
invalid2("--score takes helpful, active or engaging");
|
|
462
|
-
if (target === "messages" && score !== void 0 && score !== "engaging")
|
|
463
|
-
invalid2("helpful and active scores apply to authors only");
|
|
464
|
-
const scoring = score !== void 0 || given !== void 0;
|
|
465
|
-
const preset = score;
|
|
466
|
-
let weights = null;
|
|
467
|
-
if (scoring) {
|
|
468
|
-
let raw = given !== void 0 ? given : target === "messages" ? { reactions: 0.5, "replies-from-others": 0.5 } : presets[preset];
|
|
469
|
-
if (typeof raw === "string") {
|
|
470
|
-
try {
|
|
471
|
-
raw = JSON.parse(raw);
|
|
472
|
-
} catch {
|
|
473
|
-
invalid2("--weights takes a JSON object of component weights");
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
if (!raw || typeof raw !== "object" || Array.isArray(raw))
|
|
477
|
-
invalid2("--weights takes a JSON object of component weights");
|
|
478
|
-
const allowed = target === "messages" ? [...MESSAGE_MEASURES, "replies-from-others"] : [
|
|
479
|
-
...AUTHOR_MEASURES.filter((name) => name !== "answer-time"),
|
|
480
|
-
"replies-from-others",
|
|
481
|
-
"reactions-per-message",
|
|
482
|
-
"replies-from-others-per-message"
|
|
483
|
-
];
|
|
484
|
-
const entries = Object.entries(raw);
|
|
485
|
-
for (const [name, weight] of entries) {
|
|
486
|
-
if (!allowed.includes(name))
|
|
487
|
-
invalid2(`unknown ${target} score component: ${name}`);
|
|
488
|
-
if (typeof weight !== "number" || !Number.isFinite(weight) || weight < 0)
|
|
489
|
-
invalid2(`weight for ${name} must be a finite nonnegative number`);
|
|
490
|
-
}
|
|
491
|
-
if (!entries.some(([, weight]) => weight > 0))
|
|
492
|
-
invalid2("--weights needs at least one positive weight");
|
|
493
|
-
weights = Object.fromEntries(entries);
|
|
494
|
-
}
|
|
495
|
-
const selected = measure ?? (target === "messages" ? "reactions" : "messages");
|
|
496
|
-
return {
|
|
497
|
-
target,
|
|
498
|
-
messageKind,
|
|
499
|
-
minMessages: minMessages ?? (target === "contacts" && score === "engaging" ? 5 : 1),
|
|
500
|
-
measure: scoring ? "score" : selected,
|
|
501
|
-
order: !scoring && selected === "answer-time" ? "ascending" : "descending",
|
|
502
|
-
weights,
|
|
503
|
-
preset: scoring ? preset ?? "custom" : null,
|
|
504
|
-
components: weights === null ? [selected] : Object.entries(weights).filter(([, weight]) => weight > 0).map(([name]) => name)
|
|
505
|
-
};
|
|
506
|
-
}, "rankingOptions");
|
|
507
|
-
var rankingScore = /* @__PURE__ */ __name((raw, maxima, weights) => {
|
|
508
|
-
const entries = Object.entries(weights).filter(([, weight]) => weight > 0);
|
|
509
|
-
const scale = Math.max(...entries.map(([, weight]) => weight));
|
|
510
|
-
const denominator = entries.reduce((sum2, [, weight]) => sum2 + weight / scale, 0);
|
|
511
|
-
if (!Number.isFinite(scale) || scale <= 0 || !Number.isFinite(denominator) || denominator <= 0)
|
|
512
|
-
return null;
|
|
513
|
-
const normalized = {};
|
|
514
|
-
const contributions = {};
|
|
515
|
-
let sum = 0;
|
|
516
|
-
for (const [name, weight] of entries) {
|
|
517
|
-
const value = raw[name];
|
|
518
|
-
const maximum = maxima[name];
|
|
519
|
-
if (value == null || !Number.isFinite(value) || value < 0 || maximum === void 0 || !Number.isFinite(maximum) || maximum < value)
|
|
520
|
-
return null;
|
|
521
|
-
const part = maximum === 0 ? 0 : value / maximum;
|
|
522
|
-
normalized[name] = part;
|
|
523
|
-
contributions[name] = 100 * part * (weight / scale) / denominator;
|
|
524
|
-
sum += contributions[name];
|
|
525
|
-
}
|
|
526
|
-
return { score: Math.min(100, sum), normalized, contributions };
|
|
527
|
-
}, "rankingScore");
|
|
528
|
-
var RANKING_TOKENIZER_VERSION = 1;
|
|
529
|
-
var withoutUrls = /* @__PURE__ */ __name((text) => text.replace(/\S+/gu, (token) => {
|
|
530
|
-
for (let offset = 0; ; ) {
|
|
531
|
-
const marker = token.indexOf("://", offset);
|
|
532
|
-
if (marker < 0)
|
|
533
|
-
break;
|
|
534
|
-
let start = marker;
|
|
535
|
-
while (start > 0 && /[a-z0-9+.-]/iu.test(token[start - 1]))
|
|
536
|
-
start--;
|
|
537
|
-
if (/^[a-z][a-z0-9+.-]*$/iu.test(token.slice(start, marker)) && (start === 0 || !/\w/u.test(token[start - 1])))
|
|
538
|
-
return token.slice(0, start);
|
|
539
|
-
offset = marker + 3;
|
|
540
|
-
}
|
|
541
|
-
const folded = token.toLowerCase();
|
|
542
|
-
for (let offset = 0; ; ) {
|
|
543
|
-
const start = folded.indexOf("www.", offset);
|
|
544
|
-
if (start < 0)
|
|
545
|
-
break;
|
|
546
|
-
if (start === 0 || !/\w/u.test(token[start - 1]))
|
|
547
|
-
return token.slice(0, start);
|
|
548
|
-
offset = start + 4;
|
|
549
|
-
}
|
|
550
|
-
return token;
|
|
551
|
-
}), "withoutUrls");
|
|
552
|
-
var rankingWords = /* @__PURE__ */ __name((text) => withoutUrls(text).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
553
|
-
var rankingQuestion = /* @__PURE__ */ __name((text) => withoutUrls(text).includes("?"), "rankingQuestion");
|
|
554
|
-
|
|
555
307
|
export {
|
|
556
|
-
COUNTER_FIELDS,
|
|
557
|
-
validCounter,
|
|
558
|
-
counterObservationTime,
|
|
559
|
-
counterFreshness,
|
|
560
308
|
DEAL_KINDS,
|
|
561
309
|
DEAL_STATUSES,
|
|
562
310
|
STAGE_OUTCOMES,
|
|
@@ -585,15 +333,5 @@ export {
|
|
|
585
333
|
isKind,
|
|
586
334
|
providerNamed,
|
|
587
335
|
kindIn,
|
|
588
|
-
kindOf
|
|
589
|
-
MESSAGE_MEASURES,
|
|
590
|
-
AUTHOR_MEASURES,
|
|
591
|
-
needsRankingContext,
|
|
592
|
-
rankingOptions,
|
|
593
|
-
rankingScore,
|
|
594
|
-
RANKING_TOKENIZER_VERSION,
|
|
595
|
-
rankingWords,
|
|
596
|
-
rankingQuestion,
|
|
597
|
-
pointerOf,
|
|
598
|
-
recordFingerprint
|
|
336
|
+
kindOf
|
|
599
337
|
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-55XJMTPA.js
|
|
8
8
|
var entityKind = /* @__PURE__ */ Symbol.for("drizzle:entityKind");
|
|
9
9
|
var kindsByConstructor = /* @__PURE__ */ new WeakMap();
|
|
10
10
|
function collectKinds(ctor) {
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
readLock,
|
|
6
6
|
releaseLock,
|
|
7
7
|
takeLock
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IGCLMEMB.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
|
|
14
14
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
|
|
17
17
|
import { randomBytes } from "node:crypto";
|
|
18
18
|
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { dirname } from "node:path";
|
|
@@ -86,7 +86,7 @@ var activityRecorder = /* @__PURE__ */ __name((path, now = Date.now) => {
|
|
|
86
86
|
};
|
|
87
87
|
}, "activityRecorder");
|
|
88
88
|
|
|
89
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
89
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
|
|
90
90
|
var ACCESS_SECONDS = 60 * 60;
|
|
91
91
|
var REFRESH_SECONDS = 30 * 24 * 60 * 60;
|
|
92
92
|
var readStored = /* @__PURE__ */ __name((path) => existsSync2(path) ? JSON.parse(readFileSync2(path, "utf8")) : { clients: [], tokens: [] }, "readStored");
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
__name
|
|
5
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
6
|
+
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/domain/crm.js
|
|
8
|
+
var CRM_KINDS = ["organization", "person", "deal", "lead"];
|
|
9
|
+
var isItemKind = /* @__PURE__ */ __name((kind) => kind === "deal" || kind === "lead", "isItemKind");
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
CRM_KINDS,
|
|
13
|
+
isItemKind
|
|
14
|
+
};
|
|
@@ -2,13 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
LEVELS
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
looksLikeReference,
|
|
8
|
-
parseReference,
|
|
9
|
-
providerLabel,
|
|
10
|
-
providerNamed
|
|
11
|
-
} from "./chunk-GTFRSYYJ.js";
|
|
5
|
+
} from "./chunk-OUMFNB34.js";
|
|
12
6
|
import {
|
|
13
7
|
CliError,
|
|
14
8
|
array,
|
|
@@ -25,19 +19,18 @@ import {
|
|
|
25
19
|
regex,
|
|
26
20
|
resolvePaths,
|
|
27
21
|
safeParse,
|
|
28
|
-
singleLine,
|
|
29
22
|
strictObject,
|
|
30
23
|
string,
|
|
31
24
|
transform,
|
|
32
25
|
unknown,
|
|
33
26
|
visibleControls,
|
|
34
27
|
writeSecurely
|
|
35
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-EYYOKT23.js";
|
|
36
29
|
import {
|
|
37
30
|
__name
|
|
38
31
|
} from "./chunk-ZVVMGPBJ.js";
|
|
39
32
|
|
|
40
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
41
34
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
42
35
|
var validateFormattedText = /* @__PURE__ */ __name((formatted) => {
|
|
43
36
|
const { text, spans } = formatted;
|
|
@@ -97,7 +90,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted) => {
|
|
|
97
90
|
};
|
|
98
91
|
}, "visibleFormattedText");
|
|
99
92
|
|
|
100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
93
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
101
94
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
102
95
|
var LINK = /https?:\/\/\S+/i;
|
|
103
96
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -285,7 +278,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
285
278
|
}, "nextPoint");
|
|
286
279
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
287
280
|
|
|
288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
289
282
|
import { existsSync, readFileSync } from "node:fs";
|
|
290
283
|
import { join } from "node:path";
|
|
291
284
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -428,111 +421,6 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
428
421
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
429
422
|
}, "assign");
|
|
430
423
|
|
|
431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
432
|
-
var TAKES = {
|
|
433
|
-
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
434
|
-
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
435
|
-
};
|
|
436
|
-
var article = /* @__PURE__ */ __name((word) => /^[aeiou]/.test(word) ? "an" : "a", "article");
|
|
437
|
-
var wrongKind = /* @__PURE__ */ __name((text, kind, takes) => new CliError("validation_error", `${text} names ${article(kind)} ${kind}; this takes ${TAKES[takes]}`, {
|
|
438
|
-
reason: "ref.wrong-kind"
|
|
439
|
-
}), "wrongKind");
|
|
440
|
-
var wrongProvider = /* @__PURE__ */ __name((text, provider, kind) => {
|
|
441
|
-
const entry = providerNamed(provider);
|
|
442
|
-
const command = entry?.command;
|
|
443
|
-
const opens = kind === "entity" ? void 0 : entry?.opens?.[kind];
|
|
444
|
-
const how = command && opens ? `open it with ${command} <profile> ${opens} ${text}` : "open it with its own CLI";
|
|
445
|
-
const label = providerLabel(provider);
|
|
446
|
-
return new CliError("validation_error", `${text} is ${article(label.toLowerCase())} ${label} ${kind}; ${how}`, {
|
|
447
|
-
reason: "ref.wrong-provider"
|
|
448
|
-
});
|
|
449
|
-
}, "wrongProvider");
|
|
450
|
-
var chatReferenceOf = /* @__PURE__ */ __name((text, provider, takes = "chat") => {
|
|
451
|
-
const trimmed = text.trim();
|
|
452
|
-
if (!looksLikeReference(trimmed))
|
|
453
|
-
return void 0;
|
|
454
|
-
const reference = parseReference(trimmed);
|
|
455
|
-
if (reference.type !== "chat" && reference.type !== "message")
|
|
456
|
-
throw wrongKind(trimmed, reference.type, takes);
|
|
457
|
-
if (reference.provider !== provider)
|
|
458
|
-
throw wrongProvider(trimmed, reference.provider, reference.type);
|
|
459
|
-
const found = {
|
|
460
|
-
text: trimmed,
|
|
461
|
-
provider: reference.provider,
|
|
462
|
-
account: reference.account,
|
|
463
|
-
chat: reference.chat,
|
|
464
|
-
...reference.type === "message" ? { message: reference.message } : {}
|
|
465
|
-
};
|
|
466
|
-
return found;
|
|
467
|
-
}, "chatReferenceOf");
|
|
468
|
-
var contactReferenceOf = /* @__PURE__ */ __name((text, provider) => {
|
|
469
|
-
const trimmed = text.trim();
|
|
470
|
-
if (!trimmed.startsWith("contact:"))
|
|
471
|
-
return void 0;
|
|
472
|
-
const reference = parseReference(trimmed);
|
|
473
|
-
if (reference.type !== "contact")
|
|
474
|
-
return void 0;
|
|
475
|
-
if (provider !== void 0 && reference.provider !== provider)
|
|
476
|
-
throw wrongProvider(trimmed, reference.provider, reference.type);
|
|
477
|
-
return reference.id;
|
|
478
|
-
}, "contactReferenceOf");
|
|
479
|
-
var wrongAccount = /* @__PURE__ */ __name((reference, scope, profiles) => {
|
|
480
|
-
const here = scope.account === void 0 ? "the account of this profile is not known yet" : `${scope.profile === void 0 ? "this profile" : `profile ${scope.profile}`} is account ${scope.account}`;
|
|
481
|
-
const others = profiles === void 0 ? "" : `. Profiles signed in to ${reference.account}: ${profiles.length > 0 ? profiles.join(", ") : "none here"}`;
|
|
482
|
-
return new CliError("validation_error", `${reference.text} belongs to account ${reference.account}; ${here}${others}`, { reason: "ref.wrong-account" });
|
|
483
|
-
}, "wrongAccount");
|
|
484
|
-
var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn) => {
|
|
485
|
-
if (scope.account !== void 0 && scope.account === reference.account)
|
|
486
|
-
return;
|
|
487
|
-
const profiles = await profilesOn?.(reference.account).catch(() => void 0);
|
|
488
|
-
throw wrongAccount(reference, scope, profiles);
|
|
489
|
-
}, "ensureAccount");
|
|
490
|
-
|
|
491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
492
|
-
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
493
|
-
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase(), "foldName");
|
|
494
|
-
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
495
|
-
const wanted = foldName(reference.trim());
|
|
496
|
-
const matches = chats.filter((chat) => chat.title !== null && foldName(chat.title).includes(wanted));
|
|
497
|
-
if (matches.length === 1 && matches[0])
|
|
498
|
-
return matches[0];
|
|
499
|
-
if (matches.length === 0)
|
|
500
|
-
throw new CliError("not_found", `no chat matches "${reference}"`);
|
|
501
|
-
throw ambiguous(reference, "chats", matches.map((chat) => ({ id: chat.id, title: chat.title })), ({ title }) => singleLine(String(title)));
|
|
502
|
-
}, "pickChat");
|
|
503
|
-
var pickPerson = /* @__PURE__ */ __name((reference, people) => {
|
|
504
|
-
const trimmed = reference.trim();
|
|
505
|
-
const contact = contactReferenceOf(trimmed, people.provider);
|
|
506
|
-
if (contact !== void 0) {
|
|
507
|
-
const named = people.get(contact);
|
|
508
|
-
if (named)
|
|
509
|
-
return named;
|
|
510
|
-
throw new CliError("not_found", `no person ${contact} in what this account has seen`);
|
|
511
|
-
}
|
|
512
|
-
const known = people.get(trimmed);
|
|
513
|
-
if (known)
|
|
514
|
-
return known;
|
|
515
|
-
if (isId(trimmed))
|
|
516
|
-
throw new CliError("not_found", `no person ${trimmed} in what this account has seen`);
|
|
517
|
-
const wanted = foldName(trimmed.replace(/^@/, ""));
|
|
518
|
-
const everyone = people.all().toSorted((a, b) => (a.name ?? "").localeCompare(b.name ?? ""));
|
|
519
|
-
const fields = /* @__PURE__ */ __name((person) => [person.alias, person.name, person.username].filter(isPresent).map(foldName), "fields");
|
|
520
|
-
const exact = everyone.filter((person) => fields(person).includes(wanted));
|
|
521
|
-
const matches = exact.length > 0 ? exact : everyone.filter((person) => fields(person).some((one) => one.includes(wanted)));
|
|
522
|
-
if (matches.length === 1 && matches[0])
|
|
523
|
-
return matches[0];
|
|
524
|
-
if (matches.length === 0)
|
|
525
|
-
throw new CliError("not_found", `nobody matches "${reference}"`);
|
|
526
|
-
throw ambiguous(reference, "people", matches.map(({ id, name, username }) => ({ id, name, username })), ({ name, username }) => singleLine([name, username && `@${username}`].filter(isPresent).join(" ")));
|
|
527
|
-
}, "pickPerson");
|
|
528
|
-
var ambiguous = /* @__PURE__ */ __name((reference, what, candidates, label) => {
|
|
529
|
-
const width = Math.max(...candidates.map(({ id }) => id.length));
|
|
530
|
-
const lines = candidates.map((candidate) => ` ${candidate.id.padEnd(width)} ${label(candidate)}`).join("\n");
|
|
531
|
-
return new CliError("validation_error", `"${singleLine(reference)}" matches ${candidates.length} ${what} \u2014 name one by its id:
|
|
532
|
-
${lines}`, { candidates });
|
|
533
|
-
}, "ambiguous");
|
|
534
|
-
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
535
|
-
|
|
536
424
|
export {
|
|
537
425
|
validateFormattedText,
|
|
538
426
|
visibleFormattedText,
|
|
@@ -547,12 +435,5 @@ export {
|
|
|
547
435
|
defaultRules,
|
|
548
436
|
RULE_KEYS,
|
|
549
437
|
moderationPathFor,
|
|
550
|
-
ModerationRules
|
|
551
|
-
chatReferenceOf,
|
|
552
|
-
wrongAccount,
|
|
553
|
-
ensureAccount,
|
|
554
|
-
isId,
|
|
555
|
-
foldName,
|
|
556
|
-
pickChat,
|
|
557
|
-
pickPerson
|
|
438
|
+
ModerationRules
|
|
558
439
|
};
|