openclaw/extensions
cxy 62fb87641e
fix(qqbot): unify slash command auth, c2cOnly gating, and file delivery (#73616)
* fix(qqbot): align clear-storage command with actual downloads directory

The /bot-clear-storage command previously targeted
~/.openclaw/media/qqbot/downloads/{appId}/, but inbound attachments
and outbound fallback downloads are stored directly under
~/.openclaw/media/qqbot/downloads/ without appId subdivision.

This mismatch caused the clear command to report 'no files to clean'
while downloaded files continued to occupy disk space.

Changes:
- Replace resolveQqbotDownloadsDirForApp(appId) with
  resolveQqbotDownloadsDir() that returns the downloads root
- Use getQQBotMediaPath('downloads') instead of manual path assembly
- Remove appId-based path validation (no longer needed)
- Update usage text to reflect the new scope

* refactor(qqbot): unify slash command auth and c2cOnly gating in registry

Previously, slash command authorization and group-chat rejection were
scattered across individual handlers and a hardcoded GROUP_EXCLUDED set.
This led to inconsistent behavior: commandAuthorized was hardcoded to
true in the pre-dispatch path, some handlers checked allowFrom while
others did not, and group users received no response for auth-gated
commands.

Changes:

1. Add resolveSlashCommandAuth() (new file slash-command-auth.ts)
   - Requires sender to appear in an explicit non-wildcard allowFrom
     list; wildcard ['*'] does not grant admin command access
   - Group messages use groupAllowFrom, falling back to allowFrom

2. Fix commandAuthorized in slash-command-handler.ts
   - Replace hardcoded 'true' with resolveSlashCommandAuth() call

3. Add c2cOnly field to SlashCommand interface
   - Commands declare c2cOnly: true instead of checking ctx.type
     inside their handler
   - Registry rejects c2cOnly commands in group chat before auth
     check, returning a user-friendly hint

4. Remove GROUP_EXCLUDED hardcoded set from register-basic.ts
   - /bot-help now filters by cmd.c2cOnly dynamically

5. Clean up handler-level auth and scene checks
   - Remove hasExplicitCommandAllowlist check from register-logs
   - Remove ctx.type !== 'c2c' guards from all c2cOnly handlers
   - Improve rejection message to mention the correct config field
     (allowFrom for c2c, groupAllowFrom for group)

6. Mark commands: bot-upgrade, bot-streaming, bot-logs,
   bot-clear-storage, bot-approve as c2cOnly: true

* fix(qqbot): pass allowQQBotDataDownloads when sending slash command file attachments

The /bot-logs command writes temporary log files to the QQBot data
downloads directory (~/.openclaw/qqbot/downloads/), but sendDocument
was called without allowQQBotDataDownloads: true. This caused
resolveOutboundMediaPath to reject the file path as outside the
allowed media roots, silently failing the file attachment while
the text reply was sent successfully.

Add { allowQQBotDataDownloads: true } to the sendDocument call in
slash-command-handler.ts so file-bearing slash command results
(currently only /bot-logs) can deliver their attachments.

* feat(qqbot): add /bot-me command to display sender user ID

Add a new /bot-me slash command that returns the sender's user ID
(openid). This helps users quickly find the value they need to add
to allowFrom or groupAllowFrom configuration for admin command
access.

Marked as c2cOnly since the user ID is sensitive information.

* feat(qqbot): update response timeout

* feat(qqbot): add engine import boundary test and bump version

- Add engine-import-boundary.test.ts to enforce that engine/ sources
  only import from openclaw/plugin-sdk/* and never reach into other
  openclaw internals directly. Scans all 110 source files recursively.
- Bump plugin version to 2026.4.27.

* fix(qqbot): unify slash command auth, c2cOnly gating, and file delivery (#73616) (thanks @cxyhhhhh)

---------

Co-authored-by: sliverp <870080352@qq.com>
2026-04-30 16:12:39 +08:00
..
acpx test(plugins): align release validation fixtures 2026-04-30 01:25:54 +01:00
active-memory fix(active-memory): clarify fallback config help (#74602) (thanks @jeffrey701) 2026-04-30 05:17:27 +01:00
alibaba perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
amazon-bedrock fix(bedrock): expose Opus 4.7 max thinking 2026-04-29 22:25:58 -07:00
amazon-bedrock-mantle chore: update dependencies 2026-04-29 22:42:45 +01:00
anthropic chore: update dependencies 2026-04-29 22:42:45 +01:00
anthropic-vertex chore: update dependencies 2026-04-29 22:42:45 +01:00
arcee perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
azure-speech perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
bluebubbles refactor(channels): route remaining turns through kernel 2026-04-29 23:16:16 +01:00
bonjour fix(bonjour): cap flapping advertiser restarts 2026-04-30 03:46:18 +01:00
brave chore: update dependencies 2026-04-29 22:42:45 +01:00
browser fix(cli): preserve lazy command parent flags 2026-04-30 00:48:46 +01:00
byteplus fix: simplify volc catalog model builders 2026-04-28 06:21:24 +01:00
cerebras fix: normalize raw manifest provider catalogs 2026-04-28 05:30:04 +01:00
chutes perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
cloudflare-ai-gateway perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
codex fix(codex): flush pending steering on completion 2026-04-30 03:06:26 +01:00
comfy perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
copilot-proxy perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
deepgram build(deps): trim runtime dependency graph 2026-04-29 08:11:57 +01:00
deepinfra perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
deepseek test: dedupe mirrored memory and deepseek tests 2026-04-29 15:11:39 +01:00
device-pair fix(device-pair): reject invalid remote setup URLs 2026-04-29 20:45:33 +01:00
diagnostics-otel fix(otel): record liveness warnings 2026-04-28 05:41:30 +01:00
diagnostics-prometheus fix: restore main ci and speed tests 2026-04-28 05:34:28 +01:00
diffs chore: update dependencies 2026-04-29 22:42:45 +01:00
discord fix(discord): avoid resolving tokens for read-only accessors 2026-04-30 04:57:07 +01:00
document-extract fix(pdf): resolve standard fonts from pdfjs package root (#70936) 2026-04-30 00:38:48 -07:00
duckduckgo perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
elevenlabs build(deps): trim runtime dependency graph 2026-04-29 08:11:57 +01:00
exa perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
fal perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
feishu fix(feishu): skip empty-text messages with no media to prevent blank session turns (#74634) (#74661) 2026-04-30 04:24:27 +00:00
file-transfer fix(file-transfer): require canonical node policy authorization (#74742) 2026-04-30 04:03:40 +00:00
firecrawl chore: update dependencies 2026-04-29 22:42:45 +01:00
fireworks chore: update dependencies 2026-04-29 22:42:45 +01:00
github-copilot fix(github-copilot): support GUI/RPC wizard auth flow (#73290) 2026-04-29 16:45:31 -07:00
google fix(google): accept Windows ADC manifest paths 2026-04-29 22:26:09 -07:00
google-meet fix: refresh Google Meet speech retry readiness 2026-04-30 02:45:44 +01:00
googlechat fix(channels): keep status accessors config-only 2026-04-30 05:08:32 +01:00
gradium perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
groq perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
huggingface perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
image-generation-core refactor: narrow media core plugin api barrels 2026-04-27 14:34:00 +01:00
imessage refactor(channels): route inbound turns through kernel 2026-04-30 04:08:47 +01:00
inworld perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
irc fix: align open DM allowlist policy (#74112) 2026-04-29 06:52:12 +01:00
kilocode perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
kimi-coding chore: update dependencies 2026-04-29 22:42:45 +01:00
line refactor(channels): route inbound turns through kernel 2026-04-30 04:08:47 +01:00
litellm perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
llm-task chore: update dependencies 2026-04-29 22:42:45 +01:00
lmstudio chore: update dependencies 2026-04-29 22:42:45 +01:00
lobster chore: update dependencies 2026-04-29 22:42:45 +01:00
matrix refactor(channels): route inbound turns through kernel 2026-04-30 04:08:47 +01:00
mattermost fix: stabilize full release validation 2026-04-30 04:55:23 +01:00
media-understanding-core refactor(media): move sharp image ops into media runtime (#71519) 2026-04-25 04:31:10 -07:00
memory-core chore: update dependencies 2026-04-29 22:42:45 +01:00
memory-lancedb fix(memory-lancedb): get memory records through ltm list command (#67952) 2026-04-30 16:01:51 +08:00
memory-wiki chore: update dependencies 2026-04-29 22:42:45 +01:00
microsoft perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
microsoft-foundry perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
migrate-claude refactor(migration): share cached config runtime helper 2026-04-29 20:05:23 +01:00
migrate-hermes refactor(migration): share cached config runtime helper 2026-04-29 20:05:23 +01:00
minimax perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
mistral build(deps): trim runtime dependency graph 2026-04-29 08:11:57 +01:00
moonshot test: relax live web search timeouts 2026-04-29 19:14:15 +01:00
msteams refactor(channels): route inbound turns through kernel 2026-04-30 04:08:47 +01:00
nextcloud-talk fix(plugins): prune inactive bundled runtime deps 2026-04-28 10:34:24 +01:00
nostr perf: mark channel plugins startup lazy 2026-04-28 04:33:47 +01:00
nvidia feat(nvidia): add NVIDIA provider with onboarding flow (#71204) 2026-04-29 09:25:12 -07:00
ollama chore: update dependencies 2026-04-29 22:42:45 +01:00
open-prose perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
openai chore: update dependencies 2026-04-29 22:42:45 +01:00
opencode perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
opencode-go perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
openrouter feat(openrouter): add video generation provider (#72700) 2026-04-28 10:57:31 +01:00
openshell feat: declare startup plugin imports explicitly 2026-04-28 04:33:47 +01:00
perplexity perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
phone-control feat: declare startup plugin imports explicitly 2026-04-28 04:33:47 +01:00
qa-channel chore: update dependencies 2026-04-29 22:42:45 +01:00
qa-lab test(plugins): split kitchen sink qa personalities (#74612) 2026-04-29 13:56:49 -07:00
qa-matrix test(ci): harden release failure paths 2026-04-29 06:41:58 +01:00
qianfan refactor: build qianfan and xiaomi catalogs from manifests 2026-04-28 05:30:04 +01:00
qqbot fix(qqbot): unify slash command auth, c2cOnly gating, and file delivery (#73616) 2026-04-30 16:12:39 +08:00
qwen docs(types): mark remaining deprecated aliases 2026-04-29 00:04:17 -07:00
runway perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
searxng perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
senseaudio perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
sglang perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
shared refactor: split plugin sdk test helpers 2026-04-28 01:14:19 +01:00
signal refactor(channels): route inbound turns through kernel 2026-04-30 04:08:47 +01:00
skill-workshop chore: update dependencies 2026-04-29 22:42:45 +01:00
slack fix(slack): offset presentation controls after native blocks 2026-04-29 23:15:19 -07:00
speech-core fix(gateway): use runtime config for secret-backed talk 2026-04-28 06:05:27 +01:00
stepfun fix: narrow stepfun manifest provider keys 2026-04-28 05:30:04 +01:00
synology-chat refactor(channels): finish turn kernel migration 2026-04-30 01:31:00 +01:00
synthetic perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
talk-voice feat: declare startup plugin imports explicitly 2026-04-28 04:33:47 +01:00
tavily chore: update dependencies 2026-04-29 22:42:45 +01:00
telegram fix(channels): keep status accessors config-only 2026-04-30 05:08:32 +01:00
tencent feat: declare tencent tokenhub model catalog 2026-04-28 05:30:04 +01:00
test-support refactor: split plugin sdk test helpers 2026-04-28 01:14:19 +01:00
thread-ownership feat: declare startup plugin imports explicitly 2026-04-28 04:33:47 +01:00
tlon refactor(channels): route remaining turns through kernel 2026-04-29 23:16:16 +01:00
together feat: declare together model catalog 2026-04-28 07:25:03 +01:00
tokenjuice fix(plugins): use tokenjuice published openclaw types 2026-04-29 19:12:52 -07:00
tts-local-cli perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
twitch refactor(channels): finish turn kernel migration 2026-04-30 01:31:00 +01:00
venice fix(deepseek): backfill v4 assistant reasoning replay 2026-04-28 10:07:39 +01:00
vercel-ai-gateway fix: add vercel ai gateway thinking profile 2026-04-29 12:13:20 +01:00
video-generation-core refactor: narrow media core plugin api barrels 2026-04-27 14:34:00 +01:00
vllm perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
voice-call fix(voice-call): close webhook in-flight limiter fail-open on empty remote address (#74453) 2026-04-30 01:02:14 +00:00
volcengine fix: simplify volc catalog model builders 2026-04-28 06:21:24 +01:00
voyage perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
vydra perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
web-readability perf: mark capability plugins startup lazy 2026-04-28 04:33:47 +01:00
webhooks refactor(plugin-sdk): add managed task flow runtime 2026-04-28 05:32:40 +01:00
whatsapp refactor(channels): route inbound turns through kernel 2026-04-30 04:08:47 +01:00
xai chore: update dependencies 2026-04-29 22:42:45 +01:00
xiaomi refactor: build qianfan and xiaomi catalogs from manifests 2026-04-28 05:30:04 +01:00
zai perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
zalo refactor(channels): route inbound turns through kernel 2026-04-30 04:08:47 +01:00
zalouser refactor(channels): route inbound turns through kernel 2026-04-30 04:08:47 +01:00
.npmignore
AGENTS.md
CLAUDE.md
music-generation-providers.live.test.ts test(live): classify provider media drift 2026-04-29 05:25:43 +01:00
tsconfig.package-boundary.base.json
tsconfig.package-boundary.paths.json refactor(plugin-sdk): retire reserved helper exports 2026-04-28 05:21:57 +01:00
video-generation-providers.live.test.ts test(live): classify provider media drift 2026-04-29 05:25:43 +01:00