blun-king-cli 9.1.624 → 9.1.626
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 +62 -213
- package/LIESMICH.txt +57 -74
- package/README.md +76 -119
- package/agent-spine-plugin/scripts/check-install.js +4 -4
- package/agent-spine-plugin/src/hook.js +0 -4
- package/agent-spine-plugin/src/lib/documents.js +1 -1
- package/agent-spine-plugin/src/lib/hook-context.js +0 -1
- package/agent-spine-plugin/src/lib/host-instruction-budget.js +2 -1
- package/agent-spine-plugin/src/lib/preflight.js +9 -38
- package/agent-spine-plugin/src/lib/source-roots.js +1 -1
- package/bin/agentspine-king-goal-inbox.mjs +127 -127
- package/bin/agentspine-king-goal-intake.mjs +106 -106
- package/bin/agentspine-king-host-runner.mjs +109 -109
- package/bin/agentspine-king-snapshot-policy.cjs +80 -80
- package/bin/agentspine-king-status-policy.mjs +226 -226
- package/bin/agentspine-king-worker-host.mjs +160 -160
- package/bin/core-bootstrap.js +83 -97
- package/bin/launcher-mode.js +93 -93
- package/bin/launcher-restart-policy.cjs +131 -131
- package/bin/launcher-runtime.js +91 -254
- package/bin/managed-node.js +186 -186
- package/bin/managed-plugin-selection.cjs +109 -116
- package/bin/native-module-repair.js +201 -201
- package/bin/node-runtime.js +34 -34
- package/bin/node-version.js +49 -49
- package/bin/plugin-bootstrap.js +149 -172
- package/bin/private-paths.js +1578 -1624
- package/bin/runtime-exit-ledger.cjs +144 -144
- package/bin/runtime-exit-ledger.d.cts +23 -23
- package/bin/standard-tools-bootstrap.js +277 -272
- package/bin/turn-thinking-policy.cjs +82 -82
- package/bin/update-copy.js +200 -200
- package/bin/update-lease.js +597 -599
- package/bin/update-notice.js +1568 -1568
- package/bin/verify-agent-behavior.cjs +122 -122
- package/bin/verify-agent-components.cjs +104 -104
- package/bin/verify-bundled-agent-sources.cjs +91 -96
- package/bin/windows-node-crash-dump.cjs +289 -289
- package/blun.mjs +187640 -180475
- package/bundled-agent-sources.json +26 -30
- package/codebase-index/codebase_index.py +462 -470
- package/dist-web/assets/{CodeBlockNode-TKKkJX8L.js → CodeBlockNode-BMbuG85x.js} +1 -1
- package/dist-web/assets/{CodeBlockShell.vue_vue_type_style_index_0_lang-CUj2Ds5x.js → CodeBlockShell.vue_vue_type_style_index_0_lang-C1fv7l_Z.js} +1 -1
- package/dist-web/assets/DesignSystemView-6HgAUEmC.css +1 -0
- package/dist-web/assets/DesignSystemView-CEEBqXSX.js +12 -0
- package/dist-web/assets/{Tooltip-CTWv7WCU.js → Tooltip--YoauJ24.js} +1 -1
- package/dist-web/assets/{abnfDiagram-N423BO3Z-DA8V8Zjh.js → abnfDiagram-N423BO3Z-DZvBWkRg.js} +1 -1
- package/dist-web/assets/{arc-YtddKbdY.js → arc-B04JATeX.js} +1 -1
- package/dist-web/assets/{architectureDiagram-T3A2C74G-CGEiObmo.js → architectureDiagram-T3A2C74G-DmYnMep2.js} +1 -1
- package/dist-web/assets/{blockDiagram-VBNYF7ZC-Bd5Vt50e.js → blockDiagram-VBNYF7ZC-DJ1gPS1C.js} +1 -1
- package/dist-web/assets/{c4Diagram-5PPSVZJV-D2ApPM54.js → c4Diagram-5PPSVZJV-DmjxvUbd.js} +1 -1
- package/dist-web/assets/channel-472fcEvw.js +1 -0
- package/dist-web/assets/{chunk-2GRJ4B5K-BDcIEZSl.js → chunk-2GRJ4B5K-AB0raj3I.js} +1 -1
- package/dist-web/assets/{chunk-2Q5K7J3B-6aSabCX7.js → chunk-2Q5K7J3B-Drf039vM.js} +1 -1
- package/dist-web/assets/{chunk-5RXB4S5H-BFRQvIJS.js → chunk-5RXB4S5H-D5ILttmz.js} +1 -1
- package/dist-web/assets/{chunk-5VM5RSS4-ChAa-DNY.js → chunk-5VM5RSS4-DrLSdi8y.js} +1 -1
- package/dist-web/assets/{chunk-6Q2QTUOP-BIfrb2Jc.js → chunk-6Q2QTUOP-LiaqdEOQ.js} +1 -1
- package/dist-web/assets/{chunk-GF5L2VYU-BR0gvtWI.js → chunk-GF5L2VYU-AIYkb--o.js} +1 -1
- package/dist-web/assets/{chunk-JWPE2WC7-BgXKsx5E.js → chunk-JWPE2WC7-CogdNl0i.js} +1 -1
- package/dist-web/assets/{chunk-KBJHAD2P-I8mrZhpz.js → chunk-KBJHAD2P-DHjpNtZv.js} +1 -1
- package/dist-web/assets/{chunk-RYQCIY6F-BMPaem92.js → chunk-RYQCIY6F-BUSOqH2X.js} +1 -1
- package/dist-web/assets/{chunk-XXDRQBXY-COy0J-0j.js → chunk-XXDRQBXY-BpoMV0bh.js} +1 -1
- package/dist-web/assets/classDiagram-JCYQIIEL-BTZeLngj.js +1 -0
- package/dist-web/assets/classDiagram-v2-OCEON4UE-BTZeLngj.js +1 -0
- package/dist-web/assets/{cose-bilkent-JH36ORCC-MosTTRdo.js → cose-bilkent-JH36ORCC-BJr2I61o.js} +1 -1
- package/dist-web/assets/{cynefin-VYW2F7L2-5tjPgrkP.js → cynefin-VYW2F7L2-HtysQZ4A.js} +1 -1
- package/dist-web/assets/{cynefinDiagram-MW4NZA55-CbDcdInR.js → cynefinDiagram-MW4NZA55-CcpC_2uv.js} +1 -1
- package/dist-web/assets/{dagre-VZM6K2ZE-YaBom1ZH.js → dagre-VZM6K2ZE-D8Ao0LUg.js} +1 -1
- package/dist-web/assets/{diagram-7IWD3JNH-Da4m-Hgz.js → diagram-7IWD3JNH-BITiLhjX.js} +1 -1
- package/dist-web/assets/{diagram-B4RE2ZJO-CAUUegxg.js → diagram-B4RE2ZJO-CJtwfy9f.js} +1 -1
- package/dist-web/assets/{diagram-LBJQPF4R-o21mWKG4.js → diagram-LBJQPF4R-BsVTh6w8.js} +1 -1
- package/dist-web/assets/{diagram-Q27KOJAE-BA3z3sXf.js → diagram-Q27KOJAE-pA_MUCUf.js} +1 -1
- package/dist-web/assets/{diagram-UB23O5K3-CGRdSSDK.js → diagram-UB23O5K3-CIY8z7vu.js} +1 -1
- package/dist-web/assets/{ebnfDiagram-BXEA7PRR-Bw-iU9FP.js → ebnfDiagram-BXEA7PRR-C3FMioqp.js} +1 -1
- package/dist-web/assets/{erDiagram-JOGREHBK-BwM1yiR0.js → erDiagram-JOGREHBK-CzoyKmKc.js} +1 -1
- package/dist-web/assets/{flowDiagram-UKHOOZJN-z05eOR1Q.js → flowDiagram-UKHOOZJN-DOqfushy.js} +1 -1
- package/dist-web/assets/{ganttDiagram-PKOTCBZU-BMUubNTl.js → ganttDiagram-PKOTCBZU-Cf9XQSWl.js} +1 -1
- package/dist-web/assets/{gitGraphDiagram-DS77QQ5N-Dccbi1wU.js → gitGraphDiagram-DS77QQ5N-DHUDofE5.js} +1 -1
- package/dist-web/assets/{index-h0KEOmkU.js → index-B6qEMQMx.js} +14 -14
- package/dist-web/assets/{index-C9eDH3u-.css → index-BmKj7CB1.css} +1 -1
- package/dist-web/assets/{index-BBbC5LRF.js → index-DokxDX1w.js} +1 -1
- package/dist-web/assets/{index-D48p0M2S.js → index-auojtiAA.js} +2 -2
- package/dist-web/assets/{index10-Qbuw1N6u.js → index10-Drb2n5e5.js} +1 -1
- package/dist-web/assets/{index11-g8v025wN.js → index11-Cx-aV4G2.js} +1 -1
- package/dist-web/assets/{index5-BYNcV8BY.js → index5-Dg3qGTyH.js} +1 -1
- package/dist-web/assets/{index6-BetANtnV.js → index6-BgvtIICP.js} +1 -1
- package/dist-web/assets/{index7-BcPbgCKN.js → index7-uEnniPQG.js} +1 -1
- package/dist-web/assets/{index8-B1lp-RvF.js → index8-h4IKc0ek.js} +2 -2
- package/dist-web/assets/{infoDiagram-6WML65LV-BF_pbUnN.js → infoDiagram-6WML65LV-D-3tvEiJ.js} +1 -1
- package/dist-web/assets/{ishikawaDiagram-WSZJBQD7-Dedv4urS.js → ishikawaDiagram-WSZJBQD7-DIIBNv7a.js} +1 -1
- package/dist-web/assets/{journeyDiagram-NVQOT4AX-B1Ex3b6o.js → journeyDiagram-NVQOT4AX-DP4r1Vlx.js} +1 -1
- package/dist-web/assets/{kanban-definition-27J2QSJJ-BtCGliBH.js → kanban-definition-27J2QSJJ-C3_Ztgxv.js} +1 -1
- package/dist-web/assets/{linear-ByItc8Qr.js → linear-DnqhIw-y.js} +1 -1
- package/dist-web/assets/{mermaid.core-B1M2O7nN.js → mermaid.core-xYUgBa3T.js} +4 -4
- package/dist-web/assets/{mindmap-definition-FAOFIHXS-D0UHKUyj.js → mindmap-definition-FAOFIHXS-l-dq-zfr.js} +1 -1
- package/dist-web/assets/{pegDiagram-VL7TDLO6-D7zYCVmG.js → pegDiagram-VL7TDLO6-C8vXQiaJ.js} +1 -1
- package/dist-web/assets/{pieDiagram-7S7Q4E2Y-Bd0i9CHa.js → pieDiagram-7S7Q4E2Y-CyNRSsI6.js} +1 -1
- package/dist-web/assets/{quadrantDiagram-CIZ2JOQS-MG-Ug47d.js → quadrantDiagram-CIZ2JOQS-D-w8AD_g.js} +1 -1
- package/dist-web/assets/{railroadDiagram-AXF67PYL-AZdl90Gj.js → railroadDiagram-AXF67PYL-BLkyQCWy.js} +1 -1
- package/dist-web/assets/{requirementDiagram-LRYGKXZP-DjplF9kt.js → requirementDiagram-LRYGKXZP-CEWO7XfT.js} +1 -1
- package/dist-web/assets/{sankeyDiagram-W5VNT64P-Bi9Zgfjs.js → sankeyDiagram-W5VNT64P-ByGoAaGj.js} +1 -1
- package/dist-web/assets/{sequenceDiagram-SI44F4Z6-ChEpdCvb.js → sequenceDiagram-SI44F4Z6-Bhn9GQtd.js} +1 -1
- package/dist-web/assets/{sizeCapture-X5ZJPWSS-B5RFUdaa.js → sizeCapture-X5ZJPWSS-jVKR9CTu.js} +1 -1
- package/dist-web/assets/{stateDiagram-OKZ733FA-BkRblSKp.js → stateDiagram-OKZ733FA-wW3XbegA.js} +1 -1
- package/dist-web/assets/stateDiagram-v2-UEYNNEHI-B8aids-Z.js +1 -0
- package/dist-web/assets/{swimlanes-SLNWSIFB-DLXH6Zhc.js → swimlanes-SLNWSIFB-B8QyFS7G.js} +2 -2
- package/dist-web/assets/swimlanesDiagram-ULZ7WXOC-B8XAkdSm.js +8 -0
- package/dist-web/assets/{timeline-definition-Z64GVDOM-C_N88siO.js → timeline-definition-Z64GVDOM-DpvxS-1A.js} +1 -1
- package/dist-web/assets/{vennDiagram-T6HMQDX7-DMsnvDt0.js → vennDiagram-T6HMQDX7-BzGM0ihY.js} +1 -1
- package/dist-web/assets/{vue.runtime.esm-bundler-B-3uIy85.js → vue.runtime.esm-bundler-BOcpwIX1.js} +1 -1
- package/dist-web/assets/{wardleyDiagram-T6FBY63Y-C9SJIPzq.js → wardleyDiagram-T6FBY63Y-2DKAOs5e.js} +1 -1
- package/dist-web/assets/{xychartDiagram-ELKLHX3M-DZLWA6Go.js → xychartDiagram-ELKLHX3M-B0SP0TXd.js} +1 -1
- package/dist-web/index.html +32 -32
- package/dist-web/vis/index.html.gz +0 -0
- package/package.json +1 -1
- package/scripts/fix-node-pty-perms.js +53 -53
- package/standard-skills/blun-app-design-system/SKILL.md +30 -30
- package/standard-skills/blun-app-design-system/provenance.json +17 -17
- package/standard-skills/blun-app-design-system/references/tokens.md +48 -48
- package/standard-skills/blun-app-design-system/scripts/check-blun-design.mjs +49 -49
- package/standard-skills/translate-native/README.md +1 -1
- package/standard-skills/translate-native/scripts/blun_language_guard.py +2 -0
- package/standard-skills/translate-native/scripts/language_gateway.py +2 -0
- package/standard-skills/translate-native/scripts/pre_output_guard.py +2 -0
- package/standard-tools/language-guard/blun_language_guard.py +2 -0
- package/standard-tools/language-guard/language_gateway.py +2 -0
- package/standard-tools/language-guard/pre_output_guard.py +2 -0
- package/telegram-plugin/blun.plugin.json +20 -20
- package/telegram-plugin/commands/access.md +37 -37
- package/telegram-plugin/dist/bridge.mjs +310 -187
- package/telegram-plugin/dist/mcp-server.mjs +174 -261
- package/telegram-plugin/dist/noise.mjs +1 -19
- package/worker-host.mjs +13747 -16824
- package/bin/profile-handoff.cjs +0 -152
- package/bin/profile-launch.cjs +0 -120
- package/dist-web/assets/DesignSystemView-DwK1aQMo.js +0 -12
- package/dist-web/assets/DesignSystemView-szjTj7ns.css +0 -1
- package/dist-web/assets/channel-BnluexuN.js +0 -1
- package/dist-web/assets/classDiagram-JCYQIIEL-BliFdSD9.js +0 -1
- package/dist-web/assets/classDiagram-v2-OCEON4UE-BliFdSD9.js +0 -1
- package/dist-web/assets/stateDiagram-v2-UEYNNEHI-fVkQcACW.js +0 -1
- package/dist-web/assets/swimlanesDiagram-ULZ7WXOC-Bg-BiZJQ.js +0 -8
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { appendFileSync, chmodSync, closeSync, existsSync, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { dirname, join, resolve } from "node:path";
|
|
4
|
-
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
4
|
+
import { createHash, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
5
5
|
import { homedir } from "node:os";
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
7
7
|
import { Readable, Writable } from "node:stream";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
9
|
-
import { StringDecoder } from "node:string_decoder";
|
|
10
9
|
//#region \0rolldown/runtime.js
|
|
11
10
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
12
11
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
13
12
|
//#endregion
|
|
14
|
-
//#region
|
|
13
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/filter.js
|
|
15
14
|
var require_filter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
16
|
exports.matchFilter = matchFilter;
|
|
@@ -403,7 +402,7 @@ Permitted values are: ${permitted.map((k) => `'${k}'`).join(", ")}.`;
|
|
|
403
402
|
};
|
|
404
403
|
}));
|
|
405
404
|
//#endregion
|
|
406
|
-
//#region
|
|
405
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/context.js
|
|
407
406
|
var require_context = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
408
407
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
409
408
|
exports.Context = void 0;
|
|
@@ -3048,7 +3047,7 @@ var require_context = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3048
3047
|
}
|
|
3049
3048
|
}));
|
|
3050
3049
|
//#endregion
|
|
3051
|
-
//#region
|
|
3050
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/composer.js
|
|
3052
3051
|
var require_composer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3053
3052
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3054
3053
|
exports.Composer = exports.BotError = void 0;
|
|
@@ -3724,7 +3723,7 @@ var require_composer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3724
3723
|
};
|
|
3725
3724
|
}));
|
|
3726
3725
|
//#endregion
|
|
3727
|
-
//#region
|
|
3726
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
|
|
3728
3727
|
var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3729
3728
|
/**
|
|
3730
3729
|
* Helpers.
|
|
@@ -3842,7 +3841,7 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3842
3841
|
}
|
|
3843
3842
|
}));
|
|
3844
3843
|
//#endregion
|
|
3845
|
-
//#region
|
|
3844
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
|
|
3846
3845
|
var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3847
3846
|
/**
|
|
3848
3847
|
* This is the common logic for both the Node.js and web browser
|
|
@@ -4044,7 +4043,7 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4044
4043
|
module.exports = setup;
|
|
4045
4044
|
}));
|
|
4046
4045
|
//#endregion
|
|
4047
|
-
//#region
|
|
4046
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js
|
|
4048
4047
|
var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4049
4048
|
/**
|
|
4050
4049
|
* This is the web browser implementation of `debug()`.
|
|
@@ -4240,7 +4239,7 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4240
4239
|
};
|
|
4241
4240
|
}));
|
|
4242
4241
|
//#endregion
|
|
4243
|
-
//#region
|
|
4242
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
|
|
4244
4243
|
var require_has_flag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4245
4244
|
module.exports = (flag, argv = process.argv) => {
|
|
4246
4245
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
@@ -4250,7 +4249,7 @@ var require_has_flag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4250
4249
|
};
|
|
4251
4250
|
}));
|
|
4252
4251
|
//#endregion
|
|
4253
|
-
//#region
|
|
4252
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js
|
|
4254
4253
|
var require_supports_color = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4255
4254
|
const os = __require("os");
|
|
4256
4255
|
const tty$1 = __require("tty");
|
|
@@ -4331,7 +4330,7 @@ var require_supports_color = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
4331
4330
|
};
|
|
4332
4331
|
}));
|
|
4333
4332
|
//#endregion
|
|
4334
|
-
//#region
|
|
4333
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
|
|
4335
4334
|
var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4336
4335
|
/**
|
|
4337
4336
|
* Module dependencies.
|
|
@@ -4538,7 +4537,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4538
4537
|
};
|
|
4539
4538
|
}));
|
|
4540
4539
|
//#endregion
|
|
4541
|
-
//#region
|
|
4540
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js
|
|
4542
4541
|
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4543
4542
|
/**
|
|
4544
4543
|
* Detect Electron renderer / nwjs process, which is node, but we should
|
|
@@ -4548,7 +4547,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4548
4547
|
else module.exports = require_node();
|
|
4549
4548
|
}));
|
|
4550
4549
|
//#endregion
|
|
4551
|
-
//#region
|
|
4550
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/platform.node.js
|
|
4552
4551
|
var require_platform_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4553
4552
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4554
4553
|
exports.defaultAdapter = exports.itrToStream = exports.debug = void 0;
|
|
@@ -4586,7 +4585,7 @@ var require_platform_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4586
4585
|
exports.defaultAdapter = "express";
|
|
4587
4586
|
}));
|
|
4588
4587
|
//#endregion
|
|
4589
|
-
//#region
|
|
4588
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/core/error.js
|
|
4590
4589
|
var require_error = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4591
4590
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4592
4591
|
exports.HttpError = exports.GrammyError = void 0;
|
|
@@ -4662,7 +4661,7 @@ var require_error = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4662
4661
|
}
|
|
4663
4662
|
}));
|
|
4664
4663
|
//#endregion
|
|
4665
|
-
//#region
|
|
4664
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/webidl-conversions@3.0.1/node_modules/webidl-conversions/lib/index.js
|
|
4666
4665
|
var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4667
4666
|
var conversions = {};
|
|
4668
4667
|
module.exports = conversions;
|
|
@@ -4778,7 +4777,7 @@ var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4778
4777
|
};
|
|
4779
4778
|
}));
|
|
4780
4779
|
//#endregion
|
|
4781
|
-
//#region
|
|
4780
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/utils.js
|
|
4782
4781
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4783
4782
|
module.exports.mixin = function mixin(target, source) {
|
|
4784
4783
|
const keys = Object.getOwnPropertyNames(source);
|
|
@@ -4794,7 +4793,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4794
4793
|
};
|
|
4795
4794
|
}));
|
|
4796
4795
|
//#endregion
|
|
4797
|
-
//#region
|
|
4796
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/tr46@0.0.3/node_modules/tr46/lib/mappingTable.json
|
|
4798
4797
|
var require_mappingTable = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4799
4798
|
module.exports = [
|
|
4800
4799
|
[[0, 44], "disallowed_STD3_valid"],
|
|
@@ -40351,7 +40350,7 @@ var require_mappingTable = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40351
40350
|
];
|
|
40352
40351
|
}));
|
|
40353
40352
|
//#endregion
|
|
40354
|
-
//#region
|
|
40353
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/tr46@0.0.3/node_modules/tr46/index.js
|
|
40355
40354
|
var require_tr46 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40356
40355
|
var punycode$1 = __require("punycode");
|
|
40357
40356
|
var mappingTable = require_mappingTable();
|
|
@@ -40489,7 +40488,7 @@ var require_tr46 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40489
40488
|
module.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS;
|
|
40490
40489
|
}));
|
|
40491
40490
|
//#endregion
|
|
40492
|
-
//#region
|
|
40491
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/url-state-machine.js
|
|
40493
40492
|
var require_url_state_machine = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40494
40493
|
const punycode = __require("punycode");
|
|
40495
40494
|
const tr46 = require_tr46();
|
|
@@ -41360,7 +41359,7 @@ var require_url_state_machine = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
41360
41359
|
};
|
|
41361
41360
|
}));
|
|
41362
41361
|
//#endregion
|
|
41363
|
-
//#region
|
|
41362
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/URL-impl.js
|
|
41364
41363
|
var require_URL_impl = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
41365
41364
|
const usm = require_url_state_machine();
|
|
41366
41365
|
exports.implementation = class URLImpl {
|
|
@@ -41498,7 +41497,7 @@ var require_URL_impl = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
41498
41497
|
};
|
|
41499
41498
|
}));
|
|
41500
41499
|
//#endregion
|
|
41501
|
-
//#region
|
|
41500
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/URL.js
|
|
41502
41501
|
var require_URL = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41503
41502
|
const conversions = require_lib$2();
|
|
41504
41503
|
const utils = require_utils();
|
|
@@ -41663,7 +41662,7 @@ var require_URL = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41663
41662
|
};
|
|
41664
41663
|
}));
|
|
41665
41664
|
//#endregion
|
|
41666
|
-
//#region
|
|
41665
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/public-api.js
|
|
41667
41666
|
var require_public_api = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
41668
41667
|
exports.URL = require_URL().interface;
|
|
41669
41668
|
exports.serializeURL = require_url_state_machine().serializeURL;
|
|
@@ -41676,7 +41675,7 @@ var require_public_api = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
41676
41675
|
exports.parseURL = require_url_state_machine().parseURL;
|
|
41677
41676
|
}));
|
|
41678
41677
|
//#endregion
|
|
41679
|
-
//#region
|
|
41678
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/safer.js
|
|
41680
41679
|
var require_safer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41681
41680
|
var buffer = __require("buffer");
|
|
41682
41681
|
var Buffer = buffer.Buffer;
|
|
@@ -41718,7 +41717,7 @@ var require_safer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41718
41717
|
module.exports = safer;
|
|
41719
41718
|
}));
|
|
41720
41719
|
//#endregion
|
|
41721
|
-
//#region
|
|
41720
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/bom-handling.js
|
|
41722
41721
|
var require_bom_handling = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
41723
41722
|
var BOMChar = "";
|
|
41724
41723
|
exports.PrependBOM = PrependBOMWrapper;
|
|
@@ -41757,7 +41756,7 @@ var require_bom_handling = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
41757
41756
|
};
|
|
41758
41757
|
}));
|
|
41759
41758
|
//#endregion
|
|
41760
|
-
//#region
|
|
41759
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/internal.js
|
|
41761
41760
|
var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41762
41761
|
var Buffer = require_safer().Buffer;
|
|
41763
41762
|
module.exports = {
|
|
@@ -41795,10 +41794,10 @@ var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41795
41794
|
}
|
|
41796
41795
|
InternalCodec.prototype.encoder = InternalEncoder;
|
|
41797
41796
|
InternalCodec.prototype.decoder = InternalDecoder;
|
|
41798
|
-
var StringDecoder
|
|
41799
|
-
if (!StringDecoder
|
|
41797
|
+
var StringDecoder = __require("string_decoder").StringDecoder;
|
|
41798
|
+
if (!StringDecoder.prototype.end) StringDecoder.prototype.end = function() {};
|
|
41800
41799
|
function InternalDecoder(options, codec) {
|
|
41801
|
-
this.decoder = new StringDecoder
|
|
41800
|
+
this.decoder = new StringDecoder(codec.enc);
|
|
41802
41801
|
}
|
|
41803
41802
|
InternalDecoder.prototype.write = function(buf) {
|
|
41804
41803
|
if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf);
|
|
@@ -41891,7 +41890,7 @@ var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41891
41890
|
};
|
|
41892
41891
|
}));
|
|
41893
41892
|
//#endregion
|
|
41894
|
-
//#region
|
|
41893
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf32.js
|
|
41895
41894
|
var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
41896
41895
|
var Buffer = require_safer().Buffer;
|
|
41897
41896
|
exports._utf32 = Utf32Codec;
|
|
@@ -42082,7 +42081,7 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
42082
42081
|
}
|
|
42083
42082
|
}));
|
|
42084
42083
|
//#endregion
|
|
42085
|
-
//#region
|
|
42084
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf16.js
|
|
42086
42085
|
var require_utf16 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
42087
42086
|
var Buffer = require_safer().Buffer;
|
|
42088
42087
|
exports.utf16be = Utf16BECodec;
|
|
@@ -42201,7 +42200,7 @@ var require_utf16 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
42201
42200
|
}
|
|
42202
42201
|
}));
|
|
42203
42202
|
//#endregion
|
|
42204
|
-
//#region
|
|
42203
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf7.js
|
|
42205
42204
|
var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
42206
42205
|
var Buffer = require_safer().Buffer;
|
|
42207
42206
|
exports.utf7 = Utf7Codec;
|
|
@@ -42377,7 +42376,7 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
42377
42376
|
};
|
|
42378
42377
|
}));
|
|
42379
42378
|
//#endregion
|
|
42380
|
-
//#region
|
|
42379
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-codec.js
|
|
42381
42380
|
var require_sbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
42382
42381
|
var Buffer = require_safer().Buffer;
|
|
42383
42382
|
exports._sbcs = SBCSCodec;
|
|
@@ -42423,7 +42422,7 @@ var require_sbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
42423
42422
|
SBCSDecoder.prototype.end = function() {};
|
|
42424
42423
|
}));
|
|
42425
42424
|
//#endregion
|
|
42426
|
-
//#region
|
|
42425
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data.js
|
|
42427
42426
|
var require_sbcs_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
42428
42427
|
module.exports = {
|
|
42429
42428
|
"10029": "maccenteuro",
|
|
@@ -42571,7 +42570,7 @@ var require_sbcs_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
42571
42570
|
};
|
|
42572
42571
|
}));
|
|
42573
42572
|
//#endregion
|
|
42574
|
-
//#region
|
|
42573
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data-generated.js
|
|
42575
42574
|
var require_sbcs_data_generated = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
42576
42575
|
module.exports = {
|
|
42577
42576
|
"437": "cp437",
|
|
@@ -43023,7 +43022,7 @@ var require_sbcs_data_generated = /* @__PURE__ */ __commonJSMin(((exports, modul
|
|
|
43023
43022
|
};
|
|
43024
43023
|
}));
|
|
43025
43024
|
//#endregion
|
|
43026
|
-
//#region
|
|
43025
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-codec.js
|
|
43027
43026
|
var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
43028
43027
|
var Buffer = require_safer().Buffer;
|
|
43029
43028
|
exports._dbcs = DBCSCodec;
|
|
@@ -43365,7 +43364,7 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
43365
43364
|
}
|
|
43366
43365
|
}));
|
|
43367
43366
|
//#endregion
|
|
43368
|
-
//#region
|
|
43367
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/shiftjis.json
|
|
43369
43368
|
var require_shiftjis = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
43370
43369
|
module.exports = [
|
|
43371
43370
|
[
|
|
@@ -43654,7 +43653,7 @@ var require_shiftjis = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43654
43653
|
];
|
|
43655
43654
|
}));
|
|
43656
43655
|
//#endregion
|
|
43657
|
-
//#region
|
|
43656
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/eucjp.json
|
|
43658
43657
|
var require_eucjp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
43659
43658
|
module.exports = [
|
|
43660
43659
|
[
|
|
@@ -44076,7 +44075,7 @@ var require_eucjp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
44076
44075
|
];
|
|
44077
44076
|
}));
|
|
44078
44077
|
//#endregion
|
|
44079
|
-
//#region
|
|
44078
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp936.json
|
|
44080
44079
|
var require_cp936 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
44081
44080
|
module.exports = [
|
|
44082
44081
|
[
|
|
@@ -46657,7 +46656,7 @@ var require_cp936 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46657
46656
|
];
|
|
46658
46657
|
}));
|
|
46659
46658
|
//#endregion
|
|
46660
|
-
//#region
|
|
46659
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gbk-added.json
|
|
46661
46660
|
var require_gbk_added = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
46662
46661
|
module.exports = [
|
|
46663
46662
|
[
|
|
@@ -46884,7 +46883,7 @@ var require_gbk_added = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46884
46883
|
];
|
|
46885
46884
|
}));
|
|
46886
46885
|
//#endregion
|
|
46887
|
-
//#region
|
|
46886
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json
|
|
46888
46887
|
var require_gb18030_ranges = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
46889
46888
|
module.exports = {
|
|
46890
46889
|
"uChars": [
|
|
@@ -47308,7 +47307,7 @@ var require_gb18030_ranges = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
47308
47307
|
};
|
|
47309
47308
|
}));
|
|
47310
47309
|
//#endregion
|
|
47311
|
-
//#region
|
|
47310
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp949.json
|
|
47312
47311
|
var require_cp949 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
47313
47312
|
module.exports = [
|
|
47314
47313
|
[
|
|
@@ -49525,7 +49524,7 @@ var require_cp949 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49525
49524
|
];
|
|
49526
49525
|
}));
|
|
49527
49526
|
//#endregion
|
|
49528
|
-
//#region
|
|
49527
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp950.json
|
|
49529
49528
|
var require_cp950 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49530
49529
|
module.exports = [
|
|
49531
49530
|
[
|
|
@@ -49749,7 +49748,7 @@ var require_cp950 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49749
49748
|
];
|
|
49750
49749
|
}));
|
|
49751
49750
|
//#endregion
|
|
49752
|
-
//#region
|
|
49751
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/big5-added.json
|
|
49753
49752
|
var require_big5_added = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49754
49753
|
module.exports = [
|
|
49755
49754
|
["8740", "䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"],
|
|
@@ -49915,7 +49914,7 @@ var require_big5_added = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49915
49914
|
];
|
|
49916
49915
|
}));
|
|
49917
49916
|
//#endregion
|
|
49918
|
-
//#region
|
|
49917
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-data.js
|
|
49919
49918
|
var require_dbcs_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
49920
49919
|
module.exports = {
|
|
49921
49920
|
"shiftjis": {
|
|
@@ -50095,7 +50094,7 @@ var require_dbcs_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
50095
50094
|
};
|
|
50096
50095
|
}));
|
|
50097
50096
|
//#endregion
|
|
50098
|
-
//#region
|
|
50097
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/index.js
|
|
50099
50098
|
var require_encodings = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
50100
50099
|
var modules = [
|
|
50101
50100
|
require_internal(),
|
|
@@ -50114,7 +50113,7 @@ var require_encodings = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
50114
50113
|
}
|
|
50115
50114
|
}));
|
|
50116
50115
|
//#endregion
|
|
50117
|
-
//#region
|
|
50116
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/streams.js
|
|
50118
50117
|
var require_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
50119
50118
|
var Buffer = require_safer().Buffer;
|
|
50120
50119
|
module.exports = function(stream_module) {
|
|
@@ -50200,7 +50199,7 @@ var require_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
50200
50199
|
};
|
|
50201
50200
|
}));
|
|
50202
50201
|
//#endregion
|
|
50203
|
-
//#region
|
|
50202
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.js
|
|
50204
50203
|
var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
50205
50204
|
var Buffer = require_safer().Buffer;
|
|
50206
50205
|
var bomHandling = require_bom_handling(), iconv = module.exports;
|
|
@@ -50300,7 +50299,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
50300
50299
|
};
|
|
50301
50300
|
}));
|
|
50302
50301
|
//#endregion
|
|
50303
|
-
//#region
|
|
50302
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/lib/encoding.js
|
|
50304
50303
|
var require_encoding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
50305
50304
|
var iconvLite = require_lib$1();
|
|
50306
50305
|
module.exports.convert = convert;
|
|
@@ -50353,7 +50352,7 @@ var require_encoding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
50353
50352
|
}
|
|
50354
50353
|
}));
|
|
50355
50354
|
//#endregion
|
|
50356
|
-
//#region
|
|
50355
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/node-fetch@2.7.0_encoding@0.1.13/node_modules/node-fetch/lib/index.js
|
|
50357
50356
|
var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
50358
50357
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50359
50358
|
function _interopDefault(ex) {
|
|
@@ -51550,10 +51549,10 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
51550
51549
|
exports.AbortError = AbortError;
|
|
51551
51550
|
}));
|
|
51552
51551
|
//#endregion
|
|
51553
|
-
//#region
|
|
51552
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/@grammyjs+types@3.28.0/node_modules/@grammyjs/types/mod.js
|
|
51554
51553
|
var require_types$1 = /* @__PURE__ */ __commonJSMin((() => {}));
|
|
51555
51554
|
//#endregion
|
|
51556
|
-
//#region
|
|
51555
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/types.node.js
|
|
51557
51556
|
var require_types_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
51558
51557
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
51559
51558
|
if (k2 === void 0) k2 = k;
|
|
@@ -51633,7 +51632,7 @@ var require_types_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
51633
51632
|
}
|
|
51634
51633
|
}));
|
|
51635
51634
|
//#endregion
|
|
51636
|
-
//#region
|
|
51635
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/types.js
|
|
51637
51636
|
var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
51638
51637
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
51639
51638
|
if (k2 === void 0) k2 = k;
|
|
@@ -51656,7 +51655,7 @@ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
51656
51655
|
__exportStar(require_types_node(), exports);
|
|
51657
51656
|
}));
|
|
51658
51657
|
//#endregion
|
|
51659
|
-
//#region
|
|
51658
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/core/payload.js
|
|
51660
51659
|
var require_payload = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
51661
51660
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51662
51661
|
exports.requiresFormDataUpload = requiresFormDataUpload;
|
|
@@ -51823,7 +51822,7 @@ ${filename}
|
|
|
51823
51822
|
}
|
|
51824
51823
|
}));
|
|
51825
51824
|
//#endregion
|
|
51826
|
-
//#region
|
|
51825
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/event-target-shim@5.0.1/node_modules/event-target-shim/dist/event-target-shim.js
|
|
51827
51826
|
/**
|
|
51828
51827
|
* @author Toru Nagashima <https://github.com/mysticatea>
|
|
51829
51828
|
* @copyright 2015 Toru Nagashima. All rights reserved.
|
|
@@ -52455,7 +52454,7 @@ var require_event_target_shim = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
52455
52454
|
module.exports.defineEventAttribute = defineEventAttribute;
|
|
52456
52455
|
}));
|
|
52457
52456
|
//#endregion
|
|
52458
|
-
//#region
|
|
52457
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/abort-controller@3.0.0/node_modules/abort-controller/dist/abort-controller.js
|
|
52459
52458
|
/**
|
|
52460
52459
|
* @author Toru Nagashima <https://github.com/mysticatea>
|
|
52461
52460
|
* See LICENSE file in root directory for full license.
|
|
@@ -52563,7 +52562,7 @@ var require_abort_controller = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
52563
52562
|
module.exports.AbortSignal = AbortSignal;
|
|
52564
52563
|
}));
|
|
52565
52564
|
//#endregion
|
|
52566
|
-
//#region
|
|
52565
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/shim.node.js
|
|
52567
52566
|
var require_shim_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
52568
52567
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52569
52568
|
exports.fetch = exports.AbortController = void 0;
|
|
@@ -52583,7 +52582,7 @@ var require_shim_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
52583
52582
|
});
|
|
52584
52583
|
}));
|
|
52585
52584
|
//#endregion
|
|
52586
|
-
//#region
|
|
52585
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/core/client.js
|
|
52587
52586
|
var require_client = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
52588
52587
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52589
52588
|
exports.createRawApi = createRawApi;
|
|
@@ -52784,7 +52783,7 @@ consider using TypeScript. https://www.typescriptlang.org/`);
|
|
|
52784
52783
|
const shim_node_js_1 = require_shim_node();
|
|
52785
52784
|
}));
|
|
52786
52785
|
//#endregion
|
|
52787
|
-
//#region
|
|
52786
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/core/api.js
|
|
52788
52787
|
var require_api = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
52789
52788
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52790
52789
|
exports.Api = void 0;
|
|
@@ -55839,7 +55838,7 @@ var require_api = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
55839
55838
|
exports.Api = Api;
|
|
55840
55839
|
}));
|
|
55841
55840
|
//#endregion
|
|
55842
|
-
//#region
|
|
55841
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/bot.js
|
|
55843
55842
|
var require_bot = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
55844
55843
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55845
55844
|
exports.Bot = exports.BotError = exports.DEFAULT_UPDATE_TYPES = void 0;
|
|
@@ -56378,7 +56377,7 @@ you can circumvent this protection against memory leaks.`);
|
|
|
56378
56377
|
const shim_node_js_1 = require_shim_node();
|
|
56379
56378
|
}));
|
|
56380
56379
|
//#endregion
|
|
56381
|
-
//#region
|
|
56380
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/convenience/constants.js
|
|
56382
56381
|
var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
56383
56382
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56384
56383
|
exports.API_CONSTANTS = void 0;
|
|
@@ -56418,7 +56417,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
56418
56417
|
Object.freeze(exports.API_CONSTANTS);
|
|
56419
56418
|
}));
|
|
56420
56419
|
//#endregion
|
|
56421
|
-
//#region
|
|
56420
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/convenience/inline_query.js
|
|
56422
56421
|
var require_inline_query = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
56423
56422
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56424
56423
|
exports.InlineQueryResultBuilder = void 0;
|
|
@@ -56946,7 +56945,7 @@ var require_inline_query = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
56946
56945
|
};
|
|
56947
56946
|
}));
|
|
56948
56947
|
//#endregion
|
|
56949
|
-
//#region
|
|
56948
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/convenience/input_media.js
|
|
56950
56949
|
var require_input_media = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
56951
56950
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56952
56951
|
exports.InputMediaBuilder = void 0;
|
|
@@ -57051,7 +57050,7 @@ var require_input_media = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
57051
57050
|
};
|
|
57052
57051
|
}));
|
|
57053
57052
|
//#endregion
|
|
57054
|
-
//#region
|
|
57053
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/convenience/keyboard.js
|
|
57055
57054
|
var require_keyboard = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
57056
57055
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57057
57056
|
exports.InlineKeyboard = exports.Keyboard = void 0;
|
|
@@ -58214,7 +58213,7 @@ var require_keyboard = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
58214
58213
|
}
|
|
58215
58214
|
}));
|
|
58216
58215
|
//#endregion
|
|
58217
|
-
//#region
|
|
58216
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/convenience/session.js
|
|
58218
58217
|
var require_session = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
58219
58218
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58220
58219
|
exports.MemorySessionStorage = void 0;
|
|
@@ -58630,7 +58629,7 @@ var require_session = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
58630
58629
|
}
|
|
58631
58630
|
}));
|
|
58632
58631
|
//#endregion
|
|
58633
|
-
//#region
|
|
58632
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/convenience/frameworks.js
|
|
58634
58633
|
var require_frameworks = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
58635
58634
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58636
58635
|
exports.adapters = void 0;
|
|
@@ -59017,7 +59016,7 @@ var require_frameworks = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
59017
59016
|
};
|
|
59018
59017
|
}));
|
|
59019
59018
|
//#endregion
|
|
59020
|
-
//#region
|
|
59019
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/grammy@1.44.0_encoding@0.1.13/node_modules/grammy/out/convenience/webhook.js
|
|
59021
59020
|
var require_webhook = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
59022
59021
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59023
59022
|
exports.webhookCallback = webhookCallback;
|
|
@@ -59413,9 +59412,6 @@ function isGermanGroupBroadcast(text) {
|
|
|
59413
59412
|
}
|
|
59414
59413
|
return false;
|
|
59415
59414
|
}
|
|
59416
|
-
function hasAllMention(text) {
|
|
59417
|
-
return /(?:^|[^\p{L}\p{N}_@])@all(?=$|[^\p{L}\p{N}_])/iu.test(text);
|
|
59418
|
-
}
|
|
59419
59415
|
/**
|
|
59420
59416
|
* Bot-to-bot loop guard (Telegram's own safety requirement for Bot API 10.0
|
|
59421
59417
|
* bot-to-bot mode): once King can receive other bots' messages, an unthrottled
|
|
@@ -59483,10 +59479,9 @@ function gate(ctx, botUsername) {
|
|
|
59483
59479
|
if (groupAllowFrom.length > 0 && !groupAllowFrom.includes(senderId)) return { action: "drop" };
|
|
59484
59480
|
const addressesAnother = matchesAny(ctx.text, access.ignorePatterns);
|
|
59485
59481
|
const mentioned = !addressesAnother && isMentioned(ctx, botUsername, access.mentionPatterns);
|
|
59486
|
-
|
|
59487
|
-
if (policy.requireMention && !mentioned && !broadcastMention) return { action: "drop" };
|
|
59482
|
+
if (policy.requireMention === true && !mentioned) return { action: "drop" };
|
|
59488
59483
|
const mentionBypass = from.isBot !== true && (policy.alwaysAllowFrom ?? []).includes(senderId);
|
|
59489
|
-
const addressed =
|
|
59484
|
+
const addressed = !addressesAnother && (mentionBypass || mentioned || isGermanGroupBroadcast(ctx.text));
|
|
59490
59485
|
const inferAddressing = !addressesAnother && !addressed && from.isBot !== true;
|
|
59491
59486
|
if (!addressed && from.isBot === true && !botLoopGuardAllows(senderId)) return { action: "drop" };
|
|
59492
59487
|
return {
|
|
@@ -60027,7 +60022,6 @@ function toInboundCtx(ctx, text) {
|
|
|
60027
60022
|
chatId: ctx.chat?.id,
|
|
60028
60023
|
chatType: chatType === "private" || chatType === "group" || chatType === "supergroup" || chatType === "channel" ? chatType : void 0,
|
|
60029
60024
|
messageId: ctx.message?.message_id,
|
|
60030
|
-
messageThreadId: ctx.message?.is_topic_message === true || ctx.chat?.is_forum === true ? ctx.message?.message_thread_id : void 0,
|
|
60031
60025
|
text,
|
|
60032
60026
|
entities: (ctx.message?.entities ?? ctx.message?.caption_entities ?? []).map((entity) => ({
|
|
60033
60027
|
type: entity.type,
|
|
@@ -60158,11 +60152,6 @@ function registerTypeHandlers(bot, token, deliver) {
|
|
|
60158
60152
|
* forgeable by any allowlisted sender typing that string.
|
|
60159
60153
|
*/
|
|
60160
60154
|
const CONTEXT_TRUNCATED_MARKER = "\n[Telegram-Kontext gekuerzt]";
|
|
60161
|
-
function telegramThreadId(value) {
|
|
60162
|
-
if (value === void 0) return void 0;
|
|
60163
|
-
if (typeof value !== "string" && typeof value !== "number" || !/^[1-9]\d*$/u.test(String(value)) || !Number.isSafeInteger(Number(value))) throw new Error("Invalid Telegram message_thread_id");
|
|
60164
|
-
return Number(value);
|
|
60165
|
-
}
|
|
60166
60155
|
/** Bounded per-chat buffer used by headless delivery between addressed turns. */
|
|
60167
60156
|
var BoundedChannelContextBuffer = class {
|
|
60168
60157
|
maxMessages;
|
|
@@ -60172,19 +60161,17 @@ var BoundedChannelContextBuffer = class {
|
|
|
60172
60161
|
this.maxMessages = maxMessages;
|
|
60173
60162
|
this.maxChars = maxChars;
|
|
60174
60163
|
}
|
|
60175
|
-
add(chatId, tag
|
|
60176
|
-
const
|
|
60177
|
-
const messages = this.messagesByChat.get(route) ?? [];
|
|
60164
|
+
add(chatId, tag) {
|
|
60165
|
+
const messages = this.messagesByChat.get(chatId) ?? [];
|
|
60178
60166
|
const boundedTag = tag.length <= this.maxChars ? tag : this.maxChars <= 28 ? CONTEXT_TRUNCATED_MARKER.slice(0, this.maxChars) : `${tag.slice(0, this.maxChars - 28)}${CONTEXT_TRUNCATED_MARKER}`;
|
|
60179
60167
|
messages.push(boundedTag);
|
|
60180
60168
|
let chars = messages.reduce((sum, message) => sum + message.length, 0);
|
|
60181
60169
|
while (messages.length > this.maxMessages || chars > this.maxChars) chars -= messages.shift()?.length ?? 0;
|
|
60182
|
-
this.messagesByChat.set(
|
|
60170
|
+
this.messagesByChat.set(chatId, messages);
|
|
60183
60171
|
}
|
|
60184
|
-
take(chatId
|
|
60185
|
-
const
|
|
60186
|
-
|
|
60187
|
-
this.messagesByChat.delete(route);
|
|
60172
|
+
take(chatId) {
|
|
60173
|
+
const messages = this.messagesByChat.get(chatId) ?? [];
|
|
60174
|
+
this.messagesByChat.delete(chatId);
|
|
60188
60175
|
return messages;
|
|
60189
60176
|
}
|
|
60190
60177
|
};
|
|
@@ -60198,7 +60185,7 @@ var BoundedChannelContextBuffer = class {
|
|
|
60198
60185
|
function buildChannelTag(content, meta, addressed = true, inferAddressing = false) {
|
|
60199
60186
|
const pairs = [["source", "telegram"]];
|
|
60200
60187
|
for (const [key, value] of Object.entries(meta)) if (value !== void 0) pairs.push([key, String(value)]);
|
|
60201
|
-
return `<channel ${pairs.map(([key, value]) => `${key}="${escapeAttr(value)}"`).join(" ")}>\n${content}\n</channel>\n${addressed
|
|
60188
|
+
return `<channel ${pairs.map(([key, value]) => `${key}="${escapeAttr(value)}"`).join(" ")}>\n${content}\n</channel>\n${addressed ? `[REPLY-PFLICHT: Der Absender liest NUR Telegram. Sende deine Antwort mit dem telegram reply-Tool an chat_id=${meta.chat_id}. Sichtbarer Antworttext kann auch automatisch weitergeleitet werden; er ist kein privater Denkbereich.]` : inferAddressing ? `[SEMANTISCHE ADRESSIERUNG: Diese menschliche Gruppennachricht nennt dich nicht explizit. Entscheide anhand von Inhalt und Gesprächskontext, ob sie an dich gerichtet ist oder Arbeit von dir verlangt. Falls ja, antworte kurz mit dem telegram reply-Tool an chat_id=${meta.chat_id}. Falls nein, beende den Turn ohne Ausgabe; sende keine Bestätigung deiner Stille.]` : "[NUR MITLESEN — diese Nachricht ist NICHT an dich gerichtet (kein @King, keine Antwort an dich, sie spricht jemand anderen oder die Gruppe allgemein an). ANTWORTE NICHT: kein reply-Tool, keine Bestätigung, kein \"verstanden\", kein \"halte mich raus\" — beende den Turn einfach ohne Ausgabe. NUR wenn du ein echtes, konkretes Ergebnis oder einen echten Blocker beitragen kannst, antwortest du kurz. Im Zweifel: schweigen.]"}`;
|
|
60202
60189
|
}
|
|
60203
60190
|
/**
|
|
60204
60191
|
* Sent once as the head of the first prompt of every bridged session —
|
|
@@ -60216,10 +60203,6 @@ function buildPreamble() {
|
|
|
60216
60203
|
"useful contribution: a relevant finding, error, or improvement. Otherwise finish",
|
|
60217
60204
|
"with no reply tool call and no assistant text. Do not narrate that decision, cite",
|
|
60218
60205
|
"a silence rule, acknowledge inactivity, or report that you ended without output.",
|
|
60219
|
-
"If someone answers your status question with \"all work is done; new tasks will",
|
|
60220
|
-
"arrive later\", the exchange is closed. Do not restate or acknowledge that answer.",
|
|
60221
|
-
"If your host requires assistant text to finish a silent turn, output exactly",
|
|
60222
|
-
"[[BLUN_TELEGRAM_SILENT]] and nothing else. Never send this marker with reply.",
|
|
60223
60206
|
"When you do have something useful to contribute, send it once without repeating it.",
|
|
60224
60207
|
"",
|
|
60225
60208
|
"Messages arrive wrapped as <channel source=\"telegram\" chat_id=\"...\" message_id=\"...\"",
|
|
@@ -60304,7 +60287,7 @@ function config(newConfig) {
|
|
|
60304
60287
|
return globalConfig;
|
|
60305
60288
|
}
|
|
60306
60289
|
//#endregion
|
|
60307
|
-
//#region
|
|
60290
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js
|
|
60308
60291
|
function getEnumValues(entries) {
|
|
60309
60292
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
60310
60293
|
return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
@@ -60614,7 +60597,7 @@ function issue(...args) {
|
|
|
60614
60597
|
return { ...iss };
|
|
60615
60598
|
}
|
|
60616
60599
|
//#endregion
|
|
60617
|
-
//#region
|
|
60600
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js
|
|
60618
60601
|
const initializer$1 = (inst, def) => {
|
|
60619
60602
|
inst.name = "$ZodError";
|
|
60620
60603
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -60671,7 +60654,7 @@ function formatError(error, mapper = (issue) => issue.message) {
|
|
|
60671
60654
|
return fieldErrors;
|
|
60672
60655
|
}
|
|
60673
60656
|
//#endregion
|
|
60674
|
-
//#region
|
|
60657
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js
|
|
60675
60658
|
const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
60676
60659
|
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
|
60677
60660
|
const result = schema._zod.run({
|
|
@@ -60764,7 +60747,7 @@ const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
60764
60747
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
60765
60748
|
};
|
|
60766
60749
|
//#endregion
|
|
60767
|
-
//#region
|
|
60750
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js
|
|
60768
60751
|
const cuid = /^[cC][^\s-]{8,}$/;
|
|
60769
60752
|
const cuid2 = /^[0-9a-z]+$/;
|
|
60770
60753
|
const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
@@ -60822,7 +60805,7 @@ const boolean$1 = /^(?:true|false)$/i;
|
|
|
60822
60805
|
const lowercase = /^[^A-Z]*$/;
|
|
60823
60806
|
const uppercase = /^[^a-z]*$/;
|
|
60824
60807
|
//#endregion
|
|
60825
|
-
//#region
|
|
60808
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js
|
|
60826
60809
|
const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
60827
60810
|
var _a;
|
|
60828
60811
|
inst._zod ?? (inst._zod = {});
|
|
@@ -61180,7 +61163,7 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
|
|
|
61180
61163
|
};
|
|
61181
61164
|
});
|
|
61182
61165
|
//#endregion
|
|
61183
|
-
//#region
|
|
61166
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js
|
|
61184
61167
|
var Doc = class {
|
|
61185
61168
|
constructor(args = []) {
|
|
61186
61169
|
this.content = [];
|
|
@@ -61211,14 +61194,14 @@ var Doc = class {
|
|
|
61211
61194
|
}
|
|
61212
61195
|
};
|
|
61213
61196
|
//#endregion
|
|
61214
|
-
//#region
|
|
61197
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js
|
|
61215
61198
|
const version = {
|
|
61216
61199
|
major: 4,
|
|
61217
61200
|
minor: 3,
|
|
61218
61201
|
patch: 6
|
|
61219
61202
|
};
|
|
61220
61203
|
//#endregion
|
|
61221
|
-
//#region
|
|
61204
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js
|
|
61222
61205
|
const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
61223
61206
|
var _a;
|
|
61224
61207
|
inst ?? (inst = {});
|
|
@@ -62363,7 +62346,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
62363
62346
|
}
|
|
62364
62347
|
}
|
|
62365
62348
|
//#endregion
|
|
62366
|
-
//#region
|
|
62349
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js
|
|
62367
62350
|
var _a;
|
|
62368
62351
|
var $ZodRegistry = class {
|
|
62369
62352
|
constructor() {
|
|
@@ -62410,7 +62393,7 @@ function registry() {
|
|
|
62410
62393
|
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
62411
62394
|
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
62412
62395
|
//#endregion
|
|
62413
|
-
//#region
|
|
62396
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js
|
|
62414
62397
|
/* @__NO_SIDE_EFFECTS__ */
|
|
62415
62398
|
function _string(Class, params) {
|
|
62416
62399
|
return new Class({
|
|
@@ -62910,7 +62893,7 @@ function _check(fn, params) {
|
|
|
62910
62893
|
return ch;
|
|
62911
62894
|
}
|
|
62912
62895
|
//#endregion
|
|
62913
|
-
//#region
|
|
62896
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js
|
|
62914
62897
|
function initializeContext(params) {
|
|
62915
62898
|
let target = params?.target ?? "draft-2020-12";
|
|
62916
62899
|
if (target === "draft-4") target = "draft-04";
|
|
@@ -63195,7 +63178,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
63195
63178
|
return finalize(ctx, schema);
|
|
63196
63179
|
};
|
|
63197
63180
|
//#endregion
|
|
63198
|
-
//#region
|
|
63181
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
|
|
63199
63182
|
const formatMap = {
|
|
63200
63183
|
guid: "uuid",
|
|
63201
63184
|
url: "uri",
|
|
@@ -63461,7 +63444,7 @@ const optionalProcessor = (schema, ctx, _json, params) => {
|
|
|
63461
63444
|
seen.ref = def.innerType;
|
|
63462
63445
|
};
|
|
63463
63446
|
//#endregion
|
|
63464
|
-
//#region
|
|
63447
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js
|
|
63465
63448
|
const ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
|
|
63466
63449
|
$ZodISODateTime.init(inst, def);
|
|
63467
63450
|
ZodStringFormat.init(inst, def);
|
|
@@ -63491,7 +63474,7 @@ function duration(params) {
|
|
|
63491
63474
|
return /* @__PURE__ */ _isoDuration(ZodISODuration, params);
|
|
63492
63475
|
}
|
|
63493
63476
|
//#endregion
|
|
63494
|
-
//#region
|
|
63477
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js
|
|
63495
63478
|
const initializer = (inst, issues) => {
|
|
63496
63479
|
$ZodError.init(inst, issues);
|
|
63497
63480
|
inst.name = "ZodError";
|
|
@@ -63514,7 +63497,7 @@ const initializer = (inst, issues) => {
|
|
|
63514
63497
|
const ZodError = $constructor("ZodError", initializer);
|
|
63515
63498
|
const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
|
|
63516
63499
|
//#endregion
|
|
63517
|
-
//#region
|
|
63500
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js
|
|
63518
63501
|
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
63519
63502
|
const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
63520
63503
|
const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -63528,7 +63511,7 @@ const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
63528
63511
|
const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
63529
63512
|
const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
63530
63513
|
//#endregion
|
|
63531
|
-
//#region
|
|
63514
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
|
|
63532
63515
|
const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
63533
63516
|
$ZodType.init(inst, def);
|
|
63534
63517
|
Object.assign(inst["~standard"], { jsonSchema: {
|
|
@@ -64123,7 +64106,7 @@ function superRefine(fn) {
|
|
|
64123
64106
|
return /* @__PURE__ */ _superRefine(fn);
|
|
64124
64107
|
}
|
|
64125
64108
|
//#endregion
|
|
64126
|
-
//#region
|
|
64109
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/@agentclientprotocol+sdk@0.23.0_zod@4.3.6/node_modules/@agentclientprotocol/sdk/dist/schema/index.js
|
|
64127
64110
|
const AGENT_METHODS = {
|
|
64128
64111
|
authenticate: "authenticate",
|
|
64129
64112
|
document_did_change: "document/didChange",
|
|
@@ -64172,7 +64155,7 @@ const CLIENT_METHODS = {
|
|
|
64172
64155
|
terminal_wait_for_exit: "terminal/wait_for_exit"
|
|
64173
64156
|
};
|
|
64174
64157
|
//#endregion
|
|
64175
|
-
//#region
|
|
64158
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/@agentclientprotocol+sdk@0.23.0_zod@4.3.6/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js
|
|
64176
64159
|
/**
|
|
64177
64160
|
* **UNSTABLE**
|
|
64178
64161
|
*
|
|
@@ -66829,7 +66812,7 @@ union([object({
|
|
|
66829
66812
|
id: zRequestId
|
|
66830
66813
|
})]);
|
|
66831
66814
|
//#endregion
|
|
66832
|
-
//#region
|
|
66815
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/@agentclientprotocol+sdk@0.23.0_zod@4.3.6/node_modules/@agentclientprotocol/sdk/dist/stream.js
|
|
66833
66816
|
/**
|
|
66834
66817
|
* Creates an ACP Stream from a pair of newline-delimited JSON streams.
|
|
66835
66818
|
*
|
|
@@ -66895,7 +66878,7 @@ function ndJsonStream(output, input) {
|
|
|
66895
66878
|
};
|
|
66896
66879
|
}
|
|
66897
66880
|
//#endregion
|
|
66898
|
-
//#region
|
|
66881
|
+
//#region ../../../../king-setup-r10-candidate-20261018/source/node_modules/.pnpm/@agentclientprotocol+sdk@0.23.0_zod@4.3.6/node_modules/@agentclientprotocol/sdk/dist/acp.js
|
|
66899
66882
|
function emptyObjectResponse(response) {
|
|
66900
66883
|
return response ?? {};
|
|
66901
66884
|
}
|
|
@@ -67687,6 +67670,204 @@ var RequestError = class RequestError extends Error {
|
|
|
67687
67670
|
}
|
|
67688
67671
|
};
|
|
67689
67672
|
//#endregion
|
|
67673
|
+
//#region src/language-release.ts
|
|
67674
|
+
const EXACT_LANGUAGE_TAG = /^(?:[A-Za-z]{2,8}|x)(?:-[A-Za-z0-9]{1,8})*$/;
|
|
67675
|
+
const LETTER = /^\p{Letter}$/u;
|
|
67676
|
+
const LATIN = /^\p{Script=Latin}$/u;
|
|
67677
|
+
const CYRILLIC = /^\p{Script=Cyrillic}$/u;
|
|
67678
|
+
const GREEK = /^\p{Script=Greek}$/u;
|
|
67679
|
+
const ARABIC = /^\p{Script=Arabic}$/u;
|
|
67680
|
+
const HEBREW = /^\p{Script=Hebrew}$/u;
|
|
67681
|
+
const HAN = /^\p{Script=Han}$/u;
|
|
67682
|
+
const HIRAGANA = /^\p{Script=Hiragana}$/u;
|
|
67683
|
+
const KATAKANA = /^\p{Script=Katakana}$/u;
|
|
67684
|
+
const HANGUL = /^\p{Script=Hangul}$/u;
|
|
67685
|
+
const LATIN_LANGUAGES = new Set([
|
|
67686
|
+
"af",
|
|
67687
|
+
"bs",
|
|
67688
|
+
"ca",
|
|
67689
|
+
"cs",
|
|
67690
|
+
"cy",
|
|
67691
|
+
"da",
|
|
67692
|
+
"de",
|
|
67693
|
+
"en",
|
|
67694
|
+
"es",
|
|
67695
|
+
"et",
|
|
67696
|
+
"eu",
|
|
67697
|
+
"fi",
|
|
67698
|
+
"fr",
|
|
67699
|
+
"ga",
|
|
67700
|
+
"gd",
|
|
67701
|
+
"gl",
|
|
67702
|
+
"hr",
|
|
67703
|
+
"hu",
|
|
67704
|
+
"id",
|
|
67705
|
+
"is",
|
|
67706
|
+
"it",
|
|
67707
|
+
"la",
|
|
67708
|
+
"lb",
|
|
67709
|
+
"lt",
|
|
67710
|
+
"lv",
|
|
67711
|
+
"ms",
|
|
67712
|
+
"mt",
|
|
67713
|
+
"nl",
|
|
67714
|
+
"no",
|
|
67715
|
+
"pl",
|
|
67716
|
+
"pt",
|
|
67717
|
+
"ro",
|
|
67718
|
+
"sk",
|
|
67719
|
+
"sl",
|
|
67720
|
+
"sq",
|
|
67721
|
+
"sv",
|
|
67722
|
+
"sw",
|
|
67723
|
+
"tr",
|
|
67724
|
+
"vi"
|
|
67725
|
+
]);
|
|
67726
|
+
function canonicalText(text) {
|
|
67727
|
+
return text.replace(/^\uFEFF/, "").replace(/\r\n?/g, "\n").normalize("NFC");
|
|
67728
|
+
}
|
|
67729
|
+
function canonicalHash(text) {
|
|
67730
|
+
return createHash("sha256").update(canonicalText(text), "utf8").digest("hex");
|
|
67731
|
+
}
|
|
67732
|
+
function maskTechnicalText(text) {
|
|
67733
|
+
const mask = (value) => " ".repeat(value.length);
|
|
67734
|
+
return text.replace(/```[\s\S]*?```|~~~[\s\S]*?~~~/g, mask).replace(/`[^`\r\n]*`/g, mask);
|
|
67735
|
+
}
|
|
67736
|
+
function allowedScriptMatchers(locale) {
|
|
67737
|
+
if (!EXACT_LANGUAGE_TAG.test(locale) || ["auto", "all"].includes(locale.toLowerCase())) throw new Error("language release blocked: exact output locale required");
|
|
67738
|
+
const parts = locale.replaceAll("_", "-").split("-");
|
|
67739
|
+
const base = parts[0]?.toLowerCase() ?? "";
|
|
67740
|
+
const explicitScript = parts.find((part) => part.length === 4)?.toLowerCase();
|
|
67741
|
+
if (explicitScript !== void 0) {
|
|
67742
|
+
const explicit = {
|
|
67743
|
+
latn: [LATIN],
|
|
67744
|
+
cyrl: [CYRILLIC],
|
|
67745
|
+
grek: [GREEK],
|
|
67746
|
+
arab: [ARABIC],
|
|
67747
|
+
hebr: [HEBREW],
|
|
67748
|
+
hani: [HAN],
|
|
67749
|
+
jpan: [
|
|
67750
|
+
HAN,
|
|
67751
|
+
HIRAGANA,
|
|
67752
|
+
KATAKANA
|
|
67753
|
+
],
|
|
67754
|
+
hang: [HANGUL, HAN]
|
|
67755
|
+
}[explicitScript];
|
|
67756
|
+
if (explicit === void 0) throw new Error("language release blocked: unsupported output script");
|
|
67757
|
+
return explicit;
|
|
67758
|
+
}
|
|
67759
|
+
if (LATIN_LANGUAGES.has(base)) return [LATIN];
|
|
67760
|
+
if ([
|
|
67761
|
+
"ru",
|
|
67762
|
+
"uk",
|
|
67763
|
+
"bg",
|
|
67764
|
+
"mk"
|
|
67765
|
+
].includes(base)) return [CYRILLIC];
|
|
67766
|
+
if (base === "el") return [GREEK];
|
|
67767
|
+
if ([
|
|
67768
|
+
"ar",
|
|
67769
|
+
"fa",
|
|
67770
|
+
"ur"
|
|
67771
|
+
].includes(base)) return [ARABIC];
|
|
67772
|
+
if (base === "he") return [HEBREW];
|
|
67773
|
+
if (base === "zh") return [HAN];
|
|
67774
|
+
if (base === "ja") return [
|
|
67775
|
+
HAN,
|
|
67776
|
+
HIRAGANA,
|
|
67777
|
+
KATAKANA
|
|
67778
|
+
];
|
|
67779
|
+
if (base === "ko") return [HANGUL, HAN];
|
|
67780
|
+
throw new Error("language release blocked: output locale has no deterministic script policy");
|
|
67781
|
+
}
|
|
67782
|
+
function assertExpectedScript(text, locale) {
|
|
67783
|
+
const allowed = allowedScriptMatchers(locale);
|
|
67784
|
+
for (const character of maskTechnicalText(text)) {
|
|
67785
|
+
if (!LETTER.test(character)) continue;
|
|
67786
|
+
if (allowed.some((matcher) => matcher.test(character))) continue;
|
|
67787
|
+
const point = character.codePointAt(0)?.toString(16).toUpperCase().padStart(4, "0") ?? "UNKNOWN";
|
|
67788
|
+
throw new Error(`language release blocked: unexpected-script-contamination (U+${point})`);
|
|
67789
|
+
}
|
|
67790
|
+
}
|
|
67791
|
+
function parseAndVerifySignature(token, key) {
|
|
67792
|
+
if (key.length < 32) throw new Error("language release blocked: invalid verification key");
|
|
67793
|
+
if (token.length > 16384) throw new Error("language release blocked: release token too large");
|
|
67794
|
+
const parts = token.split(".");
|
|
67795
|
+
if (parts.length !== 3 || parts[0] !== "blg6" || parts[1] === "" || parts[2] === "") throw new Error("language release blocked: malformed release token");
|
|
67796
|
+
const encoded = parts[1];
|
|
67797
|
+
let supplied;
|
|
67798
|
+
let payload;
|
|
67799
|
+
try {
|
|
67800
|
+
supplied = Buffer.from(parts[2], "base64url");
|
|
67801
|
+
payload = JSON.parse(Buffer.from(encoded, "base64url").toString("utf8"));
|
|
67802
|
+
} catch {
|
|
67803
|
+
throw new Error("language release blocked: malformed release token");
|
|
67804
|
+
}
|
|
67805
|
+
const expected = createHmac("sha256", key).update(encoded).digest();
|
|
67806
|
+
if (supplied.length !== expected.length || !timingSafeEqual(supplied, expected)) throw new Error("language release blocked: invalid release token signature");
|
|
67807
|
+
if (payload === null || typeof payload !== "object" || Array.isArray(payload)) throw new Error("language release blocked: malformed release payload");
|
|
67808
|
+
return payload;
|
|
67809
|
+
}
|
|
67810
|
+
function assertEqual(actual, expected, field) {
|
|
67811
|
+
if (actual !== expected) throw new Error(`language release blocked: ${field} mismatch`);
|
|
67812
|
+
}
|
|
67813
|
+
function verifyTelegramLanguageRelease(text, releaseToken, options) {
|
|
67814
|
+
if (typeof releaseToken !== "string" || releaseToken.length === 0) throw new Error("language release blocked: release token required");
|
|
67815
|
+
if (options.expectedVersion.trim().length === 0) throw new Error("language release blocked: expected guard version required");
|
|
67816
|
+
assertExpectedScript(text, options.locale);
|
|
67817
|
+
const payload = parseAndVerifySignature(releaseToken, options.key);
|
|
67818
|
+
const now = Math.floor(options.now ?? Date.now() / 1e3);
|
|
67819
|
+
if (!Number.isSafeInteger(payload.iat) || !Number.isSafeInteger(payload.exp)) throw new Error("language release blocked: invalid receipt lifetime");
|
|
67820
|
+
const issuedAt = payload.iat;
|
|
67821
|
+
const expiresAt = payload.exp;
|
|
67822
|
+
if (expiresAt < now) throw new Error("language release blocked: release token expired");
|
|
67823
|
+
if (issuedAt > now + 60 || expiresAt < issuedAt || expiresAt - issuedAt > 604800) throw new Error("language release blocked: invalid receipt lifetime");
|
|
67824
|
+
if (typeof payload.nonce !== "string" || payload.nonce.length === 0) throw new Error("language release blocked: invalid receipt nonce");
|
|
67825
|
+
assertEqual(payload.source_sha256, canonicalHash(""), "source");
|
|
67826
|
+
assertEqual(payload.target_sha256, canonicalHash(text), "target");
|
|
67827
|
+
if (payload.language !== options.locale) throw new Error(`language release blocked: language mismatch (expected ${options.locale})`);
|
|
67828
|
+
assertEqual(payload.purpose, "response", "purpose");
|
|
67829
|
+
assertEqual(payload.content_type, "prose", "content type");
|
|
67830
|
+
assertEqual(payload.short_text_reviewed, false, "short text review");
|
|
67831
|
+
assertEqual(payload.v, options.expectedVersion, "version");
|
|
67832
|
+
}
|
|
67833
|
+
function isLanguageReleaseRequired() {
|
|
67834
|
+
return process.env["BLUN_TELEGRAM_LANGUAGE_GATE"]?.trim().toLowerCase() === "required";
|
|
67835
|
+
}
|
|
67836
|
+
function requiredSetting(name) {
|
|
67837
|
+
const value = process.env[name]?.trim();
|
|
67838
|
+
if (value === void 0 || value.length === 0) throw new Error(`language release blocked: host setting ${name} required`);
|
|
67839
|
+
return value;
|
|
67840
|
+
}
|
|
67841
|
+
function telegramLanguageReleaseLocale() {
|
|
67842
|
+
if (!isLanguageReleaseRequired()) return void 0;
|
|
67843
|
+
const locale = requiredSetting("BLUN_TELEGRAM_OUTPUT_LOCALE");
|
|
67844
|
+
allowedScriptMatchers(locale);
|
|
67845
|
+
return locale;
|
|
67846
|
+
}
|
|
67847
|
+
function defaultKeyFile() {
|
|
67848
|
+
const configuredHome = process.env["BLUN_HOME"]?.trim();
|
|
67849
|
+
return join(configuredHome !== void 0 && configuredHome.length > 0 ? configuredHome : join(homedir(), ".blun"), "secrets", "blun-language-guard-signing.key");
|
|
67850
|
+
}
|
|
67851
|
+
function assertTelegramLanguageReleased(text, releaseToken, now) {
|
|
67852
|
+
if (!isLanguageReleaseRequired()) return;
|
|
67853
|
+
if (typeof releaseToken !== "string" || releaseToken.length === 0) throw new Error("language release blocked: release token required");
|
|
67854
|
+
const locale = telegramLanguageReleaseLocale();
|
|
67855
|
+
if (locale === void 0) throw new Error("language release blocked: exact output locale required");
|
|
67856
|
+
const keyFile = process.env["BLUN_LANGUAGE_GUARD_KEY_FILE"]?.trim() || defaultKeyFile();
|
|
67857
|
+
let key;
|
|
67858
|
+
try {
|
|
67859
|
+
key = readFileSync(keyFile);
|
|
67860
|
+
} catch {
|
|
67861
|
+
throw new Error("language release blocked: verification key unavailable");
|
|
67862
|
+
}
|
|
67863
|
+
verifyTelegramLanguageRelease(text, releaseToken, {
|
|
67864
|
+
locale,
|
|
67865
|
+
expectedVersion: requiredSetting("BLUN_LANGUAGE_GUARD_VERSION"),
|
|
67866
|
+
key,
|
|
67867
|
+
now
|
|
67868
|
+
});
|
|
67869
|
+
}
|
|
67870
|
+
//#endregion
|
|
67690
67871
|
//#region src/noise.ts
|
|
67691
67872
|
/**
|
|
67692
67873
|
* Conservative outbound guard for group acknowledgements and narrated silence.
|
|
@@ -67698,13 +67879,6 @@ var RequestError = class RequestError extends Error {
|
|
|
67698
67879
|
function isGroupChat(chatId) {
|
|
67699
67880
|
return chatId.startsWith("-");
|
|
67700
67881
|
}
|
|
67701
|
-
function stripTrailingSilentTurnMarker(text) {
|
|
67702
|
-
const trimmed = text.trimEnd();
|
|
67703
|
-
if (!trimmed.endsWith("[[BLUN_TELEGRAM_SILENT]]")) return text;
|
|
67704
|
-
const prefix = trimmed.slice(0, -24);
|
|
67705
|
-
if (prefix.length > 0 && !/\s$/u.test(prefix)) return text;
|
|
67706
|
-
return prefix.trimEnd();
|
|
67707
|
-
}
|
|
67708
67882
|
function normalize(s) {
|
|
67709
67883
|
return s.toLowerCase().replace(/ä/g, "a").replace(/ö/g, "o").replace(/ü/g, "u").replace(/ß/g, "ss").replace(/[‐-―]/g, " ").replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
|
|
67710
67884
|
}
|
|
@@ -67713,9 +67887,7 @@ const EMPTY_CLAUSES = [
|
|
|
67713
67887
|
/^(bin da|bin hier|hier bin ich|ich bin da|was brauchst du|was gibt es|was liegt an|wie kann ich helfen|bereit|ich warte|warte auf|melde mich|freut mich|here|standing by|ready|awaiting|what do you need)$/,
|
|
67714
67888
|
/^(keine (gruppen ?)?antwort|gar keine antwort|keine reaktion|kein wort|no ?action|no (response|reply|answer|comment))( (notig|erforderlich|needed|required))?$/,
|
|
67715
67889
|
/^(ich )?(halte mich raus|(bin|bleibe) (jetzt )?still|schweige|habe nichts zu melden)$/,
|
|
67716
|
-
/^ich best(?:a|ae|ä)tige nichts und beende still$/u,
|
|
67717
67890
|
/^(stille|still|silence|nichts (zu tun|zu melden|fur mich|fuer mich)|nicht meine lane)$/,
|
|
67718
|
-
/^(kein handlungsbedarf|es gibt keinen handlungsbedarf|hier besteht kein handlungsbedarf)( (fur|fuer) mich)?$/,
|
|
67719
67891
|
/^(i (am |will be )?)?(staying (silent|out|quiet)|keeping (quiet|out)|holding back)$/,
|
|
67720
67892
|
/^(i have )?nothing (to (add|do|report)|for me)$/,
|
|
67721
67893
|
/^no need to (respond|reply)$/,
|
|
@@ -67729,53 +67901,14 @@ const EMPTY_CLAUSES = [
|
|
|
67729
67901
|
/^(nach|gemaess) der leerlauf regel( \d+)? gibt es nichts zu melden$/
|
|
67730
67902
|
];
|
|
67731
67903
|
const NOTIFICATION_CONTEXT = /^die(se)? nachricht ist eine (konfigurations )?information( [\p{L}\p{N} _-]{1,64} wird ab jetzt nur noch bei erwahnung benachrichtigt)?( an die gruppe gerichtet)?$/u;
|
|
67732
|
-
function isNarratedSilentTurn(text) {
|
|
67733
|
-
const words = normalize(text);
|
|
67734
|
-
return /^(kein neuer auftrag|kein handlungsbedarf|keine neue anweisung keine frage an mich nichts zu berichten)\b/u.test(words) && /\b(nichts weiter zu tun|stille|stille ohne jede ausgabe)$/u.test(words);
|
|
67735
|
-
}
|
|
67736
67904
|
/**
|
|
67737
67905
|
* True only when all clauses are acknowledgements or silence commentary.
|
|
67738
67906
|
* One substantive or unrecognised clause preserves the entire message.
|
|
67739
67907
|
*/
|
|
67740
67908
|
function isGroupNoiseReply(text) {
|
|
67741
|
-
if (isNarratedSilentTurn(text)) return true;
|
|
67742
67909
|
return text.split(/[.!?;,\r\n]+|\s+[-\u2013\u2014]\s+/u).map(normalize).filter(Boolean).every((clause) => EMPTY_CLAUSES.some((pattern) => pattern.test(clause)) || NOTIFICATION_CONTEXT.test(clause));
|
|
67743
67910
|
}
|
|
67744
67911
|
//#endregion
|
|
67745
|
-
//#region src/outbox-reader.ts
|
|
67746
|
-
/** Read a byte suffix from one outbox descriptor, never the preceding history. */
|
|
67747
|
-
function readOutboxSuffix(start) {
|
|
67748
|
-
if (typeof start === "number" && (!Number.isSafeInteger(start) || start < 0)) return void 0;
|
|
67749
|
-
let fd;
|
|
67750
|
-
try {
|
|
67751
|
-
fd = openSync(outboxLog(), "r");
|
|
67752
|
-
const stat = fstatSync(fd);
|
|
67753
|
-
if (!stat.isFile()) return void 0;
|
|
67754
|
-
const end = stat.size;
|
|
67755
|
-
const offset = typeof start === "number" ? start : start(end);
|
|
67756
|
-
if (!Number.isSafeInteger(offset) || offset < 0) return void 0;
|
|
67757
|
-
if (offset >= end) return "";
|
|
67758
|
-
const buffer = Buffer.allocUnsafe(Math.min(64 * 1024, end - offset));
|
|
67759
|
-
const decoder = new StringDecoder("utf8");
|
|
67760
|
-
const chunks = [];
|
|
67761
|
-
let position = offset;
|
|
67762
|
-
while (position < end) {
|
|
67763
|
-
const count = readSync(fd, buffer, 0, Math.min(buffer.length, end - position), position);
|
|
67764
|
-
if (count === 0) break;
|
|
67765
|
-
position += count;
|
|
67766
|
-
chunks.push(decoder.write(buffer.subarray(0, count)));
|
|
67767
|
-
}
|
|
67768
|
-
chunks.push(decoder.end());
|
|
67769
|
-
return chunks.join("");
|
|
67770
|
-
} catch {
|
|
67771
|
-
return;
|
|
67772
|
-
} finally {
|
|
67773
|
-
if (fd !== void 0) try {
|
|
67774
|
-
closeSync(fd);
|
|
67775
|
-
} catch {}
|
|
67776
|
-
}
|
|
67777
|
-
}
|
|
67778
|
-
//#endregion
|
|
67779
67912
|
//#region src/acp-session.ts
|
|
67780
67913
|
/**
|
|
67781
67914
|
* The King side of the bridge: spawns `<node> <main.mjs> acp`, drives it as
|
|
@@ -67867,15 +68000,15 @@ function outboxMarker() {
|
|
|
67867
68000
|
}
|
|
67868
68001
|
}
|
|
67869
68002
|
/** True when the reply tool appended an outbox entry for this chat since `marker`. */
|
|
67870
|
-
function outboxGrewForChat(marker, chatId
|
|
68003
|
+
function outboxGrewForChat(marker, chatId) {
|
|
67871
68004
|
try {
|
|
67872
|
-
|
|
67873
|
-
|
|
68005
|
+
if (statSync(outboxLog()).size <= marker) return false;
|
|
68006
|
+
const fresh = readFileSync(outboxLog(), "utf8").slice(marker);
|
|
67874
68007
|
for (const line of fresh.split(/\r?\n/)) {
|
|
67875
68008
|
if (line.trim().length === 0) continue;
|
|
67876
68009
|
try {
|
|
67877
68010
|
const entry = JSON.parse(line);
|
|
67878
|
-
if (String(entry.chat_id) === String(chatId)
|
|
68011
|
+
if (String(entry.chat_id) === String(chatId)) return true;
|
|
67879
68012
|
} catch {}
|
|
67880
68013
|
}
|
|
67881
68014
|
} catch {}
|
|
@@ -67895,31 +68028,23 @@ function scrubSecrets(text) {
|
|
|
67895
68028
|
* Deterministic delivery: send `text` to `chatId` via the plain Bot API and
|
|
67896
68029
|
* log it to outbox.jsonl as kind "reply-fallback". Returns true on success.
|
|
67897
68030
|
*/
|
|
67898
|
-
async function sendReplyFallback(chatId, rawText
|
|
67899
|
-
const cleanText = stripTrailingSilentTurnMarker(rawText);
|
|
67900
|
-
if (cleanText.trim().length === 0) return true;
|
|
67901
|
-
let topic;
|
|
67902
|
-
try {
|
|
67903
|
-
topic = threadId === void 0 ? {} : { message_thread_id: telegramThreadId(threadId) };
|
|
67904
|
-
} catch {
|
|
67905
|
-
return false;
|
|
67906
|
-
}
|
|
68031
|
+
async function sendReplyFallback(chatId, rawText) {
|
|
67907
68032
|
const token = botToken();
|
|
67908
68033
|
if (token === void 0) return false;
|
|
67909
|
-
if (isGroupChat(chatId) && isGroupNoiseReply(
|
|
68034
|
+
if (isGroupChat(chatId) && isGroupNoiseReply(rawText)) {
|
|
67910
68035
|
logLine(`reply-fallback suppressed (group meta-noise): ${rawText.slice(0, 60)}`);
|
|
67911
68036
|
return true;
|
|
67912
68037
|
}
|
|
67913
|
-
const text = scrubSecrets(
|
|
68038
|
+
const text = scrubSecrets(rawText);
|
|
67914
68039
|
const body = text.length > TELEGRAM_TEXT_LIMIT ? `${text.slice(0, TELEGRAM_TEXT_LIMIT - 1)}…` : text;
|
|
67915
68040
|
try {
|
|
68041
|
+
assertTelegramLanguageReleased(body, void 0);
|
|
67916
68042
|
const payload = await (await fetch(`https://api.telegram.org/bot${token}/sendMessage`, {
|
|
67917
68043
|
method: "POST",
|
|
67918
68044
|
headers: { "Content-Type": "application/json" },
|
|
67919
68045
|
body: JSON.stringify({
|
|
67920
68046
|
chat_id: chatId,
|
|
67921
|
-
text: body
|
|
67922
|
-
...topic
|
|
68047
|
+
text: body
|
|
67923
68048
|
})
|
|
67924
68049
|
})).json();
|
|
67925
68050
|
if (payload.ok !== true) return false;
|
|
@@ -67928,7 +68053,6 @@ async function sendReplyFallback(chatId, rawText, threadId) {
|
|
|
67928
68053
|
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
67929
68054
|
direction: "out",
|
|
67930
68055
|
kind: "reply-fallback",
|
|
67931
|
-
...topic,
|
|
67932
68056
|
chat_id: String(chatId),
|
|
67933
68057
|
message_ids: payload.result?.message_id !== void 0 ? [payload.result.message_id] : [],
|
|
67934
68058
|
text: body
|
|
@@ -67980,9 +68104,9 @@ var KingSession = class {
|
|
|
67980
68104
|
this.onFatal = onFatal;
|
|
67981
68105
|
}
|
|
67982
68106
|
/** Enqueue one inbound payload as a prompt turn. Never rejects. */
|
|
67983
|
-
send(text, chatId, image
|
|
68107
|
+
send(text, chatId, image) {
|
|
67984
68108
|
this.queue = this.queue.then(async () => {
|
|
67985
|
-
await this.promptOnce(text, chatId, image
|
|
68109
|
+
await this.promptOnce(text, chatId, image);
|
|
67986
68110
|
}).catch((err) => {
|
|
67987
68111
|
logLine(`prompt failed: ${String(err)}`);
|
|
67988
68112
|
process.stderr.write(`telegram channel: prompt failed: ${String(err)}\n`);
|
|
@@ -67992,7 +68116,7 @@ var KingSession = class {
|
|
|
67992
68116
|
this.disposed = true;
|
|
67993
68117
|
this.child?.kill("SIGTERM");
|
|
67994
68118
|
}
|
|
67995
|
-
async promptOnce(text, chatId, image
|
|
68119
|
+
async promptOnce(text, chatId, image) {
|
|
67996
68120
|
const { conn, sessionId } = await this.ensureSession();
|
|
67997
68121
|
const payload = this.preambleSent ? text : `${buildPreamble()}\n\n${text}`;
|
|
67998
68122
|
this.preambleSent = true;
|
|
@@ -68004,13 +68128,13 @@ var KingSession = class {
|
|
|
68004
68128
|
})).stopReason}`);
|
|
68005
68129
|
if (chatId === void 0) return;
|
|
68006
68130
|
for (let i = 0; i < 4; i++) {
|
|
68007
|
-
if (outboxGrewForChat(marker, chatId
|
|
68131
|
+
if (outboxGrewForChat(marker, chatId)) return;
|
|
68008
68132
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
68009
68133
|
}
|
|
68010
|
-
if (outboxGrewForChat(marker, chatId
|
|
68134
|
+
if (outboxGrewForChat(marker, chatId)) return;
|
|
68011
68135
|
const finalText = (this.client?.turnText ?? "").trim();
|
|
68012
68136
|
if (finalText.length === 0) return;
|
|
68013
|
-
logLine(await sendReplyFallback(chatId, finalText
|
|
68137
|
+
logLine(await sendReplyFallback(chatId, finalText) ? "reply-fallback delivered" : "reply-fallback FAILED");
|
|
68014
68138
|
}
|
|
68015
68139
|
async ensureSession(attempt = 1) {
|
|
68016
68140
|
if (this.conn !== void 0 && this.sessionId !== void 0 && this.child?.exitCode === null) return {
|
|
@@ -68347,7 +68471,6 @@ async function handleInbound(event) {
|
|
|
68347
68471
|
const meta = {
|
|
68348
68472
|
chat_id: chatId,
|
|
68349
68473
|
...msgId !== void 0 ? { message_id: String(msgId) } : {},
|
|
68350
|
-
...ctx.messageThreadId !== void 0 ? { message_thread_id: String(ctx.messageThreadId) } : {},
|
|
68351
68474
|
addressed: inferAddressing ? "semantic" : String(addressed),
|
|
68352
68475
|
user: ctx.from?.username ?? String(ctx.from?.id),
|
|
68353
68476
|
user_id: String(ctx.from?.id),
|
|
@@ -68365,10 +68488,10 @@ async function handleInbound(event) {
|
|
|
68365
68488
|
const tag = appendImageLoadFailureObservation(buildChannelTag(ctx.text, meta, addressed, inferAddressing), event.downloadImage !== void 0, image);
|
|
68366
68489
|
const target = deliveryTarget();
|
|
68367
68490
|
if (!startsTurn && target === "headless" && HEADLESS_ENABLED) {
|
|
68368
|
-
headlessContext.add(chatId, tag
|
|
68491
|
+
headlessContext.add(chatId, tag);
|
|
68369
68492
|
return;
|
|
68370
68493
|
}
|
|
68371
|
-
const deliveryTag = startsTurn ? [...headlessContext.take(chatId
|
|
68494
|
+
const deliveryTag = startsTurn ? [...headlessContext.take(chatId), tag].join("\n\n") : tag;
|
|
68372
68495
|
if (target === "tui") deliverToTuiQueue({
|
|
68373
68496
|
v: 1,
|
|
68374
68497
|
text: ctx.text,
|
|
@@ -68376,7 +68499,7 @@ async function handleInbound(event) {
|
|
|
68376
68499
|
preamble: buildPreamble(),
|
|
68377
68500
|
meta
|
|
68378
68501
|
});
|
|
68379
|
-
else if (HEADLESS_ENABLED) session.send(deliveryTag, String(meta.chat_id), image
|
|
68502
|
+
else if (HEADLESS_ENABLED) session.send(deliveryTag, String(meta.chat_id), image);
|
|
68380
68503
|
else process.stderr.write(`telegram bridge: headless off — inbound ${chatId}:${String(msgId)} nicht zugestellt (kein TUI-Fenster offen)\n`);
|
|
68381
68504
|
}
|
|
68382
68505
|
registerTypeHandlers(bot, TOKEN, handleInbound);
|