refactor(onebot): declare every action param the handler reads

Action handlers now only see fields from the param table. Extra client
keys are still ignored. Garbage values on declared numbers fail instead
of becoming zero.
This commit is contained in:
DrSmoothl committed 2026-08-30 00:56:01 +08:00
1 parent 117335166f
commit f6adadcd12
14 files changed
+952 -235

No files matched your search

@@ -149,7 +149,7 @@ describe('ApiHandler TRACE lifecycle', () => {
const stream = defineStreamAction({
name: 'trace_stream',
params: {},
run: async (_params, _ctx, _raw, sink) => {
run: async (_params, _ctx, sink) => {
await sink.send({ type: StreamStatus.Stream, chunk: 'complete-frame' });
return {
status: 'ok',