feat(onebot,mcp): catalog the Stream API actions (#163 phase 4)

Surface the six Stream API actions in the self-generated docs catalog under
a new 流式接口 category: export each module's specs as an `actions` array
(register now iterates it) and widen the doc collector's spec type to anything
carrying describe() so defineStreamAction results qualify alongside
defineAction. Regenerated the MCP catalog snapshot.

End-to-end verified on a live account over HTTP: test_download_stream (10
frames + terminal), an upload_file_stream round-trip (200 KB chunked in →
sent as a c2c file → download_file_stream back out, byte- and sha256-exact),
and the SSRF guard rejecting a cloud-metadata URL.
This commit is contained in:
DrSmoothl committed 2026-06-30 14:40:39 +08:00
1 parent 369dea582c
commit 7285db1e37
5 files changed
+814 -8

No files matched your search

+3 -2
View File
@@ -359,9 +359,10 @@ const cleanStreamTempFile = defineAction({
},
});
export const actions = [uploadFileStream, cleanStreamTempFile];
export function register(h: ApiHandler, ctx: ApiActionContext): void {
uploadFileStream.register(h, ctx);
cleanStreamTempFile.register(h, ctx);
for (const a of actions) a.register(h, ctx);
}
// Exposed for tests.