8 Commits
Author SHA1 Message Date
DrSmoothl 8e28bca775 feat(mcp): add compatible protocol workflows and execution services 2026-10-23 21:19:37 +08:00
DrSmoothl 2d659b0ceb feat(mcp): complete action results and invocation examples
Document result shapes and practical calls for all built-in actions,
including prerequisites, streaming workflows and compatibility limits.

Preserve existing interfaces and execution behavior, and verify the
catalog against action validation and representative responses.
2026-10-23 15:45:07 +08:00
DrSmoothl 34a73084e0 feat(mcp): improve agent discovery and execution feedback
Add structured results, optional keyword search and pagination, and runtime information with explicit connection checks. Preserve existing text responses and execution permissions.

Support request cancellation and transfer progress. Verify compatibility with the full CI suite and isolated MCP and HTTP integration tests.
2026-10-23 15:14:18 +08:00
MliKiowa c7428363cb feat: add async SQLite on Node 24 and improve messaging diagnostics (#520)
Move database work off the main thread on Node.js 24 and improve message handling and runtime diagnostics.

Preserve migration, restart, and concurrency coverage with the async SQLite driver.
2026-10-13 10:12:47 +08:00
DrSmoothl 7c0519f75f lint 2026-10-12 15:43:34 +08:00
DrSmoothl 939d740beb test(mcp): stabilize upload cancellation cleanup 2026-07-13 19:05:33 +08:00
DrSmoothl bb56030979 feat(mcp): support stream actions 2026-07-10 03:06:13 +08:00
DrSmoothl 6d92a28e2b feat(mcp): execution mode — query/invoke OneBot actions with a read/write safety gate
@snowluma/mcp gains execution alongside the read-only catalog: when SNOWLUMA_MCP_ENDPOINT is set it exposes query_action (read-only actions, readOnlyHint) and, in write mode, invoke_action (any known action, destructiveHint), proxied to a running OneBot instance over HTTP. Without an endpoint it degrades to docs-only. SNOWLUMA_MCP_MODE (docs|read|write) gates tool visibility AND is re-checked in execute(), so an unlisted tool cannot be called; unknown/legacy actions are non-invokable.

Read vs write is classified precisely at the source: defineAction/preset gain readOnly (default false = write, the safe default), flowed through describe() into the generated catalog snapshot. 58 actions are marked read-only by what their run() actually does -- name-traps like get_ai_record (publishes to the group), request_decrypt_key (returns a DB key), and download_file (arbitrary URL + disk write) stay writes.

The HTTP call is a ~20-line fetch bridge rather than @snowluma/sdk: the SDK's published dist is bundler-only ESM (extensionless imports) that native node cannot load, and the bin stays a plain tsc build.

onebot 332 tests pass (readOnly is metadata-only, no behavior change); mcp gains 21 tests for mode gating / read-write routing / envelope passthrough / error mapping. Full workspace typecheck clean; native node smoke verified.
2026-06-03 21:53:02 +08:00