@wirecat/tg-cli 0.113.0 → 0.114.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/tg.js +6 -2
- package/dist/bundle/{adapter-EQKEFGPB.js → adapter-YAEHX3QB.js} +45 -45
- package/dist/bundle/{all-profiles-TTBFF663.js → all-profiles-R5CW42HQ.js} +8 -8
- package/dist/bundle/{anthropic-XPZS7267.js → anthropic-F25RHYV2.js} +5 -5
- package/dist/bundle/{app-server-ZSZ7KRAY.js → app-server-FAG6FNXR.js} +41 -40
- package/dist/bundle/{bot-api-X7BOVNIO.js → bot-api-KOIAXTQR.js} +46 -46
- package/dist/bundle/{bot-history-DWIUIPN5.js → bot-history-PRAOZEWC.js} +16 -15
- package/dist/bundle/{bun-ZGZVAJU2.js → bun-XIMM6EHD.js} +2 -2
- package/dist/bundle/{bun-sqlite-UN2UJ6SI.js → bun-sqlite-DSUCO4TR.js} +4 -4
- package/dist/bundle/{chunk-KK3JVOOV.js → chunk-2PAKHXIV.js} +29 -28
- package/dist/bundle/{chunk-KQ23JWLJ.js → chunk-34USFPBF.js} +18 -18
- package/dist/bundle/{chunk-WSAHUQ6K.js → chunk-3EZ43DAF.js} +3 -3
- package/dist/bundle/{chunk-Q264PYGE.js → chunk-3R43O3GG.js} +49 -16
- package/dist/bundle/{chunk-JDQSX2JQ.js → chunk-4JOKO4IW.js} +6810 -5767
- package/dist/bundle/{chunk-6OKGHHRL.js → chunk-5HKMEXVQ.js} +35 -35
- package/dist/bundle/{chunk-7IWDS2CM.js → chunk-6SPLZI5P.js} +2 -2
- package/dist/bundle/{chunk-J6USEBA6.js → chunk-7FOT4XD2.js} +2178 -923
- package/dist/bundle/{chunk-GX4LRLVD.js → chunk-AL36NHO6.js} +5110 -946
- package/dist/bundle/{chunk-UE75KPAC.js → chunk-ALHKUQDZ.js} +4 -4
- package/dist/bundle/{chunk-IDUYRTPF.js → chunk-C34IDOA5.js} +2 -2
- package/dist/bundle/{chunk-XXNJF3ZM.js → chunk-C7K7AP6G.js} +72 -30
- package/dist/bundle/{chunk-ZID2Y4XU.js → chunk-CDCBFMEI.js} +2 -2
- package/dist/bundle/{chunk-TQ6EA7TB.js → chunk-CS5DQ6KM.js} +15 -14
- package/dist/bundle/{chunk-6WJ5M2Q4.js → chunk-DQQEN3X4.js} +4 -4
- package/dist/bundle/{chunk-4GLMEES6.js → chunk-E2IRSRTB.js} +1 -1
- package/dist/bundle/{chunk-PCRLXJRH.js → chunk-EARO464A.js} +9 -7
- package/dist/bundle/{chunk-K3F46QVN.js → chunk-EQJG44KE.js} +4 -4
- package/dist/bundle/{chunk-VDEXNNMH.js → chunk-HA35XN2Z.js} +6 -4
- package/dist/bundle/{chunk-HNN7EKIM.js → chunk-I6BKSGZQ.js} +333 -164
- package/dist/bundle/{chunk-U3MJQLZQ.js → chunk-IN25CJ3D.js} +13 -13
- package/dist/bundle/{chunk-EGR5IJCG.js → chunk-J5U2HKGZ.js} +32 -26
- package/dist/bundle/{chunk-OQR442B6.js → chunk-KIZT2MI6.js} +1 -1
- package/dist/bundle/{chunk-AGUCXSSM.js → chunk-KZQXOZFC.js} +5 -5
- package/dist/bundle/chunk-L4CMCC3V.js +34 -0
- package/dist/bundle/{chunk-OYNSFQ7K.js → chunk-LPUFOWL3.js} +1 -1
- package/dist/bundle/{chunk-T4TTRFP5.js → chunk-M3IWROIF.js} +7 -7
- package/dist/bundle/{chunk-ENXO43TV.js → chunk-MQTTVQ3V.js} +6 -6
- package/dist/bundle/{chunk-G74QMORP.js → chunk-NJ2I4KFZ.js} +2 -2
- package/dist/bundle/{chunk-PHPNA2HU.js → chunk-NKP3RUM4.js} +11 -11
- package/dist/bundle/{chunk-VDATXIO4.js → chunk-NMVFFWF2.js} +6 -6
- package/dist/bundle/{chunk-KOWQVHXI.js → chunk-NTF34HJP.js} +3 -3
- package/dist/bundle/{chunk-JO45BOYE.js → chunk-NUVBC3LJ.js} +8 -3
- package/dist/bundle/{chunk-UIVLDKWT.js → chunk-O7CBGHI7.js} +1 -1
- package/dist/bundle/{chunk-VVA4555T.js → chunk-OFDMD3YF.js} +8 -8
- package/dist/bundle/{chunk-OC4RRFKH.js → chunk-OWHF6BON.js} +4 -4
- package/dist/bundle/{chunk-HO53POQG.js → chunk-P4YBABUC.js} +5 -40
- package/dist/bundle/{chunk-TUD4MU7S.js → chunk-QCXYJKPF.js} +2 -2
- package/dist/bundle/{chunk-JW7BMJ6O.js → chunk-RBC7JQ4Y.js} +2 -2
- package/dist/bundle/{chunk-5NF7M4MN.js → chunk-RFRI2HFT.js} +1 -1
- package/dist/bundle/{chunk-MTX5EDYJ.js → chunk-TKNCJMYN.js} +1096 -499
- package/dist/bundle/{chunk-PHYDBR5M.js → chunk-TRRRRGMI.js} +2 -2
- package/dist/bundle/{chunk-KVLCIZUK.js → chunk-TTTDZOBW.js} +3 -3
- package/dist/bundle/{chunk-AVUIWZTP.js → chunk-ULFTCR5W.js} +2 -2
- package/dist/bundle/{chunk-IYKRHDX6.js → chunk-VHO66SMY.js} +174 -45
- package/dist/bundle/{chunk-XZ2ZHIAO.js → chunk-VVKEWWSO.js} +1 -1
- package/dist/bundle/{chunk-BI5YJZJB.js → chunk-WIRDTH3J.js} +115 -29
- package/dist/bundle/{chunk-4SQB5VKL.js → chunk-WOQGUIXE.js} +1 -1
- package/dist/bundle/{chunk-OSBAISA5.js → chunk-XDOPONC3.js} +8 -13
- package/dist/bundle/{chunk-3MAYYFKY.js → chunk-Y3AQHPAJ.js} +1 -1
- package/dist/bundle/{chunk-T5RM4Y35.js → chunk-Y4LCSCSH.js} +3 -3
- package/dist/bundle/{chunk-Z6TRIW2O.js → chunk-YPABTT7A.js} +8 -8
- package/dist/bundle/{chunk-6F6K3LWV.js → chunk-YQ64ZNLD.js} +14 -13
- package/dist/bundle/{chunk-JRTZ5I6M.js → chunk-ZFMOPKPT.js} +2 -2
- package/dist/bundle/command-contract-SOTDPG22.js +31 -0
- package/dist/bundle/{decode-AMQVTEMW.js → decode-7U4SXPAN.js} +4 -4
- package/dist/bundle/{echarts-ECYONFQJ.js → echarts-GKEZEAL7.js} +2 -2
- package/dist/bundle/{embed-VZYBZEWI.js → embed-IDZDQMSW.js} +5 -5
- package/dist/bundle/{embedder-GSWBGHRK.js → embedder-RY5R2PGO.js} +8 -8
- package/dist/bundle/{entry-LALZILY4.js → entry-P6YZ3ZV6.js} +8 -5
- package/dist/bundle/{first-run-LEAI623Q.js → first-run-66KTCVQK.js} +9 -9
- package/dist/bundle/first-screen-NY46X6QU.js +29 -0
- package/dist/bundle/{identity-54HA5GN6.js → identity-GXVKGCNU.js} +3 -3
- package/dist/bundle/{instructions-AXLQQS3G.js → instructions-P5E34PQR.js} +1 -1
- package/dist/bundle/{mcp-VVMPUDSL.js → mcp-FUSDPAOL.js} +2 -2
- package/dist/bundle/{node-7JHC5K77.js → node-GKPRXS5Y.js} +2 -2
- package/dist/bundle/{node-sqlite-LYJEK46T.js → node-sqlite-VUXFVPJ6.js} +10 -4
- package/dist/bundle/{oauth-BROPKI3K.js → oauth-7SQIPMOY.js} +6 -6
- package/dist/bundle/{open-C6XQ46JK.js → open-W3BN2SIO.js} +4 -3
- package/dist/bundle/{openai-VWSU7ZDD.js → openai-LQTK3ZMC.js} +13 -13
- package/dist/bundle/{process-QKEFL5HL.js → process-U2P5Z6UF.js} +1 -1
- package/dist/bundle/{program-ACY7O33O.js → program-DIPSLR6O.js} +48 -48
- package/dist/bundle/{prompt-EGULVW2F.js → prompt-GESHKSM5.js} +4 -4
- package/dist/bundle/{proxy-transport-KIMADLQ2.js → proxy-transport-C2EUUT32.js} +4 -4
- package/dist/bundle/{recognize-UMTKLWVR.js → recognize-FEQTIJET.js} +3 -3
- package/dist/bundle/{remote-DABI7PSQ.js → remote-UXOPBPKS.js} +6 -6
- package/dist/bundle/{rerank-ZFATWWBE.js → rerank-L4JM4REK.js} +6 -6
- package/dist/bundle/{serve-B7YYCMGN.js → serve-DDWW44DB.js} +10 -9
- package/dist/bundle/{server-DGKZISZH.js → server-UTWBIZHB.js} +32 -32
- package/dist/bundle/server-ZI7WDAW6.js +56 -0
- package/dist/bundle/{state-AQ2PABA5.js → state-EV7FGEK4.js} +5 -5
- package/dist/bundle/{store-46GJTFLJ.js → store-EXBUF4OG.js} +11 -10
- package/dist/bundle/store-maintenance-command-UBZE2Z6T.js +46 -0
- package/dist/bundle/tg.js +4 -4
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +6 -4
- package/dist/commands/context.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +5 -0
- package/dist/reasons.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/chunk-452UZ2PU.js +0 -3603
- package/dist/bundle/command-contract-GV67H22L.js +0 -32
- package/dist/bundle/first-screen-MOCVLE23.js +0 -30
- package/dist/bundle/server-UC7UWUIS.js +0 -56
- package/dist/bundle/store-maintenance-command-FCFKHGRM.js +0 -45
- /package/dist/bundle/{chunk-HPXYN7F3.js → chunk-NUN6OGOV.js} +0 -0
|
@@ -2,16 +2,16 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
alive
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KIZT2MI6.js";
|
|
6
6
|
import {
|
|
7
7
|
resolvePaths,
|
|
8
8
|
writeSecurely
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-34USFPBF.js";
|
|
10
10
|
import {
|
|
11
11
|
__name
|
|
12
12
|
} from "./chunk-ZVVMGPBJ.js";
|
|
13
13
|
|
|
14
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/background/lock.js
|
|
15
15
|
import { existsSync, linkSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
16
16
|
import { dirname, join } from "node:path";
|
|
17
17
|
var lockPath = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "serve", `${profile}.lock`), "lockPath");
|
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
defineReasons
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EARO464A.js";
|
|
6
6
|
|
|
7
7
|
// dist/reasons.js
|
|
8
8
|
var REASONS = defineReasons([
|
|
@@ -17,11 +17,16 @@ var REASONS = defineReasons([
|
|
|
17
17
|
"provider_unavailable",
|
|
18
18
|
"Telegram's updates stopped arriving although the connection is open"
|
|
19
19
|
],
|
|
20
|
-
["write.unanswered", "outcome_unknown", "Telegram did not answer a write, so it may have happened"]
|
|
20
|
+
["write.unanswered", "outcome_unknown", "Telegram did not answer a write, so it may have happened"],
|
|
21
|
+
[
|
|
22
|
+
"credentials.unreachable",
|
|
23
|
+
"provider_unavailable",
|
|
24
|
+
"this profile has logged in here, but the keyring holding its keys is locked or out of reach"
|
|
25
|
+
]
|
|
21
26
|
].map(([reason, code, message]) => ({ reason, code, message, details: [] })));
|
|
22
27
|
|
|
23
28
|
// dist/version.js
|
|
24
|
-
var VERSION = "0.
|
|
29
|
+
var VERSION = "0.114.0";
|
|
25
30
|
|
|
26
31
|
// dist/identity.js
|
|
27
32
|
var TG = {
|
|
@@ -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.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/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) {
|
|
@@ -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-EARO464A.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.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/search/languages.js
|
|
11
11
|
var LANGUAGES = [
|
|
12
12
|
{ name: "russian", code: "ru", label: "Russian", script: "cyrillic", dictionary: "dictionary-ru" },
|
|
13
13
|
{ name: "english", code: "en", label: "English", script: "latin", dictionary: "dictionary-en" },
|
|
@@ -15,12 +15,12 @@ var LANGUAGES = [
|
|
|
15
15
|
];
|
|
16
16
|
var languagesOf = /* @__PURE__ */ __name((script) => LANGUAGES.filter((one) => one.script === script).map(({ name }) => name), "languagesOf");
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/store/normalize.js
|
|
19
19
|
var NORMALIZER_VERSION = 1;
|
|
20
20
|
var fold = /* @__PURE__ */ __name((text) => text.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").normalize("NFC").toLowerCase(), "fold");
|
|
21
21
|
var normalize = /* @__PURE__ */ __name((text) => fold(text).replace(new RegExp("\\p{Cc}", "gu"), " ").replace(/\s+/gu, " ").trim(), "normalize");
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/search/snowball/base-stemmer.js
|
|
24
24
|
var BaseStemmer = class {
|
|
25
25
|
static {
|
|
26
26
|
__name(this, "BaseStemmer");
|
|
@@ -395,7 +395,7 @@ var BaseStemmer = class {
|
|
|
395
395
|
}
|
|
396
396
|
};
|
|
397
397
|
|
|
398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/search/snowball/english-stemmer.js
|
|
399
399
|
var a_0 = [
|
|
400
400
|
["arsen", -1],
|
|
401
401
|
["commun", -1],
|
|
@@ -1096,7 +1096,7 @@ var english_stemmer_default = class extends BaseStemmer {
|
|
|
1096
1096
|
stemWord = this.stem;
|
|
1097
1097
|
};
|
|
1098
1098
|
|
|
1099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/search/snowball/russian-stemmer.js
|
|
1100
1100
|
var a_02 = [
|
|
1101
1101
|
["\u0432", 1],
|
|
1102
1102
|
["\u0438\u0432", 2, 1],
|
|
@@ -1519,7 +1519,7 @@ var russian_stemmer_default = class extends BaseStemmer {
|
|
|
1519
1519
|
stemWord = this.stem;
|
|
1520
1520
|
};
|
|
1521
1521
|
|
|
1522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/search/snowball/spanish-stemmer.js
|
|
1523
1523
|
var a_03 = [
|
|
1524
1524
|
["", 6],
|
|
1525
1525
|
["\xE1", 1, 1],
|
|
@@ -2195,7 +2195,7 @@ var spanish_stemmer_default = class extends BaseStemmer {
|
|
|
2195
2195
|
stemWord = this.stem;
|
|
2196
2196
|
};
|
|
2197
2197
|
|
|
2198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/search/stem.js
|
|
2199
2199
|
var SNOWBALL_VERSION = "3.1.1";
|
|
2200
2200
|
var CYRILLIC_STEMMERS = [...languagesOf("cyrillic"), "none"];
|
|
2201
2201
|
var LATIN_STEMMERS = [...languagesOf("latin"), "none"];
|
|
@@ -2,7 +2,7 @@ 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-EARO464A.js";
|
|
6
6
|
import {
|
|
7
7
|
importFrom
|
|
8
8
|
} from "./chunk-Y5E2WNWB.js";
|
|
@@ -10,10 +10,10 @@ 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.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/speech/recognize.js
|
|
14
14
|
import { createRequire } from "node:module";
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
|
|
17
17
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "local transcription needs a complete mono or stereo Ogg Opus recording"), "invalid");
|
|
18
18
|
var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
|
|
19
19
|
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
@@ -70,7 +70,7 @@ var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
|
|
|
70
70
|
throw invalid();
|
|
71
71
|
}, "checkOggDuration");
|
|
72
72
|
|
|
73
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
73
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/speech/recognize.js
|
|
74
74
|
var SAMPLE_RATE = 16e3;
|
|
75
75
|
var LEAD = SAMPLE_RATE / 2;
|
|
76
76
|
var toModelRate = /* @__PURE__ */ __name((samples, rate) => {
|
|
@@ -1,54 +1,22 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
annotate,
|
|
4
|
+
answerEntitySchema,
|
|
5
|
+
answerProjectionSchema,
|
|
8
6
|
answerSchema,
|
|
9
7
|
describeOptions,
|
|
10
8
|
keyForCommand,
|
|
11
9
|
metaOf
|
|
12
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AL36NHO6.js";
|
|
13
11
|
import {
|
|
14
12
|
CliError,
|
|
15
13
|
jsonSchemaOf
|
|
16
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EARO464A.js";
|
|
17
15
|
import {
|
|
18
16
|
__name
|
|
19
17
|
} from "./chunk-ZVVMGPBJ.js";
|
|
20
18
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22
|
-
var schemas = /* @__PURE__ */ new WeakMap();
|
|
23
|
-
var answerEntity = /* @__PURE__ */ __name((command, name, schema, options = {}) => {
|
|
24
|
-
if (Object.hasOwn(ENTITIES, name))
|
|
25
|
-
throw new Error(`${name} is a shared entity; use its existing schema`);
|
|
26
|
-
if (!/^[a-z][a-z0-9_]*$/.test(name))
|
|
27
|
-
throw new Error("an answer entity needs a lowercase name");
|
|
28
|
-
if (!("entries" in schema) && schema.type !== "union")
|
|
29
|
-
throw new Error("an answer entity needs an object schema or a union of object schemas");
|
|
30
|
-
if (options.project && !("entries" in options.project) && options.project.type !== "union")
|
|
31
|
-
throw new Error("projection needs an object schema or a union of object schemas");
|
|
32
|
-
schemas.set(command, { name, schema, ...options });
|
|
33
|
-
return annotate(command, { output: { entity: name } });
|
|
34
|
-
}, "answerEntity");
|
|
35
|
-
var answerEntitySchema = /* @__PURE__ */ __name((command) => {
|
|
36
|
-
const output = command && metaOf(command).output;
|
|
37
|
-
if (!output)
|
|
38
|
-
return void 0;
|
|
39
|
-
const name = output.view ? `${output.entity}.${output.view}` : output.entity;
|
|
40
|
-
const shared = ENTITIES[name];
|
|
41
|
-
if (shared)
|
|
42
|
-
return shared;
|
|
43
|
-
const own = schemas.get(command);
|
|
44
|
-
return own?.name === name ? own.schema : void 0;
|
|
45
|
-
}, "answerEntitySchema");
|
|
46
|
-
var answerProjectionSchema = /* @__PURE__ */ __name((command) => {
|
|
47
|
-
const own = command && schemas.get(command);
|
|
48
|
-
return own && metaOf(command).output?.entity === own.name ? own.project : void 0;
|
|
49
|
-
}, "answerProjectionSchema");
|
|
50
|
-
|
|
51
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
|
|
19
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
|
|
52
20
|
var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
|
|
53
21
|
var outputOf = /* @__PURE__ */ __name((command) => {
|
|
54
22
|
const entity = answerEntitySchema(command);
|
|
@@ -153,9 +121,6 @@ var commandContract = /* @__PURE__ */ __name((command) => {
|
|
|
153
121
|
}, "commandContract");
|
|
154
122
|
|
|
155
123
|
export {
|
|
156
|
-
answerEntity,
|
|
157
|
-
answerEntitySchema,
|
|
158
|
-
answerProjectionSchema,
|
|
159
124
|
SCHEMA_DIALECT,
|
|
160
125
|
outputOf,
|
|
161
126
|
commandPathOf,
|
|
@@ -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-EARO464A.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.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/models/types.js
|
|
11
11
|
var MAX_MODEL_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
12
12
|
var validateImages = /* @__PURE__ */ __name((images) => {
|
|
13
13
|
if (images === void 0)
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
optional,
|
|
11
11
|
pipe,
|
|
12
12
|
safeParse
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EARO464A.js";
|
|
14
14
|
import {
|
|
15
15
|
__name
|
|
16
16
|
} from "./chunk-ZVVMGPBJ.js";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/models/options.js
|
|
19
19
|
var checkedOptions = /* @__PURE__ */ __name((provider, schema, options) => {
|
|
20
20
|
const parsed = safeParse(schema, options);
|
|
21
21
|
if (!parsed.success) {
|
|
@@ -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.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
|
|
8
8
|
var instructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => {
|
|
9
9
|
const all = typeof profile !== "string";
|
|
10
10
|
const offers = /* @__PURE__ */ __name((key) => all || writes.includes(key), "offers");
|