@pixelzx/genesis 2026.5.1-beta.4 → 2026.5.2-beta.2
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 +6 -0
- package/dist/.buildstamp +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-startup-metadata.json +1 -1
- package/dist/{command-registry-Df1lKsUc.js → command-registry-3DkSC0Qj.js} +2 -2
- package/dist/{command-registry-BPCQsvFl.js → command-registry-HD9zk9yE.js} +2 -2
- package/dist/{command-registry-core-BMfGHWDR.js → command-registry-core-D3Lzf3z8.js} +3 -3
- package/dist/{completion-cli-xy6TliKu.js → completion-cli-DeQBlf5o.js} +2 -2
- package/dist/{config-cli-BAti5HW3.js → config-cli-BhoeDNYy.js} +1 -1
- package/dist/{doctor-health-BpIpqLVE.js → doctor-health-DS0tystX.js} +1 -1
- package/dist/{doctor-update-BF4xntlm.js → doctor-update-BTCy8Euz.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensions/qqbot/api.js +8 -7
- package/dist/extensions/qqbot/{bootstrap-CNNmgx9g.js → bootstrap-FVplSsCK.js} +1 -1
- package/dist/extensions/qqbot/{channel-CCdEtls5.js → channel-DMxH0bbv.js} +11 -11
- package/dist/extensions/qqbot/channel-plugin-api.js +1 -1
- package/dist/extensions/qqbot/{channel.setup-B37sECi3.js → channel.setup-CF-9jlzM.js} +2 -2
- package/dist/extensions/qqbot/{config-COehCmMt.js → config-CURNx2-h.js} +1 -2
- package/dist/extensions/qqbot/{config-schema-CluJ8Y_G.js → config-schema-DmBxoVwV.js} +2 -2
- package/dist/extensions/qqbot/{exec-approvals-BCPh7ydn.js → exec-approvals-72KCMpsJ.js} +1 -1
- package/dist/extensions/qqbot/{gateway-CGBWORwP.js → gateway-CPsYlL6U.js} +11 -11
- package/dist/extensions/qqbot/genesis.plugin.json +0 -1
- package/dist/extensions/qqbot/{handler-runtime-C-yJD6su.js → handler-runtime-DzIIlsHO.js} +4 -4
- package/dist/extensions/qqbot/log-B7WOcv0o.js +79 -0
- package/dist/extensions/qqbot/{outbound-BHI0KZV_.js → outbound-x8tWBZvi.js} +5 -5
- package/dist/extensions/qqbot/{request-context-BphpGmQk.js → request-context-BxHw_0qm.js} +2 -2
- package/dist/extensions/qqbot/{runtime-BMHSX5zj.js → runtime-CwcVyk-D.js} +0 -3
- package/dist/extensions/qqbot/runtime-api.js +1 -1
- package/dist/extensions/qqbot/{sender-UWA8B8IF.js → sender-C1cNu_mI.js} +3 -84
- package/dist/extensions/qqbot/setup-plugin-api.js +1 -1
- package/dist/extensions/qqbot/{string-normalize-DpiT0I4g.js → string-normalize-BA3kIlSd.js} +35 -1
- package/dist/extensions/qqbot/{target-parser-D-NotuzW.js → target-parser-DWaW87yJ.js} +3 -3
- package/dist/{gateway-cli-CuCzvq5m.js → gateway-cli-CLpAu1-8.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin-sdk/.boundary-entry-shims.stamp +1 -1
- package/dist/postinstall-inventory.json +38 -38
- package/dist/{program-C2PQk8M2.js → program-CqDi-RIs.js} +1 -1
- package/dist/{prompt-select-styled-B4a6E09s.js → prompt-select-styled-B1NyT9lL.js} +1 -1
- package/dist/{register.maintenance-BTBMmP08.js → register.maintenance-CfVFrbm8.js} +1 -1
- package/dist/{register.subclis-DfvN7Gr2.js → register.subclis-CikmeRmb.js} +1 -1
- package/dist/{register.subclis-CLp1LBcX.js → register.subclis-DiLlZOQw.js} +2 -2
- package/dist/{register.subclis-core-B_l2Hgvz.js → register.subclis-core-Bu9TkL83.js} +2 -2
- package/dist/{run-main-DmxHkvgN.js → run-main-C8vYq--j.js} +4 -4
- package/dist/{runtime-schema-CH6RQtCU.js → runtime-schema-CM-a1X8C.js} +1 -1
- package/dist/{server-BZFXQ4aN.js → server-d9ibIcNW.js} +1 -1
- package/dist/{server-plugin-bootstrap-BrLbaEJb.js → server-plugin-bootstrap-Cs4JfSil.js} +2 -2
- package/dist/{server-plugin-bootstrap-88fvnXg-.js → server-plugin-bootstrap-D5sJx2Y6.js} +1 -1
- package/dist/{server.impl-gONje-YS.js → server.impl-G78aaTQM.js} +2 -2
- package/dist/{update-cli-FCImXBZs.js → update-cli-DPG_N1YV.js} +7 -5
- package/dist/{update-runner-C62Lm0-d.js → update-runner-DRsGtv9-.js} +59 -11
- package/package.json +1 -1
- package/dist/extensions/qqbot/adapter-DfD2SNGz.js +0 -35
- /package/dist/extensions/qqbot/{text-chunk-jl3-82oM.js → text-chunk-DMqFPfIP.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Docs: https://docs.genesis.ai
|
|
4
4
|
|
|
5
|
+
## 2026.5.2
|
|
6
|
+
|
|
7
|
+
### Fixes
|
|
8
|
+
|
|
9
|
+
- QQ Bot: keep the bundled channel opt-in instead of default-enabled, so fresh packaged installs no longer stage QQ Bot runtime dependencies or hit `Unable to resolve plugin runtime module` before QQ Bot is configured.
|
|
10
|
+
|
|
5
11
|
## 2026.5.1
|
|
6
12
|
|
|
7
13
|
### Fixes
|
package/dist/.buildstamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1777725003690,"head":"b64ce6372a9e5de17c180ce7c73dcaa971db3fa7"}
|
package/dist/build-info.json
CHANGED
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
],
|
|
28
28
|
"channelCatalogSignature": "f615b6290a063c60cd3200e55e246a88b6336430",
|
|
29
29
|
"rootHelpBundleSignature": "34fd23ef5e2fdf2ab21ba9fd97bc67f396f14987",
|
|
30
|
-
"rootHelpText": "\n🦞 Genesis 2026.5.
|
|
30
|
+
"rootHelpText": "\n🦞 Genesis 2026.5.2-beta.2 (b64ce63)\n If it's repetitive, I'll automate it; if it's hard, I'll bring jokes and a rollback plan.\n\nUsage: genesis [options] [command]\n\nOptions:\n --container <name> Run the CLI inside a running Podman/Docker container\n named <name> (default: env GENESIS_CONTAINER)\n --dev Dev profile: isolate state under ~/.genesis-dev, default\n gateway port 19001, and shift derived ports\n (browser/canvas)\n -h, --help Display help for command\n --log-level <level> Global log level override for file + console\n (silent|fatal|error|warn|info|debug|trace)\n --no-color Disable ANSI colors\n --profile <name> Use a named profile (isolates\n GENESIS_STATE_DIR/GENESIS_CONFIG_PATH under\n ~/.genesis-<name>)\n -V, --version output the version number\n\nCommands:\n Hint: commands suffixed with * have subcommands. Run <command> --help for details.\n acp * Agent Control Protocol tools\n agent Run one agent turn via the Gateway\n agents * Manage isolated agents (workspaces, auth, routing)\n approvals * Manage exec approvals (gateway or node host)\n backup * Create and verify local backup archives for Genesis state\n capability * Run provider-backed inference commands (fallback alias:\n infer)\n channels * Manage connected chat channels (Telegram, Discord, etc.)\n chat Open a local terminal UI (alias for tui --local)\n clawbot * Legacy clawbot command aliases\n completion Generate shell completion script\n config * Non-interactive config helpers\n (get/set/unset/file/validate). Default: starts guided\n setup.\n configure Interactive configuration for credentials, channels,\n gateway, and agent defaults\n cron * Manage cron jobs via the Gateway scheduler\n daemon * Gateway service (legacy alias)\n dashboard Open the Control UI with your current token\n devices * Device pairing + token management\n directory * Lookup contact and group IDs (self, peers, groups) for\n supported chat channels\n dns * DNS helpers for wide-area discovery (Tailscale + CoreDNS)\n docs Search the live Genesis docs\n doctor Health checks + quick fixes for the gateway and channels\n exec-policy * Show or synchronize requested exec policy with host\n approvals\n gateway * Run, inspect, and query the WebSocket Gateway\n health Fetch health from the running gateway\n help Display help for command\n hooks * Manage internal agent hooks\n infer * Run provider-backed inference commands\n logs Tail gateway file logs via RPC\n mcp * Manage Genesis MCP config and channel bridge\n memory Search, inspect, and reindex memory files\n message * Send, read, and manage messages\n models * Discover, scan, and configure models\n node * Run and manage the headless node host service\n nodes * Manage gateway-owned node pairing and node commands\n onboard Interactive onboarding for gateway, workspace, and skills\n pairing * Secure DM pairing (approve inbound requests)\n plugins * Manage Genesis plugins\n proxy * Run the Genesis debug proxy and inspect captured traffic\n qr Generate mobile pairing QR/setup code\n reset Reset local config/state (keeps the CLI installed)\n sandbox * Manage sandbox containers for agent isolation\n secrets * Secrets runtime reload controls\n security * Security tools and local config audits\n sessions * List stored conversation sessions\n setup Initialize local config and agent workspace\n skills * List and inspect available skills\n status Show channel health and recent session recipients\n system * System events, heartbeat, and presence\n tasks * Inspect durable background task state\n terminal Open a local terminal UI (alias for tui --local)\n tui Open a terminal UI connected to the Gateway\n uninstall Uninstall the gateway service + local data (CLI remains)\n update * Update Genesis and inspect update channel status\n wallet * Manage the encrypted local wallet and public addresses\n webhooks * Webhook helpers and integrations\n\nExamples:\n genesis models --help\n Show detailed help for the models command.\n genesis channels login --verbose\n Link personal WhatsApp Web and show QR + connection logs.\n genesis message send --target +15555550123 --message \"Hi\" --json\n Send via your web session and print JSON result.\n genesis gateway --port 18789\n Run the WebSocket Gateway locally.\n genesis --dev gateway\n Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.\n genesis gateway --force\n Kill anything bound to the default gateway port, then start it.\n genesis gateway ...\n Gateway control via WebSocket.\n genesis agent --to +15555550123 --message \"Run summary\" --deliver\n Talk directly to the agent using the Gateway; optionally send the WhatsApp reply.\n genesis message send --channel telegram --target @mychat --message \"Hi\"\n Send via your Telegram bot.\n\nDocs: https://docs.genesis.ai/cli\n\n"
|
|
31
31
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./core-command-descriptors-B5prjRnu.js";
|
|
2
|
-
import { n as registerCoreCliByName } from "./command-registry-core-
|
|
3
|
-
import "./command-registry-
|
|
2
|
+
import { n as registerCoreCliByName } from "./command-registry-core-D3Lzf3z8.js";
|
|
3
|
+
import "./command-registry-HD9zk9yE.js";
|
|
4
4
|
export { registerCoreCliByName };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerCoreCliCommands } from "./command-registry-core-
|
|
2
|
-
import { n as registerSubCliCommands } from "./register.subclis-
|
|
1
|
+
import { r as registerCoreCliCommands } from "./command-registry-core-D3Lzf3z8.js";
|
|
2
|
+
import { n as registerSubCliCommands } from "./register.subclis-DiLlZOQw.js";
|
|
3
3
|
//#region src/cli/program/command-registry.ts
|
|
4
4
|
function registerProgramCommands(program, ctx, argv = process.argv) {
|
|
5
5
|
registerCoreCliCommands(program, ctx, argv);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as resolveCliArgvInvocation } from "./argv-invocation-BIP3nEco.js";
|
|
2
2
|
import { n as shouldRegisterPrimaryCommandOnly } from "./command-registration-policy-B8ZdpbiI.js";
|
|
3
|
-
import { a as defineImportedCommandGroupSpec, i as buildCommandGroupEntries, o as defineImportedProgramCommandGroupSpecs } from "./register.subclis-core-
|
|
3
|
+
import { a as defineImportedCommandGroupSpec, i as buildCommandGroupEntries, o as defineImportedProgramCommandGroupSpecs } from "./register.subclis-core-Bu9TkL83.js";
|
|
4
4
|
import { n as getCoreCliCommandNames$1, t as getCoreCliCommandDescriptors } from "./core-command-descriptors-B5prjRnu.js";
|
|
5
5
|
import { i as registerCommandGroups, r as registerCommandGroupByName } from "./register-command-groups-CfdK4t6G.js";
|
|
6
6
|
//#region src/cli/program/command-registry-core.ts
|
|
@@ -31,7 +31,7 @@ const coreEntrySpecs = [
|
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
commandNames: ["config"],
|
|
34
|
-
loadModule: () => import("./config-cli-
|
|
34
|
+
loadModule: () => import("./config-cli-BhoeDNYy.js"),
|
|
35
35
|
exportName: "registerConfigCli"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
@@ -46,7 +46,7 @@ const coreEntrySpecs = [
|
|
|
46
46
|
"reset",
|
|
47
47
|
"uninstall"
|
|
48
48
|
],
|
|
49
|
-
loadModule: () => import("./register.maintenance-
|
|
49
|
+
loadModule: () => import("./register.maintenance-CfVFrbm8.js"),
|
|
50
50
|
exportName: "registerMaintenanceCommands"
|
|
51
51
|
}
|
|
52
52
|
])),
|
|
@@ -2,8 +2,8 @@ import { c as routeLogsToStderr } from "./subsystem-DTMy5YmO.js";
|
|
|
2
2
|
import { t as formatDocsLink } from "./links-DmsJCU7L.js";
|
|
3
3
|
import { r as theme } from "./theme-BrRleVfL.js";
|
|
4
4
|
import { a as isCompletionShell, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as COMPLETION_SHELLS } from "./completion-runtime-CFyg2ITl.js";
|
|
5
|
-
import { n as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-core-
|
|
6
|
-
import { n as registerCoreCliByName, t as getCoreCliCommandNames } from "./command-registry-core-
|
|
5
|
+
import { n as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-core-Bu9TkL83.js";
|
|
6
|
+
import { n as registerCoreCliByName, t as getCoreCliCommandNames } from "./command-registry-core-D3Lzf3z8.js";
|
|
7
7
|
import { t as getProgramContext } from "./program-context-BviaNtC6.js";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import fs from "node:fs/promises";
|
|
@@ -17,7 +17,7 @@ import { r as replaceConfigFile } from "./mutate-BHCTSP-M.js";
|
|
|
17
17
|
import "./config-Ce-ZeYp2.js";
|
|
18
18
|
import { a as normalizeConfigIssues, n as formatConfigIssueLines } from "./issue-format-DpSVQL-G.js";
|
|
19
19
|
import { t as redactConfigObject } from "./redact-snapshot-CSzGqs9U.js";
|
|
20
|
-
import { n as readBestEffortRuntimeConfigSchema } from "./runtime-schema-
|
|
20
|
+
import { n as readBestEffortRuntimeConfigSchema } from "./runtime-schema-CM-a1X8C.js";
|
|
21
21
|
import { n as setCommandJsonMode } from "./json-mode-DJIBXO2N.js";
|
|
22
22
|
import fs from "node:fs";
|
|
23
23
|
import JSON5 from "json5";
|
|
@@ -19,7 +19,7 @@ async function doctorCommand(runtime, options = {}) {
|
|
|
19
19
|
argv1: process.argv[1],
|
|
20
20
|
cwd: process.cwd()
|
|
21
21
|
});
|
|
22
|
-
const { maybeOfferUpdateBeforeDoctor } = await import("./doctor-update-
|
|
22
|
+
const { maybeOfferUpdateBeforeDoctor } = await import("./doctor-update-BTCy8Euz.js");
|
|
23
23
|
if ((await maybeOfferUpdateBeforeDoctor({
|
|
24
24
|
runtime: effectiveRuntime,
|
|
25
25
|
options,
|
|
@@ -3,7 +3,7 @@ import { t as isTruthyEnvValue } from "./env-CLDDxlAx.js";
|
|
|
3
3
|
import { t as formatCliCommand } from "./command-format-DAeUlu7u.js";
|
|
4
4
|
import { r as runCommandWithTimeout } from "./exec-CKo0c2Rj.js";
|
|
5
5
|
import { t as note } from "./note-BPtN0RPa.js";
|
|
6
|
-
import { t as runGatewayUpdate } from "./update-runner-
|
|
6
|
+
import { t as runGatewayUpdate } from "./update-runner-DRsGtv9-.js";
|
|
7
7
|
//#region src/commands/doctor-update.ts
|
|
8
8
|
async function detectGenesisGitCheckout(root) {
|
|
9
9
|
const res = await runCommandWithTimeout([
|
package/dist/entry.js
CHANGED
|
@@ -179,7 +179,7 @@ function tryHandleRootHelpFastPath(argv, deps = {}) {
|
|
|
179
179
|
}
|
|
180
180
|
function runMainOrRootHelp(argv) {
|
|
181
181
|
if (tryHandleRootHelpFastPath(argv)) return;
|
|
182
|
-
import("./run-main-
|
|
182
|
+
import("./run-main-C8vYq--j.js").then(({ runCli }) => runCli(argv)).catch((error) => {
|
|
183
183
|
console.error("[genesis] Failed to start CLI:", error instanceof Error ? error.stack ?? error.message : error);
|
|
184
184
|
process$1.exitCode = 1;
|
|
185
185
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { a as recordMessageReply, c as sendCronMessage, d as sendPhoto, f as sendProactiveMessage, h as sendVoice, l as sendDocument, m as sendVideoMsg, n as getMessageReplyConfig, o as registerOutboundAudioAdapter, p as sendText, r as getMessageReplyStats, s as registerOutboundAudioAdapterFactory, t as checkMessageReplyLimit, u as sendMedia } from "./outbound-
|
|
2
|
-
import { n as getBridgeLogger } from "./bootstrap-
|
|
3
|
-
import { a as resolveQQBotAccount, i as resolveDefaultQQBotAccountId, n as applyQQBotAccountConfig, r as listQQBotAccountIds, t as DEFAULT_ACCOUNT_ID } from "./config-
|
|
4
|
-
import { t as qqbotPlugin } from "./channel-
|
|
5
|
-
import {
|
|
6
|
-
import { t as qqbotSetupPlugin } from "./channel.setup-
|
|
7
|
-
import { r as getFrameworkCommands, t as getRequestContext } from "./request-context-
|
|
1
|
+
import { a as recordMessageReply, c as sendCronMessage, d as sendPhoto, f as sendProactiveMessage, h as sendVoice, l as sendDocument, m as sendVideoMsg, n as getMessageReplyConfig, o as registerOutboundAudioAdapter, p as sendText, r as getMessageReplyStats, s as registerOutboundAudioAdapterFactory, t as checkMessageReplyLimit, u as sendMedia } from "./outbound-x8tWBZvi.js";
|
|
2
|
+
import { n as getBridgeLogger } from "./bootstrap-FVplSsCK.js";
|
|
3
|
+
import { a as resolveQQBotAccount, i as resolveDefaultQQBotAccountId, n as applyQQBotAccountConfig, r as listQQBotAccountIds, t as DEFAULT_ACCOUNT_ID } from "./config-CURNx2-h.js";
|
|
4
|
+
import { t as qqbotPlugin } from "./channel-DMxH0bbv.js";
|
|
5
|
+
import { a as formatErrorMessage, n as debugLog, t as debugError } from "./log-B7WOcv0o.js";
|
|
6
|
+
import { t as qqbotSetupPlugin } from "./channel.setup-CF-9jlzM.js";
|
|
7
|
+
import { r as getFrameworkCommands, t as getRequestContext } from "./request-context-BxHw_0qm.js";
|
|
8
|
+
import { o as getAccessToken } from "./sender-C1cNu_mI.js";
|
|
8
9
|
//#region extensions/qqbot/src/engine/tools/channel-api.ts
|
|
9
10
|
/**
|
|
10
11
|
* QQ Channel API proxy tool core logic.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as registerPlatformAdapterFactory, l as hasPlatformAdapter, u as registerPlatformAdapter } from "./string-normalize-BA3kIlSd.js";
|
|
2
2
|
import { hasConfiguredSecretInput, normalizeResolvedSecretInputString, normalizeSecretInputString } from "genesis/plugin-sdk/secret-input";
|
|
3
3
|
import { resolvePreferredGenesisTmpDir } from "genesis/plugin-sdk/temp-path";
|
|
4
4
|
//#region extensions/qqbot/src/bridge/logger.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as asOptionalObjectRecord } from "./string-normalize-BA3kIlSd.js";
|
|
2
|
+
import { n as getBridgeLogger, t as ensurePlatformAdapter } from "./bootstrap-FVplSsCK.js";
|
|
2
3
|
import { a as resolveApprovalTarget } from "./approval-cg0SVahb.js";
|
|
3
|
-
import { t as
|
|
4
|
-
import { a as
|
|
5
|
-
import { a as
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { l as getQQBotDataPath, n as normalizeTarget, t as looksLikeQQBotTarget } from "./target-parser-D-NotuzW.js";
|
|
4
|
+
import { a as resolveQQBotAccount, n as applyQQBotAccountConfig, t as DEFAULT_ACCOUNT_ID$1 } from "./config-CURNx2-h.js";
|
|
5
|
+
import { a as resolveQQBotExecApprovalConfig, i as matchesQQBotApprovalAccount, n as isQQBotExecApprovalAuthorizedSender, o as shouldHandleQQBotExecApprovalRequest, r as isQQBotExecApprovalClientEnabled, t as isQQBotExecApprovalApprover } from "./exec-approvals-72KCMpsJ.js";
|
|
6
|
+
import { a as qqbotSetupAdapterShared, i as qqbotMeta, n as qqbotSetupWizard, r as qqbotConfigAdapter, t as qqbotChannelConfigSchema } from "./config-schema-DmBxoVwV.js";
|
|
7
|
+
import { t as getQQBotRuntime } from "./runtime-CwcVyk-D.js";
|
|
8
|
+
import { l as getQQBotDataPath, n as normalizeTarget, t as looksLikeQQBotTarget } from "./target-parser-DWaW87yJ.js";
|
|
9
9
|
import { getExecApprovalReplyMetadata } from "genesis/plugin-sdk/approval-runtime";
|
|
10
10
|
import { createChannelApprovalCapability, splitChannelApprovalCapability } from "genesis/plugin-sdk/approval-delivery-runtime";
|
|
11
11
|
import { createLazyChannelApprovalNativeRuntimeAdapter } from "genesis/plugin-sdk/approval-handler-adapter-runtime";
|
|
@@ -152,7 +152,7 @@ function createQQBotApprovalCapability() {
|
|
|
152
152
|
},
|
|
153
153
|
load: async () => {
|
|
154
154
|
ensurePlatformAdapter();
|
|
155
|
-
return (await import("./handler-runtime-
|
|
155
|
+
return (await import("./handler-runtime-DzIIlsHO.js")).qqbotApprovalNativeRuntime;
|
|
156
156
|
}
|
|
157
157
|
})
|
|
158
158
|
});
|
|
@@ -344,7 +344,7 @@ function clearAccountCredentials(cfg, accountId) {
|
|
|
344
344
|
//#region extensions/qqbot/src/channel.ts
|
|
345
345
|
let _gatewayModulePromise;
|
|
346
346
|
function loadGatewayModule() {
|
|
347
|
-
_gatewayModulePromise ??= import("./gateway-
|
|
347
|
+
_gatewayModulePromise ??= import("./gateway-CPsYlL6U.js");
|
|
348
348
|
return _gatewayModulePromise;
|
|
349
349
|
}
|
|
350
350
|
const EXEC_APPROVAL_COMMAND_RE = /\/approve(?:@[^\s]+)?\s+[A-Za-z0-9][A-Za-z0-9._:-]*\s+(?:allow-once|allow-always|always|deny)\b/i;
|
|
@@ -401,7 +401,7 @@ const qqbotPlugin = {
|
|
|
401
401
|
sendText: async ({ to, text, accountId, replyToId, cfg }) => {
|
|
402
402
|
await loadGatewayModule();
|
|
403
403
|
const account = resolveQQBotAccount(cfg, accountId);
|
|
404
|
-
const { sendText } = await import("./outbound-
|
|
404
|
+
const { sendText } = await import("./outbound-x8tWBZvi.js").then((n) => n.i);
|
|
405
405
|
const result = await sendText({
|
|
406
406
|
to,
|
|
407
407
|
text,
|
|
@@ -418,7 +418,7 @@ const qqbotPlugin = {
|
|
|
418
418
|
sendMedia: async ({ to, text, mediaUrl, accountId, replyToId, cfg }) => {
|
|
419
419
|
await loadGatewayModule();
|
|
420
420
|
const account = resolveQQBotAccount(cfg, accountId);
|
|
421
|
-
const { sendMedia } = await import("./outbound-
|
|
421
|
+
const { sendMedia } = await import("./outbound-x8tWBZvi.js").then((n) => n.i);
|
|
422
422
|
const result = await sendMedia({
|
|
423
423
|
to,
|
|
424
424
|
text: text ?? "",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as qqbotPlugin } from "./channel-
|
|
1
|
+
import { t as qqbotPlugin } from "./channel-DMxH0bbv.js";
|
|
2
2
|
export { qqbotPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./bootstrap-
|
|
2
|
-
import { a as qqbotSetupAdapterShared, i as qqbotMeta, n as qqbotSetupWizard, r as qqbotConfigAdapter, t as qqbotChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import "./bootstrap-FVplSsCK.js";
|
|
2
|
+
import { a as qqbotSetupAdapterShared, i as qqbotMeta, n as qqbotSetupWizard, r as qqbotConfigAdapter, t as qqbotChannelConfigSchema } from "./config-schema-DmBxoVwV.js";
|
|
3
3
|
//#region extensions/qqbot/src/channel.setup.ts
|
|
4
4
|
/**
|
|
5
5
|
* Setup-only QQBot plugin — lightweight subset used during `genesis onboard`
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as normalizeStringifiedOptionalString, o as readStringField, r as normalizeOptionalLowercaseString, t as asOptionalObjectRecord } from "./string-normalize-DpiT0I4g.js";
|
|
1
|
+
import { a as normalizeStringifiedOptionalString, c as getPlatformAdapter, o as readStringField, r as normalizeOptionalLowercaseString, t as asOptionalObjectRecord } from "./string-normalize-BA3kIlSd.js";
|
|
3
2
|
import fs from "node:fs";
|
|
4
3
|
//#region extensions/qqbot/src/engine/config/resolve.ts
|
|
5
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as normalizeLowercaseStringOrEmpty } from "./string-normalize-
|
|
2
|
-
import { a as resolveQQBotAccount, c as describeAccount, i as resolveDefaultQQBotAccountId, l as formatAllowFrom, n as applyQQBotAccountConfig, r as listQQBotAccountIds, s as applyAccountConfig, u as isAccountConfigured } from "./config-
|
|
1
|
+
import { n as normalizeLowercaseStringOrEmpty } from "./string-normalize-BA3kIlSd.js";
|
|
2
|
+
import { a as resolveQQBotAccount, c as describeAccount, i as resolveDefaultQQBotAccountId, l as formatAllowFrom, n as applyQQBotAccountConfig, r as listQQBotAccountIds, s as applyAccountConfig, u as isAccountConfigured } from "./config-CURNx2-h.js";
|
|
3
3
|
import { buildSecretInputSchema } from "genesis/plugin-sdk/secret-input";
|
|
4
4
|
import { applyAccountNameToChannelSection, deleteAccountFromConfigSection, setAccountEnabledInConfigSection } from "genesis/plugin-sdk/core";
|
|
5
5
|
import { DEFAULT_ACCOUNT_ID, createStandardChannelSetupStatus, setSetupChannelEnabled } from "genesis/plugin-sdk/setup";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveQQBotAccount, r as listQQBotAccountIds } from "./config-
|
|
1
|
+
import { a as resolveQQBotAccount, r as listQQBotAccountIds } from "./config-CURNx2-h.js";
|
|
2
2
|
import { resolveApprovalRequestChannelAccountId } from "genesis/plugin-sdk/approval-native-runtime";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "genesis/plugin-sdk/text-runtime";
|
|
4
4
|
import { resolveApprovalApprovers } from "genesis/plugin-sdk/approval-auth-runtime";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { C as formatFileSize, S as downloadFile, _ as isCronReminderPayload, b as normalizeMediaTags, d as sendPhoto, g as encodePayloadForCron, h as sendVoice, l as sendDocument, m as sendVideoMsg, o as registerOutboundAudioAdapter, s as registerOutboundAudioAdapterFactory, u as sendMedia, v as isMediaPayload, x as MAX_UPLOAD_SIZE, y as parseQQBotPayload } from "./outbound-
|
|
2
|
-
import {
|
|
3
|
-
import { r as setBridgeLogger, t as ensurePlatformAdapter } from "./bootstrap-
|
|
1
|
+
import { C as formatFileSize, S as downloadFile, _ as isCronReminderPayload, b as normalizeMediaTags, d as sendPhoto, g as encodePayloadForCron, h as sendVoice, l as sendDocument, m as sendVideoMsg, o as registerOutboundAudioAdapter, s as registerOutboundAudioAdapterFactory, u as sendMedia, v as isMediaPayload, x as MAX_UPLOAD_SIZE, y as parseQQBotPayload } from "./outbound-x8tWBZvi.js";
|
|
2
|
+
import { c as getPlatformAdapter, i as normalizeOptionalString, n as normalizeLowercaseStringOrEmpty, o as readStringField, s as sanitizeFileName, t as asOptionalObjectRecord } from "./string-normalize-BA3kIlSd.js";
|
|
3
|
+
import { r as setBridgeLogger, t as ensurePlatformAdapter } from "./bootstrap-FVplSsCK.js";
|
|
4
4
|
import { i as parseApprovalButtonData } from "./approval-cg0SVahb.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { a as
|
|
5
|
+
import { n as getQQBotRuntimeForEngine, t as getQQBotRuntime } from "./runtime-CwcVyk-D.js";
|
|
6
|
+
import { a as formatErrorMessage, i as formatDuration, n as debugLog, r as debugWarn, t as debugError } from "./log-B7WOcv0o.js";
|
|
7
|
+
import { a as detectFfmpeg, c as getQQBotDataDir, d as getTempDir, f as isLocalPath, h as resolveQQBotPayloadLocalFilePath, i as checkSilkWasmAvailable, l as getQQBotDataPath, m as normalizePath$1, o as getHomeDir, p as isWindows, s as getPlatform, u as getQQBotMediaDir } from "./target-parser-DWaW87yJ.js";
|
|
8
|
+
import { t as registerTextChunker } from "./text-chunk-DMqFPfIP.js";
|
|
9
|
+
import { a as registerApproveRuntimeGetter, i as matchSlashCommand, n as runWithRequestContext, o as registerPluginVersion, s as registerVersionResolver } from "./request-context-BxHw_0qm.js";
|
|
10
|
+
import { S as withTokenRetry, _ as sendText, a as createRawInputNotifyFn, b as startBackgroundTokenRefresh, d as initSender, f as onMessageSent, g as sendInputNotify, h as sendImage, i as clearTokenCache, l as getPluginUserAgent, m as sendFileMessage, n as acknowledgeInteraction, o as getAccessToken, p as registerAccount, r as buildDeliveryTarget, s as getGatewayUrl, t as accountToCreds, u as initApiConfig, v as sendVideoMessage, x as stopBackgroundTokenRefresh, y as sendVoiceMessage } from "./sender-C1cNu_mI.js";
|
|
11
11
|
import * as fs$1 from "node:fs";
|
|
12
12
|
import fs from "node:fs";
|
|
13
|
-
import * as os$1 from "node:os";
|
|
14
|
-
import crypto from "node:crypto";
|
|
15
13
|
import * as path$1 from "node:path";
|
|
16
14
|
import path from "node:path";
|
|
17
15
|
import { execFile } from "node:child_process";
|
|
16
|
+
import * as os$1 from "node:os";
|
|
17
|
+
import crypto from "node:crypto";
|
|
18
18
|
import { resolveRuntimeServiceVersion } from "genesis/plugin-sdk/cli-runtime";
|
|
19
19
|
import WebSocket from "ws";
|
|
20
20
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as getBridgeLogger, t as ensurePlatformAdapter } from "./bootstrap-
|
|
1
|
+
import { n as getBridgeLogger, t as ensurePlatformAdapter } from "./bootstrap-FVplSsCK.js";
|
|
2
2
|
import { a as resolveApprovalTarget, n as buildExecApprovalText, r as buildPluginApprovalText, t as buildApprovalKeyboard } from "./approval-cg0SVahb.js";
|
|
3
|
-
import { a as resolveQQBotAccount } from "./config-
|
|
4
|
-
import { a as resolveQQBotExecApprovalConfig, i as matchesQQBotApprovalAccount, o as shouldHandleQQBotExecApprovalRequest, r as isQQBotExecApprovalClientEnabled } from "./exec-approvals-
|
|
5
|
-
import { c as getMessageApi, t as accountToCreds } from "./sender-
|
|
3
|
+
import { a as resolveQQBotAccount } from "./config-CURNx2-h.js";
|
|
4
|
+
import { a as resolveQQBotExecApprovalConfig, i as matchesQQBotApprovalAccount, o as shouldHandleQQBotExecApprovalRequest, r as isQQBotExecApprovalClientEnabled } from "./exec-approvals-72KCMpsJ.js";
|
|
5
|
+
import { c as getMessageApi, t as accountToCreds } from "./sender-C1cNu_mI.js";
|
|
6
6
|
import { resolveApprovalRequestSessionConversation } from "genesis/plugin-sdk/approval-native-runtime";
|
|
7
7
|
import { createChannelApprovalNativeRuntimeAdapter } from "genesis/plugin-sdk/approval-handler-runtime";
|
|
8
8
|
//#region extensions/qqbot/src/bridge/approval/handler-runtime.ts
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
//#region extensions/qqbot/src/engine/utils/format.ts
|
|
2
|
+
/**
|
|
3
|
+
* General formatting and string utilities.
|
|
4
|
+
* 通用格式化与字符串工具。
|
|
5
|
+
*
|
|
6
|
+
* Pure utility functions with zero external dependencies.
|
|
7
|
+
* Replaces `genesis/plugin-sdk/error-runtime` and `text-runtime`
|
|
8
|
+
* helpers for use inside engine/.
|
|
9
|
+
*
|
|
10
|
+
* NOTE: The framework `formatErrorMessage` also applies `redactSensitiveText()`
|
|
11
|
+
* for token masking. We intentionally omit that here — the framework's log
|
|
12
|
+
* pipeline handles redaction at a higher level.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Format any error object into a readable string.
|
|
16
|
+
* 将任意错误对象格式化为可读字符串。
|
|
17
|
+
*
|
|
18
|
+
* Traverses the `.cause` chain for nested Error objects to include
|
|
19
|
+
* the full error context (e.g. network errors wrapped inside HTTP errors).
|
|
20
|
+
*/
|
|
21
|
+
function formatErrorMessage(err) {
|
|
22
|
+
if (err instanceof Error) {
|
|
23
|
+
let formatted = err.message || err.name || "Error";
|
|
24
|
+
let cause = err.cause;
|
|
25
|
+
const seen = new Set([err]);
|
|
26
|
+
while (cause && !seen.has(cause)) {
|
|
27
|
+
seen.add(cause);
|
|
28
|
+
if (cause instanceof Error) {
|
|
29
|
+
if (cause.message) formatted += ` | ${cause.message}`;
|
|
30
|
+
cause = cause.cause;
|
|
31
|
+
} else if (typeof cause === "string") {
|
|
32
|
+
formatted += ` | ${cause}`;
|
|
33
|
+
break;
|
|
34
|
+
} else break;
|
|
35
|
+
}
|
|
36
|
+
return formatted;
|
|
37
|
+
}
|
|
38
|
+
if (typeof err === "string") return err;
|
|
39
|
+
if (err === null || err === void 0 || typeof err === "number" || typeof err === "boolean" || typeof err === "bigint") return String(err);
|
|
40
|
+
try {
|
|
41
|
+
return JSON.stringify(err);
|
|
42
|
+
} catch {
|
|
43
|
+
return Object.prototype.toString.call(err);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/** Format a millisecond duration into a human-readable string (e.g. "5m 30s"). */
|
|
47
|
+
function formatDuration(durationMs) {
|
|
48
|
+
const seconds = Math.round(durationMs / 1e3);
|
|
49
|
+
if (seconds < 60) return `${seconds}s`;
|
|
50
|
+
const minutes = Math.floor(seconds / 60);
|
|
51
|
+
const remainSeconds = seconds % 60;
|
|
52
|
+
return remainSeconds > 0 ? `${minutes}m ${remainSeconds}s` : `${minutes}m`;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region extensions/qqbot/src/engine/utils/log.ts
|
|
56
|
+
/**
|
|
57
|
+
* QQBot debug logging utilities.
|
|
58
|
+
* QQBot 调试日志工具。
|
|
59
|
+
*
|
|
60
|
+
* Only outputs when the QQBOT_DEBUG environment variable is set,
|
|
61
|
+
* preventing user message content from leaking in production logs.
|
|
62
|
+
*
|
|
63
|
+
* Self-contained within engine/ — no framework SDK dependency.
|
|
64
|
+
*/
|
|
65
|
+
const isDebug = () => !!process.env.QQBOT_DEBUG;
|
|
66
|
+
/** Debug-level log; only outputs when QQBOT_DEBUG is enabled. */
|
|
67
|
+
function debugLog(...args) {
|
|
68
|
+
if (isDebug()) console.log(...args);
|
|
69
|
+
}
|
|
70
|
+
/** Debug-level warning; only outputs when QQBOT_DEBUG is enabled. */
|
|
71
|
+
function debugWarn(...args) {
|
|
72
|
+
if (isDebug()) console.warn(...args);
|
|
73
|
+
}
|
|
74
|
+
/** Debug-level error; only outputs when QQBOT_DEBUG is enabled. */
|
|
75
|
+
function debugError(...args) {
|
|
76
|
+
if (isDebug()) console.error(...args);
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
export { formatErrorMessage as a, formatDuration as i, debugLog as n, debugWarn as r, debugError as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { c as getPlatformAdapter, i as normalizeOptionalString, n as normalizeLowercaseStringOrEmpty, s as sanitizeFileName } from "./string-normalize-BA3kIlSd.js";
|
|
2
|
+
import { a as formatErrorMessage, n as debugLog, r as debugWarn, t as debugError } from "./log-B7WOcv0o.js";
|
|
3
|
+
import { c as getQQBotDataDir, f as isLocalPath, h as resolveQQBotPayloadLocalFilePath, m as normalizePath, r as parseTarget$1, u as getQQBotMediaDir } from "./target-parser-DWaW87yJ.js";
|
|
4
|
+
import { _ as sendText$1, h as sendImage, m as sendFileMessage, t as accountToCreds, u as initApiConfig, v as sendVideoMessage, y as sendVoiceMessage } from "./sender-C1cNu_mI.js";
|
|
5
5
|
import * as fs$1 from "node:fs";
|
|
6
|
-
import crypto from "node:crypto";
|
|
7
6
|
import * as path$1 from "node:path";
|
|
7
|
+
import crypto from "node:crypto";
|
|
8
8
|
//#region \0rolldown/runtime.js
|
|
9
9
|
var __defProp = Object.defineProperty;
|
|
10
10
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as getQQBotDataDir, o as getHomeDir, p as isWindows } from "./target-parser-
|
|
1
|
+
import { n as debugLog } from "./log-B7WOcv0o.js";
|
|
2
|
+
import { c as getQQBotDataDir, o as getHomeDir, p as isWindows } from "./target-parser-DWaW87yJ.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { b as setGenesisVersion } from "./sender-UWA8B8IF.js";
|
|
2
1
|
import { createPluginRuntimeStore } from "genesis/plugin-sdk/runtime-store";
|
|
3
2
|
//#region extensions/qqbot/src/bridge/runtime.ts
|
|
4
3
|
const { setRuntime: _setRuntime, getRuntime: getQQBotRuntime } = createPluginRuntimeStore({
|
|
5
4
|
pluginId: "qqbot",
|
|
6
5
|
errorMessage: "QQBot runtime not initialized"
|
|
7
6
|
});
|
|
8
|
-
/** Set the QQBot runtime and inject the framework version into the User-Agent. */
|
|
9
7
|
function setQQBotRuntime(runtime) {
|
|
10
8
|
_setRuntime(runtime);
|
|
11
|
-
setGenesisVersion(runtime.version);
|
|
12
9
|
}
|
|
13
10
|
/** Type-narrowed getter for engine/ modules that need GatewayPluginRuntime. */
|
|
14
11
|
function getQQBotRuntimeForEngine() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as setQQBotRuntime, t as getQQBotRuntime } from "./runtime-
|
|
1
|
+
import { r as setQQBotRuntime, t as getQQBotRuntime } from "./runtime-CwcVyk-D.js";
|
|
2
2
|
export { getQQBotRuntime, setQQBotRuntime };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { s as sanitizeFileName } from "./string-normalize-
|
|
1
|
+
import { s as sanitizeFileName } from "./string-normalize-BA3kIlSd.js";
|
|
2
|
+
import { a as formatErrorMessage, n as debugLog, r as debugWarn, t as debugError } from "./log-B7WOcv0o.js";
|
|
2
3
|
import os from "node:os";
|
|
3
4
|
import * as crypto$1 from "node:crypto";
|
|
4
5
|
//#region extensions/qqbot/src/engine/types.ts
|
|
@@ -26,60 +27,6 @@ var ApiError = class extends Error {
|
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
29
|
//#endregion
|
|
29
|
-
//#region extensions/qqbot/src/engine/utils/format.ts
|
|
30
|
-
/**
|
|
31
|
-
* General formatting and string utilities.
|
|
32
|
-
* 通用格式化与字符串工具。
|
|
33
|
-
*
|
|
34
|
-
* Pure utility functions with zero external dependencies.
|
|
35
|
-
* Replaces `genesis/plugin-sdk/error-runtime` and `text-runtime`
|
|
36
|
-
* helpers for use inside engine/.
|
|
37
|
-
*
|
|
38
|
-
* NOTE: The framework `formatErrorMessage` also applies `redactSensitiveText()`
|
|
39
|
-
* for token masking. We intentionally omit that here — the framework's log
|
|
40
|
-
* pipeline handles redaction at a higher level.
|
|
41
|
-
*/
|
|
42
|
-
/**
|
|
43
|
-
* Format any error object into a readable string.
|
|
44
|
-
* 将任意错误对象格式化为可读字符串。
|
|
45
|
-
*
|
|
46
|
-
* Traverses the `.cause` chain for nested Error objects to include
|
|
47
|
-
* the full error context (e.g. network errors wrapped inside HTTP errors).
|
|
48
|
-
*/
|
|
49
|
-
function formatErrorMessage(err) {
|
|
50
|
-
if (err instanceof Error) {
|
|
51
|
-
let formatted = err.message || err.name || "Error";
|
|
52
|
-
let cause = err.cause;
|
|
53
|
-
const seen = new Set([err]);
|
|
54
|
-
while (cause && !seen.has(cause)) {
|
|
55
|
-
seen.add(cause);
|
|
56
|
-
if (cause instanceof Error) {
|
|
57
|
-
if (cause.message) formatted += ` | ${cause.message}`;
|
|
58
|
-
cause = cause.cause;
|
|
59
|
-
} else if (typeof cause === "string") {
|
|
60
|
-
formatted += ` | ${cause}`;
|
|
61
|
-
break;
|
|
62
|
-
} else break;
|
|
63
|
-
}
|
|
64
|
-
return formatted;
|
|
65
|
-
}
|
|
66
|
-
if (typeof err === "string") return err;
|
|
67
|
-
if (err === null || err === void 0 || typeof err === "number" || typeof err === "boolean" || typeof err === "bigint") return String(err);
|
|
68
|
-
try {
|
|
69
|
-
return JSON.stringify(err);
|
|
70
|
-
} catch {
|
|
71
|
-
return Object.prototype.toString.call(err);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
/** Format a millisecond duration into a human-readable string (e.g. "5m 30s"). */
|
|
75
|
-
function formatDuration(durationMs) {
|
|
76
|
-
const seconds = Math.round(durationMs / 1e3);
|
|
77
|
-
if (seconds < 60) return `${seconds}s`;
|
|
78
|
-
const minutes = Math.floor(seconds / 60);
|
|
79
|
-
const remainSeconds = seconds % 60;
|
|
80
|
-
return remainSeconds > 0 ? `${minutes}m ${remainSeconds}s` : `${minutes}m`;
|
|
81
|
-
}
|
|
82
|
-
//#endregion
|
|
83
30
|
//#region extensions/qqbot/src/engine/api/api-client.ts
|
|
84
31
|
/**
|
|
85
32
|
* Core HTTP client for the QQ Open Platform REST API.
|
|
@@ -694,30 +641,6 @@ var TokenManager = class {
|
|
|
694
641
|
}
|
|
695
642
|
};
|
|
696
643
|
//#endregion
|
|
697
|
-
//#region extensions/qqbot/src/engine/utils/log.ts
|
|
698
|
-
/**
|
|
699
|
-
* QQBot debug logging utilities.
|
|
700
|
-
* QQBot 调试日志工具。
|
|
701
|
-
*
|
|
702
|
-
* Only outputs when the QQBOT_DEBUG environment variable is set,
|
|
703
|
-
* preventing user message content from leaking in production logs.
|
|
704
|
-
*
|
|
705
|
-
* Self-contained within engine/ — no framework SDK dependency.
|
|
706
|
-
*/
|
|
707
|
-
const isDebug = () => !!process.env.QQBOT_DEBUG;
|
|
708
|
-
/** Debug-level log; only outputs when QQBOT_DEBUG is enabled. */
|
|
709
|
-
function debugLog(...args) {
|
|
710
|
-
if (isDebug()) console.log(...args);
|
|
711
|
-
}
|
|
712
|
-
/** Debug-level warning; only outputs when QQBOT_DEBUG is enabled. */
|
|
713
|
-
function debugWarn(...args) {
|
|
714
|
-
if (isDebug()) console.warn(...args);
|
|
715
|
-
}
|
|
716
|
-
/** Debug-level error; only outputs when QQBOT_DEBUG is enabled. */
|
|
717
|
-
function debugError(...args) {
|
|
718
|
-
if (isDebug()) console.error(...args);
|
|
719
|
-
}
|
|
720
|
-
//#endregion
|
|
721
644
|
//#region extensions/qqbot/src/engine/utils/upload-cache.ts
|
|
722
645
|
/**
|
|
723
646
|
* Cache `file_info` values returned by the QQ Bot API so identical uploads can be reused
|
|
@@ -810,10 +733,6 @@ function initSender(options) {
|
|
|
810
733
|
if (options.pluginVersion) _pluginVersion = options.pluginVersion;
|
|
811
734
|
if (options.genesisVersion) _genesisVersion = options.genesisVersion;
|
|
812
735
|
}
|
|
813
|
-
/** Update the Genesis framework version in the User-Agent (called after runtime injection). */
|
|
814
|
-
function setGenesisVersion(version) {
|
|
815
|
-
if (version) _genesisVersion = version;
|
|
816
|
-
}
|
|
817
736
|
/** Per-appId account registry — each account owns all its resources. */
|
|
818
737
|
const _accountRegistry = /* @__PURE__ */ new Map();
|
|
819
738
|
/** Fallback logger for unregistered accounts (CLI / test scenarios). */
|
|
@@ -1159,4 +1078,4 @@ function accountToCreds(account) {
|
|
|
1159
1078
|
};
|
|
1160
1079
|
}
|
|
1161
1080
|
//#endregion
|
|
1162
|
-
export { withTokenRetry as
|
|
1081
|
+
export { withTokenRetry as S, sendText as _, createRawInputNotifyFn as a, startBackgroundTokenRefresh as b, getMessageApi as c, initSender as d, onMessageSent as f, sendInputNotify as g, sendImage as h, clearTokenCache as i, getPluginUserAgent as l, sendFileMessage as m, acknowledgeInteraction as n, getAccessToken as o, registerAccount as p, buildDeliveryTarget as r, getGatewayUrl as s, accountToCreds as t, initApiConfig as u, sendVideoMessage as v, stopBackgroundTokenRefresh as x, sendVoiceMessage as y };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as qqbotSetupPlugin } from "./channel.setup-
|
|
1
|
+
import { t as qqbotSetupPlugin } from "./channel.setup-CF-9jlzM.js";
|
|
2
2
|
export { qqbotSetupPlugin };
|